Changeset 1005 for trunk/source/processes/electromagnetic/lowenergy/src
- Timestamp:
- Apr 20, 2009, 4:53:50 PM (15 years ago)
- Location:
- trunk/source/processes/electromagnetic/lowenergy/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreenPartial.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1. 2 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1.3 2009/01/20 07:40:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreenPartial.hh" … … 115 115 tCorrected = k * kineticEnergyCorrection[particleTypeIndex]; 116 116 117 // SI - added protection 118 if (tCorrected < waterExcitation.ExcitationEnergy(excitationLevel)) return 0; 119 // 120 117 121 G4int z = 10; 118 122 … … 158 162 // ELECTRON CORRECTION 159 163 160 if ( particle == instance->GetIon("alpha++")) 164 if ( particle == instance->GetIon("alpha++")|| 165 particle == G4Proton::ProtonDefinition()) 166 161 167 { while (i > 0) 162 168 { -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartial.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1.5 2009/01/20 07:40:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #include "G4CrossSectionIonisationBornPartial.hh" … … 33 33 G4CrossSectionIonisationBornPartial::G4CrossSectionIonisationBornPartial() 34 34 { 35 lowEnergyLimitDefault = 25* eV;35 lowEnergyLimitDefault = 12.61 * eV; 36 36 highEnergyLimitDefault = 30 * keV; 37 37 … … 52 52 tableFile[electron] = fileElectron; 53 53 54 lowEnergyLimit[electron] = 25.* eV;54 lowEnergyLimit[electron] = 12.61 * eV; 55 55 highEnergyLimit[electron] = 30. * keV; 56 56 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeDecrease.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateChargeDecrease.cc,v 1. 3 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4FinalStateChargeDecrease.cc,v 1.4 2009/01/20 07:50:28 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #include "G4FinalStateChargeDecrease.hh" … … 70 70 } 71 71 72 //SI - Added protection against total energy deposit 73 product.DoNotDepositEnergy(); 74 // 72 75 product.KillPrimaryParticle(); 76 73 77 product.AddEnergyDeposit(waterBindingEnergy); 74 78 75 79 G4DynamicParticle* aSecondary = new G4DynamicParticle(OutgoingParticleDefinition(definition, finalStateIndex), 76 80 track.GetDynamicParticle()->GetMomentumDirection(), -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeIncrease.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateChargeIncrease.cc,v 1. 3 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4FinalStateChargeIncrease.cc,v 1.4 2009/01/20 07:50:28 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #include "G4FinalStateChargeIncrease.hh" … … 48 48 product.Clear(); 49 49 50 //SI - Added protection against total energy deposit 51 product.DoNotDepositEnergy(); 52 // 50 53 product.KillPrimaryParticle(); 51 54 product.AddEnergyDeposit(0.); 55 52 56 G4ParticleDefinition* definition = track.GetDefinition(); 53 57 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateProduct.cc
r991 r1005 25 25 // 26 26 // 27 // $Id: G4FinalStateProduct.cc,v 1. 5 2007/11/09 20:11:04 piaExp $28 // GEANT4 tag $Name: geant4-09-02 $27 // $Id: G4FinalStateProduct.cc,v 1.6 2009/01/20 07:50:28 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 53 53 #include "G4ThreeVector.hh" 54 54 55 G4FinalStateProduct::G4FinalStateProduct() : killStatus(false), isModified(false), localEnergyDeposit(0.), modifiedEnergy(0)55 G4FinalStateProduct::G4FinalStateProduct() : killStatus(false), doNotDepositStatus(false), isModified(false), localEnergyDeposit(0.), modifiedEnergy(0) 56 56 { 57 57 // empty … … 68 68 // Reset object status 69 69 killStatus = false; 70 doNotDepositStatus = false; 70 71 isModified = false; 71 72 localEnergyDeposit = 0.; … … 98 99 } 99 100 101 void G4FinalStateProduct::DoNotDepositEnergy() 102 { 103 doNotDepositStatus = true; 104 } 105 100 106 void G4FinalStateProduct::KillPrimaryParticle() 101 107 { 108 102 109 // ---- MGP ---- To be added: Handle local energy deposit here 103 110 killStatus = true; -
trunk/source/processes/electromagnetic/lowenergy/src/G4IonParametrisedLossModel.cc
r991 r1005 37 37 // First implementation: 10. 11. 2008 38 38 // 39 // Modifications: 39 // Modifications: 03. 02. 2009 - Bug fix iterators (AL) 40 40 // 41 41 // … … 107 107 dedxCacheMaterial = 0; 108 108 dedxCacheEnergyCut = 0; 109 dedxCacheIter = lossTableList. begin();109 dedxCacheIter = lossTableList.end(); 110 110 dedxCacheTransitionEnergy = 0.0; 111 111 dedxCacheTransitionFactor = 0.0; … … 166 166 dedxCacheMaterial = 0; 167 167 dedxCacheEnergyCut = 0; 168 dedxCacheIter = lossTableList. begin();168 dedxCacheIter = lossTableList.end(); 169 169 dedxCacheTransitionEnergy = 0.0; 170 170 dedxCacheTransitionFactor = 0.0; … … 342 342 LossTableList::iterator iter = dedxCacheIter; 343 343 344 if(iter != lossTableList. begin()) {344 if(iter != lossTableList.end()) { 345 345 346 346 G4double transitionEnergy = dedxCacheTransitionEnergy; … … 672 672 673 673 // If any table is applicable, the transition factor is computed: 674 if(iter != lossTableList. begin()) {674 if(iter != lossTableList.end()) { 675 675 676 676 // Retrieving the transition energy from the parameterisation table … … 777 777 // If parameterization for ions is available the electronic energy loss 778 778 // is overwritten 779 if(iter != lossTableList. begin()) {779 if(iter != lossTableList.end()) { 780 780 781 781 // The energy loss is calculated using the ComputeDEDXPerVolume function … … 854 854 G4double transitionEnergy = dedxCacheTransitionEnergy; 855 855 856 if(iter != lossTableList. begin() && transitionEnergy < kineticEnergy) {856 if(iter != lossTableList.end() && transitionEnergy < kineticEnergy) { 857 857 chargeSquareRatio *= corrections -> EffectiveChargeCorrection(particle, 858 858 material, … … 862 862 eloss *= chargeSquareRatioCorr; 863 863 } 864 else if (iter == lossTableList. begin()) {864 else if (iter == lossTableList.end()) { 865 865 866 866 chargeSquareRatio *= corrections -> EffectiveChargeCorrection(particle, … … 875 875 // overwrite the energy loss (i.e. when the effective charge approach is 876 876 // used) 877 if(iter == lossTableList. begin()) {877 if(iter == lossTableList.end()) { 878 878 879 879 G4double scaledKineticEnergy = kineticEnergy * dedxCacheGenIonMassRatio; -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreComptonModel.cc,v 1. 1 2008/10/30 14:17:46sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4LivermoreComptonModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 … … 38 38 G4LivermoreComptonModel::G4LivermoreComptonModel(const G4ParticleDefinition*, 39 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 40 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0) 41 41 { 42 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? … … 45 45 SetHighEnergyLimit(highEnergyLimit); 46 46 47 verboseLevel= 0;47 verboseLevel=0 ; 48 48 // Verbosity scale: 49 49 // 0 = nothing … … 65 65 G4LivermoreComptonModel::~G4LivermoreComptonModel() 66 66 { 67 delete meanFreePathTable; 68 delete crossSectionHandler; 69 delete scatterFunctionData; 67 68 if (meanFreePathTable) delete meanFreePathTable; 69 if (crossSectionHandler) delete crossSectionHandler; 70 if (scatterFunctionData) delete scatterFunctionData; 71 70 72 } 71 73 … … 75 77 const G4DataVector& cuts) 76 78 { 79 77 80 if (verboseLevel > 3) 78 81 G4cout << "Calling G4LivermoreComptonModel::Initialise()" << G4endl; 79 82 80 InitialiseElementSelectors(particle,cuts); 81 83 if (crossSectionHandler) 84 { 85 crossSectionHandler->Clear(); 86 delete crossSectionHandler; 87 } 88 82 89 // Energy limits 83 90 … … 118 125 if (verboseLevel > 2) 119 126 G4cout << "Loaded cross section files for Livermore Compton model" << G4endl; 127 128 InitialiseElementSelectors(particle,cuts); 120 129 121 130 G4cout << "Livermore Compton model is initialized " << G4endl … … 135 144 136 145 isInitialised = true; 146 137 147 } 138 148 … … 145 155 G4double, G4double) 146 156 { 157 147 158 if (verboseLevel > 3) 148 159 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermoreComptonModel" << G4endl; 149 160 150 161 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); 162 151 163 return cs; 164 152 165 } 153 166 … … 160 173 G4double) 161 174 { 175 162 176 // The scattered gamma energy is sampled according to Klein - Nishina formula. 163 177 // then accepted or rejected depending on the Scattering Function multiplied … … 184 198 fParticleChange->SetProposedKineticEnergy(0.); 185 199 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 186 // SI - IS THE FOLLOWING RETURN NECESSARY ?187 200 return ; 188 201 } … … 335 348 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),eDirection,eKineticEnergy) ; 336 349 fvect->push_back(dp); 350 337 351 } 338 352 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreGammaConversionModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreGammaConversionModel.cc,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4LivermoreGammaConversionModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 … … 38 38 G4LivermoreGammaConversionModel::G4LivermoreGammaConversionModel(const G4ParticleDefinition*, 39 39 const G4String& nam) 40 :G4VEmModel(nam),smallEnergy(2.*MeV),isInitialised(false) 40 :G4VEmModel(nam),smallEnergy(2.*MeV),isInitialised(false),crossSectionHandler(0),meanFreePathTable(0) 41 41 { 42 42 lowEnergyLimit = 1.022000 * MeV; … … 63 63 G4LivermoreGammaConversionModel::~G4LivermoreGammaConversionModel() 64 64 { 65 delete meanFreePathTable;66 delete crossSectionHandler;65 if (meanFreePathTable) delete meanFreePathTable; 66 if (crossSectionHandler) delete crossSectionHandler; 67 67 } 68 68 … … 75 75 G4cout << "Calling G4LivermoreGammaConversionModel::Initialise()" << G4endl; 76 76 77 InitialiseElementSelectors(particle,cuts); 77 if (crossSectionHandler) 78 { 79 crossSectionHandler->Clear(); 80 delete crossSectionHandler; 81 } 78 82 79 83 // Energy limits … … 107 111 if (verboseLevel > 2) 108 112 G4cout << "Loaded cross section files for PenelopeGammaConversion" << G4endl; 113 114 InitialiseElementSelectors(particle,cuts); 109 115 110 116 G4cout << "Livermore Gamma Conversion model is initialized " << G4endl -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePhotoElectricModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePhotoElectricModel.cc,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4LivermorePhotoElectricModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 … … 38 38 G4LivermorePhotoElectricModel::G4LivermorePhotoElectricModel(const G4ParticleDefinition*, 39 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 40 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),crossSectionHandler(0),shellCrossSectionHandler(0),ElectronAngularGenerator(0) 41 41 { 42 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? … … 64 64 G4LivermorePhotoElectricModel::~G4LivermorePhotoElectricModel() 65 65 { 66 delete meanFreePathTable;67 delete crossSectionHandler;68 delete shellCrossSectionHandler;69 delete ElectronAngularGenerator;66 if (meanFreePathTable) delete meanFreePathTable; 67 if (crossSectionHandler) delete crossSectionHandler; 68 if (shellCrossSectionHandler) delete shellCrossSectionHandler; 69 if (ElectronAngularGenerator) delete ElectronAngularGenerator; 70 70 } 71 71 … … 78 78 G4cout << "Calling G4LivermorePhotoElectricModel::Initialise()" << G4endl; 79 79 80 InitialiseElementSelectors(particle,cuts); 81 80 if (crossSectionHandler) 81 { 82 crossSectionHandler->Clear(); 83 delete crossSectionHandler; 84 } 85 86 if (shellCrossSectionHandler) 87 { 88 shellCrossSectionHandler->Clear(); 89 delete shellCrossSectionHandler; 90 } 91 82 92 // Energy limits 83 93 … … 122 132 G4cout << "Loaded cross section files for Livermore PhotoElectric model" << G4endl; 123 133 134 InitialiseElementSelectors(particle,cuts); 135 124 136 G4cout << "Livermore PhotoElectric model is initialized " << G4endl 125 137 << "Energy range: " … … 177 189 fParticleChange->SetProposedKineticEnergy(0.); 178 190 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy); 179 // SI - IS THE FOLLOWING RETURN NECESSARY ?180 191 return ; 181 192 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedComptonModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 … … 38 38 G4LivermorePolarizedComptonModel::G4LivermorePolarizedComptonModel(const G4ParticleDefinition*, 39 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 40 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0) 41 41 { 42 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? … … 65 65 G4LivermorePolarizedComptonModel::~G4LivermorePolarizedComptonModel() 66 66 { 67 delete meanFreePathTable;68 delete crossSectionHandler;69 delete scatterFunctionData;67 if (meanFreePathTable) delete meanFreePathTable; 68 if (crossSectionHandler) delete crossSectionHandler; 69 if (scatterFunctionData) delete scatterFunctionData; 70 70 } 71 71 … … 78 78 G4cout << "Calling G4LivermorePolarizedComptonModel::Initialise()" << G4endl; 79 79 80 InitialiseElementSelectors(particle,cuts); 80 if (crossSectionHandler) 81 { 82 crossSectionHandler->Clear(); 83 delete crossSectionHandler; 84 } 81 85 82 86 // Energy limits … … 119 123 if (verboseLevel > 2) 120 124 G4cout << "Loaded cross section files for Livermore Polarized Compton model" << G4endl; 125 126 InitialiseElementSelectors(particle,cuts); 121 127 122 128 G4cout << "Livermore Polarized Compton model is initialized " << G4endl … … 203 209 fParticleChange->SetProposedKineticEnergy(0.); 204 210 fParticleChange->ProposeLocalEnergyDeposit(gammaEnergy0); 205 // SI - IS THE FOLLOWING RETURN NECESSARY ?206 211 return; 207 212 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedRayleighModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 … … 38 38 G4LivermorePolarizedRayleighModel::G4LivermorePolarizedRayleighModel(const G4ParticleDefinition*, 39 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 40 :G4VEmModel(nam),isInitialised(false),crossSectionHandler(0),formFactorData(0) 41 41 { 42 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? … … 65 65 G4LivermorePolarizedRayleighModel::~G4LivermorePolarizedRayleighModel() 66 66 { 67 delete crossSectionHandler;68 delete formFactorData;67 if (crossSectionHandler) delete crossSectionHandler; 68 if (formFactorData) delete formFactorData; 69 69 } 70 70 … … 84 84 G4cout << "Calling G4LivermorePolarizedRayleighModel::Initialise()" << G4endl; 85 85 86 InitialiseElementSelectors(particle,cuts); 87 86 if (crossSectionHandler) 87 { 88 crossSectionHandler->Clear(); 89 delete crossSectionHandler; 90 } 91 88 92 // Energy limits 89 93 … … 116 120 if (verboseLevel > 2) 117 121 G4cout << "Loaded cross section files for Livermore Polarized Rayleigh model" << G4endl; 122 123 InitialiseElementSelectors(particle,cuts); 118 124 119 125 G4cout << "Livermore Polarized Rayleigh model is initialized " << G4endl -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreRayleighModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreRayleighModel.cc,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4LivermoreRayleighModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 … … 38 38 G4LivermoreRayleighModel::G4LivermoreRayleighModel(const G4ParticleDefinition*, 39 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 40 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),formFactorData(0),crossSectionHandler(0) 41 41 { 42 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? … … 65 65 G4LivermoreRayleighModel::~G4LivermoreRayleighModel() 66 66 { 67 delete meanFreePathTable;68 delete crossSectionHandler;69 delete formFactorData;67 if (meanFreePathTable) delete meanFreePathTable; 68 if (crossSectionHandler) delete crossSectionHandler; 69 if (formFactorData) delete formFactorData; 70 70 } 71 71 … … 78 78 G4cout << "Calling G4LivermoreRayleighModel::Initialise()" << G4endl; 79 79 80 InitialiseElementSelectors(particle,cuts); 81 80 if (crossSectionHandler) 81 { 82 crossSectionHandler->Clear(); 83 delete crossSectionHandler; 84 } 85 82 86 // Energy limits 83 87 … … 115 119 if (verboseLevel > 2) 116 120 G4cout << "Loaded cross section files for Livermore Rayleigh model" << G4endl; 121 122 InitialiseElementSelectors(particle,cuts); 117 123 118 124 G4cout << "Livermore Rayleigh model is initialized " << G4endl … … 166 172 fParticleChange->SetProposedKineticEnergy(0.); 167 173 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 168 // SI - IS THE FOLLOWING RETURN NECESSARY ?169 174 return ; 170 175 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.1 0 2008/12/09 15:08:13pandola Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.11 2008/12/15 09:23:06 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 97 97 G4String dirFile = pathString + "/penelope/" + name; 98 98 std::ifstream file(dirFile); 99 std::filebuf* lsdp = file.rdbuf(); 100 if (!(lsdp->is_open())) 99 if (!file.is_open()) 101 100 { 102 101 G4String excep = "G4PenelopeBremsstrahlungContinuous - data file " + name + " not found!"; … … 112 111 for (size_t j=0;j<NumberofKPoints;j++){ 113 112 file >> a1; 114 ReducedCS[i][j]=a1*cm2; //coversion present in Penelope source113 ReducedCS[i][j]=a1*cm2; 115 114 } 116 115 //3) read the total cross section, in cm2 117 116 file >> a1; 118 TotalCS[i]=a1*cm2; //conversion present in Penelope source117 TotalCS[i]=a1*cm2; 119 118 // Check closing item 120 119 file >> a1; 121 120 if (a1 != ((G4double) -1)) 122 121 { 123 G4String excep = "G4PenelopeBremsstrahlungContinuous - Check the bremms data file " + name; 122 G4String excep = "G4PenelopeBremsstrahlungContinuous - Check the bremms data file " 123 + name; 124 124 G4Exception(excep); 125 125 } … … 229 229 230 230 //Global x-section factor 231 G4double Fact=Zmat*Zmat*(energy+electron_mass_c2)*(energy+electron_mass_c2)/(energy*(energy+2.0*electron_mass_c2)); 231 G4double Fact=Zmat*Zmat*(energy+electron_mass_c2)*(energy+electron_mass_c2)/ 232 (energy*(energy+2.0*electron_mass_c2)); 232 233 Fact *= PositronCorrection(energy); 233 234 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisationModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisationModel.cc,v 1. 2 2008/12/05 09:15:43pandola Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4PenelopeIonisationModel.cc,v 1.3 2008/12/15 09:23:06 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // Author: Luciano Pandola … … 517 517 //Penelope subtracted the fluorescence, but one has to match the databases 518 518 eKineticEnergy = energySecondary+ioniEnergy-bindingEnergy; 519 520 //VERIFICA QUI LA STORIA DEL LOCAL ENERGY DEPOSIT! 521 519 522 520 G4double localEnergyDeposit = ionEnergy; 523 521 G4double energyInFluorescence = 0.0*eV; -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectric.cc
r991 r1005 25 25 // 26 26 // 27 // $Id: G4PenelopePhotoElectric.cc,v 1.1 2 2006/06/29 19:40:51 gunterExp $28 // GEANT4 tag $Name: geant4-09-02 $27 // $Id: G4PenelopePhotoElectric.cc,v 1.13 2009/01/08 09:42:54 pandola Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // Author: L. Pandola … … 37 37 // 31 May 2005 L. Pandola Added Sauter formula for the sampling of 38 38 // the electron direction 39 // 08 Jan 2009 L. Pandola Check shell index to avoid mismatch between 40 // the Penelope cross section database and the 41 // G4AtomicTransitionManager database. It suppresses 42 // a warning from G4AtomicTransitionManager only. 43 // Results are unchanged. 39 44 // -------------------------------------------------------------- 40 45 … … 146 151 // Retrieve the corresponding identifier and binding energy of the selected shell 147 152 const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance(); 153 154 //The number of shell cross section possibly reported in the Penelope database 155 //might be different from the number of shells in the G4AtomicTransitionManager 156 //(namely, Penelope may contain more shell, especially for very light elements). 157 //In order to avoid a warning message from the G4AtomicTransitionManager, I 158 //add this protection. Results are anyway changed, because when G4AtomicTransitionManager 159 //has a shellID>maxID, it sets the shellID to the last valid shell. 160 size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z); 161 if (shellIndex >= numberOfShells) 162 shellIndex = numberOfShells-1; 163 148 164 const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex); 149 165 G4double bindingEnergy = shell->BindingEnergy(); -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectricModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopePhotoElectricModel.cc,v 1. 2 2008/12/04 14:09:36pandola Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4PenelopePhotoElectricModel.cc,v 1.3 2009/01/08 09:42:54 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // Author: Luciano Pandola … … 31 31 // History: 32 32 // -------- 33 // 08 Oct 2008 L Pandola Migration from process to model 33 // 08 Oct 2008 L Pandola Migration from process to model 34 // 08 Jan 2009 L. Pandola Check shell index to avoid mismatch between 35 // the Penelope cross section database and the 36 // G4AtomicTransitionManager database. It suppresses 37 // a warning from G4AtomicTransitionManager only. 38 // Results are unchanged. 34 39 // 35 40 … … 227 232 // Retrieve the corresponding identifier and binding energy of the selected shell 228 233 const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance(); 234 235 //The number of shell cross section possibly reported in the Penelope database 236 //might be different from the number of shells in the G4AtomicTransitionManager 237 //(namely, Penelope may contain more shell, especially for very light elements). 238 //In order to avoid a warning message from the G4AtomicTransitionManager, I 239 //add this protection. Results are anyway changed, because when G4AtomicTransitionManager 240 //has a shellID>maxID, it sets the shellID to the last valid shell. 241 size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z); 242 if (shellIndex >= numberOfShells) 243 shellIndex = numberOfShells-1; 244 229 245 const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex); 230 246 G4double bindingEnergy = shell->BindingEnergy(); -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationCrossSectionHandler.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.1 1 2006/06/29 19:42:00 gunterExp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.12 2009/01/29 08:13:34 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 42 42 // 19 Jul 2002 VI Create composite data set for material 43 43 // 21 Jan 2003 V.Ivanchenko Cut per region 44 // 28 Jan 2009 L.Pandola Added public method to make a easier migration of 45 // G4LowEnergyIonisation to G4LivermoreIonisationModel 44 46 // 45 47 // ------------------------------------------------------------------- … … 98 100 G4int nElements = material->GetNumberOfElements(); 99 101 100 if(verbose > 0) { 101 G4cout << "eIonisation CS for " << m << "th material " 102 << material->GetName() 103 << " eEl= " << nElements << G4endl; 104 } 102 if(verbose > 0) 103 { 104 G4cout << "eIonisation CS for " << m << "th material " 105 << material->GetName() 106 << " eEl= " << nElements << G4endl; 107 } 105 108 106 109 G4double tcut = (*energyCuts)[m]; … … 129 132 value += cross * p * density; 130 133 131 if(verbose>0 && m == 0 && e>=1. && e<=0.) { 134 if(verbose>0 && m == 0 && e>=1. && e<=0.) 135 { 132 136 G4cout << "G4eIonCrossSH: e(MeV)= " << e/MeV 133 137 << " n= " << n … … 139 143 << " Z= " << Z 140 144 << G4endl; 141 }145 } 142 146 143 147 } … … 155 159 } 156 160 157 161 G4double G4eIonisationCrossSectionHandler::GetCrossSectionAboveThresholdForElement(G4double energy, 162 G4double cutEnergy, 163 G4int Z) 164 { 165 G4int nShells = NumberOfComponents(Z); 166 G4double value = 0.; 167 if(energy > cutEnergy) 168 { 169 for (G4int n=0; n<nShells; n++) { 170 G4double cross = FindValue(Z, energy, n); 171 G4double p = theParam->Probability(Z, cutEnergy, energy, energy, n); 172 value += cross * p; 173 } 174 } 175 return value; 176 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyLoss.cc
r991 r1005 25 25 // 26 26 // 27 // $Id: G4hLowEnergyLoss.cc,v 1.2 7 2008/06/20 19:54:03sincerti Exp $28 // GEANT4 tag $Name: geant4-09-02 $27 // $Id: G4hLowEnergyLoss.cc,v 1.28 2009/02/20 10:49:54 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------- … … 145 145 G4double G4hLowEnergyLoss::HighestKineticEnergy= 100.*GeV; 146 146 G4int G4hLowEnergyLoss::TotBin = 360; 147 G4double G4hLowEnergyLoss::RTable,G4hLowEnergyLoss::LOGRTable; 147 G4double G4hLowEnergyLoss::RTable =1.1; 148 G4double G4hLowEnergyLoss::LOGRTable = 1.1; 148 149 149 150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 772 773 theRangeTable = theRangepbarTable ; 773 774 } 774 775 775 G4double R2 = RTable*RTable ; 776 776 G4double R1 = RTable+1.; … … 1062 1062 { 1063 1063 G4double LowEdgeRange,A,B,C,discr,KineticEnergy ; 1064 G4double Tbin = LowestKineticEnergy/RTable ; 1064 G4double Tbin = 0; 1065 if (RTable !=0.) Tbin = LowestKineticEnergy/RTable ; 1065 1066 G4double rangebin = 0.0 ; 1066 1067 G4int binnumber = -1 ;
Note: See TracChangeset
for help on using the changeset viewer.