56 if (fpTHF !=
nullptr) {
57 fTableMeanEnergyPTB[fpTHF->
GetIndex()] = 8.01 * eV;
60 if (fpPY !=
nullptr) {
61 fTableMeanEnergyPTB[fpPY->
GetIndex()] = 7.61 * eV;
64 if (fpPU !=
nullptr) {
65 fTableMeanEnergyPTB[fpPU->
GetIndex()] = 7.61 * eV;
67 if (fpTMP !=
nullptr) {
68 fTableMeanEnergyPTB[fpTMP->
GetIndex()] = 8.01 * eV;
71 if (verboseLevel > 0) {
72 G4cout <<
"PTB excitation model is constructed " <<
G4endl;
86 G4cout <<
"Calling G4DNAPTBExcitationModel::Initialise()" <<
G4endl;
90 std::ostringstream oss;
91 oss <<
" Model is not applied for this particle " << particle->
GetParticleName();
95 G4double scaleFactor = 1e-16 * cm * cm;
96 G4double scaleFactorBorn = (1.e-22 / 3.343) * m * m;
102 if (fpTHF !=
nullptr) {
108 if (fpPY !=
nullptr) {
115 if (fpPU !=
nullptr) {
122 if (fpTMP !=
nullptr) {
128 if (fpG4_WATER !=
nullptr) {
136 if (fpBackbone_THF !=
nullptr) {
138 AddCrossSectionData(index, particle,
"dna/sigma_excitation_e-_PTB_THF", scaleFactor * 33. / 30);
142 if (fpCytosine_PY !=
nullptr) {
144 AddCrossSectionData(index, particle,
"dna/sigma_excitation_e-_PTB_PY", scaleFactor * 42. / 30);
148 if (fpThymine_PY !=
nullptr) {
150 AddCrossSectionData(index, particle,
"dna/sigma_excitation_e-_PTB_PY", scaleFactor * 48. / 30);
154 if (fpAdenine_PU !=
nullptr) {
156 AddCrossSectionData(index, particle,
"dna/sigma_excitation_e-_PTB_PU", scaleFactor * 50. / 44);
160 if (fpGuanine_PU !=
nullptr) {
162 AddCrossSectionData(index, particle,
"dna/sigma_excitation_e-_PTB_PU", scaleFactor * 56. / 44);
166 if (fpBackbone_TMP !=
nullptr) {
168 AddCrossSectionData(index, particle,
"dna/sigma_excitation_e-_PTB_TMP", scaleFactor * 33. / 50);
173 if (fpN2 !=
nullptr) {
188 if (dataModel ==
nullptr) {
189 G4cout <<
"G4DNAPTBExcitationModel::Initialise:: not good modelData" <<
G4endl;
191 "not good modelData");
194 fpModelData = dataModel;
211 const std::size_t& MatID = material->
GetIndex();
224 if (ekin >= lowLim && ekin < highLim) {
226 auto Data = fpModelData->
GetData();
228 if ((*Data)[MatID][p] ==
nullptr) {
230 "No model is registered");
233 sigma = (*Data)[MatID][p]->FindValue(ekin);
235 if (verboseLevel > 2) {
236 G4cout <<
"__________________________________" <<
G4endl;
237 G4cout <<
"°°° G4DNAPTBExcitationModel - XS INFO START" <<
G4endl;
238 G4cout <<
"°°° Kinetic energy(eV)=" << ekin / eV <<
" particle : " << particleName <<
G4endl;
239 G4cout <<
"°°° Cross section per " << MatID <<
" ID molecule (cm^2)=" << sigma / cm / cm
241 G4cout <<
"°°° G4DNAPTBExcitationModel - XS INFO END" <<
G4endl;
248 return sigma * MolDensity;
258 const std::size_t& materialID = (std::size_t)couple->
GetIndex();
269 if (k >= lowLim && k < highLim) {
270 if (fpN2 !=
nullptr && materialID == fpN2->
GetIndex()) {
276 G4double newEnergy = k - excitationEnergy;
286 if ((excitationEnergy > ioniThres) && (
G4UniformRand() < 0.5)) {
289 G4double secondaryKinetic = excitationEnergy - ioniThres;
292 G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
293 G4double ux = sinTheta * std::cos(phi), uy = sinTheta * std::sin(phi), uz = cosTheta;
297 fvect->push_back(dp);
302 description <<
"Kinetic energy <= 0 at " << fpN2->
GetName() <<
" material !!!";
306 else if (fpG4_WATER ==
nullptr || materialID != fpG4_WATER->
GetIndex()) {
308 G4double excitationEnergy = fTableMeanEnergyPTB[materialID];
310 G4double newEnergy = k - excitationEnergy;
320 description <<
"Kinetic energy <= 0 at " << materialID <<
" index material !!!";
327 G4double newEnergy = k - excitationEnergy;
339 description <<
"Kinetic energy <= 0 at " << materialID <<
" ID material !!!";
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
static G4DNAMaterialManager * Instance()
void SetMasterDataModel(const DNAModelType &t, G4VEmModel *m)
G4VEmModel * GetModel(const DNAModelType &t)
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()
G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
CrossSectionPerVolume Retrieve the cross section corresponding to the current material,...
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double tmax) override
SampleSecondaries If the model is selected for the ModelInterface then the SampleSecondaries method w...
G4ParticleChangeForGamma * fParticleChangeForGamma
void Initialise(const G4ParticleDefinition *particle, const G4DataVector &) override
Initialise Set the materials for which the model can be used and defined the energy limits.
G4DNAPTBExcitationModel(const G4String &applyToMaterial="all", const G4ParticleDefinition *p=nullptr, const G4String &nam="DNAPTBExcitationModel")
G4DNAPTBExcitationModel Constructor.
G4double ExcitationEnergy(const G4int &ExcLevel, const size_t &materialID)
G4double IonisationEnergy(G4int level, const size_t &materialName)
G4double ExcitationEnergy(G4int level)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * ElectronDefinition()
static G4Electron * Electron()
std::size_t GetIndex() const
const G4String & GetName() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
const G4String & GetParticleName() const
void LoadCrossSectionData(const G4ParticleDefinition *particleName)
LoadCrossSectionData Method to loop on all the registered materials in the model and load the corresp...
void SetLowELimit(const size_t &materialID, const G4ParticleDefinition *particle, G4double lim)
SetLowEnergyLimit.
void SetHighELimit(const size_t &materialID, const G4ParticleDefinition *particle, G4double lim)
SetHighEnergyLimit.
G4double GetHighELimit(const size_t &materialID, const G4ParticleDefinition *particle)
GetHighEnergyLimit.
G4int RandomSelectShell(const G4double &k, const G4ParticleDefinition *particle, const size_t &materialName)
RandomSelectShell Method to randomely select a shell from the data table uploaded....
void AddCrossSectionData(const size_t &materialName, const G4ParticleDefinition *particleName, const G4String &fileCS, const G4String &fileDiffCS, const G4double &scaleFactor)
AddCrossSectionData Method used during the initialization of the model class to add a new material....
G4double GetLowELimit(const size_t &materialID, const G4ParticleDefinition *particle)
GetLowEnergyLimit.
MaterialParticleMapData * GetData()
GetTableData.
G4ParticleChangeForGamma * GetParticleChangeForGamma()
const G4Track * GetCurrentTrack() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)