CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TauDecay_CMSSW Class Reference

#include <TauDecay_CMSSW.h>

Inheritance diagram for TauDecay_CMSSW:
TauDecay

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 ()
 
- Public Member Functions inherited from TauDecay
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 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
 

Additional Inherited Members

- Public Types inherited from TauDecay
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, NJAKID =23
}
 
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
}
 

Detailed Description

Definition at line 31 of file TauDecay_CMSSW.h.

Constructor & Destructor Documentation

TauDecay_CMSSW::TauDecay_CMSSW ( )

Definition at line 7 of file TauDecay_CMSSW.cc.

7  :
8  TauDecay()
9 {
10 
11 }
TauDecay()
Definition: TauDecay.cc:9
TauDecay_CMSSW::~TauDecay_CMSSW ( )

Definition at line 13 of file TauDecay_CMSSW.cc.

13  {
14 
15 }

Member Function Documentation

void TauDecay_CMSSW::AddPi0Info ( HepMC::GenParticle *  Particle,
unsigned int  midx 
)
private

Definition at line 61 of file TauDecay_CMSSW.cc.

References MotherIdx, and TauDecayProducts.

61  {
62  if(Particle->status()==1){
63  TauDecayProducts.push_back(Particle);
64  MotherIdx.push_back(midx);
65  return;
66  }
67  HepMC::GenVertex::particle_iterator des;
68  for(des = Particle->end_vertex()->particles_begin(HepMC::children);
69  des!= Particle->end_vertex()->particles_end(HepMC::children);++des ) {
70  AddPi0Info((*des),midx);
71  }
72 }
std::vector< HepMC::GenParticle * > TauDecayProducts
std::vector< unsigned int > MotherIdx
void AddPi0Info(HepMC::GenParticle *Particle, unsigned int 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().

39  {
40  unsigned int pdgid=abs(Particle->pdg_id());
41  isTauResonanceCounter(pdgid);
42  if(isTauFinalStateParticle(pdgid)){
43  if(!isTauParticleCounter(pdgid)) std::cout << "TauDecay_CMSSW::Analyze WARNING: Unknow Final State Particle in Tau Decay... " << pdgid << std::endl;
44  TauDecayProducts.push_back(Particle);
45  MotherIdx.push_back(midx);
46  return;
47  }
48  HepMC::GenVertex::particle_iterator des;
49  if(Particle->end_vertex()){
50  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 ) {
51  Analyze((*des),midx,dores,dopi0);
52  }
53  }
54  else {
55  std::cout << "Unstable particle that is undecayed in Tau decay tree. PDG ID: " << pdgid << std::endl;
56  }
57 }
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< HepMC::GenParticle * > TauDecayProducts
bool isTauFinalStateParticle(int pdgid)
Definition: TauDecay.cc:38
bool isTauResonanceCounter(int pdgid)
Definition: TauDecay.cc:71
void Analyze(HepMC::GenParticle *Particle, unsigned int midx, bool dores, bool dopi0)
std::vector< unsigned int > MotherIdx
tuple cout
Definition: gather_cfg.py:121
bool isTauParticleCounter(int pdgid)
Definition: TauDecay.cc:54
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().

17  {
18  Reset();
19  MotherIdx.clear();
20  TauDecayProducts.clear();
21  if(abs(Tau->pdg_id())==PdtPdgMini::tau_minus){ // check that it is a tau
22  unsigned int Tauidx=TauDecayProducts.size();
23  HepMC::GenVertex::particle_iterator des;
24  if( Tau->end_vertex()){
25  for(des = Tau->end_vertex()->particles_begin(HepMC::children);
26  des!= Tau->end_vertex()->particles_end(HepMC::children);++des ) {
27  Analyze((*des),Tauidx,dores,dopi0);
28  }
30  return true;
31  }
32  }
33  return false;
34 }
void Reset()
Definition: TauDecay.cc:17
unsigned int TauBitMask
unsigned int JAK_ID
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< HepMC::GenParticle * > TauDecayProducts
void Analyze(HepMC::GenParticle *Particle, unsigned int midx, bool dores, bool dopi0)
std::vector< unsigned int > MotherIdx
void ClassifyDecayMode(unsigned int &JAK_ID, unsigned int &TauBitMask)
Definition: TauDecay.cc:88
std::vector<unsigned int> TauDecay_CMSSW::Get_MotherIdx ( )
inline

Definition at line 40 of file TauDecay_CMSSW.h.

References MotherIdx.

40 {return MotherIdx;}
std::vector< unsigned int > MotherIdx
std::vector<HepMC::GenParticle*> TauDecay_CMSSW::Get_TauDecayProducts ( )
inline

Definition at line 39 of file TauDecay_CMSSW.h.

References TauDecayProducts.

Referenced by TauValidation::analyze().

39 {return TauDecayProducts;}
std::vector< HepMC::GenParticle * > TauDecayProducts

Member Data Documentation

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().