57 fpMolWaterDensity = 0;
72 G4cout <<
"CPA100 excitation model is constructed " <<
G4endl;
87 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
88 for (pos = tableData.begin(); pos != tableData.end(); ++pos)
102 if (verboseLevel > 3)
103 G4cout <<
"Calling G4DNACPA100ExcitationModel::Initialise()" <<
G4endl;
105 G4String fileElectron(
"dna/sigma_excitation_e_cpa100");
115 tableFile[electron] = fileElectron;
129 tableData[electron] = tableE;
135 G4cout <<
"CPA100 excitation model is initialized " <<
G4endl
147 if (isInitialised)
return;
149 isInitialised =
true;
161 if (verboseLevel > 3)
162 G4cout <<
"Calling CrossSectionPerVolume() of G4DNACPA100ExcitationModel" <<
G4endl;
176 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
177 pos = tableData.find(particleName);
179 if (pos != tableData.end())
189 G4Exception(
"G4DNACPA100ExcitationModel::CrossSectionPerVolume",
"em0002",
194 if (verboseLevel > 2)
196 G4cout <<
"__________________________________" <<
G4endl;
197 G4cout <<
"G4DNACPA100ExcitationModel - XS INFO START" <<
G4endl;
198 G4cout <<
"Kinetic energy(eV)=" << ekin/eV <<
" particle : " << particleName <<
G4endl;
199 G4cout <<
"Cross section per water molecule (cm^2)=" << sigma/cm/cm <<
G4endl;
200 G4cout <<
"Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./cm) <<
G4endl;
203 G4cout <<
"G4DNACPA100ExcitationModel - XS INFO END" <<
G4endl;
206 return sigma*waterDensity;
219 if (verboseLevel > 3)
220 G4cout <<
"Calling SampleSecondaries() of G4DNACPA100ExcitationModel" <<
G4endl;
226 G4int level = RandomSelect(k,particleName);
228 G4double newEnergy = k - excitationEnergy;
238 (excitationEnergy/k) / (1. + (k/(2*electron_mass_c2))*(1.-excitationEnergy/k) );
240 cosTheta = std::sqrt(1.-cosTheta);
256 G4double CT1, ST1, CF1, SF1, CT2, ST2, CF2, SF2;
257 G4double sinTheta = std::sqrt (1-cosTheta*cosTheta);
269 ST1=std::sqrt(1.-CT1*CT1);
271 if (ST1!=0) CF1 = zVers.
x()/ST1;
else CF1 = std::cos(2. * pi *
G4UniformRand());
272 if (ST1!=0) SF1 = zVers.
y()/ST1;
else SF1 = std::sqrt(1.-CF1*CF1);
281 A3 = sinTheta*std::cos(phi);
282 A4 = A3*CT1 + ST1*cosTheta;
283 A5 = sinTheta * std::sin(phi);
284 A2 = A4 * SF1 + A5 * CF1;
285 A1 = A4 * CF1 - A5 * SF1;
287 CT2 = CT1*cosTheta - ST1*A3;
288 ST2 = std::sqrt(1.-CT2*CT2);
290 if (ST2==0) ST2=1E-6;
337 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
338 pos = tableData.find(particle);
340 if (pos != tableData.end())
409 value += valuesBuffer[i];
420 if (valuesBuffer[i] > value)
422 delete[] valuesBuffer;
425 value -= valuesBuffer[i];
428 if (valuesBuffer)
delete[] valuesBuffer;
434 G4Exception(
"G4DNACPA100ExcitationModel::RandomSelect",
"em0002",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
G4DNACPA100ExcitationModel(const G4ParticleDefinition *p=0, const G4String &nam="DNACPA100ExcitationModel")
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
virtual ~G4DNACPA100ExcitationModel()
G4ParticleChangeForGamma * fParticleChangeForGamma
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &= *(new G4DataVector()))
G4double ExcitationEnergy(G4int level)
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
virtual G4double FindValue(G4double e, G4int componentId=0) const
virtual size_t NumberOfComponents(void) const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual G4bool LoadData(const G4String &argFileName)
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()
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * ElectronDefinition()
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
const G4String & GetParticleName() const
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
const G4Track * GetCurrentTrack() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)