46 fpWaterDensity =
nullptr;
63 G4cout <<
"Sanche Excitation model is constructed "
73 fpWaterDensity =
nullptr;
96 G4cout <<
"Calling G4DNASancheExcitationModel::Initialise()"
105 G4Exception(
"*** WARNING : the G4DNASancheExcitationModel class is not "
106 "validated below 2 eV !",
112 G4cout <<
"G4DNASancheExcitationModel: high energy limit decreased from " <<
119 if (verboseLevel > 0)
121 G4cout <<
"Sanche Excitation model is initialized " <<
G4endl
133 if (isInitialised) {
return;}
136 isInitialised =
true;
139 std::ostringstream eFullFileName;
140 eFullFileName << path <<
"/dna/sigma_excitationvib_e_sanche.dat";
141 std::ifstream input(eFullFileName.str().c_str());
145 G4Exception(
"G4DNASancheExcitationModel::Initialise",
"em0003",
146 FatalException,
"Missing data file:/dna/sigma_excitationvib_e_sanche.dat");
160 tdummyVec.push_back(t);
162 fEnergyLevelXS.emplace_back();
163 fEnergyTotalXS.push_back(0);
164 std::vector<G4double>& levelXS = fEnergyLevelXS.back();
169 for(
size_t i = 0 ; i < 9 ;++i)
172 levelXS.push_back(xs);
173 fEnergyTotalXS.back() += xs;
194 if (verboseLevel > 3)
196 G4cout <<
"Calling CrossSectionPerVolume() of G4DNASancheExcitationModel"
211 if (verboseLevel > 2)
213 G4cout <<
"__________________________________" <<
G4endl;
214 G4cout <<
"=== G4DNASancheExcitationModel - XS INFO START" <<
G4endl;
215 G4cout <<
"=== Kinetic energy(eV)=" << ekin/eV <<
" particle : " << particleDefinition->GetParticleName() <<
G4endl;
216 G4cout <<
"=== Cross section per water molecule (cm^2)=" << sigma/cm/cm <<
G4endl;
217 G4cout <<
"=== Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./cm) <<
G4endl;
218 G4cout <<
"=== G4DNASancheExcitationModel - XS INFO END" <<
G4endl;
222 return sigma*2.*waterDensity;
236 if (verboseLevel > 3)
238 G4cout <<
"Calling SampleSecondaries() of G4DNASancheExcitationModel"
244 G4int level = RandomSelect(electronEnergy0);
245 G4double excitationEnergy = VibrationEnergy(level);
246 G4double newEnergy = electronEnergy0 - excitationEnergy;
294 if (t/eV==tdummyVec.back()) t=t*(1.-1e-12);
297 auto t2 = std::upper_bound(tdummyVec.begin(),
298 tdummyVec.end(), t / eV);
301 size_t i1 = t1 - tdummyVec.begin();
302 size_t i2 = t2 - tdummyVec.begin();
304 G4double sigma = LinInterpolate((*t1), (*t2),
306 fEnergyLevelXS[i1][level],
307 fEnergyLevelXS[i2][level]);
309 static const G4double conv_factor = 1e-16 * cm * cm;
311 sigma *= conv_factor;
312 if (sigma == 0.) sigma = 1e-30;
321 if (t/eV==tdummyVec.back()) t=t*(1.-1e-12);
324 auto t2 = std::upper_bound(tdummyVec.begin(),
325 tdummyVec.end(), t / eV);
328 size_t i1 = t1 - tdummyVec.begin();
329 size_t i2 = t2 - tdummyVec.begin();
331 G4double sigma = LinInterpolate((*t1), (*t2),
336 static const G4double conv_factor = 1e-16 * cm * cm;
338 sigma *= conv_factor;
339 if (sigma == 0.) sigma = 1e-30;
345G4double G4DNASancheExcitationModel::VibrationEnergy(
G4int level)
347 static G4double energies[9] = { 0.01, 0.024, 0.061, 0.092, 0.204, 0.417, 0.460,
349 return (energies[level] * eV);
361 std::deque<G4double> values;
367 values.push_front(partial);
378 if (values[i] > value)
397 for (
G4int i = 0; i < nLevels; i++)
402 return totalCrossSection;
413 G4double a = (xs2 - xs1) / (e2 - e1);
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
static G4DNAMolecularMaterial * Instance()
G4DNASancheExcitationModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="DNASancheExcitationModel")
G4double TotalCrossSection(G4double t)
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
~G4DNASancheExcitationModel() override
G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
G4double PartialCrossSection(G4double energy, G4int level)
G4ParticleChangeForGamma * fParticleChangeForGamma
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
std::size_t GetIndex() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)