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

Public Member Functions

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

Public Attributes

 file
 Output ROOT file.
 
 tree
 TTree for output data.
 
 data
 Instance of EventData class.
 

Detailed Description

A simple module to check the simulation of PXDTrueHits with Geant4 steps.
This module writes its output to a ROOT tree.
Primary goal is supporting of validation plots

Definition at line 41 of file PXDValidationTTreeSimHit.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 49 of file PXDValidationTTreeSimHit.py.

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

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Does nothing 

Definition at line 68 of file PXDValidationTTreeSimHit.py.

◆ event()

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

Definition at line 71 of file PXDValidationTTreeSimHit.py.

◆ terminate()

def terminate (   self)
Close the output file.

Definition at line 121 of file PXDValidationTTreeSimHit.py.


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