Rivet analyses referenceCLEO_1985_I205668Identified Particle Spectra and rates in $\Upsilon(1S)$ decays and continuum at 10.49 GeVExperiment: CLEO (CESR) Inspire ID: 205668 Status: VALIDATED Authors:
Beam energies: (4.7, 4.7); (5.2, 5.2) GeV Run details:
Spectra and rates for $\pi^\pm$, $K^\pm$, $\pi^0$, $K^0$, $\Lambda$, $\Xi^-$, $\rho^0$, $K^{*\pm}$, $K^{*0}$ and $\phi$ production in $\Upsilon(1S)$ decays and continuum at 10.49 GeV. Source code: CLEO_1985_I205668.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 Spectra in Upsilon(1S) decay and nearby continuum
10 class CLEO_1985_I205668 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1985_I205668);
15
16
17 /// @name Analysis methods
18 ///@{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // projections
23 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 // histos
26 book(_weightSum_cont,"TMP/weightSumcont");
27 book(_weightSum_Ups1,"TMP/weightSumUps1");
28 // multiplcities
29 for(unsigned int ix=0;ix<2;++ix) {
30 for(unsigned int iy=0;iy<12;++iy) {
31 book(_mult[ix][iy],"/TMP/MULT_" +toString(ix) + "_" +toString(iy));
32 }
33 }
34 // cont spectra
35 book(_h_cont_pip , 1,1,1);
36 book(_h_cont_Kp , 2,1,1);
37 book(_h_cont_p , 3,1,1);
38 book(_h_cont_pi0 , 4,1,1);
39 book(_h_cont_K0 , 5,1,1);
40 book(_h_cont_lam , 6,1,1);
41 book(_h_cont_xi , 7,1,1);
42 book(_h_cont_rho , 8,1,1);
43 book(_h_cont_Kstarp, 9,1,1);
44 book(_h_cont_Kstar0,10,1,1);
45 book(_h_cont_phi ,11,1,1);
46 // ups spectra
47 book(_h_ups1_pip , 1,1,2);
48 book(_h_ups1_Kp , 2,1,2);
49 book(_h_ups1_p , 3,1,2);
50 book(_h_ups1_pi0 , 4,1,2);
51 book(_h_ups1_K0 , 5,1,2);
52 book(_h_ups1_lam , 6,1,2);
53 book(_h_ups1_xi , 7,1,2);
54 book(_h_ups1_rho , 8,1,2);
55 book(_h_ups1_Kstarp, 9,1,2);
56 book(_h_ups1_Kstar0,10,1,2);
57 book(_h_ups1_phi ,11,1,2);
58 }
59
60 /// Recursively walk the decay tree to find decay products of @a p
61 void findDecayProducts(Particle mother, Particles& unstable) {
62 for(const Particle & p: mother.children()) {
63 const int id = p.abspid();
64 if (id == PID::PIPLUS || id==PID::KPLUS || id==PID::PROTON ||
65 id==PID::PI0 || id==PID::K0S || id==PID::K0L ||
66 id==PID::LAMBDA || id==PID::XIMINUS || id==PID::RHO0 ||
67 id==323 || id==313 || id==225 || id==PID::PHI) {
68 unstable.push_back(p);
69 }
70 if(!p.children().empty())
71 findDecayProducts(p, unstable);
72 }
73 }
74
75 /// Perform the per-event analysis
76 void analyze(const Event& event) {
77 // Find the upsilons
78 // First in unstable final state
79 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
80 Particles upsilons = ufs.particles(Cuts::pid==553);
81 // continuum
82 if (upsilons.empty()) {
83 _weightSum_cont->fill();
84 const FinalState & fs = apply<FinalState>(event, "FS");
85 // FS particles
86 for (const Particle& p : fs.particles()) {
87 int id = p.abspid();
88 double xp = 2.*p.p3().mod()/sqrtS();
89 if(id==PID::PIPLUS) {
90 _h_cont_pip->fill(xp);
91 _mult[1][0]->fill();
92 }
93 else if(id==PID::KPLUS) {
94 _h_cont_Kp->fill(xp);
95 _mult[1][1]->fill();
96 }
97 else if(id==PID::PROTON) {
98 _h_cont_p->fill(xp);
99 _mult[1][2]->fill();
100 }
101 }
102 // Unstable particles
103 for (const Particle& p : ufs.particles()) {
104 int id = p.abspid();
105 double xp = 2.*p.p3().mod()/sqrtS();
106 if(id==PID::PI0) {
107 _h_cont_pi0->fill(xp);
108 _mult[1][3]->fill();
109 }
110 else if(id==PID::K0S || id==PID::K0L) {
111 _h_cont_K0->fill(xp);
112 _mult[1][4]->fill();
113 }
114 else if(id==PID::LAMBDA) {
115 _h_cont_lam->fill(xp);
116 _mult[1][5]->fill();
117 }
118 else if(id==PID::XIMINUS) {
119 _h_cont_xi->fill(xp);
120 _mult[1][6]->fill();
121 }
122 else if(id==PID::RHO0) {
123 _h_cont_rho->fill(xp);
124 _mult[1][7]->fill();
125 }
126 else if(id==323) {
127 _h_cont_Kstarp->fill(xp);
128 _mult[1][8]->fill();
129 }
130 else if(id==313) {
131 _h_cont_Kstar0->fill(xp);
132 _mult[1][9]->fill();
133 }
134 else if(id==PID::PHI) {
135 _h_cont_phi->fill(xp);
136 _mult[1][10]->fill();
137 }
138 else if(id==225) {
139 _mult[1][11]->fill();
140 }
141 }
142 }
143 else {
144 for (const Particle& ups : upsilons) {
145 _weightSum_Ups1->fill();
146 Particles unstable;
147 LorentzTransform boost = LorentzTransform::mkFrameTransformFromBeta(ups.momentum().betaVec());
148 // Find the decay products we want
149 findDecayProducts(ups,unstable);
150 for(const Particle & p : unstable) {
151 int id = p.abspid();
152 double xp = 2.*boost.transform(p.momentum()).p3().mod()/ups.mass();
153 if(id==PID::PIPLUS) {
154 _h_ups1_pip->fill(xp);
155 _mult[0][0]->fill();
156 }
157 else if(id==PID::KPLUS) {
158 _h_ups1_Kp->fill(xp);
159 _mult[0][1]->fill();
160 }
161 else if(id==PID::PROTON) {
162 _h_ups1_p->fill(xp);
163 _mult[0][2]->fill();
164 }
165 else if(id==PID::PI0) {
166 _h_ups1_pi0->fill(xp);
167 _mult[0][3]->fill();
168 }
169 else if(id==PID::K0S || id==PID::K0L) {
170 _h_ups1_K0->fill(xp);
171 _mult[0][4]->fill();
172 }
173 else if(id==PID::LAMBDA) {
174 _h_ups1_lam->fill(xp);
175 _mult[0][5]->fill();
176 }
177 else if(id==PID::XIMINUS) {
178 _h_ups1_xi->fill(xp);
179 _mult[0][6]->fill();
180 }
181 else if(id==PID::RHO0) {
182 _h_ups1_rho->fill(xp);
183 _mult[0][7]->fill();
184 }
185 else if(id==323) {
186 _h_ups1_Kstarp->fill(xp);
187 _mult[0][8]->fill();
188 }
189 else if(id==313) {
190 _h_ups1_Kstar0->fill(xp);
191 _mult[0][9]->fill();
192 }
193 else if(id==PID::PHI) {
194 _h_ups1_phi->fill(xp);
195 _mult[0][10]->fill();
196 }
197 else if(id==225) {
198 _mult[0][11]->fill();
199 }
200 }
201 }
202 }
203 }
204
205
206 /// Normalise histograms etc., after the run
207 void finalize() {
208 // multiplicities
209 vector<CounterPtr> scales = {_weightSum_Ups1,_weightSum_cont};
210 for(unsigned int ix=0;ix<12;++ix) {
211 Scatter2DPtr scatter;
212 book(scatter,ix+12, 1, 1, true);
213 for(unsigned int iy=0;iy<2;++iy) {
214 if(scales[iy]->val() <= 0.) {
215 scatter->point(iy).setY(0.,0.);
216 }
217 else {
218 scale(_mult[iy][ix],1./ *scales[iy]);
219 scatter->point(iy).setY(_mult[iy][ix]->val(),_mult[iy][ix]->err());
220 }
221 }
222 }
223 // spectra
224 if (_weightSum_cont->val() > 0.) {
225 scale(_h_cont_pip , 1. / *_weightSum_cont);
226 scale(_h_cont_Kp , 1. / *_weightSum_cont);
227 scale(_h_cont_p , 1. / *_weightSum_cont);
228 scale(_h_cont_pi0 , 1. / *_weightSum_cont);
229 scale(_h_cont_K0 , 1. / *_weightSum_cont);
230 scale(_h_cont_lam , 1. / *_weightSum_cont);
231 scale(_h_cont_xi , 1. / *_weightSum_cont);
232 scale(_h_cont_rho , 1. / *_weightSum_cont);
233 scale(_h_cont_Kstarp, 1. / *_weightSum_cont);
234 scale(_h_cont_Kstar0, 1. / *_weightSum_cont);
235 scale(_h_cont_phi , 1. / *_weightSum_cont);
236 }
237 if (_weightSum_Ups1->val() > 0.) {
238 scale(_h_ups1_pip , 1. / *_weightSum_Ups1);
239 scale(_h_ups1_Kp , 1. / *_weightSum_Ups1);
240 scale(_h_ups1_p , 1. / *_weightSum_Ups1);
241 scale(_h_ups1_pi0 , 1. / *_weightSum_Ups1);
242 scale(_h_ups1_K0 , 1. / *_weightSum_Ups1);
243 scale(_h_ups1_lam , 1. / *_weightSum_Ups1);
244 scale(_h_ups1_xi , 1. / *_weightSum_Ups1);
245 scale(_h_ups1_rho , 1. / *_weightSum_Ups1);
246 scale(_h_ups1_Kstarp, 1. / *_weightSum_Ups1);
247 scale(_h_ups1_Kstar0, 1. / *_weightSum_Ups1);
248 scale(_h_ups1_phi , 1. / *_weightSum_Ups1);
249 }
250 }
251
252 ///@}
253
254
255 /// @name Histograms
256 ///@{
257 Histo1DPtr _h_cont_pip,_h_cont_Kp,_h_cont_p,_h_cont_pi0,_h_cont_K0,_h_cont_lam,
258 _h_cont_xi,_h_cont_rho,_h_cont_Kstarp,_h_cont_Kstar0,_h_cont_phi;
259 Histo1DPtr _h_ups1_pip,_h_ups1_Kp,_h_ups1_p,_h_ups1_pi0,_h_ups1_K0,_h_ups1_lam,
260 _h_ups1_xi,_h_ups1_rho,_h_ups1_Kstarp,_h_ups1_Kstar0,_h_ups1_phi;
261 CounterPtr _weightSum_cont,_weightSum_Ups1;
262 CounterPtr _mult[2][12];
263 ///@}
264
265
266 };
267
268
269 RIVET_DECLARE_PLUGIN(CLEO_1985_I205668);
270
271}
|