76 theCoupleTable =
nullptr;
96 std::size_t nn = std::max(nCouples, 1);
97 if(activeDeexcitationMedia.size() != nn) {
98 activeDeexcitationMedia.resize(nn,
false);
99 activeAugerMedia.resize(nn,
false);
100 activePIXEMedia.resize(nn,
false);
102 if(activeZ.size() != 93) { activeZ.resize(93,
false); }
106 if(!isActiveLocked) { isActive = theParameters->
Fluo(); }
107 if(!isAugerLocked) { flagAuger = theParameters->
Auger(); }
108 if(!isPIXELocked) { flagPIXE = theParameters->
Pixe(); }
112 std::size_t nRegions = deRegions.size();
114 if(!isActive && 0 == nRegions) {
return; }
119 nRegions = deRegions.size();
124 G4cout <<
"### === Deexcitation model " << name
125 <<
" is activated for " << nRegions;
132 for(std::size_t j=0; j<nRegions; ++j) {
134 if(
nullptr != reg && 0 < nCouples) {
137 G4cout <<
" " << activeRegions[j]
138 <<
" " << deRegions[j] <<
" " << AugerRegions[j]
139 <<
" " << PIXERegions[j] <<
G4endl;
141 for(
G4int i=0; i<nCouples; ++i) {
145 activeDeexcitationMedia[i] = deRegions[j];
146 activeAugerMedia[i] = AugerRegions[j];
147 activePIXEMedia[i] = PIXERegions[j];
154 for(std::size_t k=0; k<nelm; ++k) {
156 if(
Z > 5 &&
Z < 93) {
165 if(0 < verbose && flagAuger) {
166 G4cout <<
"### === Auger flag: " << flagAuger
170 G4cout <<
"### === Ignore cuts flag: " << ignoreCuts
173 if(0 < verbose && flagPIXE) {
174 G4cout <<
"### === PIXE model for hadrons: "
177 G4cout <<
"### === PIXE model for e+-: "
192 if(rname ==
"DefaultRegionForParallelWorld") {
return; }
200 if(ss ==
"world" || ss ==
"World" || ss ==
"WORLD") {
201 ss =
"DefaultRegionForTheWorld";
203 std::size_t n = deRegions.size();
204 for(std::size_t i=0; i<n; ++i) {
207 if(ss == activeRegions[i]) {
208 deRegions[i] = valDeexcitation;
209 AugerRegions[i] = valAuger;
210 PIXERegions[i] = valPIXE;
215 activeRegions.push_back(ss);
216 deRegions.push_back(valDeexcitation);
217 AugerRegions.push_back(valAuger);
218 PIXERegions.push_back(valPIXE);
222 if(ss ==
"DefaultRegionForTheWorld") {
224 std::size_t nn = regions->size();
225 for(std::size_t i=0; i<nn; ++i) {
226 if(ss == (*regions)[i]->
GetName()) {
continue; }
241 }
else if (
nullptr != theCoupleTable) {
244 if(gCut < as->BindingEnergy()) {
249 }
else if (
nullptr != theCoupleTable) {
266 if(!flagPIXE && !activePIXEMedia[coupleIndex]) {
return; }
267 if(eLossMax <= 0.0 || truelength <= 0.0) {
return; }
283 if(ignoreCuts) { gCut = 0.0; }
287 if(ignoreCuts) { eCut = 0.0; }
295 const G4double* theAtomNumDensityVector =
300 for(std::size_t i=0; i<nelm; ++i) {
301 G4int Z = (*theElementVector)[i]->GetZasInt();
302 if(activeZ[
Z] &&
Z < 93) {
304 std::min(9,(*theElementVector)[i]->GetNbOfAtomicShells());
305 G4double rho = truelength*theAtomNumDensityVector[i];
307 for(
G4int ii=0; ii<nshells; ++ii) {
312 if(gCut > bindingEnergy) {
break; }
314 if(eLossMax > bindingEnergy) {
326 if( stot > 1.0 || eLossMax < bindingEnergy) {
break; }
330 std::size_t nsec = vdyn.size();
334 for(std::size_t j=0; j<nsec; ++j) {
356 }
while (stot < 1.0);
std::vector< const G4Element * > G4ElementVector
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
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 DeexcitationIgnoreCut() const
G4ProductionCuts * GetProductionCuts() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
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 SetCreatorModelID(const G4int id)
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