Rivet analyses referenceCMD3_2013_I1217420Cross section for $e^+e^-\to3(\pi^+\pi^-)$ below 2 GeV by CMD3Experiment: CMD3 (VEPP-2M) Inspire ID: 1217420 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to3(\pi^+\pi^-)$ for energies below 2 GeV by the CMD3 experiment Source code: CMD3_2013_I1217420.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- -> 3(pi+pi-)
10 class CMD3_2013_I1217420 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CMD3_2013_I1217420);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 for(unsigned int ix=0;ix<3;++ix)
29 book(_sigma[ix],1,1,1+ix);
30
31 }
32
33 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
34 for(const Particle &child : p.children()) {
35 if(child.children().empty()) {
36 --nRes[child.pid()];
37 --ncount;
38 }
39 else
40 findChildren(child,nRes,ncount);
41 }
42 }
43
44 /// Perform the per-event analysis
45 void analyze(const Event& event) {
46 // find the final-state particles
47 const FinalState& fs = apply<FinalState>(event, "FS");
48 map<long,int> nCount;
49 int ntotal(0);
50 for (const Particle& p : fs.particles()) {
51 nCount[p.pid()] += 1;
52 ++ntotal;
53 }
54 if(ntotal==6 && nCount[211]==3 && nCount[-211]==3) {
55 for(unsigned int ix=0;ix<3;++ix) _sigma[ix]->fill(round(sqrtS()/MeV));
56 }
57 }
58
59
60 /// Normalise histograms etc., after the run
61 void finalize() {
62 double fact = crossSection()/nanobarn/sumOfWeights();
63 for(unsigned int ix=0;ix<3;++ix)
64 scale(_sigma[ix],fact);
65 }
66
67 /// @}
68
69
70 /// @name Histograms
71 /// @{
72 BinnedHistoPtr<int> _sigma[3];
73 /// @}
74
75
76 };
77
78
79 RIVET_DECLARE_PLUGIN(CMD3_2013_I1217420);
80
81
82}
|