Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4RDRangeTest Class Reference

#include <G4RDRangeTest.hh>

Inheritance diagram for G4RDRangeTest:
Collaboration diagram for G4RDRangeTest:

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.

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) {
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
const XML_Char int const XML_Char * value
Definition: expat.h:331
const G4ParticleDefinition const G4Material *G4double range
bool G4bool
Definition: G4Types.hh:79
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4double energy(const ThreeVector &p, const G4double m)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
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)

Here is the call graph for this function:


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