53const std::vector<G4double>* G4DNABornIonisationModel::fpWaterDensity =
nullptr;
57 G4double scaleFactor = (1.e-22 / 3.343) * CLHEP::m*CLHEP::m;
74 if (
nullptr == xsdata_p) {
98void G4DNABornIonisationModel::LoadData()
101 G4String fileElectron(
"dna/sigma_ionisation_e_born");
105 G4String fileProton(
"dna/sigma_ionisation_p_born");
119 G4String eb =
"/dna/sigmadiff_cumulated_ionisation_e_born.dat";
120 sampling_e->
LoadData(eb, CLHEP::eV, 1.0, verb);
121 G4String pb =
"/dna/sigmadiff_cumulated_ionisation_p_born.dat";
122 sampling_p->
LoadData(pb, CLHEP::eV, 1.0, verb);
124 G4String eb =
"/dna/sigmadiff_ionisation_e_born.dat";
125 sampling_e->LoadData(eb, CLHEP::eV, scaleFactor, verb);
126 G4String pb =
"/dna/sigmadiff_ionisation_p_born.dat";
127 sampling_p->LoadData(pb, CLHEP::eV, scaleFactor, verb);
136 if (isInitialised) {
return; }
138 isInitialised =
true;
143 sampling = sampling_e;
144 fLowEnergy = 8*CLHEP::eV;
145 fHighEnergy = 1*CLHEP::MeV;
146 feLimitEnergy = 19*CLHEP::eV;
147 fAbsorptionEnergy = 6*CLHEP::eV;
148 fMass = CLHEP::electron_mass_c2;
153 sampling = sampling_p;
154 fLowEnergy = 100*CLHEP::keV;
155 fHighEnergy = 100*CLHEP::MeV;
156 fpLimitEnergy = 70*CLHEP::MeV;
157 fAbsorptionEnergy = 50*CLHEP::eV;
158 fMass = CLHEP::proton_mass_c2;
163 G4Exception(
"G4DNABornIonisationModel::Initialise",
"em0003",
176 if (chem->IsChemistryActivated()) {
182 G4cout <<
"Born ionisation model is initialized for "
183 << fParticle->GetParticleName() <<
G4endl;
202 ? (*fpWaterDensity)[material->
GetIndex()] : 0.0;
203 if (0.0 == density) {
return 0.0; }
206 const G4double xSecMax = 1.e+10*CLHEP::barn;
207 if (ekin < fAbsorptionEnergy) {
return xSecMax; }
209 G4double e = std::min(ekin, fHighEnergy);
210 G4double sigma = (e > fLowEnergy) ? xsdata->FindValue(e)
211 : xsdata->FindValue(fLowEnergy) * e / fLowEnergy;
216 if (!isElectron && spScaling && e < fpLimitEnergy) {
217 const G4double A = 1.39241700556072800000e-9;
218 const G4double B = -8.52610412942622630000e-2;
219 sigma *=
G4Exp(
A*(ekin/CLHEP::eV) +
B);
222 G4cout <<
"G4DNABornIonisationModel for " << fParticle->GetParticleName()
223 <<
" Ekin(keV)=" << ekin/CLHEP::keV
224 <<
" sigma(cm^2)=" << sigma/CLHEP::cm2 <<
G4endl;
239 if (fPrimaryEnergy <= fAbsorptionEnergy) {
246 fSelectedShell = SelectShell();
247 G4double bindingEnergy = waterStructure.IonisationEnergy(fSelectedShell);
250 if (fPrimaryEnergy < bindingEnergy) {
return; }
254 fMaxEnergy = 0.5*(fPrimaryEnergy - bindingEnergy);
256 G4double tau = fPrimaryEnergy/fMass;
257 fMaxEnergy = 2.0*CLHEP::electron_mass_c2*tau*(tau + 2.0);
265 if (fasterCode && isElectron && 2 == fSelectedShell && fPrimaryEnergy < feLimitEnergy) {
267 fSelectedShell = SelectShell();
268 }
while (2 == fSelectedShell);
271 G4double esec = fasterCode ? SampleCumulative() : SampleDifferential();
284 if (fAtomDeexcitation !=
nullptr && fSelectedShell == 4) {
286 auto ashell = fAtomDeexcitation->GetAtomicShell(Z, as);
287 fAtomDeexcitation->GenerateParticles(fvect, ashell, Z, 0, 0);
290 for (
auto const & ptr : *fvect) {
291 esum += ptr->GetKineticEnergy();
296 G4double exc = std::max(bindingEnergy - esum, 0.0);
299 G4double scatteredEnergy = fPrimaryEnergy - bindingEnergy - esec;
300 if (scatteredEnergy < -tolerance || exc < -tolerance) {
301 G4cout <<
"G4DNABornIonisationModel::SampleSecondaries: "
302 <<
"final E(keV)=" << scatteredEnergy/CLHEP::keV <<
" Ein(keV)="
303 << fPrimaryEnergy/CLHEP::keV <<
" " << fParticle->GetParticleName()
304 <<
" Edelta(keV)=" << esec/CLHEP::keV <<
" MeV, Exc(keV)=" << exc/CLHEP::keV
307 scatteredEnergy = std::max(scatteredEnergy, 0.0);
320 fvect->push_back(dp);
323 if (
nullptr != fChemistry) {
330G4int G4DNABornIonisationModel::SelectShell()
334 G4double e = std::min(fPrimaryEnergy, fHighEnergy);
335 for (
G4int i=0; i<5; ++i) {
337 xs = (e > fLowEnergy) ? ptr->
FindValue(e)
338 : ptr->FindValue(fLowEnergy) * e/fLowEnergy;
343 for (
G4int i=0; i<5; ++i) {
344 if (sum <= fTemp[i]) {
return i; }
351G4double G4DNABornIonisationModel::SampleCumulative()
353 G4double e = sampling->SampleCumulative(fPrimaryEnergy, fSelectedShell);
355 G4cout <<
"G4DNABornIonisationModel::SampleCumulative: "
356 << fParticle->GetParticleName()
357 <<
" Ekin(keV)=" << fPrimaryEnergy/CLHEP::keV
358 <<
" Ee(keV)=" << e/CLHEP::keV <<
G4endl;
365G4double G4DNABornIonisationModel::SampleDifferential()
370 G4cout <<
"G4DNABornIonisationModel::SampleDifferential: "
371 << fParticle->GetParticleName()
372 <<
" Ekin(keV)=" << fPrimaryEnergy/CLHEP::keV
373 <<
" Ee(keV)=" << e/CLHEP::keV <<
G4endl;
382 return sampling->GetValue(fPrimaryEnergy, ekin, fSelectedShell);
G4double B(G4double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4DNABornIonisationModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="DNABornIonisationModel")
void StartTracking(G4Track *) override
G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4ParticleChangeForGamma * fParticleChangeForGamma
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
~G4DNABornIonisationModel() override
G4double ProbabilityDensityFunction(G4double ekin) override
static G4DNAChemistryManager * Instance()
G4bool LoadData(const G4String &argFileName) override
const G4VEMDataSet * GetComponent(G4int componentId) const override
const std::vector< G4double > * GetNumMolPerVolTableFor(const G4Material *) const
Retrieve a table of molecular densities (number of molecules per unit volume) in the G4 unit system f...
static G4DNAMolecularMaterial * Instance()
void LoadData(const G4String &filename, G4double factorE, G4double scaleFactor, G4bool verbose)
G4double GetKineticEnergy() const
static G4Electron * Electron()
static G4EmParameters * Instance()
G4bool DNAStationary() const
G4int WorkerVerbose() const
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
const G4Material * GetMaterial() const
std::size_t GetIndex() const
G4Material * FindMaterial(const G4String &name) const
static G4NistManager * Instance()
const G4String & GetParticleName() const
static G4Proton * Proton()
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, G4int shellID, const G4Material *)
G4VEmAngularDistribution * GetAngularDistribution()
G4ParticleChangeForGamma * GetParticleChangeForGamma()
void SetDeexcitationFlag(G4bool val)
G4VEmModel(const G4String &nam)
void SetAngularDistribution(G4VEmAngularDistribution *)
G4double ComputeIntegral(const G4double emin, const G4double emax)
void InitialiseIntegrator(G4double accuracy, G4double fact1, G4double fact2, G4double de, G4double dmin, G4double dmax)