CMS 3D CMS Logo

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

#include <TauDataFormat/TauNtuple/src/TauDecay_CMSSW.cc>

Inheritance diagram for TauDecay:
TauDecay_CMSSW TauDecay_GenParticle

Public Types

enum  MODE {
  MODE_UNKNOWN =0, MODE_ELECTRON, MODE_MUON, MODE_PION,
  MODE_PIPI0, MODE_3PI, MODE_PI2PI0, MODE_KAON,
  MODE_K0PI, MODE_KPI0, MODE_3PIPI0, MODE_PI3PI0,
  MODE_3PI2PI0, MODE_5PI, MODE_5PIPI0, MODE_3PI3PI0,
  MODE_KPIK, MODE_K0BK0PI, MODE_KK0BPI0, MODE_K2PI0,
  MODE_KPIPI, MODE_PIK0PI0, MODE_ETAPIPI0, MODE_PIPI0GAM,
  MODE_KK0B, MODE_PI4PI0, MODE_3PIETA, MODE_PI2PI0ETA,
  MODE_PI2PI0OMEGA, MODE_3PIOMEGA, MODE_KOMEGA, MODE_K3PI0,
  MODE_K2PIPI0, MODE_KETA, MODE_K0PI2PI0, MODE_K03PI,
  MODE_2K0PIPI0, MODE_KPIKPI0, NMODEID
}
 
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 &MODE_ID, unsigned int &TauBitMask)
 
bool hasResonance (unsigned int &TauBitMask, int pdgid)
 
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 ()
 

Static Public Member Functions

static std::string DecayMode (unsigned int &MODE_ID)
 

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
 

Detailed Description

Description: This class reconstructs the MODE modes of the Tauola decays and provides a bit mask of the decay structure for the tau

Description: Bridge class for TauDecay when using HepMC

Implementation: [Notes on implementation]

Definition at line 21 of file TauDecay.h.

Member Enumeration Documentation

Enumerator
MODE_UNKNOWN 
MODE_ELECTRON 
MODE_MUON 
MODE_PION 
MODE_PIPI0 
MODE_3PI 
MODE_PI2PI0 
MODE_KAON 
MODE_K0PI 
MODE_KPI0 
MODE_3PIPI0 
MODE_PI3PI0 
MODE_3PI2PI0 
MODE_5PI 
MODE_5PIPI0 
MODE_3PI3PI0 
MODE_KPIK 
MODE_K0BK0PI 
MODE_KK0BPI0 
MODE_K2PI0 
MODE_KPIPI 
MODE_PIK0PI0 
MODE_ETAPIPI0 
MODE_PIPI0GAM 
MODE_KK0B 
MODE_PI4PI0 
MODE_3PIETA 
MODE_PI2PI0ETA 
MODE_PI2PI0OMEGA 
MODE_3PIOMEGA 
MODE_KOMEGA 
MODE_K3PI0 
MODE_K2PIPI0 
MODE_KETA 
MODE_K0PI2PI0 
MODE_K03PI 
MODE_2K0PIPI0 
MODE_KPIKPI0 
NMODEID 

Definition at line 89 of file TauDecay.h.

89  {MODE_UNKNOWN=0,
91  MODE_MUON,
92  MODE_PION,
93  MODE_PIPI0,
94  MODE_3PI,
96  MODE_KAON,
97  MODE_K0PI,
98  MODE_KPI0,
100  MODE_PI3PI0,
101  MODE_3PI2PI0,
102  MODE_5PI,
103  MODE_5PIPI0,
104  MODE_3PI3PI0,
105  MODE_KPIK,
106  MODE_K0BK0PI,
107  MODE_KK0BPI0,
108  MODE_K2PI0,
109  MODE_KPIPI,
110  MODE_PIK0PI0,
113  MODE_KK0B,
114  MODE_PI4PI0,
115  MODE_3PIETA,
119  MODE_KOMEGA,
120  MODE_K3PI0,
121  MODE_K2PIPI0,
122  MODE_KETA,
124  MODE_K03PI,
126  MODE_KPIKPI0,
127  NMODEID
128  };
Enumerator
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 131 of file TauDecay.h.

