Rivet analyses referenceBESIII_2020_I1817739Cross section for $e^+e^-\to\omega\pi^0$ and $\omega\eta$ for centre-of-mass energies between 2.00 and 3.08 GeVExperiment: BESIII (BEPC) Inspire ID: 1817739 Status: VALIDATED Authors:
Beam energies: (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to\omega\pi^0$ and $\omega\eta$ for centre-of-mass energies between 2.00 and 3.08 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2020_I1817739.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 pi0 and omega eta
10 class BESIII_2020_I1817739 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2020_I1817739);
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(_numOmegaPi, 2, 1, 1);
26 book(_nOmegaEta, 1, 1, 1);
27
28 for (const string& en : _numOmegaPi.binning().edges<0>()) {
29 const 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 /// Perform the per-event analysis
50 void analyze(const Event& event) {
51 const FinalState& fs = apply<FinalState>(event, "FS");
52 map<long,int> nCount;
53 int ntotal(0);
54 for (const Particle& p : fs.particles()) {
55 nCount[p.pid()] += 1;
56 ++ntotal;
57 }
58 const FinalState& ufs = apply<FinalState>(event, "UFS");
59 for (const Particle& p : ufs.particles(Cuts::pid==223)) {
60 if(p.children().empty()) continue;
61 map<long,int> nRes = nCount;
62 int ncount = ntotal;
63 findChildren(p,nRes,ncount);
64 // check for omega pi0
65 bool matched = true;
66 for(auto const & val : nRes) {
67 if(val.first==111) {
68 if(val.second!=1) {
69 matched = false;
70 break;
71 }
72 }
73 else if(val.second!=0) {
74 matched = false;
75 break;
76 }
77 }
78 if(matched) {
79 _numOmegaPi->fill(_ecms);
80 break;
81 }
82 // now for omega eta
83 for (const Particle& p2 : ufs.particles(Cuts::pid==221)) {
84 map<long,int> nResB = nRes;
85 int ncountB = ncount;
86 findChildren(p2,nResB,ncountB);
87 if(ncountB!=0) continue;
88 matched = true;
89 for(auto const & val : nResB) {
90 if(val.second!=0) {
91 matched = false;
92 break;
93 }
94 }
95 if(matched) {
96 _nOmegaEta->fill(_ecms);
97 break;
98 }
99 }
100 if(matched) break;
101 }
102 }
103
104
105 /// Normalise histograms etc., after the run
106 void finalize() {
107 double fact = crossSection()/ sumOfWeights() /picobarn;
108 scale(_nOmegaEta ,fact);
109 scale(_numOmegaPi,fact);
110 }
111
112 /// @}
113
114
115 /// @name Histograms
116 /// @{
117 BinnedHistoPtr<string> _nOmegaEta,_numOmegaPi;
118 string _ecms;
119 /// @}
120
121 };
122
123
124 RIVET_DECLARE_PLUGIN(BESIII_2020_I1817739);
125
126}
|