205 if inputs[0]
is None:
208 ecap = [
"BA",
"BC",
"EA",
"EC"]
212 heff_outer = inputs[0][1][2].Clone()
213 heff_middle = inputs[0][1][3].Clone()
214 heff_inner = inputs[0][1][4].Clone()
215 heff_extra = inputs[0][1][5].Clone()
216 hflag=inputs[0][1][6]
220 heff_outer.SetName(
"effsIn"+ecap_str+
"BAOuterPerMultiLayer_ADCCut")
221 heff_outer.SetTitle(
"effsIn"+ecap_str+
"OuterPerMultiLayer, ADCCut")
222 heff_outer_N = heff_outer.Clone()
223 name = heff_outer.GetName()
226 heff_middle.SetName(
"effsIn"+ecap_str+
"MiddlePerMultiLayer_ADCCut")
227 heff_middle.SetTitle(
"effsIn"+ecap_str+
"MiddlePerMultiLayer, ADCCut")
228 heff_middle_N = heff_middle.Clone()
231 heff_inner.SetName(
"effsIn"+ecap_str+
"InnerPerMultiLayer_ADCCut")
232 heff_inner.SetTitle(
"effsIn"+ecap_str+
"InnerPerMultiLayer, ADCCut")
233 heff_inner_N = heff_inner.Clone()
236 heff_extra.SetName(
"effsIn"+ecap_str+
"ExtraPerMultiLayer_ADCCut")
237 heff_extra.SetTitle(
"effsIn"+ecap_str+
"ExtraPerMultiLayer, ADCCut")
238 heff_extra_N = heff_extra.Clone()
240 ecap_fullStr_lower =
"mdt"+ecap_str
241 heffML =
TH1F(ecap_fullStr_lower+
"_ML_eff",ecap_fullStr_lower+
"_ML_eff",50,0,1)
243 h2=inputs[0][1][2].Clone()
244 h2.SetTitle((inputs[0][1][2].GetTitle()).
replace(
"_forpp",
""))
245 h3=inputs[0][1][3].Clone()
246 h3.SetTitle((inputs[0][1][3].GetTitle()).
replace(
"_forpp",
""))
247 if(
not ecap_str[0] ==
"E"):
251 h4=inputs[0][1][4].Clone()
252 h4.SetTitle((inputs[0][1][4].GetTitle()).
replace(
"_forpp",
""))
253 h5=inputs[0][1][5].Clone()
254 h5.SetTitle((inputs[0][1][5].GetTitle()).
replace(
"_forpp",
""))
256 if(
not ecap_str[0] ==
"B"):
263 name_num = hi_num.GetName()
266 countsML1, countsML2, entriesML1, entriesML2 =
MDTTubeEff(name,hi_num,hi_den)
268 stateta_IMO_c, statphi_IMO_c, stateta_c, statphi_c, statphi_c2 =
MDT2DHWName(ch_name)
271 if( entriesML2 > cut ):
272 heffML.Fill(countsML2/entriesML2)
273 if( entriesML1 > cut ):
274 heffML.Fill(countsML1/entriesML1)
276 if(ch_name[1:2]==
"O"):
277 if( entriesML1 > cut ):
278 heff_outer.Fill(stateta_c, statphi_c, countsML1)
279 heff_outer_N.Fill(stateta_c, statphi_c, entriesML1)
280 if( entriesML2 > cut ):
281 heff_outer.Fill(stateta_c, statphi_c2, countsML2)
282 heff_outer_N.Fill(stateta_c, statphi_c2, entriesML2)
283 if(ch_name[1:2]==
"M"):
284 if( entriesML1 > cut ):
285 heff_middle.Fill(stateta_c, statphi_c, countsML1)
286 heff_middle_N.Fill(stateta_c, statphi_c, entriesML1)
287 if( entriesML2 > cut ):
288 heff_middle.Fill(stateta_c, statphi_c2, countsML2)
289 heff_middle_N.Fill(stateta_c, statphi_c2, entriesML2)
290 if(ch_name[1:2]==
"I"):
291 if( entriesML1 > cut ):
292 heff_inner.Fill(stateta_c, statphi_c, countsML1)
293 heff_inner_N.Fill(stateta_c, statphi_c, entriesML1)
294 if( entriesML2 > cut ):
295 heff_inner.Fill(stateta_c, statphi_c2, countsML2)
296 heff_inner_N.Fill(stateta_c, statphi_c2, entriesML2)
297 if(ch_name[1:2]==
"E"):
298 if( entriesML1 > cut ):
299 heff_extra.Fill(stateta_c, statphi_c, countsML1)
300 heff_extra_N.Fill(stateta_c, statphi_c, entriesML1)
301 if( entriesML2 > cut ):
302 heff_extra.Fill(stateta_c, statphi_c2, countsML2)
303 heff_extra_N.Fill(stateta_c, statphi_c2, entriesML2)
306 heff_outer.Divide(heff_outer_N)
307 heff_middle.Divide(heff_middle_N)
308 heff_inner.Divide(heff_inner_N)
309 heff_extra.Divide(heff_extra_N)
312 if(
not ecap_str[0] ==
"E"):
317 if(
not ecap_str[0] ==
"B"):
321 return [heff_outer, heff_middle, heff_inner, heff_extra, heffML, h2, h3, h4, h5]