Rivet analyses referenceCLEO_1983_I188803Measurement of hadronic cross section at the $\Upsilon(1S)$, 9.461 GeVExperiment: CLEO (CESR) Inspire ID: 188803 Status: VALIDATED Authors:
Beam energies: (4.7, 4.7); (5.3, 5.3) GeV Run details:
Measurement of the hadronic cross section in $e^+e^-$ collisions by CLEO at the $\Upsilon(1S)$, 9.461 GeV. Source code: CLEO_1983_I188803.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Hadronic cross section measurement
9 class CLEO_1983_I188803 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1983_I188803);
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, 2, 1, 1);
26 for (const string& en : _c_hadrons.binning().edges<0>()) {
27 double end = std::stod(en)*GeV;
28 if(isCompatibleWithSqrtS(end)) {
29 _ecms = en;
30 break;
31 }
32 }
33 if(_ecms.empty())
34 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 vetoEvent;
52 // everything else
53 else
54 _c_hadrons->fill(_ecms);
55 }
56
57
58 /// Normalise histograms etc., after the run
59 void finalize() {
60 double fact = crossSection()/ sumOfWeights() /nanobarn;
61 scale(_c_hadrons,fact);
62 }
63
64 /// @}
65
66
67 /// @name Histograms
68 /// @{
69 BinnedHistoPtr<string> _c_hadrons;
70 string _ecms;
71 /// @}
72
73
74 };
75
76
77 RIVET_DECLARE_PLUGIN(CLEO_1983_I188803);
78
79
80}
|