ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/Plotting_Functions.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/Modules/Plotting_Functions.C (file contents):
Revision 1.53 by buchmann, Mon Sep 3 17:02:53 2012 UTC vs.
Revision 1.57 by buchmann, Thu Sep 6 10:19:18 2012 UTC

# Line 33 | Line 33 | void todo() {
33  
34  
35  
36 < void find_one_peak_combination(TCut specialcut, float &MCPeak,float &MCPeakError, float &DataPeak, float &DataPeakError, float &MCSigma, float &MCSigmaError, float &DataSigma, float& DataSigmaError, stringstream &result, bool doPUreweighting = true, string saveas="")
36 > void find_one_peak_combination(TCut specialcut, bool SwitchOffNJetsCut, float &MCPeak,float &MCPeakError, float &DataPeak, float &DataPeakError, float &MCSigma, float &MCSigmaError, float &DataSigma, float& DataSigmaError, stringstream &result, bool doPUreweighting = true, string saveas="")
37   {
38    // Temporarily switch off PU reweighting, if asked
39    TCut weightbackup=cutWeight;
# Line 42 | Line 42 | void find_one_peak_combination(TCut spec
42    int nbins=100;
43    if(PlottingSetup::DoBTag) nbins=25;
44    
45 +  TCut nJetsCut(cutnJets);
46 +  if(SwitchOffNJetsCut) nJetsCut=specialcut;
47 +  
48    TCanvas *tempcan = new TCanvas("tempcan","Temporary canvas for peak finding preparations");
49 <  TH1F *rawJZBeemmMC      = allsamples.Draw("rawJZBeemmMC",jzbvariablemc,nbins,-50,50, "JZB [GeV]", "events", cutmass&&cutOSSF&&cutnJets&&specialcut,mc, luminosity);
50 <  TH1F *rawJZBeemmData    = allsamples.Draw("rawJZBeemmData",jzbvariabledata,nbins, -50,50, "JZB [GeV]", "events", cutmass&&cutOSSF&&cutnJets&&specialcut,data, luminosity);
51 <  TH1F *rawJZBemMC      = allsamples.Draw("rawJZBemMC",jzbvariablemc,nbins,-50,50, "JZB [GeV]", "events", cutmass&&cutOSOF&&cutnJets&&specialcut,mc, luminosity);
52 <  TH1F *rawJZBemData    = allsamples.Draw("rawJZBemData",jzbvariabledata,nbins, -50,50, "JZB [GeV]", "events", cutmass&&cutOSOF&&cutnJets&&specialcut,data, luminosity);
49 >  TH1F *rawJZBeemmMC      = allsamples.Draw("rawJZBeemmMC",jzbvariablemc,nbins,-50,50, "JZB [GeV]", "events", cutmass&&cutOSSF&&nJetsCut&&specialcut,mc, luminosity);
50 >  TH1F *rawJZBeemmData    = allsamples.Draw("rawJZBeemmData",jzbvariabledata,nbins, -50,50, "JZB [GeV]", "events", cutmass&&cutOSSF&&nJetsCut&&specialcut,data, luminosity);
51 >  TH1F *rawJZBemMC      = allsamples.Draw("rawJZBemMC",jzbvariablemc,nbins,-50,50, "JZB [GeV]", "events", cutmass&&cutOSOF&&nJetsCut&&specialcut,mc, luminosity);
52 >  TH1F *rawJZBemData    = allsamples.Draw("rawJZBemData",jzbvariabledata,nbins, -50,50, "JZB [GeV]", "events", cutmass&&cutOSOF&&nJetsCut&&specialcut,data, luminosity);
53    TH1F *rawttbarjzbeemmMC;
54  
55    if(method==doKM) {
56      //we only need this histo for the KM fitting...
57 <    rawttbarjzbeemmMC = allsamples.Draw("rawttbarjzbeemmMC",jzbvariablemc,nbins, -50,50, "JZB [GeV]", "events",cutmass&&cutOSSF&&cutnJets&&specialcut,mc,luminosity,allsamples.FindSample("TTJet"));
57 >    rawttbarjzbeemmMC = allsamples.Draw("rawttbarjzbeemmMC",jzbvariablemc,nbins, -50,50, "JZB [GeV]", "events",cutmass&&cutOSSF&&nJetsCut&&specialcut,mc,luminosity,allsamples.FindSample("TTJet"));
58      MCPeak=find_peak(rawJZBeemmMC, rawttbarjzbeemmMC, -40, 40, mc, MCPeakError,MCSigma,MCSigmaError,method,saveas);
59      DataPeak=find_peak(rawJZBeemmData, rawJZBeemmData, -40, 40, data, DataPeakError,DataSigma,DataSigmaError,method,saveas);
60      delete rawttbarjzbeemmMC;
# Line 84 | Line 87 | void find_one_peak_combination(TCut spec
87    delete tempcan;
88   }
89  
90 < void find_peaks(float &MCPeak,float &MCPeakError, float &DataPeak, float &DataPeakError, stringstream &result, bool doPUreweighting, stringstream &datajzb, stringstream &mcjzb)
90 > void find_peaks(float &MCPeak,float &MCPeakError, float &DataPeak, float &DataPeakError, stringstream &result, bool doPUreweighting, stringstream &datajzb, stringstream &mcjzb, string sSpecialCut="", bool SwitchOffNJetsCut=false)
91   {
92    switch_overunderflow(false);
93 <
93 >  
94 >  TCut SpecialCut("mll>=0");
95 >  if(sSpecialCut!="") SpecialCut=TCut(sSpecialCut.c_str());
96 >  
97    bool DoInvidualeemmPeaks=false;
98    
99    float mcpeak, datapeak;
# Line 102 | Line 108 | void find_peaks(float &MCPeak,float &MCP
108    float mcSigma,mcSigmaError, dataSigma, dataSigmaError;
109    
110    dout << "Finding global peak : " << endl;
111 <  find_one_peak_combination(TCut(""),mcpeak,mcpeakerr, datapeak,datapeakerr,mcSigma,mcSigmaError, dataSigma,dataSigmaError,result,doPUreweighting,"");
111 >  find_one_peak_combination(SpecialCut,SwitchOffNJetsCut,mcpeak,mcpeakerr, datapeak,datapeakerr,mcSigma,mcSigmaError, dataSigma,dataSigmaError,result,doPUreweighting,"");
112    
113    if(DoInvidualeemmPeaks) {
114      dout << "Finding peak for electrons : " << endl;
115 <    find_one_peak_combination(TCut("id1==0"),mceepeak,mceepeakerr,dataeepeak,dataeepeakerr,mcSigma,mcSigmaError,dataSigma,dataSigmaError,result,doPUreweighting,"_ele");
115 >    find_one_peak_combination(SpecialCut&&TCut("id1==0"),SwitchOffNJetsCut,mceepeak,mceepeakerr,dataeepeak,dataeepeakerr,mcSigma,mcSigmaError,dataSigma,dataSigmaError,result,doPUreweighting,"_ele");
116      dout << "Finding peak for muons : " << endl;
117 <    find_one_peak_combination(TCut("id1==1"),mcmmpeak,mcmmpeakerr,datammpeak,datammpeakerr,mcSigma,mcSigmaError,dataSigma,dataSigmaError,result,doPUreweighting,"_mu");
117 >    find_one_peak_combination(SpecialCut&&TCut("id1==1"),SwitchOffNJetsCut,mcmmpeak,mcmmpeakerr,datammpeak,datammpeakerr,mcSigma,mcSigmaError,dataSigma,dataSigmaError,result,doPUreweighting,"_mu");
118      
119      datajzb << "(" << jzbvariabledata;
120      mcjzb << "(" << jzbvariablemc;
# Line 134 | Line 140 | void find_peaks(float &MCPeak,float &MCP
140      else mcjzb << "+ (id1!=id2)*" << TMath::Abs(mcpeak) << " ";
141      
142      mcjzb << ")";
143 +    
144    } else {
145      datajzb << "(" << jzbvariabledata;
146        mcjzb << "(" << jzbvariablemc;
# Line 149 | Line 156 | void find_peaks(float &MCPeak,float &MCP
156      mcjzb << ")";
157    }
158    
159 <  switch_overunderflow(true);
159 >    MCPeak=mcpeak;
160 >    MCPeakError=mcpeakerr;
161 >    DataPeak=datapeak;
162 >    DataPeakError=datapeakerr;
163 >    
164 >    switch_overunderflow(true);
165    
166   }
167  
# Line 359 | Line 371 | void draw_ratio_plot(TH1* hdata, THStack
371    oneline->SetLineWidth(1);
372    oneline->Draw("same");
373   }
374 +
375   float make_one_OFSF_plot(string variable, string addcut, string legendTitle, int nbins, float min, float max, float ymax, bool logscale,
376                          string xlabel, string filename, bool plotratio=true, bool loadlastminmax=false, float legendPosition=0.55) {
377  
# Line 374 | Line 387 | float make_one_OFSF_plot(string variable
387    cutSF = cutOSSF&&cutnJets&&ibasiccut;
388  
389    TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600);
390 <  ckin->SetLogy(logscale);
390 >  TPad* rcan = new TPad("rcan","rcan",0,0,1,1);
391 >  rcan->SetLogy(logscale);
392 >  rcan->cd();
393 >
394    TH1F *datahistoSF = allsamples.Draw("datahistoSF",variable,nbins,min,max, xlabel, "events",cutSF,data,luminosity);
395    TH1F *datahistoOF = allsamples.Draw("datahistoOF",variable,nbins,min,max, xlabel, "events",cutOF,data,luminosity);
396    string signal("LM3");
# Line 420 | Line 436 | float make_one_OFSF_plot(string variable
436    signalhisto->Draw("HIST,SAMES");
437    mleg->Draw();
438    DrawPrelim();
439 <  CompleteSave(ckin, "SFOF/" + filename);
439 >  if (datahistoOF->Integral()>0) save_with_ratio( datahistoSF, datahistoOF, rcan, "SFOF/" + filename, false, false, "SF/OF" );
440 >  else CompleteSave(ckin, "SFOF/" + filename);
441  
442    datahistoSF->Delete();
443    datahistoOF->Delete();
# Line 432 | Line 449 | float make_one_OFSF_plot(string variable
449  
450   }
451  
452 < void make_OFSF_plots(string variable, string addcut, int nbins, float min, float max, bool logscale, string xlabel, string filename,
453 <                bool plotratio=true, bool loadlastminmax=false, float legendPosition=0.55) {
452 > // Compare data to data
453 > float make_data_comparison_plot(string variable, TCut cut, int nbins, float min, float max, float ymax, bool logscale,
454 >                                string xlabel, string filename, float legendPosition=0.55) {
455 >
456 >  TCut ibasiccut=basiccut&&cut;
457 >
458 >  TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600);
459 >  TPad* rcan = new TPad("rcan","rcan",0,0,1,1);
460 >  rcan->SetLogy(logscale);
461 >  rcan->cd();
462 >
463 >  std::cout << "Data comparison: variable = " << variable << ", cut = " << ibasiccut.GetTitle() << std::endl;
464 >
465 >  TH1F *data1 = allsamples.Draw("data1",variable,nbins,min,max, xlabel, "events",ibasiccut,data,luminosity);
466 >  TH1F *data2 = comparesamples.Draw("data2",variable,nbins,min,max, xlabel, "events",ibasiccut,data,luminosity);
467 >
468 >  data1->SetMarkerSize(DataMarkerSize);
469 >  data2->SetLineColor(kRed);
470 >
471 >  if ( !logscale ) {
472 >    data1->SetMinimum(0); // Defaults
473 >  } else {
474 >    data1->SetMinimum(0.5);
475 >  }
476 >  if (ymax<0) {
477 >    if ( logscale ) data1->SetMaximum(5.3*data1->GetMaximum());
478 >    else data1->SetMaximum(1.5*data1->GetMaximum());
479 >  } else {
480 >    data1->SetMaximum(ymax);
481 >  }
482 >
483 >  float ymaxSet = data1->GetMaximum();
484 >
485 >  data1->GetXaxis()->SetTitle(xlabel.c_str());
486 >  data1->GetYaxis()->SetTitle("Events");
487 >  data1->GetXaxis()->CenterTitle();
488 >  data1->GetYaxis()->CenterTitle();
489 >
490 >  TLegend *mleg = make_legend("",legendPosition,0.7,false,legendPosition+0.2);
491 >  mleg->AddEntry(data1, "Old 5/fb", "PL");
492 >  mleg->AddEntry(data2, "New x/fb", "L");
493 >
494 >  data1->Draw("E1");
495 >  data2->Draw("HIST,SAMES");
496 >  mleg->Draw();
497 >  DrawPrelim();
498 >  save_with_ratio( data1, data2, rcan, "compareData/" + filename, false, false, "old/new" );
499 >
500 >  data1->Delete();
501 >  data2->Delete();
502 >  delete mleg;
503 >  delete ckin;
504 >
505 > }
506 >
507 > void make_OFSF_plots(string variable, string addcut, int nbins, float min, float max, bool logscale,
508 >                     string xlabel, string filename, float legendPosition=0.55) {
509  
510    string mllcuts[] = { "mll>20","mll>20&&mll<70", "mll>75&&mll<105", "mll>120" };
511    string mllcutname[] = { "m_{ll} > 20 GeV", "20 < m_{ll} < 70 GeV", "75 < m_{ll} < 105 GeV", "m_{ll} > 120 GeV" };
512    string plotname[] = {"_all","_low","_peak","_high"};
513    float ymax;
514 <  for ( int i=0; i<4; ++i ) {
514 >
515 >  int start = 0;
516 >  if ( !PlottingSetup::openBox ) start = 3;
517 >
518 >  for ( int i=start; i<4; ++i ) {
519      if ( addcut != "" ) mllcuts[i] += "&&"+addcut;
520 <    if ( i==0 ) {
520 >    if ( i==start ) {
521        ymax = make_one_OFSF_plot(variable, mllcuts[i],            mllcutname[i], nbins, min, max, -1, logscale, xlabel,
522 <                         filename+plotname[i], plotratio, loadlastminmax, legendPosition );
522 >                         filename+plotname[i], legendPosition );
523      } else {
524        make_one_OFSF_plot(variable, mllcuts[i],            mllcutname[i], nbins, min, max, ymax, logscale, xlabel,
525 <                         filename+plotname[i], plotratio, loadlastminmax, legendPosition );
525 >                         filename+plotname[i], legendPosition );
526      }
527      make_one_OFSF_plot(variable, "id1==1&&id1==id2&&"+mllcuts[i], mllcutname[i], nbins, min, max, ymax, logscale, xlabel,
528 <                       filename+plotname[i]+"_mm", plotratio, loadlastminmax, legendPosition );
528 >                       filename+plotname[i]+"_mm", legendPosition );
529      make_one_OFSF_plot(variable, "id1==0&&id1==id2&&"+mllcuts[i], mllcutname[i], nbins, min, max, ymax, logscale, xlabel,
530 <                       filename+plotname[i]+"_ee", plotratio, loadlastminmax, legendPosition );
530 >                       filename+plotname[i]+"_ee", legendPosition );
531    }
532  
533   }
# Line 486 | Line 562 | void make_kin_plot(string variable, stri
562    //Step 2: Refine the cut
563    TCut cut;
564    cut=cutmass&&cutOSSF&&cutnJets&&ibasiccut;
565 <  if(filename=="nJets") cut=cutmass&&cutOSSF&&ibasiccut;
566 <  if(filename=="nJets_osof") cut=cutmass&&cutOSOF&&ibasiccut;
565 >  if(filename=="nJets" || filename=="nJets_inclusive") cut=cutmass&&cutOSSF&&ibasiccut;
566 >  if(filename=="nJets_osof" || filename=="nJets_osof_inclusive") cut=cutmass&&cutOSOF&&ibasiccut;
567    if(filename=="nJets_nocuts_except_mll_ossf") cut=cutmass&&cutOSSF;
568    if(filename=="mll") {
569          cut=cutOSSF&&cutnJets&&ibasiccut;
570          draw_separation_lines=true;
571    }
572    if(filename=="mll_ee") cut=cutOSSF&&cutnJets&&ibasiccut&&"id1==0";
573 +  if(filename=="mll_mm") cut=cutOSSF&&cutnJets&&ibasiccut&&"id1==1";
574    if(filename=="mll_osof") {
575          cut=cutOSOF&&cutnJets&&ibasiccut;
576          draw_separation_lines=true;
577    }
501  if(filename=="mll_mm") cut=cutOSSF&&cutnJets&&ibasiccut&&"id1==1";
578    if(Contains(filename,"aboveJZB")) cut=cutOSSF&&cutnJets&&ibasiccut;
579    if(Contains(filename,"mll_ee_above")) cut=cut&&"id1==0";
580    if(Contains(filename,"mll_mm_above")) cut=cut&&"id1==1";
581    if(Contains(filename,"mll_osof_aboveJZB")) cut=cutOSOF&&cutnJets&&ibasiccut;
582 <  if(filename=="mll_inclusive"||filename=="mll_inclusive_highrange") cut=cutOSSF;
583 <  if(filename=="mll_inclusive_osof") cut=cutOSOF;
584 <  if(filename=="mll_inclusive_ee") cut=cutOSSF&&"id1==0";
585 <  if(filename=="mll_inclusive_mm") cut=cutOSSF&&"id1==1";
582 >  if(filename=="mll_inclusive"||filename=="mll_inclusive_highrange") cut=cutmass&&cutOSSF;
583 >  if(filename=="mll_inclusive_osof") cut=cutmass&&cutOSOF;
584 >  if(filename=="mll_inclusive_ee") cut=cutmass&&cutOSSF&&"id1==0";
585 >  if(filename=="mll_inclusive_mm") cut=cutmass&&cutOSSF&&"id1==1";
586    if(filename=="pfJetGoodEta_0") cut=cutOSSF&&cutmass&&ibasiccut&&cutnJets;
587    if(filename=="pfJetGoodPt_0") cut=cutOSSF&&cutmass&&ibasiccut&&cutnJets;
588 +  if(filename=="numVtx") cut=cutmass&&ibasiccut;
589  
590    TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600);
591    ckin->SetLogy(logscale);
# Line 666 | Line 743 | void do_kinematic_plots(string mcjzb, st
743   {
744    bool dolog=true;
745    bool nolog=false;
746 +
747 +  bool doOFSF = false;
748 +  bool doKin  = false;
749 +  bool doDataComp = true;
750 +  
751 +
752    if(doPF) write_warning(__FUNCTION__,"Please use caution when trying to produce PF plots; not all versions of the JZB trees have these variables!");
753    float mll_low=50;
754    float mll_hi=160;
755    if(!PlottingSetup::RestrictToMassPeak) {
756          mll_low=20;
757 <        mll_hi=300;
757 >        mll_hi=320;
758    }
759 < /*
760 <  make_OFSF_plots("mll", "met[4]>100", 60, 20., 320., false, "m_{ll}", "mll", false, false);
761 <  make_OFSF_plots("pfJetGoodNum40", "met[4]>100", 7, 3, 10, true, "#(jets)", "njets", false, false);
762 <  make_OFSF_plots("pt1",  "met[4]>100", 30, 0., 300., true, "p_{T,1}", "pt1", false, false);
763 <  make_OFSF_plots("pt2",  "met[4]>100", 22, 0., 220., true, "p_{T,2}", "pt2", false, false);
764 <  make_OFSF_plots("eta1", "met[4]>100", 10, -2.5, 2.5, false, "#eta_{1}", "eta1", false, false, 0.15);
765 <  make_OFSF_plots("eta2", "met[4]>100", 10, -2.5, 2.5, false, "#eta_{2}", "eta2", false, false, 0.15);
766 <  make_OFSF_plots("phi1", "met[4]>100", 10, -TMath::Pi(), TMath::Pi(), false, "#phi_{1}", "phi1", false, false, 0.2);
767 <  make_OFSF_plots("phi2", "met[4]>100", 10, -TMath::Pi(), TMath::Pi(), false, "#phi_{2}", "phi2", false, false, 0.2);
768 <  make_OFSF_plots("pfJetGoodPt[0]/pfJetGoodPt[1]", "met[4]>100", 20, 1, 10, true, "pt_{j}^{1}/pt_{j}^{2}", "jpt1pt2", false, false, 0.2);
769 <  make_OFSF_plots("TMath::Abs(pfJetDphiMet[0])", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(jet1,MET)|", "dphij1met", false, false, 0.0);
770 <  make_OFSF_plots("TMath::Abs(dphi)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,l2)|", "dphi", false, false, 0.2);
771 <  make_OFSF_plots("TMath::Abs(dphiMet1)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,MET)|", "dphiMet1", false, false, 0.2);
772 <  make_OFSF_plots("TMath::Abs(dphiMet2)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l2,MET)|", "dphiMet2", false, false, 0.2);
773 <  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", false, false, 0.2);
774 <  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", false, false, 0.2);
775 <  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", false, false, 0.2);
776 <  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", false, false, 0.2);
777 <
778 <  make_kin_plot("met[4]","",70,0,350,dolog,"MET [GeV]","met",doPF,true);
779 <  make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll",doPF,true);
780 <  make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_osof",doPF,true,true);
781 <  make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_ee",doPF,true);
782 <  make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_mm",doPF,true);
783 <  make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive",doPF,true);
784 <  make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_ee",doPF,true);
785 <  make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_mm",doPF,true);
786 <  make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_osof",doPF,true);
787 <  make_kin_plot("mll","",(int)((350-mll_low))/5,mll_low,350,dolog,"m_{ll} [GeV]","mll_inclusive_highrange",doPF);
788 <  if(!doPF) make_special_mll_plot((int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]");
789 <
790 <  make_kin_plot("pfJetGoodPt[0]/pfJetGoodPt[1]","",45,1,10,dolog,"pt_{j}^{1}/pt_{j}^{2}","j1j2ratio",doPF,true);
791 <  make_kin_plot("TMath::Abs(pfJetDphiMet[0])","",32,0,3.2,nolog,"|#Delta#phi(jet1,MET)|","dphiJ1MET",doPF,true);
792 <
793 <  make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets",doPF);
794 <  make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_osof",doPF);
795 <  make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_nocuts_except_mll_ossf",doPF);
796 <
797 <  make_kin_plot("numVtx","",(int)(30.5-(-0.5)),-0.5,30.5,nolog,"N(Vtx)","numVtx",doPF);
798 < //  make_kin_plot("jetpt[0]","",40,0,200,dolog,"leading jet p_{T} [GeV]","pfJetGoodPt_0",doPF);
799 < //  make_kin_plot("jeteta[0]","",40,-5,5,nolog,"leading jet #eta","pfJetGoodEta_0",doPF);
800 <  */
801 <  make_kin_plot("pt","",50,0,500,dolog,"Z p_{T} [GeV]","Zpt",doPF);
802 <  make_kin_plot("pt1","",50,0,200,nolog,"p_{T} [GeV]","pt1",doPF);
803 <  make_kin_plot("pt2","",50,0,200,nolog,"p_{T} [GeV]","pt2",doPF);
804 <  make_kin_plot("eta1","",40,-3,3,nolog,"#eta_{l}","eta",doPF);
805 <  make_kin_plot("jzb[1]","",100,-150,200,dolog,"JZB [GeV]","jzb_ossf",doPF);
806 <  stringstream jzbcut;
807 <  jzbcut << "((is_data&&("<<datajzb<<")>100)||(!is_data&&("<<mcjzb<<")>100))";
808 <  make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB100",doPF,true);
809 <  make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB100",doPF,true);
810 <  make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB100",doPF,true);
811 <  make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB100",doPF,true);
812 <  stringstream jzbcut2;
813 <  jzbcut2 << "((is_data&&("<<datajzb<<")>150)||(!is_data&&("<<mcjzb<<")>150))";
814 <  make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB150",doPF,true);
815 <  make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB150",doPF,true);
816 <  make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB150",doPF,true);
817 <  make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB150",doPF,true);
818 <  stringstream jzbcut3;
819 <  jzbcut3 << "((is_data&&("<<datajzb<<")>50)||(!is_data&&("<<mcjzb<<")>50))";
820 <  make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB50",doPF,true);  
821 <  make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB50",doPF,true,true);
822 <  make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB50",doPF,true);  
823 <  make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB50",doPF,true);  
824 <
825 <  make_kin_plot("mll","met[4]>100",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV] (MET>100GeV)","mll_met100_ll",doPF,true);
826 <  //make_kin_plot("mll","met[4]>150&&id1==0",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ee} [GeV] (MET>150GeV)","mll_met150_ee",doPF,true);
827 <  //make_kin_plot("mll","met[4]>150&&id1==1",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{#mu#mu} [GeV] (MET>150GeV)","mll_met150_mm",doPF,true);
828 <
829 <  make_special_obs_pred_mll_plot(datajzb,mcjzb,0);
830 <  make_special_obs_pred_mll_plot(datajzb,mcjzb,50);
831 <  make_special_obs_pred_mll_plot(datajzb,mcjzb,80);
832 <  make_special_obs_pred_mll_plot(datajzb,mcjzb,100);
759 >
760 >  if ( doOFSF ) {
761 >    make_OFSF_plots("mll", "met[4]>100", 60, 20., 320., false, "m_{ll}", "mll");
762 >
763 >    make_OFSF_plots("pfJetGoodNum40",     "met[4]>100", 7, 3, 10, true, "#(jets)", "njets");
764 >    make_OFSF_plots("pfJetGoodNum40",     "met[4]>100&&pfJetGoodNumBtag30==0", 7, 3, 10, true, "#(jets)", "njets_btagVeto");
765 >    make_OFSF_plots("pfJetGoodNum40",     "met[4]>100&&pfJetGoodNumBtag30>0", 7, 3, 10, true, "#(jets)", "njets_AtLeastOneBJet30");
766 >
767 >    make_OFSF_plots("pfJetGoodNumBtag30", "met[4]>100", 5, 0, 5, true, "#(b-jets)", "nbjets");
768 >    make_OFSF_plots("iso1", "met[4]>100", 20, 0, 0.3, true, "lepton 1 isolation", "iso1");
769 >    make_OFSF_plots("iso2", "met[4]>100", 20, 0, 0.3, true, "lepton 2 isolation", "iso2");
770 >    //  make_OFSF_plots("pt1",  "met[4]>100", 30, 0., 300., true, "p_{T,1}", "pt1");
771 >    //  make_OFSF_plots("pt2",  "met[4]>100", 22, 0., 220., true, "p_{T,2}", "pt2");
772 >    make_OFSF_plots("eta1", "met[4]>100", 10, -2.5, 2.5, false, "#eta_{1}", "eta1", 0.15);
773 >    make_OFSF_plots("eta2", "met[4]>100", 10, -2.5, 2.5, false, "#eta_{2}", "eta2", 0.15);
774 >    //  make_OFSF_plots("phi1", "met[4]>100", 10, -TMath::Pi(), TMath::Pi(), false, "#phi_{1}", "phi1", 0.2);
775 >    //  make_OFSF_plots("phi2", "met[4]>100", 10, -TMath::Pi(), TMath::Pi(), false, "#phi_{2}", "phi2", 0.2);
776 >    //  make_OFSF_plots("pfJetGoodPt[0]/pfJetGoodPt[1]", "met[4]>100", 20, 1, 10, true, "pt_{j}^{1}/pt_{j}^{2}", "jpt1pt2", 0.2);
777 >    make_OFSF_plots("TMath::Abs(pfJetDphiMet[0])", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(jet1,MET)|", "dphij1met", 0.2);
778 >    make_OFSF_plots("TMath::Abs(dphi)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,l2)|", "dphi", 0.2);
779 >    //  make_OFSF_plots("TMath::Abs(dphiMet1)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l1,MET)|", "dphiMet1", 0.2);
780 >    //  make_OFSF_plots("TMath::Abs(dphiMet2)", "met[4]>100", 16, 0, 3.2, false, "|#Delta#phi(l2,MET)|", "dphiMet2", 0.2);
781 >    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");
782 >    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");
783 >    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");
784 >    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");
785 >  }
786 >
787 >  if ( doDataComp && !PlottingSetup::openBox ) {
788 >    TCut mllCut("");
789 >    if ( !PlottingSetup::openBox ) mllCut = "mll>120";
790 >
791 >    TCut cutSignal = cutmass&&cutnJets&&"met[4]>100";
792 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut,           60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig");
793 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"id1==0", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_ee");
794 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"id1==1", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_mm");
795 >
796 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"pfJetGoodNumBtag30==0",           60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_btagVeto");
797 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"id1==0&&pfJetGoodNumBtag30==0", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_ee_btagVeto");
798 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"id1==1&&pfJetGoodNumBtag30==0", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_mm_btagVeto");
799 >
800 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"pfJetGoodNumBtag30>0",           60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_AtLeastOneBJet");
801 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"id1==0&&pfJetGoodNumBtag30>0", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_ee_AtLeastOneBJet");
802 >    make_data_comparison_plot("mll", cutOSSF&&cutSignal&&mllCut&&"id1==1&&pfJetGoodNumBtag30>0", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_sig_mm_AtLeastOneBJet");
803 >
804 >    make_data_comparison_plot("mll", cutOSOF&&cutSignal, 60, 20., 320.,-1., false, "m_{ll}", "mll_OF_sig");
805 >    make_data_comparison_plot("mll", cutmass&&"met[4]>100&&met[4]<150&&pfJetGoodNum40<3", 60, 20., 320.,-1., false, "m_{ll}", "mll_SF_CR");
806 >  }
807 >
808 >
809 >  if ( doKin ) {
810 >    string mllCut("");
811 >    if ( !PlottingSetup::openBox ) mllCut = "&&mll>120";
812 >
813 >    // Plots in signal region
814 >    make_kin_plot("met[4]","",70,0,350,dolog,"MET [GeV]","met",doPF,true);
815 >    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",doPF,true);
816 >    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",doPF,true,true);
817 >    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",doPF,true);
818 >    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",doPF,true);
819 >    
820 >    make_kin_plot("pfJetGoodNum40","met[4]>100"+mllCut,9,-0.5,8.5,dolog,"nJets","nJets",doPF);
821 >    make_kin_plot("pfJetGoodNum40","met[4]>100",9,-0.5,8.5,dolog,"nJets","nJets_osof",doPF);
822 >
823 >    // Further inclusive invariant mass plots
824 >    make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive",doPF,true);
825 >    make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_ee",doPF,true);
826 >    make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_mm",doPF,true);
827 >    make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_osof",doPF,true);
828 >    
829 >    //make_kin_plot("mll","",(int)((350-mll_low))/5,mll_low,350,dolog,"m_{ll} [GeV]","mll_inclusive_highrange",doPF);
830 >    //if(!doPF) make_special_mll_plot((int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]");
831 >    
832 >    //make_kin_plot("pfJetGoodPt[0]/pfJetGoodPt[1]","",45,1,10,dolog,"pt_{j}^{1}/pt_{j}^{2}","j1j2ratio",doPF,true);
833 >    //make_kin_plot("TMath::Abs(pfJetDphiMet[0])","",32,0,3.2,nolog,"|#Delta#phi(jet1,MET)|","dphiJ1MET",doPF,true);
834 >    
835 >    // Number of jets
836 >    make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_inclusive",doPF);
837 >    make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_osof_inclusive",doPF);
838 >    //make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_nocuts_except_mll_ossf",doPF);
839 >    
840 >    // Others
841 >    make_kin_plot("numVtx","",(int)(30.5-(-0.5)),-0.5,30.5,nolog,"N(Vtx)","numVtx",doPF);
842 >    //  make_kin_plot("jetpt[0]","",40,0,200,dolog,"leading jet p_{T} [GeV]","pfJetGoodPt_0",doPF);
843 >    //  make_kin_plot("jeteta[0]","",40,-5,5,nolog,"leading jet #eta","pfJetGoodEta_0",doPF);
844 >    make_kin_plot("pt","",50,0,500,dolog,"Z p_{T} [GeV]","Zpt",doPF);
845 >    make_kin_plot("pt1","",50,0,200,nolog,"p_{T} [GeV]","pt1",doPF);
846 >    make_kin_plot("pt2","",50,0,200,nolog,"p_{T} [GeV]","pt2",doPF);
847 >    make_kin_plot("eta1","",40,-3,3,nolog,"#eta_{l}","eta",doPF);
848 >    make_kin_plot("jzb[1]","",100,-150,200,dolog,"JZB [GeV]","jzb_ossf",doPF);
849 >    //   stringstream jzbcut;
850 >    //   jzbcut << "((is_data&&("<<datajzb<<")>100)||(!is_data&&("<<mcjzb<<")>100))";
851 >    //   make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB100",doPF,true);
852 >    //   make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB100",doPF,true);
853 >    //   make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB100",doPF,true);
854 >    //   make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB100",doPF,true);
855 >    //   stringstream jzbcut2;
856 >    //   jzbcut2 << "((is_data&&("<<datajzb<<")>150)||(!is_data&&("<<mcjzb<<")>150))";
857 >    //   make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB150",doPF,true);
858 >    //   make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB150",doPF,true);
859 >    //   make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB150",doPF,true);
860 >    //   make_kin_plot("mll",jzbcut2.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB150",doPF,true);
861 >    //   stringstream jzbcut3;
862 >    //   jzbcut3 << "((is_data&&("<<datajzb<<")>50)||(!is_data&&("<<mcjzb<<")>50))";
863 >    //   make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB50",doPF,true);  
864 >    //   make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB50",doPF,true,true);
865 >    //   make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB50",doPF,true);  
866 >    //   make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB50",doPF,true);  
867 >    
868 >    //   make_kin_plot("mll","met[4]>100",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV] (MET>100GeV)","mll_met100_ll",doPF,true);
869 >    //make_kin_plot("mll","met[4]>150&&id1==0",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ee} [GeV] (MET>150GeV)","mll_met150_ee",doPF,true);
870 >    //make_kin_plot("mll","met[4]>150&&id1==1",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{#mu#mu} [GeV] (MET>150GeV)","mll_met150_mm",doPF,true);
871 >  }
872 >    
873 > //   make_special_obs_pred_mll_plot(datajzb,mcjzb,0);
874 > //   make_special_obs_pred_mll_plot(datajzb,mcjzb,50);
875 > //   make_special_obs_pred_mll_plot(datajzb,mcjzb,80);
876 > //   make_special_obs_pred_mll_plot(datajzb,mcjzb,100);
877   //   make_special_obs_pred_mll_plot(datajzb,mcjzb,150);
878   //   make_special_obs_pred_mll_plot(datajzb,mcjzb,200);
879   //   make_special_obs_pred_mll_plot(datajzb,mcjzb,250);
880  
881 <  make_JES_plot(cutmass&&cutOSSF&&basiccut,"_ossf");
882 <  make_JES_plot(cutmass&&cutOSOF&&basiccut,"_osof");
756 <
757 <  string regioncut[4] =    {"mll>0&&","mll>20&&mll<70&&","mll>70&&mll<110&&","mll>110&&"};
758 <  string regionname[4] = {"global","lowmass","Zregion","highmass"};
759 <  bool StoreRatioPlots=false;
760 <  for(int iregion=0;iregion<4;iregion++) {
761 <    cout << regionname[iregion] << " : " << regioncut[iregion] << endl;
762 <
763 <    //Z properties
764 <    make_kin_plot("pt","met[4]>100&&id1==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutOSSF&&cutnJets),40,0,200,dolog,"p_{T}^{ee} [GeV] (MET>100GeV)","Z/ZPT_ee_met100_"+regionname[iregion],doPF,StoreRatioPlots);
765 <    make_kin_plot("pt","met[4]>100&&id1==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutOSSF&&cutnJets),40,0,200,dolog,"p_{T}^{#mu#mu} [GeV] (MET>100GeV)","Z/ZPT_mm_met100_"+regionname[iregion],doPF,StoreRatioPlots);
766 <    
767 <    make_kin_plot("phi","met[4]>100&&id1==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutOSSF&&cutnJets),32,-3.2,3.2,nolog,"#phi^{ee} (MET>100GeV)","Z/ZPhi_ee_met100_"+regionname[iregion],doPF,StoreRatioPlots);
768 <    make_kin_plot("phi","met[4]>100&&id1==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutOSSF&&cutnJets),32,-3.2,3.2,nolog,"#phi^{#mu#mu} (MET>100GeV)","Z/ZPhi_mm_met100_"+regionname[iregion],doPF,StoreRatioPlots);
769 <    
770 <    make_kin_plot("eta","met[4]>100&&id1==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutOSSF&&cutnJets),30,-3.0,3.0,nolog,"#eta^{ee} (MET>100GeV)","Z/ZEta_ee_met100_"+regionname[iregion],doPF,StoreRatioPlots);
771 <    make_kin_plot("eta","met[4]>100&&id1==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutOSSF&&cutnJets),30,-3.0,3.0,nolog,"#eta^{#mu#mu} (MET>100GeV)","Z/ZEta_mm_met100_"+regionname[iregion],doPF,StoreRatioPlots);
772 <    
773 <    // lepton properties
774 <    make_kin_plot("pt1","met[4]>100&&id1==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),40,0,200,dolog,"p_{T}^{e1} [GeV] (MET>100GeV)","Lepton/LeadingElectronPt_met100_"+regionname[iregion],doPF,StoreRatioPlots);
775 <    make_kin_plot("pt1","met[4]>100&&id1==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),40,0,200,dolog,"p_{T}^{#mu1} [GeV] (MET>100GeV)","Lepton/LeadingMuonPt_met100_"+regionname[iregion],doPF,StoreRatioPlots);
776 <    make_kin_plot("pt2","met[4]>100&&id2==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),40,0,200,dolog,"p_{T}^{e2} [GeV] (MET>100GeV)","Lepton/SubLeadingElectronPt_met100_"+regionname[iregion],doPF,StoreRatioPlots);
777 <    make_kin_plot("pt2","met[4]>100&&id2==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),40,0,200,dolog,"p_{T}^{#mu2} [GeV] (MET>100GeV)","Lepton/SubLeadingMuonPt_met100_"+regionname[iregion],doPF,StoreRatioPlots);
778 <    
779 <    make_kin_plot("phi1","met[4]>100&&id1==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),32,-3.2,3.2,nolog,"#phi^{e1} (MET>100GeV)","Lepton/LeadingElectronPhi_met100_"+regionname[iregion],doPF,StoreRatioPlots);
780 <    make_kin_plot("phi1","met[4]>100&&id1==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),32,-3.2,3.2,nolog,"#phi^{#mu1} (MET>100GeV)","Lepton/LeadingMuonPhi_met100_"+regionname[iregion],doPF,StoreRatioPlots);
781 <    make_kin_plot("phi2","met[4]>100&&id2==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),32,-3.2,3.2,nolog,"#phi^{e2} (MET>100GeV)","Lepton/SubLeadingElectronPhi_met100_"+regionname[iregion],doPF,StoreRatioPlots);
782 <    make_kin_plot("phi2","met[4]>100&&id2==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),32,-3.2,3.2,nolog,"#phi^{#mu2} (MET>100GeV)","Lepton/SubLeadingMuonPhi_met100_"+regionname[iregion],doPF,StoreRatioPlots);
783 <    
784 <    make_kin_plot("eta1","met[4]>100&&id1==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),30,-3.0,3.0,nolog,"#eta^{e1} (MET>100GeV)","Lepton/LeadingElectronEta_met100_"+regionname[iregion],doPF,StoreRatioPlots);
785 <    make_kin_plot("eta1","met[4]>100&&id1==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),30,-3.0,3.0,nolog,"#eta^{#mu1} (MET>100GeV)","Lepton/LeadingMuonEta_met100_"+regionname[iregion],doPF,StoreRatioPlots);
786 <    make_kin_plot("eta2","met[4]>100&&id2==0&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),30,-3.0,3.0,nolog,"#eta^{e2} (MET>100GeV)","Lepton/SubLeadingElectronEta_met100_"+regionname[iregion],doPF,StoreRatioPlots);
787 <    make_kin_plot("eta2","met[4]>100&&id2==1&&"+regioncut[iregion]+(const char*)TCut(cutmass&&cutnJets),30,-3.0,3.0,nolog,"#eta^{#mu2} (MET>100GeV)","Lepton/SubLeadingMuonEta_met100_"+regionname[iregion],doPF,StoreRatioPlots);
788 <    
789 <    
790 <  }
881 > //   make_JES_plot(cutmass&&cutOSSF&&basiccut,"_ossf");
882 > //   make_JES_plot(cutmass&&cutOSOF&&basiccut,"_osof");
883  
884   }
885  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines