G4RangeTest Class Reference

#include <G4RangeTest.hh>

Inheritance diagram for G4RangeTest:

G4VRangeTest

Public Member Functions

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

Detailed Description

Definition at line 53 of file G4RangeTest.hh.


Constructor & Destructor Documentation

G4RangeTest::G4RangeTest (  )  [inline]

Definition at line 57 of file G4RangeTest.hh.

00057 { }

G4RangeTest::~G4RangeTest (  )  [virtual]

Definition at line 45 of file G4RangeTest.cc.

00046 { }


Member Function Documentation

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.

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

00052 {
00053   G4bool value = true;
00054   size_t idx = 0;
00055   if(particle == G4Electron::Electron()) idx = 1;
00056   else if(particle == G4Positron::Positron()) idx = 2;
00057   if(idx>0) {
00058     G4double range = G4EnergyLossTables::GetRange(particle,energy,couple);
00059     G4double cut = couple->GetProductionCuts()->GetProductionCut(idx);
00060     G4double rMin = std::min(cut,safety);
00061     value = (range > rMin);
00062   }
00063   return value;
00064 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:15 2013 for Geant4 by  doxygen 1.4.7