G4VAtomDeexcitation Class Reference

#include <G4VAtomDeexcitation.hh>

Inheritance diagram for G4VAtomDeexcitation:

G4UAtomicDeexcitation

Public Member Functions

 G4VAtomDeexcitation (const G4String &modname="Deexcitation", const G4String &pixename="")
virtual ~G4VAtomDeexcitation ()
void InitialiseAtomicDeexcitation ()
virtual void InitialiseForNewRun ()=0
virtual void InitialiseForExtraAtom (G4int Z)=0
void SetDeexcitationActiveRegion (const G4String &rname, G4bool valDeexcitation, G4bool valAuger, G4bool valPIXE)
void SetFluo (G4bool)
G4bool IsFluoActive () const
void SetAuger (G4bool)
G4bool IsAugerActive () const
void SetPIXE (G4bool)
G4bool IsPIXEActive () const
const G4StringGetName () const
void SetPIXECrossSectionModel (const G4String &)
const G4StringPIXECrossSectionModel () const
void SetPIXEElectronCrossSectionModel (const G4String &)
const G4StringPIXEElectronCrossSectionModel () const
const std::vector< G4bool > & GetListOfActiveAtoms () const
void SetVerboseLevel (G4int)
G4int GetVerboseLevel () const
G4bool CheckDeexcitationActiveRegion (G4int coupleIndex)
G4bool CheckAugerActiveRegion (G4int coupleIndex)
virtual const G4AtomicShellGetAtomicShell (G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles (std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
virtual void GenerateParticles (std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4double gammaCut, G4double eCut)=0
virtual G4double GetShellIonisationCrossSectionPerAtom (const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=0)=0
virtual G4double ComputeShellIonisationCrossSectionPerAtom (const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=0)=0
void AlongStepDeexcitation (std::vector< G4Track * > &tracks, const G4Step &step, G4double &eLoss, G4int coupleIndex)

Detailed Description

Definition at line 63 of file G4VAtomDeexcitation.hh.


Constructor & Destructor Documentation

G4VAtomDeexcitation::G4VAtomDeexcitation ( const G4String modname = "Deexcitation",
const G4String pixename = "" 
)

Definition at line 65 of file G4VAtomDeexcitation.cc.

00067   : lowestKinEnergy(keV), verbose(1), name(modname), namePIXE(pname), 
00068     nameElectronPIXE(""), isActive(false), flagAuger(false), flagPIXE(false)
00069 {
00070   vdyn.reserve(5);
00071   theCoupleTable = 0;
00072 }

G4VAtomDeexcitation::~G4VAtomDeexcitation (  )  [virtual]

Definition at line 76 of file G4VAtomDeexcitation.cc.

00077 {}


Member Function Documentation

void G4VAtomDeexcitation::AlongStepDeexcitation ( std::vector< G4Track * > &  tracks,
const G4Step step,
G4double eLoss,
G4int  coupleIndex 
)

Definition at line 198 of file G4VAtomDeexcitation.cc.

References G4AtomicShell::BindingEnergy(), G4InuclSpecialFunctions::bindingEnergy(), CheckAugerActiveRegion(), DBL_MAX, G4lrint(), G4UniformRand, GenerateParticles(), GetAtomicShell(), G4Track::GetDefinition(), G4Material::GetElementVector(), G4ProductionCutsTable::GetEnergyCutsVector(), G4StepPoint::GetGlobalTime(), G4StepPoint::GetKineticEnergy(), G4StepPoint::GetMaterial(), G4Material::GetNumberOfElements(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), GetShellIonisationCrossSectionPerAtom(), G4Step::GetStepLength(), G4Step::GetTrack(), and G4Material::GetVecNbOfAtomsPerVolume().

Referenced by G4VEnergyLossProcess::AlongStepDoIt().

00202 {
00203   G4double truelength = step.GetStepLength();
00204   if(!flagPIXE && !activePIXEMedia[coupleIndex]) { return; }
00205   if(eLossMax <= 0.0 || truelength <= 0.0)       { return; }
00206 
00207   // step parameters
00208   const G4StepPoint* preStep = step.GetPreStepPoint();
00209   G4ThreeVector prePos = preStep->GetPosition();
00210   G4ThreeVector delta = step.GetPostStepPoint()->GetPosition() - prePos;
00211   G4double preTime = preStep->GetGlobalTime();
00212   G4double dt = step.GetPostStepPoint()->GetGlobalTime() - preTime;
00213 
00214   // particle parameters
00215   const G4Track* track = step.GetTrack();
00216   const G4ParticleDefinition* part = track->GetDefinition();
00217   G4double ekin = preStep->GetKineticEnergy(); 
00218 
00219   // media parameters
00220   G4double gCut = (*theCoupleTable->GetEnergyCutsVector(0))[coupleIndex];
00221   G4double eCut = DBL_MAX;
00222   if(CheckAugerActiveRegion(coupleIndex)) { 
00223     eCut = (*theCoupleTable->GetEnergyCutsVector(1))[coupleIndex];
00224   }
00225 
00226   //G4cout<<"!Sample PIXE gCut(MeV)= "<<gCut<<"  eCut(MeV)= "<<eCut
00227   //    <<" Ekin(MeV)= " << ekin/MeV << G4endl;
00228 
00229   const G4Material* material = preStep->GetMaterial();
00230   const G4ElementVector* theElementVector = material->GetElementVector();
00231   const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume();
00232   G4int nelm = material->GetNumberOfElements();
00233 
00234   // loop over deexcitations
00235   for(G4int i=0; i<nelm; ++i) {
00236     G4int Z = G4lrint((*theElementVector)[i]->GetZ());
00237     if(activeZ[Z] && Z < 93) {  
00238       G4int nshells = std::min(9,(*theElementVector)[i]->GetNbOfAtomicShells());
00239       G4double rho = truelength*theAtomNumDensityVector[i];
00240       //G4cout << "   Z " << Z <<" is active  x(mm)= " << truelength/mm << G4endl;
00241       for(G4int ii=0; ii<nshells; ++ii) {
00242         G4AtomicShellEnumerator as = G4AtomicShellEnumerator(ii);
00243         const G4AtomicShell* shell = GetAtomicShell(Z, as);
00244         G4double bindingEnergy = shell->BindingEnergy();
00245 
00246         if(gCut > bindingEnergy) { break; }
00247 
00248         if(eLossMax > bindingEnergy) { 
00249           G4double sig = rho*
00250             GetShellIonisationCrossSectionPerAtom(part, Z, as, ekin, material); 
00251 
00252           // mfp is mean free path in units of step size
00253           if(sig > 0.0) {
00254             G4double mfp = 1.0/sig;
00255             G4double stot = 0.0;
00256             //G4cout << " Shell " << ii << " mfp(mm)= " << mfp/mm << G4endl;
00257             // sample ionisation points
00258             do {
00259               stot -= mfp*std::log(G4UniformRand());
00260               if( stot > 1.0 || eLossMax < bindingEnergy) { break; }
00261               // sample deexcitation
00262               vdyn.clear();
00263               GenerateParticles(&vdyn, shell, Z, gCut, eCut); 
00264               G4int nsec = vdyn.size();
00265               if(nsec > 0) {
00266                 G4ThreeVector r = prePos  + stot*delta;
00267                 G4double time   = preTime + stot*dt;
00268                 for(G4int j=0; j<nsec; ++j) {
00269                   G4DynamicParticle* dp = vdyn[j];
00270                   G4double e = dp->GetKineticEnergy();
00271 
00272                   // save new secondary if there is enough energy
00273                   if(eLossMax >= e) {
00274                     eLossMax -= e;                  
00275                     G4Track* t = new G4Track(dp, time, r);
00276                     tracks.push_back(t);
00277                   } else {
00278                     delete dp;
00279                   }
00280                 }
00281               }
00282             } while (stot < 1.0);
00283           }
00284         }
00285       }
00286     } 
00287   }
00288   return;
00289 }

G4bool G4VAtomDeexcitation::CheckAugerActiveRegion ( G4int  coupleIndex  )  [inline]

Definition at line 277 of file G4VAtomDeexcitation.hh.

Referenced by AlongStepDeexcitation(), and GenerateParticles().

00278 {
00279 
00280   return (flagAuger || activeAugerMedia[coupleIndex]);
00281 }

G4bool G4VAtomDeexcitation::CheckDeexcitationActiveRegion ( G4int  coupleIndex  )  [inline]

Definition at line 271 of file G4VAtomDeexcitation.hh.

Referenced by G4PenelopePhotoElectricModel::SampleSecondaries(), G4PenelopeIonisationModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), and G4KleinNishinaModel::SampleSecondaries().

00272 {
00273   return (isActive || activeDeexcitationMedia[coupleIndex]);
00274 }

virtual G4double G4VAtomDeexcitation::ComputeShellIonisationCrossSectionPerAtom ( const G4ParticleDefinition ,
G4int  Z,
G4AtomicShellEnumerator  shell,
G4double  kinE,
const G4Material mat = 0 
) [pure virtual]

Implemented in G4UAtomicDeexcitation.

Referenced by G4EmCalculator::ComputeShellIonisationCrossSectionPerAtom().

virtual void G4VAtomDeexcitation::GenerateParticles ( std::vector< G4DynamicParticle * > *  secVect,
const G4AtomicShell ,
G4int  Z,
G4double  gammaCut,
G4double  eCut 
) [pure virtual]

Implemented in G4UAtomicDeexcitation.

void G4VAtomDeexcitation::GenerateParticles ( std::vector< G4DynamicParticle * > *  secVect,
const G4AtomicShell ,
G4int  Z,
G4int  coupleIndex 
) [inline]

Definition at line 284 of file G4VAtomDeexcitation.hh.

References CheckAugerActiveRegion(), DBL_MAX, and G4ProductionCutsTable::GetEnergyCutsVector().

Referenced by AlongStepDeexcitation(), G4NuclearDecayChannel::DecayIt(), G4PenelopePhotoElectricModel::SampleSecondaries(), G4PenelopeIonisationModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), and G4DNABornIonisationModel::SampleSecondaries().

