Project

General

Profile

Bug #14843

LArG4 MCParticle hierarchy information

Added by Lynn Garren almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
12/15/2016
Due date:
% Done:

0%

Estimated time:
Occurs In:
Experiment:
-
Co-Assignees:
Duration:

Description

From John Marshall

    Hi Wes,

    I just wanted to press this issue again. I think the findings below indicate this is most likely a significant bug in larsim, scrambling the hierarchy information for all MCParticles that are not daughters of primary particles, if there are multiple MCTruth blocks present.

    Please pass this on to the relevant experts in time for discussion before larsim is frozen. I just pushed a feature branch to larsim (feature/ParentTrackIdOffset), but the diff illustrates a proposed change quite succinctly! This change certainly restored the functionality we needed to be able to construct pattern recognition metrics for BNB + cosmics samples.

    diff --git a/larsim/LArG4/ParticleListAction.cxx b/larsim/LArG4/ParticleListAction.cxx
    index 315669b..95814ca 100644
    --- a/larsim/LArG4/ParticleListAction.cxx
    +++ b/larsim/LArG4/ParticleListAction.cxx
    @@ -124,7 +124,7 @@ namespace larg4 {
         fCurrentTrackID = trackID;

         // And the particle's parent:
    -    G4int parentID = track->GetParentID();
    +    G4int parentID = track->GetParentID() + fTrackIDOffset;

         std::string process_name = "unknown";

    Thanks,

    John

I would expect this change to lead to a reduction in the number of MCShowers (as is observed). This is because it should correct the MCParticle hierarchy information for downstream elements of EM showers; the downstream MCParticles should now all contain valid mother track ids.

A number of MCParticles representing electrons or photons should now be identified as downstream of a parent particle, which induced the original shower. These should now be accounted for by the parent MCShower, rather than being incorrectly labelled as primary particles and forming a new MCShower, as previously.

History

#1 Updated by Lynn Garren almost 3 years ago

This bug is fixed in larsoft v06_18_00 (larsim v06_10_00).



Also available in: Atom PDF