14 This module is used
for the SVD validation.
15 It gets information about all SpacePoints, saving
16 in a ttree
in a ROOT file.
18 <noexecute>SVD validation helper
class</noexecute>
26from ROOT import Belle2
27from ROOT
import gROOT, addressof
30gROOT.ProcessLine(
'struct EventDataSpacePoint {\
40from ROOT
import EventDataSpacePoint
44 '''class to create spacepoint ttree'''
47 """Initialize the module"""
51 self.
file = ROOT.TFile(
'../SVDValidationTTreeSpacePoint.root',
'recreate')
53 self.
tree = ROOT.TTree(
'tree',
'Event data of SVD validation events')
55 self.
data = EventDataSpacePoint()
58 for key
in EventDataSpacePoint.__dict__:
61 if isinstance(self.
data.__getattribute__(key), int):
63 self.
tree.Branch(key, addressof(self.
data, key), key + formstring)
66 """Find SVD SpacePoints in the event"""
70 for sp
in spacepoints:
73 sensorID = sp.getVxdID()
74 self.
data.sensor_id = int(sensorID)
75 sensorNum = sensorID.getSensorNumber()
76 self.
data.sensor = sensorNum
77 layerNum = sensorID.getLayerNumber()
80 sp_type = sp.getType()
84 self.
data.layer = layerNum
92 self.
data.sensor_type = sensorType
93 self.
data.ladder = sensorID.getLadderNumber()
96 self.
data.time_u = sp.TimeU()
97 self.
data.time_v = sp.TimeV()
104 """Close the output file. """
A (simplified) python wrapper for StoreArray.
data
instance of EventDataSpacePoint class