Skip to content

Commit

Permalink
Add index leaf to allow navigation to sub-ranked genealogy sim info. …
Browse files Browse the repository at this point in the history
…Allow matching multiple sim particles by default
  • Loading branch information
brownd1978 committed Nov 21, 2023
1 parent cf3b1b3 commit 38c6bfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@ dioLLWeight : {
}
genCountLogger: { module_type: GenEventCountReader }

AllOpt : { fillMC : true
AllOpt : {
fillMC : true
trkqual : "TrkQual"
fillTrkQual : true
trkpid : "TrkPID"
fillTrkPID : true
fillHits : true
genealogyDepth : -1
matchDepth : -1
}

DeM : { input : "KK"
Expand Down
1 change: 1 addition & 0 deletions inc/SimInfo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace mu2e
Int_t proc = -1; // process code
Int_t gen = -1; // generator code
Float_t time = -1.0; // Origin time of the SimParticle
Int_t index; // index into the SimInfo vector
XYZVectorF mom = XYZVectorF(); // origin momentumof the SimParticle
XYZVectorF pos = XYZVectorF(); // origin position of the SimParticle
MCRelationship prirel = MCRelationship::none; // relationship to the event primary particles
Expand Down
4 changes: 3 additions & 1 deletion src/InfoMCStructHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ namespace mu2e {
sim_info.nhits = kseedmc.simParticle(imatch)._nhits;
sim_info.nactive = kseedmc.simParticle(imatch)._nactive;
}

// record the index this object will have
sim_info.index = siminfos.size();
siminfos.push_back(sim_info);
if (current_sim_particle.parent().isNonnull()) {
current_sim_particle_ptr = current_sim_particle.parent();
Expand Down Expand Up @@ -189,6 +190,7 @@ namespace mu2e {
auto trkprimaryptr = kseedmc.simParticle().simParticle(_spcH);
sim_info.trkrel = MCRelationship(spp, trkprimaryptr);
sim_info.prirel = MCRelationship(spp, spp);
sim_info.index = siminfos.size();
siminfos.push_back(sim_info);
}
}
Expand Down

0 comments on commit 38c6bfa

Please sign in to comment.