Belle II Software  release-08-01-10
SVDValidationTTreeSimhit Class Reference
Inheritance diagram for SVDValidationTTreeSimhit:
Collaboration diagram for SVDValidationTTreeSimhit:

Public Member Functions

def __init__ (self)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 file
 output file
 
 tree
 output ttree
 
 data
 instance of eventDataSimhit
 

Detailed Description

class to create sim hit ttree

Definition at line 45 of file SVDValidationTTreeSimhit.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 48 of file SVDValidationTTreeSimhit.py.

48  def __init__(self):
49  """Initialize the module"""
50 
51  super(SVDValidationTTreeSimhit, self).__init__()
52 
53  self.file = ROOT.TFile('../SVDValidationTTreeSimhit.root', 'recreate')
54 
55  self.tree = ROOT.TTree('tree', 'Event data of SVD validation events')
56 
57  self.data = EventDataSimhit()
58 
59  # Declare tree branches
60  for key in EventDataSimhit.__dict__:
61  if '__' not in key:
62  formstring = '/F'
63  if isinstance(self.data.__getattribute__(key), int):
64  formstring = '/I'
65  self.tree.Branch(key, addressof(self.data, key), key + formstring)
66 

Member Function Documentation

◆ event()

def event (   self)
Find simhits with a truehit and save needed information

Definition at line 67 of file SVDValidationTTreeSimhit.py.

◆ terminate()

def terminate (   self)
Close the output file. 

Definition at line 116 of file SVDValidationTTreeSimhit.py.


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