Rivet analyses referenceJADE_1984_I202784Energy-Energy correlation at 14, 22 and 34 GeVExperiment: JADE (Petra) Inspire ID: 202784 Status: VALIDATED Authors:
Beam energies: (7.0, 7.0); (11.0, 11.0); (17.0, 17.0) GeV Run details:
Measurement of the energy-energy correlation, and its assymetry, at centre-of-mass energies 14, 22 and 34 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: JADE_1984_I202784.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/FinalState.hh"
5
6namespace Rivet {
7
8
9 /// @brief EEC at 14, 22 and 34 GeV
10 class JADE_1984_I202784 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(JADE_1984_I202784);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24
25 // Book histograms
26 unsigned int iloc(0);
27 if (isCompatibleWithSqrtS( 14.)) iloc=1;
28 else if(isCompatibleWithSqrtS( 22.)) iloc=2;
29 else if (isCompatibleWithSqrtS( 34.)) iloc=3;
30 else MSG_ERROR("Beam energy not supported!");
31 book(_histEEC , 1, 1, iloc);
32 book(_histAEEC, 2, 1, iloc);
33 book(_weightSum, "TMP/weightSum");
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 // First, veto on leptonic events by requiring at least 4 charged FS particles
40 const FinalState& fs = apply<FinalState>(event, "FS");
41 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
42 if ( fs.particles().size() < 2) {
43 MSG_DEBUG("Failed leptonic event cut");
44 vetoEvent;
45 }
46 MSG_DEBUG("Passed leptonic event cut");
47 _weightSum->fill();
48
49 double Evis = 0.0;
50 for (const Particle& p : fs.particles()) {
51 Evis += p.E();
52 }
53 double Evis2 = sqr(Evis);
54 // (A)EEC
55 // Need iterators since second loop starts at current outer loop iterator, i.e. no "foreach" here!
56 for (Particles::const_iterator p_i = fs.particles().begin(); p_i != fs.particles().end(); ++p_i) {
57 for (Particles::const_iterator p_j = p_i; p_j != fs.particles().end(); ++p_j) {
58 const Vector3 mom3_i = p_i->momentum().p3();
59 const Vector3 mom3_j = p_j->momentum().p3();
60 const double energy_i = p_i->momentum().E();
61 const double energy_j = p_j->momentum().E();
62 const double thetaij = mom3_i.unit().angle(mom3_j.unit())/M_PI*180.;
63 double eec = (energy_i*energy_j) / Evis2;
64 if(p_i != p_j) eec *= 2.;
65 _histEEC ->fill(thetaij, eec);
66 if (thetaij < 90.) {
67 _histAEEC->fill(thetaij, -eec);
68 }
69 else {
70 _histAEEC ->fill(180.-thetaij, eec);
71 }
72 }
73 }
74 }
75
76
77 /// Normalise histograms etc., after the run
78 void finalize() {
79 scale(_histEEC , 180.0/M_PI*1000./ *_weightSum);
80 scale(_histAEEC , 180.0/M_PI*1000./ *_weightSum);
81 }
82
83 /// @}
84
85
86 /// @name Histograms
87 /// @{
88 Histo1DPtr _histEEC, _histAEEC;
89 CounterPtr _weightSum;
90 /// @}
91
92
93 };
94
95
96 RIVET_DECLARE_PLUGIN(JADE_1984_I202784);
97
98}
|