Rivet analyses referenceBESIII_2019_I1736235Cross section for $e^+e^-\to$ proton and antiproton between 2. and 3.08 GeVExperiment: BESIII (BEPC II) Inspire ID: 1736235 Status: VALIDATED Authors:
Beam energies: (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to p\bar{p}$ for energies between 2. and 3.08 GeV using. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2019_I1736235.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- > p pbar
9 class BESIII_2019_I1736235 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2019_I1736235);
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, 1, 1, 1);
27 for (const string& en : _nproton.binning().edges<0>()) {
28 const double end = std::stod(en)*GeV;
29 if (isCompatibleWithSqrtS(end)) {
30 _ecms = en;
31 break;
32 }
33 }
34 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
35 }
36
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 const FinalState& fs = apply<FinalState>(event, "FS");
41 if(fs.particles().size()!=2) vetoEvent;
42 for (const Particle& p : fs.particles()) {
43 if(abs(p.pid())!=PID::PROTON) vetoEvent;
44 }
45 _nproton->fill(_ecms);
46 }
47
48
49 /// Normalise histograms etc., after the run
50 void finalize() {
51 scale(_nproton, crossSection()/ sumOfWeights() /picobarn);
52 }
53
54 /// @}
55
56
57 /// @name Histograms
58 /// @{
59 BinnedHistoPtr<string> _nproton;
60 string _ecms;
61 /// @}
62
63
64 };
65
66
67 RIVET_DECLARE_PLUGIN(BESIII_2019_I1736235);
68
69}
|