BELLE_2013_I1238273.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/UnstableFinalState.hh" 00004 00005 namespace Rivet { 00006 00007 00008 /// @brief Add a short analysis description here 00009 class BELLE_2013_I1238273 : public Analysis { 00010 public: 00011 00012 /// Constructor 00013 DEFAULT_RIVET_ANALYSIS_CTOR(BELLE_2013_I1238273); 00014 00015 00016 /// @name Analysis methods 00017 //@{ 00018 00019 /// Book histograms and initialise projections before the run 00020 void init() { 00021 00022 // Initialise and register projections 00023 declare(UnstableFinalState(), "UFS"); 00024 00025 // Book histograms 00026 _h_q2_B0bar_pi = bookHisto1D(1, 1, 1); 00027 _h_q2_B0bar_rho = bookHisto1D(3, 1, 1); 00028 _h_q2_Bminus_pi = bookHisto1D(2, 1, 1); 00029 _h_q2_Bminus_rho = bookHisto1D(4, 1, 1); 00030 _h_q2_Bminus_omega = bookHisto1D(5, 1, 1); 00031 00032 } 00033 00034 // Calculate the Q2 using mother and daugher meson 00035 double q2(const Particle& B, int mesonID) { 00036 FourMomentum q = B.mom() - filter_select(B.children(), Cuts::pid==mesonID)[0]; 00037 return q*q; 00038 } 00039 00040 // Check for explicit decay into pdgids 00041 bool isSemileptonicDecay(const Particle& mother, vector<int> ids) { 00042 // Trivial check to ignore any other decays but the one in question modulo photons 00043 const Particles children = mother.children(Cuts::pid!=PID::PHOTON); 00044 if (children.size()!=ids.size()) return false; 00045 // Check for the explicit decay 00046 return all(ids, [&](int i){return count(children, hasPID(i))==1;}); 00047 } 00048 00049 /// Perform the per-event analysis 00050 void analyze(const Event& event) { 00051 // Loop over B0bar Mesons 00052 foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::B0BAR)) { 00053 if (isSemileptonicDecay(p, {PID::PIPLUS, PID::ELECTRON, PID::NU_EBAR}) || 00054 isSemileptonicDecay(p, {PID::PIPLUS, PID::MUON, PID::NU_MUBAR})) { 00055 _h_q2_B0bar_pi->fill(q2(p, PID::PIPLUS), event.weight()); 00056 } 00057 if (isSemileptonicDecay(p, {PID::RHOPLUS, PID::ELECTRON, PID::NU_EBAR}) || 00058 isSemileptonicDecay(p, {PID::RHOPLUS, PID::MUON, PID::NU_MUBAR})) { 00059 _h_q2_B0bar_rho->fill(q2(p, PID::RHOPLUS), event.weight()); 00060 } 00061 } 00062 // Loop over B- Mesons 00063 foreach(const Particle& p, apply<UnstableFinalState>(event, "UFS").particles(Cuts::pid==PID::BMINUS)) { 00064 if (isSemileptonicDecay(p, {PID::PI0, PID::ELECTRON, PID::NU_EBAR}) || 00065 isSemileptonicDecay(p, {PID::PI0, PID::MUON, PID::NU_MUBAR})) { 00066 _h_q2_Bminus_pi->fill(q2(p, PID::PI0), event.weight()); 00067 } 00068 if (isSemileptonicDecay(p, {PID::RHO0, PID::ELECTRON, PID::NU_EBAR}) || 00069 isSemileptonicDecay(p, {PID::RHO0, PID::MUON, PID::NU_MUBAR})) { 00070 _h_q2_Bminus_rho->fill(q2(p,PID::RHO0), event.weight()); 00071 } 00072 if (isSemileptonicDecay(p, {PID::OMEGA, PID::ELECTRON, PID::NU_EBAR}) || 00073 isSemileptonicDecay(p, {PID::OMEGA, PID::MUON, PID::NU_MUBAR})) { 00074 _h_q2_Bminus_omega->fill(q2(p, PID::OMEGA), event.weight()); 00075 } 00076 } 00077 } 00078 00079 00080 /// Normalise histograms etc., after the run 00081 void finalize() { 00082 00083 normalize(_h_q2_B0bar_pi , 298.8); // normalize to BF*dQ2 00084 normalize(_h_q2_B0bar_rho , 1304.8); // normalize to BF*dQ2 00085 normalize(_h_q2_Bminus_pi , 324.8); // normalize to BF*dQ2 00086 normalize(_h_q2_Bminus_rho , 367.0); // normalize to BF*dQ2 00087 normalize(_h_q2_Bminus_omega, 793.1); // normalize to BF*dQ2 00088 00089 } 00090 00091 //@} 00092 00093 00094 private: 00095 00096 00097 /// @name Histograms 00098 //@{ 00099 Histo1DPtr _h_q2_B0bar_pi ; 00100 Histo1DPtr _h_q2_B0bar_rho ; 00101 Histo1DPtr _h_q2_Bminus_pi ; 00102 Histo1DPtr _h_q2_Bminus_rho ; 00103 Histo1DPtr _h_q2_Bminus_omega; 00104 //@} 00105 00106 00107 }; 00108 00109 00110 // The hook for the plugin system 00111 DECLARE_RIVET_PLUGIN(BELLE_2013_I1238273); 00112 00113 00114 } Generated on Tue Dec 13 2016 16:32:36 for The Rivet MC analysis system by ![]() |