46 killBelowEnergy = 7.4*eV;
47 lowEnergyLimit = 0 * eV;
48 highEnergyLimit = 1. * MeV;
62 G4cout <<
"Champion Elastic model is constructed " <<
G4endl
64 << lowEnergyLimit / eV <<
" eV - "
65 << highEnergyLimit / MeV <<
" MeV"
69 fpMolWaterDensity = 0;
78 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
79 for (pos = tableData.begin(); pos != tableData.end(); ++pos)
98 G4cout <<
"Calling G4DNAChampionElasticModel::Initialise()" <<
G4endl;
104 G4cout <<
"G4DNAChampionElasticModel: low energy limit increased from " <<
111 G4cout <<
"G4DNAChampionElasticModel: high energy limit decreased from " <<
120 G4String fileElectron(
"dna/sigma_elastic_e_champion");
131 tableFile[electron] = fileElectron;
135 tableData[electron] = tableE;
139 char *path = getenv(
"G4LEDATA");
143 G4Exception(
"G4ChampionElasticModel::Initialise",
"em0006",
148 std::ostringstream eFullFileName;
149 eFullFileName << path <<
"/dna/sigmadiff_cumulated_elastic_e_champion.dat";
150 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
152 if (!eDiffCrossSection)
153 G4Exception(
"G4DNAChampionElasticModel::Initialise",
"em0003",
154 FatalException,
"Missing data file:/dna/sigmadiff_cumulated_elastic_e_champion.dat");
156 eTdummyVec.push_back(0.);
158 while(!eDiffCrossSection.eof())
162 eDiffCrossSection>>tDummy>>eDummy;
166 if (tDummy != eTdummyVec.back())
168 eTdummyVec.push_back(tDummy);
169 eVecm[tDummy].push_back(0.);
172 eDiffCrossSection>>eDiffCrossSectionData[tDummy][eDummy];
174 if (eDummy != eVecm[tDummy].back()) eVecm[tDummy].push_back(eDummy);
180 if (verboseLevel > 2)
181 G4cout <<
"Loaded cross section files for Champion Elastic model" <<
G4endl;
185 G4cout <<
"Champion Elastic model is initialized " <<
G4endl
195 if (isInitialised) {
return; }
197 isInitialised =
true;
209 if (verboseLevel > 3)
210 G4cout <<
"Calling CrossSectionPerVolume() of G4DNAChampionElasticModel" <<
G4endl;
218 if(waterDensity!= 0.0)
223 if (ekin < highEnergyLimit)
226 if (ekin < killBelowEnergy)
return DBL_MAX;
229 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
230 pos = tableData.find(particleName);
232 if (pos != tableData.end())
242 G4Exception(
"G4DNAChampionElasticModel::ComputeCrossSectionPerVolume",
"em0002",
247 if (verboseLevel > 2)
249 G4cout <<
"__________________________________" <<
G4endl;
250 G4cout <<
"°°° G4DNAChampionElasticModel - XS INFO START" <<
G4endl;
251 G4cout <<
"°°° Kinetic energy(eV)=" << ekin/eV <<
" particle : " << particleName <<
G4endl;
252 G4cout <<
"°°° Cross section per water molecule (cm^2)=" << sigma/cm/cm <<
G4endl;
253 G4cout <<
"°°° Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./cm) <<
G4endl;
255 G4cout <<
"°°° G4DNAChampionElasticModel - XS INFO END" <<
G4endl;
260 return sigma*waterDensity;
273 if (verboseLevel > 3)
274 G4cout <<
"Calling SampleSecondaries() of G4DNAChampionElasticModel" <<
G4endl;
278 if (electronEnergy0 < killBelowEnergy)
286 if (electronEnergy0>= killBelowEnergy && electronEnergy0 < highEnergyLimit)
289 G4double cosTheta = RandomizeCosTheta(electronEnergy0);
297 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
299 xDir *= std::cos(phi);
300 yDir *= std::sin(phi);
302 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
313G4double G4DNAChampionElasticModel::Theta
330 std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
331 std::vector<double>::iterator t1 = t2-1;
333 std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), integrDiff);
334 std::vector<double>::iterator e11 = e12-1;
336 std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(), integrDiff);
337 std::vector<double>::iterator e21 = e22-1;
346 xs11 = eDiffCrossSectionData[valueT1][valueE11];
347 xs12 = eDiffCrossSectionData[valueT1][valueE12];
348 xs21 = eDiffCrossSectionData[valueT2][valueE21];
349 xs22 = eDiffCrossSectionData[valueT2][valueE22];
352 if (xs11==0 && xs12==0 && xs21==0 && xs22==0)
return (0.);
354 theta = QuadInterpolator ( valueE11, valueE12,
374 G4double value = std::exp(d1 + (d2 - d1)*(e - e1)/ (e2 - e1));
388 G4double value = (d1 + (d2 - d1)*(e - e1)/ (e2 - e1));
400 G4double a = (std::log10(xs2)-std::log10(xs1)) / (std::log10(e2)-std::log10(e1));
401 G4double b = std::log10(xs2) - a*std::log10(e2);
402 G4double sigma = a*std::log10(e) + b;
403 G4double value = (std::pow(10.,sigma));
431 G4double interpolatedvalue1 = LinLinInterpolate(e11, e12, e, xs11, xs12);
432 G4double interpolatedvalue2 = LinLinInterpolate(e21, e22, e, xs21, xs22);
433 G4double value = LinLinInterpolate(t1, t2, t, interpolatedvalue1, interpolatedvalue2);
445 integrdiff = uniformRand;
451 cosTheta= std::cos(theta*pi/180);
G4DLLIMPORT std::ostream G4cout
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual ~G4DNAChampionElasticModel()
G4DNAChampionElasticModel(const G4ParticleDefinition *p=0, const G4String &nam="DNAChampionElasticModel")
G4ParticleChangeForGamma * fParticleChangeForGamma
virtual G4double FindValue(G4double e, G4int componentId=0) const
virtual G4bool LoadData(const G4String &argFileName)
static G4DNAMolecularMaterial * Instance()
const std::vector< double > * GetNumMolPerVolTableFor(const G4Material *) const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Electron * ElectronDefinition()
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
const G4String & GetParticleName() const
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)