7 tvname = g4Tree.GetName()
8 print (
'----------------------------------------------------------------')
9 print (
' TrackingVolume: ', tvname)
11 tvCanvas = TCanvas(tvname,tvname,100,100,800,1000)
14 tgTree.SetMarkerStyle(8)
15 tgTree.SetMarkerSize(0.5)
16 tgTree.SetMarkerColor(kRed)
17 tgTree.SetLineColor(kRed)
19 tvsavename = tvname.replace(
'::',
"_")
24 g4Tree.Draw(
'PathInX0:Eta>>'+tvsavename+
'G4X0Eta',
'',
'prof')
25 tgTree.Draw(
'PathInX0:Eta>>'+tvsavename+
'TGX0Eta',
'',
'prof')
26 x0etaG4 = gDirectory.Get(tvsavename+
'G4X0Eta')
27 x0etaTG = gDirectory.Get(tvsavename+
'TGX0Eta')
28 x0etaG4.GetXaxis().SetTitle(
'#eta')
29 x0etaG4.GetYaxis().SetTitle(
't [X_{0}]')
31 x0etaTG.Draw(
'pe,same')
32 except (ReferenceError, AttributeError):
36 g4Tree.Draw(
'PathInX0:Phi>>'+tvsavename+
'G4X0Phi',
'',
'prof')
37 tgTree.Draw(
'PathInX0:Phi>>'+tvsavename+
'TGX0Phi',
'',
'prof')
38 x0phiG4 = gDirectory.Get(tvsavename+
'G4X0Phi')
39 x0phiTG = gDirectory.Get(tvsavename+
'TGX0Phi')
40 x0phiG4.GetXaxis().SetTitle(
'#phi')
41 x0phiG4.GetYaxis().SetTitle(
't [X_{0}]')
43 x0phiTG.Draw(
'pe,same')
44 except (ReferenceError, AttributeError):
49 g4Tree.Draw(
'PathInL0:Eta>>'+tvsavename+
'G4L0Eta',
'',
'prof')
50 tgTree.Draw(
'PathInL0:Eta>>'+tvsavename+
'TGL0Eta',
'',
'prof')
51 l0etaG4 = gDirectory.Get(tvsavename+
'G4L0Eta')
52 l0etaTG = gDirectory.Get(tvsavename+
'TGL0Eta')
53 l0etaG4.GetXaxis().SetTitle(
'#eta')
54 l0etaG4.GetYaxis().SetTitle(
't [#Lambda_{0}]')
56 l0etaTG.Draw(
'pe,same')
57 except (ReferenceError, AttributeError):
61 g4Tree.Draw(
'PathInL0:Phi>>'+tvsavename+
'G4L0Phi',
'',
'prof')
62 tgTree.Draw(
'PathInL0:Phi>>'+tvsavename+
'TGL0Phi',
'',
'prof')
63 l0phiG4 = gDirectory.Get(tvsavename+
'G4L0Phi')
64 l0phiTG = gDirectory.Get(tvsavename+
'TGL0Phi')
65 l0phiG4.GetXaxis().SetTitle(
'#phi')
66 l0phiG4.GetYaxis().SetTitle(
't [#Lambda_{0}]')
68 l0phiTG.Draw(
'pe,same')
69 except (ReferenceError, AttributeError):
74 g4Tree.Draw(
'Z/A*Rho*Path/Measure:Eta>>'+tvsavename+
'G4ZArhoEta',
'',
'prof')
75 tgTree.Draw(
'Z/A*Rho*Path/Measure:Eta>>'+tvsavename+
'TGZArhoEta',
'',
'prof')
76 zarhoetaG4 = gDirectory.Get(tvsavename+
'G4ZArhoEta')
77 zarhoetaTG = gDirectory.Get(tvsavename+
'TGZArhoEta')
78 if zarhoetaG4.GetMaximum() < zarhoetaTG.GetMaximum() :
79 zarhoetaG4.SetMaximum(zarhoetaTG.GetMaximum())
80 zarhoetaG4.GetXaxis().SetTitle(
'#eta')
81 zarhoetaG4.GetYaxis().SetTitle(
'Eff. Z/A* #rho [ g/mm^{3} ]')
82 zarhoetaG4.Draw(
'hist')
83 zarhoetaTG.Draw(
'pe,same')
84 except (ReferenceError, AttributeError):
88 g4Tree.Draw(
'Z/A*Rho*Path/Measure:Phi>>'+tvsavename+
'G4ZArhoPhi',
'',
'prof')
89 tgTree.Draw(
'Z/A*Rho*Path/Measure:Phi>>'+tvsavename+
'TGZArhoPhi',
'',
'prof')
90 zarhophiG4 = gDirectory.Get(tvsavename+
'G4ZArhoPhi')
91 zarhophiTG = gDirectory.Get(tvsavename+
'TGZArhoPhi')
92 if zarhophiG4.GetMaximum() < zarhophiTG.GetMaximum() :
93 zarhophiG4.SetMaximum(zarhophiTG.GetMaximum())
94 zarhophiG4.GetXaxis().SetTitle(
'#phi')
95 zarhophiG4.GetYaxis().SetTitle(
'Eff. Z/A * #rho [ g/mm^{3} ]')
96 zarhophiG4.Draw(
'hist')
97 zarhophiTG.Draw(
'pe,same')
98 except (ReferenceError, AttributeError):
101 tvCanvas.SaveAs(saveLocation+tvsavename+
'.png')