-
Notifications
You must be signed in to change notification settings - Fork 21
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
Comments
Could you please provide an example file which includes ‘external’ digis?
David Brown ***@***.***
Office Phone (510) 486-7261
Lawrence Berkeley National Lab
M/S 50R5008 (50-6026C) Berkeley, CA 94720
…On Mon, Jun 24, 2024 at 17:25 Ed Callaghan ***@***.***> wrote:
Mu2e/Offline#1245 <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.
—
Reply to this email directly, view it on GitHub
<#174>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAH576VGKTOOVCQDDHLTUDZJC2GDAVCNFSM6AAAAABJ2YUVDWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TCMZVGE3DIOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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 |
@brownd1978 You can look at |
Mu2e/Offline#1245 implemented a modality in which
StrawDigi
s 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. InTrkAna
, this manifests as data-corruption when inspectingTrkStrawHitMC
objects. In particular, inspection of reasonably-assumed-to-exist-but-nevertheless-absentSimParticle
s cause exceptions --- for example, here: https://github.com/Mu2e/TrkAna/blob/main/src/InfoMCStructHelper.cc#L101. All accesses toTrkStrawHitMC
s should query the "provenance" field (TrkStrawHitMC::_provenance
), and short-circuit the relevant inspection if the provenance isTrkStrawHitMCProvenance::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 theTrkAna
experts on the best choice as to how this should actually propagate to the output trees.The text was updated successfully, but these errors were encountered: