Skip to content

Commit

Permalink
Geant4InputHandling: collectPrimaries: use the mask to place the daug…
Browse files Browse the repository at this point in the history
…hter vertices rather than size of the map

Now every place where interaction->vertices map is being used, the mask is used as the key to the map, instead of something else
  • Loading branch information
andresailer committed Dec 15, 2023
1 parent dea8e5c commit 424f39c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DDG4/src/Geant4InputHandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ static void collectPrimaries(Geant4PrimaryMap* pm,

if ( dau ) {
Geant4Vertex* dv = new Geant4Vertex(*particle_origine);
int vid = int(interaction->vertices.size());
PropertyMask reason(p->reason);
reason.set(G4PARTICLE_HAS_SECONDARIES);

dv->mask = mask;
dv->in.insert(p->id);

interaction->vertices[vid].emplace_back(dv) ;
interaction->vertices[mask].emplace_back(dv) ;

for(; dau; dau = dau->GetNext())
collectPrimaries(pm, interaction, dv, dau);
Expand Down

0 comments on commit 424f39c

Please sign in to comment.