Rivet analyses referenceGAMMAGAMMA_1979_I141722Measurement of $R$ and the hadron multiplicity between 1.42 and 3.09 GeVExperiment: GAMMAGAMMA (ADONE) Inspire ID: 141722 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of $R$ in $e^+e^-$ collisions by Gamma-Gamma-2 for energies between 1.42 and 3.09 GeV. The average charged and neutral particle multiplicity is also measured. The individual hadronic and muonic cross sections are also outputted to the yoda file so that ratio $R$ can be recalcuated if runs are combined. Source code: GAMMAGAMMA_1979_I141722.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief R and hadron mult in e+e-
9 class GAMMAGAMMA_1979_I141722 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(GAMMAGAMMA_1979_I141722);
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 book(_c_charged, 2, 1, 1);
28 book(_c_neutral, 2, 1, 2);
29 for (const string& en : _c_hadrons.binning().edges<0>()) {
30 const size_t idx = en.find("-");
31 if(idx!=std::string::npos) {
32 const double emin = std::stod(en.substr(0,idx));
33 const double emax = std::stod(en.substr(idx+1,string::npos));
34 if(inRange(sqrtS()/GeV, emin, emax)) {
35 _ecms = en;
36 break;
37 }
38 }
39 else {
40 const double end = std::stod(en)*GeV;
41 if (isCompatibleWithSqrtS(end)) {
42 _ecms = en;
43 break;
44 }
45 }
46 }
47 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
48 }
49
50
51 /// Perform the per-event analysis
52 void analyze(const Event& event) {
53 const FinalState& fs = apply<FinalState>(event, "FS");
54
55 map<long,int> nCount;
56 int ntotal(0),ncharged(0),nneutral(0);
57 for (const Particle& p : fs.particles()) {
58 nCount[p.pid()] += 1;
59 ++ntotal;
60 if(PID::isCharged(p.pid()))
61 ncharged += 1;
62 else
63 nneutral += 1;
64 }
65 // mu+mu- + photons
66 if(nCount[-13]==1 and nCount[13]==1 &&
67 ntotal==2+nCount[22])
68 _c_muons->fill(_ecms);
69 // everything else
70 else {
71 if(ntotal==2) vetoEvent;
72 _c_hadrons->fill(_ecms);
73 _c_charged->fill(sqrtS()/GeV,ncharged);
74 _c_neutral->fill(sqrtS()/GeV,nneutral);
75 }
76 }
77
78
79 /// Normalise histograms etc., after the run
80 void finalize() {
81 BinnedEstimatePtr<string> ratio;
82 book(ratio,1,1,1);
83 divide(_c_hadrons,_c_muons,ratio);
84 }
85
86 /// @}
87
88
89 /// @name Histograms
90 /// @{
91 BinnedHistoPtr<string> _c_hadrons, _c_muons;
92 Profile1DPtr _c_neutral,_c_charged;
93 string _ecms;
94 /// @}
95
96
97 };
98
99
100 RIVET_DECLARE_PLUGIN(GAMMAGAMMA_1979_I141722);
101
102
103}
|