Rivet analyses referenceOPAL_1997_I440721Event Shapes at 161 GeVExperiment: OPAL (LEP) Inspire ID: 440721 Status: VALIDATED Authors:
Beam energies: (80.5, 80.5) GeV Run details:
Event shapes at 161 GeV. Only the evnet shapes are implemented, not the mean values, or the cone jet observables. Source code: OPAL_1997_I440721.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 161
16 class OPAL_1997_I440721 : public Analysis {
17 public:
18
19 /// Constructor
20 RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_1997_I440721);
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, JetAlg::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 book(_h_mult_avrg, 2,1,1);
45 book(_h_thrust , 3,1,1);
46 book(_h_major , 4,1,1);
47 book(_h_minor , 5,1,1);
48 book(_h_aplanarity, 8,1,1);
49 book(_h_oblateness, 6,1,1);
50 book(_h_C , 9,1,1);
51 book(_h_rhoH , 10,1,1);
52 book(_h_sphericity, 7,1,1);
53 book(_h_totalB , 11,1,1);
54 book(_h_wideB , 12,1,1);
55 book(_h_y23 , 20,1,1);
56 book(_h_pTin , 21,1,1);
57 book(_h_pTout , 22,1,1);
58 book(_h_y , 23,1,1);
59 book(_h_x , 24,1,1);
60 book(_h_xi , 25,1,1);
61 book(_h_mult , 26,1,1);
62 book(_sumW,"/TMP/sumW");
63 }
64
65
66 /// Perform the per-event analysis
67 void analyze(const Event& event) {
68 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
69 const FinalState& cfs = apply<FinalState>(event, "CFS");
70 if (cfs.size() < 2) vetoEvent;
71 _sumW->fill();
72
73 // Get beams and average beam momentum
74 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
75 const double meanBeamMom = ( beams.first.p3().mod() +
76 beams.second.p3().mod() ) / 2.0;
77
78 // Thrust related
79 const Thrust& thrust = apply<Thrust>(event, "Thrust");
80 _h_thrust ->fill(thrust.thrust() );
81 _h_major ->fill(thrust.thrustMajor());
82 _h_minor ->fill(thrust.thrustMinor());
83 _h_oblateness->fill(thrust.oblateness());
84
85 // Sphericity related
86 const Sphericity& sphericity = apply<Sphericity>(event, "Sphericity");
87 _h_sphericity->fill(sphericity.sphericity());
88 _h_aplanarity->fill(sphericity.aplanarity());
89
90 // C parameter
91 const ParisiTensor& parisi = apply<ParisiTensor>(event, "Parisi");
92 _h_C->fill(parisi.C());
93
94 // Hemispheres
95 const Hemispheres& hemi = apply<Hemispheres>(event, "Hemispheres");
96
97 _h_rhoH ->fill(hemi.scaledMhigh());
98 _h_wideB ->fill(hemi.Bmax());
99 _h_totalB->fill(hemi.Bsum());
100
101 // Jets
102 const FastJets& durjet = apply<FastJets>(event, "DurhamJets");
103 const double y23 = durjet.clusterSeq()->exclusive_ymerge_max(2);
104 _h_y23->fill(y23);
105
106 // charged particles
107 _h_mult->fill(cfs.particles().size());
108 _h_mult_avrg->fill(161, cfs.particles().size());
109 for (const Particle& p : cfs.particles()) {
110 const Vector3 mom3 = p.p3();
111 const double energy = p.E();
112 const double pTinT = dot(mom3, thrust.thrustMajorAxis());
113 const double pToutT = dot(mom3, thrust.thrustMinorAxis());
114 _h_pTin ->fill(fabs(pTinT/GeV) );
115 _h_pTout->fill(fabs(pToutT/GeV));
116 const double momT = dot(thrust.thrustAxis(), mom3);
117 const double rapidityT = 0.5 * std::log((energy + momT) / (energy - momT));
118 _h_y->fill(fabs(rapidityT));
119 const double mom = mom3.mod();
120 const double scaledMom = mom/meanBeamMom;
121 const double logInvScaledMom = -std::log(scaledMom);
122 _h_xi->fill(logInvScaledMom);
123 _h_x ->fill(scaledMom );
124 }
125 }
126
127
128 /// Normalise histograms etc., after the run
129 void finalize() {
130 scale(_h_thrust ,1./ *_sumW);
131 scale(_h_major ,1./ *_sumW);
132 scale(_h_minor ,1./ *_sumW);
133 scale(_h_aplanarity,1./ *_sumW);
134 scale(_h_oblateness,1./ *_sumW);
135 scale(_h_C ,1./ *_sumW);
136 scale(_h_rhoH ,1./ *_sumW);
137 scale(_h_sphericity,1./ *_sumW);
138 scale(_h_totalB ,1./ *_sumW);
139 scale(_h_wideB ,1./ *_sumW);
140 scale(_h_y23 ,1./ *_sumW);
141 scale(_h_mult ,100./ *_sumW);
142 scale(_h_pTin ,1./ *_sumW);
143 scale(_h_pTout ,1./ *_sumW);
144 scale(_h_y ,1./ *_sumW);
145 scale(_h_x ,1./ *_sumW);
146 scale(_h_xi ,1./ *_sumW);
147 }
148
149 /// @}
150
151
152 /// @name Histograms
153 /// @{
154 Histo1DPtr _h_thrust,_h_major,_h_minor,_h_aplanarity,_h_oblateness,_h_C,_h_rhoH,_h_sphericity;
155 Histo1DPtr _h_totalB,_h_wideB,_h_y23,_h_pTin,_h_pTout,_h_y,_h_x,_h_xi;
156 BinnedHistoPtr<int> _h_mult;
157 BinnedProfilePtr<int> _h_mult_avrg;
158 CounterPtr _sumW;
159 /// @}
160
161
162 };
163
164
165 RIVET_DECLARE_PLUGIN(OPAL_1997_I440721);
166
167
168}
|