SND@LHC Software
Loading...
Searching...
No Matches
eventDisplay_shipLHC.EventLoop Class Reference
Inheritance diagram for eventDisplay_shipLHC.EventLoop:
Collaboration diagram for eventDisplay_shipLHC.EventLoop:

Public Member Functions

 InitTask (self)
 
 NextEvent (self, i=-1)
 
 rotateView (self, hor=0, ver=0)
 
 topView (self)
 
 bottomView (self)
 
 frontView (self)
 
 backView (self)
 
 leftView (self)
 
 rightView (self)
 
 transparentMode (self, mode='on')
 

Public Attributes

 n
 
 first
 
 tracks
 
 ioBar
 
 TransparentMode
 

Detailed Description

Definition at line 469 of file eventDisplay_shipLHC.py.

Member Function Documentation

◆ backView()

eventDisplay_shipLHC.EventLoop.backView (   self)

Definition at line 515 of file eventDisplay_shipLHC.py.

515 def backView(self):
516 self.rotateView(0.,-ROOT.TMath.Pi()/2.) # rotation around y or x axis

◆ bottomView()

eventDisplay_shipLHC.EventLoop.bottomView (   self)

Definition at line 511 of file eventDisplay_shipLHC.py.

511 def bottomView(self):
512 self.rotateView(-ROOT.TMath.Pi()/2.,0.) # rotation around z axis

◆ frontView()

eventDisplay_shipLHC.EventLoop.frontView (   self)

Definition at line 513 of file eventDisplay_shipLHC.py.

513 def frontView(self):
514 self.rotateView(0.,ROOT.TMath.Pi()/2.) # rotation around y or x axis

◆ InitTask()

eventDisplay_shipLHC.EventLoop.InitTask (   self)

Definition at line 471 of file eventDisplay_shipLHC.py.

471 def InitTask(self):
472 self.n = 0
473 self.first = True
474 if sGeo.GetVolume('EmulsionDet'): DisplayNuDetector()
475 self.tracks = DrawTracks()
476 self.tracks.InitTask()
477# create SHiP GUI
478 self.ioBar = IO()
479 self.TransparentMode = 0
480 v1 = gEve.GetDefaultViewer()
481 v1.GetEveFrame().HideAllDecorations()
482 tr=gEve.GetBrowser().GetTabRight()
483 t0 = tr.GetTabTab(0)
484 t0.SetText(ROOT.TGString('3D'))

◆ leftView()

eventDisplay_shipLHC.EventLoop.leftView (   self)

Definition at line 517 of file eventDisplay_shipLHC.py.

517 def leftView(self):
518 self.rotateView(0.,ROOT.TMath.Pi()) # rotation around y or x axis

◆ NextEvent()

eventDisplay_shipLHC.EventLoop.NextEvent (   self,
  i = -1 
)

Definition at line 485 of file eventDisplay_shipLHC.py.

485 def NextEvent(self,i=-1):
486 if i<0: self.n+=1
487 else : self.n=i
488 fRun.Run(self.n,self.n+1) # go for first event
489# check if tracks are made from real pattern recognition
490 if sTree.GetBranch("FitTracks_PR"): sTree.FitTracks = sTree.FitTracks_PR
491 if sTree.GetBranch("fitTrack2MC_PR"): sTree.fitTrack2MC = sTree.fitTrack2MC_PR
492 if sTree.GetBranch("Particles_PR"): sTree.Particles = sTree.Particles_PR
493 if hasattr(self,"tracks"): self.tracks.ExecuteTask()
494 if ROOT.gROOT.FindObject('Root Canvas EnergyLoss'): evd_fillEnergy.execute()
495 print('Event %i ready'%(self.n))
496# make pointsets pickable
497 for x in mcHits:
498 p = ROOT.gEve.GetCurrentEvent().FindChild(mcHits[x].GetName())
499 if p:
500 p.SetPickable(ROOT.kTRUE)
501 p.SetTitle(p.__repr__())

◆ rightView()

eventDisplay_shipLHC.EventLoop.rightView (   self)

Definition at line 519 of file eventDisplay_shipLHC.py.

519 def rightView(self):
520 self.rotateView(0.,ROOT.TMath.Pi()) # rotation around y or x axis

◆ rotateView()

eventDisplay_shipLHC.EventLoop.rotateView (   self,
  hor = 0,
  ver = 0 
)

Definition at line 502 of file eventDisplay_shipLHC.py.

502 def rotateView(self,hor=0,ver=0):
503 v = ROOT.gEve.GetDefaultGLViewer()
504 cam = v.CurrentCamera()
505 cam.Reset()
506 if hor!=0 or ver!=0:
507 cam.RotateRad(hor,ver)
508 v.DoDraw()

◆ topView()

eventDisplay_shipLHC.EventLoop.topView (   self)

Definition at line 509 of file eventDisplay_shipLHC.py.

509 def topView(self):
510 self.rotateView(ROOT.TMath.Pi()/2.,0.) # rotation around z axis

◆ transparentMode()

eventDisplay_shipLHC.EventLoop.transparentMode (   self,
  mode = 'on' 
)

Definition at line 521 of file eventDisplay_shipLHC.py.

521 def transparentMode(self,mode='on'):
522 for m in transparentMaterials:
523 mat = ROOT.gGeoManager.GetMaterial(m)
524 if not mat:continue
525 if mode.lower()=='on' or mode==1:
526 mat.SetTransparency(transparentMaterials[m])
527 self.TransparentMode = 1
528 else:
529 mat.SetTransparency("\x00")
530 self.TransparentMode = 0
531 sc = gEve.GetScenes()
532 geoscene = sc.FindChild('Geometry scene')
533 if geoscene: gEve.ElementChanged(geoscene,True,True)
534# add projections DOES NOT WORK YET AS FORESEEN, under investigation. 30.11.2016

Member Data Documentation

◆ first

eventDisplay_shipLHC.EventLoop.first

Definition at line 473 of file eventDisplay_shipLHC.py.

◆ ioBar

eventDisplay_shipLHC.EventLoop.ioBar

Definition at line 478 of file eventDisplay_shipLHC.py.

◆ n

eventDisplay_shipLHC.EventLoop.n

Definition at line 472 of file eventDisplay_shipLHC.py.

◆ tracks

eventDisplay_shipLHC.EventLoop.tracks

Definition at line 475 of file eventDisplay_shipLHC.py.

◆ TransparentMode

eventDisplay_shipLHC.EventLoop.TransparentMode

Definition at line 479 of file eventDisplay_shipLHC.py.


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