Constructor & Destructor Documentation

TauDecay::TauDecay ( )

Definition at line 7 of file TauDecay.cc.

References Reset().

7  {
8  Reset();
9 }
void Reset()
Definition: TauDecay.cc:15
TauDecay::~TauDecay ( )

Definition at line 11 of file TauDecay.cc.

11  {
12 
13 }

Member Function Documentation

void TauDecay::ClassifyDecayMode ( unsigned int &  MODE_ID,
unsigned int &  TauBitMask 
)

Definition at line 89 of file TauDecay.cc.

References ClassifyDecayResonance(), gather_cfg::cout, FiveProng, MODE_2K0PIPI0, MODE_3PI, MODE_3PI2PI0, MODE_3PI3PI0, MODE_3PIETA, MODE_3PIOMEGA, MODE_3PIPI0, MODE_5PI, MODE_5PIPI0, MODE_ELECTRON, MODE_ETAPIPI0, MODE_K03PI, MODE_K0BK0PI, MODE_K0PI, MODE_K0PI2PI0, MODE_K2PI0, MODE_K2PIPI0, MODE_K3PI0, MODE_KAON, MODE_KETA, MODE_KK0B, MODE_KK0BPI0, MODE_KOMEGA, MODE_KPI0, MODE_KPIK, MODE_KPIKPI0, MODE_KPIPI, MODE_MUON, MODE_PI2PI0, MODE_PI2PI0ETA, MODE_PI2PI0OMEGA, MODE_PI3PI0, MODE_PI4PI0, MODE_PIK0PI0, MODE_PION, MODE_PIPI0, MODE_PIPI0GAM, MODE_UNKNOWN, n_e, n_eta, n_gamma, n_K, n_K0L, n_K0S, n_mu, n_nu, n_omega, n_pi, n_pi0, n_rho, OnePi0, OneProng, mathSSE::return(), ThreePi0, ThreeProng, and TwoPi0.

Referenced by TauDecay_GenParticle::AnalyzeTau(), and TauDecay_CMSSW::AnalyzeTau().

