Rivet analyses referenceDASP_1978_I129715Measurement of $R$ for energies between 3.603 and 5.195 GeVExperiment: DASP (DORIS) Inspire ID: 129715 Status: VALIDATED Authors:
Beam energies: (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.5, 2.5); (2.6, 2.6) GeV Run details:
Measurement of $R$ in $e^+e^-$ collisions by DASP for energies between 3.603 and 5.195 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: DASP_1978_I129715.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief R between 3.603 and 5.195 GeV
9 class DASP_1978_I129715 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(DASP_1978_I129715);
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 double end = std::stod(en)*GeV;
29 if(isCompatibleWithSqrtS(end)) {
30 _ecms = en;
31 break;
32 }
33 }
34 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
35 }
36
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 const FinalState& fs = apply<FinalState>(event, "FS");
41
42 map<long,int> nCount;
43 int ntotal(0);
44 for (const Particle& p : fs.particles()) {
45 nCount[p.pid()] += 1;
46 ++ntotal;
47 }
48 // mu+mu- + photons
49 if(nCount[-13]==1 and nCount[13]==1 &&
50 ntotal==2+nCount[22])
51 _c_muons->fill(_ecms);
52 // everything else
53 else
54 _c_hadrons->fill(_ecms);
55 }
56
57
58 /// Normalise histograms etc., after the run
59 void finalize() {
60 BinnedEstimatePtr<string> mult;
61 book(mult, 1, 1, 1);
62 divide(_c_hadrons,_c_muons,mult);
63 }
64
65 /// @}
66
67
68 /// @name Histograms
69 /// @{
70 BinnedHistoPtr<string> _c_hadrons, _c_muons;
71 string _ecms;
72 /// @}
73
74
75 };
76
77
78 RIVET_DECLARE_PLUGIN(DASP_1978_I129715);
79
80
81}
|