Rivet analyses referenceTASSO_1980_I153511Event shapes at 12 and 30 GeVExperiment: TASSO (Petra) Inspire ID: 153511 Status: VALIDATED Authors:
Beam energies: (6.0, 6.0); (15.0, 15.0) GeV Run details:
Sphericity, Aplanarity and scaled momentum distribution at 12 and 30 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: TASSO_1980_I153511.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Sphericity.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5#include "Rivet/Projections/Beam.hh"
6
7namespace Rivet {
8
9
10 /// @brief Add a short analysis description here
11 class TASSO_1980_I153511 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(TASSO_1980_I153511);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23 declare(Beam(), "Beams");
24
25 const ChargedFinalState cfs;
26 declare(cfs, "CFS");
27
28 // Thrust and sphericity
29 declare(Sphericity(cfs), "Sphericity");
30 // Book histograms
31 unsigned int ihist=0;
32 if (isCompatibleWithSqrtS(12*GeV)) {
33 ihist=1;
34 }
35 else if (isCompatibleWithSqrtS(30*GeV)) {
36 ihist=2;
37 }
38 else
39 MSG_ERROR("Beam energy " << sqrtS() << " GeV not supported!");
40
41 book(_h_S , ihist, 1, 1);
42 book(_h_A , 2+ihist, 1, 1);
43 book(_h_x , 4+ihist, 1, 1);
44
45 }
46
47
48 /// Perform the per-event analysis
49 void analyze(const Event& event) {
50 // Get beams and average beam momentum
51 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
52 const double meanBeamMom = ( beams.first.p3().mod() +
53 beams.second.p3().mod() ) / 2.0;
54 const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
55 const Sphericity& sphericity = apply<Sphericity>(event, "Sphericity");
56 _h_S->fill(sphericity.sphericity());
57 _h_A->fill(sphericity.aplanarity());
58 for (const Particle& p : cfs.particles()) {
59 const Vector3 mom3 = p.p3();
60 const double mom = mom3.mod();
61 const double xp = mom/meanBeamMom;
62 _h_x->fill(xp);
63 }
64
65 }
66
67
68 /// Normalise histograms etc., after the run
69 void finalize() {
70
71 normalize(_h_S);
72 normalize(_h_A);
73 normalize(_h_x);
74
75 }
76
77 /// @}
78
79
80 /// @name Histograms
81 /// @{
82 Histo1DPtr _h_S,_h_A,_h_x;
83 /// @}
84
85
86 };
87
88
89 RIVET_DECLARE_PLUGIN(TASSO_1980_I153511);
90
91
92}
|