Rivet analyses referenceCLEO_2006_I1650066Hadronic cross section at 3.773 GeVExperiment: CLEO (CESR) Inspire ID: 1650066 Status: VALIDATED Authors:
Beam energies: (1.9, 1.9) GeV Run details:
Haronic cross section at 3.773 measured by CLEO. Source code: CLEO_2006_I1650066.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Hadronic cross section at 3.773
9 class CLEO_2006_I1650066 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_2006_I1650066);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 declare(FinalState(), "FS");
22 book(_c_hadrons, 1,1,1);
23 for (const string& en : _c_hadrons.binning().edges<0>()) {
24 double end = std::stod(en)*GeV;
25 if(isCompatibleWithSqrtS(end)) {
26 _ecms = en;
27 break;
28 }
29 }
30 if(_ecms.empty())
31 MSG_ERROR("Beam energy incompatible with analysis.");
32 }
33
34
35 /// Perform the per-event analysis
36 void analyze(const Event& event) {
37 const FinalState& fs = apply<FinalState>(event, "FS");
38
39 map<long,int> nCount;
40 int ntotal(0);
41 for (const Particle& p : fs.particles()) {
42 nCount[p.pid()] += 1;
43 ++ntotal;
44 }
45 // mu+mu- + photons
46 if(nCount[-13]==1 and nCount[13]==1 &&
47 ntotal==2+nCount[22])
48 vetoEvent;
49 // everything else
50 else {
51 _c_hadrons->fill(_ecms);
52 }
53 }
54
55
56 /// Normalise histograms etc., after the run
57 void finalize() {
58 scale(_c_hadrons,crossSection()/ sumOfWeights() /nanobarn);
59 }
60
61 /// @}
62
63
64 /// @name Histograms
65 /// @{
66 BinnedHistoPtr<string> _c_hadrons;
67 string _ecms;
68 /// @}
69
70
71 };
72
73
74 RIVET_DECLARE_PLUGIN(CLEO_2006_I1650066);
75
76
77}
|