Changeset 1315 for trunk/source/processes/electromagnetic
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (15 years ago)
- Location:
- trunk/source/processes/electromagnetic
- Files:
-
- 341 edited
-
adjoint/History (modified) (2 diffs)
-
adjoint/src/G4AdjointhMultipleScattering.cc (modified) (2 diffs)
-
highenergy/History (modified) (2 diffs)
-
highenergy/src/G4hhIonisation.cc (modified) (4 diffs)
-
highenergy/src/G4mplIonisation.cc (modified) (2 diffs)
-
lowenergy/History (modified) (2 diffs)
-
lowenergy/include/G4AtomicDeexcitation.hh (modified) (1 diff)
-
lowenergy/include/G4AtomicTransitionManager.hh (modified) (1 diff)
-
lowenergy/include/G4AugerData.hh (modified) (1 diff)
-
lowenergy/include/G4BremsstrahlungParameters.hh (modified) (1 diff)
-
lowenergy/include/G4CompositeEMDataSet.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionChargeDecrease.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionChargeDecreasePartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionChargeIncrease.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionChargeIncreasePartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionChargeTransferCH.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionChargeTransferExp.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionElasticChampion.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionElasticScreenedRutherford.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionElasticScreenedRutherfordHE.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionElasticScreenedRutherfordLE.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionExcitationBorn.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionExcitationBornPartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionExcitationEmfietzoglou.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionExcitationEmfietzoglouPartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionExcitationMillerGreenPartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionHandler.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionIonisationBorn.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionIonisationBornElectron.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionIonisationBornPartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionIonisationBornPartialElectron.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionIonisationRudd.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionIonisationRuddPartial.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionKill.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionPsCreationChampion.hh (modified) (1 diff)
-
lowenergy/include/G4CrossSectionPsCreationChampionPartial.hh (modified) (1 diff)
-
lowenergy/include/G4DNABornExcitationModel.hh (modified) (6 diffs)
-
lowenergy/include/G4DNABornIonisationModel.hh (modified) (5 diffs)
-
lowenergy/include/G4DNAChampionElasticModel.hh (modified) (5 diffs)
-
lowenergy/include/G4DNAChargeDecrease.hh (modified) (1 diff)
-
lowenergy/include/G4DNAChargeIncrease.hh (modified) (1 diff)
-
lowenergy/include/G4DNACrossSectionDataSet.hh (modified) (1 diff)
-
lowenergy/include/G4DNADingfelderChargeDecreaseModel.hh (modified) (2 diffs)
-
lowenergy/include/G4DNADingfelderChargeIncreaseModel.hh (modified) (2 diffs)
-
lowenergy/include/G4DNAElastic.hh (modified) (1 diff)
-
lowenergy/include/G4DNAEmfietzoglouExcitationModel.hh (modified) (3 diffs)
-
lowenergy/include/G4DNAExcitation.hh (modified) (1 diff)
-
lowenergy/include/G4DNAGenericIonsManager.hh (modified) (1 diff)
-
lowenergy/include/G4DNAIonisation.hh (modified) (1 diff)
-
lowenergy/include/G4DNAMillerGreenExcitationModel.hh (modified) (2 diffs)
-
lowenergy/include/G4DNAProcess.hh (modified) (1 diff)
-
lowenergy/include/G4DNAProcess.icc (modified) (1 diff)
-
lowenergy/include/G4DNARuddIonisationModel.hh (modified) (2 diffs)
-
lowenergy/include/G4DNAScreenedRutherfordElasticModel.hh (modified) (2 diffs)
-
lowenergy/include/G4DopplerProfile.hh (modified) (1 diff)
-
lowenergy/include/G4DummyFinalState.hh (modified) (1 diff)
-
lowenergy/include/G4EMDataSet.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateChargeDecrease.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateChargeIncrease.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateChargeTransferProton.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateElasticBrennerZaider.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateElasticChampion.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateElasticScreenedRutherford.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateExcitationBorn.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateExcitationEmfietzoglou.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateExcitationMillerGreen.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateIonisationBorn.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateIonisationRudd.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateKill.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStateProduct.hh (modified) (1 diff)
-
lowenergy/include/G4FinalStatePsCreationChampion.hh (modified) (1 diff)
-
lowenergy/include/G4FluoTransition.hh (modified) (1 diff)
-
lowenergy/include/G4LinInterpolation.hh (modified) (1 diff)
-
lowenergy/include/G4LivermoreBremsstrahlungModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermoreComptonModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermoreGammaConversionModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermoreIonisationModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermorePhotoElectricModel.hh (modified) (4 diffs)
-
lowenergy/include/G4LivermorePolarizedComptonModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermorePolarizedGammaConversionModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermorePolarizedPhotoElectricModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermorePolarizedRayleighModel.hh (modified) (1 diff)
-
lowenergy/include/G4LivermoreRayleighModel.hh (modified) (1 diff)
-
lowenergy/include/G4LogLogInterpolation.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyBremsstrahlung.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyCompton.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyGammaConversion.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyIonisation.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyPhotoElectric.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyPolarizedCompton.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyPolarizedRayleigh.hh (modified) (1 diff)
-
lowenergy/include/G4LowEnergyRayleigh.hh (modified) (1 diff)
-
lowenergy/include/G4OrlicLiCrossSection.hh (modified) (1 diff)
-
lowenergy/include/G4PaulKCrossSection.hh (modified) (4 diffs)
-
lowenergy/include/G4PenelopeAnnihilationModel.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeBremsstrahlung.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeBremsstrahlungAngular.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeBremsstrahlungContinuous.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeBremsstrahlungModel.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeCompton.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeComptonModel.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeGammaConversion.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeGammaConversionModel.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeIonisation.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeIonisationModel.hh (modified) (4 diffs)
-
lowenergy/include/G4PenelopePhotoElectric.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopePhotoElectricModel.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeRayleigh.hh (modified) (1 diff)
-
lowenergy/include/G4PenelopeRayleighModel.hh (modified) (4 diffs)
-
lowenergy/include/G4RangeNoTest.hh (modified) (1 diff)
-
lowenergy/include/G4RangeTest.hh (modified) (1 diff)
-
lowenergy/include/G4RayleighScattering.hh (modified) (1 diff)
-
lowenergy/include/G4SemiLogInterpolation.hh (modified) (1 diff)
-
lowenergy/include/G4ShellData.hh (modified) (1 diff)
-
lowenergy/include/G4ShellEMDataSet.hh (modified) (1 diff)
-
lowenergy/include/G4VCrossSectionHandler.hh (modified) (1 diff)
-
lowenergy/include/G4VDataSetAlgorithm.hh (modified) (1 diff)
-
lowenergy/include/G4VEMDataSet.hh (modified) (1 diff)
-
lowenergy/include/G4VLowEnergyDiscretePhotonProcess.hh (modified) (1 diff)
-
lowenergy/include/G4VLowEnergyTestableDiscreteProcess.hh (modified) (1 diff)
-
lowenergy/include/G4VRangeTest.hh (modified) (1 diff)
-
lowenergy/include/G4VeLowEnergyLoss.hh (modified) (1 diff)
-
lowenergy/include/G4WaterExcitationStructure.hh (modified) (1 diff)
-
lowenergy/include/G4WaterIonisationStructure.hh (modified) (1 diff)
-
lowenergy/include/G4eBremsstrahlungSpectrum.hh (modified) (1 diff)
-
lowenergy/include/G4eCrossSectionExcitationEmfietzoglou.hh (modified) (1 diff)
-
lowenergy/include/G4eCrossSectionScreenedRutherford.hh (modified) (1 diff)
-
lowenergy/include/G4eIonisationCrossSectionHandler.hh (modified) (1 diff)
-
lowenergy/include/G4eIonisationParameters.hh (modified) (1 diff)
-
lowenergy/include/G4eIonisationSpectrum.hh (modified) (1 diff)
-
lowenergy/include/G4eLowEnergyLoss.hh (modified) (1 diff)
-
lowenergy/include/G4eLowEnergyLoss.icc (modified) (1 diff)
-
lowenergy/include/G4empCrossSection.hh (modified) (1 diff)
-
lowenergy/include/G4hLowEnergyIonisation.hh (modified) (4 diffs)
-
lowenergy/include/G4hLowEnergyLoss.hh (modified) (1 diff)
-
lowenergy/include/G4hLowEnergyLoss.icc (modified) (1 diff)
-
lowenergy/include/G4hShellCrossSectionDoubleExp.hh (modified) (1 diff)
-
lowenergy/include/G4hShellCrossSectionDoubleExpData.hh (modified) (1 diff)
-
lowenergy/include/G4hShellCrossSectionExp.hh (modified) (1 diff)
-
lowenergy/include/G4hShellCrossSectionExpData.hh (modified) (1 diff)
-
lowenergy/include/G4teoCrossSection.hh (modified) (3 diffs)
-
lowenergy/src/G4AtomicDeexcitation.cc (modified) (2 diffs)
-
lowenergy/src/G4AtomicTransitionManager.cc (modified) (1 diff)
-
lowenergy/src/G4AugerTransition.cc (modified) (2 diffs)
-
lowenergy/src/G4BremsstrahlungCrossSectionHandler.cc (modified) (1 diff)
-
lowenergy/src/G4BremsstrahlungParameters.cc (modified) (1 diff)
-
lowenergy/src/G4CompositeEMDataSet.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionChargeDecrease.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionChargeDecreasePartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionChargeIncrease.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionChargeIncreasePartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionChargeTransferCH.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionChargeTransferExp.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionElasticChampion.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionElasticScreenedRutherford.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionElasticScreenedRutherfordHE.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionElasticScreenedRutherfordLE.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionExcitationBorn.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionExcitationBornPartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionExcitationEmfietzoglou.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionExcitationEmfietzoglouPartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionExcitationMillerGreen.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionExcitationMillerGreenPartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionHandler.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionIonisationBorn.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionIonisationBornElectron.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionIonisationBornPartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionIonisationBornPartialElectron.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionIonisationRudd.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionIonisationRuddPartial.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionKill.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionPsCreationChampion.cc (modified) (1 diff)
-
lowenergy/src/G4CrossSectionPsCreationChampionPartial.cc (modified) (1 diff)
-
lowenergy/src/G4DNABornExcitationModel.cc (modified) (10 diffs)
-
lowenergy/src/G4DNABornIonisationModel.cc (modified) (6 diffs)
-
lowenergy/src/G4DNAChampionElasticModel.cc (modified) (17 diffs)
-
lowenergy/src/G4DNAChargeDecrease.cc (modified) (2 diffs)
-
lowenergy/src/G4DNAChargeIncrease.cc (modified) (3 diffs)
-
lowenergy/src/G4DNACrossSectionDataSet.cc (modified) (1 diff)
-
lowenergy/src/G4DNADingfelderChargeDecreaseModel.cc (modified) (7 diffs)
-
lowenergy/src/G4DNADingfelderChargeIncreaseModel.cc (modified) (7 diffs)
-
lowenergy/src/G4DNAElastic.cc (modified) (1 diff)
-
lowenergy/src/G4DNAEmfietzoglouExcitationModel.cc (modified) (7 diffs)
-
lowenergy/src/G4DNAExcitation.cc (modified) (3 diffs)
-
lowenergy/src/G4DNAGenericIonsManager.cc (modified) (1 diff)
-
lowenergy/src/G4DNAIonisation.cc (modified) (1 diff)
-
lowenergy/src/G4DNAMillerGreenExcitationModel.cc (modified) (6 diffs)
-
lowenergy/src/G4DNARuddIonisationModel.cc (modified) (19 diffs)
-
lowenergy/src/G4DNAScreenedRutherfordElasticModel.cc (modified) (4 diffs)
-
lowenergy/src/G4DopplerProfile.cc (modified) (1 diff)
-
lowenergy/src/G4DummyFinalState.cc (modified) (1 diff)
-
lowenergy/src/G4EMDataSet.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateChargeDecrease.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateChargeIncrease.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateChargeTransferProton.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateElasticBrennerZaider.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateElasticChampion.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateElasticScreenedRutherford.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateExcitationBorn.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateExcitationEmfietzoglou.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateExcitationMillerGreen.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateIonisationBorn.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateIonisationRudd.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateKill.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStateProduct.cc (modified) (1 diff)
-
lowenergy/src/G4FinalStatePsCreationChampion.cc (modified) (1 diff)
-
lowenergy/src/G4FluoTransition.cc (modified) (1 diff)
-
lowenergy/src/G4LinInterpolation.cc (modified) (1 diff)
-
lowenergy/src/G4LivermoreBremsstrahlungModel.cc (modified) (1 diff)
-
lowenergy/src/G4LivermoreComptonModel.cc (modified) (1 diff)
-
lowenergy/src/G4LivermoreGammaConversionModel.cc (modified) (1 diff)
-
lowenergy/src/G4LivermoreIonisationModel.cc (modified) (2 diffs)
-
lowenergy/src/G4LivermorePhotoElectricModel.cc (modified) (6 diffs)
-
lowenergy/src/G4LivermorePolarizedComptonModel.cc (modified) (1 diff)
-
lowenergy/src/G4LivermorePolarizedRayleighModel.cc (modified) (1 diff)
-
lowenergy/src/G4LivermoreRayleighModel.cc (modified) (1 diff)
-
lowenergy/src/G4LogLogInterpolation.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyBremsstrahlung.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyCompton.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyGammaConversion.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyIonisation.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyPhotoElectric.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyPolarizedCompton.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyPolarizedRayleigh.cc (modified) (1 diff)
-
lowenergy/src/G4LowEnergyRayleigh.cc (modified) (1 diff)
-
lowenergy/src/G4OrlicLiCrossSection.cc (modified) (5 diffs)
-
lowenergy/src/G4PaulKCrossSection.cc (modified) (2 diffs)
-
lowenergy/src/G4PenelopeAnnihilationModel.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeBremsstrahlung.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeBremsstrahlungAngular.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeBremsstrahlungModel.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeCompton.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeComptonModel.cc (modified) (3 diffs)
-
lowenergy/src/G4PenelopeGammaConversionModel.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeIonisation.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeIonisationModel.cc (modified) (8 diffs)
-
lowenergy/src/G4PenelopePhotoElectric.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopePhotoElectricModel.cc (modified) (6 diffs)
-
lowenergy/src/G4PenelopeRayleigh.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeRayleighModel.cc (modified) (5 diffs)
-
lowenergy/src/G4RangeTest.cc (modified) (1 diff)
-
lowenergy/src/G4RayleighScattering.cc (modified) (1 diff)
-
lowenergy/src/G4SemiLogInterpolation.cc (modified) (1 diff)
-
lowenergy/src/G4ShellData.cc (modified) (1 diff)
-
lowenergy/src/G4ShellEMDataSet.cc (modified) (1 diff)
-
lowenergy/src/G4VCrossSectionHandler.cc (modified) (1 diff)
-
lowenergy/src/G4VLowEnergyDiscretePhotonProcess.cc (modified) (1 diff)
-
lowenergy/src/G4VeLowEnergyLoss.cc (modified) (1 diff)
-
lowenergy/src/G4VhShellCrossSection.cc (modified) (1 diff)
-
lowenergy/src/G4WaterExcitationStructure.cc (modified) (1 diff)
-
lowenergy/src/G4WaterIonisationStructure.cc (modified) (1 diff)
-
lowenergy/src/G4eBremsstrahlungSpectrum.cc (modified) (1 diff)
-
lowenergy/src/G4eCrossSectionExcitationEmfietzoglou.cc (modified) (1 diff)
-
lowenergy/src/G4eCrossSectionScreenedRutherford.cc (modified) (1 diff)
-
lowenergy/src/G4eIonisationCrossSectionHandler.cc (modified) (1 diff)
-
lowenergy/src/G4eIonisationParameters.cc (modified) (1 diff)
-
lowenergy/src/G4eIonisationSpectrum.cc (modified) (1 diff)
-
lowenergy/src/G4eLowEnergyLoss.cc (modified) (1 diff)
-
lowenergy/src/G4empCrossSection.cc (modified) (1 diff)
-
lowenergy/src/G4hLowEnergyIonisation.cc (modified) (8 diffs)
-
lowenergy/src/G4hLowEnergyLoss.cc (modified) (1 diff)
-
lowenergy/src/G4hShellCrossSectionDoubleExp.cc (modified) (2 diffs)
-
lowenergy/src/G4hShellCrossSectionDoubleExpData.cc (modified) (1 diff)
-
lowenergy/src/G4hShellCrossSectionExp.cc (modified) (1 diff)
-
lowenergy/src/G4hShellCrossSectionExpData.cc (modified) (1 diff)
-
lowenergy/src/G4teoCrossSection.cc (modified) (3 diffs)
-
muons/History (modified) (2 diffs)
-
muons/src/G4MuIonisation.cc (modified) (3 diffs)
-
muons/src/G4MuPairProductionModel.cc (modified) (8 diffs)
-
muons/test/muEnergyLossTest.cc (modified) (1 diff)
-
standard/History (modified) (2 diffs)
-
standard/include/G4ASTARStopping.hh (modified) (4 diffs)
-
standard/include/G4BetheBlochModel.hh (modified) (5 diffs)
-
standard/include/G4BraggModel.hh (modified) (4 diffs)
-
standard/include/G4CoulombScattering.hh (modified) (3 diffs)
-
standard/include/G4CoulombScatteringModel.hh (modified) (2 diffs)
-
standard/include/G4GoudsmitSaundersonMscModel.hh (modified) (7 diffs)
-
standard/include/G4GoudsmitSaundersonTable.hh (modified) (1 diff)
-
standard/include/G4PSTARStopping.hh (modified) (3 diffs)
-
standard/include/G4UrbanMscModel93.hh (modified) (1 diff)
-
standard/include/G4WaterStopping.hh (modified) (2 diffs)
-
standard/include/G4WentzelVIModel.hh (modified) (8 diffs)
-
standard/include/G4eCoulombScatteringModel.hh (modified) (9 diffs)
-
standard/include/G4hIonisation.hh (modified) (4 diffs)
-
standard/src/G4ASTARStopping.cc (modified) (7 diffs)
-
standard/src/G4BetheBlochModel.cc (modified) (7 diffs)
-
standard/src/G4BraggModel.cc (modified) (12 diffs)
-
standard/src/G4CoulombScattering.cc (modified) (7 diffs)
-
standard/src/G4CoulombScatteringModel.cc (modified) (5 diffs)
-
standard/src/G4GoudsmitSaundersonMscModel.cc (modified) (22 diffs)
-
standard/src/G4GoudsmitSaundersonTable.cc (modified) (4 diffs)
-
standard/src/G4MollerBhabhaModel.cc (modified) (2 diffs)
-
standard/src/G4PAIModel.cc (modified) (3 diffs)
-
standard/src/G4PAIPhotonModel.cc (modified) (2 diffs)
-
standard/src/G4PSTARStopping.cc (modified) (8 diffs)
-
standard/src/G4UrbanMscModel93.cc (modified) (7 diffs)
-
standard/src/G4WaterStopping.cc (modified) (7 diffs)
-
standard/src/G4WentzelVIModel.cc (modified) (19 diffs)
-
standard/src/G4eBremsstrahlungModel.cc (modified) (3 diffs)
-
standard/src/G4eBremsstrahlungRelModel.cc (modified) (2 diffs)
-
standard/src/G4eCoulombScatteringModel.cc (modified) (12 diffs)
-
standard/src/G4eMultipleScattering.cc (modified) (4 diffs)
-
standard/src/G4hIonisation.cc (modified) (9 diffs)
-
standard/src/G4hMultipleScattering.cc (modified) (3 diffs)
-
standard/test/BremLPMTest.cc (modified) (1 diff)
-
standard/test/CrossSectionStd.cc (modified) (1 diff)
-
standard/test/CrossSectionV52.cc (modified) (1 diff)
-
standard/test/G4InitXscPAItest.cc (modified) (1 diff)
-
standard/test/G4PAIdNdxTest.cc (modified) (1 diff)
-
standard/test/G4PAIxSectionTest.cc (modified) (4 diffs)
-
standard/test/PAIenergyLossTest.cc (modified) (1 diff)
-
standard/test/readBremLPM.py (modified) (1 diff)
-
standard/test/test90Ne10CO2pai.cc (modified) (13 diffs)
-
utils/History (modified) (2 diffs)
-
utils/include/G4EmCalculator.hh (modified) (3 diffs)
-
utils/include/G4EmConfigurator.hh (modified) (4 diffs)
-
utils/include/G4EmCorrections.hh (modified) (4 diffs)
-
utils/include/G4LossTableManager.hh (modified) (23 diffs)
-
utils/include/G4VAtomDeexcitation.hh (modified) (4 diffs)
-
utils/include/G4VEmModel.hh (modified) (14 diffs)
-
utils/include/G4VEmProcess.hh (modified) (12 diffs)
-
utils/include/G4VEnergyLossProcess.hh (modified) (12 diffs)
-
utils/include/G4VMultipleScattering.hh (modified) (6 diffs)
-
utils/src/G4EmCalculator.cc (modified) (23 diffs)
-
utils/src/G4EmConfigurator.cc (modified) (6 diffs)
-
utils/src/G4EmCorrections.cc (modified) (15 diffs)
-
utils/src/G4EmElementSelector.cc (modified) (7 diffs)
-
utils/src/G4EmModelManager.cc (modified) (5 diffs)
-
utils/src/G4EmProcessOptions.cc (modified) (6 diffs)
-
utils/src/G4LossTableManager.cc (modified) (41 diffs)
-
utils/src/G4VEmModel.cc (modified) (7 diffs)
-
utils/src/G4VEmProcess.cc (modified) (21 diffs)
-
utils/src/G4VEnergyLossProcess.cc (modified) (41 diffs)
-
utils/src/G4VMscModel.cc (modified) (2 diffs)
-
utils/src/G4VMultipleScattering.cc (modified) (9 diffs)
-
utils/test/testG4EnergyLossTables.cc (modified) (1 diff)
-
xrays/History (modified) (2 diffs)
-
xrays/include/G4Scintillation.hh (modified) (6 diffs)
-
xrays/src/G4Scintillation.cc (modified) (10 diffs)
-
xrays/test/testG4ForwardXrayTR.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/adjoint/History
r1228 r1315 1 $Id: History,v 1. 5 2009/11/23 09:02:35 gcosmoExp $1 $Id: History,v 1.6 2010/04/12 18:57:15 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 12 Apr 2010: V.Ivanchenko (emadjoint-V09-03-00) 21 - G4AdjointhMultipleScattering - removed obsolete unused header 22 20 23 23 Nov 2009: G.Cosmo (emadjoint-V09-02-02) 21 24 - Corrected compilation error on Windows for G4AdjointAlongStepWeightCorrection. -
trunk/source/processes/electromagnetic/adjoint/src/G4AdjointhMultipleScattering.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4AdjointhMultipleScattering.cc,v 1. 2 2009/11/20 10:31:20 ldesorgh Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4AdjointhMultipleScattering.cc,v 1.3 2010/04/12 18:57:15 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 43 43 44 44 #include "G4AdjointhMultipleScattering.hh" 45 #include "G4UrbanMscModel.hh"46 45 #include "G4UrbanMscModel90.hh" 47 46 #include "G4MscStepLimitType.hh" -
trunk/source/processes/electromagnetic/highenergy/History
r1196 r1315 1 $Id: History,v 1.3 4 2009/11/11 17:13:47vnivanch Exp $1 $Id: History,v 1.36 2010/06/04 10:23:31 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 04 March 10: V.Ivanchenko (emhighenergy-V09-03-01) 21 - G4ICRU73NoDeltaModel - new model derived from G4ICRU73QOModel 22 23 28 March 10: V.Ivanchenko (emhighenergy-V09-03-00) 24 - G4mplIonisation - fixed IsApplicable method - always "true" 25 (CMS report crash in the case when several types 26 of monopoles are instantiated) 19 27 20 28 11 November 09: V.Ivanchenko (emhighenergy-V09-02-03) -
trunk/source/processes/electromagnetic/highenergy/src/G4hhIonisation.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hhIonisation.cc,v 1. 9 2009/02/20 16:38:33vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4hhIonisation.cc,v 1.10 2010/06/04 10:23:31 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 51 51 #include "G4BraggNoDeltaModel.hh" 52 52 #include "G4BetheBlochNoDeltaModel.hh" 53 #include "G4ICRU73NoDeltaModel.hh" 53 54 #include "G4UniversalFluctuation.hh" 54 55 #include "G4BohrFluctuations.hh" … … 110 111 SetBaseParticle(0); 111 112 SetSecondaryParticle(G4Electron::Electron()); 113 //G4double q = theParticle->GetPDGCharge(); 112 114 mass = theParticle->GetPDGMass(); 113 115 ratio = electron_mass_c2/mass; … … 120 122 121 123 if(eth > minKinEnergy) { 122 G4VEmModel* em = new G4BraggNoDeltaModel(); 124 G4VEmModel* em; 125 em = new G4BraggNoDeltaModel(); 126 //if(q > 0.0) { em = new G4BraggNoDeltaModel(); } 127 //else { em = new G4ICRU73NoDeltaModel(); } 123 128 em->SetLowEnergyLimit(minKinEnergy); 124 129 em->SetHighEnergyLimit(eth); 125 130 AddEmModel(nm, em, flucModel); 126 nm++;131 ++nm; 127 132 } 128 133 -
trunk/source/processes/electromagnetic/highenergy/src/G4mplIonisation.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4mplIonisation.cc,v 1. 8 2009/02/20 16:38:33vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4mplIonisation.cc,v 1.10 2010/03/28 16:45:38 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 76 77 G4bool G4mplIonisation::IsApplicable(const G4ParticleDefinition& p)77 G4bool G4mplIonisation::IsApplicable(const G4ParticleDefinition&) 78 78 { 79 return (p.GetParticleName() == "monopole");79 return true; 80 80 } 81 81 -
trunk/source/processes/electromagnetic/lowenergy/History
r1228 r1315 1 $Id: History,v 1.4 07 2009/12/10 12:26:05sincerti Exp $1 $Id: History,v 1.438 2010/06/08 21:50:00 sincerti Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 08.06.2010, S. Incerti, tag emlowen-V09-03-31 21 modified initialisation of e- Emfietzoglou excitation 22 model in G4DNAEmfietzoglouExcitationModel.cc and 23 in G4DNAMillerGreenExcitationModel.cc 24 25 07.06.2010, A.Mantero, tag emlowen-V09-03-30 26 added analytical (ecpssr) and empirical (Paul and Orlic) 27 models for the calculation of hadronc shell ionisation CS 28 29 29.04.2010, L. Pandola, tag emlowen-V09-03-29 30 Removed the compiler warning in G4PenelopeIonisationModel.cc which 31 caused the rejection of emlowen-V09-03-28 32 33 23.04.2010, L. Pandola, tag emlowen-V09-03-28 34 Removed useless call in G4PenelopeIonisationModel which triggered fake 35 warning messages 36 37 15.04.2010, L. Pandola, tag emlowen-V09-03-27 38 Added MinEnergyCut() method to G4PenelopeIonisationModel. Small (minor) 39 changes to other G4Penelope models (mainly clean-up) 40 41 08.04.2010, S. Incerti, tag emlowen-V09-03-26 42 Changed computation of scattering angle in G4DNAChampionElasticModel.cc 43 G4EMLOW 6.12 version needed 44 45 07.04.2010, S. Incerti, tag emlowen-V09-03-25 46 Fixed memory leak in G4DNARuddIonisationModel.cc 47 48 06.04.2010, S. Incerti, tag emlowen-V09-03-24 49 Replaced hard coded masses in G4DNADingfelderCharge*.cc 50 51 31.03.2010, L. Pandola, tag emlowen-V09-03-23 52 Removed G4cout's used for debugging in G4Penelope08ComptonModel and 53 G4Penelope08PhotoElectricModel 54 55 27.03.2010, S. Incerti, tag emlowen-V09-03-22 56 Modified G4DNABornIonisationModel.hh 57 58 27.03.2010, S. Incerti, tag emlowen-V09-03-21 59 Modified method declaration in G4DNABornExcitation.hh 60 61 27.03.2010, S. Incerti, tag emlowen-V09-03-20 62 Added new excitation model for electrons in G4DNABornExcitationModel 63 64 26.03.2010, S. Incerti, tag emlowen-V09-03-19 65 Modified electron correction in G4DNAMillerGreenExcitation.cc 66 67 26.03.2010, S. Incerti, tag emlowen-V09-03-18 68 Extended range of search for maximum of DCS in G4DNARuddIonisationModel.cc 69 70 26.03.2010, S. Incerti, tag emlowen-V09-03-17 71 Changed default parameters of G4DNAEmfietzoglouExcitationModel.hh 72 73 26.03.2010, tag emlowen-V09-03-16 74 - S. Incerti : corrected G4DNABornIonisationModel.cc class 75 for maximum kinetic energy transfer 76 - A. Mantero: fixed bugs in G4AtomicDeexcitation.cc, G4AugerTransition.cc 77 78 26.03.2010, L. Pandola, tag emlowen-V09-03-15 79 Changed order in some models' constructor to get rid of a valgrind 80 warning (conditional jump or move depends on unitialized value(s)). 81 82 25.03.2010, S. Incerti, tag emlowen-V09-03-14 83 Modified hydrogen correction in G4DNARuddIonisation.cc 84 85 25.03.2010, S. Incerti, tag emlowen-V09-03-13 86 Dummy tag 87 88 18.03.2010, S. Incerti, tag emlowen-V09-03-12 89 - Re-added vapor water shell constants to G4DNARuddIonisationModel.cc 90 as suggested by Ziad. 91 92 18.03.2010, S. Incerti, tag emlowen-V09-03-11 93 Extended low energy cover of G4DNA charge change processes 94 95 17.03.2010, L. Pandola, tag emlowen-V09-03-10 96 Added four new models (gamma ray models Compton, GammaConversion, 97 PhotoElectric, Rayleigh), upgrades of G4Penelope from version2001 to 98 version 2008. For now, 2008 models named as G4Penelope08xxxxModel 99 ** to be used with G4LEDATA version 6.10 ** 100 101 16.03.2010, L. Pandola, tag emlowen-V09-03-09 102 Modified public interface of G4PenelopeOscillatorManager (info to be used for 103 PenelopeIonisation) 104 105 15.03.2010, S. Incerti, tag emlowen-V09-03-08 106 Modified electron correction in G4DNARuddIonisationModel.cc 107 108 15.03.2010, L. Pandola tag emlowen-V09-03-07 109 Updated public interface of G4LivermorePhotoElectricModel. Removed 110 possibility to use custom cuts for fluorescence/Auger. Main cuts from 111 G4ProductionCutsTable are always used - for consistency. 112 113 15.03.2010, L. Pandola tag emlowen-V09-03-06 114 Clean-up in Penelope models (explicitely set Auger flag to false in 115 constructor) 116 117 19.02.2010, L. Pandola tag emlowen-V09-03-05 118 Modification in calculations made by G4PenelopeOscillatorManager (Hartree 119 factors for Penelope Compton Scattering) 120 121 17.02.2010, L. Pandola tag emlowen-V09-03-04 122 Updated interface for G4PenelopeOscillatorManager. Still *beta* 123 124 05.02.2010, S. Incerti, tag emlowen-V09-03-03 125 Added initialisation to atomTotalCrossSection in G4hShellCrossSectionDoubleExp.cc. 126 127 07.01.2010, S. Incerti, tag emlowen-V09-03-02 128 Improved way of testing material in Geant4-DNA models. 129 130 21.12.2009, L. Pandola, tag emlowen-V09-03-01 131 Added classes G4PenelopeOscillator* to manage multi-element atomic oscillators used 132 in Penelope Compton and Ionisation models. Already compliant with Penelope2008. 133 **Beta version at the moment** 134 135 21.12.2009, L. Pandola, tag emlowen-V09-03-00 136 Added a dummy ComputeCrossSectionPerAtom() method in G4PenelopeRayleighModel. 137 Never inkoved by tracking, issues a warning if users access it via G4EmCalculator. 19 138 20 139 10.12.2009, S. Incerti, tag emlowen-V09-02-68 -
trunk/source/processes/electromagnetic/lowenergy/include/G4AtomicDeexcitation.hh
r1228 r1315 26 26 // 27 27 // $Id: G4AtomicTransitionManager.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4AtomicTransitionManager.hh
r1228 r1315 26 26 // 27 27 // $Id: G4AtomicTransitionManager.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4AugerData.hh
r1228 r1315 25 25 // 26 26 // $Id: G4AugerData.hh 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4BremsstrahlungParameters.hh
r1228 r1315 26 26 // 27 27 // $Id: G4BremsstrahlungParameters.hh,v 1.10 2006/06/29 19:33:06 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CompositeEMDataSet.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CompositeEMDataSet.hh,v 1.13 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeDecrease.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeDecrease.hh,v 1.2 2008/07/14 20:47:32 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEDECREASE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeDecreasePartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeDecreasePartial.hh,v 1.2 2008/07/14 20:47:32 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEDECREASEPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeIncrease.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeIncrease.hh,v 1.2 2008/07/14 20:47:33 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEIncrease_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeIncreasePartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeIncreasePartial.hh,v 1.2 2008/07/14 20:47:33 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEIncreasePARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeTransferCH.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionChargeTransferCH.hh,v 1.3 2008/03/25 16:00:20 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeTransferExp.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionChargeTransferExp.hh,v 1.2 2008/03/25 16:00:20 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticChampion.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionElasticChampion.hh,v 1.1 2008/07/15 19:56:50 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticScreenedRutherford.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionElasticScreenedRutherford.hh,v 1.1 2007/10/12 23:07:10 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticScreenedRutherfordHE.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionElasticScreenedRutherfordHE.hh,v 1.1 2008/06/27 20:09:54 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONELASTICSCREENEDRUTHERFORDHE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticScreenedRutherfordLE.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionElasticScreenedRutherfordLE.hh,v 1.2 2008/07/14 20:47:33 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONELASTICSCREENEDRUTHERFORDLE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationBorn.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationBorn.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationBornPartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationBornPartial.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONBORNPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationEmfietzoglou.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationEmfietzoglou.hh,v 1.3 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONEMFIETZOGLOU_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationEmfietzoglouPartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationEmfietzoglouPartial.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONEMFIETZOGLOUPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationMillerGreenPartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationMillerGreenPartial.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONMILLERGREENPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionHandler.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionHandler.hh,v 1.9 2006/06/29 19:33:10 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBorn.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionIonisationBorn.hh,v 1.3 2008/12/18 13:01:22 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 30 30 #ifndef G4CROSSSECTIONIONISATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBornElectron.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionIonisationBornElectron.hh,v 1.1 2007/10/15 08:33:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBornPartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationBornPartial.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONIONISATIONBORNPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBornPartialElectron.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionIonisationBornPartialElectron.hh,v 1.1 2007/10/15 08:33:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationRudd.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationRudd.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONIONISATIONRUDD_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationRuddPartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationRuddPartial.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4CROSSSECTIONIONISATIONRuddPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionKill.hh
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionKill.hh,v 1.1 2007/11/09 20:26:47 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionPsCreationChampion.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionPsCreationChampion.hh,v 1.1 2008/07/16 19:01:07 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionPsCreationChampionPartial.hh
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionPsCreationChampionPartial.hh,v 1.1 2008/07/16 19:01:07 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNABornExcitationModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNABornExcitationModel.hh,v 1. 1 2009/01/12 14:26:02sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNABornExcitationModel.hh,v 1.4 2010/03/27 12:46:51 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 37 37 #include "G4DNACrossSectionDataSet.hh" 38 38 #include "G4LogLogInterpolation.hh" 39 #include "G4Electron.hh" 39 40 #include "G4Proton.hh" 40 41 #include "G4WaterExcitationStructure.hh" … … 50 51 virtual ~G4DNABornExcitationModel(); 51 52 52 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& );53 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()) ); 53 54 54 55 virtual G4double CrossSectionPerVolume(const G4Material* material, … … 70 71 private: 71 72 72 G4double lowEnergyLimit; 73 G4double highEnergyLimit; 73 std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit; 74 std::map<G4String,G4double,std::less<G4String> > highEnergyLimit; 75 74 76 G4bool isInitialised; 75 77 G4int verboseLevel; … … 77 79 // Cross section 78 80 79 G4DNACrossSectionDataSet* table; 81 typedef std::map<G4String,G4String,std::less<G4String> > MapFile; 82 MapFile tableFile; 83 84 typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData; 85 MapData tableData; 80 86 81 87 // Partial cross section 82 88 83 G4int RandomSelect(G4double energy );89 G4int RandomSelect(G4double energy,const G4String& particle ); 84 90 85 91 // Final state … … 87 93 G4WaterExcitationStructure waterStructure; 88 94 89 // Test water material90 91 G4bool flagMaterialIsWater;92 G4double densityWater;93 94 95 // 95 96 96 97 G4DNABornExcitationModel & operator=(const G4DNABornExcitationModel &right); 97 98 G4DNABornExcitationModel(const G4DNABornExcitationModel&); -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNABornIonisationModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNABornIonisationModel.hh,v 1. 3 2009/06/26 10:15:19 manteroExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNABornIonisationModel.hh,v 1.5 2010/03/28 18:33:19 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 55 55 virtual ~G4DNABornIonisationModel(); 56 56 57 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& );57 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector())); 58 58 59 59 virtual G4double CrossSectionPerVolume( const G4Material* material, … … 68 68 G4double tmin, 69 69 G4double maxEnergy); 70 71 double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell); 70 72 71 73 protected: … … 98 100 outgoingParticleEnergy, G4double & cosTheta, G4double & phi ); 99 101 100 double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);101 102 102 G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2); 103 103 … … 129 129 G4int RandomSelect(G4double energy,const G4String& particle ); 130 130 131 // Test water material132 133 G4bool flagMaterialIsWater;134 G4double densityWater;135 136 131 // 137 132 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAChampionElasticModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAChampionElasticModel.hh,v 1. 1 2009/01/12 14:26:02sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAChampionElasticModel.hh,v 1.3 2010/04/08 17:30:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 45 45 46 46 G4DNAChampionElasticModel(const G4ParticleDefinition* p = 0, 47 const G4String& nam = "DNAChampionElasticModel");47 const G4String& nam = "DNAChampionElasticModel"); 48 48 49 49 virtual ~G4DNAChampionElasticModel(); … … 52 52 53 53 virtual G4double CrossSectionPerVolume(const G4Material* material, 54 const G4ParticleDefinition* p,55 G4double ekin,56 G4double emin,57 G4double emax);54 const G4ParticleDefinition* p, 55 G4double ekin, 56 G4double emin, 57 G4double emax); 58 58 59 59 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 86 86 // Final state 87 87 88 G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double theta);88 //G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double theta); 89 89 90 G4double Theta(G4ParticleDefinition * aParticleDefinition, G4double k, G4double integrDiff); 91 92 G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2); 93 94 G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2); 95 90 96 G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2); 91 92 G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);93 97 94 98 G4double QuadInterpolator(G4double e11, … … 115 119 G4double RandomizeCosTheta(G4double k); 116 120 117 // Test water material118 119 G4bool flagMaterialIsWater;120 G4double densityWater;121 122 121 // 123 122 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAChargeDecrease.hh
r1228 r1315 25 25 // 26 26 // $Id: G4DNAChargeDecrease.hh,v 1.2 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAChargeIncrease.hh
r1228 r1315 25 25 // 26 26 // $Id: G4DNAChargeIncrease.hh,v 1.2 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNACrossSectionDataSet.hh
r1228 r1315 26 26 // 27 27 // $Id: G4DNACrossSectionDataSet.hh,v 1.7 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Riccardo Capra <capra@ge.infn.it> -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNADingfelderChargeDecreaseModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNADingfelderChargeDecreaseModel.hh,v 1. 1 2009/01/12 14:26:02sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNADingfelderChargeDecreaseModel.hh,v 1.2 2010/01/07 18:10:19 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 104 104 G4double OutgoingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition, G4int finalStateIndex); 105 105 106 // Test water material107 108 G4bool flagMaterialIsWater;109 G4double densityWater;110 111 106 // 112 107 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNADingfelderChargeIncreaseModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNADingfelderChargeIncreaseModel.hh,v 1. 1 2009/01/12 14:26:02sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNADingfelderChargeIncreaseModel.hh,v 1.2 2010/01/07 18:10:19 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 107 107 G4double IncomingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition, G4int finalStateIndex); 108 108 109 // Test water material110 111 G4bool flagMaterialIsWater;112 G4double densityWater;113 114 109 // 115 110 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAElastic.hh
r1228 r1315 25 25 // 26 26 // $Id: G4DNAElastic.hh,v 1.2 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAEmfietzoglouExcitationModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAEmfietzoglouExcitationModel.hh,v 1. 1 2009/01/12 14:26:02sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAEmfietzoglouExcitationModel.hh,v 1.3 2010/03/26 19:52:44 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 50 50 virtual ~G4DNAEmfietzoglouExcitationModel(); 51 51 52 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& );52 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()) ); 53 53 54 54 virtual G4double CrossSectionPerVolume(const G4Material* material, … … 89 89 G4WaterExcitationStructure waterExcitation; 90 90 91 // Test water material92 93 G4bool flagMaterialIsWater;94 G4double densityWater;95 96 91 // 97 92 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAExcitation.hh
r1228 r1315 25 25 // 26 26 // $Id: G4DNAExcitation.hh,v 1.2 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAGenericIonsManager.hh
r1228 r1315 26 26 // 27 27 // $Id: G4DNAGenericIonsManager.hh,v 1.4 2009/06/10 13:32:58 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 30 30 #ifndef G4DNAGENERICIONSMANAGER_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAIonisation.hh
r1228 r1315 25 25 // 26 26 // $Id: G4DNAIonisation.hh,v 1.3 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAMillerGreenExcitationModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAMillerGreenExcitationModel.hh,v 1. 1 2009/01/12 14:26:03sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAMillerGreenExcitationModel.hh,v 1.2 2010/01/07 18:10:19 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 115 115 G4double sCoefficient[3][4]; 116 116 117 // Final state118 119 // Test water material120 121 G4bool flagMaterialIsWater;122 G4double densityWater;123 124 117 // 125 118 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAProcess.hh
r1228 r1315 26 26 // 27 27 // $Id: G4DNAProcess.hh,v 1.5 2007/11/09 16:20:04 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAProcess.icc
r1228 r1315 26 26 // 27 27 // $Id: G4DNAProcess.icc,v 1.12 2009/01/20 07:50:28 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNARuddIonisationModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNARuddIonisationModel.hh,v 1. 3 2009/06/26 09:42:32 manteroExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNARuddIonisationModel.hh,v 1.4 2010/01/07 18:10:19 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 148 148 G4int RandomSelect(G4double energy,const G4String& particle ); 149 149 150 // Test water material151 152 G4bool flagMaterialIsWater;153 G4double densityWater;154 155 150 // 156 151 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAScreenedRutherfordElasticModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAScreenedRutherfordElasticModel.hh,v 1. 1 2009/01/12 14:26:03sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAScreenedRutherfordElasticModel.hh,v 1.2 2010/01/07 18:10:19 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 93 93 G4double ScreenedRutherfordRandomizeCosTheta(G4double k, G4double z); 94 94 95 // Test water material96 97 G4bool flagMaterialIsWater;98 G4double densityWater;99 100 95 // 101 96 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DopplerProfile.hh
r1228 r1315 26 26 // 27 27 // $Id: G4DopplerProfile.hh,v 1.2 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4DummyFinalState.hh
r1228 r1315 26 26 // 27 27 // $Id: G4DummyFinalState.hh,v 1.2 2007/10/07 12:52:18 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4EMDataSet.hh
r1228 r1315 26 26 // 27 27 // $Id: G4EMDataSet.hh,v 1.13 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateChargeDecrease.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateChargeDecrease.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATECHARGEDECREASE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateChargeIncrease.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateChargeIncrease.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATECHARGEIncrease_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateChargeTransferProton.hh
r1228 r1315 26 26 // 27 27 // $Id: G4FinalStateChargeTransferProton.hh,v 1.2 2008/03/25 16:00:20 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateElasticBrennerZaider.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateElasticBrennerZaider.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATEELASTICBRENNERZAIDER_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateElasticChampion.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateElasticChampion.hh,v 1.1 2008/07/15 19:56:50 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateElasticScreenedRutherford.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateElasticScreenedRutherford.hh,v 1.3 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATEELASTICSCREENEDRUTHERFORD_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateExcitationBorn.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateExcitationBorn.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATEEXCITATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateExcitationEmfietzoglou.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateExcitationEmfietzoglou.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATEEXCITATIONEMFIETZOGLOU_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateExcitationMillerGreen.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateExcitationMillerGreen.hh,v 1.2 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATEEXCITATIONMILLERGREEN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateIonisationBorn.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateIonisationBorn.hh,v 1.4 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4FINALSTATEIONISATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateIonisationRudd.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateIonisationRudd.hh,v 1.4 2008/07/14 20:47:34 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateKill.hh
r1228 r1315 26 26 // 27 27 // $Id: G4FinalStateKill.hh,v 1.1 2007/11/09 20:26:47 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateProduct.hh
r1228 r1315 26 26 // 27 27 // $Id: G4FinalStateProduct.hh,v 1.5 2009/01/20 07:50:28 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStatePsCreationChampion.hh
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStatePsCreationChampion.hh,v 1.1 2008/07/16 19:01:07 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4FluoTransition.hh
r1228 r1315 26 26 // 27 27 // $Id: G4FluoTransition.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4LinInterpolation.hh
r1228 r1315 26 26 // 27 27 // $Id: G4LinInterpolation.hh,v 1.4 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreBremsstrahlungModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreBremsstrahlungModel.hh,v 1.2 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreComptonModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreComptonModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreGammaConversionModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreGammaConversionModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreIonisationModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreIonisationModel.hh,v 1.3 2009/10/23 09:28:37 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePhotoElectricModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePhotoElectricModel.hh,v 1. 3 2009/04/17 10:29:20 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4LivermorePhotoElectricModel.hh,v 1.4 2010/03/15 09:02:29 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 // 15-Mar-2010 L. Pandola, removed methods to set explicitely fluorescence cuts. 30 // Main cuts from G4ProductionCutsTable are always used 31 // 32 29 33 30 34 #ifndef G4LivermorePhotoElectricModel_h … … 76 80 G4double maxEnergy); 77 81 78 void SetCutForLowEnSecPhotons(G4double);79 80 void SetCutForLowEnSecElectrons(G4double);81 82 82 void ActivateAuger(G4bool); 83 83 … … 89 89 90 90 G4ParticleChangeForGamma* fParticleChange; 91 /* 92 G4double GetMeanFreePath(const G4Track& aTrack, 93 G4double previousStepSize, 94 G4ForceCondition* condition); 95 */ 91 92 96 93 private: 97 94 … … 106 103 G4VCrossSectionHandler* crossSectionHandler; 107 104 G4VCrossSectionHandler* shellCrossSectionHandler; 108 109 G4double cutForLowEnergySecondaryPhotons;110 G4double cutForLowEnergySecondaryElectrons;111 105 112 106 G4AtomicDeexcitation deexcitationManager; -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePolarizedComptonModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermorePolarizedComptonModel.hh,v 1.3 2009/05/02 15:20:52 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePolarizedGammaConversionModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermorePolarizedGammaConversionModel.hh,v 1.1 2009/10/30 14:52:05 flongo Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePolarizedPhotoElectricModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermorePolarizedPhotoElectricModel.hh,v 1.1 2009/10/30 14:52:05 flongo Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePolarizedRayleighModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermorePolarizedRayleighModel.hh,v 1.3 2009/05/02 15:20:52 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreRayleighModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreRayleighModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LogLogInterpolation.hh
r1228 r1315 26 26 // 27 27 // $Id: G4LogLogInterpolation.hh,v 1.7 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyBremsstrahlung.hh
r1228 r1315 27 27 // ------------------------------------------------------------------- 28 28 // $Id: G4LowEnergyBremsstrahlung.hh,v 1.37 2006/06/29 19:35:55 gunter Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyCompton.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LowEnergyCompton.hh,v 1.24 2008/11/04 10:14:00 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyGammaConversion.hh
r1228 r1315 26 26 // 27 27 // $Id: G4LowEnergyGammaConversion.hh,v 1.15 2006/06/29 19:35:59 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyIonisation.hh
r1228 r1315 26 26 // ------------------------------------------------------------------- 27 27 // $Id: G4LowEnergyIonisation.hh,v 1.41 2006/06/29 19:36:01 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPhotoElectric.hh
r1228 r1315 26 26 // 27 27 // $Id: G4LowEnergyPhotoElectric.hh,v 1.28 2006/06/29 19:36:03 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPolarizedCompton.hh
r1228 r1315 26 26 // 27 27 // $Id: G4LowEnergyPolarizedCompton.hh,v 1.10 2008/05/02 13:04:41 flongo Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPolarizedRayleigh.hh
r1228 r1315 25 25 // 26 26 // $Id: G4LowEnergyPolarizedRayleigh.hh,v 1.5 2006/06/29 19:36:07 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyRayleigh.hh
r1228 r1315 26 26 // 27 27 // $Id: G4LowEnergyRayleigh.hh,v 1.16 2006/06/29 19:36:09 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/lowenergy/include/G4OrlicLiCrossSection.hh
r1197 r1315 25 25 // 26 26 // $Id: G4OrlicLiCrossSection.hh,v 1.2 2009/06/11 15:46:18 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Haifa Ben Abdelouahed -
trunk/source/processes/electromagnetic/lowenergy/include/G4PaulKCrossSection.hh
r1228 r1315 25 25 // 26 26 // 27 // History: 28 // ----------- 29 // 21 Apr 2008 H. Abdelohauwed - 1st implementation 30 // 29 Apr 2009 ALF Major Design Revision 31 // 32 // ------------------------------------------------------------------- 33 34 // Class description: 35 // Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell 36 // Further documentation available from http://www.ge.infn.it/geant4/lowE 37 38 // ------------------------------------------------------------------- 27 39 28 40 … … 30 42 #define G4PAULKCROSSSECTION_HH 1 31 43 44 //#include "G4VDataSetAlgorithm.hh" 32 45 #include "globals.hh" 46 #include <map> 33 47 48 class G4VDataSetAlgorithm; 49 class G4VEMDataSet; 34 50 35 51 class G4PaulKCrossSection … … 42 58 virtual ~G4PaulKCrossSection(); 43 59 44 G4double CalculateKCrossSection(G4int zTarget,G4 int zIncident, G4double energyIncident);60 G4double CalculateKCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident); 45 61 46 62 47 48 49 50 63 private: 51 64 … … 54 67 G4PaulKCrossSection & operator = (const G4PaulKCrossSection &right); 55 68 69 G4VDataSetAlgorithm* interpolation; 70 71 std::map< G4int , G4VEMDataSet* > protonDataSetMap; 72 73 std::map< G4int , G4VEMDataSet* > alphaDataSetMap; 74 75 56 76 }; 57 77 -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeAnnihilationModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeAnnihilationModel.hh,v 1.1 2008/11/04 10:14:56 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlung.hh
r1228 r1315 27 27 // ------------------------------------------------------------------- 28 28 // $Id: G4PenelopeBremsstrahlung.hh,v 1.8 2006/06/29 19:36:15 gunter Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlungAngular.hh
r1228 r1315 27 27 // ------------------------------------------------------------------- 28 28 // $Id: G4PenelopeBremsstrahlungAngular.hh,v 1.3 2006/06/29 19:36:17 gunter Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlungContinuous.hh
r1228 r1315 27 27 // ------------------------------------------------------------------- 28 28 // $Id: G4PenelopeBremsstrahlungContinuous.hh,v 1.4 2008/12/09 15:04:05 pandola Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlungModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeBremsstrahlungModel.hh,v 1.2 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeCompton.hh
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeCompton.hh,v 1.11 2008/03/26 15:30:19 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeComptonModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeComptonModel.hh,v 1.3 2009/10/21 14:56:47 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeGammaConversion.hh
r1228 r1315 26 26 // 27 27 // $Id: G4PenelopeGammaConversion.hh,v 1.2 2006/06/29 19:36:25 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: L. Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeGammaConversionModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeGammaConversionModel.hh,v 1.1 2008/10/28 08:50:21 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeIonisation.hh
r1228 r1315 26 26 // ------------------------------------------------------------------- 27 27 // $Id: G4PenelopeIonisation.hh,v 1.5 2006/06/29 19:36:33 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: L. Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeIonisationModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisationModel.hh,v 1. 3 2009/10/21 14:56:47pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PenelopeIonisationModel.hh,v 1.5 2010/04/15 10:02:10 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 36 36 // AtomicDeexcitationFlag - now demanded to G4VEmModel 37 37 // Add ActivateAuger() method 38 // 29 Mar 2010 L. Pandola Added a dummy ComputeCrossSectioPerAtom() method issueing a 39 // warning if users try to access atomic cross sections via 40 // G4EmCalculator 41 // 15 Apr 2010 L. Pandola Implemented model's own version of MinEnergyCut() 38 42 // 39 43 // ------------------------------------------------------------------- … … 73 77 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 74 78 79 //*This is a dummy method. Never inkoved by the tracking, it just issues 80 //*a warning if one tries to get Cross Sections per Atom via the 81 //*G4EmCalculator. 82 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 83 G4double, 84 G4double, 85 G4double, 86 G4double, 87 G4double); 88 75 89 virtual G4double CrossSectionPerVolume(const G4Material* material, 76 90 const G4ParticleDefinition* theParticle, … … 90 104 G4double cutEnergy); 91 105 106 // Min cut in kinetic energy allowed by the model 107 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 108 const G4MaterialCutsCouple*); 109 92 110 void SetVerbosityLevel(G4int lev){verboseLevel = lev;}; 93 111 G4int GetVerbosityLevel(){return verboseLevel;}; -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopePhotoElectric.hh
r1228 r1315 26 26 // 27 27 // $Id: G4PenelopePhotoElectric.hh,v 1.4 2006/06/29 19:36:35 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopePhotoElectricModel.hh
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopePhotoElectricModel.hh,v 1.2 2009/10/21 10:47:02 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeRayleigh.hh
r1228 r1315 26 26 // 27 27 // $Id: G4PenelopeRayleigh.hh,v 1.5 2006/06/29 19:36:37 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeRayleighModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeRayleighModel.hh,v 1. 1 2008/10/28 08:50:21pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PenelopeRayleighModel.hh,v 1.3 2010/04/15 10:02:25 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 33 33 // 13 Oct 2008 L. Pandola 1st implementation. Migration from EM process 34 34 // to EM model 35 // 18 Dec 2009 L. Pandola Added a dummy ComputeCrossSectioPerAtom() method issueing a 36 // warning if users try to access atomic cross sections via 37 // G4EmCalculator 35 38 // 36 39 // ------------------------------------------------------------------- … … 38 41 // Class description: 39 42 // Low Energy Electromagnetic Physics, Rayleigh Scattering 40 // with Penelope Model43 // with Penelope v2001 Model 41 44 // ------------------------------------------------------------------- 42 45 … … 71 74 G4double maxEnergy = DBL_MAX); 72 75 76 //*This is a dummy method. Never inkoved by the tracking, it just issues 77 //*a warning if one tries to get Cross Sections per Atom via the 78 //*G4EmCalculator. 79 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 80 G4double, 81 G4double, 82 G4double, 83 G4double, 84 G4double); 85 73 86 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 74 87 const G4MaterialCutsCouple*, -
trunk/source/processes/electromagnetic/lowenergy/include/G4RangeNoTest.hh
r1228 r1315 26 26 // 27 27 // $Id: G4RangeNoTest.hh,v 1.4 2006/06/29 19:36:47 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4RangeTest.hh
r1228 r1315 26 26 // 27 27 // $Id: G4RangeTest.hh,v 1.4 2006/06/29 19:36:49 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4RayleighScattering.hh
r1228 r1315 26 26 // 27 27 // $Id: G4RayleighScattering.hh,v 1.2 2009/03/18 13:45:51 pandola Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 //------------------ G4RayleighScattering physics process ----------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4SemiLogInterpolation.hh
r1228 r1315 26 26 // 27 27 // $Id: G4SemiLogInterpolation.hh,v 1.5 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4ShellData.hh
r1228 r1315 26 26 // 27 27 // $Id: G4ShellData.hh,v 1.7 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4ShellEMDataSet.hh
r1228 r1315 26 26 // 27 27 // $Id: G4ShellEMDataSet.hh,v 1.13 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VCrossSectionHandler.hh
r1228 r1315 26 26 // 27 27 // $Id: G4VCrossSectionHandler.hh,v 1.15 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VDataSetAlgorithm.hh
r1228 r1315 26 26 // 27 27 // $Id: G4VDataSetAlgorithm.hh,v 1.8 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VEMDataSet.hh
r1228 r1315 26 26 // 27 27 // $Id: G4VEMDataSet.hh,v 1.13 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VLowEnergyDiscretePhotonProcess.hh
r1228 r1315 25 25 // 26 26 // $Id: G4VLowEnergyDiscretePhotonProcess.hh,v 1.4 2006/06/29 19:37:13 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4VLowEnergyTestableDiscreteProcess.hh
r1228 r1315 26 26 // 27 27 // $Id: G4VLowEnergyTestableDiscreteProcess.hh,v 1.3 2006/06/29 19:37:17 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 -
trunk/source/processes/electromagnetic/lowenergy/include/G4VRangeTest.hh
r1228 r1315 26 26 // 27 27 // $Id: G4VRangeTest.hh,v 1.3 2006/06/29 19:37:21 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VeLowEnergyLoss.hh
r1228 r1315 26 26 // 27 27 // $Id: G4VeLowEnergyLoss.hh,v 1.9 2006/06/29 19:37:23 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // 3.4.2000 Veronique Lefebure: -
trunk/source/processes/electromagnetic/lowenergy/include/G4WaterExcitationStructure.hh
r1228 r1315 26 26 // 27 27 // $Id: G4WaterExcitationStructure.hh,v 1.1 2007/10/15 08:33:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4WaterIonisationStructure.hh
r1228 r1315 26 26 // 27 27 // $Id: G4WaterIonisationStructure.hh,v 1.1 2007/11/08 20:38:40 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eBremsstrahlungSpectrum.hh
r1228 r1315 25 25 // 26 26 // $Id: G4eBremsstrahlungSpectrum.hh,v 1.8 2006/06/29 19:37:33 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eCrossSectionExcitationEmfietzoglou.hh
r1228 r1315 26 26 // 27 27 // $Id: G4eCrossSectionExcitationEmfietzoglou.hh,v 1.1 2007/05/02 17:18:48 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eCrossSectionScreenedRutherford.hh
r1228 r1315 26 26 // 27 27 // $Id: G4eCrossSectionScreenedRutherford.hh,v 1.2 2007/10/12 12:26:34 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eIonisationCrossSectionHandler.hh
r1228 r1315 25 25 // 26 26 // $Id: G4eIonisationCrossSectionHandler.hh,v 1.7 2009/01/29 08:13:27 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eIonisationParameters.hh
r1228 r1315 26 26 // 27 27 // $Id: G4eIonisationParameters.hh,v 1.8 2006/06/29 19:37:38 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eIonisationSpectrum.hh
r1228 r1315 25 25 // 26 26 // $Id: G4eIonisationSpectrum.hh,v 1.7 2006/06/29 19:37:40 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eLowEnergyLoss.hh
r1228 r1315 26 26 // 27 27 // $Id: G4eLowEnergyLoss.hh,v 1.14 2006/06/29 19:37:42 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eLowEnergyLoss.icc
r1228 r1315 26 26 // 27 27 // $Id: G4eLowEnergyLoss.icc,v 1.8 2006/06/29 19:37:44 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4empCrossSection.hh
r1197 r1315 25 25 // 26 26 // $Id: G4empCrossSection.hh,v 1.1 2009/06/17 16:39:55 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/include/G4hLowEnergyIonisation.hh
r1228 r1315 50 50 // 26 Feb 2002 V.Ivanchenko Add initialMass for GenericIons 51 51 // 21 Jan 2003 V.Ivanchenko Cut per region 52 // 03 Oct 2009 ALF added SelectShellIonisationCS 52 53 // ------------------------------------------------------------ 53 54 … … 175 176 // This method switch on/off simulation of the fluorescence of the media. 176 177 178 void SelectShellIonisationCS(G4String); 179 180 177 181 G4VParticleChange* AlongStepDoIt(const G4Track& trackData , 178 182 const G4Step& stepData ) ; … … 260 264 G4double hMass, 261 265 G4double eLoss); 266 262 267 263 268 G4int SelectRandomAtom(const G4MaterialCutsCouple* couple, … … 314 319 std::vector<G4VEMDataSet*> zFluoDataVector; 315 320 G4bool theFluo; 316 G4bool expFlag;317 321 }; 318 322 -
trunk/source/processes/electromagnetic/lowenergy/include/G4hLowEnergyLoss.hh
r1228 r1315 26 26 // 27 27 // $Id: G4hLowEnergyLoss.hh,v 1.17 2006/06/29 19:37:58 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // $Id: -
trunk/source/processes/electromagnetic/lowenergy/include/G4hLowEnergyLoss.icc
r1228 r1315 26 26 // 27 27 // $Id: G4hLowEnergyLoss.icc,v 1.3 2006/06/29 19:38:00 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // $Id: -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionDoubleExp.hh
r1228 r1315 45 45 // ------------------------------------------------------------------- 46 46 // $Id: G4hShellCrossSectionDoubleExp.hh,v 1.3 2006/06/29 19:38:12 gunter Exp $ 47 // GEANT4 tag $Name: geant4-09-0 3$47 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 48 48 49 49 #ifndef G4HSHELLCROSSSECTIONDOUBLEEXP_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionDoubleExpData.hh
r1228 r1315 40 40 // ------------------------------------------------------------------- 41 41 // $Id: G4hShellCrossSectionDoubleExpData.hh,v 1.3 2006/06/29 19:38:14 gunter Exp $ 42 // GEANT4 tag $Name: geant4-09-0 3$42 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 43 43 44 44 #ifndef G4hShellCrossSectionDoubleExpData_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionExp.hh
r1228 r1315 45 45 // ------------------------------------------------------------------- 46 46 // $Id: G4hShellCrossSectionExp.hh,v 1.3 2006/06/29 19:38:16 gunter Exp $ 47 // GEANT4 tag $Name: geant4-09-0 3$47 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 48 48 49 49 #ifndef G4HSHELLCROSSSECTIONEXP_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionExpData.hh
r1228 r1315 38 38 // ------------------------------------------------------------------- 39 39 // $Id: G4hShellCrossSectionExpData.hh,v 1.3 2006/06/29 19:38:18 gunter Exp $ 40 // GEANT4 tag $Name: geant4-09-0 3$40 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 41 41 42 42 #ifndef G4hShellCrossSectionExpData_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4teoCrossSection.hh
r1197 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4teoCrossSection.hh,v 1. 4 2009/06/25 15:52:08mantero Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: G4teoCrossSection.hh,v 1.5 2010/06/06 23:40:35 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // … … 49 49 #include "G4VhShellCrossSection.hh" 50 50 51 #include "G4 ecpssrKCrossSection.hh"52 #include "G4 ecpssrLiCrossSection.hh"51 #include "G4AnalyticalEcpssrKCrossSection.hh" 52 #include "G4AnalyticalEcpssrLiCrossSection.hh" 53 53 54 54 class G4teoCrossSection : public G4VhShellCrossSection … … 81 81 G4double totalCS; 82 82 83 G4 ecpssrKCrossSection* ecpssrShellK;84 G4 ecpssrLiCrossSection* ecpssrShellLi;83 G4VecpssrKModel* ecpssrShellK; 84 G4VecpssrLiModel* ecpssrShellLi; 85 85 86 86 -
trunk/source/processes/electromagnetic/lowenergy/src/G4AtomicDeexcitation.cc
r1228 r1315 26 26 // 27 27 // $Id: G4AtomicDeexcitation.cc,v 1.11 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) … … 384 384 385 385 G4int numberOfPossibleAuger = 0; 386 numberOfPossibleAuger = anAugerTransition->AugerTransitionProbabilities(transitionRandomShellId)->size(); 387 388 386 389 387 G4bool foundFlag = false; 390 388 -
trunk/source/processes/electromagnetic/lowenergy/src/G4AtomicTransitionManager.cc
r1228 r1315 26 26 // 27 27 // $Id: G4AtomicTransitionManager.cc,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/src/G4AugerTransition.cc
r819 r1315 97 97 { 98 98 std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionEnergiesMap.find(startShellId); 99 100 if (shellId == augerTransitionEnergiesMap.end() ) 101 {G4Exception("G4AugerTransition: corresponding map element not found");} 102 99 103 const G4DataVector* dataSet = &(*shellId).second; 100 104 … … 103 107 } 104 108 105 // Returns the emission probabilities of the auger electrons, given th shell109 // Returns the emission probabilities of the auger electrons, given the shell 106 110 // from wich the transition electron cames from. 107 111 108 112 const G4DataVector* G4AugerTransition::AugerTransitionProbabilities(G4int startShellId) const 109 113 { 114 115 //debugging 116 //if (startShellId == 1){G4cout <<"OI!!!"<< G4endl;} 117 110 118 std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionProbabilitiesMap.find(startShellId); 119 120 if (shellId == augerTransitionProbabilitiesMap.end() ) 121 {G4Exception("G4AugerTransition: corresponding map element not found");} 122 111 123 const G4DataVector* dataSet = &(*shellId).second; 124 // debugging purpose: 125 /* G4cout << "id: " << shellId->first << G4endl; 126 G4cout << "size:" << dataSet->size() << G4endl; 127 for (G4int i = 0; i < dataSet->size(); i++){ 128 G4cout << (dataSet[0])[i] << G4endl; 129 }*/ 112 130 return dataSet; 113 131 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4BremsstrahlungCrossSectionHandler.cc
r1228 r1315 25 25 // 26 26 // $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.12 2009/09/27 10:47:42 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4BremsstrahlungParameters.cc
r1228 r1315 26 26 // 27 27 // $Id: G4BremsstrahlungParameters.cc,v 1.20 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CompositeEMDataSet.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CompositeEMDataSet.cc,v 1.15 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeDecrease.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeDecrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionChargeDecrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeDecreasePartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeDecreasePartial.cc,v 1.3 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionChargeDecreasePartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeIncrease.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeIncrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionChargeIncrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeIncreasePartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionChargeIncreasePartial.cc,v 1.3 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionChargeIncreasePartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeTransferCH.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionChargeTransferCH.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeTransferExp.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionChargeTransferExp.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticChampion.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionElasticChampion.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherford.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionElasticScreenedRutherford.cc,v 1.1 2007/10/12 23:11:41 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherfordHE.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionElasticScreenedRutherfordHE.cc,v 1.5 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionElasticScreenedRutherfordHE.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherfordLE.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionElasticScreenedRutherfordLE.cc,v 1.5 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionElasticScreenedRutherfordLE.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationBorn.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationBorn.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationBornPartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationBornPartial.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationBornPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationEmfietzoglou.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationEmfietzoglou.cc,v 1.8 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationEmfietzoglou.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationEmfietzoglouPartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationEmfietzoglouPartial.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationEmfietzoglouPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreen.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationMillerGreen.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreen.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreenPartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreenPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionHandler.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionHandler.cc,v 1.21 2009/09/27 10:47:42 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBorn.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationBorn.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornElectron.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionIonisationBornElectron.cc,v 1.2 2007/11/08 18:51:34 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationBornPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartialElectron.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionIonisationBornPartialElectron.cc,v 1.1 2007/10/15 08:57:54 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationRudd.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationRudd.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationRudd.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationRuddPartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionIonisationRuddPartial.cc,v 1.5 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationRuddPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionKill.cc
r1228 r1315 26 26 // 27 27 // $Id: G4CrossSectionKill.cc,v 1.1 2007/11/09 20:26:12 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionPsCreationChampion.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionPsCreationChampion.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionPsCreationChampionPartial.cc
r1228 r1315 25 25 // 26 26 // $Id: G4CrossSectionPsCreationChampionPartial.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNABornExcitationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNABornExcitationModel.cc,v 1. 7 2009/08/31 14:03:29sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNABornExcitationModel.cc,v 1.9 2010/03/27 11:32:41 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 40 40 :G4VEmModel(nam),isInitialised(false) 41 41 { 42 43 lowEnergyLimit = 500 * keV;44 highEnergyLimit = 100 * MeV;45 SetLowEnergyLimit(lowEnergyLimit);46 SetHighEnergyLimit(highEnergyLimit);47 48 42 verboseLevel= 0; 49 43 // Verbosity scale: … … 54 48 // 4 = entering in methods 55 49 56 //57 58 table = 0;59 60 //61 62 50 if( verboseLevel>0 ) 63 51 { 64 G4cout << "Born excitation model is constructed " << G4endl 65 << "Energy range: " 66 << lowEnergyLimit / keV << " keV - " 67 << highEnergyLimit / MeV << " MeV" 68 << G4endl; 52 G4cout << "Born excitation model is constructed " << G4endl; 69 53 } 70 54 … … 76 60 { 77 61 // Cross section 78 delete table; 79 } 80 81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 82 83 void G4DNABornExcitationModel::Initialise(const G4ParticleDefinition* /*particle*/, 62 63 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos; 64 for (pos = tableData.begin(); pos != tableData.end(); ++pos) 65 { 66 G4DNACrossSectionDataSet* table = pos->second; 67 delete table; 68 } 69 70 } 71 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 73 74 void G4DNABornExcitationModel::Initialise(const G4ParticleDefinition* particle, 84 75 const G4DataVector& /*cuts*/) 85 76 { … … 89 80 90 81 // Energy limits 91 92 if (LowEnergyLimit() < lowEnergyLimit) 93 { 94 G4cout << "G4DNABornExcitationModel: low energy limit increased from " << 95 LowEnergyLimit()/keV << " keV to " << lowEnergyLimit/keV << " keV" << G4endl; 96 SetLowEnergyLimit(lowEnergyLimit); 97 } 98 99 if (HighEnergyLimit() > highEnergyLimit) 100 { 101 G4cout << "G4DNABornExcitationModel: high energy limit decreased from " << 102 HighEnergyLimit()/MeV << " MeV to " << highEnergyLimit/MeV << " MeV" << G4endl; 103 SetHighEnergyLimit(highEnergyLimit); 104 } 105 106 // 107 108 if (table == 0) 109 { 110 table = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,(1e-22/3.343)*m*m ); 111 table->LoadData("dna/sigma_excitation_p_born"); 82 // Energy limits 83 84 G4String fileElectron("dna/sigma_excitation_e_born"); 85 G4String fileProton("dna/sigma_excitation_p_born"); 86 87 G4ParticleDefinition* electronDef = G4Electron::ElectronDefinition(); 88 G4ParticleDefinition* protonDef = G4Proton::ProtonDefinition(); 89 90 G4String electron; 91 G4String proton; 92 93 G4double scaleFactor = (1.e-22 / 3.343) * m*m; 94 95 if (electronDef != 0) 96 { 97 electron = electronDef->GetParticleName(); 98 99 tableFile[electron] = fileElectron; 100 101 lowEnergyLimit[electron] = 9. * eV; 102 highEnergyLimit[electron] = 1. * MeV; 103 104 // Cross section 105 106 G4DNACrossSectionDataSet* tableE = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,scaleFactor ); 107 tableE->LoadData(fileElectron); 108 109 tableData[electron] = tableE; 110 111 } 112 else 113 { 114 G4Exception("G4DNABornExcitationModel::Initialise(): electron is not defined"); 115 } 116 117 if (protonDef != 0) 118 { 119 proton = protonDef->GetParticleName(); 120 121 tableFile[proton] = fileProton; 122 123 lowEnergyLimit[proton] = 500. * keV; 124 highEnergyLimit[proton] = 100. * MeV; 125 126 // Cross section 127 128 G4DNACrossSectionDataSet* tableP = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,scaleFactor ); 129 tableP->LoadData(fileProton); 130 131 tableData[proton] = tableP; 132 133 } 134 else 135 { 136 G4Exception("G4DNABornExcitationModel::Initialise(): proton is not defined"); 137 } 138 139 if (particle==electronDef) 140 { 141 SetLowEnergyLimit(lowEnergyLimit[electron]); 142 SetHighEnergyLimit(highEnergyLimit[electron]); 143 } 144 145 if (particle==protonDef) 146 { 147 SetLowEnergyLimit(lowEnergyLimit[proton]); 148 SetHighEnergyLimit(highEnergyLimit[proton]); 112 149 } 113 150 … … 116 153 G4cout << "Born excitation model is initialized " << G4endl 117 154 << "Energy range: " 118 << LowEnergyLimit() / keV << " keV - " 119 << HighEnergyLimit() / MeV << " MeV " << G4endl; 120 } 155 << LowEnergyLimit() / eV << " eV - " 156 << HighEnergyLimit() / keV << " keV for " 157 << particle->GetParticleName() 158 << G4endl; 159 } 160 121 161 122 162 if(!isInitialised) … … 131 171 132 172 // InitialiseElementSelectors(particle,cuts); 133 134 // Test if water material 135 136 flagMaterialIsWater= false; 137 densityWater = 0; 138 139 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable(); 140 141 if(theCoupleTable) 142 { 143 G4int numOfCouples = theCoupleTable->GetTableSize(); 144 145 if(numOfCouples>0) 146 { 147 for (G4int i=0; i<numOfCouples; i++) 148 { 149 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); 150 const G4Material* material = couple->GetMaterial(); 151 152 if (material->GetName() == "G4_WATER") 153 { 154 G4double density = material->GetAtomicNumDensityVector()[1]; 155 flagMaterialIsWater = true; 156 densityWater = density; 157 158 if (verboseLevel > 3) 159 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 160 } 161 162 } 163 164 } // if(numOfCouples>0) 165 166 } // if (theCoupleTable) 167 168 } 169 170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 171 172 G4double G4DNABornExcitationModel::CrossSectionPerVolume(const G4Material*, 173 174 } 175 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 177 178 G4double G4DNABornExcitationModel::CrossSectionPerVolume(const G4Material* material, 173 179 const G4ParticleDefinition* particleDefinition, 174 G4double k,180 G4double ekin, 175 181 G4double, 176 182 G4double) … … 179 185 G4cout << "Calling CrossSectionPerVolume() of G4DNABornExcitationModel" << G4endl; 180 186 187 if ( 188 particleDefinition != G4Proton::ProtonDefinition() 189 && 190 particleDefinition != G4Electron::ElectronDefinition() 191 ) 192 193 return 0; 194 181 195 // Calculate total cross section for model 182 196 183 G4double crossSection=0; 184 185 if (flagMaterialIsWater) 186 { 187 if (particleDefinition == G4Proton::ProtonDefinition()) 188 { 189 if (k >= lowEnergyLimit && k < highEnergyLimit) 197 G4double lowLim = 0; 198 G4double highLim = 0; 199 G4double sigma=0; 200 201 if (material->GetName() == "G4_WATER") 202 { 203 const G4String& particleName = particleDefinition->GetParticleName(); 204 205 std::map< G4String,G4double,std::less<G4String> >::iterator pos1; 206 pos1 = lowEnergyLimit.find(particleName); 207 if (pos1 != lowEnergyLimit.end()) 208 { 209 lowLim = pos1->second; 210 } 211 212 std::map< G4String,G4double,std::less<G4String> >::iterator pos2; 213 pos2 = highEnergyLimit.find(particleName); 214 if (pos2 != highEnergyLimit.end()) 215 { 216 highLim = pos2->second; 217 } 218 219 if (ekin >= lowLim && ekin < highLim) 220 { 221 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos; 222 pos = tableData.find(particleName); 223 224 if (pos != tableData.end()) 190 225 { 191 crossSection = table->FindValue(k); 226 G4DNACrossSectionDataSet* table = pos->second; 227 if (table != 0) 228 { 229 sigma = table->FindValue(ekin); 230 } 192 231 } 193 194 if (verboseLevel > 3) 232 else 195 233 { 196 G4cout << "---> Kinetic energy(keV)=" << k/keV << G4endl; 197 G4cout << " - Cross section per water molecule (cm^2)=" << crossSection/cm/cm << G4endl; 198 G4cout << " - Cross section per water molecule (cm^-1)=" << crossSection*densityWater/(1./cm) << G4endl; 199 } 234 G4Exception("G4DNABornExcitationModel::CrossSectionPerVolume: attempting to calculate cross section for wrong particle"); 235 } 200 236 } 201 } // if (flagMaterialIsWater) 202 203 return crossSection*densityWater; 237 238 if (verboseLevel > 3) 239 { 240 G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl; 241 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 242 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 243 } 244 245 } // if (waterMaterial) 246 247 return sigma*material->GetAtomicNumDensityVector()[1]; 248 204 249 205 250 } … … 219 264 G4double k = aDynamicParticle->GetKineticEnergy(); 220 265 221 G4int level = RandomSelect(k); 266 const G4String& particleName = aDynamicParticle->GetDefinition()->GetParticleName(); 267 268 G4int level = RandomSelect(k,particleName); 222 269 G4double excitationEnergy = waterStructure.ExcitationEnergy(level); 223 270 G4double newEnergy = k - excitationEnergy; … … 234 281 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 235 282 236 G4int G4DNABornExcitationModel::RandomSelect(G4double k )283 G4int G4DNABornExcitationModel::RandomSelect(G4double k, const G4String& particle) 237 284 { 238 285 G4int level = 0; 239 286 240 G4double* valuesBuffer = new G4double[table->NumberOfComponents()]; 241 242 const size_t n(table->NumberOfComponents()); 243 size_t i(n); 244 G4double value = 0.; 245 246 while (i>0) 247 { 248 i--; 249 valuesBuffer[i] = table->GetComponent(i)->FindValue(k); 250 value += valuesBuffer[i]; 251 } 252 253 value *= G4UniformRand(); 254 255 i = n; 256 257 while (i > 0) 258 { 259 i--; 260 261 if (valuesBuffer[i] > value) 262 { 263 delete[] valuesBuffer; 264 return i; 287 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos; 288 pos = tableData.find(particle); 289 290 if (pos != tableData.end()) 291 { 292 G4DNACrossSectionDataSet* table = pos->second; 293 294 if (table != 0) 295 { 296 G4double* valuesBuffer = new G4double[table->NumberOfComponents()]; 297 const size_t n(table->NumberOfComponents()); 298 size_t i(n); 299 G4double value = 0.; 300 301 while (i>0) 302 { 303 i--; 304 valuesBuffer[i] = table->GetComponent(i)->FindValue(k); 305 value += valuesBuffer[i]; 306 } 307 308 value *= G4UniformRand(); 309 310 i = n; 311 312 while (i > 0) 313 { 314 i--; 315 316 if (valuesBuffer[i] > value) 317 { 318 delete[] valuesBuffer; 319 return i; 320 } 321 value -= valuesBuffer[i]; 322 } 323 324 if (valuesBuffer) delete[] valuesBuffer; 325 265 326 } 266 value -= valuesBuffer[i];267 }268 269 if (valuesBuffer) delete[] valuesBuffer;270 327 } 328 else 329 { 330 G4Exception("G4DNABornExcitationModel::RandomSelect attempting to calculate cross section for wrong particle"); 331 } 271 332 return level; 272 333 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNABornIonisationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNABornIonisationModel.cc,v 1.1 4 2009/11/12 03:08:58sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNABornIonisationModel.cc,v 1.16 2010/03/26 18:10:43 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 239 239 // InitialiseElementSelectors(particle,cuts); 240 240 241 // Test if water material242 243 flagMaterialIsWater= false;244 densityWater = 0;245 246 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();247 248 if(theCoupleTable)249 {250 G4int numOfCouples = theCoupleTable->GetTableSize();251 252 if(numOfCouples>0)253 {254 for (G4int i=0; i<numOfCouples; i++)255 {256 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);257 const G4Material* material = couple->GetMaterial();258 259 if (material->GetName() == "G4_WATER")260 {261 G4double density = material->GetAtomicNumDensityVector()[1];262 flagMaterialIsWater = true;263 densityWater = density;264 265 if (verboseLevel > 3)266 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;267 }268 269 }270 271 } // if(numOfCouples>0)272 273 } // if (theCoupleTable)274 275 241 } 276 242 277 243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 278 244 279 G4double G4DNABornIonisationModel::CrossSectionPerVolume(const G4Material* ,245 G4double G4DNABornIonisationModel::CrossSectionPerVolume(const G4Material* material, 280 246 const G4ParticleDefinition* particleDefinition, 281 247 G4double ekin, … … 300 266 G4double sigma=0; 301 267 302 if ( flagMaterialIsWater)268 if (material->GetName() == "G4_WATER") 303 269 { 304 270 const G4String& particleName = particleDefinition->GetParticleName(); … … 341 307 G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl; 342 308 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 343 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma* densityWater/(1./cm) << G4endl;309 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 344 310 } 345 311 346 312 } // if (waterMaterial) 347 313 348 return sigma* densityWater;314 return sigma*material->GetAtomicNumDensityVector()[1]; 349 315 350 316 } … … 429 395 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ; 430 396 fvect->push_back(dp); 431 /* 432 // creating neutral water molechule... 433 434 G4DNAGenericMoleculeManager *instance; 435 instance = G4DNAGenericMoleculeManager::Instance(); 436 G4ParticleDefinition* waterDef = NULL; 437 G4Molecule* water = instance->GetMolecule("H2O"); 438 waterDef = (G4ParticleDefinition*)water; 439 440 direction.set(0.,0.,0.); 441 442 //G4DynamicParticle* dynamicWater = new G4DynamicParticle(waterDef, direction, bindingEnergy); 443 G4DynamicMolecule* dynamicWater = new G4DynamicMolecule(water, direction, bindingEnergy); 444 445 446 //dynamicWater->RemoveElectron(ionizationShell, 1); 447 448 G4DynamicMolecule* dynamicWater2 = new G4DynamicMolecule(water, direction, bindingEnergy); 449 G4DynamicMolecule* dynamicWater3 = new G4DynamicMolecule(water, direction, bindingEnergy); 450 451 fvect->push_back(dynamicWater); 452 fvect->push_back(dynamicWater2); 453 fvect->push_back(dynamicWater3); 454 */ 397 455 398 } 456 399 … … 512 455 if (particleDefinition == G4Proton::ProtonDefinition()) 513 456 { 514 G4double maximumKineticEnergyTransfer = 4.* (electron_mass_c2 / proton_mass_c2) * k - (waterStructure.IonisationEnergy(shell));457 G4double maximumKineticEnergyTransfer = 4.* (electron_mass_c2 / proton_mass_c2) * k; 515 458 516 459 G4double crossSectionMaximum = 0.; -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAChampionElasticModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAChampionElasticModel.cc,v 1.1 0 2009/11/03 15:04:25sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAChampionElasticModel.cc,v 1.12 2010/04/08 17:29:08 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 132 132 133 133 // For final state 134 134 135 135 char *path = getenv("G4LEDATA"); 136 136 … … 139 139 140 140 std::ostringstream eFullFileName; 141 eFullFileName << path << "/dna/sigmadiff_ elastic_e_champion.dat";141 eFullFileName << path << "/dna/sigmadiff_cumulated_elastic_e_champion.dat"; 142 142 std::ifstream eDiffCrossSection(eFullFileName.str().c_str()); 143 143 … … 151 151 double eDummy; 152 152 eDiffCrossSection>>tDummy>>eDummy; 153 153 154 154 // SI : mandatory eVecm initialization 155 155 156 if (tDummy != eTdummyVec.back()) 156 157 { … … 161 162 eDiffCrossSection>>eDiffCrossSectionData[tDummy][eDummy]; 162 163 163 // SI : only if not end of file reached !164 if (!eDiffCrossSection.eof()) eDiffCrossSectionData[tDummy][eDummy]*=scaleFactor;165 166 164 if (eDummy != eVecm[tDummy].back()) eVecm[tDummy].push_back(eDummy); 167 165 168 166 } 169 167 … … 197 195 // InitialiseElementSelectors(particle,cuts); 198 196 199 // Test if water material 200 201 flagMaterialIsWater= false; 202 densityWater = 0; 203 204 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable(); 205 206 if(theCoupleTable) 207 { 208 G4int numOfCouples = theCoupleTable->GetTableSize(); 209 210 if(numOfCouples>0) 211 { 212 for (G4int i=0; i<numOfCouples; i++) 213 { 214 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); 215 const G4Material* material = couple->GetMaterial(); 216 217 if (material->GetName() == "G4_WATER") 218 { 219 G4double density = material->GetAtomicNumDensityVector()[1]; 220 flagMaterialIsWater = true; 221 densityWater = density; 222 223 if (verboseLevel > 3) 224 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 225 } 226 227 } 228 229 } // if(numOfCouples>0) 230 231 } // if (theCoupleTable) 232 233 } 234 235 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 236 237 G4double G4DNAChampionElasticModel::CrossSectionPerVolume(const G4Material*, 197 } 198 199 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 200 201 G4double G4DNAChampionElasticModel::CrossSectionPerVolume(const G4Material* material, 238 202 const G4ParticleDefinition* p, 239 203 G4double ekin, … … 248 212 G4double sigma=0; 249 213 250 if ( flagMaterialIsWater)214 if (material->GetName() == "G4_WATER") 251 215 { 252 216 const G4String& particleName = p->GetParticleName(); … … 279 243 G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl; 280 244 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 281 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma* densityWater/(1./cm) << G4endl;245 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 282 246 } 283 247 284 } // if (flagMaterialIsWater)248 } 285 249 286 return sigma* densityWater;250 return sigma*material->GetAtomicNumDensityVector()[1]; 287 251 } 288 252 … … 310 274 if (electronEnergy0>= killBelowEnergy && electronEnergy0 < highEnergyLimit) 311 275 { 276 312 277 G4double cosTheta = RandomizeCosTheta(electronEnergy0); 313 278 … … 334 299 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 335 300 336 G4double G4DNAChampionElasticModel::DifferentialCrossSection 337 (G4ParticleDefinition * particleDefinition, G4double k, G4double theta) 338 { 339 340 G4double sigma = 0.; 301 G4double G4DNAChampionElasticModel::Theta 302 (G4ParticleDefinition * particleDefinition, G4double k, G4double integrDiff) 303 { 304 G4double theta = 0.; 341 305 G4double valueT1 = 0; 342 306 G4double valueT2 = 0; … … 350 314 G4double xs22 = 0; 351 315 352 //SI : ensure the correct computation of cross section at the 180*deg limit353 if (theta==180.) theta=theta-1e-9;354 355 316 if (particleDefinition == G4Electron::ElectronDefinition()) 356 317 { … … 358 319 std::vector<double>::iterator t1 = t2-1; 359 320 360 std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), theta);321 std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), integrDiff); 361 322 std::vector<double>::iterator e11 = e12-1; 362 323 363 std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(), theta);324 std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(), integrDiff); 364 325 std::vector<double>::iterator e21 = e22-1; 365 326 … … 375 336 xs21 = eDiffCrossSectionData[valueT2][valueE21]; 376 337 xs22 = eDiffCrossSectionData[valueT2][valueE22]; 377 378 } 379 380 G4double xsProduct = xs11 * xs12 * xs21 * xs22; 381 382 if (xs11==0 || xs12==0 ||xs21==0 ||xs22==0) return (0.); 383 384 if (xsProduct != 0.) 385 { 386 sigma = QuadInterpolator( valueE11, valueE12, 338 } 339 340 if (xs11==0 && xs12==0 && xs21==0 && xs22==0) return (0.); 341 342 theta = QuadInterpolator ( valueE11, valueE12, 387 343 valueE21, valueE22, 388 344 xs11, xs12, 389 345 xs21, xs22, 390 346 valueT1, valueT2, 391 k, theta ); 392 } 393 394 return sigma; 347 k, integrDiff ); 348 349 return theta; 395 350 } 396 351 … … 411 366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 412 367 368 G4double G4DNAChampionElasticModel::LinLinInterpolate(G4double e1, 369 G4double e2, 370 G4double e, 371 G4double xs1, 372 G4double xs2) 373 { 374 G4double d1 = xs1; 375 G4double d2 = xs2; 376 G4double value = (d1 + (d2 - d1)*(e - e1)/ (e2 - e1)); 377 return value; 378 } 379 380 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 381 413 382 G4double G4DNAChampionElasticModel::LogLogInterpolate(G4double e1, 414 383 G4double e2, … … 425 394 426 395 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 396 427 397 428 398 G4double G4DNAChampionElasticModel::QuadInterpolator(G4double e11, G4double e12, … … 433 403 G4double t, G4double e) 434 404 { 435 // Log-Log405 // Log-Log 436 406 /* 437 407 G4double interpolatedvalue1 = LogLogInterpolate(e11, e12, e, xs11, xs12); 438 408 G4double interpolatedvalue2 = LogLogInterpolate(e21, e22, e, xs21, xs22); 439 409 G4double value = LogLogInterpolate(t1, t2, t, interpolatedvalue1, interpolatedvalue2); 440 */ 441 442 // Lin-Log410 411 412 // Lin-Log 443 413 G4double interpolatedvalue1 = LinLogInterpolate(e11, e12, e, xs11, xs12); 444 414 G4double interpolatedvalue2 = LinLogInterpolate(e21, e22, e, xs21, xs22); 445 415 G4double value = LinLogInterpolate(t1, t2, t, interpolatedvalue1, interpolatedvalue2); 416 */ 417 418 // Lin-Lin 419 G4double interpolatedvalue1 = LinLinInterpolate(e11, e12, e, xs11, xs12); 420 G4double interpolatedvalue2 = LinLinInterpolate(e21, e22, e, xs21, xs22); 421 G4double value = LinLinInterpolate(t1, t2, t, interpolatedvalue1, interpolatedvalue2); 422 446 423 return value; 447 424 } … … 451 428 G4double G4DNAChampionElasticModel::RandomizeCosTheta(G4double k) 452 429 { 453 // ***** Similar method as for screened Rutherford scattering 454 455 G4int iMax=180; 456 G4double max=0; 457 G4double tmp=0; 458 459 // Look for maximum : 460 for (G4int i=0; i<iMax; i++) 461 { 462 tmp = DifferentialCrossSection(G4Electron::ElectronDefinition(),k/eV,G4double(i)*180./(iMax-1)); 463 if (tmp>max) max = tmp; 464 } 465 466 G4double oneOverMax=0; 467 if (max!=0) oneOverMax = 1./max; 468 469 G4double cosTheta = 0.; 470 G4double fCosTheta = 0.; 471 472 do 473 { 474 cosTheta = 2. * G4UniformRand() - 1.; 475 fCosTheta = oneOverMax * DifferentialCrossSection(G4Electron::ElectronDefinition(),k/eV,std::acos(cosTheta)*180./pi); 476 } 477 while (fCosTheta < G4UniformRand()); 478 479 if (verboseLevel > 3) 480 { 481 G4cout << "---> Cos(theta)=" << cosTheta << G4endl; 482 } 430 431 G4double integrdiff=0; 432 G4double uniformRand=G4UniformRand(); 433 integrdiff = uniformRand; 434 435 G4double theta=0.; 436 G4double cosTheta=0.; 437 theta = Theta(G4Electron::ElectronDefinition(),k/eV,integrdiff); 438 439 cosTheta= std::cos(theta*pi/180); 483 440 484 441 return cosTheta; -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAChargeDecrease.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAChargeDecrease.cc,v 1. 3 2009/03/04 13:28:49sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAChargeDecrease.cc,v 1.4 2010/03/18 16:36:48 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4DNAChargeDecrease.hh" … … 72 72 G4String name = p->GetParticleName(); 73 73 74 if( name == "proton" || name == "alpha" || name == "alpha+" ) 74 if( name == "proton" ) 75 { 76 if(!Model()) SetModel(new G4DNADingfelderChargeDecreaseModel); 77 Model()->SetLowEnergyLimit(100*eV); 78 Model()->SetHighEnergyLimit(10*MeV); 79 80 AddEmModel(1, Model()); 81 } 82 83 if( name == "alpha" || name == "alpha+" ) 75 84 { 76 85 if(!Model()) SetModel(new G4DNADingfelderChargeDecreaseModel); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAChargeIncrease.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAChargeIncrease.cc,v 1. 3 2009/03/04 13:28:49sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAChargeIncrease.cc,v 1.4 2010/03/18 16:36:48 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4DNAChargeIncrease.hh" … … 72 72 G4String name = p->GetParticleName(); 73 73 74 if( name == "hydrogen" || name =="alpha+" || name =="helium" ) 74 if( name == "hydrogen" ) 75 { 76 if(!Model()) SetModel(new G4DNADingfelderChargeIncreaseModel); 77 Model()->SetLowEnergyLimit(100*eV); 78 Model()->SetHighEnergyLimit(10*MeV); 79 80 AddEmModel(1, Model()); 81 } 82 83 if( name =="alpha+" || name =="helium" ) 75 84 { 76 85 if(!Model()) SetModel(new G4DNADingfelderChargeIncreaseModel); … … 80 89 AddEmModel(1, Model()); 81 90 } 91 82 92 83 93 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNACrossSectionDataSet.cc
r1228 r1315 27 27 28 28 // $Id: G4DNACrossSectionDataSet.cc,v 1.11 2009/11/12 10:05:30 sincerti Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: Riccardo Capra <capra@ge.infn.it> -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNADingfelderChargeDecreaseModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNADingfelderChargeDecreaseModel.cc,v 1. 6 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNADingfelderChargeDecreaseModel.cc,v 1.9 2010/04/06 11:00:35 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 84 84 { 85 85 proton = protonDef->GetParticleName(); 86 lowEnergyLimit[proton] = 1 . * keV;86 lowEnergyLimit[proton] = 100. * eV; 87 87 highEnergyLimit[proton] = 10. * MeV; 88 88 } … … 209 209 // InitialiseElementSelectors(particle,cuts); 210 210 211 // Test if water material212 213 flagMaterialIsWater= false;214 densityWater = 0;215 216 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();217 218 if(theCoupleTable)219 {220 G4int numOfCouples = theCoupleTable->GetTableSize();221 222 if(numOfCouples>0)223 {224 for (G4int i=0; i<numOfCouples; i++)225 {226 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);227 const G4Material* material = couple->GetMaterial();228 229 if (material->GetName() == "G4_WATER")230 {231 G4double density = material->GetAtomicNumDensityVector()[1];232 flagMaterialIsWater = true;233 densityWater = density;234 235 if (verboseLevel > 3)236 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;237 }238 239 }240 241 } // if(numOfCouples>0)242 243 } // if (theCoupleTable)244 245 211 } 246 212 247 213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 248 214 249 G4double G4DNADingfelderChargeDecreaseModel::CrossSectionPerVolume(const G4Material* ,215 G4double G4DNADingfelderChargeDecreaseModel::CrossSectionPerVolume(const G4Material* material, 250 216 const G4ParticleDefinition* particleDefinition, 251 217 G4double k, … … 275 241 G4double crossSection = 0.; 276 242 277 if ( flagMaterialIsWater)243 if (material->GetName() == "G4_WATER") 278 244 { 279 245 const G4String& particleName = particleDefinition->GetParticleName(); … … 304 270 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 305 271 G4cout << " - Cross section per water molecule (cm^2)=" << crossSection/cm/cm << G4endl; 306 G4cout << " - Cross section per water molecule (cm^-1)=" << crossSection* densityWater/(1./cm) << G4endl;272 G4cout << " - Cross section per water molecule (cm^-1)=" << crossSection*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 307 273 } 308 274 309 } // if (flagMaterialIsWater)310 311 return crossSection* densityWater;275 } 276 277 return crossSection*material->GetAtomicNumDensityVector()[1]; 312 278 313 279 } … … 327 293 328 294 G4ParticleDefinition* definition = aDynamicParticle->GetDefinition(); 295 296 G4double particleMass = definition->GetPDGMass(); 329 297 330 298 G4int finalStateIndex = RandomSelect(inK,definition); … … 338 306 outK = inK - n*(inK*electron_mass_c2/proton_mass_c2) - waterBindingEnergy + outgoingParticleBindingEnergy; 339 307 else 340 outK = inK - n*(inK*electron_mass_c2/ (3728*MeV)) - waterBindingEnergy + outgoingParticleBindingEnergy;308 outK = inK - n*(inK*electron_mass_c2/particleMass) - waterBindingEnergy + outgoingParticleBindingEnergy; 341 309 342 310 if (outK<0) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNADingfelderChargeIncreaseModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNADingfelderChargeIncreaseModel.cc,v 1. 6 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNADingfelderChargeIncreaseModel.cc,v 1.9 2010/04/06 11:00:35 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 85 85 { 86 86 hydrogen = hydrogenDef->GetParticleName(); 87 lowEnergyLimit[hydrogen] = 1 . * keV;87 lowEnergyLimit[hydrogen] = 100. * eV; 88 88 highEnergyLimit[hydrogen] = 10. * MeV; 89 89 } … … 200 200 // InitialiseElementSelectors(particle,cuts); 201 201 202 // Test if water material203 204 flagMaterialIsWater= false;205 densityWater = 0;206 207 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();208 209 if(theCoupleTable)210 {211 G4int numOfCouples = theCoupleTable->GetTableSize();212 213 if(numOfCouples>0)214 {215 for (G4int i=0; i<numOfCouples; i++)216 {217 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);218 const G4Material* material = couple->GetMaterial();219 220 if (material->GetName() == "G4_WATER")221 {222 G4double density = material->GetAtomicNumDensityVector()[1];223 flagMaterialIsWater = true;224 densityWater = density;225 226 if (verboseLevel > 3)227 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;228 }229 230 }231 232 } // if(numOfCouples>0)233 234 } // if (theCoupleTable)235 236 202 } 237 203 238 204 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 239 205 240 G4double G4DNADingfelderChargeIncreaseModel::CrossSectionPerVolume(const G4Material* ,206 G4double G4DNADingfelderChargeIncreaseModel::CrossSectionPerVolume(const G4Material* material, 241 207 const G4ParticleDefinition* particleDefinition, 242 208 G4double k, … … 266 232 G4double totalCrossSection = 0.; 267 233 268 if ( flagMaterialIsWater)234 if (material->GetName() == "G4_WATER") 269 235 { 270 236 const G4String& particleName = particleDefinition->GetParticleName(); … … 315 281 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 316 282 G4cout << " - Cross section per water molecule (cm^2)=" << totalCrossSection/cm/cm << G4endl; 317 G4cout << " - Cross section per water molecule (cm^-1)=" << totalCrossSection* densityWater/(1./cm) << G4endl;283 G4cout << " - Cross section per water molecule (cm^-1)=" << totalCrossSection*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 318 284 } 319 285 320 } // if (flagMaterialIsWater)321 322 return totalCrossSection* densityWater;286 } 287 288 return totalCrossSection*material->GetAtomicNumDensityVector()[1]; 323 289 324 290 } … … 339 305 340 306 G4ParticleDefinition* definition = aDynamicParticle->GetDefinition(); 341 307 308 G4double particleMass = definition->GetPDGMass(); 309 342 310 G4double inK = aDynamicParticle->GetKineticEnergy(); 343 311 … … 353 321 G4double electronK; 354 322 if (definition == instance->GetIon("hydrogen")) electronK = inK*electron_mass_c2/proton_mass_c2; 355 else electronK = inK*electron_mass_c2/( 3728*MeV);323 else electronK = inK*electron_mass_c2/(particleMass); 356 324 357 325 if (outK<0) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAElastic.cc
r1228 r1315 25 25 // 26 26 // $Id: G4DNAElastic.cc,v 1.3 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4DNAElastic.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAEmfietzoglouExcitationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAEmfietzoglouExcitationModel.cc,v 1. 8 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAEmfietzoglouExcitationModel.cc,v 1.10 2010/06/08 21:50:00 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 45 45 SetLowEnergyLimit(lowEnergyLimit); 46 46 SetHighEnergyLimit(highEnergyLimit); 47 48 nLevels = waterExcitation.NumberOfLevels(); 47 49 48 50 verboseLevel= 0; … … 97 99 98 100 // 99 100 nLevels = waterExcitation.NumberOfLevels();101 102 //103 101 if( verboseLevel>0 ) 104 102 { … … 122 120 // InitialiseElementSelectors(particle,cuts); 123 121 124 // Test if water material 125 126 flagMaterialIsWater= false; 127 densityWater = 0; 128 129 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable(); 130 131 if(theCoupleTable) 132 { 133 G4int numOfCouples = theCoupleTable->GetTableSize(); 134 135 if(numOfCouples>0) 136 { 137 for (G4int i=0; i<numOfCouples; i++) 138 { 139 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); 140 const G4Material* material = couple->GetMaterial(); 141 142 if (material->GetName() == "G4_WATER") 143 { 144 G4double density = material->GetAtomicNumDensityVector()[1]; 145 flagMaterialIsWater = true; 146 densityWater = density; 147 148 if (verboseLevel > 3) 149 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 150 } 151 152 } 153 154 } // if(numOfCouples>0) 155 156 } // if (theCoupleTable) 157 158 } 159 160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 161 162 G4double G4DNAEmfietzoglouExcitationModel::CrossSectionPerVolume(const G4Material*, 122 } 123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 126 G4double G4DNAEmfietzoglouExcitationModel::CrossSectionPerVolume(const G4Material* material, 163 127 const G4ParticleDefinition* particleDefinition, 164 128 G4double ekin, … … 173 137 G4double sigma=0; 174 138 175 if ( flagMaterialIsWater)139 if (material->GetName() == "G4_WATER") 176 140 { 177 141 … … 188 152 G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl; 189 153 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 190 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma* densityWater/(1./cm) << G4endl;154 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 191 155 } 192 156 193 } // if (flagMaterialIsWater)194 195 return sigma* densityWater;157 } 158 159 return sigma*material->GetAtomicNumDensityVector()[1]; 196 160 } 197 161 … … 271 235 sigma = excitationSigma / density; 272 236 } 237 273 238 return sigma; 274 239 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAExcitation.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAExcitation.cc,v 1. 3 2009/03/04 13:28:49sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAExcitation.cc,v 1.4 2010/03/27 11:32:41 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4DNAExcitation.hh" … … 76 76 if(name == "e-") 77 77 { 78 79 // First model 80 78 81 if(!Model()) SetModel(new G4DNAEmfietzoglouExcitationModel); 79 82 Model()->SetLowEnergyLimit(8.23*eV); 80 83 Model()->SetHighEnergyLimit(10*MeV); 81 84 85 // Alternative model 86 /* 87 if(!Model()) SetModel(new G4DNABornExcitationModel); 88 Model()->SetLowEnergyLimit(9*eV); 89 Model()->SetHighEnergyLimit(1*MeV); 90 */ 82 91 AddEmModel(1, Model()); 83 92 } … … 91 100 if(!Model(2)) SetModel(new G4DNABornExcitationModel,2); 92 101 Model(2)->SetLowEnergyLimit(500*keV); 93 Model(2)->SetHighEnergyLimit(10 *MeV);102 Model(2)->SetHighEnergyLimit(100*MeV); 94 103 95 104 AddEmModel(1, Model(1)); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAGenericIonsManager.cc
r1228 r1315 25 25 // 26 26 // $Id: G4DNAGenericIonsManager.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4DNAGenericIonsManager.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAIonisation.cc
r1228 r1315 25 25 // 26 26 // $Id: G4DNAIonisation.cc,v 1.4 2009/11/02 17:00:11 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4DNAIonisation.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAMillerGreenExcitationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAMillerGreenExcitationModel.cc,v 1. 6 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAMillerGreenExcitationModel.cc,v 1.9 2010/06/08 21:50:00 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 210 210 // InitialiseElementSelectors(particle,cuts); 211 211 212 // Test if water material213 214 flagMaterialIsWater= false;215 densityWater = 0;216 217 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();218 219 if(theCoupleTable)220 {221 G4int numOfCouples = theCoupleTable->GetTableSize();222 223 if(numOfCouples>0)224 {225 for (G4int i=0; i<numOfCouples; i++)226 {227 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);228 const G4Material* material = couple->GetMaterial();229 230 if (material->GetName() == "G4_WATER")231 {232 G4double density = material->GetAtomicNumDensityVector()[1];233 flagMaterialIsWater = true;234 densityWater = density;235 236 if (verboseLevel > 3)237 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;238 }239 240 }241 242 } // if(numOfCouples>0)243 244 } // if (theCoupleTable)245 246 212 } 247 213 … … 278 244 G4double crossSection = 0.; 279 245 280 if ( flagMaterialIsWater)246 if (material->GetName() == "G4_WATER") 281 247 { 282 248 const G4String& particleName = particleDefinition->GetParticleName(); … … 317 283 G4double tmp =0.; 318 284 319 if (k*0.511/3728 > 7.4*eV && k*0.511/3728 < 10*keV) sigmaExcitation = 320 excitationXS->CrossSectionPerVolume(material,particleDefinition,k*0.511/3728,tmp,tmp)/densityWater; 285 if (k*0.511/3728 > 8.23*eV && k*0.511/3728 < 10*MeV ) sigmaExcitation = 286 excitationXS->CrossSectionPerVolume(material,G4Electron::ElectronDefinition(),k*0.511/3728,tmp,tmp) 287 /material->GetAtomicNumDensityVector()[1]; 321 288 322 289 if ( particleDefinition == instance->GetIon("alpha+") ) … … 335 302 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 336 303 G4cout << " - Cross section per water molecule (cm^2)=" << crossSection/cm/cm << G4endl; 337 G4cout << " - Cross section per water molecule (cm^-1)=" << crossSection* densityWater/(1./cm) << G4endl;304 G4cout << " - Cross section per water molecule (cm^-1)=" << crossSection*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 338 305 } 339 306 340 } // if (flagMaterialIsWater)341 342 return crossSection* densityWater;307 } 308 309 return crossSection*material->GetAtomicNumDensityVector()[1]; 343 310 344 311 } … … 485 452 G4double sigmaExcitation=0; 486 453 487 if (k*0.511/3728 > 7.4*eV && k*0.511/3728 < 10*keV) sigmaExcitation = excitationXS->PartialCrossSection(k*0.511/3728,i);454 if (k*0.511/3728 > 8.23*eV && k*0.511/3728 < 10*MeV ) sigmaExcitation = excitationXS->PartialCrossSection(k*0.511/3728,i); 488 455 489 456 G4double partial = PartialCrossSection(k,i,particle); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNARuddIonisationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNARuddIonisationModel.cc,v 1.1 0 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNARuddIonisationModel.cc,v 1.17 2010/04/07 20:08:31 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 271 271 // InitialiseElementSelectors(particle,cuts); 272 272 273 // Test if water material274 275 flagMaterialIsWater= false;276 densityWater = 0;277 278 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();279 280 if(theCoupleTable)281 {282 G4int numOfCouples = theCoupleTable->GetTableSize();283 284 if(numOfCouples>0)285 {286 for (G4int i=0; i<numOfCouples; i++)287 {288 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);289 const G4Material* material = couple->GetMaterial();290 291 if (material->GetName() == "G4_WATER")292 {293 G4double density = material->GetAtomicNumDensityVector()[1];294 flagMaterialIsWater = true;295 densityWater = density;296 297 if (verboseLevel > 3)298 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;299 }300 301 }302 303 } // if(numOfCouples>0)304 305 } // if (theCoupleTable)306 307 273 } 308 274 309 275 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 310 276 311 G4double G4DNARuddIonisationModel::CrossSectionPerVolume(const G4Material* ,277 G4double G4DNARuddIonisationModel::CrossSectionPerVolume(const G4Material* material, 312 278 const G4ParticleDefinition* particleDefinition, 313 279 G4double k, … … 355 321 G4double sigma=0; 356 322 357 if ( flagMaterialIsWater)323 if (material->GetName() == "G4_WATER") 358 324 { 359 325 const G4String& particleName = particleDefinition->GetParticleName(); … … 421 387 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 422 388 G4cout << " - Cross section per water molecule (cm^2)=" << tmp1/cm/cm << G4endl; 423 G4cout << " - Cross section per water molecule (cm^-1)=" << tmp1*densityWater/(1./cm) << G4endl; 389 G4cout << " - Cross section per water molecule (cm^-1)=" << 390 tmp1*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 424 391 } 425 return tmp1* densityWater;392 return tmp1*material->GetAtomicNumDensityVector()[1]; 426 393 } 427 394 … … 434 401 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 435 402 G4cout << " - Cross section per water molecule (cm^2)=" << tmp2/cm/cm << G4endl; 436 G4cout << " - Cross section per water molecule (cm^-1)=" << tmp2*densityWater/(1./cm) << G4endl; 403 G4cout << " - Cross section per water molecule (cm^-1)=" << tmp2* 404 material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 437 405 } 438 return tmp2* densityWater;406 return tmp2*material->GetAtomicNumDensityVector()[1]; 439 407 } 440 408 } … … 454 422 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 455 423 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 456 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*densityWater/(1./cm) << G4endl; 424 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma* 425 material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 457 426 } 458 427 459 428 } // if (waterMaterial) 460 429 461 return sigma* densityWater;430 return sigma*material->GetAtomicNumDensityVector()[1]; 462 431 463 432 } … … 562 531 fvect->push_back(dp); 563 532 564 /*565 // creating neutral water molechule...566 567 G4DNAGenericMoleculeManager *instance;568 instance = G4DNAGenericMoleculeManager::Instance();569 G4ParticleDefinition* waterDef = NULL;570 G4Molecule* water = instance->GetMolecule("H2O");571 waterDef = (G4ParticleDefinition*)water;572 573 direction.set(0.,0.,0.);574 575 //G4DynamicParticle* dynamicWater = new G4DynamicParticle(waterDef, direction, bindingEnergy);576 G4DynamicMolecule* dynamicWater = new G4DynamicMolecule(water, direction, bindingEnergy);577 //dynamicWater->RemoveElectron(ionizationShell, 1);578 579 G4DynamicMolecule* dynamicWater2 = new G4DynamicMolecule(water, direction, bindingEnergy);580 G4DynamicMolecule* dynamicWater3 = new G4DynamicMolecule(water, direction, bindingEnergy);581 // insertion inside secondaries582 583 fvect->push_back(dynamicWater);584 fvect->push_back(dynamicWater2);585 fvect->push_back(dynamicWater3);586 */587 533 } 588 534 … … 623 569 G4double crossSectionMaximum = 0.; 624 570 625 for(G4double value=waterStructure.IonisationEnergy(shell); value<= 4.*waterStructure.IonisationEnergy(shell); value+=0.1*eV)571 for(G4double value=waterStructure.IonisationEnergy(shell); value<=5.*waterStructure.IonisationEnergy(shell) && k>=value ; value+=0.1*eV) 626 572 { 627 573 G4double differentialCrossSection = DifferentialCrossSection(particleDefinition, k, value, shell); … … 710 656 G4double alphaConst ; 711 657 658 const G4double Bj[5] = {12.61*eV, 14.73*eV, 18.55*eV, 32.20*eV, 539.7*eV}; 659 712 660 if (j == 4) 713 661 { … … 746 694 747 695 G4double wBig = (energyTransfer - waterStructure.IonisationEnergy(ionizationLevelIndex)); 748 G4double w = wBig / waterStructure.IonisationEnergy(ionizationLevelIndex); 696 if (wBig<0) return 0.; 697 698 G4double w = wBig / Bj[ionizationLevelIndex]; 749 699 G4double Ry = 13.6*eV; 750 700 … … 764 714 } 765 715 766 G4double S = 4.*pi * Bohr_radius*Bohr_radius * n * std::pow((Ry/ waterStructure.IonisationEnergy(ionizationLevelIndex)),2);767 G4double v2 = tau / waterStructure.IonisationEnergy(ionizationLevelIndex);716 G4double S = 4.*pi * Bohr_radius*Bohr_radius * n * std::pow((Ry/Bj[ionizationLevelIndex]),2); 717 G4double v2 = tau / Bj[ionizationLevelIndex]; 768 718 G4double v = std::sqrt(v2); 769 G4double wc = 4.*v2 - 2.*v - (Ry/(4.* waterStructure.IonisationEnergy(ionizationLevelIndex)));719 G4double wc = 4.*v2 - 2.*v - (Ry/(4.*Bj[ionizationLevelIndex])); 770 720 771 721 G4double L1 = (C1* std::pow(v,(D1))) / (1.+ E1*std::pow(v, (D1+4.))); … … 777 727 G4double F2 = (L2*H2)/(L2+H2); 778 728 779 G4double sigma = CorrectionFactor(particleDefinition, k/eV) 780 * Gj[j] * (S/waterStructure.IonisationEnergy(ionizationLevelIndex)) 729 G4double sigma = CorrectionFactor(particleDefinition, k) 730 * Gj[j] * (S/Bj[ionizationLevelIndex]) 731 * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) ); 732 733 if ( (particleDefinition == instance->GetIon("hydrogen")) && (ionizationLevelIndex==4)) 734 735 sigma = Gj[j] * (S/Bj[ionizationLevelIndex]) 781 736 * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) ); 782 737 … … 823 778 ) 824 779 { 825 sigma = Gj[j] * (S/ waterStructure.IonisationEnergy(ionizationLevelIndex)) * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) );780 sigma = Gj[j] * (S/Bj[ionizationLevelIndex]) * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) ); 826 781 827 782 G4double zEff = particleDefinition->GetPDGCharge() / eplus + particleDefinition->GetLeptonNumber(); … … 916 871 if (particleDefinition == instance->GetIon("hydrogen")) 917 872 { 918 G4double value = (std::log (k/eV)-4.2)/0.5;873 G4double value = (std::log10(k/eV)-4.2)/0.5; 919 874 return((0.8/(1+std::exp(value))) + 0.9); 920 875 } … … 932 887 // BEGIN PART 1/2 OF ELECTRON CORRECTION 933 888 934 // add ONE or TWO electron-water excitation for alpha+ and helium889 // add ONE or TWO electron-water ionisation for alpha+ and helium 935 890 936 891 G4DNAGenericIonsManager *instance; 937 892 instance = G4DNAGenericIonsManager::Instance(); 938 893 G4double kElectron(0); 939 G4double electronComponent(0); 894 940 895 G4DNACrossSectionDataSet * electronDataset = new G4DNACrossSectionDataSet (new G4LogLogInterpolation, eV, (1./3.343e22)*m*m); 941 896 … … 949 904 kElectron = k * 0.511/3728; 950 905 951 electronComponent = electronDataset->FindValue(kElectron);952 953 906 } 954 955 delete electronDataset;956 907 957 908 // END PART 1/2 OF ELECTRON CORRECTION … … 982 933 983 934 // BEGIN PART 2/2 OF ELECTRON CORRECTION 984 935 // Use only electron partial cross sections 936 985 937 if (particle == instance->GetIon("alpha+")->GetParticleName()) 986 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + electron Component; }987 938 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + electronDataset->GetComponent(i)->FindValue(kElectron); } 939 988 940 if (particle == instance->GetIon("helium")->GetParticleName()) 989 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + 2*electron Component; }990 941 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + 2*electronDataset->GetComponent(i)->FindValue(kElectron); } 942 991 943 // BEGIN PART 2/2 OF ELECTRON CORRECTION 992 944 … … 1001 953 { 1002 954 i--; 955 1003 956 1004 957 if (valuesBuffer[i] > value) 1005 958 { 1006 959 delete[] valuesBuffer; 960 961 if (electronDataset) delete electronDataset; 962 1007 963 return i; 1008 964 } … … 1018 974 G4Exception("G4DNARuddIonisationModel::RandomSelect: attempting to calculate cross section for wrong particle"); 1019 975 } 976 977 delete electronDataset; 1020 978 1021 979 return level; -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAScreenedRutherfordElasticModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAScreenedRutherfordElasticModel.cc,v 1. 9 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNAScreenedRutherfordElasticModel.cc,v 1.10 2010/01/07 18:10:50 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 152 152 // InitialiseElementSelectors(particle,cuts); 153 153 154 // Test if water material 155 156 flagMaterialIsWater= false; 157 densityWater = 0; 158 159 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable(); 160 161 if(theCoupleTable) 162 { 163 G4int numOfCouples = theCoupleTable->GetTableSize(); 164 165 if(numOfCouples>0) 166 { 167 for (G4int i=0; i<numOfCouples; i++) 168 { 169 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); 170 const G4Material* material = couple->GetMaterial(); 171 172 if (material->GetName() == "G4_WATER") 173 { 174 G4double density = material->GetAtomicNumDensityVector()[1]; 175 flagMaterialIsWater = true; 176 densityWater = density; 177 178 if (verboseLevel > 3) 179 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 180 } 181 182 } 183 184 } // if(numOfCouples>0) 185 186 } // if (theCoupleTable) 187 188 } 189 190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 191 192 G4double G4DNAScreenedRutherfordElasticModel::CrossSectionPerVolume(const G4Material*, 154 } 155 156 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 157 158 G4double G4DNAScreenedRutherfordElasticModel::CrossSectionPerVolume(const G4Material* material, 193 159 const G4ParticleDefinition*, 194 160 G4double ekin, … … 203 169 G4double sigma=0; 204 170 205 if ( flagMaterialIsWater)171 if (material->GetName() == "G4_WATER") 206 172 { 207 173 … … 223 189 G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl; 224 190 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 225 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma* densityWater/(1./cm) << G4endl;191 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 226 192 } 227 193 228 } // if (flagMaterialIsWater)229 230 return sigma* densityWater;194 } 195 196 return sigma*material->GetAtomicNumDensityVector()[1]; 231 197 } 232 198 -
trunk/source/processes/electromagnetic/lowenergy/src/G4DopplerProfile.cc
r1228 r1315 26 26 // 27 27 // $Id: G4DopplerProfile.cc,v 1.3 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DummyFinalState.cc
r1228 r1315 26 26 // 27 27 // $Id: G4DummyFinalState.cc,v 1.2 2007/10/15 08:36:35 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4EMDataSet.cc
r1228 r1315 26 26 // 27 27 // $Id: G4EMDataSet.cc,v 1.20 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeDecrease.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateChargeDecrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateChargeDecrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeIncrease.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateChargeIncrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateChargeIncrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeTransferProton.cc
r1228 r1315 26 26 // 27 27 // $Id: G4FinalStateChargeTransferProton.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticBrennerZaider.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateElasticBrennerZaider.cc,v 1.11 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateElasticBrennerZaider.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticChampion.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateElasticChampion.cc,v 1.10 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticScreenedRutherford.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateElasticScreenedRutherford.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationBorn.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateExcitationBorn.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateExcitationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationEmfietzoglou.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateExcitationEmfietzoglou.cc,v 1.8 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateExcitationEmfietzoglou.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationMillerGreen.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateExcitationMillerGreen.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateExcitationMillerGreen.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateIonisationBorn.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateIonisationBorn.cc,v 1.19 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateIonisationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateIonisationRudd.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStateIonisationRudd.cc,v 1.11 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateIonisationRudd.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateKill.cc
r1228 r1315 26 26 // 27 27 // $Id: G4FinalStateKill.cc,v 1.1 2007/11/09 20:26:12 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateProduct.cc
r1228 r1315 26 26 // 27 27 // $Id: G4FinalStateProduct.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStatePsCreationChampion.cc
r1228 r1315 25 25 // 26 26 // $Id: G4FinalStatePsCreationChampion.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FluoTransition.cc
r1228 r1315 26 26 // 27 27 // $Id: G4FluoTransition.cc,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/src/G4LinInterpolation.cc
r1228 r1315 26 26 // 27 27 // $Id: G4LinInterpolation.cc,v 1.5 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreBremsstrahlungModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreBremsstrahlungModel.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreComptonModel.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreGammaConversionModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreGammaConversionModel.cc,v 1.8 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreIonisationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreIonisationModel.cc,v 1. 7 2009/10/23 09:30:08pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4LivermoreIonisationModel.cc,v 1.8 2010/03/26 09:32:50 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 85 85 // 86 86 verboseLevel = 0; 87 //88 87 //By default: use deexcitation, not auger 89 88 SetDeexcitationFlag(true); 90 89 ActivateAuger(false); 91 90 // 92 91 // 93 92 // Notice: the fluorescence along step is generated only if it is -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePhotoElectricModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePhotoElectricModel.cc,v 1. 9 2009/10/23 09:31:03pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4LivermorePhotoElectricModel.cc,v 1.11 2010/03/26 09:32:50 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // … … 43 43 // - atomic deexcitation managed via G4VEmModel::DeexcitationFlag() is 44 44 // set as "true" (default would be false) 45 // 45 // 15 Mar 2010 L Pandola 46 // - removed methods to set explicitely fluorescence cuts. 47 // Main cuts from G4ProductionCutsTable are always used 48 // 46 49 47 50 #include "G4LivermorePhotoElectricModel.hh" … … 62 65 // SetLowEnergyLimit(lowEnergyLimit); 63 66 SetHighEnergyLimit(highEnergyLimit); 64 65 //Set atomic deexcitation by default 66 SetDeexcitationFlag(true); 67 ActivateAuger(false); 68 67 69 68 verboseLevel= 0; 70 69 // Verbosity scale: … … 74 73 // 3 = calculation of cross sections, file openings, sampling of atoms 75 74 // 4 = entering in methods 75 76 //Set atomic deexcitation by default 77 SetDeexcitationFlag(true); 78 ActivateAuger(false); 79 76 80 if(verboseLevel>0) { 77 81 G4cout << "Livermore PhotoElectric is constructed " << G4endl … … 125 129 shellCrossSectionHandler->LoadShellData(shellCrossSectionFile); 126 130 127 // SI - Simple generator is buggy 128 //generatorName = "geant4.6.2"; 129 //ElectronAngularGenerator = new G4PhotoElectricAngularGeneratorSimple("GEANTSimpleGenerator"); // default generator 131 // default generator 130 132 ElectronAngularGenerator = 131 133 new G4PhotoElectricAngularGeneratorSauterGavrila("GEANTSauterGavrilaGenerator"); … … 298 300 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 299 301 300 void G4LivermorePhotoElectricModel::SetCutForLowEnSecPhotons(G4double cut) 301 { 302 cutForLowEnergySecondaryPhotons = cut; 303 deexcitationManager.SetCutForSecondaryPhotons(cut); 304 } 305 306 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 307 308 void G4LivermorePhotoElectricModel::SetCutForLowEnSecElectrons(G4double cut) 309 { 310 cutForLowEnergySecondaryElectrons = cut; 311 deexcitationManager.SetCutForAugerElectrons(cut); 312 } 313 314 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 315 316 void G4LivermorePhotoElectricModel::ActivateAuger(G4bool val) 317 { 318 deexcitationManager.ActivateAugerElectronProduction(val); 302 void G4LivermorePhotoElectricModel::ActivateAuger(G4bool augerbool) 303 { 304 if (!DeexcitationFlag() && augerbool) 305 { 306 G4cout << "WARNING - G4PenelopePhotoElectricModel" << 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; 319 313 } 320 314 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedComptonModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1.6 2009/05/03 08:29:55 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // History: -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedRayleighModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1.5 2009/05/02 15:20:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // History: -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreRayleighModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LivermoreRayleighModel.cc,v 1.8 2009/09/23 16:54:06 flongo Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Sebastien Inserti -
trunk/source/processes/electromagnetic/lowenergy/src/G4LogLogInterpolation.cc
r1228 r1315 26 26 // 27 27 // $Id: G4LogLogInterpolation.cc,v 1.16 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyBremsstrahlung.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LowEnergyBremsstrahlung.cc,v 1.74 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyCompton.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LowEnergyCompton.cc,v 1.50 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyGammaConversion.cc
r1228 r1315 27 27 /// 28 28 // $Id: G4LowEnergyGammaConversion.cc,v 1.39 2009/06/11 15:47:08 mantero Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyIonisation.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LowEnergyIonisation.cc,v 1.106 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPhotoElectric.cc
r1228 r1315 26 26 // 27 27 // $Id: G4LowEnergyPhotoElectric.cc,v 1.59 2009/06/11 15:47:08 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPolarizedCompton.cc
r1228 r1315 26 26 // 27 27 // $Id: G4LowEnergyPolarizedCompton.cc,v 1.28 2009/06/11 15:47:08 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPolarizedRayleigh.cc
r1228 r1315 25 25 // 26 26 // $Id: G4LowEnergyPolarizedRayleigh.cc,v 1.10 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyRayleigh.cc
r1228 r1315 27 27 // 28 28 // $Id: G4LowEnergyRayleigh.cc,v 1.40 2009/06/11 15:47:08 mantero Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/src/G4OrlicLiCrossSection.cc
r1197 r1315 24 24 // ******************************************************************** 25 25 // 26 //$Id: G4OrlicLiCrossSection.cc,v 1. 4 2009/11/11 09:14:53mantero Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 //$Id: G4OrlicLiCrossSection.cc,v 1.5 2010/06/06 23:40:35 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Haifa Ben Abdelouahed … … 36 36 // 21 Apr 2009 ALF Some correction for compatibility to G4VShellCrossSection 37 37 // and changed name to G4OrlicLiCrossSection 38 // 11 Nov 2009 ALF update and code cleaning for the Dec Release39 38 // 40 39 // ------------------------------------------------------------------- … … 200 199 else 201 200 { 202 G4cout << "ERROR: L1 Cross-Section exist only for ZTarget between 41and 92!!! " << G4endl;201 G4cout << "ERROR: L1 Cross-Section exist only for ZTarget between 14 and 92!!! " << G4endl; 203 202 204 203 } … … 326 325 else 327 326 { 328 G4cout << "ERROR: L2 Cross-Section exist only for ZTarget between 41and 92!!! " << G4endl;327 G4cout << "ERROR: L2 Cross-Section exist only for ZTarget between 14 and 92!!! " << G4endl; 329 328 330 329 } … … 446 445 else 447 446 { 448 G4cout << "ERROR: L3 Cross-Section exist only for ZTarget between 41and 92!!! " << G4endl;447 G4cout << "ERROR: L3 Cross-Section exist only for ZTarget between 14 and 92!!! " << G4endl; 449 448 450 449 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4PaulKCrossSection.cc
r1228 r1315 25 25 // 26 26 // 27 // History: 28 // ----------- 29 // 21 Apr 2008 H. Abdelohauwed - 1st implementation 30 // 29 Apr 2009 ALF Major Design Revision 31 // 32 // ------------------------------------------------------------------- 33 34 // Class description: 35 // Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell 36 // Further documentation available from http://www.ge.infn.it/geant4/lowE 37 38 // ------------------------------------------------------------------- 27 39 28 40 #include "globals.hh" … … 30 42 #include <fstream> 31 43 #include <iomanip> 32 #include "G4CompositeEMDataSet.hh"33 #include "G4ShellEMDataSet.hh"44 //#include "G4CompositeEMDataSet.hh" 45 //#include "G4ShellEMDataSet.hh" 34 46 #include "G4EMDataSet.hh" 35 #include "G4VEMDataSet.hh"36 #include "G4VDataSetAlgorithm.hh"47 //#include "G4VEMDataSet.hh" 48 //#include "G4VDataSetAlgorithm.hh" 37 49 #include "G4LogLogInterpolation.hh" 38 50 #include "G4PaulKCrossSection.hh" 51 #include "G4Proton.hh" 52 #include "G4Alpha.hh" 53 39 54 40 55 G4PaulKCrossSection::G4PaulKCrossSection() 41 { } 56 { 57 58 59 interpolation = new G4LogLogInterpolation(); 60 61 /* 62 G4String path = getenv("G4LEDATA"); 63 64 if (!path) 65 G4Exception("G4paulKCrossSection::G4paulKCrossSection: G4LEDATA environment variable not set"); 66 G4cout << path + "/kcsPaul/kcs-" << G4endl; 67 */ 68 69 70 for (G4int i=4; i<93; i++) { 71 protonDataSetMap[i] = new G4EMDataSet(i,interpolation); 72 protonDataSetMap[i]->LoadData("pixe/kpcsPaul/kcs-"); 73 } 74 for (G4int i=6; i<93; i++) { 75 alphaDataSetMap[i] = new G4EMDataSet(i,interpolation); 76 alphaDataSetMap[i]->LoadData("pixe/kacsPaul/kacs-"); 77 } 78 79 80 81 82 } 42 83 43 84 G4PaulKCrossSection::~G4PaulKCrossSection() 44 { }85 { 45 86 46 G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4int zIncident, G4double energyIncident) 87 protonDataSetMap.clear(); 88 alphaDataSetMap.clear(); 89 90 } 91 92 G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident) 47 93 { 48 94 49 G4String fileName; 95 G4Proton* aProtone = G4Proton::Proton(); 96 G4Alpha* aAlpha = G4Alpha::Alpha(); 97 98 G4double sigma = 0; 50 99 51 if (zIncident == 1) 52 { fileName = "kcsPaul/kcs-";} 100 if (massIncident == aProtone->GetPDGMass() ) 101 { 102 103 sigma = protonDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn; 104 105 } 53 106 else 54 107 { 55 if (zIncident == 2) 56 { fileName = "kacsPaul/kacs-";} 57 108 if (massIncident == aAlpha->GetPDGMass()) 109 { 110 111 sigma = alphaDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn; 112 113 } 114 else 115 { 116 G4cout << "we can treat only Proton or Alpha incident particles " << G4endl; 117 sigma = 0.; 118 } 58 119 } 59 60 120 61 G4VDataSetAlgorithm* interpolation = new G4LogLogInterpolation();62 63 G4VEMDataSet* dataSet;64 65 dataSet = new G4EMDataSet(zTarget,interpolation);66 121 67 dataSet->LoadData(fileName); 68 69 70 G4double sigma = dataSet->FindValue(energyIncident/MeV) / barn; 71 72 return sigma; 122 123 return sigma; 73 124 } 74 125 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeAnnihilationModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeAnnihilationModel.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlung.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeBremsstrahlung.cc,v 1.21 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungAngular.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeBremsstrahlungAngular.cc,v 1.8 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.12 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeBremsstrahlungModel.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeCompton.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeCompton.cc,v 1.36 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeComptonModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeComptonModel.cc,v 1. 8 2009/10/23 09:29:24pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PenelopeComptonModel.cc,v 1.9 2010/03/26 09:32:50 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 81 81 ZForIntegration = 1; 82 82 83 //by default, the model will use atomic deexcitation84 SetDeexcitationFlag(true);85 ActivateAuger(false);86 87 83 verboseLevel= 0; 88 84 // Verbosity scale: … … 92 88 // 3 = calculation of cross sections, file openings, sampling of atoms 93 89 // 4 = entering in methods 90 91 //by default, the model will use atomic deexcitation 92 SetDeexcitationFlag(true); 93 ActivateAuger(false); 94 94 95 95 //These vectors do not change when materials or cut change. -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeGammaConversionModel.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeGammaConversionModel.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisation.cc
r1228 r1315 25 25 // 26 26 // $Id: G4PenelopeIonisation.cc,v 1.22 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisationModel.cc,v 1.1 0 2009/10/23 09:29:24pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PenelopeIonisationModel.cc,v 1.16 2010/04/29 07:28:50 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 42 42 // G4VEmModel::DeexcitationFlag() 43 43 // Add ActivateAuger() method 44 // 15 Mar 2010 L Pandola Explicitely initialize Auger to false 45 // 29 Mar 2010 L Pandola Added a dummy ComputeCrossSectionPerAtom() method issueing a 46 // warning if users try to access atomic cross sections via 47 // G4EmCalculator 48 // 15 Apr 2010 L. Pandola Implemented model's own version of MinEnergyCut() 49 // 23 Apr 2010 L. Pandola Removed InitialiseElementSelectors() call. Useless here and 50 // triggers fake warning messages 44 51 // 45 52 … … 80 87 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 81 88 // 82 // Atomic deexcitation model activated by default 83 SetDeexcitationFlag(true); 89 // 84 90 verboseLevel= 0; 85 91 … … 90 96 // 3 = calculation of cross sections, file openings, sampling of atoms 91 97 // 4 = entering in methods 98 99 // Atomic deexcitation model activated by default 100 SetDeexcitationFlag(true); 101 ActivateAuger(false); 92 102 93 103 //These vectors do not change when materials or cut change. … … 140 150 141 151 void G4PenelopeIonisationModel::Initialise(const G4ParticleDefinition* particle, 142 const G4DataVector& cuts)152 const G4DataVector& ) 143 153 { 144 154 if (verboseLevel > 3) … … 175 185 //This is used to retrieve cross section values later on 176 186 crossSectionHandler->BuildMeanFreePathForMaterials(); 177 178 InitialiseElementSelectors(particle,cuts);179 187 180 188 if (verboseLevel > 2) … … 280 288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 281 289 290 //This is a dummy method. Never inkoved by the tracking, it just issues 291 //a warning if one tries to get Cross Sections per Atom via the 292 //G4EmCalculator. 293 G4double G4PenelopeIonisationModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 294 G4double, 295 G4double, 296 G4double, 297 G4double, 298 G4double) 299 { 300 G4cout << "*** G4PenelopeIonisationModel -- WARNING ***" << G4endl; 301 G4cout << "Penelope Ionisation model does not calculate cross section _per atom_ " << G4endl; 302 G4cout << "so the result is always zero. For physics values, please invoke " << G4endl; 303 G4cout << "GetCrossSectionPerVolume() or GetMeanFreePath() via the G4EmCalculator" << G4endl; 304 return 0; 305 } 306 307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 308 282 309 G4double G4PenelopeIonisationModel::ComputeDEDXPerVolume(const G4Material* material, 283 310 const G4ParticleDefinition* theParticle, … … 348 375 } 349 376 return sPower; 377 } 378 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 380 381 G4double G4PenelopeIonisationModel::MinEnergyCut(const G4ParticleDefinition*, 382 const G4MaterialCutsCouple*) 383 { 384 return fIntrinsicLowEnergyLimit; 350 385 } 351 386 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectric.cc
r1228 r1315 26 26 // 27 27 // $Id: G4PenelopePhotoElectric.cc,v 1.16 2009/06/11 15:47:08 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: L. Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectricModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopePhotoElectricModel.cc,v 1.1 0 2009/10/23 09:29:24pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PenelopePhotoElectricModel.cc,v 1.12 2010/03/26 09:32:50 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 46 46 // 21 Oct 2009 L Pandola Remove un-necessary fUseAtomicDeexcitation flag - now managed by 47 47 // G4VEmModel::DeexcitationFlag() 48 // 15 Mar 2010 L Pandola Explicitely initialize Auger to false 48 49 // 49 50 … … 75 76 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 76 77 // 77 //by default the model will inkove the atomic deexcitation78 SetDeexcitationFlag(true);79 80 78 verboseLevel= 0; 81 79 // Verbosity scale: … … 85 83 // 3 = calculation of cross sections, file openings, sampling of atoms 86 84 // 4 = entering in methods 85 86 //by default the model will inkove the atomic deexcitation 87 SetDeexcitationFlag(true); 88 ActivateAuger(false); 87 89 } 88 90 … … 252 254 // In such cases do not generate secondaries 253 255 if (eKineticEnergy > 0.) 254 { 255 //Now check if the electron is above cuts: if so, it is created explicitely 256 //VI: checking cut here provides inconsistency in testing 257 // if (eKineticEnergy > cutE) 256 { 258 257 // The electron is created 259 258 // Direction sampled from the Sauter distribution … … 271 270 fvect->push_back(electron); 272 271 } 273 // else274 // {275 // localEnergyDeposit += eKineticEnergy;276 // eKineticEnergy = 0;277 // }278 // }279 272 else 280 273 { -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeRayleigh.cc
r1228 r1315 27 27 // 28 28 // $Id: G4PenelopeRayleigh.cc,v 1.19 2009/06/11 15:47:08 mantero Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3$29 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 30 30 // 31 31 // Author: L. Pandola (luciano.pandola@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeRayleighModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeRayleighModel.cc,v 1. 6 2009/06/11 15:47:08 manteroExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PenelopeRayleighModel.cc,v 1.7 2009/12/21 12:49:01 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 37 37 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 38 38 // PrepareConstants(), since they might be checked later on 39 // 18 Dec 2009 L Pandola Added a dummy ComputeCrossSectionPerAtom() method issueing a 40 // warning if users try to access atomic cross sections via 41 // G4EmCalculator 39 42 // 40 43 … … 190 193 G4int atomsPerMolecule = 0; 191 194 for (G4int k=0;k<nElements;k++) 195 { 192 196 atomsPerMolecule += stechiometric[k]; 197 if (verboseLevel > 2) 198 { 199 G4cout << "Element: " << (G4int) (*elementVector)[k]->GetZ() << " has " << 200 stechiometric[k] << " atoms/molecule" << G4endl; 201 } 202 } 193 203 if (atomsPerMolecule) 194 204 { … … 203 213 } 204 214 } 205 215 206 216 if (verboseLevel > 2) 207 217 { … … 221 231 return cross; 222 232 } 233 234 235 //This is a dummy method. Never inkoved by the tracking, it just issues 236 //a warning if one tries to get Cross Sections per Atom via the 237 //G4EmCalculator. 238 G4double G4PenelopeRayleighModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 239 G4double, 240 G4double, 241 G4double, 242 G4double, 243 G4double) 244 { 245 G4cout << "*** G4PenelopeRayleighModel -- WARNING ***" << G4endl; 246 G4cout << "Penelope Rayleigh model does not calculate cross section _per atom_ " << G4endl; 247 G4cout << "so the result is always zero. For physics values, please invoke " << G4endl; 248 G4cout << "GetCrossSectionPerVolume() or GetMeanFreePath() via the G4EmCalculator" << G4endl; 249 return 0; 250 } 251 223 252 224 253 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/lowenergy/src/G4RangeTest.cc
r1228 r1315 26 26 // 27 27 // $Id: G4RangeTest.cc,v 1.9 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4RayleighScattering.cc
r1228 r1315 25 25 // 26 26 // $Id: G4RayleighScattering.cc,v 1.2 2009/03/18 13:45:51 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4SemiLogInterpolation.cc
r1228 r1315 26 26 // 27 27 // $Id: G4SemiLogInterpolation.cc,v 1.8 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4ShellData.cc
r1228 r1315 26 26 // 27 27 // $Id: G4ShellData.cc,v 1.11 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4ShellEMDataSet.cc
r1228 r1315 26 26 // 27 27 // $Id: G4ShellEMDataSet.cc,v 1.18 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4VCrossSectionHandler.cc
r1228 r1315 26 26 // 27 27 // $Id: G4VCrossSectionHandler.cc,v 1.19 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4VLowEnergyDiscretePhotonProcess.cc
r1228 r1315 25 25 // 26 26 // $Id: G4VLowEnergyDiscretePhotonProcess.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4VeLowEnergyLoss.cc
r1228 r1315 26 26 // 27 27 // $Id: G4VeLowEnergyLoss.cc,v 1.27 2009/07/23 09:15:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4VhShellCrossSection.cc
r819 r1315 61 61 G4double mass, 62 62 G4double deltaEnergy) const 63 // returns the shell ionized if the shell exists. If the shell is not counted, it returns -1 64 63 65 { 64 66 std::vector<G4double> p = Probabilities(Z,incidentEnergy,mass,deltaEnergy); 65 G4int shell = 0;67 G4int shell = -1; 66 68 size_t nShells = p.size(); 67 69 G4double q = G4UniformRand(); -
trunk/source/processes/electromagnetic/lowenergy/src/G4WaterExcitationStructure.cc
r1228 r1315 26 26 // 27 27 // $Id: G4WaterExcitationStructure.cc,v 1.1 2007/10/15 08:57:54 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4WaterIonisationStructure.cc
r1228 r1315 26 26 // 27 27 // $Id: G4WaterIonisationStructure.cc,v 1.1 2007/11/08 20:39:35 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eBremsstrahlungSpectrum.cc
r1228 r1315 25 25 // 26 26 // $Id: G4eBremsstrahlungSpectrum.cc,v 1.16 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4eCrossSectionExcitationEmfietzoglou.cc
r1228 r1315 26 26 // 27 27 // $Id: G4eCrossSectionExcitationEmfietzoglou.cc,v 1.1 2007/05/04 10:16:06 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 31 31 // $Id: G4eCrossSectionExcitationEmfietzoglou.cc,v 1.1 2007/05/04 10:16:06 pia Exp $ 32 // GEANT4 tag $Name: geant4-09-0 3$32 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 33 33 // 34 34 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eCrossSectionScreenedRutherford.cc
r1228 r1315 26 26 // 27 27 // $Id: G4eCrossSectionScreenedRutherford.cc,v 1.3 2007/10/12 12:27:19 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationCrossSectionHandler.cc
r1228 r1315 25 25 // 26 26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.15 2009/09/27 10:47:42 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationParameters.cc
r1228 r1315 26 26 // 27 27 // $Id: G4eIonisationParameters.cc,v 1.25 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationSpectrum.cc
r1228 r1315 25 25 // 26 26 // $Id: G4eIonisationSpectrum.cc,v 1.27 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3$27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4eLowEnergyLoss.cc
r1228 r1315 26 26 // 27 27 // $Id: G4eLowEnergyLoss.cc,v 1.37 2009/07/23 09:15:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4empCrossSection.cc
r1197 r1315 25 25 // 26 26 //$Id: G4empCrossSection.cc,v 1.2 2009/06/25 15:52:08 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyIonisation.cc
r1228 r1315 100 100 // parametrised proton model: min(user value, model limit) 101 101 // 26 Jan 2005 S. Chauvie added PrintInfoDefinition() for antiproton 102 103 102 // 30 Sep 2009 A.Mantero Removed dependencies to old shell Ionisation XS models 103 // 07 Jun 2010 Code Celaning for June beta Release 104 104 // ----------------------------------------------------------------------- 105 105 … … 121 121 #include "G4ShellVacancy.hh" 122 122 #include "G4VhShellCrossSection.hh" 123 #include "G4hShellCrossSection.hh"124 #include "G4hShellCrossSectionExp.hh"125 #include "G4hShellCrossSectionDoubleExp.hh"126 123 #include "G4VEMDataSet.hh" 127 124 #include "G4EMDataSet.hh" … … 132 129 #include "G4ProcessManager.hh" 133 130 #include "G4ProductionCutsTable.hh" 134 131 #include "G4teoCrossSection.hh" 132 #include "G4empCrossSection.hh" 135 133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 136 134 … … 153 151 shellVacancy(0), 154 152 shellCS(0), 155 theFluo(false), 156 expFlag(false) 153 theFluo(false) 157 154 { 158 155 InitializeMe(); … … 175 172 verboseLevel = 0; 176 173 177 //**************************************************************************** 178 // By default the method of cross section's calculation is swiched on an 179 // 2nd implementation empirical model (G4hShellCrossSectionDoubleExp), 180 // if you want to use Gryzinski's model (G4hShellCrossSection()) or the 181 // 1st empiric one (G4hShellCrossSectionExp), you must change the 182 // selection below and switching expFlag to FALSE 183 //**************************************************************************** 184 185 //shellCS = new G4hShellCrossSection(); 186 //shellCS = new G4hShellCrossSectionExp(); 187 shellCS = new G4hShellCrossSectionDoubleExp(); 188 expFlag=true; 174 shellCS = new G4teoCrossSection("analytical"); 175 189 176 } 190 177 … … 1280 1267 // G4cout << "Fluorescence is switched :" << theFluo << G4endl; 1281 1268 1269 // Fluorescence data start from element 6 1282 1270 if(theFluo && Z > 5) { 1283 1271 1284 1272 1285 1273 1286 // Atom total cross section for the Empiric Model 1287 if (expFlag) { 1274 // Atom total cross section 1288 1275 shellCS->SetTotalCS(totalCrossSectionMap[Z]); 1289 } 1276 1290 1277 G4int shell = shellCS->SelectRandomShell(Z, KineticEnergy,ParticleMass,DeltaKineticEnergy); 1291 1278 1292 if (expFlag && shell==1) { 1293 aParticleChange.ProposeLocalEnergyDeposit (KineticEnergy); 1294 aParticleChange.ProposeEnergy(0); 1295 } 1296 1297 1298 const G4AtomicShell* atomicShell = 1299 (G4AtomicTransitionManager::Instance())->Shell(Z, shell); 1300 G4double bindingEnergy = atomicShell->BindingEnergy(); 1301 1302 if(verboseLevel > 1) { 1303 G4cout << "PostStep Z= " << Z << " shell= " << shell 1304 << " bindingE(keV)= " << bindingEnergy/keV 1305 << " finalE(keV)= " << finalKineticEnergy/keV 1306 << G4endl; 1307 } 1308 1309 // Fluorescence data start from element 6 1310 1311 if (finalKineticEnergy >= bindingEnergy 1312 && (bindingEnergy >= minGammaEnergy 1313 || bindingEnergy >= minElectronEnergy) ) { 1314 1315 G4int shellId = atomicShell->ShellId(); 1316 secondaryVector = deexcitationManager.GenerateParticles(Z, shellId); 1317 1318 if (secondaryVector != 0) { 1319 1320 nSecondaries = secondaryVector->size(); 1321 for (size_t i = 0; i<nSecondaries; i++) { 1322 1323 aSecondary = (*secondaryVector)[i]; 1324 if (aSecondary) { 1325 1326 G4double e = aSecondary->GetKineticEnergy(); 1327 type = aSecondary->GetDefinition(); 1328 if (e < finalKineticEnergy && 1329 ((type == G4Gamma::Gamma() && e > minGammaEnergy ) || 1330 (type == G4Electron::Electron() && e > minElectronEnergy ))) { 1331 1332 finalKineticEnergy -= e; 1333 totalNumber++; 1334 1335 } else { 1336 1337 delete aSecondary; 1338 (*secondaryVector)[i] = 0; 1279 if (shell!=-1) { 1280 1281 const G4AtomicShell* atomicShell = 1282 (G4AtomicTransitionManager::Instance())->Shell(Z, shell); 1283 G4double bindingEnergy = atomicShell->BindingEnergy(); 1284 1285 if(verboseLevel > 1) { 1286 G4cout << "PostStep Z= " << Z << " shell= " << shell 1287 << " bindingE(keV)= " << bindingEnergy/keV 1288 << " finalE(keV)= " << finalKineticEnergy/keV 1289 << G4endl; 1290 } 1291 1292 1293 1294 if (finalKineticEnergy >= bindingEnergy 1295 && (bindingEnergy >= minGammaEnergy 1296 || bindingEnergy >= minElectronEnergy) ) { 1297 1298 G4int shellId = atomicShell->ShellId(); 1299 secondaryVector = deexcitationManager.GenerateParticles(Z, shellId); 1300 1301 if (secondaryVector != 0) { 1302 1303 nSecondaries = secondaryVector->size(); 1304 for (size_t i = 0; i<nSecondaries; i++) { 1305 1306 aSecondary = (*secondaryVector)[i]; 1307 if (aSecondary) { 1308 1309 G4double e = aSecondary->GetKineticEnergy(); 1310 type = aSecondary->GetDefinition(); 1311 if (e < finalKineticEnergy && 1312 ((type == G4Gamma::Gamma() && e > minGammaEnergy ) || 1313 (type == G4Electron::Electron() && e > minElectronEnergy ))) { 1314 1315 finalKineticEnergy -= e; 1316 totalNumber++; 1317 1318 } else { 1319 1320 delete aSecondary; 1321 (*secondaryVector)[i] = 0; 1322 } 1339 1323 } 1340 1324 } … … 1343 1327 } 1344 1328 } 1345 1329 1346 1330 // Save delta-electrons 1347 1331 … … 1401 1385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1402 1386 1403 std::vector<G4DynamicParticle*>* 1404 G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple, 1387 1388 1389 void G4hLowEnergyIonisation::SelectShellIonisationCS(G4String val) { 1390 1391 if (val == "analytical" ) { 1392 if (shellCS) delete shellCS; 1393 shellCS = new G4teoCrossSection(val); 1394 } 1395 else if (val == "empirical") { 1396 if (shellCS) delete shellCS; 1397 shellCS = new G4empCrossSection(); 1398 } 1399 } 1400 1401 1402 1403 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1404 1405 1406 std::vector<G4DynamicParticle*>* G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple, 1405 1407 G4double incidentEnergy, 1406 1408 G4double hMass, -
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyLoss.cc
r1228 r1315 26 26 // 27 27 // $Id: G4hLowEnergyLoss.cc,v 1.30 2009/07/23 09:15:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3$28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionDoubleExp.cc
r1228 r1315 41 41 // Empiric Model for shell cross sections in proton ionisation 42 42 // ------------------------------------------------------------------- 43 // $Id: G4hShellCrossSectionDoubleExp.cc,v 1.1 0 2009/06/10 13:32:36 manteroExp $44 // GEANT4 tag $Name: geant4-09-0 3$43 // $Id: G4hShellCrossSectionDoubleExp.cc,v 1.11 2010/02/05 08:54:12 sincerti Exp $ 44 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 45 45 46 46 #include "globals.hh" … … 56 56 { 57 57 kShellData = new G4hShellCrossSectionDoubleExpData(); 58 59 atomTotalCrossSection = 0.; 58 60 } 59 61 -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionDoubleExpData.cc
r1228 r1315 34 34 // ------------------------------------------------------------------- 35 35 // $Id: G4hShellCrossSectionDoubleExpData.cc,v 1.5 2009/06/10 13:32:36 mantero Exp $ 36 // GEANT4 tag $Name: geant4-09-0 3$36 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 37 37 38 38 #include "G4hShellCrossSectionDoubleExpData.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionExp.cc
r1228 r1315 42 42 // ------------------------------------------------------------------- 43 43 // $Id: G4hShellCrossSectionExp.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ 44 // GEANT4 tag $Name: geant4-09-0 3$44 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 45 45 46 46 #include "globals.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionExpData.cc
r1228 r1315 34 34 // ------------------------------------------------------------------- 35 35 // $Id: G4hShellCrossSectionExpData.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 36 // GEANT4 tag $Name: geant4-09-0 3$36 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 37 37 38 38 #include "G4hShellCrossSectionExpData.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4teoCrossSection.cc
r1197 r1315 24 24 // ******************************************************************** 25 25 // 26 //$Id: G4teoCrossSection.cc,v 1. 5 2009/11/11 09:14:53mantero Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 //$Id: G4teoCrossSection.cc,v 1.6 2010/06/06 23:40:35 mantero Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // … … 33 33 // 21 Apr 2009 ALF 1st implementation 34 34 // 29 Apr 2009 ALF Updated Desing for Integration 35 // 11 Nov 2009 ALF update and code cleaning for the Dec Release36 35 // 37 36 // ------------------------------------------------------------------- … … 50 49 //#include <math.h> 51 50 52 G4teoCrossSection::G4teoCrossSection(G4String shellModel = "ecpssr")51 G4teoCrossSection::G4teoCrossSection(G4String shellModel) 53 52 :totalCS(0) 54 53 { 55 54 56 if (shellModel == "ecpssr") { 57 58 ecpssrShellK = new G4ecpssrKCrossSection(); 59 60 ecpssrShellLi = new G4ecpssrLiCrossSection(); 55 if (shellModel == "analytical") { 56 57 58 ecpssrShellK = new G4AnalyticalEcpssrKCrossSection(); 59 ecpssrShellLi = new G4AnalyticalEcpssrLiCrossSection(); 60 61 61 } 62 else {63 64 G4cout << "G4teoCrossSection: sorry, only ECPSSR model available at the moment" << G4endl;65 66 ecpssrShellK = new G4ecpssrKCrossSection();67 68 ecpssrShellLi = new G4ecpssrLiCrossSection();69 70 }71 72 73 62 } 74 63 -
trunk/source/processes/electromagnetic/muons/History
r1196 r1315 1 $Id: History,v 1.13 4 2009/11/09 19:18:01vnivanch Exp $1 $Id: History,v 1.136 2010/06/04 09:30:40 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 4 June 2010: V.Ivant (emmuons-V09-03-01) 21 - G4MuIonisation - use G4ICRU73QOModel for mu- for E< 0.2 MeV 22 23 1 June 2010: V.Ivant (emmuons-V09-03-00) 24 - G4MuPairProductionModel - added sampling recoil of a primary particle 25 - G4MuIonisation - added G4ICRU73QOModel for mu- for E< 1 MeV 19 26 20 27 09 November 09: V.Ivant (emmuons-V09-02-08) -
trunk/source/processes/electromagnetic/muons/src/G4MuIonisation.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuIonisation.cc,v 1. 59 2009/02/26 11:04:20 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4MuIonisation.cc,v 1.61 2010/06/04 09:30:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 89 89 #include "G4BohrFluctuations.hh" 90 90 #include "G4UnitsTable.hh" 91 #include "G4ICRU73QOModel.hh" 91 92 92 93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 140 141 141 142 mass = theParticle->GetPDGMass(); 143 G4double q = theParticle->GetPDGCharge(); 144 G4double elow = 0.2*MeV; 142 145 SetSecondaryParticle(G4Electron::Electron()); 143 146 144 147 // Bragg peak model 145 if (!EmModel(1)) SetEmModel(new G4BraggModel(),1); 148 if (!EmModel(1)) { 149 if(q > 0.0) { SetEmModel(new G4BraggModel(),1); } 150 else { 151 SetEmModel(new G4ICRU73QOModel(),1); 152 //elow = 1.0*MeV; 153 } 154 } 146 155 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 147 EmModel(1)->SetHighEnergyLimit( 0.2*MeV);156 EmModel(1)->SetHighEnergyLimit(elow); 148 157 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 149 158 150 159 // high energy fluctuation model 151 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());160 if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); } 152 161 153 162 // moderate energy model 154 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);155 EmModel(2)->SetLowEnergyLimit( 0.2*MeV);163 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } 164 EmModel(2)->SetLowEnergyLimit(elow); 156 165 EmModel(2)->SetHighEnergyLimit(1.0*GeV); 157 166 AddEmModel(2, EmModel(2), FluctModel()); 158 167 159 168 // high energy model 160 if (!EmModel(3)) SetEmModel(new G4MuBetheBlochModel(),3);169 if (!EmModel(3)) { SetEmModel(new G4MuBetheBlochModel(),3); } 161 170 EmModel(3)->SetLowEnergyLimit(1.0*GeV); 162 171 EmModel(3)->SetHighEnergyLimit(MaxKinEnergy()); -
trunk/source/processes/electromagnetic/muons/src/G4MuPairProductionModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProductionModel.cc,v 1.4 4 2009/08/11 16:50:07vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4MuPairProductionModel.cc,v 1.45 2010/06/01 15:21:59 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 466 466 { 467 467 G4double kineticEnergy = aDynamicParticle->GetKineticEnergy(); 468 G4double totalEnergy = kineticEnergy + particleMass ; 469 G4ParticleMomentum ParticleDirection = 470 aDynamicParticle->GetMomentumDirection(); 468 G4double totalEnergy = kineticEnergy + particleMass; 469 G4double totalMomentum = 470 sqrt(kineticEnergy*(kineticEnergy + 2.0*particleMass)); 471 472 G4ThreeVector partDirection = aDynamicParticle->GetMomentumDirection(); 471 473 472 474 G4int it; 473 for(it=1; it<ntdat; it++) {if(kineticEnergy <= tdat[it]) break;}474 if(it == ntdat) it--;475 for(it=1; it<ntdat; ++it) {if(kineticEnergy <= tdat[it]) break;} 476 if(it == ntdat) { --it; } 475 477 G4double dt = log(kineticEnergy/tdat[it-1])/log(tdat[it]/tdat[it-1]); 476 478 477 479 // select randomly one element constituing the material 478 const G4Element* anElement = SelectRandomAtom(kineticEnergy, dt, it, couple, tmin); 480 const G4Element* anElement = 481 SelectRandomAtom(kineticEnergy, dt, it, couple, tmin); 479 482 SetCurrentElement(anElement->GetZ()); 480 483 … … 484 487 G4double minEnergy = std::max(tmin, minPairEnergy); 485 488 486 if(minEnergy >= maxEnergy) return;489 if(minEnergy >= maxEnergy) { return; } 487 490 //G4cout << "emin= " << minEnergy << " emax= " << maxEnergy 488 491 // << " minPair= " << minPairEnergy << " maxpair= " << maxPairEnergy … … 507 510 G4int iz, iy; 508 511 509 for(iz=1; iz<nzdat; iz++) {if(currentZ <= zdat[iz]) break;}510 if(iz == nzdat) iz--;512 for(iz=1; iz<nzdat; ++iz) { if(currentZ <= zdat[iz]) { break; } } 513 if(iz == nzdat) { --iz; } 511 514 512 515 G4double dz = log(currentZ/zdat[iz-1])/log(zdat[iz]/zdat[iz-1]); … … 520 523 G4double p1 = pmin; 521 524 G4double p2 = pmin; 522 for(iy=iymin+1; iy<=iymax; iy++) {525 for(iy=iymin+1; iy<=iymax; ++iy) { 523 526 p1 = p2; 524 527 p2 = InterpolatedIntegralCrossSection(dt, dz, iz, it, iy, currentZ); … … 532 535 *log(maxPairEnergy/minPairEnergy)); 533 536 534 if(PairEnergy < minEnergy) PairEnergy = minEnergy;535 if(PairEnergy > maxEnergy) PairEnergy = maxEnergy;537 if(PairEnergy < minEnergy) { PairEnergy = minEnergy; } 538 if(PairEnergy > maxEnergy) { PairEnergy = maxEnergy; } 536 539 537 540 // sample r=(E+-E-)/PairEnergy ( uniformly .....) … … 545 548 G4double PositronEnergy = PairEnergy - ElectronEnergy; 546 549 547 // angles of the emitted particles ( Z - axis along the parent particle) 548 // (mean theta for the moment) 549 550 // 551 // scattered electron (positron) angles. ( Z - axis along the parent photon) 552 // 553 // universal distribution suggested by L. Urban 554 // (Geant3 manual (1993) Phys211), 555 // derived from Tsai distribution (Rev Mod Phys 49,421(1977)) 556 // G4cout << "Ee= " << ElectronEnergy << " Ep= " << PositronEnergy << G4endl; 557 G4double u; 558 const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ; 559 560 if (9./(9.+d) >G4UniformRand()) u= - log(G4UniformRand()*G4UniformRand())/a1; 561 else u= - log(G4UniformRand()*G4UniformRand())/a2; 562 563 G4double TetEl = u*electron_mass_c2/ElectronEnergy; 564 G4double TetPo = u*electron_mass_c2/PositronEnergy; 565 G4double Phi = twopi * G4UniformRand(); 566 G4double dxEl= sin(TetEl)*cos(Phi),dyEl= sin(TetEl)*sin(Phi),dzEl=cos(TetEl); 567 G4double dxPo=-sin(TetPo)*cos(Phi),dyPo=-sin(TetPo)*sin(Phi),dzPo=cos(TetPo); 568 569 G4ThreeVector ElectDirection (dxEl, dyEl, dzEl); 570 ElectDirection.rotateUz(ParticleDirection); 550 // The angle of the emitted virtual photon is sampled 551 // according to the muon bremsstrahlung model 552 553 G4double gam = totalEnergy/particleMass; 554 G4double gmax = gam*std::min(1.0, totalEnergy/PairEnergy - 1.0); 555 G4double gmax2= gmax*gmax; 556 G4double x = G4UniformRand()*gmax2/(1.0 + gmax2); 557 558 G4double theta = sqrt(x/(1.0 - x))/gam; 559 G4double sint = sin(theta); 560 G4double phi = twopi * G4UniformRand() ; 561 G4double dirx = sint*cos(phi), diry = sint*sin(phi), dirz = cos(theta) ; 562 563 G4ThreeVector gDirection(dirx, diry, dirz); 564 gDirection.rotateUz(partDirection); 565 566 // the angles of e- and e+ assumed to be the same as virtual gamma 571 567 572 568 // create G4DynamicParticle object for the particle1 573 G4DynamicParticle* aParticle1= new G4DynamicParticle(theElectron, 574 ElectDirection, 575 ElectronEnergy - electron_mass_c2); 576 577 G4ThreeVector PositDirection (dxPo, dyPo, dzPo); 578 PositDirection.rotateUz(ParticleDirection); 569 G4DynamicParticle* aParticle1 = 570 new G4DynamicParticle(theElectron, gDirection, 571 ElectronEnergy - electron_mass_c2); 579 572 580 573 // create G4DynamicParticle object for the particle2 581 574 G4DynamicParticle* aParticle2 = 582 new G4DynamicParticle(thePositron, 583 PositDirection, 575 new G4DynamicParticle(thePositron, gDirection, 584 576 PositronEnergy - electron_mass_c2); 585 577 … … 588 580 fParticleChange->SetProposedKineticEnergy(kineticEnergy); 589 581 582 partDirection *= totalMomentum; 583 partDirection -= (aParticle1->GetMomentum() + aParticle2->GetMomentum()); 584 partDirection = partDirection.unit(); 585 fParticleChange->SetProposedMomentumDirection(partDirection); 586 587 // add secondary 590 588 vdp->push_back(aParticle1); 591 589 vdp->push_back(aParticle2); -
trunk/source/processes/electromagnetic/muons/test/muEnergyLossTest.cc
r1199 r1315 26 26 // 27 27 // $Id: muEnergyLossTest.cc,v 1.7 2006/06/29 19:49:56 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 //----------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/History
r1228 r1315 1 $Id: History,v 1. 480 2009/12/03 17:28:28vnivanch Exp $1 $Id: History,v 1.504 2010/06/04 09:25:12 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 4 June 2010: V.Ivant (emstand-V09-03-17) 21 - G4ICRU73QOModel - fixed problems and add factor for transition to 22 Bethe-Bloch at 2 MeV 23 - G4hIonisation - use G4ICRU73QOModel for negatively charged particles 24 below 2 MeV 25 - G4BraggModel - above 2 MeV use ICRU'49 parameterisation for all atoms 26 27 June 3, 2010, V. Grichine 28 - G4PAIModel.cc, G4PAIPhotonModel.cc cout for the model initialisation 29 30 1 June 2010: V.Ivant (emstand-V09-03-16) 31 - G4WentzelOKandVIxSection - optimized computation of the transport 32 cross section 33 - G4WentzelVIModel - optimized method of step limitation 34 35 27 May 2010: V.Ivant (emstand-V09-03-15) 36 - G4BraggIonGasModel, G4BetheBlochIonGasModel - new ionisation models 37 for low density media 38 - G4ICRU73QOModel (A.Bagulya) new model for anti-particles 39 - G4hIonisation - use G4ICRU73QOModel for anti-particles 40 - G4WentzelOKandVIxSection - new class to compute cross sections and 41 sample scattering angle 42 - G4WentzelVIModel, G4eCoulombScatteringModel, G4CoulombScatteringModel 43 use new class G4WentzelOKandVIxSection 44 45 20 May 2010: V.Ivant (emstand-V09-03-14) 46 - G4UrbanMscModel93 - L.Urban removed randomisation of step limit for the 47 first step in any volume in the case of UseSafety 48 - Removed obsolete models: G4UrbanMscModel, G4UrbanMscModel2, G4UrbanMscModel71, 49 G4MultipleScattering, G4ComptonScattering52, G4PolarizedComptonScattering 50 51 17 May 2010: V.Ivant (emstand-V09-03-13) 52 - G4WentzelVIModel, G4eCoulombScatteringModel - added momentum dependent 53 limit of scattering angle between single and multiple scattering 54 which allowing to use G4WentzelVIModel with optical model 55 of hadron scattering 56 57 17 May 2010: V.Ivant (emstand-V09-03-12) 58 - G4GoudsmitSaundersonMscModel, G4GoudsmitSaundersonTable (O.Kadri) - 59 optimized code to improve speed by addition extra class members 60 61 30 April 2010: V.Ivant (emstand-V09-03-11) 62 - G4UrbanMscModel93 - L.Urban add randomisation of step limit for the 63 first step in any volume 64 65 28 April 2010: V.Ivant (emstand-V09-03-10) 66 G4eBremsstrahlungModel - fixed SelectRandomAtom method (bug report #1115) 67 68 26 April 2010: V.Ivant (emstand-V09-03-09) 69 - G4ASTARStopping, G4PSTARTStopping - C-arrays sustituted by G4PhysicsVector 70 with spline; reviewed names of materials (G4_He, G4_PHOTO_EMULSION, 71 G4_NYLON-6-6) 72 - G4ASTARStopping - fixed G4_O data 73 - G4PSTARStopping - fixed G4_Pt and G4_PROPANE data 74 - G4WaterStopping - cleanup GetElectronicDEDX method 75 76 16 April 2010: V.Ivant (emstand-V09-03-08) 77 - G4GoudsmitSaundersonMscModel (O.Kadri) - improved numerical stability 78 of computations for small angles by direct xsection calculation 79 not inverse of the inverse angular sampling without large angle 80 rejection method longitudinal displacement is computed exactly 81 from <z> 82 - G4GoudsmitSaundersonTable (O.Kadri) - improved numerical stability by 83 minimum of used arrays in computation within the dichotomy 84 finding method 85 - G4eMultipleScattering, G4hMultipleScattering - improved printout at 86 initialisation 87 88 15 April 2010: V.Ivant (emstand-V09-03-07) 89 - G4hMultipleScattering - removed old unused header of G4UrbanMscModel 90 - G4ASTARStopping.cc - disabled corrupted data for Oxygen 91 92 06 April 2010: V.Ivant (emstand-V09-03-06) 93 - G4eBremsstrahlungRelModel, G4MollerBhabhaModel - set minimum cut 94 value to 0.1 keV 95 96 30 March 2010: V.Ivant (emstand-V09-03-05) 97 - G4PolarizedComptonScattering - add message that this process is obsolete 98 99 22 March 2010: V.Ivant (emstand-V09-03-04) 100 - G4eBremsstrahlungModel - reduced minThreshold to 0.1 keV 101 - G4MollerBhabhaModel - reduced minimum cut value to mean ionisation 102 potential 103 104 01 March 2010: V.Ivant (emstand-V09-03-03) 105 - G4WentzelVIModel - added protections, added DefineMaterial() call 106 before computing cross section 107 108 31 March 2010: V.Ivant (emstand-V09-03-02a) 109 - G4PolarizedComptonScattering - add message that this process is obsolete 110 - G4eCoulombScatteringModel - returned method default value 100 eV of 9.3 for 111 internal low limit 112 113 24 February 2010: V.Ivant (emstand-V09-03-02) 114 - make a tag co-working with emutils-V09-03-02 115 116 19 February 2010: V.Ivant (emstand-V09-03-01) 117 - G4GoudsmitSaundersonMscModel, G4GoudsmitSaundersonTable (O.Kadri) 118 - fixed problems of small angle theta distributions 119 120 17 February 2010: V.Ivant (emstand-V09-03-00) 121 - G4CoulombScatteringModel - Added comments to relativistic formula 122 - G4eCoulombScatteringModel - Added method SetLowEnergyLimit, default 123 value is set to 1 eV (before was 100 eV) 124 - G4CoulombScattering - Removed inclined method SetBuildTableFlag because 125 the method exist in the base class 19 126 20 127 03 December 09: V.Ivant (emstand-V09-02-36) -
trunk/source/processes/electromagnetic/standard/include/G4ASTARStopping.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ASTARStopping.hh,v 1. 6 2008/11/13 12:04:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4ASTARStopping.hh,v 1.8 2010/04/26 17:22:08 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4ASTARStopping_h … … 55 55 56 56 #include "globals.hh" 57 #include "G4LPhysicsFreeVector.hh" 58 #include <vector> 57 59 58 60 class G4Material; … … 76 78 void Initialise(); 77 79 80 void AddData(G4double* e, G4double* s, G4int idx); 81 78 82 // hide assignment operator 79 83 G4ASTARStopping & operator=(const G4ASTARStopping &right); 80 84 G4ASTARStopping(const G4ASTARStopping&); 81 85 86 G4int matIndex; 82 87 const G4Material* currentMaterial; 83 G4int index, matIndex; 84 G4String name[74]; 85 G4double currentE, res; 86 G4double e[74][78], kinE[78]; 87 G4double effZ[74]; 88 G4double emin; 89 std::vector<G4String> name; 90 std::vector<G4double> effZ; 91 std::vector<G4LPhysicsFreeVector*> sdata; 88 92 }; 89 93 … … 97 101 { 98 102 return effZ[idx]; 99 } 103 } 100 104 101 105 #endif -
trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.hh,v 1.2 0 2009/04/23 17:44:43vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4BetheBlochModel.hh,v 1.23 2010/05/27 14:26:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 116 116 G4double kineticEnergy); 117 117 118 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple* ,119 const G4DynamicParticle* ,118 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple* couple, 119 const G4DynamicParticle* dp, 120 120 G4double& eloss, 121 G4double& niel,121 G4double&, 122 122 G4double length); 123 123 … … 133 133 G4double kinEnergy); 134 134 135 inline G4double GetChargeSquareRatio() const; 136 137 inline void SetChargeSquareRatio(G4double val); 138 135 139 private: 136 140 137 inlinevoid SetupParameters();141 void SetupParameters(); 138 142 139 143 inline void SetParticle(const G4ParticleDefinition* p); … … 169 173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 170 174 171 inline void G4BetheBlochModel::SetupParameters()172 {173 mass = particle->GetPDGMass();174 spin = particle->GetPDGSpin();175 G4double q = particle->GetPDGCharge()/eplus;176 chargeSquare = q*q;177 ratio = electron_mass_c2/mass;178 G4double magmom = particle->GetPDGMagneticMoment()*mass/(0.5*eplus*hbar_Planck*c_squared);179 magMoment2 = magmom*magmom - 1.0;180 formfact = 0.0;181 if(particle->GetLeptonNumber() == 0) {182 G4double x = 0.8426*GeV;183 if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}184 else if(mass > GeV) {185 x /= nist->GetZ13(mass/proton_mass_c2);186 // tlimit = 51.2*GeV*A13[iz]*A13[iz];187 }188 formfact = 2.0*electron_mass_c2/(x*x);189 tlimit = 2.0/formfact;190 }191 }192 193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....194 195 175 inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p) 196 176 { 197 177 if(particle != p) { 198 178 particle = p; 199 if (p->GetPDGCharge()/eplus > 1.5 && p->GetBaryonNumber() > 2) isIon = true; 179 if (p->GetPDGCharge()/eplus > 1.5 && p->GetBaryonNumber() > 2) 180 { isIon = true; } 200 181 SetupParameters(); 201 182 } … … 206 187 inline void G4BetheBlochModel::SetGenericIon(const G4ParticleDefinition* p) 207 188 { 208 if(p && particle != p) { 209 if(p->GetParticleName() == "GenericIon") isIon = true;189 if(p && particle != p) { 190 if(p->GetParticleName() == "GenericIon") { isIon = true; } 210 191 } 211 192 } 212 193 194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 195 196 inline G4double G4BetheBlochModel::GetChargeSquareRatio() const 197 { 198 return chargeSquare; 199 } 200 201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 202 203 inline void G4BetheBlochModel::SetChargeSquareRatio(G4double val) 204 { 205 chargeSquare = val; 206 } 207 208 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 209 213 210 #endif -
trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.hh,v 1.1 4 2009/11/10 19:25:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4BraggModel.hh,v 1.15 2010/05/27 10:08:58 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 121 121 const G4Material* mat, 122 122 G4double kineticEnergy); 123 /*124 // add correction to energy loss and compute non-ionizing energy loss125 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,126 const G4DynamicParticle*,127 G4double& eloss,128 G4double& niel,129 G4double length);130 */131 123 132 124 protected: … … 134 126 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 135 127 G4double kinEnergy); 128 129 inline G4double GetChargeSquareRatio() const; 130 131 inline void SetChargeSquareRatio(G4double val); 136 132 137 133 private: … … 197 193 } 198 194 195 inline G4double G4BraggModel::GetChargeSquareRatio() const 196 { 197 return chargeSquare; 198 } 199 200 inline void G4BraggModel::SetChargeSquareRatio(G4double val) 201 { 202 chargeSquare = val; 203 } 204 199 205 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 200 206 -
trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.hh,v 1.1 3 2009/05/07 18:41:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4CoulombScattering.hh,v 1.14 2010/02/17 18:59:22 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 73 73 // Set energy above which high energy model will be used 74 74 inline void SetHEModelLimit(G4double); 75 76 // obsolete method to be removed77 inline void SetBuildTableFlag(G4bool);78 75 79 76 // Print out of the class parameters … … 125 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 126 123 127 inline void G4CoulombScattering::SetBuildTableFlag(G4bool)128 {}129 130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....131 132 124 inline void G4CoulombScattering::SetHEModelLimit(G4double val) 133 125 { -
trunk/source/processes/electromagnetic/standard/include/G4CoulombScatteringModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScatteringModel.hh,v 1.1 5 2008/07/31 13:11:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4CoulombScatteringModel.hh,v 1.17 2010/05/27 14:22:05 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 45 45 // 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e- 46 46 // 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class 47 // 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to 48 // compute cross sections and sample scattering angle 47 49 // 48 50 // Class Description: -
trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonMscModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GoudsmitSaundersonMscModel.hh,v 1. 2 2009/06/04 13:45:49 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4GoudsmitSaundersonMscModel.hh,v 1.4 2010/05/17 15:11:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // Modifications: 42 42 // 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style 43 // 12.05.2010 O.Kadri: adding Qn1 and Qn12 as private doubles 43 44 // 44 45 // Class description: … … 54 55 //Ref.5:F. Salvat et al.,"ELSEPA--Dirac partial ...molecules", Comp. Phys. Comm. 165 (2005) pp 157-190; 55 56 //Ref.6:G4UrbanMscModel G4_v9.1Ref09; 56 //Ref.7:G4 eCoulombScatteringModel G4_v9.1Ref09.57 //Ref.7:G4WentzelVIModel G4_v9.3. 57 58 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 58 59 … … 63 64 #include "G4PhysicsTable.hh" 64 65 #include "globals.hh" 65 #include "G4DataInterpolation.hh"66 66 67 67 class G4DataVector; … … 114 114 G4GoudsmitSaundersonMscModel(const G4GoudsmitSaundersonMscModel&); 115 115 116 G4double lowKEnergy;117 G4double highKEnergy;116 G4double lowKEnergy; 117 G4double highKEnergy; 118 118 G4double currentKinEnergy; 119 119 G4double currentRange; … … 125 125 G4double charge,lambdalimit; 126 126 G4double tPathLength,stepmin ; 127 G4double lambda 1,lambda11;127 G4double lambda0,lambda1,lambda11,Qn1,Qn12; 128 128 G4double mass; 129 G4double lambda0;130 129 G4int currentMaterialIndex; 131 130 … … 139 138 const G4ParticleDefinition* particle; 140 139 G4ParticleChangeForMSC* fParticleChange; 141 G4DataInterpolation* MyValue;142 140 const G4MaterialCutsCouple* currentCouple; 143 141 -
trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonTable.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GoudsmitSaundersonTable.hh,v 1. 3 2009/06/18 18:43:09vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4GoudsmitSaundersonTable.hh,v 1.4 2010/02/19 09:29:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/include/G4PSTARStopping.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PSTARStopping.hh,v 1. 5 2008/11/13 12:04:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PSTARStopping.hh,v 1.7 2010/04/26 17:22:08 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4PSTARStopping_h … … 56 56 57 57 #include "globals.hh" 58 #include "G4LPhysicsFreeVector.hh" 59 #include <vector> 58 60 59 61 class G4Material; … … 76 78 void Initialise(); 77 79 80 void AddData(G4double* e, G4double* s, G4int idx); 81 78 82 // hide assignment operator 79 83 G4PSTARStopping & operator=(const G4PSTARStopping &right); 80 84 G4PSTARStopping(const G4PSTARStopping&); 81 85 86 G4int matIndex; 82 87 const G4Material* currentMaterial; 83 G4int index, matIndex; 84 G4String name[74]; 85 G4double currentE, res; 86 G4double e[74][60], kinE[60]; 88 G4double emin; 89 std::vector<G4String> name; 90 std::vector<G4LPhysicsFreeVector*> sdata; 87 91 }; 88 92 -
trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel93.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel93.hh,v 1. 1 2009/11/01 13:04:12 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4UrbanMscModel93.hh,v 1.4 2009/12/14 06:57:12 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/include/G4WaterStopping.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WaterStopping.hh,v 1. 7 2009/06/19 10:39:48 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4WaterStopping.hh,v 1.8 2010/04/26 17:22:08 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 #ifndef G4WaterStopping_h … … 79 79 G4int Z[17]; 80 80 G4double A[17]; 81 G4double emin; 81 82 std::vector<G4LPhysicsFreeVector*> dedx; 82 83 }; -
trunk/source/processes/electromagnetic/standard/include/G4WentzelVIModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WentzelVIModel.hh,v 1.2 1 2009/10/10 15:16:57vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4WentzelVIModel.hh,v 1.29 2010/05/27 14:22:05 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 40 40 // 41 41 // Modifications: 42 // 42 // 27-05-2010 V.Ivanchenko added G4WentzelOKandVIxSection class to 43 // compute cross sections and sample scattering angle 43 44 // 44 45 // Class Description: … … 60 61 #include "G4VMscModel.hh" 61 62 #include "G4PhysicsTable.hh" 62 #include "G4MscStepLimitType.hh"63 63 #include "G4MaterialCutsCouple.hh" 64 #include "G4NistManager.hh" 65 64 #include "G4WentzelOKandVIxSection.hh" 65 66 class G4ParticleDefinition; 66 67 class G4LossTableManager; 67 class G4ParticleChangeForMSC; 68 class G4ParticleDefinition; 68 class G4Pow; 69 69 70 70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 100 100 private: 101 101 102 G4double ComputeTransportXSectionPerAtom();103 104 102 G4double ComputeXSectionPerVolume(); 105 103 106 void ComputeMaxElectronScattering(G4double cut);107 108 104 inline G4double GetLambda(G4double kinEnergy); 109 105 110 106 inline void SetupParticle(const G4ParticleDefinition*); 111 112 inline void SetupKinematic(G4double kinEnergy, G4double cut);113 114 inline void SetupTarget(G4double Z, G4double kinEnergy);115 107 116 108 inline void DefineMaterial(const G4MaterialCutsCouple*); … … 120 112 G4WentzelVIModel(const G4WentzelVIModel&); 121 113 122 const G4ParticleDefinition* theProton; 123 const G4ParticleDefinition* theElectron; 124 const G4ParticleDefinition* thePositron; 125 114 G4LossTableManager* theManager; 126 115 G4ParticleChangeForMSC* fParticleChange; 116 G4WentzelOKandVIxSection* wokvi; 117 G4Pow* fG4pow; 127 118 128 119 G4PhysicsTable* theLambdaTable; 129 G4PhysicsTable* theLambda2Table;130 G4LossTableManager* theManager;131 120 const G4DataVector* currentCuts; 132 121 133 G4NistManager* fNistManager;134 135 G4double numlimit;136 122 G4double tlimitminfix; 137 123 G4double invsqrt12; 138 124 139 // ca sh125 // cache kinematics 140 126 G4double preKinEnergy; 141 G4double ecut;142 G4double lambda0;143 127 G4double tPathLength; 144 128 G4double zPathLength; 145 129 G4double lambdaeff; 146 130 G4double currentRange; 147 G4double par1; 148 G4double par2; 149 G4double par3; 150 131 132 // data for single scattering mode 151 133 G4double xtsec; 152 134 std::vector<G4double> xsecn; … … 154 136 G4int nelments; 155 137 156 G4int nbins; 157 G4int nwarnings; 158 G4int nwarnlimit; 159 138 G4double numlimit; 139 140 // cache material 160 141 G4int currentMaterialIndex; 161 162 142 const G4MaterialCutsCouple* currentCouple; 163 143 const G4Material* currentMaterial; 164 144 165 145 // single scattering parameters 166 G4double coeff;167 146 G4double cosThetaMin; 168 147 G4double cosThetaMax; 169 148 G4double cosTetMaxNuc; 170 G4double cosTetMaxNuc2;171 G4double cosTetMaxElec;172 G4double cosTetMaxElec2;173 G4double q2Limit;174 G4double alpha2;175 149 176 150 // projectile 177 151 const G4ParticleDefinition* particle; 178 179 G4double chargeSquare;180 G4double spin;181 G4double mass;182 G4double tkin;183 G4double mom2;184 G4double invbeta2;185 G4double kinFactor;186 G4double etag;187 152 G4double lowEnergyLimit; 188 189 // target190 G4double targetZ;191 G4double targetMass;192 G4double screenZ;193 G4double formfactA;194 G4int iz;195 196 static G4double ScreenRSquare[100];197 static G4double FormFactor[100];198 153 199 154 // flags … … 222 177 G4double x; 223 178 if(theLambdaTable) { 224 G4bool b; 225 x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b); 179 x = ((*theLambdaTable)[currentMaterialIndex])->Value(e); 226 180 } else { 227 181 x = CrossSection(currentCouple,particle,e, 228 182 (*currentCuts)[currentMaterialIndex]); 229 183 } 230 if(x > DBL_MIN) x = 1./x;231 else x = DBL_MAX;184 if(x > DBL_MIN) { x = 1./x; } 185 else { x = DBL_MAX; } 232 186 return x; 233 187 } … … 240 194 if(p != particle) { 241 195 particle = p; 242 mass = particle->GetPDGMass(); 243 spin = particle->GetPDGSpin(); 244 G4double q = particle->GetPDGCharge()/eplus; 245 chargeSquare = q*q; 246 tkin = 0.0; 196 wokvi->SetupParticle(p); 247 197 } 248 198 } 249 199 250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....251 252 inline void G4WentzelVIModel::SetupKinematic(G4double ekin, G4double cut)253 {254 if(ekin != tkin || ecut != cut) {255 tkin = ekin;256 mom2 = tkin*(tkin + 2.0*mass);257 invbeta2 = 1.0 + mass*mass/mom2;258 cosTetMaxNuc = cosThetaMax;259 if(mass < MeV && ekin <= 10.*cut) {260 cosTetMaxNuc = ekin*(cosThetaMax + 1.0)/(10.*cut) - 1.0;261 }262 ComputeMaxElectronScattering(cut);263 }264 }265 266 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....267 268 inline void G4WentzelVIModel::SetupTarget(G4double Z, G4double e)269 {270 if(Z != targetZ || e != etag) {271 etag = e;272 targetZ = Z;273 iz = G4int(Z);274 if(iz > 99) iz = 99;275 targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;276 screenZ = ScreenRSquare[iz]/mom2;277 G4double meff = targetMass/(mass+targetMass);278 kinFactor = coeff*targetZ*chargeSquare*invbeta2/(mom2*meff*meff);279 screenZ *=(1.13 + std::min(1.0,3.76*Z*Z*invbeta2*alpha2));280 if(mass > MeV) { screenZ *= 2.0; }281 formfactA = FormFactor[iz]*mom2;282 cosTetMaxNuc2 = cosTetMaxNuc;283 cosTetMaxElec2 = cosTetMaxElec;284 }285 }286 287 200 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 288 201 -
trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.hh,v 1. 49 2009/10/10 15:16:57vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4eCoulombScatteringModel.hh,v 1.56 2010/05/27 14:22:05 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 47 47 // 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion 48 48 // 17.06.09 C.Consoalndi modified SetupTarget method - remove kinFactor 49 // 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to 50 // compute cross sections and sample scattering angle 49 51 // 50 52 // … … 66 68 67 69 #include "G4VEmModel.hh" 68 #include "G4PhysicsTable.hh"69 70 #include "globals.hh" 70 #include "G4 NistManager.hh"71 #include <vector>71 #include "G4MaterialCutsCouple.hh" 72 #include "G4WentzelOKandVIxSection.hh" 72 73 73 74 class G4ParticleChangeForGamma; 74 75 class G4ParticleDefinition; 76 class G4ParticleTable; 77 class G4NistManager; 75 78 76 79 class G4eCoulombScatteringModel : public G4VEmModel … … 99 102 G4double maxEnergy); 100 103 104 // defines low energy limit of the model 105 inline void SetLowEnergyLimit(G4double val); 106 107 // obsolete method 101 108 inline void SetRecoilThreshold(G4double eth); 102 109 103 110 protected: 104 105 G4double CrossSectionPerAtom();106 107 G4double SampleCosineTheta();108 111 109 112 inline void DefineMaterial(const G4MaterialCutsCouple*); … … 111 114 inline void SetupParticle(const G4ParticleDefinition*); 112 115 113 inline void SetupKinematic(G4double kinEnergy, G4double cut);114 115 inline void SetupTarget(G4double Z, G4double kinEnergy);116 117 116 private: 118 119 void ComputeMaxElectronScattering(G4double cut);120 117 121 118 // hide assignment operator … … 125 122 protected: 126 123 127 const G4ParticleDefinition* theProton; 128 const G4ParticleDefinition* theElectron; 129 const G4ParticleDefinition* thePositron; 130 131 G4ParticleTable* theParticleTable; 124 G4ParticleTable* theParticleTable; 132 125 G4ParticleChangeForGamma* fParticleChange; 126 G4WentzelOKandVIxSection* wokvi; 133 127 G4NistManager* fNistManager; 134 128 … … 140 134 G4int currentMaterialIndex; 141 135 142 G4double coeff;143 136 G4double cosThetaMin; 144 137 G4double cosThetaMax; 145 138 G4double cosTetMinNuc; 146 139 G4double cosTetMaxNuc; 147 G4double cosTetMaxNuc2;148 G4double cosTetMaxElec;149 G4double cosTetMaxElec2;150 G4double q2Limit;151 140 G4double recoilThreshold; 152 G4double elecXSection; 153 G4double nucXSection; 154 G4double ecut; 141 G4double elecRatio; 142 G4double mass; 155 143 156 144 // projectile 157 145 const G4ParticleDefinition* particle; 146 const G4ParticleDefinition* theProton; 158 147 159 G4double chargeSquare;160 G4double spin;161 G4double mass;162 G4double tkin;163 G4double mom2;164 G4double invbeta2;165 G4double etag;166 148 G4double lowEnergyLimit; 167 149 168 // target169 G4double targetZ;170 G4double targetMass;171 G4double screenZ;172 G4double formfactA;173 G4int idxelm;174 G4int iz;175 176 150 private: 177 178 G4double alpha2;179 G4double faclim;180 181 static G4double ScreenRSquare[100];182 static G4double FormFactor[100];183 151 184 152 G4bool isInitialised; … … 206 174 particle = p; 207 175 mass = particle->GetPDGMass(); 208 spin = particle->GetPDGSpin(); 209 G4double q = particle->GetPDGCharge()/eplus; 210 chargeSquare = q*q; 211 tkin = 0.0; 176 wokvi->SetupParticle(p); 212 177 } 213 178 } … … 215 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 216 181 217 inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin, 218 G4double cut) 182 inline void G4eCoulombScatteringModel::SetLowEnergyLimit(G4double val) 219 183 { 220 if(ekin != tkin || ecut != cut) { 221 tkin = ekin; 222 mom2 = tkin*(tkin + 2.0*mass); 223 invbeta2 = 1.0 + mass*mass/mom2; 224 cosTetMinNuc = cosThetaMin; 225 cosTetMaxNuc = cosThetaMax; 226 if(mass < MeV && cosThetaMin < 1.0 && ekin <= 10.*cut) { 227 cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0; 228 } 229 ComputeMaxElectronScattering(cut); 230 } 184 lowEnergyLimit = val; 231 185 } 232 233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....234 235 inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e)236 {237 if(Z != targetZ || e != etag) {238 etag = e;239 targetZ = Z;240 iz= G4int(Z);241 if(iz > 99) iz = 99;242 targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;243 screenZ = ScreenRSquare[iz]/mom2;244 screenZ *=(1.13 + std::min(1.0,3.76*Z*Z*invbeta2*alpha2));245 if(mass > MeV) { screenZ *= 2.0; }246 formfactA = FormFactor[iz]*mom2;247 cosTetMaxNuc2 = cosTetMaxNuc;248 if(1 == iz && particle == theProton && cosTetMaxNuc2 < 0.0) {249 cosTetMaxNuc2 = 0.0;250 }251 cosTetMaxElec2 = cosTetMaxElec;252 }253 }254 186 255 187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.hh,v 1.4 2 2009/02/20 12:06:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4hIonisation.hh,v 1.44 2010/05/27 10:25:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 101 101 virtual void PrintInfo(); 102 102 103 // obsolete method 103 104 void ActivateNuclearStopping(G4bool); 104 105 … … 115 116 116 117 G4bool isInitialised; 117 G4bool nuclearStopping;118 118 119 119 G4double mass; … … 124 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 125 126 inline void G4hIonisation::ActivateNuclearStopping(G4bool val)127 {128 nuclearStopping = val;129 }130 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....132 133 126 #endif -
trunk/source/processes/electromagnetic/standard/src/G4ASTARStopping.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ASTARStopping.cc,v 1. 8 2008/11/24 18:28:09vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$28 26 // $Id: G4ASTARStopping.cc,v 1.13 2010/04/26 17:22:08 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 // 29 29 //--------------------------------------------------------------------------- 30 30 // … … 40 40 // 41 41 // Modifications: 42 // 19.04.2010 A.Ivanchenko fixed data for G4_O, 43 // checked all data 44 // 25.04.2010 V.Ivanchenko introduce G4LPhysicsFreeVector 42 45 // 43 46 //---------------------------------------------------------------------------- … … 53 56 G4ASTARStopping::G4ASTARStopping() 54 57 { 55 currentE = 0.0;56 58 currentMaterial = 0; 57 index = 0;58 59 matIndex = -1; 60 61 name.resize(74,""); 62 effZ.resize(74,0); 63 sdata.resize(74,0); 64 59 65 Initialise(); 60 66 } … … 63 69 64 70 G4ASTARStopping::~G4ASTARStopping() 65 {} 71 { 72 for(size_t i=0; i<74; ++i) { delete sdata[i]; } 73 } 66 74 67 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 69 77 G4int G4ASTARStopping:: GetIndex (const G4Material* mat) 70 78 { 71 if (mat == currentMaterial) return matIndex;79 if (mat == currentMaterial) { return matIndex; } 72 80 G4String matName = mat->GetName(); 73 for (G4int i=0; i<74; i++){74 if (matName == name[i]){ 81 for (G4int i=0; i<74; ++i){ 82 if (matName == name[i]){ 75 83 matIndex = i; 76 84 currentMaterial = mat; … … 85 93 G4double G4ASTARStopping::GetElectronicDEDX(G4int i, G4double energy) 86 94 { 87 if (matIndex == i && energy == currentE) return res; 88 95 G4double res = 0.0; 89 96 if (i<0 || i>73){ 90 97 G4cout << "### G4ASTARStopping WARNING: index " 91 98 << i << " is out of range!" << G4endl; 92 res = 0.0;93 99 return res; 94 100 } 95 matIndex = i; 96 currentE = energy; 97 98 if (energy < kinE[index] || energy > kinE[index+1]){ 99 100 if (energy <= kinE[0]) { 101 index = 0; 102 res = e[matIndex][0]*std::sqrt(energy/kinE[0]); 103 return res; 104 } else if (energy >= kinE[77]) { 105 index = 76; 106 res = e[matIndex][77]; 107 return res; 108 } 109 for (index = 0; index<77; index++){if (energy <= kinE[index+1]) break;} 110 } 111 112 G4double t1 = kinE[index]; 113 G4double t2 = kinE[index+1]; 114 G4double e1 = e[matIndex][index]; 115 G4double e2 = e[matIndex][index+1]; 116 res = e1*std::exp(std::log(energy/t1)*std::log(e2/e1)/std::log(t2/t1)); 101 if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); } 102 else { res = sdata[i]->Value(energy); } 117 103 return res; 118 }104 } 119 105 120 106 void G4ASTARStopping::Initialise() 121 107 { 122 123 G4int i;124 108 G4double Z[74] = { 125 109 6.0, 6.0, 6.0, 47.0, 7.0, 13.0, 13.0, 18.0, 79.0, 6.0, … … 133 117 }; 134 118 135 for(i=0; i<74; i++) {effZ[i]=Z[i];}136 119 for(G4int i=0; i<74; ++i) {effZ[i]=Z[i];} 120 137 121 name [0] = "G4_A-150_TISSUE"; 138 G4double T0[78] = { 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03, 0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10 }; 139 122 G4double T0[78] = { 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03, 0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10. }; 123 emin = T0[0]*MeV; 124 140 125 G4double e0[78] = { 168.8, 204.2, 233.8, 259.7, 283, 324.3, 360.4, 393, 422.8, 450.5, 476.5, 501, 557.1, 607.7, 654.1, 697.1, 737.4, 775.4, 811.5, 845.9, 910.3, 970, 1026, 1078, 1128, 1175, 1220, 1263, 1305, 1344, 1383, 1419, 1455, 1489, 1646, 1782, 1901, 2005, 2097, 2178, 2249, 2312, 2413, 2488, 2539, 2572, 2589, 2593, 2586, 2571, 2548, 2521, 2489, 2453, 2416, 2377, 2176, 1989, 1825, 1683, 1561, 1457, 1369, 1292, 1165, 1062, 978.5, 908.4, 848.8, 797.4, 752.4, 712.9, 677.7, 646.1, 617.7, 591.9, 568.4, 547 }; 141 142 for(i=0; i<78; i++) {e[0][i]=e0[i]*MeV*cm2/g;} 143 for(i=0; i<78; i++) {kinE[i]=T0[i];} 126 AddData(T0,e0, 0); 144 127 145 128 name [1] = "G4_ACETYLENE"; 146 129 G4double e1[78] = { 192.2, 229.4, 260.2, 287, 311, 353.1, 389.7, 422.5, 452.4, 480.1, 506, 530.3, 585.9, 635.7, 681.2, 723.2, 762.5, 799.4, 834.3, 867.5, 929.6, 986.9, 1040, 1090, 1137, 1182, 1224, 1265, 1304, 1341, 1376, 1411, 1444, 1475, 1619, 1741, 1847, 1938, 2017, 2085, 2144, 2195, 2275, 2331, 2367, 2388, 2397, 2395, 2386, 2370, 2350, 2326, 2299, 2271, 2241, 2210, 2056, 1913, 1783, 1666, 1562, 1468, 1384, 1308, 1177, 1072, 986.8, 915.5, 855, 802.8, 757.2, 717.1, 681.4, 649.5, 620.7, 594.7, 570.9, 549.2 }; 147 148 for(i=0; i<78; i++) {e[1][i]=e1[i]*MeV*cm2/g;} 130 AddData(T0,e1, 1); 149 131 150 132 name [2] = "G4_ADIPOSE_TISSUE_ICRP"; 151 133 G4double e2[78] = { 169.4, 204.2, 233.3, 258.8, 281.8, 322.4, 358.1, 390.2, 419.7, 447.2, 472.9, 497.2, 552.9, 603.2, 649.4, 692.4, 732.7, 770.7, 806.8, 841.3, 906, 966.1, 1022, 1075, 1125, 1173, 1219, 1262, 1304, 1344, 1383, 1420, 1456, 1491, 1650, 1787, 1907, 2012, 2104, 2185, 2256, 2317, 2417, 2489, 2539, 2571, 2588, 2592, 2587, 2573, 2554, 2529, 2500, 2468, 2434, 2398, 2213, 2035, 1874, 1731, 1605, 1499, 1408, 1328, 1197, 1091, 1004, 932.2, 870.7, 817.8, 771.5, 730.8, 694.5, 662.1, 632.9, 606.4, 582.3, 560.2 }; 152 153 for(i=0; i<78; i++) {e[2][i]=e2[i]*MeV*cm2/g;} 134 AddData(T0,e2, 2); 154 135 155 136 name [3] = "G4_Ag"; 156 137 G4double e3[78] = { 31.26, 38.13, 43.91, 48.98, 53.56, 61.66, 68.79, 75.21, 81.11, 86.6, 91.74, 96.6, 107.7, 117.8, 127, 135.6, 143.6, 151.2, 158.4, 165.3, 178.2, 190.2, 201.4, 212, 222, 231.6, 240.7, 249.5, 257.9, 266, 273.9, 281.4, 288.8, 295.9, 328.8, 357.8, 383.8, 407.4, 428.8, 448.4, 466.3, 482.8, 511.8, 536.2, 556.6, 573.5, 587.3, 598.4, 607.2, 613.8, 618.5, 621.6, 623.4, 623.8, 623.3, 621.8, 604.4, 578.7, 550.8, 523.3, 497.6, 474.4, 453.6, 435, 402.7, 375.9, 353.2, 333.6, 316.9, 302, 288.8, 276.9, 266.2, 256.5, 247.7, 239.5, 232, 225.1 }; 157 158 for(i=0; i<78; i++) {e[3][i]=e3[i]*MeV*cm2/g;} 138 AddData(T0,e3, 3); 159 139 160 140 name [4] = "G4_AIR"; 161 141 G4double e4[78] = { 87.5, 108.6, 126.7, 142.7, 157.3, 183.5, 206.7, 227.9, 247.5, 265.9, 283.2, 299.6, 337.7, 372.3, 404.3, 434.3, 462.6, 489.4, 515, 539.5, 585.8, 629, 669.6, 708.1, 744.8, 779.8, 813.4, 845.7, 876.8, 906.8, 935.9, 964, 991.3, 1018, 1140, 1247, 1343, 1429, 1506, 1575, 1637, 1693, 1787, 1861, 1918, 1961, 1990, 2008, 2017, 2019, 2013, 2002, 1987, 1968, 1946, 1922, 1774, 1625, 1494, 1382, 1287, 1205, 1133, 1072, 968.6, 885.9, 818, 760.7, 711.7, 669.6, 632.7, 600.2, 571.2, 545.3, 521.9, 500.6, 481.2, 463.4 }; 162 163 for(i=0; i<78; i++) {e[4][i]=e4[i]*MeV*cm2/g;} 142 AddData(T0,e4, 4); 164 143 165 144 name [5] = "G4_Al"; 166 145 G4double e5[78] = { 55.8, 71.89, 86.05, 98.92, 110.9, 132.7, 152.5, 170.9, 188.2, 204.5, 220.1, 235.1, 270.1, 302.5, 332.8, 361.5, 388.6, 414.6, 439.4, 463.3, 508.4, 550.4, 589.6, 626.5, 661.1, 693.7, 724.3, 753.2, 780.3, 805.9, 830.1, 852.8, 874.3, 894.5, 980, 1045, 1096, 1136, 1168, 1195, 1216, 1234, 1262, 1280, 1291, 1297, 1298, 1297, 1293, 1286, 1279, 1269, 1259, 1248, 1237, 1225, 1161, 1098, 1039, 984.9, 937.6, 895.4, 856.8, 821, 756.1, 698.6, 647.8, 604.8, 567.8, 535.7, 507.4, 482.4, 460, 439.8, 421.6, 405.1, 389.9, 376 }; 167 168 for(i=0; i<78; i++) {e[5][i]=e5[i]*MeV*cm2/g;} 146 AddData(T0,e5, 5); 169 147 170 148 name [6] = "G4_ALUMINUM_OXIDE"; 171 149 G4double e6[78] = { 71.39, 88.59, 103.3, 116.4, 128.4, 149.9, 169, 186.5, 202.8, 218, 232.3, 246, 277.7, 306.6, 333.4, 358.5, 382.1, 404.6, 426, 446.5, 485, 520.9, 554.3, 585.8, 615.5, 643.5, 670, 695.2, 719.1, 741.9, 763.6, 784.3, 804, 822.9, 905.9, 974, 1031, 1080, 1122, 1159, 1191, 1220, 1267, 1304, 1332, 1353, 1368, 1378, 1383, 1385, 1384, 1381, 1376, 1370, 1362, 1352, 1308, 1253, 1187, 1115, 1044, 982.5, 928.4, 880, 801.2, 737, 683.4, 638.1, 599.1, 565.2, 535.4, 508.9, 485.3, 464, 444.8, 427.3, 411.4, 396.7 }; 172 173 for(i=0; i<78; i++) {e[6][i]=e6[i]*MeV*cm2/g;} 150 AddData(T0,e6, 6); 174 151 175 152 name [7] = "G4_Ar"; 176 153 G4double e7[78] = { 34.54, 44.56, 53.39, 61.42, 68.88, 82.53, 94.95, 106.5, 117.3, 127.6, 137.4, 146.8, 168.8, 189.3, 208.5, 226.7, 244.1, 260.8, 276.8, 292.3, 321.9, 349.8, 376.5, 401.9, 426.4, 450, 472.8, 494.9, 516.3, 537.1, 557.3, 577, 596.1, 614.8, 702.1, 780.3, 850.8, 914.4, 971.9, 1024, 1070, 1111, 1181, 1233, 1272, 1298, 1314, 1321, 1321, 1315, 1305, 1291, 1276, 1258, 1240, 1222, 1130, 1047, 974, 911.2, 856.7, 809, 767, 729.8, 666.1, 613.2, 569.7, 532.7, 501, 473.4, 449.1, 427.4, 408.3, 391, 375.4, 361.1, 348.1, 336 }; 177 178 for(i=0; i<78; i++) {e[7][i]=e7[i]*MeV*cm2/g;} 154 AddData(T0,e7, 7); 179 155 180 156 name [8] = "G4_Au"; 181 157 G4double e8[78] = { 11.5, 14.55, 17.2, 19.57, 21.76, 25.72, 29.27, 32.54, 35.59, 38.46, 41.18, 43.78, 49.83, 55.39, 60.56, 65.44, 70.06, 74.46, 78.68, 82.74, 90.45, 97.69, 104.5, 111.1, 117.3, 123.3, 129.1, 134.6, 140, 145.2, 150.3, 155.2, 160, 164.7, 186.4, 205.8, 223.5, 239.5, 254.2, 267.7, 280.1, 291.5, 311.6, 328.5, 342.6, 354.3, 363.8, 371.5, 377.5, 382.1, 385.5, 387.8, 389.1, 389.6, 389.4, 388.7, 384.4, 375.7, 362.6, 346.8, 330.5, 316.4, 304, 293, 274.1, 258.4, 245, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.5, 179.7, 174.5, 169.6, 165 }; 182 183 for(i=0; i<78; i++) {e[8][i]=e8[i]*MeV*cm2/g;} 158 AddData(T0,e8, 8); 184 159 185 160 name [9] = "G4_B-100_BONE"; 186 161 G4double e9[78] = { 138.6, 167.7, 192, 213.3, 232.4, 266.3, 296, 322.7, 347.2, 369.9, 391.2, 411.3, 457.3, 498.8, 536.8, 572, 605, 636.1, 665.7, 693.8, 746.5, 795.4, 841, 883.9, 924.5, 963.1, 999.9, 1035, 1069, 1101, 1133, 1163, 1192, 1220, 1348, 1460, 1557, 1643, 1719, 1786, 1845, 1897, 1983, 2047, 2093, 2124, 2142, 2149, 2148, 2139, 2125, 2106, 2084, 2059, 2031, 2003, 1861, 1726, 1600, 1484, 1379, 1290, 1214, 1147, 1035, 945.3, 871.8, 810, 757.7, 712.5, 672.9, 638.1, 607, 579.2, 554.1, 531.3, 510.5, 491.5 }; 187 188 for(i=0; i<78; i++) {e[9][i]=e9[i]*MeV*cm2/g;} 162 AddData(T0,e9, 9); 189 163 190 164 name [10] = "G4_Be"; 191 165 G4double e10[78] = { 146.3, 177.1, 202.9, 225.4, 245.6, 281.3, 312.5, 340.6, 366.2, 390, 412.2, 433.2, 481.1, 524.1, 563.3, 599.7, 633.6, 665.4, 695.6, 724.2, 777.7, 827, 872.7, 915.5, 955.7, 993.7, 1030, 1064, 1096, 1128, 1157, 1186, 1213, 1239, 1356, 1453, 1534, 1602, 1659, 1706, 1745, 1776, 1821, 1846, 1856, 1855, 1845, 1829, 1809, 1785, 1759, 1732, 1703, 1674, 1645, 1617, 1499, 1406, 1326, 1254, 1189, 1129, 1075, 1024, 935.3, 858.7, 792.9, 737.6, 690, 648.7, 612.5, 580.4, 552, 526.4, 503.3, 482.4, 463.3, 445.8 }; 192 193 for(i=0; i<78; i++) {e[10][i]=e10[i]*MeV*cm2/g;} 166 AddData(T0,e10, 10); 194 167 195 168 name [11] = "G4_BONE_COMPACT_ICRU"; 196 169 G4double e11[78] = { 125.9, 152.6, 175, 194.8, 212.5, 244.1, 271.8, 296.8, 319.8, 341.1, 361.2, 380.2, 423.8, 463.1, 499.3, 533, 564.6, 594.5, 622.8, 649.9, 700.8, 748.1, 792.4, 834.2, 873.7, 911.4, 947.4, 981.9, 1015, 1047, 1078, 1107, 1136, 1164, 1291, 1401, 1498, 1584, 1660, 1727, 1787, 1839, 1926, 1991, 2039, 2072, 2092, 2103, 2105, 2100, 2089, 2075, 2056, 2035, 2011, 1986, 1846, 1705, 1576, 1460, 1358, 1271, 1196, 1130, 1020, 931.6, 859.4, 798.8, 747.4, 702.9, 664, 629.7, 599.1, 571.7, 547.1, 524.7, 504.3, 485.6 }; 197 198 for(i=0; i<78; i++) {e[11][i]=e11[i]*MeV*cm2/g;} 170 AddData(T0,e11, 11); 199 171 200 172 name [12] = "G4_C"; 201 173 G4double e12[78] = { 190.6, 225.6, 254.3, 279, 300.9, 339.2, 372.1, 401.4, 427.9, 452.3, 475, 496.2, 544.3, 586.9, 625.5, 661, 693.8, 724.6, 753.5, 780.8, 831.5, 877.9, 920.8, 960.6, 998, 1033, 1066, 1098, 1128, 1156, 1184, 1210, 1235, 1259, 1366, 1455, 1531, 1595, 1650, 1698, 1738, 1772, 1825, 1862, 1886, 1900, 1906, 1906, 1901, 1892, 1880, 1866, 1850, 1833, 1814, 1795, 1684, 1571, 1466, 1372, 1288, 1213, 1145, 1085, 981.9, 898.2, 829.6, 772, 722.9, 680.4, 643.1, 610.2, 580.8, 554.4, 530.6, 509, 489.2, 471.2 }; 202 203 for(i=0; i<78; i++) {e[12][i]=e12[i]*MeV*cm2/g;} 204 205 name [13] = "G4_C_Graphite"; 174 AddData(T0,e12, 12); 175 176 name [13] = "G4_GRAPHITE_POROUS"; 206 177 G4double e13[78] = { 192.3, 228.9, 259, 285.1, 308.3, 348.9, 384, 415.3, 443.7, 469.9, 494.2, 517, 568.9, 615.1, 657, 695.5, 731.3, 764.8, 796.3, 826.2, 881.8, 932.7, 979.8, 1024, 1065, 1104, 1141, 1175, 1209, 1240, 1271, 1300, 1327, 1354, 1473, 1574, 1658, 1731, 1793, 1845, 1890, 1929, 1987, 2027, 2051, 2063, 2065, 2060, 2049, 2034, 2015, 1993, 1969, 1944, 1917, 1891, 1751, 1620, 1502, 1400, 1310, 1231, 1161, 1099, 994.3, 909, 839.2, 780.7, 730.8, 687.6, 649.8, 616.4, 586.6, 559.8, 535.7, 513.8, 493.8, 475.5 }; 207 208 for(i=0; i<78; i++) {e[13][i]=e13[i]*MeV*cm2/g;} 178 AddData(T0,e13, 13); 209 179 210 180 name [14] = "G4_ETHYLENE"; 211 181 G4double e14[78] = { 159.8, 195.8, 226, 252.7, 276.8, 319.7, 357.4, 391.5, 422.9, 452.1, 479.5, 505.4, 565.1, 619, 668.6, 714.8, 758.1, 799.1, 838.1, 875.3, 945.4, 1011, 1072, 1130, 1185, 1237, 1288, 1336, 1383, 1428, 1471, 1514, 1555, 1594, 1779, 1945, 2094, 2230, 2354, 2468, 2571, 2666, 2830, 2961, 3060, 3130, 3172, 3189, 3185, 3164, 3129, 3086, 3038, 2986, 2931, 2876, 2578, 2306, 2084, 1907, 1763, 1642, 1539, 1450, 1303, 1185, 1089, 1010, 941.9, 883.6, 832.8, 788.1, 748.4, 712.9, 680.9, 652, 625.7, 601.7 }; 212 213 for(i=0; i<78; i++) {e[14][i]=e14[i]*MeV*cm2/g;} 182 AddData(T0,e14, 14); 214 183 215 184 name [15] = "G4_C-552"; 216 185 G4double e15[78] = { 124.1, 148.8, 169.3, 187.2, 203.3, 231.5, 256.1, 278.2, 298.4, 317.1, 334.5, 351, 388.6, 422.4, 453.2, 481.8, 508.4, 533.5, 557.3, 579.9, 622.2, 661.3, 697.8, 732, 764.3, 794.9, 824, 851.9, 878.5, 904.1, 928.7, 952.4, 975.2, 997.3, 1097, 1184, 1259, 1325, 1384, 1435, 1481, 1521, 1588, 1639, 1678, 1706, 1726, 1738, 1744, 1745, 1743, 1736, 1727, 1716, 1703, 1688, 1603, 1511, 1421, 1338, 1261, 1190, 1126, 1067, 965.5, 883.8, 816.4, 759.6, 711.1, 669.1, 632.3, 599.9, 571, 545, 521.6, 500.3, 480.9, 463.1 }; 217 218 for(i=0; i<78; i++) {e[15][i]=e15[i]*MeV*cm2/g;} 186 AddData(T0,e15, 15); 219 187 220 188 name [16] = "G4_CARBON_DIOXIDE"; 221 189 G4double e16[78] = { 93.28, 114.2, 131.9, 147.5, 161.6, 186.6, 208.6, 228.5, 246.8, 263.8, 279.8, 295, 329.8, 361.2, 390.2, 417.1, 442.4, 466.4, 489.1, 510.8, 551.8, 589.8, 625.6, 659.4, 691.5, 722.2, 751.6, 779.8, 807.1, 833.4, 858.9, 883.7, 907.7, 931.1, 1040, 1137, 1225, 1306, 1380, 1449, 1513, 1571, 1676, 1763, 1834, 1891, 1933, 1961, 1977, 1982, 1978, 1967, 1952, 1932, 1911, 1888, 1752, 1614, 1490, 1383, 1290, 1209, 1139, 1077, 973.3, 890, 821.5, 764, 714.9, 672.6, 635.5, 602.6, 573.5, 547.3, 523.7, 502.4, 482.9, 465 }; 222 223 for(i=0; i<78; i++) {e[16][i]=e16[i]*MeV*cm2/g;} 190 AddData(T0,e16, 16); 224 191 225 192 name [17] = "G4_CALCIUM_FLUORIDE"; 226 193 G4double e17[78] = { 72.78, 90.74, 106.1, 119.8, 132.3, 154.7, 174.6, 192.8, 209.7, 225.5, 240.4, 254.5, 287.2, 317, 344.6, 370.4, 394.6, 417.6, 439.5, 460.5, 499.9, 536.5, 570.8, 603.1, 633.6, 662.6, 690.1, 716.4, 741.5, 765.6, 788.6, 810.8, 832.1, 852.6, 944.4, 1022, 1088, 1145, 1194, 1237, 1275, 1308, 1361, 1401, 1431, 1453, 1467, 1476, 1481, 1481, 1479, 1474, 1466, 1458, 1447, 1436, 1352, 1256, 1166, 1086, 1016, 954.4, 900.2, 852.3, 772.1, 708.1, 655.5, 610.7, 573.3, 540.6, 511.9, 486.6, 464, 443.8, 425.4, 408.7, 393.4, 379.4 }; 227 228 for(i=0; i<78; i++) {e[17][i]=e17[i]*MeV*cm2/g;} 194 AddData(T0,e17, 17); 229 195 230 196 name [18] = "G4_CERIC_SULFATE"; 231 197 G4double e18[78] = { 99.73, 123.7, 144.1, 162.3, 178.8, 208.3, 234.6, 258.5, 280.5, 301.2, 320.6, 339.1, 381.8, 420.6, 456.5, 490, 521.6, 551.5, 580.1, 607.4, 658.9, 707, 752.2, 795, 835.7, 874.6, 911.8, 947.6, 982, 1015, 1047, 1078, 1109, 1138, 1273, 1391, 1497, 1591, 1676, 1753, 1822, 1884, 1990, 2074, 2140, 2190, 2227, 2251, 2266, 2273, 2272, 2266, 2254, 2238, 2220, 2198, 2049, 1886, 1737, 1607, 1495, 1399, 1315, 1242, 1120, 1023, 942.8, 875.6, 818.4, 769.2, 726.1, 688, 654.2, 624, 596.7, 572, 549.5, 528.9 }; 232 233 for(i=0; i<78; i++) {e[18][i]=e18[i]*MeV*cm2/g;} 198 AddData(T0,e18, 18); 234 199 235 200 name [19] = "G4_CELLULOSE_NITRATE"; 236 201 G4double e19[78] = { 157.6, 186.4, 209.9, 230.3, 248.3, 279.7, 306.8, 330.8, 352.6, 372.6, 391.2, 408.7, 448.1, 483.2, 514.9, 544.1, 571.1, 596.4, 620.3, 642.8, 684.8, 723.2, 758.8, 792, 823.2, 852.7, 880.6, 907.2, 932.6, 956.9, 980.2, 1003, 1024, 1045, 1139, 1220, 1290, 1353, 1408, 1457, 1502, 1541, 1608, 1662, 1704, 1736, 1761, 1778, 1789, 1796, 1798, 1796, 1790, 1782, 1772, 1760, 1674, 1574, 1476, 1385, 1302, 1227, 1160, 1099, 993.8, 909.3, 839.7, 781.1, 731.2, 688.1, 650.2, 616.7, 587, 560.3, 536.2, 514.4, 494.5, 476.2 }; 237 238 for(i=0; i<78; i++) {e[19][i]=e19[i]*MeV*cm2/g;} 202 AddData(T0,e19, 19); 239 203 240 204 name [20] = "G4_BONE_CORTICAL_ICRP"; 241 205 G4double e20[78] = { 109.1, 132.8, 152.8, 170.4, 186.2, 214.4, 239.3, 261.7, 282.4, 301.6, 319.7, 336.8, 376.1, 411.7, 444.5, 475, 503.6, 530.7, 556.5, 581.1, 627.4, 670.4, 710.8, 748.9, 785, 819.4, 852.4, 883.9, 914.3, 943.5, 971.7, 999, 1025, 1051, 1168, 1270, 1360, 1440, 1511, 1574, 1630, 1680, 1763, 1826, 1872, 1905, 1927, 1939, 1943, 1941, 1933, 1921, 1905, 1887, 1866, 1844, 1720, 1593, 1475, 1369, 1274, 1193, 1123, 1062, 959.2, 877.1, 809.7, 753, 704.9, 663.4, 627, 594.9, 566.3, 540.6, 517.5, 496.5, 477.4, 459.8 }; 242 243 for(i=0; i<78; i++) {e[20][i]=e20[i]*MeV*cm2/g;} 206 AddData(T0,e20, 20); 244 207 245 208 name [21] = "G4_CESIUM_IODIDE"; 246 209 G4double e21[78] = { 40.6, 48.54, 55.16, 60.95, 66.15, 75.33, 83.38, 90.64, 97.29, 103.5, 109.3, 114.8, 127.3, 138.7, 149.2, 158.9, 168, 176.7, 184.9, 192.8, 207.6, 221.3, 234.2, 246.4, 258, 269.1, 279.7, 289.9, 299.7, 309.2, 318.3, 327.1, 335.7, 344, 382.3, 415.8, 445.6, 472.1, 495.7, 516.7, 535.4, 551.8, 578.9, 599.2, 613.8, 623.8, 629.9, 633, 633.6, 632.3, 629.5, 625.5, 620.6, 615.1, 609.1, 602.8, 567.7, 533, 501.8, 474.4, 450.3, 429, 410.1, 393.3, 364.6, 340.9, 321, 304, 289.2, 275.9, 264.1, 253.6, 243.9, 235, 226.7, 218.9, 211.9, 205.4 }; 247 248 for(i=0; i<78; i++) {e[21][i]=e21[i]*MeV*cm2/g;} 210 AddData(T0,e21, 21); 249 211 250 212 name [22] = "G4_Cu"; 251 213 G4double e22[78] = { 29.51, 36.49, 42.42, 47.68, 52.45, 60.98, 68.54, 75.4, 81.74, 87.65, 93.23, 98.51, 110.7, 121.8, 132, 141.5, 150.5, 159, 167.2, 174.9, 189.5, 203.2, 216, 228.1, 239.7, 250.7, 261.3, 271.4, 281.2, 290.7, 299.8, 308.7, 317.3, 325.6, 364.2, 398.4, 429.1, 456.8, 482.1, 505.1, 526.2, 545.4, 579, 607, 630.1, 649.1, 664.4, 676.6, 686.2, 693.4, 698.8, 702.4, 704.6, 705.7, 705.7, 704.9, 692.5, 672.6, 650.3, 627.6, 606, 585.6, 566.3, 548, 514, 483.4, 455.8, 431, 408.4, 388, 369.6, 353.7, 339.1, 325.7, 313.4, 302, 291.7, 282.3 }; 252 253 for(i=0; i<78; i++) {e[22][i]=e22[i]*MeV*cm2/g;} 214 AddData(T0,e22, 22); 254 215 255 216 name [23] = "G4_Fe"; 256 217 G4double e23[78] = { 54.06, 65.42, 74.91, 83.2, 90.66, 103.8, 115.3, 125.6, 135.1, 143.8, 152, 159.8, 177.4, 193.3, 207.8, 221.3, 233.9, 245.7, 256.9, 267.6, 287.7, 306.2, 323.5, 339.8, 355.2, 369.8, 383.8, 397.1, 410, 422.3, 434.2, 445.7, 456.9, 467.6, 517.1, 560.6, 599.4, 634.3, 665.9, 694.6, 720.8, 744.8, 786.6, 821.5, 850.4, 874.1, 893.1, 908.1, 919.6, 928, 933.6, 936.8, 938, 937.3, 935.1, 931.5, 899.9, 856.7, 810.9, 766.9, 727.3, 691.9, 660.2, 631.5, 581.8, 540.1, 504.6, 473.9, 447.2, 423.6, 402.6, 383.5, 366.9, 352, 338.3, 325.7, 314.1, 303.6 }; 257 258 for(i=0; i<78; i++) {e[23][i]=e23[i]*MeV*cm2/g;} 218 AddData(T0,e23, 23); 259 219 260 220 name [24] = "G4_FERROUS_SULFATE"; 261 221 G4double e24[78] = { 99.58, 123.5, 144, 162.1, 178.6, 208.1, 234.3, 258.2, 280.2, 300.8, 320.3, 338.7, 381.4, 420.2, 456, 489.5, 521, 551, 579.5, 606.8, 658.3, 706.3, 751.5, 794.2, 834.9, 873.7, 910.9, 946.6, 981, 1014, 1046, 1077, 1108, 1137, 1271, 1390, 1495, 1590, 1675, 1751, 1820, 1882, 1988, 2072, 2138, 2188, 2225, 2250, 2265, 2271, 2271, 2264, 2253, 2237, 2218, 2197, 2048, 1886, 1738, 1609, 1497, 1401, 1317, 1244, 1122, 1025, 944.6, 877.4, 820, 770.7, 727.5, 689.3, 655.4, 625.2, 597.8, 573.1, 550.5, 529.9 }; 262 263 for(i=0; i<78; i++) {e[24][i]=e24[i]*MeV*cm2/g;} 222 AddData(T0,e24, 24); 264 223 265 224 name [25] = "G4_Gd"; 266 225 G4double e25[78] = { 38.11, 45.4, 51.41, 56.61, 61.25, 69.34, 76.36, 82.61, 88.29, 93.53, 98.41, 103, 113.4, 122.7, 131.1, 138.9, 146.1, 152.9, 159.3, 165.4, 176.7, 187.1, 196.8, 205.9, 214.4, 222.5, 230.3, 237.6, 244.7, 251.5, 258, 264.3, 270.3, 276.2, 303.1, 326.6, 347.4, 366.2, 383.1, 398.5, 412.5, 425.4, 447.8, 466.5, 482.1, 494.8, 505.1, 513.2, 519.4, 523.9, 526.9, 528.6, 529.1, 528.6, 527.3, 525.2, 505.6, 481, 456.8, 434.6, 414.6, 396.6, 380.5, 366, 340.9, 319.7, 301.6, 285.8, 272, 259.8, 248.8, 239, 230.1, 222, 214.6, 207.7, 201.4, 195.6 }; 267 268 for(i=0; i<78; i++) {e[25][i]=e25[i]*MeV*cm2/g;} 226 AddData(T0,e25, 25); 269 227 270 228 name [26] = "G4_Ge"; 271 229 G4double e26[78] = { 47.65, 57.57, 65.83, 73.05, 79.53, 90.94, 100.9, 109.9, 118, 125.6, 132.7, 139.4, 154.6, 168.3, 180.8, 192.3, 203.1, 213.3, 222.9, 232, 249.1, 264.8, 279.5, 293.2, 306.1, 318.4, 330, 341.1, 351.7, 361.8, 371.5, 380.8, 389.8, 398.4, 437.2, 469.9, 497.8, 521.7, 542.3, 560.1, 575.5, 588.9, 610.7, 627.4, 640.1, 649.9, 657.3, 662.8, 666.8, 669.6, 671.4, 672.3, 672.4, 671.9, 670.9, 669.4, 656.9, 639.5, 619.8, 599.4, 578.4, 557.6, 537.5, 518.5, 483.6, 452.9, 425.8, 401.8, 380.5, 361.5, 344.3, 328.6, 315.1, 303.1, 292.1, 282, 272.6, 263.8 }; 272 273 for(i=0; i<78; i++) {e[26][i]=e26[i]*MeV*cm2/g;} 230 AddData(T0,e26, 26); 274 231 275 232 name [27] = "G4_Pyrex_Glass"; 276 233 G4double e27[78] = { 83.85, 102.1, 117.5, 131, 143.3, 165, 184.1, 201.3, 217.2, 232, 245.9, 259, 289.2, 316.5, 341.5, 364.8, 386.7, 407.4, 427.1, 445.8, 481.1, 513.8, 544.4, 573.2, 600.6, 626.6, 651.5, 675.3, 698.1, 720.1, 741.3, 761.7, 781.5, 800.6, 888, 963.9, 1031, 1090, 1142, 1189, 1231, 1268, 1330, 1378, 1414, 1441, 1460, 1473, 1481, 1485, 1484, 1481, 1475, 1466, 1456, 1445, 1389, 1323, 1249, 1171, 1095, 1029, 971.4, 920.7, 835.9, 768, 711.5, 663.8, 622.8, 587.4, 556.1, 528.4, 503.7, 481.5, 461.4, 443.2, 426.5, 411.2 }; 277 278 for(i=0; i<78; i++) {e[27][i]=e27[i]*MeV*cm2/g;} 234 AddData(T0,e27, 27); 279 235 280 236 name [28] = "G4_H"; 281 237 G4double e28[78] = { 212, 275.4, 331.7, 383, 430.9, 518.8, 599.2, 674, 744.5, 811.5, 875.6, 937.1, 1082, 1217, 1344, 1465, 1580, 1691, 1798, 1901, 2098, 2285, 2463, 2634, 2798, 2956, 3108, 3256, 3399, 3538, 3674, 3805, 3933, 4058, 4637, 5152, 5610, 6019, 6383, 6705, 6988, 7235, 7632, 7915, 8100, 8203, 8240, 8222, 8161, 8067, 7947, 7808, 7655, 7494, 7327, 7157, 6345, 5647, 5068, 4588, 4188, 3860, 3585, 3351, 2971, 2675, 2438, 2242, 2078, 1939, 1818, 1713, 1620, 1538, 1464, 1398, 1337, 1283 }; 282 283 for(i=0; i<78; i++) {e[28][i]=e28[i]*MeV*cm2/g;} 284 285 name [29] = "G4_HELIUM"; 238 AddData(T0,e28, 28); 239 240 name [29] = "G4_He"; 286 241 G4double e29[78] = { 87.26, 110.8, 131.3, 149.8, 166.8, 197.7, 225.5, 251.1, 275, 297.5, 318.9, 339.4, 387, 430.9, 471.8, 510.4, 547, 581.9, 615.3, 647.5, 708.7, 766.1, 820.5, 872.3, 921.8, 969.3, 1015, 1059, 1102, 1143, 1183, 1221, 1259, 1296, 1465, 1614, 1748, 1867, 1975, 2071, 2156, 2233, 2361, 2460, 2535, 2588, 2624, 2644, 2652, 2650, 2639, 2621, 2598, 2571, 2540, 2507, 2323, 2139, 1976, 1832, 1706, 1593, 1493, 1402, 1249, 1130, 1033, 953.8, 886.8, 829.5, 779.8, 736.4, 697.9, 663.7, 632.9, 605.2, 580, 557 }; 287 288 for(i=0; i<78; i++) {e[29][i]=e29[i]*MeV*cm2/g;} 242 AddData(T0,e29, 29); 289 243 290 244 name [30] = "G4_KAPTON"; 291 245 G4double e30[78] = { 165.5, 197.6, 224.2, 247.2, 267.8, 304, 335.4, 363.5, 389.1, 412.8, 434.8, 455.6, 502.9, 545.2, 583.8, 619.4, 652.6, 683.8, 713.3, 741.2, 793.5, 841.6, 886.3, 928.2, 967.7, 1005, 1041, 1074, 1107, 1138, 1167, 1196, 1223, 1250, 1369, 1471, 1560, 1636, 1703, 1762, 1812, 1857, 1928, 1981, 2018, 2042, 2056, 2062, 2061, 2054, 2043, 2028, 2010, 1990, 1969, 1946, 1819, 1688, 1565, 1451, 1350, 1264, 1190, 1125, 1017, 929.8, 858.3, 798.2, 747, 702.8, 664, 629.8, 599.3, 571.9, 547.2, 524.8, 504.4, 485.7 }; 292 293 for(i=0; i<78; i++) {e[30][i]=e30[i]*MeV*cm2/g;} 246 AddData(T0,e30, 30); 294 247 295 248 name [31] = "G4_Kr"; 296 249 G4double e31[78] = { 10.15, 13.69, 16.93, 19.96, 22.84, 28.23, 33.29, 38.08, 42.66, 47.08, 51.35, 55.5, 65.43, 74.84, 83.85, 92.52, 100.9, 109.1, 117, 124.7, 139.7, 154.1, 168, 181.5, 194.6, 207.4, 219.9, 232.1, 244, 255.7, 267.2, 278.4, 289.5, 300.3, 351.9, 399.6, 443.7, 484.4, 522.1, 556.7, 588.4, 617.2, 666.6, 705.7, 735.5, 757, 771.4, 779.9, 783.4, 783, 779.4, 773.6, 765.9, 757, 747.2, 736.9, 683.7, 635.6, 595.2, 561.5, 533, 508.6, 487.3, 468.5, 439.9, 417.9, 398.8, 381.4, 364.9, 349.2, 334.2, 319.8, 306.2, 293.7, 282.8, 272.8, 263.6, 255.2 }; 297 298 for(i=0; i<78; i++) {e[31][i]=e31[i]*MeV*cm2/g;} 250 AddData(T0,e31, 31); 299 251 300 252 name [32] = "G4_LITHIUM_TETRABORATE"; 301 253 G4double e32[78] = { 132.7, 159.4, 181.6, 200.9, 218.2, 248.6, 275, 298.7, 320.4, 340.4, 359.1, 376.6, 416.8, 452.7, 485.5, 515.8, 544, 570.6, 595.8, 619.7, 664.3, 705.6, 743.9, 779.9, 813.9, 846.1, 876.8, 906.1, 934.2, 961.1, 987, 1012, 1036, 1059, 1166, 1258, 1338, 1410, 1474, 1531, 1583, 1628, 1706, 1767, 1814, 1849, 1874, 1891, 1899, 1902, 1899, 1891, 1875, 1852, 1825, 1795, 1638, 1494, 1375, 1276, 1193, 1121, 1058, 1002, 908.8, 833.2, 770.5, 717.6, 672.4, 633.2, 598.8, 568.3, 541.2, 516.9, 494.8, 474.9, 456.6, 439.9 }; 302 303 for(i=0; i<78; i++) {e[32][i]=e32[i]*MeV*cm2/g;} 254 AddData(T0,e32, 32); 304 255 305 256 name [33] = "G4_LITHIUM_FLUORIDE"; 306 257 G4double e33[78] = { 118.7, 142.6, 162.5, 179.7, 195.2, 222.4, 246, 267.2, 286.5, 304.3, 321, 336.6, 372.4, 404.4, 433.5, 460.4, 485.5, 509.1, 531.4, 552.6, 592.1, 628.5, 662.4, 694.1, 724.1, 752.4, 779.4, 805.1, 829.6, 853.2, 875.9, 897.6, 918.7, 938.9, 1031, 1110, 1179, 1240, 1294, 1341, 1383, 1421, 1483, 1530, 1566, 1592, 1610, 1621, 1627, 1627, 1624, 1618, 1609, 1598, 1585, 1571, 1483, 1387, 1296, 1214, 1140, 1074, 1015, 962.2, 872, 799.7, 739.5, 688.5, 644.8, 606.9, 573.7, 544.4, 518.3, 494.9, 473.6, 454.3, 436.7, 420.6 }; 307 308 for(i=0; i<78; i++) {e[33][i]=e33[i]*MeV*cm2/g;} 258 AddData(T0,e33, 33); 309 259 310 260 name [34] = "G4_M3_WAX"; 311 261 G4double e34[78] = { 173.6, 209, 238.5, 264.3, 287.6, 328.7, 364.7, 397.1, 426.9, 454.5, 480.4, 504.9, 561, 611.6, 658, 701.1, 741.6, 779.8, 816, 850.6, 915.4, 975.6, 1032, 1085, 1135, 1182, 1228, 1271, 1313, 1353, 1392, 1429, 1465, 1499, 1657, 1792, 1910, 2012, 2101, 2179, 2247, 2305, 2398, 2463, 2507, 2533, 2544, 2544, 2534, 2517, 2494, 2468, 2437, 2405, 2371, 2335, 2154, 1981, 1825, 1686, 1564, 1460, 1372, 1295, 1167, 1064, 980.4, 910.2, 850.4, 798.9, 753.8, 714.2, 678.9, 647.3, 618.8, 593, 569.4, 547.9 }; 312 313 for(i=0; i<78; i++) {e[34][i]=e34[i]*MeV*cm2/g;} 262 AddData(T0,e34, 34); 314 263 315 264 name [35] = "G4_MS20_TISSUE"; 316 265 G4double e35[78] = { 163.5, 196.6, 224.1, 248.2, 269.8, 308, 341.4, 371.4, 398.9, 424.4, 448.3, 470.9, 522.5, 569, 611.6, 651.1, 688, 722.9, 756, 787.5, 846.6, 901.2, 952.3, 1000, 1046, 1089, 1130, 1169, 1207, 1243, 1278, 1311, 1344, 1375, 1516, 1638, 1744, 1836, 1916, 1986, 2048, 2101, 2185, 2247, 2288, 2314, 2327, 2330, 2325, 2312, 2295, 2273, 2249, 2222, 2193, 2163, 2002, 1845, 1703, 1575, 1463, 1368, 1286, 1215, 1097, 1001, 923.2, 857.7, 802, 753.9, 711.7, 674.6, 641.6, 611.9, 585.2, 561, 539, 518.8 }; 317 318 for(i=0; i<78; i++) {e[35][i]=e35[i]*MeV*cm2/g;} 266 AddData(T0,e35, 35); 319 267 320 268 name [36] = "G4_METHANE"; 321 269 G4double e36[78] = { 197.5, 241.8, 279.3, 312.2, 342, 394.9, 441.5, 483.7, 522.4, 558.5, 592.4, 624.4, 698.1, 764.8, 826, 883.1, 936.6, 987.3, 1035, 1081, 1168, 1249, 1324, 1396, 1464, 1529, 1591, 1650, 1708, 1764, 1818, 1870, 1920, 1970, 2198, 2402, 2586, 2754, 2907, 3047, 3175, 3291, 3492, 3652, 3773, 3856, 3905, 3921, 3899, 3849, 3783, 3708, 3627, 3544, 3460, 3378, 2998, 2685, 2432, 2226, 2055, 1911, 1789, 1683, 1508, 1370, 1257, 1163, 1084, 1015, 955.9, 903.7, 857.5, 816.2, 779.1, 745.5, 714.9, 687.1 }; 322 323 for(i=0; i<78; i++) {e[36][i]=e36[i]*MeV*cm2/g;} 270 AddData(T0,e36, 36); 324 271 325 272 name [37] = "G4_Mo"; 326 273 G4double e37[78] = { 58.22, 68.98, 77.79, 85.4, 92.16, 103.9, 114.1, 123.1, 131.3, 138.8, 145.8, 152.4, 167.3, 180.5, 192.5, 203.5, 213.8, 223.4, 232.4, 241, 256.9, 271.6, 285.1, 297.8, 309.8, 321.1, 331.8, 342.1, 351.9, 361.3, 370.3, 379, 387.4, 395.5, 432.4, 464.5, 492.9, 518.2, 541, 561.6, 580.4, 597.4, 626.9, 651.2, 671.2, 687.3, 700.1, 710, 717.3, 722.3, 725.4, 726.7, 726.5, 725, 722.3, 718.8, 690.9, 655, 617.8, 582.6, 552.1, 525.7, 502.3, 481.5, 445.5, 415.5, 389.9, 367.7, 348.1, 330.6, 314.8, 300.9, 288.6, 277.3, 266.9, 257.6, 249, 241.2 }; 327 328 for(i=0; i<78; i++) {e[37][i]=e37[i]*MeV*cm2/g;} 274 AddData(T0,e37, 37); 329 275 330 276 name [38] = "G4_MUSCLE_WITH_SUCROSE"; 331 277 G4double e38[78] = { 111.7, 137.5, 159.4, 178.8, 196.5, 227.9, 255.7, 281, 304.4, 326.2, 346.7, 366.2, 411.2, 452, 489.7, 525, 558.1, 589.5, 619.5, 648.1, 702.2, 752.5, 799.9, 844.6, 887.2, 927.9, 966.8, 1004, 1040, 1075, 1108, 1141, 1172, 1203, 1343, 1467, 1576, 1674, 1762, 1841, 1912, 1975, 2081, 2165, 2230, 2277, 2310, 2331, 2342, 2344, 2339, 2329, 2313, 2293, 2270, 2244, 2074, 1896, 1739, 1607, 1494, 1398, 1314, 1241, 1120, 1022, 942.4, 875.3, 818.1, 768.9, 725.8, 687.7, 653.9, 623.7, 596.4, 571.7, 549.2, 528.6 }; 332 333 for(i=0; i<78; i++) {e[38][i]=e38[i]*MeV*cm2/g;} 278 AddData(T0,e38, 38); 334 279 335 280 name [39] = "G4_MUSCLE_WITHOUT_SUCROSE"; 336 281 G4double e39[78] = { 108.2, 133.5, 155, 174.1, 191.4, 222.4, 249.8, 274.8, 297.8, 319.3, 339.6, 358.9, 403.3, 443.7, 481, 515.9, 548.7, 579.8, 609.5, 637.9, 691.4, 741.4, 788.3, 832.7, 875, 915.3, 953.9, 991.1, 1027, 1061, 1095, 1127, 1158, 1189, 1328, 1451, 1560, 1658, 1745, 1824, 1895, 1958, 2065, 2150, 2215, 2263, 2298, 2320, 2332, 2335, 2331, 2321, 2306, 2287, 2265, 2240, 2075, 1901, 1746, 1613, 1501, 1404, 1320, 1247, 1125, 1027, 946.2, 878.8, 821.4, 772, 728.6, 690.4, 656.4, 626.1, 598.7, 573.9, 551.3, 530.6 }; 337 338 for(i=0; i<78; i++) {e[39][i]=e39[i]*MeV*cm2/g;} 282 AddData(T0,e39, 39); 339 283 340 284 name [40] = "G4_MUSCLE_SKELETAL_ICRP"; 341 285 G4double e40[78] = { 104.5, 129.2, 150.2, 168.8, 185.8, 216.1, 242.9, 267.4, 290, 311.1, 331, 349.8, 393.5, 433.1, 469.7, 503.9, 536.2, 566.7, 595.9, 623.7, 676.3, 725.4, 771.5, 815.1, 856.6, 896.2, 934.1, 970.6, 1006, 1040, 1072, 1104, 1135, 1165, 1302, 1422, 1530, 1626, 1712, 1790, 1860, 1922, 2029, 2113, 2178, 2228, 2263, 2286, 2299, 2304, 2302, 2293, 2280, 2262, 2242, 2218, 2059, 1888, 1735, 1604, 1492, 1396, 1312, 1240, 1118, 1021, 941.1, 874.1, 817, 767.9, 724.9, 686.8, 653.1, 622.9, 595.7, 571, 548.6, 528 }; 342 343 for(i=0; i<78; i++) {e[40][i]=e40[i]*MeV*cm2/g;} 286 AddData(T0,e40, 40); 344 287 345 288 name [41] = "G4_MUSCLE_STRIATED_ICRU"; 346 289 G4double e41[78] = { 104.7, 129.4, 150.5, 169.2, 186.2, 216.5, 243.4, 267.9, 290.5, 311.7, 331.6, 350.5, 394.2, 433.9, 470.6, 504.9, 537.2, 567.8, 596.9, 624.9, 677.5, 726.7, 772.8, 816.5, 858.1, 897.8, 935.8, 972.3, 1007, 1041, 1074, 1106, 1137, 1167, 1304, 1425, 1532, 1629, 1715, 1793, 1863, 1925, 2032, 2116, 2181, 2230, 2265, 2289, 2302, 2306, 2304, 2295, 2282, 2264, 2244, 2220, 2063, 1894, 1742, 1611, 1498, 1401, 1318, 1244, 1123, 1025, 944.5, 877.2, 819.9, 770.6, 727.3, 689.2, 655.3, 625, 597.7, 572.9, 550.4, 529.7 }; 347 348 for(i=0; i<78; i++) {e[41][i]=e41[i]*MeV*cm2/g;} 290 AddData(T0,e41, 41); 349 291 350 292 name [42] = "G4_N"; 351 293 G4double e42[78] = { 82.8, 103.7, 121.6, 137.7, 152.3, 178.7, 202.3, 223.8, 243.8, 262.5, 280.2, 297.1, 336.2, 372, 405.1, 436.2, 465.5, 493.4, 520.1, 545.7, 594.1, 639.3, 682, 722.5, 761, 797.9, 833.4, 867.4, 900.3, 932, 962.8, 992.5, 1021, 1049, 1179, 1293, 1395, 1486, 1567, 1640, 1706, 1765, 1864, 1940, 1999, 2041, 2069, 2086, 2093, 2091, 2083, 2069, 2051, 2030, 2005, 1978, 1819, 1660, 1522, 1406, 1308, 1224, 1151, 1088, 982.9, 898.5, 829.5, 771.1, 721.3, 678.5, 641, 608, 578.6, 552.3, 528.5, 506.9, 487.2, 469.1 }; 352 353 for(i=0; i<78; i++) {e[42][i]=e42[i]*MeV*cm2/g;} 294 AddData(T0,e42, 42); 354 295 355 296 name [43] = "G4_SODIUM_IODIDE"; 356 297 G4double e43[78] = { 35.86, 44.19, 51.24, 57.48, 63.13, 73.21, 82.12, 90.2, 97.64, 104.6, 111.1, 117.3, 131.6, 144.5, 156.4, 167.6, 178, 187.9, 197.3, 206.3, 223.3, 239.1, 253.9, 268, 281.3, 294, 306.2, 317.9, 329.2, 340.1, 350.6, 360.8, 370.6, 380.2, 424.5, 463.5, 498.4, 529.9, 558.2, 583.8, 607, 627.8, 663.4, 691.6, 713.4, 729.6, 740.9, 748.1, 751.7, 752.4, 750.7, 747, 741.7, 735.1, 727.6, 719.5, 664.4, 611.2, 569.4, 538.3, 514, 491.6, 472.1, 454, 422.9, 393.7, 370.2, 349.6, 331.4, 315.3, 301.2, 288.5, 276.8, 266.1, 256.3, 247.1, 238.9, 231.5 }; 357 358 for(i=0; i<78; i++) {e[43][i]=e43[i]*MeV*cm2/g;} 298 AddData(T0,e43, 43); 359 299 360 300 name [44] = "G4_Ne"; 361 301 G4double e44[78] = { 68.73, 83.7, 96.26, 107.3, 117.2, 134.8, 150.3, 164.2, 177, 188.8, 199.9, 210.4, 234.5, 256.2, 276.1, 294.6, 311.9, 328.3, 343.8, 358.6, 386.3, 412, 436.1, 458.8, 480.3, 500.8, 520.3, 539.1, 557.1, 574.5, 591.2, 607.5, 623.2, 638.4, 708.4, 770.3, 825.6, 875.7, 921.2, 962.8, 1001, 1036, 1098, 1150, 1194, 1230, 1260, 1285, 1304, 1319, 1330, 1338, 1343, 1344, 1344, 1341, 1296, 1229, 1160, 1095, 1035, 981.4, 932.6, 888.5, 812.1, 748.3, 695.6, 650.4, 611.3, 577, 546.8, 520, 496, 474.4, 454.8, 437, 420.7, 405.7 }; 362 363 for(i=0; i<78; i++) {e[44][i]=e44[i]*MeV*cm2/g;} 364 365 name [45] = "G4_NYLON-6/6"; 302 AddData(T0,e44, 44); 303 304 name [45] = "G4_NYLON-6-6"; 366 305 G4double e45[78] = { 167.4, 201.6, 230.3, 255.4, 278, 317.9, 352.9, 384.4, 413.4, 440.3, 465.5, 489.3, 544, 593.3, 638.6, 680.6, 720.1, 757.3, 792.7, 826.4, 889.7, 948.5, 1003, 1055, 1104, 1151, 1195, 1238, 1279, 1318, 1356, 1392, 1427, 1461, 1617, 1750, 1867, 1969, 2059, 2138, 2207, 2267, 2363, 2433, 2482, 2512, 2527, 2531, 2525, 2511, 2491, 2467, 2439, 2408, 2375, 2340, 2160, 1987, 1830, 1690, 1567, 1463, 1374, 1297, 1169, 1066, 981.3, 910.8, 850.9, 799.3, 754.1, 714.4, 679, 647.4, 618.9, 593, 569.5, 547.9 }; 367 368 for(i=0; i<78; i++) {e[45][i]=e45[i]*MeV*cm2/g;} 306 AddData(T0,e45, 45); 369 307 370 308 name [46] = "G4_O"; 371 G4double e46[78] = { 105.8, 117.3, 257.6, 1.139e-05, 5.976e-06, 0.005, 248.1, 71.83, 352, 3.186e-05, 2.012e-05, 0.015, 412.7, 40.96, 503.1, 6.782e-05, 5.098e-05, 0.035, 610.6, 24.07, 700.7, 0.0001156, 9.613e-05, 0.07, 820, 15.89, 884.2, 0.0001583, 0.0001354, 0.125, 1124, 8.719, 1280, 0.0002775, 0.0002641, 0.3, 1573, 4.478, 1697, 0.0004528, 0.000448, 0.65, 1818, 2.655, 1822, 0.0006468, 0.0006403, 1, 1667, 1.474, 1431, 0.00138, 0.001539, 2.75, 1038, 0.7076, 860.9, 0.003906, 0.004519, 6, 616.1, 0.3845, 556.8, 0.009419, 0.01034, 9.5, 452, 0.2295, 334.7, 0.03447, 0.04325, 27.5, 196.3, 0.09039, 156.5, 0.1784, 0.2149, 60 }; 372 373 for(i=0; i<78; i++) {e[46][i]=e46[i]*MeV*cm2/g;} 309 G4double e46[78] = { 1.058E+02, 1.283E+02, 1.471E+02, 1.636E+02, 1.784E+02, 2.046E+02, 2.275E+02, 2.481E+02, 2.670E+02, 2.845E+02, 3.009E+02, 3.163E+02, 3.518E+02, 3.836E+02, 4.127E+02, 4.398E+02, 4.650E+02, 4.889E+02, 5.115E+02, 5.330E+02, 5.733E+02, 6.106E+02, 6.455E+02, 6.783E+02, 7.094E+02, 7.389E+02, 7.671E+02, 7.941E+02, 8.200E+02, 8.450E+02, 8.690E+02, 8.923E+02, 9.147E+02, 9.365E+02, 1.036E+03, 1.124E+03, 1.202E+03, 1.272E+03, 1.335E+03, 1.392E+03, 1.444E+03, 1.491E+03, 1.573E+03, 1.639E+03, 1.693E+03, 1.735E+03, 1.768E+03, 1.792E+03, 1.808E+03, 1.818E+03, 1.821E+03, 1.820E+03, 1.814E+03, 1.805E+03, 1.792E+03, 1.777E+03, 1.667E+03, 1.544E+03, 1.430E+03, 1.329E+03, 1.241E+03, 1.164E+03, 1.097E+03, 1.038E+03, 9.395E+02, 8.602E+02, 7.947E+02, 7.395E+02, 6.924E+02, 6.519E+02, 6.161E+02, 5.845E+02, 5.564E+02, 5.313E+02, 5.086E+02, 4.880E+02, 4.692E+02, 4.520E+02}; 310 AddData(T0,e46, 46); 374 311 375 312 name [47] = "G4_PARAFFIN"; 376 313 G4double e47[78] = { 193.8, 233, 265.8, 294.4, 320.3, 365.9, 405.9, 441.9, 475, 505.7, 534.5, 561.7, 624.2, 680.6, 732.3, 780.4, 825.5, 868.2, 908.6, 947.2, 1020, 1087, 1150, 1209, 1265, 1319, 1370, 1419, 1465, 1510, 1554, 1595, 1636, 1675, 1852, 2004, 2137, 2253, 2354, 2442, 2518, 2584, 2688, 2762, 2810, 2837, 2848, 2845, 2831, 2810, 2782, 2749, 2713, 2674, 2633, 2592, 2381, 2184, 2007, 1851, 1714, 1598, 1500, 1414, 1272, 1158, 1066, 988.4, 922.7, 866.1, 816.7, 773.2, 734.5, 699.9, 668.8, 640.6, 614.9, 591.4 }; 377 378 for(i=0; i<78; i++) {e[47][i]=e47[i]*MeV*cm2/g;} 314 AddData(T0,e47, 47); 379 315 380 316 name [48] = "G4_Pb"; 381 317 G4double e48[78] = { 17.96, 22.18, 25.76, 28.92, 31.8, 36.93, 41.47, 45.6, 49.4, 52.95, 56.3, 59.46, 66.77, 73.41, 79.52, 85.23, 90.6, 95.69, 100.5, 105.2, 113.9, 122, 129.7, 136.9, 143.8, 150.3, 156.6, 162.7, 168.5, 174.1, 179.5, 184.8, 189.9, 194.9, 217.7, 237.9, 256, 272.3, 287, 300.4, 312.6, 323.6, 342.6, 358.2, 370.7, 380.6, 388.3, 394.2, 398.4, 401.3, 403.1, 404, 404.1, 403.5, 402.4, 401, 392.5, 380.4, 365.3, 348.6, 332, 317.6, 304.9, 293.7, 274.4, 258.3, 244.7, 232.9, 222.5, 213.2, 205, 197.5, 190.7, 184.4, 178.7, 173.4, 168.4, 163.9 }; 382 383 for(i=0; i<78; i++) {e[48][i]=e48[i]*MeV*cm2/g;} 384 385 name [49] = "G4_PHOTOGRAPHIC_EMULSION"; 318 AddData(T0,e48, 48); 319 320 name [49] = "G4_PHOTO_EMULSION"; 386 321 G4double e49[78] = { 46.69, 57.18, 66.06, 73.91, 81.04, 93.75, 105, 115.2, 124.7, 133.5, 141.8, 149.6, 167.8, 184.3, 199.6, 213.8, 227.3, 240, 252.1, 263.8, 285.7, 306.2, 325.4, 343.6, 361, 377.5, 393.4, 408.7, 423.3, 437.5, 451.2, 464.5, 477.3, 489.8, 547, 597.3, 641.7, 681.2, 716.3, 747.6, 775.5, 800.2, 841.5, 873.5, 897.8, 915.8, 928.6, 937.1, 940, 938.4, 933.8, 927, 918.6, 909.2, 899.1, 888.5, 833.7, 781.8, 735.1, 693.7, 657.1, 624.6, 595.5, 569.4, 524.5, 487.2, 455.6, 428.5, 404.9, 383.9, 365.2, 348.6, 333.8, 320.5, 308.3, 297.2, 287, 277.8 }; 387 388 for(i=0; i<78; i++) {e[49][i]=e49[i]*MeV*cm2/g;} 322 AddData(T0,e49, 49); 389 323 390 324 name [50] = "G4_PLASTIC_SC_VINYLTOLUENE"; 391 325 G4double e50[78] = { 192.4, 229.8, 260.8, 287.8, 312, 354.4, 391.4, 424.6, 454.8, 482.8, 509, 533.7, 590, 640.5, 686.6, 729.3, 769.2, 806.7, 842.2, 876, 939.2, 997.5, 1052, 1103, 1151, 1197, 1240, 1281, 1321, 1359, 1395, 1430, 1464, 1497, 1644, 1769, 1878, 1971, 2053, 2123, 2184, 2236, 2319, 2377, 2414, 2436, 2445, 2443, 2433, 2417, 2396, 2371, 2343, 2314, 2283, 2251, 2091, 1936, 1791, 1657, 1537, 1435, 1349, 1273, 1148, 1047, 964.8, 895.9, 837.3, 786.7, 742.4, 703.5, 668.8, 637.7, 609.7, 584.3, 561.2, 540 }; 392 393 for(i=0; i<78; i++) {e[50][i]=e50[i]*MeV*cm2/g;} 326 AddData(T0,e50, 50); 394 327 395 328 name [51] = "G4_POLYCARBONATE"; 396 329 G4double e51[78] = { 146.3, 178.1, 204.7, 228.1, 249.2, 286.4, 319.1, 348.5, 375.5, 400.6, 424.1, 446.2, 497, 542.8, 584.7, 623.5, 659.9, 694.2, 726.6, 757.6, 815.5, 869.1, 919, 965.9, 1010, 1052, 1092, 1130, 1167, 1202, 1235, 1268, 1299, 1329, 1465, 1581, 1681, 1768, 1843, 1908, 1965, 2013, 2090, 2144, 2180, 2201, 2210, 2209, 2202, 2188, 2170, 2149, 2125, 2099, 2072, 2044, 1912, 1785, 1661, 1543, 1433, 1340, 1261, 1191, 1076, 982.4, 906, 842, 787.5, 740.5, 699.2, 662.9, 630.5, 601.5, 575.3, 551.6, 529.9, 510.1 }; 397 398 for(i=0; i<78; i++) {e[51][i]=e51[i]*MeV*cm2/g;} 330 AddData(T0,e51, 51); 399 331 400 332 name [52] = "G4_POLYETHYLENE"; 401 333 G4double e52[78] = { 168.2, 205.8, 237.5, 265.4, 290.7, 335.4, 374.8, 410.5, 443.2, 473.7, 502.3, 529.3, 591.4, 647.6, 699.1, 747.1, 792.1, 834.6, 874.9, 913.5, 985.9, 1053, 1116, 1175, 1232, 1285, 1336, 1385, 1432, 1478, 1521, 1564, 1604, 1644, 1825, 1983, 2122, 2246, 2355, 2453, 2539, 2615, 2740, 2833, 2899, 2940, 2962, 2967, 2958, 2938, 2908, 2871, 2829, 2782, 2732, 2681, 2418, 2183, 1987, 1826, 1691, 1577, 1480, 1396, 1257, 1145, 1053, 977.1, 912.4, 856.5, 807.8, 764.9, 726.7, 692.6, 661.8, 633.9, 608.6, 585.4 }; 402 403 for(i=0; i<78; i++) {e[52][i]=e52[i]*MeV*cm2/g;} 334 AddData(T0,e52, 52); 404 335 405 336 name [53] = "G4_MYLAR"; 406 337 G4double e53[78] = { 163.2, 195.3, 221.8, 244.9, 265.6, 301.9, 333.5, 361.8, 387.6, 411.5, 433.8, 454.8, 502.7, 545.7, 584.8, 621, 654.8, 686.6, 716.7, 745.3, 798.7, 847.9, 893.8, 936.8, 977.4, 1016, 1052, 1087, 1121, 1153, 1183, 1213, 1241, 1269, 1393, 1500, 1593, 1673, 1744, 1806, 1860, 1908, 1985, 2042, 2083, 2110, 2126, 2133, 2133, 2126, 2115, 2100, 2082, 2061, 2038, 2014, 1874, 1731, 1599, 1482, 1379, 1290, 1215, 1148, 1038, 948.5, 875.3, 813.8, 761.5, 716.3, 676.6, 641.6, 610.5, 582.5, 557.3, 534.4, 513.6, 494.5 }; 407 408 for(i=0; i<78; i++) {e[53][i]=e53[i]*MeV*cm2/g;} 338 AddData(T0,e53, 53); 409 339 410 340 name [54] = "G4_PLEXIGLASS"; 411 341 G4double e54[78] = { 118.7, 146.6, 170.3, 191.4, 210.4, 244.5, 274.7, 302.1, 327.3, 350.9, 373.1, 394.2, 442.7, 486.8, 527.4, 565.2, 600.9, 634.6, 666.7, 697.4, 755.1, 808.9, 859.3, 906.9, 952, 995, 1036, 1075, 1113, 1150, 1185, 1219, 1252, 1283, 1428, 1554, 1665, 1762, 1848, 1923, 1990, 2049, 2144, 2216, 2266, 2300, 2320, 2328, 2327, 2318, 2302, 2282, 2259, 2232, 2203, 2173, 2008, 1847, 1702, 1574, 1464, 1369, 1288, 1217, 1099, 1004, 925.6, 860.1, 804.4, 756.3, 714.1, 676.9, 643.8, 614.2, 587.4, 563.2, 541.1, 520.8 }; 412 413 for(i=0; i<78; i++) {e[54][i]=e54[i]*MeV*cm2/g;} 342 AddData(T0,e54, 54); 414 343 415 344 name [55] = "G4_POLYPROPYLENE"; 416 345 G4double e55[78] = { 193.7, 232.8, 265.4, 293.9, 319.6, 365, 404.8, 440.6, 473.4, 503.9, 532.5, 559.6, 621.6, 677.5, 728.8, 776.5, 821.2, 863.4, 903.5, 941.8, 1014, 1080, 1142, 1201, 1257, 1309, 1360, 1408, 1454, 1499, 1541, 1583, 1622, 1661, 1836, 1986, 2117, 2231, 2331, 2417, 2492, 2557, 2660, 2732, 2779, 2806, 2817, 2814, 2801, 2780, 2752, 2720, 2684, 2646, 2606, 2565, 2359, 2165, 1991, 1836, 1700, 1585, 1488, 1403, 1263, 1150, 1058, 981.3, 916.1, 860, 810.9, 767.8, 729.5, 695.1, 664.3, 636.2, 610.8, 587.5 }; 417 418 for(i=0; i<78; i++) {e[55][i]=e55[i]*MeV*cm2/g;} 346 AddData(T0,e55, 55); 419 347 420 348 name [56] = "G4_POLYSTYRENE"; 421 349 G4double e56[78] = { 153, 187.5, 216.6, 242.2, 265.3, 306.5, 342.7, 375.5, 405.6, 433.6, 460, 484.9, 542.1, 593.8, 641.3, 685.4, 726.9, 766, 803.1, 838.5, 905, 966.6, 1024, 1078, 1130, 1178, 1225, 1269, 1312, 1352, 1392, 1429, 1466, 1501, 1661, 1797, 1915, 2017, 2106, 2183, 2249, 2305, 2394, 2454, 2492, 2511, 2516, 2509, 2494, 2471, 2443, 2410, 2376, 2339, 2301, 2262, 2070, 1895, 1742, 1609, 1493, 1395, 1312, 1239, 1119, 1021, 941.4, 874.6, 817.8, 768.7, 725.7, 687.9, 654.1, 623.9, 596.6, 571.9, 549.4, 528.7 }; 422 423 for(i=0; i<78; i++) {e[56][i]=e56[i]*MeV*cm2/g;} 350 AddData(T0,e56, 56); 424 351 425 352 name [57] = "G4_TEFLON"; 426 353 G4double e57[78] = { 82.7, 99.97, 114.4, 127.1, 138.4, 158.5, 176.2, 192, 206.5, 220, 232.6, 244.5, 271.9, 296.4, 319, 339.8, 359.4, 377.8, 395.3, 412, 443.3, 472.2, 499.3, 524.7, 548.8, 571.7, 593.6, 614.5, 634.6, 653.9, 672.5, 690.4, 707.8, 724.6, 801.6, 868.9, 928.6, 981.9, 1030, 1073, 1112, 1148, 1209, 1260, 1301, 1334, 1361, 1382, 1397, 1408, 1415, 1419, 1420, 1418, 1414, 1409, 1399, 1373, 1319, 1246, 1165, 1095, 1034, 979.4, 887.4, 813.7, 752.5, 700.8, 656.5, 618.1, 584.5, 554.8, 528.3, 504.6, 483, 463.5, 445.6, 429.3 }; 427 428 for(i=0; i<78; i++) {e[57][i]=e57[i]*MeV*cm2/g;} 354 AddData(T0,e57, 57); 429 355 430 356 name [58] = "G4_POLYVINYL_CHLORIDE"; 431 357 G4double e58[78] = { 94.27, 114.4, 131.3, 146.3, 159.9, 184, 205.5, 224.9, 242.9, 259.7, 275.5, 290.5, 325.3, 357, 386.3, 413.7, 439.5, 464.1, 487.6, 510.1, 552.6, 592.4, 629.9, 665.5, 699.4, 731.8, 762.9, 792.9, 821.8, 849.7, 876.7, 902.9, 928.2, 952.9, 1067, 1167, 1255, 1335, 1405, 1468, 1525, 1574, 1657, 1719, 1764, 1795, 1814, 1823, 1824, 1818, 1807, 1792, 1774, 1753, 1731, 1708, 1591, 1482, 1385, 1299, 1222, 1153, 1092, 1037, 941.7, 862.4, 795.8, 739.8, 692.3, 651.2, 615.4, 583.7, 555.6, 530.3, 507.5, 486.9, 468, 450.8 }; 432 433 for(i=0; i<78; i++) {e[58][i]=e58[i]*MeV*cm2/g;} 358 AddData(T0,e58, 58); 434 359 435 360 name [59] = "G4_PROPANE"; 436 361 G4double e59[78] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022, 1868, 1739, 1629, 1534, 1377, 1252, 1150, 1065, 993, 931.1, 877.2, 829.9, 787.8, 750.2, 716.4, 685.8, 658, 632.5 }; 437 438 for(i=0; i<78; i++) {e[59][i]=e59[i]*MeV*cm2/g;} 362 AddData(T0,e59, 59); 439 363 440 364 name [60] = "G4_Pt"; 441 365 G4double e60[78] = { 14.45, 17.87, 20.78, 23.37, 25.71, 29.9, 33.61, 36.99, 40.1, 43.01, 45.75, 48.35, 54.36, 59.81, 64.84, 69.54, 73.97, 78.17, 82.17, 86, 93.22, 99.96, 106.3, 112.3, 118, 123.5, 128.7, 133.8, 138.7, 143.4, 147.9, 152.4, 156.7, 160.8, 180.3, 197.6, 213.3, 227.7, 240.9, 253, 264.3, 274.7, 293.2, 309, 322.4, 333.7, 343.1, 350.7, 356.8, 361.6, 365.1, 367.6, 369.1, 369.8, 369.9, 369.3, 364.7, 357, 347.3, 336.6, 325.5, 314.4, 303.6, 293.2, 274.3, 258.5, 245.1, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.4, 179.7, 174.4, 169.5, 164.9 }; 442 443 for(i=0; i<78; i++) {e[60][i]=e60[i]*MeV*cm2/g;} 366 AddData(T0,e60, 60); 444 367 445 368 name [61] = "G4_Si"; 446 369 G4double e61[78] = { 47.32, 61.63, 74.34, 85.98, 96.82, 116.8, 135.1, 152.1, 168.2, 183.4, 198.1, 212.1, 245.3, 276.1, 305.2, 332.7, 359.1, 384.4, 408.7, 432.2, 477, 519.3, 559.4, 597.5, 633.9, 668.6, 701.9, 733.7, 764.3, 793.5, 821.6, 848.5, 874.4, 899.1, 1008, 1097, 1168, 1225, 1270, 1307, 1336, 1359, 1390, 1408, 1416, 1417, 1413, 1405, 1395, 1383, 1370, 1356, 1341, 1326, 1310, 1295, 1218, 1146, 1081, 1023, 970.6, 923.9, 881.4, 842.4, 773.1, 713.1, 661.2, 617.4, 579.7, 547, 518.2, 492.7, 470, 449.5, 430.9, 414, 398.6, 384.4 }; 447 448 for(i=0; i<78; i++) {e[61][i]=e61[i]*MeV*cm2/g;} 370 AddData(T0,e61, 61); 449 371 450 372 name [62] = "G4_SILICON_DIOXIDE"; 451 373 G4double e62[78] = { 68.9, 85.1, 98.85, 111, 122.1, 141.8, 159.3, 175.1, 189.8, 203.4, 216.3, 228.5, 256.6, 282.1, 305.7, 327.6, 348.3, 367.9, 386.5, 404.4, 437.9, 469.2, 498.5, 526.3, 552.6, 577.7, 601.7, 624.7, 646.9, 668.2, 688.8, 708.7, 728, 746.7, 832.2, 906.8, 972.6, 1031, 1083, 1129, 1170, 1207, 1268, 1315, 1351, 1377, 1396, 1409, 1417, 1421, 1421, 1419, 1414, 1406, 1397, 1387, 1349, 1301, 1237, 1163, 1087, 1021, 964, 913.7, 829.4, 762.2, 706.3, 659, 618.4, 583.3, 552.3, 524.9, 500.4, 478.4, 458.5, 440.4, 423.9, 408.7 }; 452 453 for(i=0; i<78; i++) {e[62][i]=e62[i]*MeV*cm2/g;} 374 AddData(T0,e62, 62); 454 375 455 376 name [63] = "G4_STILBENE"; 456 377 G4double e63[78] = { 192, 228.9, 259.4, 286, 309.7, 351.2, 387.4, 419.7, 449.2, 476.4, 501.9, 525.8, 580.4, 629.2, 673.8, 714.9, 753.3, 789.4, 823.5, 856, 916.5, 972.3, 1024, 1073, 1119, 1162, 1203, 1243, 1280, 1316, 1351, 1384, 1416, 1446, 1585, 1703, 1805, 1892, 1968, 2034, 2090, 2139, 2215, 2268, 2303, 2323, 2331, 2330, 2321, 2307, 2287, 2265, 2240, 2212, 2184, 2155, 1995, 1841, 1703, 1582, 1477, 1385, 1305, 1233, 1113, 1015, 936, 869.6, 813, 764.1, 721.3, 683.7, 650.1, 620, 592.9, 568.3, 545.9, 525.4 }; 457 458 for(i=0; i<78; i++) {e[63][i]=e63[i]*MeV*cm2/g;} 378 AddData(T0,e63, 63); 459 379 460 380 name [64] = "G4_Ti"; 461 381 G4double e64[78] = { 59.24, 72.81, 84.28, 94.41, 103.6, 119.9, 134.3, 147.4, 159.4, 170.6, 181.1, 191.1, 214, 234.7, 253.8, 271.6, 288.3, 304.1, 319.1, 333.5, 360.5, 385.5, 409, 431.2, 452.2, 472.2, 491.4, 509.7, 527.3, 544.3, 560.6, 576.4, 591.7, 606.5, 674.2, 733.1, 785, 831, 871.7, 907.9, 940, 968.3, 1015, 1051, 1077, 1095, 1106, 1112, 1114, 1112, 1107, 1100, 1092, 1082, 1071, 1059, 995.6, 933.7, 877.6, 827.9, 785.2, 747.8, 714.5, 684.4, 631.9, 587.1, 548.3, 514.3, 484.2, 457.3, 433.4, 412.5, 393.7, 376.7, 361.5, 347.6, 334.9, 323.2 }; 462 463 for(i=0; i<78; i++) {e[64][i]=e64[i]*MeV*cm2/g;} 382 AddData(T0,e64, 64); 464 383 465 384 name [65] = "G4_Sn"; 466 385 G4double e65[78] = { 27.39, 33.96, 39.55, 44.52, 49.04, 57.11, 64.28, 70.8, 76.82, 82.45, 87.76, 92.79, 104.4, 115, 124.8, 133.9, 142.5, 150.6, 158.4, 165.8, 179.8, 192.9, 205.2, 216.8, 227.8, 238.4, 248.4, 258.1, 267.4, 276.4, 285.1, 293.5, 301.6, 309.5, 345.7, 377.3, 405.3, 430.1, 452.1, 471.8, 489.3, 504.8, 530.7, 550.9, 566.3, 577.9, 586.3, 592.2, 596.1, 598.4, 599.3, 599.1, 598.1, 596.4, 594.2, 591.5, 573.8, 552.8, 531.2, 510.1, 488.3, 467, 447, 428.6, 396.3, 369.4, 346.8, 327.7, 311.4, 297.1, 283.9, 271.9, 260.8, 250.6, 241.7, 233.6, 226, 218.9 }; 467 468 for(i=0; i<78; i++) {e[65][i]=e65[i]*MeV*cm2/g;} 386 AddData(T0,e65, 65); 469 387 470 388 name [66] = "G4_TISSUE_METHANE"; 471 389 G4double e66[78] = { 135.1, 165.6, 191.3, 213.9, 234.4, 270.7, 302.8, 331.8, 358.4, 383.2, 406.5, 428.6, 479.3, 525.2, 567.4, 606.7, 643.6, 678.5, 711.7, 743.4, 803.1, 858.6, 910.7, 960.1, 1007, 1052, 1095, 1136, 1176, 1214, 1251, 1287, 1322, 1356, 1514, 1655, 1783, 1899, 2006, 2104, 2193, 2275, 2418, 2535, 2626, 2693, 2737, 2760, 2764, 2752, 2728, 2695, 2655, 2612, 2566, 2519, 2278, 2060, 1878, 1727, 1602, 1494, 1403, 1323, 1191, 1085, 998.2, 926, 864.6, 811.7, 765.6, 724.9, 688.8, 656.5, 627.4, 601.1, 577.1, 555.2 }; 472 473 for(i=0; i<78; i++) {e[66][i]=e66[i]*MeV*cm2/g;} 390 AddData(T0,e66, 66); 474 391 475 392 name [67] = "G4_TISSUE_PROPANE"; 476 393 G4double e67[78] = { 149.7, 181.5, 208.2, 231.7, 252.8, 290.4, 323.5, 353.4, 380.9, 406.5, 430.5, 453.3, 505.7, 553, 596.6, 637.2, 675.4, 711.5, 745.8, 778.6, 840.4, 897.8, 951.6, 1003, 1051, 1097, 1141, 1183, 1224, 1263, 1301, 1337, 1372, 1407, 1563, 1701, 1822, 1929, 2024, 2109, 2185, 2252, 2362, 2446, 2507, 2549, 2573, 2583, 2581, 2569, 2550, 2524, 2494, 2461, 2426, 2389, 2211, 2043, 1887, 1744, 1616, 1507, 1415, 1334, 1201, 1094, 1006, 933.3, 871.4, 818.1, 771.5, 730.5, 694.1, 661.5, 632.1, 605.6, 581.4, 559.3 }; 477 478 for(i=0; i<78; i++) {e[67][i]=e67[i]*MeV*cm2/g;} 394 AddData(T0,e67, 67); 479 395 480 396 name [68] = "G4_TOLUENE"; 481 397 G4double e68[78] = { 192.5, 230, 261, 288.1, 312.3, 354.9, 392, 425.3, 455.6, 483.7, 510, 534.8, 591.3, 642.1, 688.4, 731.3, 771.4, 809.1, 844.8, 878.8, 942.4, 1001, 1056, 1107, 1155, 1201, 1245, 1287, 1327, 1365, 1401, 1437, 1471, 1504, 1652, 1779, 1888, 1983, 2065, 2136, 2197, 2250, 2333, 2392, 2430, 2452, 2461, 2459, 2449, 2433, 2411, 2386, 2358, 2328, 2296, 2264, 2109, 1960, 1817, 1683, 1560, 1456, 1368, 1291, 1163, 1060, 976.6, 906.6, 847.1, 795.7, 750.8, 711.3, 676.1, 644.6, 616.2, 590.5, 567, 545.6 }; 482 483 for(i=0; i<78; i++) {e[68][i]=e68[i]*MeV*cm2/g;} 398 AddData(T0,e68, 68); 484 399 485 400 name [69] = "G4_U"; 486 401 G4double e69[78] = { 13.2, 16.72, 19.77, 22.52, 25.04, 29.61, 33.73, 37.51, 41.03, 44.35, 47.5, 50.51, 57.52, 63.96, 69.97, 75.62, 80.99, 86.11, 91.01, 95.73, 104.7, 113.1, 121.1, 128.7, 136, 143, 149.8, 156.3, 162.6, 168.8, 174.7, 180.5, 186.2, 191.7, 217.4, 240.5, 261.5, 280.8, 298.5, 314.8, 329.8, 343.7, 368, 388.4, 405.3, 419, 429.8, 438.1, 444.2, 448.4, 450.8, 451.8, 451.6, 450.3, 448.2, 445.4, 420, 390.1, 362.9, 339.6, 319.8, 303.1, 288.9, 276.7, 256.9, 241.7, 229.4, 218.6, 209.1, 200.6, 193, 186.1, 179.8, 174, 168.6, 163.7, 159.1, 154.8 }; 487 488 for(i=0; i<78; i++) {e[69][i]=e69[i]*MeV*cm2/g;} 402 AddData(T0,e69, 69); 489 403 490 404 name [70] = "G4_W"; 491 405 G4double e70[78] = { 20.75, 25.23, 28.99, 32.29, 35.26, 40.51, 45.11, 49.26, 53.06, 56.59, 59.9, 63.02, 70.18, 76.63, 82.54, 88.02, 93.16, 98.01, 102.6, 107, 115.2, 122.9, 130, 136.7, 143.1, 149.2, 155, 160.6, 165.9, 171.1, 176.1, 180.9, 185.6, 190.1, 211.1, 229.6, 246.2, 261.3, 275.1, 287.7, 299.3, 310, 328.8, 344.7, 358.1, 369.2, 378.3, 385.6, 391.3, 395.6, 398.7, 400.6, 401.7, 401.9, 401.4, 400.4, 389.5, 374.8, 359.5, 344.8, 331, 318.3, 306.5, 295.7, 276.7, 260.8, 247.3, 235.5, 225.2, 216.1, 207.8, 200.3, 193.5, 187.3, 181.5, 176.2, 171.3, 166.7 }; 492 493 for(i=0; i<78; i++) {e[70][i]=e70[i]*MeV*cm2/g;} 406 AddData(T0,e70, 70); 494 407 495 408 name [71] = "G4_WATER"; 496 409 G4double e71[78] = { 98.91, 122.7, 143.1, 161.1, 177.5, 206.9, 233, 256.8, 278.8, 299.3, 318.6, 337, 379.5, 418.1, 453.8, 487.1, 518.6, 548.3, 576.7, 603.9, 655.2, 703, 748, 790.5, 831, 869.6, 906.6, 942.2, 976.4, 1009, 1041, 1072, 1102, 1131, 1265, 1383, 1488, 1582, 1666, 1743, 1811, 1873, 1978, 2062, 2128, 2178, 2215, 2240, 2255, 2262, 2262, 2256, 2245, 2230, 2211, 2190, 2050, 1896, 1752, 1624, 1511, 1414, 1329, 1255, 1132, 1034, 952.7, 884.8, 826.9, 777.1, 733.4, 694.9, 660.7, 630.1, 602.5, 577.6, 554.8, 534 }; 497 498 for(i=0; i<78; i++) {e[71][i]=e71[i]*MeV*cm2/g;} 410 AddData(T0,e71, 71); 499 411 500 412 name [72] = "G4_WATER_VAPOR"; 501 413 G4double e72[78] = { 126.3, 154.7, 178.7, 199.8, 218.8, 252.7, 282.5, 309.5, 334.3, 357.3, 379, 399.5, 446.7, 489.3, 528.5, 565, 599.2, 631.6, 662.4, 691.9, 747.3, 798.8, 847.2, 892.9, 936.3, 977.8, 1018, 1056, 1093, 1128, 1163, 1196, 1228, 1260, 1405, 1535, 1652, 1758, 1855, 1942, 2022, 2094, 2216, 2309, 2377, 2422, 2446, 2455, 2453, 2446, 2436, 2423, 2409, 2392, 2371, 2346, 2169, 1971, 1797, 1653, 1537, 1437, 1351, 1275, 1149, 1049, 965.8, 896.6, 837.6, 786.9, 742.5, 703.3, 668.6, 637.5, 609.5, 584.2, 561.1, 539.9 }; 502 503 for(i=0; i<78; i++) {e[72][i]=e72[i]*MeV*cm2/g;} 414 AddData(T0,e72, 72); 504 415 505 416 name [73] = "G4_Xe"; 506 417 G4double e73[78] = { 18.11, 23.3, 27.86, 31.99, 35.83, 42.84, 49.2, 55.1, 60.63, 65.87, 70.87, 75.65, 86.89, 97.3, 107.1, 116.3, 125.1, 133.5, 141.7, 149.5, 164.4, 178.6, 192, 204.9, 217.3, 229.2, 240.7, 251.8, 262.6, 273.1, 283.4, 293.3, 303, 312.5, 356.7, 396.5, 432.5, 465.2, 494.9, 521.8, 546.1, 567.9, 604.7, 633.2, 654.5, 669.3, 678.8, 683.6, 684.6, 682.5, 678, 671.7, 663.9, 655.1, 645.6, 635.6, 584.6, 538.7, 500.4, 468.8, 446.7, 430.5, 417.1, 405.3, 383.9, 364, 344.9, 326.8, 309.7, 294.6, 281.3, 269.5, 258.7, 248.8, 239.6, 231.1, 223.2, 216.2 }; 507 508 for(i=0; i<78; i++) {e[73][i]=e73[i]*MeV*cm2/g;} 418 AddData(T0,e73, 73); 509 419 } 420 421 void G4ASTARStopping::AddData(G4double* ekin, G4double* s, G4int idx) 422 { 423 sdata[idx] = new G4LPhysicsFreeVector(78, ekin[0]*MeV, ekin[77]*MeV); 424 const G4double fac = MeV*cm2/g; 425 for(size_t i=0; i<78; ++i) { sdata[idx]->PutValues(i, ekin[i]*MeV, s[i]*fac); } 426 sdata[idx]->SetSpline(true); 427 } -
trunk/source/processes/electromagnetic/standard/src/G4BetheBlochModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.cc,v 1.3 6 2009/12/03 17:26:40vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4BetheBlochModel.cc,v 1.37 2010/05/27 10:25:59 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 145 145 G4double kineticEnergy) 146 146 { 147 // this method is called only for ions 147 // this method is called only for ions, so no check if it is an ion 148 148 return corr->GetParticleCharge(p,mat,kineticEnergy); 149 } 150 151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 152 153 void G4BetheBlochModel::SetupParameters() 154 { 155 mass = particle->GetPDGMass(); 156 spin = particle->GetPDGSpin(); 157 G4double q = particle->GetPDGCharge()/eplus; 158 chargeSquare = q*q; 159 ratio = electron_mass_c2/mass; 160 G4double magmom = 161 particle->GetPDGMagneticMoment()*mass/(0.5*eplus*hbar_Planck*c_squared); 162 magMoment2 = magmom*magmom - 1.0; 163 formfact = 0.0; 164 if(particle->GetLeptonNumber() == 0) { 165 G4double x = 0.8426*GeV; 166 if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;} 167 else if(mass > GeV) { 168 x /= nist->GetZ13(mass/proton_mass_c2); 169 // tlimit = 51.2*GeV*A13[iz]*A13[iz]; 170 } 171 formfact = 2.0*electron_mass_c2/(x*x); 172 tlimit = 2.0/formfact; 173 } 149 174 } 150 175 … … 170 195 171 196 // +term for spin=1/2 particle 172 if( 0.5 == spin ) cross += 0.5*(maxEnergy - cutEnergy)/energy2;197 if( 0.5 == spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; } 173 198 174 199 // High order correction different for hadrons and ions … … 225 250 { 226 251 G4double tmax = MaxSecondaryEnergy(p, kineticEnergy); 227 G4double cutEnergy = min(cut,tmax);252 G4double cutEnergy = std::min(cut,tmax); 228 253 229 254 G4double tau = kineticEnergy/mass; … … 234 259 G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy(); 235 260 G4double eexc2 = eexc*eexc; 236 //G4double cden = material->GetIonisation()->GetCdensity();237 //G4double mden = material->GetIonisation()->GetMdensity();238 //G4double aden = material->GetIonisation()->GetAdensity();239 //G4double x0den = material->GetIonisation()->GetX0density();240 //G4double x1den = material->GetIonisation()->GetX1density();241 261 242 262 G4double eDensity = material->GetElectronDensity(); … … 252 272 // density correction 253 273 G4double x = log(bg2)/twoln10; 254 //if ( x >= x0den ) {255 // dedx -= twoln10*x - cden ;256 // if ( x < x1den ) dedx -= aden*pow((x1den-x),mden) ;257 //}258 274 dedx -= material->GetIonisation()->DensityCorrection(x); 259 275 … … 277 293 278 294 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 279 /*280 void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,281 const G4DynamicParticle*,282 G4double&,283 G4double&,284 G4double)285 {}286 */287 295 288 296 void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple, -
trunk/source/processes/electromagnetic/standard/src/G4BraggModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.cc,v 1.2 3 2009/11/10 19:25:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4BraggModel.cc,v 1.26 2010/06/04 09:08:43 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 90 90 theZieglerFactor = eV*cm2*1.0e-15; 91 91 theElectron = G4Electron::Electron(); 92 93 corr = G4LossTableManager::Instance()->EmCorrections(); 92 94 } 93 95 … … 100 102 101 103 G4double G4BraggModel::MinEnergyCut(const G4ParticleDefinition*, 102 const G4MaterialCutsCouple* couple) 103 { 104 return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy(); 104 const G4MaterialCutsCouple*) 105 { 106 return 0.1*keV; 107 // return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy(); 105 108 } 106 109 … … 110 113 const G4DataVector&) 111 114 { 112 if(p != particle) SetParticle(p);115 if(p != particle) { SetParticle(p); } 113 116 114 117 // always false before the run … … 120 123 G4String pname = particle->GetParticleName(); 121 124 if(particle->GetParticleType() == "nucleus" && 122 pname != "deuteron" && pname != "triton") isIon = true; 123 124 corr = G4LossTableManager::Instance()->EmCorrections(); 125 pname != "deuteron" && pname != "triton") { isIon = true; } 125 126 126 127 fParticleChange = GetParticleChangeForLoss(); … … 146 147 G4double kineticEnergy) 147 148 { 148 // this method is called only for ions 149 // this method is called only for ions, so no check if it is an ion 149 150 return corr->GetParticleCharge(p,mat,kineticEnergy); 150 151 } … … 161 162 G4double tmax = MaxSecondaryEnergy(p, kineticEnergy); 162 163 G4double maxEnergy = std::min(tmax,maxKinEnergy); 163 if(cutEnergy < tmax) {164 if(cutEnergy < maxEnergy) { 164 165 165 166 G4double energy = kineticEnergy + mass; … … 215 216 G4double tkin = kineticEnergy/massRate; 216 217 G4double dedx = 0.0; 217 if(tkin > lowestKinEnergy) dedx = DEDX(material, tkin);218 else dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy);218 if(tkin > lowestKinEnergy) { dedx = DEDX(material, tkin); } 219 else { dedx = DEDX(material, lowestKinEnergy)*sqrt(tkin/lowestKinEnergy); } 219 220 220 221 if (cutEnergy < tmax) { … … 240 241 241 242 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 242 /*243 void G4BraggModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,244 const G4DynamicParticle* dp,245 G4double& eloss,246 G4double&,247 G4double length)248 {249 if(nuclearStopping) {250 251 G4double preKinEnergy = dp->GetKineticEnergy();252 G4double e = preKinEnergy - eloss*0.5;253 if(e < 0.0) e = preKinEnergy*0.5;254 G4double nloss = length*corr->NuclearDEDX(dp->GetDefinition(),255 couple->GetMaterial(),256 e,false);257 258 // too big energy loss259 if(eloss + nloss > preKinEnergy) {260 nloss *= (preKinEnergy/(eloss + nloss));261 eloss = preKinEnergy;262 } else {263 eloss += nloss;264 }265 266 G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy267 << " de= " << eloss << " NIEL= " << nloss268 << " dynQ= " << dp->GetCharge()/eplus << G4endl;269 270 fParticleChange->ProposeNonIonizingEnergyDeposit(nloss);271 }272 }273 */274 275 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......276 243 277 244 void G4BraggModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp, … … 283 250 G4double tmax = MaxSecondaryKinEnergy(dp); 284 251 G4double xmax = std::min(tmax, maxEnergy); 285 if(xmin >= xmax) return;252 if(xmin >= xmax) { return; } 286 253 287 254 G4double kineticEnergy = dp->GetKineticEnergy(); … … 343 310 G4double kinEnergy) 344 311 { 345 if(pd != particle) SetParticle(pd);312 if(pd != particle) { SetParticle(pd); } 346 313 G4double tau = kinEnergy/mass; 347 314 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / … … 605 572 G4int iNist = pstar.GetIndex(material); 606 573 607 if( iNist >= 0 ) {574 if( iNist >= 0 && kineticEnergy <= 2.01*MeV) { 608 575 return pstar.GetElectronicDEDX(iNist, kineticEnergy)*material->GetDensity(); 609 576 -
trunk/source/processes/electromagnetic/standard/src/G4CoulombScattering.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.cc,v 1.2 5 2009/10/28 10:14:13vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4CoulombScattering.cc,v 1.28 2010/05/25 18:41:12 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 #include "G4Electron.hh" 56 56 #include "G4Proton.hh" 57 #include "G4LossTableManager.hh" 57 58 58 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 64 65 isInitialised(false) 65 66 { 67 // G4cout << "G4CoulombScattering constructor "<< G4endl; 66 68 SetBuildTableFlag(true); 67 69 SetStartFromNullFlag(false); … … 93 95 void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p) 94 96 { 97 //G4cout << "### G4CoulombScattering::InitialiseProcess : " 98 // << p->GetParticleName() << G4endl; 99 G4double a = 100 G4LossTableManager::Instance()->FactorForAngleLimit()*CLHEP::hbarc/CLHEP::fermi; 101 q2Max = 0.5*a*a; 102 95 103 // second initialisation 96 104 if(isInitialised) { … … 98 106 mod->SetPolarAngleLimit(PolarAngleLimit()); 99 107 mod = GetModelByIndex(1); 100 if(mod) mod->SetPolarAngleLimit(PolarAngleLimit());108 if(mod) { mod->SetPolarAngleLimit(PolarAngleLimit()); } 101 109 102 110 // first initialisation … … 106 114 G4double mass = p->GetPDGMass(); 107 115 G4String name = p->GetParticleName(); 116 //G4cout << name << " type: " << p->GetParticleType() 117 //<< " mass= " << mass << G4endl; 108 118 if (mass > GeV || p->GetParticleType() == "nucleus") { 109 119 SetBuildTableFlag(false); 110 verboseLevel = 0;120 if(name != "GenericIon") { SetVerboseLevel(0); } 111 121 } else { 112 122 if(name != "e-" && name != "e+" && 113 123 name != "mu+" && name != "mu-" && name != "pi+" && 114 name != "kaon+" && name != "proton" ) verboseLevel = 0;124 name != "kaon+" && name != "proton" ) { SetVerboseLevel(0); } 115 125 } 116 126 … … 156 166 else G4cout << thEnergy; 157 167 158 if(q2Max < DBL_MAX) G4cout << "; q2Max(GeV^2)= " << q2Max/(GeV*GeV);168 if(q2Max < DBL_MAX) { G4cout << "; pLimit(GeV^1)= " << sqrt(q2Max)/GeV; } 159 169 G4cout << G4endl; 160 170 } -
trunk/source/processes/electromagnetic/standard/src/G4CoulombScatteringModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScatteringModel.cc,v 1.4 4 2009/12/03 09:59:07vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4CoulombScatteringModel.cc,v 1.49 2010/05/27 14:22:05 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 47 47 // 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class 48 48 // 16.06.09 Consolandi rows 109, 111-112, 183, 185-186 49 // 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to 50 // compute cross sections and sample scattering angle 49 51 // 50 52 // … … 62 64 #include "G4IonTable.hh" 63 65 #include "G4Proton.hh" 66 #include "G4NucleiProperties.hh" 64 67 65 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 86 89 G4double) 87 90 { 88 SetupParticle(p); 89 if(kinEnergy < lowEnergyLimit) return 0.0; 90 SetupKinematic(kinEnergy, cutEnergy); 91 92 // save lab system kinematics 93 G4double xtkin = tkin; 94 G4double xmom2 = mom2; 95 G4double xinvb = invbeta2; 96 97 // CM system 98 iz = G4int(Z); 99 G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2; 100 G4double etot = tkin + mass; 101 G4double ptot = sqrt(mom2); 102 103 G4double m12 = mass*mass; 104 G4double momCM= ptot*m2/sqrt(m12 + m2*m2 + 2.0*etot*m2); 105 106 mom2 = momCM*momCM; 107 tkin = sqrt(mom2 + m12) - mass; 108 109 //invbeta2 = 1.0 + m12/mom2; 110 // G4double fm = m2/(mass + m2); 111 112 // 03.09.2009 C.Consaldi 113 G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2); 114 G4double mu_rel=mass*m2/Ecm; 115 116 invbeta2 = 1.0 + mu_rel*mu_rel/mom2; 117 // 118 119 SetupTarget(Z, tkin); 120 121 G4double xsec = CrossSectionPerAtom(); 122 123 // restore Lab system kinematics 124 tkin = xtkin; 125 mom2 = xmom2; 126 invbeta2 = xinvb; 127 91 //G4cout << "### G4CoulombScatteringModel::ComputeCrossSectionPerAtom for " 92 // << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV 93 // <<" cut(MeV)= " << cutEnergy<< G4endl; 94 G4double xsec = 0.0; 95 if(p != particle) { SetupParticle(p); } 96 if(kinEnergy < lowEnergyLimit) { return 0.0; } 97 DefineMaterial(CurrentCouple()); 98 99 // Lab system 100 G4int iz = G4int(Z); 101 G4double etot = kinEnergy + mass; 102 G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2; 103 104 // 03.09.2009 C.Consaldi suggested to use relativistic reduced mass 105 // from publucation 106 // A.P. Martynenko, R.N. Faustov, Teoret. mat. Fiz. 64 (1985) 179 107 G4double Ecm = sqrt(mass*mass + m2*m2 + 2.0*etot*m2); 108 G4double mu_rel = mass*m2/Ecm; 109 G4double tkin = Ecm - mu_rel; 110 wokvi->SetRelativisticMass(mu_rel); 111 112 cosTetMinNuc = wokvi->SetupKinematic(tkin, currentMaterial); 113 if(cosThetaMax < cosTetMinNuc) { 114 cosTetMinNuc = wokvi->SetupTarget(iz, cutEnergy); 115 cosTetMaxNuc = cosThetaMax; 116 if(iz == 1 && cosTetMaxNuc < 0.0 && particle == theProton) { 117 cosTetMaxNuc = 0.0; 118 } 119 xsec = wokvi->ComputeNuclearCrossSection(cosTetMinNuc, cosTetMaxNuc); 120 elecRatio = wokvi->ComputeElectronCrossSection(cosTetMinNuc, cosThetaMax); 121 xsec += elecRatio; 122 if(xsec > 0.0) { elecRatio /= xsec; } 123 } 124 /* 125 G4cout << "e(MeV)= " << kinEnergy/MeV << " xsec(b)= " << xsec/barn 126 << "cosTetMinNuc= " << cosTetMinNuc 127 << " cosTetMaxNuc= " << cosTetMaxNuc 128 << " cosTetMaxElec= " << cosTetMaxElec 129 << " screenZ= " << screenZ 130 << " formfactA= " << formfactA << G4endl; 131 */ 128 132 return xsec; 129 133 } … … 139 143 { 140 144 G4double kinEnergy = dp->GetKineticEnergy(); 141 if(kinEnergy < lowEnergyLimit) return;145 if(kinEnergy < lowEnergyLimit) { return; } 142 146 DefineMaterial(couple); 143 147 SetupParticle(dp->GetDefinition()); 144 SetupKinematic(kinEnergy, cutEnergy);145 148 146 149 // Choose nucleus 147 150 currentElement = SelectRandomAtom(couple,particle, 148 kinEnergy,ecut,kinEnergy); 149 150 G4double Z = currentElement->GetZ(); 151 iz = G4int(Z); 152 G4int ia = SelectIsotopeNumber(currentElement); 153 G4double m2 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia); 154 155 // CM system 156 G4double etot = tkin + mass; 157 G4double ptot = sqrt(mom2); 158 159 G4double momCM= ptot*m2/sqrt(mass*mass + m2*m2 + 2.0*etot*m2); 160 mom2 = momCM*momCM; 161 G4double m12 = mass*mass; 162 G4double eCM = sqrt(mom2 + m12); 163 164 // a correction for heavy projectile 165 // G4double fm = m2/(mass + m2); 166 // invbeta2 = 1.0 + m12*fm*fm/mom2; 167 168 // 03.09.2009 C.Consaldi 169 G4double Ecm=sqrt(m12 + m2*m2 + 2.0*etot*m2); 170 G4double mu_rel=mass*m2/Ecm; 171 172 invbeta2 = 1.0 + mu_rel*mu_rel/mom2; 173 // 174 175 // sample scattering angle in CM system 176 SetupTarget(Z, eCM - mass); 177 178 G4double cost = SampleCosineTheta(); 179 G4double z1 = 1.0 - cost; 180 if(z1 < 0.0) return; 181 G4double sint = sqrt(z1*(1.0 + cost)); 182 G4double phi = twopi * G4UniformRand(); 151 kinEnergy,cutEnergy,kinEnergy); 152 153 G4double Z = currentElement->GetZ(); 154 G4int iz = G4int(Z); 155 G4int ia = SelectIsotopeNumber(currentElement); 156 G4double targetMass = G4NucleiProperties::GetNuclearMass(ia, iz); 157 158 if(ComputeCrossSectionPerAtom(particle,kinEnergy, Z, 159 kinEnergy, cutEnergy, kinEnergy) == 0.0) 160 { return; } 161 162 G4ThreeVector newDirection = 163 wokvi->SampleSingleScattering(cosTetMinNuc, cosTetMaxNuc, elecRatio); 183 164 184 165 // kinematics in the Lab system 185 G4double bet = ptot/(etot + m2); 166 G4double etot = mass + kinEnergy; 167 G4double ptot = sqrt(kinEnergy*(etot + mass)); 168 G4double bet = ptot/(etot + targetMass); 186 169 G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet)); 187 G4double pzCM = momCM*cost; 188 189 G4ThreeVector v1(momCM*cos(phi)*sint,momCM*sin(phi)*sint,gam*(pzCM + bet*eCM)); 170 G4double eCM = sqrt(mass*mass + targetMass*targetMass + 2*targetMass*etot); 171 G4double pCM = ptot*targetMass/eCM; 172 G4double e1 = sqrt(mass*mass + pCM*pCM); 173 174 newDirection *= pCM; 175 176 G4ThreeVector v1(newDirection.x(),newDirection.y(),gam*(newDirection.z() + bet*e1)); 177 G4double finalT = gam*(e1 + bet*newDirection.z()) - mass; 178 newDirection = v1.unit(); 179 190 180 G4ThreeVector dir = dp->GetMomentumDirection(); 191 G4ThreeVector newDirection = v1.unit();192 181 newDirection.rotateUz(dir); 193 182 fParticleChange->ProposeMomentumDirection(newDirection); 194 195 // G4double elab = gam*(eCM + bet*pzCM);196 197 // G4double Ecm = sqrt(mass*mass + m2*m2 + 2.0*etot*m2);198 G4double elab = etot - m2*(ptot/Ecm)*(ptot/Ecm)*(1.-cost) ;199 200 183 201 G4double finalT = elab - mass; 202 if(finalT < 0.0) finalT = 0.0; 184 // recoil 185 G4double trec = kinEnergy - finalT; 186 if(finalT <= lowEnergyLimit) { 187 trec = kinEnergy; 188 finalT = 0.0; 189 } 190 203 191 fParticleChange->SetProposedKineticEnergy(finalT); 204 192 205 // recoil 206 G4double erec = kinEnergy - finalT; 193 // G4cout << "sint= " << sint << " Erec(eV)= " << erec/eV << G4endl; 207 194 208 195 G4double tcut = recoilThreshold; 209 196 if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]); } 210 211 if(erec > tcut) { 197 /* 198 G4cout << "sint= " << sint << " Erec(eV)= " << erec/eV 199 << " tcut(eV)= " << tcut/eV << " th(eV)= " << recoilThreshold/eV 200 << " cut(eV)= " << (*pCuts)[currentMaterialIndex]/eV 201 << " " << fvect->size() 202 << G4endl; 203 */ 204 if(trec > tcut) { 212 205 G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz); 213 206 G4double plab = sqrt(finalT*(finalT + 2.0*mass)); 214 207 G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit(); 215 G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, erec);208 G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, trec); 216 209 fvect->push_back(newdp); 217 } else if( erec > 0.0) {218 fParticleChange->ProposeLocalEnergyDeposit( erec);219 fParticleChange->ProposeNonIonizingEnergyDeposit( erec);210 } else if(trec > 0.0) { 211 fParticleChange->ProposeLocalEnergyDeposit(trec); 212 fParticleChange->ProposeNonIonizingEnergyDeposit(trec); 220 213 } 221 214 } -
trunk/source/processes/electromagnetic/standard/src/G4GoudsmitSaundersonMscModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GoudsmitSaundersonMscModel.cc,v 1.2 0 2009/12/16 17:50:11 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4GoudsmitSaundersonMscModel.cc,v 1.24 2010/05/17 15:11:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 51 51 // assuming the case of lambdan<1 as single scattering regime 52 52 // tuning theta sampling for theta below the screening angle 53 // 08.02.2010 O.Kadri: bugfix in compound xsection calculation and small angle computation 54 // adding a rejection condition to hard collision angular sampling 55 // ComputeTruePathLengthLimit was taken from G4WentzelVIModel 56 // 26.03.2010 O.Kadri: direct xsection calculation not inverse of the inverse 57 // angular sampling without large angle rejection method 58 // longitudinal displacement is computed exactly from <z> 59 // 12.05.2010 O.Kadri: exchange between target and projectile has as a condition the particle type (e-/e-) 60 // some cleanup to minimize time consuming (adding lamdan12 & Qn12, changing the error to 1.0e-12 for scrA) 53 61 // 54 62 // … … 60 68 //Ref.4:Bielajew et al.,".....", NIMB 173 (2001) 332-343; 61 69 //Ref.5:F. Salvat et al.,"ELSEPA--Dirac partial ...molecules", Comp.Phys.Comm.165 (2005) pp 157-190; 62 //Ref.6:G4UrbanMscModel G4_v9.1Ref09; 63 //Ref.7:G4eCoulombScatteringModel G4_v9.1Ref09. 64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 65 70 //Ref.6:G4UrbanMscModel G4 9.2; 71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 66 72 #include "G4GoudsmitSaundersonMscModel.hh" 67 73 #include "G4GoudsmitSaundersonTable.hh" … … 77 83 #include "G4PhysicsTable.hh" 78 84 #include "Randomize.hh" 79 #include "G4Poisson.hh"80 85 81 86 using namespace std; … … 128 133 G4double kineticEnergy,G4double Z, G4double, G4double, G4double) 129 134 { 130 //Build cross section table : Taken from Ref.7131 135 G4double cs=0.0; 132 136 G4double kinEnergy = kineticEnergy; … … 134 138 if(kinEnergy>highKEnergy)kinEnergy=highKEnergy; 135 139 136 G4double value0,value1;137 CalculateIntegrals(p,Z,kinEnergy, value0,value1);140 G4double cs0; 141 CalculateIntegrals(p,Z,kinEnergy,cs0,cs); 138 142 139 if(value1 > 0.0) cs = 1./value1;140 141 143 return cs; 142 144 } … … 148 150 { 149 151 G4double kineticEnergy = dynParticle->GetKineticEnergy(); 150 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)) return ; 151 152 G4double cosTheta1,sinTheta1,cosTheta2,sinTheta2; 153 G4double phi1,phi2,cosPhi1=1.0,sinPhi1=0.0,cosPhi2=1.0,sinPhi2=0.0; 154 G4double q1,Gamma,Eta,delta,nu,nu0,nu1,nu2; 152 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)|| 153 (tPathLength/tausmall < lambda1)) return ; 155 154 156 155 /////////////////////////////////////////// 157 // Effective energy and path-length from Eq. 4.7.15+16 of Ref.4156 // Effective energy 158 157 G4double eloss = theManager->GetEnergy(particle,tPathLength,currentCouple); 159 if(eloss>0.5*kineticEnergy)eloss=kineticEnergy-eloss;//exchange possibility between target atomic e- and incident particle 158 if(eloss>0.5*kineticEnergy) 159 {if((dynParticle->GetCharge())==-eplus)eloss=kineticEnergy-eloss;//exchange between target and projectile if they are electrons 160 else eloss=0.5*kineticEnergy; 161 } 160 162 G4double ee = kineticEnergy - 0.5*eloss; 161 163 G4double ttau = ee/electron_mass_c2; … … 166 168 kineticEnergy *= (1 - cst1); 167 169 /////////////////////////////////////////// 168 // additivity rule for mixture and compound xsection calculation170 // additivity rule for mixture and compound xsection's 169 171 const G4Material* mat = currentCouple->GetMaterial(); 172 const G4ElementVector* theElementVector = mat->GetElementVector(); 173 const G4double* theAtomNumDensityVector = mat->GetVecNbOfAtomsPerVolume(); 170 174 G4int nelm = mat->GetNumberOfElements(); 171 const G4ElementVector* theElementVector = mat->GetElementVector(); 172 const G4double* theFraction = mat->GetFractionVector(); 173 G4double atomPerVolume = mat->GetTotNbOfAtomsPerVolume(); 174 G4double llambda0=0.,llambda1=0.; 175 G4double s0,s1; 176 lambda0=0.; 175 177 for(G4int i=0;i<nelm;i++) 176 { 177 G4double l0,l1; 178 CalculateIntegrals(particle,(*theElementVector)[i]->GetZ(),kineticEnergy,l0,l1); 179 llambda0 += (theFraction[i]/l0); 180 llambda1 += (theFraction[i]/l1); 178 { 179 CalculateIntegrals(particle,(*theElementVector)[i]->GetZ(),kineticEnergy,s0,s1); 180 lambda0 += (theAtomNumDensityVector[i]*s0); 181 181 } 182 if(llambda0>DBL_MIN) llambda0 =1./llambda0; 183 if(llambda1>DBL_MIN) llambda1 =1./llambda1; 182 if(lambda0>DBL_MIN) lambda0 =1./lambda0; 183 184 // Newton-Raphson root's finding method of scrA from: 185 // Sig1(PWA)/Sig0(PWA)=g1=2*scrA*((1+scrA)*log(1+1/scrA)-1) 184 186 G4double g1=0.0; 185 if(l lambda1>DBL_MIN) g1 = llambda0/llambda1;186 187 G4double x1,x0;188 x0=g1/2.;187 if(lambda1>DBL_MIN) g1 = lambda0/lambda1; 188 189 G4double logx0,x1,delta; 190 G4double x0=g1/2.; 189 191 do 190 192 { 191 x1 = x0-(x0*((1.+x0)*log(1.+1./x0)-1.0)-g1/2.)/( (1.+2.*x0)*log(1.+1./x0)-2.0);// x1=x0-f(x0)/f'(x0) 193 logx0=std::log(1.+1./x0); 194 x1 = x0-(x0*((1.+x0)*logx0-1.0)-g1/2.)/( (1.+2.*x0)*logx0-2.0); 192 195 delta = std::abs( x1 - x0 ); 193 x0 = x1; // new approximation becomes the old approximation for the next iteration194 } while (delta > 1 e-10);196 x0 = x1; 197 } while (delta > 1.0e-12); 195 198 G4double scrA = x1; 196 199 197 G4double us=0.0,vs=0.0,ws=1.0,x_coord=0.0,y_coord=0.0,z_coord=1.0;198 200 G4double lambdan=0.; 199 G4bool mscatt=false,noscatt=false; 200 201 if(llambda0>0.)lambdan=atomPerVolume*tPathLength/llambda0; 202 if((lambdan<=1.0e-12))return; 203 201 202 if(lambda0>0.)lambdan=tPathLength/lambda0; 203 if(lambdan<=1.0e-12)return; 204 G4double lambdan12=0.5*lambdan; 205 Qn1 = lambdan *g1;//2.* lambdan *scrA*((1.+scrA)*log(1.+1./scrA)-1.); 206 Qn12 = 0.5*Qn1; 207 208 G4double cosTheta1,sinTheta1,cosTheta2,sinTheta2; 209 G4double cosPhi1=1.0,sinPhi1=0.0,cosPhi2=1.0,sinPhi2=0.0; 210 G4double us=0.0,vs=0.0,ws=1.0,wss=0.,x_coord=0.0,y_coord=0.0,z_coord=1.0; 211 204 212 G4double epsilon1=G4UniformRand(); 205 G4double expn = exp(-lambdan); 206 if((epsilon1<expn)||insideskin)// no scattering 207 {noscatt=true;} 208 else if((epsilon1<((1.+lambdan)*expn)||(lambdan<1.))) 209 { 210 mscatt=false; 211 ws=G4UniformRand(); 212 ws= 1.-2.*scrA*ws/(1.-ws + scrA); 213 if(acos(ws)<sqrt(scrA))//small angle approximation for theta less than screening angle 214 {G4int i=0; 215 do{i++; 216 ws=1.+0.5*atomPerVolume*tPathLength*log(G4UniformRand())/llambda1; 217 }while((fabs(ws)>1.)&&(i<20));//i<20 to avoid time consuming during the run 218 if(i==19)ws=cos(sqrt(scrA)); 219 } 220 G4double phi0=twopi*G4UniformRand(); 221 us=sqrt(1.-ws*ws)*cos(phi0); 222 vs=sqrt(1.-ws*ws)*sin(phi0); 223 G4double rr=G4UniformRand(); 224 x_coord=(rr*us); 225 y_coord=(rr*vs); 226 z_coord=((1.-rr)+rr*ws); 227 } 228 else 229 { 230 mscatt=true; 213 G4double expn = std::exp(-lambdan); 214 if(epsilon1<expn)// no scattering 215 {return;} 216 else if((epsilon1<((1.+lambdan)*expn))||(lambdan<1.))//single scattering (Rutherford DCS's) 217 { 218 219 G4double xi=G4UniformRand(); 220 xi= 2.*scrA*xi/(1.-xi + scrA); 221 if(xi<0.)xi=0.; 222 else if(xi>2.)xi=2.; 223 ws=1.-xi; 224 wss=std::sqrt(xi*(2.-xi)); 225 G4double phi0=CLHEP::twopi*G4UniformRand(); 226 us=wss*cos(phi0); 227 vs=wss*sin(phi0); 228 } 229 else // multiple scattering 230 { 231 231 // Ref.2 subsection 4.4 "The best solution found" 232 232 // Sample first substep scattering angle 233 SampleCosineTheta( 0.5*lambdan,scrA,cosTheta1,sinTheta1);234 phi1 =twopi*G4UniformRand();233 SampleCosineTheta(lambdan12,scrA,cosTheta1,sinTheta1); 234 G4double phi1 = CLHEP::twopi*G4UniformRand(); 235 235 cosPhi1 = cos(phi1); 236 236 sinPhi1 = sin(phi1); 237 237 238 238 // Sample second substep scattering angle 239 SampleCosineTheta( 0.5*lambdan,scrA,cosTheta2,sinTheta2);240 phi2 =twopi*G4UniformRand();239 SampleCosineTheta(lambdan12,scrA,cosTheta2,sinTheta2); 240 G4double phi2 = CLHEP::twopi*G4UniformRand(); 241 241 cosPhi2 = cos(phi2); 242 242 sinPhi2 = sin(phi2); 243 243 244 // Scattering direction244 // Overall scattering direction 245 245 us = sinTheta2*(cosTheta1*cosPhi1*cosPhi2 - sinPhi1*sinPhi2) + cosTheta2*sinTheta1*cosPhi1; 246 246 vs = sinTheta2*(cosTheta1*sinPhi1*cosPhi2 + cosPhi1*sinPhi2) + cosTheta2*sinTheta1*sinPhi1; 247 247 ws = cosTheta1*cosTheta2 - sinTheta1*sinTheta2*cosPhi2; 248 G4double sqrtA=sqrt(scrA); 249 if(acos(ws)<sqrtA)//small angle approximation for theta less than screening angle 250 { 251 G4int i=0; 252 do{i++; 253 ws=1.+Qn12*log(G4UniformRand()); 254 }while((fabs(ws)>1.)&&(i<20));//i<20 to avoid time consuming during the run 255 if(i>=19)ws=cos(sqrtA); 256 257 wss=std::sqrt((1.-ws)*(1.0+ws)); 258 us=wss*cos(phi1); 259 vs=wss*sin(phi1); 260 } 248 261 } 249 262 … … 253 266 fParticleChange->ProposeMomentumDirection(newDirection); 254 267 255 if((safety > tlimitminfix)&&(latDisplasment)) 256 { 257 258 if(mscatt) 259 { 260 if(scrA<DBL_MIN)scrA=DBL_MIN; 261 if(llambda1<DBL_MIN)llambda1=DBL_MIN; 262 q1 = 2.*scrA*((1. + scrA)*log(1. + 1./scrA) - 1.); 263 if(q1<DBL_MIN)q1=DBL_MIN; 264 Gamma = 6.*scrA*(1. + scrA)*((1. + 2.*scrA)*log(1. + 1./scrA) - 2.)/q1; 265 Eta = atomPerVolume*tPathLength/llambda1; 266 delta = 0.90824829 - Eta*(0.102062073-Gamma*0.026374715); 267 268 nu = G4UniformRand(); 269 nu = std::sqrt(nu); 270 nu0 = (1.0 - nu)/2.; 271 nu1 = nu*delta; 272 nu2 = nu*(1.0-delta); 273 x_coord=(nu1*sinTheta1*cosPhi1+nu2*sinTheta2*(cosPhi1*cosPhi2-cosTheta1*sinPhi1*sinPhi2)+nu0*us); 274 y_coord=(nu1*sinTheta1*sinPhi1+nu2*sinTheta2*(sinPhi1*cosPhi2+cosTheta1*cosPhi1*sinPhi2)+nu0*vs); 275 z_coord=(nu0+nu1*cosTheta1+nu2*cosTheta2+ nu0*ws) ; 276 } 277 268 if((safety > tlimitminfix)&&latDisplasment) 269 { 270 if(Qn1<0.02)// corresponding to error less than 1% in the exact formula of <z> 271 z_coord = 1.0 - Qn1*(0.5 - Qn1/6.); 272 else z_coord = (1.-std::exp(-Qn1))/Qn1; 273 274 G4double rr=std::sqrt((1.- z_coord*z_coord)/(1.-ws*ws)); 275 x_coord = rr*us; 276 y_coord = rr*vs; 278 277 // displacement is computed relatively to the end point 279 if(!noscatt)z_coord -= 1.0;//for noscatt zcoord z_coord !=0.280 G4double rr =sqrt(x_coord*x_coord+y_coord*y_coord+z_coord*z_coord);278 z_coord -= 1.0; 279 rr = std::sqrt(x_coord*x_coord+y_coord*y_coord+z_coord*z_coord); 281 280 G4double r = rr*zPathLength; 282 281 /* … … 287 286 << G4endl; 288 287 */ 288 if(tPathLength<=zPathLength)return; 289 289 if(r > tlimitminfix) { 290 290 291 G4ThreeVector latDirection(x_coord/rr,y_coord/rr,z_coord/rr);292 latDirection.rotateUz(oldDirection);293 294 ComputeDisplacement(fParticleChange, latDirection, r, safety);291 G4ThreeVector Direction(x_coord/rr,y_coord/rr,z_coord/rr); 292 Direction.rotateUz(oldDirection); 293 294 ComputeDisplacement(fParticleChange, Direction, r, safety); 295 295 } 296 296 } … … 303 303 G4double &cost, G4double &sint) 304 304 { 305 G4double u,Qn1,r1,tet;306 305 G4double xi=0.; 307 Qn1=2.* lambdan *scrA*((1.+scrA)*log(1.+1./scrA)-1.); 308 309 if (Qn1<0.001)xi=-0.5*Qn1*log(G4UniformRand()); 310 else if(Qn1>0.5)xi=2.*G4UniformRand();//isotropic distribution 311 else 312 { 313 // procedure described by Benedito in Ref.1 306 307 if (Qn12<0.001) 308 {G4double r1,tet; 314 309 do{ 315 r1=G4UniformRand(); 316 u=GSTable->SampleTheta(lambdan,scrA,G4UniformRand()); 317 xi = 2.*u; 318 tet=acos(1.-xi); 310 r1=G4UniformRand(); 311 xi=-Qn12*log(G4UniformRand()); 312 tet=acos(1.-xi); 319 313 }while(tet*r1*r1>sin(tet)); 320 } 314 } 315 else if(Qn12>0.5)xi=2.*G4UniformRand(); 316 else xi=2.*(GSTable->SampleTheta(lambdan,scrA,G4UniformRand())); 317 321 318 322 319 if(xi<0.)xi=0.; 323 if(xi>2.)xi=2.; 320 else if(xi>2.)xi=2.; 321 324 322 cost=(1. - xi); 325 323 sint=sqrt(xi*(2.-xi)); … … 333 331 void 334 332 G4GoudsmitSaundersonMscModel::CalculateIntegrals(const G4ParticleDefinition* p,G4double Z, 335 G4double kinEnergy,G4double & Lam0,336 G4double & Lam1)333 G4double kinEnergy,G4double &Sig0, 334 G4double &Sig1) 337 335 { 338 G4double summ00=0.0;339 G4double summ10=0.0;340 336 G4double x1,x2,y1,y2,acoeff,bcoeff; 341 337 G4double kineticE = kinEnergy; … … 343 339 if(kineticE>highKEnergy)kineticE=highKEnergy; 344 340 kineticE /= eV; 345 G4double logE= log(kineticE);341 G4double logE=std::log(kineticE); 346 342 347 343 G4int iZ = G4int(Z); … … 349 345 350 346 G4int enerInd=0; 351 for(G4int i= 1;i<106;i++)347 for(G4int i=0;i<105;i++) 352 348 { 353 349 if((logE>=ener[i])&&(logE<ener[i+1])){enerInd=i;break;} … … 364 360 acoeff=(y2-y1)/(x2*x2-x1*x1); 365 361 bcoeff=y2-acoeff*x2*x2; 366 summ00=acoeff*logE*logE+bcoeff;367 summ00 =exp(summ00);362 Sig0=acoeff*logE*logE+bcoeff; 363 Sig0 =std::exp(Sig0); 368 364 y1=FTCSE[iZ-1][enerInd]; 369 365 y2=FTCSE[iZ-1][enerInd+1]; 370 366 acoeff=(y2-y1)/(x2*x2-x1*x1); 371 367 bcoeff=y2-acoeff*x2*x2; 372 summ10=acoeff*logE*logE+bcoeff;373 summ10 =exp(summ10);368 Sig1=acoeff*logE*logE+bcoeff; 369 Sig1=std::exp(Sig1); 374 370 } 375 371 else //Interpolation of the form y=ax+b … … 379 375 y1=TCSE[iZ-1][104]; 380 376 y2=TCSE[iZ-1][105]; 381 summ00=(y2-y1)*(logE-x1)/(x2-x1)+y1;382 summ00 =exp(summ00);377 Sig0=(y2-y1)*(logE-x1)/(x2-x1)+y1; 378 Sig0=std::exp(Sig0); 383 379 y1=FTCSE[iZ-1][104]; 384 380 y2=FTCSE[iZ-1][105]; 385 summ10=(y2-y1)*(logE-x1)/(x2-x1)+y1;386 summ10 =exp(summ10);381 Sig1=(y2-y1)*(logE-x1)/(x2-x1)+y1; 382 Sig1=std::exp(Sig1); 387 383 } 388 384 } … … 397 393 acoeff=(y2-y1)/(x2*x2-x1*x1); 398 394 bcoeff=y2-acoeff*x2*x2; 399 summ00=acoeff*logE*logE+bcoeff;400 summ00 =exp(summ00);395 Sig0=acoeff*logE*logE+bcoeff; 396 Sig0 =std::exp(Sig0); 401 397 y1=FTCSP[iZ-1][enerInd]; 402 398 y2=FTCSP[iZ-1][enerInd+1]; 403 399 acoeff=(y2-y1)/(x2*x2-x1*x1); 404 400 bcoeff=y2-acoeff*x2*x2; 405 summ10=acoeff*logE*logE+bcoeff;406 summ10 =exp(summ10);401 Sig1=acoeff*logE*logE+bcoeff; 402 Sig1=std::exp(Sig1); 407 403 } 408 404 else … … 412 408 y1=TCSP[iZ-1][104]; 413 409 y2=TCSP[iZ-1][105]; 414 summ00=(y2-y1)*(logE-x1)/(x2-x1)+y1;415 summ00 =exp(summ00);410 Sig0=(y2-y1)*(logE-x1)/(x2-x1)+y1; 411 Sig0 =std::exp(Sig0); 416 412 y1=FTCSP[iZ-1][104]; 417 413 y2=FTCSP[iZ-1][105]; 418 summ10=(y2-y1)*(logE-x1)/(x2-x1)+y1;419 summ10 =exp(summ10);414 Sig1=(y2-y1)*(logE-x1)/(x2-x1)+y1; 415 Sig1=std::exp(Sig1); 420 416 } 421 417 } 422 418 423 summ00 *=barn; 424 summ10 *=barn; 425 426 Lam0=1./((1.+1./Z)*summ00); 427 Lam1=1./((1.+1./Z)*summ10); 428 429 } 430 431 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 432 //t->g->t step transformations taken from Ref.6 419 Sig0 *= barn; 420 Sig1 *= barn; 421 422 } 423 424 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 425 //t->g->t step transformations taken from Ref.6 433 426 434 427 G4double … … 635 628 636 629 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 637 630 // taken from Ref.6 638 631 G4double G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(G4double) 639 632 { … … 688 681 if(samplez) { 689 682 690 const G4double ztmax = 0.99 , onethird = 1./3.;683 const G4double ztmax = 0.99; 691 684 G4double zt = zmean/tPathLength ; 692 685 … … 694 687 695 688 G4double u,cz1; 696 if(zt >= onethird) {689 if(zt >= 0.333333333) { 697 690 698 691 G4double cz = 0.5*(3.*zt-1.)/(1.-zt) ; … … 719 712 720 713 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 721 714 // taken from Ref.6 722 715 G4double 723 716 G4GoudsmitSaundersonMscModel::ComputeTrueStepLength(G4double geomStepLength) -
trunk/source/processes/electromagnetic/standard/src/G4GoudsmitSaundersonTable.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GoudsmitSaundersonTable.cc,v 1. 4 2009/08/28 16:36:52vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4GoudsmitSaundersonTable.cc,v 1.7 2010/05/17 15:11:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 39 39 // Modifications: 40 40 // 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style 41 // 26.08.2009 O.Kadri: avoiding unuseful calculations and optimizing the root finding parameter error's 42 // within SampleTheta method 43 // 41 // 26.08.2009 O.Kadri: avoiding unuseful calculations and optimizing the root 42 // finding parameter error's within SampleTheta method 43 // 08.02.2010 O.Kadri: reduce delared variables; reduce error of finding root 44 // in secant method 45 // 26.03.2010 O.Kadri: minimum of used arrays in computation within the dichotomie 46 // finding method the error was the lowest value of uvalues 47 // 12.05.2010 O.Kadri: changing of sqrt((b-a)*(b-a)) with fabs(b-a) 48 // 49 44 50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 45 51 … … 200 206 //Benedito's procedure 201 207 G4double A[11],ThisPDF[320],ThisCPDF[320]; 202 G4double PDF1[320],PDF2[320],PDF3[320],PDF4[320],CPDF1[320],CPDF2[320],CPDF3[320],CPDF4[320];203 G4 double coeff,Ckj,CkjPlus1,CkPlus1j,CkPlus1jPlus1,aa,b,m,F;204 G4int Ind0,Ind1,Ind2,Ind3,KIndex=0,JIndex=0,IIndex=0; 208 G4double coeff,Ckj,CkjPlus1,CkPlus1j,CkPlus1jPlus1,a,b,m,F; 209 G4int Ind0,KIndex=0,JIndex=0,IIndex=0; 210 205 211 206 212 /////////////////////////////////////////////////////////////////////////// … … 220 226 // Calculate Interpolated PDF and CPDF arrays 221 227 Ind0=320*(11*KIndex+JIndex); 222 Ind1=320*(11*KIndex+JIndex+1);223 Ind2=320*(11*(KIndex+1)+JIndex);224 Ind3=320*(11*(KIndex+1)+JIndex+1);225 228 for(G4int i=0 ; i<320 ;i++){ 226 PDF1[i]=PDF[Ind0+i];PDF2[i]=PDF[Ind1+i]; 227 PDF3[i]=PDF[Ind2+i];PDF4[i]=PDF[Ind3+i]; 228 CPDF1[i]=CPDF[Ind0+i];CPDF2[i]=CPDF[Ind1+i]; 229 CPDF3[i]=CPDF[Ind2+i];CPDF4[i]=CPDF[Ind3+i]; 230 ThisPDF[i]=Ckj*PDF1[i]+CkjPlus1*PDF2[i]+CkPlus1j*PDF3[i]+CkPlus1jPlus1*PDF4[i]; 231 ThisCPDF[i]=Ckj*CPDF1[i]+CkjPlus1*CPDF2[i]+CkPlus1j*CPDF3[i]+CkPlus1jPlus1*CPDF4[i]; 229 ThisPDF[i]=Ckj*PDF[Ind0]+CkjPlus1*PDF[Ind0+320]+CkPlus1j*PDF[Ind0+3520]+CkPlus1jPlus1*PDF[Ind0+3840]; 230 ThisCPDF[i]=Ckj*CPDF[Ind0]+CkjPlus1*CPDF[Ind0+320]+CkPlus1j*CPDF[Ind0+3520]+CkPlus1jPlus1*CPDF[Ind0+3840]; 232 231 // Find u Index using secant method 233 if((i!=0)&&((rndm>=ThisCPDF[i-1])&&(rndm<ThisCPDF[i]))) {IIndex=i-1;break;} 232 if((i!=0)&&((rndm>=ThisCPDF[i-1])&&(rndm<ThisCPDF[i]))) {IIndex=i-1;break;} 233 Ind0++; 234 234 } 235 235 236 236 /////////////////////////////////////////////////////////////////////////// 237 237 //CPDF^-1(rndm)=x ==> CPDF(x)=rndm; 238 a a=uvalues[IIndex];238 a=uvalues[IIndex]; 239 239 b=uvalues[IIndex+1]; 240 240 241 241 do{ 242 m=0.5*(a a+b);242 m=0.5*(a+b); 243 243 F=(ThisCPDF[IIndex]+(m-uvalues[IIndex])*ThisPDF[IIndex] 244 244 +((m-uvalues[IIndex])*(m-uvalues[IIndex])*(ThisPDF[IIndex+1]-ThisPDF[IIndex])) 245 245 /(2.*(uvalues[IIndex+1]-uvalues[IIndex])))-rndm; 246 246 if(F>0.)b=m; 247 else a a=m;248 } while( sqrt((b-aa)*(b-aa))>1.0e-6);247 else a=m; 248 } while(fabs(b-a)>1.0e-9); 249 249 250 250 return m; -
trunk/source/processes/electromagnetic/standard/src/G4MollerBhabhaModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MollerBhabhaModel.cc,v 1.3 5 2009/11/09 19:16:13vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4MollerBhabhaModel.cc,v 1.38 2010/04/06 17:10:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 92 92 93 93 G4double G4MollerBhabhaModel::MinEnergyCut(const G4ParticleDefinition*, 94 const G4MaterialCutsCouple* couple) 95 { 96 G4double electronDensity = couple->GetMaterial()->GetElectronDensity(); 97 G4double Zeff = electronDensity/couple->GetMaterial()->GetTotNbOfAtomsPerVolume(); 98 return 0.25*sqrt(Zeff)*keV; 94 const G4MaterialCutsCouple* /*couple*/) 95 { 96 // G4double electronDensity = couple->GetMaterial()->GetElectronDensity(); 97 //G4double Zeff = electronDensity/couple->GetMaterial()->GetTotNbOfAtomsPerVolume(); 98 //return 0.25*sqrt(Zeff)*keV; 99 //return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy(); 100 return 0.1*keV; 99 101 } 100 102 -
trunk/source/processes/electromagnetic/standard/src/G4PAIModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIModel.cc,v 1.5 1 2009/08/12 21:28:50 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PAIModel.cc,v 1.52 2010/06/03 07:28:39 grichine Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 32 32 // File name: G4PAIModel.cc 33 33 // 34 // Author: Vladimir.Grichine@cern.ch on base of Vladimir Ivanchenko code34 // Author: Vladimir.Grichine@cern.ch on base of Vladimir Ivanchenko model interface 35 35 // 36 36 // Creation date: 05.10.2003 … … 148 148 const G4DataVector&) 149 149 { 150 G4cout<<"G4PAIModel::Initialise for "<<p->GetParticleName()<<G4endl; 150 151 if(isInitialised) return; 151 152 isInitialised = true; -
trunk/source/processes/electromagnetic/standard/src/G4PAIPhotonModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIPhotonModel.cc,v 1.2 3 2009/07/26 15:51:01 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PAIPhotonModel.cc,v 1.24 2010/06/03 07:28:39 grichine Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 161 161 const G4DataVector&) 162 162 { 163 G4cout<<"G4PAIPhotonModel::Initialise for "<<p->GetParticleName()<<G4endl; 163 164 if(isInitialised) return; 164 165 isInitialised = true; -
trunk/source/processes/electromagnetic/standard/src/G4PSTARStopping.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PSTARStopping.cc,v 1. 8 2008/11/24 18:28:09vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4PSTARStopping.cc,v 1.14 2010/04/26 17:40:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 39 39 // Contract: CSMAN-5288 40 40 // 41 // Modifications: 41 // Modifications: 42 // 25.04.2010 V.Ivanchenko introduce G4LPhysicsFreeVector 43 // 26.04.2010 A.Ivanchenko fixed data for G4_PROPANE and G4_Pt, 44 // checked all data 42 45 // 43 46 //---------------------------------------------------------------------------- … … 53 56 G4PSTARStopping::G4PSTARStopping() 54 57 { 55 currentE = 0.0;56 58 currentMaterial = 0; 57 index = 0;58 59 matIndex = -1; 60 61 name.resize(74,""); 62 sdata.resize(74,0); 63 59 64 Initialise(); 60 65 } … … 63 68 64 69 G4PSTARStopping::~G4PSTARStopping() 65 {} 70 { 71 for(size_t i=0; i<74; ++i) { delete sdata[i]; } 72 } 66 73 67 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 71 78 if (mat == currentMaterial) return matIndex; 72 79 G4String matName = mat->GetName(); 73 for (G4int i=0; i<74; i++){80 for (G4int i=0; i<74; ++i){ 74 81 if (matName == name[i]){ 75 82 matIndex = i; … … 85 92 G4double G4PSTARStopping::GetElectronicDEDX(G4int i, G4double energy) 86 93 { 87 if (matIndex == i && energy == currentE) return res; 88 94 G4double res = 0.0; 89 95 if (i<0 || i>73){ 90 96 G4cout << "### G4PSTARStopping WARNING: index " 91 97 << i << " is out of range!" << G4endl; 92 res = 0.0;93 98 return res; 94 99 } 95 matIndex = i; 96 currentE = energy; 97 98 if (energy < kinE[index] || energy > kinE[index+1]){ 99 100 if (energy <= kinE[0]) { 101 index = 0; 102 res = e[matIndex][0]*std::sqrt(energy/kinE[0]); 103 return res; 104 } else if (energy >= kinE[59]) { 105 index = 58; 106 res = e[matIndex][59]; 107 return res; 108 } 109 for (index = 0; index<59; index++){if (energy <= kinE[index+1]) break;} 110 } 111 112 G4double t1 = kinE[index]; 113 G4double t2 = kinE[index+1]; 114 G4double e1 = e[matIndex][index]; 115 G4double e2 = e[matIndex][index+1]; 116 res = e1*std::exp(std::log(energy/t1)*std::log(e2/e1)/std::log(t2/t1)); 100 if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); } 101 else { res = sdata[i]->Value(energy); } 117 102 return res; 118 103 } … … 120 105 void G4PSTARStopping::Initialise() 121 106 { 122 G4int i;123 124 107 name [0] = "G4_A-150_TISSUE"; 125 108 G4double T0[60] = { … … 129 112 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 130 113 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 131 0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.25, 1.5, 1.75, 2. }; 114 0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.25, 1.5, 1.75, 2. }; 115 emin = T0[0]*MeV; 116 132 117 G4double e0[60] = { 176.8, 216.6, 250.1, 279.6, 306.3, 351.1, 390.9, 426.8, 459.8, 489.9, 517.8, 544, 596.4, 641.3, 680.6, 715.7, 747, 775, 800, 822.6, 861.7, 894.2, 920.7, 941.5, 957.3, 968.6, 976.2, 980.5, 982, 981, 978, 973.2, 967, 959.5, 910.4, 853.6, 797.9, 746.9, 701.5, 661.5, 626.4, 595.6, 544.8, 504.4, 471.1, 442.8, 416.4, 392, 369.9, 350, 332.2, 316.4, 302.2, 289.5, 278.1, 267.9, 228.9, 200.8, 179.5, 162.6 }; 133 118 134 for(i=0; i<60; i++) {e[0][i]=e0[i]*MeV*cm2/g;} 135 for(i=0; i<60; i++) {kinE[i]=T0[i]*MeV;} 119 AddData(T0, e0, 0); 136 120 137 121 name [1] = "G4_ACETYLENE"; 138 122 G4double e1[60] = { 185.5, 227.2, 262.3, 293.2, 321.2, 364.8, 404, 439.3, 471.6, 500.3, 526.4, 550.6, 600.2, 641.6, 677.4, 709.2, 737.3, 762, 783.7, 803.1, 837.2, 866.8, 891.7, 911.6, 926.6, 937.4, 944.7, 949, 950.8, 950.3, 947.9, 943.9, 938.4, 931.8, 887.1, 833.7, 779.9, 729.5, 686.8, 650.4, 618.5, 590.2, 541.4, 500.4, 465.3, 434.8, 408, 384.6, 364.4, 346.5, 330.5, 316.1, 303.2, 291.3, 280.4, 270.4, 230.7, 202.2, 180.5, 163.5 }; 139 123 140 for(i=0; i<60; i++) {e[1][i]=e1[i]*MeV*cm2/g;}124 AddData(T0, e1, 1); 141 125 142 126 name [2] = "G4_ADIPOSE_TISSUE_ICRP"; 143 127 G4double e2[60] = { 195.9, 239.9, 277, 309.7, 339.3, 387.5, 430.6, 469.4, 505, 537.2, 566.9, 594.6, 649.9, 696.7, 737.4, 773.3, 805.2, 833.4, 858.3, 880.5, 918.9, 951, 977.2, 997.6, 1013, 1023, 1030, 1034, 1034, 1033, 1029, 1023, 1016, 1008, 955.6, 895, 835.1, 779.6, 729.7, 685.6, 646.6, 612.3, 555, 509.1, 471.6, 440.3, 413.7, 390.4, 370.1, 352.1, 336, 321.4, 308.3, 296.3, 285.3, 275.2, 234.9, 206, 184, 166.7 }; 144 128 145 for(i=0; i<60; i++) {e[2][i]=e2[i]*MeV*cm2/g;}129 AddData(T0, e2, 2); 146 130 147 131 name [3] = "G4_Ag"; 148 132 G4double e3[60] = { 29.73, 36.41, 42.05, 47.01, 51.5, 59.46, 66.48, 72.83, 78.66, 84.09, 89.2, 94.02, 103.7, 112.1, 119.7, 126.6, 132.8, 138.5, 143.7, 148.5, 157.1, 164.3, 170.5, 175.7, 180.1, 183.7, 186.7, 189.1, 191.1, 192.5, 193.6, 194.4, 194.8, 195, 193.4, 189.3, 184.4, 179.2, 174.1, 169.3, 164.8, 160.5, 152.7, 145.7, 139.5, 133.8, 128.6, 123.9, 119.5, 115.4, 111.7, 108.1, 104.8, 101.7, 98.74, 95.98, 84.49, 75.92, 69.3, 64.05 }; 149 133 150 for(i=0; i<60; i++) {e[3][i]=e3[i]*MeV*cm2/g;}134 AddData(T0, e3, 3); 151 135 152 136 name [4] = "G4_AIR"; 153 137 G4double e4[60] = { 119.7, 146.7, 169.3, 189.3, 207.4, 239.5, 267.8, 293.3, 316.8, 338.7, 359.2, 378.7, 417, 450.4, 480.1, 506.7, 530.7, 552.6, 572.4, 590.5, 622.1, 648.3, 670, 687.7, 702, 713.2, 721.7, 727.8, 731.9, 734.1, 734.8, 734, 732, 729, 702.9, 667.2, 629.1, 592.2, 558.3, 527.8, 500.6, 476.3, 434.9, 401.2, 373.3, 349.8, 329.7, 312.1, 296.4, 282.4, 269.9, 258.7, 248.5, 239.1, 230.6, 222.7, 191.1, 168.2, 150.8, 137 }; 154 138 155 for(i=0; i<60; i++) {e[4][i]=e4[i]*MeV*cm2/g;}139 AddData(T0, e4, 4); 156 140 157 141 name [5] = "G4_Al"; 158 142 G4double e5[60] = { 92.38, 113.1, 130.6, 146.1, 160, 184.8, 206.6, 226.3, 244.4, 261.3, 277.1, 292.1, 320.6, 344.8, 365.7, 383.8, 399.6, 413.2, 425, 435.1, 451, 462, 469.2, 473.4, 475.2, 475.1, 473.7, 471.2, 468, 464.2, 460.1, 455.8, 451.3, 446.8, 424.5, 404.5, 386.7, 371, 356.8, 344, 332.3, 321.5, 301.7, 284.2, 268.6, 254.8, 242.5, 231.4, 221.5, 212.4, 204.2, 196.6, 189.7, 183.3, 177.4, 171.9, 149.4, 132.7, 119.8, 109.4 }; 159 143 160 for(i=0; i<60; i++) {e[5][i]=e5[i]*MeV*cm2/g;}144 AddData(T0, e5, 5); 161 145 162 146 name [6] = "G4_ALUMINUM_OXIDE"; 163 147 G4double e6[60] = { 73.51, 90.03, 104, 116.2, 127.3, 147, 164.4, 180.1, 194.5, 207.9, 220.5, 232.5, 256.1, 276.8, 295.3, 311.9, 327, 340.8, 353.4, 364.9, 385.3, 402.5, 417, 429.2, 439.3, 447.6, 454.3, 459.6, 463.7, 466.6, 468.6, 469.8, 470.2, 470, 461.9, 447.2, 430.1, 412.7, 396.5, 381.4, 367.5, 354.5, 331.1, 310.6, 292.6, 276.5, 262.2, 249.4, 238.1, 227.9, 218.7, 210.2, 202.6, 195.7, 189.2, 183.2, 158.9, 140.9, 127, 116 }; 164 148 165 for(i=0; i<60; i++) {e[6][i]=e6[i]*MeV*cm2/g;}149 AddData(T0, e6, 6); 166 150 167 151 name [7] = "G4_Ar"; 168 152 G4double e7[60] = { 86.08, 105.4, 121.7, 136.1, 149.1, 172.2, 192.5, 210.9, 227.7, 243.5, 258.2, 272.2, 299.7, 323.5, 344.5, 363.3, 380.2, 395.3, 409, 421.4, 442.5, 459.4, 472.8, 483.1, 490.7, 496, 499.2, 500.7, 500.8, 499.5, 497.2, 494, 490, 485.5, 457.4, 426.7, 397.7, 371.9, 349.5, 330.1, 313.2, 298.5, 274.2, 254.9, 239, 225.6, 214.4, 204.7, 196.1, 188.4, 181.3, 174.9, 168.9, 163.4, 158.2, 153.3, 133, 118.2, 106.8, 97.72 }; 169 153 170 for(i=0; i<60; i++) {e[7][i]=e7[i]*MeV*cm2/g;}154 AddData(T0, e7, 7); 171 155 172 156 name [8] = "G4_Au"; 173 157 G4double e8[60] = { 14.76, 18.07, 20.87, 23.33, 25.56, 29.51, 33, 36.15, 39.04, 41.74, 44.27, 46.66, 51.51, 55.8, 59.66, 63.18, 66.43, 69.43, 72.23, 74.84, 79.58, 83.77, 87.5, 90.81, 93.77, 96.4, 98.74, 100.8, 102.6, 104.3, 105.7, 106.9, 108, 108.9, 111.5, 112, 111.2, 109.6, 107.6, 105.4, 103.2, 101, 96.33, 91.8, 87.7, 84.05, 80.83, 78, 75.47, 73.18, 71.11, 69.21, 67.46, 65.83, 64.32, 62.91, 56.98, 52.39, 48.68, 45.58 }; 174 158 175 for(i=0; i<60; i++) {e[8][i]=e8[i]*MeV*cm2/g;}159 AddData(T0, e8, 8); 176 160 177 161 name [9] = "G4_B-100_BONE"; 178 162 G4double e9[60] = { 142.5, 174.5, 201.5, 225.2, 246.7, 283.1, 315.3, 344.4, 371.1, 395.5, 418.2, 439.6, 482.3, 519, 551.3, 580.1, 606, 629.2, 650.1, 669, 701.9, 729.5, 752.2, 770.4, 784.5, 795.1, 802.6, 807.4, 810, 810.5, 809.3, 806.6, 802.7, 797.7, 762.5, 719.5, 676.2, 635.8, 599.3, 566.7, 537.9, 512.3, 468.1, 431.4, 400.8, 375, 353, 333.7, 316.9, 301.9, 288.5, 276.3, 265.3, 255.1, 245.9, 237.4, 203.4, 178.9, 160.2, 145.4 }; 179 163 180 for(i=0; i<60; i++) {e[9][i]=e9[i]*MeV*cm2/g;}164 AddData(T0, e9, 9); 181 165 182 166 name [10] = "G4_Be"; 183 167 G4double e10[60] = { 149.7, 183.3, 211.7, 236.7, 259.2, 299.3, 334.7, 366.6, 396, 423.3, 449, 473.3, 517.2, 553.4, 583.6, 608.7, 629.6, 646.8, 660.7, 671.9, 687.3, 695.5, 698.4, 697.6, 694.2, 689.1, 682.8, 675.7, 668.2, 660.5, 652.7, 644.9, 637.2, 629.6, 594.2, 563, 535.4, 510.7, 488.4, 468.2, 449.8, 432.8, 404.4, 380.1, 358.1, 337.6, 318.8, 302.2, 287.4, 274.2, 262.3, 251.5, 241.7, 232.7, 224.4, 216.8, 186, 163.6, 146.3, 132.6 }; 184 168 185 for(i=0; i<60; i++) {e[10][i]=e10[i]*MeV*cm2/g;}169 AddData(T0, e10, 10); 186 170 187 171 name [11] = "G4_BONE_COMPACT_ICRU"; 188 172 G4double e11[60] = { 141.6, 173.4, 200.2, 223.8, 245.2, 281.3, 313.3, 342.2, 368.8, 393.1, 415.6, 436.8, 479, 515.2, 547, 575.3, 600.7, 623.4, 643.8, 662.1, 694.2, 721, 743.2, 760.9, 774.8, 785.2, 792.6, 797.6, 800.3, 801.1, 800.3, 797.9, 794.4, 789.9, 756.4, 714.5, 671.4, 630.5, 593.2, 559.7, 530, 503.5, 459, 423, 393.3, 368.3, 346.9, 328.1, 311.6, 296.9, 283.7, 271.8, 261, 251.1, 242, 233.7, 200.3, 176.3, 158, 143.5 }; 189 173 190 for(i=0; i<60; i++) {e[11][i]=e11[i]*MeV*cm2/g;}174 AddData(T0, e11, 11); 191 175 192 176 name [12] = "G4_C"; 193 177 G4double e12[60] = { 138.4, 169.5, 195.7, 218.8, 239.7, 270.2, 297.8, 322.7, 345.4, 365.1, 382.6, 398.7, 433.5, 462.4, 487.4, 509.9, 530, 547.7, 563.4, 577.6, 603.9, 628.3, 650.1, 668.6, 683.5, 695.3, 704.5, 711.4, 716.3, 719.4, 720.8, 720.9, 719.7, 717.4, 694.5, 661.1, 624.7, 589.1, 556, 526, 499.1, 475, 435.8, 404.4, 377.9, 354.6, 334, 315.9, 300.2, 286.2, 273.7, 262.4, 252.2, 242.7, 234.1, 226.1, 194.2, 171.1, 153.4, 139.4 }; 194 178 195 for(i=0; i<60; i++) {e[12][i]=e12[i]*MeV*cm2/g;}196 197 name [13] = "G4_GRAPHITE ";179 AddData(T0, e12, 12); 180 181 name [13] = "G4_GRAPHITE_POROUS"; 198 182 G4double e13[60] = { 142.6, 175.3, 203.1, 228, 250.5, 283.4, 313.3, 340.4, 365.1, 386.7, 405.9, 423.5, 462, 494, 521.9, 546.9, 569.3, 589.2, 606.9, 622.9, 652.4, 679.9, 704.5, 725.3, 742.2, 755.6, 766.1, 774, 779.6, 783.1, 784.7, 784.8, 783.4, 780.7, 753.8, 714.5, 671.4, 629.1, 590.2, 555.6, 524.9, 497.7, 453.9, 419.3, 390.3, 365.1, 343, 323.7, 307.1, 292.3, 279.1, 267.3, 256.6, 246.8, 237.8, 229.5, 196.7, 173, 155, 140.8 }; 199 183 200 for(i=0; i<60; i++) {e[13][i]=e13[i]*MeV*cm2/g;}184 AddData(T0, e13, 13); 201 185 202 186 name [14] = "G4_ETHYLENE"; 203 187 G4double e14[60] = { 225.8, 276.5, 319.3, 357, 391.1, 445.9, 494.9, 539.1, 579.6, 616, 649.5, 680.6, 742.9, 795.1, 840.1, 879.9, 914.8, 945.5, 972.4, 996.1, 1037, 1071, 1099, 1120, 1135, 1145, 1150, 1152, 1152, 1148, 1142, 1135, 1126, 1115, 1052, 981.5, 912.8, 849.7, 795.6, 749, 708.3, 672.4, 611.7, 562.1, 520.6, 485.3, 454.9, 428.4, 405.5, 385.2, 367.1, 350.8, 336.2, 322.8, 310.5, 299.3, 254.6, 222.7, 198.6, 179.6 }; 204 188 205 for(i=0; i<60; i++) {e[14][i]=e14[i]*MeV*cm2/g;}189 AddData(T0, e14, 14); 206 190 207 191 name [15] = "G4_C-552"; 208 192 G4double e15[60] = { 119.2, 146, 168.6, 188.5, 206.5, 235.1, 260.7, 283.8, 305, 323.9, 341.3, 357.4, 390.7, 418.9, 443.7, 465.8, 485.7, 503.6, 519.5, 534.1, 560.1, 583.2, 603.2, 620, 633.7, 644.7, 653.4, 660.1, 665, 668.4, 670.3, 671.1, 670.7, 669.5, 652.9, 626.4, 596.2, 565.7, 537, 510.7, 486.8, 465.1, 427.5, 396.1, 369.6, 347, 327.4, 310.1, 294.9, 281.3, 269, 258, 247.9, 238.6, 230.2, 222.4, 191, 168.2, 150.8, 137 }; 209 193 210 for(i=0; i<60; i++) {e[15][i]=e15[i]*MeV*cm2/g;}194 AddData(T0, e15, 15); 211 195 212 196 name [16] = "G4_CARBON_DIOXIDE"; 213 197 G4double e16[60] = { 106.4, 130.3, 150.4, 168.2, 184.2, 212.7, 237.9, 260.6, 281.4, 300.9, 319.1, 336.4, 370.9, 401.2, 428.3, 452.8, 475.1, 495.6, 514.4, 531.8, 562.6, 588.8, 611.2, 630.2, 646.1, 659.3, 670.1, 678.6, 685.2, 690, 693.2, 694.9, 695.4, 694.8, 679, 650.5, 617.3, 583.6, 552.1, 523.6, 497.8, 474.6, 434.7, 401.8, 374.3, 351, 330.9, 313.2, 297.6, 283.7, 271.2, 259.9, 249.6, 240.3, 231.7, 223.7, 191.9, 168.9, 151.4, 137.5 }; 214 198 215 for(i=0; i<60; i++) {e[16][i]=e16[i]*MeV*cm2/g;}199 AddData(T0, e16, 16); 216 200 217 201 name [17] = "G4_CALCIUM_FLUORIDE"; 218 202 G4double e17[60] = { 74.48, 91.21, 105.3, 117.8, 129, 149, 166.5, 182.4, 197, 210.6, 223.4, 235.5, 259.6, 280.7, 299.6, 316.6, 332, 346.2, 359.1, 371.1, 392.2, 410.1, 425.2, 438, 448.7, 457.5, 464.6, 470.3, 474.7, 477.9, 480.1, 481.4, 481.9, 481.7, 473, 456.7, 437.6, 417.8, 398.6, 380.6, 364, 348.7, 322.9, 301.7, 283.5, 267.5, 253.4, 240.9, 229.8, 219.9, 210.8, 202.5, 194.8, 187.7, 181.3, 175.5, 151.6, 134.4, 121.1, 110.6 }; 219 203 220 for(i=0; i<60; i++) {e[17][i]=e17[i]*MeV*cm2/g;}204 AddData(T0, e17, 17); 221 205 222 206 name [18] = "G4_CERIC_SULFATE"; 223 207 G4double e18[60] = { 135.4, 165.8, 191.5, 214.1, 234.5, 270.8, 302.8, 331.7, 358.2, 383, 406.2, 428.2, 471.7, 509.8, 543.6, 574, 601.5, 626.5, 649.3, 670.1, 706.4, 736.5, 761.2, 781.4, 797.4, 809.8, 819, 825.3, 829.2, 830.8, 830.6, 828.7, 825.4, 820.9, 785.9, 741.4, 696, 653.6, 618.4, 588.8, 562.8, 539.6, 499.3, 464.8, 434.6, 407.9, 384.2, 363.4, 344.9, 328.4, 313.6, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 }; 224 208 225 for(i=0; i<60; i++) {e[18][i]=e18[i]*MeV*cm2/g;}209 AddData(T0, e18, 18); 226 210 227 211 name [19] = "G4_CELLULOSE_NITRATE"; 228 212 G4double e19[60] = { 132.2, 161.9, 187, 209, 229, 262.6, 292.5, 319.4, 344.2, 366.8, 387.8, 407.5, 447, 481, 510.8, 537.6, 561.6, 583.2, 602.7, 620.4, 651.5, 677.9, 700, 718.2, 732.7, 744.1, 752.7, 759, 763.2, 765.5, 766.2, 765.5, 763.5, 760.6, 734.4, 698.2, 659.3, 621.4, 586, 553.8, 524.9, 498.9, 452.4, 413.9, 382.9, 358, 337.7, 319.7, 303.9, 289.7, 277.1, 265.6, 255.2, 245.6, 236.9, 228.8, 196.4, 173, 155, 140.8 }; 229 213 230 for(i=0; i<60; i++) {e[19][i]=e19[i]*MeV*cm2/g;}214 AddData(T0, e19, 19); 231 215 232 216 name [20] = "G4_BONE_CORTICAL_ICRP"; 233 217 G4double e20[60] = { 123.5, 151.3, 174.7, 195.3, 214, 246.1, 274.5, 300.2, 323.8, 345.6, 365.9, 385, 423, 455.7, 484.7, 510.5, 533.8, 554.8, 573.7, 590.9, 620.8, 645.9, 666.5, 683.3, 696.6, 706.8, 714.4, 719.7, 723, 724.5, 724.5, 723.1, 720.6, 717.1, 689.6, 653.5, 615.8, 579.8, 546.6, 516.7, 490, 466.2, 426.1, 393.6, 366.6, 343.7, 324, 306.7, 291.5, 278, 265.8, 254.7, 244.7, 235.5, 227.1, 219.4, 188.4, 166.1, 149, 135.4 }; 234 218 235 for(i=0; i<60; i++) {e[20][i]=e20[i]*MeV*cm2/g;}219 AddData(T0, e20, 20); 236 220 237 221 name [21] = "G4_CESIUM_IODIDE"; 238 222 G4double e21[60] = { 34.67, 42.46, 49.03, 54.82, 60.05, 69.34, 77.52, 84.92, 91.73, 98.06, 104, 109.6, 121, 130.9, 139.9, 148, 155.5, 162.3, 168.6, 174.5, 184.9, 194, 201.8, 208.5, 214.2, 219, 223, 226.3, 228.9, 231, 232.5, 233.4, 234, 234.1, 230.4, 221.9, 211.4, 200.6, 190.1, 180.6, 171.9, 164.1, 151.1, 140.6, 132.1, 125.1, 119.1, 114, 109.6, 105.6, 102.1, 98.92, 95.83, 92.83, 89.95, 87.22, 75.76, 67.41, 61.26, 56.63 }; 239 223 240 for(i=0; i<60; i++) {e[21][i]=e21[i]*MeV*cm2/g;}224 AddData(T0, e21, 21); 241 225 242 226 name [22] = "G4_Cu"; 243 227 G4double e22[60] = { 34.9, 42.74, 49.35, 55.18, 60.45, 69.8, 78.04, 85.48, 92.33, 98.71, 104.7, 110.4, 121.4, 130.9, 139.2, 146.6, 153.2, 159, 164.3, 168.9, 176.9, 183.2, 188.4, 192.5, 195.9, 198.7, 201, 202.8, 204.4, 205.6, 206.7, 207.5, 208.2, 208.7, 209.9, 209.2, 207.5, 205.1, 202.3, 199.1, 195.8, 192.3, 185.4, 178.6, 172, 165.8, 159.6, 153.6, 148, 142.7, 137.8, 133.3, 129.1, 125.2, 121.7, 118.3, 104.7, 94.43, 86.45, 79.87 }; 244 228 245 for(i=0; i<60; i++) {e[22][i]=e22[i]*MeV*cm2/g;}229 AddData(T0, e22, 22); 246 230 247 231 name [23] = "G4_Fe"; 248 232 G4double e23[60] = { 37.81, 46.31, 53.47, 59.78, 65.49, 75.62, 84.54, 92.61, 100, 106.9, 113.4, 119.6, 132, 143, 153, 162, 170.4, 178.2, 185.4, 192.2, 204.6, 215.6, 225.4, 234.2, 242.1, 249.2, 255.5, 261.2, 266.2, 270.7, 274.6, 278.1, 281, 283.6, 290.9, 291.5, 287.6, 281, 272.8, 263.9, 254.9, 246, 229.5, 214.8, 202.1, 191.1, 181.6, 173.4, 166.2, 159.7, 153.8, 148.5, 143.6, 139.1, 135, 131.1, 115.3, 103.5, 94.02, 86.52 }; 249 233 250 for(i=0; i<60; i++) {e[23][i]=e23[i]*MeV*cm2/g;}234 AddData(T0, e23, 23); 251 235 252 236 name [24] = "G4_FERROUS_SULFATE"; 253 237 G4double e24[60] = { 135.1, 165.5, 191.1, 213.6, 234, 270.2, 302.1, 330.9, 357.4, 382.1, 405.3, 427.2, 470.7, 508.7, 542.4, 572.8, 600.3, 625.3, 648, 668.8, 705, 735.1, 759.9, 780.1, 796.1, 808.5, 817.7, 824.1, 827.9, 829.6, 829.4, 827.5, 824.2, 819.7, 784.9, 740.5, 695.1, 652.8, 617.8, 588.4, 562.8, 539.9, 499.9, 465.6, 435.5, 408.8, 385, 364.1, 345.6, 329.1, 314.3, 300.9, 288.8, 277.7, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 }; 254 238 255 for(i=0; i<60; i++) {e[24][i]=e24[i]*MeV*cm2/g;}239 AddData(T0, e24, 24); 256 240 257 241 name [25] = "G4_Gd"; 258 242 G4double e25[60] = { 25.71, 31.49, 36.37, 40.66, 44.54, 51.43, 57.5, 62.99, 68.03, 72.73, 77.14, 81.32, 89.78, 97.24, 104, 110.1, 115.8, 121, 125.8, 130.4, 138.5, 145.7, 152.1, 157.7, 162.6, 166.9, 170.7, 173.9, 176.7, 179, 181, 182.5, 183.8, 184.7, 185.6, 182.1, 176.3, 169.4, 162.2, 155.2, 148.7, 142.6, 132, 123.3, 116.2, 110.2, 105, 100.6, 96.67, 93.2, 90.08, 87.27, 84.72, 82.38, 80.24, 78.26, 70.14, 63.87, 58.87, 54.76 }; 259 243 260 for(i=0; i<60; i++) {e[25][i]=e25[i]*MeV*cm2/g;}244 AddData(T0, e25, 25); 261 245 262 246 name [26] = "G4_Ge"; 263 247 G4double e26[60] = { 45.91, 56.23, 64.93, 72.59, 79.52, 91.82, 102.7, 112.5, 121.5, 129.9, 137.7, 145.2, 159.7, 172.3, 183.3, 193.1, 201.7, 209.4, 216.3, 222.3, 232.3, 240, 245.6, 249.6, 252.3, 253.9, 254.5, 254.5, 253.9, 252.9, 251.5, 250, 248.2, 246.4, 236.5, 227.2, 218.9, 211.6, 205.1, 199.3, 193.9, 189, 180.1, 172.3, 165.2, 158.8, 152.6, 146.6, 140.9, 135.7, 130.8, 126.3, 122.1, 118.3, 114.7, 111.3, 97.72, 87.77, 80.18, 74.18 }; 264 248 265 for(i=0; i<60; i++) {e[26][i]=e26[i]*MeV*cm2/g;}249 AddData(T0, e26, 26); 266 250 267 251 name [27] = "G4_Pyrex_Glass"; 268 252 G4double e27[60] = { 88.74, 108.7, 125.5, 140.3, 153.7, 177.5, 198.4, 217.4, 234.8, 251, 266.2, 280.6, 308.9, 333.6, 355.6, 375.3, 393.1, 409.2, 423.9, 437.3, 460.8, 480.4, 496.7, 510.2, 521.2, 530.1, 537.1, 542.5, 546.4, 549.1, 550.6, 551.2, 551, 550.1, 537.6, 518.1, 496.1, 473.9, 451.2, 429.2, 408.8, 390.1, 357.9, 331.5, 309.8, 291.7, 276.2, 262.4, 250.1, 239.1, 229.2, 220.2, 212, 204.6, 197.7, 191.4, 165.6, 146.7, 132.1, 120.4 }; 269 253 270 for(i=0; i<60; i++) {e[27][i]=e27[i]*MeV*cm2/g;}254 AddData(T0, e27, 27); 271 255 272 256 name [28] = "G4_H"; 273 257 G4double e28[60] = { 746.5, 914.3, 1056, 1180, 1293, 1493, 1669, 1829, 1975, 2112, 2240, 2361, 2586, 2777, 2942, 3084, 3208, 3316, 3409, 3490, 3618, 3710, 3771, 3808, 3823, 3822, 3807, 3781, 3745, 3702, 3654, 3601, 3545, 3487, 3183, 2890, 2629, 2402, 2204, 2031, 1882, 1753, 1544, 1384, 1258, 1159, 1077, 1007, 947, 894.2, 847.5, 805.9, 768.6, 734.9, 704.3, 676.4, 566.7, 489.7, 432.5, 388.1 }; 274 258 275 for(i=0; i<60; i++) {e[28][i]=e28[i]*MeV*cm2/g;}259 AddData(T0, e28, 28); 276 260 277 261 name [29] = "G4_He"; 278 262 G4double e29[60] = { 184.2, 225.6, 260.6, 291.3, 319.1, 368.5, 412, 451.3, 487.4, 521.1, 552.7, 582.6, 641.3, 691.9, 736.7, 776.6, 812.5, 844.9, 874.2, 900.8, 946.6, 984.1, 1014, 1039, 1058, 1072, 1083, 1089, 1093, 1094, 1093, 1090, 1085, 1079, 1032, 973, 911.2, 852.1, 797.5, 748.3, 704.5, 665.8, 600.4, 547.7, 504.5, 468.3, 437.7, 411.3, 388.2, 368, 349.9, 333.8, 319.3, 306.2, 294.2, 283.2, 239.6, 208.6, 185.2, 167 }; 279 263 280 for(i=0; i<60; i++) {e[29][i]=e29[i]*MeV*cm2/g;}264 AddData(T0, e29, 29); 281 265 282 266 name [30] = "G4_KAPTON"; 283 267 G4double e30[60] = { 145.4, 178.1, 205.6, 229.9, 251.8, 286.2, 317.1, 344.9, 370.4, 393.1, 413.7, 432.9, 472.6, 506.1, 535.2, 561.3, 584.6, 605.3, 623.8, 640.4, 670.2, 696.5, 719.1, 737.7, 752.5, 763.9, 772.5, 778.6, 782.6, 784.6, 784.9, 783.8, 781.4, 778, 749.2, 710.6, 669.6, 630, 593.5, 560.4, 530.8, 504.4, 459.6, 423.3, 393.3, 368.2, 346.8, 328, 311.6, 296.9, 283.8, 272, 261.3, 251.5, 242.4, 234.1, 200.8, 176.8, 158.4, 143.8 }; 284 268 285 for(i=0; i<60; i++) {e[30][i]=e30[i]*MeV*cm2/g;}269 AddData(T0, e30, 30); 286 270 287 271 name [31] = "G4_Kr"; 288 272 G4double e31[60] = { 45.92, 56.24, 64.94, 72.6, 79.53, 91.84, 102.7, 112.5, 121.5, 129.9, 137.8, 145.2, 160.1, 173.2, 184.9, 195.5, 205.1, 213.8, 221.8, 229.1, 242, 252.7, 261.6, 268.8, 274.6, 279, 282.3, 284.5, 285.8, 286.2, 286, 285.1, 283.8, 281.9, 268.6, 252.2, 236.2, 221.7, 209, 198.2, 188.9, 180.9, 168.1, 158.1, 150.2, 143.7, 138.1, 133.2, 128.8, 124.8, 121.2, 117.8, 114.6, 111.6, 108.8, 106.1, 94.63, 85.43, 77.91, 71.84 }; 289 273 290 for(i=0; i<60; i++) {e[31][i]=e31[i]*MeV*cm2/g;}274 AddData(T0, e31, 31); 291 275 292 276 name [32] = "G4_LITHIUM_TETRABORATE"; 293 277 G4double e32[60] = { 111, 135.9, 157, 175.5, 192.2, 222, 248.2, 271.9, 293.6, 313.9, 333, 351, 386.5, 417.4, 444.8, 469.4, 491.6, 511.7, 530.1, 546.7, 575.8, 599.9, 619.8, 636, 649.1, 659.3, 667.2, 672.9, 676.7, 678.9, 679.6, 679.1, 677.6, 675.1, 653, 622.4, 589.5, 557.3, 525.5, 495.6, 468.4, 444.1, 403.1, 370.6, 344.6, 323.5, 305.9, 290.3, 276.4, 263.9, 252.7, 242.4, 233.2, 224.7, 216.9, 209.6, 180.4, 159.2, 142.8, 129.9 }; 294 278 295 for(i=0; i<60; i++) {e[32][i]=e32[i]*MeV*cm2/g;}279 AddData(T0, e32, 32); 296 280 297 281 name [33] = "G4_LITHIUM_FLUORIDE"; 298 282 G4double e33[60] = { 80.87, 99.04, 114.4, 127.9, 140.1, 161.7, 180.8, 198.1, 214, 228.7, 242.6, 255.7, 281.9, 304.9, 325.4, 344, 360.9, 376.5, 390.8, 404, 427.6, 447.8, 465.3, 480.3, 493.1, 504.1, 513.3, 521.1, 527.4, 532.5, 536.5, 539.6, 541.7, 543, 540.3, 527.4, 509.2, 488.8, 467.4, 446.5, 426.9, 408.7, 376.9, 350.4, 328, 309.1, 292.7, 278.1, 265.1, 253.3, 242.5, 232.8, 223.9, 215.6, 208.2, 201.2, 173.1, 152.5, 136.8, 124.4 }; 299 283 300 for(i=0; i<60; i++) {e[33][i]=e33[i]*MeV*cm2/g;}284 AddData(T0, e33, 33); 301 285 302 286 name [34] = "G4_M3_WAX"; 303 287 G4double e34[60] = { 198.1, 242.6, 280.2, 313.3, 343.1, 391.9, 435.4, 474.6, 510.6, 543.1, 573, 601, 656.7, 703.7, 744.4, 780.4, 812.2, 840.3, 865, 887, 925, 956.5, 982.1, 1002, 1016, 1026, 1032, 1035, 1036, 1033, 1029, 1023, 1016, 1007, 953.3, 891.9, 831.3, 775.4, 725.1, 680.6, 641.3, 606.6, 546.6, 497.8, 458.8, 427.4, 401.7, 379.2, 359.6, 342.2, 326.7, 312.7, 300.1, 288.5, 277.8, 268.1, 229.1, 201, 179.7, 162.8 }; 304 288 305 for(i=0; i<60; i++) {e[34][i]=e34[i]*MeV*cm2/g;}289 AddData(T0, e34, 34); 306 290 307 291 name [35] = "G4_MS20_TISSUE"; 308 292 G4double e35[60] = { 174.4, 213.6, 246.7, 275.8, 302.1, 345, 383.2, 417.7, 449.4, 477.9, 504.3, 528.8, 578.1, 619.8, 656, 688.2, 716.7, 742, 764.4, 784.4, 819.3, 848.7, 872.8, 892, 906.4, 916.8, 923.7, 927.8, 929.4, 928.8, 926.4, 922.3, 916.9, 910.4, 866.6, 814.5, 762, 712.8, 668.3, 628.6, 593.3, 562.1, 507.7, 463.3, 427.6, 398.9, 375.3, 354.7, 336.7, 320.6, 306.2, 293.3, 281.6, 270.9, 261, 252, 215.7, 189.5, 169.6, 153.9 }; 309 293 310 for(i=0; i<60; i++) {e[35][i]=e35[i]*MeV*cm2/g;}294 AddData(T0, e35, 35); 311 295 312 296 name [36] = "G4_METHANE"; 313 297 G4double e36[60] = { 272.8, 334.1, 385.8, 431.4, 472.5, 545.6, 610, 668.2, 721.8, 771.6, 818.4, 862.7, 949.2, 1024, 1090, 1148, 1200, 1246, 1288, 1325, 1387, 1436, 1473, 1500, 1518, 1528, 1532, 1530, 1524, 1514, 1501, 1485, 1467, 1447, 1338, 1227, 1127, 1041, 967.3, 904.6, 850.4, 803.2, 724.6, 661.8, 610.5, 567.7, 531.4, 499.8, 472.5, 448.3, 426.7, 407.4, 390, 374.1, 359.6, 346.4, 293.7, 256.2, 227.9, 205.7 }; 314 298 315 for(i=0; i<60; i++) {e[36][i]=e36[i]*MeV*cm2/g;}299 AddData(T0, e36, 36); 316 300 317 301 name [37] = "G4_Mo"; 318 302 G4double e37[60] = { 40.18, 49.21, 56.82, 63.53, 69.59, 80.35, 89.84, 98.41, 106.3, 113.6, 120.5, 127, 140.2, 151.7, 162.1, 171.5, 180.1, 188, 195.4, 202.1, 214.3, 224.8, 233.8, 241.6, 248.3, 253.9, 258.7, 262.6, 265.7, 268.2, 270, 271.3, 272.1, 272.4, 268.7, 259.5, 248, 235.8, 224, 213.1, 203.1, 194.1, 178.9, 166.6, 156.5, 148.1, 141, 134.9, 129.5, 124.7, 120.4, 116.4, 112.6, 109.1, 105.8, 102.6, 89.8, 80.34, 73.15, 67.51 }; 319 303 320 for(i=0; i<60; i++) {e[37][i]=e37[i]*MeV*cm2/g;}304 AddData(T0, e37, 37); 321 305 322 306 name [38] = "G4_MUSCLE_WITH_SUCROSE"; 323 307 G4double e38[60] = { 149.4, 183, 211.3, 236.2, 258.7, 298.3, 333.3, 364.8, 393.8, 420.8, 446, 469.8, 516.6, 557.2, 593.1, 625.2, 654, 680, 703.5, 724.8, 761.7, 792, 816.7, 836.5, 851.9, 863.6, 871.9, 877.4, 880.4, 881.2, 880.1, 877.3, 873.2, 867.9, 829.5, 781.9, 733.4, 688, 647.9, 612.8, 581.8, 554.2, 507.1, 468.4, 435.9, 408.3, 384.4, 363.5, 344.9, 328.4, 313.7, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 }; 324 308 325 for(i=0; i<60; i++) {e[38][i]=e38[i]*MeV*cm2/g;}309 AddData(T0, e38, 38); 326 310 327 311 name [39] = "G4_MUSCLE_WITHOUT_SUCROSE"; 328 312 G4double e39[60] = { 146.6, 179.5, 207.3, 231.8, 253.9, 292.9, 327.3, 358.4, 386.9, 413.5, 438.4, 461.9, 508.2, 548.4, 584, 615.8, 644.5, 670.4, 693.8, 715.1, 752, 782.3, 807.1, 827, 842.5, 854.3, 862.9, 868.5, 871.6, 872.6, 871.6, 869, 865, 859.8, 822, 774.9, 726.9, 682, 643, 609.2, 579.4, 552.9, 507.4, 469.6, 437.7, 410.1, 386.1, 365.1, 346.5, 329.9, 315, 301.6, 289.4, 278.3, 268.2, 258.8, 221.3, 194.3, 173.7, 157.5 }; 329 313 330 for(i=0; i<60; i++) {e[39][i]=e39[i]*MeV*cm2/g;}314 AddData(T0, e39, 39); 331 315 332 316 name [40] = "G4_MUSCLE_SKELETAL_ICRP"; 333 317 G4double e40[60] = { 141.3, 173.1, 199.9, 223.5, 244.8, 282.5, 315.8, 345.8, 373.5, 399.2, 423.3, 446.1, 491.1, 530.2, 565, 596.1, 624.2, 649.7, 672.8, 693.8, 730.4, 760.6, 785.3, 805.3, 821.1, 833.1, 841.9, 847.9, 851.4, 852.6, 852, 849.7, 846.1, 841.2, 804.8, 758.9, 712.2, 668.5, 631.2, 599, 570.8, 545.6, 502.2, 465.8, 434.6, 407.5, 383.7, 362.8, 344.4, 327.9, 313.1, 299.8, 287.7, 276.7, 266.6, 257.3, 220, 193.2, 172.8, 156.7 }; 334 318 335 for(i=0; i<60; i++) {e[40][i]=e40[i]*MeV*cm2/g;}319 AddData(T0, e40, 40); 336 320 337 321 name [41] = "G4_MUSCLE_STRIATED_ICRU"; 338 322 G4double e41[60] = { 141.7, 173.5, 200.4, 224, 245.4, 283.2, 316.5, 346.6, 374.3, 400, 424.2, 447, 492.1, 531.3, 566.1, 597.3, 625.4, 650.9, 674, 695.1, 731.6, 761.9, 786.7, 806.6, 822.4, 834.4, 843.3, 849.2, 852.6, 853.9, 853.2, 851, 847.3, 842.4, 805.8, 759.8, 713, 669.2, 632, 600.1, 572.1, 547.1, 504, 467.7, 436.5, 409.3, 385.3, 364.3, 345.7, 329.2, 314.4, 300.9, 288.8, 277.8, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 }; 339 323 340 for(i=0; i<60; i++) {e[41][i]=e41[i]*MeV*cm2/g;}324 AddData(T0, e41, 41); 341 325 342 326 name [42] = "G4_N"; 343 327 G4double e42[60] = { 126.5, 155, 179, 200.1, 219.2, 253.1, 283, 310, 334.8, 357.9, 379.6, 400.2, 440.6, 475.8, 507, 535, 560.2, 583.1, 603.8, 622.7, 655.5, 682.7, 704.9, 722.9, 737.3, 748.4, 756.6, 762.3, 765.9, 767.5, 767.5, 766, 763.3, 759.4, 729.3, 689.8, 648.6, 609.1, 572.9, 540.4, 511.6, 486.2, 443.4, 408.8, 380.1, 356, 335.4, 317.2, 301.2, 286.8, 274.1, 262.6, 252.2, 242.7, 234, 225.9, 193.8, 170.5, 152.8, 138.8 }; 344 328 345 for(i=0; i<60; i++) {e[42][i]=e42[i]*MeV*cm2/g;}329 AddData(T0, e42, 42); 346 330 347 331 name [43] = "G4_SODIUM_IODIDE"; 348 332 G4double e43[60] = { 41.1, 50.34, 58.12, 64.98, 71.19, 82.2, 91.9, 100.7, 108.7, 116.2, 123.3, 130, 143.4, 155.2, 165.8, 175.4, 184.2, 192.3, 199.7, 206.6, 219, 229.6, 238.9, 246.8, 253.5, 259.2, 264, 268, 271.1, 273.6, 275.4, 276.7, 277.4, 277.7, 273.7, 264.2, 252.3, 239.7, 227.6, 216.2, 205.9, 196.6, 180.7, 167.8, 157.3, 148.5, 141.1, 134.7, 129.1, 124.1, 119.7, 115.7, 111.9, 108.4, 105.1, 101.9, 88.79, 78.99, 71.48, 65.54 }; 349 333 350 for(i=0; i<60; i++) {e[43][i]=e43[i]*MeV*cm2/g;}334 AddData(T0, e43, 43); 351 335 352 336 name [44] = "G4_Ne"; 353 337 G4double e44[60] = { 58.01, 71.05, 82.04, 91.73, 100.5, 116, 129.7, 142.1, 153.5, 164.1, 174, 183.5, 202.5, 219.3, 234.5, 248.3, 261, 272.8, 283.8, 294, 312.7, 329.2, 343.8, 356.9, 368.6, 379, 388.3, 396.5, 403.8, 410.2, 415.8, 420.7, 424.8, 428.4, 438.1, 437.9, 431.3, 420.8, 408.2, 394.6, 380.7, 367.1, 339, 313.8, 293.3, 277.2, 264.3, 252.6, 241.9, 232.2, 223.2, 215, 207.4, 200.4, 193.8, 187.7, 163, 144.6, 130.3, 118.9 }; 354 338 355 for(i=0; i<60; i++) {e[44][i]=e44[i]*MeV*cm2/g;}356 357 name [45] = "G4_NYLON _6/6";339 AddData(T0, e44, 44); 340 341 name [45] = "G4_NYLON-6-6"; 358 342 G4double e45[60] = { 191, 233.9, 270.1, 302, 330.8, 377.8, 419.7, 457.5, 492.1, 523.4, 552.3, 579.2, 633, 678.5, 717.9, 752.9, 783.8, 811.1, 835.3, 856.8, 894.2, 925.4, 951, 971, 985.8, 996.3, 1003, 1007, 1008, 1006, 1003, 997.7, 991.2, 983.5, 933.5, 875.4, 817.5, 763.6, 715, 671.7, 633.5, 599.6, 542.9, 497.4, 460.4, 429.7, 403.7, 381, 361.2, 343.6, 327.9, 313.8, 301, 289.3, 278.6, 268.8, 229.5, 201.3, 179.8, 162.9 }; 359 343 360 for(i=0; i<60; i++) {e[45][i]=e45[i]*MeV*cm2/g;}344 AddData(T0, e45, 45); 361 345 362 346 name [46] = "G4_O"; 363 347 G4double e46[60] = { 99.46, 121.8, 140.7, 157.3, 172.3, 198.9, 222.4, 243.6, 263.1, 281.3, 298.4, 314.5, 346.6, 374.7, 399.8, 422.4, 443, 461.9, 479.1, 495, 523.1, 547, 567.2, 584.4, 598.7, 610.6, 620.2, 628, 633.9, 638.3, 641.3, 643, 643.6, 643.3, 630.5, 606.7, 578.3, 549.1, 520.9, 494.6, 470.9, 449.7, 413.2, 383.1, 357.8, 336.3, 317.6, 301.1, 286.3, 273.2, 261.3, 250.5, 240.8, 231.9, 223.7, 216.1, 185.7, 163.7, 146.7, 133.4 }; 364 348 365 for(i=0; i<60; i++) {e[46][i]=e46[i]*MeV*cm2/g;}349 AddData(T0, e46, 46); 366 350 367 351 name [47] = "G4_PARAFFIN"; 368 352 G4double e47[60] = { 228.8, 280.2, 323.5, 361.7, 396.2, 451.9, 501.6, 546.5, 587.6, 624.6, 658.6, 690.2, 753.4, 806.4, 852.1, 892.4, 927.9, 959.1, 986.3, 1010, 1052, 1086, 1114, 1135, 1150, 1160, 1166, 1168, 1166, 1163, 1157, 1149, 1140, 1129, 1064, 992.4, 922.6, 858.6, 801.5, 751.1, 706.8, 667.8, 601.8, 548.9, 506.2, 471.3, 442.2, 416.9, 394.9, 375.4, 358, 342.3, 328.2, 315.3, 303.4, 292.6, 249.3, 218.3, 194.8, 176.3 }; 369 353 370 for(i=0; i<60; i++) {e[47][i]=e47[i]*MeV*cm2/g;}354 AddData(T0, e47, 47); 371 355 372 356 name [48] = "G4_Pb"; 373 357 G4double e48[60] = { 15.4, 18.86, 21.78, 24.35, 26.68, 30.81, 34.44, 37.73, 40.75, 43.57, 46.21, 48.71, 53.82, 58.34, 62.45, 66.21, 69.7, 72.94, 75.98, 78.85, 84.11, 88.84, 93.13, 97.02, 100.6, 103.8, 106.8, 109.5, 111.9, 114.1, 116.2, 118, 119.6, 121.1, 126.1, 128.1, 127.9, 126.3, 123.6, 120.4, 116.9, 113.3, 106.4, 99.98, 94.37, 89.5, 85.18, 81.37, 78.01, 75.05, 72.42, 70.08, 67.99, 66.12, 64.44, 62.92, 56.88, 52.22, 48.46, 45.34 }; 374 358 375 for(i=0; i<60; i++) {e[48][i]=e48[i]*MeV*cm2/g;}359 AddData(T0, e48, 48); 376 360 377 361 name [49] = "G4_PHOTO_EMULSION"; 378 362 G4double e49[60] = { 61.33, 75.12, 86.74, 96.97, 106.2, 122.2, 136.3, 149.1, 160.8, 171.6, 181.6, 191.1, 210, 226.3, 240.6, 253.5, 265, 275.4, 284.8, 293.3, 308, 320.3, 330.3, 338.4, 344.7, 349.4, 352.8, 355.1, 356.4, 356.9, 356.6, 355.7, 354.3, 352.4, 338.9, 322.3, 305.5, 289.9, 275.7, 263, 251.7, 241.5, 224.4, 210.3, 198.3, 188, 179, 171, 163.9, 157.5, 151.6, 146.3, 141.3, 136.6, 132.1, 128, 110.6, 97.75, 87.92, 80.2 }; 379 363 380 for(i=0; i<60; i++) {e[49][i]=e49[i]*MeV*cm2/g;}364 AddData(T0, e49, 49); 381 365 382 366 name [50] = "G4_PLASTIC_SC_VINYLTOLUENE"; 383 367 G4double e50[60] = { 190.1, 232.8, 268.8, 300.5, 329.2, 374.1, 414.4, 450.7, 483.9, 513.5, 540.4, 565.4, 616.5, 659.2, 696, 728.7, 757.6, 783, 805.3, 825.2, 860.1, 890.2, 915.4, 935.4, 950.4, 961.1, 968.2, 972.3, 973.8, 973, 970.2, 965.7, 959.9, 952.8, 906, 850.6, 795.1, 743.3, 696.4, 654.7, 617.9, 585.3, 530.7, 487.1, 451.3, 421.4, 395.9, 373.7, 354.4, 337.2, 321.9, 308.1, 295.7, 284.2, 273.8, 264.1, 225.7, 198.1, 177.1, 160.5 }; 384 368 385 for(i=0; i<60; i++) {e[50][i]=e50[i]*MeV*cm2/g;}369 AddData(T0, e50, 50); 386 370 387 371 name [51] = "G4_POLYCARBONATE"; 388 372 G4double e51[60] = { 164.8, 201.8, 233, 260.5, 285.4, 324.6, 359.7, 391.4, 420.3, 446.2, 469.7, 491.7, 536.5, 574.3, 607.1, 636.2, 662.2, 685.1, 705.4, 723.6, 755.9, 783.9, 807.7, 826.9, 841.7, 852.8, 860.8, 866, 868.8, 869.6, 868.6, 866, 862.1, 857.1, 820.5, 774.5, 727.2, 682.2, 641.1, 604.1, 571.2, 542, 492.3, 452.1, 419.1, 391.8, 368.6, 348.4, 330.7, 314.9, 300.8, 288.1, 276.7, 266.1, 256.5, 247.6, 212, 186.3, 166.8, 151.3 }; 389 373 390 for(i=0; i<60; i++) {e[51][i]=e51[i]*MeV*cm2/g;}374 AddData(T0, e51, 51); 391 375 392 376 name [52] = "G4_POLYETHYLENE"; 393 377 G4double e52[60] = { 184.9, 226.5, 261.5, 292.4, 320.3, 369.9, 413.5, 453, 489.3, 523, 554.8, 584.8, 643.9, 695.3, 740.8, 781.4, 817.9, 850.9, 880.6, 907.5, 953.7, 990.9, 1021, 1044, 1061, 1073, 1081, 1084, 1085, 1083, 1078, 1072, 1064, 1054, 994.1, 927.8, 865, 808.9, 760.1, 717.9, 681.4, 649.7, 591.2, 541, 499.2, 464.9, 436.3, 411.4, 389.8, 370.6, 353.4, 338.1, 324.2, 311.4, 299.8, 289.1, 246.4, 215.9, 192.7, 174.4 }; 394 378 395 for(i=0; i<60; i++) {e[52][i]=e52[i]*MeV*cm2/g;}396 397 name [53] = "G4_ POLYETHYLENE_TEREPHTHALATE_MYLAR";379 AddData(T0, e52, 52); 380 381 name [53] = "G4_MYLAR"; 398 382 G4double e53[60] = { 150.9, 184.9, 213.5, 238.7, 261.4, 297.8, 330.2, 359.6, 386.4, 410.5, 432.5, 453, 494.9, 530.3, 561.2, 588.8, 613.4, 635.3, 654.7, 672.3, 703.4, 730.5, 753.5, 772.3, 787, 798.3, 806.6, 812.4, 816, 817.6, 817.4, 815.8, 812.9, 808.9, 777.6, 736.5, 693.4, 651.9, 613.6, 579.1, 548.2, 520.6, 472.9, 434, 402.2, 376.1, 354.3, 335, 318.2, 303.2, 289.8, 277.7, 266.7, 256.6, 247.4, 238.9, 204.8, 180.2, 161.4, 146.5 }; 399 383 400 for(i=0; i<60; i++) {e[53][i]=e53[i]*MeV*cm2/g;}401 402 name [54] = "G4_PLEXIGLASS"; 384 AddData(T0, e53, 53); 385 386 name [54] = "G4_PLEXIGLASS"; // POLYMETHYL METHACRALATE (LUCITE, PERSPEX, PLEXIGLASS 403 387 G4double e54[60] = { 174.9, 214.2, 247.4, 276.6, 303, 345.9, 384.1, 418.7, 450.4, 479, 505.2, 529.8, 579.1, 620.8, 657.1, 689.3, 717.9, 743.2, 765.7, 785.8, 820.8, 850.5, 875, 894.5, 909.3, 920.1, 927.4, 931.9, 933.9, 933.7, 931.6, 928, 922.9, 916.8, 874.4, 823.2, 771.3, 722.4, 676.2, 634, 596.2, 562.8, 507.2, 463.4, 428.5, 400.2, 376.7, 356.1, 338, 321.9, 307.5, 294.5, 282.8, 272, 262.1, 253, 216.6, 190.4, 170.3, 154.5 }; 404 388 405 for(i=0; i<60; i++) {e[54][i]=e54[i]*MeV*cm2/g;}389 AddData(T0, e54, 54); 406 390 407 391 name [55] = "G4_POLYPROPYLENE"; 408 392 G4double e55[60] = { 197.6, 242, 279.4, 312.4, 342.2, 395.1, 441.8, 483.9, 522.7, 558.8, 592.7, 624.8, 687.3, 741.3, 789, 831.4, 869.4, 903.6, 934.3, 962, 1009, 1048, 1078, 1101, 1119, 1132, 1140, 1145, 1146, 1145, 1141, 1135, 1128, 1119, 1060, 991.7, 924.3, 862, 806.1, 756.5, 712.8, 674.2, 605.4, 548.6, 503.3, 467.5, 438.7, 413.6, 391.8, 372.4, 355.2, 339.7, 325.7, 312.9, 301.1, 290.4, 247.5, 216.8, 193.5, 175.1 }; 409 393 410 for(i=0; i<60; i++) {e[55][i]=e55[i]*MeV*cm2/g;}394 AddData(T0, e55, 55); 411 395 412 396 name [56] = "G4_POLYSTYRENE"; 413 397 G4double e56[60] = { 186, 227.8, 263.1, 294.1, 322.2, 372.1, 416, 455.7, 492.2, 526.2, 558.1, 588.3, 645.3, 693.8, 735.8, 772.4, 804.5, 832.6, 857.2, 878.7, 913.5, 939.2, 957.2, 969, 975.6, 978, 976.8, 972.8, 966.5, 958.4, 948.9, 938.3, 926.9, 914.9, 851.3, 789.6, 734.2, 685.4, 642.9, 605.7, 573, 543.9, 499.5, 465.2, 435.8, 409.1, 384.6, 363.2, 344.6, 328.1, 313.3, 300, 288, 277, 266.8, 257.5, 220.4, 193.6, 173.2, 157 }; 414 398 415 for(i=0; i<60; i++) {e[56][i]=e56[i]*MeV*cm2/g;}399 AddData(T0, e56, 56); 416 400 417 401 name [57] = "G4_TEFLON"; 418 402 G4double e57[60] = { 83.27, 102, 117.8, 131.7, 144.2, 165, 183.4, 200.1, 215.3, 229.2, 242, 254, 278.7, 300, 319, 336.2, 351.9, 366.1, 379.2, 391.2, 413.1, 432.7, 450, 465.1, 478, 489.1, 498.5, 506.4, 513, 518.4, 522.7, 526, 528.4, 530.1, 528.6, 516.7, 499.4, 479.6, 460.4, 442.3, 425.4, 409.6, 381.2, 356.4, 334.6, 315.4, 298.3, 283.1, 269.6, 257.4, 246.5, 236.5, 227.4, 219.1, 211.5, 204.4, 175.9, 155.2, 139.3, 126.7 }; 419 403 420 for(i=0; i<60; i++) {e[57][i]=e57[i]*MeV*cm2/g;}404 AddData(T0, e57, 57); 421 405 422 406 name [58] = "G4_POLYVINYL_CHLORIDE"; 423 407 G4double e58[60] = { 140.2, 171.7, 198.3, 221.7, 242.8, 277.9, 309, 337.2, 363, 386.4, 408.1, 428.4, 468.9, 503.4, 533.6, 560.3, 584.1, 605.3, 624.1, 640.9, 670.1, 694.5, 714.3, 729.8, 741.4, 749.6, 755, 757.9, 758.6, 757.6, 755, 751, 746, 740, 701.3, 656.7, 612.9, 572.6, 538.7, 509.8, 484.7, 462.4, 424.2, 392.4, 365.3, 341.8, 321.1, 302.9, 287.3, 273.6, 261.3, 250.1, 240.1, 231.1, 222.7, 215, 184.5, 162.6, 145.9, 132.6 }; 424 408 425 for(i=0; i<60; i++) {e[58][i]=e58[i]*MeV*cm2/g;}409 AddData(T0, e58, 58); 426 410 427 411 name [59] = "G4_PROPANE"; 428 G4double e59[60] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022 };429 430 for(i=0; i<60; i++) {e[59][i]=e59[i]*MeV*cm2/g;}412 G4double e59[60] = { 2.183E+02, 2.673E+02, 3.087E+02, 3.451E+02, 3.780E+02, 4.365E+02, 4.880E+02, 5.346E+02, 5.775E+02, 6.173E+02, 6.548E+02, 6.902E+02, 7.595E+02, 8.190E+02, 8.714E+02, 9.180E+02, 9.597E+02, 9.970E+02, 1.031E+03, 1.061E+03, 1.112E+03, 1.153E+03, 1.186E+03, 1.211E+03, 1.229E+03, 1.242E+03, 1.250E+03, 1.254E+03, 1.254E+03, 1.252E+03, 1.247E+03, 1.239E+03, 1.230E+03, 1.220E+03, 1.153E+03, 1.078E+03, 1.005E+03, 9.379E+02, 8.769E+02, 8.222E+02, 7.736E+02, 7.305E+02, 6.583E+02, 6.006E+02, 5.537E+02, 5.150E+02, 4.825E+02, 4.542E+02, 4.297E+02, 4.079E+02, 3.886E+02, 3.712E+02, 3.556E+02, 3.413E+02, 3.282E+02, 3.163E+02, 2.687E+02, 2.348E+02, 2.092E+02, 1.890E+02 }; 413 414 AddData(T0, e59, 59); 431 415 432 416 name [60] = "G4_Pt"; 433 G4double e60[60] = { 30.79, 33.73, 36.43, 38.95, 41.31, 43.55, 48.11, 52.16, 55.83, 59.2, 62.32, 65.23, 67.95, 70.51, 75.22, 79.46, 83.3, 86.79, 89.97, 92.87, 95.51, 97.92, 100.1, 102.1, 103.9, 105.5, 107, 108.3, 112.7, 114.5, 114.4, 113, 110.8, 108.1, 105.3, 102.4, 96.92, 92.12, 87.91, 84.22, 80.97, 78.11, 75.56, 73.26, 71.17, 69.26, 67.5, 65.87, 64.36, 62.94, 57, 52.39, 48.67, 45.57, 42.94, 40.66, 38.67, 36.9, 33.91, 31.45};434 435 for(i=0; i<60; i++) {e[60][i]=e60[i]*MeV*cm2/g;}417 G4double e60[60] = { 1.377E+01, 1.687E+01, 1.947E+01, 2.177E+01, 2.385E+01, 2.754E+01, 3.079E+01, 3.373E+01, 3.643E+01, 3.895E+01, 4.131E+01, 4.355E+01, 4.811E+01, 5.216E+01, 5.583E+01, 5.920E+01, 6.232E+01, 6.523E+01, 6.795E+01, 7.051E+01, 7.522E+01, 7.946E+01, 8.330E+01, 8.679E+01, 8.997E+01, 9.287E+01, 9.551E+01, 9.792E+01, 1.001E+02, 1.021E+02, 1.039E+02, 1.055E+02, 1.070E+02, 1.083E+02, 1.127E+02, 1.145E+02, 1.144E+02, 1.130E+02, 1.108E+02, 1.081E+02, 1.053E+02, 1.024E+02, 9.692E+01, 9.212E+01, 8.791E+01, 8.422E+01, 8.097E+01, 7.811E+01, 7.556E+01, 7.326E+01, 7.117E+01, 6.926E+01, 6.750E+01, 6.587E+01, 6.436E+01, 6.294E+01, 5.700E+01, 5.239E+01, 4.867E+01, 4.557E+01 }; 418 419 AddData(T0, e60, 60); 436 420 437 421 name [61] = "G4_Si"; 438 422 G4double e61[60] = { 105, 128.6, 148.5, 166, 181.8, 210, 234.8, 257.2, 277.8, 296.9, 315, 332, 364.6, 392.5, 416.7, 437.8, 456.3, 472.5, 486.6, 498.9, 518.4, 532.3, 541.6, 547, 549.2, 549, 546.8, 543, 538, 532.2, 525.7, 518.8, 511.7, 504.4, 468.7, 437.3, 410.7, 388.4, 369.4, 353, 338.7, 325.9, 304.1, 285.9, 270.3, 256.7, 245.2, 235.1, 225.9, 217.2, 209, 201.1, 193.6, 187, 180.9, 175.3, 152.3, 135.4, 122.2, 111.7 }; 439 423 440 for(i=0; i<60; i++) {e[61][i]=e61[i]*MeV*cm2/g;}424 AddData(T0, e61, 61); 441 425 442 426 name [62] = "G4_SILICON_DIOXIDE"; 443 427 G4double e62[60] = { 85.64, 104.9, 121.1, 135.4, 148.3, 171.3, 191.5, 209.8, 226.6, 242.2, 256.9, 270.8, 298.1, 322, 343.1, 362.1, 379.3, 394.9, 409.1, 422.1, 444.8, 463.8, 479.7, 492.8, 503.6, 512.3, 519.2, 524.5, 528.5, 531.2, 532.9, 533.7, 533.6, 532.9, 521.9, 503.9, 483.5, 462.8, 442.9, 424.2, 406.7, 390.6, 358.9, 330.8, 307.6, 288.9, 273.6, 259.9, 247.8, 236.9, 227.1, 218.2, 210.1, 202.7, 195.9, 189.7, 164.2, 145.5, 131.1, 119.6 }; 444 428 445 for(i=0; i<60; i++) {e[62][i]=e62[i]*MeV*cm2/g;}429 AddData(T0, e62, 62); 446 430 447 431 name [63] = "G4_STILBENE"; 448 432 G4double e63[60] = { 179.2, 219.5, 253.4, 283.3, 310.4, 352.2, 389.8, 423.8, 454.7, 482.3, 507.2, 530.3, 577.9, 617.7, 652.1, 682.6, 709.7, 733.5, 754.4, 773, 806.1, 835.1, 859.5, 879.2, 894.2, 905.1, 912.7, 917.4, 919.6, 919.6, 917.7, 914.2, 909.3, 903.3, 861.4, 810.7, 759.2, 710.8, 667.1, 628.3, 593.9, 563.4, 511.8, 470.2, 435.9, 407.2, 382.8, 361.4, 342.9, 326.4, 311.6, 298.4, 286.4, 275.4, 265.3, 256.1, 219, 192.4, 172.1, 156.1 }; 449 433 450 for(i=0; i<60; i++) {e[63][i]=e63[i]*MeV*cm2/g;}434 AddData(T0, e63, 63); 451 435 452 436 name [64] = "G4_Ti"; 453 437 G4double e64[60] = { 60.88, 74.56, 86.1, 96.26, 105.4, 121.8, 136.1, 149.1, 161.1, 172.2, 182.6, 192.5, 212.3, 229.6, 245.1, 259.1, 271.8, 283.5, 294.2, 304.1, 321.6, 336.5, 349.1, 359.8, 368.7, 376, 382, 386.7, 390.2, 392.7, 394.4, 395.2, 395.3, 394.8, 385.4, 369.3, 351, 332.6, 315.4, 299.6, 285.5, 272.8, 251.3, 233.9, 219.6, 207.6, 197.4, 188.7, 181, 174.1, 167.9, 162.2, 157, 152.2, 147.7, 143.5, 126, 112.5, 101.7, 93.07 }; 454 438 455 for(i=0; i<60; i++) {e[64][i]=e64[i]*MeV*cm2/g;}439 AddData(T0, e64, 64); 456 440 457 441 name [65] = "G4_Sn"; 458 442 G4double e65[60] = { 32.4, 39.68, 45.82, 51.23, 56.12, 64.8, 72.45, 79.36, 85.72, 91.64, 97.2, 102.5, 113.1, 122.4, 130.8, 138.5, 145.5, 151.9, 157.9, 163.4, 173.4, 182, 189.5, 196, 201.6, 206.4, 210.4, 213.8, 216.5, 218.7, 220.4, 221.6, 222.4, 222.9, 220.7, 213.8, 204.9, 195.4, 186, 177.3, 169.4, 162.3, 150.1, 140.3, 132.2, 125.5, 119.7, 114.7, 110.1, 106.1, 102.5, 99.14, 96.12, 93.34, 90.77, 88.4, 78.69, 71.47, 65.7, 60.79 }; 459 443 460 for(i=0; i<60; i++) {e[65][i]=e65[i]*MeV*cm2/g;}444 AddData(T0, e65, 65); 461 445 462 446 name [66] = "G4_TISSUE-METHANE"; 463 447 G4double e66[60] = { 174.5, 213.8, 246.8, 276, 302.3, 349.1, 390.3, 427.6, 461.8, 493.7, 523.6, 552, 607.8, 656.2, 699.1, 737.4, 771.9, 803, 831.1, 856.5, 900.2, 935.6, 963.8, 985.9, 1003, 1015, 1022, 1027, 1028, 1027, 1023, 1018, 1011, 1002, 947.8, 885.5, 824.9, 769.7, 720.9, 678.2, 641, 608.6, 553.2, 507.9, 470.5, 439.1, 412.4, 389, 368.6, 350.5, 334.4, 319.8, 306.6, 294.6, 283.6, 273.5, 233.2, 204.4, 182.5, 165.2 }; 464 448 465 for(i=0; i<60; i++) {e[66][i]=e66[i]*MeV*cm2/g;}449 AddData(T0, e66, 66); 466 450 467 451 name [67] = "G4_TISSUE-PROPANE"; 468 452 G4double e67[60] = { 169.9, 208.1, 240.3, 268.6, 294.3, 339.8, 379.9, 416.2, 449.5, 480.6, 509.7, 537.3, 591.5, 638.4, 679.9, 716.9, 750.2, 780.2, 807.4, 832, 874.4, 909.1, 937.1, 959.3, 976.6, 989.5, 998.7, 1005, 1008, 1008, 1006, 1003, 998, 991.7, 946.9, 891.9, 836, 783.4, 735.7, 693.2, 655.4, 622, 563.5, 515.3, 475.8, 443.4, 416.2, 392.6, 371.9, 353.6, 337.3, 322.5, 309.3, 297.1, 286, 275.8, 235.1, 206, 183.9, 166.5 }; 469 453 470 for(i=0; i<60; i++) {e[67][i]=e67[i]*MeV*cm2/g;}454 AddData(T0, e67, 67); 471 455 472 456 name [68] = "G4_TOLUENE"; 473 457 G4double e68[60] = { 191.6, 234.7, 271, 302.9, 331.9, 377.2, 417.8, 454.5, 488, 517.9, 545.1, 570.4, 621.9, 665, 702.2, 735.2, 764.3, 790, 812.4, 832.5, 867.7, 897.9, 923.2, 943.3, 958.3, 969, 976, 980, 981.4, 980.4, 977.5, 972.9, 966.9, 959.8, 912.2, 856.2, 800.1, 747.8, 700.6, 658.5, 621.4, 588.5, 535.1, 492.8, 457.8, 427.9, 401.8, 379.1, 359.4, 341.9, 326.3, 312.3, 299.6, 287.9, 277.3, 267.5, 228.5, 200.4, 179.1, 162.3 }; 474 458 475 for(i=0; i<60; i++) {e[68][i]=e68[i]*MeV*cm2/g;}459 AddData(T0, e68, 68); 476 460 477 461 name [69] = "G4_U"; 478 462 G4double e69[60] = { 18.38, 22.51, 25.99, 29.06, 31.83, 36.75, 41.09, 45.01, 48.62, 51.98, 55.13, 58.11, 64.19, 69.57, 74.44, 78.9, 83.02, 86.84, 90.42, 93.78, 99.92, 105.4, 110.3, 114.8, 118.8, 122.4, 125.7, 128.6, 131.2, 133.5, 135.6, 137.4, 139, 140.4, 144.4, 144.8, 142.7, 139.1, 134.5, 129.6, 124.2, 118.8, 108.7, 100, 92.78, 86.72, 81.64, 77.35, 73.71, 70.6, 67.92, 65.59, 63.56, 61.77, 60.19, 58.78, 53.33, 49.08, 45.62, 42.73 }; 479 463 480 for(i=0; i<60; i++) {e[69][i]=e69[i]*MeV*cm2/g;}464 AddData(T0, e69, 69); 481 465 482 466 name [70] = "G4_W"; 483 467 G4double e70[60] = { 14.97, 18.34, 21.17, 23.67, 25.93, 29.94, 33.47, 36.67, 39.61, 42.34, 44.91, 47.34, 52.3, 56.7, 60.68, 64.33, 67.7, 70.84, 73.78, 76.55, 81.61, 86.15, 90.24, 93.95, 97.3, 100.3, 103.1, 105.6, 107.8, 109.9, 111.7, 113.3, 114.7, 116, 120, 121.2, 120.5, 118.5, 115.9, 112.9, 109.8, 106.7, 100.2, 94.14, 89.08, 85, 81.68, 78.78, 76.2, 73.88, 71.78, 69.86, 68.09, 66.45, 64.93, 63.5, 57.52, 52.9, 49.15, 46.04 }; 484 468 485 for(i=0; i<60; i++) {e[70][i]=e70[i]*MeV*cm2/g;}469 AddData(T0, e70, 70); 486 470 487 471 name [71] = "G4_WATER"; 488 472 G4double e71[60] = { 133.7, 163.8, 189.1, 211.4, 231.6, 267.5, 299, 327.6, 353.8, 378.2, 401.2, 422.9, 466, 503.6, 537.2, 567.3, 594.6, 619.5, 642.1, 662.8, 698.9, 729, 753.8, 774, 790.1, 802.6, 811.9, 818.3, 822.3, 824.1, 823.9, 822.2, 819, 814.5, 780.1, 736, 695.9, 660.4, 628.6, 599.9, 573.7, 549.7, 507.5, 471.4, 440.1, 412.8, 388.8, 367.6, 348.9, 332.2, 317.2, 303.7, 291.4, 280.3, 270, 260.6, 222.8, 195.5, 174.8, 158.5 }; 489 473 490 for(i=0; i<60; i++) {e[71][i]=e71[i]*MeV*cm2/g;}474 AddData(T0, e71, 71); 491 475 492 476 name [72] = "G4_WATER_VAPOR"; 493 477 G4double e72[60] = { 152.2, 186.5, 215.3, 240.7, 263.7, 304.5, 340.4, 372.9, 402.8, 430.6, 456.7, 481.4, 530.5, 573.2, 611.3, 645.4, 676.4, 704.4, 730, 753.3, 793.8, 827.4, 855, 877.2, 894.8, 908.2, 918.1, 924.7, 928.5, 929.9, 929.1, 926.5, 922.3, 916.9, 876.3, 825.9, 775.3, 728.5, 686.8, 650.1, 618, 589.9, 536.1, 489.2, 450.8, 420.2, 395.5, 373.8, 354.6, 337.5, 322.2, 308.3, 295.8, 284.4, 273.9, 264.3, 225.7, 198, 176.9, 160.4 }; 494 478 495 for(i=0; i<60; i++) {e[72][i]=e72[i]*MeV*cm2/g;}479 AddData(T0, e72, 72); 496 480 497 481 name [73] = "G4_Xe"; 498 482 G4double e73[60] = { 38.1, 46.67, 53.88, 60.24, 65.99, 76.2, 85.2, 93.33, 100.8, 107.8, 114.3, 120.5, 132.8, 143.6, 153.2, 161.8, 169.6, 176.7, 183.2, 189.1, 199.4, 208, 215, 220.7, 225.2, 228.7, 231.2, 232.9, 233.9, 234.3, 234.1, 233.5, 232.5, 231.1, 221.3, 209.3, 197.4, 186.5, 177, 168.6, 161.3, 155, 144.4, 135.9, 128.8, 122.8, 117.5, 112.7, 108.4, 104.5, 101, 97.75, 94.8, 92.09, 89.6, 87.29, 77.8, 70.52, 64.84, 60.13 }; 499 483 500 for(i=0; i<60; i++) {e[73][i]=e73[i]*MeV*cm2/g;}484 AddData(T0, e73, 73); 501 485 } 486 487 void G4PSTARStopping::AddData(G4double* ekin, G4double* s, G4int idx) 488 { 489 sdata[idx] = new G4LPhysicsFreeVector(60, ekin[0]*MeV, ekin[59]*MeV); 490 const G4double fac = MeV*cm2/g; 491 for(size_t i=0; i<60; ++i) { sdata[idx]->PutValues(i, ekin[i]*MeV, s[i]*fac); } 492 sdata[idx]->SetSpline(true); 493 } -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel93.cc
r1228 r1315 1 // 1 // 2 2 // ******************************************************************** 3 3 // * License and Disclaimer * … … 25 25 // 26 26 // 27 // $Id: G4UrbanMscModel93.cc,v 1. 1 2009/11/01 13:05:01vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4UrbanMscModel93.cc,v 1.4 2010/05/20 13:17:25 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- 31 // 31 // 32 32 // GEANT4 Class file 33 // 33 // 34 34 // 35 35 // File name: G4UrbanMscModel93 … … 466 466 presafety = sp->GetSafety(); 467 467 468 //G4cout << "G4Urban2::StepLimit tPathLength= "469 //<<tPathLength<<" safety= " << presafety470 //<< " range= " <<currentRange<< " lambda= "<<lambda0471 //<< " Alg: " << steppingAlgorithm <<G4endl;468 // G4cout << "G4Urban2::StepLimit tPathLength= " 469 // <<tPathLength<<" safety= " << presafety 470 // << " range= " <<currentRange<< " lambda= "<<lambda0 471 // << " Alg: " << steppingAlgorithm <<G4endl; 472 472 473 473 // far from geometry boundary … … 571 571 if(tlimit < stepmin) tlimit = stepmin; 572 572 573 if(tPathLength > tlimit) tPathLength = tlimit ; 573 // randomize 1st step or 1st 'normal' step in volume 574 if((stepStatus == fUndefined) || 575 ((smallstep == skin) && !insideskin)) 576 { 577 G4double temptlimit = tlimit; 578 if(temptlimit > tlimitmin) 579 { 580 do { 581 temptlimit = G4RandGauss::shoot(tlimit,0.3*tlimit); 582 } while ((temptlimit < tlimitmin) || 583 (temptlimit > 2.*tlimit-tlimitmin)); 584 } 585 else 586 temptlimit = tlimitmin; 587 if(tPathLength > temptlimit) tPathLength = temptlimit; 588 } 589 else 590 { 591 if(tPathLength > tlimit) tPathLength = tlimit ; 592 } 574 593 575 594 } … … 617 636 //lower limit for tlimit 618 637 if(tlimit < tlimitmin) tlimit = tlimitmin; 619 638 620 639 if(tPathLength > tlimit) tPathLength = tlimit; 640 621 641 } 622 642 … … 1002 1022 G4double G4UrbanMscModel93::SampleDisplacement() 1003 1023 { 1024 // compute rmean = sqrt(<r**2>) from theory 1004 1025 const G4double kappa = 2.5; 1005 1026 const G4double kappapl1 = kappa+1.; 1006 1027 const G4double kappami1 = kappa-1.; 1028 // Compute rmean = sqrt(<r**2>) from theory 1007 1029 G4double rmean = 0.0; 1008 1030 if ((currentTau >= tausmall) && !insideskin) { … … 1022 1044 } 1023 1045 1046 if(rmean == 0.) return rmean; 1047 1024 1048 // protection against z > t ........................... 1025 if(rmean > 0.) { 1026 G4double zt = (tPathLength-zPathLength)*(tPathLength+zPathLength); 1027 if(zt <= 0.) 1028 rmean = 0.; 1029 else if(rmean*rmean > zt) 1030 rmean = sqrt(zt); 1031 } 1049 G4double rmax = (tPathLength-zPathLength)*(tPathLength+zPathLength); 1050 if(rmax <= 0.) 1051 rmax = 0.; 1052 else 1053 rmax = sqrt(rmax); 1054 1055 if(rmean >= rmax) return rmax; 1056 1032 1057 return rmean; 1058 // VI comment out for the time being 1059 /* 1060 //sample r (Gaussian distribution with a mean of rmean ) 1061 G4double r = 0.; 1062 G4double sigma = min(rmean,rmax-rmean); 1063 sigma /= 3.; 1064 G4double rlow = rmean-3.*sigma; 1065 G4double rhigh = rmean+3.*sigma; 1066 do { 1067 r = G4RandGauss::shoot(rmean,sigma); 1068 } while ((r < rlow) || (r > rhigh)); 1069 1070 return r; 1071 */ 1033 1072 } 1034 1073 -
trunk/source/processes/electromagnetic/standard/src/G4WaterStopping.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WaterStopping.cc,v 1. 18 2009/06/19 10:39:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4WaterStopping.cc,v 1.21 2010/04/26 17:44:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 54 54 { 55 55 spline = splineFlag; 56 dedx.reserve(17); 56 57 Initialise(corr); 57 58 } … … 67 68 { 68 69 G4double res = 0.0; 69 if((iz > 26) || (iz < 3) || (iz > 18 && iz < 26)) return res; 70 G4bool b; 70 if((iz > 26) || (iz < 3) || (iz > 18 && iz < 26)) { return res; } 71 71 G4int idx = iz - 3; 72 72 G4double scaledEnergy = energy/A[idx]; 73 G4double emin = 0.025*MeV;74 73 if(scaledEnergy < emin) { 75 res = ( dedx[idx])->GetValue(emin, b)*std::sqrt(scaledEnergy/emin);74 res = (*(dedx[idx]))[0]*std::sqrt(scaledEnergy/emin); 76 75 } else { 77 res = (dedx[idx])-> GetValue(scaledEnergy, b);76 res = (dedx[idx])->Value(scaledEnergy); 78 77 } 79 78 return res; … … 85 84 G4double factor) 86 85 { 87 G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0] ,energy[52]);86 G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0]*MeV,energy[52]*MeV); 88 87 pv->SetSpline(spline); 89 88 dedx.push_back(pv); 90 for(G4int i=0; i<53;i++) {91 pv->PutValues(i,energy[i] ,stoppower[i]*factor);89 for(G4int i=0; i<53; ++i) { 90 pv->PutValues(i,energy[i]*MeV,stoppower[i]*factor); 92 91 } 93 92 } … … 101 100 G4int zz[17] = {3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,26}; 102 101 G4int aa[17] = {7, 9, 11, 12, 14, 16, 19, 20, 23, 24, 27, 28,31,32, 35,40,56}; 103 // G4double A_Ion[17] = {6.941,9.0122,10.811,12.011,14.007,15.999,18.998,20.180,22.990,24.305,26.982,28.086,30.974,32.065,35.453,39.948,55.845}; 104 for(i=0; i<17; i++) { 102 for(i=0; i<17; ++i) { 105 103 Z[i] = zz[i]; 106 104 A[i] = G4double(aa[i]); … … 108 106 //..Reduced energies 109 107 G4double E[53] = {0.025,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250,300,400,500,600,700,800,900,1000}; 110 for(i=0; i<53; i++) {E[i] *= MeV;} 111 108 emin = E[0]*MeV; 112 109 G4double factor = 1000.*MeV/cm; 113 110 … … 149 146 150 147 if(corr) { 151 for(i=0; i<17; i++) {corr->AddStoppingData(Z[i], aa[i], "G4_WATER", dedx[i]);}148 for(i=0; i<17; ++i) {corr->AddStoppingData(Z[i], aa[i], "G4_WATER", dedx[i]);} 152 149 } 153 150 } -
trunk/source/processes/electromagnetic/standard/src/G4WentzelVIModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WentzelVIModel.cc,v 1. 37 2009/10/28 10:14:13vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4WentzelVIModel.cc,v 1.60 2010/06/01 11:13:31 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 39 39 // 40 40 // Modifications: 41 // 27-05-2010 V.Ivanchenko added G4WentzelOKandVIxSection class to 42 // compute cross sections and sample scattering angle 41 43 // 42 44 // … … 57 59 #include "G4WentzelVIModel.hh" 58 60 #include "Randomize.hh" 59 #include "G4LossTableManager.hh"60 61 #include "G4ParticleChangeForMSC.hh" 61 62 #include "G4PhysicsTableHelper.hh" 62 63 #include "G4ElementVector.hh" 63 64 #include "G4ProductionCutsTable.hh" 64 #include "G4PhysicsLogVector.hh" 65 #include "G4Electron.hh" 66 #include "G4Positron.hh" 67 #include "G4Proton.hh" 68 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 70 71 G4double G4WentzelVIModel::ScreenRSquare[] = {0.0}; 72 G4double G4WentzelVIModel::FormFactor[] = {0.0}; 65 #include "G4LossTableManager.hh" 66 #include "G4Pow.hh" 67 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 73 69 74 70 using namespace std; … … 77 73 G4VMscModel(nam), 78 74 theLambdaTable(0), 79 theLambda2Table(0), 80 numlimit(0.2), 81 nbins(60), 82 nwarnings(0), 83 nwarnlimit(50), 75 numlimit(0.1), 84 76 currentCouple(0), 85 77 cosThetaMin(1.0), 86 q2Limit(TeV*TeV),87 alpha2(fine_structure_const*fine_structure_const),88 78 isInitialized(false), 89 79 inside(false) … … 91 81 invsqrt12 = 1./sqrt(12.); 92 82 tlimitminfix = 1.e-6*mm; 93 theManager = G4LossTableManager::Instance(); 94 fNistManager = G4NistManager::Instance(); 95 theElectron = G4Electron::Electron(); 96 thePositron = G4Positron::Positron(); 97 theProton = G4Proton::Proton(); 98 lowEnergyLimit = 0.1*keV; 99 G4double p0 = electron_mass_c2*classic_electr_radius; 100 coeff = twopi*p0*p0; 101 tkin = targetZ = mom2 = DBL_MIN; 102 ecut = etag = DBL_MAX; 83 lowEnergyLimit = 1.0*eV; 103 84 particle = 0; 104 85 nelments = 5; 105 86 xsecn.resize(nelments); 106 87 prob.resize(nelments); 107 108 // Thomas-Fermi screening radii 109 // Formfactors from A.V. Butkevich et al., NIM A 488 (2002) 282 110 111 if(0.0 == ScreenRSquare[0]) { 112 G4double a0 = electron_mass_c2/0.88534; 113 G4double constn = 6.937e-6/(MeV*MeV); 114 115 ScreenRSquare[0] = alpha2*a0*a0; 116 for(G4int j=1; j<100; j++) { 117 G4double x = a0*fNistManager->GetZ13(j); 118 ScreenRSquare[j] = alpha2*x*x; 119 x = fNistManager->GetA27(j); 120 FormFactor[j] = constn*x*x; 121 } 122 } 88 theManager = G4LossTableManager::Instance(); 89 fG4pow = G4Pow::GetInstance(); 90 wokvi = new G4WentzelOKandVIxSection(); 123 91 } 124 92 … … 126 94 127 95 G4WentzelVIModel::~G4WentzelVIModel() 128 {} 96 { 97 delete wokvi; 98 } 129 99 130 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 135 105 // reset parameters 136 106 SetupParticle(p); 137 tkin = targetZ = mom2 = 0.0;138 ecut = etag = DBL_MAX;139 107 currentRange = 0.0; 140 108 cosThetaMax = cos(PolarAngleLimit()); 109 wokvi->Initialise(p, cosThetaMax); 110 /* 111 G4cout << "G4WentzelVIModel: factorA2(GeV^2) = " << factorA2/(GeV*GeV) 112 << " 1-cos(ThetaLimit)= " << 1 - cosThetaMax 113 << G4endl; 114 */ 141 115 currentCuts = &cuts; 142 116 … … 157 131 G4double cutEnergy, G4double) 158 132 { 159 SetupParticle(p); 160 if(kinEnergy < lowEnergyLimit) return 0.0; 161 SetupKinematic(kinEnergy, cutEnergy); 162 SetupTarget(Z, kinEnergy); 163 G4double xsec = ComputeTransportXSectionPerAtom(); 164 /* 165 G4cout << "CS: e= " << tkin << " cosEl= " << cosTetMaxElec2 166 << " cosN= " << cosTetMaxNuc2 << " xsec(bn)= " << xsec/barn 167 << " " << particle->GetParticleName() << G4endl; 133 G4double xsec = 0.0; 134 if(p != particle) { SetupParticle(p); } 135 if(kinEnergy < lowEnergyLimit) { return xsec; } 136 DefineMaterial(CurrentCouple()); 137 cosTetMaxNuc = wokvi->SetupKinematic(kinEnergy, currentMaterial); 138 if(cosTetMaxNuc < 1.0) { 139 cosTetMaxNuc = wokvi->SetupTarget(G4int(Z), cutEnergy); 140 xsec = wokvi->ComputeTransportCrossSectionPerAtom(cosTetMaxNuc); 141 /* 142 G4cout << "G4WentzelVIModel::CS: Z= " << G4int(Z) << " e(MeV)= " << kinEnergy 143 << " 1-cosN= " << 1 - costm << " xsec(bn)= " << xsec/barn 144 << " " << particle->GetParticleName() << G4endl; 168 145 */ 146 } 169 147 return xsec; 170 }171 172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......173 174 G4double G4WentzelVIModel::ComputeTransportXSectionPerAtom()175 {176 G4double xSection = 0.0;177 G4double x, y, x1, x2, x3, x4;178 179 // scattering off electrons180 if(cosTetMaxElec2 < 1.0) {181 x = (1.0 - cosTetMaxElec2)/screenZ;182 if(x < numlimit) y = 0.5*x*x*(1.0 - 1.3333333*x + 1.5*x*x);183 else y = log(1.0 + x) - x/(1.0 + x);184 if(y < 0.0) {185 nwarnings++;186 if(nwarnings < nwarnlimit /*&& y < -1.e-10*/) {187 G4cout << "Electron scattering <0 for L1 " << y188 << " e(MeV)= " << tkin << " p(MeV/c)= " << sqrt(mom2)189 << " Z= " << targetZ << " "190 << particle->GetParticleName() << G4endl;191 G4cout << " z= " << 1.0-cosTetMaxElec2 << " screenZ= " << screenZ192 << " x= " << x << G4endl;193 }194 y = 0.0;195 }196 xSection = y;197 }198 /*199 G4cout << "G4WentzelVI:XS per A " << " Z= " << targetZ200 << " e(MeV)= " << tkin/MeV << " XSel= " << xSection201 << " cut(MeV)= " << ecut/MeV202 << " zmaxE= " << (1.0 - cosTetMaxElec)/screenZ203 << " zmaxN= " << (1.0 - cosTetMaxNuc2)/screenZ204 << " costm= " << cosTetMaxNuc2 << G4endl;205 */206 // scattering off nucleus207 if(cosTetMaxNuc2 < 1.0) {208 x = 1.0 - cosTetMaxNuc2;209 x1 = screenZ*formfactA;210 x2 = 1.0 - x1;211 x3 = x/screenZ;212 x4 = formfactA*x;213 // low-energy limit214 if(x3 < numlimit && x1 < numlimit) {215 y = 0.5*x3*x3*(1.0 - 1.3333333*x3 + 1.5*x3*x3 - 1.5*x1216 + 3.0*x1*x1 + 2.666666*x3*x1)/(x2*x2*x2);217 // high energy limit218 } else if(x2 <= 0.0) {219 x4 = x1*(1.0 + x3);220 y = x3*(1.0 + 0.5*x3 - (2.0 - x1)*(1.0 + x3 + x3*x3/3.0)/x4)/(x4*x4);221 // middle energy222 } else {223 y = ((1.0 + x1)*x2*log((1. + x3)/(1. + x4))224 - x3/(1. + x3) - x4/(1. + x4))/(x2*x2);225 }226 //G4cout << "y= " << y << " x1= " <<x1<<" x2= " <<x2227 // <<" x3= "<<x3<<" x4= " << x4<<G4endl;228 if(y < 0.0) {229 nwarnings++;230 if(nwarnings < nwarnlimit /*&& y < -1.e-10*/) {231 G4cout << "Nuclear scattering <0 for L1 " << y232 << " e(MeV)= " << tkin << " Z= " << targetZ << " "233 << particle->GetParticleName() << G4endl;234 G4cout << " formfactA= " << formfactA << " screenZ= " << screenZ235 << " x= " << " x1= " << x1 << " x2= " << x2236 << " x3= " << x3 << " x4= " << x4 <<G4endl;237 }238 y = 0.0;239 }240 xSection += y*targetZ;241 }242 xSection *= kinFactor;243 /*244 G4cout << "Z= " << targetZ << " XStot= " << xSection/barn245 << " screenZ= " << screenZ << " formF= " << formfactA246 << " for " << particle->GetParticleName()247 << " m= " << mass << " 1/v= " << sqrt(invbeta2) << " p= " << sqrt(mom2)248 << " x= " << x249 << G4endl;250 */251 return xSection;252 148 } 253 149 … … 263 159 G4StepPoint* sp = track.GetStep()->GetPreStepPoint(); 264 160 G4StepStatus stepStatus = sp->GetStepStatus(); 161 //G4cout << "G4WentzelVIModel::ComputeTruePathLengthLimit stepStatus= " 162 // << stepStatus << G4endl; 265 163 266 164 // initialisation for 1st step … … 268 166 inside = false; 269 167 SetupParticle(dp->GetDefinition()); 270 theLambdaTable = theTable;271 168 } 272 169 … … 274 171 preKinEnergy = dp->GetKineticEnergy(); 275 172 DefineMaterial(track.GetMaterialCutsCouple()); 276 lambda0 = GetLambda(preKinEnergy); 173 theLambdaTable = theTable; 174 lambdaeff = GetLambda(preKinEnergy); 277 175 currentRange = 278 176 theManager->GetRangeFromRestricteDEDX(particle,preKinEnergy,currentCouple); 177 cosTetMaxNuc = wokvi->SetupKinematic(preKinEnergy, currentMaterial); 279 178 280 179 // extra check for abnormal situation 281 180 // this check needed to run MSC with eIoni and eBrem inactivated 282 if(tlimit > currentRange) tlimit = currentRange;181 if(tlimit > currentRange) { tlimit = currentRange; } 283 182 284 183 // stop here if small range particle 285 if(inside) return tlimit;184 if(inside) { return tlimit; } 286 185 287 186 // pre step … … 290 189 // compute presafety again if presafety <= 0 and no boundary 291 190 // i.e. when it is needed for optimization purposes 292 if(stepStatus != fGeomBoundary && presafety < tlimitminfix) 191 if(stepStatus != fGeomBoundary && presafety < tlimitminfix) { 293 192 presafety = ComputeSafety(sp->GetPosition(), tlimit); 193 } 294 194 /* 295 G4cout << "G4WentzelVIModel::ComputeTruePathLengthLimit tlimit= " 296 <<tlimit<<" safety= " << presafety 297 << " range= " <<currentRange<<G4endl; 195 G4cout << "e(MeV)= " << preKinEnergy/MeV 196 << " " << particle->GetParticleName() 197 << " CurLimit(mm)= " << tlimit/mm <<" safety(mm)= " << presafety/mm 198 << " R(mm)= " <<currentRange/mm 199 << " L0(mm^-1)= " << lambdaeff*mm 200 <<G4endl; 298 201 */ 299 202 // far from geometry boundary 300 203 if(currentRange < presafety) { 301 204 inside = true; 302 303 // limit mean scattering angle 304 } else { 305 G4double rlimit = facrange*lambda0; 306 G4double rcut = currentCouple->GetProductionCuts()->GetProductionCut(1); 307 if(rcut > rlimit) rlimit = std::pow(rcut*rcut*rlimit,0.33333333); 308 rlimit = std::min(rlimit, facgeom*currentMaterial->GetRadlen()); 309 if(rlimit < tlimit) tlimit = rlimit; 310 } 311 /* 205 return tlimit; 206 } 207 208 // natural limit for high energy 209 G4double rlimit = std::max(facrange*currentRange, 210 0.7*(1.0 - cosTetMaxNuc)*lambdaeff); 211 212 // low-energy e- 213 if(cosThetaMax > cosTetMaxNuc) { 214 rlimit = std::min(rlimit, facsafety*presafety); 215 } 216 217 // cut correction 218 G4double rcut = currentCouple->GetProductionCuts()->GetProductionCut(1); 219 //G4cout << "rcut= " << rcut << " rlimit= " << rlimit << " presafety= " << presafety 220 // << " 1-cosThetaMax= " <<1-cosThetaMax << " 1-cosTetMaxNuc= " << 1-cosTetMaxNuc 221 // << G4endl; 222 if(rcut > rlimit) { rlimit = std::min(rlimit, rcut*sqrt(rlimit/rcut)); } 223 224 if(rlimit < tlimit) { tlimit = rlimit; } 225 226 tlimit = std::max(tlimit, tlimitminfix); 227 228 // step limit in infinite media 229 tlimit = std::min(tlimit, 20*currentMaterial->GetRadlen()); 230 /* 312 231 G4cout << particle->GetParticleName() << " e= " << preKinEnergy 313 << " L0= " << lambda 0<< " R= " << currentRange232 << " L0= " << lambdaeff << " R= " << currentRange 314 233 << "tlimit= " << tlimit 315 234 << " currentMinimalStep= " << currentMinimalStep << G4endl; … … 324 243 tPathLength = truelength; 325 244 zPathLength = tPathLength; 326 lambdaeff = lambda0; 327 328 if(lambda0 > 0.0) { 329 G4double tau = tPathLength/lambda0; 245 246 if(lambdaeff > 0.0) { 247 G4double tau = tPathLength/lambdaeff; 330 248 //G4cout << "ComputeGeomPathLength: tLength= " << tPathLength 331 // << " lambda0= " << lambda0<< " tau= " << tau << G4endl;249 // << " Leff= " << lambdaeff << " tau= " << tau << G4endl; 332 250 // small step 333 251 if(tau < numlimit) { … … 336 254 // medium step 337 255 } else { 338 // zPathLength = lambda0*(1.0 - exp(-tPathLength/lambda0));339 256 G4double e1 = 0.0; 340 257 if(currentRange > tPathLength) { … … 343 260 currentCouple); 344 261 } 345 lambdaeff = GetLambda(0.5*(e1 + preKinEnergy)); 262 e1 = 0.5*(e1 + preKinEnergy); 263 cosTetMaxNuc = wokvi->SetupKinematic(e1, currentMaterial); 264 lambdaeff = GetLambda(e1); 346 265 zPathLength = lambdaeff*(1.0 - exp(-tPathLength/lambdaeff)); 347 266 } … … 355 274 G4double G4WentzelVIModel::ComputeTrueStepLength(G4double geomStepLength) 356 275 { 357 // step defined other than transportation 358 if(geomStepLength == zPathLength) return tPathLength; 276 // initialisation of single scattering x-section 277 xtsec = 0.0; 278 279 // pathalogical case 280 if(lambdaeff <= 0.0) { 281 zPathLength = geomStepLength; 282 tPathLength = geomStepLength; 283 return tPathLength; 284 } 285 286 G4double tau = geomStepLength/lambdaeff; 359 287 360 288 // step defined by transportation 361 tPathLength = geomStepLength; 362 zPathLength = geomStepLength; 363 G4double tau = zPathLength/lambdaeff; 364 tPathLength *= (1.0 + 0.5*tau + tau*tau/3.0); 365 366 if(tau > numlimit) { 367 G4double e1 = 0.0; 368 if(currentRange > tPathLength) { 369 e1 = theManager->GetEnergy(particle, 370 currentRange-tPathLength, 371 currentCouple); 372 } 373 lambdaeff = GetLambda(0.5*(e1 + preKinEnergy)); 374 tau = zPathLength/lambdaeff; 375 376 if(tau < 0.999999) tPathLength = -lambdaeff*log(1.0 - tau); 377 else tPathLength = currentRange; 378 379 if(tPathLength < zPathLength) tPathLength = zPathLength; 380 } 381 if(tPathLength > currentRange) tPathLength = currentRange; 382 //G4cout<<"Comp.true: zLength= "<<zPathLength<<" tLength= "<<tPathLength<<G4endl; 289 if(geomStepLength != zPathLength) { 290 291 // step defined by transportation 292 zPathLength = geomStepLength; 293 tPathLength = zPathLength*(1.0 + 0.5*tau + tau*tau/3.0); 294 295 // energy correction for a big step 296 if(tau > numlimit) { 297 G4double e1 = 0.0; 298 if(currentRange > tPathLength) { 299 e1 = theManager->GetEnergy(particle, 300 currentRange-tPathLength, 301 currentCouple); 302 } 303 e1 = 0.5*(e1 + preKinEnergy); 304 cosTetMaxNuc = wokvi->SetupKinematic(e1, currentMaterial); 305 lambdaeff = GetLambda(e1); 306 tau = zPathLength/lambdaeff; 307 308 if(tau < 0.999999) { tPathLength = -lambdaeff*log(1.0 - tau); } 309 else { tPathLength = currentRange; } 310 } 311 } 312 313 // check of step length 314 // define threshold angle between single and multiple scattering 315 cosThetaMin = 1.0 - 1.5*tPathLength/lambdaeff; 316 317 // recompute transport cross section - do not change energy 318 // anymore - cannot be applied for big steps 319 if(cosThetaMin > cosTetMaxNuc) { 320 321 // new computation 322 G4double xsec = ComputeXSectionPerVolume(); 323 //G4cout << "%%%% xsec= " << xsec << " xtsec= " << xtsec << G4endl; 324 if(xtsec > 0.0) { 325 if(xsec > 0.0) { lambdaeff = 1./xsec; } 326 else { lambdaeff = DBL_MAX; } 327 328 tau = zPathLength*xsec; 329 if(tau < numlimit) { tPathLength = zPathLength*(1.0 + 0.5*tau + tau*tau/3.0); } 330 else if(tau < 0.999999) { tPathLength = -lambdaeff*log(1.0 - tau); } 331 else { tPathLength = currentRange; } 332 } 333 } 334 335 if(tPathLength > currentRange) { tPathLength = currentRange; } 336 if(tPathLength < zPathLength) { tPathLength = zPathLength; } 337 /* 338 G4cout <<"Comp.true: zLength= "<<zPathLength<<" tLength= "<<tPathLength 339 <<" Leff(mm)= "<<lambdaeff/mm<<" sig0(1/mm)= " << xtsec <<G4endl; 340 G4cout << particle->GetParticleName() << " 1-cosThetaMin= " << 1-cosThetaMin 341 << " 1-cosTetMaxNuc= " << 1-cosTetMaxNuc 342 << " e(MeV)= " << preKinEnergy/MeV << G4endl; 343 */ 383 344 return tPathLength; 384 345 } … … 391 352 //G4cout << "!##! G4WentzelVIModel::SampleScattering for " 392 353 // << particle->GetParticleName() << G4endl; 393 G4double kinEnergy = dynParticle->GetKineticEnergy(); 394 395 // ignore scattering for zero step length and enegy below the limit 396 if(kinEnergy < lowEnergyLimit || tPathLength <= DBL_MIN) return; 397 398 G4double ekin = preKinEnergy; 399 if(ekin - kinEnergy > ekin*dtrl) { 400 ekin = 0.5*(preKinEnergy + kinEnergy); 401 lambdaeff = GetLambda(ekin); 402 } 354 355 // ignore scattering for zero step length and energy below the limit 356 if(dynParticle->GetKineticEnergy() < lowEnergyLimit || 357 tPathLength <= DBL_MIN || lambdaeff <= DBL_MIN) 358 { return; } 403 359 404 G4double x1 = 0.5*tPathLength/lambdaeff; 405 G4double cut= (*currentCuts)[currentMaterialIndex]; 406 /* 407 G4cout <<"SampleScat: E0(MeV)= "<< preKinEnergy<<" Eeff(MeV)= "<<ekin/MeV 408 << " L0= " << lambda0 << " Leff= " << lambdaeff 409 << " x1= " << x1 << " safety= " << safety << G4endl; 360 G4double invlambda = 0.0; 361 if(lambdaeff < DBL_MAX) { invlambda = 0.5/lambdaeff; } 362 363 // use average kinetic energy over the step 364 G4double cut = (*currentCuts)[currentMaterialIndex]; 365 /* 366 G4cout <<"SampleScat: E0(MeV)= "<< preKinEnergy/MeV 367 << " Leff= " << lambdaeff <<" sig0(1/mm)= " << xtsec 368 << " x1= " << tPathLength*invlambda << " safety= " << safety << G4endl; 410 369 */ 411 370 412 G4double xsec = 0.0; 413 G4bool largeAng = false; 414 415 // large scattering angle case 416 if(x1 > 0.5) { 417 x1 *= 0.5; 418 largeAng = true; 419 420 // normal case 421 } else { 422 423 // define threshold angle between single and multiple scattering 424 cosThetaMin = 1.0 - 3.0*x1; 425 426 // for low-energy e-,e+ no limit 427 SetupKinematic(ekin, cut); 428 429 // recompute transport cross section 430 if(cosThetaMin > cosTetMaxNuc) { 431 432 xsec = ComputeXSectionPerVolume(); 433 434 if(xtsec > 0.0) x1 = 0.5*tPathLength*xtsec; 435 else x1 = 0.0; 436 437 /* 438 G4cout << "cosTetMaxNuc= " << cosTetMaxNuc 439 << " cosThetaMin= " << cosThetaMin 440 << " cosThetaMax= " << cosThetaMax 441 << " cosTetMaxElec2= " << cosTetMaxElec2 << G4endl; 442 G4cout << "Recomputed xsec(1/mm)= " << xsec << " x1= " << x1 << G4endl; 443 */ 444 } 445 } 446 447 // result of central part sampling 448 G4double z; 371 G4double length = tPathLength; 372 G4double lengthlim = tPathLength*1.e-6; 373 374 // step limit due msc 375 G4double x0 = length; 376 // large scattering angle case - two step approach 377 if(tPathLength*invlambda > 0.5 && length > tlimitminfix) { x0 *= 0.5; } 378 379 // step limit due single scattering 380 G4double x1 = length; 381 if(xtsec > 0.0) { x1 = -log(G4UniformRand())/xtsec; } 382 383 const G4ElementVector* theElementVector = 384 currentMaterial->GetElementVector(); 385 G4int nelm = currentMaterial->GetNumberOfElements(); 386 387 // geometry 388 G4double sint, cost, phi; 389 G4ThreeVector oldDirection = dynParticle->GetMomentumDirection(); 390 G4ThreeVector temp(0.0,0.0,1.0); 391 392 // current position and direction relative to the end point 393 // because of magnetic field geometry is computed relatively to the 394 // end point of the step 395 G4ThreeVector dir(0.0,0.0,1.0); 396 G4ThreeVector pos(0.0,0.0,-zPathLength); 397 G4double mscfac = zPathLength/tPathLength; 398 399 // start a loop 449 400 do { 450 z = -x1*log(G4UniformRand()); 451 } while (z > 1.0); 452 453 // cost is sampled ------------------------------ 454 G4double cost = 1.0 - 2.0*z; 455 // if(cost < -1.0) cost = -1.0; 456 // else if(cost > 1.0) cost = 1.0; 457 G4double sint = sqrt((1.0 - cost)*(1.0 + cost)); 458 459 G4double phi = twopi*G4UniformRand(); 460 461 G4double dirx = sint*cos(phi); 462 G4double diry = sint*sin(phi); 463 464 //G4cout << "G4WentzelVIModel: step(mm)= " << tPathLength/mm 465 // << " sint= " << sint << " cost= " << cost<< G4endl; 466 467 G4ThreeVector oldDirection = dynParticle->GetMomentumDirection(); 468 G4ThreeVector newDirection(dirx,diry,cost); 469 G4ThreeVector temp(0.0,0.0,1.0); 470 G4ThreeVector pos(0.0,0.0,-zPathLength); 471 G4ThreeVector dir(0.0,0.0,1.0); 472 G4bool isscat = false; 473 474 // sample MSC scattering for large angle 475 // extra central scattering for half step 476 if(largeAng) { 477 isscat = true; 478 pos.setZ(-0.5*zPathLength); 479 do { 480 z = -x1*log(G4UniformRand()); 481 } while (z > 1.0); 401 G4double step = x0; 402 G4bool singleScat = false; 403 404 // single scattering case 405 if(x1 < x0) { 406 step = x1; 407 singleScat = true; 408 } 409 410 // new position 411 pos += step*mscfac*dir; 412 413 // added multiple scattering 414 G4double z; 415 G4double tet2 = step*invlambda; 416 do { z = -tet2*log(G4UniformRand()); } while (z >= 1.0); 417 482 418 cost = 1.0 - 2.0*z; 483 //if(std::fabs(cost) > 1.0) cost = 1.0;484 485 419 sint = sqrt((1.0 - cost)*(1.0 + cost)); 486 420 phi = twopi*G4UniformRand(); 487 488 // position and direction for secondary scattering 489 dir.set(sint*cos(phi),sint*sin(phi),cost); 490 pos += 0.5*dir*zPathLength; 491 x1 *= 2.0; 492 } 493 494 // sample Rutherford scattering for large angle 495 if(xsec > DBL_MIN) { 496 G4double t = tPathLength; 497 G4int nelm = currentMaterial->GetNumberOfElements(); 498 const G4ElementVector* theElementVector = 499 currentMaterial->GetElementVector(); 500 do{ 501 G4double x = -log(G4UniformRand())/xsec; 502 pos += dir*(zPathLength*std::min(x,t)/tPathLength); 503 t -= x; 504 if(t > 0.0) { 505 G4double zz1 = 1.0; 506 G4double qsec = G4UniformRand()*xsec; 507 508 // scattering off nucleus 509 G4int i = 0; 510 if(nelm > 1) { 511 for (; i<nelm; i++) {if(xsecn[i] >= qsec) break;} 512 if(i >= nelm) i = nelm - 1; 513 } 514 SetupTarget((*theElementVector)[i]->GetZ(), tkin); 515 G4double formf = formfactA; 516 G4double costm = cosTetMaxNuc2; 517 if(prob[i] > 0.0) { 518 if(G4UniformRand() <= prob[i]) { 519 formf = 0.0; 520 costm = cosTetMaxElec2; 521 } 522 } 523 if(cosThetaMin > costm) { 524 525 G4double w1 = 1. - cosThetaMin + screenZ; 526 G4double w2 = 1. - costm + screenZ; 527 G4double w3 = cosThetaMin - costm; 528 G4double grej, zz; 529 do { 530 zz = w1*w2/(w1 + G4UniformRand()*w3) - screenZ; 531 grej = 1.0/(1.0 + formf*zz); 532 } while ( G4UniformRand() > grej*grej ); 533 if(zz < 0.0) zz = 0.0; 534 else if(zz > 2.0) zz = 2.0; 535 zz1 = 1.0 - zz; 536 } 537 if(zz1 < 1.0) { 538 isscat = true; 539 //G4cout << "Rutherford zz1= " << zz1 << " t= " << t << G4endl; 540 sint = sqrt((1.0 - zz1)*(1.0 + zz1)); 541 //G4cout << "sint= " << sint << G4endl; 542 phi = twopi*G4UniformRand(); 543 G4double vx1 = sint*cos(phi); 544 G4double vy1 = sint*sin(phi); 545 temp.set(vx1,vy1,zz1); 546 temp.rotateUz(dir); 547 dir = temp; 548 } 421 G4double vx1 = sint*cos(phi); 422 G4double vy1 = sint*sin(phi); 423 424 // lateral displacement 425 if (latDisplasment && safety > tlimitminfix) { 426 G4double rms = invsqrt12*sqrt(2.0*tet2); 427 G4double dx = step*(0.5*vx1 + rms*G4RandGauss::shoot(0.0,1.0)); 428 G4double dy = step*(0.5*vy1 + rms*G4RandGauss::shoot(0.0,1.0)); 429 G4double dz; 430 G4double d = (dx*dx + dy*dy)/(step*step); 431 if(d < numlimit) { dz = -0.5*step*d*(1.0 + 0.25*d); } 432 else if(d < 1.0) { dz = -step*(1.0 - sqrt(1.0 - d));} 433 else { dx = dy = dz = 0.0; } 434 435 // change position 436 temp.set(dx,dy,dz); 437 temp.rotateUz(dir); 438 pos += temp; 439 } 440 441 // direction is changed 442 temp.set(vx1,vy1,cost); 443 temp.rotateUz(dir); 444 dir = temp; 445 446 if(singleScat) { 447 448 // select element 449 G4int i = 0; 450 if(nelm > 1) { 451 G4double qsec = G4UniformRand()*xtsec; 452 for (; i<nelm; ++i) { if(xsecn[i] >= qsec) { break; } } 453 if(i >= nelm) { i = nelm - 1; } 549 454 } 550 } while (t > 0.0); 551 } 552 if(isscat) newDirection.rotateUz(dir); 553 newDirection.rotateUz(oldDirection); 455 G4double cosTetM = 456 wokvi->SetupTarget(G4int((*theElementVector)[i]->GetZ()), cut); 457 temp = wokvi->SampleSingleScattering(cosThetaMin, cosTetM, prob[i]); 458 temp.rotateUz(dir); 459 460 // renew direction 461 dir = temp; 462 463 // new single scatetring 464 x1 = -log(G4UniformRand())/xtsec; 465 } 466 467 // update step 468 length -= step; 469 470 } while (length > lengthlim); 471 472 dir.rotateUz(oldDirection); 473 pos.rotateUz(oldDirection); 554 474 555 475 //G4cout << "G4WentzelVIModel sampling of scattering is done" << G4endl; 556 476 // end of sampling ------------------------------- 557 477 558 fParticleChange->ProposeMomentumDirection(newDirection); 559 560 if (latDisplasment && safety > tlimitminfix) { 561 G4double rms = invsqrt12*sqrt(2.0*x1); 562 G4double dx = zPathLength*(0.5*dirx + rms*G4RandGauss::shoot(0.0,1.0)); 563 G4double dy = zPathLength*(0.5*diry + rms*G4RandGauss::shoot(0.0,1.0)); 564 G4double dz; 565 G4double d = (dx*dx + dy*dy)/(zPathLength*zPathLength); 566 if(d < numlimit) dz = -0.5*zPathLength*d*(1.0 + 0.25*d); 567 else if(d < 1.0) dz = -zPathLength*(1.0 - sqrt(1.0 - d)); 568 else { 569 dx = dy = dz = 0.0; 570 } 571 572 temp.set(dx,dy,dz); 573 if(isscat) temp.rotateUz(dir); 574 pos += temp; 575 576 pos.rotateUz(oldDirection); 577 478 fParticleChange->ProposeMomentumDirection(dir); 479 480 // lateral displacement 481 if (latDisplasment) { 578 482 G4double r = pos.mag(); 579 483 … … 597 501 G4double G4WentzelVIModel::ComputeXSectionPerVolume() 598 502 { 599 const G4ElementVector* theElementVector =600 currentMaterial->GetElementVector();503 // prepare recomputation of x-sections 504 const G4ElementVector* theElementVector = currentMaterial->GetElementVector(); 601 505 const G4double* theAtomNumDensityVector = 602 506 currentMaterial->GetVecNbOfAtomsPerVolume(); … … 604 508 if(nelm > nelments) { 605 509 nelments = nelm; 606 xsecn.resize(nelments); 607 prob.resize(nelments); 608 } 609 510 xsecn.resize(nelm); 511 prob.resize(nelm); 512 } 513 G4double cut = (*currentCuts)[currentMaterialIndex]; 514 cosTetMaxNuc = wokvi->GetCosThetaNuc(); 515 516 // check consistency 610 517 xtsec = 0.0; 518 if(cosTetMaxNuc > cosThetaMin) { return 0.0; } 519 520 // loop over elements 611 521 G4double xs = 0.0; 612 613 for (G4int i=0; i<nelm; i++) {614 SetupTarget((*theElementVector)[i]->GetZ(), tkin);522 for (G4int i=0; i<nelm; ++i) { 523 G4double costm = 524 wokvi->SetupTarget(G4int((*theElementVector)[i]->GetZ()), cut); 615 525 G4double density = theAtomNumDensityVector[i]; 616 G4double cosnm = cosTetMaxNuc2;617 G4double cosem = cosTetMaxElec2;618 619 // recompute the angular limit620 cosTetMaxNuc2 = std::max(cosnm,cosThetaMin);621 cosTetMaxElec2 = std::max(cosem,cosThetaMin);622 xtsec += ComputeTransportXSectionPerAtom()*density;623 // return limit back624 cosTetMaxElec2 = cosem;625 cosTetMaxNuc2 = cosnm;626 526 627 527 G4double esec = 0.0; 628 G4double nsec = 0.0; 629 G4double x1 = 1.0 - cosThetaMin + screenZ; 630 G4double f = kinFactor*density; 631 632 // scattering off electrons 633 if(cosThetaMin > cosem) { 634 esec = f*(cosThetaMin - cosem)/(x1*(1.0 - cosem + screenZ)); 635 } 636 637 // scattering off nucleaus 638 if(cosThetaMin > cosnm) { 639 640 // Rutherford part 641 G4double s = screenZ*formfactA; 642 G4double z1 = 1.0 - cosnm + screenZ; 643 G4double s1 = 1.0 - s; 644 G4double d = s1/formfactA; 645 646 // check numerical limit 647 if(d < numlimit*x1) { 648 G4double x2 = x1*x1; 649 G4double z2 = z1*z1; 650 nsec = (1.0/(x1*x2) - 1.0/(z1*z2) - d*1.5*(1.0/(x2*x2) - 1.0/(z2*z2)))/ 651 (3.0*formfactA*formfactA); 652 } else { 653 G4double x2 = x1 + d; 654 G4double z2 = z1 + d; 655 nsec = (1.0/x1 - 1.0/z1 + 1.0/x2 - 1.0/z2 - 2.0*log(z1*x2/(z2*x1))/d)/(s1*s1); 656 } 657 nsec *= f*targetZ; 658 } 659 nsec += esec; 660 if(nsec > 0.0) esec /= nsec; 661 xs += nsec; 662 xsecn[i] = xs; 528 if(costm < cosThetaMin) { 529 530 // recompute the transport x-section 531 xs += density*wokvi->ComputeTransportCrossSectionPerAtom(cosThetaMin); 532 533 // recompute the total x-section 534 G4double nsec = wokvi->ComputeNuclearCrossSection(cosThetaMin, costm); 535 esec = wokvi->ComputeElectronCrossSection(cosThetaMin, costm); 536 nsec += esec; 537 if(nsec > 0.0) { esec /= nsec; } 538 xtsec += nsec*density; 539 } 540 xsecn[i] = xtsec; 663 541 prob[i] = esec; 664 //G4cout << i << " xs= " << xs << " cosThetaMin= " <<cosThetaMin665 // << " costm= " << costm<< G4endl;542 //G4cout << i << " xs= " << xs << " xtsec= " << xtsec << " 1-cosThetaMin= " << 1-cosThetaMin 543 // << " 1-cosTetMaxNuc2= " <<1-cosTetMaxNuc2<< G4endl; 666 544 } 667 545 668 546 //G4cout << "ComputeXS result: xsec(1/mm)= " << xs 669 // << " txsec(1/mm)= " << xtsec <<G4endl;547 // << " txsec(1/mm)= " << xtsec <<G4endl; 670 548 return xs; 671 549 } 672 550 673 551 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 674 675 /*676 G4double G4MuMscModel::ComputeXSectionPerVolume()677 {678 const G4ElementVector* theElementVector =679 currentMaterial->GetElementVector();680 const G4double* theAtomNumDensityVector =681 currentMaterial->GetVecNbOfAtomsPerVolume();682 size_t nelm = currentMaterial->GetNumberOfElements();683 684 xsece1 = 0.0;685 xsece2 = 0.0;686 xsecn2 = 0.0;687 zcorr = 0.0;688 689 G4double fac = coeff*chargeSquare*invbeta2/mom2;690 691 for (size_t i=0; i<nelm; i++) {692 const G4Element* elm = (*theElementVector)[i];693 G4double Z = elm->GetZ();694 SetupTarget(Z, tkin);695 G4double den = fac*theAtomNumDensityVector[i]*Z;696 697 G4double x = 1.0 - cosThetaMin;698 G4double x1 = x + screenZ;699 G4double x2 = 1.0/(x1*x1);700 G4double x3 = 1.0 + x*formfactA;701 702 //G4cout << "x= " << x << " den= " << den << " cosE= " << cosTetMaxElec << G4endl;703 //G4cout << "cosThtaMin= " << cosThetaMin << G4endl;704 //G4cout << "cosTetMaxNuc= " << cosTetMaxNuc << " q2Limit= " << q2Limit << G4endl;705 706 // scattering off electrons707 if(cosTetMaxElec < cosThetaMin) {708 709 // flat part710 G4double s = den*x2*x;711 xsece1 += s;712 zcorr += 0.5*x*s;713 714 // Rutherford part715 G4double z1 = 1.0 - cosTetMaxElec + screenZ;716 G4double z2 = (cosThetaMin - cosTetMaxElec)/x1;717 if(z2 < 0.2) s = z2*(x - 0.5*z2*(x - screenZ))/x1;718 else s = log(1.0 + z2) - screenZ*z2/z1;719 xsece2 += den*z2/z1;720 zcorr += den*s;721 }722 den *= Z;723 724 //G4cout << "Z= " << Z<< " cosL= " << cosTetMaxNuc << " cosMin= " << cosThetaMin << G4endl;725 // scattering off nucleaus726 if(cosTetMaxNuc < cosThetaMin) {727 728 // flat part729 G4double s = den*x2*x/(x3*x3);730 xsece1 += s;731 zcorr += 0.5*x*s;732 733 // Rutherford part734 s = screenZ*formfactA;735 G4double w = 1.0 + 2.0*s;736 G4double z1 = 1.0 - cosTetMaxNuc + screenZ;737 G4double d = (1.0 - s)/formfactA;738 G4double x4 = x1 + d;739 G4double z4 = z1 + d;740 G4double t1 = 1.0/(x1*z1);741 G4double t4 = 1.0/(x4*z4);742 G4double w1 = cosThetaMin - cosTetMaxNuc;743 G4double w2 = log(z1*x4/(x1*z4));744 745 den *= w;746 xsecn2 += den*(w1*(t1 + t4) - 2.0*w2/d);747 zcorr += den*(w*w2 - w1*(screenZ*t1 + t4/formfactA));748 }749 xsece[i] = xsece2;750 xsecn[i] = xsecn2;751 // G4cout << i << " xsece2= " << xsece2 << " xsecn2= " << xsecn2 << G4endl;752 }753 G4double xsec = xsece1 + xsece2 + xsecn2;754 755 //G4cout << "xsece1= " << xsece1 << " xsece2= " << xsece2756 //<< " xsecn2= " << xsecn2757 // << " zsec= " << zcorr*0.5*tPathLength << G4endl;758 zcorr *= 0.5*tPathLength;759 760 return xsec;761 }762 */763 764 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......765 766 void G4WentzelVIModel::ComputeMaxElectronScattering(G4double cutEnergy)767 {768 ecut = cutEnergy;769 G4double tmax = tkin;770 cosTetMaxElec = 1.0;771 if(mass > MeV) {772 G4double ratio = electron_mass_c2/mass;773 G4double tau = tkin/mass;774 tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/775 (1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);776 cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2;777 } else {778 779 if(particle == theElectron) tmax *= 0.5;780 G4double t = std::min(cutEnergy, tmax);781 G4double mom21 = t*(t + 2.0*electron_mass_c2);782 G4double t1 = tkin - t;783 //G4cout <<"tkin=" <<tkin<<" tmax= "<<tmax<<" t= "784 //<<t<< " t1= "<<t1<<" cut= "<<ecut<<G4endl;785 if(t1 > 0.0) {786 G4double mom22 = t1*(t1 + 2.0*mass);787 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);788 if(ctm < 1.0) cosTetMaxElec = ctm;789 if(ctm < -1.0) cosTetMaxElec = -1.0;790 }791 }792 if(cosTetMaxElec < cosTetMaxNuc) cosTetMaxElec = cosTetMaxNuc;793 }794 795 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungModel.cc,v 1.4 4 2009/04/09 18:41:18vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4eBremsstrahlungModel.cc,v 1.46 2010/04/28 18:39:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 92 92 if(p) SetParticle(p); 93 93 theGamma = G4Gamma::Gamma(); 94 minThreshold = 1.0*keV;94 minThreshold = 0.1*keV; 95 95 } 96 96 … … 901 901 if(1 < nElements) { 902 902 903 --nElements; 903 904 G4DataVector* dv = partialSumSigma[couple->GetIndex()]; 904 G4double rval = G4UniformRand()*((*dv)[nElements-1]); 905 906 for (G4int i=0; i<nElements; i++) { 907 if (rval <= (*dv)[i]) elm = (*theElementVector)[i]; 908 } 909 if(!elm) { 910 G4cout << "G4eBremsstrahlungModel::SelectRandomAtom: Warning -" 911 << " no elements found in " 912 << material->GetName() 913 << G4endl; 914 elm = (*theElementVector)[0]; 915 } 916 } else elm = (*theElementVector)[0]; 905 G4double rval = G4UniformRand()*((*dv)[nElements]); 906 907 elm = (*theElementVector)[nElements]; 908 for (G4int i=0; i<nElements; ++i) { 909 if (rval <= (*dv)[i]) { 910 elm = (*theElementVector)[i]; 911 break; 912 } 913 } 914 } else { elm = (*theElementVector)[0]; } 917 915 918 916 SetCurrentElement(elm); -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungRelModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungRelModel.cc,v 1.1 4 2009/04/09 18:41:18vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4eBremsstrahlungRelModel.cc,v 1.15 2010/04/06 17:02:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 theGamma = G4Gamma::Gamma(); 94 94 95 minThreshold = 1.0*keV;95 minThreshold = 0.1*keV; 96 96 SetLowEnergyLimit(GeV); 97 97 -
trunk/source/processes/electromagnetic/standard/src/G4eCoulombScatteringModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.cc,v 1. 78 2009/10/28 10:14:13vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4eCoulombScatteringModel.cc,v 1.89 2010/05/27 14:22:05 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 47 47 // 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion 48 48 // 16.06.09 C.Consolandi fixed computation of effective mass 49 // 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to 50 // compute cross sections and sample scattering angle 49 51 // 50 52 // … … 60 62 #include "G4DataVector.hh" 61 63 #include "G4ElementTable.hh" 62 #include "G4PhysicsLogVector.hh"63 64 #include "G4ParticleChangeForGamma.hh" 64 #include "G4Electron.hh"65 #include "G4Positron.hh"66 65 #include "G4Proton.hh" 67 66 #include "G4ParticleTable.hh" 68 67 #include "G4ProductionCutsTable.hh" 69 68 #include "G4NucleiProperties.hh" 70 71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 72 73 G4double G4eCoulombScatteringModel::ScreenRSquare[] = {0.0}; 74 G4double G4eCoulombScatteringModel::FormFactor[] = {0.0}; 69 #include "G4Pow.hh" 70 #include "G4LossTableManager.hh" 71 #include "G4NistManager.hh" 72 73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 75 74 76 75 using namespace std; … … 80 79 cosThetaMin(1.0), 81 80 cosThetaMax(-1.0), 82 q2Limit(TeV*TeV),83 alpha2(fine_structure_const*fine_structure_const),84 faclim(100.0),85 81 isInitialised(false) 86 82 { 87 83 fNistManager = G4NistManager::Instance(); 88 84 theParticleTable = G4ParticleTable::GetParticleTable(); 89 theElectron = G4Electron::Electron();90 thePositron = G4Positron::Positron();91 85 theProton = G4Proton::Proton(); 92 86 currentMaterial = 0; 93 87 currentElement = 0; 94 lowEnergyLimit = 0.1*keV; 95 G4double p0 = electron_mass_c2*classic_electr_radius; 96 coeff = twopi*p0*p0; 97 tkin = targetZ = mom2 = DBL_MIN; 98 elecXSection = nucXSection = 0.0; 88 lowEnergyLimit = 1*eV; 99 89 recoilThreshold = 0.*keV; 100 ecut = DBL_MAX;101 90 particle = 0; 102 91 currentCouple = 0; 103 104 // Thomas-Fermi screening radii 105 // Formfactors from A.V. Butkevich et al., NIM A 488 (2002) 282 106 107 if(0.0 == ScreenRSquare[0]) { 108 G4double a0 = electron_mass_c2/0.88534; 109 G4double constn = 6.937e-6/(MeV*MeV); 110 111 ScreenRSquare[0] = alpha2*a0*a0; 112 for(G4int j=1; j<100; j++) { 113 G4double x = a0*fNistManager->GetZ13(j); 114 ScreenRSquare[j] = alpha2*x*x; 115 x = fNistManager->GetA27(j); 116 FormFactor[j] = constn*x*x; 117 } 118 } 92 wokvi = new G4WentzelOKandVIxSection(); 119 93 } 120 94 … … 122 96 123 97 G4eCoulombScatteringModel::~G4eCoulombScatteringModel() 124 {} 98 { 99 delete wokvi; 100 } 125 101 126 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 131 107 SetupParticle(p); 132 108 currentCouple = 0; 133 elecXSection = nucXSection = 0.0;134 tkin = targetZ = mom2 = DBL_MIN;135 ecut = etag = DBL_MAX;136 109 cosThetaMin = cos(PolarAngleLimit()); 110 wokvi->Initialise(p, cosThetaMin); 111 /* 112 G4cout << "G4eCoulombScatteringModel: factorA2(GeV^2) = " << factorA2/(GeV*GeV) 113 << " 1-cos(ThetaLimit)= " << 1 - cosThetaMin 114 << " cos(thetaMax)= " << cosThetaMax 115 << G4endl; 116 */ 137 117 pCuts = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3); 138 118 //G4cout << "!!! G4eCoulombScatteringModel::Initialise for " … … 151 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 152 132 153 void G4eCoulombScatteringModel::ComputeMaxElectronScattering(G4double cutEnergy)154 {155 ecut = cutEnergy;156 G4double tmax = tkin;157 cosTetMaxElec = 1.0;158 if(mass > MeV) {159 G4double ratio = electron_mass_c2/mass;160 G4double tau = tkin/mass;161 tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/162 (1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);163 cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2;164 } else {165 166 if(particle == theElectron) tmax *= 0.5;167 G4double t = std::min(cutEnergy, tmax);168 G4double mom21 = t*(t + 2.0*electron_mass_c2);169 G4double t1 = tkin - t;170 //G4cout << "tkin= " << tkin << " t= " << t << " t1= " << t1 << G4endl;171 if(t1 > 0.0) {172 G4double mom22 = t1*(t1 + 2.0*mass);173 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);174 //G4cout << "ctm= " << ctm << G4endl;175 if(ctm < 1.0) cosTetMaxElec = ctm;176 if(ctm < -1.0) cosTetMaxElec = -1.0;177 }178 }179 }180 181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......182 183 133 G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom( 184 134 const G4ParticleDefinition* p, … … 190 140 // << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV << G4endl; 191 141 G4double xsec = 0.0; 192 SetupParticle(p); 193 if(kinEnergy < lowEnergyLimit) return xsec; 194 SetupKinematic(kinEnergy, cutEnergy); 195 if(cosTetMaxNuc < cosTetMinNuc) { 196 SetupTarget(Z, kinEnergy); 197 xsec = CrossSectionPerAtom(); 142 if(p != particle) { SetupParticle(p); } 143 144 // cross section is set to zero to avoid problems in sample secondary 145 if(kinEnergy < lowEnergyLimit) { return xsec; } 146 DefineMaterial(CurrentCouple()); 147 cosTetMinNuc = wokvi->SetupKinematic(kinEnergy, currentMaterial); 148 if(cosThetaMax < cosTetMinNuc) { 149 G4int iz = G4int(Z); 150 cosTetMinNuc = wokvi->SetupTarget(iz, cutEnergy); 151 cosTetMaxNuc = cosThetaMax; 152 if(iz == 1 && cosTetMaxNuc < 0.0 && particle == theProton) { 153 cosTetMaxNuc = 0.0; 154 } 155 xsec = wokvi->ComputeNuclearCrossSection(cosTetMinNuc, cosTetMaxNuc); 156 elecRatio = wokvi->ComputeElectronCrossSection(cosTetMinNuc, cosThetaMax); 157 xsec += elecRatio; 158 if(xsec > 0.0) { elecRatio /= xsec; } 198 159 } 199 160 /* 200 G4cout << "e(MeV)= " << ekin/MeV << "cosTetMinNuc= " << cosTetMinNuc 201 << " cosTetMaxNuc= " << cosTetMaxNuc 202 << " cosTetMaxElec= " << cosTetMaxElec 161 G4cout << "e(MeV)= " << kinEnergy/MeV << " xsec(b)= " << xsec/barn 162 << " 1-cosTetMinNuc= " << 1-cosTetMinNuc 163 << " 1-cosTetMaxNuc2= " << 1-cosTetMaxNuc2 164 << " 1-cosTetMaxElec= " << 1-cosTetMaxElec 203 165 << " screenZ= " << screenZ 204 166 << " formfactA= " << formfactA << G4endl; 205 167 */ 206 168 return xsec; 207 }208 209 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......210 211 G4double G4eCoulombScatteringModel::CrossSectionPerAtom()212 {213 // This method needs initialisation before be called214 //G4double fac = coeff*targetZ*chargeSquare*invbeta2/mom2;215 216 G4double meff = targetMass/(mass+targetMass);217 G4double fac = coeff*targetZ*chargeSquare*invbeta2/(mom2*meff*meff);218 219 elecXSection = 0.0;220 nucXSection = 0.0;221 222 G4double x = 1.0 - cosTetMinNuc;223 G4double x1 = x + screenZ;224 225 if(cosTetMaxElec2 < cosTetMinNuc) {226 elecXSection = fac*(cosTetMinNuc - cosTetMaxElec2)/227 (x1*(1.0 - cosTetMaxElec2 + screenZ));228 nucXSection = elecXSection;229 }230 231 //G4cout << "XS tkin(MeV)= " << tkin<<" xs= " <<nucXSection232 // << " costmax= " << cosTetMaxNuc2233 // << " costmin= " << cosTetMinNuc << " Z= " << targetZ <<G4endl;234 if(cosTetMaxNuc2 < cosTetMinNuc) {235 G4double s = screenZ*formfactA;236 G4double z1 = 1.0 - cosTetMaxNuc2 + screenZ;237 G4double s1 = 1.0 - s;238 G4double d = s1/formfactA;239 //G4cout <<"x1= "<<x1<<" z1= " <<z1<<" s= "<<s << " d= " <<d <<G4endl;240 if(d < 0.2*x1) {241 G4double x2 = x1*x1;242 G4double z2 = z1*z1;243 x = (1.0/(x1*x2) - 1.0/(z1*z2) - d*1.5*(1.0/(x2*x2) - 1.0/(z2*z2)))/244 (3.0*formfactA*formfactA);245 } else {246 G4double x2 = x1 + d;247 G4double z2 = z1 + d;248 x = (1.0/x1 - 1.0/z1 + 1.0/x2 - 1.0/z2 - 2.0*log(z1*x2/(z2*x1))/d)/(s1*s1);249 }250 nucXSection += fac*targetZ*x;251 }252 //G4cout<<" cross(bn)= "<<nucXSection/barn<<" xsElec(bn)= "<<elecXSection/barn253 // << " Asc= " << screenZ << G4endl;254 255 return nucXSection;256 169 } 257 170 … … 266 179 { 267 180 G4double kinEnergy = dp->GetKineticEnergy(); 268 if(kinEnergy < lowEnergyLimit) return; 269 DefineMaterial(couple); 181 if(kinEnergy < lowEnergyLimit) { return; } 270 182 SetupParticle(dp->GetDefinition()); 271 183 272 SetupKinematic(kinEnergy, cutEnergy);273 184 //G4cout << "G4eCoulombScatteringModel::SampleSecondaries e(MeV)= " 274 185 // << kinEnergy << " " << particle->GetParticleName() … … 279 190 kinEnergy,cutEnergy,kinEnergy); 280 191 281 SetupTarget(currentElement->GetZ(),kinEnergy); 282 192 G4double Z = currentElement->GetZ(); 193 194 if(ComputeCrossSectionPerAtom(particle,kinEnergy, Z, 195 kinEnergy, cutEnergy, kinEnergy) == 0.0) 196 { return; } 197 198 G4int iz = G4int(Z); 283 199 G4int ia = SelectIsotopeNumber(currentElement); 284 targetMass = G4NucleiProperties::GetNuclearMass(ia, iz); 285 286 G4double cost = SampleCosineTheta(); 287 G4double z1 = 1.0 - cost; 288 if(z1 < 0.0) return; 289 290 G4double sint = sqrt(z1*(1.0 + cost)); 291 292 //G4cout<<"## Sampled sint= " << sint << " Z= " << targetZ << " A= " << ia 293 // << " screenZ= " << screenZ << " cn= " << formfactA << G4endl; 294 295 G4double phi = twopi * G4UniformRand(); 200 G4double targetMass = G4NucleiProperties::GetNuclearMass(ia, iz); 201 202 G4ThreeVector newDirection = 203 wokvi->SampleSingleScattering(cosTetMinNuc, cosThetaMax, elecRatio); 204 G4double cost = newDirection.z(); 296 205 297 206 G4ThreeVector direction = dp->GetMomentumDirection(); 298 G4ThreeVector newDirection(cos(phi)*sint,sin(phi)*sint,cost);299 207 newDirection.rotateUz(direction); 300 208 … … 303 211 // recoil sampling assuming a small recoil 304 212 // and first order correction to primary 4-momentum 305 G4double q2 = 2*z1*mom2;306 G4double trec = q2/(sqrt(targetMass*targetMass + q2) + targetMass);213 G4double mom2 = wokvi->GetMomentumSquare(); 214 G4double trec = mom2*(1.0 - cost)/(targetMass + (mass + kinEnergy)*(1.0 + cost)); 307 215 G4double finalT = kinEnergy - trec; 308 216 //G4cout<<"G4eCoulombScatteringModel: finalT= "<<finalT<<" Trec= "<<trec<<G4endl; … … 332 240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 333 241 334 G4double G4eCoulombScatteringModel::SampleCosineTheta() 335 { 336 G4double costm = cosTetMaxNuc2; 337 G4double formf = formfactA; 338 G4double prob = 0.0; 339 G4double xs = CrossSectionPerAtom(); 340 if(xs > 0.0) prob = elecXSection/xs; 341 342 // scattering off e or A? 343 if(G4UniformRand() < prob) { 344 costm = cosTetMaxElec2; 345 formf = 0.0; 346 } 347 348 /* 349 G4cout << "SampleCost: e(MeV)= " << tkin 350 << " 1-ctmaxN= " << 1. - cosTetMinNuc 351 << " 1-ctmax= " << 1. - costm 352 << " Z= " << targetZ 353 << G4endl; 354 */ 355 356 if(costm >= cosTetMinNuc) return 2.0; 357 358 G4double x1 = 1. - cosTetMinNuc + screenZ; 359 G4double x2 = 1. - costm + screenZ; 360 G4double x3 = cosTetMinNuc - costm; 361 G4double grej, z1; 362 do { 363 z1 = x1*x2/(x1 + G4UniformRand()*x3) - screenZ; 364 grej = 1.0/(1.0 + formf*z1); 365 } while ( G4UniformRand() > grej*grej ); 366 367 if(mass > MeV) { 368 if(G4UniformRand() > (1. - z1*0.5)/(1.0 + z1*sqrt(mom2)/targetMass)) { 369 return 2.0; 370 } 371 } 372 //G4cout << "z1= " << z1 << " cross= " << nucXSection/barn 373 // << " crossE= " << elecXSection/barn << G4endl; 374 375 return 1.0 - z1; 376 } 377 378 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 379 380 242 -
trunk/source/processes/electromagnetic/standard/src/G4eMultipleScattering.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eMultipleScattering.cc,v 1.1 0 2009/11/01 13:05:01vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4eMultipleScattering.cc,v 1.12 2010/06/04 09:11:02 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 45 45 46 46 #include "G4eMultipleScattering.hh" 47 #include "G4UrbanMscModel9 2.hh"47 #include "G4UrbanMscModel93.hh" 48 48 #include "G4MscStepLimitType.hh" 49 49 #include "G4Electron.hh" … … 77 77 void G4eMultipleScattering::InitialiseProcess(const G4ParticleDefinition*) 78 78 { 79 if(isInitialized) return;79 if(isInitialized) { return; } 80 80 81 81 // initialisation of parameters - defaults for particles other 82 82 // than ions can be overwritten by users 83 G4VMscModel* mscUrban = new G4UrbanMscModel9 2();83 G4VMscModel* mscUrban = new G4UrbanMscModel93(); 84 84 AddEmModel(1,mscUrban); 85 85 isInitialized = true; 86 /*87 G4cout << "G4eMultipleScattering::InitialiseProcess for "88 << p->GetParticleName()89 << " skin= " << Skin()90 << " SA= " << steppingAlgorithm91 << G4endl;92 */93 86 } 94 87 … … 98 91 { 99 92 G4cout << " RangeFactor= " << RangeFactor() 100 << ", step limit type: " << StepLimitType() 101 << ", lateralDisplacement: " << LateralDisplasmentFlag() 102 << ", skin= " << Skin() 103 << ", geomFactor= " << GeomFactor() 104 << G4endl; 93 << ", stepLimitType: " << StepLimitType() 94 << ", latDisplacement: " << LateralDisplasmentFlag(); 95 if(StepLimitType() == fUseDistanceToBoundary) { 96 G4cout << ", skin= " << Skin() << ", geomFactor= " << GeomFactor(); 97 } 98 G4cout << G4endl; 105 99 } 106 100 -
trunk/source/processes/electromagnetic/standard/src/G4hIonisation.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.cc,v 1.8 2 2009/02/20 12:06:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4hIonisation.cc,v 1.85 2010/06/04 09:22:14 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma) 80 80 // 12-09-08 Removed CorrectionsAlongStep (VI) 81 // 27-05-10 Added G4ICRU73QOModel for anti-protons (VI) 81 82 // 82 83 // ------------------------------------------------------------------- … … 99 100 #include "G4KaonPlus.hh" 100 101 #include "G4KaonMinus.hh" 102 #include "G4ICRU73QOModel.hh" 101 103 102 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 106 108 G4hIonisation::G4hIonisation(const G4String& name) 107 109 : G4VEnergyLossProcess(name), 108 isInitialised(false), 109 nuclearStopping(true) 110 { 111 // SetStepFunction(0.2, 1.0*mm); 110 isInitialised(false) 111 { 112 //SetStepFunction(0.2, 1.0*mm); 112 113 //SetIntegral(true); 113 114 //SetVerboseLevel(1); … … 151 152 const G4ParticleDefinition* theBaseParticle = 0; 152 153 G4String pname = part->GetParticleName(); 154 G4double q = part->GetPDGCharge(); 153 155 154 156 // standard base particles … … 163 165 else if(bpart == 0) { 164 166 165 if(part->GetPDGSpin() == 0.0) 166 if(part->GetPDGCharge() > 0.0 ) { 167 theBaseParticle = G4KaonPlus::KaonPlus(); 168 } else { 169 theBaseParticle = G4KaonMinus::KaonMinus(); 170 } 171 else if(part->GetPDGCharge() > 0.0) { 172 theBaseParticle = G4Proton::Proton(); 167 if(part->GetPDGSpin() == 0.0) { 168 if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); } 169 else { theBaseParticle = G4KaonMinus::KaonMinus(); } 173 170 } else { 174 theBaseParticle = G4AntiProton::AntiProton(); 171 if(q > 0.0) { theBaseParticle = G4Proton::Proton(); } 172 else { theBaseParticle = G4AntiProton::AntiProton(); } 175 173 } 174 176 175 // base particle defined by interface 177 176 } else { … … 183 182 mass = part->GetPDGMass(); 184 183 ratio = electron_mass_c2/mass; 185 186 if(mass < 900.*MeV) nuclearStopping = false; 187 188 if (!EmModel(1)) SetEmModel(new G4BraggModel(),1); 184 eth = 2.0*MeV*mass/proton_mass_c2; 185 186 if (!EmModel(1)) { 187 if(q > 0.0) { SetEmModel(new G4BraggModel(),1); } 188 else { SetEmModel(new G4ICRU73QOModel(),1); } 189 } 189 190 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 190 191 191 192 // model limit defined for protons 192 eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;193 //eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2; 193 194 EmModel(1)->SetHighEnergyLimit(eth); 194 195 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 195 196 196 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());197 198 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);197 if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); } 198 199 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } 199 200 EmModel(2)->SetLowEnergyLimit(eth); 200 201 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); … … 203 204 isInitialised = true; 204 205 } 205 EmModel(1)->ActivateNuclearStopping(nuclearStopping);206 EmModel(2)->ActivateNuclearStopping(nuclearStopping);207 206 } 208 207 … … 210 209 211 210 void G4hIonisation::PrintInfo() 212 { 213 if(EmModel(1) && EmModel(2)) { 214 G4cout << " NuclearStopping= " << nuclearStopping 215 << G4endl; 216 } 217 }218 219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 211 {} 212 213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 214 215 void G4hIonisation::ActivateNuclearStopping(G4bool) 216 {} 217 218 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4hMultipleScattering.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hMultipleScattering.cc,v 1.1 6 2009/11/01 13:05:01vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4hMultipleScattering.cc,v 1.18 2010/04/16 09:01:24 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 47 47 48 48 #include "G4hMultipleScattering.hh" 49 #include "G4UrbanMscModel.hh"50 49 #include "G4UrbanMscModel90.hh" 51 50 #include "G4MscStepLimitType.hh" … … 90 89 G4cout << " RangeFactor= " << RangeFactor() 91 90 << ", stepLimitType: " << StepLimitType() 92 << ", latDisplacement: " << LateralDisplasmentFlag() 93 << ", skin= " << Skin() 94 << ", geomFactor= " << GeomFactor() 95 << G4endl; 91 << ", latDisplacement: " << LateralDisplasmentFlag(); 92 if(StepLimitType() == fUseDistanceToBoundary) { 93 G4cout << ", skin= " << Skin() << ", geomFactor= " << GeomFactor(); 94 } 95 G4cout << G4endl; 96 96 } 97 97 -
trunk/source/processes/electromagnetic/standard/test/BremLPMTest.cc
r1199 r1315 25 25 // 26 26 // $Id: BremLPMTest.cc,v 1.2 2008/08/22 08:16:17 schaelic Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/standard/test/CrossSectionStd.cc
r1199 r1315 26 26 // 27 27 // $Id: CrossSectionStd.cc,v 1.5 2006/06/29 19:54:07 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/standard/test/CrossSectionV52.cc
r1199 r1315 26 26 // 27 27 // $Id: CrossSectionV52.cc,v 1.4 2006/06/29 19:54:09 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/standard/test/G4InitXscPAItest.cc
r1199 r1315 26 26 // 27 27 // $Id: G4InitXscPAItest.cc,v 1.6 2006/06/29 19:54:11 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/test/G4PAIdNdxTest.cc
r1199 r1315 26 26 // 27 27 // $Id: G4PAIdNdxTest.cc,v 1.8 2008/04/14 14:53:39 grichine Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/test/G4PAIxSectionTest.cc
r1199 r1315 25 25 // 26 26 // 27 // $Id: G4PAIxSectionTest.cc,v 1.1 5 2006/06/29 19:54:15 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: G4PAIxSectionTest.cc,v 1.16 2009/12/30 12:57:41 grichine Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 432 432 outFile <<k<<"\t"<< " Material : " <<(*theMaterialTable)[k]->GetName() << G4endl ; 433 433 } 434 G4String testName ;434 G4String testName = "Argon" ; 435 435 G4cout<<"Enter material name for test : "<<std::flush ; 436 436 // G4cin>>testName ; … … 448 448 449 449 450 for( k=0;k<numOfMaterials;k++)450 for( k = 0; k < numOfMaterials; k++ ) 451 451 { 452 //if((*theMaterialTable)[k]->GetName() != testName) continue ;452 if((*theMaterialTable)[k]->GetName() != testName) continue ; 453 453 outFile << "Material : " <<(*theMaterialTable)[k]->GetName() << G4endl ; 454 454 G4cout << "Material : " <<(*theMaterialTable)[k]->GetName() << G4endl ; … … 543 543 // G4PAIxSection testPAIproton(k,maxEnergyTransfer) ; 544 544 545 kineticEnergy = 10 .0*keV ; // 110*MeV ;545 kineticEnergy = 100.*MeV; // 10.0*keV ; // 110*MeV ; 546 546 547 547 // for(j=1;j<testPAIproton.GetNumberOfGammas();j++) -
trunk/source/processes/electromagnetic/standard/test/PAIenergyLossTest.cc
r1199 r1315 26 26 // 27 27 // $Id: PAIenergyLossTest.cc,v 1.8 2006/06/29 19:54:17 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/test/readBremLPM.py
r1199 r1315 1 1 # $Id: readBremLPM.py,v 1.2 2008/08/22 08:16:17 schaelic Exp $ 2 # GEANT4 tag $Name: geant4-09-0 3-cand-01 $2 # GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 3 3 # 4 4 # works together with BremLPMTest.cc -
trunk/source/processes/electromagnetic/standard/test/test90Ne10CO2pai.cc
r1199 r1315 25 25 // 26 26 // 27 // $Id: test90Ne10CO2pai.cc,v 1. 6 2008/12/18 13:01:40 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: test90Ne10CO2pai.cc,v 1.8 2009/12/30 12:57:41 grichine Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 38 38 // 11.04.08, V. Grichine test of PAI predictions for 90% Ne + 10% CO2 39 39 // ALICE TPC gas mixture 40 // 8.12.09 V. Grichine update for T2K gas mixture 40 41 41 42 #include "G4ios.hh" … … 150 151 int main() 151 152 { 152 std::ofstream outFile("90Ne10CO2pai.dat", std::ios::out ); 153 // std::ofstream outFile("90Ne10CO2pai.dat", std::ios::out ); 154 std::ofstream outFile("e5GeVt2kPhilippe.dat", std::ios::out ); 153 155 outFile.setf( std::ios::scientific, std::ios::floatfield ); 154 156 … … 174 176 175 177 178 a = 1.01*g/mole; 179 G4Isotope* ih1 = new G4Isotope("Hydrogen",iz=1,n=1,a); 180 181 a = 2.01*g/mole; 182 G4Isotope* ih2 = new G4Isotope("Deuterium",iz=1,n=2,a); 183 184 G4Element* elH = new G4Element(name="Hydrogen",symbol="H",2); 185 elH->AddIsotope(ih1,.999); 186 elH->AddIsotope(ih2,.001); 187 176 188 a = 12.01*g/mole; 177 189 G4Element* elC = new G4Element(name="Carbon",symbol="C", ez=6., a); … … 183 195 G4Element* elO = new G4Element(name="Oxygen",symbol="O", ez=8., a); 184 196 197 198 a = 19.00*g/mole; 199 G4Element* elF = new G4Element(name="Fluorine", symbol="F", z=9., a); 185 200 201 a = 39.948*g/mole; 202 G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a); 186 203 187 204 // Neon as detector gas, STP … … 232 249 density *= 0.966/1.01325; 233 250 234 G4cout<<"density of Ne857CO295N2T292 = "<<density*cm3/mg<<" mg/cm3"<<G4endl;251 // G4cout<<"density of Ne857CO295N2T292 = "<<density*cm3/mg<<" mg/cm3"<<G4endl; 235 252 236 253 G4Material* Ne857CO295N2T292 = new G4Material(name="Ne857CO295N2T292" , density, … … 241 258 242 259 260 261 // Ar as detector gas,STP 262 263 density = 1.7836*mg/cm3 ; // STP 264 G4Material* Argon = new G4Material(name="Argon" , density, ncomponents=1); 265 Argon->AddElement(elAr, 1); 266 /* 267 // iso-Butane (methylpropane), STP 268 269 density = 2.67*mg/cm3 ; 270 G4Material* isobutane = new G4Material(name="isoC4H10",density,nel=2) ; 271 isobutane->AddElement(elC,4) ; 272 isobutane->AddElement(elH,10) ; 273 274 // CF4 from ATLAS TRT estimation 275 276 G4double TRT_CF4_density = 3.9*mg/cm3; 277 G4Material* TRT_CF4 = new G4Material(name="TRT_CF4", TRT_CF4_density, nel=2, 278 kStateGas,293.15*kelvin,1.*atmosphere); 279 */ 280 281 // Philippe Gros T2K mixture version 282 // Argon 283 /* 284 density = 1.66*mg/cm3; 285 pressure = 1*atmosphere; 286 temperature = 288.15*kelvin; 287 G4Material* Argon = new G4Material(name="Ar", // z=18., a=39.948*g/mole, 288 density, ncomponents=1); // kStateGas,temperature,pressure); 289 Argon->AddElement(elAr, 1); 290 */ 291 292 // IsoButane 293 294 density = 2.51*mg/cm3; 295 G4Material* Isobu = new G4Material(name="isoC4H10", z=34.,a=58.123*g/mole, 296 density, kStateGas,temperature,pressure); 297 298 // Tetrafluoromethane 299 300 density = 3.72*mg/cm3; 301 G4Material* FlMet = new 302 G4Material(name="CF4",z=42.,a=88.01*g/mole,density,kStateGas,temperature,pressure); 303 304 // Argon + 3% tetrafluoromethane + 2% iso-butane 305 306 density = 1.748*mg/cm3; 307 G4Material* t2kGasMixture = new G4Material(name="t2kGasMixture", density, ncomponents=3); 308 t2kGasMixture->AddMaterial(Argon, fractionmass = 90.9*perCent); 309 t2kGasMixture->AddMaterial(FlMet, fractionmass = 6.3*perCent); 310 t2kGasMixture->AddMaterial(Isobu, fractionmass = 2.8*perCent); 311 312 243 313 G4int i, j, jMax, k, numOfMaterials, iSan, nbOfElements, sanIndex, row; 244 314 G4double maxEnergyTransfer, kineticEnergy; … … 261 331 262 332 // G4String testName = "N2"; 263 G4String testName = "Ne10CO2"; 333 // G4String testName = "Ne10CO2"; 334 G4String testName = "t2kGasMixture"; 335 // G4String testName = "Ar"; 336 // G4String testName = "Argon"; 264 337 // G4String testName = "Ne10CO2T293"; 265 338 // G4String testName = "Ne857CO295N2T292"; … … 372 445 373 446 374 kineticEnergy = 10.0*keV; // 100.*GeV; // 10.0*keV; // 110*MeV; // for proton 447 // kineticEnergy = 10.0*keV; // 100.*GeV; // 10.0*keV; // 110*MeV; // for proton 448 449 // kineticEnergy = 5*GeV; // for electrons 450 451 kineticEnergy = 5*GeV*proton_mass_c2/electron_mass_c2; 452 453 // kineticEnergy = 5*GeV; 375 454 376 455 // for(j=1;j<testPAIproton.GetNumberOfGammas();j++) 377 456 378 jMax = 70; // 70; 379 380 outFile<<jMax<<G4endl; 457 // jMax = 70; // 70; 458 jMax = 1; // 70; 459 460 // outFile<<jMax<<G4endl; 381 461 382 462 for( j = 0; j < jMax; j++ ) 383 463 { 384 464 tau = kineticEnergy/proton_mass_c2; 465 // tau = kineticEnergy/electron_mass_c2; 385 466 gamma = tau +1.0; 386 467 bg2 = tau*(tau + 2.0); 387 468 bg = std::sqrt(bg2); 388 469 beta2 = bg2/(gamma*gamma); 389 //G4cout<<"bg = "<<bg<<"; b2 = "<<beta2<<G4endl<<G4endl;470 G4cout<<"bg = "<<bg<<"; b2 = "<<beta2<<G4endl<<G4endl; 390 471 rateMass = electron_mass_c2/proton_mass_c2; 391 392 Tmax = 2.0*electron_mass_c2*bg2393 /(1.0+2.0*gamma*rateMass+rateMass*rateMass);472 473 Tmax = 2.0*electron_mass_c2*bg2/(1.0+2.0*gamma*rateMass+rateMass*rateMass); 474 // Tmax = 0.5*kineticEnergy; 394 475 395 476 Tkin = maxEnergyTransfer; … … 404 485 } 405 486 G4PAIxSection testPAIproton(k,Tkin,bg2); 406 487 /* 407 488 G4cout 408 489 // << kineticEnergy/keV<<"\t\t" … … 444 525 // <<testPAIproton.GetPAItable(1,j)*cm<<"\t\t"<<G4endl; 445 526 446 447 /*527 */ 528 448 529 outFile<<testPAIproton.GetSplineSize()-1<<G4endl; 449 530 … … 451 532 { 452 533 outFile 534 << testPAIproton.GetSplineEnergy(i)/keV << "\t" 535 // << testPAIproton.GetIntegralCerenkov(i)*cm << "\t" 536 // << testPAIproton.GetIntegralMM(i)*cm << "\t" 537 // << testPAIproton.GetIntegralPlasmon(i)*cm << "\t" 538 // << testPAIproton.GetIntegralResonance(i)*cm << "\t" 539 << testPAIproton.GetIntegralPAIxSection(i)*cm << "\t" 540 << G4endl; 541 542 G4cout 453 543 << testPAIproton.GetSplineEnergy(i)/keV << "\t" 454 544 << testPAIproton.GetIntegralCerenkov(i)*cm << "\t" … … 458 548 << testPAIproton.GetIntegralPAIxSection(i)*cm << "\t" 459 549 << G4endl; 550 460 551 } 461 552 462 */553 463 554 464 555 -
trunk/source/processes/electromagnetic/utils/History
r1228 r1315 1 $Id: History,v 1.4 00 2009/11/22 19:48:30vnivanch Exp $1 $Id: History,v 1.424 2010/06/04 15:36:39 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 4 June 10: V.Ivant (emutils-V09-03-16) 21 Previous tag was set from wrong directory 22 23 4 June 10: V.Ivant (emutils-V09-03-15) 24 G4EmConfigurator - fixed case of more than one model is added per a process 25 26 4 June 10: V.Ivant (emutils-V09-03-14) 27 G4EmCorrections - moved G4AtomicShell header into source 28 29 26 May 10: V.Ivant (emutils-V09-03-13) 30 G4VEmModel - added method ChargeSquareRatio to access current charge of an ion 31 G4VEnergyLossProcess - use this new method 32 33 10 May 10: V.Ivant (emutils-V09-03-12) 34 G4VEmProcess - cleanup printout at initialisation for scattering process 35 36 28 April 10: V.Ivant (emutils-V09-03-11) 37 G4VEmProcess, G4VEnergyLossProcess, G4VEmModel - provided GetCurrentElement method 38 (addressed bug report #1115 and HyperNews request) 39 40 27 April 10: V.Ivant (emutils-V09-03-10) 41 G4LossTableManager - added class member and a method GetNumberOfBinsPerDecade 42 G4VEmModel - use GetNumberOfBinsPerDecade and spline flag to initialise 43 G4EmElementSelector (addressed bug report #1115) 44 G4EmElementSelector - use spline flag to construct vectors probabilities 45 G4EmProcessOptions - removed double implementation of initialisation code, 46 which already exist in G4LossTableManager 47 G4VEnergyLossProcess - call CorrectionsAlongStep only for ions (minor CPU saving) 48 49 23 April 10: V.Ivant (emutils-V09-03-09) 50 G4VEnergyLossProcess - removed unused variable 51 52 12 April 10: V.Ivant (emutils-V09-03-08) 53 G4EmModelManager - do not use min energy cut defined by models allowing 54 decreasing of cuts in limit to zero 55 G4EmCalculator - fixed GetCrossSection method 56 57 12 April 10: V.Ivant (emutils-V09-03-07) 58 G4LossTableManager - added methods PreparePhsyicsTables, BuildPhysicsTables, 59 and changed initialisation of models via G4EmConfigurator 60 G4VEnergyLossProcess, G4VEmProcess, G4VMultipleScattering - added 61 calls of new G4LossTableManager methods 62 PreparePhsyicsTables, BuildPhysicsTables 63 G4EmConfigarator - upgraded and fixed old problem 64 65 06 April 10: V.Ivant (emutils-V09-03-06) 66 G4VEnergyLossProcess - use the same method to build cross section table 67 as DEDX table (use copy constructors to reduce 68 number of calls to std::exp) 69 G4EmModelManager - cleanup comments 70 71 22 March 10: V.Ivant (emutils-V09-03-05) 72 G4EmCorrections - added protection against large Barkas and Bloch 73 corrections in the case of large negatively charged 74 particle (100*e-) - fixed problem reported by ATLAS 75 G4EmCalculator - cleanup 76 77 10 March 10: V.Ivant (emutils-V09-03-04) 78 G4VEmModel, G4VEmProcess, G4VEnergyLossProcess, G4VMultipleScattering, 79 G4LossTableManager - reorder inline methods and add comments 80 81 05 March 10: V.Ivant (emutils-V09-03-03) 82 G4VMscModel, G4VMultipleScattering - set skin=1.0 as a default 83 84 24 February 10: V.Ivant (emutils-V09-03-02) 85 G4VEmProcess - move SetBuildTableFlag method from protected to public 86 87 17 February 10: V.Ivant (emutils-V09-03-01) 88 G4VEmProcess - fixed problem for ion processes by adding pointer to 89 currentParticle which may be different from GenericIon 90 91 22 January 10: V.Ivant (emutils-V09-03-00) 92 G4VEmProcess - added protection against negative cross section 93 G4VEnergyLossProcess - added protection against negative cross section; 94 - improved logic in RetrieveTable method 19 95 20 96 23 November 09: V.Ivant (emutils-V09-02-24) -
trunk/source/processes/electromagnetic/utils/include/G4EmCalculator.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmCalculator.hh,v 1. 19 2009/11/11 23:59:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmCalculator.hh,v 1.20 2010/04/13 10:58:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // … … 249 249 const G4Material* currentMaterial; 250 250 const G4ParticleDefinition* currentParticle; 251 const G4ParticleDefinition* lambdaParticle; 251 252 const G4ParticleDefinition* baseParticle; 252 253 const G4PhysicsTable* currentLambda; … … 260 261 261 262 G4String currentName; 263 G4String lambdaName; 262 264 G4double currentCut; 263 265 G4double chargeSquare; -
trunk/source/processes/electromagnetic/utils/include/G4EmConfigurator.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmConfigurator.hh,v 1. 2 2008/11/21 12:30:29vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmConfigurator.hh,v 1.3 2010/04/12 11:44:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 58 58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 59 59 60 class G4VEnergyLossProcess; 61 class G4VEmProcess; 62 class G4VMultipleScattering; 63 60 64 class G4EmConfigurator 61 65 { 62 66 public: 63 67 64 G4EmConfigurator( );68 G4EmConfigurator(G4int verboseLevel = 1); 65 69 66 70 ~G4EmConfigurator(); 67 71 68 // Add EM model to the list of extra models potentially to be69 // declared for the G4Region and energy interval70 //71 void AddExtraEmModel(const G4String& particleName,72 G4VEmModel*, G4VEmFluctuationModel* fm = 0);73 74 // Declare EM model for particle type and process to75 // be active for the G4Region and energy interval76 // The model should be previously added to the configurator77 // or be "dummy"78 //79 void AddModelForRegion(const G4String& particleName,80 const G4String& processName,81 const G4String& modelName,82 const G4String& regionName = "",83 G4double emin = 0.0,84 G4double emax = DBL_MAX,85 const G4String& flucModelName = "");86 87 72 // Set EM model for particle type and process to 88 73 // be active for the G4Region and energy interval 74 // The model will be added to the list 89 75 // 90 76 void SetExtraEmModel(const G4String& particleName, … … 97 83 98 84 // Add all previously declared models to corresponding processes 85 // Can be called in ConstructPhysics 86 // 99 87 void AddModels(); 88 89 // These methods called by G4LossTableManager 90 // 91 void PrepareModels(const G4ParticleDefinition* aParticle, 92 G4VEnergyLossProcess* p); 93 94 void PrepareModels(const G4ParticleDefinition* aParticle, 95 G4VEmProcess* p); 96 97 void PrepareModels(const G4ParticleDefinition* aParticle, 98 G4VMultipleScattering* p); 99 100 void Clear(); 101 102 inline void SetVerbose(G4int value); 100 103 101 104 private: 102 105 103 void SetModelForRegion(const G4String& particleName, 106 G4Region* FindRegion(const G4String&); 107 108 void SetModelForRegion(G4VEmModel* model, 109 G4VEmFluctuationModel* fm, 110 G4Region* reg, 111 const G4String& particleName, 104 112 const G4String& processName, 105 const G4String& modelName,106 const G4String& regionName,107 const G4String& flucModelName,108 113 G4double emin, 109 114 G4double emax); 115 116 G4bool UpdateModelEnergyRange(G4VEmModel* mod, 117 G4double emin, G4double emax); 110 118 111 119 // hide assignment operator … … 113 121 G4EmConfigurator(const G4EmConfigurator&); 114 122 123 std::vector<G4VEmModel*> models; 124 std::vector<G4VEmFluctuationModel*> flucModels; 115 125 std::vector<G4String> particles; 116 126 std::vector<G4String> processes; 117 std::vector<G4String> models;118 127 std::vector<G4String> regions; 119 std::vector<G4String> flucModels;120 128 std::vector<G4double> lowEnergy; 121 129 std::vector<G4double> highEnergy; 122 130 123 std::vector<G4String> particleList;124 std::vector<G4VEmModel*> modelList;125 std::vector<G4VEmFluctuationModel*> flucModelList;126 127 131 G4int index; 132 G4int verbose; 128 133 }; 129 134 130 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 137 inline void G4EmConfigurator::SetVerbose(G4int value) 138 { 139 verbose = value; 140 } 131 141 132 142 #endif -
trunk/source/processes/electromagnetic/utils/include/G4EmCorrections.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmCorrections.hh,v 1.2 4 2008/09/12 14:44:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmCorrections.hh,v 1.25 2010/06/04 09:28:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 56 56 57 57 #include "globals.hh" 58 #include "G4AtomicShells.hh"59 58 #include "G4ionEffectiveCharge.hh" 60 59 #include "G4Material.hh" … … 263 262 G4int nbinCorr; 264 263 265 G4AtomicShells shells;266 264 G4ionEffectiveCharge effCharge; 267 265 … … 356 354 tmax = 2.0*electron_mass_c2*bg2 /(1. + 2.0*gamma*ratio + ratio*ratio); 357 355 charge = p->GetPDGCharge()/eplus; 358 if(charge < 1.5) {q2 = charge*charge;} 359 else { 360 q2 = effCharge.EffectiveChargeSquareRatio(p,mat,kinEnergy); 361 charge = std::sqrt(q2); 362 } 356 //if(charge < 1.5) {q2 = charge*charge;} 357 //else { 358 // q2 = effCharge.EffectiveChargeSquareRatio(p,mat,kinEnergy); 359 // charge = std::sqrt(q2); 360 //} 361 if(charge > 1.5) { charge = effCharge.EffectiveCharge(p,mat,kinEnergy); } 362 q2 = charge*charge; 363 363 } 364 364 if(mat != material) { -
trunk/source/processes/electromagnetic/utils/include/G4LossTableManager.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LossTableManager.hh,v 1.5 5 2009/10/29 19:25:28vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4LossTableManager.hh,v 1.58 2010/04/27 16:59:52 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // … … 61 61 // 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko) 62 62 // 18-06-07 Move definition of msc parameters to G4EmProcessOptions (V.Ivanchenko) 63 // 12-04-10 Added PreparePhsyicsTables and BuildPhysicsTables entries (V.Ivanchenko) 63 64 // 64 65 // Class Description: … … 93 94 class G4EmConfigurator; 94 95 class G4LossTableBuilder; 96 class G4Region; 95 97 96 98 class G4LossTableManager … … 103 105 ~G4LossTableManager(); 104 106 107 //------------------------------------------------- 108 // called from destructor 109 //------------------------------------------------- 110 105 111 void Clear(); 106 112 107 // get the DEDX or the range for a given particle/energy/material 113 //------------------------------------------------- 114 // initialisation before a new run 115 //------------------------------------------------- 116 117 void PreparePhysicsTable(const G4ParticleDefinition* aParticle, 118 G4VEnergyLossProcess* p); 119 void PreparePhysicsTable(const G4ParticleDefinition* aParticle, 120 G4VEmProcess* p); 121 void PreparePhysicsTable(const G4ParticleDefinition* aParticle, 122 G4VMultipleScattering* p); 123 void BuildPhysicsTable(const G4ParticleDefinition* aParticle); 124 void BuildPhysicsTable(const G4ParticleDefinition* aParticle, 125 G4VEnergyLossProcess* p); 126 127 //------------------------------------------------- 128 // Run time access to DEDX, range, energy for a given particle, 129 // energy, and G4MaterialCutsCouple 130 //------------------------------------------------- 131 108 132 inline G4double GetDEDX( 109 133 const G4ParticleDefinition *aParticle, … … 141 165 G4double& length); 142 166 143 // to be called only by energy loss processes 167 //------------------------------------------------- 168 // Methods to be called only at initialisation 169 //------------------------------------------------- 170 144 171 void Register(G4VEnergyLossProcess* p); 145 172 … … 162 189 void DeRegister(G4VEmFluctuationModel* p); 163 190 164 void EnergyLossProcessIsInitialised(const G4ParticleDefinition* aParticle,165 G4VEnergyLossProcess* p);166 167 191 void RegisterIon(const G4ParticleDefinition* aParticle, 168 192 G4VEnergyLossProcess* p); … … 171 195 G4VEnergyLossProcess* p); 172 196 173 void BuildPhysicsTable(const G4ParticleDefinition* aParticle,174 G4VEnergyLossProcess* p);175 176 197 void SetLossFluctuations(G4bool val); 177 198 178 void SetSubCutoff(G4bool val );199 void SetSubCutoff(G4bool val, const G4Region* r=0); 179 200 180 201 void SetIntegral(G4bool val); … … 198 219 void SetLambdaBinning(G4int val); 199 220 221 G4int GetNumberOfBinsPerDecade() const; 222 200 223 void SetStepFunction(G4double v1, G4double v2); 201 224 … … 214 237 void SetVerbose(G4int val); 215 238 239 //------------------------------------------------- 240 // Access methods 241 //------------------------------------------------- 242 216 243 G4EnergyLossMessenger* GetMessenger(); 217 244 … … 241 268 242 269 private: 270 271 //------------------------------------------------- 272 // Private methods and members 273 //------------------------------------------------- 243 274 244 275 G4LossTableManager(); … … 251 282 void ParticleHaveNoLoss(const G4ParticleDefinition* aParticle); 252 283 253 void SetParameters(G4VEnergyLossProcess*); 284 void SetParameters(const G4ParticleDefinition* aParticle, 285 G4VEnergyLossProcess*); 254 286 255 287 void CopyDEDXTables(); 256 288 257 private:258 259 289 static G4LossTableManager* theInstance; 260 290 261 291 typedef const G4ParticleDefinition* PD; 292 262 293 std::map<PD,G4VEnergyLossProcess*,std::less<PD> > loss_map; 263 294 … … 279 310 PD currentParticle; 280 311 PD theElectron; 312 PD firstParticle; 281 313 282 314 G4int n_loss; … … 284 316 285 317 G4bool all_tables_are_built; 286 // G4bool first_entry; 318 G4bool startInitialisation; 319 287 320 G4bool lossFluctuationFlag; 288 321 G4bool subCutoffFlag; … … 290 323 G4bool integral; 291 324 G4bool integralActive; 292 G4bool all_tables_are_stored;293 325 G4bool buildCSDARange; 294 326 G4bool minEnergyActive; … … 314 346 G4EmConfigurator* emConfigurator; 315 347 316 const G4ParticleDefinition* firstParticle; 348 G4int nbinsLambda; 349 G4int nbinsPerDecade; 317 350 G4int verbose; 318 351 … … 322 355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 323 356 357 inline G4VEnergyLossProcess* G4LossTableManager::GetEnergyLossProcess( 358 const G4ParticleDefinition *aParticle) 359 { 360 if(aParticle != currentParticle) { 361 currentParticle = aParticle; 362 std::map<PD,G4VEnergyLossProcess*,std::less<PD> >::const_iterator pos; 363 if ((pos = loss_map.find(aParticle)) != loss_map.end()) { 364 currentLoss = (*pos).second; 365 } else { 366 currentLoss = 0; 367 // ParticleHaveNoLoss(aParticle); 368 } 369 } 370 return currentLoss; 371 } 372 373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 374 324 375 inline G4double G4LossTableManager::GetDEDX( 325 376 const G4ParticleDefinition *aParticle, … … 327 378 const G4MaterialCutsCouple *couple) 328 379 { 329 if(aParticle != currentParticle) GetEnergyLossProcess(aParticle);380 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 330 381 G4double x; 331 if(currentLoss) x = currentLoss->GetDEDX(kineticEnergy, couple);332 else x = G4EnergyLossTables::GetDEDX(333 currentParticle,kineticEnergy,couple,false); 382 if(currentLoss) { x = currentLoss->GetDEDX(kineticEnergy, couple); } 383 else { x = G4EnergyLossTables::GetDEDX(currentParticle, 384 kineticEnergy,couple,false); } 334 385 return x; 335 386 } … … 342 393 const G4MaterialCutsCouple *couple) 343 394 { 344 if(aParticle != currentParticle) GetEnergyLossProcess(aParticle);395 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 345 396 G4double x = 0.0; 346 if(currentLoss) x = currentLoss->GetDEDXForSubsec(kineticEnergy, couple);397 if(currentLoss) { x = currentLoss->GetDEDXForSubsec(kineticEnergy, couple); } 347 398 return x; 348 399 } … … 355 406 const G4MaterialCutsCouple *couple) 356 407 { 357 if(aParticle != currentParticle) GetEnergyLossProcess(aParticle);408 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 358 409 G4double x = DBL_MAX; 359 if(currentLoss) x = currentLoss->GetCSDARange(kineticEnergy, couple);410 if(currentLoss) { x = currentLoss->GetCSDARange(kineticEnergy, couple); } 360 411 return x; 361 412 } … … 368 419 const G4MaterialCutsCouple *couple) 369 420 { 370 if(aParticle != currentParticle) GetEnergyLossProcess(aParticle);421 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 371 422 G4double x; 372 if(currentLoss) x = currentLoss->GetRangeForLoss(kineticEnergy, couple);373 else 374 x = G4EnergyLossTables::GetRange(currentParticle,kineticEnergy,couple,false); 423 if(currentLoss) { x = currentLoss->GetRangeForLoss(kineticEnergy, couple); } 424 else { x = G4EnergyLossTables::GetRange(currentParticle,kineticEnergy, 425 couple,false); } 375 426 return x; 376 427 } … … 383 434 const G4MaterialCutsCouple *couple) 384 435 { 385 if(aParticle != currentParticle) GetEnergyLossProcess(aParticle);436 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 386 437 G4double x; 387 if(currentLoss) x = currentLoss->GetRange(kineticEnergy, couple);388 else 389 x = G4EnergyLossTables::GetRange(currentParticle,kineticEnergy,couple,false); 438 if(currentLoss) { x = currentLoss->GetRange(kineticEnergy, couple); } 439 else { x = G4EnergyLossTables::GetRange(currentParticle,kineticEnergy, 440 couple,false); } 390 441 return x; 391 442 } … … 398 449 const G4MaterialCutsCouple *couple) 399 450 { 400 if(aParticle != currentParticle) GetEnergyLossProcess(aParticle);451 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 401 452 G4double x; 402 if(currentLoss) x = currentLoss->GetKineticEnergy(range, couple);403 else x = G4EnergyLossTables::GetPreciseEnergyFromRange(404 currentParticle,range,couple,false); 453 if(currentLoss) { x = currentLoss->GetKineticEnergy(range, couple); } 454 else { x = G4EnergyLossTables::GetPreciseEnergyFromRange(currentParticle,range, 455 couple,false); } 405 456 return x; 406 457 } … … 428 479 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 429 480 430 inline G4VEnergyLossProcess* G4LossTableManager::GetEnergyLossProcess(431 const G4ParticleDefinition *aParticle)432 {433 if(aParticle != currentParticle) {434 currentParticle = aParticle;435 std::map<PD,G4VEnergyLossProcess*,std::less<PD> >::const_iterator pos;436 if ((pos = loss_map.find(aParticle)) != loss_map.end()) {437 currentLoss = (*pos).second;438 } else {439 currentLoss = 0;440 // ParticleHaveNoLoss(aParticle);441 }442 }443 return currentLoss;444 }445 446 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......447 448 481 #endif 449 482 -
trunk/source/processes/electromagnetic/utils/include/G4VAtomDeexcitation.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VAtomDeexcitation.hh,v 1. 1 2009/07/09 11:42:52vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VAtomDeexcitation.hh,v 1.3 2010/03/30 09:19:56 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 63 63 virtual ~G4VAtomDeexcitation(); 64 64 65 //initialization 65 //========== initialization ========== 66 66 67 virtual void PreparePhysicsTable(const G4ParticleDefinition&); 67 68 virtual void BuildPhysicsTable(const G4ParticleDefinition&); 68 69 // Get atomic shell by shell index, used by discrete processes70 // (for example, photoelectric), when shell vacancy sampled by the model71 virtual const G4AtomicChell* GetAtomicShell(G4int Z, G4int ShellIndex);72 73 // selection of random shell for ionisation process74 virtual const G4AtomicShell* SelectRandomShell(const G4DynamicParticle*,75 G4int Z);76 77 // generation of deexcitation for given atom and shell vacancy78 virtual void GenerateParticles(std::vector<G4DynamicParticle*>*,79 const G4AtomicChell*, G4int Z);80 81 // access or compute PIXE cross section82 virtual G4double GetPIXECrossSection (const G4ParticleDefinition*,83 G4int Z, G4double kinE);84 85 // calculate PIXE cross section from the models86 virtual G4double CalculatePIXECrossSection(const G4ParticleDefinition*,87 G4int Z, G4double kinE);88 89 // Sampling of PIXE for ionisation processes90 virtual void91 AlongStepDeexcitation(std::vector<G4DynamicParticle*>* secVect,92 const G4DynamicParticle* icidentParticle,93 const G4MaterialCutsCouple*,94 G4double trueStepLenght,95 G4double eLoss);96 97 // Check if deexcitation is active for a given geometry volume98 G4bool CheckActiveRegion(G4int coupleIndex);99 100 // Access flags defined in the CheckActiveVolume method101 inline G4bool IsFluorescenceActive() const;102 inline G4bool IsPIXECrossSectionActive() const;103 69 104 70 // PIXE model name … … 115 81 void SetPIXECrossSectionActiveRegion(const G4String& rname = ""); 116 82 83 //========== Run time methods ========== 84 85 // Check if deexcitation is active for a given geometry volume 86 G4bool CheckFluorescenceActiveRegion(G4int coupleIndex); 87 88 // Check if deexcitation is active for a given geometry volume 89 G4bool CheckPIXEActiveRegion(G4int coupleIndex); 90 91 // Get atomic shell by shell index, used by discrete processes 92 // (for example, photoelectric), when shell vacancy sampled by the model 93 const G4AtomicShell* GetAtomicShell(G4int Z, G4int ShellIndex); 94 95 // selection of random shell for ionisation process 96 virtual const G4AtomicShell* SelectRandomShell(const G4DynamicParticle*, 97 G4int Z); 98 99 // generation of deexcitation for given atom and shell vacancy 100 virtual void GenerateParticles(std::vector<G4DynamicParticle*>*, 101 const G4AtomicShell*, G4int Z) = 0; 102 103 // access or compute PIXE cross section 104 virtual G4double GetPIXECrossSection (const G4ParticleDefinition*, 105 G4int Z, G4double kinE) = 0; 106 107 // calculate PIXE cross section from the models 108 virtual G4double CalculatePIXECrossSection(const G4ParticleDefinition*, 109 G4int Z, G4double kinE) = 0; 110 111 // Sampling of PIXE for ionisation processes 112 virtual void 113 AlongStepDeexcitation(std::vector<G4DynamicParticle*>* secVect, 114 const G4DynamicParticle* icidentParticle, 115 const G4MaterialCutsCouple*, 116 G4double trueStepLenght, 117 G4double eLoss) = 0; 118 119 120 117 121 private: 118 122 … … 122 126 123 127 G4String namePIXE; 124 G4bool isFluoActive;125 G4bool isPIXEActive;126 128 127 129 }; 128 129 inline G4bool IsFluorescenceActive() const130 {131 return isFluoActive;132 }133 134 inline G4bool IsPIXECrossSectionActive() const135 {136 return isPIXEActive;137 }138 130 139 131 inline -
trunk/source/processes/electromagnetic/utils/include/G4VEmModel.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmModel.hh,v 1.7 2 2009/09/23 14:42:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VEmModel.hh,v 1.75 2010/05/26 10:41:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 150 150 151 151 // Compute effective ion charge square 152 virtual G4double ChargeSquareRatio(const G4Track&); 153 154 // Compute effective ion charge square 152 155 virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*, 153 156 const G4Material*, … … 228 231 G4double maxEnergy = DBL_MAX); 229 232 233 // select isotope in order to have precise mass of the nucleus 234 inline G4int SelectIsotopeNumber(const G4Element*); 235 230 236 // atom can be selected effitiantly if element selectors are initialised 231 237 inline const G4Element* SelectRandomAtom(const G4MaterialCutsCouple*, … … 236 242 237 243 // to select atom cross section per volume is recomputed for each element 238 inline const G4Element* SelectRandomAtom(const G4Material*, 239 const G4ParticleDefinition*, 240 G4double kineticEnergy, 241 G4double cutEnergy = 0.0, 242 G4double maxEnergy = DBL_MAX); 243 244 // select isotope in order to have precise mass of the nucleus 245 inline G4int SelectIsotopeNumber(const G4Element*); 244 const G4Element* SelectRandomAtom(const G4Material*, 245 const G4ParticleDefinition*, 246 G4double kineticEnergy, 247 G4double cutEnergy = 0.0, 248 G4double maxEnergy = DBL_MAX); 246 249 247 250 //------------------------------------------------------------------------ … … 291 294 inline void SetCurrentCouple(const G4MaterialCutsCouple*); 292 295 296 inline const G4Element* GetCurrentElement() const; 297 293 298 protected: 294 299 … … 296 301 297 302 inline void SetCurrentElement(const G4Element*); 298 299 inline const G4Element* GetCurrentElement() const;300 303 301 304 private: … … 341 344 }; 342 345 343 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 346 // ======== Run time inline methods ================ 347 348 inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* p) 349 { 350 currentCouple = p; 351 } 352 353 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 354 355 inline const G4MaterialCutsCouple* G4VEmModel::CurrentCouple() const 356 { 357 return currentCouple; 358 } 359 360 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 361 362 inline void G4VEmModel::SetCurrentElement(const G4Element* elm) 363 { 364 currentElement = elm; 365 } 366 367 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 368 369 inline const G4Element* G4VEmModel::GetCurrentElement() const 370 { 371 return currentElement; 372 } 373 374 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 375 376 inline 377 G4double G4VEmModel::MaxSecondaryKinEnergy(const G4DynamicParticle* dynPart) 378 { 379 return MaxSecondaryEnergy(dynPart->GetDefinition(), 380 dynPart->GetKineticEnergy()); 381 } 382 344 383 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 345 384 … … 375 414 G4double mfp = DBL_MAX; 376 415 G4double cross = CrossSectionPerVolume(material,p,ekin,emin,emax); 377 if (cross > DBL_MIN) mfp = 1./cross;416 if (cross > DBL_MIN) { mfp = 1./cross; } 378 417 return mfp; 379 418 } … … 415 454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 416 455 417 inline418 const G4Element* G4VEmModel::SelectRandomAtom(const G4Material* material,419 const G4ParticleDefinition* pd,420 G4double kinEnergy,421 G4double tcut,422 G4double tmax)423 {424 const G4ElementVector* theElementVector = material->GetElementVector();425 G4int n = material->GetNumberOfElements() - 1;426 currentElement = (*theElementVector)[n];427 if (n > 0) {428 G4double x = G4UniformRand()*429 G4VEmModel::CrossSectionPerVolume(material,pd,kinEnergy,tcut,tmax);430 for(G4int i=0; i<n; i++) {431 if (x <= xsec[i]) {432 currentElement = (*theElementVector)[i];433 break;434 }435 }436 }437 return currentElement;438 }439 440 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......441 442 456 inline G4int G4VEmModel::SelectIsotopeNumber(const G4Element* elm) 443 457 { … … 450 464 G4double* ab = elm->GetRelativeAbundanceVector(); 451 465 G4double x = G4UniformRand(); 452 for(; idx<ni; idx++) {466 for(; idx<ni; ++idx) { 453 467 x -= ab[idx]; 454 if (x <= 0.0) break;468 if (x <= 0.0) { break; } 455 469 } 456 if(idx >= ni) idx = ni - 1;470 if(idx >= ni) { idx = ni - 1; } 457 471 } 458 472 N = elm->GetIsotope(idx)->GetN(); … … 461 475 } 462 476 463 // ....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......477 // ======== Get/Set inline methods used at initialisation ================ 464 478 465 479 inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations() … … 578 592 { 579 593 nuclearStopping = val; 580 }581 582 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......583 584 inline585 G4double G4VEmModel::MaxSecondaryKinEnergy(const G4DynamicParticle* dynPart)586 {587 return MaxSecondaryEnergy(dynPart->GetDefinition(),588 dynPart->GetKineticEnergy());589 594 } 590 595 … … 601 606 G4VEmFluctuationModel* f = 0) 602 607 { 603 if(p && pParticleChange != p) pParticleChange = p;608 if(p && pParticleChange != p) { pParticleChange = p; } 604 609 fluc = f; 605 610 } … … 607 612 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 608 613 609 inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* p)610 {611 currentCouple = p;612 }613 614 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......615 616 inline const G4MaterialCutsCouple* G4VEmModel::CurrentCouple() const617 {618 return currentCouple;619 }620 621 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......622 623 inline void G4VEmModel::SetCurrentElement(const G4Element* elm)624 {625 currentElement = elm;626 }627 628 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......629 630 inline const G4Element* G4VEmModel::GetCurrentElement() const631 {632 return currentElement;633 }634 635 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......636 637 614 #endif 638 615 -
trunk/source/processes/electromagnetic/utils/include/G4VEmProcess.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmProcess.hh,v 1. 55 2009/09/23 14:42:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VEmProcess.hh,v 1.60 2010/04/28 14:43:13 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 56 56 // 27-10-07 Virtual functions moved to source (V.Ivanchenko) 57 57 // 15-07-08 Reorder class members for further multi-thread development (VI) 58 // 17-02-10 Added pointer currentParticle (VI) 58 59 // 59 60 // Class Description: … … 158 159 159 160 // It returns the cross section of the process per atom 160 inlineG4double ComputeCrossSectionPerAtom(G4double kineticEnergy,161 G4double Z, G4double A=0.,162 G4double cut=0.0);163 164 inlineG4double MeanFreePath(const G4Track& track);161 G4double ComputeCrossSectionPerAtom(G4double kineticEnergy, 162 G4double Z, G4double A=0., 163 G4double cut=0.0); 164 165 G4double MeanFreePath(const G4Track& track); 165 166 166 167 // It returns cross section per volume … … 225 226 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false); 226 227 228 // access atom on which interaction happens 229 const G4Element* GetCurrentElement() const; 230 227 231 inline void SetLambdaFactor(G4double val); 228 232 … … 231 235 232 236 inline void SetApplyCuts(G4bool val); 237 238 inline void SetBuildTableFlag(G4bool val); 233 239 234 240 //------------------------------------------------------------------------ … … 245 251 246 252 inline G4double RecalculateLambda(G4double kinEnergy, 247 const G4MaterialCutsCouple* couple);253 const G4MaterialCutsCouple* couple); 248 254 249 255 inline G4ParticleChangeForGamma* GetParticleChange(); … … 258 264 259 265 inline G4double GetElectronEnergyCut(); 260 261 inline void SetBuildTableFlag(G4bool val);262 266 263 267 inline void SetStartFromNullFlag(G4bool val); … … 340 344 341 345 const G4ParticleDefinition* particle; 346 const G4ParticleDefinition* currentParticle; 342 347 343 348 // cash … … 352 357 }; 353 358 354 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 356 357 inline G4double G4VEmProcess::ComputeCrossSectionPerAtom( 358 G4double kineticEnergy, G4double Z, G4double A, G4double cut) 359 { 360 SelectModel(kineticEnergy, currentCoupleIndex); 361 G4double x = 0.0; 362 if(currentModel) { 363 x = currentModel->ComputeCrossSectionPerAtom(particle,kineticEnergy, 364 Z,A,cut); 365 } 366 return x; 367 } 368 369 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 370 371 inline G4double G4VEmProcess::MeanFreePath(const G4Track& track) 372 { 373 DefineMaterial(track.GetMaterialCutsCouple()); 374 preStepLambda = GetCurrentLambda(track.GetKineticEnergy()); 375 G4double x = DBL_MAX; 376 if(DBL_MIN < preStepLambda) x = 1.0/preStepLambda; 377 return x; 378 } 379 380 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 381 382 inline G4double G4VEmProcess::GetLambda(G4double& kineticEnergy, 383 const G4MaterialCutsCouple* couple) 384 { 385 DefineMaterial(couple); 386 return GetCurrentLambda(kineticEnergy); 387 } 388 389 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 390 391 inline void G4VEmProcess::SetLambdaBinning(G4int nbins) 392 { 393 nLambdaBins = nbins; 394 } 395 396 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 397 398 inline G4int G4VEmProcess::LambdaBinning() const 399 { 400 return nLambdaBins; 401 } 402 403 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 404 405 inline void G4VEmProcess::SetMinKinEnergy(G4double e) 406 { 407 minKinEnergy = e; 408 } 409 410 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 411 412 inline G4double G4VEmProcess::MinKinEnergy() const 413 { 414 return minKinEnergy; 415 } 416 417 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 418 419 inline void G4VEmProcess::SetMaxKinEnergy(G4double e) 420 { 421 maxKinEnergy = e; 422 } 423 424 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 425 426 inline G4double G4VEmProcess::MaxKinEnergy() const 427 { 428 return maxKinEnergy; 429 } 430 431 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 432 433 inline void G4VEmProcess::SetPolarAngleLimit(G4double val) 434 { 435 if(val < 0.0) polarAngleLimit = 0.0; 436 else if(val > pi) polarAngleLimit = pi; 437 else polarAngleLimit = val; 438 } 439 440 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 441 442 inline G4double G4VEmProcess::PolarAngleLimit() const 443 { 444 return polarAngleLimit; 445 } 446 447 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 448 449 inline const G4PhysicsTable* G4VEmProcess::LambdaTable() const 450 { 451 return theLambdaTable; 452 } 453 454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 455 456 inline const G4ParticleDefinition* G4VEmProcess::Particle() const 457 { 458 return particle; 459 } 460 461 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 462 463 inline const G4ParticleDefinition* G4VEmProcess::SecondaryParticle() const 464 { 465 return secondaryParticle; 466 } 467 468 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 469 470 inline 471 G4VEmModel* G4VEmProcess::SelectModel(G4double& kinEnergy, size_t index) 472 { 473 currentModel = modelManager->SelectModel(kinEnergy, index); 474 currentModel->SetCurrentCouple(currentCouple); 475 return currentModel; 476 } 477 478 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 479 480 inline 481 G4VEmModel* G4VEmProcess::SelectModelForMaterial(G4double kinEnergy, 482 size_t& idxRegion) const 483 { 484 return modelManager->SelectModel(kinEnergy, idxRegion); 485 } 486 487 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 488 489 inline void G4VEmProcess::SetLambdaFactor(G4double val) 490 { 491 if(val > 0.0 && val <= 1.0) lambdaFactor = val; 492 } 493 494 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 495 496 inline void G4VEmProcess::SetIntegral(G4bool val) 497 { 498 if(particle && particle != theGamma) integral = val; 499 if(integral) buildLambdaTable = true; 500 } 501 502 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 503 504 inline G4bool G4VEmProcess::IsIntegral() const 505 { 506 return integral; 507 } 508 509 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 510 511 inline void G4VEmProcess::SetApplyCuts(G4bool val) 512 { 513 applyCuts = val; 514 } 515 516 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 517 518 inline G4double G4VEmProcess::RecalculateLambda(G4double e, 519 const G4MaterialCutsCouple* couple) 520 { 521 DefineMaterial(couple); 522 return ComputeCurrentLambda(e); 523 } 524 525 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 526 527 inline G4ParticleChangeForGamma* G4VEmProcess::GetParticleChange() 528 { 529 return &fParticleChange; 530 } 531 532 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 533 534 inline void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 535 { 536 particle = p; 537 } 538 539 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 540 541 inline void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 542 { 543 secondaryParticle = p; 544 } 545 546 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 359 // ======== Run time inline methods ================ 547 360 548 361 inline size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex() const … … 563 376 { 564 377 return (*theCutsElectron)[currentCoupleIndex]; 565 }566 567 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....568 569 inline void G4VEmProcess::SetBuildTableFlag(G4bool val)570 {571 buildLambdaTable = val;572 if(!val) integral = false;573 }574 575 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....576 577 inline void G4VEmProcess::SetStartFromNullFlag(G4bool val)578 {579 startFromNull = val;580 }581 582 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....583 584 inline void G4VEmProcess::InitialiseStep(const G4Track& track)585 {586 preStepKinEnergy = track.GetKineticEnergy();587 DefineMaterial(track.GetMaterialCutsCouple());588 SelectModel(preStepKinEnergy, currentCoupleIndex);589 if (theNumberOfInteractionLengthLeft < 0.0) mfpKinEnergy = DBL_MAX;590 378 } 591 379 … … 600 388 mfpKinEnergy = DBL_MAX; 601 389 } 390 } 391 392 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 393 394 inline 395 G4VEmModel* G4VEmProcess::SelectModel(G4double& kinEnergy, size_t index) 396 { 397 currentModel = modelManager->SelectModel(kinEnergy, index); 398 currentModel->SetCurrentCouple(currentCouple); 399 return currentModel; 400 } 401 402 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 403 404 inline 405 G4VEmModel* G4VEmProcess::SelectModelForMaterial(G4double kinEnergy, 406 size_t& idxRegion) const 407 { 408 return modelManager->SelectModel(kinEnergy, idxRegion); 409 } 410 411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 412 413 inline void G4VEmProcess::InitialiseStep(const G4Track& track) 414 { 415 currentParticle = track.GetDefinition(); 416 preStepKinEnergy = track.GetKineticEnergy(); 417 DefineMaterial(track.GetMaterialCutsCouple()); 418 SelectModel(preStepKinEnergy, currentCoupleIndex); 419 if (theNumberOfInteractionLengthLeft < 0.0) mfpKinEnergy = DBL_MAX; 420 } 421 422 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 423 424 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e) 425 { 426 return (((*theLambdaTable)[currentCoupleIndex])->Value(e)); 427 } 428 429 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 430 431 inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e) 432 { 433 SelectModel(e, currentCoupleIndex); 434 return currentModel->CrossSectionPerVolume(currentMaterial,currentParticle, 435 e,(*theCuts)[currentCoupleIndex]); 436 } 437 438 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 439 440 inline G4double G4VEmProcess::GetCurrentLambda(G4double e) 441 { 442 G4double x = 0.0; 443 if(theLambdaTable) { x = GetLambdaFromTable(e); } 444 else { x = ComputeCurrentLambda(e); } 445 return x; 446 } 447 448 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 449 450 inline G4double G4VEmProcess::GetLambda(G4double& kineticEnergy, 451 const G4MaterialCutsCouple* couple) 452 { 453 DefineMaterial(couple); 454 return GetCurrentLambda(kineticEnergy); 455 } 456 457 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 458 459 inline G4double G4VEmProcess::RecalculateLambda(G4double e, 460 const G4MaterialCutsCouple* couple) 461 { 462 DefineMaterial(couple); 463 return ComputeCurrentLambda(e); 602 464 } 603 465 … … 625 487 } 626 488 627 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 628 629 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e) 630 { 631 return (((*theLambdaTable)[currentCoupleIndex])->Value(e)); 632 } 633 634 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 635 636 inline G4double G4VEmProcess::GetCurrentLambda(G4double e) 637 { 638 G4double x = 0.0; 639 if(theLambdaTable) { x = GetLambdaFromTable(e); } 640 else { x = ComputeCurrentLambda(e); } 641 return x; 642 } 643 644 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 645 646 inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e) 647 { 648 SelectModel(e, currentCoupleIndex); 649 return currentModel->CrossSectionPerVolume(currentMaterial,particle, 650 e,(*theCuts)[currentCoupleIndex]); 489 // ======== Get/Set inline methods used at initialisation ================ 490 491 inline void G4VEmProcess::SetLambdaBinning(G4int nbins) 492 { 493 nLambdaBins = nbins; 494 } 495 496 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 497 498 inline G4int G4VEmProcess::LambdaBinning() const 499 { 500 return nLambdaBins; 501 } 502 503 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 504 505 inline void G4VEmProcess::SetMinKinEnergy(G4double e) 506 { 507 minKinEnergy = e; 508 } 509 510 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 511 512 inline G4double G4VEmProcess::MinKinEnergy() const 513 { 514 return minKinEnergy; 515 } 516 517 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 518 519 inline void G4VEmProcess::SetMaxKinEnergy(G4double e) 520 { 521 maxKinEnergy = e; 522 } 523 524 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 525 526 inline G4double G4VEmProcess::MaxKinEnergy() const 527 { 528 return maxKinEnergy; 529 } 530 531 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 532 533 inline void G4VEmProcess::SetPolarAngleLimit(G4double val) 534 { 535 if(val < 0.0) polarAngleLimit = 0.0; 536 else if(val > pi) polarAngleLimit = pi; 537 else polarAngleLimit = val; 538 } 539 540 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 541 542 inline G4double G4VEmProcess::PolarAngleLimit() const 543 { 544 return polarAngleLimit; 545 } 546 547 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 548 549 inline const G4PhysicsTable* G4VEmProcess::LambdaTable() const 550 { 551 return theLambdaTable; 552 } 553 554 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 555 556 inline const G4ParticleDefinition* G4VEmProcess::Particle() const 557 { 558 return particle; 559 } 560 561 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 562 563 inline const G4ParticleDefinition* G4VEmProcess::SecondaryParticle() const 564 { 565 return secondaryParticle; 566 } 567 568 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 569 570 inline void G4VEmProcess::SetLambdaFactor(G4double val) 571 { 572 if(val > 0.0 && val <= 1.0) { lambdaFactor = val; } 573 } 574 575 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 576 577 inline void G4VEmProcess::SetIntegral(G4bool val) 578 { 579 if(particle && particle != theGamma) { integral = val; } 580 if(integral) { buildLambdaTable = true; } 581 } 582 583 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 584 585 inline G4bool G4VEmProcess::IsIntegral() const 586 { 587 return integral; 588 } 589 590 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 591 592 inline void G4VEmProcess::SetApplyCuts(G4bool val) 593 { 594 applyCuts = val; 595 } 596 597 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 598 599 inline void G4VEmProcess::SetBuildTableFlag(G4bool val) 600 { 601 buildLambdaTable = val; 602 if(!val) { integral = false; } 603 } 604 605 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 606 607 inline G4ParticleChangeForGamma* G4VEmProcess::GetParticleChange() 608 { 609 return &fParticleChange; 610 } 611 612 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 613 614 inline void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 615 { 616 particle = p; 617 currentParticle = p; 618 } 619 620 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 621 622 inline void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 623 { 624 secondaryParticle = p; 625 } 626 627 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 628 629 inline void G4VEmProcess::SetStartFromNullFlag(G4bool val) 630 { 631 startFromNull = val; 651 632 } 652 633 -
trunk/source/processes/electromagnetic/utils/include/G4VEnergyLossProcess.hh
r1196 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEnergyLossProcess.hh,v 1. 89 2009/07/03 14:39:17vnivanch Exp $26 // $Id: G4VEnergyLossProcess.hh,v 1.92 2010/04/28 14:43:13 vnivanch Exp $ 27 27 // GEANT4 tag $Name: 28 28 // … … 196 196 // Sampling of secondaries in vicinity of geometrical boundary 197 197 void SampleSubCutSecondaries(std::vector<G4Track*>&, const G4Step&, 198 G4VEmModel* model, G4int matIdx, 199 G4double& extraEdep); 198 G4VEmModel* model, G4int matIdx); 200 199 201 200 // PostStep sampling of secondaries … … 418 417 // Run time method for simulation of ionisation 419 418 //------------------------------------------------------------------------ 419 420 // access atom on which interaction happens 421 const G4Element* GetCurrentElement() const; 420 422 421 423 // sample range at the end of a step … … 553 555 }; 554 556 555 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 556 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 557 // ======== Run time inline methods ================ 557 558 558 559 inline size_t G4VEnergyLossProcess::CurrentMaterialCutsCoupleIndex() const … … 586 587 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 587 588 588 inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p) 589 { 590 fluctModel = p; 591 } 592 593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 594 595 inline G4VEmFluctuationModel* G4VEnergyLossProcess::FluctModel() 596 { 597 return fluctModel; 598 } 599 600 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 601 602 inline void G4VEnergyLossProcess::SetParticle(const G4ParticleDefinition* p) 603 { 604 particle = p; 605 } 606 607 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 608 609 inline void G4VEnergyLossProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 610 { 611 secondaryParticle = p; 612 } 613 614 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 615 616 inline void G4VEnergyLossProcess::SetBaseParticle(const G4ParticleDefinition* p) 617 { 618 baseParticle = p; 619 } 620 621 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 622 623 inline const G4ParticleDefinition* G4VEnergyLossProcess::Particle() const 624 { 625 return particle; 626 } 627 628 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 629 630 inline const G4ParticleDefinition* G4VEnergyLossProcess::BaseParticle() const 631 { 632 return baseParticle; 633 } 634 635 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 636 637 inline const G4ParticleDefinition* G4VEnergyLossProcess::SecondaryParticle() const 638 { 639 return secondaryParticle; 640 } 641 642 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 643 644 inline void G4VEnergyLossProcess::SetLossFluctuations(G4bool val) 645 { 646 lossFluctuationFlag = val; 647 } 648 649 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 650 651 inline void G4VEnergyLossProcess::SetRandomStep(G4bool val) 652 { 653 rndmStepFlag = val; 654 } 655 656 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 657 658 inline void G4VEnergyLossProcess::SetIntegral(G4bool val) 659 { 660 integral = val; 661 } 662 663 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 664 665 inline G4bool G4VEnergyLossProcess::IsIntegral() const 666 { 667 return integral; 668 } 669 670 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 671 672 inline void G4VEnergyLossProcess::SetIonisation(G4bool val) 673 { 674 isIonisation = val; 675 if(val) aGPILSelection = CandidateForSelection; 676 else aGPILSelection = NotCandidateForSelection; 677 } 678 679 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 680 681 inline G4bool G4VEnergyLossProcess::IsIonisationProcess() const 682 { 683 return isIonisation; 684 } 685 686 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 687 688 inline void G4VEnergyLossProcess::SetLinearLossLimit(G4double val) 689 { 690 linLossLimit = val; 691 } 692 693 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 694 695 inline void G4VEnergyLossProcess::SetMinSubRange(G4double val) 696 { 697 minSubRange = val; 698 } 699 700 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 701 702 inline void G4VEnergyLossProcess::SetLambdaFactor(G4double val) 703 { 704 if(val > 0.0 && val <= 1.0) lambdaFactor = val; 705 } 706 707 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 708 709 void G4VEnergyLossProcess::SetStepFunction(G4double v1, G4double v2) 710 { 711 dRoverRange = v1; 712 finalRange = v2; 713 if (dRoverRange > 0.999) dRoverRange = 1.0; 714 currentCouple = 0; 715 mfpKinEnergy = DBL_MAX; 716 } 717 718 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 719 720 inline void G4VEnergyLossProcess::SetLowestEnergyLimit(G4double val) 721 { 722 lowestKinEnergy = val; 723 } 724 725 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 726 727 inline G4int G4VEnergyLossProcess::NumberOfSubCutoffRegions() const 728 { 729 return nSCoffRegions; 730 } 731 732 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 733 734 inline G4int G4VEnergyLossProcess::NumberOfDERegions() const 735 { 736 return nDERegions; 737 } 738 739 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 740 741 inline void G4VEnergyLossProcess::SetDEDXBinning(G4int nbins) 742 { 743 nBins = nbins; 744 } 745 746 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 747 748 inline void G4VEnergyLossProcess::SetLambdaBinning(G4int nbins) 749 { 750 nBins = nbins; 751 } 752 753 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 754 755 inline void G4VEnergyLossProcess::SetDEDXBinningForCSDARange(G4int nbins) 756 { 757 nBinsCSDA = nbins; 758 } 759 760 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 761 762 inline void G4VEnergyLossProcess::SetMinKinEnergy(G4double e) 763 { 764 minKinEnergy = e; 765 } 766 767 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 768 769 inline G4double G4VEnergyLossProcess::MinKinEnergy() const 770 { 771 return minKinEnergy; 772 } 773 774 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 775 776 inline void G4VEnergyLossProcess::SetMaxKinEnergy(G4double e) 777 { 778 maxKinEnergy = e; 779 if(e < maxKinEnergyCSDA) maxKinEnergyCSDA = e; 780 } 781 782 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 783 784 inline G4double G4VEnergyLossProcess::MaxKinEnergy() const 785 { 786 return maxKinEnergy; 787 } 788 789 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 790 791 inline void G4VEnergyLossProcess::SetMaxKinEnergyForCSDARange(G4double e) 792 { 793 maxKinEnergyCSDA = e; 794 } 795 796 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 797 798 inline G4double G4VEnergyLossProcess::GetDEDX(G4double& kineticEnergy, 799 const G4MaterialCutsCouple* couple) 589 inline void 590 G4VEnergyLossProcess::DefineMaterial(const G4MaterialCutsCouple* couple) 591 { 592 if(couple != currentCouple) { 593 currentCouple = couple; 594 currentMaterial = couple->GetMaterial(); 595 currentMaterialIndex = couple->GetIndex(); 596 mfpKinEnergy = DBL_MAX; 597 } 598 } 599 600 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 601 602 inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio, 603 G4double charge2ratio) 604 { 605 massRatio = massratio; 606 chargeSqRatio = charge2ratio; 607 reduceFactor = 1.0/(chargeSqRatio*massRatio); 608 } 609 610 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 611 612 inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e) 613 { 614 G4double x = ((*theDEDXTable)[currentMaterialIndex]->Value(e))*chargeSqRatio; 615 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 616 return x; 617 } 618 619 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 620 621 inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e) 622 { 623 G4double x = ((*theDEDXSubTable)[currentMaterialIndex]->Value(e))*chargeSqRatio; 624 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 625 return x; 626 } 627 628 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 629 630 inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e) 631 { 632 //G4double x = 0.0; 633 // if(theIonisationTable) { 634 G4double x = ((*theIonisationTable)[currentMaterialIndex]->Value(e))*chargeSqRatio; 635 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 636 //} 637 return x; 638 } 639 640 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 641 642 inline 643 G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e) 644 { 645 // G4double x = 0.0; 646 //if(theIonisationSubTable) { 647 G4double x = ((*theIonisationSubTable)[currentMaterialIndex]->Value(e))*chargeSqRatio; 648 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 649 //} 650 return x; 651 } 652 653 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 654 655 inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e) 656 { 657 G4double x = ((*theRangeTableForLoss)[currentMaterialIndex])->Value(e); 658 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 659 return x; 660 } 661 662 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 663 664 inline G4double 665 G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e) 666 { 667 G4double x; 668 669 if (e < maxKinEnergyCSDA) { 670 x = ((*theCSDARangeTable)[currentMaterialIndex])->Value(e); 671 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy); 672 } else { 673 x = theRangeAtMaxEnergy[currentMaterialIndex] + 674 (e - maxKinEnergyCSDA)/theDEDXAtMaxEnergy[currentMaterialIndex]; 675 } 676 return x; 677 } 678 679 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 680 681 inline G4double G4VEnergyLossProcess::ScaledKinEnergyForLoss(G4double r) 682 { 683 G4PhysicsVector* v = (*theInverseRangeTable)[currentMaterialIndex]; 684 G4double rmin = v->Energy(0); 685 G4double e = 0.0; 686 if(r >= rmin) { e = v->Value(r); } 687 else if(r > 0.0) { 688 G4double x = r/rmin; 689 e = minKinEnergy*x*x; 690 } 691 return e; 692 } 693 694 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 695 696 inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e) 697 { 698 return chargeSqRatio*(((*theLambdaTable)[currentMaterialIndex])->Value(e)); 699 } 700 701 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 702 703 inline G4double 704 G4VEnergyLossProcess::GetDEDX(G4double& kineticEnergy, 705 const G4MaterialCutsCouple* couple) 800 706 { 801 707 DefineMaterial(couple); … … 805 711 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 806 712 807 inline G4double G4VEnergyLossProcess::GetDEDXForSubsec(G4double& kineticEnergy, 808 const G4MaterialCutsCouple* couple) 713 inline G4double 714 G4VEnergyLossProcess::GetDEDXForSubsec(G4double& kineticEnergy, 715 const G4MaterialCutsCouple* couple) 809 716 { 810 717 DefineMaterial(couple); … … 814 721 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 815 722 816 inline G4double G4VEnergyLossProcess::GetRange(G4double& kineticEnergy, 817 const G4MaterialCutsCouple* couple) 723 inline G4double 724 G4VEnergyLossProcess::GetRange(G4double& kineticEnergy, 725 const G4MaterialCutsCouple* couple) 818 726 { 819 727 G4double x = fRange; … … 831 739 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 832 740 833 inline G4double G4VEnergyLossProcess::GetCSDARange( 834 G4double& kineticEnergy, const G4MaterialCutsCouple* couple) 741 inline G4double 742 G4VEnergyLossProcess::GetCSDARange(G4double& kineticEnergy, 743 const G4MaterialCutsCouple* couple) 835 744 { 836 745 DefineMaterial(couple); … … 844 753 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 845 754 846 inline G4double G4VEnergyLossProcess::GetRangeForLoss(847 G4double& kineticEnergy,848 const G4MaterialCutsCouple* couple)755 inline G4double 756 G4VEnergyLossProcess::GetRangeForLoss(G4double& kineticEnergy, 757 const G4MaterialCutsCouple* couple) 849 758 { 850 759 DefineMaterial(couple); … … 859 768 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 860 769 861 inline G4double G4VEnergyLossProcess::GetKineticEnergy(862 G4double& range,863 const G4MaterialCutsCouple* couple)770 inline G4double 771 G4VEnergyLossProcess::GetKineticEnergy(G4double& range, 772 const G4MaterialCutsCouple* couple) 864 773 { 865 774 DefineMaterial(couple); … … 871 780 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 872 781 873 inline G4double G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy, 874 const G4MaterialCutsCouple* couple) 782 inline G4double 783 G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy, 784 const G4MaterialCutsCouple* couple) 875 785 { 876 786 DefineMaterial(couple); 877 787 G4double x = 0.0; 878 if(theLambdaTable) x = GetLambdaForScaledEnergy(kineticEnergy*massRatio);788 if(theLambdaTable) { x = GetLambdaForScaledEnergy(kineticEnergy*massRatio); } 879 789 return x; 880 }881 882 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....883 884 inline G4bool G4VEnergyLossProcess::TablesAreBuilt() const885 {886 return tablesAreBuilt;887 }888 889 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....890 891 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTable() const892 {893 return theDEDXTable;894 }895 896 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....897 898 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTableForSubsec() const899 {900 return theDEDXSubTable;901 }902 903 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....904 905 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const906 {907 return theDEDXunRestrictedTable;908 }909 910 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....911 912 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const913 {914 G4PhysicsTable* t = theDEDXTable;915 if(theIonisationTable) t = theIonisationTable;916 return t;917 }918 919 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....920 921 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const922 {923 G4PhysicsTable* t = theDEDXSubTable;924 if(theIonisationSubTable) t = theIonisationSubTable;925 return t;926 }927 928 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....929 930 inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const931 {932 return theCSDARangeTable;933 }934 935 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....936 937 inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const938 {939 return theRangeTableForLoss;940 }941 942 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....943 944 inline G4PhysicsTable* G4VEnergyLossProcess::InverseRangeTable() const945 {946 return theInverseRangeTable;947 }948 949 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....950 951 inline G4PhysicsTable* G4VEnergyLossProcess::LambdaTable()952 {953 return theLambdaTable;954 }955 956 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....957 958 inline G4PhysicsTable* G4VEnergyLossProcess::SubLambdaTable()959 {960 return theSubLambdaTable;961 }962 963 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....964 965 inline G4double G4VEnergyLossProcess::SampleRange()966 {967 G4double e = amu_c2*preStepKinEnergy/particle->GetPDGMass();968 G4double s = fRange*std::pow(10.,vstrag->Value(e));969 G4double x = fRange + G4RandGauss::shoot(0.0,s);970 if(x > 0.0) fRange = x;971 return fRange;972 }973 974 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....975 976 inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio,977 G4double charge2ratio)978 {979 massRatio = massratio;980 chargeSqRatio = charge2ratio;981 reduceFactor = 1.0/(chargeSqRatio*massRatio);982 }983 984 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....985 986 inline void G4VEnergyLossProcess::DefineMaterial(987 const G4MaterialCutsCouple* couple)988 {989 if(couple != currentCouple) {990 currentCouple = couple;991 currentMaterial = couple->GetMaterial();992 currentMaterialIndex = couple->GetIndex();993 mfpKinEnergy = DBL_MAX;994 }995 }996 997 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....998 999 inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e)1000 {1001 G4double x = ((*theDEDXTable)[currentMaterialIndex]->Value(e))*chargeSqRatio;1002 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);1003 return x;1004 }1005 1006 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1007 1008 inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e)1009 {1010 G4double x = ((*theDEDXSubTable)[currentMaterialIndex]->Value(e))*chargeSqRatio;1011 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);1012 return x;1013 }1014 1015 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1016 1017 inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e)1018 {1019 //G4double x = 0.0;1020 // if(theIonisationTable) {1021 G4double x = ((*theIonisationTable)[currentMaterialIndex]->Value(e))*chargeSqRatio;1022 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);1023 //}1024 return x;1025 }1026 1027 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1028 1029 inline1030 G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e)1031 {1032 // G4double x = 0.0;1033 //if(theIonisationSubTable) {1034 G4double x = ((*theIonisationSubTable)[currentMaterialIndex]->Value(e))*chargeSqRatio;1035 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);1036 //}1037 return x;1038 }1039 1040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1041 1042 inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e)1043 {1044 G4double x = ((*theRangeTableForLoss)[currentMaterialIndex])->Value(e);1045 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);1046 return x;1047 }1048 1049 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1050 1051 inline G4double G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(1052 G4double e)1053 {1054 G4double x;1055 1056 if (e < maxKinEnergyCSDA) {1057 x = ((*theCSDARangeTable)[currentMaterialIndex])->Value(e);1058 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);1059 } else {1060 x = theRangeAtMaxEnergy[currentMaterialIndex] +1061 (e - maxKinEnergyCSDA)/theDEDXAtMaxEnergy[currentMaterialIndex];1062 }1063 return x;1064 }1065 1066 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1067 1068 inline G4double G4VEnergyLossProcess::ScaledKinEnergyForLoss(G4double r)1069 {1070 G4PhysicsVector* v = (*theInverseRangeTable)[currentMaterialIndex];1071 G4double rmin = v->Energy(0);1072 G4double e = 0.0;1073 if(r >= rmin) { e = v->Value(r); }1074 else if(r > 0.0) {1075 G4double x = r/rmin;1076 e = minKinEnergy*x*x;1077 }1078 return e;1079 }1080 1081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1082 1083 inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)1084 {1085 return chargeSqRatio*(((*theLambdaTable)[currentMaterialIndex])->Value(e));1086 790 } 1087 791 … … 1111 815 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1112 816 817 inline G4double G4VEnergyLossProcess::SampleRange() 818 { 819 G4double e = amu_c2*preStepKinEnergy/particle->GetPDGMass(); 820 G4double s = fRange*std::pow(10.,vstrag->Value(e)); 821 G4double x = fRange + G4RandGauss::shoot(0.0,s); 822 if(x > 0.0) { fRange = x; } 823 return fRange; 824 } 825 826 // ======== Get/Set inline methods used at initialisation ================ 827 828 inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p) 829 { 830 fluctModel = p; 831 } 832 833 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 834 835 inline G4VEmFluctuationModel* G4VEnergyLossProcess::FluctModel() 836 { 837 return fluctModel; 838 } 839 840 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 841 842 inline void G4VEnergyLossProcess::SetParticle(const G4ParticleDefinition* p) 843 { 844 particle = p; 845 } 846 847 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 848 849 inline void G4VEnergyLossProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 850 { 851 secondaryParticle = p; 852 } 853 854 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 855 856 inline void G4VEnergyLossProcess::SetBaseParticle(const G4ParticleDefinition* p) 857 { 858 baseParticle = p; 859 } 860 861 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 862 863 inline const G4ParticleDefinition* G4VEnergyLossProcess::Particle() const 864 { 865 return particle; 866 } 867 868 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 869 870 inline const G4ParticleDefinition* G4VEnergyLossProcess::BaseParticle() const 871 { 872 return baseParticle; 873 } 874 875 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 876 877 inline const G4ParticleDefinition* G4VEnergyLossProcess::SecondaryParticle() const 878 { 879 return secondaryParticle; 880 } 881 882 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 883 884 inline void G4VEnergyLossProcess::SetLossFluctuations(G4bool val) 885 { 886 lossFluctuationFlag = val; 887 } 888 889 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 890 891 inline void G4VEnergyLossProcess::SetRandomStep(G4bool val) 892 { 893 rndmStepFlag = val; 894 } 895 896 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 897 898 inline void G4VEnergyLossProcess::SetIntegral(G4bool val) 899 { 900 integral = val; 901 } 902 903 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 904 905 inline G4bool G4VEnergyLossProcess::IsIntegral() const 906 { 907 return integral; 908 } 909 910 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 911 912 inline void G4VEnergyLossProcess::SetIonisation(G4bool val) 913 { 914 isIonisation = val; 915 if(val) { aGPILSelection = CandidateForSelection; } 916 else { aGPILSelection = NotCandidateForSelection; } 917 } 918 919 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 920 921 inline G4bool G4VEnergyLossProcess::IsIonisationProcess() const 922 { 923 return isIonisation; 924 } 925 926 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 927 928 inline void G4VEnergyLossProcess::SetLinearLossLimit(G4double val) 929 { 930 linLossLimit = val; 931 } 932 933 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 934 935 inline void G4VEnergyLossProcess::SetMinSubRange(G4double val) 936 { 937 minSubRange = val; 938 } 939 940 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 941 942 inline void G4VEnergyLossProcess::SetLambdaFactor(G4double val) 943 { 944 if(val > 0.0 && val <= 1.0) { lambdaFactor = val; } 945 } 946 947 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 948 949 void G4VEnergyLossProcess::SetStepFunction(G4double v1, G4double v2) 950 { 951 dRoverRange = v1; 952 finalRange = v2; 953 if (dRoverRange > 0.999) { dRoverRange = 1.0; } 954 currentCouple = 0; 955 mfpKinEnergy = DBL_MAX; 956 } 957 958 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 959 960 inline void G4VEnergyLossProcess::SetLowestEnergyLimit(G4double val) 961 { 962 lowestKinEnergy = val; 963 } 964 965 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 966 967 inline G4int G4VEnergyLossProcess::NumberOfSubCutoffRegions() const 968 { 969 return nSCoffRegions; 970 } 971 972 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 973 974 inline G4int G4VEnergyLossProcess::NumberOfDERegions() const 975 { 976 return nDERegions; 977 } 978 979 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 980 981 inline void G4VEnergyLossProcess::SetDEDXBinning(G4int nbins) 982 { 983 nBins = nbins; 984 } 985 986 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 987 988 inline void G4VEnergyLossProcess::SetLambdaBinning(G4int nbins) 989 { 990 nBins = nbins; 991 } 992 993 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 994 995 inline void G4VEnergyLossProcess::SetDEDXBinningForCSDARange(G4int nbins) 996 { 997 nBinsCSDA = nbins; 998 } 999 1000 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1001 1002 inline void G4VEnergyLossProcess::SetMinKinEnergy(G4double e) 1003 { 1004 minKinEnergy = e; 1005 } 1006 1007 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1008 1009 inline G4double G4VEnergyLossProcess::MinKinEnergy() const 1010 { 1011 return minKinEnergy; 1012 } 1013 1014 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1015 1016 inline void G4VEnergyLossProcess::SetMaxKinEnergy(G4double e) 1017 { 1018 maxKinEnergy = e; 1019 if(e < maxKinEnergyCSDA) { maxKinEnergyCSDA = e; } 1020 } 1021 1022 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1023 1024 inline G4double G4VEnergyLossProcess::MaxKinEnergy() const 1025 { 1026 return maxKinEnergy; 1027 } 1028 1029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1030 1031 inline void G4VEnergyLossProcess::SetMaxKinEnergyForCSDARange(G4double e) 1032 { 1033 maxKinEnergyCSDA = e; 1034 } 1035 1036 1037 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1038 1039 inline G4bool G4VEnergyLossProcess::TablesAreBuilt() const 1040 { 1041 return tablesAreBuilt; 1042 } 1043 1044 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1045 1046 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTable() const 1047 { 1048 return theDEDXTable; 1049 } 1050 1051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1052 1053 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTableForSubsec() const 1054 { 1055 return theDEDXSubTable; 1056 } 1057 1058 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1059 1060 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const 1061 { 1062 return theDEDXunRestrictedTable; 1063 } 1064 1065 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1066 1067 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const 1068 { 1069 G4PhysicsTable* t = theDEDXTable; 1070 if(theIonisationTable) { t = theIonisationTable; } 1071 return t; 1072 } 1073 1074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1075 1076 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const 1077 { 1078 G4PhysicsTable* t = theDEDXSubTable; 1079 if(theIonisationSubTable) { t = theIonisationSubTable; } 1080 return t; 1081 } 1082 1083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1084 1085 inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const 1086 { 1087 return theCSDARangeTable; 1088 } 1089 1090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1091 1092 inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const 1093 { 1094 return theRangeTableForLoss; 1095 } 1096 1097 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1098 1099 inline G4PhysicsTable* G4VEnergyLossProcess::InverseRangeTable() const 1100 { 1101 return theInverseRangeTable; 1102 } 1103 1104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1105 1106 inline G4PhysicsTable* G4VEnergyLossProcess::LambdaTable() 1107 { 1108 return theLambdaTable; 1109 } 1110 1111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1112 1113 inline G4PhysicsTable* G4VEnergyLossProcess::SubLambdaTable() 1114 { 1115 return theSubLambdaTable; 1116 } 1117 1118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1119 1113 1120 #endif -
trunk/source/processes/electromagnetic/utils/include/G4VMultipleScattering.hh
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMultipleScattering.hh,v 1.6 2 2009/10/29 17:56:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VMultipleScattering.hh,v 1.63 2010/03/10 18:29:51 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 154 154 // The function overloads the corresponding function of the base 155 155 // class. 156 inlineG4double PostStepGetPhysicalInteractionLength(156 G4double PostStepGetPhysicalInteractionLength( 157 157 const G4Track&, 158 158 G4double previousStepSize, … … 160 160 161 161 // Along step actions 162 inlineG4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);162 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&); 163 163 164 164 // Post step actions 165 inlineG4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);165 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&); 166 166 167 167 // This method does not used for tracking, it is intended only for tests 168 inlineG4double ContinuousStepLimit(const G4Track& track,169 G4double previousStepSize,170 G4double currentMinimalStep,171 G4double& currentSafety);168 G4double ContinuousStepLimit(const G4Track& track, 169 G4double previousStepSize, 170 G4double currentMinimalStep, 171 G4double& currentSafety); 172 172 173 173 //------------------------------------------------------------------------ … … 318 318 }; 319 319 320 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 321 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 322 323 inline G4double G4VMultipleScattering::ContinuousStepLimit( 324 const G4Track& track, 325 G4double previousStepSize, 326 G4double currentMinimalStep, 327 G4double& currentSafety) 328 { 329 return GetContinuousStepLimit(track,previousStepSize,currentMinimalStep, 330 currentSafety); 331 } 332 333 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 334 335 inline void G4VMultipleScattering::SetBinning(G4int nbins) 336 { 337 nBins = nbins; 338 } 339 340 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 341 342 inline G4int G4VMultipleScattering::Binning() const 343 { 344 return nBins; 345 } 346 347 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 348 349 inline void G4VMultipleScattering::SetMinKinEnergy(G4double e) 350 { 351 minKinEnergy = e; 352 } 353 354 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 355 356 inline G4double G4VMultipleScattering::MinKinEnergy() const 357 { 358 return minKinEnergy; 359 } 360 361 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 362 363 inline void G4VMultipleScattering::SetMaxKinEnergy(G4double e) 364 { 365 maxKinEnergy = e; 366 } 367 368 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 369 370 inline G4double G4VMultipleScattering::MaxKinEnergy() const 371 { 372 return maxKinEnergy; 373 } 374 375 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 376 377 inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val) 378 { 379 buildLambdaTable = val; 380 } 381 382 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 383 384 inline G4PhysicsTable* G4VMultipleScattering::LambdaTable() const 385 { 386 return theLambdaTable; 387 } 388 389 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 390 391 inline const G4ParticleDefinition* G4VMultipleScattering::Particle() const 392 { 393 return currentParticle; 394 } 395 396 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 397 398 inline G4VEmModel* G4VMultipleScattering::SelectModel(G4double kinEnergy) 399 { 400 return modelManager->SelectModel(kinEnergy, currentMaterialIndex); 401 } 402 403 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 404 405 inline G4VEmModel* G4VMultipleScattering::SelectModelForMaterial( 406 G4double kinEnergy, size_t& idxRegion) const 407 { 408 return modelManager->SelectModel(kinEnergy, idxRegion); 409 } 410 411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 412 413 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 414 { 415 return latDisplasment; 416 } 417 418 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 419 420 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) 421 { 422 latDisplasment = val; 423 } 424 425 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 426 427 inline G4double G4VMultipleScattering::Skin() const 428 { 429 return skin; 430 } 431 432 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 433 434 inline void G4VMultipleScattering::SetSkin(G4double val) 435 { 436 if(val < 1.0) skin = 0.0; 437 else skin = val; 438 } 439 440 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 441 442 inline G4double G4VMultipleScattering::RangeFactor() const 443 { 444 return facrange; 445 } 446 447 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 448 449 inline void G4VMultipleScattering::SetRangeFactor(G4double val) 450 { 451 if(val > 0.0) facrange = val; 452 } 453 454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 455 456 inline G4double G4VMultipleScattering::GeomFactor() const 457 { 458 return facgeom; 459 } 460 461 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 462 463 inline void G4VMultipleScattering::SetGeomFactor(G4double val) 464 { 465 if(val > 0.0) facgeom = val; 466 } 467 468 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 469 470 inline G4double G4VMultipleScattering::PolarAngleLimit() const 471 { 472 return polarAngleLimit; 473 } 474 475 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 476 477 inline void G4VMultipleScattering::SetPolarAngleLimit(G4double val) 478 { 479 if(val < 0.0) polarAngleLimit = 0.0; 480 else if(val > pi) polarAngleLimit = pi; 481 else polarAngleLimit = val; 482 } 483 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 485 486 inline G4MscStepLimitType G4VMultipleScattering::StepLimitType() const 487 { 488 return stepLimit; 489 } 490 491 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 492 493 inline void G4VMultipleScattering::SetStepLimitType(G4MscStepLimitType val) 494 { 495 stepLimit = val; 496 if(val == fMinimal) facrange = 0.2; 320 // ======== Run time inline methods ================ 321 322 inline const G4MaterialCutsCouple* 323 G4VMultipleScattering::CurrentMaterialCutsCouple() const 324 { 325 return currentCouple; 326 } 327 328 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 329 330 inline 331 void G4VMultipleScattering::DefineMaterial(const G4MaterialCutsCouple* couple) 332 { 333 if(couple != currentCouple) { 334 currentCouple = couple; 335 currentMaterialIndex = couple->GetIndex(); 336 } 497 337 } 498 338 … … 509 349 x = currentModel->CrossSection(currentCouple,p,e); 510 350 } 511 if(x > DBL_MIN) x = 1./x;512 else x = DBL_MAX;351 if(x > DBL_MIN) { x = 1./x; } 352 else { x = DBL_MAX; } 513 353 return x; 514 354 } … … 516 356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 517 357 518 inline 519 void G4VMultipleScattering::DefineMaterial(const G4MaterialCutsCouple* couple) 520 { 521 if(couple != currentCouple) { 522 currentCouple = couple; 523 currentMaterialIndex = couple->GetIndex(); 524 } 525 } 526 527 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 528 529 inline const G4MaterialCutsCouple* 530 G4VMultipleScattering::CurrentMaterialCutsCouple() const 531 { 532 return currentCouple; 533 } 534 535 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 536 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 537 538 // Follwoing methods are virtual, they are inlined because they applied at 539 // each simulation step and some compilers may inline these methods 540 541 inline G4double 542 G4VMultipleScattering::PostStepGetPhysicalInteractionLength( 543 const G4Track&, G4double, G4ForceCondition* condition) 544 { 545 *condition = Forced; 546 return DBL_MAX; 547 } 548 549 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 550 551 inline G4VParticleChange* 552 G4VMultipleScattering::AlongStepDoIt(const G4Track& track, const G4Step& step) 553 { 554 if(currentModel->IsActive(track.GetKineticEnergy())) { 555 fParticleChange.ProposeTrueStepLength(currentModel->ComputeTrueStepLength(step.GetStepLength())); 556 } 557 return &fParticleChange; 558 } 559 560 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 561 562 inline G4VParticleChange* 563 G4VMultipleScattering::PostStepDoIt(const G4Track& track, const G4Step& step) 564 { 565 fParticleChange.Initialize(track); 566 if(currentModel->IsActive(track.GetKineticEnergy())) { 567 currentModel->SampleScattering(track.GetDynamicParticle(), 568 step.GetPostStepPoint()->GetSafety()); 569 } 570 return &fParticleChange; 358 inline G4VEmModel* G4VMultipleScattering::SelectModel(G4double kinEnergy) 359 { 360 return modelManager->SelectModel(kinEnergy, currentMaterialIndex); 361 } 362 363 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 364 365 inline G4VEmModel* G4VMultipleScattering::SelectModelForMaterial( 366 G4double kinEnergy, size_t& idxRegion) const 367 { 368 return modelManager->SelectModel(kinEnergy, idxRegion); 369 } 370 371 // ======== Get/Set inline methods used at initialisation ================ 372 373 inline void G4VMultipleScattering::SetBinning(G4int nbins) 374 { 375 nBins = nbins; 376 } 377 378 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 379 380 inline G4int G4VMultipleScattering::Binning() const 381 { 382 return nBins; 383 } 384 385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 386 387 inline void G4VMultipleScattering::SetMinKinEnergy(G4double e) 388 { 389 minKinEnergy = e; 390 } 391 392 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 393 394 inline G4double G4VMultipleScattering::MinKinEnergy() const 395 { 396 return minKinEnergy; 397 } 398 399 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 400 401 inline void G4VMultipleScattering::SetMaxKinEnergy(G4double e) 402 { 403 maxKinEnergy = e; 404 } 405 406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 407 408 inline G4double G4VMultipleScattering::MaxKinEnergy() const 409 { 410 return maxKinEnergy; 411 } 412 413 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 414 415 inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val) 416 { 417 buildLambdaTable = val; 418 } 419 420 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 421 422 inline G4PhysicsTable* G4VMultipleScattering::LambdaTable() const 423 { 424 return theLambdaTable; 425 } 426 427 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 428 429 inline const G4ParticleDefinition* G4VMultipleScattering::Particle() const 430 { 431 return currentParticle; 432 } 433 434 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 435 436 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 437 { 438 return latDisplasment; 439 } 440 441 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 442 443 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) 444 { 445 latDisplasment = val; 446 } 447 448 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 449 450 inline G4double G4VMultipleScattering::Skin() const 451 { 452 return skin; 453 } 454 455 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 456 457 inline void G4VMultipleScattering::SetSkin(G4double val) 458 { 459 if(val < 1.0) { skin = 0.0; } 460 else { skin = val; } 461 } 462 463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 464 465 inline G4double G4VMultipleScattering::RangeFactor() const 466 { 467 return facrange; 468 } 469 470 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 471 472 inline void G4VMultipleScattering::SetRangeFactor(G4double val) 473 { 474 if(val > 0.0) facrange = val; 475 } 476 477 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 478 479 inline G4double G4VMultipleScattering::GeomFactor() const 480 { 481 return facgeom; 482 } 483 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 485 486 inline void G4VMultipleScattering::SetGeomFactor(G4double val) 487 { 488 if(val > 0.0) facgeom = val; 489 } 490 491 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 492 493 inline G4double G4VMultipleScattering::PolarAngleLimit() const 494 { 495 return polarAngleLimit; 496 } 497 498 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 499 500 inline void G4VMultipleScattering::SetPolarAngleLimit(G4double val) 501 { 502 if(val < 0.0) { polarAngleLimit = 0.0; } 503 else if(val > CLHEP::pi) { polarAngleLimit = CLHEP::pi; } 504 else { polarAngleLimit = val; } 505 } 506 507 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 508 509 inline G4MscStepLimitType G4VMultipleScattering::StepLimitType() const 510 { 511 return stepLimit; 512 } 513 514 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 515 516 inline void G4VMultipleScattering::SetStepLimitType(G4MscStepLimitType val) 517 { 518 stepLimit = val; 519 if(val == fMinimal) { facrange = 0.2; } 571 520 } 572 521 -
trunk/source/processes/electromagnetic/utils/src/G4EmCalculator.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmCalculator.cc,v 1. 49 2009/11/22 17:58:39vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmCalculator.cc,v 1.53 2010/04/13 10:58:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 94 94 currentMaterial = 0; 95 95 currentParticle = 0; 96 lambdaParticle = 0; 96 97 baseParticle = 0; 97 98 currentLambda = 0; … … 102 103 currentParticleName= ""; 103 104 currentMaterialName= ""; 105 currentName = ""; 106 lambdaName = ""; 104 107 theGenericIon = G4GenericIon::GenericIon(); 105 108 ionEffCharge = new G4ionEffectiveCharge(); … … 113 116 { 114 117 delete ionEffCharge; 115 for (G4int i=0; i<nLocalMaterials; i++) {118 for (G4int i=0; i<nLocalMaterials; ++i) { 116 119 delete localCouples[i]; 117 120 } … … 310 313 G4int idx = couple->GetIndex(); 311 314 FindLambdaTable(p, processName); 315 312 316 if(currentLambda) { 313 317 G4double e = kinEnergy*massRatio; 314 318 res = (((*currentLambda)[idx])->Value(e))*chargeSquare; 315 319 if(verbose>0) { 316 G4cout << " E(MeV)= " << kinEnergy/MeV320 G4cout << "G4EmCalculator::GetXSPerVolume: E(MeV)= " << kinEnergy/MeV 317 321 << " cross(cm-1)= " << res*cm 318 322 << " " << p->GetParticleName() 319 323 << " in " << mat->GetName(); 320 324 if(verbose>1) 321 G4cout << " idx= " << idx << " e(MeV)= " << e325 G4cout << " idx= " << idx << " Escaled((MeV)= " << e 322 326 << " q2= " << chargeSquare; 323 327 G4cout << G4endl; … … 350 354 G4double res = DBL_MAX; 351 355 G4double x = GetCrossSectionPerVolume(kinEnergy,p, processName, mat,region); 352 if(x > 0.0) res = 1.0/x;356 if(x > 0.0) { res = 1.0/x; } 353 357 if(verbose>1) { 354 358 G4cout << "G4EmCalculator::GetMeanFreePath: E(MeV)= " << kinEnergy/MeV … … 495 499 << " in " << currentMaterialName 496 500 << " Zi^2= " << chargeSquare 501 << " isIon=" << isIon 497 502 << G4endl; 498 503 } … … 516 521 lManager->GetEnergyLossProcessVector(); 517 522 G4int n = vel.size(); 518 for(G4int i=0; i<n; i++) {523 for(G4int i=0; i<n; ++i) { 519 524 const G4ParticleDefinition* p = (vel[i])->Particle(); 520 if((!isIon && p == part) || (isIon && p == theGenericIon)) 525 if((!isIon && p == part) || (isIon && p == theGenericIon)) { 521 526 dedx += ComputeDEDX(kinEnergy,part,(vel[i])->GetProcessName(),mat,cut); 527 } 522 528 } 523 529 } … … 619 625 } 620 626 if(verbose>0) { 621 G4cout << " E(MeV)= " << kinEnergy/MeV627 G4cout << "G4EmCalculator::ComputeXSPerVolume: E(MeV)= " << kinEnergy/MeV 622 628 << " cross(cm-1)= " << res*cm 629 << " cut(keV)= " << cut/keV 623 630 << " " << p->GetParticleName() 624 631 << " in " << mat->GetName() … … 686 693 return ComputeCrossSectionPerAtom(kinEnergy,FindParticle(particle), 687 694 processName, 688 elm->GetZ(),elm->Get A(),cut);695 elm->GetZ(),elm->GetN(),cut); 689 696 } 690 697 … … 886 893 currentMaterial = material; 887 894 currentMaterialName = material->GetName(); 888 for (G4int i=0; i<nLocalMaterials; i++) {895 for (G4int i=0; i<nLocalMaterials; ++i) { 889 896 if(material == localMaterials[i] && cut == localCuts[i]) { 890 897 currentCouple = localCouples[i]; … … 911 918 { 912 919 // Search for the process 913 if (p != currentParticle || processName != currentName) { 914 currentName = processName; 915 currentLambda = 0; 920 if (!currentLambda || p != lambdaParticle || processName != lambdaName) { 921 lambdaName = processName; 922 currentLambda = 0; 923 lambdaParticle = p; 916 924 917 925 G4String partname = p->GetParticleName(); … … 924 932 lManager->GetEnergyLossProcessVector(); 925 933 G4int n = vel.size(); 926 for(G4int i=0; i<n; i++) {927 if((vel[i])->GetProcessName() == currentName &&934 for(G4int i=0; i<n; ++i) { 935 if((vel[i])->GetProcessName() == lambdaName && 928 936 (vel[i])->Particle() == part) 929 937 { 930 938 currentLambda = (vel[i])->LambdaTable(); 931 939 isApplicable = true; 932 break; 940 if(verbose>1) { 941 G4cout << "G4VEnergyLossProcess is found out: " 942 << currentName << G4endl; 943 } 944 return; 933 945 } 934 946 } … … 938 950 const std::vector<G4VEmProcess*> vem = lManager->GetEmProcessVector(); 939 951 G4int n = vem.size(); 940 for(G4int i=0; i<n; i++) {941 if((vem[i])->GetProcessName() == currentName &&952 for(G4int i=0; i<n; ++i) { 953 if((vem[i])->GetProcessName() == lambdaName && 942 954 (vem[i])->Particle() == part) 943 955 { 944 956 currentLambda = (vem[i])->LambdaTable(); 945 957 isApplicable = true; 946 break; 958 if(verbose>1) { 959 G4cout << "G4VEmProcess is found out: " 960 << currentName << G4endl; 961 } 962 return; 947 963 } 948 964 } … … 954 970 lManager->GetMultipleScatteringVector(); 955 971 G4int n = vmsc.size(); 956 for(G4int i=0; i<n; i++) {957 if((vmsc[i])->GetProcessName() == currentName &&972 for(G4int i=0; i<n; ++i) { 973 if((vmsc[i])->GetProcessName() == lambdaName && 958 974 (vmsc[i])->Particle() == part) 959 975 { 960 976 currentLambda = (vmsc[i])->LambdaTable(); 961 977 isApplicable = true; 962 break; 978 if(verbose>1) { 979 G4cout << "G4VMultipleScattering is found out: " 980 << currentName << G4endl; 981 } 982 return; 963 983 } 964 984 } … … 1002 1022 G4int n = vel.size(); 1003 1023 G4VEnergyLossProcess* elproc = 0; 1004 for(G4int i=0; i<n; i++) {1024 for(G4int i=0; i<n; ++i) { 1005 1025 // G4cout << "i= " << i << " part= " 1006 1026 // << (vel[i])->Particle()->GetParticleName() … … 1023 1043 currentModel = elproc->SelectModelForMaterial(scaledEnergy, idx); 1024 1044 G4double eth = currentModel->LowEnergyLimit(); 1025 loweModel = elproc->SelectModelForMaterial(eth - CLHEP::eV, idx); 1045 if(eth > 0.0) { 1046 loweModel = elproc->SelectModelForMaterial(eth - CLHEP::eV, idx); 1047 } 1026 1048 } 1027 1049 … … 1030 1052 const std::vector<G4VEmProcess*> vem = lManager->GetEmProcessVector(); 1031 1053 G4int n = vem.size(); 1032 for(G4int i=0; i<n; i++) {1054 for(G4int i=0; i<n; ++i) { 1033 1055 if((vem[i])->GetProcessName() == currentName && 1034 1056 (vem[i])->Particle() == part) … … 1036 1058 currentModel = (vem[i])->SelectModelForMaterial(kinEnergy, idx); 1037 1059 G4double eth = currentModel->LowEnergyLimit(); 1038 loweModel = (vem[i])->SelectModelForMaterial(eth - CLHEP::eV, idx); 1060 if(eth > 0.0) { 1061 loweModel = (vem[i])->SelectModelForMaterial(eth - CLHEP::eV, idx); 1062 } 1039 1063 break; 1040 1064 } … … 1047 1071 lManager->GetMultipleScatteringVector(); 1048 1072 G4int n = vmsc.size(); 1049 for(G4int i=0; i<n; i++) {1073 for(G4int i=0; i<n; ++i) { 1050 1074 if((vmsc[i])->GetProcessName() == currentName && 1051 1075 (vmsc[i])->Particle() == part) … … 1053 1077 currentModel = (vmsc[i])->SelectModelForMaterial(kinEnergy, idx); 1054 1078 G4double eth = currentModel->LowEnergyLimit(); 1055 loweModel = (vmsc[i])->SelectModelForMaterial(eth - CLHEP::eV, idx); 1079 if(eth > 0.0) { 1080 loweModel = (vmsc[i])->SelectModelForMaterial(eth - CLHEP::eV, idx); 1081 } 1056 1082 break; 1057 1083 } … … 1082 1108 const G4ParticleDefinition* part = p; 1083 1109 1084 if(p->GetParticleType() == "nucleus" && 1085 partname != "deuteron" && 1086 partname != "triton") { part = theGenericIon; } 1110 if(p->GetParticleType() == "nucleus" 1111 && currentParticleName != "deuteron" 1112 && currentParticleName != "triton" 1113 && currentParticleName != "alpha+" 1114 && currentParticleName != "helium" 1115 && currentParticleName != "hydrogen" 1116 ) { part = theGenericIon; } 1087 1117 1088 1118 G4LossTableManager* lManager = G4LossTableManager::Instance(); … … 1090 1120 lManager->GetEnergyLossProcessVector(); 1091 1121 G4int n = vel.size(); 1092 for(G4int i=0; i<n; i++) {1122 for(G4int i=0; i<n; ++i) { 1093 1123 if( (vel[i])->Particle() == part ) { 1094 1124 elp = vel[i]; -
trunk/source/processes/electromagnetic/utils/src/G4EmConfigurator.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmConfigurator.cc,v 1. 6 2009/11/22 19:48:30vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmConfigurator.cc,v 1.8 2010/06/04 15:33:56 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 61 61 #include "G4VMultipleScattering.hh" 62 62 63 enum PType {unknown=0, eloss, discrete, msc}; 64 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 66 67 G4EmConfigurator::G4EmConfigurator() 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 64 65 G4EmConfigurator::G4EmConfigurator(G4int val):verbose(val) 68 66 { 69 67 index = -10; … … 74 72 G4EmConfigurator::~G4EmConfigurator() 75 73 {} 76 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......78 79 void G4EmConfigurator::AddExtraEmModel(const G4String& particleName,80 G4VEmModel* em,81 G4VEmFluctuationModel* fm)82 {83 particleList.push_back(particleName);84 modelList.push_back(em);85 flucModelList.push_back(fm);86 }87 88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......89 90 void G4EmConfigurator::AddModelForRegion(const G4String& particleName,91 const G4String& processName,92 const G4String& modelName,93 const G4String& regionName,94 G4double emin, G4double emax,95 const G4String& flucModelName)96 {97 particles.push_back(particleName);98 processes.push_back(processName);99 models.push_back(modelName);100 regions.push_back(regionName);101 flucModels.push_back(flucModelName);102 lowEnergy.push_back(emin);103 highEnergy.push_back(emax);104 }105 74 106 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 114 83 G4VEmFluctuationModel* fm) 115 84 { 116 AddExtraEmModel(particleName, mod, fm); 117 G4String fname = ""; 118 if(fm) fname = fm->GetName(); 119 G4String mname = ""; 120 if(mod) mname = mod->GetName(); 121 AddModelForRegion(particleName, processName, mname, regionName, 122 emin, emax, fname); 85 if(1 < verbose) { 86 G4cout << " G4EmConfigurator::SetExtraEmModel " << mod->GetName() 87 << " for " << particleName 88 << " and " << processName 89 << " in the region <" << regionName 90 << "> Emin(MeV)= " << emin/MeV 91 << " Emax(MeV)= " << emax/MeV 92 << G4endl; 93 } 94 if(mod || fm) { 95 models.push_back(mod); 96 flucModels.push_back(fm); 97 } else { 98 models.push_back(new G4DummyModel()); 99 flucModels.push_back(0); 100 } 101 102 particles.push_back(particleName); 103 processes.push_back(processName); 104 regions.push_back(regionName); 105 lowEnergy.push_back(emin); 106 highEnergy.push_back(emax); 123 107 } 124 108 … … 127 111 void G4EmConfigurator::AddModels() 128 112 { 113 size_t n = models.size(); 114 if(0 < verbose) { 115 G4cout << "### G4EmConfigurator::AddModels n= " << n << G4endl; 116 } 117 if(n > 0) { 118 for(size_t i=0; i<n; ++i) { 119 if(models[i]) { 120 G4Region* reg = FindRegion(regions[i]); 121 if(reg) { 122 --index; 123 SetModelForRegion(models[i],flucModels[i],reg, 124 particles[i],processes[i], 125 lowEnergy[i],highEnergy[i]); 126 } 127 } 128 } 129 } 130 Clear(); 131 } 132 133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 134 135 void G4EmConfigurator::SetModelForRegion(G4VEmModel* mod, 136 G4VEmFluctuationModel* fm, 137 G4Region* reg, 138 const G4String& particleName, 139 const G4String& processName, 140 G4double emin, G4double emax) 141 { 142 if(1 < verbose) { 143 G4cout << " G4EmConfigurator::SetModelForRegion: " << mod->GetName() 144 << G4endl; 145 G4cout << " For " << particleName 146 << " and " << processName 147 << " in the region <" << reg->GetName() 148 << " Emin(MeV)= " << emin/MeV 149 << " Emax(MeV)= " << emax/MeV; 150 if(fm) { G4cout << " FLmodel " << fm->GetName(); } 151 G4cout << G4endl; 152 } 153 G4ParticleTable::G4PTblDicIterator* theParticleIterator = 154 G4ParticleTable::GetParticleTable()->GetIterator(); 155 156 theParticleIterator->reset(); 157 while( (*theParticleIterator)() ) { 158 const G4ParticleDefinition* part = theParticleIterator->value(); 159 160 //G4cout << particleName << " " << part->GetParticleName() << G4endl; 161 162 if((part->GetParticleName() == particleName) || 163 (particleName == "all") || 164 (particleName == "charged" && part->GetPDGCharge() != 0.0)) { 165 166 // search for process 167 G4ProcessManager* pmanager = part->GetProcessManager(); 168 G4ProcessVector* plist = pmanager->GetProcessList(); 169 G4int np = pmanager->GetProcessListLength(); 170 171 //G4cout << processName << " in list of " << np << G4endl; 172 173 G4VProcess* proc = 0; 174 for(G4int i=0; i<np; i++) { 175 if(processName == (*plist)[i]->GetProcessName()) { 176 proc = (*plist)[i]; 177 break; 178 } 179 } 180 if(!proc) { 181 G4cout << "### G4EmConfigurator WARNING: fails to find a process <" 182 << processName << "> for " << particleName << G4endl; 183 return; 184 185 } 186 187 if(mod) { 188 if(!UpdateModelEnergyRange(mod, emin,emax)) { return; } 189 } 190 // classify process 191 G4int ii = proc->GetProcessSubType(); 192 if(10 == ii && mod) { 193 G4VMultipleScattering* p = static_cast<G4VMultipleScattering*>(proc); 194 p->AddEmModel(index,mod,reg); 195 if(1 < verbose) { 196 G4cout << "### Added msc model order= " << index << " for " 197 << particleName << " and " << processName << G4endl; 198 } 199 return; 200 } else if(2 <= ii && 4 >= ii) { 201 G4VEnergyLossProcess* p = static_cast<G4VEnergyLossProcess*>(proc); 202 if(!mod && fm) { 203 p->SetFluctModel(fm); 204 } else { 205 p->AddEmModel(index,mod,fm,reg); 206 if(1 < verbose) { 207 G4cout << "### Added eloss model order= " << index << " for " 208 << particleName << " and " << processName << G4endl; 209 } 210 } 211 return; 212 } else if(mod) { 213 G4VEmProcess* p = static_cast<G4VEmProcess*>(proc); 214 p->AddEmModel(index,mod,reg); 215 if(1 < verbose) { 216 G4cout << "### Added em model order= " << index << " for " 217 << particleName << " and " << processName << G4endl; 218 } 219 return; 220 } else { 221 return; 222 } 223 } 224 } 225 } 226 227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 228 229 void 230 G4EmConfigurator::PrepareModels(const G4ParticleDefinition* aParticle, 231 G4VEnergyLossProcess* p) 232 { 129 233 size_t n = particles.size(); 130 //G4cout << " G4EmConfigurator::AddModels n= " << n << G4endl; 234 if(1 < verbose) { 235 G4cout << " G4EmConfigurator::PrepareModels for EnergyLoss n= " 236 << n << G4endl; 237 } 131 238 if(n > 0) { 132 for(size_t i=0; i<n; i++) { 133 SetModelForRegion(particles[i],processes[i],models[i],regions[i], 134 flucModels[i],lowEnergy[i],highEnergy[i]); 239 G4String particleName = aParticle->GetParticleName(); 240 G4String processName = p->GetProcessName(); 241 //G4cout << particleName << " " << processName << G4endl; 242 for(size_t i=0; i<n; ++i) { 243 //G4cout << particles[i] << " " << processes[i] << G4endl; 244 if(processName == processes[i]) { 245 if((particleName == particles[i]) || 246 (particles[i] == "all") || 247 (particles[i] == "charged" && aParticle->GetPDGCharge() != 0.0)) { 248 G4Region* reg = FindRegion(regions[i]); 249 //G4cout << "Region " << reg << G4endl; 250 if(reg) { 251 --index; 252 G4VEmModel* mod = models[i]; 253 G4VEmFluctuationModel* fm = flucModels[i]; 254 if(mod) { 255 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) { 256 p->AddEmModel(index,mod,fm,reg); 257 if(1 < verbose) { 258 G4cout << "### Added eloss model order= " << index << " for " 259 << particleName << " and " << processName << G4endl; 260 } 261 } 262 } else if(fm) { 263 p->SetFluctModel(fm); 264 } 265 } 266 } 267 } 135 268 } 136 269 } 270 } 271 272 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 273 274 void 275 G4EmConfigurator::PrepareModels(const G4ParticleDefinition* aParticle, 276 G4VEmProcess* p) 277 { 278 size_t n = particles.size(); 279 if(1 < verbose) { 280 G4cout << " G4EmConfigurator::PrepareModels for EM process n= " 281 << n << G4endl; 282 } 283 if(n > 0) { 284 G4String particleName = aParticle->GetParticleName(); 285 G4String processName = p->GetProcessName(); 286 //G4cout << particleName << " " << particleName << G4endl; 287 for(size_t i=0; i<n; ++i) { 288 if(processName == processes[i]) { 289 if((particleName == particles[i]) || 290 (particles[i] == "all") || 291 (particles[i] == "charged" && aParticle->GetPDGCharge() != 0.0)) { 292 G4Region* reg = FindRegion(regions[i]); 293 //G4cout << "Region " << reg << G4endl; 294 if(reg) { 295 --index; 296 G4VEmModel* mod = models[i]; 297 if(mod) { 298 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) { 299 p->AddEmModel(index,mod,reg); 300 if(1 < verbose) { 301 G4cout << "### Added em model order= " << index << " for " 302 << particleName << " and " << processName << G4endl; 303 } 304 } 305 } 306 } 307 } 308 } 309 } 310 } 311 } 312 313 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 314 315 void 316 G4EmConfigurator::PrepareModels(const G4ParticleDefinition* aParticle, 317 G4VMultipleScattering* p) 318 { 319 size_t n = particles.size(); 320 if(1 < verbose) { 321 G4cout << " G4EmConfigurator::PrepareModels for MSC process n= " 322 << n << G4endl; 323 } 324 325 if(n > 0) { 326 G4String particleName = aParticle->GetParticleName(); 327 G4String processName = p->GetProcessName(); 328 for(size_t i=0; i<n; ++i) { 329 if(processName == processes[i]) { 330 if((particleName == particles[i]) || 331 (particles[i] == "all") || 332 (particles[i] == "charged" && aParticle->GetPDGCharge() != 0.0)) { 333 G4Region* reg = FindRegion(regions[i]); 334 if(reg) { 335 --index; 336 G4VEmModel* mod = models[i]; 337 if(mod) { 338 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) { 339 p->AddEmModel(index,mod,reg); 340 G4cout << "### Added msc model order= " << index << " for " 341 << particleName << " and " << processName << G4endl; 342 } 343 } 344 } 345 } 346 } 347 } 348 } 349 } 350 351 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 352 353 void G4EmConfigurator::Clear() 354 { 137 355 particles.clear(); 138 356 processes.clear(); … … 146 364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 147 365 148 void G4EmConfigurator::SetModelForRegion(const G4String& particleName, 149 const G4String& processName, 150 const G4String& modelName, 151 const G4String& regionName, 152 const G4String& flucModelName, 153 G4double emin, G4double emax) 154 { 155 //G4cout << " G4EmConfigurator::SetModelForRegion" << G4endl; 156 157 // new set 158 --index; 159 160 G4ParticleTable::G4PTblDicIterator* theParticleIterator = 161 G4ParticleTable::GetParticleTable()->GetIterator(); 162 163 theParticleIterator->reset(); 164 while( (*theParticleIterator)() ) { 165 const G4ParticleDefinition* part = theParticleIterator->value(); 166 167 //G4cout << particleName << " " << part->GetParticleName() << G4endl; 168 169 if(particleName == part->GetParticleName() || 170 (particleName == "charged" && part->GetPDGCharge() != 0.0) ) { 171 172 173 // search for process 174 G4ProcessManager* pmanager = part->GetProcessManager(); 175 G4ProcessVector* plist = pmanager->GetProcessList(); 176 G4int np = pmanager->GetProcessListLength(); 177 178 //G4cout << processName << " in list of " << np << G4endl; 179 180 G4VProcess* proc = 0; 181 for(G4int i=0; i<np; i++) { 182 if(processName == (*plist)[i]->GetProcessName()) { 183 proc = (*plist)[i]; 184 break; 185 } 186 } 187 if(!proc) { 188 G4cout << "### G4EmConfigurator WARNING: fails to find a process <" 189 << processName << "> for " << particleName << G4endl; 190 191 } else { 192 193 // classify process 194 PType ptype = discrete; 195 G4int ii = proc->GetProcessSubType(); 196 if(10 == ii) ptype = msc; 197 else if(2 <= ii && 4 >= ii) ptype = eloss; 198 199 // find out model 200 G4VEmModel* mod = 0; 201 G4VEmFluctuationModel* fluc = 0; 202 203 G4int nm = modelList.size(); 204 //G4cout << "Search model " << modelName << " in " << nm << G4endl; 205 206 for(G4int i=0; i<nm; i++) { 207 G4String mname = ""; 208 if(modelList[i]) mname = modelList[i]->GetName(); 209 G4String fname = ""; 210 if(flucModelList[i]) fname = flucModelList[i]->GetName(); 211 if(modelName == mname && flucModelName == fname && 212 (particleList[i] == "" || particleList[i] == particleName) ) { 213 mod = modelList[i]; 214 fluc = flucModelList[i]; 215 break; 216 } 217 } 218 219 if("dummy" == modelName) mod = new G4DummyModel(); 220 221 if(!mod) { 222 223 // set fluctuation model for ionisation processes 224 if(fluc && ptype == eloss) { 225 G4VEnergyLossProcess* p = static_cast<G4VEnergyLossProcess*>(proc); 226 p->SetFluctModel(fluc); 227 228 } else { 229 G4cout << "### G4EmConfigurator WARNING: fails to find a model <" 230 << modelName << "> for process <" 231 << processName << "> and " << particleName 232 << G4endl; 233 if(flucModelName != "") { 234 G4cout << " fluctuation model <" 235 << flucModelName << G4endl; 236 } 237 } 238 } else { 239 240 // search for region 241 G4Region* reg = 0; 242 G4RegionStore* regStore = G4RegionStore::GetInstance(); 243 G4String r = regionName; 244 if(r == "" || r == "world" || r == "World") r = "DefaultRegionForTheWorld"; 245 reg = regStore->GetRegion(r, true); 246 if(!reg) { 247 G4cout << "### G4EmConfigurator WARNING: fails to find a region <" 248 << r << "> for model <" << modelName << "> of the process " 249 << processName << " and " << particleName << G4endl; 250 return; 251 } 252 253 // energy limits 254 G4double e1 = std::max(emin,mod->LowEnergyLimit()); 255 G4double e2 = std::min(emax,mod->HighEnergyLimit()); 256 if(e2 < e1) e2 = e1; 257 mod->SetLowEnergyLimit(e1); 258 mod->SetHighEnergyLimit(e2); 259 260 //G4cout << "index= " << index << " e1= " << e1 << " e2= " << e2 << G4endl; 261 262 // added model 263 if(ptype == eloss) { 264 G4VEnergyLossProcess* p = static_cast<G4VEnergyLossProcess*>(proc); 265 p->AddEmModel(index,mod,fluc,reg); 266 //G4cout << "### Added eloss model order= " << index << " for " 267 // << particleName << " and " << processName << " " << mod << G4endl; 268 } else if(ptype == discrete) { 269 G4VEmProcess* p = static_cast<G4VEmProcess*>(proc); 270 p->AddEmModel(index,mod,reg); 271 } else if(ptype == msc) { 272 //G4cout << "### Added msc model order= " << index << " for " 273 // << particleName << " and " << processName << " " << mod << G4endl; 274 G4VMultipleScattering* p = static_cast<G4VMultipleScattering*>(proc); 275 p->AddEmModel(index,mod,reg); 276 } 277 } 278 } 279 } 280 } 281 } 282 283 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 284 285 286 287 288 289 290 291 366 G4Region* G4EmConfigurator::FindRegion(const G4String& regionName) 367 { 368 // search for region 369 G4Region* reg = 0; 370 G4RegionStore* regStore = G4RegionStore::GetInstance(); 371 G4String r = regionName; 372 if(r == "" || r == "world" || r == "World") { 373 r = "DefaultRegionForTheWorld"; 374 } 375 reg = regStore->GetRegion(r, true); 376 if(!reg) { 377 G4cout << "### G4EmConfigurator WARNING: fails to find a region <" 378 << r << G4endl; 379 } else if(verbose > 1) { 380 G4cout << "### G4EmConfigurator finds out G4Region <" << r << ">" 381 << G4endl; 382 } 383 return reg; 384 } 385 386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 387 388 G4bool G4EmConfigurator::UpdateModelEnergyRange(G4VEmModel* mod, 389 G4double emin, G4double emax) 390 { 391 // energy limits 392 G4double e1 = std::max(emin,mod->LowEnergyLimit()); 393 G4double e2 = std::min(emax,mod->HighEnergyLimit()); 394 if(e2 <= e1) { 395 G4cout << "### G4EmConfigurator WARNING: empty energy interval" 396 << " for <" << mod->GetName() 397 << "> Emin(MeV)= " << e1/CLHEP::MeV 398 << "> Emax(MeV)= " << e2/CLHEP::MeV 399 << G4endl; 400 return false; 401 } 402 mod->SetLowEnergyLimit(e1); 403 mod->SetHighEnergyLimit(e2); 404 if(verbose > 1) { 405 G4cout << "### G4EmConfigurator for " << mod->GetName() 406 << " Emin(MeV)= " << e1/MeV << " Emax(MeV)= " << e2/MeV 407 << G4endl; 408 } 409 return true; 410 } 411 412 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/utils/src/G4EmCorrections.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmCorrections.cc,v 1.5 4 2009/10/29 17:56:36 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmCorrections.cc,v 1.58 2010/06/04 09:28:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 68 68 #include "G4ProductionCutsTable.hh" 69 69 #include "G4MaterialCutsCouple.hh" 70 #include "G4AtomicShells.hh" 70 71 71 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 123 124 G4double sum = (2.0*(Barkas + Bloch) + Mott); 124 125 125 if(verbose > 1) 126 if(verbose > 1) { 126 127 G4cout << "EmCorrections: E(MeV)= " << e/MeV << " Barkas= " << Barkas 127 128 << " Bloch= " << Bloch << " Mott= " << Mott 128 << " Sum= " << sum << G4endl;129 129 << " Sum= " << sum << " q2= " << q2 << G4endl; 130 } 130 131 sum *= material->GetElectronDensity() * q2 * twopi_mc2_rcl2 /beta2; 131 132 return sum; … … 165 166 // Other corrections from S.P.Ahlen Rev. Mod. Phys., Vol 52, No1, 1980 166 167 SetupKinematics(p, mat, e); 167 if(tau <= 0.0) return 0.0;168 if(tau <= 0.0) { return 0.0; } 168 169 169 170 G4double Barkas = BarkasCorrection (p, mat, e); … … 180 181 sum *= material->GetElectronDensity() * q2 * twopi_mc2_rcl2 /beta2; 181 182 182 if(verbose > 1) G4cout << " Sum= " << sum << G4endl;183 if(verbose > 1) { G4cout << " Sum= " << sum << G4endl; } 183 184 return sum; 184 185 } … … 219 220 sum = ComputeIonCorrections(p,couple->GetMaterial(),e) - rest/e; 220 221 221 if(verbose > 1) G4cout << " Sum= " << sum << " dSum= " << rest/e << G4endl;222 if(verbose > 1) { G4cout << " Sum= " << sum << " dSum= " << rest/e << G4endl; } 222 223 } 223 224 return sum; … … 267 268 } 268 269 G4double e0= 13.6*eV*Z2; 269 term += f*atomDensity[i]*KShell( shells.GetBindingEnergy(iz,0)/e0,ba2/Z2)/Z;270 term += f*atomDensity[i]*KShell(G4AtomicShells::GetBindingEnergy(iz,0)/e0,ba2/Z2)/Z; 270 271 } 271 272 … … 293 294 G4double e0= 13.6*eV*Z2*0.25; 294 295 G4double f = 0.125; 295 G4int nmax = std::min(4, shells.GetNumberOfShells(iz));296 G4int nmax = std::min(4,G4AtomicShells::GetNumberOfShells(iz)); 296 297 for(G4int j=1; j<nmax; j++) { 297 G4double ne = G4double( shells.GetNumberOfElectrons(iz,j));298 G4double e1 = shells.GetBindingEnergy(iz,j);298 G4double ne = G4double(G4AtomicShells::GetNumberOfElectrons(iz,j)); 299 G4double e1 = G4AtomicShells::GetBindingEnergy(iz,j); 299 300 // G4cout << "LShell: j= " << j << " ne= " << ne << " e(eV)= " << e/eV 300 301 // << " e0(eV)= " << e0/eV << G4endl; … … 417 418 for (G4int i = 0; i<numberOfElements; i++) { 418 419 420 G4double res = 0.0; 419 421 G4double Z = (*theElementVector)[i]->GetZ(); 420 422 G4int iz = G4int(Z); … … 426 428 } 427 429 G4double e0= 13.6*eV*Z2; 428 term += f*atomDensity[i]*KShell(shells.GetBindingEnergy(iz,0)/e0,ba2/Z2)/Z;430 res += f*KShell(G4AtomicShells::GetBindingEnergy(iz,0)/e0,ba2/Z2); 429 431 if(2 < iz) { 430 432 G4double Zeff = Z - ZD[10]; … … 434 436 f = 0.125; 435 437 G4double eta = ba2/Z2; 436 G4int ntot = shells.GetNumberOfShells(iz);438 G4int ntot = G4AtomicShells::GetNumberOfShells(iz); 437 439 G4int nmax = std::min(4, ntot); 438 440 G4double norm = 0.0; 439 441 G4double eshell = 0.0; 440 for(G4int j=1; j<nmax; j++) {441 G4double x = G4double(shells.GetNumberOfElectrons(iz,j));442 G4 double e1 = shells.GetBindingEnergy(iz,j);443 norm += x;444 eshell += e1* x;445 term += f*x*atomDensity[i]*LShell(e1/e0,eta)/Z;442 for(G4int j=1; j<nmax; ++j) { 443 G4double e1 = G4AtomicShells::GetBindingEnergy(iz,j); 444 G4int ne = G4AtomicShells::GetNumberOfElectrons(iz,j); 445 norm += ne; 446 eshell += e1*ne; 447 res += f*ne*LShell(e1/e0,eta); 446 448 } 447 if( 10 < iz) {449 if(ntot > nmax) { 448 450 eshell /= norm; 449 451 G4double eeff = eshell*eta; 450 for(G4int k=nmax; k<ntot; k++) {451 G4double x = G4double(shells.GetNumberOfElectrons(iz,k));452 G4double e1 = shells.GetBindingEnergy(iz,k);453 term += f*x*atomDensity[i]*LShell(e1/e0,eeff/e1)/Z;454 // term += f*x*atomDensity[i]*LShell(eshell/e0,eeff/e1)/Z;452 for(G4int k=nmax; k<ntot; ++k) { 453 G4int ne = G4AtomicShells::GetNumberOfElectrons(iz,k); 454 G4double e1 = G4AtomicShells::GetBindingEnergy(iz,k); 455 res += f*ne*LShell(e1/e0,eeff/e1); 456 //res += f*ne*LShell(e1/eshell,eeff/e1); 455 457 } 458 } 456 459 /* 457 460 if(28 >= iz) { 458 term += f*(Z - 10.)*atomDensity[i]*LShell(eshell,HM[iz-11]*eta)/Z;461 res += f*(Z - 10.)*LShell(eshell,HM[iz-11]*eta); 459 462 } else if(32 >= iz) { 460 term += f*18.0*atomDensity[i]*LShell(eshell,HM[iz-11]*eta)/Z;463 res += f*18.0*LShell(eshell,HM[iz-11]*eta); 461 464 } else if(60 >= iz) { 462 term += f*18.0*atomDensity[i]*LShell(eshell,HM[iz-11]*eta)/Z;463 term += f*(Z - 28.)*atomDensity[i]*LShell(eshell,HN[iz-33]*eta)/Z;465 res += f*18.0*LShell(eshell,HM[iz-11]*eta); 466 res += f*(Z - 28.)*LShell(eshell,HN[iz-33]*eta); 464 467 } else { 465 term += f*18.0*atomDensity[i]*LShell(eshell,HM[53]*eta)/Z;466 term += f*32.0*atomDensity[i]*LShell(eshell,HN[30]*eta)/Z;467 term += f*(Z - 60.)*atomDensity[i]*LShell(eshell,150.*eta)/Z;468 res += f*18.0*LShell(eshell,HM[50]*eta); 469 res += f*32.0*LShell(eshell,HN[30]*eta); 470 res += f*(Z - 60.)*LShell(eshell,150.*eta); 468 471 } 469 472 */ 470 }471 }472 //term += atomDensity[i]*MSH[iz]/(ba2*ba2);473 } 474 //term += atomDensity[i]*(res/Z + MSH[iz]/(ba2*ba2)); 475 term += res*atomDensity[i]/Z; 473 476 } 474 477 475 478 term /= material->GetTotNbOfAtomsPerVolume(); 479 //if(charge < 0.0) { term = -term; } 476 480 return term; 477 481 } … … 552 556 553 557 BarkasTerm *= 1.29*charge/material->GetTotNbOfAtomsPerVolume(); 558 559 // temporary protection 560 if(charge < -7.0 ) { BarkasTerm *= (-7.0/charge); } 561 554 562 return BarkasTerm; 555 563 } … … 574 582 } while (del > 0.01*term); 575 583 576 return -y2*term; 584 G4double res = -y2*term; 585 // temporary protection 586 if(q2 > 49. && res < -0.2) { res = -0.2; } 587 588 return res; 577 589 } 578 590 … … 808 820 ionList[idx] = ion; 809 821 stopData[idx] = vv; 810 if(verbose>1) G4cout << "End data set " << G4endl;822 if(verbose>1) { G4cout << "End data set " << G4endl; } 811 823 } 812 824 … … 1395 1407 18.2 1396 1408 }; 1397 for(i=0; i<53; i++) {HM[i] = hm[i];}1398 for(i=0; i<31; i++) {HN[i] = hn[i];}1409 for(i=0; i<53; ++i) {HM[i] = hm[i];} 1410 for(i=0; i<31; ++i) {HN[i] = hn[i];} 1399 1411 1400 1412 const G4double mm[93] = { -
trunk/source/processes/electromagnetic/utils/src/G4EmElementSelector.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmElementSelector.cc,v 1.1 1 2009/09/29 11:31:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmElementSelector.cc,v 1.12 2010/04/27 16:59:52 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 58 58 G4double emin, 59 59 G4double emax, 60 G4bool /*spline*/):60 G4bool spline): 61 61 model(mod), material(mat), nbins(bins), cutEnergy(-1.0), 62 62 lowEnergy(emin), highEnergy(emax) … … 68 68 if(nElmMinusOne > 0) { 69 69 xSections.reserve(n); 70 for(G4int i=0; i<n; ++i) { 71 G4PhysicsLogVector* v = new G4PhysicsLogVector(lowEnergy,highEnergy,nbins); 72 //v->SetSpline(spline); 70 G4PhysicsLogVector* v0 = new G4PhysicsLogVector(lowEnergy,highEnergy,nbins); 71 xSections.push_back(v0); 72 v0->SetSpline(spline); 73 for(G4int i=1; i<n; ++i) { 74 G4PhysicsLogVector* v = new G4PhysicsLogVector(*v0); 75 v->SetSpline(spline); 73 76 xSections.push_back(v); 74 77 } … … 102 105 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 103 106 104 G4int i;105 106 107 // loop over bins 107 108 for(G4int j=0; j<=nbins; ++j) { … … 110 111 cross = 0.0; 111 112 //G4cout << "j= " << j << " e(MeV)= " << e/MeV << G4endl; 112 for ( i=0; i<=nElmMinusOne; ++i) {113 for (G4int i=0; i<=nElmMinusOne; ++i) { 113 114 cross += theAtomNumDensityVector[i]* 114 115 model->ComputeCrossSectionPerAtom(part, (*theElementVector)[i], e, … … 119 120 120 121 // xSections start from null, so use probabilities from the next bin 121 if( DBL_MIN >= (*xSections[nElmMinusOne])[0]) {122 for ( i=0; i<=nElmMinusOne; ++i) {122 if(0.0 == (*xSections[nElmMinusOne])[0]) { 123 for (G4int i=0; i<=nElmMinusOne; ++i) { 123 124 xSections[i]->PutValue(0, (*xSections[i])[1]); 124 125 } 125 126 } 126 127 // xSections ends with null, so use probabilities from the previous bin 127 if( DBL_MIN >= (*xSections[nElmMinusOne])[nbins]) {128 for ( i=0; i<=nElmMinusOne; ++i) {128 if(0.0 == (*xSections[nElmMinusOne])[nbins]) { 129 for (G4int i=0; i<=nElmMinusOne; ++i) { 129 130 xSections[i]->PutValue(nbins, (*xSections[i])[nbins-1]); 130 131 } … … 134 135 cross = (*xSections[nElmMinusOne])[j]; 135 136 // only for positive X-section 136 if(cross > DBL_MIN) {137 for ( i=0; i<nElmMinusOne; ++i) {137 if(cross > 0.0) { 138 for (G4int i=0; i<nElmMinusOne; ++i) { 138 139 G4double x = (*xSections[i])[j]/cross; 139 140 xSections[i]->PutValue(j, x); -
trunk/source/processes/electromagnetic/utils/src/G4EmModelManager.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmModelManager.cc,v 1. 58 2009/10/29 18:07:08vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmModelManager.cc,v 1.60 2010/04/12 18:28:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 420 420 size_t idx = 1; 421 421 if(secondaryParticle) { 422 if( secondaryParticle == G4Gamma::Gamma() ) idx = 0;423 else if( secondaryParticle == G4Positron::Positron()) idx = 2;424 } 425 426 if(numOfCouples > theCuts.size()) { theCuts.resize(numOfCouples);}422 if( secondaryParticle == G4Gamma::Gamma() ) { idx = 0; } 423 else if( secondaryParticle == G4Positron::Positron()) { idx = 2; } 424 } 425 426 if(numOfCouples > theCuts.size()) { theCuts.resize(numOfCouples); } 427 427 if(minSubRange < 1.0 && numOfCouples > theSubCuts.size()) { 428 428 theSubCuts.resize(numOfCouples); … … 460 460 G4double tcutmax = 461 461 theCoupleTable->ConvertRangeToEnergy(secondaryParticle,material,rcut); 462 if(tcutmax < subcut) subcut = tcutmax;463 } 464 } 465 462 if(tcutmax < subcut) { subcut = tcutmax; } 463 } 464 } 465 /* 466 466 G4int nm = setOfRegionModels[reg]->NumberOfModels(); 467 467 for(G4int j=0; j<nm; ++j) { 468 468 469 469 G4VEmModel* model = models[setOfRegionModels[reg]->ModelIndex(j)]; 470 471 470 G4double tcutmin = model->MinEnergyCut(particle, couple); 472 471 473 if(cut < tcutmin) cut = tcutmin;474 if(subcut < tcutmin) subcut = tcutmin;472 if(cut < tcutmin) { cut = tcutmin; } 473 if(subcut < tcutmin) { subcut = tcutmin; } 475 474 if(1 < verboseLevel) { 476 475 G4cout << "The model # " << j … … 482 481 } 483 482 } 483 */ 484 484 theCuts[i] = cut; 485 if(minSubRange < 1.0) theSubCuts[i] = subcut;485 if(minSubRange < 1.0) { theSubCuts[i] = subcut; } 486 486 } 487 487 … … 497 497 } 498 498 } 499 if(1 == nn) severalModels = false;499 if(1 == nn) { severalModels = false; } 500 500 501 501 if(1 < verboseLevel) { -
trunk/source/processes/electromagnetic/utils/src/G4EmProcessOptions.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmProcessOptions.cc,v 1.2 7 2009/10/29 19:25:28vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmProcessOptions.cc,v 1.28 2010/04/27 16:59:52 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 { 80 80 theManager->SetLossFluctuations(val); 81 } 82 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 84 85 void G4EmProcessOptions::SetSubCutoff(G4bool val, const G4Region* r) 86 { 87 theManager->SetSubCutoff(val, r); 88 } 89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 91 92 void G4EmProcessOptions::SetIntegral(G4bool val) 93 { 94 theManager->SetIntegral(val); 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 99 void G4EmProcessOptions::SetMinSubRange(G4double val) 100 { 101 theManager->SetMinSubRange(val); 102 } 103 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 106 void G4EmProcessOptions::SetMinEnergy(G4double val) 107 { 108 theManager->SetMinEnergy(val); 109 } 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 112 113 void G4EmProcessOptions::SetMaxEnergy(G4double val) 114 { 115 theManager->SetMaxEnergy(val); 116 } 117 118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 119 120 void G4EmProcessOptions::SetMaxEnergyForCSDARange(G4double val) 121 { 122 theManager->SetMaxEnergyForCSDARange(val); 123 } 124 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 126 127 void G4EmProcessOptions::SetMaxEnergyForMuons(G4double val) 128 { 129 theManager->SetMaxEnergyForMuons(val); 130 } 131 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 133 134 void G4EmProcessOptions::SetDEDXBinning(G4int val) 135 { 136 theManager->SetDEDXBinning(val); 137 } 138 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 140 141 void G4EmProcessOptions::SetDEDXBinningForCSDARange(G4int val) 142 { 143 theManager->SetDEDXBinningForCSDARange(val); 144 } 145 146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 147 148 void G4EmProcessOptions::SetLambdaBinning(G4int val) 149 { 150 theManager->SetLambdaBinning(val); 151 } 152 153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 154 155 void G4EmProcessOptions::SetStepFunction(G4double v1, G4double v2) 156 { 157 theManager->SetStepFunction(v1, v2); 158 } 159 160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 161 162 void G4EmProcessOptions::SetRandomStep(G4bool val) 163 { 164 theManager->SetRandomStep(val); 165 } 166 167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 168 169 void G4EmProcessOptions::SetApplyCuts(G4bool val) 170 { 171 const std::vector<G4VEmProcess*>& w = 172 theManager->GetEmProcessVector(); 173 std::vector<G4VEmProcess*>::const_iterator itp; 174 for(itp = w.begin(); itp != w.end(); itp++) { 175 G4VEmProcess* q = *itp; 176 if(q) { q->SetApplyCuts(val); } 177 } 178 } 179 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 181 182 void G4EmProcessOptions::SetBuildCSDARange(G4bool val) 183 { 184 theManager->SetBuildCSDARange(val); 185 } 186 187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 188 189 void G4EmProcessOptions::SetVerbose(G4int val, const G4String& name) 190 { 191 G4bool all = false; 192 if("all" == name) { all = true; } 193 const std::vector<G4VEnergyLossProcess*>& v = 194 theManager->GetEnergyLossProcessVector(); 195 196 if(all) { 197 theManager->SetVerbose(val); 198 return; 199 } 200 201 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 202 for(itr = v.begin(); itr != v.end(); ++itr) { 203 G4VEnergyLossProcess* p = *itr; 204 if(p) { 205 if (p->GetProcessName() == name) { p->SetVerboseLevel(val); } 206 } 207 } 208 const std::vector<G4VEmProcess*>& w = 209 theManager->GetEmProcessVector(); 210 std::vector<G4VEmProcess*>::const_iterator itp; 211 for(itp = w.begin(); itp != w.end(); itp++) { 212 G4VEmProcess* q = *itp; 213 if(q) { 214 if (q->GetProcessName() == name) { q->SetVerboseLevel(val); } 215 } 216 } 217 const std::vector<G4VMultipleScattering*>& u = 218 theManager->GetMultipleScatteringVector(); 219 std::vector<G4VMultipleScattering*>::const_iterator itm; 220 for(itm = u.begin(); itm != u.end(); itm++) { 221 G4VMultipleScattering* s = *itm; 222 if(s) { 223 if (s->GetProcessName() == name) { s->SetVerboseLevel(val); } 224 } 225 } 226 } 227 228 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 229 230 void G4EmProcessOptions::SetLambdaFactor(G4double val) 231 { 81 232 const std::vector<G4VEnergyLossProcess*>& v = 82 233 theManager->GetEnergyLossProcessVector(); … … 84 235 for(itr = v.begin(); itr != v.end(); itr++) { 85 236 G4VEnergyLossProcess* p = *itr; 86 if(p) p->SetLossFluctuations(val); 87 } 88 } 89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 91 92 void G4EmProcessOptions::SetSubCutoff(G4bool val, const G4Region* r) 93 { 94 theManager->SetSubCutoff(val); 95 const std::vector<G4VEnergyLossProcess*>& v = 96 theManager->GetEnergyLossProcessVector(); 97 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 98 for(itr = v.begin(); itr != v.end(); itr++) { 99 G4VEnergyLossProcess* p = *itr; 100 if(p) p->ActivateSubCutoff(val, r); 101 } 102 } 103 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 106 void G4EmProcessOptions::SetIntegral(G4bool val) 107 { 108 theManager->SetIntegral(val); 109 const std::vector<G4VEnergyLossProcess*>& v = 110 theManager->GetEnergyLossProcessVector(); 111 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 112 for(itr = v.begin(); itr != v.end(); itr++) { 113 G4VEnergyLossProcess* p = *itr; 114 if(p) p->SetIntegral(val); 115 } 116 } 117 118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 119 120 void G4EmProcessOptions::SetMinSubRange(G4double val) 121 { 122 theManager->SetMinSubRange(val); 123 const std::vector<G4VEnergyLossProcess*>& v = 124 theManager->GetEnergyLossProcessVector(); 125 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 126 for(itr = v.begin(); itr != v.end(); itr++) { 127 G4VEnergyLossProcess* p = *itr; 128 if(p) p->SetMinSubRange(val); 129 } 130 } 131 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 133 134 void G4EmProcessOptions::SetMinEnergy(G4double val) 135 { 136 theManager->SetMinEnergy(val); 137 const std::vector<G4VEnergyLossProcess*>& v = 138 theManager->GetEnergyLossProcessVector(); 139 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 140 for(itr = v.begin(); itr != v.end(); itr++) { 141 G4VEnergyLossProcess* p = *itr; 142 if(p) p->SetMinKinEnergy(val); 143 } 144 const std::vector<G4VEmProcess*>& w = 145 theManager->GetEmProcessVector(); 146 std::vector<G4VEmProcess*>::const_iterator itp; 147 for(itp = w.begin(); itp != w.end(); itp++) { 148 G4VEmProcess* q = *itp; 149 if(q) q->SetMinKinEnergy(val); 150 } 151 const std::vector<G4VMultipleScattering*>& u = 152 theManager->GetMultipleScatteringVector(); 153 std::vector<G4VMultipleScattering*>::const_iterator itm; 154 for(itm = u.begin(); itm != u.end(); itm++) { 155 G4VMultipleScattering* s = *itm; 156 if(s) s->SetMinKinEnergy(val); 157 } 158 } 159 160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 161 162 void G4EmProcessOptions::SetMaxEnergy(G4double val) 163 { 164 theManager->SetMaxEnergy(val); 165 const std::vector<G4VEnergyLossProcess*>& v = 166 theManager->GetEnergyLossProcessVector(); 167 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 168 for(itr = v.begin(); itr != v.end(); itr++) { 169 G4VEnergyLossProcess* p = *itr; 170 if(p) p->SetMaxKinEnergy(val); 171 } 172 const std::vector<G4VEmProcess*>& w = 173 theManager->GetEmProcessVector(); 174 std::vector<G4VEmProcess*>::const_iterator itp; 175 for(itp = w.begin(); itp != w.end(); itp++) { 176 G4VEmProcess* q = *itp; 177 if(q) q->SetMaxKinEnergy(val); 178 } 179 const std::vector<G4VMultipleScattering*>& u = 180 theManager->GetMultipleScatteringVector(); 181 std::vector<G4VMultipleScattering*>::const_iterator itm; 182 for(itm = u.begin(); itm != u.end(); itm++) { 183 G4VMultipleScattering* s = *itm; 184 if(s) s->SetMaxKinEnergy(val); 185 } 186 } 187 188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 189 190 void G4EmProcessOptions::SetMaxEnergyForCSDARange(G4double val) 191 { 192 theManager->SetMaxEnergyForCSDARange(val); 193 const std::vector<G4VEnergyLossProcess*>& v = 194 theManager->GetEnergyLossProcessVector(); 195 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 196 for(itr = v.begin(); itr != v.end(); itr++) { 197 G4VEnergyLossProcess* p = *itr; 198 if(p) p->SetMaxKinEnergyForCSDARange(val); 199 } 200 } 201 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 203 204 void G4EmProcessOptions::SetMaxEnergyForMuons(G4double val) 205 { 206 theManager->SetMaxEnergyForMuons(val); 237 if(p) { p->SetLambdaFactor(val); } 238 } 239 } 240 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 242 243 void G4EmProcessOptions::ActivateDeexcitation(const G4String& pname, 244 G4bool val, 245 const G4String& reg) 246 { 247 G4RegionStore* regionStore = G4RegionStore::GetInstance(); 248 const G4Region* r = 0; 249 if(reg == "" || reg == "World") { 250 r = regionStore->GetRegion("DefaultRegionForTheWorld", false); 251 } else { 252 r = regionStore->GetRegion(reg, false); 253 } 254 if(!r) { 255 G4cout << "G4EmProcessOptions::ActivateDeexcitation ERROR: G4Region <" 256 << reg << "> not found, the command ignored" << G4endl; 257 return; 258 } 259 207 260 const std::vector<G4VEnergyLossProcess*>& v = 208 261 theManager->GetEnergyLossProcessVector(); … … 211 264 G4VEnergyLossProcess* p = *itr; 212 265 if(p) { 213 if(std::abs(p->Particle()->GetPDGMass() - 105.66*MeV) < MeV) 214 p->SetMaxKinEnergy(val); 266 if(pname == p->GetProcessName()) { p->ActivateDeexcitation(val,r); } 215 267 } 216 268 } … … 221 273 G4VEmProcess* q = *itp; 222 274 if(q) { 223 if(std::abs(q->Particle()->GetPDGMass() - 105.66*MeV) < MeV) 224 q->SetMaxKinEnergy(val); 225 } 226 } 227 /* 228 const std::vector<G4VMultipleScattering*>& u = 229 theManager->GetMultipleScatteringVector(); 230 std::vector<G4VMultipleScattering*>::const_iterator itm; 231 for(itm = u.begin(); itm != u.end(); itm++) { 232 G4VMultipleScattering* s = *itm; 233 if(s) { 234 if(std::abs(s->Particle()->GetPDGMass() - 105.66*MeV) < MeV) 235 s->SetMaxKinEnergy(val); 236 } 237 } 238 */ 239 } 240 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 242 243 void G4EmProcessOptions::SetDEDXBinning(G4int val) 244 { 245 theManager->SetDEDXBinning(val); 246 const std::vector<G4VEnergyLossProcess*>& v = 247 theManager->GetEnergyLossProcessVector(); 248 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 249 for(itr = v.begin(); itr != v.end(); itr++) { 250 G4VEnergyLossProcess* p = *itr; 251 if(p) p->SetDEDXBinning(val); 252 } 253 } 254 255 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 256 257 void G4EmProcessOptions::SetDEDXBinningForCSDARange(G4int val) 258 { 259 theManager->SetDEDXBinningForCSDARange(val); 260 const std::vector<G4VEnergyLossProcess*>& v = 261 theManager->GetEnergyLossProcessVector(); 262 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 263 for(itr = v.begin(); itr != v.end(); itr++) { 264 G4VEnergyLossProcess* p = *itr; 265 if(p) p->SetDEDXBinningForCSDARange(val); 266 } 267 } 268 269 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 270 271 void G4EmProcessOptions::SetLambdaBinning(G4int val) 272 { 273 theManager->SetLambdaBinning(val); 275 if(pname == q->GetProcessName()) { q->ActivateDeexcitation(val,r); } 276 } 277 } 278 } 279 280 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 281 282 void G4EmProcessOptions::SetMscStepLimitation(G4MscStepLimitType val) 283 { 284 const std::vector<G4VMultipleScattering*>& u = 285 theManager->GetMultipleScatteringVector(); 286 std::vector<G4VMultipleScattering*>::const_iterator itm; 287 for(itm = u.begin(); itm != u.end(); itm++) { 288 if(*itm) (*itm)->SetStepLimitType(val); 289 } 290 } 291 292 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 293 294 void G4EmProcessOptions::SetMscLateralDisplacement(G4bool val) 295 { 296 const std::vector<G4VMultipleScattering*>& u = 297 theManager->GetMultipleScatteringVector(); 298 std::vector<G4VMultipleScattering*>::const_iterator itm; 299 for(itm = u.begin(); itm != u.end(); itm++) { 300 if(*itm) { (*itm)->SetLateralDisplasmentFlag(val); } 301 } 302 } 303 304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 305 306 void G4EmProcessOptions::SetSkin(G4double val) 307 { 308 if(val < 0.0) return; 309 const std::vector<G4VMultipleScattering*>& u = 310 theManager->GetMultipleScatteringVector(); 311 std::vector<G4VMultipleScattering*>::const_iterator itm; 312 for(itm = u.begin(); itm != u.end(); itm++) { 313 if(*itm) { (*itm)->SetSkin(val); } 314 } 315 } 316 317 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 318 319 void G4EmProcessOptions::SetMscRangeFactor(G4double val) 320 { 321 if(val < 0.0) return; 322 const std::vector<G4VMultipleScattering*>& u = 323 theManager->GetMultipleScatteringVector(); 324 std::vector<G4VMultipleScattering*>::const_iterator itm; 325 for(itm = u.begin(); itm != u.end(); itm++) { 326 if(*itm) { (*itm)->SetRangeFactor(val); } 327 } 328 } 329 330 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 331 332 void G4EmProcessOptions::SetMscGeomFactor(G4double val) 333 { 334 if(val < 0.0) { return; } 335 const std::vector<G4VMultipleScattering*>& u = 336 theManager->GetMultipleScatteringVector(); 337 std::vector<G4VMultipleScattering*>::const_iterator itm; 338 for(itm = u.begin(); itm != u.end(); itm++) { 339 if(*itm) { (*itm)->SetGeomFactor(val); } 340 } 341 } 342 343 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 344 345 void G4EmProcessOptions::SetPolarAngleLimit(G4double val) 346 { 347 const std::vector<G4VMultipleScattering*>& u = 348 theManager->GetMultipleScatteringVector(); 349 std::vector<G4VMultipleScattering*>::const_iterator itm; 350 for(itm = u.begin(); itm != u.end(); itm++) { 351 if(*itm) { (*itm)->SetPolarAngleLimit(val); } 352 } 274 353 const std::vector<G4VEmProcess*>& w = 275 354 theManager->GetEmProcessVector(); … … 277 356 for(itp = w.begin(); itp != w.end(); itp++) { 278 357 G4VEmProcess* q = *itp; 279 if(q) q->SetLambdaBinning(val); 280 } 281 const std::vector<G4VMultipleScattering*>& u = 282 theManager->GetMultipleScatteringVector(); 283 std::vector<G4VMultipleScattering*>::const_iterator itm; 284 for(itm = u.begin(); itm != u.end(); itm++) { 285 G4VMultipleScattering* s = *itm; 286 if(s) s->SetBinning(val); 287 } 288 } 289 290 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 291 292 void G4EmProcessOptions::SetStepFunction(G4double v1, G4double v2) 293 { 294 theManager->SetStepFunction(v1, v2); 295 const std::vector<G4VEnergyLossProcess*>& v = 296 theManager->GetEnergyLossProcessVector(); 297 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 298 for(itr = v.begin(); itr != v.end(); itr++) { 299 G4VEnergyLossProcess* p = *itr; 300 if(p) p->SetStepFunction(v1, v2); 301 } 302 } 303 304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 305 306 void G4EmProcessOptions::SetRandomStep(G4bool val) 307 { 308 theManager->SetRandomStep(val); 309 const std::vector<G4VEnergyLossProcess*>& v = 310 theManager->GetEnergyLossProcessVector(); 311 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 312 for(itr = v.begin(); itr != v.end(); itr++) { 313 G4VEnergyLossProcess* p = *itr; 314 if(p) p->SetRandomStep(val); 315 } 316 } 317 318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 319 320 void G4EmProcessOptions::SetApplyCuts(G4bool val) 321 { 322 const std::vector<G4VEmProcess*>& w = 323 theManager->GetEmProcessVector(); 324 std::vector<G4VEmProcess*>::const_iterator itp; 325 for(itp = w.begin(); itp != w.end(); itp++) { 326 G4VEmProcess* q = *itp; 327 if(q) q->SetApplyCuts(val); 328 } 329 } 330 331 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 332 333 void G4EmProcessOptions::SetBuildCSDARange(G4bool val) 334 { 335 theManager->SetBuildCSDARange(val); 336 } 337 338 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 339 340 void G4EmProcessOptions::SetVerbose(G4int val, const G4String& name) 341 { 342 G4bool all = false; 343 if("all" == name) all = true; 344 const std::vector<G4VEnergyLossProcess*>& v = 345 theManager->GetEnergyLossProcessVector(); 346 347 if(all) theManager->SetVerbose(val); 348 349 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 350 for(itr = v.begin(); itr != v.end(); itr++) { 351 G4VEnergyLossProcess* p = *itr; 352 if(p) { 353 if(all) p->SetVerboseLevel(val); 354 else if (p->GetProcessName() == name) p->SetVerboseLevel(val); 355 } 356 } 357 const std::vector<G4VEmProcess*>& w = 358 theManager->GetEmProcessVector(); 359 std::vector<G4VEmProcess*>::const_iterator itp; 360 for(itp = w.begin(); itp != w.end(); itp++) { 361 G4VEmProcess* q = *itp; 362 if(q) { 363 if(all) q->SetVerboseLevel(val); 364 else if (q->GetProcessName() == name) q->SetVerboseLevel(val); 365 } 366 } 367 const std::vector<G4VMultipleScattering*>& u = 368 theManager->GetMultipleScatteringVector(); 369 std::vector<G4VMultipleScattering*>::const_iterator itm; 370 for(itm = u.begin(); itm != u.end(); itm++) { 371 G4VMultipleScattering* s = *itm; 372 if(s) { 373 if(all) s->SetVerboseLevel(val); 374 else if (s->GetProcessName() == name) s->SetVerboseLevel(val); 375 } 376 } 377 } 378 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 380 381 void G4EmProcessOptions::SetLambdaFactor(G4double val) 382 { 383 const std::vector<G4VEnergyLossProcess*>& v = 384 theManager->GetEnergyLossProcessVector(); 385 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 386 for(itr = v.begin(); itr != v.end(); itr++) { 387 G4VEnergyLossProcess* p = *itr; 388 if(p) p->SetLambdaFactor(val); 389 } 390 391 } 392 393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 394 395 void G4EmProcessOptions::ActivateDeexcitation(const G4String& pname, 396 G4bool val, 397 const G4String& reg) 398 { 399 G4RegionStore* regionStore = G4RegionStore::GetInstance(); 400 const G4Region* r = 0; 401 if(reg == "" || reg == "World") { 402 r = regionStore->GetRegion("DefaultRegionForTheWorld", false); 403 } else { 404 r = regionStore->GetRegion(reg, false); 405 } 406 if(!r) { 407 G4cout << "G4EmProcessOptions::ActivateDeexcitation ERROR: G4Region <" 408 << reg << "> not found, the command ignored" << G4endl; 409 return; 410 } 411 412 const std::vector<G4VEnergyLossProcess*>& v = 413 theManager->GetEnergyLossProcessVector(); 414 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 415 for(itr = v.begin(); itr != v.end(); itr++) { 416 G4VEnergyLossProcess* p = *itr; 417 if(p) { 418 if(pname == p->GetProcessName()) p->ActivateDeexcitation(val,r); 419 } 420 } 421 const std::vector<G4VEmProcess*>& w = 422 theManager->GetEmProcessVector(); 423 std::vector<G4VEmProcess*>::const_iterator itp; 424 for(itp = w.begin(); itp != w.end(); itp++) { 425 G4VEmProcess* q = *itp; 426 if(q) { 427 if(pname == q->GetProcessName()) q->ActivateDeexcitation(val,r); 428 } 429 } 430 } 431 432 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 433 434 void G4EmProcessOptions::SetMscStepLimitation(G4MscStepLimitType val) 435 { 436 const std::vector<G4VMultipleScattering*>& u = 437 theManager->GetMultipleScatteringVector(); 438 std::vector<G4VMultipleScattering*>::const_iterator itm; 439 for(itm = u.begin(); itm != u.end(); itm++) { 440 if(*itm) (*itm)->SetStepLimitType(val); 441 } 442 } 443 444 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 445 446 void G4EmProcessOptions::SetMscLateralDisplacement(G4bool val) 447 { 448 const std::vector<G4VMultipleScattering*>& u = 449 theManager->GetMultipleScatteringVector(); 450 std::vector<G4VMultipleScattering*>::const_iterator itm; 451 for(itm = u.begin(); itm != u.end(); itm++) { 452 if(*itm) (*itm)->SetLateralDisplasmentFlag(val); 453 } 454 } 455 456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 457 458 void G4EmProcessOptions::SetSkin(G4double val) 459 { 460 if(val < 0.0) return; 461 const std::vector<G4VMultipleScattering*>& u = 462 theManager->GetMultipleScatteringVector(); 463 std::vector<G4VMultipleScattering*>::const_iterator itm; 464 for(itm = u.begin(); itm != u.end(); itm++) { 465 if(*itm) { 466 (*itm)->SetSkin(val); 467 } 468 } 469 } 470 471 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 472 473 void G4EmProcessOptions::SetMscRangeFactor(G4double val) 474 { 475 if(val < 0.0) return; 476 const std::vector<G4VMultipleScattering*>& u = 477 theManager->GetMultipleScatteringVector(); 478 std::vector<G4VMultipleScattering*>::const_iterator itm; 479 for(itm = u.begin(); itm != u.end(); itm++) { 480 if(*itm) (*itm)->SetRangeFactor(val); 481 } 482 } 483 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 485 486 void G4EmProcessOptions::SetMscGeomFactor(G4double val) 487 { 488 if(val < 0.0) return; 489 const std::vector<G4VMultipleScattering*>& u = 490 theManager->GetMultipleScatteringVector(); 491 std::vector<G4VMultipleScattering*>::const_iterator itm; 492 for(itm = u.begin(); itm != u.end(); itm++) { 493 if(*itm) (*itm)->SetGeomFactor(val); 494 } 495 } 496 497 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 498 499 void G4EmProcessOptions::SetPolarAngleLimit(G4double val) 500 { 501 const std::vector<G4VMultipleScattering*>& u = 502 theManager->GetMultipleScatteringVector(); 503 std::vector<G4VMultipleScattering*>::const_iterator itm; 504 for(itm = u.begin(); itm != u.end(); itm++) { 505 if(*itm) (*itm)->SetPolarAngleLimit(val); 506 } 507 const std::vector<G4VEmProcess*>& w = 508 theManager->GetEmProcessVector(); 509 std::vector<G4VEmProcess*>::const_iterator itp; 510 for(itp = w.begin(); itp != w.end(); itp++) { 511 G4VEmProcess* q = *itp; 512 if(q) q->SetPolarAngleLimit(val); 358 if(q) { q->SetPolarAngleLimit(val); } 513 359 } 514 360 } -
trunk/source/processes/electromagnetic/utils/src/G4LossTableManager.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LossTableManager.cc,v 1. 97 2009/10/29 19:25:28vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4LossTableManager.cc,v 1.101 2010/06/04 15:33:56 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 70 70 // 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko) 71 71 // 18-06-07 Move definition of msc parameters to G4EmProcessOptions (V.Ivanchenko) 72 // 21-02-08 Add G4EmSaturation (V.Ivanchenko) 72 // 21-02-08 Added G4EmSaturation (V.Ivanchenko) 73 // 12-04-10 Added PreparePhsyicsTables and BuildPhysicsTables entries (V.Ivanchenko) 73 74 // 74 75 // Class Description: … … 96 97 #include "G4EmTableType.hh" 97 98 #include "G4LossTableBuilder.hh" 99 #include "G4Region.hh" 98 100 99 101 G4LossTableManager* G4LossTableManager::theInstance = 0; … … 114 116 G4LossTableManager::~G4LossTableManager() 115 117 { 116 for (G4int i=0; i<n_loss; i++) {117 if( loss_vector[i] ) delete loss_vector[i];118 for (G4int i=0; i<n_loss; ++i) { 119 if( loss_vector[i] ) { delete loss_vector[i]; } 118 120 } 119 121 size_t msc = msc_vector.size(); 120 for (size_t j=0; j<msc; j++) {121 if( msc_vector[j] ) delete msc_vector[j];122 for (size_t j=0; j<msc; ++j) { 123 if( msc_vector[j] ) { delete msc_vector[j]; } 122 124 } 123 125 size_t emp = emp_vector.size(); 124 for (size_t k=0; k<emp; k++) {125 if( emp_vector[k] ) delete emp_vector[k];126 for (size_t k=0; k<emp; ++k) { 127 if( emp_vector[k] ) { delete emp_vector[k]; } 126 128 } 127 129 size_t mod = mod_vector.size(); 128 for (size_t a=0; a<mod; a++) {129 if( mod_vector[a] ) delete mod_vector[a];130 for (size_t a=0; a<mod; ++a) { 131 if( mod_vector[a] ) { delete mod_vector[a]; } 130 132 } 131 133 size_t fmod = fmod_vector.size(); 132 for (size_t b=0; b<fmod; b++) {133 if( fmod_vector[b] ) delete fmod_vector[b];134 for (size_t b=0; b<fmod; ++b) { 135 if( fmod_vector[b] ) { delete fmod_vector[b]; } 134 136 } 135 137 Clear(); … … 146 148 n_loss = 0; 147 149 run = 0; 148 // first_entry = true;150 startInitialisation = false; 149 151 all_tables_are_built = false; 150 all_tables_are_stored = false;151 152 currentLoss = 0; 152 153 currentParticle = 0; 154 firstParticle = 0; 153 155 lossFluctuationFlag = true; 154 156 subCutoffFlag = false; … … 158 160 maxFinalStep = 0.0; 159 161 minKinEnergy = 0.1*keV; 160 maxKinEnergy = 100.0*TeV; 161 maxKinEnergyForMuons = 100.*TeV; 162 theMessenger = new G4EnergyLossMessenger(); 163 theElectron = G4Electron::Electron(); 164 tableBuilder = new G4LossTableBuilder(); 165 emCorrections= new G4EmCorrections(); 166 emSaturation = new G4EmSaturation(); 167 emConfigurator = new G4EmConfigurator(); 162 maxKinEnergy = 10.0*TeV; 163 nbinsLambda = 77; 164 nbinsPerDecade = 7; 165 maxKinEnergyForMuons = 10.*TeV; 168 166 integral = true; 169 167 integralActive = false; … … 178 176 factorForAngleLimit = 1.0; 179 177 verbose = 1; 178 theMessenger = new G4EnergyLossMessenger(); 179 theElectron = G4Electron::Electron(); 180 tableBuilder = new G4LossTableBuilder(); 181 emCorrections= new G4EmCorrections(); 182 emSaturation = new G4EmSaturation(); 183 emConfigurator = new G4EmConfigurator(verbose); 180 184 tableBuilder->SetSplineFlag(splineFlag); 181 185 } … … 207 211 void G4LossTableManager::Register(G4VEnergyLossProcess* p) 208 212 { 209 n_loss++;213 ++n_loss; 210 214 loss_vector.push_back(p); 211 215 part_vector.push_back(0); … … 217 221 isActive.push_back(true); 218 222 all_tables_are_built = false; 219 if(!lossFluctuationFlag) p->SetLossFluctuations(false);220 if(subCutoffFlag) p->ActivateSubCutoff(true);221 if(rndmStepFlag) p->SetRandomStep(true);222 if(stepFunctionActive) p->SetStepFunction(maxRangeVariation, maxFinalStep);223 if(integralActive) p->SetIntegral(integral);224 if(minEnergyActive) p->SetMinKinEnergy(minKinEnergy);225 if(maxEnergyActive) p->SetMaxKinEnergy(maxKinEnergy);223 if(!lossFluctuationFlag) { p->SetLossFluctuations(false); } 224 if(subCutoffFlag) { p->ActivateSubCutoff(true); } 225 if(rndmStepFlag) { p->SetRandomStep(true); } 226 if(stepFunctionActive) { p->SetStepFunction(maxRangeVariation, maxFinalStep); } 227 if(integralActive) { p->SetIntegral(integral); } 228 if(minEnergyActive) { p->SetMinKinEnergy(minKinEnergy); } 229 if(maxEnergyActive) { p->SetMaxKinEnergy(maxKinEnergy); } 226 230 if(verbose > 1) 227 231 G4cout << "G4LossTableManager::Register G4VEnergyLossProcess : " … … 233 237 void G4LossTableManager::DeRegister(G4VEnergyLossProcess* p) 234 238 { 235 for (G4int i=0; i<n_loss; i++) {236 if(loss_vector[i] == p) loss_vector[i] = 0;239 for (G4int i=0; i<n_loss; ++i) { 240 if(loss_vector[i] == p) { loss_vector[i] = 0; } 237 241 } 238 242 } … … 254 258 { 255 259 size_t msc = msc_vector.size(); 256 for (size_t i=0; i<msc; i++) {257 if(msc_vector[i] == p) msc_vector[i] = 0;260 for (size_t i=0; i<msc; ++i) { 261 if(msc_vector[i] == p) { msc_vector[i] = 0; } 258 262 } 259 263 } … … 275 279 { 276 280 size_t emp = emp_vector.size(); 277 for (size_t i=0; i<emp; i++) {278 if(emp_vector[i] == p) emp_vector[i] = 0;281 for (size_t i=0; i<emp; ++i) { 282 if(emp_vector[i] == p) { emp_vector[i] = 0; } 279 283 } 280 284 } … … 296 300 { 297 301 size_t n = mod_vector.size(); 298 for (size_t i=0; i<n; i++) {299 if(mod_vector[i] == p) mod_vector[i] = 0;302 for (size_t i=0; i<n; ++i) { 303 if(mod_vector[i] == p) { mod_vector[i] = 0; } 300 304 } 301 305 } … … 317 321 { 318 322 size_t n = fmod_vector.size(); 319 for (size_t i=0; i<n; i++) {320 if(fmod_vector[i] == p) fmod_vector[i] = 0;323 for (size_t i=0; i<n; ++i) { 324 if(fmod_vector[i] == p) { fmod_vector[i] = 0; } 321 325 } 322 326 } … … 336 340 G4VEnergyLossProcess* p) 337 341 { 338 n_loss++;342 ++n_loss; 339 343 loss_vector.push_back(p); 340 344 part_vector.push_back(part); … … 349 353 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 350 354 351 void G4LossTableManager::EnergyLossProcessIsInitialised( 352 const G4ParticleDefinition* particle, 353 G4VEnergyLossProcess* p) 354 { 355 if (run == 0 || (particle == firstParticle && all_tables_are_built) ) { 355 void 356 G4LossTableManager::PreparePhysicsTable(const G4ParticleDefinition* particle, 357 G4VEnergyLossProcess* p) 358 { 359 if (1 < verbose) { 360 G4cout << "G4LossTableManager::PreparePhysicsTable for " 361 << particle->GetParticleName() 362 << " and " << p->GetProcessName() << " run= " << run << G4endl; 363 } 364 // start initialisation for the first run 365 startInitialisation = true; 366 367 if( 0 == run ) { 368 emConfigurator->PrepareModels(particle, p); 369 370 // initialise particles for given process 371 for (G4int j=0; j<n_loss; ++j) { 372 if (p == loss_vector[j]) { 373 if (!part_vector[j]) { part_vector[j] = particle; } 374 } 375 } 376 } 377 } 378 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 380 381 void 382 G4LossTableManager::PreparePhysicsTable(const G4ParticleDefinition* particle, 383 G4VEmProcess* p) 384 { 385 if (1 < verbose) { 386 G4cout << "G4LossTableManager::PreparePhysicsTable for " 387 << particle->GetParticleName() 388 << " and " << p->GetProcessName() << G4endl; 389 } 390 // start initialisation for the first run 391 if( 0 == run ) { 392 emConfigurator->PrepareModels(particle, p); 393 } 394 startInitialisation = true; 395 } 396 397 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 398 399 void 400 G4LossTableManager::PreparePhysicsTable(const G4ParticleDefinition* particle, 401 G4VMultipleScattering* p) 402 { 403 if (1 < verbose) { 404 G4cout << "G4LossTableManager::PreparePhysicsTable for " 405 << particle->GetParticleName() 406 << " and " << p->GetProcessName() << G4endl; 407 } 408 // start initialisation for the first run 409 if( 0 == run ) { 410 emConfigurator->PrepareModels(particle, p); 411 } 412 } 413 414 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 415 416 void 417 G4LossTableManager::BuildPhysicsTable(const G4ParticleDefinition*) 418 { 419 if(0 == run && startInitialisation) { 420 emConfigurator->Clear(); 421 } 422 } 423 424 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 425 426 void G4LossTableManager::BuildPhysicsTable( 427 const G4ParticleDefinition* aParticle, 428 G4VEnergyLossProcess* p) 429 { 430 if(1 < verbose) { 431 G4cout << "### G4LossTableManager::BuildDEDXTable() is requested for " 432 << aParticle->GetParticleName() 433 << " and process " << p->GetProcessName() 434 << G4endl; 435 } 436 // clear configurator 437 if(0 == run && startInitialisation) { 438 emConfigurator->Clear(); 439 firstParticle = aParticle; 440 } 441 startInitialisation = false; 442 443 // initialisation before any table is built 444 if ( aParticle == firstParticle ) { 356 445 all_tables_are_built = true; 357 446 358 if(1 < verbose) 359 G4cout << "### G4LossTableManager start initilisation of tables" 447 if(1 < verbose) { 448 G4cout << "### G4LossTableManager start initilisation for first particle " 449 << firstParticle->GetParticleName() 360 450 << G4endl; 361 for (G4int i=0; i<n_loss; i++) { 451 } 452 for (G4int i=0; i<n_loss; ++i) { 362 453 G4VEnergyLossProcess* el = loss_vector[i]; 363 454 … … 365 456 const G4ProcessManager* pm = el->GetProcessManager(); 366 457 isActive[i] = pm->GetProcessActivation(el); 458 if(0 == run) { base_part_vector[i] = el->BaseParticle(); } 367 459 tables_are_built[i] = false; 368 all_tables_are_built = false;369 if(!isActive[i]) el->SetIonisation(false);460 all_tables_are_built= false; 461 if(!isActive[i]) { el->SetIonisation(false); } 370 462 371 463 if(1 < verbose) { … … 374 466 << " active= " << pm->GetProcessActivation(el) 375 467 << " table= " << tables_are_built[i] 376 << " isIonisation= " << el->IsIonisationProcess() 377 << G4endl; 468 << " isIonisation= " << el->IsIonisationProcess(); 469 if(base_part_vector[i]) { 470 G4cout << " base particle " << base_part_vector[i]->GetParticleName(); 471 } 472 G4cout << G4endl; 378 473 } 379 474 } else { … … 382 477 } 383 478 } 384 if (0 == run) firstParticle = particle; 385 run++; 386 } 387 388 currentParticle = 0; 389 390 SetParameters(p); 391 for (G4int j=0; j<n_loss; j++) { 392 if (p == loss_vector[j]) { 393 394 if (!part_vector[j]) { 395 part_vector[j] = particle; 396 base_part_vector[j] = p->BaseParticle(); 479 ++run; 480 currentParticle = 0; 481 } 482 483 // Set run time parameters 484 SetParameters(aParticle, p); 485 486 if (all_tables_are_built) { return; } 487 488 // Build tables for given particle 489 all_tables_are_built = true; 490 491 for(G4int i=0; i<n_loss; ++i) { 492 if(p == loss_vector[i] && !tables_are_built[i] && !base_part_vector[i]) { 493 const G4ParticleDefinition* curr_part = part_vector[i]; 494 if(1 < verbose) { 495 G4cout << "### BuildPhysicsTable for " << p->GetProcessName() 496 << " and " << curr_part->GetParticleName() 497 << " start BuildTable " << G4endl; 397 498 } 398 if(maxEnergyForMuonsActive) {399 G4double dm = std::abs(particle->GetPDGMass() - 105.7*MeV);400 if(dm < 5.*MeV) p->SetMaxKinEnergy(maxKinEnergyForMuons);401 }402 403 if(1 < verbose) {404 G4cout << "For " << p->GetProcessName()405 << " for " << part_vector[j]->GetParticleName()406 << " tables_are_built= " << tables_are_built[j]407 << " procFlag= " << loss_vector[j]->TablesAreBuilt()408 << " all_tables_are_built= " << all_tables_are_built409 << G4endl;410 }411 }412 }413 }414 415 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....416 417 G4EnergyLossMessenger* G4LossTableManager::GetMessenger()418 {419 return theMessenger;420 }421 422 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....423 424 void G4LossTableManager::ParticleHaveNoLoss(425 const G4ParticleDefinition* aParticle)426 {427 G4String s = " dE/dx table not found for "428 + aParticle->GetParticleName() + " !";429 G4Exception("G4LossTableManager::ParticleHaveNoLoss", "EM01",430 FatalException, s);431 432 }433 434 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....435 436 G4bool G4LossTableManager::BuildCSDARange() const437 {438 return buildCSDARange;439 }440 441 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....442 443 void G4LossTableManager::BuildPhysicsTable(444 const G4ParticleDefinition* aParticle,445 G4VEnergyLossProcess* p)446 {447 if(1 < verbose) {448 G4cout << "### G4LossTableManager::BuildDEDXTable() is requested for "449 << aParticle->GetParticleName()450 << " and process " << p->GetProcessName()451 << G4endl;452 }453 if (all_tables_are_built) return;454 all_tables_are_built = true;455 456 for(G4int i=0; i<n_loss; i++) {457 if(!tables_are_built[i] && !base_part_vector[i]) {458 const G4ParticleDefinition* curr_part = part_vector[i];459 499 G4VEnergyLossProcess* curr_proc = BuildTables(curr_part); 460 if(curr_proc) CopyTables(curr_part, curr_proc); 461 } 462 } 463 464 for (G4int ii=0; ii<n_loss; ii++) { 465 if ( !tables_are_built[ii] ) { 466 all_tables_are_built = false; 467 break; 468 } 500 if(curr_proc) { CopyTables(curr_part, curr_proc); } 501 } 502 if ( !tables_are_built[i] ) { all_tables_are_built = false; } 469 503 } 470 504 … … 473 507 << "all_tables_are_built= " << all_tables_are_built 474 508 << G4endl; 475 476 if(all_tables_are_built) 509 510 if(all_tables_are_built) { 477 511 G4cout << "### All dEdx and Range tables are built #####" << G4endl; 512 } 478 513 } 479 514 } … … 484 519 G4VEnergyLossProcess* base_proc) 485 520 { 486 for (G4int j=0; j<n_loss; j++) {521 for (G4int j=0; j<n_loss; ++j) { 487 522 488 523 G4VEnergyLossProcess* proc = loss_vector[j]; 489 if(proc == base_proc || proc->Particle() == part)490 tables_are_built[j] = true;524 //if(proc == base_proc || proc->Particle() == part) 525 // tables_are_built[j] = true; 491 526 492 527 if (!tables_are_built[j] && part == base_part_vector[j]) { … … 511 546 } 512 547 513 if (theElectron == part && theElectron == proc->SecondaryParticle() ) 548 if (theElectron == part && theElectron == proc->SecondaryParticle() ) { 514 549 proc->SetSecondaryRangeTable(base_proc->RangeTableForLoss()); 550 } 515 551 } 516 552 } … … 535 571 G4int i; 536 572 537 for (i=0; i<n_loss; i++) {573 for (i=0; i<n_loss; ++i) { 538 574 p = loss_vector[i]; 539 575 if (p && aParticle == part_vector[i] && !tables_are_built[i]) { … … 602 638 std::vector<G4PhysicsTable*> listCSDA; 603 639 604 for (i=0; i<n_dedx; i++) {640 for (i=0; i<n_dedx; ++i) { 605 641 p = loss_list[i]; 606 642 p->SetIonisation(false); … … 658 694 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 659 695 696 G4EnergyLossMessenger* G4LossTableManager::GetMessenger() 697 { 698 return theMessenger; 699 } 700 701 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 702 703 void G4LossTableManager::ParticleHaveNoLoss( 704 const G4ParticleDefinition* aParticle) 705 { 706 G4String s = " dE/dx table not found for " 707 + aParticle->GetParticleName() + " !"; 708 G4Exception("G4LossTableManager::ParticleHaveNoLoss", "EM01", 709 FatalException, s); 710 711 } 712 713 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 714 715 G4bool G4LossTableManager::BuildCSDARange() const 716 { 717 return buildCSDARange; 718 } 719 720 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 721 660 722 void G4LossTableManager::SetLossFluctuations(G4bool val) 661 723 { 662 724 lossFluctuationFlag = val; 663 for(G4int i=0; i<n_loss; i++) {664 if(loss_vector[i]) loss_vector[i]->SetLossFluctuations(val);665 } 666 } 667 668 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 669 670 void G4LossTableManager::SetSubCutoff(G4bool val )725 for(G4int i=0; i<n_loss; ++i) { 726 if(loss_vector[i]) { loss_vector[i]->SetLossFluctuations(val); } 727 } 728 } 729 730 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 731 732 void G4LossTableManager::SetSubCutoff(G4bool val, const G4Region* r) 671 733 { 672 734 subCutoffFlag = val; 673 for(G4int i=0; i<n_loss; i++) {674 if(loss_vector[i]) loss_vector[i]->ActivateSubCutoff(val);735 for(G4int i=0; i<n_loss; ++i) { 736 if(loss_vector[i]) { loss_vector[i]->ActivateSubCutoff(val, r); } 675 737 } 676 738 } … … 682 744 integral = val; 683 745 integralActive = true; 684 for(G4int i=0; i<n_loss; i++) {685 if(loss_vector[i]) loss_vector[i]->SetIntegral(val);746 for(G4int i=0; i<n_loss; ++i) { 747 if(loss_vector[i]) { loss_vector[i]->SetIntegral(val); } 686 748 } 687 749 size_t emp = emp_vector.size(); 688 for (size_t k=0; k<emp; k++) {689 if(emp_vector[k]) emp_vector[k]->SetIntegral(val);750 for (size_t k=0; k<emp; ++k) { 751 if(emp_vector[k]) { emp_vector[k]->SetIntegral(val); } 690 752 } 691 753 } … … 696 758 { 697 759 minSubRange = val; 698 for(G4int i=0; i<n_loss; i++) {699 if(loss_vector[i]) loss_vector[i]->SetMinSubRange(val);760 for(G4int i=0; i<n_loss; ++i) { 761 if(loss_vector[i]) { loss_vector[i]->SetMinSubRange(val); } 700 762 } 701 763 } … … 706 768 { 707 769 rndmStepFlag = val; 708 for(G4int i=0; i<n_loss; i++) {709 if(loss_vector[i]) loss_vector[i]->SetRandomStep(val);770 for(G4int i=0; i<n_loss; ++i) { 771 if(loss_vector[i]) { loss_vector[i]->SetRandomStep(val); } 710 772 } 711 773 } … … 717 779 minEnergyActive = true; 718 780 minKinEnergy = val; 719 for(G4int i=0; i<n_loss; i++) {720 if(loss_vector[i]) loss_vector[i]->SetMinKinEnergy(val);781 for(G4int i=0; i<n_loss; ++i) { 782 if(loss_vector[i]) { loss_vector[i]->SetMinKinEnergy(val); } 721 783 } 722 784 size_t msc = msc_vector.size(); 723 for (size_t j=0; j<msc; j++) {724 if(msc_vector[j]) msc_vector[j]->SetMinKinEnergy(val);785 for (size_t j=0; j<msc; ++j) { 786 if(msc_vector[j]) { msc_vector[j]->SetMinKinEnergy(val); } 725 787 } 726 788 size_t emp = emp_vector.size(); 727 for (size_t k=0; k<emp; k++) {728 if(emp_vector[k]) emp_vector[k]->SetMinKinEnergy(val);789 for (size_t k=0; k<emp; ++k) { 790 if(emp_vector[k]) { emp_vector[k]->SetMinKinEnergy(val); } 729 791 } 730 792 } … … 736 798 maxEnergyActive = true; 737 799 maxKinEnergy = val; 738 for(G4int i=0; i<n_loss; i++) {739 if(loss_vector[i]) loss_vector[i]->SetMaxKinEnergy(val);800 for(G4int i=0; i<n_loss; ++i) { 801 if(loss_vector[i]) { loss_vector[i]->SetMaxKinEnergy(val); } 740 802 } 741 803 size_t msc = msc_vector.size(); 742 for (size_t j=0; j<msc; j++) {743 if(msc_vector[j]) msc_vector[j]->SetMaxKinEnergy(val);804 for (size_t j=0; j<msc; ++j) { 805 if(msc_vector[j]) { msc_vector[j]->SetMaxKinEnergy(val); } 744 806 } 745 807 size_t emp = emp_vector.size(); 746 for (size_t k=0; k<emp; k++) {747 if(emp_vector[k]) emp_vector[k]->SetMaxKinEnergy(val);808 for (size_t k=0; k<emp; ++k) { 809 if(emp_vector[k]) { emp_vector[k]->SetMaxKinEnergy(val); } 748 810 } 749 811 } … … 753 815 void G4LossTableManager::SetMaxEnergyForCSDARange(G4double val) 754 816 { 755 for(G4int i=0; i<n_loss; i++) {756 if(loss_vector[i]) loss_vector[i]->SetMaxKinEnergyForCSDARange(val);817 for(G4int i=0; i<n_loss; ++i) { 818 if(loss_vector[i]) { loss_vector[i]->SetMaxKinEnergyForCSDARange(val); } 757 819 } 758 820 } … … 770 832 void G4LossTableManager::SetDEDXBinning(G4int val) 771 833 { 772 for(G4int i=0; i<n_loss; i++) {773 if(loss_vector[i]) loss_vector[i]->SetDEDXBinning(val);834 for(G4int i=0; i<n_loss; ++i) { 835 if(loss_vector[i]) { loss_vector[i]->SetDEDXBinning(val); } 774 836 } 775 837 } … … 779 841 void G4LossTableManager::SetDEDXBinningForCSDARange(G4int val) 780 842 { 781 for(G4int i=0; i<n_loss; i++) {782 if(loss_vector[i]) loss_vector[i]->SetDEDXBinningForCSDARange(val);843 for(G4int i=0; i<n_loss; ++i) { 844 if(loss_vector[i]) { loss_vector[i]->SetDEDXBinningForCSDARange(val); } 783 845 } 784 846 } … … 788 850 void G4LossTableManager::SetLambdaBinning(G4int val) 789 851 { 852 G4int n = val/G4int(std::log10(maxKinEnergy/minKinEnergy)); 853 if(n < 5) { 854 G4cout << "G4LossTableManager::SetLambdaBinning WARNING " 855 << "too small number of bins " << val << " ignored" 856 << G4endl; 857 return; 858 } 859 nbinsLambda = val; 860 nbinsPerDecade = n; 790 861 size_t msc = msc_vector.size(); 791 for (size_t j=0; j<msc; j++) {792 if(msc_vector[j]) msc_vector[j]->SetBinning(val);862 for (size_t j=0; j<msc; ++j) { 863 if(msc_vector[j]) { msc_vector[j]->SetBinning(val); } 793 864 } 794 865 size_t emp = emp_vector.size(); 795 for (size_t k=0; k<emp; k++) { 796 if(emp_vector[k]) emp_vector[k]->SetLambdaBinning(val); 797 } 866 for (size_t k=0; k<emp; ++k) { 867 if(emp_vector[k]) { emp_vector[k]->SetLambdaBinning(val); } 868 } 869 } 870 871 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 872 873 G4int G4LossTableManager::GetNumberOfBinsPerDecade() const 874 { 875 return nbinsPerDecade; 798 876 } 799 877 … … 803 881 { 804 882 verbose = val; 805 for(G4int i=0; i<n_loss; i++) {806 if(loss_vector[i]) loss_vector[i]->SetVerboseLevel(val);883 for(G4int i=0; i<n_loss; ++i) { 884 if(loss_vector[i]) { loss_vector[i]->SetVerboseLevel(val); } 807 885 } 808 886 size_t msc = msc_vector.size(); 809 for (size_t j=0; j<msc; j++) {810 if(msc_vector[j]) msc_vector[j]->SetVerboseLevel(val);887 for (size_t j=0; j<msc; ++j) { 888 if(msc_vector[j]) { msc_vector[j]->SetVerboseLevel(val); } 811 889 } 812 890 size_t emp = emp_vector.size(); 813 for (size_t k=0; k<emp; k++) { 814 if(emp_vector[k]) emp_vector[k]->SetVerboseLevel(val); 815 } 891 for (size_t k=0; k<emp; ++k) { 892 if(emp_vector[k]) { emp_vector[k]->SetVerboseLevel(val); } 893 } 894 emConfigurator->SetVerbose(val); 895 //tableBuilder->SetVerbose(val); 896 //emCorrections->SetVerbose(val); 897 emSaturation->SetVerbose(val); 816 898 } 817 899 … … 823 905 maxRangeVariation = v1; 824 906 maxFinalStep = v2; 825 for(G4int i=0; i<n_loss; i++) {826 if(loss_vector[i]) loss_vector[i]->SetStepFunction(v1, v2);907 for(G4int i=0; i<n_loss; ++i) { 908 if(loss_vector[i]) { loss_vector[i]->SetStepFunction(v1, v2); } 827 909 } 828 910 } … … 832 914 void G4LossTableManager::SetLinearLossLimit(G4double val) 833 915 { 834 for(G4int i=0; i<n_loss; i++) {835 if(loss_vector[i]) loss_vector[i]->SetLinearLossLimit(val);916 for(G4int i=0; i<n_loss; ++i) { 917 if(loss_vector[i]) { loss_vector[i]->SetLinearLossLimit(val); } 836 918 } 837 919 } … … 846 928 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 847 929 848 void G4LossTableManager::SetParameters(G4VEnergyLossProcess* p) 849 { 850 if(stepFunctionActive) p->SetStepFunction(maxRangeVariation, maxFinalStep); 851 if(integralActive) p->SetIntegral(integral); 852 if(minEnergyActive) p->SetMinKinEnergy(minKinEnergy); 853 if(maxEnergyActive) p->SetMaxKinEnergy(maxKinEnergy); 930 void 931 G4LossTableManager::SetParameters(const G4ParticleDefinition* aParticle, 932 G4VEnergyLossProcess* p) 933 { 934 if(stepFunctionActive) { p->SetStepFunction(maxRangeVariation, maxFinalStep); } 935 if(integralActive) { p->SetIntegral(integral); } 936 if(minEnergyActive) { p->SetMinKinEnergy(minKinEnergy); } 937 if(maxEnergyActive) { p->SetMaxKinEnergy(maxKinEnergy); } 854 938 p->SetVerboseLevel(verbose); 939 if(maxEnergyForMuonsActive) { 940 G4double dm = std::abs(aParticle->GetPDGMass() - 105.7*MeV); 941 if(dm < 5.*MeV) { p->SetMaxKinEnergy(maxKinEnergyForMuons); } 942 } 855 943 } 856 944 … … 858 946 859 947 const std::vector<G4VEnergyLossProcess*>& 860 G4LossTableManager::GetEnergyLossProcessVector()948 G4LossTableManager::GetEnergyLossProcessVector() 861 949 { 862 950 return loss_vector; … … 873 961 874 962 const std::vector<G4VMultipleScattering*>& 875 G4LossTableManager::GetMultipleScatteringVector()963 G4LossTableManager::GetMultipleScatteringVector() 876 964 { 877 965 return msc_vector; … … 925 1013 void G4LossTableManager::SetFactorForAngleLimit(G4double val) 926 1014 { 927 if(val > 0.0) factorForAngleLimit = val;1015 if(val > 0.0) { factorForAngleLimit = val; } 928 1016 } 929 1017 -
trunk/source/processes/electromagnetic/utils/src/G4VEmModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmModel.cc,v 1.3 0 2009/09/23 14:42:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VEmModel.cc,v 1.35 2010/05/26 18:06:25 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 80 80 G4int n = elmSelectors.size(); 81 81 if(n > 0) { 82 for(G4int i=0; i<n; i++) {82 for(G4int i=0; i<n; ++i) { 83 83 delete elmSelectors[i]; 84 84 } … … 121 121 // initialise before run 122 122 flagDeexcitation = false; 123 124 G4int nbins = G4int(std::log10(highLimit/lowLimit) + 0.5); 125 if(nbins < 3) nbins = 3; 126 G4bool spline = G4LossTableManager::Instance()->SplineFlag(); 123 G4LossTableManager* man = G4LossTableManager::Instance(); 124 G4bool spline = man->SplineFlag(); 125 126 // two times less bins because probability functon is normalized 127 // so correspondingly is more smooth 128 G4int nbins = (man->GetNumberOfBinsPerDecade()/3)* 129 G4int(std::log10(highLimit/lowLimit) + 0.5); 130 if(nbins < 5) { nbins = 5; } 127 131 128 132 G4ProductionCutsTable* theCoupleTable= … … 131 135 132 136 // prepare vector 133 if(numOfCouples > nSelectors) elmSelectors.reserve(numOfCouples); 137 if(numOfCouples > nSelectors) { 138 elmSelectors.reserve(numOfCouples); 139 for(G4int i=nSelectors; i<numOfCouples; ++i) { elmSelectors.push_back(0); } 140 nSelectors = numOfCouples; 141 } 134 142 135 143 // initialise vector 136 for(G4int i=0; i<numOfCouples; i++) {144 for(G4int i=0; i<numOfCouples; ++i) { 137 145 currentCouple = theCoupleTable->GetMaterialCutsCouple(i); 138 146 const G4Material* material = currentCouple->GetMaterial(); … … 141 149 // selector already exist check if should be deleted 142 150 G4bool create = true; 143 if(i < nSelectors) { 144 if(elmSelectors[i]) { 145 if(material == elmSelectors[i]->GetMaterial()) create = false; 146 else delete elmSelectors[i]; 147 } 148 } else { 149 nSelectors++; 150 elmSelectors.push_back(0); 151 if(elmSelectors[i]) { 152 if(material == elmSelectors[i]->GetMaterial()) { create = false; } 153 else { delete elmSelectors[i]; } 151 154 } 152 155 if(create) { … … 195 198 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 196 199 200 const G4Element* G4VEmModel::SelectRandomAtom(const G4Material* material, 201 const G4ParticleDefinition* pd, 202 G4double kinEnergy, 203 G4double tcut, 204 G4double tmax) 205 { 206 const G4ElementVector* theElementVector = material->GetElementVector(); 207 G4int n = material->GetNumberOfElements() - 1; 208 currentElement = (*theElementVector)[n]; 209 if (n > 0) { 210 G4double x = G4UniformRand()* 211 G4VEmModel::CrossSectionPerVolume(material,pd,kinEnergy,tcut,tmax); 212 for(G4int i=0; i<n; ++i) { 213 if (x <= xsec[i]) { 214 currentElement = (*theElementVector)[i]; 215 break; 216 } 217 } 218 } 219 return currentElement; 220 } 221 222 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 223 197 224 G4double G4VEmModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 198 225 G4double, G4double, G4double, … … 217 244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 218 245 246 G4double G4VEmModel::ChargeSquareRatio(const G4Track& track) 247 { 248 return GetChargeSquareRatio(track.GetDefinition(), 249 track.GetMaterial(), track.GetKineticEnergy()); 250 } 251 252 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 253 219 254 G4double G4VEmModel::GetChargeSquareRatio(const G4ParticleDefinition* p, 220 255 const G4Material*, G4double) -
trunk/source/processes/electromagnetic/utils/src/G4VEmProcess.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmProcess.cc,v 1. 79 2009/11/10 20:30:55vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VEmProcess.cc,v 1.87 2010/05/10 13:35:32 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 53 53 // 27-10-07 Virtual functions moved to source (V.Ivanchenko) 54 54 // 24-06-09 Removed hidden bin in G4PhysicsVector (V.Ivanchenko) 55 // 17-02-10 Added pointer currentParticle (VI) 55 56 // 56 57 // Class Description: … … 98 99 currentModel(0), 99 100 particle(0), 101 currentParticle(0), 100 102 currentCouple(0) 101 103 { … … 165 167 G4VEmFluctuationModel* fm = 0; 166 168 modelManager->AddEmModel(order, p, fm, region); 167 if(p) p->SetParticleChange(pParticleChange);169 if(p) { p->SetParticleChange(pParticleChange); } 168 170 } 169 171 … … 205 207 void G4VEmProcess::PreparePhysicsTable(const G4ParticleDefinition& part) 206 208 { 207 if(!particle) particle = ∂209 if(!particle) { SetParticle(&part); } 208 210 if(1 < verboseLevel) { 209 211 G4cout << "G4VEmProcess::PreparePhysicsTable() for " … … 214 216 } 215 217 216 (G4LossTableManager::Instance())-> EmConfigurator()->AddModels();218 (G4LossTableManager::Instance())->PreparePhysicsTable(&part, this); 217 219 218 220 if(particle == &part) { … … 230 232 } 231 233 232 theCuts = modelManager->Initialise(particle,secondaryParticle,2.,verboseLevel); 234 theCuts = modelManager->Initialise(particle,secondaryParticle, 235 2.,verboseLevel); 233 236 const G4ProductionCutsTable* theCoupleTable= 234 237 G4ProductionCutsTable::GetProductionCutsTable(); … … 242 245 } 243 246 } 244 // Sub Cutoff andDeexcitation247 // Deexcitation 245 248 if (nDERegions>0) { 246 249 … … 287 290 } 288 291 292 (G4LossTableManager::Instance())->BuildPhysicsTable(particle); 289 293 if(buildLambdaTable) { 290 294 BuildLambdaTable(); … … 294 298 // reduce printout for nuclear stopping 295 299 G4bool gproc = true; 296 if(GetProcessName() == "nuclearStopping" && 300 G4int st = GetProcessSubType(); 301 if(st == fCoulombScattering && part.GetParticleType() == "nucleus" && 297 302 partname != "GenericIon" && partname != "alpha") { gproc = false; } 298 303 … … 354 359 << particle->GetParticleName() 355 360 << G4endl; 356 if(2 < verboseLevel) {357 G4cout << *theLambdaTable << G4endl;358 }359 361 } 360 362 } … … 385 387 if(verboseLevel > 2 && buildLambdaTable) { 386 388 G4cout << " LambdaTable address= " << theLambdaTable << G4endl; 387 if(theLambdaTable) G4cout << (*theLambdaTable) << G4endl;389 if(theLambdaTable) { G4cout << (*theLambdaTable) << G4endl; } 388 390 } 389 391 } … … 399 401 *condition = NotForced; 400 402 G4double x = DBL_MAX; 401 if(previousStepSize <= DBL_MIN) theNumberOfInteractionLengthLeft = -1.0;403 if(previousStepSize <= DBL_MIN) { theNumberOfInteractionLengthLeft = -1.0; } 402 404 InitialiseStep(track); 403 if(!currentModel->IsActive(preStepKinEnergy)) return x;405 if(!currentModel->IsActive(preStepKinEnergy)) { return x; } 404 406 405 407 if(preStepKinEnergy < mfpKinEnergy) { … … 428 430 G4cout << "G4VEmProcess::PostStepGetPhysicalInteractionLength "; 429 431 G4cout << "[ " << GetProcessName() << "]" << G4endl; 430 G4cout << " for " << particle->GetParticleName()432 G4cout << " for " << currentParticle->GetParticleName() 431 433 << " in Material " << currentMaterial->GetName() 432 434 << " Ekin(MeV)= " << preStepKinEnergy/MeV … … 461 463 // Do not make anything if particle is stopped, the annihilation then 462 464 // should be performed by the AtRestDoIt! 463 if (track.GetTrackStatus() == fStopButAlive) return &fParticleChange;465 if (track.GetTrackStatus() == fStopButAlive) { return &fParticleChange; } 464 466 465 467 G4double finalT = track.GetKineticEnergy(); … … 469 471 G4double lx = GetLambda(finalT, currentCouple); 470 472 if(preStepLambda<lx && 1 < verboseLevel) { 471 G4cout << "WARING: for " << particle->GetParticleName()473 G4cout << "WARING: for " << currentParticle->GetParticleName() 472 474 << " and " << GetProcessName() 473 475 << " E(MeV)= " << finalT/MeV … … 483 485 484 486 SelectModel(finalT, currentCoupleIndex); 485 if(!currentModel->IsActive(finalT)) return &fParticleChange;487 if(!currentModel->IsActive(finalT)) { return &fParticleChange; } 486 488 if(useDeexcitation) { 487 489 currentModel->SetDeexcitationFlag(idxDERegions[currentCoupleIndex]); … … 662 664 SelectModel(kineticEnergy, currentCoupleIndex); 663 665 cross = currentModel->CrossSectionPerVolume(currentMaterial, 664 particle,kineticEnergy); 665 } 666 666 currentParticle,kineticEnergy); 667 } 668 669 if(cross < 0.0) { cross = 0.0; } 667 670 return cross; 668 671 } … … 676 679 *condition = NotForced; 677 680 return G4VEmProcess::MeanFreePath(track); 681 } 682 683 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 684 685 G4double G4VEmProcess::MeanFreePath(const G4Track& track) 686 { 687 DefineMaterial(track.GetMaterialCutsCouple()); 688 preStepLambda = GetCurrentLambda(track.GetKineticEnergy()); 689 G4double x = DBL_MAX; 690 if(DBL_MIN < preStepLambda) x = 1.0/preStepLambda; 691 return x; 692 } 693 694 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 695 696 G4double 697 G4VEmProcess::ComputeCrossSectionPerAtom(G4double kineticEnergy, 698 G4double Z, G4double A, G4double cut) 699 { 700 SelectModel(kineticEnergy, currentCoupleIndex); 701 G4double x = 0.0; 702 if(currentModel) { 703 x = currentModel->ComputeCrossSectionPerAtom(currentParticle,kineticEnergy, 704 Z,A,cut); 705 } 706 return x; 678 707 } 679 708 … … 714 743 theEnergyOfCrossSectionMax[i] = emax; 715 744 theCrossSectionMax[i] = smax; 716 if( 2< verboseLevel) {745 if(1 < verboseLevel) { 717 746 G4cout << "For " << particle->GetParticleName() 718 747 << " Max CS at i= " << i << " emax(MeV)= " << emax/MeV … … 733 762 734 763 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 764 765 const G4Element* G4VEmProcess::GetCurrentElement() const 766 { 767 const G4Element* elm = 0; 768 if(currentModel) {elm = currentModel->GetCurrentElement(); } 769 return elm; 770 } 771 772 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/utils/src/G4VEnergyLossProcess.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEnergyLossProcess.cc,v 1.1 58 2009/10/29 18:07:08vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VEnergyLossProcess.cc,v 1.167 2010/05/26 10:41:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 336 336 { 337 337 modelManager->AddEmModel(order, p, fluc, region); 338 if(p) p->SetParticleChange(pParticleChange, fluc);338 if(p) { p->SetParticleChange(pParticleChange, fluc); } 339 339 } 340 340 … … 406 406 particle = ∂ 407 407 if(part.GetParticleType() == "nucleus") { 408 if(!theGenericIon) theGenericIon = G4GenericIon::GenericIon();408 if(!theGenericIon) { theGenericIon = G4GenericIon::GenericIon(); } 409 409 if(particle == theGenericIon) { isIon = true; } 410 410 else if(part.GetPDGCharge() > eplus) { … … 426 426 lManager->RegisterExtraParticle(&part, this); 427 427 } 428 if(1 < verboseLevel) { 429 G4cout << "### G4VEnergyLossProcess::PreparePhysicsTable() end for " 430 << part.GetParticleName() << G4endl; 431 } 428 432 return; 429 433 } 430 434 431 435 Clean(); 432 lManager-> EmConfigurator()->AddModels();436 lManager->PreparePhysicsTable(&part, this); 433 437 434 438 // Base particle and set of models can be defined here … … 502 506 G4bool reg = false; 503 507 for(G4int i=0; i<nSCoffRegions; ++i) { 504 if( pcuts == scoffRegions[i]->GetProductionCuts()) reg = true;508 if( pcuts == scoffRegions[i]->GetProductionCuts()) { reg = true; } 505 509 } 506 510 idxSCoffRegions[j] = reg; … … 509 513 G4bool reg = false; 510 514 for(G4int i=0; i<nDERegions; ++i) { 511 if( pcuts == deRegions[i]->GetProductionCuts()) reg = true;515 if( pcuts == deRegions[i]->GetProductionCuts()) { reg = true; } 512 516 } 513 517 idxDERegions[j] = reg; … … 515 519 } 516 520 } 517 518 lManager->EnergyLossProcessIsInitialised(particle, this);519 521 520 522 if (1 < verboseLevel) { … … 568 570 569 571 // Added tracking cut to avoid tracking artifacts 570 if(isIonisation) fParticleChange.SetLowEnergyLimit(lowestKinEnergy);572 if(isIonisation) { fParticleChange.SetLowEnergyLimit(lowestKinEnergy); } 571 573 572 574 if(1 < verboseLevel) { … … 574 576 << GetProcessName() 575 577 << " and particle " << part.GetParticleName(); 576 if(isIonisation) G4cout << " isIonisation flag = 1";578 if(isIonisation) { G4cout << " isIonisation flag = 1"; } 577 579 G4cout << G4endl; 578 580 } … … 590 592 } 591 593 G4PhysicsTable* table = 0; 592 G4double emin = minKinEnergy;593 594 G4double emax = maxKinEnergy; 594 595 G4int bin = nBins; … … 619 620 G4cout << numOfCouples << " materials" 620 621 << " minKinEnergy= " << minKinEnergy 621 << " maxKinEnergy= " << maxKinEnergy 622 << " maxKinEnergy= " << emax 623 << " nbin= " << bin 622 624 << " EmTableType= " << tType 623 625 << " table= " << table … … 642 644 theCoupleTable->GetMaterialCutsCouple(i); 643 645 if(!bVector) { 644 aVector = new G4PhysicsLogVector( emin, emax, bin);646 aVector = new G4PhysicsLogVector(minKinEnergy, emax, bin); 645 647 bVector = aVector; 646 648 } else { 647 649 aVector = new G4PhysicsLogVector(*bVector); 648 650 } 649 // G4PhysicsVector* aVector = new G4PhysicsLogVector(emin, emax, bin);650 651 aVector->SetSpline(splineFlag); 651 652 652 653 modelManager->FillDEDXVector(aVector, couple, tType); 653 if(splineFlag) aVector->FillSecondDerivatives();654 if(splineFlag) { aVector->FillSecondDerivatives(); } 654 655 655 656 // Insert vector for this material into the table … … 701 702 702 703 G4bool splineFlag = (G4LossTableManager::Instance())->SplineFlag(); 704 G4PhysicsLogVector* aVector = 0; 705 G4PhysicsLogVector* bVector = 0; 703 706 704 707 for(size_t i=0; i<numOfCouples; ++i) { … … 709 712 const G4MaterialCutsCouple* couple = 710 713 theCoupleTable->GetMaterialCutsCouple(i); 711 G4double cut = (*theCuts)[i]; 712 if(fSubRestricted == tType) cut = (*theSubCuts)[i]; 713 G4PhysicsVector* aVector = LambdaPhysicsVector(couple, cut); 714 if(!bVector) { 715 aVector = new G4PhysicsLogVector(minKinEnergy, maxKinEnergy, nBins); 716 bVector = aVector; 717 } else { 718 aVector = new G4PhysicsLogVector(*bVector); 719 } 714 720 aVector->SetSpline(splineFlag); 715 721 716 722 modelManager->FillLambdaVector(aVector, couple, true, tType); 717 if(splineFlag) aVector->FillSecondDerivatives();723 if(splineFlag) { aVector->FillSecondDerivatives(); } 718 724 719 725 // Insert vector for this material into the table … … 881 887 if(x > finalRange && y < currentMinStep) { 882 888 x = y + finalRange*(1.0 - dRoverRange)*(2.0 - finalRange/fRange); 883 } else if (rndmStepFlag) { x = SampleRange();}889 } else if (rndmStepFlag) { x = SampleRange(); } 884 890 //G4cout<<GetProcessName()<<": e= "<<preStepKinEnergy 885 891 // <<" range= "<<fRange <<" cMinSt="<<currentMinStep … … 912 918 preStepScaledEnergy = preStepKinEnergy*massRatio; 913 919 SelectModel(preStepScaledEnergy); 914 if(!currentModel->IsActive(preStepScaledEnergy)) return x; 915 916 if(isIon) { 917 chargeSqRatio = 918 currentModel->GetChargeSquareRatio(currPart,currentMaterial,preStepKinEnergy); 920 if(!currentModel->IsActive(preStepScaledEnergy)) { return x; } 921 922 if(isIon) { 923 chargeSqRatio = currentModel->ChargeSquareRatio(track); 919 924 reduceFactor = 1.0/(chargeSqRatio*massRatio); 920 925 } 921 926 //G4cout << "q2= " << chargeSqRatio << " massRatio= " << massRatio << G4endl; 922 927 // initialisation for sampling of the interaction length 923 if(previousStepSize <= DBL_MIN) theNumberOfInteractionLengthLeft = -1.0;924 if(theNumberOfInteractionLengthLeft < 0.0) mfpKinEnergy = DBL_MAX;928 if(previousStepSize <= DBL_MIN) { theNumberOfInteractionLengthLeft = -1.0; } 929 if(theNumberOfInteractionLengthLeft < 0.0) { mfpKinEnergy = DBL_MAX; } 925 930 926 931 // compute mean free path 927 932 if(preStepScaledEnergy < mfpKinEnergy) { 928 if (integral) ComputeLambdaForScaledEnergy(preStepScaledEnergy);929 else preStepLambda = GetLambdaForScaledEnergy(preStepScaledEnergy);930 if(preStepLambda <= DBL_MIN) mfpKinEnergy = 0.0;933 if (integral) { ComputeLambdaForScaledEnergy(preStepScaledEnergy); } 934 else { preStepLambda = GetLambdaForScaledEnergy(preStepScaledEnergy); } 935 if(preStepLambda <= DBL_MIN) { mfpKinEnergy = 0.0; } 931 936 } 932 937 … … 940 945 // subtract NumberOfInteractionLengthLeft 941 946 SubtractNumberOfInteractionLengthLeft(previousStepSize); 942 if(theNumberOfInteractionLengthLeft < 0.) 947 if(theNumberOfInteractionLengthLeft < 0.) { 943 948 theNumberOfInteractionLengthLeft = perMillion; 949 } 944 950 } 945 951 … … 966 972 // subtract NumberOfInteractionLengthLeft 967 973 SubtractNumberOfInteractionLengthLeft(previousStepSize); 968 if(theNumberOfInteractionLengthLeft < 0.) 974 if(theNumberOfInteractionLengthLeft < 0.) { 969 975 theNumberOfInteractionLengthLeft = perMillion; 976 } 970 977 } 971 978 currentInteractionLength = DBL_MAX; … … 987 994 // Get the actual (true) Step length 988 995 G4double length = step.GetStepLength(); 989 if(length <= DBL_MIN) return &fParticleChange;996 if(length <= DBL_MIN) { return &fParticleChange; } 990 997 G4double eloss = 0.0; 991 G4double esecdep = 0.0;992 998 993 999 /* … … 1071 1077 1072 1078 // Check boundary 1073 if(prePoint->GetStepStatus() == fGeomBoundary) yes = true;1079 if(prePoint->GetStepStatus() == fGeomBoundary) { yes = true; } 1074 1080 1075 1081 // Check PrePoint … … 1083 1089 } 1084 1090 1085 if(preSafety < rcut) yes = true;1091 if(preSafety < rcut) { yes = true; } 1086 1092 1087 1093 // Check PostPoint … … 1091 1097 postSafety = 1092 1098 safetyHelper->ComputeSafety(step.GetPostStepPoint()->GetPosition()); 1093 if(postSafety < rcut) yes = true;1099 if(postSafety < rcut) { yes = true; } 1094 1100 } 1095 1101 } … … 1103 1109 scTracks.clear(); 1104 1110 SampleSubCutSecondaries(scTracks, step, 1105 currentModel,currentMaterialIndex, 1106 esecdep); 1111 currentModel,currentMaterialIndex); 1107 1112 // add bremsstrahlung sampling 1108 1113 /* … … 1112 1117 scTracks, step, (scProcesses[i])-> 1113 1118 SelectModelForMaterial(preStepKinEnergy, currentMaterialIndex), 1114 currentMaterialIndex ,esecdep);1119 currentMaterialIndex); 1115 1120 } 1116 1121 } … … 1123 1128 G4Track* t = scTracks[i]; 1124 1129 G4double e = t->GetKineticEnergy(); 1125 if (t->GetDefinition() == thePositron) e += 2.0*electron_mass_c2;1130 if (t->GetDefinition() == thePositron) { e += 2.0*electron_mass_c2; } 1126 1131 esec += e; 1127 1132 pParticleChange->AddSecondary(t); … … 1133 1138 1134 1139 // Corrections, which cannot be tabulated 1135 currentModel->CorrectionsAlongStep(currentCouple, dynParticle, 1136 eloss, esecdep, length); 1140 if(isIon) { 1141 G4double eadd = 0.0; 1142 currentModel->CorrectionsAlongStep(currentCouple, dynParticle, 1143 eloss, eadd, length); 1144 } 1137 1145 1138 1146 // Sample fluctuations … … 1140 1148 G4VEmFluctuationModel* fluc = currentModel->GetModelOfFluctuations(); 1141 1149 if(fluc && 1142 (eloss + esec + esecdep +lowestKinEnergy) < preStepKinEnergy) {1150 (eloss + esec + lowestKinEnergy) < preStepKinEnergy) { 1143 1151 1144 1152 G4double tmax = … … 1158 1166 } 1159 1167 } 1160 // add low-energy subcutoff particles1161 eloss += esecdep;1162 if(eloss < 0.0) eloss = 0.0;1163 1168 1164 1169 // deexcitation 1165 elseif (useDeexcitation) {1166 if(idxDERegions[currentMaterialIndex] ) {1170 if (useDeexcitation) { 1171 if(idxDERegions[currentMaterialIndex] && eloss > 0.0) { 1167 1172 currentModel->SampleDeexcitationAlongStep(currentMaterial, track, eloss); 1168 if(eloss < 0.0) eloss = 0.0;1173 if(eloss < 0.0) { eloss = 0.0; } 1169 1174 } 1170 1175 } … … 1203 1208 const G4Step& step, 1204 1209 G4VEmModel* model, 1205 G4int idx, 1206 G4double& /*extraEdep*/) 1210 G4int idx) 1207 1211 { 1208 1212 // Fast check weather subcutoff can work 1209 1213 G4double subcut = (*theSubCuts)[idx]; 1210 1214 G4double cut = (*theCuts)[idx]; 1211 if(cut <= subcut) return;1215 if(cut <= subcut) { return; } 1212 1216 1213 1217 const G4Track* track = step.GetTrack(); … … 1218 1222 1219 1223 // negligible probability to get any interaction 1220 if(length*cross < perMillion) return;1224 if(length*cross < perMillion) { return; } 1221 1225 /* 1222 1226 if(-1 < verboseLevel) … … 1269 1273 if(addSec) { 1270 1274 G4Track* t = new G4Track((*it), pretime + fragment*dt, r); 1271 //G4Track* t = new G4Track((*it), pretime, r);1272 1275 t->SetTouchableHandle(track->GetTouchableHandle()); 1273 1276 tracks.push_back(t); … … 1296 1299 G4double postStepScaledEnergy = finalT*massRatio; 1297 1300 1298 if(!currentModel->IsActive(postStepScaledEnergy)) return &fParticleChange;1301 if(!currentModel->IsActive(postStepScaledEnergy)) { return &fParticleChange; } 1299 1302 /* 1300 1303 if(-1 < verboseLevel) { … … 1506 1509 G4bool mandatory) 1507 1510 { 1508 G4bool res = true;1511 G4bool isRetrieved = false; 1509 1512 G4String filename = GetPhysicsTableFileName(part,directory,tname,ascii); 1510 G4bool yes = aTable->ExistPhysicsTable(filename); 1511 if(yes) { 1512 if(!aTable) aTable = G4PhysicsTableHelper::PreparePhysicsTable(0); 1513 yes = G4PhysicsTableHelper::RetrievePhysicsTable(aTable,filename,ascii); 1514 1515 if((G4LossTableManager::Instance())->SplineFlag()) { 1516 size_t n = aTable->length(); 1517 for(size_t i=0; i<n; ++i) { 1518 if((*aTable)[i]) { 1519 (*aTable)[i]->SetSpline(true); 1513 if(aTable) { 1514 if(aTable->ExistPhysicsTable(filename)) { 1515 if(G4PhysicsTableHelper::RetrievePhysicsTable(aTable,filename,ascii)) { 1516 isRetrieved = true; 1517 if((G4LossTableManager::Instance())->SplineFlag()) { 1518 size_t n = aTable->length(); 1519 for(size_t i=0; i<n; ++i) { 1520 if((*aTable)[i]) { (*aTable)[i]->SetSpline(true); } 1521 } 1520 1522 } 1521 } 1522 } 1523 } 1524 if(yes) { 1525 if (0 < verboseLevel) { 1526 G4cout << tname << " table for " << part->GetParticleName() 1527 << " is Retrieved from <" << filename << ">" 1528 << G4endl; 1529 } 1530 } else { 1531 if(mandatory) res = false; 1532 if(mandatory || 1 < verboseLevel) { 1523 if (0 < verboseLevel) { 1524 G4cout << tname << " table for " << part->GetParticleName() 1525 << " is Retrieved from <" << filename << ">" 1526 << G4endl; 1527 } 1528 } 1529 } 1530 } 1531 if(mandatory && !isRetrieved) { 1532 if(0 < verboseLevel) { 1533 1533 G4cout << tname << " table for " << part->GetParticleName() 1534 1534 << " from file <" … … 1536 1536 << G4endl; 1537 1537 } 1538 } 1539 return res; 1538 return false; 1539 } 1540 return true; 1540 1541 } 1541 1542 … … 1574 1575 (*theCuts)[currentMaterialIndex]); 1575 1576 } 1576 1577 if(cross < 0.0) { cross = 0.0; } 1577 1578 return cross; 1578 1579 } … … 1585 1586 preStepLambda = GetLambdaForScaledEnergy(track.GetKineticEnergy()*massRatio); 1586 1587 G4double x = DBL_MAX; 1587 if(DBL_MIN < preStepLambda) x = 1.0/preStepLambda;1588 if(DBL_MIN < preStepLambda) { x = 1.0/preStepLambda; } 1588 1589 return x; 1589 1590 } … … 1622 1623 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1623 1624 1624 G4PhysicsVector* G4VEnergyLossProcess::LambdaPhysicsVector( 1625 const G4MaterialCutsCouple* couple, G4double cut) 1626 { 1625 G4PhysicsVector* 1626 G4VEnergyLossProcess::LambdaPhysicsVector(const G4MaterialCutsCouple* /*couple*/, 1627 G4double /*cut*/) 1628 { 1629 /* 1627 1630 G4double tmin = 1628 1631 std::max(MinPrimaryEnergy(particle, couple->GetMaterial(), cut), 1629 1632 minKinEnergy); 1630 if(tmin >= maxKinEnergy) tmin = 0.5*maxKinEnergy;1633 if(tmin >= maxKinEnergy) { tmin = 0.5*maxKinEnergy; } 1631 1634 G4PhysicsVector* v = new G4PhysicsLogVector(tmin, maxKinEnergy, nBins); 1635 */ 1636 G4PhysicsVector* v = new G4PhysicsLogVector(minKinEnergy, maxKinEnergy, nBins); 1632 1637 v->SetSpline((G4LossTableManager::Instance())->SplineFlag()); 1633 1638 return v; … … 1640 1645 { 1641 1646 G4bool add = true; 1642 if(p->GetProcessName() != "eBrem") add = false;1647 if(p->GetProcessName() != "eBrem") { add = false; } 1643 1648 if(add && nProcesses > 0) { 1644 1649 for(G4int i=0; i<nProcesses; ++i) { … … 1699 1704 void G4VEnergyLossProcess::SetCSDARangeTable(G4PhysicsTable* p) 1700 1705 { 1701 if(theCSDARangeTable != p) theCSDARangeTable = p;1706 if(theCSDARangeTable != p) { theCSDARangeTable = p; } 1702 1707 1703 1708 if(p) { … … 1768 1773 << " and process " << GetProcessName() << G4endl; 1769 1774 } 1770 if(theLambdaTable != p) theLambdaTable = p;1775 if(theLambdaTable != p) { theLambdaTable = p; } 1771 1776 tablesAreBuilt = true; 1772 1777 … … 1822 1827 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1823 1828 1829 const G4Element* G4VEnergyLossProcess::GetCurrentElement() const 1830 { 1831 const G4Element* elm = 0; 1832 if(currentModel) { elm = currentModel->GetCurrentElement(); } 1833 return elm; 1834 } 1835 1836 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1837 -
trunk/source/processes/electromagnetic/utils/src/G4VMscModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMscModel.cc,v 1.1 3 2009/07/20 17:32:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VMscModel.cc,v 1.16 2010/04/06 09:24:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 61 61 facgeom(2.5), 62 62 facsafety(0.3), 63 skin( 3.0),63 skin(1.0), 64 64 dtrl(0.05), 65 65 lambdalimit(mm), -
trunk/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMultipleScattering.cc,v 1. 77 2009/10/29 18:07:08vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4VMultipleScattering.cc,v 1.82 2010/04/12 11:45:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 95 95 firstParticle(0), 96 96 stepLimit(fUseSafety), 97 skin( 3.0),97 skin(1.0), 98 98 facrange(0.04), 99 99 facgeom(2.5), … … 144 144 G4VEmFluctuationModel* fm = 0; 145 145 modelManager->AddEmModel(order, p, fm, region); 146 if(p) p->SetParticleChange(pParticleChange);146 if(p) { p->SetParticleChange(pParticleChange); } 147 147 } 148 148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 170 170 { 171 171 return modelManager->GetModel(idx, ver); 172 }173 174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....175 176 void G4VMultipleScattering::BuildPhysicsTable(const G4ParticleDefinition& part)177 {178 G4String num = part.GetParticleName();179 if(1 < verboseLevel) {180 G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for "181 << GetProcessName()182 << " and particle " << num183 << G4endl;184 }185 186 if (buildLambdaTable && firstParticle == &part) {187 188 const G4ProductionCutsTable* theCoupleTable=189 G4ProductionCutsTable::GetProductionCutsTable();190 size_t numOfCouples = theCoupleTable->GetTableSize();191 192 G4bool splineFlag = (G4LossTableManager::Instance())->SplineFlag();193 194 G4PhysicsLogVector* aVector = 0;195 G4PhysicsLogVector* bVector = 0;196 197 for (size_t i=0; i<numOfCouples; ++i) {198 199 if (theLambdaTable->GetFlag(i)) {200 // create physics vector and fill it201 const G4MaterialCutsCouple* couple =202 theCoupleTable->GetMaterialCutsCouple(i);203 if(!bVector) {204 aVector = static_cast<G4PhysicsLogVector*>(PhysicsVector(couple));205 bVector = aVector;206 } else {207 aVector = new G4PhysicsLogVector(*bVector);208 }209 //G4PhysicsVector* aVector = PhysicsVector(couple);210 aVector->SetSpline(splineFlag);211 modelManager->FillLambdaVector(aVector, couple, false);212 if(splineFlag) aVector->FillSecondDerivatives();213 G4PhysicsTableHelper::SetPhysicsVector(theLambdaTable, i, aVector);214 }215 }216 217 if(1 < verboseLevel) {218 G4cout << "Lambda table is built for "219 << num220 << G4endl;221 }222 }223 if(verboseLevel>0 && ( num == "e-" || num == "mu+" ||224 num == "proton" || num == "pi-" ||225 num == "GenericIon")) {226 PrintInfoDefinition();227 if(2 < verboseLevel && theLambdaTable) G4cout << *theLambdaTable << G4endl;228 }229 230 if(1 < verboseLevel) {231 G4cout << "### G4VMultipleScattering::BuildPhysicsTable() done for "232 << GetProcessName()233 << " and particle " << num234 << G4endl;235 }236 172 } 237 173 … … 260 196 } 261 197 198 (G4LossTableManager::Instance())->PreparePhysicsTable(&part, this); 199 262 200 if(1 < verboseLevel) { 263 201 G4cout << "### G4VMultipleScattering::PrepearPhysicsTable() for " … … 267 205 << G4endl; 268 206 } 269 270 (G4LossTableManager::Instance())->EmConfigurator()->AddModels();271 207 272 208 if(firstParticle == &part) { … … 307 243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 308 244 245 void G4VMultipleScattering::BuildPhysicsTable(const G4ParticleDefinition& part) 246 { 247 G4String num = part.GetParticleName(); 248 if(1 < verboseLevel) { 249 G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for " 250 << GetProcessName() 251 << " and particle " << num 252 << G4endl; 253 } 254 255 (G4LossTableManager::Instance())->BuildPhysicsTable(firstParticle); 256 257 if (buildLambdaTable && firstParticle == &part) { 258 259 const G4ProductionCutsTable* theCoupleTable= 260 G4ProductionCutsTable::GetProductionCutsTable(); 261 size_t numOfCouples = theCoupleTable->GetTableSize(); 262 263 G4bool splineFlag = (G4LossTableManager::Instance())->SplineFlag(); 264 265 G4PhysicsLogVector* aVector = 0; 266 G4PhysicsLogVector* bVector = 0; 267 268 for (size_t i=0; i<numOfCouples; ++i) { 269 270 if (theLambdaTable->GetFlag(i)) { 271 // create physics vector and fill it 272 const G4MaterialCutsCouple* couple = 273 theCoupleTable->GetMaterialCutsCouple(i); 274 if(!bVector) { 275 aVector = static_cast<G4PhysicsLogVector*>(PhysicsVector(couple)); 276 bVector = aVector; 277 } else { 278 aVector = new G4PhysicsLogVector(*bVector); 279 } 280 //G4PhysicsVector* aVector = PhysicsVector(couple); 281 aVector->SetSpline(splineFlag); 282 modelManager->FillLambdaVector(aVector, couple, false); 283 if(splineFlag) aVector->FillSecondDerivatives(); 284 G4PhysicsTableHelper::SetPhysicsVector(theLambdaTable, i, aVector); 285 } 286 } 287 288 if(1 < verboseLevel) { 289 G4cout << "Lambda table is built for " 290 << num 291 << G4endl; 292 } 293 } 294 if(verboseLevel>0 && ( num == "e-" || num == "mu+" || 295 num == "proton" || num == "pi-" || 296 num == "GenericIon")) { 297 PrintInfoDefinition(); 298 if(2 < verboseLevel && theLambdaTable) G4cout << *theLambdaTable << G4endl; 299 } 300 301 if(1 < verboseLevel) { 302 G4cout << "### G4VMultipleScattering::BuildPhysicsTable() done for " 303 << GetProcessName() 304 << " and particle " << num 305 << G4endl; 306 } 307 } 308 309 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 310 309 311 void G4VMultipleScattering::PrintInfoDefinition() 310 312 { … … 362 364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 363 365 366 G4double 367 G4VMultipleScattering::PostStepGetPhysicalInteractionLength( 368 const G4Track&, G4double, G4ForceCondition* condition) 369 { 370 *condition = Forced; 371 return DBL_MAX; 372 } 373 374 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 375 376 G4VParticleChange* 377 G4VMultipleScattering::AlongStepDoIt(const G4Track& track, const G4Step& step) 378 { 379 if(currentModel->IsActive(track.GetKineticEnergy())) { 380 fParticleChange.ProposeTrueStepLength(currentModel->ComputeTrueStepLength(step.GetStepLength())); 381 } 382 return &fParticleChange; 383 } 384 385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 386 387 G4VParticleChange* 388 G4VMultipleScattering::PostStepDoIt(const G4Track& track, const G4Step& step) 389 { 390 fParticleChange.Initialize(track); 391 if(currentModel->IsActive(track.GetKineticEnergy())) { 392 currentModel->SampleScattering(track.GetDynamicParticle(), 393 step.GetPostStepPoint()->GetSafety()); 394 } 395 return &fParticleChange; 396 } 397 398 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 399 364 400 G4double G4VMultipleScattering::GetContinuousStepLimit( 365 401 const G4Track& track, … … 371 407 return AlongStepGetPhysicalInteractionLength(track,previousStepSize,currentMinimalStep, 372 408 currentSafety, selection); 409 } 410 411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 412 413 G4double G4VMultipleScattering::ContinuousStepLimit( 414 const G4Track& track, 415 G4double previousStepSize, 416 G4double currentMinimalStep, 417 G4double& currentSafety) 418 { 419 return GetContinuousStepLimit(track,previousStepSize,currentMinimalStep, 420 currentSafety); 373 421 } 374 422 -
trunk/source/processes/electromagnetic/utils/test/testG4EnergyLossTables.cc
r1199 r1315 26 26 // 27 27 // $Id: testG4EnergyLossTables.cc,v 1.7 2006/06/29 19:55:29 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 //------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/xrays/History
r1196 r1315 1 $Id: History,v 1.7 0 2009/07/29 23:43:27gum Exp $1 $Id: History,v 1.71 2010/05/27 20:47:23 gum Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 22 February 10: P. Gumplinger (xrays-V09-03-00) 21 - Scintillation rise time included, thanks to Martin Goettlich/DESY 19 22 20 23 29 July 09: P. Gumplinger (xrays-V09-02-00) -
trunk/source/processes/electromagnetic/xrays/include/G4Scintillation.hh
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4Scintillation.hh,v 1.1 6 2009/07/29 23:45:20gum Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4Scintillation.hh,v 1.17 2010/05/27 20:48:35 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 146 146 // have been tracked, the tracking of the primary resumes. 147 147 148 void SetFiniteRiseTime(const G4bool state); 149 // If set, the G4Scintillation process expects the user to have 150 // set the constant material property FAST/SLOWSCINTILLATIONRISETIME. 151 148 152 G4bool GetTrackSecondariesFirst() const; 149 153 // Returns the boolean flag for tracking secondaries first. 154 155 G4bool GetFiniteRiseTime() const; 156 // Returns the boolean flag for a finite scintillation rise time. 150 157 151 158 void SetScintillationYieldFactor(const G4double yieldfactor); … … 198 205 199 206 G4bool fTrackSecondariesFirst; 207 G4bool fFiniteRiseTime; 200 208 201 209 G4double YieldFactor; … … 204 212 205 213 private: 214 215 G4double single_exp(G4double t, G4double tau2); 216 G4double bi_exp(G4double t, G4double tau1, G4double tau2); 217 218 // emission time distribution when there is a finite rise time 219 G4double sample_time(G4double tau1, G4double tau2); 206 220 207 221 G4EmSaturation* emSaturation; … … 229 243 230 244 inline 245 void G4Scintillation::SetFiniteRiseTime(const G4bool state) 246 { 247 fFiniteRiseTime = state; 248 } 249 250 inline 231 251 G4bool G4Scintillation::GetTrackSecondariesFirst() const 232 252 { 233 253 return fTrackSecondariesFirst; 254 } 255 256 inline 257 G4bool G4Scintillation::GetFiniteRiseTime() const 258 { 259 return fFiniteRiseTime; 234 260 } 235 261 … … 296 322 } 297 323 324 inline 325 G4double G4Scintillation::single_exp(G4double t, G4double tau2) 326 { 327 return exp(-1.0*t/tau2)/tau2; 328 } 329 330 inline 331 G4double G4Scintillation::bi_exp(G4double t, G4double tau1, G4double tau2) 332 { 333 return exp(-1.0*t/tau2)*(1-exp(-1.0*t/tau1))/tau2/tau2*(tau1+tau2); 334 } 335 298 336 #endif /* G4Scintillation_h */ -
trunk/source/processes/electromagnetic/xrays/src/G4Scintillation.cc
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4Scintillation.cc,v 1.3 0 2008/10/22 01:19:11gum Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4Scintillation.cc,v 1.31 2010/05/27 20:49:40 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 //////////////////////////////////////////////////////////////////////// … … 37 37 // Created: 1998-11-07 38 38 // Author: Peter Gumplinger 39 // Updated: 2005-08-17 by Peter Gumplinger 39 // Updated: 2010-92-22 by Peter Gumplinger 40 // > scintillation rise time included, thanks to 41 // > Martin Goettlich/DESY 42 // 2005-08-17 by Peter Gumplinger 40 43 // > change variable name MeanNumPhotons -> MeanNumberOfPhotons 41 44 // 2005-07-28 by Peter Gumplinger … … 93 96 94 97 fTrackSecondariesFirst = false; 98 fFiniteRiseTime = false; 95 99 96 100 YieldFactor = 1.0; … … 248 252 249 253 G4double ScintillationTime = 0.*ns; 254 G4double ScintillationRiseTime = 0.*ns; 250 255 G4PhysicsOrderedFreeVector* ScintillationIntegral = NULL; 251 256 … … 255 260 ScintillationTime = aMaterialPropertiesTable-> 256 261 GetConstProperty("FASTTIMECONSTANT"); 262 if (fFiniteRiseTime) { 263 ScintillationRiseTime = aMaterialPropertiesTable-> 264 GetConstProperty("FASTSCINTILLATIONRISETIME"); 265 } 257 266 ScintillationIntegral = 258 267 (G4PhysicsOrderedFreeVector*)((*theFastIntegralTable)(materialIndex)); … … 261 270 ScintillationTime = aMaterialPropertiesTable-> 262 271 GetConstProperty("SLOWTIMECONSTANT"); 272 if (fFiniteRiseTime) { 273 ScintillationRiseTime = aMaterialPropertiesTable-> 274 GetConstProperty("SLOWSCINTILLATIONRISETIME"); } 263 275 ScintillationIntegral = 264 276 (G4PhysicsOrderedFreeVector*)((*theSlowIntegralTable)(materialIndex)); … … 276 288 ScintillationTime = aMaterialPropertiesTable-> 277 289 GetConstProperty("FASTTIMECONSTANT"); 290 if (fFiniteRiseTime) { 291 ScintillationRiseTime = aMaterialPropertiesTable-> 292 GetConstProperty("FASTSCINTILLATIONRISETIME"); 293 } 278 294 ScintillationIntegral = 279 295 (G4PhysicsOrderedFreeVector*)((*theFastIntegralTable)(materialIndex)); … … 284 300 ScintillationTime = aMaterialPropertiesTable-> 285 301 GetConstProperty("SLOWTIMECONSTANT"); 302 if (fFiniteRiseTime) { 303 ScintillationRiseTime = aMaterialPropertiesTable-> 304 GetConstProperty("SLOWSCINTILLATIONRISETIME"); 305 } 286 306 ScintillationIntegral = 287 307 (G4PhysicsOrderedFreeVector*)((*theSlowIntegralTable)(materialIndex)); … … 369 389 pPostStepPoint->GetVelocity())/2.); 370 390 371 deltaTime = deltaTime - 372 ScintillationTime * log( G4UniformRand() ); 391 // emission time distribution 392 if (ScintillationRiseTime==0.0) { 393 deltaTime = deltaTime - 394 ScintillationTime * log( G4UniformRand() ); 395 } else { 396 deltaTime = deltaTime + 397 sample_time(ScintillationRiseTime, ScintillationTime); 398 } 373 399 374 400 G4double aSecondaryTime = t0 + deltaTime; … … 592 618 593 619 } 620 621 G4double G4Scintillation::sample_time(G4double tau1, G4double tau2) 622 { 623 // tau1: rise time and tau2: decay time 624 625 while(1) { 626 // two random numbers 627 G4double ran1 = G4UniformRand(); 628 G4double ran2 = G4UniformRand(); 629 // 630 // exponential distribution as envelope function: very efficient 631 // 632 G4double d = (tau1+tau2)/tau2; 633 // make sure the envelope function is 634 // always larger than the bi-exponential 635 G4double t = -1.0*tau2*log(1-ran1); 636 G4double g = d*single_exp(t,tau2); 637 if (ran2 <= bi_exp(t,tau1,tau2)/g) return t; 638 } 639 return -1.0; 640 } -
trunk/source/processes/electromagnetic/xrays/test/testG4ForwardXrayTR.cc
r1199 r1315 26 26 // 27 27 // $Id: testG4ForwardXrayTR.cc,v 1.7 2006/06/29 19:56:33 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30
Note:
See TracChangeset
for help on using the changeset viewer.
