Rivet analyses referenceJADE_1983_I190818Hadronic charged multiplicity measurement between 12 and 35 GeVExperiment: JADE (PETRA) Inspire ID: 190818 Status: VALIDATED Authors:
Beam energies: (6.0, 6.0); (15.0, 15.0); (17.5, 17.5) GeV Run details:
The charged particle multiplicity distribution of hadronic $e^+e^-$ events as measured between 12 and 35 GeV using the JADE detector at PETRA. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: JADE_1983_I190818.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Average multiplcity at a range of energies
9 class JADE_1983_I190818 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(JADE_1983_I190818);
14
15
16 /// @name Analysis methods
17 //@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 const ChargedFinalState cfs;
22 declare(cfs, "CFS");
23 if( !(isCompatibleWithSqrtS(12.0) ||
24 isCompatibleWithSqrtS(30.0) ||
25 isCompatibleWithSqrtS(35.0) )) {
26 MSG_WARNING("CoM energy of events sqrt(s) = " << sqrtS()/GeV
27 << " doesn't match any available analysis energy .");
28 }
29 book(_counter, "/TMP/MULT");
30 book(_mult, 1, 1, 1);
31 }
32
33
34 /// Perform the per-event analysis
35 void analyze(const Event& event) {
36 const FinalState& cfs = apply<FinalState>(event, "CFS");
37 MSG_DEBUG("Total charged multiplicity = " << cfs.size());
38 _counter->fill(cfs.size());
39 }
40
41
42 /// Normalise histograms etc., after the run
43 void finalize() {
44 scale(_counter,1./sumOfWeights());
45
46 double val = _counter->val();
47 double err = _counter->err();
48
49 Scatter2D tempScat(refData(1, 1, 1));
50
51 for (size_t b = 0; b < tempScat.numPoints(); b++) {
52 const double x = tempScat.point(b).x();
53 pair<double,double> ex = tempScat.point(b).xErrs();
54 pair<double,double> ex2 = ex;
55 if(ex2.first ==0.) ex2. first=0.0001;
56 if(ex2.second==0.) ex2.second=0.0001;
57 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
58 _mult->addPoint(x, val, ex, make_pair(err,err));
59 }
60 else {
61 _mult->addPoint(x, 0., ex, make_pair(0.,.0));
62 }
63 }
64 }
65 //@}
66
67 private:
68
69 // Histogram
70 CounterPtr _counter;
71 Scatter2DPtr _mult;
72
73 };
74
75 // The hook for the plugin system
76 RIVET_DECLARE_PLUGIN(JADE_1983_I190818);
77
78}
|