SND@LHC Software
Loading...
Searching...
No Matches
eventDisplay Namespace Reference

Classes

class  DrawDigi
 
class  DrawEcalCluster
 
class  DrawTracks
 
class  DrawVetoDigi
 
class  EventLoop
 
class  IO
 
class  Rulers
 

Functions

 evExit ()
 
 printMCTrack (n, MCTrack)
 
 dump (pcut=0)
 
 printFittedTracks ()
 
 printParticles ()
 
 projection ()
 
 projection_prescale ()
 
 storeCameraSetting (fname='camSetting.root')
 
 readCameraSetting (fname='camSetting.root')
 
 speedUp ()
 
 DisplayNuDetector ()
 
 ecalYellow ()
 
 switchOf (tag)
 
 switchOn (tag)
 
 hidePlasticScintillator ()
 
 switchOfRock ()
 
 switchOfAll (exc)
 
 switchOnAll (exc)
 
 select (pattern)
 
 search (lvdict, tag)
 
 rename (name='ship.TGeant4.root')
 
 mydebug ()
 
 debugStraw (n)
 
 DrawCharmTracks ()
 
 DrawSimpleMCTracks ()
 
 SNDLHC ()
 
 positionText (r, x, y, z, angle, txt, size=200, color=ROOT.kBlue, mode=ROOT.TGLFont.kExtrude, light=ROOT.kTRUE)
 
 PRVersion ()
 

Variables

 fMan = None
 
 fRun = None
 
 pdg = ROOT.TDatabasePDG.Instance()
 
 g = ROOT.gROOT
 
 gEnv = ROOT.gEnv
 
str mcEngine = "TGeant4"
 
str simEngine = "Pythia8"
 
bool withGeo = False
 
bool withMCTracks = True
 
bool withAllMCTracks = False
 
dict transparentMaterials
 
 parser = ArgumentParser()
 
 dest
 
 help
 
 required
 
 False
 
 default
 
 action
 
 options = parser.parse_args()
 
 geoFile
 
 InputFile
 
 inFile = ROOT.FairFileSource(options.InputFile)
 
 OutputFile
 
 rtdb = fRun.GetRuntimeDb()
 
 parInput1 = ROOT.FairParRootFileIo()
 
int verbose = 0
 
 Track = ROOT.FairMCTracks("Monte-Carlo Tracks",verbose)
 
 GTrack = ROOT.FairMCTracks("GeoTracks",verbose)
 
 ecalGeoFile = ShipGeo.ecal.File
 
 ShipGeo = ConfigRegistry.loadpy("$FAIRSHIP/geometry/geometry_config.py", Yheight = float(dy), EcalGeoFile = ecalGeoFile)
 
 upkl = Unpickler( fRun.GetGeoFile() )
 
dict mcHits = {}
 
 fRman = ROOT.FairRootManager.Instance()
 
 sTree = fRman.GetInChain()
 
 lsOfGlobals = ROOT.gROOT.GetListOfGlobals()
 
 sGeo = ROOT.gGeoManager
 
 top = sGeo.GetTopVolume()
 
 gEve = ROOT.gEve
 
 fieldMaker = geomGeant4.addVMCFields(ShipGeo, '', True, withVirtualMC = False)
 
 bfield = ROOT.genfit.FairShipFields()
 
 geoMat = ROOT.genfit.TGeoMaterialInterface()
 
 fM = ROOT.genfit.FieldManager.getInstance()
 
 br = gEve.GetBrowser()
 
 rulers = Rulers()
 
 SHiPDisplay = EventLoop()
 
 G = open('eveGlobal.py','w')
 
 type
 
 float
 
 str
 
 ioman = ROOT.FairRootManager.Instance()
 
 f = ROOT.TFile.Open(options.InputFile)
 
bool isMC = True
 
 outFile = ROOT.TMemFile('dummy','CREATE')
 
 source = ROOT.FairFileSource(f)
 
 sink = ROOT.FairRootFileSink(outFile)
 
 muon_reco_task = SndlhcMuonReco.MuonReco()
 
 trackTask = SndlhcTracking.Tracking()
 
 xrdb = ROOT.FairRuntimeDb.instance()
 
 geo = SndlhcGeo.GeoInterface(options.geoFile)
 
 modules = geo.modules
 
 Digi_MuFilterHits
 

Function Documentation

◆ debugStraw()

eventDisplay.debugStraw (   n)

Definition at line 951 of file eventDisplay.py.

951def debugStraw(n):
952 sGeo = ROOT.gGeoManager
953 vols = sGeo.GetListOfVolumes()
954 sTree = g.FindObjectAny('cbmsim')
955 sTree.GetEntry(n)
956 for s in sTree.strawtubesPoint:
957 print(vols[s.GetDetectorID()-1].GetName())
958
959#----Load the default libraries------

