-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from robervalwalsh/develop
Developments for 2017 trigger studies 80X/90X
- Loading branch information
Showing
18 changed files
with
47,316 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
void PlotsBTagCSV() | ||
{ | ||
TFile * f1 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV084_2PFJets100_psw.root","old"); | ||
TFile * f2 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_psw.root","old"); | ||
TFile * f3 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_Eta2p1_psw.root","old"); | ||
TFile * f4 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_Eta2p1_dEta1p5_psw.root","old"); | ||
|
||
TGraphAsymmErrors * g1 = (TGraphAsymmErrors*) f1 -> Get("Graph"); | ||
TGraphAsymmErrors * g2 = (TGraphAsymmErrors*) f2 -> Get("Graph"); | ||
TGraphAsymmErrors * g3 = (TGraphAsymmErrors*) f3 -> Get("Graph"); | ||
TGraphAsymmErrors * g4 = (TGraphAsymmErrors*) f4 -> Get("Graph"); | ||
|
||
TMultiGraph * mg = new TMultiGraph(); | ||
|
||
mg -> Add(g1); | ||
mg -> Add(g2); | ||
mg -> Add(g3); | ||
mg -> Add(g4); | ||
|
||
mg -> Draw("ap"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
void PlotsBTagCSV_MC() | ||
{ | ||
TFile * f1 = new TFile("qcd_2600_bx_HLT_2CaloJets100_2CaloBTagCSV084_2PFJets100.root","old"); | ||
TFile * f2 = new TFile("qcd_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100.root","old"); | ||
TFile * f3 = new TFile("qcd_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_Eta2p1.root","old"); | ||
TFile * f4 = new TFile("qcd_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_Eta2p1_dEta1p5.root","old"); | ||
|
||
TGraphAsymmErrors * g1 = (TGraphAsymmErrors*) f1 -> Get("rate_total"); | ||
TGraphAsymmErrors * g2 = (TGraphAsymmErrors*) f2 -> Get("rate_total"); | ||
TGraphAsymmErrors * g3 = (TGraphAsymmErrors*) f3 -> Get("rate_total"); | ||
TGraphAsymmErrors * g4 = (TGraphAsymmErrors*) f4 -> Get("rate_total"); | ||
|
||
TMultiGraph * mg = new TMultiGraph(); | ||
|
||
mg -> Add(g1); | ||
mg -> Add(g2); | ||
mg -> Add(g3); | ||
mg -> Add(g4); | ||
|
||
mg -> Draw("ap"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
void PlotsBTagMu() | ||
{ | ||
TFile * f1 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV084_2PFJets40_psw.root","old"); | ||
TFile * f2 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets40_psw.root","old"); | ||
TFile * f3 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets50e40_Eta2p1_psw.root ","old"); | ||
TFile * f4 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets50e40_Eta2p1_dEta1p5_psw.root","old"); | ||
|
||
|
||
TGraphAsymmErrors * g1 = (TGraphAsymmErrors*) f1 -> Get("Graph"); | ||
TGraphAsymmErrors * g2 = (TGraphAsymmErrors*) f2 -> Get("Graph"); | ||
TGraphAsymmErrors * g3 = (TGraphAsymmErrors*) f3 -> Get("Graph"); | ||
TGraphAsymmErrors * g4 = (TGraphAsymmErrors*) f4 -> Get("Graph"); | ||
|
||
TMultiGraph * mg = new TMultiGraph(); | ||
|
||
// mg -> Add(g1); | ||
mg -> Add(g2); | ||
mg -> Add(g3); | ||
// mg -> Add(g4); | ||
|
||
mg -> Draw("ap"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
void PlotsBTagMu_MC() | ||
{ | ||
TFile * f1 = new TFile("qcd_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV084_2PFJets40.root","old"); | ||
TFile * f2 = new TFile("qcd_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets40.root","old"); | ||
TFile * f3 = new TFile("qcd_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets50e40_Eta2p1.root ","old"); | ||
TFile * f4 = new TFile("qcd_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets50e40_Eta2p1_dEta1p5.root","old"); | ||
|
||
|
||
TGraphAsymmErrors * g1 = (TGraphAsymmErrors*) f1 -> Get("rate_total"); | ||
TGraphAsymmErrors * g2 = (TGraphAsymmErrors*) f2 -> Get("rate_total"); | ||
TGraphAsymmErrors * g3 = (TGraphAsymmErrors*) f3 -> Get("rate_total"); | ||
TGraphAsymmErrors * g4 = (TGraphAsymmErrors*) f4 -> Get("rate_total"); | ||
|
||
TMultiGraph * mg = new TMultiGraph(); | ||
|
||
// mg -> Add(g1); | ||
mg -> Add(g2); | ||
mg -> Add(g3); | ||
// mg -> Add(g4); | ||
|
||
mg -> Draw("ap"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
void Plots_2x() | ||
{ | ||
// All had | ||
// TFile * f1 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV084_2PFJets100_psw.root","old"); | ||
// TFile * f2 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_psw.root","old"); | ||
// All had MC | ||
// TFile * f1 = new TFile("qcd_2600_bx_HLT_2CaloJets100_2CaloBTagCSV084_2PFJets100_psw.root","old"); | ||
// TFile * f2 = new TFile("qcd_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_psw.root","old"); | ||
|
||
// Semilep | ||
TFile * f1 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV084_2PFJets40_psw.root","old"); | ||
TFile * f2 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets40_psw.root","old"); | ||
// Semilep MC | ||
// TFile * f1 = new TFile("qcd_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV084_2PFJets40_psw.root","old"); | ||
// TFile * f2 = new TFile("qcd_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets40_psw.root","old"); | ||
|
||
|
||
TGraphAsymmErrors * g1 = (TGraphAsymmErrors*) f1 -> Get("rate_total"); | ||
g1 -> SetName("rate1"); | ||
TGraphAsymmErrors * g2 = (TGraphAsymmErrors*) f2 -> Get("rate_total"); | ||
g2 -> SetName("rate2"); | ||
|
||
int n = 2; | ||
double x[2] = {0,70}; | ||
double y[2] = {0,0}; | ||
TGraph * gdummy = new TGraph(n,x,y); | ||
|
||
g1 -> SetMarkerStyle(25); | ||
g2 -> SetMarkerStyle(25); | ||
g1 -> SetMarkerStyle(20); | ||
g2 -> SetMarkerStyle(20); | ||
g2 -> SetMarkerColor(kRed); | ||
g2 -> SetLineColor(kRed); | ||
|
||
double minfit = 15; | ||
double maxfit = 40; | ||
|
||
TCanvas * c1 = new TCanvas("c1","", 700,600); | ||
// c1->SetLeftMargin(0.15); | ||
|
||
TF1 * pol1_1 = new TF1("pol1_1","pol1",minfit,70); | ||
pol1_1 -> SetLineColor(kBlack); | ||
pol1_1 -> SetLineStyle(1); | ||
TFitResultPtr fit1 = g1 -> Fit(pol1_1,"S","",minfit,maxfit); | ||
|
||
TF1 * pol1_2 = new TF1("pol1_2","pol1",minfit,70); | ||
pol1_2 -> SetLineColor(kRed); | ||
pol1_2 -> SetLineStyle(1); | ||
TFitResultPtr fit2 = g2 -> Fit(pol1_2,"S","",minfit,maxfit); | ||
|
||
|
||
TMultiGraph * mg = new TMultiGraph(); | ||
|
||
mg -> Add(g1); | ||
mg -> Add(g2); | ||
mg -> Add(gdummy); | ||
|
||
|
||
mg -> Draw("ap"); | ||
|
||
pol1_1 -> Draw("same"); | ||
pol1_2 -> Draw("same"); | ||
|
||
TLegend * leg = new TLegend(0.15,0.75,0.6,0.9); | ||
leg->AddEntry(g1,"Data 2016 hltCSV > 0.84","p"); | ||
leg->AddEntry(g2,"Data 2016 hltCSV > 0.92","p"); | ||
|
||
leg -> Draw(); | ||
mg -> GetXaxis() -> SetRangeUser(10,70); | ||
mg -> GetYaxis() -> SetTitle("rate (Hz)"); | ||
mg -> GetXaxis() -> SetTitle("pile up"); | ||
// mg -> GetYaxis() -> SetTitleOffset(2); | ||
|
||
mg -> SetMinimum(0); | ||
mg -> SetMaximum(90); | ||
gPad->Modified(); | ||
|
||
c1 -> SaveAs("data_80x_rates_semilep.png"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
void Plots_2xData() | ||
{ | ||
// All had | ||
TFile * f1 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV084_2PFJets100_psw.root","old"); | ||
TFile * f2 = new TFile("data_2600_bx_HLT_2CaloJets100_2CaloBTagCSV092_2PFJets100_psw.root","old"); | ||
|
||
// Semilep | ||
// TFile * f1 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV084_2PFJets40_psw.root","old"); | ||
// TFile * f2 = new TFile("data_2600_bx_HLT_2CaloJets30_Muon12_2CaloBTagCSV092_2PFJets40_psw.root","old"); | ||
|
||
|
||
TGraphAsymmErrors * g1 = (TGraphAsymmErrors*) f1 -> Get("rate_total"); | ||
g1 -> SetName("rate1"); | ||
TGraphAsymmErrors * g2 = (TGraphAsymmErrors*) f2 -> Get("rate_total"); | ||
g2 -> SetName("rate2"); | ||
|
||
int n = 2; | ||
double x[2] = {0,70}; | ||
double y[2] = {0,0}; | ||
TGraph * gdummy = new TGraph(n,x,y); | ||
|
||
g1 -> SetMarkerStyle(20); | ||
g2 -> SetMarkerStyle(20); | ||
g2 -> SetMarkerColor(kRed); | ||
g2 -> SetLineColor(kRed); | ||
|
||
|
||
TCanvas * c1 = new TCanvas("c1","", 700,600); | ||
// c1->SetLeftMargin(0.15); | ||
|
||
TF1 * pol1_1 = new TF1("pol1_1","pol1",15,70); | ||
pol1_1 -> SetLineColor(kBlack); | ||
TFitResultPtr fit1 = g1 -> Fit(pol1_1,"S","",15,40); | ||
|
||
TF1 * pol1_2 = new TF1("pol1_2","pol1",15,70); | ||
pol1_2 -> SetLineColor(kRed); | ||
TFitResultPtr fit2 = g2 -> Fit(pol1_2,"S","",15,40); | ||
|
||
|
||
TMultiGraph * mg = new TMultiGraph(); | ||
|
||
mg -> Add(g1); | ||
mg -> Add(g2); | ||
mg -> Add(gdummy); | ||
|
||
|
||
mg -> Draw("ap"); | ||
|
||
pol1_1 -> Draw("same"); | ||
pol1_2 -> Draw("same"); | ||
|
||
mg -> GetXaxis() -> SetRangeUser(10,70); | ||
mg -> GetYaxis() -> SetTitle("rate (Hz)"); | ||
mg -> GetXaxis() -> SetTitle("pile up"); | ||
// mg -> GetYaxis() -> SetTitleOffset(2); | ||
|
||
mg -> SetMinimum(0); | ||
mg -> SetMaximum(40); | ||
gPad->Modified(); | ||
|
||
c1 -> SaveAs("data2016_rates_allhad.png"); | ||
|
||
} |
Oops, something went wrong.