00288 {
00289   G4double gCut = DBL_MAX;
00290   if (theCoupleTable) {
00291     gCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[idx];
00292   }
00293   if(gCut < as->BindingEnergy()) {
00294     G4double eCut = DBL_MAX;
00295     if(CheckAugerActiveRegion(idx)) {
00296       if (theCoupleTable) {
00297         eCut = (*(theCoupleTable->GetEnergyCutsVector(1)))[idx];
00298       }
00299     }
00300     GenerateParticles(v, as, Z, gCut, eCut);
00301   }
00302 }

virtual const G4AtomicShell* G4VAtomDeexcitation::GetAtomicShell ( G4int  Z,
G4AtomicShellEnumerator  shell 
) [pure virtual]

Implemented in G4UAtomicDeexcitation.

Referenced by AlongStepDeexcitation(), G4NuclearDecayChannel::DecayIt(), G4PEEffectFluoModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), and G4DNABornIonisationModel::SampleSecondaries().

const std::vector< G4bool > & G4VAtomDeexcitation::GetListOfActiveAtoms (  )  const [inline]

Definition at line 255 of file G4VAtomDeexcitation.hh.

00256 {
00257   return activeZ;
00258 }

const G4String & G4VAtomDeexcitation::GetName (  )  const [inline]