◆ DisplayNuDetector()

eventDisplay.DisplayNuDetector ( )

Definition at line 710 of file eventDisplay.py.

710def DisplayNuDetector():
711 for x in ["Wall"]:
712 xvol = sGeo.GetVolume(x)
713 if not xvol: continue
714 xvol.SetVisDaughters(0)
715 xvol.SetVisibility(1)
716 sc = gEve.GetScenes()
717 geoscene = sc.FindChild('Geometry scene')
718 gEve.ElementChanged(geoscene,True,True)
719# draw Ecal yellow instead of black

◆ DrawCharmTracks()

eventDisplay.DrawCharmTracks ( )

Definition at line 1103 of file eventDisplay.py.

1103def DrawCharmTracks():
1104 i = -1
1105 for aTrack in sTree.MCTrack:
1106 i+=1
1107 if i<2: continue
1108 if aTrack.GetMotherId()==1:
1109 pa = pdg.GetParticle(sTree.MCTrack[i] .GetPdgCode())
1110 if pa.Lifetime()>1.E-12:
1111 print(sTree.MCTrack[i])
1112 SHiPDisplay.tracks.DrawMCTrack(i)

◆ DrawSimpleMCTracks()

eventDisplay.DrawSimpleMCTracks ( )

Definition at line 1113 of file eventDisplay.py.

1113def DrawSimpleMCTracks():
1114 comp = SHiPDisplay.tracks.comp
1115 comp.OpenCompound()
1116 n = -1
1117 ntot = 0
1118 fPos = ROOT.TVector3()
1119 fMom = ROOT.TVector3()
1120 delZ = 10*u.m
1121 for fT in sTree.MCTrack:
1122 n+=1
1123 DTrack = ROOT.TEveLine()
1124 DTrack.SetPickable(ROOT.kTRUE)
1125 DTrack.SetTitle(fT.__repr__())
1126 fT.GetStartVertex(fPos)
1127 fT.GetMomentum(fMom)
1128 hitlist = {}
1129 hitlist[fPos.Z()] = [fPos.X(),fPos.Y()]
1130 z = fPos.Z() + delZ
1131 slx,sly = fMom.X()/fMom.Z(),fMom.Y()/fMom.Z()
1132 hitlist[z] = [fPos.X()+slx*delZ,fPos.Y()+sly*delZ]
1133 for z in hitlist.keys():
1134 DTrack.SetNextPoint(hitlist[z][0],hitlist[z][1],z)
1135 p = pdg.GetParticle(fT.GetPdgCode())
1136 if p : pName = p.GetName()
1137 else: pName = str(fT.GetPdgCode())
1138 DTrack.SetName('MCTrack_'+str(n)+'_'+pName)
1139 c = ROOT.kYellow
1140 DTrack.SetMainColor(c)
1141 DTrack.SetLineWidth(3)
1142 comp.AddElement(DTrack)
1143 ntot+=1
1144 comp.CloseCompound()
1145 gEve.ElementChanged(SHiPDisplay.tracks.evscene,True,True)
1146

◆ dump()

eventDisplay.dump (   pcut = 0)

Definition at line 58 of file eventDisplay.py.

58def dump(pcut=0):
59 print(' # pid px py pz vx vy vz mid')
60 n=-1
61 for mcp in sTree.MCTrack:
62 n+=1
63 if mcp.GetP()/u.GeV < pcut : continue
64 printMCTrack(n,sTree.MCTrack)

◆ ecalYellow()

eventDisplay.ecalYellow ( )

Definition at line 720 of file eventDisplay.py.

720def ecalYellow():
721 sc = gEve.GetScenes()
722 geoscene = sc.FindChild('Geometry scene')
723 ecal = top.GetNode("Ecal_1")
724 if ecal :
725 ecal.GetVolume().SetLineColor(ROOT.kYellow)
726 hcal = top.GetNode("Hcal_1")
727 if hcal :
728 hcal.GetVolume().SetLineColor(ROOT.kOrange+3)
729 if ecal or hcal: gEve.ElementChanged(geoscene,True,True)

◆ evExit()

eventDisplay.evExit ( )

Definition at line 15 of file eventDisplay.py.

15def evExit():
16 if ROOT.gROOT.FindObject('Root Canvas EnergyLoss'):
17 print("make suicide before framework makes seg fault")
18 os.kill(os.getpid(),9)
19# apperantly problem disappeared in more recent root versions

◆ hidePlasticScintillator()

eventDisplay.hidePlasticScintillator ( )

Definition at line 749 of file eventDisplay.py.

