Belle II Software  light-2205-abys
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 49 of file decayHash.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 54 of file decayHash.py.

54  def __init__(self, rootfile, removeRadiativeGammaFlag=False):
55  """Constructor"""
56  import root_numpy
57  import ROOT
58  ntuple = root_numpy.root2array(rootfile)
59  # self._removeGammaFlag = removeRadiativeGammaFlag
60 
61  self._string = {}
62 
63  self._forest = {}
64  for decayHash, decayHashExtended, decayString in ntuple:
65  decayInt = ROOT.Belle2.DecayForest.decayHashFloatToInt(decayHash, decayHashExtended)
66  if decayInt in self._string:
67  continue
68  self._string[decayInt] = decayString
69  self._forest[decayInt] = ROOT.Belle2.DecayForest(decayString, True, removeRadiativeGammaFlag)
70 

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 80 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 89 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 71 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 98 of file decayHash.py.


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