#include <TauDataFormat/TauNtuple/src/TauDecay_CMSSW.cc>
Public Types | |
enum | JAK { JAK_UNKNOWN = 0, JAK_ELECTRON = 1, JAK_MUON = 2, JAK_PION = 3, JAK_RHO_PIPI0 = 4, JAK_A1_3PI = 5, JAK_KAON = 6, JAK_KSTAR = 7, JAK_3PIPI0 = 8, JAK_PI3PI0 = 9, JAK_3PI2PI0 = 10, JAK_5PI = 11, JAK_5PIPI0 = 12, JAK_3PI3PI0 = 13, JAK_KPIK = 14, JAK_K0BK0PI = 15, JAK_KK0BPI0 = 16, JAK_K2PI0 = 17, JAK_KPIPI = 18, JAK_PIK0PI0 = 19, JAK_ETAPIPI0 = 20, JAK_PIPI0GAM = 21, JAK_KK0B = 22 } |
enum | TauDecayStructure { other = 0, OneProng = 1, ThreeProng = 2, FiveProng = 4, OnePi0 = 8, TwoPi0 = 32, ThreePi0 = 64, Res_a1_pm = 128, Res_a1_0 = 256, Res_rho_pm = 512, Res_rho_0 = 1024, Res_eta = 2048, Res_omega = 4096, Res_Kstar_pm = 8192, Res_Kstar_0 = 16384, KS0_to_pipi = 32768 } |
Public Member Functions | |
void | ClassifyDecayMode (unsigned int &JAK_ID, unsigned int &TauBitMask) |
bool | isTauFinalStateParticle (int pdgid) |
bool | isTauParticleCounter (int pdgid) |
bool | isTauResonanceCounter (int pdgid) |
unsigned int | nPi0 (unsigned int &TauBitMask) |
unsigned int | nProng (unsigned int &TauBitMask) |
void | Reset () |
TauDecay () | |
~TauDecay () | |
Private Member Functions | |
void | ClassifyDecayResonance (unsigned int &TauBitMask) |
Private Attributes | |
unsigned int | n_a1 |
unsigned int | n_a10 |
unsigned int | n_e |
unsigned int | n_eta |
unsigned int | n_gamma |
unsigned int | n_K |
unsigned int | n_K0L |
unsigned int | n_K0S |
unsigned int | n_Kstar |
unsigned int | n_Kstar0 |
unsigned int | n_mu |
unsigned int | n_nu |
unsigned int | n_omega |
unsigned int | n_pi |
unsigned int | n_pi0 |
unsigned int | n_rho |
unsigned int | n_rho0 |
unsigned int | unknown |
Description: This class reconstructs the JAK modes of the Tauola decays and provides a bit mask of the decay structure for the tau
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 23 of file TauDecay.h.
enum TauDecay::JAK |
Definition at line 51 of file TauDecay.h.
{JAK_UNKNOWN=0, JAK_ELECTRON=1, JAK_MUON=2, JAK_PION=3, JAK_RHO_PIPI0=4, JAK_A1_3PI=5, JAK_KAON=6, JAK_KSTAR=7, JAK_3PIPI0=8, JAK_PI3PI0=9, JAK_3PI2PI0=10, JAK_5PI=11, JAK_5PIPI0=12, JAK_3PI3PI0=13, JAK_KPIK=14, JAK_K0BK0PI=15, JAK_KK0BPI0=16, JAK_K2PI0=17, JAK_KPIPI=18, JAK_PIK0PI0=19, JAK_ETAPIPI0=20, JAK_PIPI0GAM=21, JAK_KK0B=22 };
other | |
OneProng | |
ThreeProng | |
FiveProng | |
OnePi0 | |
TwoPi0 | |
ThreePi0 | |
Res_a1_pm | |
Res_a1_0 | |
Res_rho_pm | |
Res_rho_0 | |
Res_eta | |
Res_omega | |
Res_Kstar_pm | |
Res_Kstar_0 | |
KS0_to_pipi |
Definition at line 77 of file TauDecay.h.
{other=0, OneProng=1, ThreeProng=2, FiveProng=4, OnePi0=8, TwoPi0=32, ThreePi0=64, Res_a1_pm=128, Res_a1_0=256, Res_rho_pm=512, Res_rho_0=1024, Res_eta=2048, Res_omega=4096, Res_Kstar_pm=8192, Res_Kstar_0=16384, KS0_to_pipi=32768 };
TauDecay::TauDecay | ( | ) |
TauDecay::~TauDecay | ( | ) |
Definition at line 13 of file TauDecay.cc.
{ }
void TauDecay::ClassifyDecayMode | ( | unsigned int & | JAK_ID, |
unsigned int & | TauBitMask | ||
) |
Definition at line 88 of file TauDecay.cc.
References ClassifyDecayResonance(), gather_cfg::cout, FiveProng, JAK_3PI2PI0, JAK_3PI3PI0, JAK_3PIPI0, JAK_5PI, JAK_5PIPI0, JAK_A1_3PI, JAK_ELECTRON, JAK_ETAPIPI0, JAK_K0BK0PI, JAK_K2PI0, JAK_KAON, JAK_KK0B, JAK_KK0BPI0, JAK_KPIK, JAK_KPIPI, JAK_KSTAR, JAK_MUON, JAK_PI3PI0, JAK_PIK0PI0, JAK_PION, JAK_PIPI0GAM, JAK_RHO_PIPI0, JAK_UNKNOWN, KS0_to_pipi, n_e, n_eta, n_gamma, n_K, n_K0L, n_K0S, n_mu, n_nu, n_pi, n_pi0, n_rho, OnePi0, OneProng, ThreePi0, ThreeProng, and TwoPi0.
Referenced by TauDecay_CMSSW::AnalyzeTau().
{ //Reset Bits JAK_ID=0; TauBitMask=0; // Classify according to JAK and TauDecayStructure // // Exlusive modes remove first // if(n_pi>=1 && n_pi0>=1 && n_nu==1 && n_eta==1){ // eta modes JAK_ID=JAK_ETAPIPI0; TauBitMask=OneProng; if(n_pi0==1)TauBitMask+=OnePi0; if(n_pi0==2)TauBitMask+=TwoPi0; if(n_pi0==3)TauBitMask+=ThreePi0; ClassifyDecayResonance(TauBitMask); return; } //JAK_K0BK0PI if ((n_K0S+n_K0L==2 && n_pi==1 && n_pi0==0 && n_K==0 && n_nu==1) || (n_pi>=1 && n_pi0==0 && n_K0L+n_K0S==2 && n_K==0 && n_nu==1) ){ JAK_ID=JAK_K0BK0PI; TauBitMask=OneProng; if(n_pi>1)TauBitMask+=KS0_to_pipi; ClassifyDecayResonance(TauBitMask); return; } //if(n_Kstar==1){ //JAK_KSTAR K0SPi && KPi0 if(n_e==0 && n_mu==0 && n_pi>=1 && n_pi0==0 && n_K==0 && n_K0L+n_K0S==1 && n_nu==1){ JAK_ID=JAK_KSTAR; TauBitMask=OneProng; if(n_pi==3)TauBitMask+=KS0_to_pipi; ClassifyDecayResonance(TauBitMask); return; } if(n_e==0 && n_mu==0 && n_pi==0 && n_pi0==1 && n_K==1 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_KSTAR; TauBitMask=OneProng; ClassifyDecayResonance(TauBitMask); return; } //} //JAK_PIK0PI0 if(n_e==0 && n_mu==0 && n_pi>=1 && n_pi0==1 && n_K==0 && n_K0L+n_K0S==1 && n_nu==1){ JAK_ID=JAK_PIK0PI0; TauBitMask=OneProng; TauBitMask+=OnePi0; if(n_pi==3)TauBitMask+=KS0_to_pipi; ClassifyDecayResonance(TauBitMask); return; } //JAK_KK0B if(n_e==0 && n_mu==0 && n_pi0==0 && n_K==1 && n_K0L+n_K0S==1 && n_nu==1){ JAK_ID=JAK_KK0B; TauBitMask=OneProng; if(n_pi==2)TauBitMask+=KS0_to_pipi; return; } //JAK_ID=JAK_KK0BPI0 if(n_e==0 && n_mu==0 && n_pi0==1 && n_K==1 && n_K0L+n_K0S==1 && n_nu==1){ JAK_ID=JAK_KK0BPI0; TauBitMask=OneProng; TauBitMask+=OnePi0; if(n_pi==2)TauBitMask+=KS0_to_pipi; ClassifyDecayResonance(TauBitMask); return; } //Safty handelling for exlusive modes if (n_K0L!=0){ std::cout << "Unknown mode with KL0: n_e " << n_e << " n_mu " << n_mu << " n_pi " << n_pi << " n_pi0 " << n_pi0 << " n_K " << n_K << " n_K0L " << n_K0L << " n_K0S " << n_K0S << " n_nu " << n_nu << " n_gamma " << n_gamma << std::endl; return; } if (n_K0S!=0){ std::cout << "Unknown mode with KS0: n_e " << n_e << " n_mu " << n_mu << " n_pi " << n_pi << " n_pi0 " << n_pi0 << " n_K " << n_K << " n_K0L " << n_K0L << " n_K0S " << n_K0S << " n_nu " << n_nu << " n_gamma " << n_gamma << std::endl; return; } if (n_eta!=0){ std::cout << "Unknown mode with eta: n_e " << n_e << " n_mu " << n_mu << " n_pi " << n_pi << " n_pi0 " << n_pi0 << " n_K " << n_K << " n_K0L " << n_K0L << " n_K0S " << n_K0S << " n_nu " << n_nu << " n_gamma " << n_gamma << std::endl; return; } if(n_pi+n_K+n_e+n_mu==1)TauBitMask=OneProng; if(n_pi+n_K==3)TauBitMask=ThreeProng; if(n_pi+n_K==5)TauBitMask=FiveProng; if(n_pi0==1)TauBitMask+=OnePi0; if(n_pi0==2)TauBitMask+=TwoPi0; if(n_pi0==3)TauBitMask+=ThreePi0; ClassifyDecayResonance(TauBitMask); // // Standard modes // if(n_e==1 && n_mu==0 && n_pi==0 && n_pi0==0 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==2){ JAK_ID=JAK_ELECTRON; return; } if(n_e==0 && n_mu==1 && n_pi==0 && n_pi0==0 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==2){ JAK_ID=JAK_MUON; return; } if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==0 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_PION; return; } if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==1 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1 && n_rho==1){ JAK_ID=JAK_RHO_PIPI0; return; } if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==2 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_A1_3PI; return; } if(n_e==0 && n_mu==0 && n_pi==3 && n_pi0==0 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_A1_3PI; return; } if(n_e==0 && n_mu==0 && n_pi==0 && n_pi0==0 && n_K==1 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_KAON; return; } if(n_e==0 && n_mu==0 && n_pi==3 && n_pi0==1 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_3PIPI0; return; } if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==3 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_PI3PI0; return; } if(n_e==0 && n_mu==0 && n_pi==3 && n_pi0==2 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_3PI2PI0; return; } if(n_e==0 && n_mu==0 && n_pi==5 && n_pi0==0 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_5PI; return; } if(n_e==0 && n_mu==0 && n_pi==5 && n_pi0==1 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_5PIPI0; return; } if(n_e==0 && n_mu==0 && n_pi==3 && n_pi0==3 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_3PI3PI0; return; } if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==0 && n_K==2 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_KPIK; return; } if(n_e==0 && n_mu==0 && n_pi==0 && n_pi0==2 && n_K==1 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_K2PI0; return; } if(n_e==0 && n_mu==0 && n_pi==2 && n_pi0==0 && n_K==1 && n_K0L==0 && n_K0S==0 && n_nu==1){ JAK_ID=JAK_KPIPI; return; } if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==1 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1 && n_gamma>=1 && n_rho==0){ JAK_ID=JAK_PIPI0GAM; return; } std::cout << "Tau Mode not found: n_e " << n_e << " n_mu " << n_mu << " n_pi " << n_pi << " n_pi0 " << n_pi0 << " n_K " << n_K << " n_K0L " << n_K0L << " n_K0S " << n_K0S << " n_nu " << n_nu << " n_gamma " << n_gamma << std::endl; JAK_ID=JAK_UNKNOWN; }
void TauDecay::ClassifyDecayResonance | ( | unsigned int & | TauBitMask | ) | [private] |
Definition at line 258 of file TauDecay.cc.
References n_a1, n_a10, n_eta, n_Kstar, n_Kstar0, n_omega, n_rho, n_rho0, Res_a1_0, Res_a1_pm, Res_eta, Res_Kstar_0, Res_Kstar_pm, Res_omega, Res_rho_0, and Res_rho_pm.
Referenced by ClassifyDecayMode().
{ // Add Resonance info to TauBitMask if(n_a1>0) TauBitMask+=Res_a1_pm; if(n_a10>0) TauBitMask+=Res_a1_0; if(n_rho>0) TauBitMask+=Res_rho_pm; if(n_rho0>0) TauBitMask+=Res_rho_0; if(n_eta>0) TauBitMask+=Res_eta; if(n_omega>0) TauBitMask+=Res_omega; if(n_Kstar>0) TauBitMask+=Res_Kstar_pm; if(n_Kstar0>0) TauBitMask+=Res_Kstar_0; }
bool TauDecay::isTauFinalStateParticle | ( | int | pdgid | ) |
Definition at line 38 of file TauDecay.cc.
References abs, PdtPdgMini::e_minus, PdtPdgMini::gamma, PdtPdgMini::K_L0, PdtPdgMini::K_plus, PdtPdgMini::K_S0, PdtPdgMini::mu_minus, PdtPdgMini::nu_e, PdtPdgMini::nu_mu, PdtPdgMini::nu_tau, PdtPdgMini::pi0, and PdtPdgMini::pi_plus.
Referenced by TauDecay_CMSSW::Analyze(), and TauValidation::analyze().
{ int id=abs(pdgid); if(id==PdtPdgMini::e_minus) return true; // e+- if(id==PdtPdgMini::nu_e) return true; // nu_e if(id==PdtPdgMini::mu_minus) return true; // mu+- if(id==PdtPdgMini::nu_mu) return true; // nu_mu if(id==PdtPdgMini::nu_tau) return true; // nu_tau if(id==PdtPdgMini::gamma) return true; // gamma happends in generator if(id==PdtPdgMini::pi0) return true; // pi0 if(id==PdtPdgMini::pi_plus) return true; // pi+- if(id==PdtPdgMini::K_L0) return true; // K0L if(id==PdtPdgMini::K_S0) return true; // KS if(id==PdtPdgMini::K_plus) return true; // K+- return false; }
bool TauDecay::isTauParticleCounter | ( | int | pdgid | ) |
Definition at line 54 of file TauDecay.cc.
References abs, PdtPdgMini::e_minus, PdtPdgMini::gamma, PdtPdgMini::K_L0, PdtPdgMini::K_plus, PdtPdgMini::K_S0, PdtPdgMini::mu_minus, n_e, n_gamma, n_K, n_K0L, n_K0S, n_mu, n_nu, n_pi, n_pi0, PdtPdgMini::nu_e, PdtPdgMini::nu_mu, PdtPdgMini::nu_tau, PdtPdgMini::pi0, and PdtPdgMini::pi_plus.
Referenced by TauDecay_CMSSW::Analyze().
{ int id=abs(pdgid); //count particles if(id==PdtPdgMini::pi_plus) { n_pi++; return true;} if(id==PdtPdgMini::pi0) { n_pi0++; return true;} if(id==PdtPdgMini::K_plus) { n_K++; return true;} if(id==PdtPdgMini::K_L0) { n_K0L++; return true;} if(id==PdtPdgMini::K_S0) { n_K0S++; return true;} if(id==PdtPdgMini::gamma) { n_gamma++; return true;} if(id==PdtPdgMini::nu_tau || id==PdtPdgMini::nu_e || id==PdtPdgMini::nu_mu) { n_nu++; return true;} if(id==PdtPdgMini::e_minus) { n_e++; return true;} if(id==PdtPdgMini::mu_minus) { n_mu++; return true;} return false; }
bool TauDecay::isTauResonanceCounter | ( | int | pdgid | ) |
Definition at line 71 of file TauDecay.cc.
References PdtPdgMini::a_10, PdtPdgMini::a_1_plus, abs, PdtPdgMini::eta, PdtPdgMini::K_star0, PdtPdgMini::K_star_plus, n_a1, n_a10, n_eta, n_Kstar, n_Kstar0, n_omega, n_rho, n_rho0, PdtPdgMini::omega, PdtPdgMini::rho0, PdtPdgMini::rho_plus, unknown, and PdtPdgMini::W_plus.
Referenced by TauDecay_CMSSW::Analyze().
{ int id=abs(pdgid); //count resonances if(id==PdtPdgMini::a_1_plus) { n_a1++; return true;} if(id==PdtPdgMini::a_10) { n_a10++; return true;} if(id==PdtPdgMini::rho_plus) { n_rho++; return true;} if(id==PdtPdgMini::rho0) { n_rho0++; return true;} if(id==PdtPdgMini::eta) { n_eta++; return true;} if(id==PdtPdgMini::omega) { n_omega++; return true;} //if(id==PdtPdgMini::K_S0) { n_K0S++; return true;} if(id==PdtPdgMini::K_star0) { n_Kstar0++; return true;} if(id==PdtPdgMini::K_star_plus){ n_Kstar++; return true;} if(id==PdtPdgMini::W_plus) { return true;} unknown++; return false; }
unsigned int TauDecay::nPi0 | ( | unsigned int & | TauBitMask | ) | [inline] |
unsigned int TauDecay::nProng | ( | unsigned int & | TauBitMask | ) | [inline] |
Definition at line 103 of file TauDecay.h.
References FiveProng, OneProng, and ThreeProng.
Referenced by TauValidation::analyze().
{ if(OneProng&TauBitMask) return 1; if(ThreeProng&TauBitMask) return 3; if(FiveProng&TauBitMask) return 5; return 7; }
void TauDecay::Reset | ( | void | ) |
unsigned int TauDecay::n_a1 [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_a10 [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_e [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_eta [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayMode(), ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_gamma [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_K [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_K0L [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_K0S [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_Kstar [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_Kstar0 [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_mu [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_nu [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_omega [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_pi [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_pi0 [private] |
Definition at line 122 of file TauDecay.h.
Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().
unsigned int TauDecay::n_rho [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayMode(), ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::n_rho0 [private] |
Definition at line 123 of file TauDecay.h.
Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().
unsigned int TauDecay::unknown [private] |
Definition at line 123 of file TauDecay.h.
Referenced by isTauResonanceCounter(), and Reset().