FairShip
Loading...
Searching...
No Matches
SBTDetector.SBTDetector Class Reference
Inheritance diagram for SBTDetector.SBTDetector:
Collaboration diagram for SBTDetector.SBTDetector:

Public Member Functions

None __init__ (self, name, intree, branchName=None, mcBranchType=None, str mcBranchName="digiSBT2MC", outtree=None)
 
None digitize (self)
 
- Public Member Functions inherited from BaseDetector.BaseDetector
None __init__ (self, name, intree, branchName=None, mcBranchType=None, mcBranchName=None, int splitLevel=99, outtree=None)
 
None delete (self)
 
None fill (self)
 
None digitize (self)
 
None process (self)
 

Additional Inherited Members

- Public Attributes inherited from BaseDetector.BaseDetector
 name
 
 intree
 
 outtree
 
 det
 
 MCdet
 
 mcBranch
 
 branch
 

Detailed Description

Definition at line 8 of file SBTDetector.py.

Constructor & Destructor Documentation

◆ __init__()

None SBTDetector.SBTDetector.__init__ (   self,
  name,
  intree,
  branchName = None,
  mcBranchType = None,
str   mcBranchName = "digiSBT2MC",
  splitLevel = None 
)
Initialize the detector digitizer.

Reimplemented from BaseDetector.BaseDetector.

Definition at line 9 of file SBTDetector.py.

17 ) -> None:
18 super().__init__(
19 name,
20 intree,
21 branchName,
22 mcBranchType,
23 mcBranchName,
24 outtree=outtree,
25 )
26

Member Function Documentation

◆ digitize()

None SBTDetector.SBTDetector.digitize (   self)
Digitize Surrounding Background Tagger MC hits.

TDC defined as the time of the first MC hit in the cell.
Eloss defined as the cumulative energy deposition of MC hits in the cell.

Reimplemented from BaseDetector.BaseDetector.

Definition at line 27 of file SBTDetector.py.

27 def digitize(self) -> None:
28 """Digitize Surrounding Background Tagger MC hits.
29
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.
32
33 """
34 ElossPerDetId = {}
35 tOfFlight = {}
36 listOfVetoPoints = {}
37 key = -1
38 for aMCPoint in self.intree.vetoPoint:
39 key += 1
40 detID = aMCPoint.GetDetectorID()
41 Eloss = aMCPoint.GetEnergyLoss()
42 if detID not in ElossPerDetId:
43 ElossPerDetId[detID] = 0
44 listOfVetoPoints[detID] = []
45 tOfFlight[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:
53 aHit.setInvalid() # threshold for liquid scintillator, source Berlin group
54 self.det.push_back(aHit)
55 v = ROOT.std.vector("int")()
56 for x in listOfVetoPoints[seg]:
57 v.push_back(x)
58 self.MCdet.push_back(v)

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