Definition at line 225 of file G4VAtomDeexcitation.hh.

00226 {
00227   return name;
00228 }

virtual G4double G4VAtomDeexcitation::GetShellIonisationCrossSectionPerAtom ( const G4ParticleDefinition ,
G4int  Z,
G4AtomicShellEnumerator  shell,
G4double  kinE,
const G4Material mat = 0 
) [pure virtual]

Implemented in G4UAtomicDeexcitation.

Referenced by AlongStepDeexcitation(), and G4EmCalculator::GetShellIonisationCrossSectionPerAtom().

G4int G4VAtomDeexcitation::GetVerboseLevel (  )  const [inline]

Definition at line 265 of file G4VAtomDeexcitation.hh.

00266 {
00267   return verbose;
00268 }

void G4VAtomDeexcitation::InitialiseAtomicDeexcitation (  ) 

Definition at line 81 of file G4VAtomDeexcitation.cc.

References G4cout, G4endl, G4lrint(), G4Material::GetElementVector(), G4RegionStore::GetInstance(), G4ProductionCutsTable::GetMaterialCutsCouple(), G4Material::GetNumberOfElements(), G4Region::GetProductionCuts(), G4ProductionCutsTable::GetProductionCutsTable(), G4RegionStore::GetRegion(), G4ProductionCutsTable::GetTableSize(), InitialiseForNewRun(), IsPIXEActive(), and SetDeexcitationActiveRegion().

Referenced by G4RadioactiveDecay::BuildPhysicsTable(), and G4LossTableManager::BuildPhysicsTable().

