Rivet analyses referenceCLEOC_2008_I779705Mass distributions in $D^0\to\eta\pi^+\pi^-$ decaysExperiment: CLEOC (CESR) Inspire ID: 779705 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of mass distributions in $D^0\to\eta\pi^+\pi^-$ decays by the CLEO experiment. Source code: CLEOC_2008_I779705.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/DecayedParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief D0 -> eta pi+pi- decays
10 class CLEOC_2008_I779705 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CLEOC_2008_I779705);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 UnstableParticles ufs = UnstableParticles(Cuts::abspid==421);
24 declare(ufs, "UFS");
25 DecayedParticles D0(ufs);
26 D0.addStable(PID::PI0);
27 D0.addStable(PID::K0S);
28 D0.addStable(PID::ETA);
29 D0.addStable(PID::ETAPRIME);
30 declare(D0, "D0");
31 // histograms
32 book(_h_eta_pi,1,1,1);
33 book(_h_pi_pi ,1,1,2);
34 }
35
36 /// Perform the per-event analysis
37 void analyze(const Event& event) {
38 static const map<PdgId,unsigned int> & mode = { { 211,1},{-211,1}, {221,1}};
39 DecayedParticles D0 = apply<DecayedParticles>(event, "D0");
40 // loop over particles
41 for(unsigned int ix=0;ix<D0.decaying().size();++ix) {
42 if( !D0.modeMatches(ix,3,mode) ) continue;
43 int sign = D0.decaying()[ix].pid()/421;
44 const Particles & eta = D0.decayProducts()[ix].at(221);
45 const Particles & pip = D0.decayProducts()[ix].at( sign*211);
46 const Particles & pim = D0.decayProducts()[ix].at(-sign*211);
47 _h_eta_pi->fill((pip[0].momentum()+eta[0].momentum()).mass());
48 _h_pi_pi ->fill((pip[0].momentum()+pim[0].momentum()).mass());
49 }
50 }
51
52
53 /// Normalise histograms etc., after the run
54 void finalize() {
55 normalize(_h_eta_pi);
56 normalize(_h_pi_pi );
57 }
58
59 /// @}
60
61
62 /// @name Histograms
63 /// @{
64 Histo1DPtr _h_eta_pi,_h_pi_pi;
65 /// @}
66
67
68 };
69
70
71 RIVET_DECLARE_PLUGIN(CLEOC_2008_I779705);
72
73}
|