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.80 by buchmann, Thu Jan 24 08:16:17 2013 UTC vs.
Revision 1.83 by buchmann, Mon Feb 11 13:32:18 2013 UTC

# Line 384 | Line 384 | float make_one_OFSF_plot(string variable
384  
385    cutOF = cutOSOF&&cutnJets&&ibasiccut;
386    cutSF = cutOSSF&&cutnJets&&ibasiccut;
387 +  
388 +  TCanvas *ofsf_can = new TCanvas("ofsf_can","ofsf_can");
389  
390    TPad* rcan = new TPad("rcan","rcan",0,0,1,1);
391    rcan->SetLogy(logscale);
# Line 409 | Line 411 | float make_one_OFSF_plot(string variable
411    }
412    if (ymax<0) {
413      if ( logscale ) datahistoSF->SetMaximum(5.3*datahistoSF->GetMaximum());
414 <    else datahistoSF->SetMaximum(1.8*datahistoSF->GetMaximum());
414 >    else datahistoSF->SetMaximum(0.8*datahistoSF->GetMaximum());
415    } else {
416      datahistoSF->SetMaximum(ymax);
417    }
# Line 446 | Line 448 | float make_one_OFSF_plot(string variable
448    //signalhisto->Delete();
449    delete mleg;
450    delete rcan;
451 +  delete ofsf_can;
452  
453    return ymaxSet;
454  
# Line 1273 | Line 1276 | void ProduceJanPlots() {
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) {
1279 > THStack MakeOneSystematicsPlot(TCut cut, string saveas, string variation, TH1F *hdata, string variable, int nbins, float bmin, float bmax, string label, TH1F* &thisto) {
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!)
# Line 1294 | Line 1297 | THStack MakeOneSystematicsPlot(TCut cut,
1297            h->SetBinContent(i,varttbar->GetBinContent(i));
1298            h->SetBinError(i,varttbar->GetBinError(i));
1299          }
1300 +        thisto=(TH1F*)varttbar->Clone(variation.c_str());
1301          SystPlot.Modified();
1302        }
1303      }
1304      delete varttbar;
1305 +  } else {
1306 +    TIter nextHisto(SystPlot.GetHists());
1307 +    TH1F* h;
1308 +    while ( h = (TH1F*)nextHisto() ) {
1309 +      if(Contains(h->GetName(),"t_bar_t")) thisto=(TH1F*)h->Clone(variation.c_str());
1310 +    }
1311    }
1312 +    
1313    
1314    TLegend *fullleg = allsamples.allbglegend();
1315    fullleg->SetHeader(variation.c_str());
# Line 1323 | Line 1334 | THStack MakeOneSystematicsPlot(TCut cut,
1334  
1335   void ProduceMCSystematicPlot(string variable, int nbins, float bmin, float bmax, string label, TCut thiscut, string saveas) {
1336    TCanvas *ca = new TCanvas("ca","ca");
1326
1337    TH1F *hdata = allsamples.Draw("hdata",variable,nbins,bmin,bmax,label,"events",thiscut,data,luminosity);
1338    
1339 <  THStack ScaleUp      = MakeOneSystematicsPlot(thiscut,saveas,"ScaleUp",hdata,variable, nbins, bmin, bmax, label);
1340 <  THStack ScaleDown    = MakeOneSystematicsPlot(thiscut,saveas,"ScaleDown",hdata,variable, nbins, bmin, bmax, label);
1341 <  THStack MatchingUp   = MakeOneSystematicsPlot(thiscut,saveas,"MatchingUp",hdata,variable, nbins, bmin, bmax, label);
1342 <  THStack MatchingDown = MakeOneSystematicsPlot(thiscut,saveas,"MatchingDown",hdata,variable, nbins, bmin, bmax, label);
1339 >  TH1F *tScaleUp,*tScaleDown,*tMatchingUp,*tMatchingDown,*tCentral;
1340 >  
1341 >  THStack ScaleUp      = MakeOneSystematicsPlot(thiscut,saveas,"ScaleUp",hdata,variable, nbins, bmin, bmax, label,tScaleUp);
1342 >  THStack ScaleDown    = MakeOneSystematicsPlot(thiscut,saveas,"ScaleDown",hdata,variable, nbins, bmin, bmax, label,tScaleDown);
1343 >  THStack MatchingUp   = MakeOneSystematicsPlot(thiscut,saveas,"MatchingUp",hdata,variable, nbins, bmin, bmax, label,tMatchingUp);
1344 >  THStack MatchingDown = MakeOneSystematicsPlot(thiscut,saveas,"MatchingDown",hdata,variable, nbins, bmin, bmax, label,tMatchingDown);
1345    
1346    TH1F *HScaleUp = CollapseStack(ScaleUp);
1347    TH1F *HScaleDown = CollapseStack(ScaleDown);
1348    TH1F *HMatchingUp = CollapseStack(MatchingUp);
1349    TH1F *HMatchingDown = CollapseStack(MatchingDown);
1350    
1351 <  DeleteStack(ScaleUp);
1340 <  DeleteStack(ScaleDown);
1341 <  DeleteStack(MatchingUp);
1342 <  DeleteStack(MatchingDown);
1343 <  
1344 <  THStack Central = MakeOneSystematicsPlot(thiscut,saveas,"Central",hdata,variable, nbins, bmin, bmax, label);
1351 >  THStack Central = MakeOneSystematicsPlot(thiscut,saveas,"Central",hdata,variable, nbins, bmin, bmax, label,tCentral);
1352    TH1F *HCentral = CollapseStack(Central);
1353    
1354    TH1F *Systematic = (TH1F*)hdata->Clone("Systematic");
# Line 1363 | Line 1370 | void ProduceMCSystematicPlot(string vari
1370    TPad *kinpad = new TPad("kinpad","kinpad",0,0,1,1);
1371    kinpad->SetLogy(1);
1372    kinpad->cd();
1373 <  hdata->Draw("e1");
1374 <  Central.Draw("histo,same");
1375 <  hdata->Draw("e1,same");
1373 >  if(variable=="genMET") {
1374 >    Central.Draw("histo");
1375 >  } else {
1376 >    hdata->Draw("e1");
1377 >    Central.Draw("histo,same");
1378 >    hdata->Draw("e1,same");
1379 >  }
1380 >  
1381    DrawPrelim();
1382 <
1382 >  
1383    save_with_ratio_and_sys_band( hdata, HCentral, kinpad->cd(), saveas, false, false, "data/mc",Systematic );
1384    
1385 +  kinpad->cd();
1386 +  tCentral->SetFillColor(kWhite);
1387 +  tCentral->SetLineColor(kBlack);
1388 +  tScaleUp->SetLineColor(kRed);
1389 +  tScaleDown->SetLineColor(kRed);
1390 +  tMatchingUp->SetLineColor(kBlue);
1391 +  tMatchingDown->SetLineColor(kBlue);
1392 +  tScaleUp->SetLineStyle(2);
1393 +  tScaleDown->SetLineStyle(3);
1394 +  tMatchingUp->SetLineStyle(2);
1395 +  tMatchingDown->SetLineStyle(3);
1396 +  
1397 +  TLegend *leg2 = make_legend();
1398 +  leg2->AddEntry(hdata,"Data","p");
1399 +  leg2->AddEntry(tCentral,"Central (ttbar)","l");
1400 +  leg2->AddEntry(tScaleUp,"ScaleUp (ttbar)","l");
1401 +  leg2->AddEntry(tScaleDown,"ScaleDown (ttbar)","l");
1402 +  leg2->AddEntry(tMatchingUp,"MatchingUp (ttbar)","l");
1403 +  leg2->AddEntry(tMatchingDown,"MatchingDown (ttbar)","l");
1404 +  if(variable=="genMET") {
1405 +    Central.Draw("histo");
1406 +  }else {
1407 +    hdata->Draw("e1");
1408 +    Central.Draw("histo,same");
1409 +    hdata->Draw("e1,same");
1410 +  }
1411 +  tCentral->Draw("histo,same");
1412 +  tScaleUp->Draw("histo,same");
1413 +  tScaleDown->Draw("histo,same");
1414 +  tMatchingUp->Draw("histo,same");
1415 +  tMatchingDown->Draw("histo,same");
1416 +  leg2->Draw();
1417 +  
1418 +  CompleteSave(kinpad,saveas+"__TTbarComparison");
1419 +  
1420 +  gStyle->SetOptFit(0);
1421 +  
1422 +  kinpad->cd();
1423 +  kinpad->SetLogy(0);
1424 +  TH1F *MatchingRatio = (TH1F*)tMatchingUp->Clone("MatchingRatio");
1425 +  MatchingRatio->Divide(tMatchingDown);
1426 +  TLine *lone = new TLine(tScaleUp->GetBinLowEdge(1),1,tScaleUp->GetBinLowEdge(tScaleUp->GetNbinsX())+tScaleUp->GetBinWidth(tScaleUp->GetNbinsX()),1);
1427 +  lone->SetLineColor(TColor::GetColor("#01DF01"));
1428 +  lone->SetLineStyle(2);
1429 +  TH1F *ScaleRatio = (TH1F*)tScaleUp->Clone("ScaleRatio");
1430 +  ScaleRatio->Divide(tScaleDown);
1431 +  MatchingRatio->GetYaxis()->SetRangeUser(0,3);
1432 +  MatchingRatio->Draw("e1");
1433 +  TF1 *QP1 = new TF1("QP1","[0]+[1]*x",50,200);//simple linear function ranging from 50 to 200
1434 +  MatchingRatio->Fit("QP1","R");
1435 +  lone->Draw();
1436 +  stringstream summary;
1437 +  summary << " #splitline{Fit result for f(x) = a+bx :}{#splitline{a=" << DigitsAfterComma(QP1->GetParameter(0),4) << " +/- " << DigitsAfterComma(QP1->GetParError(0),4) << "}{b=" << DigitsAfterComma(QP1->GetParameter(1),4);
1438 +  summary << " +/- " << DigitsAfterComma(QP1->GetParError(1),4) << "}}";
1439 +  TText *infobox = write_title(summary.str());
1440 +  infobox->SetX(0.75);
1441 +  infobox->SetTextSize(0.03);
1442 +  infobox->SetY(0.75);
1443 +  infobox->Draw();
1444 +  CompleteSave(kinpad,saveas+"__TTbarComparison_MatchingUpDividedMatchingDown");
1445 +  kinpad->cd();
1446 +  ScaleRatio->GetYaxis()->SetRangeUser(0,3);
1447 +  ScaleRatio->Draw("e1");
1448 +  ScaleRatio->Fit("QP1","R");
1449 +  summary.str("");
1450 +  summary << " #splitline{Fit result for f(x) = a+bx :}{#splitline{a=" << DigitsAfterComma(QP1->GetParameter(0),4) << " +/- " << DigitsAfterComma(QP1->GetParError(0),4) << "}{b=" << DigitsAfterComma(QP1->GetParameter(1),4);
1451 +  summary << " +/- " << DigitsAfterComma(QP1->GetParError(1),4) << "}}";
1452 +  TText *infobox2 = write_title(summary.str());
1453 +  infobox2->SetX(0.75);
1454 +  infobox2->SetTextSize(0.03);
1455 +  infobox2->SetY(0.75);
1456 +  infobox2->Draw();
1457 +
1458 +  lone->Draw();
1459 +  CompleteSave(kinpad,saveas+"__TTbarComparison_ScaleUpDividedScaleDown");
1460 +  
1461 +  
1462 +  delete QP1;
1463 +  delete infobox;
1464 +  delete infobox2;
1465 +  delete MatchingRatio;
1466 +  delete ScaleRatio;
1467 +  DeleteStack(ScaleUp);
1468 +  DeleteStack(ScaleDown);
1469 +  DeleteStack(MatchingUp);
1470 +  DeleteStack(MatchingDown);
1471 +  delete leg2;
1472    CleanLegends();
1473    DeleteStack(Central);
1474    delete Systematic;
# Line 1382 | Line 1481 | void ProduceMCSystematicPlot(string vari
1481    delete ca;
1482   }
1483  
1484 + void QuickProduceMCSystematicPlot(string variable, int nbins, float bmin, float bmax, string label, TCut thiscut, string saveas) {
1485 +  TCanvas *ca = new TCanvas("ca","ca");
1486 +  TH1F *tScaleUp = systsamples.Draw("tScaleUp",variable,nbins,bmin,bmax,label,"events",thiscut,mc,luminosity,systsamples.FindSample("scaleup"));
1487 +  TH1F *tScaleDown = systsamples.Draw("tScaleDown",variable,nbins,bmin,bmax,label,"events",thiscut,mc,luminosity,systsamples.FindSample("scaledown"));
1488 +  TH1F *tMatchingUp = systsamples.Draw("tMatchingUp",variable,nbins,bmin,bmax,label,"events",thiscut,mc,luminosity,systsamples.FindSample("matchingup"));
1489 +  TH1F *tMatchingDown = systsamples.Draw("tMatchingDown",variable,nbins,bmin,bmax,label,"events",thiscut,mc,luminosity,systsamples.FindSample("matchingdown"));
1490 +  TH1F *tCentral = systsamples.Draw("tCentral",variable,nbins,bmin,bmax,label,"events",thiscut,mc,luminosity,systsamples.FindSample("TTJets_MassiveBinDECAY_TuneZ2sta"));
1491 +  
1492 +  tScaleUp->Scale(1.0/tScaleUp->Integral());
1493 +  tScaleDown->Scale(1.0/tScaleDown->Integral());
1494 +  tMatchingDown->Scale(1.0/tMatchingDown->Integral());
1495 +  tMatchingUp->Scale(1.0/tMatchingUp->Integral());
1496 +  
1497 +  TPad *kinpad = new TPad("kinpad","kinpad",0,0,1,1);
1498 +  kinpad->SetLogy(1);
1499 +  kinpad->cd();
1500 +  tCentral->SetFillColor(kWhite);
1501 +  tCentral->SetLineColor(kBlack);
1502 +  tScaleUp->SetLineColor(kRed);
1503 +  tScaleDown->SetLineColor(kRed);
1504 +  tMatchingUp->SetLineColor(kBlue);
1505 +  tMatchingDown->SetLineColor(kBlue);
1506 +  tScaleUp->SetLineStyle(2);
1507 +  tScaleDown->SetLineStyle(3);
1508 +  tMatchingUp->SetLineStyle(2);
1509 +  tMatchingDown->SetLineStyle(3);
1510 +  
1511 +  TLegend *leg2 = make_legend();
1512 +  leg2->AddEntry(tCentral,"Central (ttbar)","l");
1513 +  leg2->AddEntry(tScaleUp,"ScaleUp (ttbar)","l");
1514 +  leg2->AddEntry(tScaleDown,"ScaleDown (ttbar)","l");
1515 +  leg2->AddEntry(tMatchingUp,"MatchingUp (ttbar)","l");
1516 +  leg2->AddEntry(tMatchingDown,"MatchingDown (ttbar)","l");
1517 +  
1518 +  tCentral->Draw("histo");
1519 +  tScaleUp->Draw("histo,same");
1520 +  tScaleDown->Draw("histo,same");
1521 +  tMatchingUp->Draw("histo,same");
1522 +  tMatchingDown->Draw("histo,same");
1523 +  leg2->Draw();
1524 +  
1525 +  CompleteSave(kinpad,saveas+"__TTbarComparison");
1526 +  
1527 +  gStyle->SetOptFit(0);
1528 +  
1529 +  kinpad->cd();
1530 +  kinpad->SetLogy(0);
1531 +  TH1F *MatchingRatio = (TH1F*)tMatchingUp->Clone("MatchingRatio");
1532 +  MatchingRatio->Divide(tMatchingDown);
1533 +  TLine *lone = new TLine(tScaleUp->GetBinLowEdge(1),1,tScaleUp->GetBinLowEdge(tScaleUp->GetNbinsX())+tScaleUp->GetBinWidth(tScaleUp->GetNbinsX()),1);
1534 +  lone->SetLineColor(TColor::GetColor("#01DF01"));
1535 +  lone->SetLineStyle(2);
1536 +  TH1F *ScaleRatio = (TH1F*)tScaleUp->Clone("ScaleRatio");
1537 +  ScaleRatio->Divide(tScaleDown);
1538 +  MatchingRatio->GetYaxis()->SetRangeUser(0,3);
1539 +  MatchingRatio->Draw("e1");
1540 +  TF1 *QP1 = new TF1("QP1","[0]+[1]*x",50,200);//simple linear function ranging from 50 to 200
1541 +  MatchingRatio->Fit("QP1","RQ");
1542 +  lone->Draw();
1543 +  stringstream summary;
1544 +  summary << " #splitline{Fit result for f(x) = a+bx :}{#splitline{a=" << DigitsAfterComma(QP1->GetParameter(0),4) << " +/- " << DigitsAfterComma(QP1->GetParError(0),4) << "}{b=" << DigitsAfterComma(QP1->GetParameter(1),4);
1545 +  summary << " +/- " << DigitsAfterComma(QP1->GetParError(1),4) << "}}";
1546 +  TText *infobox = write_title(summary.str());
1547 +  infobox->SetX(0.75);
1548 +  infobox->SetTextSize(0.03);
1549 +  infobox->SetY(0.75);
1550 +  infobox->Draw();
1551 +  CompleteSave(kinpad,saveas+"__TTbarComparison_MatchingUpDividedMatchingDown");
1552 +  kinpad->cd();
1553 +  ScaleRatio->GetYaxis()->SetRangeUser(0,3);
1554 +  ScaleRatio->Draw("e1");
1555 +  ScaleRatio->Fit("QP1","RQ");
1556 +  summary.str("");
1557 +  summary << " #splitline{Fit result for f(x) = a+bx :}{#splitline{a=" << DigitsAfterComma(QP1->GetParameter(0),4) << " +/- " << DigitsAfterComma(QP1->GetParError(0),4) << "}{b=" << DigitsAfterComma(QP1->GetParameter(1),4);
1558 +  summary << " +/- " << DigitsAfterComma(QP1->GetParError(1),4) << "}}";
1559 +  TText *infobox2 = write_title(summary.str());
1560 +  infobox2->SetX(0.75);
1561 +  infobox2->SetTextSize(0.03);
1562 +  infobox2->SetY(0.75);
1563 +  infobox2->Draw();
1564 +
1565 +  lone->Draw();
1566 +  CompleteSave(kinpad,saveas+"__TTbarComparison_ScaleUpDividedScaleDown");
1567 +  
1568 +  delete tScaleUp;
1569 +  delete tScaleDown;
1570 +  delete tCentral;
1571 +  delete tMatchingUp;
1572 +  delete tMatchingDown;
1573 +  delete QP1;
1574 +  delete infobox;
1575 +  delete infobox2;
1576 +  delete MatchingRatio;
1577 +  delete ScaleRatio;
1578 +  delete leg2;
1579 +  CleanLegends();
1580 +  delete ca;
1581 + }
1582 +
1583   void ProduceMCSystematicPlots() {
1584 +  cout << "Getting ready to produce systematic plots " << endl;
1585    TCut cutweightBKP = cutWeight;
1586    
1587 <  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_SameFlavor");
1588 <  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_OppositeFlavor");
1589 <  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/ETH_SameFlavor");
1590 <  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/ETH_OppositeFlavor");
1587 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_SameFlavor");
1588 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_OppositeFlavor");  
1589 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_SameFlavor");
1590 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_OppositeFlavor");
1591 >  
1592 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE");
1593 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE");  
1594 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE_HighMass");
1595 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE_HighMass");  
1596 >  
1597 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_SameFlavor_INCLUSIVE");
1598 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_OppositeFlavor_INCLUSIVE");
1599 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/ETH_SameFlavor_INCLUSIVE_HighMass");
1600 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/ETH_OppositeFlavor_INCLUSIVE_HighMass");
1601 >  QuickProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/ETH_SameFlavor");
1602 >  QuickProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/ETH_OppositeFlavor");
1603 >  
1604 >  
1605 >  
1606 >  cout << "Kicking cutWeight  " << (const char*) cutWeight << endl;
1607 >  cout << "Keeping OSSF cut " << (const char*)cutOSSF << endl;
1608 >  cutWeight="1.0";
1609 >  TCut bkpessential=essentialcut;
1610 >  essentialcut=TCut("genPt1>0");
1611 >  
1612 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",TCut("abs(genId1)==abs(genId2) && abs(genEta1)<1.4 && abs(genEta2)<1.4 && genPt1>20 && genPt2>20 &&  genMll>20&&genMll<70"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE__NOPURW___GENLEVEL");
1613 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",TCut("abs(genId1)!=abs(genId2) && abs(genEta1)<1.4 && abs(genEta2)<1.4 && genPt1>20 && genPt2>20 &&  genMll>20&&genMll<70"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE__NOPURW___GENLEVEL");
1614 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",TCut("abs(genId1)==abs(genId2) && abs(genEta1)<1.4 && abs(genEta2)<1.4 && genPt1>20 && genPt2>20 &&  genMll>120"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE_HighMass__NOPURW___GENLEVEL");
1615 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",TCut("abs(genId1)!=abs(genId2) && abs(genEta1)<1.4 && abs(genEta2)<1.4 && genPt1>20 && genPt2>20 &&  genMll>120"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE_HighMass__NOPURW___GENLEVEL");
1616 >  essentialcut=bkpessential;
1617 >  assert(0);
1618 >  
1619 > /*  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE__NOPURW");
1620 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE__NOPURW");  
1621 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE_HighMass__NOPURW");
1622 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE_HighMass__NOPURW");  
1623 >  
1624 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_SameFlavor_INCLUSIVE__NOPURW");
1625 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_OppositeFlavor_INCLUSIVE__NOPURW");
1626 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/ETH_SameFlavor_INCLUSIVE_HighMass__NOPURW");
1627 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/ETH_OppositeFlavor_INCLUSIVE_HighMass__NOPURW");
1628 >  */
1629 >  
1630 >  // --------------------------------------    ***** AACHEN *****      --------------------------------------    
1631 >  
1632 >  
1633 >  cutWeight=cutweightBKP;
1634 >  TCut essentialcutBKP = essentialcut;
1635 >  cout << (const char*) essentialcut << endl;
1636 >  
1637 >  essentialcut = TCut((ReplaceAll((const char*)essentialcut,"pt2>20","pt2>10")).c_str());
1638 >  essentialcut = TCut((ReplaceAll((const char*)essentialcut,"abs(eta1)<1.4","abs(eta1)<2.4")).c_str());
1639 >  essentialcut = TCut((ReplaceAll((const char*)essentialcut,"abs(eta2)<1.4","abs(eta2)<2.4")).c_str());
1640    
1641    TCut cutnJetsBKP = cutnJets;
1642    cutnJets = TCut((ReplaceAll((const char*)cutnJets,"pt2>20","pt2>10")).c_str());
# Line 1396 | Line 1644 | void ProduceMCSystematicPlots() {
1644    cutnJets = TCut((ReplaceAll((const char*)cutnJets,"abs(eta2)<1.4","abs(eta2)<2.4")).c_str());
1645    cutnJets = TCut((ReplaceAll((const char*)cutnJets,"abs(eta1)<1.4","abs(eta1)<2.4")).c_str());
1646    
1647 <  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor");
1648 <  ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor");
1649 <  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>150"),"MCSystPlots/NJets/Aachen_SameFlavor");
1650 <  ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>150"),"MCSystPlots/NJets/Aachen_OppositeFlavor");
1647 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_SameFlavor");
1648 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_OppositeFlavor");  
1649 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor");
1650 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor");
1651 >  
1652 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE");
1653 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE");  
1654 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE_HighMass");
1655 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE_HighMass");  
1656 >  
1657 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE");
1658 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE");
1659 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE_HighMass");
1660 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE_HighMass");
1661 >  QuickProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/Aachen_SameFlavor");
1662 >  QuickProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/Aachen_OppositeFlavor");
1663 >  
1664 >  
1665 >  
1666 >  cout << "Kicking cutWeight  " << (const char*) cutWeight << endl;
1667 >  cout << "Keeping OSSF cut " << (const char*)cutOSSF << endl;
1668 >  cutWeight="1.0";
1669 >  
1670 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE__NOPURW");
1671 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE__NOPURW");  
1672 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE_HighMass__NOPURW");
1673 >  QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE_HighMass__NOPURW");  
1674 >  
1675 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE__NOPURW");
1676 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE__NOPURW");
1677 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE_HighMass__NOPURW");
1678 >  QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE_HighMass__NOPURW");
1679 >  
1680    cutnJets  = cutnJetsBKP;
1681    cutWeight = cutweightBKP;
1682 +  essentialcut = essentialcutBKP;
1683 +  
1684 +  write_error(__FUNCTION__,"Still need to add systematic shape");assert(0);
1685 + }
1686 +
1687 + void MakeTauPlot(string label, TCut pcut, string filename, bool TauOnly) {
1688 +  TCut cut=pcut&&basiccut;
1689 +  string variable="mll";
1690 +  string xlabel="m_{ll} [GeV]";
1691 +  int nbins=40;
1692 +  float min=0;
1693 +  float max=200;
1694 +
1695 +  TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600);
1696 +  TH1F *datahistoSF = allsamples.Draw("datahistoSF",variable,nbins,min,max, xlabel, "events",cut&&cutOSSF,data,luminosity);
1697 +  TH1F *datahistoOF = allsamples.Draw("datahistoOF",variable,nbins,min,max, xlabel, "events",cut&&cutOSOF,data,luminosity);
1698 +  TH1F *tauSF = allsamples.Draw("tauSF",variable,nbins,min,max, xlabel, "events",cut&&cutOSSF,data,luminosity,systsamples.FindSample("DYToTauTau"));
1699 +  TH1F *tauOF = allsamples.Draw("tauOF",variable,nbins,min,max, xlabel, "events",cut&&cutOSOF,data,luminosity,systsamples.FindSample("DYToTauTau"));
1700 +  datahistoSF->SetMarkerSize(DataMarkerSize);
1701 +  datahistoSF->SetMaximum(1.3*datahistoSF->GetMaximum());
1702 +  datahistoOF->SetMarkerSize(DataMarkerSize);
1703 +  datahistoOF->SetMaximum(1.3*datahistoOF->GetMaximum());
1704 +
1705 +  THStack mcstackSF   = allsamples.DrawStack("mcstackSF",  variable,nbins,min,max,xlabel,"events",cut&&cutOSSF,mc,luminosity);
1706 +  THStack mcstackOF   = allsamples.DrawStack("mcstackOF",  variable,nbins,min,max,xlabel,"events",cut&&cutOSOF,mc,luminosity);
1707 +  datahistoSF->Draw("e1");
1708 +  ckin->Update();
1709 +  mcstackSF.Draw("histo,same");
1710 +  
1711 +  datahistoSF->Draw("same,e1");
1712 +  TLegend *kinleg = allsamples.allbglegend();
1713 +  kinleg->Draw();
1714 +  
1715 +  TPad *kinpad = new TPad("kinpad","kinpad",0,0,1,1);
1716 +  kinpad->cd();
1717 +  datahistoSF->Draw("e1");
1718 +  mcstackSF.Draw("histo,same");
1719 +  datahistoSF->Draw("same,e1");
1720 +  datahistoSF->Draw("same,axis");
1721 +  kinleg->Draw();
1722 +  DrawPrelim();
1723 +  Save_With_Ratio(datahistoSF,mcstackSF,kinpad->cd(),filename+"__SF_mc");
1724 +  
1725 +  kinpad->cd();
1726 +  datahistoOF->Draw("e1");
1727 +  mcstackOF.Draw("histo,same");
1728 +  datahistoOF->Draw("same,e1");
1729 +  datahistoOF->Draw("same,axis");
1730 +  kinleg->Draw();
1731 +  DrawPrelim();
1732 +  Save_With_Ratio(datahistoOF,mcstackOF,kinpad->cd(),filename+"__OF_mc");
1733 +  
1734 +  kinpad->cd();
1735 +  tauSF->Draw("e1");
1736 +  tauOF->Draw("histo,same");
1737 +  tauSF->Draw("e1,same");
1738 +  TLegend *legtau = make_legend();
1739 +  legtau->AddEntry(tauSF,"DY->#tau#tau, SF","p");
1740 +  legtau->AddEntry(tauSF,"DY->#tau#tau, OF","l");
1741 +  legtau->Draw();
1742 +  DrawPrelim();
1743 +  Save_With_Ratio(tauSF,tauOF,kinpad->cd(),filename+"__Tau_SF_vs_OF");
1744 +  
1745 +  delete datahistoSF;
1746 +  delete datahistoOF;
1747 +  delete tauSF;
1748 +  delete tauOF;
1749 +  delete kinpad;
1750 +  delete ckin;
1751 +  CleanLegends();
1752 + }
1753 +  
1754 +
1755 + void TauQuestion() {
1756 + //   MakeTauPlot("MET>100 GeV, #geq 3 jets",cutnJets&&TCut("met[4]>100"),"TauQ/MET100_3Jets",true);
1757 + //   MakeTauPlot("MET>100 GeV",TCut("met[4]>100"),"TauQ/MET100",true);
1758 + //   MakeTauPlot("MET>0 GeV",TCut("met[4]>0"),"TauQ/MET0",true);
1759 +  MakeTauPlot("b-tag veto, 50<MET<100",TCut("pfJetGoodNumBtag30==0&&met[4]>50&&met[4]<100"),"TauQ/ControlPlots",false);
1760   }
1761  
1762   void do_kinematic_plots(string mcjzb, string datajzb, bool doPF=false)
# Line 1412 | Line 1767 | void do_kinematic_plots(string mcjzb, st
1767  
1768    bool doOFSF = true;
1769    bool doKin  = true;
1770 <  bool doDataComp = true;
1771 <  bool MakeTwoThreeJetComparison = true;
1770 >  bool doDataComp = false;
1771 >  bool MakeTwoThreeJetComparison = false;
1772    
1773  
1774    if(doPF) write_warning(__FUNCTION__,"Please use caution when trying to produce PF plots; not all versions of the JZB trees have these variables!");
# Line 1425 | Line 1780 | void do_kinematic_plots(string mcjzb, st
1780    }
1781    
1782    if(MakeTwoThreeJetComparison) MakeElegantTwoThreeComparisons();
1783 +  
1784 +  //TauQuestion();
1785  
1786    //ProduceJanPlots();
1787 < //   ProduceMCSystematicPlots();
1788 <  make_plain_kin_plot("pt",Cut2Str(cutOSSF&&TCut("mll>20&&pfJetGoodNumBtag30>=2")),40,0,200,nolog,"Z p_{T}","PlotForKostas",doPF,true);
1787 >  ProduceMCSystematicPlots();
1788 >  assert(0);
1789 > //  make_plain_kin_plot("pt",Cut2Str(cutOSSF&&TCut("mll>20&&pfJetGoodNumBtag30>=2")),40,0,200,nolog,"Z p_{T}","PlotForKostas",doPF,true);
1790    
1791    if ( doOFSF ) {
1792       make_OFSF_plots("mll", "met[4]>100", 60, 20., 320., false, "m_{ll}", "mll");
1793 +     make_OFSF_plots("met[4]", "met[4]>100", 30, 100., 400., false, "PFMET", "met");
1794 +     make_OFSF_plots("leptonNum", "met[4]>100", 3, 2, 5., false, "N(leptons)", "NLeptons");
1795  
1796       make_OFSF_plots("pfJetGoodNum40", "met[4]>100",                        7, 3, 10, true, "#(jets)", "njets");
1797       make_OFSF_plots("pfJetGoodNum40", "met[4]>100&&pfJetGoodNumBtag30==0", 7, 3, 10, true, "#(jets)", "njets_btagVeto");
# Line 1551 | Line 1911 | void do_kinematic_plots(string mcjzb, st
1911  
1912    if ( doKin ) {
1913      string mllCut("");
1914 <    
1914 >    /*
1915      
1916    
1917      make_plain_kin_plot("met[4]",Cut2Str(cutOSOF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==0")),40,0,400,dolog,"PFMET","Debunking/MET_OF_30to70_0j",doPF,true);
# Line 1603 | Line 1963 | void do_kinematic_plots(string mcjzb, st
1963      make_kin_plot("MetFactor","",20,0,2,nolog,"MetFactor","MetFactor",doPF,true);
1964      
1965      make_ttbar_comparison("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_OF_30to70_2j__ALLMCSAMPLES");
1966 <    
1966 >     */
1967      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==0")),dolog,"PFMET","Debunking/MET_OF_30to70_0j");
1968      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==1")),dolog,"PFMET","Debunking/MET_OF_30to70_1j");
1969      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_OF_30to70_2j");
1970      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==3")),dolog,"PFMET","Debunking/MET_OF_30to70_3j");
1971  
1972 +    DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==0")),dolog,"PFMET","Debunking/MET_SF_30to70_0j");
1973 +    DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==1")),dolog,"PFMET","Debunking/MET_SF_30to70_1j");
1974 +    DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_SF_30to70_2j");
1975 +    DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==3")),dolog,"PFMET","Debunking/MET_SF_30to70_3j");
1976 +
1977      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>80&&mll<100&&pfJetGoodNum40==0")),dolog,"PFMET","Debunking/MET_OF_Z_0j");
1978      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>80&&mll<100&&pfJetGoodNum40==1")),dolog,"PFMET","Debunking/MET_OF_Z_1j");
1979      DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>80&&mll<100&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_OF_Z_2j");
# Line 3462 | Line 3827 | void ttbar_sidebands_comparison(string m
3827        
3828    float simulatedlumi = luminosity; //in pb please - adjust to your likings
3829  
3830 <  TH1F *TZem  = systsamples.Draw("TZem",     mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3831 <  TH1F *nTZem = systsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3830 >  TH1F *TZem  = allsamples.Draw("TZem",     mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3831 >  TH1F *nTZem = allsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3832    TH1F *TSem;
3833    TH1F *nTSem;
3834 <  TH1F *TZeemm  = systsamples.Draw("TZeemm",     mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3835 <  TH1F *nTZeemm = systsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3834 >  TH1F *TZeemm  = allsamples.Draw("TZeemm",     mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3835 >  TH1F *nTZeemm = allsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3836    TH1F *TSeemm;
3837    TH1F *nTSeemm;
3838    
3839    if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) {
3840 <    TSem    = systsamples.Draw("TSem",       mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3841 <    nTSem   = systsamples.Draw("nTSem",  "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3842 <    TSeemm  = systsamples.Draw("TSeemm",     mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3843 <    nTSeemm = systsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT"));
3840 >    TSem    = allsamples.Draw("TSem",       mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3841 >    nTSem   = allsamples.Draw("nTSem",  "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3842 >    TSeemm  = allsamples.Draw("TSeemm",     mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3843 >    nTSeemm = allsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT"));
3844    }
3845  
3846    TCanvas *tcan = new TCanvas("tcan","tcan");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines