Rivet analyses referenceOPAL_2000_I513476Event Shapes at 172, 183 and 189 GeVExperiment: OPAL (LEP) Inspire ID: 513476 Status: VALIDATED Authors:
Beam energies: (86.0, 86.0); (91.5, 91.5); (94.5, 94.5) GeV Run details:
Event shapes at 172, 183 and 189 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: OPAL_2000_I513476.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/ChargedFinalState.hh"
6#include "Rivet/Projections/Sphericity.hh"
7#include "Rivet/Projections/Thrust.hh"
8#include "Rivet/Projections/FastJets.hh"
9#include "Rivet/Projections/ParisiTensor.hh"
10#include "Rivet/Projections/Hemispheres.hh"
11
12namespace Rivet {
13
14
15 /// @brief event shapes at 172, 183, 189
16 class OPAL_2000_I513476 : public Analysis {
17 public:
18
19 /// Constructor
20 RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_2000_I513476);
21
22
23 /// @name Analysis methods
24 //@{
25
26 /// Book histograms and initialise projections before the run
27 void init() {
28
29 // Initialise and register projections
30 // Projections
31 declare(Beam(), "Beams");
32 const FinalState fs;
33 declare(fs, "FS");
34 const ChargedFinalState cfs;
35 declare(cfs, "CFS");
36 declare(FastJets(fs, FastJets::DURHAM, 0.7), "DurhamJets");
37 declare(Sphericity(fs), "Sphericity");
38 declare(ParisiTensor(fs), "Parisi");
39 const Thrust thrust(fs);
40 declare(thrust, "Thrust");
41 declare(Hemispheres(thrust), "Hemispheres");
42
43 // Book histograms
44 int ih=-1;
45 if (isCompatibleWithSqrtS(172.)) {
46 ih = 1;
47 } else if (isCompatibleWithSqrtS(183.)) {
48 ih = 2;
49 } else if (isCompatibleWithSqrtS(189.)) {
50 ih = 3;
51 }
52 else {
53 throw Error("Invalid CMS energy for OPAL_2000_I513476");
54 }
55 book(_h_thrust , 1,1,ih);
56 book(_h_major , 2,1,ih);
57 book(_h_minor , 3,1,ih);
58 book(_h_aplanarity, 4,1,ih);
59 book(_h_oblateness, 5,1,ih);
60 book(_h_C , 6,1,ih);
61 book(_h_rhoH , 7,1,ih);
62 book(_h_sphericity, 8,1,ih);
63 book(_h_totalB , 9,1,ih);
64 book(_h_wideB , 10,1,ih);
65 book(_h_y23 , 11,1,ih);
66 book(_h_mult , 13,1,ih);
67 book(_h_pTin , 15,1,ih);
68 book(_h_pTout , 16,1,ih);
69 book(_h_y , 17,1,ih);
70 book(_h_x , 18,1,ih);
71 book(_h_xi , 19,1,ih);
72 book(_sumW,"/TMP/sumW");
73 }
74
75
76 /// Perform the per-event analysis
77 void analyze(const Event& event) {
78 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
79 const FinalState& cfs = apply<FinalState>(event, "CFS");
80 if (cfs.size() < 2) vetoEvent;
81
82 _sumW->fill();
83
84 // Get beams and average beam momentum
85 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
86 const double meanBeamMom = ( beams.first.p3().mod() +
87 beams.second.p3().mod() ) / 2.0;
88
89 // Thrust related
90 const Thrust& thrust = apply<Thrust>(event, "Thrust");
91 _h_thrust ->fill(thrust.thrust() );
92 _h_major ->fill(thrust.thrustMajor());
93 _h_minor ->fill(thrust.thrustMinor());
94 _h_oblateness->fill(thrust.oblateness() );
95
96 // Sphericity related
97 const Sphericity& sphericity = apply<Sphericity>(event, "Sphericity");
98 _h_sphericity->fill(sphericity.sphericity());
99 _h_aplanarity->fill(sphericity.aplanarity());
100
101 // C parameter
102 const ParisiTensor& parisi = apply<ParisiTensor>(event, "Parisi");
103 _h_C->fill(parisi.C());
104
105 // Hemispheres
106 const Hemispheres& hemi = apply<Hemispheres>(event, "Hemispheres");
107
108 _h_rhoH ->fill(hemi.scaledMhigh());
109 _h_wideB ->fill(hemi.Bmax());
110 _h_totalB->fill(hemi.Bsum());
111
112 // Jets
113 const FastJets& durjet = apply<FastJets>(event, "DurhamJets");
114 const double y23 = durjet.clusterSeq()->exclusive_ymerge_max(2);
115 _h_y23->fill(y23);
116
117 // charged particles
118 _h_mult->fill(cfs.particles().size());
119 for (const Particle& p : cfs.particles()) {
120 const Vector3 mom3 = p.p3();
121 const double energy = p.E();
122 const double pTinT = dot(mom3, thrust.thrustMajorAxis());
123 const double pToutT = dot(mom3, thrust.thrustMinorAxis());
124 _h_pTin ->fill(fabs(pTinT/GeV) );
125 _h_pTout->fill(fabs(pToutT/GeV));
126 const double momT = dot(thrust.thrustAxis(), mom3);
127 const double rapidityT = 0.5 * std::log((energy + momT) / (energy - momT));
128 _h_y->fill(fabs(rapidityT));
129 const double mom = mom3.mod();
130 const double scaledMom = mom/meanBeamMom;
131 const double logInvScaledMom = -std::log(scaledMom);
132 _h_xi->fill(logInvScaledMom);
133 _h_x ->fill(scaledMom );
134 }
135 }
136
137
138 /// Normalise histograms etc., after the run
139 void finalize() {
140 scale(_h_thrust ,1./ *_sumW);
141 scale(_h_major ,1./ *_sumW);
142 scale(_h_minor ,1./ *_sumW);
143 scale(_h_aplanarity,1./ *_sumW);
144 scale(_h_oblateness,1./ *_sumW);
145 scale(_h_C ,1./ *_sumW);
146 scale(_h_rhoH ,1./ *_sumW);
147 scale(_h_sphericity,1./ *_sumW);
148 scale(_h_totalB ,1./ *_sumW);
149 scale(_h_wideB ,1./ *_sumW);
150 scale(_h_y23 ,1./ *_sumW);
151 scale(_h_mult ,200./ *_sumW);
152 scale(_h_pTin ,1./ *_sumW);
153 scale(_h_pTout ,1./ *_sumW);
154 scale(_h_y ,1./ *_sumW);
155 scale(_h_x ,1./ *_sumW);
156 scale(_h_xi ,1./ *_sumW);
157 // mean multiplicity
158 double nch = _h_mult->xMean();
159 double nch_err = _h_mult->xStdErr();
160 Scatter2DPtr m_ch;
161 book(m_ch,14,1,1);
162 m_ch->addPoint(sqrtS()/GeV,nch,0.,nch_err);
163 // mean ptIn
164 double pTin = _h_pTin->xMean();
165 double pTin_err = _h_pTin->xStdErr();
166 Scatter2DPtr m_pTin;
167 book(m_pTin,20,1,1);
168 m_pTin->addPoint(sqrtS()/GeV,pTin,0.,pTin_err);
169 // mean ptOut
170 double pTout = _h_pTout->xMean();
171 double pTout_err = _h_pTout->xStdErr();
172 Scatter2DPtr m_pTout;
173 book(m_pTout,20,1,2);
174 m_pTout->addPoint(sqrtS()/GeV,pTout,0.,pTout_err);
175 // mean y
176 double y = _h_y->xMean();
177 double y_err = _h_y->xStdErr();
178 Scatter2DPtr m_y;
179 book(m_y,20,1,3);
180 m_y->addPoint(sqrtS()/GeV,y,0.,y_err);
181 // mean x
182 double x = _h_x->xMean();
183 double x_err = _h_x->xStdErr();
184 Scatter2DPtr m_x;
185 book(m_x,20,1,4);
186 m_x->addPoint(sqrtS()/GeV,x,0.,x_err);
187 }
188
189 //@}
190
191
192 /// @name Histograms
193 //@{
194 Histo1DPtr _h_thrust,_h_major,_h_minor,_h_aplanarity,_h_oblateness,_h_C,_h_rhoH,_h_sphericity;
195 Histo1DPtr _h_totalB,_h_wideB,_h_y23,_h_mult,_h_pTin,_h_pTout,_h_y,_h_x,_h_xi;
196 CounterPtr _sumW;
197 //@}
198
199
200 };
201
202
203 // The hook for the plugin system
204 RIVET_DECLARE_PLUGIN(OPAL_2000_I513476);
205
206
207}
|