152 TLegend* leg_eta =
new TLegend(0.26, 0.73, 0.935, 0.90);
153 TLegend* leg_pt =
new TLegend(0.26, 0.73, 0.935, 0.90);
155 leg_eta->SetBorderSize(0);
156 leg_eta->SetLineStyle(0);
157 leg_eta->SetFillStyle(0);
159 leg_eta->SetTextFont(42);
160 leg_pt->SetBorderSize(0);
161 leg_pt->SetLineStyle(0);
162 leg_pt->SetFillStyle(0);
164 auto tag = PlotBase::getTag<0>();
165 auto iov =
tag.iovs.front();
167 unsigned int run = std::get<0>(iov);
169 std::stringstream ss_tagname(
tag.name);
176 getline(ss_tagname, stmp,
'_');
177 getline(ss_tagname, stmp,
'_');
179 getline(ss_tagname, stmp,
'_');
180 tag_ver +=
'_' + stmp;
181 getline(ss_tagname, stmp,
'_');
182 tag_ver +=
'_' + stmp;
183 getline(ss_tagname, stmp,
'_');
184 tag_ver +=
'_' + stmp;
185 getline(ss_tagname, stmp,
'_');
187 getline(ss_tagname, stmp,
'_');
191 if (!
payload->getRecords().empty() &&
192 payload->getDefinition().getFormulaString().compare(
"") == 0)
197 if (!
record.getVariablesRange().empty() &&
payload->getDefinition().getVariableName(0) ==
"JetPt" &&
198 record.getVariablesRange()[0].is_inside(100.)) {
199 if (
record.getBinsRange().size() > 1 &&
payload->getDefinition().getBinName(1) ==
"Rho" &&
200 record.getBinsRange()[1].is_inside(20.)) {
201 if (!
record.getBinsRange().empty() &&
payload->getDefinition().getBinName(0) ==
"JetEta") {
206 if (
record.getBinsRange()[0].is_inside(x_axis)) {
207 std::vector<double>
var = {100.};
208 std::vector<double> param;
209 for (
size_t i = 0;
i <
record.getParametersValues().size();
i++) {
210 double par =
record.getParametersValues()[
i];
211 param.push_back(par);
213 float res =
f.evaluate(
var, param);
214 resol_eta->SetBinContent(
idx + 1,
res);
221 if (!
record.getBinsRange().empty() &&
payload->getDefinition().getBinName(0) ==
"JetEta" &&
222 record.getBinsRange()[0].is_inside(2.30)) {
223 if (
record.getBinsRange().size() > 1 &&
payload->getDefinition().getBinName(1) ==
"Rho" &&
224 record.getBinsRange()[1].is_inside(15.)) {
225 if (!
record.getVariablesRange().empty() &&
payload->getDefinition().getVariableName(0) ==
"JetPt") {
230 if (
record.getVariablesRange()[0].is_inside(x_axis)) {
231 std::vector<double>
var = {x_axis};
232 std::vector<double> param;
233 for (
size_t i = 0;
i <
record.getParametersValues().size();
i++) {
234 double par =
record.getParametersValues()[
i];
235 param.push_back(par);
237 float res =
f.evaluate(
var, param);
238 resol_pt->SetBinContent(
idx + 1,
res);
246 gStyle->SetOptStat(0);
247 gStyle->SetLabelFont(42,
"XYZ");
248 gStyle->SetLabelSize(0.05,
"XYZ");
249 gStyle->SetFrameLineWidth(3);
252 TCanvas
canvas(
"Jet Resolution Summary",
title.c_str(), 800, 1200);
256 resol_eta->SetTitle(tag_res.c_str());
257 resol_eta->SetXTitle(
"#eta");
258 resol_eta->SetYTitle(
"Resolution");
259 resol_eta->SetLineWidth(3);
260 resol_eta->SetMaximum(resol_eta->GetMaximum() * 1.25);
263 leg_eta->AddEntry(resol_eta, (tag_ver +
'_' + tag_jet).c_str(),
"l");
264 leg_eta->AddEntry((TObject*)
nullptr,
"JetPt=100, Rho=20",
"");
268 resol_pt->SetXTitle(
"p_{T} [GeV]");
269 resol_pt->SetYTitle(
"Resolution");
270 resol_pt->SetLineWidth(3);
271 resol_pt->Draw(
"][");
273 leg_pt->AddEntry(resol_pt, (tag_ver +
'_' + tag_jet).c_str(),
"l");
274 leg_pt->AddEntry((TObject*)
nullptr,
"JetEta=2.3, Rho=15",
"");
std::string m_imageFileName
std::string title() const
std::shared_ptr< JetResolutionObject > fetchPayload(const cond::Hash &payloadHash)