89  {
90  //Reset Bits
91  MODE_ID=0;
92  TauBitMask=0;
93  // Classify according to MODE and TauDecayStructure
94  if(n_pi+n_K+n_e+n_mu==1)TauBitMask=OneProng;
95  if(n_pi+n_K==3)TauBitMask=ThreeProng;
96  if(n_pi+n_K==5)TauBitMask=FiveProng;
97  if(n_pi0==1)TauBitMask+=OnePi0;
98  if(n_pi0==2)TauBitMask+=TwoPi0;
99  if(n_pi0==3)TauBitMask+=ThreePi0;
100  ClassifyDecayResonance(TauBitMask);
101 
102  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==0 && n_K==0 && n_K0S+n_K0L==2 && n_nu==1){
103  MODE_ID=MODE_K0BK0PI; return;
104  }
105  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==0 && n_K==0 && (n_K0L+n_K0S)==1 && n_nu==1){
106  MODE_ID=MODE_K0PI; return;
107  }
108  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){
109  MODE_ID=MODE_KPI0; return;
110  }
111  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==1 && n_K==0 && n_K0L+n_K0S==1 && n_nu==1){
112  MODE_ID=MODE_PIK0PI0; return;
113  }
114  if(n_e==0 && n_mu==0 && n_pi==0 && n_pi0==0 && n_K==1 && (n_K0L+n_K0S)==1 && n_nu==1){
115  MODE_ID=MODE_KK0B; return;
116  }
117  if(n_e==0 && n_mu==0 && n_pi==0 && n_pi0==1 && n_K==1 && n_K0L+n_K0S==1 && n_nu==1){
118  MODE_ID=MODE_KK0BPI0; return;
119  }
120  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){
121  MODE_ID=MODE_ELECTRON; return;
122  }
123  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){
124  MODE_ID=MODE_MUON; return;
125  }
126  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){
127  MODE_ID=MODE_PION; return;
128  }
129  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){
130  MODE_ID=MODE_PIPI0; return;
131  }
132  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){
133  MODE_ID=MODE_PI2PI0; return;
134  }
135  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){
136  MODE_ID=MODE_3PI; return;
137  }
138  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){
139  MODE_ID=MODE_KAON; return;
140  }
141  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){
142  MODE_ID=MODE_3PIPI0; return;
143  }
144  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){
145  MODE_ID=MODE_PI3PI0; return;
146  }
147  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){
148  MODE_ID=MODE_3PI2PI0; return;
149  }
150  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){
151  MODE_ID=MODE_5PI; return;
152  }
153  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){
154  MODE_ID=MODE_5PIPI0; return;
155  }
156  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){
157  MODE_ID=MODE_3PI3PI0; return;
158  }
159  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){
160  MODE_ID=MODE_KPIK; return;
161  }
162  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){
163  MODE_ID=MODE_K2PI0; return;
164  }
165  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){
166  MODE_ID=MODE_KPIPI; return;
167  }
168  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){
169  MODE_ID=MODE_PIPI0GAM; return ; // Obsolete should not be called
170  }
171  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==4 && n_K==0 && n_K0L==0 && n_K0S==0 && n_nu==1){
172  MODE_ID=MODE_PI4PI0; return;
173  }
174  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 && n_eta==1){
175  MODE_ID=MODE_3PIETA; return;
176  }
177  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 && n_eta==1){
178  MODE_ID=MODE_PI2PI0ETA; return;
179  }
180  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 && n_omega==1){
181  MODE_ID=MODE_PI2PI0OMEGA; return;
182  }
183  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 && n_omega==1){
184  MODE_ID=MODE_3PIOMEGA; return;
185  }
186  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 && n_omega==1){
187  MODE_ID=MODE_KOMEGA; return;
188  }
189  if(n_e==0 && n_mu==0 && n_pi==0 && n_pi0==3 && n_K==1 && n_K0L==0 && n_K0S==0 && n_nu==1){
190  MODE_ID=MODE_K3PI0; return;
191  }
192  if(n_e==0 && n_mu==0 && n_pi==2 && n_pi0==1 && n_K==1 && n_K0L==0 && n_K0S==0 && n_nu==1){
193  MODE_ID=MODE_K2PIPI0; return;
194  }
195  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 && n_eta==1){
196  MODE_ID=MODE_KETA; return;
197  }
198  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==2 && n_K==0 && (n_K0L+n_K0S)==0 && n_nu==1){
199  MODE_ID=MODE_K0PI2PI0; return;
200  }
201  if(n_e==0 && n_mu==0 && n_pi==3 && n_pi0==0 && n_K==0 && (n_K0L+n_K0S)==1 && n_nu==1){
202  MODE_ID=MODE_K03PI; return;
203  }
204  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==1 && n_K==0 && (n_K0L+n_K0S)==2 && n_nu==1){
205  MODE_ID=MODE_2K0PIPI0; return;
206  }
207  if(n_e==0 && n_mu==0 && n_pi==1 && n_pi0==1 && n_K==2 && n_K0L==0 && n_K0S==0 && n_nu==1){
208  MODE_ID=MODE_KPIKPI0; return;
209  }
210  if(n_pi==1 && n_pi0==1 && n_nu==1 && n_eta==1){ // eta modes
211  MODE_ID=MODE_ETAPIPI0; return;
212  }
213 
214  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;
215  MODE_ID=MODE_UNKNOWN;
216 }
unsigned int n_pi
Definition: TauDecay.h:167
unsigned int n_nu
Definition: TauDecay.h:167
unsigned int n_omega
Definition: TauDecay.h:168
unsigned int n_K
Definition: TauDecay.h:167
return((rh^lh)&mask)
unsigned int n_mu
Definition: TauDecay.h:167
unsigned int n_eta
Definition: TauDecay.h:168
unsigned int n_K0S
Definition: TauDecay.h:167
unsigned int n_e
Definition: TauDecay.h:167
void ClassifyDecayResonance(unsigned int &TauBitMask)
Definition: TauDecay.cc:246
unsigned int n_rho
Definition: TauDecay.h:168
tuple cout
Definition: gather_cfg.py:121
unsigned int n_K0L
Definition: TauDecay.h:167
unsigned int n_pi0
Definition: TauDecay.h:167
unsigned int n_gamma
Definition: TauDecay.h:167
void TauDecay::ClassifyDecayResonance ( unsigned int &  TauBitMask)
private

