Rivet analyses referenceBESIII_2022_I2614215Cross section for $e^+e^-\to\omega X(3872)$ for $\sqrt{s}=4.661$ to 4.951 GeVExperiment: BESIII (BEPC) Inspire ID: 2614215 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (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.5, 2.5); (2.5, 2.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to\omega X(3872)$ for $\sqrt{s}=4.661$ to 4.951 GeV by the BESIII collaboration. There is no consensus as to the nature of the $X(3872)$ $c\bar{c}$ state and therefore we taken its PDG code to be 9030443, i.e. the first unused code for an undetermined spin one $c\bar{c}$ state. This can be changed using the PID option if a different code is used by the event generator performing the simulation. Source code: BESIII_2022_I2614215.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- > omega X(3872)
10 class BESIII_2022_I2614215 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2614215);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // set the PDG code
23 _pid = getOption<double>("PID", 9030443);
24 // projections
25 declare(FinalState(), "FS");
26 declare(UnstableParticles(), "UFS");
27 // counters
28 book(_sigma,1,1,1);
29 for(const string& en : _sigma.binning().edges<0>()) {
30 const double end = std::stod(en)*GeV;
31 if (isCompatibleWithSqrtS(end)) {
32 _ecms = en;
33 break;
34 }
35 }
36 if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
37 }
38
39 void findChildren(const Particle& p, map<long,int> & nRes, int &ncount) {
40 for (const Particle &child : p.children()) {
41 if (child.children().empty()) {
42 --nRes[child.pid()];
43 --ncount;
44 }
45 else {
46 findChildren(child,nRes,ncount);
47 }
48 }
49 }
50
51 /// Perform the per-event analysis
52 void analyze(const Event& event) {
53 const FinalState& fs = apply<FinalState>(event, "FS");
54 map<long,int> nCount;
55 int ntotal(0);
56 for (const Particle& p: fs.particles()) {
57 nCount[p.pid()] += 1;
58 ++ntotal;
59 }
60 const FinalState& ufs = apply<FinalState>(event, "UFS");
61 for (const Particle& XX : ufs.particles(Cuts::pid==_pid)) {
62 if (XX.children().empty()) continue;
63 bool matched = false;
64 map<long,int> nRes = nCount;
65 int ncount = ntotal;
66 findChildren(XX,nRes,ncount);
67 for (const Particle & omega : ufs.particles(Cuts::pid==223)) {
68 if (omega.parents()[0].pid()==_pid || omega.children().empty()) continue;
69 map<long,int> nRes2 = nRes;
70 int ncount2 = ncount;
71 findChildren(omega,nRes2,ncount2);
72 matched = true;
73 for (const auto& val : nRes2) {
74 if (val.second!=0) {
75 matched = false;
76 break;
77 }
78 }
79 if(matched) {
80 _sigma->fill(_ecms);
81 break;
82 }
83 }
84 if(matched) break;
85 }
86 }
87
88
89 /// Normalise histograms etc., after the run
90 void finalize() {
91 scale(_sigma, crossSection()/ sumOfWeights() /picobarn);
92 }
93
94 /// @}
95
96
97 /// @name Histograms
98 /// @{
99 int _pid;
100 BinnedHistoPtr<string> _sigma;
101 string _ecms;
102 /// @}
103
104
105 };
106
107
108 RIVET_DECLARE_PLUGIN(BESIII_2022_I2614215);
109
110}
|