Rivet analyses referenceCLEOC_2011_I875526$q^2$ spectra in semi-leptonic $D^+\to\eta$ decaysExperiment: CLEOC (CESR) Inspire ID: 875526 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the $q^2$ spectra for semi-leptonic $D^+\to\eta$ meson decays by CLEOC. Source code: CLEOC_2011_I875526.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief D -> eta semi-leptonic q^2
9 class CLEOC_2011_I875526 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEOC_2011_I875526);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(UnstableParticles(), "UFS");
24 // histograms
25 book(_h_q2_Dp_eta_A,1,1,1);
26 book(_h_q2_Dp_eta_B,1,1,2);
27 book(_nDp,"TMP/nDp");
28 }
29
30 // Calculate the Q2 using mother and daugher meson
31 double q2(const Particle& B, int mesonID) {
32 FourMomentum q = B.mom() - select(B.children(), Cuts::pid==mesonID)[0];
33 return q*q;
34 }
35
36 // Check for explicit decay into pdgids
37 bool isSemileptonicDecay(const Particle& mother, vector<int> ids) {
38 // Trivial check to ignore any other decays but the one in question modulo photons
39 const Particles children = mother.children(Cuts::pid!=PID::PHOTON);
40 if (children.size()!=ids.size()) return false;
41 // Check for the explicit decay
42 return all(ids, [&](int i){return count(children, hasPID(i))==1;});
43 }
44
45 /// Perform the per-event analysis
46 void analyze(const Event& event) {
47 // Loop over D mesons
48 for(const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==PID::DPLUS )) {
49 _nDp->fill();
50 if(isSemileptonicDecay(p, {PID::ETA, PID::POSITRON, PID::NU_E}) ||
51 isSemileptonicDecay(p, {PID::ETA, PID::ELECTRON, PID::NU_EBAR})) {
52 double q = q2(p, PID::ETA);
53 _h_q2_Dp_eta_A->fill(q);
54 _h_q2_Dp_eta_B->fill(q);
55 }
56 }
57 }
58
59
60 /// Normalise histograms etc., after the run
61 void finalize() {
62 scale(_h_q2_Dp_eta_A, 1./ *_nDp);
63 scale(_h_q2_Dp_eta_B, 1./ *_nDp);
64 }
65
66 /// @}
67
68
69 /// @name Histograms
70 /// @{
71 Histo1DPtr _h_q2_Dp_eta_A,_h_q2_Dp_eta_B;
72 CounterPtr _nD0,_nDp;
73 /// @}
74
75
76 };
77
78
79 RIVET_DECLARE_PLUGIN(CLEOC_2011_I875526);
80
81}
|