rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2006_I722905

Kinematic distributions in the decays $D^0\to K^\mp\pi^\pm\pi^0$
Experiment: BABAR (PEP-II)
Inspire ID: 722905
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 97 (2006) 221803
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing D0

Kinematic distributions in the decays $D^0\to K^\mp\pi^\pm\pi^0$. Data read from plots

Source code: BABAR_2006_I722905.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- pi+ pi0 (or CC)
10  class BABAR_2006_I722905 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2006_I722905);
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<2;++ix)
33	book(_h[ix],1+ix,1,1);
34    }
35
36
37    /// Perform the per-event analysis
38    void analyze(const Event& event) {
39      static const map<PdgId,unsigned int> & mode   = { {-321,1},{ 211,1}, {111,1}};
40      static const map<PdgId,unsigned int> & modeCC = { { 321,1},{-211,1}, {111,1}};
41      DecayedParticles D0 = apply<DecayedParticles>(event, "D0");
42      // loop over particles
43      for(unsigned int ix=0;ix<D0.decaying().size();++ix) {
44	int sign = 1;
45	if (D0.modeMatches(ix,3,mode)) {
46	  sign = 1;
47	}
48	else if  (D0.modeMatches(ix,3,modeCC)) {
49	  sign =-1;
50	}
51	else
52	  continue;
53	const Particle & pi0= D0.decayProducts()[ix].at(111)[0];
54	const Particle & Km = D0.decayProducts()[ix].at(-sign*321)[0];
55	double m2 = (pi0.momentum()+Km.momentum()).mass2();
56	if( (D0.decaying()[ix].pid()>0 && sign==  1) ||
57	    (D0.decaying()[ix].pid()<0 && sign== -1) )
58	  _h[0]->fill(m2);
59	else
60	  _h[1]->fill(m2);
61      }
62    }
63
64
65    /// Normalise histograms etc., after the run
66    void finalize() {
67      for(unsigned int ix=0;ix<2;++ix)
68	normalize(_h[ix]);
69    }
70
71    /// @}
72
73
74    /// @name Histograms
75    /// @{
76    Histo1DPtr _h[2];
77    /// @}
78
79
80  };
81
82
83  RIVET_DECLARE_PLUGIN(BABAR_2006_I722905);
84
85}