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.78 by buchmann, Wed Jan 9 09:27:00 2013 UTC vs.
Revision 1.79 by buchmann, Wed Jan 23 16:50:48 2013 UTC

# Line 437 | Line 437 | float make_one_OFSF_plot(string variable
437    mleg->Draw();
438    DrawPrelim();
439    if (datahistoOF->Integral()>0) {
440 <    save_with_ratio( datahistoSF, datahistoOF, rcan, "SFOF/" + filename, false, false, "SF/OF" );
440 >    Save_With_Ratio( datahistoSF, datahistoOF, rcan, "SFOF/" + filename, false, false, "SF/OF" );
441    } else {
442      CompleteSave(rcan, "SFOF/" + filename);
443      delete rcan;
# Line 448 | Line 448 | float make_one_OFSF_plot(string variable
448    //signalhisto->Delete();
449    delete mleg;
450    delete ckin;
451 +  delete rcan;
452  
453    return ymaxSet;
454  
# Line 500 | Line 501 | float make_data_comparison_plot(string v
501    data2->Draw("HIST,SAMES");
502    mleg->Draw();
503    DrawPrelim();
504 <  save_with_ratio( data1, data2, rcan, "compareData/" + filename, false, false, "new/old" );
504 >  Save_With_Ratio( data1, data2, rcan, "compareData/" + filename, false, false, "new/old" );
505  
506    data1->Delete();
507    data2->Delete();
508    delete mleg;
509 +  delete rcan;
510    delete ckin;
511  
512   }
# Line 810 | Line 812 | void make_kin_plot(string variable, stri
812          DrawPrelim();
813          string saveas="kin/"+filename;
814          if(isPF) saveas="kin/"+filename+"__PF";
815 <        save_with_ratio(datahisto,mcstack,kinpad->cd(),saveas);
815 >        Save_With_Ratio(datahisto,mcstack,kinpad->cd(),saveas);
816   //      if(isPF) CompleteSave(with_ratio,"kin/"+filename+"__PF_withratio");
817   //      else CompleteSave(with_ratio,"kin/"+filename+"_withratio");
818   //      delete with_ratio;
# Line 873 | Line 875 | void make_plain_kin_plot(string variable
875          DrawPrelim();
876          string saveas="kin/"+filename;
877          if(isPF) saveas="kin/"+filename+"__PF";
878 <        save_with_ratio(datahisto,mcstack,kinpad->cd(),saveas);
878 >        Save_With_Ratio(datahisto,mcstack,kinpad->cd(),saveas);
879    } else {
880          if(isPF) CompleteSave(ckin,"kin/"+filename+"__PF");
881          else CompleteSave(ckin,"kin/"+filename);
# Line 965 | Line 967 | void MakeElegantTwoThreeComparisons() {
967      leg_SFOF_Two->AddEntry(TwoOF,"OF, nJets==2","l");
968      leg_SFOF_Two->AddEntry(TwoSF,"SF, nJets==2","lp");
969      leg_SFOF_Two->Draw();
970 <    save_with_ratio(TwoSF,TwoOF,kin3->cd(),"DoubleRatios/SFOF_Two");
970 >    Save_With_Ratio(TwoSF,TwoOF,kin3->cd(),"DoubleRatios/SFOF_Two");
971      
972      TPad *kin4 = new TPad("kin4","kin4",0,0,1,1);
973      kin4->cd();
# Line 976 | Line 978 | void MakeElegantTwoThreeComparisons() {
978      leg_SFOF_Three->AddEntry(TwoOF,"OF, nJet#geq3","l");
979      leg_SFOF_Three->AddEntry(TwoSF,"SF, nJets#geq3","lp");
980      leg_SFOF_Three->Draw();
981 <    save_with_ratio(ThreeSF,ThreeOF,kin4->cd(),"DoubleRatios/SFOF_Three");
981 >    Save_With_Ratio(ThreeSF,ThreeOF,kin4->cd(),"DoubleRatios/SFOF_Three");
982      
983      
984      TwoSF->Scale(ThreeSF->Integral()/TwoSF->Integral());
# Line 989 | Line 991 | void MakeElegantTwoThreeComparisons() {
991      leg_SF_Two_Three->AddEntry(TwoSF,"#splitline{SF, nJets==2}{ (scaled)}","l");
992      leg_SF_Two_Three->AddEntry(ThreeSF,"SF, nJets#geq3","lp");
993      leg_SF_Two_Three->Draw();
994 <    save_with_ratio(TwoSF,ThreeSF,kin->cd(),"DoubleRatios/SF_Two_Three");
994 >    Save_With_Ratio(TwoSF,ThreeSF,kin->cd(),"DoubleRatios/SF_Two_Three");
995      
996      TwoOF->Scale(ThreeOF->Integral()/TwoOF->Integral());
997      TPad *kin2 = new TPad("kin2","kin2",0,0,1,1);
# Line 1001 | Line 1003 | void MakeElegantTwoThreeComparisons() {
1003      leg_OF_Two_Three->AddEntry(TwoSF,"#splitline{OF, nJets==2}{ (scaled)}","l");
1004      leg_OF_Two_Three->AddEntry(ThreeSF,"OF, nJets#geq3","lp");
1005      leg_OF_Two_Three->Draw();
1006 <    save_with_ratio(TwoOF,ThreeOF,kin2->cd(),"DoubleRatios/OF_Two_Three");
1006 >    Save_With_Ratio(TwoOF,ThreeOF,kin2->cd(),"DoubleRatios/OF_Two_Three");
1007      
1008   }
1009  
# Line 1120 | Line 1122 | void make_ttbar_comparison(string datava
1122    string saveas="kin/"+filename;
1123    
1124    cout << "Passing filename to be saved : " << filename << " as " << saveas << endl;
1125 <  save_with_ratio( datahisto, CollapseStack(mcstack), kinpad->cd(), saveas, false, false, "data/mc");
1125 >  Save_With_Ratio( datahisto, CollapseStack(mcstack), kinpad->cd(), saveas, false, false, "data/mc");
1126 >  delete kinpad;
1127    
1128    ckin->cd();
1129    TCentral->SetLineColor(kBlack);
# Line 1244 | Line 1247 | void make_ttbar_comparison(string variab
1247    make_ttbar_comparison(variable, variable, nbins, min, max, addcut, dolog, xlabel, filename);
1248   }
1249  
1250 + void ProduceJanPlots() {
1251 +  TCanvas *c1 = new TCanvas("c1","c1");
1252 +  TH1F *metSF = allsamples.Draw("metSF","met[4]",30,100,400, "E_{T}^{miss} [GeV]", "events", cutmass&&cutOSSF&&cutnJets,data, luminosity);
1253 +  TH1F *metOF = allsamples.Draw("metOF","met[4]",30,100,400, "E_{T}^{miss} [GeV]", "events", cutmass&&cutOSOF&&cutnJets,data, luminosity);
1254 +  
1255 +  TPad* rcan = new TPad("rcan","rcan",0,0,1,1);
1256 +  rcan->cd();
1257 +
1258 +  metOF->SetLineColor(kRed);
1259 +  metSF->Draw("e1");
1260 +  metOF->Draw("histo,same");
1261 +  metSF->Draw("e1,same");
1262 +  
1263 +  TLegend *leg = make_legend();
1264 +  
1265 +  leg->AddEntry(metSF,"Data SF","p");
1266 +  leg->AddEntry(metOF,"Data OF","l");
1267 +  leg->Draw();
1268 +  
1269 +  DrawPrelim();
1270 +  
1271 +  Save_With_Ratio(metSF,metOF,rcan,"JanPlots/ETHConfig",false,false,"SF/OF");
1272 +  
1273 +  delete rcan;
1274 +  delete metSF;
1275 +  delete metOF;
1276 +  delete c1;
1277 + }
1278 +
1279 + THStack MakeOneSystematicsPlot(TCut cut, string saveas, string variation, TH1F *hdata, string variable, int nbins, float bmin, float bmax, string label) {
1280 +  THStack SystPlot = allsamples.DrawStack(variation,variable,nbins,bmin,bmax,label,"events",cut,mc,PlottingSetup::luminosity);
1281 +  
1282 +  //now need to process the plot (calculate the variation and set the member of thstack accordingly!)
1283 +  if(variation!="Central") {
1284 +    TH1F *varttbar;
1285 +    if(variation=="MatchingUp") varttbar = systsamples.Draw("varttbar",variable,nbins,bmin,bmax,label,"events",cut,mc,PlottingSetup::luminosity,systsamples.FindSample("TTJets_matchingup_TuneZ2s"));
1286 +    if(variation=="MatchingDown") varttbar = systsamples.Draw("varttbar",variable,nbins,bmin,bmax,label,"events",cut,mc,PlottingSetup::luminosity,systsamples.FindSample("TTJets_matchingdown"));
1287 +    if(variation=="ScaleUp") varttbar = systsamples.Draw("varttbar",variable,nbins,bmin,bmax,label,"events",cut,mc,PlottingSetup::luminosity,systsamples.FindSample("TTJets_scaleup"));
1288 +    if(variation=="ScaleDown") varttbar = systsamples.Draw("varttbar",variable,nbins,bmin,bmax,label,"events",cut,mc,PlottingSetup::luminosity,systsamples.FindSample("TTJets_scaledown"));
1289 +    assert(varttbar);
1290 +    
1291 +    TIter nextHisto(SystPlot.GetHists());
1292 +    TH1F* h;
1293 +    while ( h = (TH1F*)nextHisto() ) {
1294 +      if(Contains(h->GetName(),"t_bar_t")) {
1295 +        varttbar->Scale(h->Integral()/varttbar->Integral());
1296 +        for(int i=0;i<=h->GetNbinsX()+1;i++) {//note that we deliberatly consider the under/overflow bin as well!
1297 +          h->SetBinContent(i,varttbar->GetBinContent(i));
1298 +          h->SetBinError(i,varttbar->GetBinError(i));
1299 +        }
1300 +        SystPlot.Modified();
1301 +      }
1302 +    }
1303 +    delete varttbar;
1304 +  }
1305 +  
1306 +  TLegend *fullleg = allsamples.allbglegend();
1307 +  fullleg->SetHeader(variation.c_str());
1308 +  TPad *kinpad = new TPad("kinpad","kinpad",0,0,1,1);
1309 +  kinpad->SetLogy(1);
1310 +  kinpad->cd();
1311 +  
1312 +  hdata->Draw("e1");
1313 +  SystPlot.Draw("histo,same");
1314 +  hdata->Draw("e1,same");
1315 +  fullleg->Draw();
1316 +  DrawPrelim();
1317 +  
1318 +  Save_With_Ratio(hdata,SystPlot,kinpad,saveas+"_"+variation);
1319 +  CleanLegends();
1320 +  
1321 +  delete kinpad;
1322 +  return SystPlot;
1323 + }
1324 +  
1325 +
1326 +
1327 + void ProduceMCSystematicPlot(string variable, int nbins, float bmin, float bmax, string label, TCut thiscut, string saveas) {
1328 +  TCanvas *ca = new TCanvas("ca","ca");
1329 +
1330 +  TH1F *hdata = allsamples.Draw("hdata",variable,nbins,bmin,bmax,label,"events",thiscut,data,luminosity);
1331 +  
1332 +  THStack ScaleUp      = MakeOneSystematicsPlot(thiscut,saveas,"ScaleUp",hdata,variable, nbins, bmin, bmax, label);
1333 +  THStack ScaleDown    = MakeOneSystematicsPlot(thiscut,saveas,"ScaleDown",hdata,variable, nbins, bmin, bmax, label);
1334 +  THStack MatchingUp   = MakeOneSystematicsPlot(thiscut,saveas,"MatchingUp",hdata,variable, nbins, bmin, bmax, label);
1335 +  THStack MatchingDown = MakeOneSystematicsPlot(thiscut,saveas,"MatchingDown",hdata,variable, nbins, bmin, bmax, label);
1336 +  
1337 +  TH1F *HScaleUp = CollapseStack(ScaleUp);
1338 +  TH1F *HScaleDown = CollapseStack(ScaleDown);
1339 +  TH1F *HMatchingUp = CollapseStack(MatchingUp);
1340 +  TH1F *HMatchingDown = CollapseStack(MatchingDown);
1341 +  
1342 +  DeleteStack(ScaleUp);
1343 +  DeleteStack(ScaleDown);
1344 +  DeleteStack(MatchingUp);
1345 +  DeleteStack(MatchingDown);
1346 +  
1347 +  THStack Central = MakeOneSystematicsPlot(thiscut,saveas,"Central",hdata,variable, nbins, bmin, bmax, label);
1348 +  TH1F *HCentral = CollapseStack(Central);
1349 +  
1350 +  TH1F *Systematic = (TH1F*)hdata->Clone("Systematic");
1351 +  for(int i=1;i<=Systematic->GetNbinsX();i++) {
1352 +    float matchingup   = abs(HMatchingUp->GetBinContent(i)-HCentral->GetBinContent(i));
1353 +    float matchingdown = abs(HMatchingDown->GetBinContent(i)-HCentral->GetBinContent(i));
1354 +    float scaleup   = abs(HScaleUp->GetBinContent(i)-HCentral->GetBinContent(i));
1355 +    float scaledown = abs(HScaleDown->GetBinContent(i)-HCentral->GetBinContent(i));
1356 +    
1357 +    float matching = matchingup>matchingdown?matchingup:matchingdown;
1358 +    float scale    = scaleup>scaledown?scaleup:scaledown;
1359 +    
1360 +    float sys=sqrt(matching*matching+scale*scale);
1361 +    sys/=HCentral->GetBinContent(i);
1362 +    if(HCentral->GetBinContent(i)==0) sys=0;
1363 +    Systematic->SetBinContent(i,sys);
1364 +  }
1365 +  
1366 +  TPad *kinpad = new TPad("kinpad","kinpad",0,0,1,1);
1367 +  kinpad->SetLogy(1);
1368 +  kinpad->cd();
1369 +  hdata->Draw("e1");
1370 +  Central.Draw("histo,same");
1371 +  hdata->Draw("e1,same");
1372 +  DrawPrelim();
1373 +
1374 +  save_with_ratio_and_sys_band( hdata, HCentral, kinpad->cd(), saveas, false, false, "data/mc",Systematic );
1375 +  
1376 +  CleanLegends();
1377 +  DeleteStack(Central);
1378 +  delete Systematic;
1379 +  delete HScaleUp;
1380 +  delete HScaleDown;
1381 +  delete HMatchingUp;
1382 +  delete HMatchingDown;
1383 +  delete hdata;
1384 +  delete HCentral;
1385 +  delete ca;
1386 + }
1387 +
1388 + void ProduceMCSystematicPlots() {
1389 +  TCut cutweightBKP = cutWeight;
1390 +  
1391 +  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_SameFlavor");
1392 +  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_OppositeFlavor");
1393 +  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/ETH_SameFlavor");
1394 +  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/ETH_OppositeFlavor");
1395 +  
1396 +  TCut cutnJetsBKP = cutnJets;
1397 +  cutnJets = TCut((ReplaceAll((const char*)cutnJets,"pt2>20","pt2>10")).c_str());
1398 +  cutnJets = TCut((ReplaceAll((const char*)cutnJets,"pfJetGoodNum40>=3","pfJetGoodNum40>=2")).c_str());
1399 +  cutnJets = TCut((ReplaceAll((const char*)cutnJets,"abs(eta2)<1.4","abs(eta2)<2.4")).c_str());
1400 +  cutnJets = TCut((ReplaceAll((const char*)cutnJets,"abs(eta1)<1.4","abs(eta1)<2.4")).c_str());
1401 +  
1402 +  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor");
1403 +  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor");
1404 +  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>150"),"MCSystPlots/NJets/Aachen_SameFlavor");
1405 +  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>150"),"MCSystPlots/NJets/Aachen_OppositeFlavor");
1406 +  cutnJets  = cutnJetsBKP;
1407 +  cutWeight = cutweightBKP;
1408 + }
1409 +
1410   void do_kinematic_plots(string mcjzb, string datajzb, bool doPF=false)
1411   {
1412   //  switch_overunderflow(true);
# Line 1266 | Line 1429 | void do_kinematic_plots(string mcjzb, st
1429    
1430    if(MakeTwoThreeJetComparison) MakeElegantTwoThreeComparisons();
1431  
1432 +  //ProduceJanPlots();
1433 +  ProduceMCSystematicPlots();
1434 +  make_plain_kin_plot("pt",Cut2Str(cutOSSF&&TCut("mll>20&&pfJetGoodNumBtag30>=2")),40,0,200,nolog,"Z p_{T}","PlotForKostas",doPF,true);
1435 +  
1436    if ( doOFSF ) {
1437       make_OFSF_plots("mll", "met[4]>100", 60, 20., 320., false, "m_{ll}", "mll");
1438  
# Line 2171 | Line 2338 | void do_prediction_plot(string jzb, TCan
2338   //    speciallegBpred->AddEntry(lm4RcorrJZBeemmC,"LM4","l");
2339   //     speciallegBpred->AddEntry(lm4RcorrJZBeemm,"LM4","l");
2340      speciallegBpred->Draw();
2341 <    save_with_ratio(JRcorrJZBeemm,JBpred,predcomppad,subdir+"Bpred_Data_____PredictionComposition",true,true,"data/pred",BpredSys);
2341 >    Save_With_Ratio(JRcorrJZBeemm,JBpred,predcomppad,subdir+"Bpred_Data_____PredictionComposition",true,true,"data/pred",BpredSys);
2342 >    delete predcomppad;
2343      
2344      TCanvas *specialcanv = new TCanvas("specialcanv","specialcanv");
2345      specialcanv->SetLogy(1);
# Line 2254 | Line 2422 | void do_prediction_plot(string jzb, TCan
2422    string ytitle("ratio");
2423    if ( use_data==1 ) ytitle = "data/pred";
2424    //save_with_ratio(JRcorrJZBeemm,JBpred,kinpad,Bpredsaveas,true,use_data!=1,ytitle);
2425 <  save_with_ratio(JRcorrJZBeemm,JBpred,kinpad,subdir+Bpredsaveas,true,false,ytitle,BpredSys);//not extending the y range anymore up to 4
2425 >  Save_With_Ratio(JRcorrJZBeemm,JBpred,kinpad,subdir+Bpredsaveas,true,false,ytitle,BpredSys);//not extending the y range anymore up to 4
2426 >  
2427 >  delete kinpad;
2428  
2429  
2430    
# Line 2451 | Line 2621 | void lepton_comparison_plots() {
2621    eemmlegend->AddEntry(jmmd,"#mu#mu","l");
2622    eemmlegend->Draw();
2623    DrawPrelim();
2624 <  save_with_ratio(jeed,jmmd,eemmpad->cd(),"lepton_comparison/jzb_Comparing_ee_mm_data");
2624 >  Save_With_Ratio(jeed,jmmd,eemmpad->cd(),"lepton_comparison/jzb_Comparing_ee_mm_data");
2625    
2626    TH1F *zjeed = allsamples.Draw("zjeed",jzbvariablemc,    int((jzbHigh+150)/5),-150,jzbHigh , "JZB [GeV]", "events", cutmass&&cutOSSF&&cutnJets&&"(id1==0)",mc,  luminosity,allsamples.FindSample("/DY"));
2627    TH1F *zjmmd = allsamples.Draw("zjmmd",jzbvariablemc,    int((jzbHigh+150)/5),-150,jzbHigh , "JZB [GeV]", "events", cutmass&&cutOSSF&&cutnJets&&"(id1==1)",mc,  luminosity,allsamples.FindSample("/DY"));
# Line 2574 | Line 2744 | void draw_pure_jzb_histo(TCut cut,string
2744    TText *writeline1 = write_cut_on_canvas(write_cut.c_str());
2745    writeline1->SetTextSize(0.035);
2746    writeline1->Draw();
2747 <  if(!Contains(savename,"Dibosons")) save_with_ratio(datahisto,mcstack,jzbpad->cd(),("jzb/"+savename));
2748 <  else save_with_ratio(datahisto,mcstack,jzbpad->cd(),savename);
2747 >  if(!Contains(savename,"Dibosons")) Save_With_Ratio(datahisto,mcstack,jzbpad->cd(),("jzb/"+savename));
2748 >  else Save_With_Ratio(datahisto,mcstack,jzbpad->cd(),savename);
2749    TPad *jzbpad2 = new TPad("jzbpad2","jzbpad2",0,0,1,1);
2750    jzbpad2->cd();
2751    jzbpad2->SetLogy(1);
# Line 2590 | Line 2760 | void draw_pure_jzb_histo(TCut cut,string
2760    writeline1->SetTextSize(0.035);
2761    writeline1->Draw();
2762    DrawPrelim();
2763 <  if(!Contains(savename,"Dibosons")) save_with_ratio(datahisto,mcstack,jzbpad2->cd(),("jzb/PositiveSideOnly/"+savename+""));
2764 <  else save_with_ratio(datahisto,mcstack,jzbpad2->cd(),(savename+"__PosOnly"));
2763 >  if(!Contains(savename,"Dibosons")) Save_With_Ratio(datahisto,mcstack,jzbpad2->cd(),("jzb/PositiveSideOnly/"+savename+""));
2764 >  else Save_With_Ratio(datahisto,mcstack,jzbpad2->cd(),(savename+"__PosOnly"));
2765    datahisto->Delete();
2766    mcstack.Delete();
2767   }
# Line 2699 | Line 2869 | void draw_normalized_data_vs_data_histo(
2869    leg->AddEntry(datahisto2,legentry2.c_str());
2870    leg->Draw();
2871    
2872 <  save_with_ratio(datahisto1,datahisto2,jzbpad->cd(),("jzb/"+savename));
2872 >  Save_With_Ratio(datahisto1,datahisto2,jzbpad->cd(),("jzb/"+savename));
2873    
2874    datahisto1->Delete();
2875    datahisto2->Delete();
# Line 3888 | Line 4058 | void make_table(samplecollection &coll,
4058   }
4059  
4060   void met_jzb_cut(string datajzb, string mcjzb, vector<float> jzb_cut) {
4061 +  cout << "You probably don't want --met, you want --metplots ... " << endl;
4062 +  assert(0);
4063    /*we want a table like this:
4064      __________________     50   |   100  | ...
4065      | Data prediction |  a vs b | a vs b | ...
# Line 4121 | Line 4293 | void qcd_plots(string datajzb, string mc
4293    //3rd last argument: do special bpred ratio, 2nd last argument: extended range!, last: y-axis title
4294    string ytitle("ratio");
4295    if ( use_data==1 ) ytitle = "data/pred";
4296 <  save_with_ratio(JRcorrJZBeemm,JBpred,kinpad,"QCD/Bpred",true,false,ytitle);
4296 >  Save_With_Ratio(JRcorrJZBeemm,JBpred,kinpad,"QCD/Bpred",true,false,ytitle);
4297 >  delete kinpad;
4298    
4299    TH1F *allevents = qcdsamples.Draw("allevents","pfJetGoodNum",1,0,100, "internal code", "events", "" ,mc, luminosity);
4300    TH1F *ossf = qcdsamples.Draw("ossf","pfJetGoodNum",1,0,100, "internal code", "events", cutOSSF ,mc, luminosity);
# Line 4358 | Line 4531 | void met_vs_jzb_plots(string datajzb, st
4531    lg->SetHeader("DY");
4532    
4533    lg->Draw();
4534 <  save_with_ratio(metright,metleft,metpad->cd(),"METvsJZBplots/ComparingLeftToRightinMETspectrum");
4534 >  Save_With_Ratio(metright,metleft,metpad->cd(),"METvsJZBplots/ComparingLeftToRightinMETspectrum");
4535    
4536    TPad *metpad3 = new TPad("metpad3","metpad3",0,0,1,1);
4537    metpad3->cd();
# Line 4376 | Line 4549 | void met_vs_jzb_plots(string datajzb, st
4549  
4550    lg2->Draw();
4551    
4552 <  save_with_ratio(obs,Bpred,metpad3->cd(),"METvsJZBplots/ComparingPredObsinMET");
4552 >  Save_With_Ratio(obs,Bpred,metpad3->cd(),"METvsJZBplots/ComparingPredObsinMET");
4553    
4554    TPad *metpad2 = new TPad("metpad2","metpad2",0,0,1,1);
4555    metpad2->cd();
# Line 4395 | Line 4568 | void met_vs_jzb_plots(string datajzb, st
4568    metlefta->Draw("histo");
4569    metrighta->Draw("same");
4570    lg->Draw();
4571 <  save_with_ratio(metrighta,metlefta,metpad2->cd(),"METvsJZBplots/ComparingLeftToRightinMET_type1_spectrum");
4571 >  Save_With_Ratio(metrighta,metlefta,metpad2->cd(),"METvsJZBplots/ComparingLeftToRightinMET_type1_spectrum");
4572    
4573    delete Bpred;
4574    delete obs;
# Line 4422 | Line 4595 | void met_vs_jzb_plots(string datajzb, st
4595    aobs->Draw("same");
4596    lg->SetHeader("All MC");
4597    lg->Draw();
4598 <  save_with_ratio(aobs,aBpred,metpad4->cd(),"METvsJZBplots/ComparingPredObsinMET_ALLSAMPLES");
4598 >  Save_With_Ratio(aobs,aBpred,metpad4->cd(),"METvsJZBplots/ComparingPredObsinMET_ALLSAMPLES");
4599    
4600    
4601    delete lg;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines