Files
geant4/source/processes/electromagnetic/lowenergy/include/G4LowEnergyIonisation.icc
T
2016-06-08 16:10:37 +02:00

88 lines
3.4 KiB
Plaintext

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4LowEnergyIonisation.icc,v 1.16.2.2 2001/06/28 20:19:24 gunter Exp $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// ------------ G4LowEnergyIonisation physics process ------------
//
// by Alessandra Forti , July 1999
// ***************************************************************
//
// 07.04.2000 Veronique Lefebure + Laszlo Urban
// - First implemention of continuous energy loss
// 14/07/99 corrections by L. Urban
// 16/05/01 V.Ivanchenko: cross section is taken from the table.
// 17/05/01 V.Ivanchenko: warning print out.
// 22/05/01 V.Ivanchenko: switch on using tables of cross sections.
// ---------------------------------------------------------------
//
inline G4bool G4LowEnergyIonisation::IsApplicable(
const G4ParticleDefinition& particle)
{
if(&particle == G4Positron::Positron()) {
G4cout << "WARNING: G4LowEnergyIonisation is not applicable"
<< " for positron yet!" << G4endl;
}
return( (&particle == G4Electron::Electron())
/////////////////||(&particle == G4Positron::Positron())
);
}
//
inline G4double G4LowEnergyIonisation::GetMeanFreePath(
const G4Track& track,
G4double,
G4ForceCondition*){
const G4DynamicParticle* aParticle = track.GetDynamicParticle();
G4double KineticEnergy = aParticle->GetKineticEnergy();
const G4Material* aMaterial = track.GetMaterial();
G4bool isOutRange = false;
if( KineticEnergy < lowestKineticEnergy ) MeanFreePath = DBL_MAX;
else {
if(KineticEnergy > highestKineticEnergy)
KineticEnergy = highestKineticEnergy;
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue( KineticEnergy, isOutRange);
}
return MeanFreePath ;
}