CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  {
90  MODE_UNKNOWN = 0,
92  MODE_MUON,
93  MODE_PION,
94  MODE_PIPI0,
95  MODE_3PI,
97  MODE_KAON,
98  MODE_K0PI,
99  MODE_KPI0,
100  MODE_3PIPI0,
101  MODE_PI3PI0,
102  MODE_3PI2PI0,
103  MODE_5PI,
104  MODE_5PIPI0,
105  MODE_3PI3PI0,
106  MODE_KPIK,
107  MODE_K0BK0PI,
108  MODE_KK0BPI0,
109  MODE_K2PI0,
110  MODE_KPIPI,
111  MODE_PIK0PI0,
114  MODE_KK0B,
115  MODE_PI4PI0,
116  MODE_3PIETA,
120  MODE_KOMEGA,
121  MODE_K3PI0,
122  MODE_K2PIPI0,
123  MODE_KETA,
125  MODE_K03PI,
127  MODE_KPIKPI0,
128  NMODEID
129  };
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.

131  {
132  other = 0,
133  OneProng = 1,
134  ThreeProng = 2,
135  FiveProng = 4,
136  OnePi0 = 8,
137  TwoPi0 = 32,
138  ThreePi0 = 64,
139  Res_a1_pm = 128,
140  Res_a1_0 = 256,
141  Res_rho_pm = 512,
142  Res_rho_0 = 1024,
143  Res_eta = 2048,
144  Res_omega = 4096,
145  Res_Kstar_pm = 8192,
146  Res_Kstar_0 = 16384,
147  KS0_to_pipi = 32768
148  };

Constructor & Destructor Documentation

TauDecay::TauDecay ( )

Definition at line 7 of file TauDecay.cc.

References Reset().

7 { Reset(); }
void Reset()
Definition: TauDecay.cc:11
TauDecay::~TauDecay ( )

Definition at line 9 of file TauDecay.cc.

9 {}

Member Function Documentation

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

Definition at line 150 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, ThreePi0, ThreeProng, and TwoPi0.

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

