1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {
/// @brief ARGUS vector meson production
///
/// @author Peter Richardson
class ARGUS_1993_S2789213 : public Analysis {
public:
RIVET_DEFAULT_ANALYSIS_CTOR(ARGUS_1993_S2789213);
void init() {
declare(UnstableParticles(), "UFS");
for(unsigned int ix=0;ix<3;++ix) {
for(unsigned int iy=0;iy<5;++iy) {
std::ostringstream title;
title << "/TMP/MULT_" << ix << "_" << iy;
book(_mult[ix][iy],title.str());
}
}
book(_hist_cont_KStarPlus , 4, 1, 1);
book(_hist_Ups1_KStarPlus , 5, 1, 1);
book(_hist_Ups4_KStarPlus , 6, 1, 1);
book(_hist_cont_KStar0 , 7, 1, 1);
book(_hist_Ups1_KStar0 , 8, 1, 1);
book(_hist_Ups4_KStar0 , 9, 1, 1);
book(_hist_cont_Rho0 ,10, 1, 1);
book(_hist_Ups1_Rho0 ,11, 1, 1);
book(_hist_Ups4_Rho0 ,12, 1, 1);
book(_hist_cont_Omega ,13, 1, 1);
book(_hist_Ups1_Omega ,14, 1, 1);
book(_weightSum_cont,"TMP/weightSumcont");
book(_weightSum_Ups1,"TMP/weightSumUps1");
book(_weightSum_Ups4,"TMP/weightSumUps4");
}
void analyze(const Event& e) {
// Find the upsilons
// First in unstable final state
const UnstableParticles& ufs = apply<UnstableParticles>(e, "UFS");
Particles upsilons = ufs.particles(Cuts::pid==553 || Cuts::pid==300553);
// continuum
if (upsilons.empty()) {
_weightSum_cont->fill();
for (const Particle& p : ufs.particles()) {
int id = p.abspid();
double xp = 2.*p.E()/sqrtS();
double beta = p.p3().mod()/p.E();
if (id == 113) {
_hist_cont_Rho0->fill(xp, 1./beta);
_mult[0][1]->fill();
}
else if (id == 313) {
_hist_cont_KStar0->fill(xp, 1./beta);
_mult[0][2]->fill();
}
else if (id == 223) {
_hist_cont_Omega->fill(xp, 1./beta);
_mult[0][0]->fill();
}
else if (id == 323) {
_hist_cont_KStarPlus->fill(xp,1./beta);
_mult[0][3]->fill();
}
else if (id == 333) {
_mult[0][4]->fill();
}
}
}
// found an upsilon
else {
for (const Particle& ups : upsilons) {
const int parentId = ups.pid();
if(parentId == 553)
_weightSum_Ups1->fill();
else
_weightSum_Ups4->fill();
Particles unstable;
// Find the decay products we want
findDecayProducts(ups,unstable);
LorentzTransform cms_boost;
if (ups.p3().mod() > 0.001)
cms_boost = LorentzTransform::mkFrameTransformFromBeta(ups.momentum().betaVec());
double mass = ups.mass();
for( const Particle & p : unstable) {
int id = p.abspid();
FourMomentum p2 = cms_boost.transform(p.momentum());
double xp = 2.*p2.E()/mass;
double beta = p2.p3().mod()/p2.E();
if (id == 113) {
if (parentId == 553) {
_hist_Ups1_Rho0->fill(xp,1./beta);
_mult[1][1]->fill();
}
else {
_hist_Ups4_Rho0->fill(xp,1./beta);
_mult[2][1]->fill();
}
}
else if (id == 313) {
if (parentId == 553) {
_hist_Ups1_KStar0->fill(xp,1./beta);
_mult[1][2]->fill();
}
else {
_hist_Ups4_KStar0->fill(xp,1./beta);
_mult[2][2]->fill();
}
}
else if (id == 223) {
if (parentId == 553) {
_hist_Ups1_Omega->fill(xp,1./beta);
_mult[1][0]->fill();
}
else {
_mult[2][0]->fill();
}
}
else if (id == 323) {
if (parentId == 553) {
_hist_Ups1_KStarPlus->fill(xp,1./beta);
_mult[1][3]->fill();
}
else {
_hist_Ups4_KStarPlus->fill(xp,1./beta);
_mult[2][3]->fill();
}
}
else if (id == 333) {
if (parentId == 553) {
_mult[1][4]->fill();
}
else {
_mult[2][4]->fill();
}
}
}
}
}
}
void finalize() {
// multiplicities
vector<CounterPtr> scales = {_weightSum_cont,_weightSum_Ups1,_weightSum_Ups4};
for(unsigned int ix=0;ix<3;++ix) {
if(scales[ix]->val() <= 0.) continue;
for(unsigned int iy=0;iy<5;++iy) {
// skip Upsilon(4S) -> omega, just an upper limit
if(ix==2&&iy==0) continue;
Scatter2DPtr scatter;
book(scatter,ix+1, 1, iy+1, true);
scale(_mult[ix][iy],1./ *scales[ix]);
scatter->point(0).setY(_mult[ix][iy]->val(),_mult[ix][iy]->err());
}
}
// spectra
if (_weightSum_cont->val() > 0.) {
scale(_hist_cont_KStarPlus, 1. / *_weightSum_cont);
scale(_hist_cont_KStar0 , 1. / *_weightSum_cont);
scale(_hist_cont_Rho0 , 1. / *_weightSum_cont);
scale(_hist_cont_Omega , 1. / *_weightSum_cont);
}
if (_weightSum_Ups1->val() > 0.) {
scale(_hist_Ups1_KStarPlus, 1. / *_weightSum_Ups1);
scale(_hist_Ups1_KStar0 , 1. / *_weightSum_Ups1);
scale(_hist_Ups1_Rho0 , 1. / *_weightSum_Ups1);
scale(_hist_Ups1_Omega , 1. / *_weightSum_Ups1);
}
if (_weightSum_Ups4->val() > 0.) {
scale(_hist_Ups4_KStarPlus, 1. / *_weightSum_Ups4);
scale(_hist_Ups4_KStar0 , 1. / *_weightSum_Ups4);
scale(_hist_Ups4_Rho0 , 1. / *_weightSum_Ups4);
}
}
private:
Histo1DPtr _hist_cont_KStarPlus, _hist_Ups1_KStarPlus, _hist_Ups4_KStarPlus;
Histo1DPtr _hist_cont_KStar0, _hist_Ups1_KStar0, _hist_Ups4_KStar0 ;
Histo1DPtr _hist_cont_Rho0, _hist_Ups1_Rho0, _hist_Ups4_Rho0;
Histo1DPtr _hist_cont_Omega, _hist_Ups1_Omega;
CounterPtr _mult[3][5];
CounterPtr _weightSum_cont,_weightSum_Ups1,_weightSum_Ups4;
/// Recursively walk the decay tree to find decay products of @a p
void findDecayProducts(Particle mother, Particles& unstable) {
for(const Particle & p: mother.children()) {
const int id = abs(p.pid());
if (id == 113 || id == 313 || id == 323 ||
id == 333 || id == 223 ) {
unstable.push_back(p);
}
else if(!p.children().empty())
findDecayProducts(p, unstable);
}
}
};
RIVET_DECLARE_ALIASED_PLUGIN(ARGUS_1993_S2789213, ARGUS_1993_I356616);
}
|