392 svdEventT0 = math.nan
393 cdcEventT0 = math.nan
397 if EventT0.hasTemporaryEventT0(svd):
398 tmp = EventT0.getTemporaryEventT0s(Belle2.Const.SVD)
399 svdEventT0 = tmp.back().eventT0
400 if EventT0.hasTemporaryEventT0(cdc):
401 tmp = EventT0.getTemporaryEventT0s(Belle2.Const.CDC)
402 cdcEventT0 = tmp.back().eventT0
404 if not math.isnan(svdEventT0):
405 self.TH1F_Store[self.TH1F_Index[
"th1f_svdEventT0"]].Fill(svdEventT0)
406 self.TH1F_Store[self.TH1F_Index[
"th1f_svdEventT0_State"]].Fill(1)
408 self.TH1F_Store[self.TH1F_Index[
"th1f_svdEventT0_State"]].Fill(0)
409 if not math.isnan(cdcEventT0):
410 self.TH1F_Store[self.TH1F_Index[
"th1f_cdcEventT0"]].Fill(cdcEventT0)
411 self.TH1F_Store[self.TH1F_Index[
"th1f_cdcEventT0_State"]].Fill(1)
413 self.TH1F_Store[self.TH1F_Index[
"th1f_cdcEventT0_State"]].Fill(0)
415 if not math.isnan(svdEventT0)
and not math.isnan(cdcEventT0):
416 self.TH2F_Store[self.TH2F_Index[
"th2f_svdEventT0_vs_cdcEventT0"]].Fill(svdEventT0, cdcEventT0)
417 self.TH2F_Store[self.TH2F_Index[
"th2f_svdEventT0_vs_cdcEventT0_rot45pos"]].Fill(
418 svdEventT0 * TMath.Cos(TMath.PiOver4()) + cdcEventT0 * TMath.Sin(TMath.PiOver4()),
419 - svdEventT0 * TMath.Sin(TMath.PiOver4()) + cdcEventT0 * TMath.Cos(TMath.PiOver4()))
420 self.TH2F_Store[self.TH2F_Index[
"th2f_svdEventT0_vs_cdcEventT0_rot45neg"]].Fill(
421 svdEventT0 * TMath.Cos(-TMath.PiOver4()) + cdcEventT0 * TMath.Sin(-TMath.PiOver4()),
422 - svdEventT0 * TMath.Sin(-TMath.PiOver4()) + cdcEventT0 * TMath.Cos(-TMath.PiOver4()))
427 topOnlineEventT0 = math.nan
428 for evt
in OnlineEventT0:
429 if evt.getOnlineEventT0Detector() == top:
430 topOnlineEventT0 = evt.getOnlineEventT0()
432 if not math.isnan(topOnlineEventT0)
and not math.isnan(svdEventT0):
433 self.TH1F_Store[self.TH1F_Index[
"th1f_svdEventT0topRef"]].Fill(svdEventT0 - topOnlineEventT0)
439 for trgHit
in TRGECLData:
440 hitWin = trgHit.getHitWin()
441 if hitWin != 3
and hitWin != 4:
443 if trgHit.getTCEnergy() > eclTCEmax:
444 eclTCEmax = trgHit.getTCEnergy()
447 self.TH1F_Store[self.TH1F_Index[
"th1f_eclTCEmax"]].Fill(eclTCEmax)
448 self.TH1F_Store[self.TH1F_Index[
"th1f_eclTCEmax_State"]].Fill(1)
449 if not math.isnan(topOnlineEventT0)
and not math.isnan(svdEventT0):
450 self.reso_TH2D_Histograms[self.reso_TH2D_Histogram_Index[
"reso_eclTCEmax_vs_svdEventT0TopRef"]].Fill(
451 eclTCEmax, svdEventT0 - topOnlineEventT0)
453 self.TH1F_Store[self.TH1F_Index[
"th1f_eclTCEmax_State"]].Fill(0)
459 self.reso_TH2D_Histograms[self.reso_TH2D_Histogram_Index[
"reso_eclTCEmax_vs_totalClusters_PreTracking"]].Fill(
460 eclTCEmax, len(clusterList))
462 for d
in clusterList:
463 clsTime = d.getClsTime()
465 self.TH1F_Store[self.TH1F_Index[
"th1f_clsTime_PreTracking"]].Fill(clsTime)
466 if not math.isnan(cdcEventT0):
467 self.TH1F_Store[self.TH1F_Index[
"th1f_clsTimeCdcRef_PreTracking"]].Fill(clsTime - cdcEventT0)
468 if not math.isnan(topOnlineEventT0)
and eclTCEmax:
469 self.reso_TH2D_Histograms[self.reso_TH2D_Histogram_Index[
"reso_eclTCEmax_vs_clsTimeTopRef_PreTracking"]].Fill(
470 eclTCEmax, clsTime - topOnlineEventT0)
472 groupIds = d.getTimeGroupId()
473 groupInfo = d.getTimeGroupInfo()
479 for id
in range(len(groupIds)):
483 if len(groupInfo) > 0:
484 par0, par1, par2 = groupInfo[id]
486 if len(groupIds) == 0:
489 self.TH2F_Store[self.TH2F_Index[
"th2f_timeGr_vs_clsTime"]].Fill(clsTime, minId)
490 self.TH2F_Store[self.TH2F_Index[
"th2f_timeGr_vs_grAmp"]].Fill(par0, minId)
491 self.TH2F_Store[self.TH2F_Index[
"th2f_timeGr_vs_grCenter"]].Fill(par1, minId)
492 self.TH2F_Store[self.TH2F_Index[
"th2f_timeGr_vs_grWidth"]].Fill(par2, minId)
494 if fillOnce == minId
and fillOnce < 4:
495 if not math.isnan(cdcEventT0):
496 hname =
"th2f_sig" + str(fillOnce) +
"GrMean_vs_cdcEventT0"
497 self.TH2F_Store[self.TH2F_Index[hname]].Fill(par1, cdcEventT0)
498 hname =
"th2f_sig" + str(fillOnce) +
"GrMean_vs_cdcEventT0_rot45neg"
499 self.TH2F_Store[self.TH2F_Index[hname]].Fill(
500 par1 * TMath.Cos(-TMath.PiOver4()) + cdcEventT0 * TMath.Sin(-TMath.PiOver4()),
501 - par1 * TMath.Sin(-TMath.PiOver4()) + cdcEventT0 * TMath.Cos(-TMath.PiOver4()))
502 hname =
"th2f_sig" + str(fillOnce) +
"GrMean_vs_cdcEventT0_rot45pos"
503 self.TH2F_Store[self.TH2F_Index[hname]].Fill(
504 par1 * TMath.Cos(TMath.PiOver4()) + cdcEventT0 * TMath.Sin(TMath.PiOver4()),
505 - par1 * TMath.Sin(TMath.PiOver4()) + cdcEventT0 * TMath.Cos(TMath.PiOver4()))
509 self.TH1F_Store[self.TH1F_Index[
"th1f_sigClsTime_PreTracking"]].Fill(clsTime)
511 self.TH1F_Store[self.TH1F_Index[
"th1f_bkgClsTime_PreTracking"]].Fill(clsTime)
516 nTracks = len(recoTrackList)
518 for recoTrk
in recoTrackList:
519 if not recoTrk.wasFitSuccessful():
523 trackList = recoTrk.getRelationsFrom(
'Tracks')
524 if len(trackList) == 0:
527 trkTime0 = trackList[0].getTrackTime()
529 self.TH1F_Store[self.TH1F_Index[
"th1f_trackTime"]].Fill(trkTime0)
530 if not math.isnan(cdcEventT0):
531 self.TH1F_Store[self.TH1F_Index[
"th1f_trackTimeCDCRef"]].Fill(trkTime0 - cdcEventT0)
533 clusterList = recoTrk.getRelationsFrom(
"SVDClusters")
534 nClusters += len(clusterList)
535 if len(clusterList) == 0:
539 for d
in clusterList:
540 trkTime += d.getClsTime()
541 trkTime /= len(clusterList)
543 for d
in clusterList:
544 clsTime = d.getClsTime()
545 groupIds = d.getTimeGroupId()
546 groupInfo = d.getTimeGroupInfo()
548 if not math.isnan(svdEventT0):
549 self.TH2F_Store[self.TH2F_Index[
"th2f_trkTime_vs_clsTime_inSVDEventT0"]].Fill(
550 trkTime0 - clsTime, svdEventT0 - trkTime0)
551 if not math.isnan(cdcEventT0):
552 self.TH2F_Store[self.TH2F_Index[
"th2f_trkTime_vs_clsTime_inCDCEventT0"]].Fill(
553 trkTime0 - clsTime, cdcEventT0 - trkTime0)
554 self.TH2F_Store[self.TH2F_Index[
"th2f_aveClsTimeInTrk_vs_cdcEventT0"]].Fill(trkTime, cdcEventT0)
555 if not math.isnan(svdEventT0):
556 self.TH2F_Store[self.TH2F_Index[
"th2f_aveClsTimeInTrk_vs_clsTime_inSVDEventT0"]].Fill(
557 trkTime - clsTime, svdEventT0 - trkTime)
558 if not math.isnan(cdcEventT0):
559 self.TH2F_Store[self.TH2F_Index[
"th2f_aveClsTimeInTrk_vs_clsTime_inCDCEventT0"]].Fill(
560 trkTime - clsTime, cdcEventT0 - trkTime)
562 self.TH1F_Store[self.TH1F_Index[
"th1f_clsTime_PostTracking"]].Fill(clsTime)
563 if not math.isnan(cdcEventT0):
564 self.TH1F_Store[self.TH1F_Index[
"th1f_clsTimeCdcRef_PostTracking"]].Fill(clsTime - cdcEventT0)
565 if not math.isnan(topOnlineEventT0)
and eclTCEmax:
566 self.reso_TH2D_Histograms[self.reso_TH2D_Histogram_Index[
"reso_eclTCEmax_vs_clsTimeTopRef_PostTracking"]].Fill(
567 eclTCEmax, clsTime - topOnlineEventT0)
573 if len(groupIds) == 0:
575 for id
in range(len(groupIds)):
579 if len(groupInfo) > 0:
580 par0, par1, par2 = groupInfo[id]
582 self.TH2F_Store[self.TH2F_Index[
"th2f_timeGr_vs_clsTime_PostTracking"]].Fill(clsTime, minId)
584 if par1 > sigMin
and par1 < sigMax:
585 self.TH1F_Store[self.TH1F_Index[
"th1f_sigClsTime_PostTracking"]].Fill(clsTime)
587 self.TH1F_Store[self.TH1F_Index[
"th1f_bkgClsTime_PostTracking"]].Fill(clsTime)
590 self.reso_TH2D_Histograms[self.reso_TH2D_Histogram_Index[
"reso_eclTCEmax_vs_totalTracks"]].Fill(eclTCEmax, nTracks)
591 self.reso_TH2D_Histograms[self.reso_TH2D_Histogram_Index[
"reso_eclTCEmax_vs_totalClusters_PostTracking"]].Fill(
592 eclTCEmax, nClusters)
The DetectorSet class for sets of detector IDs in the form of EDetector values.
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.