Geant4  10.02
G4EmSaturation.hh
Go to the documentation of this file.
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 // $Id: G4EmSaturation.hh 81936 2014-06-06 15:42:55Z gcosmo $
27 //
28 //
29 #ifndef G4EmSaturation_h
30 #define G4EmSaturation_h 1
31 
32 // -------------------------------------------------------------
33 //
34 // GEANT4 Class header file
35 //
36 //
37 // File name: G4EmSaturation
38 //
39 // Author: Vladimir Ivanchenko
40 //
41 // Creation date: 18.02.2008
42 //
43 // Modifications:
44 //
45 //
46 // Class Description:
47 // Compution on saturation effect, which reduce visible energy
48 // deposition at the step. Default implementation takes into
49 // account Birks effect. Birks coefficients for some materials
50 // from G4 database on materials are provided
51 //
52 // This class assumed to be G4ThreadLocal, because it is using
53 // cache value for material
54 //
55 // -------------------------------------------------------------
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
59 
60 #include "globals.hh"
61 #include "G4Step.hh"
62 #include "G4ParticleDefinition.hh"
63 #include <vector>
64 
65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
66 
67 class G4LossTableManager;
68 class G4NistManager;
70 class G4Material;
71 
73 {
74 public:
75 
76  G4EmSaturation(G4int verb);
77  virtual ~G4EmSaturation();
78 
79  // this method may be overwritten in the derived class
80  // which implements alternative algorithm of saturation
82  const G4MaterialCutsCouple*,
83  G4double length,
84  G4double edepTotal,
85  G4double edepNIEL = 0.0);
86 
87  // this method should not be overwitten
88  inline G4double VisibleEnergyDeposition(const G4Step*);
89 
90  // find and Birks coefficient
92 
93  inline void SetVerbose(G4int);
94 
95  // dump coeffitients used in run time
96  void DumpBirksCoefficients();
97 
98  // dump G4 list
100 
101 private:
102 
103  // hide assignment operator
106 
108 
110 
111  void InitialiseG4materials();
112 
117 
118  // cash
123 
128 
129  // list of materials used in run time
130  std::vector<const G4Material*> matPointers;
131  std::vector<G4String> matNames;
132  std::vector<G4double> massFactors;
133  std::vector<G4double> effCharges;
134 
135  // list of G4 materials
136  std::vector<G4double> g4MatData;
137  std::vector<G4String> g4MatNames;
138 };
139 
140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
141 
143 {
144  verbose = val;
145 }
146 
147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
148 
150  const G4Step* step)
151 {
152  G4Track* track = step->GetTrack();
154  track->GetMaterialCutsCouple(),
155  step->GetStepLength(),
156  step->GetTotalEnergyDeposit(),
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
161 
162 inline
164 {
165  if(mat != curMaterial) { InitialiseBirksCoefficient(mat); }
166  return curBirks;
167 }
168 
169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
170 
171 #endif
172 
std::vector< const G4Material * > matPointers
const G4ParticleDefinition * electron
std::vector< G4double > g4MatData
const G4ParticleDefinition * proton
G4double FindBirksCoefficient(const G4Material *)
G4double GetStepLength() const
void InitialiseG4materials()
G4NistManager * nist
void InitialiseBirksCoefficient(const G4Material *)
virtual G4double VisibleEnergyDeposition(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double length, G4double edepTotal, G4double edepNIEL=0.0)
G4double GetNonIonizingEnergyDeposit() const
virtual ~G4EmSaturation()
const G4Material * curMaterial
std::vector< G4double > effCharges
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
std::vector< G4String > g4MatNames
void DumpBirksCoefficients()
int G4int
Definition: G4Types.hh:78
void SetVerbose(G4int)
std::vector< G4String > matNames
G4double FindG4BirksCoefficient(const G4Material *)
const G4ParticleDefinition * GetParticleDefinition() const
Definition: G4Step.hh:76
std::vector< G4double > massFactors
G4double GetTotalEnergyDeposit() const
void DumpG4BirksCoefficients()
G4EmSaturation & operator=(const G4EmSaturation &right)
G4LossTableManager * manager
G4double curChargeSq
G4EmSaturation(G4int verb)
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const