Belle II Software  release-05-01-25
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 46 of file PXDHitErrorsTTree.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 53 of file PXDHitErrorsTTree.py.

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

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Does nothing 

Definition at line 71 of file PXDHitErrorsTTree.py.

◆ event()

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

Definition at line 74 of file PXDHitErrorsTTree.py.

◆ terminate()

def terminate (   self)
Close the output file.

Definition at line 126 of file PXDHitErrorsTTree.py.


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