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: ANY 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. 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, "TMP/OmegaPi");
26 book(_nOmegaEta, "/TMP/nOmegaEta");
27 }
28
29 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
30 for (const Particle &child : p.children()) {
31 if(child.children().empty()) {
32 nRes[child.pid()]-=1;
33 --ncount;
34 }
35 else
36 findChildren(child,nRes,ncount);
37 }
38 }
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 const FinalState& fs = apply<FinalState>(event, "FS");
43 map<long,int> nCount;
44 int ntotal(0);
45 for (const Particle& p : fs.particles()) {
46 nCount[p.pid()] += 1;
47 ++ntotal;
48 }
49 const FinalState& ufs = apply<FinalState>(event, "UFS");
50 for (const Particle& p : ufs.particles(Cuts::pid==223)) {
51 if(p.children().empty()) continue;
52 map<long,int> nRes = nCount;
53 int ncount = ntotal;
54 findChildren(p,nRes,ncount);
55 // check for omega pi0
56 bool matched = true;
57 for(auto const & val : nRes) {
58 if(val.first==111) {
59 if(val.second!=1) {
60 matched = false;
61 break;
62 }
63 }
64 else if(val.second!=0) {
65 matched = false;
66 break;
67 }
68 }
69 if(matched) {
70 _numOmegaPi->fill();
71 break;
72 }
73 // now for omega eta
74 for (const Particle& p2 : ufs.particles(Cuts::pid==221)) {
75 map<long,int> nResB = nRes;
76 int ncountB = ncount;
77 findChildren(p2,nResB,ncountB);
78 if(ncountB!=0) continue;
79 matched = true;
80 for(auto const & val : nResB) {
81 if(val.second!=0) {
82 matched = false;
83 break;
84 }
85 }
86 if(matched) {
87 _nOmegaEta->fill();
88 break;
89 }
90 }
91 if(matched) break;
92 }
93 }
94
95
96 /// Normalise histograms etc., after the run
97 void finalize() {
98 for(unsigned int ix=1;ix<3;++ix) {
99 double sigma,error;
100 if(ix==1) {
101 sigma = _nOmegaEta->val();
102 error = _nOmegaEta->err();
103 }
104 else {
105 sigma = _numOmegaPi->val();
106 error = _numOmegaPi->err();
107 }
108 sigma *= crossSection()/ sumOfWeights() /picobarn;
109 error *= crossSection()/ sumOfWeights() /picobarn;
110 Estimate1DPtr mult;
111 book(mult, ix, 1, 1);
112 for (auto& b : mult->bins()) {
113 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
114 b.set(sigma, error);
115 }
116 }
117 }
118 }
119
120 /// @}
121
122
123 /// @name Histograms
124 /// @{
125 CounterPtr _nOmegaEta;
126 CounterPtr _numOmegaPi;
127 /// @}
128
129 };
130
131
132 RIVET_DECLARE_PLUGIN(BESIII_2020_I1817739);
133
134}
|