Rivet analyses referenceKLOE2_2017_I1634981Cross section for $e^+e^-\to\pi^+\pi^-$ below 1 GeVExperiment: KLOE2 (DAPHNE) Inspire ID: 1634981 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\pi^+\pi^-$ below 1 GeV Source code: KLOE2_2017_I1634981.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/FastJets.hh"
5
6namespace Rivet {
7
8
9 /// @brief Add a short analysis description here
10 class KLOE2_2017_I1634981 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(KLOE2_2017_I1634981);
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
25 // Book histograms
26 book(_npion, "TMP/pion");
27 }
28
29 /// Perform the per-event analysis
30 void analyze(const Event& event) {
31 const FinalState& fs = apply<FinalState>(event, "FS");
32 if(fs.particles().size()!=2) vetoEvent;
33 for (const Particle& p : fs.particles()) {
34 if(abs(p.pid())!=PID::PIPLUS) vetoEvent;
35 }
36 _npion->fill();
37 }
38
39 /// Normalise histograms etc., after the run
40 void finalize() {
41 double sigma = _npion->val();
42 double error = _npion->err();
43 sigma *= crossSection()/ sumOfWeights() /nanobarn;
44 error *= crossSection()/ sumOfWeights() /nanobarn;
45 Estimate1DPtr mult;
46 book(mult, 1, 1, 1);
47 for (auto& b : mult->bins()) {
48 if (inRange(sqr(sqrtS()/GeV), b.xMin(), b.xMax())) {
49 b.set(sigma, error);
50 }
51 }
52 }
53
54 /// @}
55
56
57 /// @name Histograms
58 /// @{
59 CounterPtr _npion;
60 /// @}
61
62
63 };
64
65
66 RIVET_DECLARE_PLUGIN(KLOE2_2017_I1634981);
67
68
69}
|