Rivet analyses referenceKLOE_2002_I585183Mass spectrum of $\pi^0\pi^0$ in $\phi\to\pi^0\pi^0\gamma$ decaysExperiment: KLOE (DAPHNE) Inspire ID: 585183 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Mass spectra for $\pi^0\pi^0$ in $\phi$ decays to $\pi^0\pi^0\gamma$ measured by KLOE. Source code: KLOE_2002_I585183.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief phi -> pi0 pi0 gamma
9 class KLOE_2002_I585183 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(KLOE_2002_I585183);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 declare(UnstableParticles(), "UFS");
22 book(_h_pipi, 1, 1, 1);
23 book(_nPhi,"TMP/nPhi");
24 }
25
26 void findDecayProducts(const Particle & mother, unsigned int & nstable,
27 unsigned int & npi,
28 unsigned int & ngamma, FourMomentum & ptot) {
29 for(const Particle & p : mother.children()) {
30 int id = p.pid();
31 if (id == PID::PI0) {
32 ++npi;
33 ++nstable;
34 ptot += p.momentum();
35 }
36 else if (id == PID::GAMMA) {
37 ++ngamma;
38 ++nstable;
39 }
40 else if (id == PID::PIPLUS || id == PID::PIMINUS) {
41 ++nstable;
42 }
43 else if ( !p.children().empty() ) {
44 findDecayProducts(p, nstable, npi, ngamma, ptot);
45 }
46 else
47 ++nstable;
48 }
49 }
50
51 /// Perform the per-event analysis
52 void analyze(const Event& event) {
53
54 // Loop over phis
55 for(const Particle& phi : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==PID::PHI)) {
56 _nPhi->fill();
57 unsigned int nstable(0),npi(0),ngamma(0);
58 FourMomentum p_tot(0,0,0,0);
59 findDecayProducts(phi, nstable, npi, ngamma, p_tot);
60 if(nstable!=3) continue;
61 if(npi==2 && ngamma==1 ) {
62 _h_pipi->fill(p_tot.mass()/MeV);
63 }
64 }
65
66 }
67
68
69 /// Normalise histograms etc., after the run
70 void finalize() {
71
72 scale( _h_pipi, 1./ *_nPhi);
73
74 }
75
76 /// @}
77
78
79 /// @name Histograms
80 /// @{
81 Histo1DPtr _h_pipi;
82 CounterPtr _nPhi;
83 /// @}
84
85
86 };
87
88
89 RIVET_DECLARE_PLUGIN(KLOE_2002_I585183);
90
91
92}
|