rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MARKJ_1980_I158857

Measurement of $R$ between 12 and 35.8 GeV
Experiment: MARKJ (PETRA)
Inspire ID: 158857
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rept. 63 (1980) 337-391, 1980
Beams: e- e+
Beam energies: ANY
Run details:
  • e+ e- to hadrons and e+ e- to mu+ mu- (for normalization)

Measurement of $R$ in $e^+e^-$ collisions by MARKJ between 12 and 35.8 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: MARKJ_1980_I158857.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 MARKJ_1980_I158857 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(MARKJ_1980_I158857);
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      book(_c_hadrons, "/TMP/sigma_hadrons", refData<YODA::BinnedEstimate<string>>(1,1,1));
26      book(_c_muons,   "/TMP/sigma_muons"  , refData<YODA::BinnedEstimate<string>>(1,1,1));
27      for (const string& en : _c_hadrons.binning().edges<0>()) {
28        const size_t idx = en.find("-");
29        if(idx!=std::string::npos) {
30          const double emin = std::stod(en.substr(0,idx));
31          const double emax = std::stod(en.substr(idx+1,string::npos));
32          if(inRange(sqrtS()/GeV, emin, emax)) {
33            _ecms = en;
34            break;
35          }
36        }
37        else {
38          const double end = std::stod(en)*GeV;
39          if (isCompatibleWithSqrtS(end)) {
40            _ecms = en;
41            break;
42          }
43        }
44      }
45      if (_ecms.empty())
46        MSG_ERROR("Beam energy incompatible with analysis.");
47    }
48
49
50    /// Perform the per-event analysis
51    void analyze(const Event& event) {
52      const FinalState& fs = apply<FinalState>(event, "FS");
53
54      map<long,int> nCount;
55      int ntotal(0);
56      for (const Particle& p : fs.particles()) {
57	nCount[p.pid()] += 1;
58	++ntotal;
59      }
60      // mu+mu- + photons
61      if(nCount[-13]==1 and nCount[13]==1 &&
62	 ntotal==2+nCount[22])
63	_c_muons->fill(_ecms);
64      // everything else
65      else
66	_c_hadrons->fill(_ecms);
67    }
68
69
70    /// Normalise histograms etc., after the run
71    void finalize() {
72      BinnedEstimatePtr<string> mult;
73      book(mult, 1, 1, 1);
74      divide(_c_hadrons,_c_muons,mult);
75    }
76
77    /// @}
78
79
80    /// @name Histograms
81    /// @{
82    BinnedHistoPtr<string> _c_hadrons, _c_muons;
83    string _ecms;
84    /// @}
85
86
87  };
88
89
90  RIVET_DECLARE_PLUGIN(MARKJ_1980_I158857);
91
92
93}