Rivet analyses referenceHRS_1988_I250824$\eta$ spectrum in $e^+e^-$ collisions at 29 GeVExperiment: HRS (PEP) Inspire ID: 250824 Status: VALIDATED Authors:
Beam energies: (14.5, 14.5) GeV Run details:
$\eta$ meson momentum spectrum measured at $\sqrt{s} = 29.$ GeV using the HRS detector at PEP. The bin widths are not included in either the paper or HEPdata and have therefore been infered. Source code: HRS_1988_I250824.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5#include "Rivet/Projections/Beam.hh"
6
7namespace Rivet {
8
9
10 /// @brief Add a short analysis description here
11 class HRS_1988_I250824 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(HRS_1988_I250824);
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 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 book(_h_eta, 1 , 1, 1);
29 }
30
31
32 /// Perform the per-event analysis
33 void analyze(const Event& event) {
34 if (_edges.empty()) _edges = _h_eta->xEdges();
35 // First, veto on leptonic events by requiring at least 4 charged FS particles
36 const FinalState& fs = apply<FinalState>(event, "FS");
37 const size_t numParticles = fs.particles().size();
38
39 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
40 if (numParticles < 2) {
41 MSG_DEBUG("Failed leptonic event cut");
42 vetoEvent;
43 }
44 MSG_DEBUG("Passed leptonic event cut");
45
46 // Get beams and average beam momentum
47 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
48 const double meanBeamMom = ( beams.first.p3().mod() +
49 beams.second.p3().mod() ) / 2.0;
50 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
51
52 // Final state to get particle spectra
53 for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::pid==221)) {
54 const double xE = p.E()/meanBeamMom;
55 _h_eta->fill(map2string(xE));
56 }
57 }
58
59 string map2string(const double val) const {
60 const size_t idx = _axis.index(val);
61 if (idx && idx <= _edges.size()) return _edges[idx-1];
62 return "OTHER";
63 }
64
65
66 /// Normalise histograms etc., after the run
67 void finalize() {
68
69 const double fact = sqr(sqrtS())/GeV2*crossSection()/microbarn/sumOfWeights();
70 scale(_h_eta, fact);
71 for(auto & b: _h_eta->bins()) {
72 const size_t idx = b.index();
73 b.scaleW(1./_axis.width(idx));
74 }
75 }
76
77 /// @}
78
79
80 /// @name Histograms
81 /// @{
82 BinnedHistoPtr<string> _h_eta;
83 YODA::Axis<double> _axis{0.1435, 0.1765, 0.210, 0.244, 0.2785, 0.313, 0.347,
84 0.381, 0.4155, 0.45, 0.4925, 0.5525, 0.6215, 0.6905};
85 vector<string> _edges;
86 /// @}
87
88
89 };
90
91
92 RIVET_DECLARE_PLUGIN(HRS_1988_I250824);
93
94
95}
|