Rivet analyses referenceBABAR_2013_I1116411Semi-leptonic $B^+\to\omega\ell^+\nu_\ell$Experiment: BABAR (PEP-II) Inspire ID: 1116411 Status: VALIDATED Authors:
Beams: * * Beam energies: ANY Run details:
Implementation of Lorentz invariant $q^2$ distributions ("form factor") for semileptonic $B^+$ decays. Source code: BABAR_2013_I1116411.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief B+ -> omega l+ nu_l
9 class BABAR_2013_I1116411 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2013_I1116411);
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 // Calculate the Q2 using mother and daughter charged lepton
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 // Get B+ Mesons
48 for(const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::pid==PID::BPLUS)) {
49 if (isSemileptonicDecay(p, {PID::OMEGA, PID::POSITRON, PID::NU_E}) ||
50 isSemileptonicDecay(p, {PID::OMEGA, PID::ANTIMUON, PID::NU_MU})) {
51 _h_q2->fill(q2(p,PID::OMEGA));
52 }
53 }
54 }
55
56
57 /// Normalise histograms etc., after the run
58 void finalize() {
59
60 normalize(_h_q2, 1.21); // normalize to BF
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_2013_I1116411);
80
81
82}
|