Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
@@ -1,18 +1,32 @@
// 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.
// ********************************************************************
// * 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.11 2000/04/07 13:43:13 lefebure Exp $
//
// $Id: G4LowEnergyIonisation.icc,v 1.16.2.2 2001/06/28 20:19:24 gunter Exp $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ------------ G4LowEnergyIonisation physics process ------------
//
// by Alessandra Forti , July 1999
@@ -20,20 +34,27 @@
//
// 07.04.2000 Veronique Lefebure + Laszlo Urban
// - First implemention of continuous energy loss
// 14/07/99: corrections by L. Urban
// 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.
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//
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())
);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//
inline G4double G4LowEnergyIonisation::GetMeanFreePath(
const G4Track& track,
@@ -43,31 +64,16 @@ inline G4double G4LowEnergyIonisation::GetMeanFreePath(
const G4DynamicParticle* aParticle = track.GetDynamicParticle();
G4double KineticEnergy = aParticle->GetKineticEnergy();
const G4Material* aMaterial = track.GetMaterial();
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
const G4double* theAtomicNumDensityVector = aMaterial->GetAtomicNumDensityVector();
const G4int NumberOfElements = aMaterial->GetNumberOfElements() ;
G4double* DeltaCutInKineticEnergy = G4Electron::Electron()->GetCutsInEnergy() ;
G4double DeltaThreshold = DeltaCutInKineticEnergy[aMaterial->GetIndex()] ;
G4bool isOutRange ;
G4double SIGMA = 0.;
G4bool isOutRange = false;
if( KineticEnergy < LowestKineticEnergy )
MeanFreePath = DBL_MAX;
if( KineticEnergy < lowestKineticEnergy ) MeanFreePath = DBL_MAX;
else {
if (KineticEnergy > HighestKineticEnergy) KineticEnergy = HighestKineticEnergy;
///don't use table for now
///MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
/// GetValue( KineticEnergy, isOutRange);
SIGMA = 0.;
G4int iel;
for (iel=0; iel<NumberOfElements; iel++ ){
SIGMA += theAtomicNumDensityVector[iel]*
ComputeCrossSectionWithCut( (*theElementVector)(iel)->GetZ(),
KineticEnergy,
DeltaThreshold);
}
MeanFreePath = SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
if(KineticEnergy > highestKineticEnergy)
KineticEnergy = highestKineticEnergy;
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue( KineticEnergy, isOutRange);
}
return MeanFreePath ;
}