Skip to content
Snippets Groups Projects
Commit f3518ce9 authored by Frank Gaede's avatar Frank Gaede
Browse files

dont't store backscatter that create no hits

parent 97d16e87
No related branches found
No related tags found
No related merge requests found
...@@ -102,13 +102,18 @@ void Geant4TCUserParticleHandler::end(const G4Track* /* track */, Particle& p) ...@@ -102,13 +102,18 @@ void Geant4TCUserParticleHandler::end(const G4Track* /* track */, Particle& p)
bool ends_in_trk_vol = ( r_end <= m_rTracker && z_end <= m_zTracker ) ; bool ends_in_trk_vol = ( r_end <= m_rTracker && z_end <= m_zTracker ) ;
// created and ended in calo // created and ended in calo
if( !starts_in_trk_vol && !ends_in_trk_vol ){ if( !starts_in_trk_vol ) {
p.reason = 0;
return ; if( !ends_in_trk_vol ){
p.reason = 0;
}
//fg: dont keep backscatter that did not create a tracker hit
else if( !( p.reason & G4PARTICLE_CREATED_TRACKER_HIT ) )
p.reason = 0;
} }
return ;
//fg: backscatter ??
// if( !starts_in_trk_vol && ends_in_trk_vol ){ keep ? }
} }
/// Post-event action callback /// Post-event action callback
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment