70G4int G4VAtomDeexcitation::pixeIDg = -1;
71G4int G4VAtomDeexcitation::pixeIDe = -1;
74 : verbose(1), name(modname), isActive(false), flagAuger(false),
75 flagAugerCascade(false), flagPIXE(false), ignoreCuts(false),
76 isActiveLocked(false), isAugerLocked(false),
77 isAugerCascadeLocked(false), isPIXELocked(false)
81 theCoupleTable =
nullptr;
115 size_t nn = std::max(numOfCouples, 1);
116 if(activeDeexcitationMedia.size() != nn) {
117 activeDeexcitationMedia.resize(nn,
false);
118 activeAugerMedia.resize(nn,
false);
119 activePIXEMedia.resize(nn,
false);
121 if(activeZ.size() != 93) { activeZ.resize(93,
false); }
125 if(!isActiveLocked) { isActive = theParameters->
Fluo(); }
126 if(!isAugerLocked) { flagAuger = theParameters->
Auger(); }
127 if(!isAugerCascadeLocked) { flagAugerCascade = theParameters->
AugerCascade(); }
128 if(!isPIXELocked) { flagPIXE = theParameters->
Pixe(); }
132 size_t nRegions = deRegions.size();
134 if(!isActive && 0 == nRegions) {
return; }
139 nRegions = deRegions.size();
144 G4cout <<
"### === Deexcitation model " << name
145 <<
" is activated for " << nRegions;
152 for(
size_t j=0; j<nRegions; ++j) {
154 if(reg && 0 < numOfCouples) {
157 G4cout <<
" " << activeRegions[j]
158 <<
" " << deRegions[j] <<
" " << AugerRegions[j]
159 <<
" " << PIXERegions[j] <<
G4endl;
161 for(
G4int i=0; i<numOfCouples; ++i) {
165 activeDeexcitationMedia[i] = deRegions[j];
166 activeAugerMedia[i] = AugerRegions[j];
167 activePIXEMedia[i] = PIXERegions[j];
174 for(
G4int k=0; k<nelm; ++k) {
176 if(Z > 5 && Z < 93) {
185 if(0 < verbose && flagAuger) {
186 G4cout <<
"### === Auger cascade flag: " << flagAugerCascade
190 G4cout <<
"### === Ignore cuts flag: " << ignoreCuts
193 if(0 < verbose && flagPIXE) {
194 G4cout <<
"### === PIXE model for hadrons: "
197 G4cout <<
"### === PIXE model for e+-: "
212 if(rname ==
"DefaultRegionForParallelWorld") {
return; }
220 if(ss ==
"world" || ss ==
"World" || ss ==
"WORLD") {
221 ss =
"DefaultRegionForTheWorld";
223 size_t n = deRegions.size();
224 for(
size_t i=0; i<n; ++i) {
227 if(ss == activeRegions[i]) {
228 deRegions[i] = valDeexcitation;
229 AugerRegions[i] = valAuger;
230 PIXERegions[i] = valPIXE;
235 activeRegions.push_back(ss);
236 deRegions.push_back(valDeexcitation);
237 AugerRegions.push_back(valAuger);
238 PIXERegions.push_back(valPIXE);
242 if(ss ==
"DefaultRegionForTheWorld") {
244 G4int nn = regions->size();
245 for(
G4int i=0; i<nn; ++i) {
246 if(ss == (*regions)[i]->
GetName()) {
continue; }
261 }
else if (theCoupleTable) {
264 if(gCut < as->BindingEnergy()) {
269 }
else if (theCoupleTable) {
286 if(!flagPIXE && !activePIXEMedia[coupleIndex]) {
return; }
287 if(eLossMax <= 0.0 || truelength <= 0.0) {
return; }
303 if(ignoreCuts) { gCut = 0.0; }
307 if(ignoreCuts) { eCut = 0.0; }
315 const G4double* theAtomNumDensityVector =
320 for(
G4int i=0; i<nelm; ++i) {
321 G4int Z = (*theElementVector)[i]->GetZasInt();
322 if(activeZ[Z] && Z < 93) {
324 std::min(9,(*theElementVector)[i]->GetNbOfAtomicShells());
325 G4double rho = truelength*theAtomNumDensityVector[i];
327 for(
G4int ii=0; ii<nshells; ++ii) {
332 if(gCut > bindingEnergy) {
break; }
334 if(eLossMax > bindingEnergy) {
346 if( stot > 1.0 || eLossMax < bindingEnergy) {
break; }
350 G4int nsec = vdyn.size();
354 for(
G4int j=0; j<nsec; ++j) {
377 }
while (stot < 1.0);
std::vector< G4Element * > G4ElementVector
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
G4double BindingEnergy() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4ElementTable * GetElementTable()
static size_t GetNumberOfElements()
static G4EmParameters * Instance()
const G4String & PIXECrossSectionModel()
const G4String & PIXEElectronCrossSectionModel()
void DefineRegParamForDeex(G4VAtomDeexcitation *) const
G4bool AugerCascade() const
G4bool DeexcitationIgnoreCut() const
G4ProductionCuts * GetProductionCuts() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
static G4int Register(const G4String &)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
const std::vector< G4double > * GetEnergyCutsVector(std::size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4ProductionCuts * GetProductionCuts() const
G4double GetGlobalTime() const
G4Material * GetMaterial() const
const G4ThreeVector & GetPosition() const
G4double GetKineticEnergy() const
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
G4ParticleDefinition * GetDefinition() const
void SetCreatorModelIndex(G4int idx)
G4VAtomDeexcitation(const G4String &modname="Deexcitation")
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
const G4String & GetName() const
G4bool CheckAugerActiveRegion(G4int coupleIndex)
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
void InitialiseAtomicDeexcitation()
virtual ~G4VAtomDeexcitation()
void AlongStepDeexcitation(std::vector< G4Track * > &tracks, const G4Step &step, G4double &eLoss, G4int coupleIndex)
virtual G4double GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=nullptr)=0
void SetDeexcitationActiveRegion(const G4String &rname, G4bool valDeexcitation, G4bool valAuger, G4bool valPIXE)
virtual void InitialiseForNewRun()=0