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

Last change on this file since 1141 was 1055, checked in by garnier, 17 years ago

maj sur la beta de geant 4.9.3

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