Rivet analyses referenceBESIII_2022_I2129305Cross section for $e^+e^-\to \pi^+\pi^- D^+D^-$ between 4.19 and 4.946 GeVExperiment: BESIII (BEPC) Inspire ID: 2129305 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.5, 2.5); (2.5, 2.5); (2.5, 2.5) GeV Run details:
Cross section for $e^+e^-\to \pi^+\pi^- D^+D^-$ between 4.19 and 4.946 GeV. The cross section for the $\psi_3(3842)$ resonant contribution is also measured. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2022_I2129305.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief e+e- > pi+pi- D+ D-
10 class BESIII_2022_I2129305 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2129305);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 for (unsigned int ix=0;ix<2;++ix) {
26 book(_sigma[ix], ix+1, 1, 1);
27 for (const string& en : _sigma[ix].binning().edges<0>()) {
28 const double end = std::stod(en)*GeV;
29 if (isCompatibleWithSqrtS(end)) {
30 _ecms[ix] = en;
31 break;
32 }
33 }
34 }
35 if (_ecms[0].empty() && _ecms[1].empty()) {
36 MSG_ERROR("Beam energy incompatible with analysis.");
37 }
38 }
39
40 void findChildren(const Particle& p,map<long,int> & nRes, int &ncount) {
41 for (const Particle &child : p.children()) {
42 if (child.children().empty()) {
43 nRes[child.pid()]-=1;
44 --ncount;
45 }
46 else {
47 findChildren(child,nRes,ncount);
48 }
49 }
50 }
51
52 /// Perform the per-event analysis
53 void analyze(const Event& event) {
54 const FinalState& fs = apply<FinalState>(event, "FS");
55 map<long,int> nCount;
56 int ntotal(0);
57 for (const Particle& p : fs.particles()) {
58 nCount[p.pid()] += 1;
59 ++ntotal;
60 }
61 const FinalState& ufs = apply<FinalState>(event, "UFS");
62 bool matched=false;
63 for (const Particle& Dp : ufs.particles(Cuts::pid==PID::DPLUS)) {
64 if (Dp.children().empty()) continue;
65 map<long,int> nRes=nCount;
66 int ncount = ntotal;
67 findChildren(Dp,nRes,ncount);
68 for (const Particle& Dm : ufs.particles(Cuts::pid==PID::DMINUS)) {
69 if (Dm.children().empty()) continue;
70 map<long,int> nRes2 = nRes;
71 int ncount2 = ncount;
72 findChildren(Dm,nRes2,ncount2);
73 if (ncount2!=2) continue;
74 matched=true;
75 for (const auto& val : nRes2) {
76 if (abs(val.first)==211) {
77 if (val.second!=1) {
78 matched = false;
79 break;
80 }
81 }
82 else if (val.second!=0) {
83 matched = false;
84 break;
85 }
86 }
87 if(matched) {
88 _sigma[0]->fill(_ecms[0]);
89 if (!Dm.parents().empty() && !Dp.parents().empty()) {
90 // see if D+ from psi3
91 Particle parent1=Dp;
92 while (!parent1.parents().empty()) {
93 parent1=parent1.parents()[0];
94 if (parent1.pid()==447) break;
95 }
96 if (parent1.pid()!=447) break;
97 // see if D- from psi3
98 Particle parent2=Dm;
99 while (!parent2.parents().empty()) {
100 parent2=parent2.parents()[0];
101 if (parent2.pid()==447) break;
102 }
103 if (parent2.pid()!=447) break;
104 if (fuzzyEquals(parent1.momentum(),parent2.momentum())) {
105 _sigma[1]->fill(_ecms[1]);
106 }
107 }
108 break;
109 }
110 }
111 if(matched) break;
112 }
113 }
114
115
116 /// Normalise histograms etc., after the run
117 void finalize() {
118 scale(_sigma, crossSection()/ sumOfWeights() /picobarn);
119 }
120
121 /// @}
122
123
124 /// @name Histograms
125 /// @{
126 BinnedHistoPtr<string> _sigma[2];
127 string _ecms[2];
128 /// @}
129
130
131 };
132
133
134 RIVET_DECLARE_PLUGIN(BESIII_2022_I2129305);
135
136}
|