749def hidePlasticScintillator():
750 sc = gEve.GetScenes()
751 geoscene = sc.FindChild('Geometry scene')
752 v = sGeo.FindVolumeFast('vleft')
753 v.SetVisibility(0)
754 v.SetVisDaughters(0)
755 for v in sGeo.GetListOfVolumes():
756 if v.GetName().find('wallVeto')>0:
757 v.SetVisibility(0)
758 v.SetVisDaughters(0)
759 gEve.ElementChanged(geoscene,True,True)
760
761# switch of drawing of rock

◆ mydebug()

eventDisplay.mydebug ( )

Definition at line 917 of file eventDisplay.py.

917def mydebug():
918 t = g.FindObjectAny('cbmsim')
919 nev = t.GetEntriesFast()
920 t.GetEntry(0)
921# Loop over Geo tracks
922 for i in range( min(5,nev) ) :
923 t.GetEntry(i)
924 for gTr in t.GeoTracks:
925 gTr.Print()
926 part = gTr.GetParticle()
927 lorv = ROOT.TLorentzVector()
928 print('xyz E pxpypz',gTr.GetPoint(0)[0],gTr.GetPoint(0)[1] ,gTr.GetPoint(0)[2],lorv.E(),lorv.Px(),lorv.Py(),lorv.Pz())
929# Loop over MC tracks
930 for i in range( min(5,nev) ) :
931 t.GetEntry(i)
932 for gMCTr in t.MCTrack:
933 gMCTr.Print()
934 print(gMCTr.GetPdgCode(),gMCTr.GetMass(),gMCTr.GetP())
935# MC event header
936 for i in range( nev ) :
937 t.GetEntry(i)
938 print(t.MCEventHeader.GetEventID(),t.MCEventHeader.GetRunID(),t.MCEventHeader.GetZ())
939# geometrie
940 sGeo = ROOT.gGeoManager
941 cave = sGeo.GetTopVolume()
942 cave.Draw('ogl')
943# eve
944 gEve = ROOT.gEve
945#
946 sc = gEve.GetScenes()
947 geoscene = sc.FindChild('Geometry scene')
948 topnode = geoscene.FindChild('cave_1')
949 topnode.SetVisLevel(4)
950 gEve.ElementChanged(geoscene,True,True)

◆ positionText()

eventDisplay.positionText (   r,
  x,
  y,
  z,
  angle,
  txt,
  size = 200,
  color = ROOT.kBlue,
  mode = ROOT.TGLFont.kExtrude,
  light = ROOT.kTRUE 
)

Definition at line 1172 of file eventDisplay.py.

1172def positionText(r,x,y,z,angle,txt,size=200,color=ROOT.kBlue,mode=ROOT.TGLFont.kExtrude,light=ROOT.kTRUE):
1173 tt = ROOT.TEveText(txt)
1174 tt.SetFontSize(size)
1175 tt.RefMainTrans().SetPos(x,y,z)
1176 tt.PtrMainTrans().RotateLF(1, 3, angle)
1177 tt.SetMainColor(color)
1178 tt.SetFontMode(mode)
1179 tt.SetLighting(light)
1180 r.AddElement(tt)

◆ printFittedTracks()

eventDisplay.printFittedTracks ( )

Definition at line 65 of file eventDisplay.py.

65def printFittedTracks():
66 print(' # converged Ndf chi2/Ndf P Pt MCid')
67 n=-1
68 for ft in sTree.FitTracks:
69 n+=1
70 fitStatus = ft.getFitStatus()
71 fitState = ft.getFittedState()
72 mom = fitState.getMom()
73 print('%3i %6i %4i %6.3F %6.3F %6.3F %6i '%(n,fitStatus.isFitConverged(),\
74 fitStatus.getNdf(),fitStatus.getChi2()/fitStatus.getNdf(),\
75 mom.Mag()/u.GeV,mom.Pt()/u.GeV,sTree.fitTrack2MC[n] ))

◆ printMCTrack()

eventDisplay.printMCTrack (   n,
  MCTrack 
)

Definition at line 54 of file eventDisplay.py.

54def printMCTrack(n,MCTrack):
55 mcp = MCTrack[n]
56 print(' %6i %7i %6.3F %6.3F %7.3F %7.3F %7.3F %7.3F %6i '%(n,mcp.GetPdgCode(),mcp.GetPx()/u.GeV,mcp.GetPy()/u.GeV,mcp.GetPz()/u.GeV, \
57 mcp.GetStartX()/u.m,mcp.GetStartY()/u.m,mcp.GetStartZ()/u.m,mcp.GetMotherId() ))

◆ printParticles()

eventDisplay.printParticles ( )

Definition at line 76 of file eventDisplay.py.

