Skip to content
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

Guard against empty MC truth objects #174

Open
edcallaghan opened this issue Jun 25, 2024 · 3 comments
Open

Guard against empty MC truth objects #174

edcallaghan opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels
art / Offline This requires some touching of art / Offline enhancement New feature or request

Comments

@edcallaghan
Copy link

Mu2e/Offline#1245 implemented a modality in which StrawDigis may be read from external files, as opposed to being simulated. A consequence of this is the production of MC-truth objects associated with these digis, for which no MC truth actually exists. In TrkAna, this manifests as data-corruption when inspecting TrkStrawHitMC objects. In particular, inspection of reasonably-assumed-to-exist-but-nevertheless-absent SimParticles cause exceptions --- for example, here: https://github.com/Mu2e/TrkAna/blob/main/src/InfoMCStructHelper.cc#L101. All accesses to TrkStrawHitMCs should query the "provenance" field (TrkStrawHitMC::_provenance), and short-circuit the relevant inspection if the provenance is TrkStrawHitMCProvenance::External. I suppose that a dummy value must then be propagated to the trees or flag field be introduced so that the entries without true MC information can be masked out from analysis. I can get to implementing the guards, but I'll defer to the TrkAna experts on the best choice as to how this should actually propagate to the output trees.

@brownd1978
Copy link
Contributor

brownd1978 commented Jun 25, 2024 via email

@AndrewEdmonds11
Copy link
Collaborator

Thanks, Ed. We have a similar situation with the genealogy of SimParticles, where we have already compressed out some of the older generations. For this we have a valid leaf in the SimInfo branch (https://github.com/Mu2e/TrkAna/blob/9e4d29d3fd75cce7c1184e4cede073cd0a2dfe95/inc/SimInfo.hh#L15). I think the same solution here would be good. Could you implement that at the same time as you implement the guards?

@AndrewEdmonds11 AndrewEdmonds11 added enhancement New feature or request art / Offline This requires some touching of art / Offline labels Jun 25, 2024
@edcallaghan
Copy link
Author

edcallaghan commented Jun 25, 2024

@brownd1978 You can look at ~ejc3/mu2e/dm/effect/dm-ce/out/000/000.art on the fnal machines (should be public-readable, let me know if not). This is a small sample of digi-mixed conversion electrons in which the pileup digis are all External.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
art / Offline This requires some touching of art / Offline enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

3 participants