13 <contact>software-tracking@belle2.org</contact>
14 <input>EvtGenSim.root</input>
15 <output>TrackingInputValidationBkg.root</output>
17 This module checks the number of input hits for tracking.
23 from ROOT
import Belle2
27 from svd
import add_svd_reconstruction
28 from pxd
import add_pxd_reconstruction
29 NAME =
'Tracking Input Validation'
30 CONTACT =
'software-tracking@belle2.org'
31 INPUT_FILE =
'../EvtGenSim.root'
32 OUTPUT_FILE =
'TrackingInputValidationBkg.root'
38 basf2.set_random_seed(1509)
43 Module to collect information about the number of
57 output_file_name=None,
70 """Receive signal at the start of event processing"""
118 """Receive signal at the end of event processing"""
121 output_tfile = ROOT.TFile(self.
output_file_nameoutput_file_name,
'recreate')
124 h_nPXDDigits.hist(self.
nPXDDigitsnPXDDigits, bins=100, lower_bound=0, upper_bound=1000)
125 h_nPXDDigits.contact = self.
contactcontact
126 h_nPXDDigits.check =
'Average of 250 +/- 100 is expected'
127 h_nPXDDigits.description =
'Number of PXDDigits after ROI filtering'
128 h_nPXDDigits.title =
'Number of selected PXDDigits per event'
129 h_nPXDDigits.xlabel =
'Number of PXDDigits'
130 h_nPXDDigits.ylabel =
''
131 h_nPXDDigits.write(output_tfile)
134 h_nPXDClusters.hist(self.
nPXDClustersnPXDClusters, bins=100, lower_bound=0, upper_bound=500)
135 h_nPXDClusters.contact = self.
contactcontact
136 h_nPXDClusters.check =
'Average of 75 +/- 20 is expected'
137 h_nPXDClusters.description =
'Number of PXDClusters after ROI filtering'
138 h_nPXDClusters.title =
'Number of PXDClusters per event'
139 h_nPXDClusters.xlabel =
'Number of PXDClusters'
140 h_nPXDClusters.ylabel =
''
141 h_nPXDClusters.write(output_tfile)
144 h_nPXDSpacePoints.hist(self.
nPXDSpacePointsnPXDSpacePoints, bins=100, lower_bound=0, upper_bound=500)
145 h_nPXDSpacePoints.contact = self.
contactcontact
146 h_nPXDSpacePoints.check =
'Average of 75 +/- 20 is expected'
147 h_nPXDSpacePoints.description =
'Number of PXDSpacePoints after ROI filtering. \
148 Should be the same as the number of PXDClusters'
149 h_nPXDSpacePoints.title =
'Number of PXDSpacePoints per event'
150 h_nPXDSpacePoints.xlabel =
'Number of PXDSpacePoints'
151 h_nPXDSpacePoints.ylabel =
''
152 h_nPXDSpacePoints.write(output_tfile)
155 h_nSVDShaperDigits.hist(self.
nSVDShaperDigitsnSVDShaperDigits, bins=100, lower_bound=0, upper_bound=10000)
156 h_nSVDShaperDigits.contact = self.
contactcontact
157 h_nSVDShaperDigits.check =
'First peak at about 3200 +/- 200 is expected, with a second peak round 5500'
158 h_nSVDShaperDigits.description =
'Number of SVDDigits'
159 h_nSVDShaperDigits.title =
'Number of SVDDigits per event'
160 h_nSVDShaperDigits.xlabel =
'Number of SVDDigits'
161 h_nSVDShaperDigits.ylabel =
''
162 h_nSVDShaperDigits.write(output_tfile)
165 h_nSVDClusters.hist(self.
nSVDClustersnSVDClusters, bins=100, lower_bound=0, upper_bound=2000)
166 h_nSVDClusters.contact = self.
contactcontact
167 h_nSVDClusters.check =
'Average of 500 +/- 100 is expected'
168 h_nSVDClusters.description =
'Number of SVDClusters'
169 h_nSVDClusters.title =
'Number of SVDClusters per event'
170 h_nSVDClusters.xlabel =
'Number of SVDClusters'
171 h_nSVDClusters.ylabel =
''
172 h_nSVDClusters.write(output_tfile)
175 h_nSVDSpacePoints.hist(self.
nSVDSpacePointsnSVDSpacePoints, bins=100, lower_bound=0, upper_bound=2000)
176 h_nSVDSpacePoints.contact = self.
contactcontact
177 h_nSVDSpacePoints.check =
'Average of 200 +/- 50 is expected'
178 h_nSVDSpacePoints.description =
'Number of SVDSpacePoints'
179 h_nSVDSpacePoints.title =
'Number of SVDSpacePoints per event'
180 h_nSVDSpacePoints.xlabel =
'Number of SVDSpacePoints'
181 h_nSVDSpacePoints.ylabel =
''
182 h_nSVDSpacePoints.write(output_tfile)
185 h_nCDCHits.hist(self.
nCDCHitsnCDCHits, bins=100, lower_bound=0, upper_bound=5000)
186 h_nCDCHits.contact = self.
contactcontact
187 h_nCDCHits.check =
'Average of 3000 +/- 200 is expected'
188 h_nCDCHits.description =
'Number of CDCHits'
189 h_nCDCHits.title =
'Number of CDCHits per event'
190 h_nCDCHits.xlabel =
'Number of CDCHits'
191 h_nCDCHits.ylabel =
''
192 h_nCDCHits.write(output_tfile)
199 path = basf2.create_path()
201 path.add_module(
'RootInput', inputFileName=INPUT_FILE)
202 path.add_module(
'Gearbox')
203 path.add_module(
'Geometry')
204 add_svd_reconstruction(path, isROIsimulation=
False)
205 add_pxd_reconstruction(path)
209 path.add_module(
'Progress')
A (simplified) python wrapper for StoreArray.