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

Last change on this file since 1346 was 1340, checked in by garnier, 15 years ago

update ti head

File size: 16.0 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//
[1340]26// $Id: G4IonParametrisedLossModel.hh,v 1.8 2010/11/04 12:21:47 vnivanch Exp $
27// GEANT4 tag $Name: emlowen-V09-03-54 $
[966]28//
29// ===========================================================================
30// GEANT4 class header file
31//
32// Class: G4IonParametrisedLossModel
33//
34// Base class: G4VEmModel (utils)
35//
36// Author: Anton Lechner (Anton.Lechner@cern.ch)
37//
38// First implementation: 10. 11. 2008
39//
[1055]40// Modifications: 03. 02. 2009 - Bug fix iterators (AL)
[1192]41// 11. 03. 2009 - Introduced new table handler(G4IonDEDXHandler)
[1055]42// and modified method to add/remove tables
[1192]43// (tables are now built in init. phase),
[1055]44// Minor bug fix in ComputeDEDXPerVolume (AL)
[1192]45// 12. 11. 2009 - Added function for switching off scaling
46// of heavy ions from ICRU 73 data
[1196]47// 20. 11. 2009 - Added set-method for energy loss limit (AL)
[1228]48// 24. 11. 2009 - Bug fix: Range calculation corrected if same
49// materials appears with different cuts in diff.
50// regions (added UpdateRangeCache function and
51// modified BuildRangeVector, ComputeLossForStep
52// functions accordingly, added new cache param.,
53// changed typdef of IonMatCouple).
54// - Removed GetRange function (AL)
[1192]55//
[966]56// Class description:
57// Model for computing the energy loss of ions by employing a
58// parameterisation of dE/dx tables (default ICRU 73 tables). For
59// ion-material combinations and/or projectile energies not covered
60// by this model, the G4BraggIonModel and G4BetheBloch models are
61// employed.
62//
63// Comments:
64//
65// ===========================================================================
66
67
68#ifndef G4IONPARAMETRISEDLOSSMODEL_HH
69#define G4IONPARAMETRISEDLOSSMODEL_HH
70
71#include "G4VEmModel.hh"
72#include "G4EmCorrections.hh"
[1055]73#include "G4IonDEDXHandler.hh"
[966]74#include <iomanip>
75#include <list>
76#include <map>
77#include <utility>
78
79class G4BraggIonModel;
80class G4BetheBlochModel;
81class G4ParticleChangeForLoss;
[1055]82class G4VIonDEDXTable;
83class G4VIonDEDXScalingAlgorithm;
84class G4LPhysicsFreeVector;
[1228]85class G4MaterialCutsCouple;
[966]86
[1055]87typedef std::list<G4IonDEDXHandler*> LossTableList;
[1228]88typedef std::pair<const G4ParticleDefinition*,
89 const G4MaterialCutsCouple*> IonMatCouple;
[966]90
91
92class G4IonParametrisedLossModel : public G4VEmModel {
93
94 public:
95 G4IonParametrisedLossModel(const G4ParticleDefinition* particle = 0,
96 const G4String& name = "ParamICRU73");
97
98 virtual ~G4IonParametrisedLossModel();
99
100 virtual void Initialise(
101 const G4ParticleDefinition*, // Projectile
102 const G4DataVector&); // Cut energies
103
104 virtual G4double MinEnergyCut(
105 const G4ParticleDefinition*, // Projectile
106 const G4MaterialCutsCouple*);
107
108 virtual G4double ComputeCrossSectionPerAtom(
109 const G4ParticleDefinition*, // Projectile
110 G4double, // Kinetic energy of projectile
111 G4double, // Atomic number
112 G4double, // Mass number
113 G4double, // Energy cut for secondary prod.
114 G4double); // Maximum energy of secondaries
115
116 virtual G4double CrossSectionPerVolume(
117 const G4Material*, // Target material
118 const G4ParticleDefinition*, // Projectile
119 G4double, // Kinetic energy
120 G4double, // Energy cut for secondary prod.
121 G4double); // Maximum energy of secondaries
122
123 virtual G4double ComputeDEDXPerVolume(
124 const G4Material*, // Target material
125 const G4ParticleDefinition*, // Projectile
126 G4double, // Kinetic energy of projectile
127 G4double); // Energy cut for secondary prod.
128
129 // Function, which computes the continuous energy loss (due to electronic
130 // stopping) for a given pre-step energy and step length by using
131 // range vs energy (and energy vs range) tables
132 G4double ComputeLossForStep(
[1228]133 const G4MaterialCutsCouple*, // Mat-cuts couple
[966]134 const G4ParticleDefinition*, // Projectile
135 G4double, // Kinetic energy of projectile
136 G4double); // Length of current step
137
138 // Function, which computes the mean energy transfer rate to delta rays
[1340]139 inline G4double DeltaRayMeanEnergyTransferRate(
[966]140 const G4Material*, // Target Material
141 const G4ParticleDefinition*, // Projectile
142 G4double, // Kinetic energy of projectile
143 G4double); // Energy cut for secondary prod.
144
145
146 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
147 const G4MaterialCutsCouple*,
148 const G4DynamicParticle*,
149 G4double, // Energy cut for secondary prod.
150 G4double); // Maximum energy of secondaries
151
152 virtual G4double GetChargeSquareRatio(
153 const G4ParticleDefinition*, // Projectile
154 const G4Material*, // Target Material
155 G4double); // Kinetic energy of projectile
156
157 virtual G4double GetParticleCharge(
158 const G4ParticleDefinition*, // Projectile
159 const G4Material*, // Target Material
160 G4double); // Kinetic energy of projectile
161
162 virtual void CorrectionsAlongStep(
163 const G4MaterialCutsCouple*,// Mat.-Cut couple
164 const G4DynamicParticle*, // Dyn. particle
165 G4double&, // Energy loss in current step
166 G4double&,
167 G4double); // Length of current step
168
[1055]169 // Function which allows to add additional stopping power tables
[966]170 // in combination with a scaling algorithm, which may depend on dynamic
171 // information like the current particle energy (the table and scaling
[1055]172 // algorithm are used via a handler class, which performs e.g.caching or
[966]173 // which applies the scaling of energy and dE/dx values)
[1055]174 G4bool AddDEDXTable(const G4String& name,
175 G4VIonDEDXTable* table,
176 G4VIonDEDXScalingAlgorithm* algorithm = 0);
[966]177
[1055]178 G4bool RemoveDEDXTable(const G4String& name);
[966]179
[1192]180 // Function which allows to switch off scaling of stopping powers of heavy
181 // ions from existing ICRU 73 data
182 void DeactivateICRU73Scaling();
183
[966]184 // Function checking the applicability of physics tables to ion-material
185 // combinations (Note: the energy range of tables is not checked)
[1340]186 inline LossTableList::iterator IsApplicable(
[966]187 const G4ParticleDefinition*, // Projectile (ion)
188 const G4Material*); // Target material
189
190 // Function printing a dE/dx table for a given ion-material combination
191 // and a specified energy grid
192 void PrintDEDXTable(
193 const G4ParticleDefinition*, // Projectile (ion)
194 const G4Material*, // Absorber material
195 G4double, // Minimum energy per nucleon
196 G4double, // Maximum energy per nucleon
197 G4int, // Number of bins
198 G4bool); // Logarithmic scaling of energy
[1055]199
200 // Function printing a dE/dx table for a given ion-material combination
201 // and a specified energy grid
202 void PrintDEDXTableHandlers(
203 const G4ParticleDefinition*, // Projectile (ion)
204 const G4Material*, // Absorber material
205 G4double, // Minimum energy per nucleon
206 G4double, // Maximum energy per nucleon
207 G4int, // Number of bins
208 G4bool); // Logarithmic scaling of energy
[966]209
[1196]210 // Function for setting energy loss limit for stopping power integration
[1340]211 inline void SetEnergyLossLimit(G4double ionEnergyLossLimit);
[1196]212
[966]213 protected:
[1340]214
215 virtual
[966]216 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
217 G4double); // Kinetic energy of projectile
218
219 private:
220 // Function which updates parameters concerning the dE/dx calculation
221 // (the parameters are only updated if the particle, the material or
222 // the associated energy cut has changed)
223 void UpdateDEDXCache(
224 const G4ParticleDefinition*, // Projectile (ion)
225 const G4Material*, // Target material
226 G4double cutEnergy); // Energy cut
227
[1228]228 // Function which updates parameters concerning the range calculation
229 // (the parameters are only updated if the particle, the material or
230 // the associated energy cut has changed)
231 void UpdateRangeCache(
232 const G4ParticleDefinition*, // Projectile (ion)
233 const G4MaterialCutsCouple*); // Target material
234
[966]235 // Function, which updates parameters concering particle properties
[1340]236 inline void UpdateCache(
[966]237 const G4ParticleDefinition*); // Projectile (ion)
238
239 // Function, which builds range vs energy (and energy vs range) vectors
240 // for a given particle, material and energy cut
241 void BuildRangeVector(
242 const G4ParticleDefinition*, // Projectile (ion)
[1228]243 const G4MaterialCutsCouple*); // Material cuts couple
[966]244
245 // Assignment operator and copy constructor are hidden:
246 G4IonParametrisedLossModel & operator=(
247 const G4IonParametrisedLossModel &right);
248 G4IonParametrisedLossModel(const G4IonParametrisedLossModel &);
249
250 // ######################################################################
251 // # Models and dE/dx tables for computing the energy loss
252 // #
253 // ######################################################################
254
255 // G4BraggIonModel and G4BetheBlochModel are used for ion-target
256 // combinations and/or projectile energies not covered by parametrisations
257 // adopted by this model:
258 G4BraggIonModel* braggIonModel;
259 G4BetheBlochModel* betheBlochModel;
260
261 // List of dE/dx tables plugged into the model
262 LossTableList lossTableList;
263
264 // ######################################################################
265 // # Maps of Range vs Energy and Energy vs Range vectors
266 // #
267 // ######################################################################
268
269 typedef std::map<IonMatCouple, G4LPhysicsFreeVector*> RangeEnergyTable;
270 RangeEnergyTable r;
271
272 typedef std::map<IonMatCouple, G4LPhysicsFreeVector*> EnergyRangeTable;
273 EnergyRangeTable E;
274
275 // ######################################################################
276 // # Energy grid definitions (e.g. used for computing range-energy
277 // # tables)
278 // ######################################################################
279
280 G4double lowerEnergyEdgeIntegr;
281 G4double upperEnergyEdgeIntegr;
282
283 size_t nmbBins;
284 size_t nmbSubBins;
285
286 // ######################################################################
287 // # Particle change for loss
288 // #
289 // ######################################################################
290
291 // Pointer to particle change object, which is used to set e.g. the
[1340]292 // energy loss and secondary delta-electron
293 // used indicating if model is initialized
[966]294 G4ParticleChangeForLoss* particleChangeLoss;
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.