Rivet analyses referenceCLEO_2006_I700665Hadronic cross section at 3.773 GeVExperiment: CLEO (CESR) Inspire ID: 1650066 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Haronic cross section at 3.773 measured by CLEO. Source code: CLEO_2006_I700665.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class CLEO_2006_I700665 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_2006_I700665);
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, "/TMP/sigma_hadrons");
23 }
24
25
26 /// Perform the per-event analysis
27 void analyze(const Event& event) {
28 const FinalState& fs = apply<FinalState>(event, "FS");
29
30 map<long,int> nCount;
31 int ntotal(0);
32 for (const Particle& p : fs.particles()) {
33 nCount[p.pid()] += 1;
34 ++ntotal;
35 }
36 // mu+mu- + photons
37 if(nCount[-13]==1 and nCount[13]==1 &&
38 ntotal==2+nCount[22])
39 vetoEvent;
40 // everything else
41 else {
42 _c_hadrons->fill();
43 }
44 }
45
46
47 /// Normalise histograms etc., after the run
48 void finalize() {
49 double fact = crossSection()/ sumOfWeights() /nanobarn;
50 double sig_h = _c_hadrons->val()*fact;
51 double err_h = _c_hadrons->err()*fact;
52 Estimate1DPtr hadrons;
53 book(hadrons, 1, 1, 1);
54 for (auto& b : hadrons->bins()) {
55 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
56 hadrons->bin(1).set(sig_h, err_h);
57 }
58 }
59 }
60
61 /// @}
62
63
64 /// @name Histograms
65 /// @{
66 CounterPtr _c_hadrons;
67 /// @}
68
69
70 };
71
72
73 RIVET_DECLARE_PLUGIN(CLEO_2006_I700665);
74
75
76}
|