rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2006_I700020

Cross section for $e^+e^-\to$ proton and antiproton between threshold and 4.4 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 700020
Status: VALIDATED
Authors:
  • Peter Richardson
No references listed
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to p\bar{p}$ using radiative return for energies between threshold and 4.4 GeV.

Source code: BABAR_2006_I700020.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 BABAR_2006_I700020 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2006_I700020);
14
15
16    /// @name Analysis methods
17    //@{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21
22      // Initialise and register projections
23      declare(FinalState(), "FS");
24
25      // Book histograms
26      book(_nproton, "TMP/proton");
27    }
28
29
30    /// Perform the per-event analysis
31    void analyze(const Event& event) {
32      const FinalState& fs = apply<FinalState>(event, "FS");
33      if(fs.particles().size()!=2) vetoEvent;
34      for (const Particle& p : fs.particles()) {
35	if(abs(p.pid())!=PID::PROTON) vetoEvent;
36      }
37      _nproton->fill();
38    }
39
40
41    /// Normalise histograms etc., after the run
42    void finalize() {
43
44      double sigma = _nproton->val();
45      double error = _nproton->err();
46      sigma *= crossSection()/ sumOfWeights() /picobarn;
47      error *= crossSection()/ sumOfWeights() /picobarn;
48      for(unsigned int ix=1;ix<3;++ix) {
49	Scatter2D temphisto(refData(ix, 1, 1));
50	Scatter2DPtr mult;
51        book(mult, ix, 1, 1);
52	for (size_t b = 0; b < temphisto.numPoints(); b++) {
53	  const double x  = temphisto.point(b).x();
54	  pair<double,double> ex = temphisto.point(b).xErrs();
55	  pair<double,double> ex2 = ex;
56	  if(ex2.first ==0.) ex2. first=0.0001;
57	  if(ex2.second==0.) ex2.second=0.0001;
58	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
59	    mult->addPoint(x, sigma, ex, make_pair(error,error));
60	  }
61	  else {
62	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
63	  }
64	}
65      }
66    }
67
68    //@}
69
70
71    /// @name Histograms
72    //@{
73    CounterPtr _nproton;
74    //@}
75
76
77  };
78
79
80  // The hook for the plugin system
81  RIVET_DECLARE_PLUGIN(BABAR_2006_I700020);
82
83
84}