Rivet analyses referenceDELPHI_1999_I448370Charged particle fragmentation functions at LEP1Experiment: DELPHI (LEP) Inspire ID: 448370 Status: VALIDATED Authors:
Beam energies: (45.6, 45.6) GeV Run details:
The transverse, longitudinal and asymmetric components of the fragmentation function are measured from the inclusive charged particles produced in $e^+e^-$ collisions at LEP, include separation of bottom and light quark(uds) events. Source code: DELPHI_1999_I448370.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5
6#define I_KNOW_THE_INITIAL_QUARKS_PROJECTION_IS_DODGY_BUT_NEED_TO_USE_IT
7#include "Rivet/Projections/InitialQuarks.hh"
8
9namespace Rivet {
10
11
12 /// @brief Add a short analysis description here
13 class DELPHI_1999_I448370 : public Analysis {
14 public:
15
16 /// Constructor
17 RIVET_DEFAULT_ANALYSIS_CTOR(DELPHI_1999_I448370);
18
19
20 /// @name Analysis methods
21 /// @{
22
23 /// Book histograms and initialise projections before the run
24 void init() {
25 declare(Beam(), "Beams");
26 declare(ChargedFinalState(), "FS");
27 declare(InitialQuarks(), "IQF");
28
29 // Book histograms
30 book(_h_F_T , 1, 1, 1);
31 book(_h_F_L , 2, 1, 1);
32 book(_h_F_A , 3, 1, 1);
33 book(_h_F_TL , 4, 1, 1);
34 book(_h_F_T_total , 5, 1, 1);
35 book(_h_F_L_total , 5, 1, 2);
36 book(_h_F_TL_total, 5, 1, 3);
37 book(_h_b_F_T , 7, 1, 1);
38 book(_h_b_F_L , 7, 1, 2);
39 book(_h_light_F_T , 8, 1, 1);
40 book(_h_light_F_L , 8, 1, 2);
41 book(_n_bottom , 9, 1, 1);
42 book(_n_light , 9, 1, 2);
43
44 book(_c_light , "/TMP/wLight");
45 book(_c_bottom, "/TMP/wBottom");
46 book(_c_total , "/TMP/wTotal");
47
48 }
49
50
51 /// Perform the per-event analysis
52 void analyze(const Event& event) {
53 // First, veto on leptonic events by requiring at least 4 charged FS particles
54 const FinalState& fs = apply<FinalState>(event, "FS");
55 const size_t numParticles = fs.particles().size();
56
57 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
58 if (numParticles < 2) {
59 MSG_DEBUG("Failed leptonic event cut");
60 vetoEvent;
61 }
62 MSG_DEBUG("Passed leptonic event cut");
63
64 int flavour = 0;
65 const InitialQuarks& iqf = apply<InitialQuarks>(event, "IQF");
66
67 // If we only have two quarks (qqbar), just take the flavour.
68 // If we have more than two quarks, look for the highest energetic q-qbar pair.
69 if (iqf.particles().size() == 2) {
70 flavour = iqf.particles().front().abspid();
71 }
72 else {
73 map<int, double> quarkmap;
74 for (const Particle& p : iqf.particles()) {
75 if (quarkmap[p.pid()] < p.E()) {
76 quarkmap[p.pid()] = p.E();
77 }
78 }
79 double maxenergy = 0.;
80 for (int i = 1; i <= 5; ++i) {
81 if (quarkmap[i]+quarkmap[-i] > maxenergy) {
82 flavour = i;
83 }
84 }
85 }
86 if (flavour==5) _c_bottom->fill();
87 else if(flavour!=4) _c_light ->fill();
88 _c_total->fill();
89 // Get beams and average beam momentum
90 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
91 const double meanBeamMom = ( beams.first.p3().mod() +
92 beams.second.p3().mod() ) / 2.0;
93 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
94 Vector3 axis;
95 if (beams.first.pid()>0) {
96 axis = beams.first .momentum().p3().unit();
97 }
98 else {
99 axis = beams.second.momentum().p3().unit();
100 }
101
102 // loop over charged particles
103 double v=0.8, v2=sqr(v), v5=v2*v2*v;
104 for (const Particle& p : fs.particles()) {
105 double xp = p.p3().mod()/meanBeamMom;
106 double ctheta = axis.dot(p.momentum().p3().unit());
107 if(abs(ctheta)<0.8) {
108 double WT = 0.5 /v5*(5.*sqr(ctheta)*(3.-v2)-v2*(5.-3.*v2));
109 double WL = 0.25/v5*(v2*(5.+3.*v2)-5.*sqr(ctheta)*(3.+v2));
110 double WA = 2.*ctheta/v2/v;
111 _h_F_T ->fill(xp,WT);
112 _h_F_L ->fill(xp,WL);
113 _h_F_TL ->fill(xp,(WL+WT));
114 _h_F_T_total ->fill(xp,0.5*xp*WT);
115 _h_F_L_total ->fill(xp,0.5*xp*WL);
116 _h_F_TL_total->fill(xp,0.5*xp*(WL+WT));
117 if(p.charge()>0) {
118 _h_F_A->fill(xp, WA);
119 }
120 else {
121 _h_F_A->fill(xp,-WA);
122 }
123 if(flavour==5) {
124 _h_b_F_T ->fill(xp,WT);
125 _h_b_F_L ->fill(xp,WL);
126 }
127 else if(flavour!=4) {
128 _h_light_F_T->fill(xp,WT);
129 _h_light_F_L->fill(xp,WL);
130 }
131 }
132 }
133
134 if(flavour==5) {
135 _n_bottom->fill(Ecm, fs.particles().size());
136 }
137 else if(flavour!=4) {
138 _n_light->fill(Ecm, fs.particles().size());
139 }
140
141 }
142
143
144 /// Normalise histograms etc., after the run
145 void finalize() {
146 scale(_h_F_T ,1./ *_c_total);
147 scale(_h_F_L ,1./ *_c_total);
148 scale(_h_F_A ,1./ *_c_total);
149 scale(_h_F_TL,1./ *_c_total);
150 {Estimate1DPtr temp; divide(_h_F_L, _h_F_T , book(temp, 6, 1, 1));}
151 {Estimate1DPtr temp; divide(_h_F_L, _h_F_TL, book(temp, 6, 1, 2));}
152 scale(_h_F_T_total ,1./ *_c_total);
153 scale(_h_F_L_total ,1./ *_c_total);
154 scale(_h_F_TL_total,1./ *_c_total);
155 scale(_h_b_F_T ,1./ *_c_bottom);
156 scale(_h_b_F_L ,1./ *_c_bottom);
157 scale(_h_light_F_T ,1./ *_c_light);
158 scale(_h_light_F_L ,1./ *_c_light);
159 scale(_n_bottom ,1./ *_c_bottom);
160 scale(_n_light ,1./ *_c_light);
161 }
162
163 /// @}
164
165
166 /// @name Histograms
167 /// @{
168 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;
169 Histo1DPtr _h_F_T_total,_h_F_L_total,_h_F_TL_total;
170 BinnedHistoPtr<string> _n_light,_n_bottom;
171 CounterPtr _c_light,_c_bottom,_c_total;
172 const string Ecm = "91.2";
173 /// @}
174
175
176 };
177
178
179 RIVET_DECLARE_PLUGIN(DELPHI_1999_I448370);
180
181
182}
|