25 dir0 =
'/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/'
27 f1 = TFile(dir0+
'IsolationSelection/v2/MC15_Z_Jpsi_cutMap.root',
'read')
28 h1 = f1.Get(
'Muons/DFCommonGoodMuon/mu_cutValues_'+var)
29 h1.GetZaxis().SetRangeUser(99,99)
30 h1_xy = h1.Project3D(
'xy')
31 h1_xy.GetXaxis().SetTitle(h1_xy.GetXaxis().GetTitle().
replace(
'eta',
'#eta'))
36 h1_eff = h1_xy.Clone(h1_xy.GetName()+
'_eff')
37 fun1 = TF1(
'fun1', effFun, 0.0, 1000.0)
38 for ix
in range(h1_xy.GetNbinsX()+2):
39 for iy
in range(h1_xy.GetNbinsY()+2):
40 pt = h1_xy.GetYaxis().GetBinCenter(iy)
41 print pt,
min(
int(fun1.Eval(pt)),99),0.1*pt+90
42 h1_xy.SetBinContent(ix,iy,h1.GetBinContent(iy,ix,
min(
int(fun1.Eval(pt)), 99)))
43 h1_eff.SetBinContent(ix,iy,
min(
int(fun1.Eval(pt)),99))
49 h1_xy.Draw(
'colztext')
51 lt.DrawLatexNDC(0.25,0.95,var+
', #epsilon='+effFun.replace(
'x',
'p_{T}')+
' [%]')