File indexing completed on 2025-01-18 09:59:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef G4VAtomDeexcitation_h
0049 #define G4VAtomDeexcitation_h 1
0050
0051 #include "globals.hh"
0052 #include "G4EmParameters.hh"
0053 #include "G4AtomicShell.hh"
0054 #include "G4AtomicShellEnumerator.hh"
0055 #include "G4ProductionCutsTable.hh"
0056 #include "G4Track.hh"
0057 #include "G4Threading.hh"
0058 #include <vector>
0059
0060 class G4ParticleDefinition;
0061 class G4DynamicParticle;
0062 class G4MaterialCutsCouple;
0063
0064 class G4VAtomDeexcitation {
0065 public:
0066
0067 explicit G4VAtomDeexcitation(const G4String& modname = "Deexcitation");
0068
0069 virtual ~G4VAtomDeexcitation();
0070
0071
0072
0073
0074 void InitialiseAtomicDeexcitation();
0075
0076
0077 virtual void InitialiseForNewRun() = 0;
0078
0079
0080
0081 virtual void InitialiseForExtraAtom(G4int Z) = 0;
0082
0083 void SetDeexcitationActiveRegion(const G4String& rname,
0084 G4bool valDeexcitation,
0085 G4bool valAuger,
0086 G4bool valPIXE);
0087
0088
0089 inline void SetFluo(G4bool);
0090 inline G4bool IsFluoActive() const;
0091
0092
0093 inline void SetAuger(G4bool);
0094 inline G4bool IsAugerActive() const;
0095
0096
0097 inline void SetAugerCascade(G4bool);
0098 inline G4bool IsAugerCascadeActive() const;
0099
0100
0101 inline void SetPIXE(G4bool);
0102 inline G4bool IsPIXEActive() const;
0103
0104
0105 inline const G4String& GetName() const;
0106
0107
0108 inline const std::vector<G4bool>& GetListOfActiveAtoms() const;
0109
0110
0111 inline void SetVerboseLevel(G4int);
0112 inline G4int GetVerboseLevel() const;
0113
0114
0115
0116
0117 inline G4bool CheckDeexcitationActiveRegion(G4int coupleIndex);
0118 inline G4bool CheckAugerActiveRegion(G4int coupleIndex);
0119
0120
0121
0122 virtual
0123 const G4AtomicShell* GetAtomicShell(G4int Z,
0124 G4AtomicShellEnumerator shell) = 0;
0125
0126
0127
0128 void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,
0129 const G4AtomicShell*,
0130 G4int Z, G4int coupleIndex);
0131
0132
0133 virtual void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,
0134 const G4AtomicShell*,
0135 G4int Z, G4double gammaCut, G4double eCut) = 0;
0136
0137
0138 virtual G4double
0139 GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition*,
0140 G4int Z,
0141 G4AtomicShellEnumerator shell,
0142 G4double kinE,
0143 const G4Material* mat = nullptr) = 0;
0144
0145
0146 virtual G4double
0147 ComputeShellIonisationCrossSectionPerAtom(
0148 const G4ParticleDefinition*,
0149 G4int Z,
0150 G4AtomicShellEnumerator shell,
0151 G4double kinE,
0152 const G4Material* mat = nullptr) = 0;
0153
0154
0155 void AlongStepDeexcitation(std::vector<G4Track*>& tracks,
0156 const G4Step& step,
0157 G4double& eLoss,
0158 G4int coupleIndex);
0159
0160
0161 G4VAtomDeexcitation(G4VAtomDeexcitation &) = delete;
0162 G4VAtomDeexcitation & operator=(const G4VAtomDeexcitation &right) = delete;
0163
0164 private:
0165
0166 const G4ParticleDefinition* gamma;
0167 const G4ProductionCutsTable* theCoupleTable = nullptr;
0168
0169 G4int nCouples = 0;
0170 G4int verbose = 1;
0171
0172 G4bool isActive = false;
0173 G4bool flagAuger = false;
0174 G4bool flagPIXE = false;
0175 G4bool ignoreCuts = false;
0176
0177 G4bool isActiveLocked = false;
0178 G4bool isAugerLocked = false;
0179 G4bool isPIXELocked = false;
0180
0181 std::vector<G4bool> activeZ;
0182 std::vector<G4bool> activeDeexcitationMedia;
0183 std::vector<G4bool> activeAugerMedia;
0184 std::vector<G4bool> activePIXEMedia;
0185 std::vector<G4bool> deRegions;
0186 std::vector<G4bool> AugerRegions;
0187 std::vector<G4bool> PIXERegions;
0188 std::vector<G4DynamicParticle*> vdyn;
0189 std::vector<G4String> activeRegions;
0190
0191 G4String name;
0192
0193 #ifdef G4MULTITHREADED
0194 static G4Mutex atomDeexcitationMutex;
0195 #endif
0196 };
0197
0198 inline void G4VAtomDeexcitation::SetFluo(G4bool val)
0199 {
0200 if(!isActiveLocked) { isActive = val; isActiveLocked = true; }
0201 }
0202
0203 inline G4bool G4VAtomDeexcitation::IsFluoActive() const
0204 {
0205 return isActive;
0206 }
0207
0208 inline void G4VAtomDeexcitation::SetAuger(G4bool val)
0209 {
0210 if(!isAugerLocked) { flagAuger = val; isAugerLocked = true; }
0211 }
0212
0213 inline G4bool G4VAtomDeexcitation::IsAugerActive() const
0214 {
0215 return flagAuger;
0216 }
0217
0218 inline void G4VAtomDeexcitation::SetAugerCascade(G4bool val)
0219 {
0220 SetAuger(val);
0221 }
0222
0223 inline G4bool G4VAtomDeexcitation::IsAugerCascadeActive() const
0224 {
0225 return flagAuger;
0226 }
0227
0228 inline void G4VAtomDeexcitation::SetPIXE(G4bool val)
0229 {
0230 if(!isPIXELocked) { flagPIXE = val; isPIXELocked = true; }
0231 }
0232
0233 inline G4bool G4VAtomDeexcitation::IsPIXEActive() const
0234 {
0235 return flagPIXE;
0236 }
0237
0238 inline const G4String& G4VAtomDeexcitation::GetName() const
0239 {
0240 return name;
0241 }
0242
0243 inline const std::vector<G4bool>&
0244 G4VAtomDeexcitation::GetListOfActiveAtoms() const
0245 {
0246 return activeZ;
0247 }
0248
0249 inline void G4VAtomDeexcitation::SetVerboseLevel(G4int val)
0250 {
0251 verbose = val;
0252 }
0253
0254 inline G4int G4VAtomDeexcitation::GetVerboseLevel() const
0255 {
0256 return verbose;
0257 }
0258
0259 inline G4bool
0260 G4VAtomDeexcitation::CheckDeexcitationActiveRegion(G4int idx)
0261 {
0262 return (idx < nCouples) ? activeDeexcitationMedia[idx] : false;
0263 }
0264
0265 inline G4bool
0266 G4VAtomDeexcitation::CheckAugerActiveRegion(G4int idx)
0267 {
0268 return (idx < nCouples) ? activeAugerMedia[idx] : false;
0269 }
0270
0271 #endif
0272