Rivet analyses referenceBABAR_2017_I1511276Cross section for $e^+e^-\to K_S^0K_L^0$ with $\pi^0$, $\eta$ and $\pi^0\pi^0$ between threshold and 4 GeVExperiment: BABAR (PEP-II) Inspire ID: 1511276 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (0.6, 0.6); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (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.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (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.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (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); (1.5, 1.5); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0) GeV Run details:
Cross section for $e^+e^-\to K_S^0K_L^0$ with $\pi^0$, $\eta$ and $\pi^0\pi^0$ between threshold and 4 GeV using radiative events. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BABAR_2017_I1511276.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- -> K_S0K_L0 with pi0, eta and 2pi0
10 class BABAR_2017_I1511276 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2017_I1511276);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 for(unsigned int ix=0;ix<4;++ix) {
29 book(_sigma[ix], 1+ix, 1, 1);
30 for (const string& en : _sigma[ix].binning().edges<0>()) {
31 const double end = std::stod(en)*GeV;
32 if (isCompatibleWithSqrtS(end)) {
33 _ecms[ix] = en;
34 break;
35 }
36 }
37 }
38 if (_ecms[0].empty() && _ecms[1].empty() && _ecms[2].empty() && _ecms[3].empty())
39 MSG_ERROR("Beam energy incompatible with analysis.");
40 }
41
42 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
43 for(const Particle &child : p.children()) {
44 if(child.children().empty()) {
45 nRes[child.pid()]-=1;
46 --ncount;
47 }
48 else
49 findChildren(child,nRes,ncount);
50 }
51 }
52
53 /// Perform the per-event analysis
54 void analyze(const Event& event) {
55 const FinalState& fs = apply<FinalState>(event, "FS");
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 // stable histos
63 if( ntotal == 3 && nCount[130] == 1 &&
64 nCount[310] == 1 && nCount[111] == 1) {
65 if(!_ecms[0].empty()) _sigma[0]->fill(_ecms[0]);
66 }
67 else if( ntotal == 4 && nCount[130] == 1 &&
68 nCount[310] == 1 && nCount[111] == 2) {
69 if(!_ecms[3].empty()) _sigma[3]->fill(_ecms[3]);
70 }
71 // unstable particles
72 const FinalState& ufs = apply<FinalState>(event, "UFS");
73 for (const Particle& p : ufs.particles()) {
74 if(p.children().empty()) continue;
75 if(p.pid()!=333 && p.pid()!=221) continue;
76 map<long,int> nRes=nCount;
77 int ncount = ntotal;
78 findChildren(p,nRes,ncount);
79 bool matched = true;
80 if(p.pid()==333 && ncount==1) {
81 for(auto const & val : nRes) {
82 if(val.first==111) {
83 if(val.second!=1) {
84 matched = false;
85 break;
86 }
87 }
88 else if(val.second!=0) {
89 matched = false;
90 break;
91 }
92 }
93 if(matched) {
94 if(!_ecms[1].empty()) _sigma[1]->fill(_ecms[1]);
95 }
96 }
97 else if(p.pid()==221 && ncount==2) {
98 for(auto const & val : nRes) {
99 if(val.first==130 || val.first==310) {
100 if(val.second!=1) {
101 matched = false;
102 break;
103 }
104 }
105 else if(val.second!=0) {
106 matched = false;
107 break;
108 }
109 }
110 if(matched) {
111 if(!_ecms[2].empty()) _sigma[2]->fill(_ecms[2]);
112 }
113 }
114 }
115 }
116
117
118 /// Normalise histograms etc., after the run
119 void finalize() {
120 double fact = crossSection()/ sumOfWeights() /nanobarn;
121 for(unsigned int ix=0;ix<4;++ix)
122 scale(_sigma[ix],fact);
123 }
124
125 /// @}
126
127
128 /// @name Histograms
129 /// @{
130 BinnedHistoPtr<string> _sigma[4];
131 string _ecms[4];
132 /// @}
133
134
135 };
136
137
138 RIVET_DECLARE_PLUGIN(BABAR_2017_I1511276);
139
140
141}
|