Definition at line 246 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().

246  {
247  // Add Resonance info to TauBitMask
248  if(n_a1>0) TauBitMask+=Res_a1_pm;
249  if(n_a10>0) TauBitMask+=Res_a1_0;
250  if(n_rho>0) TauBitMask+=Res_rho_pm;
251  if(n_rho0>0) TauBitMask+=Res_rho_0;
252  if(n_eta>0) TauBitMask+=Res_eta;
253  if(n_omega>0) TauBitMask+=Res_omega;
254  if(n_Kstar>0) TauBitMask+=Res_Kstar_pm;
255  if(n_Kstar0>0) TauBitMask+=Res_Kstar_0;
256 }
unsigned int n_omega
Definition: TauDecay.h:168
unsigned int n_eta
Definition: TauDecay.h:168
unsigned int n_rho0
Definition: TauDecay.h:168
unsigned int n_a10
Definition: TauDecay.h:168
unsigned int n_a1
Definition: TauDecay.h:168
unsigned int n_Kstar0
Definition: TauDecay.h:168
unsigned int n_rho
Definition: TauDecay.h:168
unsigned int n_Kstar
Definition: TauDecay.h:168
std::string TauDecay::DecayMode ( unsigned int &  MODE_ID)
static

Definition at line 258 of file TauDecay.cc.

References MODE_2K0PIPI0, MODE_3PI, MODE_3PI2PI0, MODE_3PI3PI0, MODE_3PIETA, MODE_3PIOMEGA, MODE_3PIPI0, MODE_5PI, MODE_5PIPI0, MODE_ELECTRON, MODE_ETAPIPI0, MODE_K03PI, MODE_K0BK0PI, MODE_K0PI, MODE_K0PI2PI0, MODE_K2PI0, MODE_K2PIPI0, MODE_K3PI0, MODE_KAON, MODE_KETA, MODE_KK0B, MODE_KK0BPI0, MODE_KOMEGA, MODE_KPI0, MODE_KPIK, MODE_KPIKPI0, MODE_KPIPI, MODE_MUON, MODE_PI2PI0, MODE_PI2PI0ETA, MODE_PI2PI0OMEGA, MODE_PI3PI0, MODE_PI4PI0, MODE_PIK0PI0, MODE_PION, MODE_PIPI0, and MODE_PIPI0GAM.

Referenced by TauValidation::bookHistograms().

