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

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 reconstruction of PXDTrueHits.
This module writes its output to a ROOT tree.

Definition at line 51 of file PXDHitErrorsTTree.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 58 of file PXDHitErrorsTTree.py.

58  def __init__(self):
59  """Initialize the module"""
60 
61  super().__init__()
62 
63  self.file = ROOT.TFile('PXDHitErrorOutput.root', 'recreate')
64 
65  self.tree = ROOT.TTree('tree', 'Event data of PXD simulation')
66 
67  self.data = EventData()
68  # Declare tree branches
69  for key in EventData.__dict__:
70  if '__' not in key:
71  formstring = '/F'
72  if isinstance(self.data.__getattribute__(key), int):
73  formstring = '/I'
74  self.tree.Branch(
75  key,
76  AddressOf(
77  self.data,
78  key),
79  key +
80  formstring)
81 

Member Function Documentation

◆ beginRun()

def beginRun (   self)
 Does nothing 

Definition at line 82 of file PXDHitErrorsTTree.py.

◆ event()

def event (   self)
Find clusters with a truehit and print some stats.

Definition at line 85 of file PXDHitErrorsTTree.py.

◆ terminate()

def terminate (   self)
 Close the output file.

Definition at line 141 of file PXDHitErrorsTTree.py.


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