Rivet analyses referenceBESIII_2021_I1999208Cross section for $e^+e^-\to\omega\pi^0\pi^0$ between 2 and 3.08 GeVExperiment: BESIII (BEPC) Inspire ID: 1999208 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.3, 1.3); (1.3, 1.3); (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\pi^0$ between 2 and 3.08 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2021_I1999208.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 pi0pi0
10 class BESIII_2021_I1999208 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1999208);
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(_numOmegaPiPi , 1, 1, 1);
26
27 for (const string& en : _numOmegaPiPi.binning().edges<0>()) {
28 const double end = std::stod(en)*GeV;
29 if (isCompatibleWithSqrtS(end)) {
30 _ecms = en;
31 break;
32 }
33 }
34 if(_ecms.empty())
35 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()];
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 if(ncount!=2) continue;
65 bool matched = true;
66 for(auto const & val : nRes) {
67 if(abs(val.first)==111) {
68 if(val.second !=2) {
69 matched = false;
70 break;
71 }
72 }
73 else if(val.second!=0) {
74 matched = false;
75 break;
76 }
77 }
78 if(matched) {
79 _numOmegaPiPi->fill(_ecms);
80 break;
81 }
82 }
83 }
84
85
86 /// Normalise histograms etc., after the run
87 void finalize() {
88 scale(_numOmegaPiPi, crossSection()/ sumOfWeights() /picobarn);
89 }
90
91 /// @}
92
93
94 /// @name Histograms
95 /// @{
96 BinnedHistoPtr<string> _numOmegaPiPi;
97 string _ecms;
98 /// @}
99
100
101 };
102
103
104 RIVET_DECLARE_PLUGIN(BESIII_2021_I1999208);
105
106}
|