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); |
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 |
|
} |
448 |
|
//signalhisto->Delete(); |
449 |
|
delete mleg; |
450 |
|
delete rcan; |
451 |
+ |
delete ofsf_can; |
452 |
|
|
453 |
|
return ymaxSet; |
454 |
|
|
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!) |
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()); |
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"); |
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; |
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 |
> |
|
1610 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE__NOPURW"); |
1611 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE__NOPURW"); |
1612 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/ETH_SameFlavor_INCLUSIVE_HighMass__NOPURW"); |
1613 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/ETH_OppositeFlavor_INCLUSIVE_HighMass__NOPURW"); |
1614 |
> |
|
1615 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_SameFlavor_INCLUSIVE__NOPURW"); |
1616 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/ETH_OppositeFlavor_INCLUSIVE__NOPURW"); |
1617 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/ETH_SameFlavor_INCLUSIVE_HighMass__NOPURW"); |
1618 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/ETH_OppositeFlavor_INCLUSIVE_HighMass__NOPURW"); |
1619 |
> |
|
1620 |
> |
|
1621 |
> |
// -------------------------------------- ***** AACHEN ***** -------------------------------------- |
1622 |
> |
|
1623 |
> |
|
1624 |
> |
cutWeight=cutweightBKP; |
1625 |
> |
TCut essentialcutBKP = essentialcut; |
1626 |
> |
cout << (const char*) essentialcut << endl; |
1627 |
> |
|
1628 |
> |
essentialcut = TCut((ReplaceAll((const char*)essentialcut,"pt2>20","pt2>10")).c_str()); |
1629 |
> |
essentialcut = TCut((ReplaceAll((const char*)essentialcut,"abs(eta1)<1.4","abs(eta1)<2.4")).c_str()); |
1630 |
> |
essentialcut = TCut((ReplaceAll((const char*)essentialcut,"abs(eta2)<1.4","abs(eta2)<2.4")).c_str()); |
1631 |
|
|
1632 |
|
TCut cutnJetsBKP = cutnJets; |
1633 |
|
cutnJets = TCut((ReplaceAll((const char*)cutnJets,"pt2>20","pt2>10")).c_str()); |
1635 |
|
cutnJets = TCut((ReplaceAll((const char*)cutnJets,"abs(eta2)<1.4","abs(eta2)<2.4")).c_str()); |
1636 |
|
cutnJets = TCut((ReplaceAll((const char*)cutnJets,"abs(eta1)<1.4","abs(eta1)<2.4")).c_str()); |
1637 |
|
|
1638 |
< |
ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor"); |
1639 |
< |
ProduceMCSystematicPlot("met[4]",80,0,400,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor"); |
1640 |
< |
ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>150"),"MCSystPlots/NJets/Aachen_SameFlavor"); |
1641 |
< |
ProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>150"),"MCSystPlots/NJets/Aachen_OppositeFlavor"); |
1638 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_SameFlavor"); |
1639 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_OppositeFlavor"); |
1640 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor"); |
1641 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor"); |
1642 |
> |
|
1643 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE"); |
1644 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE"); |
1645 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE_HighMass"); |
1646 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE_HighMass"); |
1647 |
> |
|
1648 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE"); |
1649 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE"); |
1650 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE_HighMass"); |
1651 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE_HighMass"); |
1652 |
> |
QuickProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSSF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/Aachen_SameFlavor"); |
1653 |
> |
QuickProduceMCSystematicPlot("pfJetGoodNum40",8,-0.5,7.5,"NJets",cutOSOF&&cutnJets&&TCut("mll>20&&mll<70&&met[4]>100"),"MCSystPlots/NJets/Aachen_OppositeFlavor"); |
1654 |
> |
|
1655 |
> |
|
1656 |
> |
|
1657 |
> |
cout << "Kicking cutWeight " << (const char*) cutWeight << endl; |
1658 |
> |
cout << "Keeping OSSF cut " << (const char*)cutOSSF << endl; |
1659 |
> |
cutWeight="1.0"; |
1660 |
> |
|
1661 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE__NOPURW"); |
1662 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE__NOPURW"); |
1663 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_SameFlavor_INCLUSIVE_HighMass__NOPURW"); |
1664 |
> |
QuickProduceMCSystematicPlot("genMET",20,0,200,"genMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/genMET/Aachen_OppositeFlavor_INCLUSIVE_HighMass__NOPURW"); |
1665 |
> |
|
1666 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE__NOPURW"); |
1667 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>20&&mll<70"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE__NOPURW"); |
1668 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSSF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_SameFlavor_INCLUSIVE_HighMass__NOPURW"); |
1669 |
> |
QuickProduceMCSystematicPlot("met[4]",20,0,200,"PFMET [GeV]",cutOSOF&&TCut("mll>120"),"MCSystPlots/MET/Aachen_OppositeFlavor_INCLUSIVE_HighMass__NOPURW"); |
1670 |
> |
|
1671 |
|
cutnJets = cutnJetsBKP; |
1672 |
|
cutWeight = cutweightBKP; |
1673 |
+ |
essentialcut = essentialcutBKP; |
1674 |
+ |
} |
1675 |
+ |
|
1676 |
+ |
void MakeTauPlot(string label, TCut pcut, string filename, bool TauOnly) { |
1677 |
+ |
TCut cut=pcut&&basiccut; |
1678 |
+ |
string variable="mll"; |
1679 |
+ |
string xlabel="m_{ll} [GeV]"; |
1680 |
+ |
int nbins=40; |
1681 |
+ |
float min=0; |
1682 |
+ |
float max=200; |
1683 |
+ |
|
1684 |
+ |
TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600); |
1685 |
+ |
TH1F *datahistoSF = allsamples.Draw("datahistoSF",variable,nbins,min,max, xlabel, "events",cut&&cutOSSF,data,luminosity); |
1686 |
+ |
TH1F *datahistoOF = allsamples.Draw("datahistoOF",variable,nbins,min,max, xlabel, "events",cut&&cutOSOF,data,luminosity); |
1687 |
+ |
TH1F *tauSF = allsamples.Draw("tauSF",variable,nbins,min,max, xlabel, "events",cut&&cutOSSF,data,luminosity,systsamples.FindSample("DYToTauTau")); |
1688 |
+ |
TH1F *tauOF = allsamples.Draw("tauOF",variable,nbins,min,max, xlabel, "events",cut&&cutOSOF,data,luminosity,systsamples.FindSample("DYToTauTau")); |
1689 |
+ |
datahistoSF->SetMarkerSize(DataMarkerSize); |
1690 |
+ |
datahistoSF->SetMaximum(1.3*datahistoSF->GetMaximum()); |
1691 |
+ |
datahistoOF->SetMarkerSize(DataMarkerSize); |
1692 |
+ |
datahistoOF->SetMaximum(1.3*datahistoOF->GetMaximum()); |
1693 |
+ |
|
1694 |
+ |
THStack mcstackSF = allsamples.DrawStack("mcstackSF", variable,nbins,min,max,xlabel,"events",cut&&cutOSSF,mc,luminosity); |
1695 |
+ |
THStack mcstackOF = allsamples.DrawStack("mcstackOF", variable,nbins,min,max,xlabel,"events",cut&&cutOSOF,mc,luminosity); |
1696 |
+ |
datahistoSF->Draw("e1"); |
1697 |
+ |
ckin->Update(); |
1698 |
+ |
mcstackSF.Draw("histo,same"); |
1699 |
+ |
|
1700 |
+ |
datahistoSF->Draw("same,e1"); |
1701 |
+ |
TLegend *kinleg = allsamples.allbglegend(); |
1702 |
+ |
kinleg->Draw(); |
1703 |
+ |
|
1704 |
+ |
TPad *kinpad = new TPad("kinpad","kinpad",0,0,1,1); |
1705 |
+ |
kinpad->cd(); |
1706 |
+ |
datahistoSF->Draw("e1"); |
1707 |
+ |
mcstackSF.Draw("histo,same"); |
1708 |
+ |
datahistoSF->Draw("same,e1"); |
1709 |
+ |
datahistoSF->Draw("same,axis"); |
1710 |
+ |
kinleg->Draw(); |
1711 |
+ |
DrawPrelim(); |
1712 |
+ |
Save_With_Ratio(datahistoSF,mcstackSF,kinpad->cd(),filename+"__SF_mc"); |
1713 |
+ |
|
1714 |
+ |
kinpad->cd(); |
1715 |
+ |
datahistoOF->Draw("e1"); |
1716 |
+ |
mcstackOF.Draw("histo,same"); |
1717 |
+ |
datahistoOF->Draw("same,e1"); |
1718 |
+ |
datahistoOF->Draw("same,axis"); |
1719 |
+ |
kinleg->Draw(); |
1720 |
+ |
DrawPrelim(); |
1721 |
+ |
Save_With_Ratio(datahistoOF,mcstackOF,kinpad->cd(),filename+"__OF_mc"); |
1722 |
+ |
|
1723 |
+ |
kinpad->cd(); |
1724 |
+ |
tauSF->Draw("e1"); |
1725 |
+ |
tauOF->Draw("histo,same"); |
1726 |
+ |
tauSF->Draw("e1,same"); |
1727 |
+ |
TLegend *legtau = make_legend(); |
1728 |
+ |
legtau->AddEntry(tauSF,"DY->#tau#tau, SF","p"); |
1729 |
+ |
legtau->AddEntry(tauSF,"DY->#tau#tau, OF","l"); |
1730 |
+ |
legtau->Draw(); |
1731 |
+ |
DrawPrelim(); |
1732 |
+ |
Save_With_Ratio(tauSF,tauOF,kinpad->cd(),filename+"__Tau_SF_vs_OF"); |
1733 |
+ |
|
1734 |
+ |
delete datahistoSF; |
1735 |
+ |
delete datahistoOF; |
1736 |
+ |
delete tauSF; |
1737 |
+ |
delete tauOF; |
1738 |
+ |
delete kinpad; |
1739 |
+ |
delete ckin; |
1740 |
+ |
CleanLegends(); |
1741 |
+ |
} |
1742 |
+ |
|
1743 |
+ |
|
1744 |
+ |
void TauQuestion() { |
1745 |
+ |
// MakeTauPlot("MET>100 GeV, #geq 3 jets",cutnJets&&TCut("met[4]>100"),"TauQ/MET100_3Jets",true); |
1746 |
+ |
// MakeTauPlot("MET>100 GeV",TCut("met[4]>100"),"TauQ/MET100",true); |
1747 |
+ |
// MakeTauPlot("MET>0 GeV",TCut("met[4]>0"),"TauQ/MET0",true); |
1748 |
+ |
MakeTauPlot("b-tag veto, 50<MET<100",TCut("pfJetGoodNumBtag30==0&&met[4]>50&&met[4]<100"),"TauQ/ControlPlots",false); |
1749 |
|
} |
1750 |
|
|
1751 |
|
void do_kinematic_plots(string mcjzb, string datajzb, bool doPF=false) |
1756 |
|
|
1757 |
|
bool doOFSF = true; |
1758 |
|
bool doKin = true; |
1759 |
< |
bool doDataComp = true; |
1760 |
< |
bool MakeTwoThreeJetComparison = true; |
1759 |
> |
bool doDataComp = false; |
1760 |
> |
bool MakeTwoThreeJetComparison = false; |
1761 |
|
|
1762 |
|
|
1763 |
|
if(doPF) write_warning(__FUNCTION__,"Please use caution when trying to produce PF plots; not all versions of the JZB trees have these variables!"); |
1769 |
|
} |
1770 |
|
|
1771 |
|
if(MakeTwoThreeJetComparison) MakeElegantTwoThreeComparisons(); |
1772 |
+ |
|
1773 |
+ |
//TauQuestion(); |
1774 |
|
|
1775 |
|
//ProduceJanPlots(); |
1776 |
< |
// ProduceMCSystematicPlots(); |
1777 |
< |
make_plain_kin_plot("pt",Cut2Str(cutOSSF&&TCut("mll>20&&pfJetGoodNumBtag30>=2")),40,0,200,nolog,"Z p_{T}","PlotForKostas",doPF,true); |
1776 |
> |
ProduceMCSystematicPlots(); |
1777 |
> |
assert(0); |
1778 |
> |
// make_plain_kin_plot("pt",Cut2Str(cutOSSF&&TCut("mll>20&&pfJetGoodNumBtag30>=2")),40,0,200,nolog,"Z p_{T}","PlotForKostas",doPF,true); |
1779 |
|
|
1780 |
|
if ( doOFSF ) { |
1781 |
|
make_OFSF_plots("mll", "met[4]>100", 60, 20., 320., false, "m_{ll}", "mll"); |
1782 |
+ |
make_OFSF_plots("met[4]", "met[4]>100", 30, 100., 400., false, "PFMET", "met"); |
1783 |
+ |
make_OFSF_plots("leptonNum", "met[4]>100", 3, 2, 5., false, "N(leptons)", "NLeptons"); |
1784 |
|
|
1785 |
|
make_OFSF_plots("pfJetGoodNum40", "met[4]>100", 7, 3, 10, true, "#(jets)", "njets"); |
1786 |
|
make_OFSF_plots("pfJetGoodNum40", "met[4]>100&&pfJetGoodNumBtag30==0", 7, 3, 10, true, "#(jets)", "njets_btagVeto"); |
1900 |
|
|
1901 |
|
if ( doKin ) { |
1902 |
|
string mllCut(""); |
1903 |
< |
|
1903 |
> |
/* |
1904 |
|
|
1905 |
|
|
1906 |
|
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); |
1952 |
|
make_kin_plot("MetFactor","",20,0,2,nolog,"MetFactor","MetFactor",doPF,true); |
1953 |
|
|
1954 |
|
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"); |
1955 |
< |
|
1955 |
> |
*/ |
1956 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==0")),dolog,"PFMET","Debunking/MET_OF_30to70_0j"); |
1957 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==1")),dolog,"PFMET","Debunking/MET_OF_30to70_1j"); |
1958 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_OF_30to70_2j"); |
1959 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==3")),dolog,"PFMET","Debunking/MET_OF_30to70_3j"); |
1960 |
|
|
1961 |
+ |
DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==0")),dolog,"PFMET","Debunking/MET_SF_30to70_0j"); |
1962 |
+ |
DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfJetGoodNum40==1")),dolog,"PFMET","Debunking/MET_SF_30to70_1j"); |
1963 |
+ |
DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_SF_30to70_2j"); |
1964 |
+ |
DoMCSystPlot("met[4]",40,0,400,(cutOSSF&&TCut("mll>30&&mll<70&&pfTightHT>100&&pfJetGoodNum40==3")),dolog,"PFMET","Debunking/MET_SF_30to70_3j"); |
1965 |
+ |
|
1966 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>80&&mll<100&&pfJetGoodNum40==0")),dolog,"PFMET","Debunking/MET_OF_Z_0j"); |
1967 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>80&&mll<100&&pfJetGoodNum40==1")),dolog,"PFMET","Debunking/MET_OF_Z_1j"); |
1968 |
|
DoMCSystPlot("met[4]",40,0,400,(cutOSOF&&TCut("mll>80&&mll<100&&pfTightHT>100&&pfJetGoodNum40==2")),dolog,"PFMET","Debunking/MET_OF_Z_2j"); |
3816 |
|
|
3817 |
|
float simulatedlumi = luminosity; //in pb please - adjust to your likings |
3818 |
|
|
3819 |
< |
TH1F *TZem = systsamples.Draw("TZem", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3820 |
< |
TH1F *nTZem = systsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3819 |
> |
TH1F *TZem = allsamples.Draw("TZem", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3820 |
> |
TH1F *nTZem = allsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3821 |
|
TH1F *TSem; |
3822 |
|
TH1F *nTSem; |
3823 |
< |
TH1F *TZeemm = systsamples.Draw("TZeemm", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3824 |
< |
TH1F *nTZeemm = systsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3823 |
> |
TH1F *TZeemm = allsamples.Draw("TZeemm", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3824 |
> |
TH1F *nTZeemm = allsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3825 |
|
TH1F *TSeemm; |
3826 |
|
TH1F *nTSeemm; |
3827 |
|
|
3828 |
|
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
3829 |
< |
TSem = systsamples.Draw("TSem", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3830 |
< |
nTSem = systsamples.Draw("nTSem", "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3831 |
< |
TSeemm = systsamples.Draw("TSeemm", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3832 |
< |
nTSeemm = systsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTT")); |
3829 |
> |
TSem = allsamples.Draw("TSem", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3830 |
> |
nTSem = allsamples.Draw("nTSem", "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3831 |
> |
TSeemm = allsamples.Draw("TSeemm", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3832 |
> |
nTSeemm = allsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,allsamples.FindSample("/TT")); |
3833 |
|
} |
3834 |
|
|
3835 |
|
TCanvas *tcan = new TCanvas("tcan","tcan"); |