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