Skip to content

Commit f8037c6

Browse files
authored
Merge pull request #615 from SBNSoftware/feature/pgreen_g4rw_daughters_fix
g4rw daughters fix
2 parents 61ca4af + 9ed6da0 commit f8037c6

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

sbncode/SBNEventWeight/Calculators/Geant4/Geant4WeightCalc.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,13 @@ std::vector<float> Geant4WeightCalc::GetWeight(art::Event& e, size_t itruth ) {
392392

393393
theTraj.AddStep( theStep );
394394

395-
for( size_t k = 0; k < daughter_PDGs.size(); ++k ){
396-
theTraj.AddChild( new G4ReweightTraj(daughter_IDs[k], daughter_PDGs[k], mcpID, event_num, std::make_pair(0,0) ) );
397-
}
398395
} // end loop over nSteps (istep)
396+
397+
// add daughters
398+
for( size_t k = 0; k < daughter_PDGs.size(); ++k ){
399+
theTraj.AddChild( new G4ReweightTraj(daughter_IDs[k], daughter_PDGs[k], mcpID, event_num, std::make_pair(0,0) ) );
400+
}
401+
399402
p_track_length = theTraj.GetTotalLength();
400403

401404
p_init_momentum = sqrt( theTraj.GetEnergy()*theTraj.GetEnergy() - mass*mass );

0 commit comments

Comments
 (0)