Geant4 Cross Reference |
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.1 2009/07/09 11:42:52 vnivanch Exp $ >> 27 // GEANT4 tag $Name: geant4-09-03 $ 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 << 40 // 41 // 41 // Class Description: 42 // Class Description: 42 // 43 // 43 // Abstract interface to energy loss models 44 // Abstract interface to energy loss models 44 45 45 // ------------------------------------------- 46 // ------------------------------------------------------------------- 46 // 47 // 47 48 48 #ifndef G4VAtomDeexcitation_h 49 #ifndef G4VAtomDeexcitation_h 49 #define G4VAtomDeexcitation_h 1 50 #define G4VAtomDeexcitation_h 1 50 51 51 #include "globals.hh" 52 #include "globals.hh" 52 #include "G4EmParameters.hh" << 53 #include "G4AtomicShell.hh" << 54 #include "G4AtomicShellEnumerator.hh" << 55 #include "G4ProductionCutsTable.hh" << 56 #include "G4Track.hh" << 57 #include "G4Threading.hh" << 58 #include <vector> 53 #include <vector> 59 54 >> 55 class G4AtomicShell; 60 class G4ParticleDefinition; 56 class G4ParticleDefinition; 61 class G4DynamicParticle; 57 class G4DynamicParticle; 62 class G4MaterialCutsCouple; << 63 58 64 class G4VAtomDeexcitation { 59 class G4VAtomDeexcitation { 65 public: << 66 60 67 explicit G4VAtomDeexcitation(const G4String& << 61 G4VAtomDeexcitation(const G4String& pname = ""); 68 62 69 virtual ~G4VAtomDeexcitation(); 63 virtual ~G4VAtomDeexcitation(); 70 64 71 //========== initialization ========== << 65 //initialization 72 << 66 virtual void PreparePhysicsTable(const G4ParticleDefinition&); 73 // Overall initialisation before new run << 67 virtual void BuildPhysicsTable(const G4ParticleDefinition&); 74 void InitialiseAtomicDeexcitation(); << 75 << 76 // Initialisation of deexcitation at the beg << 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) << 82 << 83 void SetDeexcitationActiveRegion(const G4Str << 84 G4bool valD << 85 G4bool valA << 86 G4bool valP << 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 de << 108 inline const std::vector<G4bool>& GetListOfA << 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 giv << 117 inline G4bool CheckDeexcitationActiveRegion( << 118 inline G4bool CheckAugerActiveRegion(G4int c << 119 68 120 // Get atomic shell by shell index, used by 69 // Get atomic shell by shell index, used by discrete processes 121 // (for example, photoelectric), when shell 70 // (for example, photoelectric), when shell vacancy sampled by the model 122 virtual << 71 virtual const G4AtomicChell* GetAtomicShell(G4int Z, G4int ShellIndex); 123 const G4AtomicShell* GetAtomicShell(G4int Z, << 124 G4Atomic << 125 72 126 // generation of deexcitation for given atom << 73 // selection of random shell for ionisation process 127 // and material cut couple, which defines cu << 74 virtual const G4AtomicShell* SelectRandomShell(const G4DynamicParticle*, 128 void GenerateParticles(std::vector<G4Dynamic << 75 G4int Z); 129 const G4AtomicShell*, << 130 G4int Z, G4int couple << 131 76 132 // generation of deexcitation for given atom 77 // generation of deexcitation for given atom and shell vacancy 133 virtual void GenerateParticles(std::vector<G << 78 virtual void GenerateParticles(std::vector<G4DynamicParticle*>*, 134 const G4Atomi << 79 const G4AtomicChell*, G4int Z); 135 G4int Z, G4do << 136 80 137 // access or compute PIXE cross section 81 // access or compute PIXE cross section 138 virtual G4double << 82 virtual G4double GetPIXECrossSection (const G4ParticleDefinition*, 139 GetShellIonisationCrossSectionPerAtom(const << 83 G4int Z, G4double kinE); 140 G4int << 141 G4Atom << 142 G4doub << 143 const << 144 84 145 // access or compute PIXE cross section << 85 // calculate PIXE cross section from the models 146 virtual G4double << 86 virtual G4double CalculatePIXECrossSection(const G4ParticleDefinition*, 147 ComputeShellIonisationCrossSectionPerAtom( << 87 G4int Z, G4double kinE); 148 const << 149 G4int << 150 G4Atom << 151 G4doub << 152 const << 153 88 154 // Sampling of PIXE for ionisation processes 89 // Sampling of PIXE for ionisation processes 155 void AlongStepDeexcitation(std::vector<G4Tra << 90 virtual void 156 const G4Step& ste << 91 AlongStepDeexcitation(std::vector<G4DynamicParticle*>* secVect, 157 G4double& eLoss, << 92 const G4DynamicParticle* icidentParticle, 158 G4int coupleIndex << 93 const G4MaterialCutsCouple*, >> 94 G4double trueStepLenght, >> 95 G4double eLoss); 159 96 160 // copy constructor and hide assignment oper << 97 // Check if deexcitation is active for a given geometry volume 161 G4VAtomDeexcitation(G4VAtomDeexcitation &) = << 98 G4bool CheckActiveRegion(G4int coupleIndex); 162 G4VAtomDeexcitation & operator=(const G4VAto << 99 >> 100 // Access flags defined in the CheckActiveVolume method >> 101 inline G4bool IsFluorescenceActive() const; >> 102 inline G4bool IsPIXECrossSectionActive() const; >> 103 >> 104 // PIXE model name >> 105 inline void SetPIXECrossSectionModel(const G4String&); >> 106 inline const G4String& PIXECrossSectionModel() const; >> 107 >> 108 // Activation of deexcitation per detector region >> 109 void SetFluorescenceActiveRegion(const G4Region* region = 0); >> 110 void SetAugerActiveRegion(const G4Region* region = 0); >> 111 void SetPIXECrossSectionActiveRegion(const G4Region* region = 0); >> 112 >> 113 void SetFluorescenceActiveRegion(const G4String& rname = ""); >> 114 void SetAugerActiveRegion(const G4String& rname = ""); >> 115 void SetPIXECrossSectionActiveRegion(const G4String& rname = ""); 163 116 164 private: 117 private: 165 118 166 const G4ParticleDefinition* gamma; << 119 // copy constructor and hide assignment operator 167 const G4ProductionCutsTable* theCoupleTable << 120 G4VAtomDeexcitation(G4VAtomDeexcitation &); >> 121 G4VAtomDeexcitation & operator=(const G4VAtomDeexcitation &right); 168 122 169 G4int nCouples = 0; << 123 G4String namePIXE; 170 G4int verbose = 1; << 124 G4bool isFluoActive; >> 125 G4bool isPIXEActive; 171 126 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 << 181 std::vector<G4bool> activeZ; << 182 std::vector<G4bool> activeDeexcitationMedi << 183 std::vector<G4bool> activeAugerMedia; << 184 std::vector<G4bool> activePIXEMedia; << 185 std::vector<G4bool> deRegions; << 186 std::vector<G4bool> AugerRegions; << 187 std::vector<G4bool> PIXERegions; << 188 std::vector<G4DynamicParticle*> vdyn; << 189 std::vector<G4String> activeRegions; << 190 << 191 G4String name; << 192 << 193 #ifdef G4MULTITHREADED << 194 static G4Mutex atomDeexcitationMutex; << 195 #endif << 196 }; 127 }; 197 128 198 inline void G4VAtomDeexcitation::SetFluo(G4boo << 129 inline G4bool IsFluorescenceActive() const 199 { << 200 if(!isActiveLocked) { isActive = val; isActi << 201 } << 202 << 203 inline G4bool G4VAtomDeexcitation::IsFluoActiv << 204 { << 205 return isActive; << 206 } << 207 << 208 inline void G4VAtomDeexcitation::SetAuger(G4bo << 209 { << 210 if(!isAugerLocked) { flagAuger = val; isAuge << 211 } << 212 << 213 inline G4bool G4VAtomDeexcitation::IsAugerActi << 214 { << 215 return flagAuger; << 216 } << 217 << 218 inline void G4VAtomDeexcitation::SetAugerCasca << 219 { << 220 SetAuger(val); << 221 } << 222 << 223 inline G4bool G4VAtomDeexcitation::IsAugerCasc << 224 { << 225 return flagAuger; << 226 } << 227 << 228 inline void G4VAtomDeexcitation::SetPIXE(G4boo << 229 { << 230 if(!isPIXELocked) { flagPIXE = val; isPIXEL << 231 } << 232 << 233 inline G4bool G4VAtomDeexcitation::IsPIXEActiv << 234 { << 235 return flagPIXE; << 236 } << 237 << 238 inline const G4String& G4VAtomDeexcitation::Ge << 239 { << 240 return name; << 241 } << 242 << 243 inline const std::vector<G4bool>& << 244 G4VAtomDeexcitation::GetListOfActiveAtoms() co << 245 { << 246 return activeZ; << 247 } << 248 << 249 inline void G4VAtomDeexcitation::SetVerboseLev << 250 { 130 { 251 verbose = val; << 131 return isFluoActive; 252 } 132 } 253 133 254 inline G4int G4VAtomDeexcitation::GetVerboseLe << 134 inline G4bool IsPIXECrossSectionActive() const 255 { 135 { 256 return verbose; << 136 return isPIXEActive; 257 } 137 } 258 138 259 inline G4bool << 139 inline 260 G4VAtomDeexcitation::CheckDeexcitationActiveRe << 140 void G4VAtomDeexcitation::SetPIXECrossSectionModel(const G4String& n) 261 { 141 { 262 return (idx < nCouples) ? activeDeexcitation << 142 namePIXE = n; 263 } 143 } 264 144 265 inline G4bool << 145 inline 266 G4VAtomDeexcitation::CheckAugerActiveRegion(G4 << 146 const G4String& G4VAtomDeexcitation::PIXECrossSectionModel() const 267 { 147 { 268 return (idx < nCouples) ? activeAugerMedia[i << 148 return namePIXE; 269 } 149 } 270 150 271 #endif 151 #endif 272 152 273 153