76def printParticles():
77 print(' # P Pt[GeV/c] DOCA[mm] Rsq Vz[m] d1 d2')
78 n=-1
79 for aP in sTree.Particles:
80 n+=1
81 doca = -1.
82 if aP.GetMother(1)==99: # DOCA is set
83 doca = aP.T()
84 Rsq = (aP.Vx()/(2.45*u.m) )**2 + (aP.Vy()/((10./2.-0.05)*u.m) )**2
85 print('%3i %6.3F %6.3F %9.3F %6.3F %6.3F %4i %4i '%(n,aP.P()/u.GeV,aP.Pt()/u.GeV,\
86 doca/u.mm,Rsq,aP.Vz()/u.m,aP.GetDaughter(0),aP.GetDaughter(1) ))

◆ projection()

eventDisplay.projection ( )

Definition at line 633 of file eventDisplay.py.

633def projection():
634#if 1>0:
635 # camera
636 s = ROOT.gEve.SpawnNewScene("Projected Event")
637 ROOT.gEve.GetDefaultViewer().AddScene(s)
638 v = ROOT.gEve.GetDefaultGLViewer()
639 v.SetCurrentCamera(ROOT.TGLViewer.kCameraOrthoXOY)
640 cam = v.CurrentCamera()
641 cam.SetZoomMinMax(0.2, 20)
642 # projections
643 mng = ROOT.TEveProjectionManager(ROOT.TEveProjection.kPT_RPhi)
644 s.AddElement(mng)
645 axes = ROOT.TEveProjectionAxes(mng)
646 axes.SetTitle("TEveProjections demo")
647 s.AddElement(axes)
648 ROOT.gEve.AddToListTree(axes, ROOT.kTRUE)
649 ROOT.gEve.AddToListTree(mng, ROOT.kTRUE)
650

◆ projection_prescale()

eventDisplay.projection_prescale ( )

Definition at line 651 of file eventDisplay.py.

651def projection_prescale():
652#if 1>0:
653 v = gEve.GetViewers()
654 vw = v.FindChild('Viewer 1')
655 if vw: vw.SetName('3d')
656 sev = ROOT.gEve.SpawnNewViewer("Scaled 2D")
657 smng = ROOT.TEveProjectionManager(ROOT.TEveProjection.kPP_Plane)
658 sp = smng.GetProjection()
659 sp.SetUsePreScale(ROOT.kTRUE)
660 sp.AddPreScaleEntry(2, 100000000., 0.1)
661 ss = ROOT.gEve.SpawnNewScene("Scaled Geom")
662 sev.AddScene(ss)
663 ss.AddElement(smng)
664 N = sGeo.GetTopNode()
665 TNod=ROOT.TEveGeoTopNode(sGeo, N, 1, 3, 10)
666 ss.AddElement(TNod)
667 eventscene = ROOT.gEve.SpawnNewScene('Scaled event')
668 eventscene.AddElement(ROOT.FairEventManager.Instance())
669 sev.AddScene(eventscene)
670 eventscene.AddElement(smng)
671 ROOT.gEve.GetBrowser().GetTabRight().SetTab(1)
672 ROOT.gEve.FullRedraw3D(ROOT.kTRUE)
673

◆ PRVersion()

eventDisplay.PRVersion ( )

Definition at line 1181 of file eventDisplay.py.

