Belle II Software  release-06-01-15
DecayHashMap Class Reference

Public Member Functions

def __init__ (self, rootfile, removeRadiativeGammaFlag=False)
 
def get_string (self, decayHash, decayHashExtended)
 
def get_original_decay (self, decayHash, decayHashExtended)
 
def get_reconstructed_decay (self, decayHash, decayHashExtended)
 
def print_hash (self, decayHash, decayHashExtended)
 

Private Attributes

 _string
 Dict Int -> DecayStrings.
 
 _forest
 Dict Int -> Reconstructed DecayTree.
 

Detailed Description

DecayHashMap using the C++ implementation of DecayTree and DecayNode

Definition at line 56 of file decayHash.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  rootfile,
  removeRadiativeGammaFlag = False 
)
Constructor

Definition at line 61 of file decayHash.py.

61  def __init__(self, rootfile, removeRadiativeGammaFlag=False):
62  """Constructor"""
63  import root_numpy
64  ntuple = root_numpy.root2array(rootfile)
65  # self._removeGammaFlag = removeRadiativeGammaFlag
66 
67  self._string = {}
68 
69  self._forest = {}
70  for decayHash, decayHashExtended, decayString in ntuple:
71  decayInt = Belle2.DecayForest.decayHashFloatToInt(decayHash, decayHashExtended)
72  if decayInt in self._string:
73  continue
74  self._string[decayInt] = decayString
75  self._forest[decayInt] = Belle2.DecayForest(decayString, True, removeRadiativeGammaFlag)
76 
Contains several DecayTree objects, which belong all to the same candidate.
Definition: DecayForest.h:24
static int decayHashFloatToInt(float decayHash, float decayHashExtended)
Convert DecayHashes outputted by ParticleMCDecayString module to an integer.
Definition: DecayForest.cc:43

Member Function Documentation

◆ get_original_decay()

def get_original_decay (   self,
  decayHash,
  decayHashExtended 
)
Return original (MC) DecayTree given the decayHash and decayHashExtended
@param decayHash output of extraInfo(decayHash)
@param decayHashExtended output of extraInfo(decayHashExtended)

Definition at line 85 of file decayHash.py.

◆ get_reconstructed_decay()

def get_reconstructed_decay (   self,
  decayHash,
  decayHashExtended 
)
Return reconstructed DecayTree given the decayHash and decayHashExtended
@param decayHash output of extraInfo(decayHash)
@param decayHashExtended output of extraInfo(decayHashExtended)

Definition at line 93 of file decayHash.py.

◆ get_string()

def get_string (   self,
  decayHash,
  decayHashExtended 
)
Return DecayString given the decayHash and decayHashExtended
@param decayHash output of extraInfo(decayHash)
@param decayHashExtended output of extraInfo(decayHashExtended)

Definition at line 77 of file decayHash.py.

◆ print_hash()

def print_hash (   self,
  decayHash,
  decayHashExtended 
)
Print the DecayString in a fancy way given the decayHash and decayHashExtended
@param decayHash output of extraInfo(decayHash)
@param decayHashExtended output of extraInfo(decayHashExtended)

Definition at line 101 of file decayHash.py.


The documentation for this class was generated from the following file: