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] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/utils/include/G4VAtomDeexcitation.hh (Version 11.3.0) and /processes/electromagnetic/utils/include/G4VAtomDeexcitation.hh (Version 9.5)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id: G4VAtomDeexcitation.hh,v 1.9 2011-01-03 19:34:03 vnivanch Exp $
                                                   >>  27 // GEANT4 tag $Name: not supported by cvs2svn $
 26 //                                                 28 //
 27 // -------------------------------------------     29 // -------------------------------------------------------------------
 28 //                                                 30 //
 29 // GEANT4 Class header file                        31 // GEANT4 Class header file
 30 //                                                 32 //
 31 //                                                 33 //
 32 // File name:     G4VAtomDeexcitation              34 // File name:     G4VAtomDeexcitation
 33 //                                                 35 //
 34 // Author:        Alfonso Mantero & Vladimir I     36 // Author:        Alfonso Mantero & Vladimir Ivanchenko
 35 //                                                 37 //
 36 // Creation date: 30.06.2009                       38 // Creation date: 30.06.2009
 37 //                                                 39 //
 38 // Modifications:                                  40 // Modifications:
 39 // 15 Mar 2011  ALF   stripped G4AtomicShellEn     41 // 15 Mar 2011  ALF   stripped G4AtomicShellEnumerator to its own file
 40 //                                                 42 //
 41 // Class Description:                              43 // Class Description:
 42 //                                                 44 //
 43 // Abstract interface to energy loss models        45 // Abstract interface to energy loss models
 44                                                    46 
 45 // -------------------------------------------     47 // -------------------------------------------------------------------
 46 //                                                 48 //
 47                                                    49 
 48 #ifndef G4VAtomDeexcitation_h                      50 #ifndef G4VAtomDeexcitation_h
 49 #define G4VAtomDeexcitation_h 1                    51 #define G4VAtomDeexcitation_h 1
 50                                                    52 
 51 #include "globals.hh"                              53 #include "globals.hh"
 52 #include "G4EmParameters.hh"                   << 
 53 #include "G4AtomicShell.hh"                        54 #include "G4AtomicShell.hh"
 54 #include "G4AtomicShellEnumerator.hh"              55 #include "G4AtomicShellEnumerator.hh"
 55 #include "G4ProductionCutsTable.hh"                56 #include "G4ProductionCutsTable.hh"
 56 #include "G4Track.hh"                              57 #include "G4Track.hh"
 57 #include "G4Threading.hh"                      << 
 58 #include <vector>                                  58 #include <vector>
 59                                                    59 
 60 class G4ParticleDefinition;                        60 class G4ParticleDefinition;
 61 class G4DynamicParticle;                           61 class G4DynamicParticle;
 62 class G4MaterialCutsCouple;                        62 class G4MaterialCutsCouple;
 63                                                    63 
 64 class G4VAtomDeexcitation {                        64 class G4VAtomDeexcitation {
 65 public:                                            65 public:
 66                                                    66 
 67   explicit G4VAtomDeexcitation(const G4String& <<  67   G4VAtomDeexcitation(const G4String& modname = "Deexcitation", 
                                                   >>  68           const G4String& pixename = "");
 68                                                    69 
 69   virtual ~G4VAtomDeexcitation();                  70   virtual ~G4VAtomDeexcitation();
 70                                                    71 
 71   //========== initialization ==========           72   //========== initialization ==========
 72                                                    73 
 73   // Overall initialisation before new run         74   // Overall initialisation before new run
 74   void InitialiseAtomicDeexcitation();             75   void InitialiseAtomicDeexcitation();
 75                                                    76 
 76   // Initialisation of deexcitation at the beg     77   // Initialisation of deexcitation at the beginning of run 
 77   virtual void InitialiseForNewRun() = 0;          78   virtual void InitialiseForNewRun() = 0;
 78                                                    79 
 79   // Initialisation for a concrete atom            80   // Initialisation for a concrete atom 
 80   // May be called at run time                     81   // May be called at run time 
 81   virtual void InitialiseForExtraAtom(G4int Z)     82   virtual void InitialiseForExtraAtom(G4int Z) = 0;
 82                                                    83 
 83   void SetDeexcitationActiveRegion(const G4Str <<  84   // Activation of deexcitation per detector region
 84                                    G4bool valD <<  85   void SetDeexcitationActiveRegion(const G4String& rname = "", 
 85                                    G4bool valA <<  86            G4bool valDeexcitation = true,
 86                                    G4bool valP <<  87            G4bool valAuger = false,
                                                   >>  88            G4bool valPIXE = true);
 87                                                    89 
 88   // Activation of deexcitation                    90   // Activation of deexcitation
 89   inline void SetFluo(G4bool);                     91   inline void SetFluo(G4bool);
 90   inline G4bool IsFluoActive() const;              92   inline G4bool IsFluoActive() const;
 91                                                    93 
 92   // Activation of Auger electron production       94   // Activation of Auger electron production
 93   inline void SetAuger(G4bool);                    95   inline void SetAuger(G4bool);
 94   inline G4bool IsAugerActive() const;             96   inline G4bool IsAugerActive() const;
 95                                                    97 
 96   // Activation of Auger cascade               << 
 97   inline void SetAugerCascade(G4bool);         << 
 98   inline G4bool IsAugerCascadeActive() const;  << 
 99                                                << 
100   // Activation of PIXE simulation                 98   // Activation of PIXE simulation
101   inline void SetPIXE(G4bool);                     99   inline void SetPIXE(G4bool);
                                                   >> 100   //  inline void SetPIXEActive(G4bool);
102   inline G4bool IsPIXEActive() const;             101   inline G4bool IsPIXEActive() const;
103                                                   102 
104   // Deexcitation model name                      103   // Deexcitation model name
105   inline const G4String& GetName() const;         104   inline const G4String& GetName() const;
106                                                   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 
107   // Access to the list of atoms active for de    114   // Access to the list of atoms active for deexcitation
108   inline const std::vector<G4bool>& GetListOfA    115   inline const std::vector<G4bool>& GetListOfActiveAtoms() const;
109                                                   116 
110   // Verbosity level                              117   // Verbosity level
111   inline void SetVerboseLevel(G4int);             118   inline void SetVerboseLevel(G4int);
112   inline G4int GetVerboseLevel() const;           119   inline G4int GetVerboseLevel() const;
113                                                   120 
114   //========== Run time methods ==========        121   //========== Run time methods ==========
115                                                   122 
116   // Check if deexcitation is active for a giv    123   // Check if deexcitation is active for a given geometry volume
117   inline G4bool CheckDeexcitationActiveRegion(    124   inline G4bool CheckDeexcitationActiveRegion(G4int coupleIndex);
118   inline G4bool CheckAugerActiveRegion(G4int c    125   inline G4bool CheckAugerActiveRegion(G4int coupleIndex);
119                                                   126 
120   // Get atomic shell by shell index, used by     127   // Get atomic shell by shell index, used by discrete processes 
121   // (for example, photoelectric), when shell     128   // (for example, photoelectric), when shell vacancy sampled by the model
122   virtual                                         129   virtual 
123   const G4AtomicShell* GetAtomicShell(G4int Z,    130   const G4AtomicShell* GetAtomicShell(G4int Z, 
124                                       G4Atomic << 131               G4AtomicShellEnumerator shell) = 0;
125                                                   132 
126   // generation of deexcitation for given atom    133   // generation of deexcitation for given atom and shell vacancy
127   // and material cut couple, which defines cu << 134   inline void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,  
128   void GenerateParticles(std::vector<G4Dynamic << 135         const G4AtomicShell*, 
129                          const G4AtomicShell*, << 136         G4int Z,
130                          G4int Z, G4int couple << 137         G4int coupleIndex);
131                                                   138 
132   // generation of deexcitation for given atom    139   // generation of deexcitation for given atom and shell vacancy
133   virtual void GenerateParticles(std::vector<G    140   virtual void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,  
134                                  const G4Atomi << 141          const G4AtomicShell*, 
135                                  G4int Z, G4do << 142          G4int Z,
                                                   >> 143                                  G4double gammaCut,
                                                   >> 144          G4double eCut) = 0;
136                                                   145 
137   // access or compute PIXE cross section         146   // access or compute PIXE cross section 
138   virtual G4double                                147   virtual G4double 
139   GetShellIonisationCrossSectionPerAtom(const     148   GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition*, 
140                                         G4int  << 149           G4int Z, 
141                                         G4Atom << 150           G4AtomicShellEnumerator shell,
142                                         G4doub << 151           G4double kinE,
143                                         const  << 152                                         const G4Material* mat = 0) = 0;
144                                                   153 
145   // access or compute PIXE cross section         154   // access or compute PIXE cross section 
146   virtual G4double                                155   virtual G4double 
147   ComputeShellIonisationCrossSectionPerAtom(   << 156   ComputeShellIonisationCrossSectionPerAtom(const G4ParticleDefinition*, 
148                                         const  << 157               G4int Z, 
149                                         G4int  << 158               G4AtomicShellEnumerator shell,
150                                         G4Atom << 159               G4double kinE,
151                                         G4doub << 160               const G4Material* mat = 0) = 0;
152                                         const  << 
153                                                   161 
154   // Sampling of PIXE for ionisation processes    162   // Sampling of PIXE for ionisation processes
155   void AlongStepDeexcitation(std::vector<G4Tra    163   void AlongStepDeexcitation(std::vector<G4Track*>& tracks,  
156                              const G4Step& ste << 164            const G4Step& step, 
157                              G4double& eLoss,  << 165            G4double& eLoss,
158                              G4int coupleIndex    166                              G4int coupleIndex);
159                                                   167 
160   // copy constructor and hide assignment oper << 
161   G4VAtomDeexcitation(G4VAtomDeexcitation &) = << 
162   G4VAtomDeexcitation & operator=(const G4VAto << 
163                                                << 
164 private:                                          168 private:
165                                                   169 
166   const G4ParticleDefinition* gamma;           << 170   // copy constructor and hide assignment operator
167   const G4ProductionCutsTable* theCoupleTable  << 171   G4VAtomDeexcitation(G4VAtomDeexcitation &);
168                                                << 172   G4VAtomDeexcitation & operator=(const G4VAtomDeexcitation &right);
169   G4int    nCouples = 0;                       << 
170   G4int    verbose = 1;                        << 
171                                                << 
172   G4bool   isActive = false;                   << 
173   G4bool   flagAuger = false;                  << 
174   G4bool   flagPIXE = false;                   << 
175   G4bool   ignoreCuts = false;                 << 
176                                                << 
177   G4bool   isActiveLocked = false;             << 
178   G4bool   isAugerLocked = false;              << 
179   G4bool   isPIXELocked = false;               << 
180                                                   173 
                                                   >> 174   G4ProductionCutsTable* theCoupleTable;
                                                   >> 175   G4double lowestKinEnergy;
                                                   >> 176   G4int    verbose;
                                                   >> 177   G4String name;
                                                   >> 178   G4String namePIXE;
                                                   >> 179   G4String nameElectronPIXE;
                                                   >> 180   G4bool   isActive;
                                                   >> 181   G4bool   flagAuger;
                                                   >> 182   G4bool   flagPIXE;
181   std::vector<G4bool>   activeZ;                  183   std::vector<G4bool>   activeZ;
182   std::vector<G4bool>   activeDeexcitationMedi    184   std::vector<G4bool>   activeDeexcitationMedia;
183   std::vector<G4bool>   activeAugerMedia;         185   std::vector<G4bool>   activeAugerMedia;
184   std::vector<G4bool>   activePIXEMedia;          186   std::vector<G4bool>   activePIXEMedia;
                                                   >> 187   std::vector<G4String> activeRegions;
185   std::vector<G4bool>   deRegions;                188   std::vector<G4bool>   deRegions;
186   std::vector<G4bool>   AugerRegions;             189   std::vector<G4bool>   AugerRegions;
187   std::vector<G4bool>   PIXERegions;              190   std::vector<G4bool>   PIXERegions;
188   std::vector<G4DynamicParticle*> vdyn;           191   std::vector<G4DynamicParticle*> vdyn;
189   std::vector<G4String> activeRegions;         << 
190                                                << 
191   G4String name;                               << 
192                                                << 
193 #ifdef G4MULTITHREADED                         << 
194   static G4Mutex atomDeexcitationMutex;        << 
195 #endif                                         << 
196 };                                                192 };
197                                                   193 
198 inline void G4VAtomDeexcitation::SetFluo(G4boo    194 inline void G4VAtomDeexcitation::SetFluo(G4bool val)
199 {                                                 195 {
200   if(!isActiveLocked) { isActive = val; isActi << 196   isActive = val;
201 }                                                 197 }
202                                                   198 
203 inline G4bool G4VAtomDeexcitation::IsFluoActiv    199 inline G4bool G4VAtomDeexcitation::IsFluoActive() const
204 {                                                 200 {
205   return isActive;                                201   return isActive;
206 }                                                 202 }
207                                                   203 
208 inline void G4VAtomDeexcitation::SetAuger(G4bo    204 inline void G4VAtomDeexcitation::SetAuger(G4bool val)
209 {                                                 205 {
210   if(!isAugerLocked) { flagAuger = val; isAuge << 206   flagAuger = val;
                                                   >> 207   if(val) { isActive = true; }
211 }                                                 208 }
212                                                   209 
213 inline G4bool G4VAtomDeexcitation::IsAugerActi    210 inline G4bool G4VAtomDeexcitation::IsAugerActive() const
214 {                                                 211 {
215   return flagAuger;                               212   return flagAuger;
216 }                                                 213 }
217                                                   214 
218 inline void G4VAtomDeexcitation::SetAugerCasca << 215 inline void G4VAtomDeexcitation::SetPIXE(G4bool val)
219 {                                                 216 {
220   SetAuger(val);                               << 217   flagPIXE = val;
                                                   >> 218   if(val) { isActive = true; }
221 }                                                 219 }
222                                                   220 
223 inline G4bool G4VAtomDeexcitation::IsAugerCasc << 221 inline G4bool G4VAtomDeexcitation::IsPIXEActive() const
224 {                                                 222 {
225   return flagAuger;                            << 223   return (flagPIXE && isActive);
226 }                                                 224 }
227                                                   225 
228 inline void G4VAtomDeexcitation::SetPIXE(G4boo << 226 inline const G4String& G4VAtomDeexcitation::GetName() const
229 {                                                 227 {
230   if(!isPIXELocked) { flagPIXE = val;  isPIXEL << 228   return name;
231 }                                                 229 }
232                                                   230 
233 inline G4bool G4VAtomDeexcitation::IsPIXEActiv << 231 inline 
                                                   >> 232 void G4VAtomDeexcitation::SetPIXECrossSectionModel(const G4String& n)
234 {                                                 233 {
235   return flagPIXE;                             << 234   namePIXE = n;
236 }                                                 235 }
237                                                   236 
238 inline const G4String& G4VAtomDeexcitation::Ge << 237 inline void 
                                                   >> 238 G4VAtomDeexcitation::SetPIXEElectronCrossSectionModel(const G4String& n)
239 {                                                 239 {
240   return name;                                 << 240   nameElectronPIXE = n;
                                                   >> 241 }
                                                   >> 242 
                                                   >> 243 inline 
                                                   >> 244 const G4String& G4VAtomDeexcitation::PIXECrossSectionModel() const
                                                   >> 245 {
                                                   >> 246   return namePIXE;
                                                   >> 247 }
                                                   >> 248 
                                                   >> 249 inline 
                                                   >> 250 const G4String& G4VAtomDeexcitation::PIXEElectronCrossSectionModel() const
                                                   >> 251 {
                                                   >> 252   return nameElectronPIXE;
241 }                                                 253 }
242                                                   254 
243 inline const std::vector<G4bool>&                 255 inline const std::vector<G4bool>& 
244 G4VAtomDeexcitation::GetListOfActiveAtoms() co    256 G4VAtomDeexcitation::GetListOfActiveAtoms() const
245 {                                                 257 {
246   return activeZ;                                 258   return activeZ;
247 }                                                 259 }
248                                                   260 
249 inline void G4VAtomDeexcitation::SetVerboseLev    261 inline void G4VAtomDeexcitation::SetVerboseLevel(G4int val)
250 {                                                 262 {
251   verbose = val;                                  263   verbose = val;
252 }                                                 264 }
253                                                   265 
254 inline G4int G4VAtomDeexcitation::GetVerboseLe    266 inline G4int G4VAtomDeexcitation::GetVerboseLevel() const
255 {                                                 267 {
256   return verbose;                                 268   return verbose;
257 }                                                 269 }
258                                                   270 
259 inline G4bool                                     271 inline G4bool 
260 G4VAtomDeexcitation::CheckDeexcitationActiveRe << 272 G4VAtomDeexcitation::CheckDeexcitationActiveRegion(G4int coupleIndex)
261 {                                                 273 {
262   return (idx < nCouples) ? activeDeexcitation << 274   return (isActive && activeDeexcitationMedia[coupleIndex]);
263 }                                                 275 }
264                                                   276 
265 inline G4bool                                     277 inline G4bool 
266 G4VAtomDeexcitation::CheckAugerActiveRegion(G4 << 278 G4VAtomDeexcitation::CheckAugerActiveRegion(G4int coupleIndex)
267 {                                                 279 {
268   return (idx < nCouples) ? activeAugerMedia[i << 280 
                                                   >> 281   return (flagAuger && activeAugerMedia[coupleIndex]);
                                                   >> 282 }
                                                   >> 283 
                                                   >> 284 inline void 
                                                   >> 285 G4VAtomDeexcitation::GenerateParticles(std::vector<G4DynamicParticle*>* v,  
                                                   >> 286                const G4AtomicShell* as, 
                                                   >> 287                G4int Z,
                                                   >> 288                G4int idx)
                                                   >> 289 {
                                                   >> 290   G4double gCut = DBL_MAX;
                                                   >> 291   if (theCoupleTable) {
                                                   >> 292     gCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[idx];
                                                   >> 293   }
                                                   >> 294   if(gCut < as->BindingEnergy()) {
                                                   >> 295     G4double eCut = DBL_MAX;
                                                   >> 296     if(CheckAugerActiveRegion(idx)) {
                                                   >> 297       if (theCoupleTable) {
                                                   >> 298   eCut = (*(theCoupleTable->GetEnergyCutsVector(1)))[idx];
                                                   >> 299       }
                                                   >> 300     }
                                                   >> 301     GenerateParticles(v, as, Z, gCut, eCut);
                                                   >> 302   }
269 }                                                 303 }
270                                                   304 
271 #endif                                            305 #endif
272                                                   306 
273                                                   307