64 G4cout <<
"Sanche Excitation model is constructed "
98 G4cout <<
"Calling G4DNASancheExcitationModel::Initialise()"
107 G4Exception(
"*** WARNING : the G4DNASancheExcitationModel class is not "
108 "validated below 2 eV !",
114 G4cout <<
"G4DNASancheExcitationModel: high energy limit decreased from " <<
120 #ifdef SANCHE_VERBOSE
121 if (verboseLevel > 0)
123 G4cout <<
"Sanche Excitation model is initialized " <<
G4endl
135 if (isInitialised) {
return;}
138 isInitialised =
true;
140 char *path = getenv(
"G4LEDATA");
141 std::ostringstream eFullFileName;
142 eFullFileName << path <<
"/dna/sigma_excitationvib_e_sanche.dat";
143 std::ifstream input(eFullFileName.str().c_str());
147 G4Exception(
"G4DNASancheExcitationModel::Initialise",
"em0003",
148 FatalException,
"Missing data file:/dna/sigma_excitationvib_e_sanche.dat");
162 tdummyVec.push_back(t);
164 fEnergyLevelXS.push_back(std::vector<double>());
165 fEnergyTotalXS.push_back(0);
166 std::vector<double>& levelXS = fEnergyLevelXS.back();
171 for(
size_t i = 0 ; i < 9 ;++i)
174 levelXS.push_back(xs);
175 fEnergyTotalXS.back() += xs;
187 #ifdef SANCHE_VERBOSE
195 #ifdef SANCHE_VERBOSE
196 if (verboseLevel > 3)
198 G4cout <<
"Calling CrossSectionPerVolume() of G4DNASancheExcitationModel"
209 if(waterDensity!= 0.0)
218 #ifdef SANCHE_VERBOSE
219 if (verboseLevel > 2)
221 G4cout <<
"__________________________________" <<
G4endl;
222 G4cout <<
"=== G4DNASancheExcitationModel - XS INFO START" <<
G4endl;
223 G4cout <<
"=== Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << particleDefinition->GetParticleName() <<
G4endl;
224 G4cout <<
"=== Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
225 G4cout <<
"=== Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) << G4endl;
226 G4cout <<
"=== G4DNASancheExcitationModel - XS INFO END" <<
G4endl;
231 return sigma*2.*waterDensity;
245 #ifdef SANCHE_VERBOSE
246 if (verboseLevel > 3)
248 G4cout <<
"Calling SampleSecondaries() of G4DNASancheExcitationModel"
254 G4int level = RandomSelect(electronEnergy0);
255 G4double excitationEnergy = VibrationEnergy(level);
256 G4double newEnergy = electronEnergy0 - excitationEnergy;
303 std::vector<double>::iterator t2 = std::upper_bound(tdummyVec.begin(),
304 tdummyVec.end(), t /
eV);
305 std::vector<double>::iterator
t1 = t2 - 1;
307 size_t i1 = t1 - tdummyVec.begin();
308 size_t i2 = t2 - tdummyVec.begin();
310 double sigma = LinInterpolate((*t1), (*t2),
312 fEnergyLevelXS[i1][level],
313 fEnergyLevelXS[i2][level]);
315 static const double conv_factor = 1e-16 *
cm *
cm;
317 sigma *= conv_factor;
318 if (sigma == 0.) sigma = 1e-30;
326 std::vector<double>::iterator t2 = std::upper_bound(tdummyVec.begin(),
327 tdummyVec.end(), t /
eV);
328 std::vector<double>::iterator
t1 = t2 - 1;
330 size_t i1 = t1 - tdummyVec.begin();
331 size_t i2 = t2 - tdummyVec.begin();
333 double sigma = LinInterpolate((*t1), (*t2),
338 static const double conv_factor = 1e-16 *
cm *
cm;
340 sigma *= conv_factor;
341 if (sigma == 0.) sigma = 1e-30;
347 G4double G4DNASancheExcitationModel::VibrationEnergy(
G4int level)
349 static G4double energies[9] = { 0.01, 0.024, 0.061, 0.092, 0.204, 0.417, 0.460,
351 return (energies[level] *
eV);
363 std::deque<double> values;
369 values.push_front(partial);
380 if (values[i] > value)
399 for (
G4int i = 0; i < nLevels; i++)
404 return totalCrossSection;
G4DNASancheExcitationModel(const G4ParticleDefinition *p=0, const G4String &nam="DNASancheExcitationModel")
G4double LowEnergyLimit() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
G4double GetKineticEnergy() const
G4double HighEnergyLimit() const
std::vector< ExP01TrackerHit * > a
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
G4double PartialCrossSection(G4double energy, G4int level)
G4double TotalCrossSection(G4double t)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetHighEnergyLimit(G4double)
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
const G4ThreeVector & GetMomentumDirection() const
static constexpr double cm
G4ParticleChangeForGamma * fParticleChangeForGamma
static constexpr double eV
virtual ~G4DNASancheExcitationModel()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
static G4DNAMolecularMaterial * Instance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetLowEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()