Rivet analyses referenceCMD2_2000_I531667Cross section for $e^+e^-\to\pi^+\pi^+\pi^-\pi^+$ hear the $\phi$ massExperiment: CMD2 (VEPP-2M) Inspire ID: 531667 Status: VALIDATED Authors:
Beam energies: (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); (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); (0.5, 0.5); (0.5, 0.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to\pi^+\pi^+\pi^-\pi^+$ hear the $\phi$ mass. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: CMD2_2000_I531667.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- > 2pi+ 2pi-
9 class CMD2_2000_I531667 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CMD2_2000_I531667);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
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)*GeV;
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()!=4) 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_2000_I531667);
68
69
70}
|