Rivet analyses referenceBESIII_2022_I2050468Cross section for $e^+e^-\to \pi^+\pi^-\psi_2(3823)(\to\gamma\chi_{c1})$ between 4.22 and 4.70 GeVExperiment: BESIII (BEPC) Inspire ID: 2050468 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (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.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.3, 2.3) GeV Run details:
Cross section for $e^+e^-\to \pi^+\pi^-\psi_2(3823)(\to\gamma\chi_{c1})$ between 4.22 and 4.70 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2022_I2050468.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- psi_2
10 class BESIII_2022_I2050468 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2050468);
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 book(_sigma, 1,1,1);
26 for (const string& en : _sigma.binning().edges<0>()) {
27 const double end = std::stod(en)*GeV;
28 if (isCompatibleWithSqrtS(end)) {
29 _ecms = en;
30 break;
31 }
32 }
33 if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
34 }
35
36 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
37 for (const Particle &child : p.children()) {
38 if(child.children().empty()) {
39 nRes[child.pid()]-=1;
40 --ncount;
41 }
42 else {
43 findChildren(child,nRes,ncount);
44 }
45 }
46 }
47
48 /// Perform the per-event analysis
49 void analyze(const Event& event) {
50 const FinalState& fs = apply<FinalState>(event, "FS");
51 map<long,int> nCount;
52 int ntotal(0);
53 for (const Particle& p : fs.particles()) {
54 nCount[p.pid()] += 1;
55 ++ntotal;
56 }
57 const FinalState& ufs = apply<FinalState>(event, "UFS");
58 for (const Particle& chi : ufs.particles(Cuts::pid==20443)) {
59 if(chi.children().empty()) continue;
60 map<long,int> nRes=nCount;
61 int ncount = ntotal;
62 findChildren(chi,nRes,ncount);
63 if(ncount!=3) continue;
64 bool matched = true;
65 for(auto const & val : nRes) {
66 if(abs(val.first)==211) {
67 if(val.second!=1) {
68 matched = false;
69 break;
70 }
71 }
72 else if(abs(val.first)==22) {
73 if(val.second!=1) {
74 matched = false;
75 break;
76 }
77 }
78 else if(val.second!=0) {
79 matched = false;
80 break;
81 }
82 }
83 if(!matched) continue;
84 if(chi.parents().empty()) continue;
85 Particle psi = chi.parents()[0];
86 if(psi.pid()!=20445 || psi.children().size()!=2) continue;
87 if(psi.children()[0].pid()==PID::PHOTON ||
88 psi.children()[1].pid()==PID::PHOTON) {
89 _sigma->fill(_ecms);
90 break;
91 }
92 }
93 }
94
95
96 /// Normalise histograms etc., after the run
97 void finalize() {
98 scale(_sigma,crossSection()/ sumOfWeights() /picobarn);
99 }
100
101 /// @}
102
103
104 /// @name Histograms
105 /// @{
106 BinnedHistoPtr<string> _sigma;
107 string _ecms;
108 /// @}
109
110
111 };
112
113
114 RIVET_DECLARE_PLUGIN(BESIII_2022_I2050468);
115
116}
|