1181def PRVersion():
1182 readCameraSetting()
1183 for x in ['moreShieldingSide', 'moreShieldingTopBot','CoatWall','CoatVol','AbsorberVol']:
1184 vol = ROOT.gGeoManager.FindVolumeFast(x)
1185 vol.SetVisibility(0)
1186 ROOT.gGeoManager.GetMaterial('Concrete').SetTransparency(0)
1187 r = rulers.ruler
1188 ticks = 5
1189 r.DestroyElements()
1190 r.OpenCompound()
1191 xpos,ypos = -500., -1500.
1192 zstart = ShipGeo.target.z0
1193 zlength = ShipGeo.MuonStation3.z - zstart + 10*u.m
1194 z=zstart
1195 for i in range(int(zlength/100/ticks)):
1196 m = ROOT.TEveLine()
1197 m.SetNextPoint(xpos,ypos, z)
1198 m.SetNextPoint(xpos-1*u.m,ypos,z)
1199 m.SetMainColor(ROOT.kRed)
1200 m.SetLineWidth(5)
1201 r.AddElement(m)
1202 t1 = ROOT.TEveText(str(i*ticks)+'m')
1203 t1.SetMainColor(ROOT.kGray+3)
1204 t1.SetFontSize(5)
1205 t1.RefMainTrans().SetPos(xpos-0.1*u.m,ypos+0.2*u.m,z)
1206 r.AddElement(t1)
1207 z+=ticks*u.m
1208 xpos,ypos = 0., 0.
1209 z = ShipGeo.MuonStation3.z+6*u.m
1210 ylength = 7*u.m
1211 ypos=-ylength
1212 for i in range(-int(ylength/100),int(ylength/100),1):
1213 m = ROOT.TEveLine()
1214 m.SetNextPoint(xpos,ypos, z)
1215 m.SetNextPoint(xpos+0.05*u.m,ypos,z)
1216 m.SetMainColor(ROOT.kRed)
1217 m.SetLineWidth(3)
1218 r.AddElement(m)
1219 t1 = ROOT.TEveText(str(i)+'m')
1220 t1.SetMainColor(ROOT.kGray+3)
1221 t1.SetFontSize(5)
1222 t1.RefMainTrans().SetPos(xpos-0.5*u.m,ypos,z)
1223 r.AddElement(t1)
1224 ypos+=1*u.m
1225 ty = ROOT.TEveText("y-axis")
1226 ty.SetFontSize(10)
1227 ty.RefMainTrans().SetPos(0.,ypos+1*u.m,z)
1228 ty.SetMainColor(ROOT.kRed-2)
1229 r.AddElement(ty)
1230 xpos,ypos = 0., 0.
1231 z = ShipGeo.MuonStation3.z+10*u.m
1232 xlength = 3*u.m
1233 xpos=-xlength
1234 for i in range(-int(xlength/100),int(xlength/100),1):
1235 m = ROOT.TEveLine()
1236 m.SetNextPoint(xpos,ypos, z)
1237 m.SetNextPoint(xpos,ypos-0.05*u.m,z)
1238 m.SetMainColor(ROOT.kRed)
1239 m.SetLineWidth(3)
1240 r.AddElement(m)
1241 t1 = ROOT.TEveText(str(i)+'m')
1242 t1.SetMainColor(ROOT.kGray+3)
1243 t1.SetFontSize(5)
1244 t1.RefMainTrans().SetPos(xpos,ypos-0.1*u.m,z)
1245 r.AddElement(t1)
1246 xpos+=1*u.m
1247 tx = ROOT.TEveText("x-axis")
1248 tx.SetFontSize(10)
1249 tx.RefMainTrans().SetPos(xpos+1*u.m,0.,z)
1250 tx.SetMainColor(ROOT.kRed-2)
1251 r.AddElement(tx)
1252 rotAngle = ROOT.TMath.Pi()+ROOT.TMath.PiOver2()*5./2.
1253 positionText(r,0.,900.,ShipGeo.TrackStation1.z-20*u.m,rotAngle,"SHiP",200,ROOT.kOrange-2)
1254 positionText(r,0.,750.,ShipGeo.TrackStation1.z-40*u.m,rotAngle,"Vacuum decay vessel",200,ROOT.kGray+1)
1255 positionText(r,0.,100.,ShipGeo.target.z-6*u.m,rotAngle,"Target",200,ROOT.kBlue)
1256 positionText(r,0.,600.,ShipGeo.muShield.z-10*u.m,rotAngle,"Active muon shield",200,ROOT.kGreen-2)
1257 positionText(r,0.,600.,ShipGeo.tauMudet.zMudetC-10*u.m,rotAngle,"Tau neutrino detector",200,ROOT.kRed-2)
1258 positionText(r,0.,900.,ShipGeo.Bfield.z-5*u.m,rotAngle,"Dipole Magnet",200,ROOT.kBlue+2)
1259 positionText(r,-1500.,-800.,ShipGeo.TrackStation3.z-2*u.m,rotAngle,"Strawtracker",200,ROOT.kRed+2)
1260 positionText(r,0.,730.,ShipGeo.ecal.z-1*u.m,rotAngle,"Ecal",200,ROOT.kOrange)
1261 positionText(r,0.,700.,ShipGeo.MuonFilter2.z,rotAngle,"Muon",200,ROOT.kGreen+2)
1262 r.CloseCompound()
1263 sc = gEve.GetScenes()
1264 geoscene = sc.FindChild('Geometry scene')
1265 gEve.ElementChanged(geoscene,True,True)
1266
1267

◆ readCameraSetting()

eventDisplay.readCameraSetting (   fname = 'camSetting.root')

Definition at line 679 of file eventDisplay.py.

679def readCameraSetting(fname='camSetting.root'):
680 f = ROOT.TFile.Open(fname)
681 cam = ROOT.gEve.GetDefaultGLViewer().CurrentCamera()
682 f.GetKey(cam.ClassName()).Read(cam)
683 cam.IncTimeStamp()
684 gEve.GetDefaultGLViewer().RequestDraw()
685 f.Close()

◆ rename()

eventDisplay.rename (   name = 'ship.TGeant4.root')

Definition at line 805 of file eventDisplay.py.

805def rename(name='ship.TGeant4.root'):
806 f = ROOT.TFile(name,'UPDATE')
807 t = f.Get('cbmsim')
808 for x in t.GetListOfBranches():
809 nm = x.GetName().replace('_1','')
810 x.SetName(nm)
811 t.Write()
812 f.Close()
813

◆ search()

