Rivet analyses referenceFOCUS_2004_I663820Mass distributions in the decay $D^0\to K^+K^-\pi^+\pi^-$Experiment: FOCUS (Fermilab) Inspire ID: 663820 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY
Measurement of the mass distributions in the decay $D^0\to K^+K^-\pi^+\pi^-$ by FOCUS. The data were read from the plots in the paper and therefore for some points the error bars are the size of the point. It is also not clear that any resolution effects have been unfolded. Source code: FOCUS_2004_I663820.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 -> K+ K- pi+ pi-
10 class FOCUS_2004_I663820 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(FOCUS_2004_I663820);
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 for(unsigned int ix=0;ix<4;++ix)
33 book(_h[ix],1,1,1+ix);
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 // define the decay mode
40 static const map<PdgId,unsigned int> & mode = { { 321,1},{ -321,1}, { 211,1}, { -211,1}};
41 DecayedParticles D0 = apply<DecayedParticles>(event, "D0");
42 // loop over particles
43 for(unsigned int ix=0;ix<D0.decaying().size();++ix) {
44 if ( !D0.modeMatches(ix,4,mode)) continue;
45 int sign = D0.decaying()[ix].pid()/421;
46 const Particles & Kp = D0.decayProducts()[ix].at( sign*321);
47 const Particles & Km = D0.decayProducts()[ix].at(-sign*321);
48 const Particles & pip= D0.decayProducts()[ix].at( sign*211);
49 const Particles & pim= D0.decayProducts()[ix].at(-sign*211);
50 _h[0]->fill((Kp [0].momentum()+Km [0].momentum()).mass());
51 _h[1]->fill((pip[0].momentum()+pim[0].momentum()).mass());
52 _h[2]->fill((Kp [0].momentum()+pim[0].momentum()).mass());
53 _h[2]->fill((Km [0].momentum()+pip[0].momentum()).mass());
54 _h[3]->fill((Kp [0].momentum()+pip[0].momentum()).mass());
55 _h[3]->fill((Km [0].momentum()+pim[0].momentum()).mass());
56 }
57 }
58
59
60 /// Normalise histograms etc., after the run
61 void finalize() {
62 for(unsigned int ix=0;ix<4;++ix)
63 normalize(_h[ix],1.,false);
64 }
65
66 /// @}
67
68
69 /// @name Histograms
70 /// @{
71 Histo1DPtr _h[4];
72 /// @}
73
74
75 };
76
77
78 RIVET_DECLARE_PLUGIN(FOCUS_2004_I663820);
79
80}
|