Belle II Software  release-05-02-19
DecayHashMap Class Reference
Inheritance diagram for DecayHashMap:
Collaboration diagram for DecayHashMap:

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 52 of file decayHash.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 56 of file decayHash.py.

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

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 88 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 72 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 96 of file decayHash.py.


The documentation for this class was generated from the following file:
Belle2::DecayForest::decayHashFloatToInt
static int decayHashFloatToInt(float decayHash, float decayHashExtended)
Convert DecayHashes outputted by ParticleMCDecayString module to an integer.
Definition: DecayForest.cc:45
Belle2::DecayForest
Contains several DecayTree objects, which belong all to the same candidate.
Definition: DecayForest.h:36