150  {
151  //Reset Bits
152  MODE_ID = 0;
153  TauBitMask = 0;
154  // Classify according to MODE and TauDecayStructure
155  if (n_pi + n_K + n_e + n_mu == 1)
156  TauBitMask = OneProng;
157  if (n_pi + n_K == 3)
158  TauBitMask = ThreeProng;
159  if (n_pi + n_K == 5)
160  TauBitMask = FiveProng;
161  if (n_pi0 == 1)
162  TauBitMask += OnePi0;
163  if (n_pi0 == 2)
164  TauBitMask += TwoPi0;
165  if (n_pi0 == 3)
166  TauBitMask += ThreePi0;
167  ClassifyDecayResonance(TauBitMask);
168 
169  if (n_e == 0 && n_mu == 0 && n_pi == 1 && n_pi0 == 0 && n_K == 0 && n_K0S + n_K0L == 2 && n_nu == 1) {
170  MODE_ID = MODE_K0BK0PI;
171  return;
172  }
173  if (n_e == 0 && n_mu == 0 && n_pi == 1 && n_pi0 == 0 && n_K == 0 && (n_K0L + n_K0S) == 1 && n_nu == 1) {
174  MODE_ID = MODE_K0PI;
175  return;
176  }
177  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) {
178  MODE_ID = MODE_KPI0;
179  return;
180  }
181  if (n_e == 0 && n_mu == 0 && n_pi == 1 && n_pi0 == 1 && n_K == 0 && n_K0L + n_K0S == 1 && n_nu == 1) {
182  MODE_ID = MODE_PIK0PI0;
183  return;
184  }
185  if (n_e == 0 && n_mu == 0 && n_pi == 0 && n_pi0 == 0 && n_K == 1 && (n_K0L + n_K0S) == 1 && n_nu == 1) {
186  MODE_ID = MODE_KK0B;
187  return;
188  }
189  if (n_e == 0 && n_mu == 0 && n_pi == 0 && n_pi0 == 1 && n_K == 1 && n_K0L + n_K0S == 1 && n_nu == 1) {
190  MODE_ID = MODE_KK0BPI0;
191  return;
192  }
193  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) {
194  MODE_ID = MODE_ELECTRON;
195  return;
196  }
197  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) {
198  MODE_ID = MODE_MUON;
199  return;
200  }
201  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) {
202  MODE_ID = MODE_PION;
203  return;
204  }
205  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) {
206  MODE_ID = MODE_PIPI0;
207  return;
208  }
209  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) {
210  MODE_ID = MODE_PI2PI0;
211  return;
212  }
213  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) {
214  MODE_ID = MODE_3PI;
215  return;
216  }
217  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) {
218  MODE_ID = MODE_KAON;
219  return;
220  }
221  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) {
222  MODE_ID = MODE_3PIPI0;
223  return;
224  }
225  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) {
226  MODE_ID = MODE_PI3PI0;
227  return;
228  }
229  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) {
230  MODE_ID = MODE_3PI2PI0;
231  return;
232  }
233  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) {
234  MODE_ID = MODE_5PI;
235  return;
236  }
237  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) {
238  MODE_ID = MODE_5PIPI0;
239  return;
240  }
241  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) {
242  MODE_ID = MODE_3PI3PI0;
243  return;
244  }
245  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) {
246  MODE_ID = MODE_KPIK;
247  return;
248  }
249  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) {
250  MODE_ID = MODE_K2PI0;
251  return;
252  }
253  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) {
254  MODE_ID = MODE_KPIPI;
255  return;
256  }
257  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 &&
258  n_gamma >= 1 && n_rho == 0) {
259  MODE_ID = MODE_PIPI0GAM;
260  return; // Obsolete should not be called
261  }
262  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) {
263  MODE_ID = MODE_PI4PI0;
264  return;
265  }
266  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 &&
267  n_eta == 1) {
268  MODE_ID = MODE_3PIETA;
269  return;
270  }
271  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 &&
272  n_eta == 1) {
273  MODE_ID = MODE_PI2PI0ETA;
274  return;
275  }
276  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 &&
277  n_omega == 1) {
278  MODE_ID = MODE_PI2PI0OMEGA;
279  return;
280  }
281  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 &&
282  n_omega == 1) {
283  MODE_ID = MODE_3PIOMEGA;
284  return;
285  }
286  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 &&
287  n_omega == 1) {
288  MODE_ID = MODE_KOMEGA;
289  return;
290  }
291  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) {
292  MODE_ID = MODE_K3PI0;
293  return;
294  }
295  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) {
296  MODE_ID = MODE_K2PIPI0;
297  return;
298  }
299  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 &&
300  n_eta == 1) {
301  MODE_ID = MODE_KETA;
302  return;
303  }
304  if (n_e == 0 && n_mu == 0 && n_pi == 1 && n_pi0 == 2 && n_K == 0 && (n_K0L + n_K0S) == 0 && n_nu == 1) {
305  MODE_ID = MODE_K0PI2PI0;
306  return;
307  }
308  if (n_e == 0 && n_mu == 0 && n_pi == 3 && n_pi0 == 0 && n_K == 0 && (n_K0L + n_K0S) == 1 && n_nu == 1) {
309  MODE_ID = MODE_K03PI;
310  return;
311  }
312  if (n_e == 0 && n_mu == 0 && n_pi == 1 && n_pi0 == 1 && n_K == 0 && (n_K0L + n_K0S) == 2 && n_nu == 1) {
313  MODE_ID = MODE_2K0PIPI0;
314  return;
315  }
316  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) {
317  MODE_ID = MODE_KPIKPI0;
318  return;
319  }
320  if (n_pi == 1 && n_pi0 == 1 && n_nu == 1 && n_eta == 1) { // eta modes
321  MODE_ID = MODE_ETAPIPI0;
322  return;
323  }
324 
325  std::cout << "Tau Mode not found: n_e " << n_e << " n_mu " << n_mu << " n_pi " << n_pi << " n_pi0 " << n_pi0
326  << " n_K " << n_K << " n_K0L " << n_K0L << " n_K0S " << n_K0S << " n_nu " << n_nu << " n_gamma "
327  << n_gamma << std::endl;
328  MODE_ID = MODE_UNKNOWN;
329 }
unsigned int n_pi
Definition: TauDecay.h:168
unsigned int n_nu
Definition: TauDecay.h:168
unsigned int n_omega
Definition: TauDecay.h:169
unsigned int n_K
Definition: TauDecay.h:168
unsigned int n_mu
Definition: TauDecay.h:168
unsigned int n_eta
Definition: TauDecay.h:169
unsigned int n_K0S
Definition: TauDecay.h:168
unsigned int n_e
Definition: TauDecay.h:168
void ClassifyDecayResonance(unsigned int &TauBitMask)
Definition: TauDecay.cc:373
unsigned int n_rho
Definition: TauDecay.h:169
tuple cout
Definition: gather_cfg.py:144
unsigned int n_K0L
Definition: TauDecay.h:168
unsigned int n_pi0
Definition: TauDecay.h:168
unsigned int n_gamma
Definition: TauDecay.h:168
void TauDecay::ClassifyDecayResonance ( unsigned int &  TauBitMask)
private

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

