source: trunk/source/processes/electromagnetic/lowenergy/include/G4IonParametrisedLossModel.hh@ 1201

Last change on this file since 1201 was 1196, checked in by garnier, 16 years ago

update CVS release candidate geant4.9.3.01

File size: 15.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28// ===========================================================================
29// GEANT4 class header file
30//
31// Class: G4IonParametrisedLossModel
32//
33// Base class: G4VEmModel (utils)
34//
35// Author: Anton Lechner (Anton.Lechner@cern.ch)
36//
37// First implementation: 10. 11. 2008
38//
39// Modifications: 03. 02. 2009 - Bug fix iterators (AL)
40// 11. 03. 2009 - Introduced new table handler(G4IonDEDXHandler)
41// and modified method to add/remove tables
42// (tables are now built in init. phase),
43// Minor bug fix in ComputeDEDXPerVolume (AL)
44// 12. 11. 2009 - Added function for switching off scaling
45// of heavy ions from ICRU 73 data
46// 20. 11. 2009 - Added set-method for energy loss limit (AL)
47//
48// Class description:
49// Model for computing the energy loss of ions by employing a
50// parameterisation of dE/dx tables (default ICRU 73 tables). For
51// ion-material combinations and/or projectile energies not covered
52// by this model, the G4BraggIonModel and G4BetheBloch models are
53// employed.
54//
55// Comments:
56//
57// ===========================================================================
58
59
60#ifndef G4IONPARAMETRISEDLOSSMODEL_HH
61#define G4IONPARAMETRISEDLOSSMODEL_HH
62
63#include "G4VEmModel.hh"
64#include "G4EmCorrections.hh"
65#include "G4IonDEDXHandler.hh"
66#include <iomanip>
67#include <list>
68#include <map>
69#include <utility>
70
71class G4BraggIonModel;
72class G4BetheBlochModel;
73class G4ParticleChangeForLoss;
74class G4VIonDEDXTable;
75class G4VIonDEDXScalingAlgorithm;
76class G4LPhysicsFreeVector;
77
78typedef std::list<G4IonDEDXHandler*> LossTableList;
79typedef std::pair<const G4ParticleDefinition*, const G4Material*> IonMatCouple;
80
81
82class G4IonParametrisedLossModel : public G4VEmModel {
83
84 public:
85 G4IonParametrisedLossModel(const G4ParticleDefinition* particle = 0,
86 const G4String& name = "ParamICRU73");
87
88 virtual ~G4IonParametrisedLossModel();
89
90 virtual void Initialise(
91 const G4ParticleDefinition*, // Projectile
92 const G4DataVector&); // Cut energies
93
94 virtual G4double MinEnergyCut(
95 const G4ParticleDefinition*, // Projectile
96 const G4MaterialCutsCouple*);
97
98 virtual G4double ComputeCrossSectionPerAtom(
99 const G4ParticleDefinition*, // Projectile
100 G4double, // Kinetic energy of projectile
101 G4double, // Atomic number
102 G4double, // Mass number
103 G4double, // Energy cut for secondary prod.
104 G4double); // Maximum energy of secondaries
105
106 virtual G4double CrossSectionPerVolume(
107 const G4Material*, // Target material
108 const G4ParticleDefinition*, // Projectile
109 G4double, // Kinetic energy
110 G4double, // Energy cut for secondary prod.
111 G4double); // Maximum energy of secondaries
112
113 virtual G4double ComputeDEDXPerVolume(
114 const G4Material*, // Target material
115 const G4ParticleDefinition*, // Projectile
116 G4double, // Kinetic energy of projectile
117 G4double); // Energy cut for secondary prod.
118
119 // Function, which computes the continuous energy loss (due to electronic
120 // stopping) for a given pre-step energy and step length by using
121 // range vs energy (and energy vs range) tables
122 G4double ComputeLossForStep(
123 const G4Material*, // Target material
124 const G4ParticleDefinition*, // Projectile
125 G4double, // Kinetic energy of projectile
126 G4double, // Energy cut for secondary prod.
127 G4double); // Length of current step
128
129 // Function, which computes the mean energy transfer rate to delta rays
130 G4double DeltaRayMeanEnergyTransferRate(
131 const G4Material*, // Target Material
132 const G4ParticleDefinition*, // Projectile
133 G4double, // Kinetic energy of projectile
134 G4double); // Energy cut for secondary prod.
135
136
137 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
138 const G4MaterialCutsCouple*,
139 const G4DynamicParticle*,
140 G4double, // Energy cut for secondary prod.
141 G4double); // Maximum energy of secondaries
142
143 virtual G4double GetChargeSquareRatio(
144 const G4ParticleDefinition*, // Projectile
145 const G4Material*, // Target Material
146 G4double); // Kinetic energy of projectile
147
148 virtual G4double GetParticleCharge(
149 const G4ParticleDefinition*, // Projectile
150 const G4Material*, // Target Material
151 G4double); // Kinetic energy of projectile
152
153 virtual void CorrectionsAlongStep(
154 const G4MaterialCutsCouple*,// Mat.-Cut couple
155 const G4DynamicParticle*, // Dyn. particle
156 G4double&, // Energy loss in current step
157 G4double&,
158 G4double); // Length of current step
159
160 G4double GetRange(const G4ParticleDefinition*, // Projectile
161 const G4Material*, // Target Material
162 G4double); // Kinetic energy
163
164 // Function which allows to add additional stopping power tables
165 // in combination with a scaling algorithm, which may depend on dynamic
166 // information like the current particle energy (the table and scaling
167 // algorithm are used via a handler class, which performs e.g.caching or
168 // which applies the scaling of energy and dE/dx values)
169 G4bool AddDEDXTable(const G4String& name,
170 G4VIonDEDXTable* table,
171 G4VIonDEDXScalingAlgorithm* algorithm = 0);
172
173 G4bool RemoveDEDXTable(const G4String& name);
174
175 // Function which allows to switch off scaling of stopping powers of heavy
176 // ions from existing ICRU 73 data
177 void DeactivateICRU73Scaling();
178
179 // Function checking the applicability of physics tables to ion-material
180 // combinations (Note: the energy range of tables is not checked)
181 LossTableList::iterator IsApplicable(
182 const G4ParticleDefinition*, // Projectile (ion)
183 const G4Material*); // Target material
184
185 // Function printing a dE/dx table for a given ion-material combination
186 // and a specified energy grid
187 void PrintDEDXTable(
188 const G4ParticleDefinition*, // Projectile (ion)
189 const G4Material*, // Absorber material
190 G4double, // Minimum energy per nucleon
191 G4double, // Maximum energy per nucleon
192 G4int, // Number of bins
193 G4bool); // Logarithmic scaling of energy
194
195 // Function printing a dE/dx table for a given ion-material combination
196 // and a specified energy grid
197 void PrintDEDXTableHandlers(
198 const G4ParticleDefinition*, // Projectile (ion)
199 const G4Material*, // Absorber material
200 G4double, // Minimum energy per nucleon
201 G4double, // Maximum energy per nucleon
202 G4int, // Number of bins
203 G4bool); // Logarithmic scaling of energy
204
205 // Function for setting energy loss limit for stopping power integration
206 void SetEnergyLossLimit(G4double ionEnergyLossLimit);
207
208 protected:
209 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
210 G4double); // Kinetic energy of projectile
211
212 private:
213 // Function which updates parameters concerning the dE/dx calculation
214 // (the parameters are only updated if the particle, the material or
215 // the associated energy cut has changed)
216 void UpdateDEDXCache(
217 const G4ParticleDefinition*, // Projectile (ion)
218 const G4Material*, // Target material
219 G4double cutEnergy); // Energy cut
220
221 // Function, which updates parameters concering particle properties
222 void UpdateCache(
223 const G4ParticleDefinition*); // Projectile (ion)
224
225 // Function, which builds range vs energy (and energy vs range) vectors
226 // for a given particle, material and energy cut
227 void BuildRangeVector(
228 const G4ParticleDefinition*, // Projectile (ion)
229 const G4Material*, // Target material
230 G4double); // Energy cut
231
232 // Assignment operator and copy constructor are hidden:
233 G4IonParametrisedLossModel & operator=(
234 const G4IonParametrisedLossModel &right);
235 G4IonParametrisedLossModel(const G4IonParametrisedLossModel &);
236
237 // ######################################################################
238 // # Models and dE/dx tables for computing the energy loss
239 // #
240 // ######################################################################
241
242 // G4BraggIonModel and G4BetheBlochModel are used for ion-target
243 // combinations and/or projectile energies not covered by parametrisations
244 // adopted by this model:
245 G4BraggIonModel* braggIonModel;
246 G4BetheBlochModel* betheBlochModel;
247
248 // List of dE/dx tables plugged into the model
249 LossTableList lossTableList;
250
251 // ######################################################################
252 // # Maps of Range vs Energy and Energy vs Range vectors
253 // #
254 // ######################################################################
255
256 typedef std::map<IonMatCouple, G4LPhysicsFreeVector*> RangeEnergyTable;
257 RangeEnergyTable r;
258
259 typedef std::map<IonMatCouple, G4LPhysicsFreeVector*> EnergyRangeTable;
260 EnergyRangeTable E;
261
262 // ######################################################################
263 // # Energy grid definitions (e.g. used for computing range-energy
264 // # tables)
265 // ######################################################################
266
267 G4double lowerEnergyEdgeIntegr;
268 G4double upperEnergyEdgeIntegr;
269
270 size_t nmbBins;
271 size_t nmbSubBins;
272
273 // ######################################################################
274 // # Particle change for loss
275 // #
276 // ######################################################################
277
278 // Pointer to particle change object, which is used to set e.g. the
279 // energy loss due to nuclear stopping
280 G4ParticleChangeForLoss* particleChangeLoss;
281
282 // Flag indicating if model is initialized (i.e. if
283 // G4ParticleChangeForLoss was created)
284 G4bool modelIsInitialised;
285
286 // ######################################################################
287 // # Corrections and energy loss limit
288 // #
289 // ######################################################################
290
291 // Pointer to an G4EmCorrections object, which is used to compute the
292 // effective ion charge, and other corrections (like high order corrections
293 // to stopping powers)
294 G4EmCorrections* corrections;
295
296 // Corrections factor for effective charge, computed for each particle
297 // step
298 G4double corrFactor;
299
300 // Parameter indicating the maximal fraction of kinetic energy, which
301 // a particle may loose along a step, in order that the simple relation
302 // (dE/dx)*l can still be applied to compute the energy loss (l = step
303 // length)
304 G4double energyLossLimit;
305
306 // ######################################################################
307 // # Cut energies and properties of generic ion
308 // #
309 // ######################################################################
310
311 // Vector containing the current cut energies (the vector index matches
312 // the material-cuts couple index):
313 G4DataVector cutEnergies;
314
315 // Pointer to generic ion and mass of generic ion
316 G4ParticleDefinition* genericIon;
317 G4double genericIonPDGMass;
318
319 // ######################################################################
320 // # "Most-recently-used" cache parameters
321 // #
322 // ######################################################################
323
324 // Cached key (particle) and value information for a faster
325 // access of particle-related information
326 const G4ParticleDefinition* cacheParticle; // Key: Current projectile
327 G4double cacheMass; // Projectile mass
328 G4double cacheElecMassRatio; // Electron-mass ratio
329 G4double cacheChargeSquare; // Charge squared
330
331 // Cached parameters needed during dE/dx computations:
332 const G4ParticleDefinition* dedxCacheParticle; // Key: 1) Current ion,
333 const G4Material* dedxCacheMaterial; // 2) material and
334 G4double dedxCacheEnergyCut; // 3) cut energy
335 LossTableList::iterator dedxCacheIter; // Responsible dE/dx table
336 G4PhysicsVector* dedxCacheEnergyRange; // Energy vs range vector
337 G4PhysicsVector* dedxCacheRangeEnergy; // Range vs energy vector
338 G4double dedxCacheTransitionEnergy; // Transition energy between
339 // parameterization and
340 // Bethe-Bloch model
341 G4double dedxCacheTransitionFactor; // Factor for smoothing the dE/dx
342 // values in the transition region
343 G4double dedxCacheGenIonMassRatio; // Ratio of generic ion mass
344 // and current particle mass
345};
346
347
348#include "G4IonParametrisedLossModel.icc"
349
350#endif
Note: See TracBrowser for help on using the repository browser.