#include <TauDecay_CMSSW.h>
Public Member Functions | |
bool | AnalyzeTau (HepMC::GenParticle *Tau, unsigned int &JAK_ID, unsigned int &TauBitMask, bool dores=true, bool dopi0=true) |
std::vector< unsigned int > | Get_MotherIdx () |
std::vector< HepMC::GenParticle * > | Get_TauDecayProducts () |
TauDecay_CMSSW () | |
~TauDecay_CMSSW () | |
Private Member Functions | |
void | AddPi0Info (HepMC::GenParticle *Particle, unsigned int midx) |
void | Analyze (HepMC::GenParticle *Particle, unsigned int midx, bool dores, bool dopi0) |
Private Attributes | |
unsigned int | JAK_ID |
std::vector< unsigned int > | MotherIdx |
unsigned int | TauBitMask |
std::vector< HepMC::GenParticle * > | TauDecayProducts |
Definition at line 31 of file TauDecay_CMSSW.h.
TauDecay_CMSSW::TauDecay_CMSSW | ( | ) |
Definition at line 7 of file TauDecay_CMSSW.cc.
: TauDecay() { }
TauDecay_CMSSW::~TauDecay_CMSSW | ( | ) |
Definition at line 13 of file TauDecay_CMSSW.cc.
{ }
void TauDecay_CMSSW::AddPi0Info | ( | HepMC::GenParticle * | Particle, |
unsigned int | midx | ||
) | [private] |
Definition at line 56 of file TauDecay_CMSSW.cc.
References MotherIdx, and TauDecayProducts.
{ if(Particle->status()==1){ TauDecayProducts.push_back(Particle); MotherIdx.push_back(midx); return; } HepMC::GenVertex::particle_iterator des; for(des = Particle->end_vertex()->particles_begin(HepMC::children); des!= Particle->end_vertex()->particles_end(HepMC::children);++des ) { AddPi0Info((*des),midx); } }
void TauDecay_CMSSW::Analyze | ( | HepMC::GenParticle * | Particle, |
unsigned int | midx, | ||
bool | dores, | ||
bool | dopi0 | ||
) | [private] |
Definition at line 39 of file TauDecay_CMSSW.cc.
References abs, gather_cfg::cout, TauDecay::isTauFinalStateParticle(), TauDecay::isTauParticleCounter(), TauDecay::isTauResonanceCounter(), MotherIdx, and TauDecayProducts.
Referenced by AnalyzeTau().
{ unsigned int pdgid=abs(Particle->pdg_id()); isTauResonanceCounter(pdgid); if(isTauFinalStateParticle(pdgid)){ if(!isTauParticleCounter(pdgid)) std::cout << "TauDecay_CMSSW::Analyze WARNING: Unknow Final State Particle in Tau Decay... " << pdgid << std::endl; TauDecayProducts.push_back(Particle); MotherIdx.push_back(midx); return; } HepMC::GenVertex::particle_iterator des; for(des = Particle->end_vertex()->particles_begin(HepMC::children); des!= Particle->end_vertex()->particles_end(HepMC::children) && Particle->end_vertex()-> particles_out_size()>0;++des ) { Analyze((*des),midx,dores,dopi0); } }
bool TauDecay_CMSSW::AnalyzeTau | ( | HepMC::GenParticle * | Tau, |
unsigned int & | JAK_ID, | ||
unsigned int & | TauBitMask, | ||
bool | dores = true , |
||
bool | dopi0 = true |
||
) |
Definition at line 17 of file TauDecay_CMSSW.cc.
References abs, Analyze(), TauDecay::ClassifyDecayMode(), MotherIdx, TauDecay::Reset(), PdtPdgMini::tau_minus, and TauDecayProducts.
Referenced by TauValidation::analyze().
{ Reset(); MotherIdx.clear(); TauDecayProducts.clear(); if(abs(Tau->pdg_id())==PdtPdgMini::tau_minus){ // check that it is a tau unsigned int Tauidx=TauDecayProducts.size(); HepMC::GenVertex::particle_iterator des; if( Tau->end_vertex()){ for(des = Tau->end_vertex()->particles_begin(HepMC::children); des!= Tau->end_vertex()->particles_end(HepMC::children);++des ) { Analyze((*des),Tauidx,dores,dopi0); } ClassifyDecayMode(JAK_ID,TauBitMask); return true; } } return false; }
std::vector<unsigned int> TauDecay_CMSSW::Get_MotherIdx | ( | ) | [inline] |
std::vector<HepMC::GenParticle*> TauDecay_CMSSW::Get_TauDecayProducts | ( | ) | [inline] |
Definition at line 39 of file TauDecay_CMSSW.h.
References TauDecayProducts.
Referenced by TauValidation::analyze().
{return TauDecayProducts;}
unsigned int TauDecay_CMSSW::JAK_ID [private] |
Definition at line 49 of file TauDecay_CMSSW.h.
std::vector<unsigned int> TauDecay_CMSSW::MotherIdx [private] |
Definition at line 48 of file TauDecay_CMSSW.h.
Referenced by AddPi0Info(), Analyze(), AnalyzeTau(), and Get_MotherIdx().
unsigned int TauDecay_CMSSW::TauBitMask [private] |
Definition at line 49 of file TauDecay_CMSSW.h.
std::vector<HepMC::GenParticle*> TauDecay_CMSSW::TauDecayProducts [private] |
Definition at line 47 of file TauDecay_CMSSW.h.
Referenced by AddPi0Info(), Analyze(), AnalyzeTau(), and Get_TauDecayProducts().