Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ElectronIonPair.hh,v 1.5 2010-10-25 17:23:01 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
#ifndef G4ElectronIonPair_h
|
||||
@@ -125,7 +124,7 @@ private:
|
||||
const G4Material* curMaterial;
|
||||
G4double curMeanEnergy;
|
||||
|
||||
G4double FanoFactor;
|
||||
G4double invFanoFactor;
|
||||
|
||||
G4int verbose;
|
||||
G4int nMaterials;
|
||||
@@ -147,16 +146,10 @@ G4ElectronIonPair::MeanNumberOfIonsAlongStep(const G4Step* step)
|
||||
inline
|
||||
G4int G4ElectronIonPair::SampleNumberOfIonsAlongStep(const G4Step* step)
|
||||
{
|
||||
// use gamma distribution with mean value n=meanion and
|
||||
// dispersion D=meanion/invFanoFactor
|
||||
G4double meanion = MeanNumberOfIonsAlongStep(step);
|
||||
G4double lambda = 1./FanoFactor;
|
||||
G4double a = meanion*lambda;
|
||||
|
||||
// old Gauss implementation
|
||||
// G4double sig = FanoFactor*std::sqrt(meanion);
|
||||
// G4int nion = G4int(G4RandGauss::shoot(meanion,sig) + 0.5);
|
||||
|
||||
G4int nion = G4int(CLHEP::RandGamma::shoot(a,lambda) + 0.5);
|
||||
return nion;
|
||||
return G4lrint(CLHEP::RandGamma::shoot(meanion*invFanoFactor,invFanoFactor));
|
||||
}
|
||||
|
||||
inline
|
||||
|
||||
Reference in New Issue
Block a user