Rivet analyses referenceBESIII_2023_I2705058Cross section for $e^+e^-\to\eta^\prime\phi$ for centre-of-mass energies between 3.508 to 4.951 GeVExperiment: BESIII (BEPC) Inspire ID: 2705058 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (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.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.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.5, 2.5); (2.5, 2.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to\eta^\prime\phi$ for centre-of-mass energies between 3.508 to 4.951 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2023_I2705058.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- > phi eta'
10 class BESIII_2023_I2705058 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2705058);
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],1,1,1+ix);
27
28 for (const string& en : _sigma[0].binning().edges<0>()) {
29 double end = std::stod(en)*GeV;
30 if(isCompatibleWithSqrtS(end)) {
31 _ecms = en;
32 break;
33 }
34 }
35 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
36 }
37
38 void findChildren(const Particle& p, map<long,int>& nRes, int &ncount) {
39 for (const Particle& child : p.children()) {
40 if (child.children().empty()) {
41 nRes[child.pid()]-=1;
42 --ncount;
43 }
44 else {
45 findChildren(child,nRes,ncount);
46 }
47 }
48 }
49
50 /// Perform the per-event analysis
51 void analyze(const Event& event) {
52 const FinalState& fs = apply<FinalState>(event, "FS");
53
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
62 // loop over eta mesons
63 for (const Particle& p : ufs.particles(Cuts::pid==331)) {
64 if (p.children().empty()) continue;
65 map<long,int> nRes = nCount;
66 int ncount = ntotal;
67 findChildren(p,nRes,ncount);
68 // loop over phi mesons
69 for (const Particle& p2 : ufs.particles(Cuts::pid==333)) {
70 if (p2.parents()[0].isSame(p)) continue;
71 map<long,int> nResB = nRes;
72 int ncountB = ncount;
73 findChildren(p2,nResB,ncountB);
74 bool born = true;
75 bool matched = true;
76 for (const auto& val : nResB) {
77 if (val.first==22) {
78 if (val.second!=ncountB) {
79 matched = false;
80 break;
81 }
82 if (val.second!=0) born=false;
83 }
84 if (val.second!=0) {
85 matched = false;
86 break;
87 }
88 }
89 if (matched) {
90 _sigma[0]->fill(_ecms);
91 if(born) _sigma[1]->fill(_ecms);
92 }
93 }
94 }
95 }
96
97
98 /// Normalise histograms etc., after the run
99 void finalize() {
100 double fact = crossSection()/ sumOfWeights()/picobarn;
101 for(unsigned int ix=0;ix<2;++ix) {
102 scale(_sigma[ix],fact);
103 }
104 }
105
106 /// @}
107
108
109 /// @name Histograms
110 /// @{
111 BinnedHistoPtr<string> _sigma[2];
112 string _ecms;
113 /// @}
114
115
116 };
117
118
119 RIVET_DECLARE_PLUGIN(BESIII_2023_I2705058);
120
121}
|