Geant4  10.01
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 84398 2014-10-15 07:20:18Z 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  const G4String& pixename = "");
69 
70  virtual ~G4VAtomDeexcitation();
71 
72  //========== initialization ==========
73 
74  // Overall initialisation before new run
76 
77  // Initialisation of deexcitation at the beginning of run
78  virtual void InitialiseForNewRun() = 0;
79 
80  // Initialisation for a concrete atom
81  // May be called at run time
82  virtual void InitialiseForExtraAtom(G4int Z) = 0;
83 
84  // Activation of deexcitation per detector region
85  void SetDeexcitationActiveRegion(const G4String& rname,
86  G4bool valDeexcitation,
87  G4bool valAuger,
88  G4bool valPIXE);
89 
90  // Activation of deexcitation
91  inline void SetFluo(G4bool);
92  inline G4bool IsFluoActive() const;
93 
94  // Activation of Auger electron production
95  inline void SetAuger(G4bool);
96  inline G4bool IsAugerActive() const;
97 
98  // Activation of PIXE simulation
99  inline void SetPIXE(G4bool);
100  // inline void SetPIXEActive(G4bool);
101  inline G4bool IsPIXEActive() const;
102 
103  // Deexcitation model name
104  inline const G4String& GetName() const;
105 
106  // PIXE model name
107  inline void SetPIXECrossSectionModel(const G4String&);
108  inline const G4String& PIXECrossSectionModel() const;
109 
110  // PIXE model name for e+e-
111  inline void SetPIXEElectronCrossSectionModel(const G4String&);
112  inline const G4String& PIXEElectronCrossSectionModel() const;
113 
114  // Set flag allowing ignore production thresholds in deexcitation
115  inline void SetIgnoreCuts(G4bool);
116  inline G4bool IgnoreCuts() const;
117 
118  // Access to the list of atoms active for deexcitation
119  inline const std::vector<G4bool>& GetListOfActiveAtoms() const;
120 
121  // Verbosity level
122  inline void SetVerboseLevel(G4int);
123  inline G4int GetVerboseLevel() const;
124 
125  //========== Run time methods ==========
126 
127  // Check if deexcitation is active for a given geometry volume
128  inline G4bool CheckDeexcitationActiveRegion(G4int coupleIndex);
129  inline G4bool CheckAugerActiveRegion(G4int coupleIndex);
130 
131  // Get atomic shell by shell index, used by discrete processes
132  // (for example, photoelectric), when shell vacancy sampled by the model
133  virtual
135  G4AtomicShellEnumerator shell) = 0;
136 
137  // generation of deexcitation for given atom and shell vacancy
138  inline void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,
139  const G4AtomicShell*,
140  G4int Z,
141  G4int coupleIndex);
142 
143  // generation of deexcitation for given atom and shell vacancy
144  virtual void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,
145  const G4AtomicShell*,
146  G4int Z,
147  G4double gammaCut,
148  G4double eCut) = 0;
149 
150  // access or compute PIXE cross section
151  virtual G4double
153  G4int Z,
155  G4double kinE,
156  const G4Material* mat = 0) = 0;
157 
158  // access or compute PIXE cross section
159  virtual G4double
161  G4int Z,
163  G4double kinE,
164  const G4Material* mat = 0) = 0;
165 
166  // Sampling of PIXE for ionisation processes
167  void AlongStepDeexcitation(std::vector<G4Track*>& tracks,
168  const G4Step& step,
169  G4double& eLoss,
170  G4int coupleIndex);
171 
172 private:
173 
174  // copy constructor and hide assignment operator
177 
180 
191  std::vector<G4bool> activeZ;
192  std::vector<G4bool> activeDeexcitationMedia;
193  std::vector<G4bool> activeAugerMedia;
194  std::vector<G4bool> activePIXEMedia;
195  std::vector<G4String> activeRegions;
196  std::vector<G4bool> deRegions;
197  std::vector<G4bool> AugerRegions;
198  std::vector<G4bool> PIXERegions;
199  std::vector<G4DynamicParticle*> vdyn;
200 
201  static G4int pixeIDg;
202  static G4int pixeIDe;
203 };
204 
206 {
207  isActive = val;
208  theParameters->SetFluo(val);
209 }
210 
212 {
213  return isActive;
214 }
215 
217 {
218  flagAuger = val;
219  if(val) { isActive = true; }
220  theParameters->SetAuger(val);
221 }
222 
224 {
225  return flagAuger;
226 }
227 
229 {
230  flagPIXE = val;
231  if(val) { isActive = true; }
232  theParameters->SetPixe(val);
233 }
234 
236 {
237  return flagPIXE;
238 }
239 
241 {
242  ignoreCuts = val;
243 }
244 
246 {
247  return ignoreCuts;
248 }
249 
251 {
252  return name;
253 }
254 
255 inline
257 {
258  namePIXE = n;
259 }
260 
261 inline void
263 {
265 }
266 
267 inline
269 {
270  return namePIXE;
271 }
272 
273 inline
275 {
276  return nameElectronPIXE;
277 }
278 
279 inline const std::vector<G4bool>&
281 {
282  return activeZ;
283 }
284 
286 {
287  verbose = val;
288 }
289 
291 {
292  return verbose;
293 }
294 
295 inline G4bool
297 {
298  return (isActive || activeDeexcitationMedia[coupleIndex]);
299 }
300 
301 inline G4bool
303 {
304 
305  return (flagAuger || activeAugerMedia[coupleIndex]);
306 }
307 
308 inline void
309 G4VAtomDeexcitation::GenerateParticles(std::vector<G4DynamicParticle*>* v,
310  const G4AtomicShell* as,
311  G4int Z,
312  G4int idx)
313 {
314  G4double gCut = DBL_MAX;
315  if(ignoreCuts) {
316  gCut = 0.0;
317  } else if (theCoupleTable) {
318  gCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[idx];
319  }
320  if(gCut < as->BindingEnergy()) {
321  G4double eCut = DBL_MAX;
322  if(CheckAugerActiveRegion(idx)) {
323  if(ignoreCuts) {
324  eCut = 0.0;
325  } else if (theCoupleTable) {
326  eCut = (*(theCoupleTable->GetEnergyCutsVector(1)))[idx];
327  }
328  }
329  GenerateParticles(v, as, Z, gCut, eCut);
330  }
331 }
332 
333 #endif
334 
void SetPIXEElectronCrossSectionModel(const G4String &)
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)
G4bool IgnoreCuts() const
void SetDeexcitationActiveRegion(const G4String &rname, G4bool valDeexcitation, G4bool valAuger, G4bool valPIXE)
void SetPIXECrossSectionModel(const G4String &)
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 G4String & PIXEElectronCrossSectionModel() const
const G4ParticleDefinition * gamma
bool G4bool
Definition: G4Types.hh:79
G4VAtomDeexcitation(const G4String &modname="Deexcitation", const G4String &pixename="")
Definition: G4Step.hh:76
G4EmParameters * theParameters
const G4int n
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
const G4String & PIXECrossSectionModel() const
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
std::vector< G4bool > PIXERegions
G4AtomicShellEnumerator
void SetFluo(G4bool val)
G4VAtomDeexcitation & operator=(const G4VAtomDeexcitation &right)
std::vector< G4bool > activePIXEMedia