Rivet analyses referenceBABAR_2015_I1334693Exclusive semileptonic D0 to piminus decays.Experiment: BABAR (PEP-II) Inspire ID: 1334693 Status: VALIDATED Authors:
Beams: * * Beam energies: ANY Run details:
Implementation of Lorentz invariant q2 distributions ("form factor") for semileptonic D0 decays Source code: BABAR_2015_I1334693.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class BABAR_2015_I1334693 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2015_I1334693);
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
25 // Book histograms
26 book(_h_q2 ,1, 1, 1);
27
28 }
29
30
31 // Calculate the Q2 using mother and daugher meson
32 double q2(const Particle& B, int mesonID) {
33 FourMomentum q = B.mom() - select(B.children(), Cuts::pid==mesonID)[0];
34 return q*q;
35 }
36
37 // Check for explicit decay into pdgids
38 bool isSemileptonicDecay(const Particle& mother, vector<int> ids) {
39 // Trivial check to ignore any other decays but the one in question modulo photons
40 const Particles children = mother.children(Cuts::pid!=PID::PHOTON);
41 if (children.size()!=ids.size()) return false;
42 // Check for the explicit decay
43 return all(ids, [&](int i){return count(children, hasPID(i))==1;});
44 }
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 // Loop over D0 mesons
49 for(const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::pid==PID::D0)) {
50 if (isSemileptonicDecay(p, {PID::PIMINUS, PID::POSITRON, PID::NU_E})) {
51 _h_q2->fill(q2(p, PID::PIMINUS));
52 }
53 }
54 }
55
56
57 /// Normalise histograms etc., after the run
58 void finalize() {
59
60 normalize(_h_q2, 375.4*0.3); // normalize to data
61
62 }
63
64 /// @}
65
66
67 private:
68
69
70 /// @name Histograms
71 /// @{
72 Histo1DPtr _h_q2;
73 /// @}
74
75
76 };
77
78
79 RIVET_DECLARE_PLUGIN(BABAR_2015_I1334693);
80
81
82}
|