-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix: Allow matching to only primary particles #1356
Conversation
Capybara summary for PR 1356 |
I was waiting for someone else to response. My first thought that, indeed, I wasn't able to understand your screenshots, second one mentions index 34, but the first one has ~20 particles. I suspect, they were taken from different events. |
It could be that the primaries should somehow take priority, but that's not what you suggest. |
Hi Dmitry. Thanks. Yeah, thinking about it, I agree that do this 'geometric' matching to charged particles created in the tracking volume makes sense (e.g. a electron-positron pair created by a conversion photon.) In the screenshots above, I used the For event 22 in my file:
There are 2 matched particles. If I plot the generator status, PDG ID, total momentum, and the r and z of the creation point, I see this for the matched particle 1:
and this for the matched particle 2:
You can see that the second particle is created at |
I think, we need to implement a different algorithm in place of this one. It could determine leading MCParticle by looking up Track -> Measurement2D -> TrackerHit. |
A workaround for your problem might be to check the DCA from MC vertex to the track. |
### Briefly, what does this PR introduce? The #1564 had implemented meaningful associations based on hits used. That information became available for Tracks, but end users use ReconstructedParticles, and that's what we'd like to have implemented in this PR. Closes: #1356 ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [x] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No There will be new warnings like ``` [PFRICH:RICHEndcapNLUTPID] [warning] Found a duplicate association for ReconstructedParticle at index 18 [PFRICH:RICHEndcapNLUTPID] [warning] The previous MCParticle was at 149 and the duplicate is at 200 ``` those are mostly harmless and are to be addressed separately. ### Does this PR change default behavior? Yes --------- Co-authored-by: Wouter Deconinck <[email protected]>
Briefly, what does this PR introduce?
In current main branch, it is possible to match a reconstructed track to a secondary particle with generatorStatus==0. An example where this incorrectly happens can be seen below.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
Does this PR change default behavior?
Yes, for matching of ReconstructedChargedParticles and ReconstructedSeededChargedParticles