00082 {
00083   // Define list of couples
00084   theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();
00085   size_t numOfCouples = theCoupleTable->GetTableSize();
00086 
00087   // needed for unit tests
00088   if(0 == numOfCouples) { numOfCouples = 1; }
00089 
00090   activeDeexcitationMedia.resize(numOfCouples, false);
00091   activeAugerMedia.resize(numOfCouples, false);
00092   activePIXEMedia.resize(numOfCouples, false);
00093   activeZ.resize(93, false);
00094 
00095   // check if deexcitation is active for the given run
00096   if( !isActive ) { return; }
00097 
00098   // Define list of regions
00099   size_t nRegions = deRegions.size();
00100 
00101   if(0 == nRegions) {
00102     SetDeexcitationActiveRegion("World",isActive,flagAuger,flagPIXE);
00103     nRegions = 1;
00104   }
00105 
00106   if(0 < verbose) {
00107     G4cout << G4endl;
00108     G4cout << "### ===  Deexcitation model " << name 
00109            << " is activated for " << nRegions;
00110     if(1 == nRegions) { G4cout << " region:" << G4endl; }
00111     else              { G4cout << " regions:" << G4endl;}
00112   }
00113 
00114   // Identify active media
00115   G4RegionStore* regionStore = G4RegionStore::GetInstance();
00116   for(size_t j=0; j<nRegions; ++j) {
00117     const G4Region* reg = regionStore->GetRegion(activeRegions[j], false);
00118     const G4ProductionCuts* rpcuts = reg->GetProductionCuts();
00119     if(0 < verbose) {
00120       G4cout << "          " << activeRegions[j] << G4endl;  
00121     }
00122   
00123     for(size_t i=0; i<numOfCouples; ++i) {
00124       const G4MaterialCutsCouple* couple =
00125         theCoupleTable->GetMaterialCutsCouple(i);
00126       if (couple->GetProductionCuts() == rpcuts) {
00127         activeDeexcitationMedia[i] = deRegions[j];
00128         activeAugerMedia[i] = AugerRegions[j];
00129         activePIXEMedia[i] = PIXERegions[j];
00130         const G4Material* mat = couple->GetMaterial();
00131         const G4ElementVector* theElementVector = 
00132           mat->GetElementVector();
00133         G4int nelm = mat->GetNumberOfElements();
00134         if(deRegions[j]) {
00135           for(G4int k=0; k<nelm; ++k) {
00136             G4int Z = G4lrint(((*theElementVector)[k])->GetZ());
00137             if(Z > 5 && Z < 93) { 
00138               activeZ[Z] = true;
00139               //G4cout << "!!! Active de-excitation Z= " << Z << G4endl;  
00140             }
00141           }
00142         }
00143       }
00144     }
00145   }
00146 
00147   // Initialise derived class
00148   InitialiseForNewRun();
00149 
00150   if(0 < verbose && flagPIXE) {
00151     G4cout << "### ===  PIXE model for hadrons: " << namePIXE
00152            << "  " <<  IsPIXEActive()
00153            << G4endl;  
00154     G4cout << "### ===  PIXE model for e+-:     " << nameElectronPIXE
00155            << "  " <<  IsPIXEActive()
00156            << G4endl;  
00157   }
00158 }

virtual void G4VAtomDeexcitation::InitialiseForExtraAtom ( G4int  Z  )  [pure virtual]

Implemented in G4UAtomicDeexcitation.

virtual void G4VAtomDeexcitation::InitialiseForNewRun (  )  [pure virtual]

Implemented in G4UAtomicDeexcitation.

Referenced by InitialiseAtomicDeexcitation().

G4bool G4VAtomDeexcitation::IsAugerActive (  )  const [inline]

Definition at line 209 of file G4VAtomDeexcitation.hh.

00210 {
00211   return flagAuger;
00212 }

G4bool G4VAtomDeexcitation::IsFluoActive (  )  const [inline]

Definition at line 198 of file G4VAtomDeexcitation.hh.

Referenced by G4NuclearDecayChannel::DecayIt(), G4LivermorePolarizedPhotoElectricModel::Initialise(), G4LivermorePhotoElectricModel::Initialise(), and G4UAtomicDeexcitation::InitialiseForNewRun().

00199 {
00200   return isActive;
00201 }

G4bool G4VAtomDeexcitation::IsPIXEActive (  )  const [inline]

Definition at line 220 of file G4VAtomDeexcitation.hh.