eventDisplay.search (   lvdict,
  tag 
)

Definition at line 802 of file eventDisplay.py.

802def search(lvdict,tag):
803 for x in lvdict:
804 if not x.find(tag)<0: print(x)

◆ select()

eventDisplay.select (   pattern)

Definition at line 796 of file eventDisplay.py.

796def select(pattern):
797 exc = []
798 for v in sGeo.GetListOfVolumes():
799 vname = v.GetName()
800 if not vname.find(pattern) < 0 : exc.append(vname)
801 return exc

◆ SNDLHC()

eventDisplay.SNDLHC ( )

Definition at line 1147 of file eventDisplay.py.

1147def SNDLHC():
1148# some default setup
1149 SND = ['SciFi','Wall','volVetoBar ','volFeBlock',' volMuUpstreamBar ','volMuDownstreamBar_hor ','volMuDownstreamBar_ver ']
1150 tunnel = sGeo.GetVolume('Tunnel')
1151 tunnel.SetVisibility(0)
1152 tunnel.SetVisDaughters(0)
1153 for x in sGeo.GetListOfVolumes():
1154 if x.GetName() in SND:
1155 x.SetTransparency(60)
1156 br = gEve.GetBrowser()
1157 br.SetWindowName('SND@LHC Eve Window')
1158 br.SetWidth(1600)
1159 sc = gEve.GetScenes()
1160 geoscene = sc.FindChild('Geometry scene')
1161 gEve.ElementChanged(geoscene,True,True)
1162
1163 v = gEve.GetDefaultGLViewer()
1164 camera = v.CurrentCamera()
1165 for i in range(2): # don't know why this needs to be executed twice to update the screen
1166 camera.Reset()
1167 center = array('d',[-9.,46.,28.])
1168 camera.Configure(1.6, 0, center, -1.57, 0)
1169 v.DoDraw()
1170
1171

◆ speedUp()

eventDisplay.speedUp ( )

Definition at line 686 of file eventDisplay.py.

686def speedUp():
687 for x in ["wire","gas","rockD","rockS","rockSFe"]:
688 xvol = sGeo.GetVolume(x)
689 if xvol: xvol.SetVisibility(0)
690 for k in range(1,7):
691 va = sGeo.GetVolume("T"+str(k))
692 if not va: continue
693 for x in va.GetNodes():
694 nm = x.GetName()
695 if not nm.find("Inner")<0 and k < 3:
696 x.SetVisDaughters(False)
697 x.SetVisibility(False)
698 if not nm.find("LiSc")<0: x.SetVisDaughters(False)
699 if not nm.find("RibPhi")<0: x.SetVisDaughters(False)
700#
701 for x in ["Ecal","Hcal"]:
702 xvol = sGeo.GetVolume(x)
703 if not xvol: continue
704 xvol.SetVisDaughters(0)
705 xvol.SetVisibility(1)
706 if x=="Ecal": xvol.SetLineColor(ROOT.kYellow)
707 else: xvol.SetLineColor(ROOT.kOrange+3)
708
709# set display properties for tau nu target

◆ storeCameraSetting()

eventDisplay.storeCameraSetting (   fname = 'camSetting.root')

Definition at line 674 of file eventDisplay.py.

674def storeCameraSetting(fname='camSetting.root'):
675 f = ROOT.TFile.Open(fname, "RECREATE");
676 cam = ROOT.gEve.GetDefaultGLViewer().CurrentCamera()
677 cam.Write()
678 f.Close()

◆ switchOf()

eventDisplay.switchOf (   tag)

Definition at line 730 of file eventDisplay.py.

730def switchOf(tag):
731 sc = gEve.GetScenes()
732 geoscene = sc.FindChild('Geometry scene')
733 for v in top.GetNodes():
734 vname = v.GetName()
735 if not vname.find(tag)<0:
736 v.SetVisibility(0)
737 v.SetVisDaughters(0)
738 gEve.ElementChanged(geoscene,True,True)

◆ switchOfAll()

eventDisplay.switchOfAll (   exc)

Definition at line 769 of file eventDisplay.py.

769def switchOfAll(exc):
770 sc = gEve.GetScenes()
771 geoscene = sc.FindChild('Geometry scene')
772 for v in top.GetNodes():
773 vname = v.GetName()
774 if not vname.find('cave')< 0 : continue
775 todo = True
776 for tag in exc:
777 if not tag.find(vname)<0: todo = False
778 if todo:
779 v.SetVisibility(0)
780 v.SetVisDaughters(0)
781 gEve.ElementChanged(geoscene,True,True)

◆ switchOfRock()

eventDisplay.switchOfRock ( )

Definition at line 762 of file eventDisplay.py.

