Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -29,10 +29,10 @@
|
||||
// File name: G4eIonisationSTD
|
||||
//
|
||||
// Author: Laszlo Urban
|
||||
//
|
||||
//
|
||||
// Creation date: 20.03.1997
|
||||
//
|
||||
// Modifications:
|
||||
// Modifications:
|
||||
//
|
||||
// 10-02-00 modifications , new e.m. structure, L.Urban
|
||||
// 03-08-01 new methods Store/Retrieve PhysicsTable (mma)
|
||||
@@ -40,13 +40,17 @@
|
||||
// 19-09-01 come back to previous ProcessName "eIoni"
|
||||
// 29-10-01 all static functions no more inlined (mma)
|
||||
// 07-01-02 new design of em processes (V.Ivanchenko)
|
||||
// 26-12-02 Secondary production moved to derived classes (VI)
|
||||
// 24-01-03 Make models region aware (V.Ivanchenko)
|
||||
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
|
||||
// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
// Class Description:
|
||||
//
|
||||
// This class manages the ionisation process for e-/e+
|
||||
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLoss.
|
||||
//
|
||||
//
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -69,12 +73,27 @@ public:
|
||||
G4eIonisationSTD(const G4String& name = "eIoni");
|
||||
|
||||
~G4eIonisationSTD();
|
||||
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition& p);
|
||||
|
||||
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
const G4Material*, G4double cut);
|
||||
|
||||
virtual G4std::vector<G4Track*>* SecondariesAlongStep(
|
||||
const G4Step&,
|
||||
G4double&,
|
||||
G4double&,
|
||||
G4double&);
|
||||
|
||||
virtual void SecondariesPostStep(
|
||||
G4VEmModel*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double&,
|
||||
G4double&);
|
||||
|
||||
void SetSubCutoff(G4bool val);
|
||||
|
||||
void PrintInfoDefinition() const;
|
||||
// Print out of the class parameters
|
||||
|
||||
@@ -88,11 +107,13 @@ private:
|
||||
|
||||
void InitialiseProcess();
|
||||
|
||||
// hide assignment operator
|
||||
// hide assignment operator
|
||||
G4eIonisationSTD & operator=(const G4eIonisationSTD &right);
|
||||
G4eIonisationSTD(const G4eIonisationSTD&);
|
||||
|
||||
const G4ParticleDefinition* theElectron;
|
||||
|
||||
G4bool subCutoff;
|
||||
G4bool isElectron;
|
||||
|
||||
};
|
||||
@@ -101,7 +122,7 @@ private:
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4eIonisationSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
const G4Material*,
|
||||
G4double cut)
|
||||
{
|
||||
G4double x = cut;
|
||||
@@ -111,20 +132,62 @@ inline G4double G4eIonisationSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4bool G4eIonisationSTD::IsApplicable(const G4ParticleDefinition& p)
|
||||
inline G4bool G4eIonisationSTD::IsApplicable(const G4ParticleDefinition& p)
|
||||
{
|
||||
return (&p == G4Electron::Electron() || &p == G4Positron::Positron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4eIonisationSTD::MaxSecondaryEnergy(const G4DynamicParticle* dp)
|
||||
inline G4double G4eIonisationSTD::MaxSecondaryEnergy(const G4DynamicParticle* dp)
|
||||
{
|
||||
G4double tmax = dp->GetKineticEnergy();
|
||||
if(isElectron) tmax *= 0.5;
|
||||
return tmax;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4VSubCutoffProcessor.hh"
|
||||
|
||||
inline G4std::vector<G4Track*>* G4eIonisationSTD::SecondariesAlongStep(
|
||||
const G4Step& step,
|
||||
G4double& tmax,
|
||||
G4double& eloss,
|
||||
G4double& kinEnergy)
|
||||
{
|
||||
G4std::vector<G4Track*>* newp = 0;
|
||||
if(subCutoff) {
|
||||
G4VSubCutoffProcessor* sp = SubCutoffProcessor(CurrentMaterialCutsCoupleIndex());
|
||||
if (sp) {
|
||||
G4VEmModel* model = SelectModel(kinEnergy);
|
||||
newp = sp->SampleSecondaries(step,tmax,eloss,model);
|
||||
}
|
||||
}
|
||||
return newp;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4VEmModel.hh"
|
||||
|
||||
inline void G4eIonisationSTD::SecondariesPostStep(
|
||||
G4VEmModel* model,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
const G4DynamicParticle* dp,
|
||||
G4double& tcut,
|
||||
G4double& kinEnergy)
|
||||
{
|
||||
G4DynamicParticle* delta = model->SampleSecondary(couple, dp, tcut, kinEnergy);
|
||||
aParticleChange.SetNumberOfSecondaries(1);
|
||||
aParticleChange.AddSecondary(delta);
|
||||
G4ThreeVector finalP = dp->GetMomentum();
|
||||
kinEnergy -= delta->GetKineticEnergy();
|
||||
finalP -= delta->GetMomentum();
|
||||
finalP = finalP.unit();
|
||||
aParticleChange.SetMomentumDirectionChange(finalP);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user