Rivet analyses referenceFENICE_1994_I377833Cross section for $e^+e^-\to p\bar{p}$ between 1.9 and 2.44 GeVExperiment: FENICE (ADONE) Inspire ID: 377833 Status: VALIDATED Authors:
Beam energies: (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.2, 1.2) GeV Run details:
Measurement of the cross section for $e^+e^-\to p\bar{p}$ between 1.9 and 2.44 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: FENICE_1994_I377833.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief e+e- -> p pbar
10 class FENICE_1994_I377833 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(FENICE_1994_I377833);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 book(_nProton, 1, 1, 1);
26 for (const string& en : _nProton.binning().edges<0>()) {
27 const double end = sqrt(std::stod(en)*GeV);
28 if (isCompatibleWithSqrtS(end)) {
29 _s = en;
30 break;
31 }
32 }
33 if (_s.empty())
34 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 // total hadronic and muonic cross sections
42 map<long,int> nCount;
43 int ntotal(0);
44 for (const Particle& p : fs.particles()) {
45 nCount[p.pid()] += 1;
46 ++ntotal;
47 }
48 if(ntotal==2 && nCount[2212]==1 && nCount[-2212]==1)
49 _nProton->fill(_s);
50 }
51
52
53 /// Normalise histograms etc., after the run
54 void finalize() {
55 scale(_nProton, crossSection()/ sumOfWeights() /nanobarn);
56 }
57
58 /// @}
59
60
61 /// @name Histograms
62 /// @{
63 BinnedHistoPtr<string> _nProton;
64 string _s;
65 /// @}
66
67
68 };
69
70
71 RIVET_DECLARE_PLUGIN(FENICE_1994_I377833);
72
73
74}
|