aboutsummaryrefslogtreecommitdiffstats
path: root/src/G4BeamTestUserTrackingAction.cxx
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2019-08-02 22:46:21 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2019-08-02 22:46:21 +0100
commitba4dd395d1f163983f7102ff9a6c513cfe17912e (patch)
treed92e207a2e743dd7628cc7bc6397a34d081eafbf /src/G4BeamTestUserTrackingAction.cxx
parentd0533d03d0c85f2f993f1793a6b9ea2af3391207 (diff)
downloadG4BeamTest-ba4dd395d1f163983f7102ff9a6c513cfe17912e.tar.gz
G4BeamTest-ba4dd395d1f163983f7102ff9a6c513cfe17912e.zip
Fri 2 Aug 22:46:21 BST 2019
Diffstat (limited to 'src/G4BeamTestUserTrackingAction.cxx')
-rw-r--r--src/G4BeamTestUserTrackingAction.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/G4BeamTestUserTrackingAction.cxx b/src/G4BeamTestUserTrackingAction.cxx
index f7c053b..e41ccc3 100644
--- a/src/G4BeamTestUserTrackingAction.cxx
+++ b/src/G4BeamTestUserTrackingAction.cxx
@@ -15,6 +15,7 @@ void G4BeamTestUserTrackingAction::PostUserTrackingAction(const G4Track* track)
G4UserLimits *limit = volume->GetUserLimits();
if(!limit) G4cout << "----> G4LogicalVolume: " << volume->GetName() << " has no defined G4UserLimit" << G4endl;
G4double threshold = limit->GetUserMinEkine(*track);
+ G4double max_threshold = 3.54;
G4TrackVector* secondaries = fpTrackingManager->GimmeSecondaries();
if(secondaries)
{
@@ -29,10 +30,15 @@ void G4BeamTestUserTrackingAction::PostUserTrackingAction(const G4Track* track)
{
//check if particle energy is below threshold; if true, kill the particle
G4double energy = (*secondaries)[i]->GetTotalEnergy();
- if(energy < threshold){
- G4cout << "TrackingAction: killing particle " << particle << " with energy " << energy << " < " << threshold << G4endl;
- (*secondaries)[i]->SetTrackStatus(fStopAndKill);
- }
+ // if(energy < threshold){
+ // G4cout << "TrackingAction: killing particle " << particle << " with energy " << energy << " < " << threshold << G4endl;
+ // (*secondaries)[i]->SetTrackStatus(fStopAndKill);
+ // }
+ // if (energy > max_threshold * CLHEP::eV){
+ // G4cout << "TrackingAction: killing particle " << particle << " with energy " << energy << " > " << max_threshold << G4endl;
+ // (*secondaries)[i]->SetTrackStatus(fStopAndKill);
+
+ // }
}
}
}