Rivet analyses referenceCMD2_1999_I498859Cross section for $e^+e^-\to \pi^+\pi^-$ at near the $\rho$ mass.Experiment: CMD2 (VEPP-2M) Inspire ID: 498859 Status: VALIDATED Authors:
Beam energies: (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.3, 0.3); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.4, 0.4); (0.5, 0.5); (0.5, 0.5); (0.5, 0.5); (0.5, 0.5); (0.5, 0.5); (0.5, 0.5); (0.5, 0.5) GeV Run details:
1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5
6namespace Rivet {
7
8
9 /// @brief e+e- > pi+pi-
10 class CMD2_1999_I498859 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CMD2_1999_I498859);
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, 1, 1, 1);
27 for (const string& en : _npion.binning().edges<0>()) {
28 double end = std::stod(en)*MeV;
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::PIPLUS) vetoEvent;
44 }
45 _npion->fill(_ecms);
46 }
47
48
49 /// Normalise histograms etc., after the run
50 void finalize() {
51 scale(_npion,crossSection()/ sumOfWeights() /nanobarn);
52 }
53
54 /// @}
55
56
57 /// @name Histograms
58 /// @{
59 BinnedHistoPtr<string> _npion;
60 string _ecms;
61 /// @}
62
63
64 };
65
66
67 RIVET_DECLARE_PLUGIN(CMD2_1999_I498859);
68
69
70}
|