Rivet analyses referenceTASSO_1982_I168232$\pi^0$ spectrum in $e^+e^-$ at 14 and 34 GeVExperiment: TASSO (TASSO) Inspire ID: 168232 Status: VALIDATED Authors:
Beam energies: (7.0, 7.0); (17.0, 17.0) GeV Run details:
Measurement of the $\pi^0$ spectrum in $e^+e^-$ collisions for centre-of-mass energies of 14 and 34 GeV by the TASSO experiment at Petra. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: TASSO_1982_I168232.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/Beam.hh"
5
6namespace Rivet {
7
8
9 /// @brief pi0 spectrum at 14 and 34 GeV
10 class TASSO_1982_I168232 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(TASSO_1982_I168232);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23
24 declare(Beam(), "Beams");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 sqs = 1.0;
29 if(isCompatibleWithSqrtS(14*GeV)) {
30 book(_h_E, 2,1,1);
31 book(_h_p, 2,2,2);
32 book(_h_x, 2,3,3);
33 sqs = 14.0;
34 }
35 else if (isCompatibleWithSqrtS(34*GeV)) {
36 book(_h_E, 3,1,1);
37 book(_h_p, 3,2,2);
38 book(_h_x, 3,3,3);
39 sqs = 34.0;
40 }
41 else
42 MSG_ERROR("Not compatible with energy " << sqrtS() << "GeV.");
43 }
44
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 // Get beams and average beam momentum
49 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
50 const double meanBeamMom = ( beams.first.p3().mod() +
51 beams.second.p3().mod() ) / 2.0;
52 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
53
54 for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::pid==PID::PI0)) {
55 if(!p.parents().empty() && p.parents()[0].pid()==PID::K0S)
56 continue;
57 double xE = p.E()/meanBeamMom;
58 double beta = p.p3().mod()/p.E();
59 _h_E->fill(p.E() );
60 _h_p->fill(p.p3().mod());
61 _h_x->fill(xE,1./beta);
62 }
63
64 }
65
66
67 /// Normalise histograms etc., after the run
68 void finalize() {
69
70 scale(_h_E, crossSection()/nanobarn/sumOfWeights());
71 scale(_h_p, crossSection()/nanobarn/sumOfWeights());
72 scale(_h_x, sqr(sqs)*crossSection()/microbarn/sumOfWeights());
73
74 }
75
76 /// @}
77
78
79 /// @name Histograms
80 /// @{
81 Histo1DPtr _h_E,_h_p,_h_x;
82 double sqs;
83 /// @}
84
85 };
86
87 RIVET_DECLARE_PLUGIN(TASSO_1982_I168232);
88
89}
|