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

Public Member Functions

None InitTask (self)
 
None FinishEvent (self)
 
None ExecuteTask (self, str option="")
 
None DrawParticle (self, n)
 

Public Attributes

 comp
 
 evscene
 

Detailed Description

Definition at line 209 of file eventDisplay.py.

Member Function Documentation

◆ DrawParticle()

None eventDisplay.DrawVetoDigi.DrawParticle (   self,
  n 
)

Definition at line 256 of file eventDisplay.py.

256 def DrawParticle(self, n) -> None:
257 self.comp.OpenCompound()
258 DTrack = ROOT.TEveLine()
259 DTrack.SetPickable(ROOT.kTRUE)
260 DTrack.SetMainColor(ROOT.kCyan)
261 DTrack.SetLineWidth(4)
262 aP = sTree.Particles[n]
263 DTrack.SetTitle(aP.__repr__())
264 DTrack.SetName("Prtcle_" + str(n))
265 DTrack.SetNextPoint(aP.Vx(), aP.Vy(), aP.Vz())
266 lam = (self.Targetz - aP.Vz()) / aP.Pz()
267 DTrack.SetNextPoint(aP.Vx() + lam * aP.Px(), aP.Vy() + lam * aP.Py(), self.Targetz)
268 self.comp.AddElement(DTrack)
269 self.comp.CloseCompound()
270 gEve.ElementChanged(self.evscene, True, True)
271
272
273#

◆ ExecuteTask()

None eventDisplay.DrawVetoDigi.ExecuteTask (   self,
str   option = "" 
)

Definition at line 221 of file eventDisplay.py.

221 def ExecuteTask(self, option: str = "") -> None:
222 self.comp.DestroyElements()
223 self.comp.OpenCompound()
224 nav = ROOT.gGeoManager.GetCurrentNavigator()
225 for digi in sTree.Digi_SBTHits:
226 if not digi.isValid():
227 continue
228 node = digi.GetNode()
229 shape = node.GetVolume().GetShape()
230 bx = ROOT.TEveBox(node.GetName())
231 bx.SetPickable(ROOT.kTRUE)
232 bx.SetTitle(digi.__repr__())
233 bx.SetMainColor(ROOT.kMagenta + 3)
234 dx, dy, dz = shape.GetDX(), shape.GetDY(), shape.GetDZ()
235 o = shape.GetOrigin()
236 master = array("d", [0, 0, 0])
237 n = 0
238 for edge in [
239 [-dx, -dy, -dz],
240 [-dx, +dy, -dz],
241 [+dx, +dy, -dz],
242 [+dx, -dy, -dz],
243 [-dx, -dy, dz],
244 [-dx, +dy, dz],
245 [+dx, +dy, dz],
246 [+dx, -dy, dz],
247 ]:
248 origin = array("d", [edge[0] + o[0], edge[1] + o[1], edge[2] + o[2]])
249 nav.LocalToMaster(origin, master)
250 bx.SetVertex(n, master[0], master[1], master[2])
251 n += 1
252 self.comp.AddElement(bx)
253 self.comp.CloseCompound()
254 gEve.ElementChanged(self.evscene, True, True)
255

◆ FinishEvent()

None eventDisplay.DrawVetoDigi.FinishEvent (   self)

Definition at line 218 of file eventDisplay.py.

218 def FinishEvent(self) -> None:
219 pass
220

◆ InitTask()

None eventDisplay.DrawVetoDigi.InitTask (   self)

Definition at line 212 of file eventDisplay.py.

212 def InitTask(self) -> None:
213 self.comp = ROOT.TEveCompound("Veto Digis")
214 gEve.AddElement(self.comp)
215 sc = gEve.GetScenes()
216 self.evscene = sc.FindChild("Event scene")
217

Member Data Documentation

◆ comp

eventDisplay.DrawVetoDigi.comp

Definition at line 213 of file eventDisplay.py.

◆ evscene

eventDisplay.DrawVetoDigi.evscene

Definition at line 216 of file eventDisplay.py.


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