762def switchOfRock():
763 sc = gEve.GetScenes()
764 geoscene = sc.FindChild('Geometry scene')
765 for x in [ 'rockD', 'rockS']:
766 v = sGeo.FindVolumeFast(x)
767 v.SetVisibility(0)
768 gEve.ElementChanged(geoscene,True,True)

◆ switchOn()

eventDisplay.switchOn (   tag)

Definition at line 739 of file eventDisplay.py.

739def switchOn(tag):
740 sc = gEve.GetScenes()
741 geoscene = sc.FindChild('Geometry scene')
742 for v in top.GetNodes():
743 vname = v.GetName()
744 if not vname.find(tag)<0:
745 print('switch on ',vname)
746 v.SetVisibility(1)
747 v.SetVisDaughters(1)
748 gEve.ElementChanged(geoscene,True,True)

◆ switchOnAll()

eventDisplay.switchOnAll (   exc)

Definition at line 782 of file eventDisplay.py.

782def switchOnAll(exc):
783 sc = gEve.GetScenes()
784 geoscene = sc.FindChild('Geometry scene')
785 for v in top.GetNodes():
786 vname = v.GetName()
787 if not vname.find('cave')< 0 : continue
788 todo = True
789 for tag in exc:
790 if not tag.find(vname)<0: todo = False
791 if todo:
792 v.SetVisibility(1)
793 v.SetVisDaughters(1)
794 gEve.ElementChanged(geoscene,True,True)
795

Variable Documentation

◆ action

eventDisplay.action

Definition at line 47 of file eventDisplay.py.

◆ bfield

eventDisplay.bfield = ROOT.genfit.FairShipFields()

Definition at line 1065 of file eventDisplay.py.

◆ br

eventDisplay.br = gEve.GetBrowser()

Definition at line 1075 of file eventDisplay.py.

◆ default

eventDisplay.default

Definition at line 46 of file eventDisplay.py.

◆ dest

eventDisplay.dest

Definition at line 44 of file eventDisplay.py.

◆ Digi_MuFilterHits

eventDisplay.Digi_MuFilterHits

Definition at line 681 of file eventDisplay.py.

◆ ecalGeoFile

eventDisplay.ecalGeoFile = ShipGeo.ecal.File

Definition at line 1000 of file eventDisplay.py.

◆ f

eventDisplay.f = ROOT.TFile.Open(options.InputFile)

Definition at line 614 of file eventDisplay.py.

◆ False

eventDisplay.False

Definition at line 46 of file eventDisplay.py.

◆ fieldMaker

eventDisplay.fieldMaker = geomGeant4.addVMCFields(ShipGeo, '', True, withVirtualMC = False)

Definition at line 1064 of file eventDisplay.py.

◆ float

eventDisplay.float

Definition at line 37 of file eventDisplay.py.

◆ fM

eventDisplay.fM = ROOT.genfit.FieldManager.getInstance()

Definition at line 1071 of file eventDisplay.py.

◆ fMan

eventDisplay.fMan = None

Definition at line 22 of file eventDisplay.py.

◆ fRman

eventDisplay.fRman = ROOT.FairRootManager.Instance()

Definition at line 1049 of file eventDisplay.py.

◆ fRun

eventDisplay.fRun = None

Definition at line 23 of file eventDisplay.py.

◆ g

eventDisplay.g = ROOT.gROOT

Definition at line 25 of file eventDisplay.py.

◆ G

eventDisplay.G = open('eveGlobal.py','w')

Definition at line 12 of file eventDisplay.py.

◆ gEnv

eventDisplay.gEnv = ROOT.gEnv

Definition at line 26 of file eventDisplay.py.

◆ geo

eventDisplay.geo = SndlhcGeo.GeoInterface(options.geoFile)

Definition at line 643 of file eventDisplay.py.

◆ geoFile

eventDisplay.geoFile

Definition at line 964 of file eventDisplay.py.

◆ geoMat

eventDisplay.geoMat = ROOT.genfit.TGeoMaterialInterface()

Definition at line 1069 of file eventDisplay.py.

◆ gEve

eventDisplay.gEve = ROOT.gEve

Definition at line 1057 of file eventDisplay.py.

◆ GTrack

eventDisplay.GTrack = ROOT.FairMCTracks("GeoTracks",verbose)

Definition at line 993 of file eventDisplay.py.

◆ help

eventDisplay.help

Definition at line 44 of file eventDisplay.py.

◆ inFile

eventDisplay.inFile = ROOT.FairFileSource(options.InputFile)

Definition at line 969 of file eventDisplay.py.

◆ InputFile

eventDisplay.InputFile

Definition at line 967 of file eventDisplay.py.

◆ ioman

eventDisplay.ioman = ROOT.FairRootManager.Instance()

Definition at line 606 of file eventDisplay.py.

◆ isMC

bool eventDisplay.isMC = True

Definition at line 616 of file eventDisplay.py.

