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
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/Beam.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#define I_KNOW_THE_INITIAL_QUARKS_PROJECTION_IS_DODGY_BUT_NEED_TO_USE_IT
#include "Rivet/Projections/InitialQuarks.hh"
namespace Rivet {
/// @brief Add a short analysis description here
class DELPHI_1999_I448370 : public Analysis {
public:
/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(DELPHI_1999_I448370);
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
declare(Beam(), "Beams");
declare(ChargedFinalState(), "FS");
declare(InitialQuarks(), "IQF");
// Book histograms
book(_h_F_T , 1, 1, 1);
book(_h_F_L , 2, 1, 1);
book(_h_F_A , 3, 1, 1);
book(_h_F_TL , 4, 1, 1);
book(_h_F_T_total , 5, 1, 1);
book(_h_F_L_total , 5, 1, 2);
book(_h_F_TL_total, 5, 1, 3);
book(_h_b_F_T , 7, 1, 1);
book(_h_b_F_L , 7, 1, 2);
book(_h_light_F_T , 8, 1, 1);
book(_h_light_F_L , 8, 1, 2);
book(_n_bottom , 9, 1, 1);
book(_n_light , 9, 1, 2);
book(_c_light , "/TMP/wLight");
book(_c_bottom, "/TMP/wBottom");
book(_c_total , "/TMP/wTotal");
}
/// Perform the per-event analysis
void analyze(const Event& event) {
// First, veto on leptonic events by requiring at least 4 charged FS particles
const FinalState& fs = apply<FinalState>(event, "FS");
const size_t numParticles = fs.particles().size();
// Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
if (numParticles < 2) {
MSG_DEBUG("Failed leptonic event cut");
vetoEvent;
}
MSG_DEBUG("Passed leptonic event cut");
int flavour = 0;
const InitialQuarks& iqf = apply<InitialQuarks>(event, "IQF");
// If we only have two quarks (qqbar), just take the flavour.
// If we have more than two quarks, look for the highest energetic q-qbar pair.
if (iqf.particles().size() == 2) {
flavour = iqf.particles().front().abspid();
}
else {
map<int, double> quarkmap;
for (const Particle& p : iqf.particles()) {
if (quarkmap[p.pid()] < p.E()) {
quarkmap[p.pid()] = p.E();
}
}
double maxenergy = 0.;
for (int i = 1; i <= 5; ++i) {
if (quarkmap[i]+quarkmap[-i] > maxenergy) {
flavour = i;
}
}
}
if (flavour==5) _c_bottom->fill();
else if(flavour!=4) _c_light ->fill();
_c_total->fill();
// Get beams and average beam momentum
const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
const double meanBeamMom = ( beams.first.p3().mod() +
beams.second.p3().mod() ) / 2.0;
MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
Vector3 axis;
if(beams.first.pid()>0)
axis = beams.first .momentum().p3().unit();
else
axis = beams.second.momentum().p3().unit();
// loop over charged particles
double v=0.8, v2=sqr(v), v5=v2*v2*v;
for (const Particle& p : fs.particles()) {
double xp = p.p3().mod()/meanBeamMom;
double ctheta = axis.dot(p.momentum().p3().unit());
if(abs(ctheta)<0.8) {
double WT = 0.5 /v5*(5.*sqr(ctheta)*(3.-v2)-v2*(5.-3.*v2));
double WL = 0.25/v5*(v2*(5.+3.*v2)-5.*sqr(ctheta)*(3.+v2));
double WA = 2.*ctheta/v2/v;
_h_F_T ->fill(xp,WT);
_h_F_L ->fill(xp,WL);
_h_F_TL ->fill(xp,(WL+WT));
_h_F_T_total ->fill(xp,0.5*xp*WT);
_h_F_L_total ->fill(xp,0.5*xp*WL);
_h_F_TL_total->fill(xp,0.5*xp*(WL+WT));
if(p.charge()>0) {
_h_F_A->fill(xp, WA);
}
else {
_h_F_A->fill(xp,-WA);
}
if(flavour==5) {
_h_b_F_T ->fill(xp,WT);
_h_b_F_L ->fill(xp,WL);
}
else if(flavour!=4) {
_h_light_F_T->fill(xp,WT);
_h_light_F_L->fill(xp,WL);
}
}
}
if(flavour==5)
_n_bottom->fill(91.2,fs.particles().size());
else if(flavour!=4)
_n_light->fill(91.2,fs.particles().size());
}
/// Normalise histograms etc., after the run
void finalize() {
scale(_h_F_T ,1./ *_c_total);
scale(_h_F_L ,1./ *_c_total);
scale(_h_F_A ,1./ *_c_total);
scale(_h_F_TL,1./ *_c_total);
{Scatter2DPtr temp; divide(_h_F_L, _h_F_T , book(temp, 6, 1, 1));}
{Scatter2DPtr temp; divide(_h_F_L, _h_F_TL, book(temp, 6, 1, 2));}
scale(_h_F_T_total ,1./ *_c_total);
scale(_h_F_L_total ,1./ *_c_total);
scale(_h_F_TL_total,1./ *_c_total);
scale(_h_b_F_T ,1./ *_c_bottom);
scale(_h_b_F_L ,1./ *_c_bottom);
scale(_h_light_F_T ,1./ *_c_light);
scale(_h_light_F_L ,1./ *_c_light);
scale(_n_bottom ,1./ *_c_bottom);
scale(_n_light ,1./ *_c_light);
}
//@}
/// @name Histograms
//@{
Histo1DPtr _h_F_T,_h_F_L,_h_F_A,_h_F_TL,_h_b_F_T,_h_b_F_L,_h_light_F_T,_h_light_F_L,_n_light,_n_bottom;
Histo1DPtr _h_F_T_total,_h_F_L_total,_h_F_TL_total;
CounterPtr _c_light,_c_bottom,_c_total;
//@}
};
// The hook for the plugin system
RIVET_DECLARE_PLUGIN(DELPHI_1999_I448370);
}
|