5 import os, sys, ROOT, argparse
7 if __name__ ==
"__main__":
8 parser = argparse.ArgumentParser(prog=
'createDCubeHistograms', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
9 parser.add_argument(
'-i',
'--inputFile', help=
'choose input ROOT file', default=
'NSWPRDValAlg.sim.ntuple.root', type=str)
10 parser.add_argument(
'-o',
'--outputFile', help=
'choose output ROOT file', default=
'NSWPRDValAlg.dcube.root', type=str)
11 parser.add_argument(
'--doCSC', help=
'turn off CSC if using Run4 input ROOT file', default=
False, action=
'store_true')
12 parser.add_argument(
'--doMM', help=
'turn off MM if using Run2 input ROOT file', default=
False, action=
'store_true')
13 parser.add_argument(
'--doSTGC', help=
'turn off STGC if using Run2 input ROOT file', default=
False, action=
'store_true')
14 Options = parser.parse_args()
16 ROOT.gROOT.SetBatch(
True)
18 if not os.path.exists(Options.inputFile):
19 print (
'ERROR: File %s does not exist'%Options.inputFile)
22 inputFile = ROOT.TFile(Options.inputFile,
"READ")
24 print (
'ERROR: Failed to open file %s'%Options.inputFile)
26 inputTree = inputFile.Get(
"NSWValTree")
28 print (
'ERROR: NSWValTree does not exist in file %s'%Options.inputFile)
31 nEntries = inputTree.GetEntries()
33 print (
'ERROR: NSWValTree of file %s has 0 entries'%Options.inputFile)
36 outputFile = ROOT.TFile(Options.outputFile,
"RECREATE")
38 print (
'ERROR: Failed to open file %s'%Options.outputFile)
42 outputFile.mkdir(
"simulation/")
43 ODir = outputFile.GetDirectory(
"simulation/")
48 truthPtHist = ROOT.TH1F(
"truthPt",
"truthPt;p_{T} [GeV]",100,0,100)
49 truthEtaHist = ROOT.TH1F(
"truthEta",
"truthEta;#eta",100,-2.8,2.8)
50 truthPhiHist = ROOT.TH1F(
"truthPhi",
"truthPhi;#phi",100,-3.15,3.15)
53 rpcLocalX = ROOT.TH1F(
"rpcLocalX",
"rpcLocalX;RPC_hitLocalPositionX",100,-1.05,1.05)
54 rpcLocalY = ROOT.TH1F(
"rpcLocalY",
"rpcLocalY;RPC_hitLocalPositionY",100,-1500,1500)
55 rpcLocalZ = ROOT.TH1F(
"rpcLocalZ",
"rpcLocalZ;RPC_hitLocalPositionZ",100,-700,700)
56 rpcStationEta = ROOT.TH1F(
"rpcStationEta",
"rpcStationEta;RPC_stationEta",16,-8,8)
57 rpcStationPhi = ROOT.TH1F(
"rpcStationPhi",
"rpcStationPhi;RPC_stationPhi",9,0,9)
58 rpcGlobalX = ROOT.TH1F(
"rpcGlobalX",
"rpcGlobalX;RPC_hitGlobalPositionX",100,-13000,12000)
59 rpcGlobalY = ROOT.TH1F(
"rpcGlobalY",
"rpcGlobalY;RPC_hitGlobalPositionY",100,-15000,14000)
60 rpcGlobalZ = ROOT.TH1F(
"rpcGlobalZ",
"rpcGlobalZ;RPC_hitGlobalPositionZ",100,-15000,15000)
61 rpcGlobalR = ROOT.TH1F(
"rpcGlobalR",
"rpcGlobalR;RPC_hitGlobalPositionR",100,4000,14000)
62 rpcGlobalP = ROOT.TH1F(
"rpcGlobalP",
"rpcGlobalP;RPC_hitGlobalPositionP",100,-3.6,3.6)
63 rpcGasGap = ROOT.TH1F(
"rpcGasGap",
"rpcGasGap;RPC_Sim_GasGapLayer",3,0,3)
66 mdtLocalX = ROOT.TH1F(
"mdtLocalX",
"mdtLocalX;MDT_hitLocalPositionX",100,-16,16)
67 mdtLocalY = ROOT.TH1F(
"mdtLocalY",
"mdtLocalY;MDT_hitLocalPositionY",100,-16,16)
68 mdtLocalZ = ROOT.TH1F(
"mdtLocalZ",
"mdtLocalZ;MDT_hitLocalPositionZ",100,-2500,2500)
69 mdtStationEta = ROOT.TH1F(
"mdtStationEta",
"mdtStationEta;MDT_stationEta",16,-8,8)
70 mdtStationPhi = ROOT.TH1F(
"mdtStationPhi",
"mdtStationPhi;MDT_stationPhi",9,0,9)
71 mdtGlobalX = ROOT.TH1F(
"mdtGlobalX",
"mdtGlobalX;MDT_hitGlobalPositionX",100,-13000,12000)
72 mdtGlobalY = ROOT.TH1F(
"mdtGlobalY",
"mdtGlobalY;MDT_hitGlobalPositionY",100,-15000,14000)
73 mdtGlobalZ = ROOT.TH1F(
"mdtGlobalZ",
"mdtGlobalZ;MDT_hitGlobalPositionZ",100,-26000,26000)
74 mdtGlobalR = ROOT.TH1F(
"mdtGlobalR",
"mdtGlobalR;MDT_hitGlobalPositionR",100,1000,14000)
75 mdtGlobalP = ROOT.TH1F(
"mdtGlobalP",
"mdtGlobalP;MDT_hitGlobalPositionP",100,-3.6,3.6)
76 mdtTube = ROOT.TH1F(
"mdtTube",
"mdtTube;MDT_Sim_tube",100,0,110)
79 if Options.doCSC ==
True:
80 cscStationEta = ROOT.TH1F(
"cscStationEta",
"cscStationEta;CSC_stationEta",4,-3,1)
81 cscStationPhi = ROOT.TH1F(
"cscStationPhi",
"cscStationPhi;CSC_stationPhi",9,0,9)
82 cscGlobalX = ROOT.TH1F(
"cscGlobalX",
"cscGlobalX;CSC_hitGlobalPositionX",100,-1400,2200)
83 cscGlobalY = ROOT.TH1F(
"cscGlobalY",
"cscGlobalY;CSC_hitGlobalPositionY",100,-2100,2100)
84 cscGlobalZ = ROOT.TH1F(
"cscGlobalZ",
"cscGlobalZ;CSC_hitGlobalPositionZ",100,-7900,-7100)
85 cscGlobalR = ROOT.TH1F(
"cscGlobalR",
"cscGlobalR;CSC_hitGlobalPositionR",100,500,2500)
86 cscGlobalP = ROOT.TH1F(
"cscGlobalP",
"cscGlobalP;CSC_hitGlobalPositionP",100,-3,3)
87 cscWireLayer = ROOT.TH1F(
"cscWireLayer",
"cscWireLayer;CSC_Sim_wireLayer",5,0,5)
88 cscStrip = ROOT.TH1F(
"cscStrip",
"cscStrip;CSC_strip",3,0,3)
89 cscglobalTime = ROOT.TH1F(
"cscglobalTime",
"cscglobalTime;CSC_globalTime",100,0,60)
90 cscKineticEnergy = ROOT.TH1F(
"cscKineticEnergy",
"cscKineticEnergy;CSC_kineticEnergy",100,0,400000)
91 cscDepositEnergy = ROOT.TH1F(
"cscDepositEnergy",
"cscDeposityEnergy;CSC_depositEnergy",100,0,0.008)
92 cscSimStationEta = ROOT.TH1F(
"cscSimStationEta",
"cscSimStationEta;CSC_Sim_stationEta",4,-3,1)
93 cscSimStationPhi = ROOT.TH1F(
"cscSimStationPhi",
"cscSimStationPhi;CSC_Sim_stationPhi",9,0,9)
94 cscSimChamberLayer = ROOT.TH1F(
"cscSimChamberLayer",
"cscSimChamberLayer;CSC_Sim_chamberLayer",4,0,4)
97 tgcLocalX = ROOT.TH1F(
"tgcLocalX",
"tgcLocalX;TGC_hitLocalPositionX",100,-1.5,1.5)
98 tgcLocalY = ROOT.TH1F(
"tgcLocalY",
"tgcLocalY;TGC_hitLocalPositionY",100,-800,800)
99 tgcLocalZ = ROOT.TH1F(
"tgcLocalZ",
"tgcLocalZ;TGC_hitLocalPositionZ",100,-1200,1200)
100 tgcStationEta = ROOT.TH1F(
"tgcStationEta",
"tgcStationEta;TGC_stationEta",12,-6,6)
101 tgcStationPhi = ROOT.TH1F(
"tgcStationPhi",
"tgcStationPhi;TGC_stationPhi",50,0,50)
102 tgcGlobalX = ROOT.TH1F(
"tgcGlobalX",
"tgcGlobalX;TGC_hitGlobalPositionX",100,-13000,12000)
103 tgcGlobalY = ROOT.TH1F(
"tgcGlobalY",
"tgcGlobalY;TGC_hitGlobalPositionY",100,-11000,11000)
104 tgcGlobalZ = ROOT.TH1F(
"tgcGlobalZ",
"tgcGlobalZ;TGC_hitGlobalPositionZ",100,-18000,18000)
105 tgcGlobalR = ROOT.TH1F(
"tgcGlobalR",
"tgcGlobalR;TGC_hitGlobalPositionR",100,1000,13000)
106 tgcGlobalP = ROOT.TH1F(
"tgcGlobalP",
"tgcGlobalP;TGC_hitGlobalPositionP",100,-3.6,3.6)
107 tgcGasGap = ROOT.TH1F(
"tgcGasGap",
"tgcGasGap;TGC_GasGap",4,0,4)
108 tgcChannel = ROOT.TH1F(
"tgcChannel",
"tgcChannel;TGC_channel",3,0,3)
109 tgcGlobalTime = ROOT.TH1F(
"tgcGlobalTime",
"tgcGlobalTime;TGC_globalTime",100,0,120)
110 tgcKineticEnergy = ROOT.TH1F(
"tgcKineticEnergy",
"tgcKineticEnergy;TGC_kineticEnergy",100,0,400000)
111 tgcDepositEnergy = ROOT.TH1F(
"tgcDepositEnergy",
"tgcDepositEnergy;TGC_depositEnergy",100,0,0.0018)
114 if Options.doMM ==
True:
115 mmGlobalX = ROOT.TH1F(
"mmGlobalX",
"mmGlobalX;MM_hitGlobalPositionX",100,-5000,3000)
116 mmGlobalY = ROOT.TH1F(
"mmGlobalY",
"mmGlobalY;MM_hitGlobalPositionY",100,-3000,4000)
117 mmGlobalZ = ROOT.TH1F(
"mmGlobalZ",
"mmGlobalZ;MM_hitGlobalPositionZ",100,7000,7800)
118 mmGlobalR = ROOT.TH1F(
"mmGlobalR",
"mmGlobalR;MM_hitGlobalPositionR",100,1200,4600)
119 mmGlobalP = ROOT.TH1F(
"mmGlobalP",
"mmGlobalP;MM_hitGlobalPositionP",100,-3.4,3.4)
122 if Options.doSTGC ==
True:
123 stgcGlobalX = ROOT.TH1F(
"stgcGlobalX",
"stgcGlobalX;sTGC_hitGlobalPositionX",100,-5000,4200)
124 stgcGlobalY = ROOT.TH1F(
"stgcGlobalY",
"stgcGlobalY;sTGC_hitGlobalPositionY",100,-3200,3400)
125 stgcGlobalZ = ROOT.TH1F(
"stgcGlobalZ",
"stgcGlobalZ;sTGC_hitGlobalPositionZ",100,6900,7900)
126 stgcGlobalR = ROOT.TH1F(
"stgcGlobalR",
"stgcGlobalR;sTGC_hitGlobalPositionR",100,700,4700)
127 stgcGlobalP = ROOT.TH1F(
"stgcGlobalP",
"stgcGlobalP;sTGC_hitGlobalPositionP",100,-3.4,3.4)
130 for i
in range(nEntries):
131 inputTree.GetEntry(i)
133 for ntruth
in range(0,len(inputTree.MuEntry_ParticlePt)):
134 truthPtHist.Fill(inputTree.MuEntry_ParticlePt[ntruth]*0.001)
135 truthEtaHist.Fill(inputTree.MuEntry_ParticleEta[ntruth])
136 truthPhiHist.Fill(inputTree.MuEntry_ParticlePhi[ntruth])
138 for nrpcHit
in range(0,len(inputTree.RPC_hitLocalPositionX)):
139 rpcLocalX.Fill(inputTree.RPC_hitLocalPositionX[nrpcHit])
140 rpcLocalY.Fill(inputTree.RPC_hitLocalPositionY[nrpcHit])
141 rpcLocalZ.Fill(inputTree.RPC_hitLocalPositionZ[nrpcHit])
142 rpcStationEta.Fill(inputTree.RPC_stationEta[nrpcHit])
143 rpcStationPhi.Fill(inputTree.RPC_stationPhi[nrpcHit])
144 rpcGlobalX.Fill(inputTree.RPC_hitGlobalPositionX[nrpcHit])
145 rpcGlobalY.Fill(inputTree.RPC_hitGlobalPositionY[nrpcHit])
146 rpcGlobalZ.Fill(inputTree.RPC_hitGlobalPositionZ[nrpcHit])
147 rpcGlobalR.Fill(inputTree.RPC_hitGlobalPositionR[nrpcHit])
148 rpcGlobalP.Fill(inputTree.RPC_hitGlobalPositionP[nrpcHit])
149 rpcGasGap.Fill(inputTree.RPC_Sim_GasGapLayer[nrpcHit])
151 for nmdtHit
in range(0,len(inputTree.MDT_hitLocalPositionX)):
152 mdtLocalX.Fill(inputTree.MDT_hitLocalPositionX[nmdtHit])
153 mdtLocalY.Fill(inputTree.MDT_hitLocalPositionY[nmdtHit])
154 mdtLocalZ.Fill(inputTree.MDT_hitLocalPositionZ[nmdtHit])
155 mdtStationEta.Fill(inputTree.MDT_stationEta[nmdtHit])
156 mdtStationPhi.Fill(inputTree.MDT_stationPhi[nmdtHit])
157 mdtGlobalX.Fill(inputTree.MDT_hitGlobalPositionX[nmdtHit])
158 mdtGlobalY.Fill(inputTree.MDT_hitGlobalPositionY[nmdtHit])
159 mdtGlobalZ.Fill(inputTree.MDT_hitGlobalPositionZ[nmdtHit])
160 mdtGlobalR.Fill(inputTree.MDT_hitGlobalPositionR[nmdtHit])
161 mdtGlobalP.Fill(inputTree.MDT_hitGlobalPositionP[nmdtHit])
162 mdtTube.Fill(inputTree.MDT_Sim_tube[nmdtHit])
164 if Options.doCSC ==
True:
165 for ncscHit
in range(0,len(inputTree.CSC_hitGlobalPositionX)):
166 cscStationEta.Fill(inputTree.CSC_stationEta[ncscHit])
167 cscStationPhi.Fill(inputTree.CSC_stationPhi[ncscHit])
168 cscGlobalX.Fill(inputTree.CSC_hitGlobalPositionX[ncscHit])
169 cscGlobalY.Fill(inputTree.CSC_hitGlobalPositionY[ncscHit])
170 cscGlobalZ.Fill(inputTree.CSC_hitGlobalPositionZ[ncscHit])
171 cscGlobalR.Fill(inputTree.CSC_hitGlobalPositionR[ncscHit])
172 cscGlobalP.Fill(inputTree.CSC_hitGlobalPositionP[ncscHit])
173 cscWireLayer.Fill(inputTree.CSC_Sim_wireLayer[ncscHit])
174 cscStrip.Fill(inputTree.CSC_strip[ncscHit])
175 cscglobalTime.Fill(inputTree.CSC_globalTime[ncscHit])
176 cscKineticEnergy.Fill(inputTree.CSC_kineticEnergy[ncscHit])
177 cscDepositEnergy.Fill(inputTree.CSC_depositEnergy[ncscHit])
178 cscSimStationEta.Fill(inputTree.CSC_Sim_stationEta[ncscHit])
179 cscSimStationPhi.Fill(inputTree.CSC_Sim_stationPhi[ncscHit])
180 cscSimChamberLayer.Fill(inputTree.CSC_Sim_chamberLayer[ncscHit])
182 for ntgcHit
in range(0,len(inputTree.TGC_hitLocalPositionX)):
183 tgcLocalX.Fill(inputTree.TGC_hitLocalPositionX[ntgcHit])
184 tgcLocalY.Fill(inputTree.TGC_hitLocalPositionY[ntgcHit])
185 tgcLocalZ.Fill(inputTree.TGC_hitLocalPositionZ[ntgcHit])
186 tgcStationEta.Fill(inputTree.TGC_stationEta[ntgcHit])
187 tgcStationPhi.Fill(inputTree.TGC_stationPhi[ntgcHit])
188 tgcGlobalX.Fill(inputTree.TGC_hitGlobalPositionX[ntgcHit])
189 tgcGlobalY.Fill(inputTree.TGC_hitGlobalPositionY[ntgcHit])
190 tgcGlobalZ.Fill(inputTree.TGC_hitGlobalPositionZ[ntgcHit])
191 tgcGlobalR.Fill(inputTree.TGC_hitGlobalPositionR[ntgcHit])
192 tgcGlobalP.Fill(inputTree.TGC_hitGlobalPositionP[ntgcHit])
193 tgcGasGap.Fill(inputTree.TGC_GasGap[ntgcHit])
194 tgcChannel.Fill(inputTree.TGC_channel[ntgcHit])
195 tgcGlobalTime.Fill(inputTree.TGC_globalTime[ntgcHit])
196 tgcKineticEnergy.Fill(inputTree.TGC_kineticEnergy[ntgcHit])
197 tgcDepositEnergy.Fill(inputTree.TGC_depositEnergy[ntgcHit])
199 if Options.doMM ==
True:
200 for nmmHit
in range(0,len(inputTree.Hits_MM_hitGlobalPositionX)):
201 mmGlobalX.Fill(inputTree.Hits_MM_hitGlobalPositionX[nmmHit])
202 mmGlobalY.Fill(inputTree.Hits_MM_hitGlobalPositionY[nmmHit])
203 mmGlobalZ.Fill(inputTree.Hits_MM_hitGlobalPositionZ[nmmHit])
204 mmGlobalR.Fill(inputTree.Hits_MM_hitGlobalPositionR[nmmHit])
205 mmGlobalP.Fill(inputTree.Hits_MM_hitGlobalPositionP[nmmHit])
207 if Options.doSTGC ==
True:
208 for nstgcHit
in range(0,len(inputTree.Hits_sTGC_hitGlobalPositionX)):
209 stgcGlobalX.Fill(inputTree.Hits_sTGC_hitGlobalPositionX[nstgcHit])
210 stgcGlobalY.Fill(inputTree.Hits_sTGC_hitGlobalPositionY[nstgcHit])
211 stgcGlobalZ.Fill(inputTree.Hits_sTGC_hitGlobalPositionZ[nstgcHit])
212 stgcGlobalR.Fill(inputTree.Hits_sTGC_hitGlobalPositionR[nstgcHit])
213 stgcGlobalP.Fill(inputTree.Hits_sTGC_hitGlobalPositionP[nstgcHit])
216 ODir.WriteTObject(truthPtHist, truthPtHist.GetName())
217 ODir.WriteTObject(truthEtaHist, truthEtaHist.GetName())
218 ODir.WriteTObject(truthPhiHist, truthPhiHist.GetName())
220 ODir.WriteTObject(rpcLocalX, rpcLocalX.GetName())
221 ODir.WriteTObject(rpcLocalY, rpcLocalY.GetName())
222 ODir.WriteTObject(rpcLocalZ, rpcLocalZ.GetName())
223 ODir.WriteTObject(rpcStationEta, rpcStationEta.GetName())
224 ODir.WriteTObject(rpcStationPhi, rpcStationPhi.GetName())
225 ODir.WriteTObject(rpcGlobalX, rpcGlobalX.GetName())
226 ODir.WriteTObject(rpcGlobalY, rpcGlobalY.GetName())
227 ODir.WriteTObject(rpcGlobalZ, rpcGlobalZ.GetName())
228 ODir.WriteTObject(rpcGlobalR, rpcGlobalR.GetName())
229 ODir.WriteTObject(rpcGlobalP, rpcGlobalP.GetName())
230 ODir.WriteTObject(rpcGasGap, rpcGasGap.GetName())
232 ODir.WriteTObject(mdtLocalX, mdtLocalX.GetName())
233 ODir.WriteTObject(mdtLocalY, mdtLocalY.GetName())
234 ODir.WriteTObject(mdtLocalZ, mdtLocalZ.GetName())
235 ODir.WriteTObject(mdtStationEta, mdtStationEta.GetName())
236 ODir.WriteTObject(mdtStationPhi, mdtStationPhi.GetName())
237 ODir.WriteTObject(mdtGlobalX, mdtGlobalX.GetName())
238 ODir.WriteTObject(mdtGlobalY, mdtGlobalY.GetName())
239 ODir.WriteTObject(mdtGlobalZ, mdtGlobalZ.GetName())
240 ODir.WriteTObject(mdtGlobalR, mdtGlobalR.GetName())
241 ODir.WriteTObject(mdtGlobalP, mdtGlobalP.GetName())
242 ODir.WriteTObject(mdtTube, mdtTube.GetName())
244 if Options.doCSC ==
True:
245 ODir.WriteTObject(cscStationEta, cscStationEta.GetName())
246 ODir.WriteTObject(cscStationPhi, cscStationPhi.GetName())
247 ODir.WriteTObject(cscGlobalX, cscGlobalX.GetName())
248 ODir.WriteTObject(cscGlobalY, cscGlobalY.GetName())
249 ODir.WriteTObject(cscGlobalZ, cscGlobalZ.GetName())
250 ODir.WriteTObject(cscGlobalR, cscGlobalR.GetName())
251 ODir.WriteTObject(cscGlobalP, cscGlobalP.GetName())
252 ODir.WriteTObject(cscWireLayer,cscWireLayer.GetName())
253 ODir.WriteTObject(cscStrip,cscStrip.GetName())
254 ODir.WriteTObject(cscglobalTime,cscglobalTime.GetName())
255 ODir.WriteTObject(cscKineticEnergy,cscKineticEnergy.GetName())
256 ODir.WriteTObject(cscDepositEnergy,cscDepositEnergy.GetName())
257 ODir.WriteTObject(cscSimStationEta,cscSimStationEta.GetName())
258 ODir.WriteTObject(cscSimStationPhi,cscSimStationPhi.GetName())
259 ODir.WriteTObject(cscSimChamberLayer,cscSimChamberLayer.GetName())
261 ODir.WriteTObject(tgcLocalX, tgcLocalX.GetName())
262 ODir.WriteTObject(tgcLocalY, tgcLocalY.GetName())
263 ODir.WriteTObject(tgcLocalZ, tgcLocalZ.GetName())
264 ODir.WriteTObject(tgcStationEta, tgcStationEta.GetName())
265 ODir.WriteTObject(tgcStationPhi, tgcStationPhi.GetName())
266 ODir.WriteTObject(tgcGlobalX, tgcGlobalX.GetName())
267 ODir.WriteTObject(tgcGlobalY, tgcGlobalY.GetName())
268 ODir.WriteTObject(tgcGlobalZ, tgcGlobalZ.GetName())
269 ODir.WriteTObject(tgcGlobalR, tgcGlobalR.GetName())
270 ODir.WriteTObject(tgcGlobalP, tgcGlobalP.GetName())
271 ODir.WriteTObject(tgcGasGap, tgcGasGap.GetName())
272 ODir.WriteTObject(tgcChannel, tgcChannel.GetName())
273 ODir.WriteTObject(tgcGlobalTime, tgcGlobalTime.GetName())
274 ODir.WriteTObject(tgcKineticEnergy, tgcKineticEnergy.GetName())
275 ODir.WriteTObject(tgcDepositEnergy, tgcDepositEnergy.GetName())
277 if Options.doMM ==
True:
278 ODir.WriteTObject(mmGlobalX, mmGlobalX.GetName())
279 ODir.WriteTObject(mmGlobalY, mmGlobalY.GetName())
280 ODir.WriteTObject(mmGlobalZ, mmGlobalZ.GetName())
281 ODir.WriteTObject(mmGlobalR, mmGlobalR.GetName())
282 ODir.WriteTObject(mmGlobalP, mmGlobalP.GetName())
284 if Options.doSTGC ==
True:
285 ODir.WriteTObject(stgcGlobalX, stgcGlobalX.GetName())
286 ODir.WriteTObject(stgcGlobalY, stgcGlobalY.GetName())
287 ODir.WriteTObject(stgcGlobalZ, stgcGlobalZ.GetName())
288 ODir.WriteTObject(stgcGlobalR, stgcGlobalR.GetName())
289 ODir.WriteTObject(stgcGlobalP, stgcGlobalP.GetName())
291 print (
'INFO: Written histograms to file %s'%(Options.outputFile))