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

Last change on this file since 1314 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

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