468 |
|
|
469 |
|
TH1F *data1 = allsamples.Draw("data1",variable,nbins,min,max, xlabel, "events",ibasiccut,data,luminosity); |
470 |
|
TH1F *data2 = comparesamples.Draw("data2",variable,nbins,min,max, xlabel, "events",ibasiccut,data,luminosity); |
471 |
+ |
data2->Scale(4.1/5.2); |
472 |
|
|
473 |
|
data1->SetMarkerSize(DataMarkerSize); |
474 |
|
data2->SetLineColor(kRed); |
493 |
|
data1->GetYaxis()->CenterTitle(); |
494 |
|
|
495 |
|
TLegend *mleg = make_legend("",legendPosition,0.7,false,legendPosition+0.2); |
496 |
< |
mleg->AddEntry(data1, "New 3.8/fb", "PL"); |
497 |
< |
mleg->AddEntry(data2, "Old 5.1/fb", "L"); |
496 |
> |
mleg->AddEntry(data1, "New 4.1 fb^{-1}", "PL"); |
497 |
> |
mleg->AddEntry(data2, "Old 5.1 fb^{-1} (scaled) ", "L"); |
498 |
|
|
499 |
|
data1->Draw("E1"); |
500 |
|
data2->Draw("HIST,SAMES"); |
501 |
|
mleg->Draw(); |
502 |
|
DrawPrelim(); |
503 |
< |
save_with_ratio( data1, data2, rcan, "compareData/" + filename, false, false, "old/new" ); |
503 |
> |
save_with_ratio( data1, data2, rcan, "compareData/" + filename, false, false, "new/old" ); |
504 |
|
|
505 |
|
data1->Delete(); |
506 |
|
data2->Delete(); |
753 |
|
bool nolog=false; |
754 |
|
|
755 |
|
bool doOFSF = false; |
756 |
< |
bool doKin = true; |
757 |
< |
bool doDataComp = false; |
756 |
> |
bool doKin = false; |
757 |
> |
bool doDataComp = true; |
758 |
|
|
759 |
|
|
760 |
|
if(doPF) write_warning(__FUNCTION__,"Please use caution when trying to produce PF plots; not all versions of the JZB trees have these variables!"); |
768 |
|
if ( doOFSF ) { |
769 |
|
make_OFSF_plots("mll", "met[4]>100", 60, 20., 320., false, "m_{ll}", "mll"); |
770 |
|
|
771 |
< |
make_OFSF_plots("pfJetGoodNum40", "met[4]>100", 7, 3, 10, true, "#(jets)", "njets"); |
772 |
< |
make_OFSF_plots("pfJetGoodNum40", "met[4]>100&&pfJetGoodNumBtag30==0", 7, 3, 10, true, "#(jets)", "njets_btagVeto"); |
773 |
< |
make_OFSF_plots("pfJetGoodNum40", "met[4]>100&&pfJetGoodNumBtag30>0", 7, 3, 10, true, "#(jets)", "njets_AtLeastOneBJet30"); |
771 |
> |
// make_OFSF_plots("pfJetGoodNum40", "met[4]>100", 7, 3, 10, true, "#(jets)", "njets"); |
772 |
> |
// make_OFSF_plots("pfJetGoodNum40", "met[4]>100&&pfJetGoodNumBtag30==0", 7, 3, 10, true, "#(jets)", "njets_btagVeto"); |
773 |
> |
// make_OFSF_plots("pfJetGoodNum40", "met[4]>100&&pfJetGoodNumBtag30>0", 7, 3, 10, true, "#(jets)", "njets_AtLeastOneBJet30"); |
774 |
|
|
775 |
< |
make_OFSF_plots("pfJetGoodNumBtag30", "met[4]>100", 5, 0, 5, true, "#(b-jets)", "nbjets"); |
776 |
< |
make_OFSF_plots("pfJetGoodPtBtag[0]", "met[4]>100&&pfJetGoodNumBtag30>0", 20, 0, 400, true, "p_{T}(leading b-jet)", "ptb1"); |
775 |
> |
// make_OFSF_plots("pfJetGoodNumBtag30", "met[4]>100", 5, 0, 5, true, "#(b-jets)", "nbjets"); |
776 |
> |
// make_OFSF_plots("pfJetGoodPtBtag[0]", "met[4]>100&&pfJetGoodNumBtag30>0", 20, 0, 400, true, "p_{T}(leading b-jet)", "ptb1"); |
777 |
|
|
778 |
|
// make_OFSF_plots("iso1", "met[4]>100", 20, 0, 0.3, true, "lepton 1 isolation", "iso1"); |
779 |
|
// make_OFSF_plots("iso2", "met[4]>100", 20, 0, 0.3, true, "lepton 2 isolation", "iso2"); |
783 |
|
// make_OFSF_plots("eta2", "met[4]>100", 10, -2.5, 2.5, false, "#eta_{2}", "eta2", 0.15); |
784 |
|
// make_OFSF_plots("phi1", "met[4]>100", 10, -TMath::Pi(), TMath::Pi(), false, "#phi_{1}", "phi1", 0.2); |
785 |
|
// make_OFSF_plots("phi2", "met[4]>100", 10, -TMath::Pi(), TMath::Pi(), false, "#phi_{2}", "phi2", 0.2); |
786 |
< |
make_OFSF_plots("pfJetGoodPt[0]/pfJetGoodPt[1]", "met[4]>100", 20, 1, 10, true, "pt_{j}^{1}/pt_{j}^{2}", "jpt1pt2", 0.2); |
786 |
> |
// make_OFSF_plots("pfJetGoodPt[0]/pfJetGoodPt[1]", "met[4]>100", 20, 1, 10, true, "pt_{j}^{1}/pt_{j}^{2}", "jpt1pt2", 0.2); |
787 |
|
make_OFSF_plots("TMath::Abs(pfJetDphiMet[0])", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(jet1,MET)|", "dphij1met", 0.2); |
788 |
< |
make_OFSF_plots("TMath::Abs(dphi)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,l2)|", "dphi", 0.2); |
789 |
< |
make_OFSF_plots("TMath::Abs(dphiMet1)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,MET)|", "dphiMet1", 0.2); |
790 |
< |
make_OFSF_plots("TMath::Abs(dphiMet2)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l2,MET)|", "dphiMet2", 0.2); |
791 |
< |
make_OFSF_plots("TMath::Min(TMath::Abs(dphiMet1), TMath::Abs(dphiMet2))", "met[4]>100", 16, 0, 3.2, false, "Min(|#Delta#phi(l,MET)|)", "dphilc"); |
792 |
< |
make_OFSF_plots("TMath::Min(TMath::Abs(pfJetDphiMet[0]), TMath::Min(TMath::Abs(pfJetDphiMet[1]), TMath::Abs(pfJetDphiMet[2])))", "met[4]>100", 16, 0, 3.2, false, "Min(|#Delta#phi(jet,MET)|)", "dphijc"); |
793 |
< |
make_OFSF_plots("TMath::Min((TMath::Pi()-TMath::Abs(dphiMet1)), (TMath::Pi() - TMath::Abs(dphiMet2)))", "met[4]>100", 16, 0, 3.2, false, "Min(#pi - |#Delta#phi(l,MET)|)", "dphilco"); |
794 |
< |
make_OFSF_plots("TMath::Min((TMath::Pi()-TMath::Abs(pfJetDphiMet[0])), TMath::Min( (TMath::Pi()-TMath::Abs(pfJetDphiMet[1])), (TMath::Pi() - TMath::Abs(pfJetDphiMet[2]))))", "met[4]>100", 16, 0, 3.2, false, "Min(#pi - |#Delta#phi(jet,MET)|)", "dphijco"); |
788 |
> |
// make_OFSF_plots("TMath::Abs(dphi)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,l2)|", "dphi", 0.2); |
789 |
> |
// make_OFSF_plots("TMath::Abs(dphiMet1)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,MET)|", "dphiMet1", 0.2); |
790 |
> |
// make_OFSF_plots("TMath::Abs(dphiMet2)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l2,MET)|", "dphiMet2", 0.2); |
791 |
> |
// make_OFSF_plots("TMath::Min(TMath::Abs(dphiMet1), TMath::Abs(dphiMet2))", "met[4]>100", 16, 0, 3.2, false, "Min(|#Delta#phi(l,MET)|)", "dphilc"); |
792 |
> |
// make_OFSF_plots("TMath::Min(TMath::Abs(pfJetDphiMet[0]), TMath::Min(TMath::Abs(pfJetDphiMet[1]), TMath::Abs(pfJetDphiMet[2])))", "met[4]>100", 16, 0, 3.2, false, "Min(|#Delta#phi(jet,MET)|)", "dphijc"); |
793 |
> |
// make_OFSF_plots("TMath::Min((TMath::Pi()-TMath::Abs(dphiMet1)), (TMath::Pi() - TMath::Abs(dphiMet2)))", "met[4]>100", 16, 0, 3.2, false, "Min(#pi - |#Delta#phi(l,MET)|)", "dphilco"); |
794 |
> |
// make_OFSF_plots("TMath::Min((TMath::Pi()-TMath::Abs(pfJetDphiMet[0])), TMath::Min( (TMath::Pi()-TMath::Abs(pfJetDphiMet[1])), (TMath::Pi() - TMath::Abs(pfJetDphiMet[2]))))", "met[4]>100", 16, 0, 3.2, false, "Min(#pi - |#Delta#phi(jet,MET)|)", "dphijco"); |
795 |
|
} |
796 |
|
|
797 |
< |
if ( doDataComp && !PlottingSetup::openBox ) { |
797 |
> |
if ( doDataComp) { |
798 |
|
TCut mllCut(""); |
799 |
|
float massmin = 15.; |
800 |
|
float massmax = 315; |
801 |
|
int massnbins = 60; |
802 |
< |
if ( !PlottingSetup::openBox ) { |
802 |
> |
/* if ( !PlottingSetup::openBox ) { |
803 |
|
mllCut = "mll>70"; |
804 |
|
massmin = 120; |
805 |
|
massmax = 360; |
806 |
|
massnbins = 14; |
807 |
< |
} |
807 |
> |
}*/ |
808 |
|
|
809 |
|
TCut cutSignal = cutmass&&cutnJets&&"met[4]>100"; |
810 |
< |
make_data_comparison_plot("mll", cutOSSF,60, 15., 315.,-1., true, "m_{ll}", "mll_SF_inclusive"); |
811 |
< |
make_data_comparison_plot("mll", cutOSOF,60, 15., 315.,-1., true, "m_{ll}", "mll_OF_inclusive"); |
812 |
< |
|
810 |
> |
|
811 |
> |
/* make_data_comparison_plot("met[4]", cutOSSF,60, 0., 300.,-1., true, "pfMET", "met_SF_inclusive"); |
812 |
> |
make_data_comparison_plot("met[1]", cutOSSF,60, 0., 300.,-1., true, "type 1 corrected pfMET", "mett1_SF_inclusive"); |
813 |
> |
make_data_comparison_plot("met[4]", cutOSOF,60, 0., 300.,-1., true, "pfMET", "met_OF_inclusive"); |
814 |
> |
make_data_comparison_plot("met[1]", cutOSOF,60, 0., 300.,-1., true, "type 1 corrected pfMET", "mett1_OF_inclusive"); |
815 |
> |
|
816 |
> |
make_data_comparison_plot("met[4]", cutnJets&&cutOSSF,60, 0., 300.,-1., true, "pfMET", "met_SF_exclusive"); |
817 |
> |
make_data_comparison_plot("met[1]", cutnJets&&cutOSSF,60, 0., 300.,-1., true, "type 1 corrected pfMET", "mett1_SF_exclusive"); |
818 |
> |
make_data_comparison_plot("met[4]", cutnJets&&cutOSOF,60, 0., 300.,-1., true, "pfMET", "met_OF_exclusive"); |
819 |
> |
make_data_comparison_plot("met[1]", cutnJets&&cutOSOF,60, 0., 300.,-1., true, "type 1 corrected pfMET", "mett1_OF_exclusive"); |
820 |
> |
|
821 |
> |
*/ |
822 |
> |
string basiccutsaved = (const char*)basiccut; |
823 |
> |
|
824 |
> |
string newbasiccut=basiccutsaved; |
825 |
> |
|
826 |
> |
size_t found; |
827 |
> |
found = newbasiccut.find( "pt2>20" ); |
828 |
> |
while (found!=string::npos){ |
829 |
> |
newbasiccut.replace( found, string( "pt2>20" ).length(), "pt2>10" ); |
830 |
> |
found = newbasiccut.find( "pt2>20" ); |
831 |
> |
} |
832 |
> |
// basiccut=TCut(newbasiccut.c_str()); |
833 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=2&&met[4]>150")&&cutOSSF,60, 0., 300.,-1., false, "mll", "mll_SF_Aachen_pt2010_met"); |
834 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=2&&met[4]>150")&&cutOSOF,60, 0., 300.,-1., false, "mll", "mll_OF_Aachen_pt2010_met"); |
835 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=2&&met[1]>150")&&cutOSSF,60, 0., 300.,-1., true, "mll", "mll_SF_Aachen_pt2010_t1cpfmet"); |
836 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=2&&met[1]>150")&&cutOSOF,60, 0., 300.,-1., true, "mll", "mll_OF_Aachen_pt2010_t1cpfmet"); |
837 |
> |
// basiccut=TCut(basiccutsaved.c_str()); |
838 |
> |
|
839 |
> |
// make_data_comparison_plot("pfJetGoodNum40", cutOSSF, 8, 0., 8.,-1., true, "#(jets)", "njets_SF"); |
840 |
> |
// make_data_comparison_plot("pfJetGoodNum40", cutOSOF, 8, 0., 8.,-1., true, "#(jets)", "njets_OF"); |
841 |
> |
|
842 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=3&&met[4]>100")&&cutOSSF,60, 0., 300.,-1., true, "mll", "mll_SF_ETH_met"); |
843 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=3&&met[4]>100")&&cutOSOF,60, 0., 300.,-1., true, "mll", "mll_OF_ETH_met"); |
844 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=3&&met[1]>100")&&cutOSSF,60, 0., 300.,-1., true, "mll", "mll_SF_ETH_t1cpfmet"); |
845 |
> |
// make_data_comparison_plot("mll", TCut("pfJetGoodNum40>=3&&met[1]>100")&&cutOSOF,60, 0., 300.,-1., true, "mll", "mll_OF_ETH_t1cpfmet"); |
846 |
> |
|
847 |
> |
|
848 |
> |
// make_data_comparison_plot("mll", cutOSSF,60, 15., 315.,-1., true, "m_{ll}", "mll_SF_inclusive"); |
849 |
> |
// make_data_comparison_plot("mll", cutOSSF&&TCut("id1==0"),60, 15., 315.,-1., true, "m_{ll}", "mll_SF_inclusive_ee"); |
850 |
> |
// make_data_comparison_plot("mll", cutOSSF&&TCut("id1==1"),60, 15., 315.,-1., true, "m_{ll}", "mll_SF_inclusive_mm"); |
851 |
> |
// make_data_comparison_plot("mll", cutOSOF,60, 15., 315.,-1., true, "m_{ll}", "mll_OF_inclusive"); |
852 |
> |
make_data_comparison_plot("mll", cutnJets&&cutOSSF&&TCut("id1==0"),60, 15., 315.,-1., true, "m_{ll}", "mll_SF_exclusive_ee"); |
853 |
> |
make_data_comparison_plot("mll", cutnJets&&cutOSSF&&TCut("id1==1"),60, 15., 315.,-1., true, "m_{ll}", "mll_SF_exclusive_mm"); |
854 |
> |
make_data_comparison_plot("mll", cutnJets&&cutOSSF,60, 15., 315.,-1., true, "m_{ll}", "mll_SF_exclusive"); |
855 |
> |
make_data_comparison_plot("mll", cutnJets&&cutOSOF,60, 15., 315.,-1., true, "m_{ll}", "mll_OF_exclusive"); |
856 |
> |
/* |
857 |
|
make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut, massnbins, 15., 315.,-1., false, "m_{ll}", "mll_SF_sig"); |
858 |
|
make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"pfJetGoodNumBtag30==0", massnbins, 15., 315.,-1., false, "m_{ll}", "mll_SF_sig_btagVeto"); |
859 |
|
make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"pfJetGoodNumBtag30>0", massnbins, 15., 315.,-1., false, "m_{ll}", "mll_SF_sig_AtLeastOneBJet"); |
866 |
|
make_data_comparison_plot("pfJetGoodNum40", cutOSOF&&cutSignal&&mllCut, 8, 0., 8.,-1., false, "#(jets)", "njets_OF_sig"); |
867 |
|
make_data_comparison_plot("pfJetGoodNumBtag30", cutOSSF&&cutSignal&&mllCut, 8, 0., 8.,-1., false, "#(b-jets)", "nbjets_SF_sig"); |
868 |
|
make_data_comparison_plot("pfJetGoodNumBtag30", cutOSOF&&cutSignal&&mllCut, 8, 0., 8.,-1., false, "#(b-jets)", "nbjets_OF_sig"); |
869 |
+ |
*/ |
870 |
|
} |
871 |
|
|
872 |
|
|
873 |
|
if ( doKin ) { |
874 |
|
string mllCut(""); |
829 |
– |
if ( !PlottingSetup::openBox ) mllCut = "&&mll>70"; |
875 |
|
|
876 |
< |
make_kin_plot("pfJetGoodPt[0]/pfJetGoodPt[1]","",45,1,10,dolog,"pt_{j}^{1}/pt_{j}^{2}","j1j2ratio",doPF,true); |
877 |
< |
make_kin_plot("TMath::Abs(pfJetDphiMet[0])","",32,0,3.2,nolog,"|#Delta#phi(jet1,MET)|","dphiJ1MET",doPF,true); |
876 |
> |
make_kin_plot("pfJetGoodPt[0]/pfJetGoodPt[1]","",45,1,10,dolog,"pt_{j}^{1}/pt_{j}^{2}","j1j2ratio",doPF,true); |
877 |
> |
make_kin_plot("TMath::Abs(pfJetDphiMet[0])","",32,0,3.2,nolog,"|#Delta#phi(jet1,MET)|","dphiJ1MET",doPF,true); |
878 |
|
// Plots in signal region |
879 |
|
// make_kin_plot("met[4]","",70,0,350,dolog,"MET [GeV]","met",doPF,true); |
880 |
< |
make_kin_plot("mll","mll>20"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll",doPF,true); |
881 |
< |
make_kin_plot("mll","mll>20",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_osof",doPF,true,true); |
882 |
< |
make_kin_plot("mll","mll>20"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_ee",doPF,true); |
883 |
< |
make_kin_plot("mll","mll>20"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_mm",doPF,true); |
884 |
< |
|
885 |
< |
make_kin_plot("pfJetGoodNum40",mllCut,9,-0.5,8.5,dolog,"nJets","nJets",doPF); |
886 |
< |
make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_osof",doPF); |
887 |
< |
|
888 |
< |
make_kin_plot("mll","mll>20&&met[4]>100"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_met100",doPF,true); |
889 |
< |
make_kin_plot("mll","mll>20&&met[4]>100",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_osof_met100",doPF,true,true); |
890 |
< |
make_kin_plot("mll","mll>20&&met[4]>100"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_ee_met100",doPF,true); |
891 |
< |
make_kin_plot("mll","mll>20&&met[4]>100"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_mm_met100",doPF,true); |
880 |
> |
make_kin_plot("mll","mll>20"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll",doPF,true); |
881 |
> |
make_kin_plot("mll","mll>20",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_osof",doPF,true,true); |
882 |
> |
make_kin_plot("mll","mll>20"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_ee",doPF,true); |
883 |
> |
make_kin_plot("mll","mll>20"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_mm",doPF,true); |
884 |
> |
|
885 |
> |
make_kin_plot("pfJetGoodNum40",mllCut,9,-0.5,8.5,dolog,"nJets","nJets",doPF); |
886 |
> |
make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_osof",doPF); |
887 |
> |
|
888 |
> |
// make_kin_plot("mll","mll>20&&met[4]>100"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_met100",doPF,true); |
889 |
> |
// make_kin_plot("mll","mll>20&&met[4]>100",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_osof_met100",doPF,true,true); |
890 |
> |
// make_kin_plot("mll","mll>20&&met[4]>100"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_ee_met100",doPF,true); |
891 |
> |
// make_kin_plot("mll","mll>20&&met[4]>100"+mllCut,(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_mm_met100",doPF,true); |
892 |
|
|
893 |
|
|
894 |
< |
make_kin_plot("pfJetGoodNum40","met[4]>100"+mllCut,9,-0.5,8.5,dolog,"nJets","nJets_met100",doPF); |
895 |
< |
make_kin_plot("pfJetGoodNum40","met[4]>100",9,-0.5,8.5,dolog,"nJets","nJets_osof_met100",doPF); |
894 |
> |
// make_kin_plot("pfJetGoodNum40","met[4]>100"+mllCut,9,-0.5,8.5,dolog,"nJets","nJets_met100",doPF); |
895 |
> |
// make_kin_plot("pfJetGoodNum40","met[4]>100",9,-0.5,8.5,dolog,"nJets","nJets_osof_met100",doPF); |
896 |
|
|
897 |
|
// Further inclusive invariant mass plots |
898 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive",doPF,true); |
899 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_ee",doPF,true); |
900 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_mm",doPF,true); |
901 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_osof",doPF,true); |
898 |
> |
make_kin_plot("mll",mllCut,(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive",doPF,true); |
899 |
> |
// make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_ee",doPF,true); |
900 |
> |
// make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_mm",doPF,true); |
901 |
> |
make_kin_plot("mll",mllCut,(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_osof",doPF,true); |
902 |
|
|
903 |
|
//make_kin_plot("mll","",(int)((350-mll_low))/5,mll_low,350,dolog,"m_{ll} [GeV]","mll_inclusive_highrange",doPF); |
904 |
|
//if(!doPF) make_special_mll_plot((int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]"); |
2705 |
|
|
2706 |
|
float simulatedlumi = luminosity; //in pb please - adjust to your likings |
2707 |
|
|
2708 |
< |
TH1F *TZem = systsamples.Draw("TZem", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2709 |
< |
TH1F *nTZem = systsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2708 |
> |
TH1F *TZem = systsamples.Draw("TZem", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2709 |
> |
TH1F *nTZem = systsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2710 |
|
TH1F *TSem; |
2711 |
|
TH1F *nTSem; |
2712 |
< |
TH1F *TZeemm = systsamples.Draw("TZeemm", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2713 |
< |
TH1F *nTZeemm = systsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2712 |
> |
TH1F *TZeemm = systsamples.Draw("TZeemm", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2713 |
> |
TH1F *nTZeemm = systsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2714 |
|
TH1F *TSeemm; |
2715 |
|
TH1F *nTSeemm; |
2716 |
|
|
2717 |
|
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
2718 |
< |
TSem = systsamples.Draw("TSem", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2719 |
< |
nTSem = systsamples.Draw("nTSem", "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2720 |
< |
TSeemm = systsamples.Draw("TSeemm", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2721 |
< |
nTSeemm = systsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2718 |
> |
TSem = systsamples.Draw("TSem", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2719 |
> |
nTSem = systsamples.Draw("nTSem", "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2720 |
> |
TSeemm = systsamples.Draw("TSeemm", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2721 |
> |
nTSeemm = systsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
2722 |
|
} |
2723 |
|
|
2724 |
|
TCanvas *tcan = new TCanvas("tcan","tcan"); |
2977 |
|
} |
2978 |
|
|
2979 |
|
|
2980 |
< |
void zjets_prediction_comparison(string mcjzbWithPUa) { |
2980 |
> |
void zjets_prediction_comparison(string mcjzbWithPUa, TCut massregioncut, string massregionname) { |
2981 |
|
cout << "****************************************************************************************************************************************************************" << endl; |
2982 |
|
TCanvas *zcan = new TCanvas("zcan","zcan"); |
2983 |
|
// zcan->SetLogy(1); |
3029 |
|
TCut ee_mm_tautau("mll>0"); |
3030 |
|
|
3031 |
|
|
3032 |
< |
TH1F *hJZBpos = systsamples.Draw("hJZBpos",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&cutnJets&¬Tau&&kPos,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3033 |
< |
TH1F *hJZBneg = systsamples.Draw("hJZBneg",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&cutnJets&¬Tau&&kNeg,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3032 |
> |
TH1F *hJZBpos = systsamples.Draw("hJZBpos",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&cutnJets&¬Tau&&kPos&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3033 |
> |
TH1F *hJZBneg = systsamples.Draw("hJZBneg",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&cutnJets&¬Tau&&kNeg&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3034 |
|
|
3035 |
|
hJZBpos->SetLineColor(kBlack); |
3036 |
|
hJZBneg->SetLineColor(kRed); |
3045 |
|
leg->AddEntry(hJZBneg,"Predicted","l"); |
3046 |
|
leg->Draw("same"); |
3047 |
|
DrawMCPrelim(simulatedlumi); |
3048 |
< |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemm_prediction"); |
3048 |
> |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemm_prediction"+any2string(massregionname)); |
3049 |
|
|
3050 |
|
TH1F* hratio = (TH1F*)hJZBpos->Clone("hratio"); |
3051 |
|
hratio->Divide(hJZBneg); |
3054 |
|
cout << "Positive: " << hJZBpos->GetBinContent(i) << " vs Negative : " << hJZBneg->GetBinContent(i) << " (ratio : " << hJZBpos->GetBinContent(i) / hJZBneg->GetBinContent(i) << endl; |
3055 |
|
} |
3056 |
|
|
3057 |
< |
zcan->SetLogy(0); |
3057 |
> |
// zcan->SetLogy(0); |
3058 |
|
hratio->GetYaxis()->SetRangeUser(0,2.5); |
3059 |
|
hratio->GetYaxis()->SetTitle("Observed/Predicted"); |
3060 |
|
hratio->Draw("e1"); |
3064 |
|
TLine *bottom = new TLine(binning[0],0.75,binning[binning.size()-1],0.75); |
3065 |
|
|
3066 |
|
|
3067 |
+ |
cout << __LINE__ << endl; |
3068 |
|
top->SetLineColor(kBlue);top->SetLineStyle(2); |
3069 |
|
bottom->SetLineColor(kBlue);bottom->SetLineStyle(2); |
3070 |
|
center->SetLineColor(kBlue); |
3078 |
|
leg2->AddEntry(bottom,"syst. envelope","l"); |
3079 |
|
leg2->Draw("same"); |
3080 |
|
DrawMCPrelim(simulatedlumi); |
3081 |
< |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemm_prediction_ratio"); |
3081 |
> |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemm_prediction_ratio"+any2string(massregionname)); |
3082 |
|
|
3083 |
|
TCut reducedNJets(cutnJets); |
3084 |
|
|
3085 |
< |
TH1F *TAUhJZBpos = systsamples.Draw("TAUhJZBpos",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kPos,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3086 |
< |
TH1F *LcorrJZBeemm = systsamples.Draw("LcorrJZBeemm",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kNeg,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3087 |
< |
TH1F *RcorrJZBem = systsamples.Draw("RcorrJZBem",var,binning, "JZB [GeV]", "events",cutmass&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kPos,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3088 |
< |
TH1F *LcorrJZBem = systsamples.Draw("LcorrJZBem",var,binning, "JZB [GeV]", "events",cutmass&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kNeg,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3085 |
> |
TH1F *TAUhJZBpos = systsamples.Draw("TAUhJZBpos",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kPos&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3086 |
> |
TH1F *LcorrJZBeemm = systsamples.Draw("LcorrJZBeemm",var,binning, "JZB [GeV]", "events",cutmass&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kNeg&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3087 |
> |
TH1F *RcorrJZBem = systsamples.Draw("RcorrJZBem",var,binning, "JZB [GeV]", "events",cutmass&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kPos&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3088 |
> |
TH1F *LcorrJZBem = systsamples.Draw("LcorrJZBem",var,binning, "JZB [GeV]", "events",cutmass&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kNeg&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3089 |
|
|
3090 |
+ |
cout << __LINE__ << endl; |
3091 |
|
TH1F *RcorrJZBSBem; |
3092 |
|
TH1F *LcorrJZBSBem; |
3093 |
|
TH1F *RcorrJZBSBeemm; |
3094 |
|
TH1F *LcorrJZBSBeemm; |
3095 |
|
|
3096 |
+ |
cout << __LINE__ << endl; |
3097 |
|
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
3098 |
< |
RcorrJZBSBem = systsamples.Draw("RcorrJZBSBem",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kPos,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3099 |
< |
LcorrJZBSBem = systsamples.Draw("LcorrJZBSBem",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kNeg,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3100 |
< |
RcorrJZBSBeemm = systsamples.Draw("RcorrJZBSBeemm",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kPos,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3101 |
< |
LcorrJZBSBeemm = systsamples.Draw("LcorrJZBSBeemm",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kNeg,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3098 |
> |
RcorrJZBSBem = systsamples.Draw("RcorrJZBSBem",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kPos&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3099 |
> |
LcorrJZBSBem = systsamples.Draw("LcorrJZBSBem",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSOF&&reducedNJets&&ee_mm_tautau&&kNeg&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3100 |
> |
RcorrJZBSBeemm = systsamples.Draw("RcorrJZBSBeemm",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kPos&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3101 |
> |
LcorrJZBSBeemm = systsamples.Draw("LcorrJZBSBeemm",var,binning, "JZB [GeV]", "events",sidebandcut&&cutOSSF&&reducedNJets&&ee_mm_tautau&&kNeg&&massregioncut,mc,simulatedlumi,systsamples.FindSample("/DY")); |
3102 |
|
} |
3103 |
|
|
3104 |
|
TH1F *Bpred = (TH1F*)LcorrJZBeemm->Clone("Bpred"); |
3116 |
|
|
3117 |
|
Bpred->SetLineColor(kRed); |
3118 |
|
|
3119 |
+ |
cout << __LINE__ << endl; |
3120 |
|
TAUhJZBpos->SetLineColor(kBlack); |
3121 |
|
Bpred->SetLineColor(kRed); |
3122 |
|
|
3130 |
|
TAUleg->AddEntry(Bpred,"Predicted","l"); |
3131 |
|
TAUleg->Draw("same"); |
3132 |
|
DrawMCPrelim(simulatedlumi); |
3133 |
< |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemumutautau_prediction"); |
3133 |
> |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemumutautau_prediction__"+any2string(massregionname)); |
3134 |
|
|
3135 |
|
TH1F* TAUhratio = (TH1F*)TAUhJZBpos->Clone("TAUhratio"); |
3136 |
|
TAUhratio->Divide(Bpred); |
3153 |
|
TAUleg2->AddEntry(bottom,"syst. envelope","l"); |
3154 |
|
TAUleg2->Draw("same"); |
3155 |
|
DrawMCPrelim(simulatedlumi); |
3156 |
< |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemumutautau_prediction_ratio"); |
3156 |
> |
CompleteSave(zcan,"Systematics/ZJets/zjets_eemumutautau_prediction_ratio"+any2string(massregionname)); |
3157 |
|
|
3158 |
|
delete Bpred; |
3159 |
|
delete TAUhJZBpos; |
3160 |
|
delete LcorrJZBeemm; |
3161 |
|
delete RcorrJZBem; |
3162 |
|
delete LcorrJZBem; |
3163 |
+ |
delete hJZBpos; |
3164 |
+ |
delete hJZBneg; |
3165 |
|
|
3166 |
|
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
3167 |
|
delete RcorrJZBSBem; |
3174 |
|
delete zcan; |
3175 |
|
cutWeight=weightbackup; |
3176 |
|
|
3177 |
+ |
cout << __LINE__ << endl; |
3178 |
|
} |
3179 |
|
|
3180 |
|
|
3181 |
< |
|
3181 |
> |
void zjets_prediction_comparison(string mcjzbWithPUa) { |
3182 |
> |
zjets_prediction_comparison(mcjzbWithPUa, TCut(""), "nomasscut"); |
3183 |
> |
zjets_prediction_comparison(mcjzbWithPUa, TCut("abs(mll-91)<20"), "Zwindow_20"); |
3184 |
> |
zjets_prediction_comparison(mcjzbWithPUa, TCut("mll>20&&mll<70"), "LowMassRegion2070"); |
3185 |
> |
zjets_prediction_comparison(mcjzbWithPUa, TCut("mll>110"), "HighMassRegion110"); |
3186 |
> |
} |
3187 |
> |
|
3188 |
|
void sideband_assessment(string datajzb, float min=30.0, float max=50.0) { |
3189 |
|
tout << endl << endl; |
3190 |
|
stringstream bordercut; |