◆ lsOfGlobals

eventDisplay.lsOfGlobals = ROOT.gROOT.GetListOfGlobals()

Definition at line 1051 of file eventDisplay.py.

◆ mcEngine

str eventDisplay.mcEngine = "TGeant4"

Definition at line 29 of file eventDisplay.py.

◆ mcHits

dict eventDisplay.mcHits = {}

Definition at line 1010 of file eventDisplay.py.

◆ modules

eventDisplay.modules = geo.modules

Definition at line 644 of file eventDisplay.py.

◆ muon_reco_task

eventDisplay.muon_reco_task = SndlhcMuonReco.MuonReco()

Definition at line 629 of file eventDisplay.py.

◆ options

eventDisplay.options = parser.parse_args()

Definition at line 51 of file eventDisplay.py.

◆ outFile

eventDisplay.outFile = ROOT.TMemFile('dummy','CREATE')

Definition at line 621 of file eventDisplay.py.

◆ OutputFile

eventDisplay.OutputFile

Definition at line 974 of file eventDisplay.py.

◆ parInput1

eventDisplay.parInput1 = ROOT.FairParRootFileIo()

Definition at line 979 of file eventDisplay.py.

◆ parser

eventDisplay.parser = ArgumentParser()

Definition at line 42 of file eventDisplay.py.

◆ pdg

eventDisplay.pdg = ROOT.TDatabasePDG.Instance()

Definition at line 24 of file eventDisplay.py.

◆ required

eventDisplay.required

Definition at line 44 of file eventDisplay.py.

◆ rtdb

eventDisplay.rtdb = fRun.GetRuntimeDb()

Definition at line 978 of file eventDisplay.py.

◆ rulers

eventDisplay.rulers = Rulers()

Definition at line 1081 of file eventDisplay.py.

◆ sGeo

eventDisplay.sGeo = ROOT.gGeoManager

Definition at line 1053 of file eventDisplay.py.

◆ SHiPDisplay

eventDisplay.SHiPDisplay = EventLoop()

Definition at line 1082 of file eventDisplay.py.

◆ ShipGeo

eventDisplay.ShipGeo = ConfigRegistry.loadpy("$FAIRSHIP/geometry/geometry_config.py", Yheight = float(dy), EcalGeoFile = ecalGeoFile)

Definition at line 1002 of file eventDisplay.py.

◆ simEngine

str eventDisplay.simEngine = "Pythia8"

Definition at line 30 of file eventDisplay.py.

◆ sink

eventDisplay.sink = ROOT.FairRootFileSink(outFile)

Definition at line 624 of file eventDisplay.py.

◆ source

eventDisplay.source = ROOT.FairFileSource(f)

Definition at line 622 of file eventDisplay.py.

◆ str

eventDisplay.str

Definition at line 38 of file eventDisplay.py.

◆ sTree

eventDisplay.sTree = fRman.GetInChain()

Definition at line 1050 of file eventDisplay.py.

◆ top

eventDisplay.top = sGeo.GetTopVolume()

Definition at line 1054 of file eventDisplay.py.

◆ Track

eventDisplay.Track = ROOT.FairMCTracks("Monte-Carlo Tracks",verbose)

Definition at line 992 of file eventDisplay.py.

◆ trackTask

eventDisplay.trackTask = SndlhcTracking.Tracking()

Definition at line 633 of file eventDisplay.py.

◆ transparentMaterials

dict eventDisplay.transparentMaterials
Initial value:
1= {'iron':80,'aluminium':80,'mylar':60,'STTmix9010_2bar':95,'steel':80,'Aluminum':80,'Scintillator':80,
2# tau nu detector
3 'CoilCopper':70,'copper':90,'HPTgas':70,'Bakelite':70,'RPCgas':70,'TTmedium':70,
4# charm detector
5 'CoilAluminium':70,'molybdenum':80,'PlasticBase':70,'tantalum':70}

Definition at line 35 of file eventDisplay.py.

◆ type

eventDisplay.type

Definition at line 37 of file eventDisplay.py.

◆ upkl

eventDisplay.upkl = Unpickler( fRun.GetGeoFile() )

Definition at line 1005 of file eventDisplay.py.

◆ verbose

int eventDisplay.verbose = 0

Definition at line 990 of file eventDisplay.py.

◆ withAllMCTracks

bool eventDisplay.withAllMCTracks = False

Definition at line 33 of file eventDisplay.py.

◆ withGeo

eventDisplay.withGeo = False

Definition at line 31 of file eventDisplay.py.

◆ withMCTracks

bool eventDisplay.withMCTracks = True

Definition at line 32 of file eventDisplay.py.

◆ xrdb

eventDisplay.xrdb = ROOT.FairRuntimeDb.instance()

Definition at line 638 of file eventDisplay.py.