Rivet analyses referencePLUTO_1980_I152291Measurement of $R$ between 30 and 31 GeVExperiment: PLUTO (PETRA) Inspire ID: 152291 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of $R$ in $e^+e^-$ collisions by PLUTO for energies between 30 and 31 GeV. The individual hadronic and muonic cross sections are also outputted to the yoda file so that ratio $R$ can be recalculated if runs are combined. Source code: PLUTO_1980_I152291.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief R measurement
9 class PLUTO_1980_I152291 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(PLUTO_1980_I152291);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(FinalState(), "FS");
23
24 // Book histograms
25 for(unsigned int ix=0;ix<2;++ix) {
26 book(_c_hadrons[ix], "/TMP/sigma_hadrons_"+toString(ix+1), refData(1+ix,1,1));
27 book(_c_muons [ix], "/TMP/sigma_muons_" +toString(ix+1), refData(1+ix,1,1));
28 }
29 }
30
31
32 /// Perform the per-event analysis
33 void analyze(const Event& event) {
34 const FinalState& fs = apply<FinalState>(event, "FS");
35
36 map<long,int> nCount;
37 int ntotal(0);
38 for (const Particle& p : fs.particles()) {
39 nCount[p.pid()] += 1;
40 ++ntotal;
41 }
42 // mu+mu- + photons
43 if(nCount[-13]==1 and nCount[13]==1 &&
44 ntotal==2+nCount[22]) {
45 for(unsigned int ix=0;ix<2;++ix) _c_muons[ix]->fill(sqrtS());
46 }
47 // everything else
48 else {
49 for(unsigned int ix=0;ix<2;++ix) _c_hadrons[ix]->fill(sqrtS());
50 }
51 }
52
53
54 /// Normalise histograms etc., after the run
55 void finalize() {
56 for(unsigned int ix=0;ix<2;++ix) {
57 Estimate1DPtr mult;
58 book(mult, ix+1, 1, 1);
59 divide(_c_hadrons[ix], _c_muons[ix],mult);
60 }
61 }
62
63 /// @}
64
65
66 /// @name Histograms
67 /// @{
68 Histo1DPtr _c_hadrons[2], _c_muons[2];
69 /// @}
70
71
72 };
73
74
75 RIVET_DECLARE_PLUGIN(PLUTO_1980_I152291);
76
77
78}
|