Rivet analyses referenceBESIII_2020_I1837725Measurement of the cross section for $e^+e^-\to2p2\bar{p}$ for $E_{\text{CMS}}$ between 4 and 4.6 GeVExperiment: BESIII (BEPC) Inspire ID: 1837725 Status: VALIDATED Authors:
Beam energies: (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3) GeV Run details:
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. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. 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/LeptonFinder.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, 1, 1, 1);
31 for (const string& en : _nproton.binning().edges<0>()) {
32 const double end = std::stod(en)*GeV;
33 if (isCompatibleWithSqrtS(end)) {
34 _ecms = en;
35 break;
36 }
37 }
38 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
39 }
40
41
42 /// Perform the per-event analysis
43 void analyze(const Event& event) {
44 const FinalState& fs = apply<FinalState>(event, "FS");
45 if(fs.particles().size()!=4) vetoEvent;
46 for (const Particle& p : fs.particles()) {
47 if(abs(p.pid())!=PID::PROTON) vetoEvent;
48 }
49 _nproton->fill(_ecms);
50 }
51
52
53 /// Normalise histograms etc., after the run
54 void finalize() {
55 scale(_nproton, crossSection()/ sumOfWeights() /femtobarn);
56 }
57
58 ///@}
59
60
61 /// @name Histograms
62 ///@{
63 BinnedHistoPtr<string> _nproton;
64 string _ecms;
65 ///@}
66
67
68 };
69
70
71 RIVET_DECLARE_PLUGIN(BESIII_2020_I1837725);
72
73}
|