Rivet analyses referenceDM1_1979_I132828Cross section for $e^+e^-\to\pi^+\pi^+\pi^-\pi^+$ between 0.89 and 1.1 GeVExperiment: DM1 (ACO) Inspire ID: 132828 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\pi^+\pi^+\pi^-\pi^+$ between 0.89 and 1.1 GeV Source code: DM1_1979_I132828.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- -> pi+pi+pi-pi-
9 class DM1_1979_I132828 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(DM1_1979_I132828);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(FinalState(), "FS");
23 // Book histograms
24 book(_npion, 1, 1, 1);
25 // extract the centre-of-mass energies
26 vector<string> energies = _npion.binning().edges<0>();
27 if (sqrtS()>=0.963 && sqrtS()<=1.002) _ecms=energies[0];
28 else if(sqrtS()>=1.008 && sqrtS()<=1.024) _ecms=energies[1];
29 else if(isCompatibleWithSqrtS(std::stod(energies[2])*MeV)) _ecms=energies[2];
30 else if(isCompatibleWithSqrtS(std::stod(energies[3])*MeV)) _ecms=energies[3];
31 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
32 }
33
34
35 /// Perform the per-event analysis
36 void analyze(const Event& event) {
37 const FinalState& fs = apply<FinalState>(event, "FS");
38 if(fs.particles().size()!=4) vetoEvent;
39 for (const Particle& p : fs.particles()) {
40 if(abs(p.pid())!=PID::PIPLUS) vetoEvent;
41 }
42 _npion->fill(_ecms);
43 }
44
45
46 /// Normalise histograms etc., after the run
47 void finalize() {
48 scale(_npion, crossSection()/ sumOfWeights() /nanobarn);
49 }
50
51 /// @}
52
53 /// @name Histograms
54 /// @{
55 BinnedHistoPtr<string> _npion;
56 string _ecms;
57 /// @}
58
59
60 };
61
62
63 RIVET_DECLARE_PLUGIN(DM1_1979_I132828);
64
65
66}
|