#include "TROOT.h" #include "TObject.h" #include "TFile.h" #include "TTree.h" #include "TH2.h" #include "TMath.h" #include "TGraph.h" #include "TColor.h" #include "TCanvas.h" #include "TLegend.h" #include #include #include "AtlasStyle.h" #include "TROOT.h" void Efficiency() { static TStyle* atlasStyle = 0; std::cout << "\nApplying ATLAS style settings...\n" << std::endl ; if ( atlasStyle==0 ) atlasStyle = AtlasStyle(); gROOT->SetStyle("ATLAS"); gROOT->ForceStyle(); gStyle->SetPadColor (0); gStyle->SetPadBorderSize (10); gStyle->SetPadBorderMode (0); gStyle->SetPadBottomMargin(0.18); gStyle->SetPadTopMargin (0.06); gStyle->SetPadLeftMargin (0.10); gStyle->SetPadRightMargin (0.04); gStyle->SetPadGridX (0); gStyle->SetPadGridY (0); gStyle->SetPadTickX (1); gStyle->SetPadTickY (1); gStyle->SetTitleYOffset(1.0); gStyle->SetCanvasColor(0); gStyle->SetOptStat(0); gStyle->SetOptFit(1); gStyle->SetStatColor(0); TCanvas *c1 = new TCanvas("c1","A Simple Graph Example",200,10,700,500); const Int_t n = 10; Float_t mass[n] = {15,20,25,30,35,40,45,50,55,60}; Float_t eff_Prim_Vert_4e[n] = {100,100,100,100,100,100,100,100,100,100}; Float_t eff_trigger_4e[n] = {82.08,83.87,85.14,86.19,86.49,87.92,87.61,87.27,87.36,86.52}; Float_t eff_SFOS_4e[n] = {11.06,11.3,11.29,11.2,11.31,12.05,12.08,12.49,12.39,12.74}; Float_t eff_NotOverlap_4e[n] = {11.06,11.29,11.29,11.19,11.31,12.05,12.08,12.48,12.39,12.73}; Float_t eff_kinematic_4e[n] = {10.75,10.91,10.95,10.86,10.93,11.61,11.7,12.24,12.13,12.58}; Float_t eff_TriggerMatch_4e[n] = {10.7,10.88,10.91,10.84,10.9,11.57,11.65,12.17,12.1,12.53}; Float_t eff_DeltaR_4e[n] = {10.45,10.75,10.76,10.63,10.69,11.45,11.56,12,12.01,12.43}; Float_t eff_MuQuality_4e[n] = {10.45,10.75,10.76,10.63,10.69,11.45,11.56,12,12.01,12.43}; Float_t eff_Isolation_4e[n] = {7.44,7.55,7.22,7.23,7.28,7.8,7.54,8.04,8.25,8.73}; Float_t eff_ElectronID_4e[n] = {5.15,5.31,5.33,5.2,5.47,5.88,5.53,5.84,6.13,6.45}; Float_t eff_ImpactParameter_4e[n] = {5.09,5.26,5.3,5.16,5.44,5.83,5.49,5.82,6.03,6.42}; Float_t eff_QVeto_4e[n] = {5.07,5.25,5.29,5.14,5.39,5.79,5.39,5.64,5.82,6}; Float_t eff_LowMassVeto_4e[n] = {5.07,5.25,5.29,5.14,5.37,5.79,5.37,5.6,5.81,5.96}; Float_t eff_HWind_4e[n] = {4.85,4.94,4.92,4.8,5.17,5.43,5.03,5.25,5.36,5.54}; Float_t eff_ZVeto_4e[n] = {3.03,3.33,3.39,3.41,3.82,4.39,4.08,4.39,4.72,5.35}; Float_t eff_LosseSR_4e[n] = {3.03,3.33,3.39,3.41,3.82,4.39,4.08,4.39,4.72,5.35}; Float_t eff_MediumSR_4e[n] = {3,3.26,3.33,3.33,3.8,4.35,3.97,4.3,4.66,5.23}; Float_t eff_Prim_Vert_2e2m[n] = {100,100,100,100,100,100,100,100,100,100}; Float_t eff_trigger_2e2m[n] = {82.08,83.87,85.14,86.19,86.49,87.92,87.61,87.27,87.36,86.52}; Float_t eff_SFOS_2e2m[n] = {24.64,24.19,25.18,24.1,24.85,25.17,26,26,26.92,27.65}; Float_t eff_NotOverlap_2e2m[n] = {24.62,24.19,25.18,24.1,24.83,25.15,25.99,25.96,26.91,27.66}; Float_t eff_kinematic_2e2m[n] = {23.88,23.48,24.52,23.41,24.09,24.62,25.48,25.54,26.66,27.3}; Float_t eff_TriggerMatch_2e2m[n] = {23.89,23.46,24.5,23.41,24.1,24.62,25.46,25.55,26.65,27.3}; Float_t eff_DeltaR_2e2m[n] = {23.6,23.18,24.17,23.17,23.83,24.32,25.11,25.01,25.67,25.66}; Float_t eff_MuQuality_2e2m[n] = {23.59,23.18,24.17,23.16,23.82,24.32,25.11,25.02,25.68,25.65}; Float_t eff_Isolation_2e2m[n] = {17.63,17.75,18.02,17.34,17.82,18.36,18.82,19,19.6,20.16}; Float_t eff_ElectronID_2e2m[n] = {15.22,15.27,15.52,14.81,15.07,15.55,16.05,16.26,16.89,17.2}; Float_t eff_ImpactParameter_2e2m[n]= {14.88,14.94,15.16,14.48,14.79,15.29,15.65,15.97,16.5,16.84}; Float_t eff_QVeto_2e2m[n] = {14.8,14.91,15.15,14.48,14.78,15.29,15.65,15.96,16.5,16.84}; Float_t eff_LowMassVeto_2e2m[n] = {14.78,14.9,15.15,14.48,14.78,15.29,15.65,15.96,16.5,16.84}; Float_t eff_HWind_2e2m[n] = {14.35,14.32,14.53,13.98,13.98,14.43,14.93,15.18,15.66,16.15}; Float_t eff_ZVeto_2e2m[n] = {14.35,14.32,14.53,13.98,13.98,14.43,14.93,15.18,15.65,16.02}; Float_t eff_LosseSR_2e2m[n] = {14.35,14.32,14.53,13.98,13.98,14.43,14.93,15.18,15.65,16.02}; Float_t eff_MediumSR_2e2m[n] = {14.18,14.15,14.37,13.73,13.73,14.26,14.81,14.91,15.39,15.79}; Float_t eff_Prim_Vert_4m[n] = {100,100,100,100,100,100,100,100,100,100}; Float_t eff_trigger_4m[n] = {82.08,83.87,85.14,86.19,86.49,87.92,87.61,87.27,87.36,86.52}; Float_t eff_SFOS_4m[n] = {12.14,13.01,12.52,12.9,12.33,12.8,12.71,13.75,13.38,13.8}; Float_t eff_NotOverlap_4m[n] = {12.16,13.02,12.52,12.9,12.33,12.8,12.71,13.77,13.38,13.8}; Float_t eff_kinematic_4m[n] = {11.67,12.39,11.96,12.45,11.81,12.47,12.4,13.56,13.18,13.58}; Float_t eff_TriggerMatch_4m[n] = {11.67,12.39,11.96,12.45,11.81,12.47,12.43,13.56,13.18,13.58}; Float_t eff_DeltaR_4m[n] = {11.66,12.38,11.96,12.45,11.83,12.45,12.4,13.51,13.07,13.31}; Float_t eff_MuQuality_4m[n] = {11.6,12.35,11.94,12.43,11.81,12.45,12.37,13.49,13.05,13.3}; Float_t eff_Isolation_4m[n] = {9.54,10.36,9.85,10.27,9.65,10.28,10.04,11.42,10.95,11.56}; Float_t eff_ElectronID_4m[n] = {9.54,10.36,9.85,10.27,9.65,10.28,10.04,11.42,10.95,11.56}; Float_t eff_ImpactParameter_4m[n] = {9.05,10.06,9.44,9.9,9.34,9.94,9.6,10.97,10.6,11.13}; Float_t eff_QVeto_4m[n] = {8.95,10.05,9.42,9.89,9.27,9.86,9.4,10.76,10.19,10.59}; Float_t eff_LowMassVeto_4m[n] = {8.94,10.05,9.41,9.88,9.27,9.84,9.37,10.7,10.14,10.47}; Float_t eff_HWind_4m[n] = {8.73,9.81,9.1,9.44,9.01,9.49,9.12,10.23,9.65,9.98}; Float_t eff_ZVeto_4m[n] = {5.27,6.11,5.81,6.48,6.56,7.06,7.27,8.55,8.55,9.81}; Float_t eff_LosseSR_4m[n] = {5.27,6.11,5.81,6.48,6.56,7.06,7.27,8.55,8.55,9.81}; Float_t eff_MediumSR_4m[n] = {5.21,6.04,5.78,6.4,6.46,7.02,7.21,8.5,8.47,9.72}; // Float_t eff_MediumSR_all[n] = {22.39,23.54,23.46,23.51,23.99,25.63,25.99,27.71,28.52,30.74}; TGraph *gr_eff_Prim_Vert_4e = new TGraph (n, mass,eff_Prim_Vert_4e); TGraph *gr_eff_trigger_4e = new TGraph (n, mass,eff_trigger_4e); TGraph *gr_eff_SFOS_4e = new TGraph (n, mass,eff_SFOS_4e); TGraph *gr_eff_NotOverlap_4e = new TGraph (n, mass,eff_NotOverlap_4e); TGraph *gr_eff_kinematic_4e = new TGraph (n, mass,eff_kinematic_4e); TGraph *gr_eff_TriggerMatch_4e = new TGraph (n, mass,eff_TriggerMatch_4e); TGraph *gr_eff_DeltaR_4e = new TGraph (n, mass,eff_DeltaR_4e); TGraph *gr_eff_MuQuality_4e = new TGraph (n, mass,eff_MuQuality_4e); TGraph *gr_eff_Isolation_4e = new TGraph (n, mass,eff_Isolation_4e); TGraph *gr_eff_ElectronID_4e = new TGraph (n, mass,eff_ElectronID_4e); TGraph *gr_eff_ImpactParameter_4e = new TGraph (n, mass,eff_ImpactParameter_4e); TGraph *gr_eff_QVeto_4e = new TGraph (n, mass,eff_QVeto_4e); TGraph *gr_eff_LowMassVeto_4e = new TGraph (n, mass,eff_LowMassVeto_4e); TGraph *gr_eff_HWind_4e = new TGraph (n, mass,eff_HWind_4e); TGraph *gr_eff_ZVeto_4e = new TGraph (n, mass,eff_ZVeto_4e); TGraph *gr_eff_LosseSR_4e = new TGraph (n, mass,eff_LosseSR_4e); TGraph *gr_eff_MediumSR_4e = new TGraph (n, mass,eff_MediumSR_4e); /* gr_all->SetLineWidth(2); gr_4e->SetLineWidth(2); gr_4m->SetLineWidth(2); gr_2e2m->SetLineWidth(2); gr_4e->SetMarkerStyle(20); gr_4m->SetMarkerColor(2); gr_4m->SetMarkerStyle(20); gr_2e2m->SetMarkerColor(3); gr_2e2m->SetMarkerStyle(20); gr_all->SetMarkerColor(4); gr_all->SetMarkerStyle(20); gr_all->SetMarkerStyle(1); gr_all->SetLineColor(1); gr_4e->SetLineColor(2); gr_4m->SetLineColor(3); gr_2e2m->SetLineColor(4); gr_all->SetTitle("efficiency in SR vs Mass [GeV]"); //gr->GetYaxis()->SetTitleOffset(1.4); gr_all->GetYaxis()->SetTitle("#epsilon_{eff} (%)"); gr_all->GetXaxis()->SetTitle("Mass[GeV]"); // gr_sliceY_LE1007->SetMaximum(126); gr_all->SetMinimum(1); gr_all->Draw(""); gr_4e->Draw("same"); gr_4m->Draw("same"); gr_2e2m->Draw("same");*/ // gr_eff_Prim_Vert_4e->Draw(); /* TLatex *tex = new TLatex(); tex->SetTextFont(72); tex->SetTextSize(0.03); tex->DrawLatex(15.5,28,"ATLAS"); tex->SetTextFont(42); tex->SetTextSize(0.03); tex->DrawLatex(20,28,"Work in Progress"); TLegend* legend = new TLegend(0.2,0.7,0.4,0.85); legend->SetBorderSize(0); legend->AddEntry(gr_all,"4e+4m+2e2m","l"); legend->AddEntry(gr_4e,"4e","l"); legend->AddEntry(gr_2e2m,"2e2m","l"); legend->AddEntry(gr_4m,"4m","l"); legend->Draw();*/ gr_eff_Prim_Vert_4e->SetFillColor(1); // gr_eff_Prim_Vert_4e->SetFillStyle(20); gr_eff_Prim_Vert_4e->Draw("F"); } TStyle* AtlasStyle() { TStyle *atlasStyle = new TStyle("ATLAS","Atlas style"); // use plain black on white colors Int_t icol=0; // WHITE atlasStyle->SetFrameBorderMode(icol); atlasStyle->SetFrameFillColor(icol); atlasStyle->SetCanvasBorderMode(icol); atlasStyle->SetCanvasColor(icol); atlasStyle->SetPadBorderMode(icol); atlasStyle->SetPadColor(icol); atlasStyle->SetStatColor(icol); //atlasStyle->SetFillColor(icol); // don't use: white fill color for *all* objects // set the paper & margin sizes atlasStyle->SetPaperSize(20,26); // set margin sizes atlasStyle->SetPadTopMargin(0.05); atlasStyle->SetPadRightMargin(0.05); atlasStyle->SetPadBottomMargin(0.16); atlasStyle->SetPadLeftMargin(0.16); // set title offsets (for axis label) atlasStyle->SetTitleXOffset(1.5); atlasStyle->SetTitleYOffset(1.5); // use large fonts //Int_t font=72; // Helvetica italics Int_t font=42; // Helvetica Double_t tsize=0.05; atlasStyle->SetTextFont(font); atlasStyle->SetTextSize(tsize); atlasStyle->SetLabelFont(font,"x"); atlasStyle->SetTitleFont(font,"x"); atlasStyle->SetLabelFont(font,"y"); atlasStyle->SetTitleFont(font,"y"); atlasStyle->SetLabelFont(font,"z"); atlasStyle->SetTitleFont(font,"z"); atlasStyle->SetLabelSize(tsize,"x"); atlasStyle->SetTitleSize(tsize,"x"); atlasStyle->SetLabelSize(tsize,"y"); atlasStyle->SetTitleSize(tsize,"y"); atlasStyle->SetLabelSize(tsize,"z"); atlasStyle->SetTitleSize(tsize,"z"); // use bold lines and markers atlasStyle->SetMarkerStyle(20); atlasStyle->SetMarkerSize(1.2); atlasStyle->SetHistLineWidth(2.); atlasStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes // get rid of X error bars //atlasStyle->SetErrorX(0.001); // get rid of error bar caps atlasStyle->SetEndErrorSize(0.); // do not display any of the standard histogram decorations //atlasStyle->SetOptTitle(0); //atlasStyle->SetOptStat(1111); atlasStyle->SetOptStat(0); //atlasStyle->SetOptFit(1111); atlasStyle->SetOptFit(0); // put tick marks on top and RHS of plots atlasStyle->SetPadTickX(1); atlasStyle->SetPadTickY(1); return atlasStyle; }