| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | // $Id: G4LivermorePhotoElectricModel.cc,v 1.12 2010/10/13 07:15:42 pandola Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $
|
|---|
| 28 | //
|
|---|
| 29 | //
|
|---|
| 30 | // Author: Sebastien Inserti
|
|---|
| 31 | // 30 October 2008
|
|---|
| 32 | //
|
|---|
| 33 | // History:
|
|---|
| 34 | // --------
|
|---|
| 35 | // 15 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries:
|
|---|
| 36 | // - apply internal high-energy limit only in constructor
|
|---|
| 37 | // - do not apply low-energy limit (default is 0)
|
|---|
| 38 | // - remove GetMeanFreePath method and table
|
|---|
| 39 | // - simplify sampling of deexcitation by using cut in energy
|
|---|
| 40 | // - added protection against numerical problem in energy sampling
|
|---|
| 41 | // - use G4ElementSelector
|
|---|
| 42 | // 23 Oct 2009 L Pandola
|
|---|
| 43 | // - atomic deexcitation managed via G4VEmModel::DeexcitationFlag() is
|
|---|
| 44 | // set as "true" (default would be false)
|
|---|
| 45 | // 15 Mar 2010 L Pandola
|
|---|
| 46 | // - removed methods to set explicitely fluorescence cuts.
|
|---|
| 47 | // Main cuts from G4ProductionCutsTable are always used
|
|---|
| 48 | //
|
|---|
| 49 |
|
|---|
| 50 | #include "G4LivermorePhotoElectricModel.hh"
|
|---|
| 51 |
|
|---|
| 52 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 53 |
|
|---|
| 54 | using namespace std;
|
|---|
| 55 |
|
|---|
| 56 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 57 |
|
|---|
| 58 | G4LivermorePhotoElectricModel::G4LivermorePhotoElectricModel(const G4ParticleDefinition*,
|
|---|
| 59 | const G4String& nam)
|
|---|
| 60 | :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),
|
|---|
| 61 | crossSectionHandler(0),shellCrossSectionHandler(0),ElectronAngularGenerator(0)
|
|---|
| 62 | {
|
|---|
| 63 | lowEnergyLimit = 250 * eV;
|
|---|
| 64 | highEnergyLimit = 100 * GeV;
|
|---|
| 65 | // SetLowEnergyLimit(lowEnergyLimit);
|
|---|
| 66 | SetHighEnergyLimit(highEnergyLimit);
|
|---|
| 67 |
|
|---|
| 68 | verboseLevel= 0;
|
|---|
| 69 | // Verbosity scale:
|
|---|
| 70 | // 0 = nothing
|
|---|
| 71 | // 1 = warning for energy non-conservation
|
|---|
| 72 | // 2 = details of energy budget
|
|---|
| 73 | // 3 = calculation of cross sections, file openings, sampling of atoms
|
|---|
| 74 | // 4 = entering in methods
|
|---|
| 75 |
|
|---|
| 76 | //Set atomic deexcitation by default
|
|---|
| 77 | SetDeexcitationFlag(true);
|
|---|
| 78 | ActivateAuger(false);
|
|---|
| 79 |
|
|---|
| 80 | if(verboseLevel>0) {
|
|---|
| 81 | G4cout << "Livermore PhotoElectric is constructed " << G4endl
|
|---|
| 82 | << "Energy range: "
|
|---|
| 83 | << lowEnergyLimit / eV << " eV - "
|
|---|
| 84 | << highEnergyLimit / GeV << " GeV"
|
|---|
| 85 | << G4endl;
|
|---|
| 86 | }
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 90 |
|
|---|
| 91 | G4LivermorePhotoElectricModel::~G4LivermorePhotoElectricModel()
|
|---|
| 92 | {
|
|---|
| 93 | if (crossSectionHandler) delete crossSectionHandler;
|
|---|
| 94 | if (shellCrossSectionHandler) delete shellCrossSectionHandler;
|
|---|
| 95 | if (ElectronAngularGenerator) delete ElectronAngularGenerator;
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 99 |
|
|---|
| 100 | void
|
|---|
| 101 | G4LivermorePhotoElectricModel::Initialise(const G4ParticleDefinition*,
|
|---|
| 102 | const G4DataVector&)
|
|---|
| 103 | {
|
|---|
| 104 | if (verboseLevel > 3)
|
|---|
| 105 | G4cout << "Calling G4LivermorePhotoElectricModel::Initialise()" << G4endl;
|
|---|
| 106 |
|
|---|
| 107 | if (crossSectionHandler)
|
|---|
| 108 | {
|
|---|
| 109 | crossSectionHandler->Clear();
|
|---|
| 110 | delete crossSectionHandler;
|
|---|
| 111 | }
|
|---|
| 112 |
|
|---|
| 113 | if (shellCrossSectionHandler)
|
|---|
| 114 | {
|
|---|
| 115 | shellCrossSectionHandler->Clear();
|
|---|
| 116 | delete shellCrossSectionHandler;
|
|---|
| 117 | }
|
|---|
| 118 |
|
|---|
| 119 | // Read data tables for all materials
|
|---|
| 120 |
|
|---|
| 121 | crossSectionHandler = new G4CrossSectionHandler();
|
|---|
| 122 | crossSectionHandler->Clear();
|
|---|
| 123 | G4String crossSectionFile = "phot/pe-cs-";
|
|---|
| 124 | crossSectionHandler->LoadData(crossSectionFile);
|
|---|
| 125 |
|
|---|
| 126 | shellCrossSectionHandler = new G4CrossSectionHandler();
|
|---|
| 127 | shellCrossSectionHandler->Clear();
|
|---|
| 128 | G4String shellCrossSectionFile = "phot/pe-ss-cs-";
|
|---|
| 129 | shellCrossSectionHandler->LoadShellData(shellCrossSectionFile);
|
|---|
| 130 |
|
|---|
| 131 | // default generator
|
|---|
| 132 | ElectronAngularGenerator =
|
|---|
| 133 | new G4PhotoElectricAngularGeneratorSauterGavrila("GEANTSauterGavrilaGenerator");
|
|---|
| 134 |
|
|---|
| 135 | //
|
|---|
| 136 | if (verboseLevel > 2)
|
|---|
| 137 | G4cout << "Loaded cross section files for Livermore PhotoElectric model" << G4endl;
|
|---|
| 138 |
|
|---|
| 139 | // InitialiseElementSelectors(particle,cuts);
|
|---|
| 140 |
|
|---|
| 141 | if (verboseLevel > 0) {
|
|---|
| 142 | G4cout << "Livermore PhotoElectric model is initialized " << G4endl
|
|---|
| 143 | << "Energy range: "
|
|---|
| 144 | << LowEnergyLimit() / eV << " eV - "
|
|---|
| 145 | << HighEnergyLimit() / GeV << " GeV"
|
|---|
| 146 | << G4endl;
|
|---|
| 147 | }
|
|---|
| 148 |
|
|---|
| 149 | if(isInitialised) return;
|
|---|
| 150 | fParticleChange = GetParticleChangeForGamma();
|
|---|
| 151 | isInitialised = true;
|
|---|
| 152 | }
|
|---|
| 153 |
|
|---|
| 154 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 155 |
|
|---|
| 156 | G4double G4LivermorePhotoElectricModel::ComputeCrossSectionPerAtom(
|
|---|
| 157 | const G4ParticleDefinition*,
|
|---|
| 158 | G4double GammaEnergy,
|
|---|
| 159 | G4double Z, G4double,
|
|---|
| 160 | G4double, G4double)
|
|---|
| 161 | {
|
|---|
| 162 | if (verboseLevel > 3)
|
|---|
| 163 | G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermorePhotoElectricModel"
|
|---|
| 164 | << G4endl;
|
|---|
| 165 |
|
|---|
| 166 | if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit)
|
|---|
| 167 | return 0;
|
|---|
| 168 |
|
|---|
| 169 | G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy);
|
|---|
| 170 | return cs;
|
|---|
| 171 | }
|
|---|
| 172 |
|
|---|
| 173 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 174 |
|
|---|
| 175 | void
|
|---|
| 176 | G4LivermorePhotoElectricModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
|---|
| 177 | const G4MaterialCutsCouple* couple,
|
|---|
| 178 | const G4DynamicParticle* aDynamicGamma,
|
|---|
| 179 | G4double,
|
|---|
| 180 | G4double)
|
|---|
| 181 | {
|
|---|
| 182 |
|
|---|
| 183 | // Fluorescence generated according to:
|
|---|
| 184 | // J. Stepanek ,"A program to determine the radiation spectra due to a single atomic
|
|---|
| 185 | // subshell ionisation by a particle or due to deexcitation or decay of radionuclides",
|
|---|
| 186 | // Comp. Phys. Comm. 1206 pp 1-1-9 (1997)
|
|---|
| 187 |
|
|---|
| 188 | if (verboseLevel > 3)
|
|---|
| 189 | G4cout << "Calling SampleSecondaries() of G4LivermorePhotoElectricModel" << G4endl;
|
|---|
| 190 |
|
|---|
| 191 | G4double photonEnergy = aDynamicGamma->GetKineticEnergy();
|
|---|
| 192 |
|
|---|
| 193 | // kill incident photon
|
|---|
| 194 | fParticleChange->SetProposedKineticEnergy(0.);
|
|---|
| 195 | fParticleChange->ProposeTrackStatus(fStopAndKill);
|
|---|
| 196 |
|
|---|
| 197 | // low-energy gamma is absorpted by this process
|
|---|
| 198 | if (photonEnergy <= lowEnergyLimit)
|
|---|
| 199 | {
|
|---|
| 200 | fParticleChange->ProposeLocalEnergyDeposit(photonEnergy);
|
|---|
| 201 | return;
|
|---|
| 202 | }
|
|---|
| 203 |
|
|---|
| 204 | // Returns the normalized direction of the momentum
|
|---|
| 205 | G4ThreeVector photonDirection = aDynamicGamma->GetMomentumDirection();
|
|---|
| 206 |
|
|---|
| 207 | // Select randomly one element in the current material
|
|---|
| 208 | // G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy);
|
|---|
| 209 | const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition();
|
|---|
| 210 | const G4Element* elm = SelectRandomAtom(couple->GetMaterial(),particle,photonEnergy);
|
|---|
| 211 | G4int Z = (G4int)elm->GetZ();
|
|---|
| 212 |
|
|---|
| 213 | // Select the ionised shell in the current atom according to shell cross sections
|
|---|
| 214 | size_t shellIndex = shellCrossSectionHandler->SelectRandomShell(Z,photonEnergy);
|
|---|
| 215 |
|
|---|
| 216 | // Retrieve the corresponding identifier and binding energy of the selected shell
|
|---|
| 217 | const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance();
|
|---|
| 218 | const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex);
|
|---|
| 219 | G4double bindingEnergy = shell->BindingEnergy();
|
|---|
| 220 | G4int shellId = shell->ShellId();
|
|---|
| 221 |
|
|---|
| 222 | // Primary outcoming electron
|
|---|
| 223 | G4double eKineticEnergy = photonEnergy - bindingEnergy;
|
|---|
| 224 |
|
|---|
| 225 | // There may be cases where the binding energy of the selected shell is > photon energy
|
|---|
| 226 | // In such cases do not generate secondaries
|
|---|
| 227 | if (eKineticEnergy > 0.)
|
|---|
| 228 | {
|
|---|
| 229 | // Calculate direction of the photoelectron
|
|---|
| 230 | G4ThreeVector gammaPolarization = aDynamicGamma->GetPolarization();
|
|---|
| 231 | G4ThreeVector electronDirection =
|
|---|
| 232 | ElectronAngularGenerator->GetPhotoElectronDirection(photonDirection,
|
|---|
| 233 | eKineticEnergy,
|
|---|
| 234 | gammaPolarization,
|
|---|
| 235 | shellId);
|
|---|
| 236 |
|
|---|
| 237 | // The electron is created ...
|
|---|
| 238 | G4DynamicParticle* electron = new G4DynamicParticle (G4Electron::Electron(),
|
|---|
| 239 | electronDirection,
|
|---|
| 240 | eKineticEnergy);
|
|---|
| 241 | fvect->push_back(electron);
|
|---|
| 242 | }
|
|---|
| 243 | else
|
|---|
| 244 | {
|
|---|
| 245 | bindingEnergy = photonEnergy;
|
|---|
| 246 | }
|
|---|
| 247 |
|
|---|
| 248 | // deexcitation
|
|---|
| 249 | if(DeexcitationFlag() && Z > 5) {
|
|---|
| 250 |
|
|---|
| 251 | const G4ProductionCutsTable* theCoupleTable=
|
|---|
| 252 | G4ProductionCutsTable::GetProductionCutsTable();
|
|---|
| 253 |
|
|---|
| 254 | size_t index = couple->GetIndex();
|
|---|
| 255 | G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[index];
|
|---|
| 256 | G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[index];
|
|---|
| 257 |
|
|---|
| 258 | // Generation of fluorescence
|
|---|
| 259 | // Data in EADL are available only for Z > 5
|
|---|
| 260 | // Protection to avoid generating photons in the unphysical case of
|
|---|
| 261 | // shell binding energy > photon energy
|
|---|
| 262 | if (bindingEnergy > cutg || bindingEnergy > cute)
|
|---|
| 263 | {
|
|---|
| 264 | G4DynamicParticle* aPhoton;
|
|---|
| 265 | deexcitationManager.SetCutForSecondaryPhotons(cutg);
|
|---|
| 266 | deexcitationManager.SetCutForAugerElectrons(cute);
|
|---|
| 267 |
|
|---|
| 268 | std::vector<G4DynamicParticle*>* photonVector =
|
|---|
| 269 | deexcitationManager.GenerateParticles(Z,shellId);
|
|---|
| 270 | size_t nTotPhotons = photonVector->size();
|
|---|
| 271 | for (size_t k=0; k<nTotPhotons; k++)
|
|---|
| 272 | {
|
|---|
| 273 | aPhoton = (*photonVector)[k];
|
|---|
| 274 | if (aPhoton)
|
|---|
| 275 | {
|
|---|
| 276 | G4double itsEnergy = aPhoton->GetKineticEnergy();
|
|---|
| 277 | if (itsEnergy <= bindingEnergy)
|
|---|
| 278 | {
|
|---|
| 279 | // Local energy deposit is given as the sum of the
|
|---|
| 280 | // energies of incident photons minus the energies
|
|---|
| 281 | // of the outcoming fluorescence photons
|
|---|
| 282 | bindingEnergy -= itsEnergy;
|
|---|
| 283 | fvect->push_back(aPhoton);
|
|---|
| 284 | }
|
|---|
| 285 | else
|
|---|
| 286 | {
|
|---|
| 287 | // abnormal case of energy non-conservation
|
|---|
| 288 | delete aPhoton;
|
|---|
| 289 | (*photonVector)[k] = 0;
|
|---|
| 290 | }
|
|---|
| 291 | }
|
|---|
| 292 | }
|
|---|
| 293 | delete photonVector;
|
|---|
| 294 | }
|
|---|
| 295 | }
|
|---|
| 296 | // excitation energy left
|
|---|
| 297 | fParticleChange->ProposeLocalEnergyDeposit(bindingEnergy);
|
|---|
| 298 | }
|
|---|
| 299 |
|
|---|
| 300 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 301 |
|
|---|
| 302 | void G4LivermorePhotoElectricModel::ActivateAuger(G4bool augerbool)
|
|---|
| 303 | {
|
|---|
| 304 | if (!DeexcitationFlag() && augerbool)
|
|---|
| 305 | {
|
|---|
| 306 | G4cout << "WARNING - G4LivermorePhotoElectricModel" << G4endl;
|
|---|
| 307 | G4cout << "The use of the Atomic Deexcitation Manager is set to false " << G4endl;
|
|---|
| 308 | G4cout << "Therefore, Auger electrons will be not generated anyway" << G4endl;
|
|---|
| 309 | }
|
|---|
| 310 | deexcitationManager.ActivateAugerElectronProduction(augerbool);
|
|---|
| 311 | if (verboseLevel > 1)
|
|---|
| 312 | G4cout << "Auger production set to " << augerbool << G4endl;
|
|---|
| 313 | }
|
|---|
| 314 |
|
|---|
| 315 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 316 |
|
|---|
| 317 | void
|
|---|
| 318 | G4LivermorePhotoElectricModel::SetAngularGenerator(G4VPhotoElectricAngularDistribution* dist)
|
|---|
| 319 | {
|
|---|
| 320 | ElectronAngularGenerator = dist;
|
|---|
| 321 | ElectronAngularGenerator->PrintGeneratorInformation();
|
|---|
| 322 | }
|
|---|
| 323 |
|
|---|
| 324 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 325 |
|
|---|
| 326 | void G4LivermorePhotoElectricModel::SetAngularGenerator(const G4String& name)
|
|---|
| 327 | {
|
|---|
| 328 | if (name == "default")
|
|---|
| 329 | {
|
|---|
| 330 | delete ElectronAngularGenerator;
|
|---|
| 331 | ElectronAngularGenerator =
|
|---|
| 332 | new G4PhotoElectricAngularGeneratorSimple("GEANT4LowEnergySimpleGenerator");
|
|---|
| 333 | generatorName = name;
|
|---|
| 334 | }
|
|---|
| 335 | else if (name == "standard")
|
|---|
| 336 | {
|
|---|
| 337 | delete ElectronAngularGenerator;
|
|---|
| 338 | ElectronAngularGenerator =
|
|---|
| 339 | new G4PhotoElectricAngularGeneratorSauterGavrila("GEANT4SauterGavrilaGenerator");
|
|---|
| 340 | generatorName = name;
|
|---|
| 341 | }
|
|---|
| 342 | else if (name == "polarized")
|
|---|
| 343 | {
|
|---|
| 344 | delete ElectronAngularGenerator;
|
|---|
| 345 | ElectronAngularGenerator =
|
|---|
| 346 | new G4PhotoElectricAngularGeneratorPolarized("GEANT4LowEnergyPolarizedGenerator");
|
|---|
| 347 | generatorName = name;
|
|---|
| 348 | }
|
|---|
| 349 | else
|
|---|
| 350 | {
|
|---|
| 351 | G4Exception("G4LowEnergyPhotoElectric::SetAngularGenerator - generator does not exist");
|
|---|
| 352 | }
|
|---|
| 353 |
|
|---|
| 354 | ElectronAngularGenerator->PrintGeneratorInformation();
|
|---|
| 355 | }
|
|---|
| 356 |
|
|---|