Referenced by G4VEnergyLossProcess::BuildPhysicsTable(), InitialiseAtomicDeexcitation(), and G4UAtomicDeexcitation::InitialiseForNewRun().

00221 {
00222   return flagPIXE;
00223 }

const G4String & G4VAtomDeexcitation::PIXECrossSectionModel (  )  const [inline]

Definition at line 243 of file G4VAtomDeexcitation.hh.

Referenced by G4UAtomicDeexcitation::InitialiseForNewRun().

00244 {
00245   return namePIXE;
00246 }

const G4String & G4VAtomDeexcitation::PIXEElectronCrossSectionModel (  )  const [inline]

Definition at line 249 of file G4VAtomDeexcitation.hh.

Referenced by G4UAtomicDeexcitation::InitialiseForNewRun().

00250 {
00251   return nameElectronPIXE;
00252 }

void G4VAtomDeexcitation::SetAuger ( G4bool   )  [inline]

Definition at line 203 of file G4VAtomDeexcitation.hh.

Referenced by G4EmProcessOptions::SetAuger().

00204 {
00205   flagAuger = val;
00206   if(val) { isActive = true; }
00207 }

void G4VAtomDeexcitation::SetDeexcitationActiveRegion ( const G4String rname,
G4bool  valDeexcitation,
G4bool  valAuger,
G4bool  valPIXE 
)

Definition at line 163 of file G4VAtomDeexcitation.cc.

References CLHEP::detail::n.

Referenced by InitialiseAtomicDeexcitation(), and G4EmProcessOptions::SetDeexcitationActiveRegion().

00167 {
00168   G4String ss = rname;
00169   //G4cout << "### G4VAtomDeexcitation::SetDeexcitationActiveRegion " << ss 
00170   //     << "  " << valDeexcitation << "  " << valAuger
00171   //     << "  " << valPIXE << G4endl;
00172   if(ss == "world" || ss == "World" || ss == "WORLD") {
00173     ss = "DefaultRegionForTheWorld";
00174   }
00175   size_t n = deRegions.size();
00176   if(n > 0) {
00177     for(size_t i=0; i<n; ++i) {
00178  
00179       // Region already exist
00180       if(ss == activeRegions[i]) {
00181         deRegions[i] = valDeexcitation;
00182         AugerRegions[i] = valAuger;
00183         PIXERegions[i] = valPIXE;
00184         return; 
00185       } 
00186     }
00187   }
00188   // New region
00189   activeRegions.push_back(ss);
00190   deRegions.push_back(valDeexcitation);
00191   AugerRegions.push_back(valAuger);
00192   PIXERegions.push_back(valPIXE);
00193 }

void G4VAtomDeexcitation::SetFluo ( G4bool   )  [inline]

Definition at line 193 of file G4VAtomDeexcitation.hh.

Referenced by G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmDNAPhysicsChemistry::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), and G4EmProcessOptions::SetFluo().

00194 {
00195   isActive = val;
00196 }

void G4VAtomDeexcitation::SetPIXE ( G4bool   )  [inline]

Definition at line 214 of file G4VAtomDeexcitation.hh.

Referenced by G4EmProcessOptions::SetPIXE().

00215 {
00216   flagPIXE = val;
00217   if(val) { isActive = true; }
00218 }

void G4VAtomDeexcitation::SetPIXECrossSectionModel ( const G4String  )  [inline]

Definition at line 231 of file G4VAtomDeexcitation.hh.

References CLHEP::detail::n.

Referenced by G4UAtomicDeexcitation::InitialiseForNewRun(), and G4EmProcessOptions::SetPIXECrossSectionModel().

00232 {
00233   namePIXE = n;
00234 }

void G4VAtomDeexcitation::SetPIXEElectronCrossSectionModel ( const G4String  )  [inline]

Definition at line 237 of file G4VAtomDeexcitation.hh.

References CLHEP::detail::n.

Referenced by G4UAtomicDeexcitation::InitialiseForNewRun(), and G4EmProcessOptions::SetPIXEElectronCrossSectionModel().

00238 {
00239   nameElectronPIXE = n;
00240 }

void G4VAtomDeexcitation::SetVerboseLevel ( G4int   )  [inline]

Definition at line 260 of file G4VAtomDeexcitation.hh.

Referenced by G4LossTableManager::SetVerbose().

00261 {
00262   verbose = val;
00263 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:39 2013 for Geant4 by  doxygen 1.4.7