Import Geant4 10.6.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2019-06-28 11:59:04 +02:00
parent 28a70706e0
commit d0f911957d
1056 changed files with 95168 additions and 78160 deletions
@@ -75,6 +75,9 @@ public:
void Dump(const G4ParticleDefinition* p = nullptr);
inline const G4Element* SelectRandomAtom(G4double kineticEnergy) const;
inline const G4Element* SelectRandomAtom(const G4double kineticEnergy,
const G4double logEKin,
size_t &lastIndx);
inline const G4Material* GetMaterial() const;
@@ -118,6 +121,27 @@ inline const G4Element* G4EmElementSelector::SelectRandomAtom(G4double e) const
return element;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
inline const G4Element*
G4EmElementSelector::SelectRandomAtom(const G4double e, const G4double loge,
size_t &lastIndx)
{
const G4Element* element = (*theElementVector)[nElmMinusOne];
if (nElmMinusOne > 0) {
const G4double x = G4UniformRand();
for (G4int i=0; i<nElmMinusOne; ++i) {
if (x <= (xSections[i])->Value(e, loge, lastIndx)) {
element = (*theElementVector)[i];
break;
}
}
}
return element;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
inline const G4Material* G4EmElementSelector::GetMaterial() const
{
return material;