92{
93
94 if (verboseLevel > 3)
95 {
97 "Calling G4DNARelativisticIonisationModel::Initialise()"
99 }
100
101
102 if(fParticleDefinition != nullptr && fParticleDefinition != particle)
103 {
104 G4Exception(
"G4DNARelativisticIonisationModel::Initialise",
"em0001",
105 FatalException,
"Model already initialized for another particle type.");
106 }
107
108 fParticleDefinition = particle;
110 if(particle == electronDef)
111 {
112 fLowEnergyLimit = 10 * eV;
113 fHighEnergyLimit = 1.0 * GeV;
114
115 std::ostringstream eFullFileNameZ;
116
118 if (path == nullptr)
119 {
120 G4Exception(
"G4DNARelativisticIonisationModel::Initialise",
"em0006",
122 return;
123 }
124
125
128 auto Ncouple = (
G4int)coupletable ->GetTableSize();
129 for(
G4int i=0; i<Ncouple; ++i)
130 {
134 {
135
137
139
140 if(Z!=79) continue;
141
142 iState [Z].clear();
143 iShell [Z].clear();
144 iSubShell [Z].clear();
145 Nelectrons[Z].clear();
146 Ebinding [Z].clear();
147 Ekinetic [Z].clear();
149
150
151 eVecEZ.clear();
152 eVecEjeEZ.clear();
153 eProbaShellMapZ.clear();
154 eDiffCrossSectionDataZ.clear();
155
156 eFullFileNameZ.str("");
157 eFullFileNameZ.clear(stringstream::goodbit);
158
159 eFullFileNameZ
160 << path
161 << "/dna/sigmadiff_cumulated_ionisation_e_RBEBV_Z"
162 << Z << ".dat";
163 std::ifstream eDiffCrossSectionZ(eFullFileNameZ.str().c_str());
164 if (!eDiffCrossSectionZ)
165 G4Exception(
"G4DNARelativisticIonisationModel::Initialise",
"em0003",
167 "Missing data file for cumulated DCS");
168
169 eVecEZ[Z].push_back(0.);
170 while(!eDiffCrossSectionZ.eof())
171 {
174 eDiffCrossSectionZ>>tDummy>>eDummy;
175 if (tDummy != eVecEZ[Z].back())
176 {
177 eVecEZ[Z].push_back(tDummy);
178 eVecEjeEZ[Z][tDummy].push_back(0.);
179 }
180
181 for(
G4int istate=0;istate<(
G4int)iState[Z].size();istate++)
182 {
183 eDiffCrossSectionZ>>
184 eDiffCrossSectionDataZ[Z][istate][tDummy][eDummy];
185 eEjectedEnergyDataZ[Z][istate][tDummy]
186 [eDiffCrossSectionDataZ[Z][istate][tDummy][eDummy]]
187 = eDummy;
188 eProbaShellMapZ[Z][istate][tDummy].push_back(
189 eDiffCrossSectionDataZ[Z][istate][tDummy][eDummy]);
190 }
191
192 if (eDummy != eVecEjeEZ[Z][tDummy].back()){
193 eVecEjeEZ[Z][tDummy].push_back(eDummy);
194 }
195 }
196 }
197 }
198 }
199 else
200 {
202 "Error : No particle Definition is found in G4DNARelativisticIonisationModel"
204 return;
205 }
206
207 if( verboseLevel>0 )
208 {
209 G4cout <<
"Relativistic Ionisation model is initialized " <<
G4endl
210 << "Energy range: "
215 }
216
217
220
223
224 if (isInitialised){return;}
225 isInitialised = true;
226}
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
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()
virtual void LoadAtomicStates(G4int z, const char *path)
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
const G4Material * GetMaterial() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
const G4String & GetParticleName() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const