diff --git a/SUSYBSMAnalysis/HSCP/test/ICHEP_Analysis/Analysis_Step5.C b/SUSYBSMAnalysis/HSCP/test/ICHEP_Analysis/Analysis_Step5.C index d15f0d9c0f174..b9c19a7149e49 100644 --- a/SUSYBSMAnalysis/HSCP/test/ICHEP_Analysis/Analysis_Step5.C +++ b/SUSYBSMAnalysis/HSCP/test/ICHEP_Analysis/Analysis_Step5.C @@ -106,7 +106,7 @@ void Analysis_Step5() //CheckPredictionBin(InputPattern, "_Flip", "Data8TeV", "5"); InputPattern = "Results/Type4/"; CutIndex = 21; CutIndex_Flip=21; -// Make2DPlot_Core(InputPattern, 0); + Make2DPlot_Core(InputPattern, 0); PredictionAndControlPlot(InputPattern, "Data7TeV", CutIndex, CutIndex_Flip); PredictionAndControlPlot(InputPattern, "Data8TeV", CutIndex, CutIndex_Flip); // CheckPrediction(InputPattern, "", "Data7TeV"); @@ -115,9 +115,10 @@ void Analysis_Step5() // CheckPrediction(InputPattern, "_Flip", "Data8TeV"); // CollisionBackgroundSystematicFromFlip(InputPattern, "Data7TeV"); // CollisionBackgroundSystematicFromFlip(InputPattern, "Data8TeV"); -// SelectionPlot(InputPattern, CutIndex); + SelectionPlot(InputPattern, CutIndex); // CutFlow(InputPattern); + InputPattern = "Results/Type5/"; CutIndex = 48; CutIndex_Flip=2; InitdEdx("dedxRASmi"); Make2DPlot_Core(InputPattern, 0); @@ -698,54 +699,64 @@ void PredictionAndControlPlot(string InputPattern, string Data, unsigned int Cut delete c1; } - if(TypeMode==0 || TypeMode==5){ + if(TypeMode==0 || TypeMode==4 || TypeMode==5){ TH1D* HCuts_Pt = (TH1D*)GetObjectFromPath(InputFile, "HCuts_Pt"); TH1D* HCuts_I = (TH1D*)GetObjectFromPath(InputFile, "HCuts_I"); TH1D* HCuts_TOF = (TH1D*)GetObjectFromPath(InputFile, "HCuts_TOF"); for(int S=0;S<2;S++){ - if(TypeMode!=5 && S>0)continue; + if(TypeMode==0 && S>0)continue; string suffix = ""; if(S==1)suffix = "_Flip"; TH1D* H_D = (TH1D*)GetObjectFromPath(InputFile, Data+"/H_D"+suffix); TH1D* H_P = (TH1D*)GetObjectFromPath(InputFile, Data+"/H_P"+suffix); - std::map mapPred; - std::map mapObs; - std::map mapRatio; + std::map, TGraphErrors*> mapPred; + std::map, TGraphErrors*> mapObs; + std::map, TGraphErrors*> mapRatio; double max = 1; double min = 1000; double xmin=100; double xmax=0; for(int CutIndex_=1;CutIndex_GetNbinsX();CutIndex_++){ - double PtCut = HCuts_Pt->GetBinContent(CutIndex_+1); - int N = 0;for(int i=CutIndex_;iGetNbinsX();i++){if(HCuts_Pt->GetBinContent(i+1)==PtCut){N++;}else{break;}} - mapPred [PtCut] = new TGraphErrors(N); - mapObs [PtCut] = new TGraphErrors(N); - mapRatio[PtCut] = new TGraphErrors(N); + float PtCut = HCuts_Pt ->GetBinContent(CutIndex_+1); + float ICut = HCuts_I ->GetBinContent(CutIndex_+1); + float TCut = HCuts_TOF->GetBinContent(CutIndex_+1); + if(mapPred.find(std::make_pair(PtCut, TCut))!=mapPred.end())continue; - for(int i=0;iGetBinContent(CutIndex_+i+1)); - xmax = std::max(xmax, HCuts_I->GetBinContent(CutIndex_+i+1)); + int N = 0;for(int i=CutIndex_;iGetNbinsX();i++){if(float(HCuts_Pt->GetBinContent(i+1))==PtCut && float(HCuts_TOF->GetBinContent(i+1))==TCut){N++;}} + mapPred [std::make_pair(PtCut, TCut)] = new TGraphErrors(N); + mapObs [std::make_pair(PtCut, TCut)] = new TGraphErrors(N); + mapRatio[std::make_pair(PtCut, TCut)] = new TGraphErrors(N); - max = std::max(max, H_P->GetBinContent(CutIndex_+i+1)); + printf("%f %f - %i\n",PtCut, TCut, N); + + int N_i = 0; + for(int i=CutIndex_;iGetNbinsX();i++){ + if(float(HCuts_Pt->GetBinContent(i+1))!=PtCut || float(HCuts_TOF->GetBinContent(i+1))!=TCut)continue; + xmin = std::min(xmin, HCuts_I->GetBinContent(i+1)); + xmax = std::max(xmax, HCuts_I->GetBinContent(i+1)); + + max = std::max(max, H_P->GetBinContent(i+1)); // min = std::min(min, std::max(H_P->GetBinContent(CutIndex_+i+1), 0.1) ); - double P = H_P->GetBinContent(CutIndex_+i+1); - double Perr = H_P->GetBinError(CutIndex_+i+1); + double P = H_P->GetBinContent(i+1); + double Perr = H_P->GetBinError(i+1); if(S==1 && P<=0){P = 3/2.0; Perr=3/2.0; max = std::max(max, 3.0);} - mapPred[PtCut]->SetPoint (i, HCuts_I->GetBinContent(CutIndex_+i+1), P); - mapPred[PtCut]->SetPointError(i, 0 , sqrt(pow(Perr,2) + pow(0.1*H_P->GetBinContent(CutIndex_+i+1),2) ) ); + mapPred[std::make_pair(PtCut, TCut)]->SetPoint (N_i, HCuts_I->GetBinContent(i+1), P); + mapPred[std::make_pair(PtCut, TCut)]->SetPointError(N_i, 0 , sqrt(pow(Perr,2) + pow(0.1*H_P->GetBinContent(i+1),2) ) ); max = std::max(max, H_D->GetBinContent(CutIndex_+i+1)); min = std::min(min, std::max(H_D->GetBinContent(CutIndex_+i+1), 0.1)); - mapObs [PtCut]->SetPoint (i, HCuts_I->GetBinContent(CutIndex_+i+1), H_D->GetBinContent(CutIndex_+i+1)); - mapObs [PtCut]->SetPointError(i, 0 , H_D->GetBinError (CutIndex_+i+1)); - + mapObs [std::make_pair(PtCut, TCut)]->SetPoint (N_i, HCuts_I->GetBinContent(i+1), H_D->GetBinContent(i+1)); + mapObs [std::make_pair(PtCut, TCut)]->SetPointError(N_i, 0 , H_D->GetBinError (i+1)); - mapRatio[PtCut]->SetPoint (i, HCuts_I->GetBinContent(CutIndex_+i+1), H_D->GetBinContent(CutIndex_+i+1)<=0 ? 0 : P / H_D->GetBinContent(CutIndex_+i+1)); - mapRatio[PtCut]->SetPointError(i, 0 , H_D->GetBinContent(CutIndex_+i+1)<=0 ? 0 : sqrt(pow(Perr * H_D->GetBinContent(CutIndex_+i+1),2) + pow(P * H_D->GetBinError (CutIndex_+i+1),2) ) / pow(H_D->GetBinContent(CutIndex_+i+1),2) ); + mapRatio[std::make_pair(PtCut, TCut)]->SetPoint (N_i, HCuts_I->GetBinContent(i+1), H_D->GetBinContent(i+1)<=0 ? 0 : P / H_D->GetBinContent(i+1)); + mapRatio[std::make_pair(PtCut, TCut)]->SetPointError(N_i, 0 , H_D->GetBinContent(i+1)<=0 ? 0 : sqrt(pow(Perr * H_D->GetBinContent(i+1),2) + pow(P * H_D->GetBinError (i+1),2) ) / pow(H_D->GetBinContent(i+1),2) ); + + printf(" %f --> %f vs %f\n",HCuts_I->GetBinContent(i+1), H_D->GetBinContent(i+1), P); + + N_i++; } - CutIndex_+=N-1; } @@ -793,288 +804,71 @@ void PredictionAndControlPlot(string InputPattern, string Data, unsigned int Cut t1->cd(); - if(TypeMode==0){ - mapObs[55.0]->SetMarkerColor(2); - mapObs[55.0]->SetMarkerStyle(20); - mapObs[55.0]->Draw("P"); - mapPred[55.0]->SetLineColor(2); mapRatio[55.0]->SetLineColor(2); - mapPred[55.0]->SetLineWidth(2.0); mapRatio[55.0]->SetLineWidth(2.0); - mapPred[55.0]->SetFillColor(2); mapRatio[55.0]->SetFillColor(2); - mapPred[55.0]->SetFillStyle(3004); mapRatio[55.0]->SetFillStyle(3004); - mapPred[55.0]->Draw("3C"); - - mapObs[65.0]->SetMarkerColor(4); - mapObs[65.0]->SetMarkerStyle(20); - mapObs[65.0]->Draw("P"); - mapPred[65.0]->SetLineColor(4); mapRatio[65.0]->SetLineColor(4); - mapPred[65.0]->SetLineWidth(2.0); mapRatio[65.0]->SetLineWidth(2.0); - mapPred[65.0]->SetFillColor(4); mapRatio[65.0]->SetFillColor(4); - mapPred[65.0]->SetFillStyle(3005); mapRatio[65.0]->SetFillStyle(3005); - mapPred[65.0]->Draw("3C"); - - mapObs[75.0]->SetMarkerColor(8); - mapObs[75.0]->SetMarkerStyle(20); - mapObs[75.0]->Draw("P"); - mapPred[75.0]->SetLineColor(8); mapRatio[75.0]->SetLineColor(8); - mapPred[75.0]->SetLineWidth(2.0); mapRatio[75.0]->SetLineWidth(2.0); - mapPred[75.0]->SetFillColor(8); mapRatio[75.0]->SetFillColor(8); - mapPred[75.0]->SetFillStyle(3007); mapRatio[75.0]->SetFillStyle(3007); - mapPred[75.0]->Draw("3C"); - - TH1D* obsLeg = (TH1D*)mapObs [55.0]->Clone("ObsLeg"); - obsLeg->SetMarkerColor(1); - LEG->AddEntry(obsLeg, "Data" ,"P"); - LEG->AddEntry(mapPred[55.0], "Pred (pT>55GeV)","FL"); - LEG->AddEntry(mapPred[65.0], "Pred (pT>65GeV)","FL"); - LEG->AddEntry(mapPred[75.0], "Pred (pT>75GeV)","FL"); - LEG->Draw("same"); - - t2->cd(); - - mapRatio[55.0]->Draw("3C"); - mapRatio[65.0]->Draw("3C"); - mapRatio[75.0]->Draw("3C"); + std::pair P1, P2, P3; + string L1, L2, L3; + if(TypeMode==0){ + P1 = std::make_pair(55.0, -1.0); L1 = "Pred (pT>55GeV)"; + P2 = std::make_pair(65.0, -1.0); L2 = "Pred (pT>65GeV)"; + P3 = std::make_pair(75.0, -1.0); L3 = "Pred (pT>75GeV)"; + }else if(TypeMode==4){ + P1 = std::make_pair( -1.0 , 1.075); L1 = "Pred (1/#beta> 1.075)"; + P2 = std::make_pair( -1.0 , 1.100); L2 = "Pred (1/#beta> 1.100)"; + P3 = std::make_pair( -1.0 , 1.125); L3 = "Pred (1/#beta> 1.125)"; }else if(TypeMode==5){ - mapObs[ 75.0]->SetMarkerColor(2); - mapObs[ 75.0]->SetMarkerStyle(20); - mapObs[ 75.0]->Draw("P"); - mapPred[ 75.0]->SetLineColor(2); mapRatio[ 75.0]->SetLineColor(2); - mapPred[ 75.0]->SetLineWidth(2.0); mapRatio[ 75.0]->SetLineWidth(2.0); - mapPred[ 75.0]->SetFillColor(2); mapRatio[ 75.0]->SetFillColor(2); - mapPred[ 75.0]->SetFillStyle(3004); mapRatio[ 75.0]->SetFillStyle(3004); - mapPred[ 75.0]->Draw("3C"); - - mapObs[100.0]->SetMarkerColor(4); - mapObs[100.0]->SetMarkerStyle(20); - mapObs[100.0]->Draw("P"); - mapPred[100.0]->SetLineColor(4); mapRatio[100.0]->SetLineColor(4); - mapPred[100.0]->SetLineWidth(2.0); mapRatio[100.0]->SetLineWidth(2.0); - mapPred[100.0]->SetFillColor(4); mapRatio[100.0]->SetFillColor(4); - mapPred[100.0]->SetFillStyle(3005); mapRatio[100.0]->SetFillStyle(3005); - mapPred[100.0]->Draw("3C"); - - mapObs[125.0]->SetMarkerColor(8); - mapObs[125.0]->SetMarkerStyle(20); - mapObs[125.0]->Draw("P"); - mapPred[125.0]->SetLineColor(8); mapRatio[125.0]->SetLineColor(8); - mapPred[125.0]->SetLineWidth(2.0); mapRatio[125.0]->SetLineWidth(2.0); - mapPred[125.0]->SetFillColor(8); mapRatio[125.0]->SetFillColor(8); - mapPred[125.0]->SetFillStyle(3007); mapRatio[125.0]->SetFillStyle(3007); - mapPred[125.0]->Draw("3C"); - - TH1D* obsLeg = (TH1D*)mapObs [75.0]->Clone("ObsLeg"); - obsLeg->SetMarkerColor(1); - LEG->AddEntry(obsLeg, "Data" ,"P"); - LEG->AddEntry(mapPred[ 75.0], "Pred (pT> 75GeV)","FL"); - LEG->AddEntry(mapPred[100.0], "Pred (pT>100GeV)","FL"); - LEG->AddEntry(mapPred[125.0], "Pred (pT>125GeV)","FL"); - LEG->Draw("same"); - - t2->cd(); - - mapRatio[ 75.0]->Draw("3C"); - mapRatio[100.0]->Draw("3C"); - mapRatio[125.0]->Draw("3C"); - } - - c1->cd(); - SaveCanvas(c1,InputPattern,string("Prediction_")+Data+"_NPredVsNObs"+suffix); - delete c1; - } - } - - - - - if(TypeMode==4){ - TH1D* HCuts_Pt = (TH1D*)GetObjectFromPath(InputFile, "HCuts_Pt"); - TH1D* HCuts_I = (TH1D*)GetObjectFromPath(InputFile, "HCuts_I"); - TH1D* HCuts_TOF = (TH1D*)GetObjectFromPath(InputFile, "HCuts_TOF"); - - for(int S=0;S<2;S++){ - if(TypeMode!=5 && S>0)continue; - - string suffix = ""; - if(S==1)suffix = "_Flip"; - TH1D* H_D = (TH1D*)GetObjectFromPath(InputFile, Data+"/H_D"+suffix); - TH1D* H_P = (TH1D*)GetObjectFromPath(InputFile, Data+"/H_P"+suffix); - - std::map mapPred; - std::map mapObs; - std::map mapRatio; - - double max = 1; double min = 1000; - double xmin=100; double xmax=0; - for(int CutIndex_=1;CutIndex_GetNbinsX();CutIndex_++){ - double PtCut = HCuts_Pt->GetBinContent(CutIndex_+1); - int N = 0;for(int i=CutIndex_;iGetNbinsX();i++){if(HCuts_Pt->GetBinContent(i+1)==PtCut){N++;}else{break;}} - mapPred [PtCut] = new TGraphErrors(N); - mapObs [PtCut] = new TGraphErrors(N); - mapRatio[PtCut] = new TGraphErrors(N); - - for(int i=0;iGetBinContent(CutIndex_+i+1)); - xmax = std::max(xmax, HCuts_I->GetBinContent(CutIndex_+i+1)); - - max = std::max(max, H_P->GetBinContent(CutIndex_+i+1)); -// min = std::min(min, std::max(H_P->GetBinContent(CutIndex_+i+1), 0.1) ); - double P = H_P->GetBinContent(CutIndex_+i+1); - double Perr = H_P->GetBinError(CutIndex_+i+1); - if(S==1 && P<=0){P = 3/2.0; Perr=3/2.0; max = std::max(max, 3.0);} - mapPred[PtCut]->SetPoint (i, HCuts_I->GetBinContent(CutIndex_+i+1), P); - mapPred[PtCut]->SetPointError(i, 0 , sqrt(pow(Perr,2) + pow(0.1*H_P->GetBinContent(CutIndex_+i+1),2) ) ); - - max = std::max(max, H_D->GetBinContent(CutIndex_+i+1)); - min = std::min(min, std::max(H_D->GetBinContent(CutIndex_+i+1), 0.1)); - mapObs [PtCut]->SetPoint (i, HCuts_I->GetBinContent(CutIndex_+i+1), H_D->GetBinContent(CutIndex_+i+1)); - mapObs [PtCut]->SetPointError(i, 0 , H_D->GetBinError (CutIndex_+i+1)); - - - mapRatio[PtCut]->SetPoint (i, HCuts_I->GetBinContent(CutIndex_+i+1), H_D->GetBinContent(CutIndex_+i+1)<=0 ? 0 : P / H_D->GetBinContent(CutIndex_+i+1)); - mapRatio[PtCut]->SetPointError(i, 0 , H_D->GetBinContent(CutIndex_+i+1)<=0 ? 0 : Perr / H_D->GetBinContent(CutIndex_+i+1)); - } - CutIndex_+=N-1; + P1 = std::make_pair( 75.0, -1.0); L1 = "Pred (pT> 75GeV)"; + P2 = std::make_pair(100.0, -1.0); L2 = "Pred (pT>100GeV)"; + P3 = std::make_pair(125.0, -1.0); L3 = "Pred (pT>125GeV)"; } + mapObs[P1]->SetMarkerColor(2); + mapObs[P1]->SetMarkerStyle(20); + mapObs[P1]->Draw("P"); + mapPred[P1]->SetLineColor(2); mapRatio[P1]->SetLineColor(2); + mapPred[P1]->SetLineWidth(2.0); mapRatio[P1]->SetLineWidth(2.0); + mapPred[P1]->SetFillColor(2); mapRatio[P1]->SetFillColor(2); + mapPred[P1]->SetFillStyle(3004); mapRatio[P1]->SetFillStyle(3004); + mapPred[P1]->Draw("3C"); + + mapObs[P2]->SetMarkerColor(4); + mapObs[P2]->SetMarkerStyle(20); + mapObs[P2]->Draw("P"); + mapPred[P2]->SetLineColor(4); mapRatio[P2]->SetLineColor(4); + mapPred[P2]->SetLineWidth(2.0); mapRatio[P2]->SetLineWidth(2.0); + mapPred[P2]->SetFillColor(4); mapRatio[P2]->SetFillColor(4); + mapPred[P2]->SetFillStyle(3005); mapRatio[P2]->SetFillStyle(3005); + mapPred[P2]->Draw("3C"); + + mapObs[P3]->SetMarkerColor(8); + mapObs[P3]->SetMarkerStyle(20); + mapObs[P3]->Draw("P"); + mapPred[P3]->SetLineColor(8); mapRatio[P3]->SetLineColor(8); + mapPred[P3]->SetLineWidth(2.0); mapRatio[P3]->SetLineWidth(2.0); + mapPred[P3]->SetFillColor(8); mapRatio[P3]->SetFillColor(8); + mapPred[P3]->SetFillStyle(3007); mapRatio[P3]->SetFillStyle(3007); + mapPred[P3]->Draw("3C"); + + TH1D* obsLeg = (TH1D*)mapObs [P1]->Clone("ObsLeg"); + obsLeg->SetMarkerColor(1); + LEG->AddEntry(obsLeg, "Data" ,"P"); + LEG->AddEntry(mapPred[P1], L1.c_str(),"FL"); + LEG->AddEntry(mapPred[P2], L2.c_str(),"FL"); + LEG->AddEntry(mapPred[P3], L3.c_str(),"FL"); + LEG->Draw("same"); - c1 = new TCanvas("c1","c1,",600,600); - TPad* t1 = new TPad("t1","t1", 0.0, 0.20, 1.0, 1.0); - t1->Draw(); - t1->cd(); - t1->SetLogy(true); - - TH1D* frame = new TH1D("frame", "frame", 1,std::max(xmin,0.02),xmax); - frame->GetXaxis()->SetNdivisions(505); - frame->SetTitle(""); - frame->SetStats(kFALSE); - frame->GetXaxis()->SetTitle(dEdxS_Legend.c_str()); - frame->GetYaxis()->SetTitle("#Events"); - frame->GetYaxis()->SetTitleOffset(1.50); - frame->SetMaximum(max*10); - frame->SetMinimum(min*0.1); - frame->Draw("AXIS"); - - TLegend* LEG = new TLegend(0.45,0.75,0.65,0.93); - LEG->SetFillColor(0); - LEG->SetFillStyle(0); - LEG->SetBorderSize(0); - - c1->cd(); - TPad* t2 = new TPad("t2","t2", 0.0, 0.0, 1.0, 0.2); - t2->Draw(); t2->cd(); - t2->SetGridy(true); - t2->SetPad(0,0.0,1.0,0.2); - t2->SetTopMargin(0); - t2->SetBottomMargin(0.5); - - TH1D* frameR = new TH1D("frameR", "frameR", 1,std::max(xmin,0.02),xmax); - frameR->GetXaxis()->SetNdivisions(505); - frameR->SetTitle(""); - frameR->SetStats(kFALSE); - frameR->GetXaxis()->SetTitle("");//dEdxS_Legend.c_str()); - frameR->GetYaxis()->SetTitle("Pred / Obs"); - frameR->GetYaxis()->SetTitleOffset(1.50); - frameR->SetMaximum(1.40); - frameR->SetMinimum(0.60); - frameR->Draw("AXIS"); - - t1->cd(); - - if(TypeMode==0){ - mapObs[55.0]->SetMarkerColor(2); - mapObs[55.0]->SetMarkerStyle(20); - mapObs[55.0]->Draw("P"); - mapPred[55.0]->SetLineColor(2); mapRatio[55.0]->SetLineColor(2); - mapPred[55.0]->SetLineWidth(2.0); mapRatio[55.0]->SetLineWidth(2.0); - mapPred[55.0]->SetFillColor(2); mapRatio[55.0]->SetFillColor(2); - mapPred[55.0]->SetFillStyle(3004); mapRatio[55.0]->SetFillStyle(3004); - mapPred[55.0]->Draw("3C"); - - mapObs[65.0]->SetMarkerColor(4); - mapObs[65.0]->SetMarkerStyle(20); - mapObs[65.0]->Draw("P"); - mapPred[65.0]->SetLineColor(4); mapRatio[65.0]->SetLineColor(4); - mapPred[65.0]->SetLineWidth(2.0); mapRatio[65.0]->SetLineWidth(2.0); - mapPred[65.0]->SetFillColor(4); mapRatio[65.0]->SetFillColor(4); - mapPred[65.0]->SetFillStyle(3005); mapRatio[65.0]->SetFillStyle(3005); - mapPred[65.0]->Draw("3C"); - - mapObs[75.0]->SetMarkerColor(8); - mapObs[75.0]->SetMarkerStyle(20); - mapObs[75.0]->Draw("P"); - mapPred[75.0]->SetLineColor(8); mapRatio[75.0]->SetLineColor(8); - mapPred[75.0]->SetLineWidth(2.0); mapRatio[75.0]->SetLineWidth(2.0); - mapPred[75.0]->SetFillColor(8); mapRatio[75.0]->SetFillColor(8); - mapPred[75.0]->SetFillStyle(3007); mapRatio[75.0]->SetFillStyle(3007); - mapPred[75.0]->Draw("3C"); - - TH1D* obsLeg = (TH1D*)mapObs [55.0]->Clone("ObsLeg"); - obsLeg->SetMarkerColor(1); - LEG->AddEntry(obsLeg, "Data" ,"P"); - LEG->AddEntry(mapPred[55.0], "Pred (pT>55GeV)","FL"); - LEG->AddEntry(mapPred[65.0], "Pred (pT>65GeV)","FL"); - LEG->AddEntry(mapPred[75.0], "Pred (pT>75GeV)","FL"); - LEG->Draw("same"); - - t2->cd(); - - mapRatio[55.0]->Draw("3C"); - mapRatio[65.0]->Draw("3C"); - mapRatio[75.0]->Draw("3C"); - - }else if(TypeMode==5){ - mapObs[ 75.0]->SetMarkerColor(2); - mapObs[ 75.0]->SetMarkerStyle(20); - mapObs[ 75.0]->Draw("P"); - mapPred[ 75.0]->SetLineColor(2); mapRatio[ 75.0]->SetLineColor(2); - mapPred[ 75.0]->SetLineWidth(2.0); mapRatio[ 75.0]->SetLineWidth(2.0); - mapPred[ 75.0]->SetFillColor(2); mapRatio[ 75.0]->SetFillColor(2); - mapPred[ 75.0]->SetFillStyle(3004); mapRatio[ 75.0]->SetFillStyle(3004); - mapPred[ 75.0]->Draw("3C"); - - mapObs[100.0]->SetMarkerColor(4); - mapObs[100.0]->SetMarkerStyle(20); - mapObs[100.0]->Draw("P"); - mapPred[100.0]->SetLineColor(4); mapRatio[100.0]->SetLineColor(4); - mapPred[100.0]->SetLineWidth(2.0); mapRatio[100.0]->SetLineWidth(2.0); - mapPred[100.0]->SetFillColor(4); mapRatio[100.0]->SetFillColor(4); - mapPred[100.0]->SetFillStyle(3005); mapRatio[100.0]->SetFillStyle(3005); - mapPred[100.0]->Draw("3C"); - - mapObs[125.0]->SetMarkerColor(8); - mapObs[125.0]->SetMarkerStyle(20); - mapObs[125.0]->Draw("P"); - mapPred[125.0]->SetLineColor(8); mapRatio[125.0]->SetLineColor(8); - mapPred[125.0]->SetLineWidth(2.0); mapRatio[125.0]->SetLineWidth(2.0); - mapPred[125.0]->SetFillColor(8); mapRatio[125.0]->SetFillColor(8); - mapPred[125.0]->SetFillStyle(3007); mapRatio[125.0]->SetFillStyle(3007); - mapPred[125.0]->Draw("3C"); - - TH1D* obsLeg = (TH1D*)mapObs [75.0]->Clone("ObsLeg"); - obsLeg->SetMarkerColor(1); - LEG->AddEntry(obsLeg, "Data" ,"P"); - LEG->AddEntry(mapPred[ 75.0], "Pred (pT> 75GeV)","FL"); - LEG->AddEntry(mapPred[100.0], "Pred (pT>100GeV)","FL"); - LEG->AddEntry(mapPred[125.0], "Pred (pT>125GeV)","FL"); - LEG->Draw("same"); - - t2->cd(); - - mapRatio[ 75.0]->Draw("3C"); - mapRatio[100.0]->Draw("3C"); - mapRatio[125.0]->Draw("3C"); - } + + mapRatio[P1]->Draw("3C"); + mapRatio[P2]->Draw("3C"); + mapRatio[P3]->Draw("3C"); c1->cd(); SaveCanvas(c1,InputPattern,string("Prediction_")+Data+"_NPredVsNObs"+suffix); delete c1; - } + } } - //README: Draw a map of the prediction/observation for the various selection //TH1D* HCuts_Pt = (TH1D*)GetObjectFromPath(InputFile, "HCuts_Pt"); //TH1D* HCuts_I = (TH1D*)GetObjectFromPath(InputFile, "HCuts_I");