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

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 35 of file PXDValidationTTreeDigit.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 43 of file PXDValidationTTreeDigit.py.

43  def __init__(self):
44  """Initialize the module"""
45 
46  super(PXDValidationTTreeDigit, self).__init__()
47 
48  self.file = ROOT.TFile('PXDValidationTTreeDigitOutput.root', 'recreate'
49  )
50 
51  self.tree = ROOT.TTree('tree', 'Event data of PXD simulation')
52 
53  self.data = EventDataDigit()
54  # Declare tree branches
55  for key in EventDataDigit.__dict__:
56  if '__' not in key:
57  formstring = '/F'
58  if isinstance(self.data.__getattribute__(key), int):
59  formstring = '/I'
60  self.tree.Branch(key, AddressOf(self.data, key), key + formstring)
61 

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Does nothing 

Definition at line 62 of file PXDValidationTTreeDigit.py.

◆ event()

def event (   self)
Find digits with a clusters and save needed information.

Definition at line 65 of file PXDValidationTTreeDigit.py.

◆ terminate()

def terminate (   self)
Close the output file.

Definition at line 120 of file PXDValidationTTreeDigit.py.


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