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: ANY 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. 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 , "TMP/OmegaPiPi");
26 }
27
28 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
29 for(const Particle &child : p.children()) {
30 if(child.children().empty()) {
31 --nRes[child.pid()];
32 --ncount;
33 }
34 else
35 findChildren(child,nRes,ncount);
36 }
37 }
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41 const FinalState& fs = apply<FinalState>(event, "FS");
42 map<long,int> nCount;
43 int ntotal(0);
44 for (const Particle& p : fs.particles()) {
45 nCount[p.pid()] += 1;
46 ++ntotal;
47 }
48 const FinalState& ufs = apply<FinalState>(event, "UFS");
49 for (const Particle& p : ufs.particles(Cuts::pid==223)) {
50 if(p.children().empty()) continue;
51 map<long,int> nRes = nCount;
52 int ncount = ntotal;
53 findChildren(p,nRes,ncount);
54 if(ncount!=2) continue;
55 bool matched = true;
56 for(auto const & val : nRes) {
57 if(abs(val.first)==111) {
58 if(val.second !=2) {
59 matched = false;
60 break;
61 }
62 }
63 else if(val.second!=0) {
64 matched = false;
65 break;
66 }
67 }
68 if(matched) {
69 _numOmegaPiPi->fill();
70 break;
71 }
72 }
73 }
74
75
76 /// Normalise histograms etc., after the run
77 void finalize() {
78 double sigma = _numOmegaPiPi->val()* crossSection()/ sumOfWeights() /picobarn;
79 double error = _numOmegaPiPi->err()* crossSection()/ sumOfWeights() /picobarn;
80 Scatter2D temphisto(refData(1, 1, 1));
81 Scatter2DPtr mult;
82 book(mult, 1, 1, 1);
83 for (size_t b = 0; b < temphisto.numPoints(); b++) {
84 const double x = temphisto.point(b).x();
85 pair<double,double> ex = temphisto.point(b).xErrs();
86 pair<double,double> ex2 = ex;
87 if(ex2.first ==0.) ex2. first=0.0001;
88 if(ex2.second==0.) ex2.second=0.0001;
89 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
90 mult->addPoint(x, sigma, ex, make_pair(error,error));
91 }
92 else {
93 mult->addPoint(x, 0., ex, make_pair(0.,.0));
94 }
95 }
96 }
97
98 /// @}
99
100
101 /// @name Histograms
102 /// @{
103 CounterPtr _numOmegaPiPi;
104 /// @}
105
106
107 };
108
109
110 RIVET_DECLARE_PLUGIN(BESIII_2021_I1999208);
111
112}
|