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
remove vertex type from PFCandidate (addresses #30895) #31298
Conversation
- set vertex position of PFCandidate in PFAlgo, PFEGammaAlgo, and PFMuonAlgo - remove vertex related member-functions from PFCandidate class (use the member-fuctions defined in the LeafCandidate base-class instead) - updated ClassDefs in classes_def.xml files accordingly
@veelken, CMSSW_11_2_X branch is closed for direct updates. cms-bot is going to move this PR to master branch. |
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31298/18025
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
these should be addressed before further tests of this PR can proceed |
@hatakeyamak @bendavid |
The code-checks are being triggered in jenkins. |
Hi, I have renamed the title of the PR and applied the patches code-format.patch and code-format.patch . |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31298/18031
|
A new Pull Request was created by @veelken (Christian Veelken) for master. It involves the following packages: DataFormats/ParticleFlowCandidate @perrotta, @jpata, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@veelken thanks for preparing a first implementation for the issue #30895, as suggested in #30895 (comment). However, if you are planning to hand this over to someone else, they will not be able to update your PR. Hence, if the plan is that the PF group takes over this proposed modification, it would be best to close this PR and simply link your new branch (good to put it with a descriptive branch name, like veelken:issue_30895) in the issue. Then the next person can check out your branch and open a new PR that they can update. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@veelken @hatakeyamak as reported by the test, there are a number of minor differences in the isolation values, at least, see the example below:
Given that this PR is expected to be technical (no reco change), please let us know how you want to move forward. |
Hi, just to clarify: a small change for electrons is ok, I think, resulting from the fact that the code so far took the vertex position for electrons from the KF track and not from the GSF track, due to the issue with the enum value PFCandidate::kGSFVertex not being used before. @hatakeyamak , do you agree that the changes are small enough to be ok ? |
Note that there are differences also in e.g. muon and photon isolation values: Let's wait for @hatakeyamak decision on how to proceed. If this PR goes ahead, I will do a code review. |
Thank you @veelken and @jpata, and sorry for delays from my side. The use of vertex assocciated with the gsfTrackRef() in PFEGammaAlgo seems like a right thing to do, but @bendavid is more familiar with the PFEGamma related code than me. |
I've gone through the code and it looks fine to me. Vertex is just a point, which previously was loaded from a referenced collection, but is now saved directly. Since we no longer save the vertex type, the event size decreases. What I don't understand is why it was implemented through the references in the first place, rather than in the straightforward way as this PR does. Do you know @hatakeyamak? |
Nope. So, to me this (in this PR) looks like a fine approach. |
Thanks! Before proceeding with this, I just want to check also with EGamma contacts @afiqaize @SohamBhattacharya. Do you have any thoughts on this change to PFCandidate vertex, which has some minor effects on electron and photon isolation? |
We agree that the change for electrons is the intended behavior. For photons, we are wondering if the changes are understood (maybe the changes happen only to converted photons etc)? |
note: I'm digging through the isolation code to understand why the photon, muon and tau isolation changes, but haven't hit the reason yet. |
Hi Joosep, the tau isolation takes into account all charged PFCandidates within a dz < 0.2 cm window around the tau production vertex. My hypothesis that using the vertex associated to the GSF track instead of the KF track for electrons causes some electrons to either move into or move out of the dz < 0.2 cm window. I am not an expert for the isolation of photons and muons, but I believe they can be subject to a similar effect (arising from a dz cut that is applied in order to suppress pileup contributions to their isolation pT-sum). |
@jpata |
Thanks Slava! Following the thread for
I guess this has to do with requiring the vertex being saved in the RECO step that runs PF, which makes later workflows that do not run reconstruction in-place incorrect. Thoughts? |
Suggestion from Slava: add IO read rule to the class def XML, such that the old version of the class would be able to load the correct vertex collection in the case of e.g. reMINIAOD jobs. |
@veelken will you do this, or should we (reco) take over at this point? |
@jpata It would be great if you (reco) could take over at this point. Thank you! |
-1 OK. I think the easiest will be that you close this PR, and I open a new one with a branch I can change. |
this commit addressed the GitHub issue #30895 :
PR description:
This PR adresses the GitHub issue #30895 .
No changes are expected in the output, except (maybe) for PFCandidates of type electron.
This is because the enum value PFCandidate::kGSFVertex was not used before, causing the function PFCandidate::vertex() to never return the vertex associated with the gsfTrackRef(), which I believe is a (minor) bug. In this PR, the vertex of PFCandidates of type electron is set to the vertex assocciated with the gsfTrackRef() in PFEGammaAlgo, which I believe is the intended behaviour.
PR validation:
if this PR is a backport please specify the original PR and why you need to backport that PR:
Before submitting your pull requests, make sure you followed this checklist: