Rivet analyses referenceDESY147_1978_I131524Measurement of $R$ for energies between 9.41 and 10.63 GeVExperiment: DESY147 (DORIS) Inspire ID: 131524 Status: VALIDATED Authors:
Beam energies: (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.3, 5.3); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.8, 4.8); (4.8, 4.8); (5.0, 5.0) GeV Run details:
Measurement of $R$ in $e^+e^-$ collisions for energies between 9.41 and 9.51, and 9.98 and 10.63 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: DESY147_1978_I131524.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 DESY147_1978_I131524 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(DESY147_1978_I131524);
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<YODA::BinnedEstimate<string>>(1+ix,1,1));
27 book(_c_muons[ix], "/TMP/sigma_muons_" +toString(ix+1), refData<YODA::BinnedEstimate<string>>(1+ix,1,1));
28 for (const string& en : _c_hadrons[ix].binning().edges<0>()) {
29 double end = std::stod(en)*GeV;
30 if(isCompatibleWithSqrtS(end)) {
31 _ecms[ix] = en;
32 break;
33 }
34 }
35 }
36 if(_ecms[0].empty() && _ecms[1].empty())
37 MSG_ERROR("Beam energy incompatible with analysis.");
38 }
39
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 const FinalState& fs = apply<FinalState>(event, "FS");
44
45 map<long,int> nCount;
46 int ntotal(0);
47 for (const Particle& p : fs.particles()) {
48 nCount[p.pid()] += 1;
49 ++ntotal;
50 }
51 // mu+mu- + photons
52 if(nCount[-13]==1 and nCount[13]==1 &&
53 ntotal==2+nCount[22]) {
54 for(unsigned int ix=0;ix<2;++ix) _c_muons[ix]->fill(_ecms[ix]);
55 }
56 // everything else
57 else {
58 for(unsigned int ix=0;ix<2;++ix) _c_hadrons[ix]->fill(_ecms[ix]);
59 }
60 }
61
62
63 /// Normalise histograms etc., after the run
64 void finalize() {
65 for(unsigned int ix=-0;ix<2;++ix) {
66 BinnedEstimatePtr<string> mult;
67 book(mult, 1+ix, 1, 1);
68 divide(_c_hadrons[ix],_c_muons[ix],mult);
69 }
70 }
71
72 /// @}
73
74
75 /// @name Histograms
76 /// @{
77 BinnedHistoPtr<string> _c_hadrons[2], _c_muons[2];
78 string _ecms[2];
79 /// @}
80
81
82 };
83
84
85 RIVET_DECLARE_PLUGIN(DESY147_1978_I131524);
86
87
88}
|