373  {
374  // Add Resonance info to TauBitMask
375  if (n_a1 > 0)
376  TauBitMask += Res_a1_pm;
377  if (n_a10 > 0)
378  TauBitMask += Res_a1_0;
379  if (n_rho > 0)
380  TauBitMask += Res_rho_pm;
381  if (n_rho0 > 0)
382  TauBitMask += Res_rho_0;
383  if (n_eta > 0)
384  TauBitMask += Res_eta;
385  if (n_omega > 0)
386  TauBitMask += Res_omega;
387  if (n_Kstar > 0)
388  TauBitMask += Res_Kstar_pm;
389  if (n_Kstar0 > 0)
390  TauBitMask += Res_Kstar_0;
391 }
unsigned int n_omega
Definition: TauDecay.h:169
unsigned int n_eta
Definition: TauDecay.h:169
unsigned int n_rho0
Definition: TauDecay.h:169
unsigned int n_a10
Definition: TauDecay.h:169
unsigned int n_a1
Definition: TauDecay.h:169
unsigned int n_Kstar0
Definition: TauDecay.h:169
unsigned int n_rho
Definition: TauDecay.h:169
unsigned int n_Kstar
Definition: TauDecay.h:169
std::string TauDecay::DecayMode ( unsigned int &  MODE_ID)
static

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

393  {
394  if (MODE_ID == MODE_ELECTRON)
395  return "#tau^{#pm} #rightarrow e^{#pm}#nu#nu";
396  else if (MODE_ID == MODE_MUON)
397  return "#tau^{#pm} #rightarrow #mu^{#pm}#nu#nu";
398  else if (MODE_ID == MODE_PION)
399  return "#tau^{#pm} #rightarrow #pi^{#pm}#nu";
400  else if (MODE_ID == MODE_PIPI0)
401  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#nu";
402  else if (MODE_ID == MODE_3PI)
403  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#nu";
404  else if (MODE_ID == MODE_PI2PI0)
405  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#nu";
406  else if (MODE_ID == MODE_KAON)
407  return "#tau^{#pm} #rightarrow K^{#pm}#nu";
408  else if (MODE_ID == MODE_KPI0)
409  return "#tau^{#pm} #rightarrow K^{#pm}#pi^{0}#nu";
410  else if (MODE_ID == MODE_K0PI)
411  return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#nu";
412  else if (MODE_ID == MODE_3PIPI0)
413  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#nu";
414  else if (MODE_ID == MODE_PI3PI0)
415  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#pi^{0}#nu";
416  else if (MODE_ID == MODE_3PI2PI0)
417  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#pi^{0}#nu";
418  else if (MODE_ID == MODE_5PI)
419  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{#mp}#nu";
420  else if (MODE_ID == MODE_5PIPI0)
421  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{#mp}#pi^{0}#nu";
422  else if (MODE_ID == MODE_3PI3PI0)
423  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#pi^{0}#pi^{0}#nu";
424  else if (MODE_ID == MODE_KPIK)
425  return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}K^{#mp}#nu";
426  else if (MODE_ID == MODE_K0BK0PI)
427  return "#tau^{#pm} #rightarrow #bar{K}^{0}K^{0}#pi^{#pm}#nu";
428  else if (MODE_ID == MODE_KK0BPI0)
429  return "#tau^{#pm} #rightarrow #bar{K}^{0}K^{0}#pi^{#pm}#pi^{0}#nu";
430  else if (MODE_ID == MODE_K2PI0)
431  return "#tau^{#pm} #rightarrow K^{#pm}#pi^{0}#pi^{0}#nu";
432  else if (MODE_ID == MODE_KPIPI)
433  return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}#pi^{#mp}#nu";
434  else if (MODE_ID == MODE_PIK0PI0)
435  return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#pi^{0}#nu";
436  else if (MODE_ID == MODE_ETAPIPI0)
437  return "#tau^{#pm} #rightarrow #pi^{#pm}#eta#pi^{0}#nu";
438  else if (MODE_ID == MODE_PIPI0GAM)
439  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#nu#gamma (obsolete)";
440  else if (MODE_ID == MODE_KK0B)
441  return "#tau^{#pm} #rightarrow K^{#pm}#bar{K}^{0}#nu";
442  else if (MODE_ID == MODE_PI4PI0)
443  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#pi^{0}#pi^{0}#nu";
444  else if (MODE_ID == MODE_3PIETA)
445  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#eta#nu";
446  else if (MODE_ID == MODE_PI2PI0ETA)
447  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#eta#nu";
448  else if (MODE_ID == MODE_PI2PI0OMEGA)
449  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{0}#pi^{0}#omega#nu";
450  else if (MODE_ID == MODE_3PIOMEGA)
451  return "#tau^{#pm} #rightarrow #pi^{#pm}#pi^{#pm}#pi^{#mp}#omega#nu";
452  else if (MODE_ID == MODE_KOMEGA)
453  return "#tau^{#pm} #rightarrow K^{#pm}#omega#nu";
454  else if (MODE_ID == MODE_K3PI0)
455  return "#tau^{#pm} #rightarrow K#pi^{0}#pi^{0}#pi^{0}#nu";
456  else if (MODE_ID == MODE_K2PIPI0)
457  return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}#pi^{#mp}#pi^{0}#nu";
458  else if (MODE_ID == MODE_KETA)
459  return "#tau^{#pm} #rightarrow K^{#pm}#eta#nu";
460  else if (MODE_ID == MODE_K0PI2PI0)
461  return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#pi^{0}#pi^{0}#nu";
462  else if (MODE_ID == MODE_K03PI)
463  return "#tau^{#pm} #rightarrow K^{0}#pi^{#pm}#pi^{#pm}#pi^{#mp}#nu";
464  else if (MODE_ID == MODE_2K0PIPI0)
465  return "#tau^{#pm} #rightarrow K^{0}#bar{K}^{0}#pi^{#pm}#pi^{-}#nu";
466  else if (MODE_ID == MODE_KPIKPI0)
467  return "#tau^{#pm} #rightarrow K^{#pm}#pi^{#pm}K^{#mp}#pi^{0}#nu";
468  return "UnKnown";
469 }
bool TauDecay::hasResonance ( unsigned int &  TauBitMask,
int  pdgid 
)

