MinEkineCuts Class Reference

#include <MinEkineCuts.hh>

Inheritance diagram for MinEkineCuts:

SpecialCuts G4VProcess

Public Member Functions

 MinEkineCuts (const G4String &processName="MinEkineCuts")
virtual ~MinEkineCuts ()
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)

Detailed Description

Definition at line 45 of file MinEkineCuts.hh.


Constructor & Destructor Documentation

MinEkineCuts::MinEkineCuts ( const G4String processName = "MinEkineCuts"  ) 

Definition at line 43 of file MinEkineCuts.cc.

References fUserDefined, G4cout, G4endl, G4VProcess::GetProcessName(), G4VProcess::SetProcessType(), and G4VProcess::verboseLevel.

00044   : SpecialCuts(aName)
00045 {
00046    if (verboseLevel>1) {
00047      G4cout << GetProcessName() << " is created "<< G4endl;
00048    }
00049    SetProcessType(fUserDefined);
00050 }

MinEkineCuts::~MinEkineCuts (  )  [virtual]

Definition at line 52 of file MinEkineCuts.cc.

00053 {}


Member Function Documentation

G4double MinEkineCuts::PostStepGetPhysicalInteractionLength ( const G4Track track,
G4double  previousStepSize,
G4ForceCondition condition 
) [virtual]

Reimplemented from SpecialCuts.

Definition at line 59 of file MinEkineCuts.cc.

References DBL_MAX, G4Track::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetKineticEnergy(), G4VPhysicalVolume::GetLogicalVolume(), G4Track::GetMaterialCutsCouple(), G4ParticleDefinition::GetPDGCharge(), G4EnergyLossTables::GetRange(), G4LogicalVolume::GetUserLimits(), G4UserLimits::GetUserMinEkine(), G4Track::GetVolume(), and NotForced.

00064 {
00065   // condition is set to "Not Forced"
00066   *condition = NotForced;
00067 
00068    G4double     proposedStep = DBL_MAX;
00069    // get the pointer to UserLimits
00070    G4UserLimits* pUserLimits = aTrack.GetVolume()->GetLogicalVolume()->GetUserLimits();
00071    const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
00072    G4ParticleDefinition* aParticleDef = aTrack.GetDefinition();
00073   
00074    if (pUserLimits && aParticleDef->GetPDGCharge() != 0.0) {
00075      //min kinetic energy
00076      G4double temp = DBL_MAX;
00077      G4double    eKine     = aParticle->GetKineticEnergy();
00078      const G4MaterialCutsCouple* couple = aTrack.GetMaterialCutsCouple();
00079      G4double eMin = pUserLimits->GetUserMinEkine(aTrack);
00080 
00081      G4double    rangeNow = DBL_MAX;
00082 
00083      rangeNow = G4EnergyLossTables::GetRange(aParticleDef,eKine,couple);
00084 
00085      if (eKine < eMin ) {
00086        proposedStep = 0.;
00087      } else {
00088        // charged particles only
00089        G4double rangeMin = G4EnergyLossTables::GetRange(aParticleDef,eMin,couple);
00090        temp = rangeNow - rangeMin;
00091        if (proposedStep > temp) proposedStep = temp;        
00092      }
00093    }
00094    return proposedStep;
00095 }


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