258  {
259  if(MODE_ID==MODE_ELECTRON) return "#tau^{#pm} #rightarrow e^{#pm}#nu#nu";
260  else if(MODE_ID==MODE_MUON) return "#tau^{#pm} #rightarrow #mu^{#pm}#nu#nu";
261  else if(MODE_ID==MODE_PION) return "#tau^{#pm} #rightarrow #pi^{#pm}#nu";
262  else if(MODE_ID==MODE_PIPI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#nu";
263  else if(MODE_ID==MODE_3PI) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#nu";
264  else if(MODE_ID==MODE_PI2PI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#nu";
265  else if(MODE_ID==MODE_KAON) return "#tau^{#pm} #rightarrow K^{#pm}#nu";
266  else if(MODE_ID==MODE_KPI0) return "#tau^{#pm} #rightarrow K^{#pm}#pi^{0}#nu";
267  else if(MODE_ID==MODE_K0PI) return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#nu";
268  else if(MODE_ID==MODE_3PIPI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#nu";
269  else if(MODE_ID==MODE_PI3PI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#pi^{0}#nu";
270  else if(MODE_ID==MODE_3PI2PI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#pi^{0}#nu";
271  else if(MODE_ID==MODE_5PI) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{#mp}#nu";
272  else if(MODE_ID==MODE_5PIPI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{#mp}#pi^{0}#nu";
273  else if(MODE_ID==MODE_3PI3PI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#pi^{0}#pi^{0}#nu";
274  else if(MODE_ID==MODE_KPIK) return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}K^{#mp}#nu";
275  else if(MODE_ID==MODE_K0BK0PI) return "#tau^{#pm} #rightarrow #bar{K}^{0}K^{0}#pi^{#pm}#nu";
276  else if(MODE_ID==MODE_KK0BPI0) return "#tau^{#pm} #rightarrow #bar{K}^{0}K^{0}#pi^{#pm}#pi^{0}#nu";
277  else if(MODE_ID==MODE_K2PI0) return "#tau^{#pm} #rightarrow K^{#pm}#pi^{0}#pi^{0}#nu";
278  else if(MODE_ID==MODE_KPIPI) return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}#pi^{#mp}#nu";
279  else if(MODE_ID==MODE_PIK0PI0) return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#pi^{0}#nu";
280  else if(MODE_ID==MODE_ETAPIPI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#eta#pi^{0}#nu";
281  else if(MODE_ID==MODE_PIPI0GAM) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#nu#gamma (obsolete)";
282  else if(MODE_ID==MODE_KK0B) return "#tau^{#pm} #rightarrow K^{#pm}#bar{K}^{0}#nu";
283  else if(MODE_ID==MODE_PI4PI0) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#pi^{0}#pi^{0}#nu";
284  else if(MODE_ID==MODE_3PIETA) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#eta#nu";
285  else if(MODE_ID==MODE_PI2PI0ETA) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#eta#nu";
286  else if(MODE_ID==MODE_PI2PI0OMEGA) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#omega#nu";
287  else if(MODE_ID==MODE_3PIOMEGA) return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#omega#nu";
288  else if(MODE_ID==MODE_KOMEGA) return "#tau^{#pm} #rightarrow K^{#pm}#omega#nu";
289  else if(MODE_ID==MODE_K3PI0) return "#tau^{#pm} #rightarrow K#pi^{0}#pi^{0}#pi^{0}#nu";
290  else if(MODE_ID==MODE_K2PIPI0) return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#nu";
291  else if(MODE_ID==MODE_KETA) return "#tau^{#pm} #rightarrow K^{#pm}#eta#nu";
292  else if(MODE_ID==MODE_K0PI2PI0) return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#pi^{0}#pi^{0}#nu";
293  else if(MODE_ID==MODE_K03PI) return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#pi^{#pm}#pi^{#mp}#nu";
294  else if(MODE_ID==MODE_2K0PIPI0) return "#tau^{#pm} #rightarrow K^{0}#bar{K}^{0}#pi^{#pm}#pi^{-}#nu";
295  else if(MODE_ID==MODE_KPIKPI0) return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}K^{#mp}#pi^{0}#nu";
296  return "UnKnown";
297 }
bool TauDecay::hasResonance ( unsigned int &  TauBitMask,
int  pdgid 
)

Definition at line 231 of file TauDecay.cc.

References PdtPdgMini::a_10, PdtPdgMini::a_1_plus, funct::abs(), PdtPdgMini::eta, PdtPdgMini::K_S0, PdtPdgMini::K_star0, PdtPdgMini::K_star_plus, KS0_to_pipi, PdtPdgMini::omega, AlCaHLTBitMon_ParallelJobs::p, Res_a1_0, Res_a1_pm, Res_eta, Res_Kstar_0, Res_Kstar_pm, Res_omega, Res_rho_0, Res_rho_pm, PdtPdgMini::rho0, and PdtPdgMini::rho_plus.

231  {
232  int p=abs(pdgid);
233  if(p==PdtPdgMini::a_1_plus && Res_a1_pm&TauBitMask) return true;
234  if(p==PdtPdgMini::a_10 && Res_a1_0&TauBitMask) return true;
235  if(p==PdtPdgMini::rho_plus && Res_rho_pm&TauBitMask) return true;
236  if(p==PdtPdgMini::rho0 && Res_rho_0&TauBitMask) return true;
237  if(p==PdtPdgMini::eta && Res_eta&TauBitMask) return true;
238  if(p==PdtPdgMini::omega && Res_omega&TauBitMask) return true;
239  if(p==PdtPdgMini::K_star0 && Res_Kstar_pm&TauBitMask) return true;
240  if(p==PdtPdgMini::K_star_plus && Res_Kstar_0&TauBitMask) return true;
241  if(p==PdtPdgMini::K_S0 && KS0_to_pipi&TauBitMask) return true;
242  return false;
243 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool TauDecay::isTauFinalStateParticle ( int  pdgid)

Definition at line 36 of file TauDecay.cc.

References funct::abs(), PdtPdgMini::e_minus, PdtPdgMini::eta, PdtPdgMini::gamma, PdtPdgMini::K_L0, PdtPdgMini::K_plus, PdtPdgMini::K_S0, PdtPdgMini::mu_minus, PdtPdgMini::nu_e, PdtPdgMini::nu_mu, PdtPdgMini::nu_tau, PdtPdgMini::omega, PdtPdgMini::pi0, and PdtPdgMini::pi_plus.

Referenced by TauDecay_GenParticle::Analyze(), TauDecay_CMSSW::Analyze(), and TauValidation::analyze().

36  {
37  int id=abs(pdgid);
38  if(id==PdtPdgMini::e_minus) return true; // e+-
39  if(id==PdtPdgMini::nu_e) return true; // nu_e
40  if(id==PdtPdgMini::mu_minus) return true; // mu+-
41  if(id==PdtPdgMini::nu_mu) return true; // nu_mu
42  if(id==PdtPdgMini::nu_tau) return true; // nu_tau
43  if(id==PdtPdgMini::gamma) return true; // gamma happends in generator
44  if(id==PdtPdgMini::pi0) return true; // pi0
45  if(id==PdtPdgMini::pi_plus) return true; // pi+-
46  if(id==PdtPdgMini::K_L0) return true; // K0L
47  if(id==PdtPdgMini::K_S0) return true; // KS
48  if(id==PdtPdgMini::eta) return true;
49  if(id==PdtPdgMini::omega) return true;
50 
51  if(id==PdtPdgMini::K_plus) return true; // K+-
52  return false;
53 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool TauDecay::isTauParticleCounter ( int  pdgid)

Definition at line 55 of file TauDecay.cc.

References funct::abs(), gather_cfg::cout, PdtPdgMini::e_minus, PdtPdgMini::eta, PdtPdgMini::gamma, PdtPdgMini::K0, PdtPdgMini::K_L0, PdtPdgMini::K_plus, PdtPdgMini::K_S0, PdtPdgMini::mu_minus, n_e, n_eta, n_gamma, n_K, n_K0L, n_K0S, n_mu, n_nu, n_omega, n_pi, n_pi0, PdtPdgMini::nu_e, PdtPdgMini::nu_mu, PdtPdgMini::nu_tau, PdtPdgMini::omega, PdtPdgMini::pi0, and PdtPdgMini::pi_plus.

Referenced by TauDecay_GenParticle::Analyze(), and TauDecay_CMSSW::Analyze().

55  {
56  int id=abs(pdgid);
57  //count particles
58  if(id==PdtPdgMini::pi_plus) { n_pi++; return true;}
59  if(id==PdtPdgMini::pi0) { n_pi0++; return true;}
60  if(id==PdtPdgMini::K_plus) { n_K++; return true;}
61  if(id==PdtPdgMini::K_L0) { n_K0L++; return true;}
62  if(id==PdtPdgMini::K_S0) { n_K0S++; return true;}
63  if(id==PdtPdgMini::eta) { n_eta++; return true;}
64  if(id==PdtPdgMini::omega) { n_omega++; return true;}
65  if(id==PdtPdgMini::gamma) { n_gamma++; return true;}
66  if(id==PdtPdgMini::nu_tau ||
67  id==PdtPdgMini::nu_e ||
68  id==PdtPdgMini::nu_mu) { n_nu++; return true;}
69  if(id==PdtPdgMini::e_minus) { n_e++; return true;}
70  if(id==PdtPdgMini::mu_minus) { n_mu++; return true;}
71  if(abs(id)==PdtPdgMini::K0) std::cout << "TauDecay::isTauParticleCounter: ERROR unidentified Particle: " << id << std::endl;
72  return false;
73 }
unsigned int n_pi
Definition: TauDecay.h:167
unsigned int n_nu
Definition: TauDecay.h:167
unsigned int n_omega
Definition: TauDecay.h:168
unsigned int n_K
Definition: TauDecay.h:167
unsigned int n_mu
Definition: TauDecay.h:167
unsigned int n_eta
Definition: TauDecay.h:168
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int n_K0S
Definition: TauDecay.h:167
unsigned int n_e
Definition: TauDecay.h:167
tuple cout
Definition: gather_cfg.py:121
unsigned int n_K0L
Definition: TauDecay.h:167
unsigned int n_pi0
Definition: TauDecay.h:167
unsigned int n_gamma
Definition: TauDecay.h:167
bool TauDecay::isTauResonanceCounter ( int  pdgid)

Definition at line 75 of file TauDecay.cc.

References PdtPdgMini::a_10, PdtPdgMini::a_1_plus, funct::abs(), PdtPdgMini::K_star0, PdtPdgMini::K_star_plus, n_a1, n_a10, n_Kstar, n_Kstar0, n_rho, n_rho0, PdtPdgMini::rho0, PdtPdgMini::rho_plus, unknown, and PdtPdgMini::W_plus.

Referenced by TauDecay_GenParticle::Analyze(), and TauDecay_CMSSW::Analyze().

75  {
76  int id=abs(pdgid);
77  //count resonances
78  if(id==PdtPdgMini::a_1_plus) { n_a1++; return true;}
79  if(id==PdtPdgMini::a_10) { n_a10++; return true;}
80  if(id==PdtPdgMini::rho_plus) { n_rho++; return true;}
81  if(id==PdtPdgMini::rho0) { n_rho0++; return true;}
82  if(id==PdtPdgMini::K_star0) { n_Kstar0++; return true;}
83  if(id==PdtPdgMini::K_star_plus){ n_Kstar++; return true;}
84  if(id==PdtPdgMini::W_plus) { return true;}
85  unknown++;
86  return false;
87 }
unsigned int unknown
Definition: TauDecay.h:168
unsigned int n_rho0
Definition: TauDecay.h:168
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int n_a10
Definition: TauDecay.h:168
unsigned int n_a1
Definition: TauDecay.h:168
unsigned int n_Kstar0
Definition: TauDecay.h:168
unsigned int n_rho
Definition: TauDecay.h:168
unsigned int n_Kstar
Definition: TauDecay.h:168
unsigned int TauDecay::nPi0 ( unsigned int &  TauBitMask)

Definition at line 224 of file TauDecay.cc.

References OnePi0, ThreePi0, and TwoPi0.

224  {
225  if(OnePi0&TauBitMask) return 1;
226  if(TwoPi0&TauBitMask) return 2;
227  if(ThreePi0&TauBitMask) return 3;
228  return 0;
229 }
unsigned int TauDecay::nProng ( unsigned int &  TauBitMask)

Definition at line 218 of file TauDecay.cc.

References FiveProng, OneProng, and ThreeProng.

Referenced by TauValidation::analyze().

218  {
219  if(OneProng&TauBitMask) return 1;
220  if(ThreeProng&TauBitMask) return 3;
221  if(FiveProng&TauBitMask) return 5;
222  return 7;
223 }
void TauDecay::Reset ( void  )

Definition at line 15 of file TauDecay.cc.

References n_a1, n_a10, n_e, n_eta, n_gamma, n_K, n_K0L, n_K0S, n_Kstar, n_Kstar0, n_mu, n_nu, n_omega, n_pi, n_pi0, n_rho, n_rho0, and unknown.

Referenced by TauDecay_GenParticle::AnalyzeTau(), TauDecay_CMSSW::AnalyzeTau(), and TauDecay().

15  {
16  n_pi=0;
17  n_pi0=0;
18  n_K=0;
19  n_K0L=0;
20  n_K0S=0;
21  n_gamma=0;
22  n_nu=0;
23  n_e=0;
24  n_mu=0;
25  n_a1=0;
26  n_a10=0;
27  n_rho=0;
28  n_rho0=0;
29  n_eta=0;
30  n_omega=0;
31  n_Kstar0=0;
32  n_Kstar=0;
33  unknown=0;
34 }
unsigned int n_pi
Definition: TauDecay.h:167
unsigned int unknown
Definition: TauDecay.h:168
unsigned int n_nu
Definition: TauDecay.h:167
unsigned int n_omega
Definition: TauDecay.h:168
unsigned int n_K
Definition: TauDecay.h:167
unsigned int n_mu
Definition: TauDecay.h:167
unsigned int n_eta
Definition: TauDecay.h:168
unsigned int n_rho0
Definition: TauDecay.h:168
unsigned int n_K0S
Definition: TauDecay.h:167
unsigned int n_a10
Definition: TauDecay.h:168
unsigned int n_a1
Definition: TauDecay.h:168
unsigned int n_e
Definition: TauDecay.h:167
unsigned int n_Kstar0
Definition: TauDecay.h:168
unsigned int n_rho
Definition: TauDecay.h:168
unsigned int n_Kstar
Definition: TauDecay.h:168
unsigned int n_K0L
Definition: TauDecay.h:167
unsigned int n_pi0
Definition: TauDecay.h:167
unsigned int n_gamma
Definition: TauDecay.h:167

Member Data Documentation

unsigned int TauDecay::n_a1
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().

unsigned int TauDecay::n_a10
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().

unsigned int TauDecay::n_e
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_eta
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayMode(), ClassifyDecayResonance(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_gamma
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_K
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_K0L
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_K0S
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_Kstar
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().

unsigned int TauDecay::n_Kstar0
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().

unsigned int TauDecay::n_mu
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_nu
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_omega
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayMode(), ClassifyDecayResonance(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_pi
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_pi0
private

Definition at line 167 of file TauDecay.h.

Referenced by ClassifyDecayMode(), isTauParticleCounter(), and Reset().

unsigned int TauDecay::n_rho
private
unsigned int TauDecay::n_rho0
private

Definition at line 168 of file TauDecay.h.

Referenced by ClassifyDecayResonance(), isTauResonanceCounter(), and Reset().

unsigned int TauDecay::unknown
private

Definition at line 168 of file TauDecay.h.

Referenced by isTauResonanceCounter(), and Reset().