Definition at line 350 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.

350  {
351  int p = abs(pdgid);
352  if (p == PdtPdgMini::a_1_plus && Res_a1_pm & TauBitMask)
353  return true;
354  if (p == PdtPdgMini::a_10 && Res_a1_0 & TauBitMask)
355  return true;
356  if (p == PdtPdgMini::rho_plus && Res_rho_pm & TauBitMask)
357  return true;
358  if (p == PdtPdgMini::rho0 && Res_rho_0 & TauBitMask)
359  return true;
360  if (p == PdtPdgMini::eta && Res_eta & TauBitMask)
361  return true;
362  if (p == PdtPdgMini::omega && Res_omega & TauBitMask)
363  return true;
364  if (p == PdtPdgMini::K_star0 && Res_Kstar_pm & TauBitMask)
365  return true;
366  if (p == PdtPdgMini::K_star_plus && Res_Kstar_0 & TauBitMask)
367  return true;
368  if (p == PdtPdgMini::K_S0 && KS0_to_pipi & TauBitMask)
369  return true;
370  return false;
371 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool TauDecay::isTauFinalStateParticle ( int  pdgid)

Definition at line 32 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 TauValidation::analyze(), TauDecay_GenParticle::Analyze(), and TauDecay_CMSSW::Analyze().

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

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

64  {
65  int id = abs(pdgid);
66  //count particles
67  if (id == PdtPdgMini::pi_plus) {
68  n_pi++;
69  return true;
70  }
71  if (id == PdtPdgMini::pi0) {
72  n_pi0++;
73  return true;
74  }
75  if (id == PdtPdgMini::K_plus) {
76  n_K++;
77  return true;
78  }
79  if (id == PdtPdgMini::K_L0) {
80  n_K0L++;
81  return true;
82  }
83  if (id == PdtPdgMini::K_S0) {
84  n_K0S++;
85  return true;
86  }
87  if (id == PdtPdgMini::eta) {
88  n_eta++;
89  return true;
90  }
91  if (id == PdtPdgMini::omega) {
92  n_omega++;
93  return true;
94  }
95  if (id == PdtPdgMini::gamma) {
96  n_gamma++;
97  return true;
98  }
99  if (id == PdtPdgMini::nu_tau || id == PdtPdgMini::nu_e || id == PdtPdgMini::nu_mu) {
100  n_nu++;
101  return true;
102  }
103  if (id == PdtPdgMini::e_minus) {
104  n_e++;
105  return true;
106  }
107  if (id == PdtPdgMini::mu_minus) {
108  n_mu++;
109  return true;
110  }
111  if (abs(id) == PdtPdgMini::K0)
112  std::cout << "TauDecay::isTauParticleCounter: ERROR unidentified Particle: " << id << std::endl;
113  return false;
114 }
unsigned int n_pi
Definition: TauDecay.h:168
unsigned int n_nu
Definition: TauDecay.h:168
unsigned int n_omega
Definition: TauDecay.h:169
unsigned int n_K
Definition: TauDecay.h:168
unsigned int n_mu
Definition: TauDecay.h:168
unsigned int n_eta
Definition: TauDecay.h:169
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int n_K0S
Definition: TauDecay.h:168
unsigned int n_e
Definition: TauDecay.h:168
tuple cout
Definition: gather_cfg.py:144
unsigned int n_K0L
Definition: TauDecay.h:168
unsigned int n_pi0
Definition: TauDecay.h:168
unsigned int n_gamma
Definition: TauDecay.h:168
bool TauDecay::isTauResonanceCounter ( int  pdgid)

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

116  {
117  int id = abs(pdgid);
118  //count resonances
119  if (id == PdtPdgMini::a_1_plus) {
120  n_a1++;
121  return true;
122  }
123  if (id == PdtPdgMini::a_10) {
124  n_a10++;
125  return true;
126  }
127  if (id == PdtPdgMini::rho_plus) {
128  n_rho++;
129  return true;
130  }
131  if (id == PdtPdgMini::rho0) {
132  n_rho0++;
133  return true;
134  }
135  if (id == PdtPdgMini::K_star0) {
136  n_Kstar0++;
137  return true;
138  }
139  if (id == PdtPdgMini::K_star_plus) {
140  n_Kstar++;
141  return true;
142  }
143  if (id == PdtPdgMini::W_plus) {
144  return true;
145  }
146  unknown++;
147  return false;
148 }
unsigned int unknown
Definition: TauDecay.h:169
unsigned int n_rho0
Definition: TauDecay.h:169
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int n_a10
Definition: TauDecay.h:169
unsigned int n_a1
Definition: TauDecay.h:169
unsigned int n_Kstar0
Definition: TauDecay.h:169
unsigned int n_rho
Definition: TauDecay.h:169
unsigned int n_Kstar
Definition: TauDecay.h:169
unsigned int TauDecay::nPi0 ( unsigned int &  TauBitMask)

Definition at line 340 of file TauDecay.cc.

References OnePi0, ThreePi0, and TwoPi0.

340  {
341  if (OnePi0 & TauBitMask)
342  return 1;
343  if (TwoPi0 & TauBitMask)
344  return 2;
345  if (ThreePi0 & TauBitMask)
346  return 3;
347  return 0;
348 }
unsigned int TauDecay::nProng ( unsigned int &  TauBitMask)

Definition at line 331 of file TauDecay.cc.

References FiveProng, OneProng, and ThreeProng.

Referenced by TauValidation::analyze().

331  {
332  if (OneProng & TauBitMask)
333  return 1;
334  if (ThreeProng & TauBitMask)
335  return 3;
336  if (FiveProng & TauBitMask)
337  return 5;
338  return 7;
339 }
void TauDecay::Reset ( )

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

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

Member Data Documentation

unsigned int TauDecay::n_a1
private

Definition at line 169 of file TauDecay.h.

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

unsigned int TauDecay::n_a10
private

Definition at line 169 of file TauDecay.h.

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

unsigned int TauDecay::n_e
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_eta
private

Definition at line 169 of file TauDecay.h.

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

unsigned int TauDecay::n_gamma
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_K
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_K0L
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_K0S
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_Kstar
private

Definition at line 169 of file TauDecay.h.

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

unsigned int TauDecay::n_Kstar0
private

Definition at line 169 of file TauDecay.h.

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

unsigned int TauDecay::n_mu
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_nu
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_omega
private

Definition at line 169 of file TauDecay.h.

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

unsigned int TauDecay::n_pi
private

Definition at line 168 of file TauDecay.h.

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

unsigned int TauDecay::n_pi0
private

Definition at line 168 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 169 of file TauDecay.h.

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

unsigned int TauDecay::unknown
private

Definition at line 169 of file TauDecay.h.

Referenced by isTauResonanceCounter(), and Reset().