rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2015_I1401225

Mass distributions in the decay $D^0\to K^-\pi^+\mu^+\mu^-$
Experiment: LHCB (LHC)
Inspire ID: 1401225
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Lett.B 757 (2016) 558-567
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: LHCB_2015_I1401225.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 
10  class LHCB_2015_I1401225 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2015_I1401225);
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    }
32
33
34    /// Perform the per-event analysis
35    void analyze(const Event& event) {
36      static const map<PdgId,unsigned int> & mode   = { { 321,1}, { 211,1}, {13,1}, {-13,1} };
37      static const map<PdgId,unsigned int> & modeCC = { { 321,1}, {-211,1}, {13,1}, {-13,1} };
38      DecayedParticles D0 = apply<DecayedParticles>(event, "D0");
39      // loop over particles
40      for(unsigned int ix=0;ix<D0.decaying().size();++ix) {
41	int sign = 1;
42	if (D0.decaying()[ix].pid()>0 && D0.modeMatches(ix,4,mode)) {
43	  sign=1;
44	}
45	else if  (D0.decaying()[ix].pid()<0 && D0.modeMatches(ix,4,modeCC)) {
46	  sign=-1;
47	}
48	else
49	  continue;
50       	const Particle & Kp = D0.decayProducts()[ix].at(-sign*321)[0];
51      	const Particle & pim= D0.decayProducts()[ix].at( sign*211)[0];
52      	const Particle & mup= D0.decayProducts()[ix].at( 13)[0];
53      	const Particle & mum= D0.decayProducts()[ix].at(-13)[0];
54	_h[0]->fill((Kp.momentum()+pim.momentum()).mass()/MeV);
55	_h[1]->fill((mum.momentum()+mup.momentum()).mass()/MeV);
56      }
57    }
58
59
60    /// Normalise histograms etc., after the run
61    void finalize() {
62      for(unsigned int ix=0;ix<2;++ix)
63	normalize(_h[ix],1.,false);
64    }
65
66    /// @}
67
68
69    /// @name Histograms
70    /// @{
71    Histo1DPtr _h[2];
72    /// @}
73
74
75  };
76
77
78  RIVET_DECLARE_PLUGIN(LHCB_2015_I1401225);
79
80}