Rivet analyses referenceBESIII_2023_I2702520Cross section for $e^+e^-\to$ $K_S^0K_L^0\pi^0$ for $\sqrt{s}=2.000\to3.080$ GeVExperiment: BESIII (<BEPC) Inspire ID: 2702520 Status: VALIDATED NOHEPDATA 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$ $K_S^0K_L^0\pi^0$ for $\sqrt{s}=2.000\to3.080$ GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2023_I2702520.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- > KSO KL0 pi0
10 class BESIII_2023_I2702520 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2702520);
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(Cuts::abspid==313 || Cuts::abspid==315), "UFS");
25
26 // histograms
27 for(unsigned int ix=0;ix<3;++ix)
28 book(_sigma[ix],1+ix,1,1);
29
30 for (const string& en : _sigma[0].binning().edges<0>()) {
31 double end = std::stod(en)*GeV;
32 if(isCompatibleWithSqrtS(end)) {
33 _ecms = en;
34 break;
35 }
36 }
37 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
38 }
39
40 void findChildren(const Particle& p ,map<long,int> & nRes, int &ncount) {
41 for (const Particle& child : p.children()) {
42 if (child.children().empty()) {
43 nRes[child.pid()]-=1;
44 --ncount;
45 }
46 else {
47 findChildren(child,nRes,ncount);
48 }
49 }
50 }
51
52 /// Perform the per-event analysis
53 void analyze(const Event& event) {
54 const FinalState& fs = apply<FinalState>(event, "FS");
55
56 map<long,int> nCount;
57 int ntotal(0);
58 for (const Particle& p : fs.particles()) {
59 nCount[p.pid()] += 1;
60 ++ntotal;
61 }
62 // KSO KL0 pi0 final state
63 if( ntotal == 3 && nCount[130] == 1 &&
64 nCount[310] == 1 && nCount[111] == 1)
65 _sigma[0]->fill(_ecms);
66
67 // unstable particles
68 const FinalState& ufs = apply<FinalState>(event, "UFS");
69 for (const Particle& p : ufs.particles()) {
70 if (p.children().empty()) continue;
71 map<long,int> nRes=nCount;
72 int ncount = ntotal;
73 findChildren(p,nRes,ncount);
74 bool matched = true;
75 if (ncount!=1) continue;
76 unsigned int nk0=0;
77 for (const auto& val : nRes) {
78 if (val.first==310 || val.first==130) {
79 nk0 += val.second;
80 }
81 else if (val.second!=0) {
82 matched = false;
83 break;
84 }
85 }
86 if (matched && nk0==1) {
87 if(p.abspid()==313) _sigma[1]->fill(_ecms);
88 else _sigma[2]->fill(_ecms);
89 break;
90 }
91 }
92 }
93
94
95 /// Normalise histograms etc., after the run
96 void finalize() {
97 for(unsigned int ix=0;ix<3;++ix)
98 scale(_sigma[ix],crossSection()/ sumOfWeights() /picobarn);
99 }
100
101 /// @}
102
103
104 /// @name Histograms
105 /// @{
106 BinnedHistoPtr<string> _sigma[3];
107 string _ecms;
108 /// @}
109
110
111 };
112
113
114 RIVET_DECLARE_PLUGIN(BESIII_2023_I2702520);
115
116}
|