CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions
TauDecayModes.TauDecayModes Class Reference
Inheritance diagram for TauDecayModes.TauDecayModes:

Public Member Functions

def __init__
 
def __str__
 
def intToName
 
def nameToInt
 

Public Attributes

 decayModeNames
 
 decayModes
 

Private Member Functions

def _decayModes
 

Detailed Description

Definition at line 2 of file TauDecayModes.py.

Constructor & Destructor Documentation

def TauDecayModes.TauDecayModes.__init__ (   self)

Definition at line 4 of file TauDecayModes.py.

References TauDecayModes.TauDecayModes._decayModes().

4 
5  def __init__(self):
6  self._decayModes()

Member Function Documentation

def TauDecayModes.TauDecayModes.__str__ (   self)

Definition at line 41 of file TauDecayModes.py.

References TauDecayModes.TauDecayModes.decayModes.

41 
42  def __str__(self):
43  return str( self.decayModes )
def TauDecayModes.TauDecayModes._decayModes (   self)
private
Builds the internal dictionaries from the enum defined in 
http://cmslxr.fnal.gov/lxr/source/DataFormats/TauReco/interface/PFTau.h

Definition at line 7 of file TauDecayModes.py.

Referenced by TauDecayModes.TauDecayModes.__init__().

7 
8  def _decayModes(self):
9  '''Builds the internal dictionaries from the enum defined in
10  http://cmslxr.fnal.gov/lxr/source/DataFormats/TauReco/interface/PFTau.h'''
11  tmp = [
12  'kNull',
13  'kOneProng0PiZero',
14  'kOneProng1PiZero',
15  'kOneProng2PiZero',
16  'kOneProng3PiZero',
17  'kOneProngNPiZero',
18  'kTwoProng0PiZero',
19  'kTwoProng1PiZero',
20  'kTwoProng2PiZero',
21  'kTwoProng3PiZero',
22  'kTwoProngNPiZero',
23  'kThreeProng0PiZero',
24  'kThreeProng1PiZero',
25  'kThreeProng2PiZero',
26  'kThreeProng3PiZero',
27  'kThreeProngNPiZero',
28  'kRareDecayMode'
29  ]
30  self.decayModes = dict( (index-1, name) for index, name in enumerate( tmp ) )
31  self.decayModeNames = dict( (value, key) for key, value \
32  in self.decayModes.iteritems() )
def TauDecayModes.TauDecayModes.intToName (   self,
  anInt 
)
Returns the decay mode name corresponding to an int.

Definition at line 33 of file TauDecayModes.py.

References TauDecayModes.TauDecayModes.decayModes.

33 
34  def intToName( self, anInt ):
35  '''Returns the decay mode name corresponding to an int.'''
36  return self.decayModes[ anInt ]
def TauDecayModes.TauDecayModes.nameToInt (   self,
  aName 
)
Returns the decay mode int corresponding to a name.

Definition at line 37 of file TauDecayModes.py.

References TauDecayModes.TauDecayModes.decayModeNames.

37 
38  def nameToInt( self, aName ):
39  '''Returns the decay mode int corresponding to a name.'''
40  return self.decayModeNames[ aName ]

Member Data Documentation

TauDecayModes.TauDecayModes.decayModeNames

Definition at line 30 of file TauDecayModes.py.

Referenced by TauDecayModes.TauDecayModes.nameToInt().

TauDecayModes.TauDecayModes.decayModes

Definition at line 29 of file TauDecayModes.py.

Referenced by TauDecayModes.TauDecayModes.__str__(), and TauDecayModes.TauDecayModes.intToName().