Rivet analyses referenceBABAR_2007_I758568Cross sections for $e^+e^-\to$ $2\pi^+2\pi^-\pi^0$, $2\pi^+2\pi^-\eta$, $K^+K^-\pi^+\pi^-\pi^0$ and $K^+K^-\pi^+\pi^-\eta$ from threshold to 5.0 GeVExperiment: BABAR (PEP-II) Inspire ID: 758568 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^- \to$ $2\pi^+2\pi^-\pi^0$, $2\pi^+2\pi^-\eta$, $K^+K^-\pi^+\pi^-\pi^0$ and $K^+K^-\pi^+\pi^-\eta$ via radiative return, for energies from the threshold to 5.0 GeV Source code: BABAR_2007_I758568.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 Add a short analysis description here
10 class BABAR_2007_I758568 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2007_I758568);
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=1;ix<12;++ix) {
29 stringstream ss;
30 ss << "TMP/n" << ix;
31 book(_nMeson[ix], ss.str());
32 }
33 }
34
35
36 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
37 for(const Particle &child : p.children()) {
38 if(child.children().empty()) {
39 nRes[child.pid()]-=1;
40 --ncount;
41 }
42 else
43 findChildren(child,nRes,ncount);
44 }
45 }
46
47 /// Perform the per-event analysis
48 void analyze(const Event& event) {
49 const FinalState& fs = apply<FinalState>(event, "FS");
50
51 map<long,int> nCount;
52 int ntotal(0);
53 for (const Particle& p : fs.particles()) {
54 nCount[p.pid()] += 1;
55 ++ntotal;
56 }
57 const FinalState& ufs = apply<FinalState>(event, "UFS");
58 for (const Particle& p : ufs.particles()) {
59 if(p.children().empty()) continue;
60 if(p.pid()!=223 && p.pid()!=221&&p.pid()!=331&& p.pid()!=20223)
61 continue;
62 map<long,int> nRes = nCount;
63 int ncount = ntotal;
64 findChildren(p,nRes,ncount);
65 // omega
66 if(p.pid()==223) {
67 if(ncount==2) {
68 bool matched = true;
69 for(auto const & val : nRes) {
70 if(abs(val.first)==211) {
71 if(val.second!=1) {
72 matched = false;
73 break;
74 }
75 }
76 else if(val.second!=0) {
77 matched = false;
78 break;
79 }
80 }
81 if(matched) _nMeson[3]->fill();
82
83 matched = true;
84 for(auto const & val : nRes) {
85 if(abs(val.first)==321) {
86 if(val.second!=1) {
87 matched = false;
88 break;
89 }
90 }
91 else if(val.second!=0) {
92 matched = false;
93 break;
94 }
95 }
96 if(matched) _nMeson[10]->fill();
97 }
98
99 for (const Particle& p2 : ufs.particles()) {
100 if(p2.pid()!=9010221) continue;
101 if(p2.parents()[0].isSame(p)) continue;
102 map<long,int> nResB = nRes;
103 int ncountB = ncount;
104 findChildren(p2,nResB,ncountB);
105 if(ncountB!=0) continue;
106 bool matched2 = true;
107 for(auto const & val : nResB) {
108 if(val.second!=0) {
109 matched2 = false;
110 break;
111 }
112 }
113 if(matched2) _nMeson[4]->fill();
114 }
115 }
116 else if(p.pid()==221) {
117 if(ncount==2) {
118 bool matched = true;
119 for(auto const & val : nRes) {
120 if(abs(val.first)==211) {
121 if(val.second!=1) {
122 matched = false;
123 break;
124 }
125 }
126 else if(val.second!=0) {
127 matched = false;
128 break;
129 }
130 }
131 if(matched) _nMeson[2]->fill();
132 }
133 else if(ncount==4) {
134 bool matched = true;
135 for(auto const & val : nRes) {
136 if(abs(val.first)==211) {
137 if(val.second!=2) {
138 matched = false;
139 break;
140 }
141 }
142 else if(val.second!=0) {
143 matched = false;
144 break;
145 }
146 }
147 if(matched) _nMeson[5]->fill();
148
149 matched=true;
150 for(auto const & val : nRes) {
151 if(abs(val.first)==211 || abs(val.first)==321) {
152 if(val.second!=1) {
153 matched = false;
154 break;
155 }
156 }
157 else if(val.second!=0) {
158 matched = false;
159 break;
160 }
161 }
162 if(matched) _nMeson[11]->fill();
163 }
164
165 for(const Particle& p2 : ufs.particles()) {
166 if(p2.pid()!=333) continue;
167 map<long,int> nResB = nRes;
168 int ncountB = ncount;
169 findChildren(p2,nResB,ncountB);
170 if(ncountB!=0) continue;
171 bool matched2 = true;
172 for(auto const & val : nResB) {
173 if(val.second!=0) {
174 matched2 = false;
175 break;
176 }
177 }
178 if(matched2) _nMeson[9]->fill();
179 }
180 }
181 else if(p.pid()==331 || p.pid()==20223) {
182 if(ncount!=2) continue;
183 bool matched = true;
184 for(auto const & val : nRes) {
185 if(abs(val.first)==211) {
186 if(val.second!=1) {
187 matched = false;
188 break;
189 }
190 }
191 else if(val.second!=0) {
192 matched = false;
193 break;
194 }
195 }
196 if(matched) {
197 if(p.pid()==331)
198 _nMeson[6]->fill();
199 else
200 _nMeson[7]->fill();
201 }
202 }
203 }
204
205 if(ntotal==5) {
206 if(nCount[211]==2&&nCount[-211]==2&&nCount[111]==1)
207 _nMeson[1]->fill();
208 else if(nCount[321]==1&&nCount[-321]==1&&
209 nCount[211]==1&&nCount[-211]==1&&nCount[111]==1)
210 _nMeson[8]->fill();
211 }
212 }
213
214
215 /// Normalise histograms etc., after the run
216 void finalize() {
217 for(unsigned int ix=1;ix<12;++ix) {
218 double sigma = _nMeson[ix]->val();
219 double error = _nMeson[ix]->err();
220 sigma *= crossSection()/ sumOfWeights() /nanobarn;
221 error *= crossSection()/ sumOfWeights() /nanobarn;
222 Estimate1DPtr mult;
223 book(mult, ix, 1, 1);
224 for (auto& b : mult->bins()) {
225 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
226 b.set(sigma, error);
227 }
228 }
229 }
230 }
231
232 /// @}
233
234
235 /// @name Histograms
236 /// @{
237 CounterPtr _nMeson[12];
238 /// @}
239
240
241 };
242
243
244 RIVET_DECLARE_PLUGIN(BABAR_2007_I758568);
245
246
247}
|