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: ANY 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. 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, "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 Estimate1DPtr mult;
52 book(mult, 1, 1, 1);
53 for (auto& b : mult->bins()) {
54 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
55 b.set(sigma, error);
56 }
57 }
58 }
59
60 ///@}
61
62
63 /// @name Histograms
64 ///@{
65 CounterPtr _nproton;
66 ///@}
67
68
69 };
70
71
72 RIVET_DECLARE_PLUGIN(BESIII_2020_I1837725);
73
74}
|