-
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
[PileupJetId, Puppi] Pileup ID input variable fix, puppi weight ValueMap access, optional photon protection for existing puppi weights #40762
Conversation
…_fix_withpuppiproducerfix Make photon protection for existing weights an option
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40762/34181
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40762/34190 ERROR: Build errors found during clang-tidy run.
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40762/34192
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
type jme |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a8a73f/30640/summary.html Comparison SummarySummary:
NANO Comparison SummarySummary:
Nano size comparison Summary:
|
type jetmet |
Thanks @jshin96 , About the bugfix you say:
But looking at the comparison plots for Run2 samples (CHS), there are rather significant differences for puID for forward jets - which would make sense, since even for CHS these jets wouldn't have many charged consistuents, see eg: Isn't this something we should worry about for current Run2 UL samples? Or would the effect on analysis be negligible because it would be the same in both data and MC? |
Hi @swertz, (Let me answer on behalf of @jshin96 )
I would not worry about it because the trainings were derived with the buggy calculation in place and also when the discriminant is calculated. Also its the same for both data and MC, as you mentioned. In any case, if there is a re-nano or even a re-mini of Run-2 UL samples, we should definitely re-train (in the event we are still sticking to CHS jets). This is the plan anyway when we have to switch to Puppi jets for AK4 jets. |
+1 Thanks for the clarification @nurfikri89 . @jshin96, can you please prepare a backport to 13_0_X? |
+reconstruction |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). 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
|
[PileupJetId, Puppi] Backport of #40762 (Pileup ID input variable fix, puppi weight ValueMap access, optional photon protection for existing puppi weights) to CMSSW_13_0_X
@@ -491,7 +522,7 @@ PileupJetIdentifier PileupJetIdAlgo::computeIdVariables(const reco::Jet* jet, | |||
double dZ0 = 9999.; | |||
double dZ_tmp = 9999.; | |||
for (unsigned vtx_i = 0; vtx_i < allvtx.size(); vtx_i++) { | |||
const auto& iv = allvtx[vtx_i]; | |||
auto iv = allvtx[vtx_i]; |
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.
Comparing the 12_6 backport with this PR, I notice that this updates was not backported.
While I agree about not backporting it, I wonder why it was even included in the master PR: should it get reverted at some point?
[PileupJetId, Puppi] Backport of #40762 (Pileup ID input variable fix, puppi weight ValueMap access, optional photon protection for existing puppi weights) to CMSSW_12_6_X
PR description:
This PR has three main modifications:
PileupJetIdProducer and PileupJetIdAlgo are used to compute input variables and the final discriminant for
the Pileup jet Id BDT. There was a bug for one of the variable calculation such that when there is no charged
constituent inside a jet, it assigns the very last constituent in the list of constituent as leading charged
constituent. This PR corrects this error and assigns zero pt and large phi and eta when there is no charged
constituent.
Previously, the puppi weight for each constituent was accessed from packedCandidate object in the code, but for the
compatibility with other codes in CMSSW, this weight must be implemented through ValueMap. In this PR, puppi
weight retrieval from ValueMap is implemented, just like PR #40667. As in that PR, the naming of "puppi weight" is
generalized to "constituent weight". Furthermore, there are parts of PileupJetIdAlgo where comparison of constituent's pt
(in order to find, for example, leading charged constituent) was done incorrectly when weighted pt was compared with
unweighted pt. This error is also fixed.
The ValueMap implementation does not affect CHS jets. However, the fix in leading charged constituent selection could
have affected CHS jets. In further detail, CHS jets have more constituents in each jet in general and it is very rare
for CHS jets to have no charged constituent at all, so the effect of such fix was insignificant.
Previously the photon protection is applied also on existing puppi weights. This will confuse users who would want
PuppiProducer to provide ValueMap of weights with the same exact weights stored in packedPFCandidates in MiniAODs.
This PR adds a flag (default set to False) to enable photon protection on existing puppi weights.
PR validation: