Belle II Software development
SVDRecoDigitsQuickCheck Class Reference
Inheritance diagram for SVDRecoDigitsQuickCheck:

Public Member Functions

def initialize (self)
 
def event (self)
 
def terminate (self)
 

Detailed Description

quick check of SVDRecoDigits

Definition at line 267 of file testNewReco.py.

Member Function Documentation

◆ event()

def event (   self)
look at old and new reco digits

Definition at line 302 of file testNewReco.py.

302 def event(self):
303 '''look at old and new reco digits'''
304
305 recodigitList = Belle2.PyStoreArray("SVDRecoDigits")
306 recodigitListNew = Belle2.PyStoreArray("SVDNewRecoDigits")
307
308 print("number of recodigits = " + str(recodigitList.getEntries()) +
309 " (old) VS " + str(recodigitListNew.getEntries()) + " (new)")
310
311 for d in recodigitList:
312 self.time.Fill(d.getTime())
313 self.charge.Fill(d.getCharge())
314 isU = 0
315 if(d.isUStrip()):
316 isU = 0.5
317 self.test[d.getSensorID().getLayerNumber() - 3].Fill(d.getSensorID().getLadderNumber(),
318 d.getSensorID().getSensorNumber() + isU)
319
320 for d in recodigitListNew:
321 self.timeNew.Fill(d.getTime())
322 self.chargeNew.Fill(d.getCharge())
323 isU = 0
324 if(d.isUStrip()):
325 isU = 0.5
326 self.testNew[d.getSensorID().getLayerNumber() - 3].Fill(d.getSensorID().getLadderNumber(),
327 d.getSensorID().getSensorNumber() + isU)
328
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

◆ initialize()

def initialize (   self)
define histograms

Definition at line 270 of file testNewReco.py.

270 def initialize(self):
271 '''define histograms'''
272
273
274 self.test = []
275 self.testNew = []
276 self.time = TH1F("rd_time", "RecoDigit Time", 300, -100, 200)
277 self.timeNew = TH1F("rdNew_time", "New RecoDigit Time", 300, -100, 200)
278 self.charge = TH1F("rd_charge", "RecoDigit Charge", 300, 0, 100000)
279 self.chargeNew = TH1F("rdNew_charge", "New RecoDigit Charge", 300, 0, 100000)
280
281
283
284 ladderN = 0
285 sensorN = 0
286
287 for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
288 layerNumber = layer.getLayerNumber()
289 ladderN = 0
290 for ladder in geoCache.getLadders(layer):
291 ladderN = ladderN + 1
292 sensorN = 0
293 for sensor in geoCache.getSensors(ladder):
294 sensorN = sensorN + 1
295 self.test.append(TH2F("rd_layer" + str(layerNumber), "Layer " + str(layerNumber) +
296 " Ladder VS Sensor.Side", ladderN, 0.5, ladderN + 0.5, 2 * sensorN, +0.75, sensorN + 0.75))
297 self.testNew.append(TH2F("rdNew_layer" + str(layerNumber), "Layer " + str(layerNumber) +
298 " Ladder VS Sensor.Side", ladderN, 0.5, ladderN + 0.5, 2 * sensorN, +0.75, sensorN + 0.75))
299
300 print(self.test)
301
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214

◆ terminate()

def terminate (   self)
write

Definition at line 329 of file testNewReco.py.

329 def terminate(self):
330 '''write'''
331
332 f = TFile("quicktestSVDRecoDigitOldDefault.root", "RECREATE")
333 for hist in self.test:
334 hist.GetXaxis().SetTitle("ladder #")
335 hist.GetYaxis().SetTitle("sensor # + 0.5 is isU")
336 hist.Write()
337 for hist in self.testNew:
338 hist.GetXaxis().SetTitle("ladder #")
339 hist.GetYaxis().SetTitle("sensor # + 0.5 is isU")
340 hist.Write()
341
342 self.time.GetXaxis().SetTitle("recodigit time (ns)")
343 self.time.Write()
344 self.timeNew.GetXaxis().SetTitle("recodigit time (ns)")
345 self.timeNew.Write()
346
347 self.charge.GetXaxis().SetTitle("recodigit charge (ke-)")
348 self.charge.Write()
349 self.chargeNew.GetXaxis().SetTitle("recodigit charge (ke-)")
350 self.chargeNew.Write()
351
352 f.Close()
353
354# b2conditions.prepend_globaltag("svd_test_svdRecoConfiguration")
355
356

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