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

Public Member Functions

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

Public Attributes

 comp = ROOT.TEveCompound("Veto Digis")
 evscene = sc.FindChild("Event scene")

Static Public Attributes

float Targetz = 0.0

Detailed Description

Definition at line 222 of file eventDisplay.py.

Member Function Documentation

◆ DrawParticle()

None eventDisplay.DrawVetoDigi.DrawParticle ( self,
n )

Definition at line 271 of file eventDisplay.py.

271 def DrawParticle(self, n) -> None:
272 self.comp.OpenCompound()
273 DTrack = ROOT.TEveLine()
274 DTrack.SetPickable(ROOT.kTRUE)
275 DTrack.SetMainColor(ROOT.kCyan)
276 DTrack.SetLineWidth(4)
277 aP = sTree.Particles[n]
278 DTrack.SetTitle(aP.__repr__())
279 DTrack.SetName("Prtcle_" + str(n))
280 DTrack.SetNextPoint(aP.Vx(), aP.Vy(), aP.Vz())
281 lam = (self.Targetz - aP.Vz()) / aP.Pz()
282 DTrack.SetNextPoint(aP.Vx() + lam * aP.Px(), aP.Vy() + lam * aP.Py(), self.Targetz)
283 self.comp.AddElement(DTrack)
284 self.comp.CloseCompound()
285 gEve.ElementChanged(self.evscene, True, True)
286
287
288#

◆ ExecuteTask()

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

Definition at line 236 of file eventDisplay.py.

236 def ExecuteTask(self, option: str = "") -> None:
237 self.comp.DestroyElements()
238 self.comp.OpenCompound()
239 nav = ROOT.gGeoManager.GetCurrentNavigator()
240 for digi in sTree.Digi_SBTHits:
241 if not digi.isValid():
242 continue
243 node = digi.GetNode()
244 shape = node.GetVolume().GetShape()
245 bx = ROOT.TEveBox(node.GetName())
246 bx.SetPickable(ROOT.kTRUE)
247 bx.SetTitle(digi.__repr__())
248 bx.SetMainColor(ROOT.kMagenta + 3)
249 dx, dy, dz = shape.GetDX(), shape.GetDY(), shape.GetDZ()
250 o = shape.GetOrigin()
251 master = array("d", [0, 0, 0])
252 n = 0
253 for edge in [
254 [-dx, -dy, -dz],
255 [-dx, +dy, -dz],
256 [+dx, +dy, -dz],
257 [+dx, -dy, -dz],
258 [-dx, -dy, dz],
259 [-dx, +dy, dz],
260 [+dx, +dy, dz],
261 [+dx, -dy, dz],
262 ]:
263 origin = array("d", [edge[0] + o[0], edge[1] + o[1], edge[2] + o[2]])
264 nav.LocalToMaster(origin, master)
265 bx.SetVertex(n, master[0], master[1], master[2])
266 n += 1
267 self.comp.AddElement(bx)
268 self.comp.CloseCompound()
269 gEve.ElementChanged(self.evscene, True, True)
270

◆ FinishEvent()

None eventDisplay.DrawVetoDigi.FinishEvent ( self)

Definition at line 233 of file eventDisplay.py.

233 def FinishEvent(self) -> None:
234 pass
235

◆ InitTask()

None eventDisplay.DrawVetoDigi.InitTask ( self)

Definition at line 227 of file eventDisplay.py.

227 def InitTask(self) -> None:
228 self.comp = ROOT.TEveCompound("Veto Digis")
229 gEve.AddElement(self.comp)
230 sc = gEve.GetScenes()
231 self.evscene = sc.FindChild("Event scene")
232

Member Data Documentation

◆ comp

eventDisplay.DrawVetoDigi.comp = ROOT.TEveCompound("Veto Digis")

Definition at line 228 of file eventDisplay.py.

◆ evscene

eventDisplay.DrawVetoDigi.evscene = sc.FindChild("Event scene")

Definition at line 231 of file eventDisplay.py.

◆ Targetz

eventDisplay.DrawVetoDigi.Targetz = 0.0
static

Definition at line 225 of file eventDisplay.py.


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