|
| file |
| Output ROOT file.
|
|
| tree |
| TTree for output data.
|
|
| h_consts |
| Histogram for constances.
|
|
| data |
| Instance of EventData class.
|
|
A simple module to check the reconstruction of PXDTrueHits.
This module writes its output to a ROOT tree.
Primary goal is supporting of validation plots
Definition at line 54 of file PXDValidationTTree.py.
◆ __init__()
Initialize the module
Definition at line 62 of file PXDValidationTTree.py.
63 """Initialize the module"""
65 super(PXDValidationTTree, self).__init__()
67 self.file = ROOT.TFile(
'PXDValidationTTreeOutput.root',
'recreate')
69 self.tree = ROOT.TTree(
'tree',
'Event data of PXD simulation')
71 self.h_consts = ROOT.TH1F(
'h_consts',
'Constances', 12, 0, 12)
72 self.h_consts.GetXaxis().SetBinLabel(1,
'Sensor thicknes [cm] (0.0075)')
73 self.h_consts.GetXaxis().SetBinLabel(2,
'Pitch in u - all sensors [cm] (0.005)')
74 self.h_consts.GetXaxis().SetBinLabel(3,
'Pitch in v, layer 1 small pitch [cm] (0.0055)')
75 self.h_consts.GetXaxis().SetBinLabel(4,
'Pitch in v, layer 1 large pitch [cm] (0.006)')
76 self.h_consts.GetXaxis().SetBinLabel(5,
'Pitch in v, layer 2 small pitch [cm] (0.007)')
77 self.h_consts.GetXaxis().SetBinLabel(6,
'Pitch in v, layer 2 large pitch [cm] (0.0085)')
78 self.h_consts.GetXaxis().SetBinLabel(7,
'Number of cells in u, all layers (250)')
79 self.h_consts.GetXaxis().SetBinLabel(8,
'Number of cells in v, layer 1 small pitch (256)')
80 self.h_consts.GetXaxis().SetBinLabel(9,
'Number of cells in v, layer 1 large pitch (512)')
81 self.h_consts.GetXaxis().SetBinLabel(10,
'Number of cells in v, layer 2 small pitch (256)')
82 self.h_consts.GetXaxis().SetBinLabel(11,
'Number of cells in v, layer 2 large pitch (512)')
83 self.h_consts.GetXaxis().SetBinLabel(12,
'Noise of digits of sensors [electrons] (200)')
85 self.data = EventData()
87 for key
in EventData.__dict__:
90 if isinstance(self.data.__getattribute__(key), int):
92 self.tree.Branch(key, AddressOf(self.data, key), key + formstring)
◆ beginRun()
◆ event()
◆ terminate()
The documentation for this class was generated from the following file: