diff --git a/src/Analyses/BABAR_2013_I1116411.cc b/src/Analyses/BABAR_2013_I1116411.cc --- a/src/Analyses/BABAR_2013_I1116411.cc +++ b/src/Analyses/BABAR_2013_I1116411.cc @@ -1,83 +1,84 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/UnstableFinalState.hh" namespace Rivet { /// @brief Add a short analysis description here class BABAR_2013_I1116411 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(BABAR_2013_I1116411); /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Initialise and register projections declare(UnstableFinalState(), "UFS"); // Book histograms _h_q2 = bookHisto1D(1, 1, 1); } // Calculate the Q2 using mother and daughter charged lepton double q2(const Particle& B) { const Particle chlept = filter_select(B.children(), Cuts::pid==PID::POSITRON || Cuts::pid==PID::ANTIMUON)[0]; FourMomentum q = B.mom() - chlept.mom(); return q*q; } // Check for explicit decay into pdgids bool isSemileptonicDecay(const Particle& mother, vector<int> ids) { // Trivial check to ignore any other decays but the one in question modulo photons const Particles children = mother.children(Cuts::pid!=PID::PHOTON); if (children.size()!=ids.size()) return false; // Check for the explicit decay return all(ids, [&](int i){return count(children, hasPID(i))==1;}); } /// Perform the per-event analysis void analyze(const Event& event) { // Get B+ Mesons - foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==521)) { - if (isSemileptonicDecay(p, {223,-11,12}) || isSemileptonicDecay(p, {223,-13,14})) { + foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::BPLUS)) { + if (isSemileptonicDecay(p, {PID::OMEGA, PID::POSITRON, PID::NU_E}) || + isSemileptonicDecay(p, {PID::OMEGA, PID::ANTIMUON, PID::NU_MU})) { _h_q2->fill(q2(p), event.weight()); } } } /// Normalise histograms etc., after the run void finalize() { normalize(_h_q2, 1.21); // normalize to BF } //@} private: /// @name Histograms //@{ Histo1DPtr _h_q2; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(BABAR_2013_I1116411); } diff --git a/src/Analyses/BELLE_2011_I878990.cc b/src/Analyses/BELLE_2011_I878990.cc --- a/src/Analyses/BELLE_2011_I878990.cc +++ b/src/Analyses/BELLE_2011_I878990.cc @@ -1,81 +1,82 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/UnstableFinalState.hh" namespace Rivet { /// @brief Add a short analysis description here class BELLE_2011_I878990 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(BELLE_2011_I878990); /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Initialise and register projections declare(UnstableFinalState(), "UFS"); // Book histograms _h_q2 = bookHisto1D(1, 1, 1); } // Calculate the Q2 using mother and daugher meson double q2(const Particle& B, int mesonID) { FourMomentum q = B.mom() - filter_select(B.children(), Cuts::pid==mesonID)[0]; return q*q; } // Check for explicit decay into pdgids bool isSemileptonicDecay(const Particle& mother, vector<int> ids) { // Trivial check to ignore any other decays but the one in question modulo photons const Particles children = mother.children(Cuts::pid!=PID::PHOTON); if (children.size()!=ids.size()) return false; // Check for the explicit decay return all(ids, [&](int i){return count(children, hasPID(i))==1;}); } /// Perform the per-event analysis void analyze(const Event& event) { // Loop over B0 mesons - foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==511)) { - if (isSemileptonicDecay(p, {-211,-11,12}) || isSemileptonicDecay(p, {-211,-13,14})) { - _h_q2->fill(q2(p,-211), event.weight()); + foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::B0)) { + if (isSemileptonicDecay(p, {PID::PIMINUS, PID::POSITRON, PID::NU_E}) || + isSemileptonicDecay(p, {PID::PIMINUS, PID::ANTIMUON, PID::NU_MU})) { + _h_q2->fill(q2(p, PID::PIMINUS), event.weight()); } } } /// Normalise histograms etc., after the run void finalize() { normalize(_h_q2, 3000.86); // normalize to BF*dQ2 } //@} private: /// @name Histograms //@{ Histo1DPtr _h_q2; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(BELLE_2011_I878990); } diff --git a/src/Analyses/BELLE_2013_I1238273.cc b/src/Analyses/BELLE_2013_I1238273.cc --- a/src/Analyses/BELLE_2013_I1238273.cc +++ b/src/Analyses/BELLE_2013_I1238273.cc @@ -1,109 +1,114 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/UnstableFinalState.hh" namespace Rivet { /// @brief Add a short analysis description here class BELLE_2013_I1238273 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(BELLE_2013_I1238273); /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Initialise and register projections declare(UnstableFinalState(), "UFS"); // Book histograms _h_q2_B0bar_pi = bookHisto1D(1, 1, 1); _h_q2_B0bar_rho = bookHisto1D(3, 1, 1); _h_q2_Bminus_pi = bookHisto1D(2, 1, 1); _h_q2_Bminus_rho = bookHisto1D(4, 1, 1); _h_q2_Bminus_omega = bookHisto1D(5, 1, 1); } // Calculate the Q2 using mother and daugher meson double q2(const Particle& B, int mesonID) { FourMomentum q = B.mom() - filter_select(B.children(), Cuts::pid==mesonID)[0]; return q*q; } // Check for explicit decay into pdgids bool isSemileptonicDecay(const Particle& mother, vector<int> ids) { // Trivial check to ignore any other decays but the one in question modulo photons const Particles children = mother.children(Cuts::pid!=PID::PHOTON); if (children.size()!=ids.size()) return false; // Check for the explicit decay return all(ids, [&](int i){return count(children, hasPID(i))==1;}); } /// Perform the per-event analysis void analyze(const Event& event) { // Loop over B0bar Mesons - foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==-511)) { - if (isSemileptonicDecay(p, {211,11,-12}) || isSemileptonicDecay(p, {211,13,-14})) { - _h_q2_B0bar_pi->fill(q2(p,211), event.weight()); + foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::B0BAR)) { + if (isSemileptonicDecay(p, {PID::PIPLUS, PID::ELECTRON, PID::NU_EBAR}) || + isSemileptonicDecay(p, {PID::PIPLUS, PID::MUON, PID::NU_MUBAR})) { + _h_q2_B0bar_pi->fill(q2(p, PID::PIPLUS), event.weight()); } - if (isSemileptonicDecay(p, {213,11,-12}) || isSemileptonicDecay(p, {213,13,-14})) { - _h_q2_B0bar_rho->fill(q2(p, 213), event.weight()); + if (isSemileptonicDecay(p, {PID::RHOPLUS, PID::ELECTRON, PID::NU_EBAR}) || + isSemileptonicDecay(p, {PID::RHOPLUS, PID::MUON, PID::NU_MUBAR})) { + _h_q2_B0bar_rho->fill(q2(p, PID::RHOPLUS), event.weight()); } } // Loop over B- Mesons - foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==-521)) { - if (isSemileptonicDecay(p, {111,11,-12}) || isSemileptonicDecay(p, {111,13,-14})) { - _h_q2_Bminus_pi->fill(q2(p,111), event.weight()); + foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::BMINUS)) { + if (isSemileptonicDecay(p, {PID::PI0, PID::ELECTRON, PID::NU_EBAR}) || + isSemileptonicDecay(p, {PID::PI0, PID::MUON, PID::NU_MUBAR})) { + _h_q2_Bminus_pi->fill(q2(p, PID::PI0), event.weight()); } - if (isSemileptonicDecay(p, {113,11,-12}) || isSemileptonicDecay(p, {113,13,-14})) { - _h_q2_Bminus_rho->fill(q2(p,113), event.weight()); + if (isSemileptonicDecay(p, {PID::RHO0, PID::ELECTRON, PID::NU_EBAR}) || + isSemileptonicDecay(p, {PID::RHO0, PID::MUON, PID::NU_MUBAR})) { + _h_q2_Bminus_rho->fill(q2(p,PID::RHO0), event.weight()); } - if (isSemileptonicDecay(p, {223,11,-12}) || isSemileptonicDecay(p, {223,13,-14})) { - _h_q2_Bminus_omega->fill(q2(p,223), event.weight()); + if (isSemileptonicDecay(p, {PID::OMEGA, PID::ELECTRON, PID::NU_EBAR}) || + isSemileptonicDecay(p, {PID::OMEGA, PID::MUON, PID::NU_MUBAR})) { + _h_q2_Bminus_omega->fill(q2(p, PID::OMEGA), event.weight()); } } } /// Normalise histograms etc., after the run void finalize() { normalize(_h_q2_B0bar_pi , 298.8); // normalize to BF*dQ2 normalize(_h_q2_B0bar_rho , 1304.8); // normalize to BF*dQ2 normalize(_h_q2_Bminus_pi , 324.8); // normalize to BF*dQ2 normalize(_h_q2_Bminus_rho , 367.0); // normalize to BF*dQ2 normalize(_h_q2_Bminus_omega, 793.1); // normalize to BF*dQ2 } //@} private: /// @name Histograms //@{ Histo1DPtr _h_q2_B0bar_pi ; Histo1DPtr _h_q2_B0bar_rho ; Histo1DPtr _h_q2_Bminus_pi ; Histo1DPtr _h_q2_Bminus_rho ; Histo1DPtr _h_q2_Bminus_omega; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(BELLE_2013_I1238273); } diff --git a/src/Analyses/BELLE_2015_I1397632.cc b/src/Analyses/BELLE_2015_I1397632.cc --- a/src/Analyses/BELLE_2015_I1397632.cc +++ b/src/Analyses/BELLE_2015_I1397632.cc @@ -1,98 +1,98 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/UnstableFinalState.hh" namespace Rivet { /// @brief Add a short analysis description here class BELLE_2015_I1397632 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(BELLE_2015_I1397632); /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Initialise and register projections declare(UnstableFinalState(), "UFS"); // Book histograms _h_B_Denu = bookHisto1D(1, 1, 1); _h_B_Dmunu = bookHisto1D(1, 1, 2); _h_B_Deplusnu = bookHisto1D(1, 1, 3); _h_B_Dmuplusnu = bookHisto1D(1, 1, 4); } // Check for explicit decay into pdgids bool isSemileptonicDecay(const Particle& mother, vector<int> ids) { // Trivial check to ignore any other decays but the one in question modulo photons const Particles children = mother.children(Cuts::pid!=PID::PHOTON); if (children.size()!=ids.size()) return false; // Check for the explicit decay return all(ids, [&](int i){return count(children, hasPID(i))==1;}); } // Calculate the recoil w using mother and daugher meson double recoilW(const Particle& B, int mesonID) { // TODO why does that not work with const? Particle D = filter_select(B.children(), Cuts::pid==mesonID)[0]; FourMomentum q = B.mom() - D.mom(); return (B.mom()*B.mom() + D.mom()*D.mom() - q*q )/ (2. * sqrt(B.mom()*B.mom()) * sqrt(D.mom()*D.mom()) ); } /// Perform the per-event analysis void analyze(const Event& event) { // Get B0 Mesons - foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==511)) { - if (isSemileptonicDecay(p, {-411,-11,12})) _h_B_Denu->fill( recoilW(p, -411), event.weight()); - if (isSemileptonicDecay(p, {-411,-13,14})) _h_B_Dmunu->fill(recoilW(p, -411), event.weight()); + foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::B0)) { + if (isSemileptonicDecay(p, {PID::DMINUS,PID::POSITRON,PID::NU_E})) _h_B_Denu->fill( recoilW(p, PID::DMINUS), event.weight()); + if (isSemileptonicDecay(p, {PID::DMINUS,PID::ANTIMUON,PID::NU_MU})) _h_B_Dmunu->fill(recoilW(p, PID::DMINUS), event.weight()); } // Get B+ Mesons - foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==521)) { - if (isSemileptonicDecay(p, {-421,-11,12})) _h_B_Deplusnu->fill( recoilW(p, -421), event.weight()); - if (isSemileptonicDecay(p, {-421,-13,14})) _h_B_Dmuplusnu->fill(recoilW(p, -421), event.weight()); + foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::BPLUS)) { + if (isSemileptonicDecay(p, {PID::D0BAR,PID::POSITRON,PID::NU_E})) _h_B_Deplusnu->fill( recoilW(p, PID::D0BAR), event.weight()); + if (isSemileptonicDecay(p, {PID::D0BAR,PID::ANTIMUON,PID::NU_MU})) _h_B_Dmuplusnu->fill(recoilW(p, PID::D0BAR), event.weight()); } } /// Normalise histograms etc., after the run void finalize() { normalize(_h_B_Denu); normalize(_h_B_Dmunu); normalize(_h_B_Deplusnu); normalize(_h_B_Dmuplusnu); } //@} private: /// @name Histograms //@{ Histo1DPtr _h_B_Denu; Histo1DPtr _h_B_Dmunu; Histo1DPtr _h_B_Deplusnu; Histo1DPtr _h_B_Dmuplusnu; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(BELLE_2015_I1397632); }