rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2019_I1691954

Mass distributions in the decay $D^0\to K^-\pi^+e^+e^-$
Experiment: BABAR (PEP-II)
Inspire ID: 1691954
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 122 (2019) 8, 081802
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing D0

Kinematic distributions in the decay $D^0\to K^-\pi^+e^+e^-$. Resolution/acceptance effects have been not unfolded.

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