import ROOT import sys sys.path.append('/home/mberger/fopiroot/fopiroot_dev/macro/tpc/FOPI/mberger') from functions import set_palette ROOT.gROOT.ProcessLine(".x rootlogon.C") ROOT.gROOT.ProcessLine('gROOT->SetStyle("Plain")') ROOT.gROOT.LoadMacro("stlPYROOT.h+") set_palette() rfile=ROOT.TFile("outfiles_e12/MC/sphere/ana/newError/drift_86_mc.root",'read') pulls=[] pulls.append({}) pulls.append({}) pulls[0]['h']=rfile.Get("hErrA2AmpVsZ3") pulls[0]['Const']=rfile.Get("hErrA2AmpVsZ3_Const") pulls[0]['Mean']=rfile.Get("hErrA2AmpVsZ3_Mean") pulls[0]['Sigma']=rfile.Get("hErrA2AmpVsZ3_Sigma") pulls[1]['h']=rfile.Get("hErrA3AmpVsZ3") pulls[1]['Const']=rfile.Get("hErrA3AmpVsZ3_Const") pulls[1]['Mean']=rfile.Get("hErrA3AmpVsZ3_Mean") pulls[1]['Sigma']=rfile.Get("hErrA3AmpVsZ3_Sigma") graphs=['Const','Mean','Sigma'] labeloff=0.015 ytitoff=1.5 xtitoff=1.3 for pull in pulls: pull['h'].SetStats(0) pull['h'].SetTitle('') pull['h'].GetYaxis().SetTitle("P") pull['h'].GetYaxis().SetLabelOffset(labeloff) pull['h'].GetYaxis().SetTitleOffset(ytitoff) pull['h'].GetXaxis().SetTitle("Z (cm)") pull['h'].GetXaxis().SetLabelOffset(labeloff) pull['h'].GetXaxis().SetTitleOffset(xtitoff) pull['h'].GetZaxis().SetLabelOffset(labeloff) for g in graphs: pull[g].SetTitle("") ax=pull[g].GetXaxis() ax.SetLabelOffset(labeloff) ax.SetTitleOffset(xtitoff) ax=pull[g].GetYaxis() ax.SetLabelOffset(1.6*labeloff) ax.SetTitleOffset(1.4*ytitoff) ax.SetTitle(g) pull[g].GetXaxis().SetTitle('Z (cm)') pull[g].SetMarkerSize(0.3) canvas=[] canvas.append(ROOT.TCanvas("pull","pull",1000,600)) canvas[-1].Divide(3,2) for i in range(2): canvas[-1].cd((3*i)+1) canvas[-1].cd((3*i)+1).SetLeftMargin(0.1) canvas[-1].cd((3*i)+1).SetRightMargin(0.15) pulls[i]['h'].Draw('colz') canvas[-1].cd((3*i)+2) canvas[-1].cd((3*i)+2).SetLeftMargin(0.1) canvas[-1].cd((3*i)+2).SetRightMargin(0.05) pulls[i]['Mean'].Draw('AP') canvas[-1].cd((3*i)+3) canvas[-1].cd((3*i)+3).SetLeftMargin(0.1) canvas[-1].cd((3*i)+3).SetRightMargin(0.05) pulls[i]['Sigma'].Draw('AP') canvas[-1].Update() canvas[-1].SaveAs('/home/mberger/gurkensalat/images/chap_DataCorrection/sec_Reclustering/pulls_dms.svg') u=raw_input()