Rivet analyses referenceJADE_1979_I142874Charged hadron multiplicityExperiment: JADE (PETRA) Inspire ID: 142874 Status: VALIDATED Authors:
Beam energies: (11.0, 11.0); (13.8, 13.8); (15.0, 15.0); (15.8, 15.8) GeV Run details:
Charged hadron multiplicity at a range of energies, use with care as its not clear if $K_S^0$ decays are included of not, within the systematic error of 1.5 Source code: JADE_1979_I142874.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class JADE_1979_I142874 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(JADE_1979_I142874);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(ChargedFinalState(), "FS");
24
25 // Book histograms
26 book(_nHadrons, "TMP/hadrons");
27
28 }
29
30
31 /// Perform the per-event analysis
32 void analyze(const Event& event) {
33 const ChargedFinalState& fs = apply<ChargedFinalState>(event, "FS");
34 _nHadrons->fill(fs.particles().size());
35
36 }
37
38
39 /// Normalise histograms etc., after the run
40 void finalize() {
41 double sigma = _nHadrons->val()/sumOfWeights();
42 double error = _nHadrons->err()/sumOfWeights();
43 Estimate1DPtr mult;
44 book(mult, 2, 1, 1);
45 for (auto& b : mult->bins()) {
46 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
47 b.set(sigma, error);
48 }
49 }
50 }
51 /// @}
52
53
54 /// @name Histograms
55 /// @{
56 CounterPtr _nHadrons;
57 /// @}
58
59
60 };
61
62
63 RIVET_DECLARE_PLUGIN(JADE_1979_I142874);
64
65
66}
|