Rivet analyses referenceBABAR_2017_I1621593$e^+e^-\to \pi^+\pi^-\pi^0\pi^0$ cross section from 0.85 to 4.5 GeVExperiment: BABAR (PEP-II) Inspire ID: 1621593 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to \pi^+\pi^-\pi^0\pi^0$ between 0.85 to 4.5 GeV using radiative return. Source code: BABAR_2017_I1621593.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/FinalState.hh"
5
6
7namespace Rivet {
8
9
10 /// @brief e+e- > pi+ pi- 2pi0 (including omega)
11 class BABAR_2017_I1621593 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2017_I1621593);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23
24 // Initialise and register projections
25 declare(FinalState(), "FS");
26 declare(UnstableParticles(), "UFS");
27 for(unsigned int ix=0;ix<2;++ix)
28 book(_mult[ix], "TMP/mult_"+toString(ix), refData(1+ix, 1, 1));
29 }
30
31
32 /// Perform the per-event analysis
33 void analyze(const Event& event) {
34 const FinalState& fs = apply<FinalState>(event, "FS");
35
36 map<long,int> nCount;
37 int ntotal(0);
38 for (const Particle& p : fs.particles()) {
39 nCount[p.pid()] += 1;
40 ++ntotal;
41 }
42 if(ntotal!=4) vetoEvent;
43 if(nCount[-211]==1&&nCount[211]==1&&nCount[111]==2) {
44 _mult[0]->fill(sqrtS()/GeV);
45 const FinalState& ufs = apply<FinalState>(event, "UFS");
46 if (!ufs.particles(Cuts::pid==223).empty()) {
47 _mult[1]->fill(sqrtS()/GeV);
48 }
49 }
50
51 }
52
53
54 /// Normalise histograms etc., after the run
55 void finalize() {
56 double fact = crossSection()/ sumOfWeights() /nanobarn;
57 for(size_t ix=0;ix<2;++ix) {
58 scale(_mult[ix],fact);
59 Estimate1DPtr tmp;
60 book(tmp,1+ix,1,1);
61 barchart(_mult[ix],tmp);
62 }
63 }
64
65 /// @}
66
67 /// @name Histograms
68 /// @{
69 Histo1DPtr _mult[2];
70 /// @}
71
72
73 };
74
75
76 RIVET_DECLARE_PLUGIN(BABAR_2017_I1621593);
77
78
79}
|