rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CLEO_1983_I188805

Measurement of the hadronic cross section between9.46 and 10.355 GeV
Experiment: CLEO (CESR)
Inspire ID: 188805
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 50 (1983) 807
Beams: e- e+
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the hadronic cross section between 9.46 and 10.355 GeV

Source code: CLEO_1983_I188805.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_1983_I188805 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1983_I188805);
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 histograms
23      book(_c_hadrons, "/TMP/sigma_hadrons");
24    }
25
26
27    /// Perform the per-event analysis
28    void analyze(const Event& event) {
29      const FinalState& fs = apply<FinalState>(event, "FS");
30
31      map<long,int> nCount;
32      int ntotal(0);
33      for (const Particle& p : fs.particles()) {
34	nCount[p.pid()] += 1;
35	++ntotal;
36      }
37      // mu+mu- + photons
38      if(nCount[-13]==1 and nCount[13]==1 &&
39	 ntotal==2+nCount[22])
40	vetoEvent;
41      // everything else
42      else
43	_c_hadrons->fill();
44    }
45
46
47    /// Normalise histograms etc., after the run
48    void finalize() {
49      // R
50      double fact = crossSection()/ sumOfWeights() /nanobarn;
51      double sig_h = _c_hadrons->val()*fact;
52      double err_h = _c_hadrons->err()*fact;
53      Scatter2D temphisto(refData(1, 1, 1));
54      Scatter2DPtr hadrons;
55      book(hadrons, 1,1,1);
56      for (size_t b = 0; b < temphisto.numPoints(); b++) {
57	const double x  = temphisto.point(b).x();
58	pair<double,double> ex = temphisto.point(b).xErrs();
59	pair<double,double> ex2 = ex;
60	if(ex2.first ==0.) ex2. first=0.0001;
61	if(ex2.second==0.) ex2.second=0.0001;
62	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
63	  hadrons->addPoint(x, sig_h, ex, make_pair(err_h,err_h));
64	}
65	else {
66	  hadrons->addPoint(x, 0., ex, make_pair(0.,.0));
67	}
68      }
69    }
70
71    //@}
72
73
74    /// @name Histograms
75    //@{
76    CounterPtr _c_hadrons;
77    //@}
78
79
80  };
81
82
83  // The hook for the plugin system
84  RIVET_DECLARE_PLUGIN(CLEO_1983_I188805);
85
86
87}