-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pt dependent SF and add legends on summary plots #41240
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41240/34966
|
A new Pull Request was created by @yuanchao (Yuan CHAO) for master. It involves the following packages:
@cmsbuild, @tvami, @saumyaphor4252, @francescobrivio can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41240/34975
|
Pull request #41240 was updated. @cmsbuild, @tvami, @saumyaphor4252, @francescobrivio can you please check and sign again. |
// leg->SetFillColor(0); | ||
// leg->SetLineColor(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
// leg->SetFillColor(0); | ||
// leg->SetLineColor(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented out code
|
||
// payload->getDefinition().getBinName(1) == "JetPt" && | ||
// !record.getBinsRange()[1].is_inside(500.) ) | ||
// continue; // for 2-bin payload, take jetpt=500 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legend entry question is something I only pointed out once, but it's there several times
if (record.getBinsRange()[0].is_inside(x_axis)) { | ||
if (((is_2bin == false) || (is_2bin == true && record.getBinsRange()[1].is_inside(500.))) && | ||
record.getBinsRange()[0].is_inside(x_axis)) { | ||
//edm::LogWarning("JRObj_PI") << "JetEta " << x_axis << ", SF " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented out code
for (size_t it = 0; it <= NBIN_PT; it++) { | ||
double x_axis = (it + 0.5) * (MAX_PT - MIN_PT) / NBIN_PT + MIN_PT; | ||
if (record.getBinsRange()[1].is_inside(x_axis)) { | ||
//edm::LogWarning("JRObj_PI") << "JetPt " << x_axis << ", SF " << record.getParametersValues()[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented out code, here actually you could make it LogDebug right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
@@ -52,7 +52,7 @@ int main(int argc, char** argv) { | |||
histo4.process(connectionString, PI::mk_input(tag_eta, start, end)); | |||
std::cout << histo4.data() << std::endl; | |||
|
|||
std::cout << "## Jet SF Histograms" << std::endl; | |||
std::cout << "## Jet SF vs. Eta Histograms" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we void using the cout
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is simply a copy from the example unit test code provided. Surely I can replace them with LogINFO.
|
||
JME::JetScaleFactorVsPtUP histo10; | ||
histo10.process(connectionString, PI::mk_input(tag_sf, start, end)); | ||
std::cout << histo10.data() << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we void using the cout
s? In all the other occurrences too
sf_pt_norm->Draw("axis same"); | ||
|
||
leg_pt->AddEntry(sf_pt_norm, (tag_ver + '_' + tag_jet).c_str(), "l"); | ||
leg_pt->AddEntry((TObject*)nullptr, "JetEta=2.55", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this hardcoded to 2.55? Also isnt this less than 2.55 instead of the equal sign?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the Jet resolution part, I follow the plots in the presentation of Andrea that rho and eta or pt are fixed. As to SF, for this two-bin case, I pick up the eta region that has most records. (here 2.5-2.6, 2.55 is the central value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm but then the PI has the option to pass arguments, wouldnt it be better to be able to specify the eta instead of having these hardcoded numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the old JEC/JER web viewer shown in Andreas' slides uses fixed values and in the latest version users can choose from a drop-down menu, PI can only take float inputs. I need to check if some default values can be set, otherwise it's rather not-ideal. I'll deal with this after finish the JEC PI.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41240/35091
|
Pull request #41240 was updated. @cmsbuild, @tvami, @saumyaphor4252, @francescobrivio can you please check and sign again. |
add tests for SF vs. Pt removing commented code and use edm::MessageLogger
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41240/35100
|
Pull request #41240 was updated. @cmsbuild, @tvami, @saumyaphor4252, @francescobrivio can you please check and sign again. |
+db |
This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b2a4c6/31878/summary.html Comparison SummarySummary:
|
@@ -32,39 +32,55 @@ int main(int argc, char** argv) { | |||
cond::Time_t start = static_cast<unsigned long long>(1); | |||
cond::Time_t end = static_cast<unsigned long long>(1); | |||
|
|||
std::cout << "## Jet Pt Resolution Histograms" << std::endl; | |||
edm::LogWarning("JER_PI") << "## Jet Pt Resolution Histograms" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For test code, not used in productions, there is normally no strict requirement to move out of std::cout
.
In any case, since you are migrating to LogWarning
, please add the corresponding header include
#include "FWCore/MessageLogger/interface/MessageLogger.h"
which is now missing
@tvami your comment https://github.com/cms-sw/cmssw/pull/41240/files#r1154408873 was not implemented yet. Could you please confirm that this is still fine with you? |
Yes, Yuan agreed to follow-up on that in a next PR. Thanks for double-checking! |
+1 |
PR description:
As requested in AlCa meeting, adding support for JetResolutionObject SF records with Eta and Pt (2-bin). Corresponding histograms are added. Adding legends for PlotImage outputs.
PR validation:
Tested locally with getPayloadData.py script. Running scram code-checks and code-format.
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
This is not a backport.