Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4RDRangeTest Class Reference

#include <G4RDRangeTest.hh>

Inheritance diagram for G4RDRangeTest:
G4RDVRangeTest

Public Member Functions

 G4RDRangeTest ()
 
virtual ~G4RDRangeTest ()
 
virtual G4bool Escape (const G4ParticleDefinition *particle, const G4MaterialCutsCouple *couple, G4double energy, G4double safety) const
 
- Public Member Functions inherited from G4RDVRangeTest
 G4RDVRangeTest ()
 
virtual ~G4RDVRangeTest ()
 

Detailed Description

Definition at line 54 of file G4RDRangeTest.hh.

Constructor & Destructor Documentation

G4RDRangeTest::G4RDRangeTest ( )
inline

Definition at line 58 of file G4RDRangeTest.hh.

58 { }
G4RDRangeTest::~G4RDRangeTest ( )
virtual

Definition at line 46 of file G4RDRangeTest.cc.

47 { }

Member Function Documentation

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

Implements G4RDVRangeTest.

Definition at line 49 of file G4RDRangeTest.cc.

References G4Electron::Electron(), G4ProductionCuts::GetProductionCut(), G4MaterialCutsCouple::GetProductionCuts(), G4EnergyLossTables::GetRange(), G4INCL::Math::min(), and G4Positron::Positron().

53 {
54  G4bool value = true;
55  size_t idx = 0;
56  if(particle == G4Electron::Electron()) idx = 1;
57  else if(particle == G4Positron::Positron()) idx = 2;
58  if(idx>0) {
59  G4double range = G4EnergyLossTables::GetRange(particle,energy,couple);
60  G4double cut = couple->GetProductionCuts()->GetProductionCut(idx);
61  G4double rMin = std::min(cut,safety);
62  value = (range > rMin);
63  }
64  return value;
65 }
G4double GetProductionCut(G4int index) const
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
bool G4bool
Definition: G4Types.hh:79
static G4Positron * Positron()
Definition: G4Positron.cc:94
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
const XML_Char int const XML_Char * value
static G4Electron * Electron()
Definition: G4Electron.cc:94
double G4double
Definition: G4Types.hh:76
G4ProductionCuts * GetProductionCuts() const
static G4double GetRange(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)

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