rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BES_1995_I39870

Measurement of the hadronic cross section for energies between 3.08 and 3.116 GeV
Experiment: BES (BEPC)
Inspire ID: 39870
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett. B355 (1995) 374-380, 1995
Beams: e- e+
Beam energies: ANY
Run details:
  • e+ e- to hadrons and e+ e- to mu+ mu- (for normalization)

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 Add a short analysis description here
 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 &&
41	 ntotal==2+nCount[22])
42	vetoEvent;
43      // everything else
44      else
45	_c_hadrons->fill();
46    }
47
48
49    /// Normalise histograms etc., after the run
50    void finalize() {
51      double fact = crossSection()/ sumOfWeights() /nanobarn;
52      double sig_h = _c_hadrons->val()*fact;
53      double err_h = _c_hadrons->err()*fact;
54      Scatter2D temphisto(refData(1, 1, 1));
55      Scatter2DPtr hadrons;
56      book(hadrons, 1, 1, 1);
57      for (size_t b = 0; b < temphisto.numPoints(); b++) {
58	const double x  = temphisto.point(b).x();
59	pair<double,double> ex = temphisto.point(b).xErrs();
60	pair<double,double> ex2 = ex;
61	if(ex2.first ==0.) ex2. first=0.0001;
62	if(ex2.second==0.) ex2.second=0.0001;
63	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
64	  hadrons->addPoint(x, sig_h, ex, make_pair(err_h,err_h));
65	}
66	else {
67	  hadrons->addPoint(x, 0., ex, make_pair(0.,.0));
68	}
69      }
70
71    }
72
73    //@}
74
75
76    /// @name Histograms
77    //@{
78    CounterPtr _c_hadrons;
79    //@}
80
81
82  };
83
84
85  // The hook for the plugin system
86  RIVET_DECLARE_PLUGIN(BES_1995_I39870);
87
88
89}