Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RangeTest Class Reference

#include <G4RangeTest.hh>

+ Inheritance diagram for G4RangeTest:

Public Member Functions

 G4RangeTest ()
 
virtual ~G4RangeTest ()
 
virtual G4bool Escape (const G4ParticleDefinition *particle, const G4MaterialCutsCouple *couple, G4double energy, G4double safety) const
 
- Public Member Functions inherited from G4VRangeTest
 G4VRangeTest ()
 
virtual ~G4VRangeTest ()
 
virtual G4bool Escape (const G4ParticleDefinition *particle, const G4MaterialCutsCouple *couple, G4double energy, G4double safety) const =0
 

Detailed Description

Definition at line 53 of file G4RangeTest.hh.

Constructor & Destructor Documentation

◆ G4RangeTest()

G4RangeTest::G4RangeTest ( )
inline

Definition at line 57 of file G4RangeTest.hh.

57{ }

◆ ~G4RangeTest()

G4RangeTest::~G4RangeTest ( )
virtual

Definition at line 45 of file G4RangeTest.cc.

46{ }

Member Function Documentation

◆ Escape()

G4bool G4RangeTest::Escape ( const G4ParticleDefinition particle,
const G4MaterialCutsCouple couple,
G4double  energy,
G4double  safety 
) const
virtual

Implements G4VRangeTest.

Definition at line 48 of file G4RangeTest.cc.

52{
53 G4bool value = true;
54 size_t idx = 0;
55 if(particle == G4Electron::Electron()) idx = 1;
56 else if(particle == G4Positron::Positron()) idx = 2;
57 if(idx>0) {
58 G4double range = G4EnergyLossTables::GetRange(particle,energy,couple);
59 G4double cut = couple->GetProductionCuts()->GetProductionCut(idx);
60 G4double rMin = std::min(cut,safety);
61 value = (range > rMin);
62 }
63 return value;
64}
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
static G4Electron * Electron()
Definition: G4Electron.cc:94
static G4double GetRange(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
G4ProductionCuts * GetProductionCuts() const
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4double GetProductionCut(G4int index) const

The documentation for this class was generated from the following files: