Rivet analyses referenceKLOE_2008_I791841Cross section for $\pi^+\pi^-2\pi^0$ and $2\pi^0\gamma$ near the $\phi$ massExperiment: KLOE (DAPHNE) Inspire ID: 791841 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $\pi^+\pi^-2\pi^0$ and $2\pi^0\gamma$ near the $\phi$ mass Source code: KLOE_2008_I791841.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class KLOE_2008_I791841 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(KLOE_2008_I791841);
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(_n4pi, "TMP/4pi");
24 book(_n2pigamma, "TMP/2pigamma");
25 }
26
27
28 /// Perform the per-event analysis
29 void analyze(const Event& event) {
30 const FinalState& fs = apply<FinalState>(event, "FS");
31
32 map<long,int> nCount;
33 for (const Particle& p : fs.particles()) {
34 nCount[p.pid()] += 1;
35 }
36 if (nCount[111]==2) {
37 if( nCount[211] == 1 && nCount[-211] == 1 ) {
38 _n4pi->fill();
39 }
40 else if( nCount[22] == 1) {
41 _n2pigamma->fill();
42 }
43 }
44 }
45
46
47 /// Normalise histograms etc., after the run
48 void finalize() {
49 for (unsigned int ix=1;ix<3;++ix) {
50 double sigma = 0., error = 0.;
51 if(ix==1) {
52 sigma = _n4pi->val();
53 error = _n4pi->err();
54 }
55 else if(ix==2) {
56 sigma = _n2pigamma->val();
57 error = _n2pigamma->err();
58 }
59 sigma *= crossSection()/ sumOfWeights() /nanobarn;
60 error *= crossSection()/ sumOfWeights() /nanobarn;
61 Estimate1DPtr mult;
62 book(mult, ix, 1, 1);
63 for (auto& b : mult->bins()) {
64 if (inRange(sqrtS()/MeV, b.xMin(), b.xMax())) {
65 b.set(sigma, error);
66 }
67 }
68 }
69 }
70
71 /// @}
72
73
74 /// @name Histograms
75 /// @{
76 CounterPtr _n4pi,_n2pigamma;
77 /// @}
78
79
80 };
81
82
83 RIVET_DECLARE_PLUGIN(KLOE_2008_I791841);
84
85
86}
|