Skip to content

Commit

Permalink
improve titles of plots in eta bins
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed May 20, 2024
1 parent 921e90b commit b7bf76b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Alignment/OfflineValidation/interface/DiLeptonVertexHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,26 @@ namespace DiLeptonHelp {
if (etaReg == etaRegion::END)
continue;

const auto& toSub = m_etaRegionNames[etaReg];

if (((TObject*)histo)->InheritsFrom("TH2")) {
m_h2_map[etaReg] = fs.make<TH2F>(
(name + "_" + m_etaRegionNames[etaReg]).c_str(),
(title + " (" + m_etaRegionNames[etaReg] + ");" + xTitle + ";" + yTitle + ";" + zTitle).c_str(),
(name + "_" + toSub).c_str(),
(title + " (" + toSub + ");" + xTitle + " (" + toSub + ") ;" + yTitle + " (" + toSub + ");" + zTitle)
.c_str(),
histo->GetNbinsX(),
histo->GetXaxis()->GetXmin(),
histo->GetXaxis()->GetXmax(),
histo->GetNbinsY(),
histo->GetYaxis()->GetXmin(),
histo->GetYaxis()->GetXmax());
} else {
m_h1_map[etaReg] =
fs.make<TH1F>((name + "_" + m_etaRegionNames[etaReg]).c_str(),
(title + " (" + m_etaRegionNames[etaReg] + ");" + xTitle + ";" + yTitle).c_str(),
histo->GetNbinsX(),
histo->GetXaxis()->GetXmin(),
histo->GetXaxis()->GetXmax());
m_h1_map[etaReg] = fs.make<TH1F>(
(name + "_" + toSub).c_str(),
(title + " (" + toSub + ");" + xTitle + " (" + toSub + ") ;" + yTitle + " (" + toSub + ")").c_str(),
histo->GetNbinsX(),
histo->GetXaxis()->GetXmin(),
histo->GetXaxis()->GetXmax());
}
}

Expand Down

0 comments on commit b7bf76b

Please sign in to comment.