5from BaseDetector
import BaseDetector
15 mcBranchName: str =
"digiSBT2MC",
28 """Digitize Surrounding Background Tagger MC hits.
30 TDC defined as the time of the first MC hit
in the cell.
31 Eloss defined
as the cumulative energy deposition of MC hits
in the cell.
38 for aMCPoint
in self.
intree.vetoPoint:
40 detID = aMCPoint.GetDetectorID()
41 Eloss = aMCPoint.GetEnergyLoss()
42 if detID
not in ElossPerDetId:
43 ElossPerDetId[detID] = 0
44 listOfVetoPoints[detID] = []
46 ElossPerDetId[detID] += Eloss
47 listOfVetoPoints[detID].append(key)
48 tOfFlight[detID].append(aMCPoint.GetTime())
49 for seg
in ElossPerDetId:
50 aHit = ROOT.vetoHit(seg, ElossPerDetId[seg])
51 aHit.SetTDC(min(tOfFlight[seg]) + self.
intree.t0)
52 if ElossPerDetId[seg] < 0.045:
54 self.
det.push_back(aHit)
55 v = ROOT.std.vector(
"int")()
56 for x
in listOfVetoPoints[seg]:
58 self.
MCdet.push_back(v)
None __init__(self, name, intree, branchName=None, mcBranchType=None, str mcBranchName="digiSBT2MC", outtree=None)