rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2020_I1837725

Measurement of the cross section for $e^+e^-\to2p2\bar{p}$ for $E_{\text{CMS}}$ between 4 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1837725
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to2p2\bar{p}$ for $E_{\text{CMS}}$ between 4 and 4.6 GeV by the BESIII collaboration.

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