Geant4  10.02.p01
G4VAtomDeexcitation.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: G4VAtomDeexcitation.hh 92921 2015-09-21 15:06:51Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 //
33 // File name: G4VAtomDeexcitation
34 //
35 // Author: Alfonso Mantero & Vladimir Ivanchenko
36 //
37 // Creation date: 30.06.2009
38 //
39 // Modifications:
40 // 15 Mar 2011 ALF stripped G4AtomicShellEnumerator to its own file
41 //
42 // Class Description:
43 //
44 // Abstract interface to energy loss models
45 
46 // -------------------------------------------------------------------
47 //
48 
49 #ifndef G4VAtomDeexcitation_h
50 #define G4VAtomDeexcitation_h 1
51 
52 #include "globals.hh"
53 #include "G4EmParameters.hh"
54 #include "G4AtomicShell.hh"
56 #include "G4ProductionCutsTable.hh"
57 #include "G4Track.hh"
58 #include <vector>
59 
61 class G4DynamicParticle;
63 
65 public:
66 
67  G4VAtomDeexcitation(const G4String& modname = "Deexcitation");
68 
69  virtual ~G4VAtomDeexcitation();
70 
71  //========== initialization ==========
72 
73  // Overall initialisation before new run
75 
76  // Initialisation of deexcitation at the beginning of run
77  virtual void InitialiseForNewRun() = 0;
78 
79  // Initialisation for a concrete atom
80  // May be called at run time
81  virtual void InitialiseForExtraAtom(G4int Z) = 0;
82 
83  void SetDeexcitationActiveRegion(const G4String& rname,
84  G4bool valDeexcitation,
85  G4bool valAuger,
86  G4bool valPIXE);
87 
88  // Activation of deexcitation
89  inline void SetFluo(G4bool);
90  inline G4bool IsFluoActive() const;
91 
92  // Activation of Auger electron production
93  inline void SetAuger(G4bool);
94  inline G4bool IsAugerActive() const;
95 
96  // Activation of Auger cascade
97  inline void SetAugerCascade(G4bool);
98  inline G4bool IsAugerCascadeActive() const;
99 
100  // Activation of PIXE simulation
101  inline void SetPIXE(G4bool);
102  inline G4bool IsPIXEActive() const;
103 
104  // Deexcitation model name
105  inline const G4String& GetName() const;
106 
107  // Access to the list of atoms active for deexcitation
108  inline const std::vector<G4bool>& GetListOfActiveAtoms() const;
109 
110  // Verbosity level
111  inline void SetVerboseLevel(G4int);
112  inline G4int GetVerboseLevel() const;
113 
114  //========== Run time methods ==========
115 
116  // Check if deexcitation is active for a given geometry volume
117  inline G4bool CheckDeexcitationActiveRegion(G4int coupleIndex);
118  inline G4bool CheckAugerActiveRegion(G4int coupleIndex);
119 
120  // Get atomic shell by shell index, used by discrete processes
121  // (for example, photoelectric), when shell vacancy sampled by the model
122  virtual
124  G4AtomicShellEnumerator shell) = 0;
125 
126  // generation of deexcitation for given atom and shell vacancy
127  inline void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,
128  const G4AtomicShell*,
129  G4int Z,
130  G4int coupleIndex);
131 
132  // generation of deexcitation for given atom and shell vacancy
133  virtual void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,
134  const G4AtomicShell*,
135  G4int Z,
136  G4double gammaCut,
137  G4double eCut) = 0;
138 
139  // access or compute PIXE cross section
140  virtual G4double
142  G4int Z,
144  G4double kinE,
145  const G4Material* mat = 0) = 0;
146 
147  // access or compute PIXE cross section
148  virtual G4double
150  G4int Z,
152  G4double kinE,
153  const G4Material* mat = 0) = 0;
154 
155  // Sampling of PIXE for ionisation processes
156  void AlongStepDeexcitation(std::vector<G4Track*>& tracks,
157  const G4Step& step,
158  G4double& eLoss,
159  G4int coupleIndex);
160 
161 private:
162 
163  // copy constructor and hide assignment operator
166 
169 
178  std::vector<G4bool> activeZ;
179  std::vector<G4bool> activeDeexcitationMedia;
180  std::vector<G4bool> activeAugerMedia;
181  std::vector<G4bool> activePIXEMedia;
182  std::vector<G4String> activeRegions;
183  std::vector<G4bool> deRegions;
184  std::vector<G4bool> AugerRegions;
185  std::vector<G4bool> PIXERegions;
186  std::vector<G4DynamicParticle*> vdyn;
187 
188  static G4int pixeIDg;
189  static G4int pixeIDe;
190 };
191 
193 {
194  isActive = val;
195  theParameters->SetFluo(val);
196 }
197 
199 {
200  return isActive;
201 }
202 
204 {
205  flagAuger = val;
206  if(val) { isActive = true; }
207  theParameters->SetAuger(val);
208 }
209 
211 {
212  return flagAuger;
213 }
214 
216 {
217  flagAugerCascade = val;
218  if(val) { isActive = true; }
220 }
221 
223 {
224  return flagAugerCascade;
225 }
226 
228 {
229  flagPIXE = val;
230  if(val) { isActive = true; }
231  theParameters->SetPixe(val);
232 }
233 
235 {
236  return flagPIXE;
237 }
238 
240 {
241  return name;
242 }
243 
244 inline const std::vector<G4bool>&
246 {
247  return activeZ;
248 }
249 
251 {
252  verbose = val;
253 }
254 
256 {
257  return verbose;
258 }
259 
260 inline G4bool
262 {
263  return (isActive || activeDeexcitationMedia[coupleIndex]);
264 }
265 
266 inline G4bool
268 {
269 
270  return (flagAuger || activeAugerMedia[coupleIndex]);
271 }
272 
273 inline void
274 G4VAtomDeexcitation::GenerateParticles(std::vector<G4DynamicParticle*>* v,
275  const G4AtomicShell* as,
276  G4int Z,
277  G4int idx)
278 {
279  G4double gCut = DBL_MAX;
280  if(ignoreCuts) {
281  gCut = 0.0;
282  } else if (theCoupleTable) {
283  gCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[idx];
284  }
285  if(gCut < as->BindingEnergy()) {
286  G4double eCut = DBL_MAX;
287  if(CheckAugerActiveRegion(idx)) {
288  if(ignoreCuts) {
289  eCut = 0.0;
290  } else if (theCoupleTable) {
291  eCut = (*(theCoupleTable->GetEnergyCutsVector(1)))[idx];
292  }
293  }
294  GenerateParticles(v, as, Z, gCut, eCut);
295  }
296 }
297 
298 #endif
299 
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
G4bool IsFluoActive() const
void AlongStepDeexcitation(std::vector< G4Track * > &tracks, const G4Step &step, G4double &eLoss, G4int coupleIndex)
std::vector< G4String > activeRegions
G4bool IsPIXEActive() const
std::vector< G4DynamicParticle * > vdyn
virtual G4double GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=0)=0
void SetAuger(G4bool val)
void SetDeexcitationActiveRegion(const G4String &rname, G4bool valDeexcitation, G4bool valAuger, G4bool valPIXE)
const std::vector< G4bool > & GetListOfActiveAtoms() const
int G4int
Definition: G4Types.hh:78
G4int GetVerboseLevel() const
std::vector< G4bool > activeAugerMedia
G4bool IsAugerActive() const
std::vector< G4bool > AugerRegions
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
const G4ParticleDefinition * gamma
bool G4bool
Definition: G4Types.hh:79
void SetAugerCascade(G4bool val)
Definition: G4Step.hh:76
G4EmParameters * theParameters
virtual G4double ComputeShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=0)=0
G4ProductionCutsTable * theCoupleTable
G4bool CheckAugerActiveRegion(G4int coupleIndex)
void SetPixe(G4bool val)
std::vector< G4bool > activeDeexcitationMedia
virtual void InitialiseForExtraAtom(G4int Z)=0
const G4String & GetName() const
virtual void InitialiseForNewRun()=0
std::vector< G4bool > deRegions
std::vector< G4bool > activeZ
double G4double
Definition: G4Types.hh:76
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
#define DBL_MAX
Definition: templates.hh:83
G4VAtomDeexcitation(const G4String &modname="Deexcitation")
std::vector< G4bool > PIXERegions
G4bool IsAugerCascadeActive() const
G4AtomicShellEnumerator
void SetFluo(G4bool val)
G4VAtomDeexcitation & operator=(const G4VAtomDeexcitation &right)
std::vector< G4bool > activePIXEMedia