Changeset 1055 for trunk/source/processes/electromagnetic
- Timestamp:
- May 28, 2009, 4:26:57 PM (17 years ago)
- Location:
- trunk/source/processes/electromagnetic
- Files:
-
- 310 edited
-
History (modified) (2 diffs)
-
highenergy/History (modified) (2 diffs)
-
highenergy/include/G4BetheBlochNoDeltaModel.hh (modified) (3 diffs)
-
highenergy/include/G4BraggNoDeltaModel.hh (modified) (3 diffs)
-
highenergy/include/G4ee2KChargedModel.hh (modified) (3 diffs)
-
highenergy/include/G4ee2KNeutralModel.hh (modified) (3 diffs)
-
highenergy/include/G4eeTo3PiModel.hh (modified) (3 diffs)
-
highenergy/include/G4eeToHadrons.hh (modified) (4 diffs)
-
highenergy/include/G4eeToHadronsMultiModel.hh (modified) (3 diffs)
-
highenergy/include/G4eeToPGammaModel.hh (modified) (3 diffs)
-
highenergy/include/G4eeToTwoPiModel.hh (modified) (3 diffs)
-
highenergy/include/G4hBremsstrahlung.hh (modified) (3 diffs)
-
highenergy/include/G4hPairProduction.hh (modified) (3 diffs)
-
highenergy/include/G4hhIonisation.hh (modified) (3 diffs)
-
highenergy/include/G4mplIonisation.hh (modified) (3 diffs)
-
highenergy/include/G4mplIonisationModel.hh (modified) (2 diffs)
-
highenergy/src/G4BetheBlochNoDeltaModel.cc (modified) (3 diffs)
-
highenergy/src/G4BraggNoDeltaModel.cc (modified) (3 diffs)
-
highenergy/src/G4ee2KChargedModel.cc (modified) (2 diffs)
-
highenergy/src/G4ee2KNeutralModel.cc (modified) (2 diffs)
-
highenergy/src/G4eeTo3PiModel.cc (modified) (2 diffs)
-
highenergy/src/G4eeToHadrons.cc (modified) (2 diffs)
-
highenergy/src/G4eeToHadronsMultiModel.cc (modified) (2 diffs)
-
highenergy/src/G4eeToPGammaModel.cc (modified) (2 diffs)
-
highenergy/src/G4eeToTwoPiModel.cc (modified) (2 diffs)
-
highenergy/src/G4hBremsstrahlung.cc (modified) (2 diffs)
-
highenergy/src/G4hPairProduction.cc (modified) (2 diffs)
-
highenergy/src/G4hhIonisation.cc (modified) (2 diffs)
-
highenergy/src/G4mplIonisation.cc (modified) (2 diffs)
-
highenergy/src/G4mplIonisationModel.cc (modified) (6 diffs)
-
lowenergy/History (modified) (2 diffs)
-
lowenergy/include/G4AtomicDeexcitation.hh (modified) (1 diff)
-
lowenergy/include/G4AtomicShell.hh (modified) (1 diff)
-
lowenergy/include/G4AtomicTransitionManager.hh (modified) (1 diff)
-
lowenergy/include/G4AugerData.hh (modified) (1 diff)
-
lowenergy/include/G4BremsstrahlungCrossSectionHandler.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/G4DNACrossSectionDataSet.hh (modified) (1 diff)
-
lowenergy/include/G4DNAGenericIonsManager.hh (modified) (1 diff)
-
lowenergy/include/G4DNAProcess.hh (modified) (1 diff)
-
lowenergy/include/G4DNAProcess.icc (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) (3 diffs)
-
lowenergy/include/G4FinalStatePsCreationChampion.hh (modified) (1 diff)
-
lowenergy/include/G4FluoTransition.hh (modified) (1 diff)
-
lowenergy/include/G4IonParametrisedLossModel.hh (modified) (5 diffs)
-
lowenergy/include/G4IonParametrisedLossModel.icc (modified) (2 diffs)
-
lowenergy/include/G4LinInterpolation.hh (modified) (1 diff)
-
lowenergy/include/G4LivermoreComptonModel.hh (modified) (3 diffs)
-
lowenergy/include/G4LivermoreGammaConversionModel.hh (modified) (3 diffs)
-
lowenergy/include/G4LivermorePhotoElectricModel.hh (modified) (4 diffs)
-
lowenergy/include/G4LivermorePolarizedComptonModel.hh (modified) (3 diffs)
-
lowenergy/include/G4LivermorePolarizedRayleighModel.hh (modified) (2 diffs)
-
lowenergy/include/G4LivermoreRayleighModel.hh (modified) (3 diffs)
-
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/G4OrlicLCrossSection.hh (modified) (1 diff)
-
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/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) (1 diff)
-
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) (1 diff)
-
lowenergy/include/G4RangeNoTest.hh (modified) (1 diff)
-
lowenergy/include/G4RangeTest.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/G4ShellVacancy.hh (modified) (2 diffs)
-
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) (3 diffs)
-
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/G4ecpssrCrossSection.hh (modified) (1 diff)
-
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/src/G4AtomicDeexcitation.cc (modified) (4 diffs)
-
lowenergy/src/G4AugerData.cc (modified) (1 diff)
-
lowenergy/src/G4BremsstrahlungCrossSectionHandler.cc (modified) (6 diffs)
-
lowenergy/src/G4CrossSectionChargeDecrease.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionChargeIncrease.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionElasticChampion.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionElasticScreenedRutherfordHE.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionElasticScreenedRutherfordLE.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionExcitationBorn.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionExcitationEmfietzoglou.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionExcitationMillerGreen.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionExcitationMillerGreenPartial.cc (modified) (3 diffs)
-
lowenergy/src/G4CrossSectionIonisationBorn.cc (modified) (2 diffs)
-
lowenergy/src/G4CrossSectionIonisationBornPartial.cc (modified) (3 diffs)
-
lowenergy/src/G4CrossSectionIonisationRudd.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateChargeDecrease.cc (modified) (3 diffs)
-
lowenergy/src/G4FinalStateChargeIncrease.cc (modified) (3 diffs)
-
lowenergy/src/G4FinalStateElasticBrennerZaider.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateElasticChampion.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateElasticScreenedRutherford.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateExcitationBorn.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateExcitationEmfietzoglou.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateExcitationMillerGreen.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateIonisationBorn.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateIonisationRudd.cc (modified) (2 diffs)
-
lowenergy/src/G4FinalStateProduct.cc (modified) (4 diffs)
-
lowenergy/src/G4IonParametrisedLossModel.cc (modified) (31 diffs)
-
lowenergy/src/G4LivermoreComptonModel.cc (modified) (15 diffs)
-
lowenergy/src/G4LivermoreGammaConversionModel.cc (modified) (9 diffs)
-
lowenergy/src/G4LivermorePhotoElectricModel.cc (modified) (17 diffs)
-
lowenergy/src/G4LivermorePolarizedComptonModel.cc (modified) (12 diffs)
-
lowenergy/src/G4LivermorePolarizedRayleighModel.cc (modified) (9 diffs)
-
lowenergy/src/G4LivermoreRayleighModel.cc (modified) (11 diffs)
-
lowenergy/src/G4LowEnergyBremsstrahlung.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyCompton.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyGammaConversion.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyIonisation.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyPhotoElectric.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyPolarizedCompton.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyPolarizedRayleigh.cc (modified) (2 diffs)
-
lowenergy/src/G4LowEnergyRayleigh.cc (modified) (2 diffs)
-
lowenergy/src/G4PenelopeAnnihilation.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeAnnihilationModel.cc (modified) (8 diffs)
-
lowenergy/src/G4PenelopeBremsstrahlung.cc (modified) (2 diffs)
-
lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc (modified) (4 diffs)
-
lowenergy/src/G4PenelopeCompton.cc (modified) (2 diffs)
-
lowenergy/src/G4PenelopeComptonModel.cc (modified) (13 diffs)
-
lowenergy/src/G4PenelopeGammaConversion.cc (modified) (1 diff)
-
lowenergy/src/G4PenelopeGammaConversionModel.cc (modified) (13 diffs)
-
lowenergy/src/G4PenelopeIonisation.cc (modified) (2 diffs)
-
lowenergy/src/G4PenelopeIonisationModel.cc (modified) (23 diffs)
-
lowenergy/src/G4PenelopePhotoElectric.cc (modified) (4 diffs)
-
lowenergy/src/G4PenelopePhotoElectricModel.cc (modified) (15 diffs)
-
lowenergy/src/G4PenelopeRayleigh.cc (modified) (4 diffs)
-
lowenergy/src/G4PenelopeRayleighModel.cc (modified) (8 diffs)
-
lowenergy/src/G4ShellVacancy.cc (modified) (2 diffs)
-
lowenergy/src/G4eIonisationCrossSectionHandler.cc (modified) (6 diffs)
-
lowenergy/src/G4eIonisationParameters.cc (modified) (3 diffs)
-
lowenergy/src/G4eIonisationSpectrum.cc (modified) (5 diffs)
-
lowenergy/src/G4hLowEnergyLoss.cc (modified) (4 diffs)
-
muons/History (modified) (2 diffs)
-
muons/include/G4MuBetheBlochModel.hh (modified) (4 diffs)
-
muons/include/G4MuBremsstrahlung.hh (modified) (3 diffs)
-
muons/include/G4MuBremsstrahlungModel.hh (modified) (5 diffs)
-
muons/include/G4MuIonisation.hh (modified) (3 diffs)
-
muons/include/G4MuPairProduction.hh (modified) (3 diffs)
-
muons/include/G4MuPairProductionModel.hh (modified) (6 diffs)
-
muons/src/G4MuBetheBlochModel.cc (modified) (5 diffs)
-
muons/src/G4MuBremsstrahlung.cc (modified) (2 diffs)
-
muons/src/G4MuBremsstrahlungModel.cc (modified) (4 diffs)
-
muons/src/G4MuIonisation.cc (modified) (4 diffs)
-
muons/src/G4MuPairProduction.cc (modified) (2 diffs)
-
muons/src/G4MuPairProductionModel.cc (modified) (3 diffs)
-
polarisation/History (modified) (2 diffs)
-
polarisation/src/G4PolarizedAnnihilationModel.cc (modified) (2 diffs)
-
standard/History (modified) (2 diffs)
-
standard/include/G4BetheBlochModel.hh (modified) (5 diffs)
-
standard/include/G4BohrFluctuations.hh (modified) (3 diffs)
-
standard/include/G4BraggIonModel.hh (modified) (4 diffs)
-
standard/include/G4BraggModel.hh (modified) (4 diffs)
-
standard/include/G4ComptonScattering.hh (modified) (3 diffs)
-
standard/include/G4CoulombScattering.hh (modified) (3 diffs)
-
standard/include/G4GammaConversion.hh (modified) (3 diffs)
-
standard/include/G4IonFluctuations.hh (modified) (3 diffs)
-
standard/include/G4MollerBhabhaModel.hh (modified) (4 diffs)
-
standard/include/G4PAIModel.hh (modified) (4 diffs)
-
standard/include/G4PAIPhotonModel.hh (modified) (5 diffs)
-
standard/include/G4PEEffectModel.hh (modified) (4 diffs)
-
standard/include/G4PhotoElectricEffect.hh (modified) (3 diffs)
-
standard/include/G4UniversalFluctuation.hh (modified) (4 diffs)
-
standard/include/G4UrbanMscModel.hh (modified) (12 diffs)
-
standard/include/G4UrbanMscModel2.hh (modified) (6 diffs)
-
standard/include/G4UrbanMscModel90.hh (modified) (2 diffs)
-
standard/include/G4WentzelVIModel.hh (modified) (12 diffs)
-
standard/include/G4eBremsstrahlung.hh (modified) (3 diffs)
-
standard/include/G4eBremsstrahlungModel.hh (modified) (4 diffs)
-
standard/include/G4eBremsstrahlungRelModel.hh (modified) (4 diffs)
-
standard/include/G4eCoulombScatteringModel.hh (modified) (8 diffs)
-
standard/include/G4eIonisation.hh (modified) (4 diffs)
-
standard/include/G4eplusAnnihilation.hh (modified) (4 diffs)
-
standard/include/G4hIonisation.hh (modified) (3 diffs)
-
standard/include/G4ionIonisation.hh (modified) (4 diffs)
-
standard/src/G4BetheBlochModel.cc (modified) (8 diffs)
-
standard/src/G4BetheHeitlerModel.cc (modified) (2 diffs)
-
standard/src/G4BohrFluctuations.cc (modified) (2 diffs)
-
standard/src/G4BraggIonModel.cc (modified) (4 diffs)
-
standard/src/G4BraggModel.cc (modified) (4 diffs)
-
standard/src/G4ComptonScattering.cc (modified) (2 diffs)
-
standard/src/G4CoulombScattering.cc (modified) (2 diffs)
-
standard/src/G4CoulombScatteringModel.cc (modified) (4 diffs)
-
standard/src/G4GammaConversion.cc (modified) (2 diffs)
-
standard/src/G4IonFluctuations.cc (modified) (3 diffs)
-
standard/src/G4KleinNishinaCompton.cc (modified) (2 diffs)
-
standard/src/G4MollerBhabhaModel.cc (modified) (7 diffs)
-
standard/src/G4MscModel71.cc (modified) (2 diffs)
-
standard/src/G4PAIModel.cc (modified) (10 diffs)
-
standard/src/G4PAIPhotonModel.cc (modified) (13 diffs)
-
standard/src/G4PEEffectModel.cc (modified) (5 diffs)
-
standard/src/G4PhotoElectricEffect.cc (modified) (2 diffs)
-
standard/src/G4UniversalFluctuation.cc (modified) (8 diffs)
-
standard/src/G4UrbanMscModel.cc (modified) (30 diffs)
-
standard/src/G4UrbanMscModel2.cc (modified) (13 diffs)
-
standard/src/G4UrbanMscModel90.cc (modified) (7 diffs)
-
standard/src/G4WaterStopping.cc (modified) (4 diffs)
-
standard/src/G4WentzelVIModel.cc (modified) (23 diffs)
-
standard/src/G4eBremsstrahlung.cc (modified) (2 diffs)
-
standard/src/G4eBremsstrahlungModel.cc (modified) (2 diffs)
-
standard/src/G4eBremsstrahlungRelModel.cc (modified) (2 diffs)
-
standard/src/G4eCoulombScatteringModel.cc (modified) (9 diffs)
-
standard/src/G4eIonisation.cc (modified) (2 diffs)
-
standard/src/G4eeToTwoGammaModel.cc (modified) (2 diffs)
-
standard/src/G4eplusAnnihilation.cc (modified) (2 diffs)
-
standard/src/G4hIonisation.cc (modified) (2 diffs)
-
standard/src/G4ionIonisation.cc (modified) (2 diffs)
-
utils/History (modified) (2 diffs)
-
utils/include/G4DummyModel.hh (modified) (2 diffs)
-
utils/include/G4EmElementSelector.hh (modified) (4 diffs)
-
utils/include/G4EmModelManager.hh (modified) (10 diffs)
-
utils/include/G4EmProcessOptions.hh (modified) (2 diffs)
-
utils/include/G4EnergyLossMessenger.hh (modified) (2 diffs)
-
utils/include/G4LossTableManager.hh (modified) (4 diffs)
-
utils/include/G4VEmFluctuationModel.hh (modified) (3 diffs)
-
utils/include/G4VEmModel.hh (modified) (18 diffs)
-
utils/include/G4VEmProcess.hh (modified) (18 diffs)
-
utils/include/G4VEnergyLossProcess.hh (modified) (17 diffs)
-
utils/include/G4VMscModel.hh (modified) (8 diffs)
-
utils/include/G4VMultipleScattering.hh (modified) (13 diffs)
-
utils/src/G4DummyModel.cc (modified) (2 diffs)
-
utils/src/G4EmCalculator.cc (modified) (2 diffs)
-
utils/src/G4EmConfigurator.cc (modified) (4 diffs)
-
utils/src/G4EmElementSelector.cc (modified) (7 diffs)
-
utils/src/G4EmModelManager.cc (modified) (16 diffs)
-
utils/src/G4EmProcessOptions.cc (modified) (3 diffs)
-
utils/src/G4EnergyLossMessenger.cc (modified) (4 diffs)
-
utils/src/G4LossTableBuilder.cc (modified) (3 diffs)
-
utils/src/G4LossTableManager.cc (modified) (4 diffs)
-
utils/src/G4VEmFluctuationModel.cc (modified) (2 diffs)
-
utils/src/G4VEmModel.cc (modified) (6 diffs)
-
utils/src/G4VEmProcess.cc (modified) (12 diffs)
-
utils/src/G4VEnergyLossProcess.cc (modified) (23 diffs)
-
utils/src/G4VMscModel.cc (modified) (5 diffs)
-
utils/src/G4VMultipleScattering.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/History
r819 r1055 1 $Id: History,v 1. 9 2001/10/11 16:21:31 maireExp $1 $Id: History,v 1.10 2008/11/14 19:54:40 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 19 20 14 nov 08 G.Cosmo 21 - Added "adjoint" module. 22 20 23 11 oct 01 mma (em-V03-02-01) 21 24 - Global tag including: emlowen-V03-02-22 muons-V03-02-06 stand-V03-02-08 -
trunk/source/processes/electromagnetic/highenergy/History
r1007 r1055 1 $Id: History,v 1.3 0 2008/10/16 14:29:48vnivanch Exp $1 $Id: History,v 1.32 2009/04/12 17:35:41 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 12 April 09: V.Ivanchenko (emhighenergy-V09-02-01) 21 - G4mplIonisationModel, G4eeToHadronsMultiModel - simplified initialisation 22 23 20 February 09: V.Ivanchenko (emhighenergy-V09-02-00) 24 - Cleanup: improved comments, move virtual methods from .hh to .cc 19 25 20 26 16 October 08: V.Ivanchenko (emhighenergy-V09-01-06) -
trunk/source/processes/electromagnetic/highenergy/include/G4BetheBlochNoDeltaModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochNoDeltaModel.hh,v 1. 7 2006/06/29 19:32:14 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BetheBlochNoDeltaModel.hh,v 1.8 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 68 68 G4double cutEnergy); 69 69 70 virtual G4double C omputeCrossSectionPerElectron(71 const G4ParticleDefinition*,72 G4double kineticEnergy,73 G4double cutEnergy,74 G4double maxEnergy);70 virtual G4double CrossSectionPerVolume(const G4Material*, 71 const G4ParticleDefinition*, 72 G4double kineticEnergy, 73 G4double cutEnergy, 74 G4double maxEnergy); 75 75 76 76 private: … … 84 84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 85 86 inline G4double G4BetheBlochNoDeltaModel::ComputeDEDXPerVolume(87 const G4Material* material,88 const G4ParticleDefinition* pd,89 G4double kinEnergy, G4double)90 {91 G4double dedx = G4BetheBlochModel::ComputeDEDXPerVolume(material, pd, kinEnergy, DBL_MAX);92 return dedx;93 }94 95 inline G4double G4BetheBlochNoDeltaModel::ComputeCrossSectionPerElectron(96 const G4ParticleDefinition*,97 G4double, G4double, G4double)98 {99 return 0.0;100 }101 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....103 104 86 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4BraggNoDeltaModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggNoDeltaModel.hh,v 1. 6 2006/06/29 19:32:16 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BraggNoDeltaModel.hh,v 1.7 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 68 68 G4double cutEnergy); 69 69 70 virtual G4double C omputeCrossSectionPerElectron(70 virtual G4double CrossSectionPerVolume(const G4Material*, 71 71 const G4ParticleDefinition*, 72 72 G4double kineticEnergy, 73 73 G4double cutEnergy, 74 74 G4double maxEnergy); 75 76 75 private: 77 76 … … 84 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 84 86 inline G4double G4BraggNoDeltaModel::ComputeDEDXPerVolume(87 const G4Material* material,88 const G4ParticleDefinition* pd,89 G4double kinEnergy, G4double)90 {91 G4double dedx = G4BraggIonModel::ComputeDEDXPerVolume(material, pd, kinEnergy, DBL_MAX);92 return dedx;93 }94 95 inline G4double G4BraggNoDeltaModel::ComputeCrossSectionPerElectron(96 const G4ParticleDefinition*,97 G4double, G4double, G4double)98 {99 return 0.0;100 }101 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....103 104 85 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4ee2KChargedModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ee2KChargedModel.hh,v 1. 1 2008/07/10 18:07:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ee2KChargedModel.hh,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 67 67 virtual ~G4ee2KChargedModel(); 68 68 69 G4double ThresholdEnergy() const;69 virtual G4double ThresholdEnergy() const; 70 70 71 G4double PeakEnergy() const;71 virtual G4double PeakEnergy() const; 72 72 73 G4double ComputeCrossSection(G4double) const;73 virtual G4double ComputeCrossSection(G4double) const; 74 74 75 G4PhysicsVector* PhysicsVector(G4double, G4double) const;75 virtual G4PhysicsVector* PhysicsVector(G4double, G4double) const; 76 76 77 77 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 92 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 93 93 94 inline G4double G4ee2KChargedModel::ThresholdEnergy() const95 {96 return 2.0*massK;97 }98 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....100 101 inline G4double G4ee2KChargedModel::PeakEnergy() const102 {103 return massPhi;104 }105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....107 108 inline G4double G4ee2KChargedModel::ComputeCrossSection(G4double e) const109 {110 G4double ee = std::min(HighEnergy(),e);111 return cross->CrossSection2Kcharged(ee);112 }113 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....115 116 94 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4ee2KNeutralModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ee2KNeutralModel.hh,v 1. 1 2008/07/10 18:07:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ee2KNeutralModel.hh,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 67 67 virtual ~G4ee2KNeutralModel(); 68 68 69 G4double ThresholdEnergy() const;69 virtual G4double ThresholdEnergy() const; 70 70 71 G4double PeakEnergy() const;71 virtual G4double PeakEnergy() const; 72 72 73 G4double ComputeCrossSection(G4double) const;73 virtual G4double ComputeCrossSection(G4double) const; 74 74 75 G4PhysicsVector* PhysicsVector(G4double, G4double) const;75 virtual G4PhysicsVector* PhysicsVector(G4double, G4double) const; 76 76 77 77 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 92 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 93 93 94 inline G4double G4ee2KNeutralModel::ThresholdEnergy() const95 {96 return 2.0*massK;97 }98 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....100 101 inline G4double G4ee2KNeutralModel::PeakEnergy() const102 {103 return massPhi;104 }105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....107 108 inline G4double G4ee2KNeutralModel::ComputeCrossSection(G4double e) const109 {110 G4double ee = std::min(HighEnergy(),e);111 return cross->CrossSection2Kneutral(ee);112 }113 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....115 116 94 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4eeTo3PiModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeTo3PiModel.hh,v 1. 1 2008/07/10 18:07:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeTo3PiModel.hh,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 67 67 virtual ~G4eeTo3PiModel(); 68 68 69 G4double ThresholdEnergy() const;69 virtual G4double ThresholdEnergy() const; 70 70 71 G4double PeakEnergy() const;71 virtual G4double PeakEnergy() const; 72 72 73 G4double ComputeCrossSection(G4double) const;73 virtual G4double ComputeCrossSection(G4double) const; 74 74 75 G4PhysicsVector* PhysicsVector(G4double, G4double) const;75 virtual G4PhysicsVector* PhysicsVector(G4double, G4double) const; 76 76 77 77 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 96 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 97 97 98 inline G4double G4eeTo3PiModel::ThresholdEnergy() const99 {100 return std::max(LowEnergy(),2.0*massPi + massPi0);101 }102 103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....104 105 inline G4double G4eeTo3PiModel::PeakEnergy() const106 {107 G4double e = massOm;108 if(HighEnergy() > massPhi) e = massPhi;109 return e;110 }111 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....113 114 inline G4double G4eeTo3PiModel::ComputeCrossSection(G4double e) const115 {116 G4double ee = std::min(HighEnergy(),e);117 return cross->CrossSection3pi(ee);118 }119 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....121 122 98 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4eeToHadrons.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToHadrons.hh,v 1. 8 2007/05/23 08:50:41vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToHadrons.hh,v 1.9 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 70 70 71 71 // Print out of the class parameters 72 v oid PrintInfo();72 virtual void PrintInfo(); 73 73 74 74 // Set the factor to artificially increase the crossSection (default 1) … … 77 77 protected: 78 78 79 v oid InitialiseProcess(const G4ParticleDefinition*);79 virtual void InitialiseProcess(const G4ParticleDefinition*); 80 80 81 81 private: … … 92 92 }; 93 93 94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....96 97 inline G4bool G4eeToHadrons::IsApplicable(const G4ParticleDefinition& p)98 {99 return (&p == G4Positron::Positron());100 }101 102 94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 103 95 -
trunk/source/processes/electromagnetic/highenergy/include/G4eeToHadronsMultiModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToHadronsMultiModel.hh,v 1. 6 2008/07/10 18:06:38vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToHadronsMultiModel.hh,v 1.7 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 91 91 G4double maxEnergy = DBL_MAX); 92 92 93 virtual void PrintInfo(); 94 95 // Set the factor to artificially increase the crossSection (default 1) 96 void SetCrossSecFactor(G4double fac); 97 93 98 inline G4double ComputeCrossSectionPerElectron( 94 99 const G4ParticleDefinition*, … … 96 101 G4double cutEnergy = 0.0, 97 102 G4double maxEnergy = DBL_MAX); 98 99 void PrintInfo();100 101 // Set the factor to artificially increase the crossSection (default 1)102 void SetCrossSecFactor(G4double fac);103 103 104 104 private: -
trunk/source/processes/electromagnetic/highenergy/include/G4eeToPGammaModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToPGammaModel.hh,v 1. 1 2008/07/10 18:07:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToPGammaModel.hh,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 68 68 virtual ~G4eeToPGammaModel(); 69 69 70 G4double ThresholdEnergy() const;70 virtual G4double ThresholdEnergy() const; 71 71 72 G4double PeakEnergy() const;72 virtual G4double PeakEnergy() const; 73 73 74 G4double ComputeCrossSection(G4double) const;74 virtual G4double ComputeCrossSection(G4double) const; 75 75 76 G4PhysicsVector* PhysicsVector(G4double, G4double) const;76 virtual G4PhysicsVector* PhysicsVector(G4double, G4double) const; 77 77 78 78 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 97 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 98 99 inline G4double G4eeToPGammaModel::ThresholdEnergy() const100 {101 return LowEnergy();102 }103 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....105 106 inline G4double G4eeToPGammaModel::PeakEnergy() const107 {108 return massR;109 }110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....112 113 inline G4double G4eeToPGammaModel::ComputeCrossSection(G4double e) const114 {115 G4double ee = std::min(HighEnergy(),e);116 G4double xs;117 if(particle == pi0) xs = cross->CrossSectionPi0G(ee);118 else xs = cross->CrossSectionEtaG(ee);119 return xs;120 }121 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....123 124 99 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4eeToTwoPiModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToTwoPiModel.hh,v 1. 4 2008/07/10 18:06:39vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToTwoPiModel.hh,v 1.5 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 67 67 virtual ~G4eeToTwoPiModel(); 68 68 69 G4double ThresholdEnergy() const;69 virtual G4double ThresholdEnergy() const; 70 70 71 G4double PeakEnergy() const;71 virtual G4double PeakEnergy() const; 72 72 73 G4double ComputeCrossSection(G4double) const;73 virtual G4double ComputeCrossSection(G4double) const; 74 74 75 G4PhysicsVector* PhysicsVector(G4double, G4double) const;75 virtual G4PhysicsVector* PhysicsVector(G4double, G4double) const; 76 76 77 77 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 93 93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 94 94 95 inline G4double G4eeToTwoPiModel::ThresholdEnergy() const96 {97 return 2.0*massPi;98 }99 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....101 102 inline G4double G4eeToTwoPiModel::PeakEnergy() const103 {104 return massRho;105 }106 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....108 109 inline G4double G4eeToTwoPiModel::ComputeCrossSection(G4double e) const110 {111 G4double ee = std::min(HighEnergy(),e);112 return cross->CrossSection2pi(ee);113 }114 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....116 117 95 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4hBremsstrahlung.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hBremsstrahlung.hh,v 1. 1 2008/03/06 11:47:10vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hBremsstrahlung.hh,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 72 72 virtual ~G4hBremsstrahlung(); 73 73 74 G4bool IsApplicable(const G4ParticleDefinition& p);74 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 75 75 76 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,77 const G4Material*,78 G4double cut);76 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 77 const G4Material*, 78 G4double cut); 79 79 80 80 // Print out of the class parameters 81 v oid PrintInfo();81 virtual void PrintInfo(); 82 82 83 83 protected: 84 84 85 v oid InitialiseEnergyLossProcess(const G4ParticleDefinition*,86 const G4ParticleDefinition*);85 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 86 const G4ParticleDefinition*); 87 87 88 88 private: … … 100 100 101 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....103 104 inline105 G4bool G4hBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)106 {107 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 110.0*MeV);108 }109 110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....111 112 inline113 G4double G4hBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*,114 const G4Material*,115 G4double)116 {117 return lowestKinEnergy;118 }119 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....121 102 122 103 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4hPairProduction.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hPairProduction.hh,v 1. 1 2008/03/06 11:47:11vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hPairProduction.hh,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 69 69 virtual ~G4hPairProduction(); 70 70 71 G4bool IsApplicable(const G4ParticleDefinition& p);71 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 72 72 73 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,74 const G4Material*, G4double cut);73 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 74 const G4Material*, G4double cut); 75 75 76 76 // Print out of the class parameters 77 v oid PrintInfo();77 virtual void PrintInfo(); 78 78 79 79 protected: 80 80 81 v oid InitialiseEnergyLossProcess(const G4ParticleDefinition*,82 const G4ParticleDefinition*);81 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 82 const G4ParticleDefinition*); 83 83 84 84 private: … … 98 98 99 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....101 102 inline103 G4bool G4hPairProduction::IsApplicable(const G4ParticleDefinition& p)104 {105 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 110.0*MeV);106 }107 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....109 110 inline111 G4double G4hPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*,112 const G4Material*,113 G4double)114 {115 return lowestKinEnergy;116 }117 118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....119 100 120 101 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4hhIonisation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hhIonisation.hh,v 1. 5 2007/05/23 08:50:41vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hhIonisation.hh,v 1.6 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 69 69 virtual ~G4hhIonisation(); 70 70 71 G4bool IsApplicable(const G4ParticleDefinition& p);71 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 72 72 73 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,74 const G4Material*, G4double cut);73 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 74 const G4Material*, G4double cut); 75 75 76 76 // Print out of the class parameters … … 104 104 105 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....107 108 inline G4bool G4hhIonisation::IsApplicable(const G4ParticleDefinition& p)109 {110 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 100.0*MeV &&111 !p.IsShortLived());112 }113 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....115 116 inline G4double G4hhIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,117 const G4Material*,118 G4double cut)119 {120 G4double x = 0.5*cut/electron_mass_c2;121 G4double y = electron_mass_c2/mass;122 G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y));123 return mass*(g - 1.0);124 }125 126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....127 106 128 107 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4mplIonisation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4mplIonisation.hh,v 1. 5 2007/05/23 08:50:41vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4mplIonisation.hh,v 1.6 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 72 72 virtual ~G4mplIonisation(); 73 73 74 G4bool IsApplicable(const G4ParticleDefinition& p);74 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 75 75 76 76 // Print out of the class parameters … … 94 94 95 95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....97 98 inline G4bool G4mplIonisation::IsApplicable(const G4ParticleDefinition& p)99 {100 return (p.GetParticleName() == "monopole");101 }102 103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....104 96 105 97 #endif -
trunk/source/processes/electromagnetic/highenergy/include/G4mplIonisationModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4mplIonisationModel.hh,v 1. 6 2007/11/13 18:36:29vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4mplIonisationModel.hh,v 1.7 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 120 120 121 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 122 123 inline void G4mplIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>*,124 const G4MaterialCutsCouple*,125 const G4DynamicParticle*,126 G4double,127 G4double)128 {}129 130 inline G4double G4mplIonisationModel::Dispersion(131 const G4Material* material,132 const G4DynamicParticle* dp,133 G4double& tmax,134 G4double& length)135 {136 G4double siga = 0.0;137 G4double tau = dp->GetKineticEnergy()/mass;138 if(tau > 0.0) {139 G4double electronDensity = material->GetElectronDensity();140 G4double gam = tau + 1.0;141 G4double invbeta2 = (gam*gam)/(tau * (tau+2.0));142 siga = (invbeta2 - 0.5) * twopi_mc2_rcl2 * tmax * length143 * electronDensity * chargeSquare;144 }145 return siga;146 }147 148 149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/highenergy/src/G4BetheBlochNoDeltaModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochNoDeltaModel.cc,v 1. 3 2006/06/29 19:32:36 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BetheBlochNoDeltaModel.cc,v 1.4 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 58 58 {} 59 59 60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 61 60 62 G4BetheBlochNoDeltaModel::~G4BetheBlochNoDeltaModel() 61 63 {} … … 63 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 64 66 67 G4double G4BetheBlochNoDeltaModel::ComputeDEDXPerVolume( 68 const G4Material* material, 69 const G4ParticleDefinition* pd, 70 G4double kinEnergy, G4double) 71 { 72 return 73 G4BetheBlochModel::ComputeDEDXPerVolume(material, pd, kinEnergy, DBL_MAX); 74 } 65 75 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 77 78 G4double G4BetheBlochNoDeltaModel::CrossSectionPerVolume( 79 const G4Material*,const G4ParticleDefinition*, 80 G4double, G4double, G4double) 81 { 82 return 0.0; 83 } 84 85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 86 87 -
trunk/source/processes/electromagnetic/highenergy/src/G4BraggNoDeltaModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggNoDeltaModel.cc,v 1. 3 2006/06/29 19:32:38 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BraggNoDeltaModel.cc,v 1.4 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 53 53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 54 54 55 56 55 G4BraggNoDeltaModel::G4BraggNoDeltaModel(const G4ParticleDefinition*p, 57 56 const G4String& nam) : 58 57 G4BraggIonModel(p, nam) 59 58 {} 59 60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 60 61 61 62 G4BraggNoDeltaModel::~G4BraggNoDeltaModel() … … 64 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 65 66 67 G4double G4BraggNoDeltaModel::ComputeDEDXPerVolume( 68 const G4Material* material, 69 const G4ParticleDefinition* pd, 70 G4double kinEnergy, G4double) 71 { 72 return 73 G4BraggIonModel::ComputeDEDXPerVolume(material, pd, kinEnergy, DBL_MAX); 74 } 66 75 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 77 78 G4double G4BraggNoDeltaModel::CrossSectionPerVolume( 79 const G4Material*, 80 const G4ParticleDefinition*, 81 G4double, G4double, G4double) 82 { 83 return 0.0; 84 } 85 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 87 88 -
trunk/source/processes/electromagnetic/highenergy/src/G4ee2KChargedModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ee2KChargedModel.cc,v 1. 1 2008/07/10 18:07:27vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ee2KChargedModel.cc,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 76 77 G4double G4ee2KChargedModel::ThresholdEnergy() const 78 { 79 return 2.0*massK; 80 } 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 84 G4double G4ee2KChargedModel::PeakEnergy() const 85 { 86 return massPhi; 87 } 88 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 90 91 G4double G4ee2KChargedModel::ComputeCrossSection(G4double e) const 92 { 93 G4double ee = std::min(HighEnergy(),e); 94 return cross->CrossSection2Kcharged(ee); 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 77 99 G4PhysicsVector* G4ee2KChargedModel::PhysicsVector(G4double emin, 78 100 G4double emax) const -
trunk/source/processes/electromagnetic/highenergy/src/G4ee2KNeutralModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ee2KNeutralModel.cc,v 1. 1 2008/07/10 18:07:27vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ee2KNeutralModel.cc,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 76 77 G4double G4ee2KNeutralModel::ThresholdEnergy() const 78 { 79 return 2.0*massK; 80 } 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 84 G4double G4ee2KNeutralModel::PeakEnergy() const 85 { 86 return massPhi; 87 } 88 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 90 91 G4double G4ee2KNeutralModel::ComputeCrossSection(G4double e) const 92 { 93 G4double ee = std::min(HighEnergy(),e); 94 return cross->CrossSection2Kneutral(ee); 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 77 99 G4PhysicsVector* G4ee2KNeutralModel::PhysicsVector(G4double emin, 78 100 G4double emax) const -
trunk/source/processes/electromagnetic/highenergy/src/G4eeTo3PiModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeTo3PiModel.cc,v 1. 1 2008/07/10 18:07:27vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeTo3PiModel.cc,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 81 81 G4cout << "### G4eeTo3PiModel::~G4eeTo3PiModel: gmax= " 82 82 << gmax << " gcash= " << gcash << G4endl; 83 } 84 85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 86 87 G4double G4eeTo3PiModel::ThresholdEnergy() const 88 { 89 return std::max(LowEnergy(),2.0*massPi + massPi0); 90 } 91 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 93 94 G4double G4eeTo3PiModel::PeakEnergy() const 95 { 96 G4double e = massOm; 97 if(HighEnergy() > massPhi) e = massPhi; 98 return e; 99 } 100 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 102 103 G4double G4eeTo3PiModel::ComputeCrossSection(G4double e) const 104 { 105 G4double ee = std::min(HighEnergy(),e); 106 return cross->CrossSection3pi(ee); 83 107 } 84 108 -
trunk/source/processes/electromagnetic/highenergy/src/G4eeToHadrons.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToHadrons.cc,v 1. 8 2008/10/16 14:29:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToHadrons.cc,v 1.9 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 76 77 G4bool G4eeToHadrons::IsApplicable(const G4ParticleDefinition& p) 78 { 79 return (&p == G4Positron::Positron()); 80 } 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 77 84 void G4eeToHadrons::InitialiseProcess(const G4ParticleDefinition*) 78 85 { -
trunk/source/processes/electromagnetic/highenergy/src/G4eeToHadronsMultiModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToHadronsMultiModel.cc,v 1. 6 2008/07/11 17:49:11 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToHadronsMultiModel.cc,v 1.8 2009/04/12 17:48:21 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 129 129 nModels = models.size(); 130 130 131 if(pParticleChange) { 132 fParticleChange = 133 reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 134 } else { 135 fParticleChange = new G4ParticleChangeForGamma(); 136 } 131 fParticleChange = GetParticleChangeForGamma(); 137 132 } 138 133 } -
trunk/source/processes/electromagnetic/highenergy/src/G4eeToPGammaModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToPGammaModel.cc,v 1. 1 2008/07/10 18:07:27vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToPGammaModel.cc,v 1.2 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 83 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 84 84 85 G4double G4eeToPGammaModel::ThresholdEnergy() const 86 { 87 return LowEnergy(); 88 } 89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 91 92 G4double G4eeToPGammaModel::PeakEnergy() const 93 { 94 return massR; 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 99 G4double G4eeToPGammaModel::ComputeCrossSection(G4double e) const 100 { 101 G4double ee = std::min(HighEnergy(),e); 102 G4double xs; 103 if(particle == pi0) xs = cross->CrossSectionPi0G(ee); 104 else xs = cross->CrossSectionEtaG(ee); 105 return xs; 106 } 107 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 109 85 110 G4PhysicsVector* G4eeToPGammaModel::PhysicsVector(G4double emin, 86 111 G4double emax) const -
trunk/source/processes/electromagnetic/highenergy/src/G4eeToTwoPiModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToTwoPiModel.cc,v 1. 6 2008/07/10 18:06:39vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToTwoPiModel.cc,v 1.7 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 76 77 G4double G4eeToTwoPiModel::ThresholdEnergy() const 78 { 79 return 2.0*massPi; 80 } 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 84 G4double G4eeToTwoPiModel::PeakEnergy() const 85 { 86 return massRho; 87 } 88 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 90 91 G4double G4eeToTwoPiModel::ComputeCrossSection(G4double e) const 92 { 93 G4double ee = std::min(HighEnergy(),e); 94 return cross->CrossSection2pi(ee); 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 77 99 G4PhysicsVector* G4eeToTwoPiModel::PhysicsVector(G4double emin, 78 100 G4double emax) const -
trunk/source/processes/electromagnetic/highenergy/src/G4hBremsstrahlung.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hBremsstrahlung.cc,v 1. 3 2008/10/16 14:29:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hBremsstrahlung.cc,v 1.4 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 72 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 73 73 74 G4bool G4hBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) 75 { 76 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 110.0*MeV); 77 } 78 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 80 81 G4double G4hBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*, 82 const G4Material*, 83 G4double) 84 { 85 return lowestKinEnergy; 86 } 87 88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 89 74 90 void G4hBremsstrahlung::InitialiseEnergyLossProcess( 75 91 const G4ParticleDefinition* part, -
trunk/source/processes/electromagnetic/highenergy/src/G4hPairProduction.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hPairProduction.cc,v 1. 3 2008/10/16 14:29:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hPairProduction.cc,v 1.4 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 73 73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 74 74 75 G4bool G4hPairProduction::IsApplicable(const G4ParticleDefinition& p) 76 { 77 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 110.0*MeV); 78 } 79 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 81 82 G4double G4hPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*, 83 const G4Material*, 84 G4double) 85 { 86 return lowestKinEnergy; 87 } 88 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 90 75 91 void G4hPairProduction::InitialiseEnergyLossProcess( 76 92 const G4ParticleDefinition* part, -
trunk/source/processes/electromagnetic/highenergy/src/G4hhIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hhIonisation.cc,v 1. 8 2008/10/16 14:29:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hhIonisation.cc,v 1.9 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 G4hhIonisation::~G4hhIonisation() 76 76 {} 77 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 79 80 G4bool G4hhIonisation::IsApplicable(const G4ParticleDefinition& p) 81 { 82 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 100.0*MeV && 83 !p.IsShortLived()); 84 } 85 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 87 88 G4double G4hhIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 89 const G4Material*, 90 G4double cut) 91 { 92 G4double x = 0.5*cut/electron_mass_c2; 93 G4double y = electron_mass_c2/mass; 94 G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y)); 95 return mass*(g - 1.0); 96 } 77 97 78 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/highenergy/src/G4mplIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4mplIonisation.cc,v 1. 7 2008/10/16 14:29:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4mplIonisation.cc,v 1.8 2009/02/20 16:38:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 76 77 G4bool G4mplIonisation::IsApplicable(const G4ParticleDefinition& p) 78 { 79 return (p.GetParticleName() == "monopole"); 80 } 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 77 84 void G4mplIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition*, 78 85 const G4ParticleDefinition*) -
trunk/source/processes/electromagnetic/highenergy/src/G4mplIonisationModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4mplIonisationModel.cc,v 1. 5 2007/11/13 18:36:29vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4mplIonisationModel.cc,v 1.7 2009/04/12 17:35:41 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 chargeSquare = magCharge * magCharge; 80 80 dedxlim = 45.*nmpl*nmpl*GeV*cm2/g; 81 fParticleChange = 0; 81 82 } 82 83 … … 93 94 monopole = p; 94 95 mass = monopole->GetPDGMass(); 95 96 if(pParticleChange) 97 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 98 else 99 fParticleChange = new G4ParticleChangeForLoss(); 96 if(!fParticleChange) fParticleChange = GetParticleChangeForLoss(); 100 97 } 101 98 … … 139 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 140 137 141 G4double G4mplIonisationModel::ComputeDEDXAhlen(const G4Material* material, G4double bg2) 138 G4double G4mplIonisationModel::ComputeDEDXAhlen(const G4Material* material, 139 G4double bg2) 142 140 { 143 141 G4double eDensity = material->GetElectronDensity(); … … 176 174 return dedx; 177 175 } 176 177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 178 179 void G4mplIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>*, 180 const G4MaterialCutsCouple*, 181 const G4DynamicParticle*, 182 G4double, 183 G4double) 184 {} 178 185 179 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 204 211 return loss; 205 212 } 213 214 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 215 216 G4double G4mplIonisationModel::Dispersion(const G4Material* material, 217 const G4DynamicParticle* dp, 218 G4double& tmax, 219 G4double& length) 220 { 221 G4double siga = 0.0; 222 G4double tau = dp->GetKineticEnergy()/mass; 223 if(tau > 0.0) { 224 G4double electronDensity = material->GetElectronDensity(); 225 G4double gam = tau + 1.0; 226 G4double invbeta2 = (gam*gam)/(tau * (tau+2.0)); 227 siga = (invbeta2 - 0.5) * twopi_mc2_rcl2 * tmax * length 228 * electronDensity * chargeSquare; 229 } 230 return siga; 231 } 232 233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/lowenergy/History
r1007 r1055 1 $Id: History,v 1.3 29 2008/12/12 08:50:59 sincertiExp $1 $Id: History,v 1.371 2009/05/20 09:27:46 pandola Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 20.05.2009, L. Pandola, tag emlowen-V09-02-38 21 Update Penelope models, G4LivermoreIonisationModel and 22 G4LivermoreBremsstrahlungModel; pointers deleted in the 23 Initialise() method are explicitely zeroed 24 (see tag emlowen-V09-02-37) 25 26 14.05.2009, L. Pandola, tag emlowen-V09-02-37 27 Correct G4PenelopeBremsstrahlungModel to get rid of a crash 28 for re-inizialitation 29 30 12.05.2009, A.Lechner, tag emlowen-V09-02-36 31 Added new scaling algorithm, to obtain heavy ion stopping powers 32 for ions not covered by ICRU 73 report (scaled from existing 33 ICRU 73 data): G4IonDEDXScalingICRU73 34 Included algorithm in ion model, G4IonParametrisedLossModel, 35 extending therefore the applicability of the model to very heavy 36 ions. 37 38 03.05.2009, S.Incerti, tag emlowen-V09-02-35 39 Fixed compilation error in G4LivermorePolarizedComptonModel.cc 40 41 02.05.2009, S.Incerti, tag emlowen-V09-02-34 42 Clean-up of G4LivermorePolarizedComptonModel and -Rayleigh models 43 44 02.05.2009, S.Incerti, tag emlowen-V09-02-33 45 Added message to obsolete non-migrated Geant4-DNA cross section and final state classes 46 47 02.05.2009, S.Incerti, tag emlowen-V09-02-32 48 Added message to obsolete non-migrated Livermore and Penelope classes 49 50 02.05.2009, S.Incerti, tag emlowen-V09-02-31 51 Fixed handling of compounds in G4LivermoreGammaConversionModel.cc 52 53 30.04.2009, S.Incerti, tag emlowen-V09-02-30 54 Removed annoying G4cout in G4AugerData.cc. 55 (AugerTransitionTable) 56 57 29.04.2009, S.Incerti, tag emlowen-V09-02-29 58 Increased energy range validity of e- elastic Champion model 59 up to 10 MeV (Geant4-DNA process). 60 From this tag, G4LEDATA version 6.5 is needed. 61 62 29.04.2009, S.Incerti, tag emlowen-V09-02-28 63 Fixed cross section computation bug in: 64 G4DNAScreenedRutherfordElasticModel.cc 65 G4DNAChampionElasticModel.cc 66 67 18.04.2009, V.Ivanchenko, tag emlowen-V09-02-27 68 Cleanup of new model classes G4LivermoreBremsstrahlungModel, 69 G4LivermoreComptonModel, G4LivermoreGammaConversionModel, 70 G4LivermoreIonisationModel, G4LivermorePhotoElectricModel, 71 G4LivermoreRayleighModel,G4PenelopeAnnihilationModel 72 G4PenelopeBremsstrahlungModel, G4PenelopeComptonModel, 73 G4PenelopeGammaConversionModel, G4PenelopeIonisationModel, 74 G4PenelopePhotoElectricModel, G4PenelopeRayleighModel 75 - defined high energy limit for a model in constructor 76 - do not overwright default (zero) low energy limit of a model 77 - do not change energy limits in Initiliation methods 78 - added MinEnergyCut method for models used for energy loss 79 - do not change track status inside the model for charged particles 80 - simplified initialisation 81 - protect all printouts by verbosityLevel variable 82 - removed MeanFreePath method and table 83 - cleaned logic in applying of deexcitation module 84 - use G4ElementSelector if possible 85 G4ShellVacancy - substitute "set" varibale, 86 - comment out destructor to avoid crash 87 88 02.04.2009, L. Pandola, tag emlowen-V09-02-26 89 Fixed bug in G4PenelopeRayleigh.cc (calculation of mfp for compounds). 90 Notice that G4PenelopeRayleighModel.cc was ok. The old process is 91 going to be obsolete in a while. 92 93 25.03.2009, L. Pandola, tag emlowen-V09-02-25 94 Fixed bug with momentum normalization in G4PenelopeBremsstrahlungModel.cc 95 Fixed G4PenelopePhotoElectricModel.cc to avoid wrong Warnings 96 97 23.03.2009, L. Pandola, tag emlowen-V09-02-24 98 Same sa previous. For some reason emlowen-V09-02-23 didn't include 99 the updated files. 100 101 23.03.2009, L. Pandola, tag emlowen-V09-02-23 102 - Added protections in G4eIonisationSpectrum and G4eIonisationParameters 103 to avoid bug 1042. 104 - From now on, G4LEDATA 6.4 should be used 105 106 19.03.2009, S. Incerti, tag emlowen-V09-02-22 107 - changed energy range display for migrated Livermore photon processes 108 109 19.03.2009, S. Incerti, tag emlowen-V09-02-21 110 - set default angular generator in G4LivermorePhotoElectric.cc as Sauter-Gavrila 111 112 19.03.2009, L. Pandola, tag emlowen-V09-02-20 113 - First fully tested version of G4LivermoreBremsstrahlungModel 114 From this tag on, all Livermore models are migrated. 115 116 18.03.2009, L. Pandola, tag emlowen-V09-02-19 117 - Removed G4Rayleigh to avoid duplication with G4RayleighScattering 118 - Clean-up of G4RayleighScattering (e.g. removed un-necessary dependencies) 119 120 16.03.2009, A. Lechner, tag emlowen-V09-02-18 121 - Replaced old version of G4IonParametrisedLossModel with newer one 122 - Added G4IonDEDXHandler, which is a handler class used by the new 123 G4IonParametrisedLossModel class 124 - Added G4VIonDEDXScalingAlgorithm, which is used by G4IonDEDXHandler 125 - Removed G4IonParametrisedLossTable (is replaced by G4IonDEDXHandler) 126 127 04.03.2009, S. Incerti, tag emlowen-V09-02-17 128 - moved IsApplicable method for Geant4-DNA process classes from .hh to .cc 129 130 03.03.2009, S. Incerti, tag emlowen-V09-02-16 131 - added gamma particle and energy range test in cross section computation 132 to all Livermore photon processes 133 134 16.02.2009, S. Incerti, tag emlowen-V09-02-15 135 - added protections against FPE in G4hLowEnergyLoss.cc (see EM forum 136 item 893) 137 138 16.02.2009, S. Incerti, tag emlowen-V09-02-14 139 - removed compilation warning in G4DNAEmfietzoglouExcitationModel.cc 140 141 16.02.2009, S. Incerti, tag emlowen-V09-02-13 142 - improved energy limit display in Geant4-DNA model classes 143 - commented InitialiseElementSelectors call. 144 145 16.02.2009, S. Incerti, tag emlowen-V09-02-12 146 Made compatible with tag emutils-V09-02-00 the following files 147 - G4DNAElastic.cc 148 - G4DNAExcitation.cc 149 - G4DNAIonisation.cc 150 - G4DNAChargeDecrease.cc 151 - G4DNAChargeIncrease.cc 152 153 14.02.2009, S. Incerti, tag emlowen-V09-02-11 154 Added several corrections to migrated Geant4-DNA processes: 155 - G4DNABornIonisationModel.cc 156 - G4DNAEmfietzoglouExcitationModel.cc 157 - G4DNARuddIonisationModel.cc 158 - G4DNAIonisation.hh 159 160 10.02.2009, L. Pandola, tag emlowen-V09-02-10 161 - Added G4LivermoreIonisationModel, namely first implementation of 162 LowEnergyIonisation in the new design 163 164 29.01.2009, L. Pandola, tag emlowen-V09-02-09 165 - Updated public interface of G4eIonisationCrossSectionHandler.cc in order to 166 facilitate the migration from G4LowEnergyIonisation to G4LivermoreIonisationModel 167 168 22.01.2009, S. Incerti, tag emlowen-V09-02-08 169 - Fixed compilation error problem & code syntax in DNA model classes 170 171 21.01.2009, S. Incerti, tag emlowen-V09-02-07 172 - Updated Livermore photon processes classes for handling of compound materials 173 - Added pointer removal protections 174 - Involved classes are : 175 G4LivermoreRayleighModel.cc 176 G4LivermorePolarizedRayleighModel.cc 177 G4LivermorePolarizedComptonModel.cc 178 G4LivermorePhotoElectricModel.cc 179 G4LivermoreGammaconversionModel.cc 180 G4LivermoreComptonModel.cc 181 182 20.01.2009, S. Incerti, tag emlowen-V09-02-06 183 Added 'kill particle without total energy deposit' feature for DNA charge change processes 184 Involved files are : 185 - G4DNAProcess.icc, 186 - G4FinalStateProduct.hh,.cc, 187 - G4FinalStateChargeDecrease.cc 188 - G4FinalStateChargeIncrease.cc 189 190 20.01.2009, S. Incerti, tag emlowen-V09-02-05 191 - Corrected energy limits in G4CrossSectionIonisationBornPartial.cc 192 - Added proton case in G4CrossSectionExcitationMillerGreenPartial.cc 193 - Added protection (waterExcitation.ExcitationEnergy) in G4CrossSectionExcitationMillerGreenPartial.cc 194 195 19.01.2009, S. Incerti, tag emlowen-V09-02-04 196 Added angle initialisation in G4DNAScreenedRutherfordElasticModel 197 198 12.01.2009, S. Incerti, tag emlowen-V09-02-03 199 Added preliminary migrated Geant4-DNA processes and models. 200 201 08.01.2009 L. Pandola, tag emlowen-V09-02-02 202 Edited G4PenelopePhotoElectric.cc and G4PenelopePhotoElectricModel.cc 203 to suppress a warning message from G4AtomicTransitionManager appearing 204 for some elements (Oxygen ,Fluorine). This is due to the fact that 205 Penelope and G4AtomicTransitionManager databases may contain a different number 206 of shells. Physics results are unchanged. 207 208 19.12.2008 L. Pandola, tag emlowen-V09-02-01 209 Added G4RayleighScattering process (G4VEmProcess) to 210 describe Rayleigh scattering. This was not available within 211 the Std package 212 213 15.12.2008 L. Pandola, tag emlowen-V09-02-00 214 Same as the previous one (emlowen-V09-01-46). I arrived too late. 215 216 15.12.2008 L. Pandola, tag emlowen-V09-01-46 217 Added G4PenelopeBremsstrahlungModel, namely bremsstrahlung according to Penelope 218 model, migrated to the Std-design (inheriting from G4VEmModel). A few minor 219 cleaning of G4PenelopeBremsstrahlungContinuous.cc and G4PenelopeIonisation.cc. 220 From this tag, ALL Penelope processes have been migrated. 221 20 222 12.12.2008 S. Incerti, tag emlowen-V09-01-45 21 223 Upgrade to G4LogLogInterpolation_revision1c.cc 22 224 23 009.12.2008 S. Incerti, tag emlowen-V09-01-44 24 Added protection to G4FinalStateElasticChampion.cc for angular treatment of XS at 180*deg 225 09.12.2008 S. Incerti, tag emlowen-V09-01-44 226 Added protection to G4FinalStateElasticChampion.cc for angular treatment of XS 227 at 180*deg 25 228 26 229 09.12.2008 S. Incerti, tag emlowen-V09-01-43 -
trunk/source/processes/electromagnetic/lowenergy/include/G4AtomicDeexcitation.hh
r1007 r1055 26 26 // 27 27 // $Id: G4AtomicTransitionManager.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4AtomicShell.hh
r1007 r1055 26 26 // 27 27 // $Id: G4AtomicShell.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4AtomicTransitionManager.hh
r1007 r1055 26 26 // 27 27 // $Id: G4AtomicTransitionManager.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4AugerData.hh
r1007 r1055 25 25 // 26 26 // $Id: G4AugerData.hh 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4BremsstrahlungCrossSectionHandler.hh
r819 r1055 70 70 ~G4BremsstrahlungCrossSectionHandler(); 71 71 72 G4double GetCrossSectionAboveThresholdForElement(G4double energy, 73 G4double cutEnergy, 74 G4int Z); 75 72 76 protected: 73 77 -
trunk/source/processes/electromagnetic/lowenergy/include/G4BremsstrahlungParameters.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CompositeEMDataSet.hh
r1007 r1055 26 26 // 27 27 // $Id: G4CompositeEMDataSet.hh,v 1.12 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeDecrease.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEDECREASE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeDecreasePartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEDECREASEPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeIncrease.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEIncrease_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeIncreasePartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONCHARGEIncreasePARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeTransferCH.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionChargeTransferExp.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticChampion.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticScreenedRutherford.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticScreenedRutherfordHE.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONELASTICSCREENEDRUTHERFORDHE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionElasticScreenedRutherfordLE.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONELASTICSCREENEDRUTHERFORDLE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationBorn.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationBornPartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONBORNPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationEmfietzoglou.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONEMFIETZOGLOU_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationEmfietzoglouPartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONEMFIETZOGLOUPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionExcitationMillerGreenPartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONEXCITATIONMILLERGREENPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionHandler.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBorn.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 30 30 #ifndef G4CROSSSECTIONIONISATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBornElectron.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBornPartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONIONISATIONBORNPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationBornPartialElectron.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationRudd.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONIONISATIONRUDD_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionIonisationRuddPartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4CROSSSECTIONIONISATIONRuddPARTIAL_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionKill.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionPsCreationChampion.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4CrossSectionPsCreationChampionPartial.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNACrossSectionDataSet.hh
r1007 r1055 26 26 // 27 27 // $Id: G4DNACrossSectionDataSet.hh,v 1.6 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Riccardo Capra <capra@ge.infn.it> -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAGenericIonsManager.hh
r1007 r1055 26 26 // 27 27 // $Id: G4DNAGenericIonsManager.hh,v 1.3 2006/06/29 19:34:16 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 30 30 #ifndef G4DNAGENERICIONSMANAGER_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAProcess.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4DNAProcess.icc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4DNAProcess.icc,v 1.1 1 2007/12/10 16:31:19 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4DNAProcess.icc,v 1.12 2009/01/20 07:50:28 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 111 111 aParticleChange.ProposeEnergy(0.); 112 112 aParticleChange.ProposeMomentumDirection( 0., 0., 0. ); 113 aParticleChange.ProposeLocalEnergyDeposit(track.GetKineticEnergy() + deposit); 114 113 114 if (product.PrimaryParticleIsKilledAndDoNotDepositEnergy()) 115 { 116 aParticleChange.ProposeLocalEnergyDeposit(deposit); 117 } 118 else 119 { 120 aParticleChange.ProposeLocalEnergyDeposit(track.GetKineticEnergy() + deposit); 121 } 122 115 123 } 116 124 else -
trunk/source/processes/electromagnetic/lowenergy/include/G4DopplerProfile.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4DummyFinalState.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4EMDataSet.hh
r1007 r1055 26 26 // 27 27 // $Id: G4EMDataSet.hh,v 1.12 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateChargeDecrease.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATECHARGEDECREASE_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateChargeIncrease.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATECHARGEIncrease_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateChargeTransferProton.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateElasticBrennerZaider.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATEELASTICBRENNERZAIDER_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateElasticChampion.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateElasticScreenedRutherford.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATEELASTICSCREENEDRUTHERFORD_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateExcitationBorn.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATEEXCITATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateExcitationEmfietzoglou.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATEEXCITATIONEMFIETZOGLOU_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateExcitationMillerGreen.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATEEXCITATIONMILLERGREEN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateIonisationBorn.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 #ifndef G4FINALSTATEIONISATIONBORN_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateIonisationRudd.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateKill.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStateProduct.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4FinalStateProduct.hh,v 1. 4 2007/10/15 08:31:49 piaExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4FinalStateProduct.hh,v 1.5 2009/01/20 07:50:28 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 72 72 void ModifyPrimaryParticle(const G4ThreeVector& direction, G4double energy); 73 73 74 void DoNotDepositEnergy(); 74 75 void KillPrimaryParticle(); 75 76 76 77 G4bool PrimaryParticleIsKilled() const { return killStatus; } 78 79 G4bool PrimaryParticleIsKilledAndDoNotDepositEnergy() const { return doNotDepositStatus; } 77 80 78 81 G4bool PrimaryParticleIsModified() const { return isModified; } … … 96 99 97 100 G4bool killStatus; 101 G4bool doNotDepositStatus; 98 102 G4bool isModified; 99 103 G4double localEnergyDeposit; -
trunk/source/processes/electromagnetic/lowenergy/include/G4FinalStatePsCreationChampion.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/include/G4FluoTransition.hh
r1007 r1055 26 26 // 27 27 // $Id: G4FluoTransition.hh,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/include/G4IonParametrisedLossModel.hh
r1007 r1055 37 37 // First implementation: 10. 11. 2008 38 38 // 39 // Modifications: 40 // 41 // 39 // Modifications: 03. 02. 2009 - Bug fix iterators (AL) 40 // 11. 03. 2009 - Introduced new table handler (G4IonDEDXHandler) 41 // and modified method to add/remove tables 42 // (tables are now built in initialisation phase), 43 // Minor bug fix in ComputeDEDXPerVolume (AL) 44 // 42 45 // Class description: 43 46 // Model for computing the energy loss of ions by employing a … … 57 60 #include "G4VEmModel.hh" 58 61 #include "G4EmCorrections.hh" 59 #include "G4IonParametrisedLossTable.hh" 60 #include "G4EmCorrections.hh" 62 #include "G4IonDEDXHandler.hh" 61 63 #include <iomanip> 62 64 #include <list> … … 67 69 class G4BetheBlochModel; 68 70 class G4ParticleChangeForLoss; 69 70 typedef std::list<G4IonLossTableHandle*> LossTableList; 71 class G4VIonDEDXTable; 72 class G4VIonDEDXScalingAlgorithm; 73 class G4LPhysicsFreeVector; 74 75 typedef std::list<G4IonDEDXHandler*> LossTableList; 71 76 typedef std::pair<const G4ParticleDefinition*, const G4Material*> IonMatCouple; 72 77 … … 150 155 G4double); // Length of current step 151 156 152 153 // Template function which allows to add additional stopping power tables 157 G4double GetRange(const G4ParticleDefinition*, // Projectile 158 const G4Material*, // Target Material 159 G4double); // Kinetic energy 160 161 // Function which allows to add additional stopping power tables 154 162 // in combination with a scaling algorithm, which may depend on dynamic 155 163 // information like the current particle energy (the table and scaling 156 // algorithm are used via a wrapper class, which performs e.g.caching or164 // algorithm are used via a handler class, which performs e.g.caching or 157 165 // which applies the scaling of energy and dE/dx values) 158 template <class TABLE, class SCALING_ALGO> 159 void AddDEDXTable() { 160 G4IonLossTableHandle* table = 161 new G4IonParametrisedLossTable<TABLE, SCALING_ALGO>; 162 163 lossTableList.push_front(table); 164 } 165 166 // Template function which allows to add additional stopping power tables 167 // (the table itself is used via a wrapper class, which performs e.g. 168 // caching) 169 template <class TABLE> 170 void AddDEDXTable() { 171 G4IonLossTableHandle* table = 172 new G4IonParametrisedLossTable<TABLE>; 173 174 lossTableList.push_front(table); 175 } 166 G4bool AddDEDXTable(const G4String& name, 167 G4VIonDEDXTable* table, 168 G4VIonDEDXScalingAlgorithm* algorithm = 0); 169 170 G4bool RemoveDEDXTable(const G4String& name); 176 171 177 172 // Function checking the applicability of physics tables to ion-material … … 184 179 // and a specified energy grid 185 180 void PrintDEDXTable( 181 const G4ParticleDefinition*, // Projectile (ion) 182 const G4Material*, // Absorber material 183 G4double, // Minimum energy per nucleon 184 G4double, // Maximum energy per nucleon 185 G4int, // Number of bins 186 G4bool); // Logarithmic scaling of energy 187 188 // Function printing a dE/dx table for a given ion-material combination 189 // and a specified energy grid 190 void PrintDEDXTableHandlers( 186 191 const G4ParticleDefinition*, // Projectile (ion) 187 192 const G4Material*, // Absorber material -
trunk/source/processes/electromagnetic/lowenergy/include/G4IonParametrisedLossModel.icc
r1007 r1055 37 37 // First implementation: 10. 11. 2008 38 38 // 39 // Modifications: 39 // Modifications: 03. 02. 2009 - Bug fix iterators (AL) 40 // 11. 03. 2009 - Introduced new table handler (G4IonDEDXHandler) 41 // and modified method to add/remove tables 42 // (tables are now built in initialisation phase), 43 // Minor bug fix in ComputeDEDXPerVolume (AL) 40 44 // 41 45 // … … 186 190 const G4Material* material) { // Target material 187 191 188 LossTableList::iterator iter = lossTableList. begin();192 LossTableList::iterator iter = lossTableList.end(); 189 193 LossTableList::iterator iterTables = lossTableList.begin(); 190 194 LossTableList::iterator iterTables_end = lossTableList.end(); -
trunk/source/processes/electromagnetic/lowenergy/include/G4LinInterpolation.hh
r1007 r1055 26 26 // 27 27 // $Id: G4LinInterpolation.hh,v 1.3 2006/06/29 19:35:45 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreComptonModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreComptonModel.hh,v 1. 1 2008/10/30 14:16:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermoreComptonModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 // 30 // Author: Sebastien Inserti 31 // 30 October 2008 32 // 33 // History: 34 // -------- 29 35 30 36 #ifndef G4LivermoreComptonModel_h … … 40 46 #include "G4DopplerProfile.hh" 41 47 #include "G4ForceCondition.hh" 48 #include "G4Gamma.hh" 42 49 43 50 class G4LivermoreComptonModel : public G4VEmModel … … 70 77 G4ParticleChangeForGamma* fParticleChange; 71 78 72 G4double GetMeanFreePath(const G4Track& track,73 G4double previousStepSize,74 G4ForceCondition* condition);79 //G4double GetMeanFreePath(const G4Track& track, 80 // G4double previousStepSize, 81 // G4ForceCondition* condition); 75 82 private: 76 83 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreGammaConversionModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreGammaConversionModel.hh,v 1. 1 2008/10/30 14:16:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermoreGammaConversionModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 … … 38 38 #include "G4ForceCondition.hh" 39 39 #include "G4CompositeEMDataSet.hh" 40 #include "G4Gamma.hh" 40 41 41 42 class G4LivermoreGammaConversionModel : public G4VEmModel … … 45 46 46 47 G4LivermoreGammaConversionModel(const G4ParticleDefinition* p = 0, 47 const G4String& nam = "Livermore GammaConversion");48 const G4String& nam = "LivermoreConversion"); 48 49 49 50 virtual ~G4LivermoreGammaConversionModel(); -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePhotoElectricModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePhotoElectricModel.hh,v 1. 1 2008/10/30 14:16:35 sincertiExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermorePhotoElectricModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 … … 48 48 #include "G4ProductionCutsTable.hh" 49 49 #include "G4ForceCondition.hh" 50 50 #include "G4Gamma.hh" 51 51 52 52 class G4LivermorePhotoElectricModel : public G4VEmModel … … 56 56 57 57 G4LivermorePhotoElectricModel(const G4ParticleDefinition* p = 0, 58 const G4String& nam = "LivermorePh otoElectric");58 const G4String& nam = "LivermorePhElectric"); 59 59 60 60 virtual ~G4LivermorePhotoElectricModel(); … … 89 89 90 90 G4ParticleChangeForGamma* fParticleChange; 91 91 /* 92 92 G4double GetMeanFreePath(const G4Track& aTrack, 93 93 G4double previousStepSize, 94 94 G4ForceCondition* condition); 95 */ 95 96 private: 96 97 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePolarizedComptonModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePolarizedComptonModel.hh,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermorePolarizedComptonModel.hh,v 1.3 2009/05/02 15:20:52 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 … … 40 40 #include "G4DopplerProfile.hh" 41 41 #include "G4ForceCondition.hh" 42 #include "G4Gamma.hh" 42 43 43 44 class G4LivermorePolarizedComptonModel : public G4VEmModel … … 71 72 G4ParticleChangeForGamma* fParticleChange; 72 73 74 /* 73 75 G4double GetMeanFreePath(const G4Track& aTrack, 74 76 G4double previousStepSize, 75 77 G4ForceCondition* condition); 78 */ 76 79 private: 77 80 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermorePolarizedRayleighModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePolarizedRayleighModel.hh,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermorePolarizedRayleighModel.hh,v 1.3 2009/05/02 15:20:52 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 … … 36 36 #include "G4LogLogInterpolation.hh" 37 37 #include "G4CompositeEMDataSet.hh" 38 #include "G4Gamma.hh" 38 39 39 40 class G4LivermorePolarizedRayleighModel : public G4VEmModel -
trunk/source/processes/electromagnetic/lowenergy/include/G4LivermoreRayleighModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreRayleighModel.hh,v 1. 1 2008/10/30 14:16:35 sincertiExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermoreRayleighModel.hh,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 … … 37 37 #include "G4CompositeEMDataSet.hh" 38 38 #include "G4ForceCondition.hh" 39 #include "G4Gamma.hh" 39 40 40 41 class G4LivermoreRayleighModel : public G4VEmModel … … 68 69 G4ParticleChangeForGamma* fParticleChange; 69 70 70 G4double GetMeanFreePath(const G4Track& aTrack,71 G4double previousStepSize,72 G4ForceCondition* condition);73 71 private: 74 72 -
trunk/source/processes/electromagnetic/lowenergy/include/G4LogLogInterpolation.hh
r1007 r1055 26 26 // 27 27 // $Id: G4LogLogInterpolation.hh,v 1.6 2008/12/09 13:28:02 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyBremsstrahlung.hh
r1007 r1055 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 2$29 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 30 30 // 31 31 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyCompton.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyGammaConversion.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyIonisation.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPhotoElectric.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPolarizedCompton.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPolarizedRayleigh.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4LowEnergyRayleigh.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/lowenergy/include/G4OrlicLCrossSection.hh
r1007 r1055 25 25 // 26 26 // $Id: G4OrlicLCrossSection.hh,v 1.3 2008/06/03 07:29:15 gcosmo Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Haifa Ben Abdelouahed -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeAnnihilationModel.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlung.hh
r1007 r1055 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 2$29 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 30 30 // 31 31 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlungAngular.hh
r1007 r1055 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 2$29 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 30 30 // 31 31 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeBremsstrahlungContinuous.hh
r1007 r1055 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 2$29 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 30 30 // 31 31 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeCompton.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeComptonModel.hh
r1007 r1055 25 25 // 26 26 // $Id: G4PenelopeComptonModel.hh,v 1.1 2008/10/28 08:50:21 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeGammaConversion.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: L. Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeGammaConversionModel.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeIonisation.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: L. Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeIonisationModel.hh
r1007 r1055 25 25 // 26 26 // $Id: G4PenelopeIonisationModel.hh,v 1.1 2008/12/04 14:12:09 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopePhotoElectric.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: L.Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopePhotoElectricModel.hh
r1007 r1055 25 25 // 26 26 // $Id: G4PenelopePhotoElectricModel.hh,v 1.1 2008/10/28 08:50:21 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeRayleigh.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4PenelopeRayleighModel.hh
r1007 r1055 25 25 // 26 26 // $Id: G4PenelopeRayleighModel.hh,v 1.1 2008/10/28 08:50:21 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/include/G4RangeNoTest.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4RangeTest.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4SemiLogInterpolation.hh
r1007 r1055 26 26 // 27 27 // $Id: G4SemiLogInterpolation.hh,v 1.4 2006/06/29 19:36:51 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4ShellData.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4ShellEMDataSet.hh
r1007 r1055 26 26 // 27 27 // $Id: G4ShellEMDataSet.hh,v 1.12 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4ShellVacancy.hh
r819 r1055 35 35 // 25 Mar 2002 V.Ivanchenko Change AverageNOfIonisations int->double 36 36 // 12 Apr 2003 V.Ivanchenko Migrade to cut per region 37 // 16 Apr 2009 V.Ivanchenko Rename "set" variable 37 38 // 38 39 // ------------------------------------------------------------------- … … 65 66 G4double eLoss) const; 66 67 67 void AddXsiTable(G4VEMDataSet* set);68 void AddXsiTable(G4VEMDataSet* p); 68 69 69 70 private: -
trunk/source/processes/electromagnetic/lowenergy/include/G4VCrossSectionHandler.hh
r1007 r1055 26 26 // 27 27 // $Id: G4VCrossSectionHandler.hh,v 1.14 2006/06/29 19:37:01 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VDataSetAlgorithm.hh
r1007 r1055 26 26 // 27 27 // $Id: G4VDataSetAlgorithm.hh,v 1.7 2006/06/29 19:37:07 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VEMDataSet.hh
r1007 r1055 26 26 // 27 27 // $Id: G4VEMDataSet.hh,v 1.12 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VLowEnergyDiscretePhotonProcess.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4VLowEnergyTestableDiscreteProcess.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 -
trunk/source/processes/electromagnetic/lowenergy/include/G4VRangeTest.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4VeLowEnergyLoss.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // 3.4.2000 Veronique Lefebure: -
trunk/source/processes/electromagnetic/lowenergy/include/G4WaterExcitationStructure.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4WaterIonisationStructure.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eBremsstrahlungSpectrum.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eCrossSectionExcitationEmfietzoglou.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eCrossSectionScreenedRutherford.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eIonisationCrossSectionHandler.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationCrossSectionHandler.hh,v 1. 6 2006/06/29 19:37:36 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eIonisationCrossSectionHandler.hh,v 1.7 2009/01/29 08:13:27 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 40 40 // Modified: 41 41 // 10 Oct 2001 M.G. Pia Revision to improve code quality and consistency with design 42 // 42 // 28 Jan 2009 L.Pandola Added public method to make a easier migration of 43 // G4LowEnergyIonisation to G4LivermoreIonisationModel 43 44 // ------------------------------------------------------------------- 44 45 … … 72 73 73 74 ~G4eIonisationCrossSectionHandler(); 75 76 G4double GetCrossSectionAboveThresholdForElement(G4double energy, 77 G4double cutEnergy, 78 G4int Z); 74 79 75 80 protected: -
trunk/source/processes/electromagnetic/lowenergy/include/G4eIonisationParameters.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/include/G4eIonisationSpectrum.hh
r1007 r1055 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 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eLowEnergyLoss.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4eLowEnergyLoss.icc
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/include/G4ecpssrCrossSection.hh
r1007 r1055 25 25 // 26 26 // $Id: G4ecpssrCrossSection.hh,v 1.3 2008/06/03 07:29:15 gcosmo Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 28 28 // 29 29 // Author: Haifa Ben Abdelouahed -
trunk/source/processes/electromagnetic/lowenergy/include/G4hLowEnergyLoss.hh
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // $Id: -
trunk/source/processes/electromagnetic/lowenergy/include/G4hLowEnergyLoss.icc
r1007 r1055 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 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 29 29 // 30 30 // $Id: -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionDoubleExp.hh
r1007 r1055 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 2$47 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 48 48 49 49 #ifndef G4HSHELLCROSSSECTIONDOUBLEEXP_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionDoubleExpData.hh
r1007 r1055 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 2$42 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 43 43 44 44 #ifndef G4hShellCrossSectionDoubleExpData_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionExp.hh
r1007 r1055 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 2$47 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 48 48 49 49 #ifndef G4HSHELLCROSSSECTIONEXP_HH -
trunk/source/processes/electromagnetic/lowenergy/include/G4hShellCrossSectionExpData.hh
r1007 r1055 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 2$40 // GEANT4 tag $Name: geant4-09-03-beta-cand-00 $ 41 41 42 42 #ifndef G4hShellCrossSectionExpData_HH -
trunk/source/processes/electromagnetic/lowenergy/src/G4AtomicDeexcitation.cc
r1007 r1055 26 26 // 27 27 // $Id: G4AtomicDeexcitation.cc,v 1.11 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) … … 111 111 } 112 112 113 // Look this in a particular way: only one auger emitted! // 113 // Look this in a particular way: only one auger emitted! // ???? 114 114 while (provShellId > -2); 115 115 … … 297 297 // G4cout << "G4AtomicDeexcitation warning: No Auger transition found" << G4endl; 298 298 // G4cout << "Absorbed enrgy deposited locally" << G4endl; 299 return 0;300 // // G4Exception("G4AtomicDeexcitation: No Auger transition found");299 G4Exception("G4AtomicDeexcitation: No Auger transition found"); 300 return 0; 301 301 } 302 302 } … … 394 394 // G4int augerOriginatingShellId = 0; 395 395 396 G4int numberOfPossibleAuger = 397 (anAugerTransition->AugerTransitionProbabilities(transitionRandomShellId))->size(); 396 G4int numberOfPossibleAuger = 0; 397 numberOfPossibleAuger = anAugerTransition->AugerTransitionProbabilities(transitionRandomShellId)->size(); 398 399 398 400 G4bool foundFlag = false; 399 401 -
trunk/source/processes/electromagnetic/lowenergy/src/G4AugerData.cc
r961 r1055 486 486 // G4cout << "G4AugerData for Element no. " << element << " are loaded" << G4endl; 487 487 // G4cout << "G4AugerData for Element no. " << element << " are loaded" << G4endl; 488 G4cout << "AugerTransitionTable complete"<< G4endl;488 //G4cout << "AugerTransitionTable complete"<< G4endl; 489 489 } 490 490 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4BremsstrahlungCrossSectionHandler.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1. 9 2006/06/29 19:38:42 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.10 2009/03/03 11:19:18 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 10.10.2001 MGP Revision to improve code quality and consistency with design 42 42 // 21.01.2003 VI cut per region 43 // 03.03.2009 LP Added public method to make a easier migration of 44 // G4LowEnergyBremsstrahlung to G4LivermoreBremsstrahlungModel 43 45 // 44 46 // ------------------------------------------------------------------- … … 55 57 #include "G4ProductionCutsTable.hh" 56 58 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 60 57 61 G4BremsstrahlungCrossSectionHandler::G4BremsstrahlungCrossSectionHandler(const G4VEnergySpectrum* spec, 58 62 G4VDataSetAlgorithm* ) … … 62 66 } 63 67 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 64 69 65 70 G4BremsstrahlungCrossSectionHandler::~G4BremsstrahlungCrossSectionHandler() … … 68 73 } 69 74 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 70 76 71 77 std::vector<G4VEMDataSet*>* … … 127 133 return set; 128 134 } 135 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 137 138 G4double G4BremsstrahlungCrossSectionHandler::GetCrossSectionAboveThresholdForElement(G4double energy, 139 G4double cutEnergy, 140 G4int Z) 141 { 142 G4double value = 0.; 143 if(energy > cutEnergy) 144 { 145 G4double elemCs = FindValue(Z, energy); 146 value = theBR->Probability(Z,cutEnergy, energy, energy); 147 value *= elemCs; 148 } 149 return value; 150 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeDecrease.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionChargeDecrease.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionChargeDecrease.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionChargeDecrease.hh" … … 79 79 } 80 80 81 G4cout << G4endl; 82 G4cout << "*******************************************************************************" << G4endl; 83 G4cout << "*******************************************************************************" << G4endl; 84 G4cout << " The class G4CrossSectionChargeDecrease is NOT SUPPORTED ANYMORE. " << G4endl; 85 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 86 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 87 G4cout << "*******************************************************************************" << G4endl; 88 G4cout << "*******************************************************************************" << G4endl; 89 G4cout << G4endl; 81 90 } 82 91 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeIncrease.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionChargeIncrease.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionChargeIncrease.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionChargeIncrease.hh" … … 79 79 } 80 80 81 G4cout << G4endl; 82 G4cout << "*******************************************************************************" << G4endl; 83 G4cout << "*******************************************************************************" << G4endl; 84 G4cout << " The class G4CrossSectionChargeIncrease is NOT SUPPORTED ANYMORE. " << G4endl; 85 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 86 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 87 G4cout << "*******************************************************************************" << G4endl; 88 G4cout << "*******************************************************************************" << G4endl; 89 G4cout << G4endl; 81 90 } 82 91 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticChampion.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionElasticChampion.cc,v 1. 4 2008/12/05 11:58:16sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionElasticChampion.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 … … 57 57 G4Exception("G4CrossSectionElasticChampion constructor: electron is not defined"); 58 58 } 59 60 G4cout << G4endl; 61 G4cout << "*******************************************************************************" << G4endl; 62 G4cout << "*******************************************************************************" << G4endl; 63 G4cout << " The class G4CrossSectionElasticChampion is NOT SUPPORTED ANYMORE. " << G4endl; 64 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 65 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 66 G4cout << "*******************************************************************************" << G4endl; 67 G4cout << "*******************************************************************************" << G4endl; 68 G4cout << G4endl; 59 69 } 60 70 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherfordHE.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionElasticScreenedRutherfordHE.cc,v 1. 2 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionElasticScreenedRutherfordHE.cc,v 1.3 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionElasticScreenedRutherfordHE.hh" … … 35 35 lowEnergyLimit = 200. * eV; 36 36 highEnergyLimit = 10. * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4CrossSectionElasticScreenedRutherfordHE is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherfordLE.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionElasticScreenedRutherfordLE.cc,v 1. 2 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionElasticScreenedRutherfordLE.cc,v 1.3 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionElasticScreenedRutherfordLE.hh" … … 35 35 lowEnergyLimit = 0 * eV; 36 36 highEnergyLimit = 200 * eV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4CrossSectionElasticScreenedRutherfordLE is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationBorn.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationBorn.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionExcitationBorn.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationBorn.hh" … … 36 36 highEnergyLimit = 10 * MeV; 37 37 table = 0; 38 39 G4cout << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << "*******************************************************************************" << G4endl; 42 G4cout << " The class G4CrossSectionExcitationBorn is NOT SUPPORTED ANYMORE. " << G4endl; 43 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 44 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << "*******************************************************************************" << G4endl; 47 G4cout << G4endl; 38 48 } 39 49 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationEmfietzoglou.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationEmfietzoglou.cc,v 1. 5 2008/12/05 11:58:16sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionExcitationEmfietzoglou.cc,v 1.6 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationEmfietzoglou.hh" … … 35 35 lowEnergyLimit = 8.23 * eV; 36 36 highEnergyLimit = 10. * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4CrossSectionExcitationEmfietzoglou is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreen.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationMillerGreen.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionExcitationMillerGreen.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreen.hh" … … 92 92 } 93 93 94 95 G4cout << G4endl; 96 G4cout << "*******************************************************************************" << G4endl; 97 G4cout << "*******************************************************************************" << G4endl; 98 G4cout << " The class G4CrossSectionExcitationMillerGreen is NOT SUPPORTED ANYMORE. " << G4endl; 99 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 100 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 101 G4cout << "*******************************************************************************" << G4endl; 102 G4cout << "*******************************************************************************" << G4endl; 103 G4cout << G4endl; 94 104 } 95 105 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreenPartial.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1. 2 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1.3 2009/01/20 07:40:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreenPartial.hh" … … 115 115 tCorrected = k * kineticEnergyCorrection[particleTypeIndex]; 116 116 117 // SI - added protection 118 if (tCorrected < waterExcitation.ExcitationEnergy(excitationLevel)) return 0; 119 // 120 117 121 G4int z = 10; 118 122 … … 158 162 // ELECTRON CORRECTION 159 163 160 if ( particle == instance->GetIon("alpha++")) 164 if ( particle == instance->GetIon("alpha++")|| 165 particle == G4Proton::ProtonDefinition()) 166 161 167 { while (i > 0) 162 168 { -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBorn.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationBorn.cc,v 1. 4 2008/08/20 14:51:48sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionIonisationBorn.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationBorn.hh" … … 82 82 G4Exception("G4CrossSectionIonisationBorn Constructor: proton is not defined"); 83 83 } 84 85 G4cout << G4endl; 86 G4cout << "*******************************************************************************" << G4endl; 87 G4cout << "*******************************************************************************" << G4endl; 88 G4cout << " The class G4CrossSectionIonisationBorn is NOT SUPPORTED ANYMORE. " << G4endl; 89 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 90 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 91 G4cout << "*******************************************************************************" << G4endl; 92 G4cout << "*******************************************************************************" << G4endl; 93 G4cout << G4endl; 84 94 } 85 95 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartial.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1.5 2009/01/20 07:40:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationBornPartial.hh" … … 33 33 G4CrossSectionIonisationBornPartial::G4CrossSectionIonisationBornPartial() 34 34 { 35 lowEnergyLimitDefault = 25* eV;35 lowEnergyLimitDefault = 12.61 * eV; 36 36 highEnergyLimitDefault = 30 * keV; 37 37 … … 52 52 tableFile[electron] = fileElectron; 53 53 54 lowEnergyLimit[electron] = 25.* eV;54 lowEnergyLimit[electron] = 12.61 * eV; 55 55 highEnergyLimit[electron] = 30. * keV; 56 56 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationRudd.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationRudd.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CrossSectionIonisationRudd.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4CrossSectionIonisationRudd.hh" … … 154 154 G4Exception("G4CrossSectionIonisationRudd Constructor: helium is not defined"); 155 155 } 156 157 G4cout << G4endl; 158 G4cout << "*******************************************************************************" << G4endl; 159 G4cout << "*******************************************************************************" << G4endl; 160 G4cout << " The class G4CrossSectionIonisationRudd is NOT SUPPORTED ANYMORE. " << G4endl; 161 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 162 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 163 G4cout << "*******************************************************************************" << G4endl; 164 G4cout << "*******************************************************************************" << G4endl; 165 G4cout << G4endl; 166 156 167 } 157 168 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeDecrease.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateChargeDecrease.cc,v 1. 3 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateChargeDecrease.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateChargeDecrease.hh" … … 35 35 lowEnergyLimit = 1 * keV; 36 36 highEnergyLimit = 10 * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4FinalStateChargeDecrease is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 … … 70 80 } 71 81 82 //SI - Added protection against total energy deposit 83 product.DoNotDepositEnergy(); 84 // 72 85 product.KillPrimaryParticle(); 86 73 87 product.AddEnergyDeposit(waterBindingEnergy); 74 88 75 89 G4DynamicParticle* aSecondary = new G4DynamicParticle(OutgoingParticleDefinition(definition, finalStateIndex), 76 90 track.GetDynamicParticle()->GetMomentumDirection(), -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeIncrease.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateChargeIncrease.cc,v 1. 3 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateChargeIncrease.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateChargeIncrease.hh" … … 35 35 lowEnergyLimit = 1 * keV; 36 36 highEnergyLimit = 10 * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class 4FinalStateChargeIncrease is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 … … 48 58 product.Clear(); 49 59 60 //SI - Added protection against total energy deposit 61 product.DoNotDepositEnergy(); 62 // 50 63 product.KillPrimaryParticle(); 51 64 product.AddEnergyDeposit(0.); 65 52 66 G4ParticleDefinition* definition = track.GetDefinition(); 53 67 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticBrennerZaider.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateElasticBrennerZaider.cc,v 1. 8 2008/12/05 11:58:16sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateElasticBrennerZaider.cc,v 1.9 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateElasticBrennerZaider.hh" … … 64 64 gamma100_200Coeff.push_back(-2.96264E-5); 65 65 gamma100_200Coeff.push_back(-1.20655E-7); 66 67 G4cout << G4endl; 68 G4cout << "*******************************************************************************" << G4endl; 69 G4cout << "*******************************************************************************" << G4endl; 70 G4cout << " The class G4FinalStateElasticBrennerZaider is NOT SUPPORTED ANYMORE. " << G4endl; 71 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 72 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 73 G4cout << "*******************************************************************************" << G4endl; 74 G4cout << "*******************************************************************************" << G4endl; 75 G4cout << G4endl; 66 76 } 67 77 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticChampion.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateElasticChampion.cc,v 1. 7 2008/12/10 18:25:28sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateElasticChampion.cc,v 1.8 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 … … 84 84 G4Exception("G4FinalStateElastiChampion : constructor: electron is not defined"); 85 85 } 86 87 G4cout << G4endl; 88 G4cout << "*******************************************************************************" << G4endl; 89 G4cout << "*******************************************************************************" << G4endl; 90 G4cout << " The class G4FinalStateElastiChampion is NOT SUPPORTED ANYMORE. " << G4endl; 91 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 92 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 93 G4cout << "*******************************************************************************" << G4endl; 94 G4cout << "*******************************************************************************" << G4endl; 95 G4cout << G4endl; 86 96 } 87 97 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticScreenedRutherford.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1. 4 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.5 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateElasticScreenedRutherford.hh" … … 35 35 lowEnergyLimit = 200 * eV; 36 36 highEnergyLimit = 10 * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4FinalStateElasticScreenedRutherford is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationBorn.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateExcitationBorn.cc,v 1. 3 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateExcitationBorn.cc,v 1.4 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateExcitationBorn.hh" … … 35 35 lowEnergyLimit = 500 * keV; 36 36 highEnergyLimit = 10 * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4FinalStateExcitationBorn is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationEmfietzoglou.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateExcitationEmfietzoglou.cc,v 1. 5 2008/12/05 11:58:16sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateExcitationEmfietzoglou.cc,v 1.6 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateExcitationEmfietzoglou.hh" … … 35 35 lowEnergyLimit = 8.23 * eV; 36 36 highEnergyLimit = 10 * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4FinalStateExcitationEmfietzoglou is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationMillerGreen.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateExcitationMillerGreen.cc,v 1. 3 2008/07/14 20:47:34sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateExcitationMillerGreen.cc,v 1.4 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateExcitationMillerGreen.hh" … … 35 35 lowEnergyLimit = 10 * eV; 36 36 highEnergyLimit = 10 * MeV; 37 38 G4cout << G4endl; 39 G4cout << "*******************************************************************************" << G4endl; 40 G4cout << "*******************************************************************************" << G4endl; 41 G4cout << " The class G4FinalStateExcitationMillerGreen is NOT SUPPORTED ANYMORE. " << G4endl; 42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 44 G4cout << "*******************************************************************************" << G4endl; 45 G4cout << "*******************************************************************************" << G4endl; 46 G4cout << G4endl; 37 47 } 38 48 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateIonisationBorn.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateIonisationBorn.cc,v 1.1 6 2008/12/06 13:47:12sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateIonisationBorn.cc,v 1.17 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateIonisationBorn.hh" … … 124 124 G4Exception("G4FinalStateIonisationBorn Constructor: proton is not defined"); 125 125 } 126 127 G4cout << G4endl; 128 G4cout << "*******************************************************************************" << G4endl; 129 G4cout << "*******************************************************************************" << G4endl; 130 G4cout << " The class G4FinalStateIonisationBorn is NOT SUPPORTED ANYMORE. " << G4endl; 131 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 132 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 133 G4cout << "*******************************************************************************" << G4endl; 134 G4cout << "*******************************************************************************" << G4endl; 135 G4cout << G4endl; 126 136 } 127 137 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateIonisationRudd.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateIonisationRudd.cc,v 1. 8 2008/08/20 14:51:48sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4FinalStateIonisationRudd.cc,v 1.9 2009/05/02 15:07:47 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #include "G4FinalStateIonisationRudd.hh" … … 70 70 lowEnergyLimit[helium] = 1. * keV; 71 71 highEnergyLimit[helium] = 10. * MeV; 72 73 G4cout << G4endl; 74 G4cout << "*******************************************************************************" << G4endl; 75 G4cout << "*******************************************************************************" << G4endl; 76 G4cout << " The class G4FinalStateIonisationRudd is NOT SUPPORTED ANYMORE. " << G4endl; 77 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 78 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 79 G4cout << "*******************************************************************************" << G4endl; 80 G4cout << "*******************************************************************************" << G4endl; 81 G4cout << G4endl; 72 82 } 73 83 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateProduct.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4FinalStateProduct.cc,v 1. 5 2007/11/09 20:11:04 piaExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4FinalStateProduct.cc,v 1.6 2009/01/20 07:50:28 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 53 53 #include "G4ThreeVector.hh" 54 54 55 G4FinalStateProduct::G4FinalStateProduct() : killStatus(false), isModified(false), localEnergyDeposit(0.), modifiedEnergy(0)55 G4FinalStateProduct::G4FinalStateProduct() : killStatus(false), doNotDepositStatus(false), isModified(false), localEnergyDeposit(0.), modifiedEnergy(0) 56 56 { 57 57 // empty … … 68 68 // Reset object status 69 69 killStatus = false; 70 doNotDepositStatus = false; 70 71 isModified = false; 71 72 localEnergyDeposit = 0.; … … 98 99 } 99 100 101 void G4FinalStateProduct::DoNotDepositEnergy() 102 { 103 doNotDepositStatus = true; 104 } 105 100 106 void G4FinalStateProduct::KillPrimaryParticle() 101 107 { 108 102 109 // ---- MGP ---- To be added: Handle local energy deposit here 103 110 killStatus = true; -
trunk/source/processes/electromagnetic/lowenergy/src/G4IonParametrisedLossModel.cc
r1007 r1055 37 37 // First implementation: 10. 11. 2008 38 38 // 39 // Modifications: 40 // 39 // Modifications: 03. 02. 2009 - Bug fix iterators (AL) 40 // 11. 03. 2009 - Introduced new table handler (G4IonDEDXHandler) 41 // and modified method to add/remove tables 42 // (tables are now built in initialisation phase), 43 // Minor bug fix in ComputeDEDXPerVolume (AL) 44 // 11. 05. 2009 - Introduced scaling algorithm for heavier ions: 45 // G4IonDEDXScalingICRU73 (AL) 41 46 // 42 47 // Class description: … … 55 60 #include "G4MaterialStoppingICRU73.hh" 56 61 #include "G4SimpleMaterialStoppingICRU73.hh" 62 #include "G4IronStoppingICRU73.hh" 63 #include "G4VIonDEDXTable.hh" 64 #include "G4VIonDEDXScalingAlgorithm.hh" 65 #include "G4IonDEDXScalingICRU73.hh" 57 66 #include "G4BraggIonModel.hh" 58 67 #include "G4BetheBlochModel.hh" 68 #include "G4ProductionCutsTable.hh" 59 69 #include "G4ParticleChangeForLoss.hh" 60 70 #include "G4LossTableManager.hh" … … 63 73 #include "Randomize.hh" 64 74 75 //#define PRINT_TABLE_BUILT 76 77 78 // ######################################################################### 65 79 66 80 G4IonParametrisedLossModel::G4IonParametrisedLossModel( … … 89 103 betheBlochModel = new G4BetheBlochModel(); 90 104 91 // By default ICRU 73 stopping power tables are loaded 92 AddDEDXTable<G4SimpleMaterialStoppingICRU73>(); 93 AddDEDXTable<G4MaterialStoppingICRU73>(); 105 // By default ICRU 73 stopping power tables are loaded: 106 107 // Ions with Z above between 19 and 21: Ar-40 data is used as basis 108 // for stopping power scaling 109 G4int ionZMin = 19; 110 G4int ionZMax = 21; 111 G4int refIonZ = 18; 112 G4int refIonA = 40; 113 114 AddDEDXTable("ICRU73-elemmat", 115 new G4SimpleMaterialStoppingICRU73, 116 new G4IonDEDXScalingICRU73(ionZMin, ionZMax, refIonZ, refIonA)); 117 118 // Ions with Z above 21: Fe-56 data is used as basis for stopping power 119 // scaling 120 ionZMin = 22; 121 ionZMax = 102; 122 refIonZ = 26; 123 refIonA = 56; 124 125 AddDEDXTable("ICRU73-ironions", 126 new G4IronStoppingICRU73, 127 new G4IonDEDXScalingICRU73(ionZMin, ionZMax, refIonZ, refIonA)); 128 129 // Compound materials: Ar-40 data is used as basis for stopping power 130 // scaling (except for iron ions) 131 ionZMin = 19; 132 ionZMax = 102; 133 refIonZ = 18; 134 refIonA = 40; 135 136 G4IonDEDXScalingICRU73* scaling = 137 new G4IonDEDXScalingICRU73(ionZMin, ionZMax, refIonZ, refIonA); 138 139 G4int ironIonAtomicNumber = 26; 140 scaling -> AddException(ironIonAtomicNumber); 141 142 AddDEDXTable("ICRU73-compmat", 143 new G4MaterialStoppingICRU73, 144 scaling); 94 145 95 146 // The boundaries for the range tables are set … … 107 158 dedxCacheMaterial = 0; 108 159 dedxCacheEnergyCut = 0; 109 dedxCacheIter = lossTableList. begin();160 dedxCacheIter = lossTableList.end(); 110 161 dedxCacheTransitionEnergy = 0.0; 111 162 dedxCacheTransitionFactor = 0.0; … … 113 164 } 114 165 166 // ######################################################################### 115 167 116 168 G4IonParametrisedLossModel::~G4IonParametrisedLossModel() { … … 142 194 } 143 195 196 // ######################################################################### 144 197 145 198 G4double G4IonParametrisedLossModel::MinEnergyCut( … … 151 204 } 152 205 206 // ######################################################################### 153 207 154 208 void G4IonParametrisedLossModel::Initialise( … … 166 220 dedxCacheMaterial = 0; 167 221 dedxCacheEnergyCut = 0; 168 dedxCacheIter = lossTableList. begin();222 dedxCacheIter = lossTableList.end(); 169 223 dedxCacheTransitionEnergy = 0.0; 170 224 dedxCacheTransitionFactor = 0.0; … … 196 250 cutEnergies.clear(); 197 251 for(size_t i = 0; i < size; i++) cutEnergies.push_back(cuts[i]); 252 253 // All dE/dx vectors are built 254 const G4ProductionCutsTable* coupleTable= 255 G4ProductionCutsTable::GetProductionCutsTable(); 256 size_t nmbCouples = coupleTable -> GetTableSize(); 257 258 #ifdef PRINT_TABLE_BUILT 259 G4cout << "G4IonParametrisedLossModel::Initialise():" 260 << " Building dE/dx vectors:" 261 << G4endl; 262 #endif 263 264 for (size_t i = 0; i < nmbCouples; i++) { 265 266 const G4MaterialCutsCouple* couple = 267 coupleTable -> GetMaterialCutsCouple(i); 268 269 const G4Material* material = couple -> GetMaterial(); 270 // G4ProductionCuts* productionCuts = couple -> GetProductionCuts(); 271 272 for(G4int atomicNumberIon = 3; atomicNumberIon < 102; atomicNumberIon++) { 273 274 LossTableList::iterator iter = lossTableList.begin(); 275 LossTableList::iterator iter_end = lossTableList.end(); 276 277 for(;iter != iter_end; iter++) { 278 279 if(*iter == 0) { 280 G4cout << "G4IonParametrisedLossModel::Initialise():" 281 << " Skipping illegal table." 282 << G4endl; 283 } 284 285 G4bool isApplicable = 286 (*iter) -> BuildDEDXTable(atomicNumberIon, material); 287 if(isApplicable) { 288 289 #ifdef PRINT_TABLE_BUILT 290 G4cout << " Atomic Number Ion = " << atomicNumberIon 291 << ", Material = " << material -> GetName() 292 << ", Table = " << (*iter) -> GetName() 293 << G4endl; 294 #endif 295 break; 296 } 297 } 298 } 299 } 198 300 199 301 // The particle change object is cast to G4ParticleChangeForLoss … … 221 323 } 222 324 325 // ######################################################################### 223 326 224 327 G4double G4IonParametrisedLossModel::ComputeCrossSectionPerAtom( … … 285 388 } 286 389 390 // ######################################################################### 287 391 288 392 G4double G4IonParametrisedLossModel::CrossSectionPerVolume( … … 303 407 } 304 408 409 // ######################################################################### 305 410 306 411 G4double G4IonParametrisedLossModel::ComputeDEDXPerVolume( … … 342 447 LossTableList::iterator iter = dedxCacheIter; 343 448 344 if(iter != lossTableList. begin()) {449 if(iter != lossTableList.end()) { 345 450 346 451 G4double transitionEnergy = dedxCacheTransitionEnergy; … … 369 474 if(scaledTransitionEnergy >= lowEnergyLimit) { 370 475 371 G4double factor = 1.0 + dedxCacheTransitionFactor /372 kineticEnergy;373 374 476 dEdx = betheBlochModel -> ComputeDEDXPerVolume( 375 477 material, genericIon, 376 478 scaledKineticEnergy, cutEnergy); 479 480 dEdx *= chargeSquare; 481 482 dEdx += corrections -> ComputeIonCorrections(particle, 483 material, kineticEnergy); 484 485 G4double factor = 1.0 + dedxCacheTransitionFactor / 486 kineticEnergy; 487 377 488 dEdx *= factor; 378 379 } 380 dEdx *= chargeSquare; 381 382 dEdx += corrections -> ComputeIonCorrections(particle, 383 material, kineticEnergy); 489 } 384 490 } 385 491 } … … 446 552 if (dEdx < 0.0) dEdx = 0.0; 447 553 448 #ifdef PRINT_DEBUG449 450 G4cout << "########################################################"451 << G4endl452 << "# G4IonParametrisedLossModel::ComputeDEDXPerVolume"453 << G4endl454 << "# Material =" << material -> GetName()455 << G4endl456 << "# Particle = " << particle -> GetParticleName()457 << G4endl;458 << "# Cut energy (MeV) = " << cutEnergy/MeV459 << G4endl;460 461 G4cout << "#"462 << std::setw(13) << std::right << "E(MeV)"463 << std::setw(14) << "dE/dx(keV/um)"464 << std::setw(14) << "d:dE/dx(keV/um)"465 << std::setw(14) << "(d:dE/dx)/dE/dx"466 << G4endl467 << "# ------------------------------------------------------"468 << G4endl;469 470 G4cout << std::setw(14) << std::right << kineticEnergy / MeV471 << std::setw(14) << (dEdx + dEdXDeltaRays) / keV * um472 << std::setw(14) << dEdXDeltaRays / keV * um473 << std::setw(14) << dEdXDeltaRays / (dEdx + dEdXDeltaRays) * 100.0474 << G4endl;475 #endif476 477 554 return dEdx; 478 555 } 479 556 557 // ######################################################################### 480 558 481 559 void G4IonParametrisedLossModel::PrintDEDXTable( … … 508 586 << std::setw(13) << std::right << "(MeV)" 509 587 << std::setw(14) << "(MeV)" 510 << std::setw(14) << "(MeV/ mm)"588 << std::setw(14) << "(MeV/cm)" 511 589 << std::setw(14) << "(MeV*cm2/mg)" 512 590 << G4endl … … 535 613 G4cout << std::setw(14) << std::right << energy / MeV 536 614 << std::setw(14) << energy / atomicMassNumber / MeV 537 << std::setw(14) << dedx / MeV * mm615 << std::setw(14) << dedx / MeV * cm 538 616 << std::setw(14) << dedx / materialDensity / (MeV*cm2/(0.001*g)) 539 617 << G4endl; … … 541 619 } 542 620 621 // ######################################################################### 622 623 void G4IonParametrisedLossModel::PrintDEDXTableHandlers( 624 const G4ParticleDefinition* particle, // Projectile (ion) 625 const G4Material* material, // Absorber material 626 G4double lowerBoundary, // Minimum energy per nucleon 627 G4double upperBoundary, // Maximum energy per nucleon 628 G4int nmbBins, // Number of bins 629 G4bool logScaleEnergy) { // Logarithmic scaling of energy 630 631 LossTableList::iterator iter = lossTableList.begin(); 632 LossTableList::iterator iter_end = lossTableList.end(); 633 634 for(;iter != iter_end; iter++) { 635 G4bool isApplicable = (*iter) -> IsApplicable(particle, material); 636 if(isApplicable) { 637 (*iter) -> PrintDEDXTable(particle, material, 638 lowerBoundary, upperBoundary, 639 nmbBins,logScaleEnergy); 640 break; 641 } 642 } 643 } 644 645 // ######################################################################### 543 646 544 647 void G4IonParametrisedLossModel::SampleSecondaries( … … 641 744 } 642 745 746 // ######################################################################### 643 747 644 748 void G4IonParametrisedLossModel::UpdateDEDXCache( … … 672 776 673 777 // If any table is applicable, the transition factor is computed: 674 if(iter != lossTableList. begin()) {778 if(iter != lossTableList.end()) { 675 779 676 780 // Retrieving the transition energy from the parameterisation table … … 740 844 } 741 845 846 // ######################################################################### 742 847 743 848 void G4IonParametrisedLossModel::CorrectionsAlongStep( … … 767 872 G4double kineticEnergy = dynamicParticle -> GetKineticEnergy(); 768 873 874 if(kineticEnergy == eloss) { return; } 875 769 876 G4double cutEnergy = DBL_MAX; 770 877 size_t cutIndex = couple -> GetIndex(); … … 777 884 // If parameterization for ions is available the electronic energy loss 778 885 // is overwritten 779 if(iter != lossTableList. begin()) {886 if(iter != lossTableList.end()) { 780 887 781 888 // The energy loss is calculated using the ComputeDEDXPerVolume function … … 832 939 833 940 } 834 835 941 } 836 942 … … 854 960 G4double transitionEnergy = dedxCacheTransitionEnergy; 855 961 856 if(iter != lossTableList. begin() && transitionEnergy < kineticEnergy) {962 if(iter != lossTableList.end() && transitionEnergy < kineticEnergy) { 857 963 chargeSquareRatio *= corrections -> EffectiveChargeCorrection(particle, 858 964 material, … … 862 968 eloss *= chargeSquareRatioCorr; 863 969 } 864 else if (iter == lossTableList. begin()) {970 else if (iter == lossTableList.end()) { 865 971 866 972 chargeSquareRatio *= corrections -> EffectiveChargeCorrection(particle, … … 875 981 // overwrite the energy loss (i.e. when the effective charge approach is 876 982 // used) 877 if(iter == lossTableList. begin()) {983 if(iter == lossTableList.end()) { 878 984 879 985 G4double scaledKineticEnergy = kineticEnergy * dedxCacheGenIonMassRatio; … … 906 1012 particleChangeLoss -> ProposeNonIonizingEnergyDeposit(nloss); 907 1013 } 908 909 } 910 1014 } 1015 1016 // ######################################################################### 911 1017 912 1018 void G4IonParametrisedLossModel::BuildRangeVector( … … 1018 1124 1019 1125 IonMatCouple ionMatCouple = std::make_pair(particle, material); 1020 1126 1021 1127 E[ionMatCouple] = energyRangeVector; 1022 1128 r[ionMatCouple] = rangeEnergyVector; 1023 1129 } 1024 1130 1131 // ######################################################################### 1132 1133 G4double G4IonParametrisedLossModel::GetRange( 1134 const G4ParticleDefinition* particle, // Projectile 1135 const G4Material* material, // Target Material 1136 G4double kineticEnergy) { 1137 1138 G4double range = 0.0; 1139 1140 IonMatCouple couple = std::make_pair(particle, material); 1141 1142 EnergyRangeTable::iterator iter = E.find(couple); 1143 1144 if(iter == E.end()) { 1145 G4cerr << "G4IonParametrisedLossModel::GetRange() No range vector found." 1146 << G4endl; 1147 1148 G4cout << " Ion-material pair: " << particle ->GetParticleName() 1149 << " " << material -> GetName() 1150 << G4endl 1151 << " Available couples:" 1152 << G4endl; 1153 1154 EnergyRangeTable::iterator iter_beg = E.begin(); 1155 EnergyRangeTable::iterator iter_end = E.end(); 1156 1157 for(;iter_beg != iter_end; iter_beg++) { 1158 IonMatCouple key = (*iter_beg).first; 1159 1160 G4cout << " " << (key.first) -> GetParticleName() 1161 << " " << (key.second) -> GetName() 1162 << G4endl; 1163 } 1164 } 1165 else { 1166 G4PhysicsVector* energyRange = (*iter).second; 1167 1168 if(energyRange != 0) { 1169 G4bool b; 1170 1171 // Computing range for kinetic energy: 1172 range = energyRange -> GetValue(kineticEnergy, b); 1173 } 1174 } 1175 1176 return range; 1177 } 1178 1179 // ######################################################################### 1025 1180 1026 1181 G4double G4IonParametrisedLossModel::ComputeLossForStep( … … 1061 1216 if(loss < 0.0) loss = 0.0; 1062 1217 } 1063 1064 #ifdef PRINT_DEBUG1065 G4cout << "G4IonParametrisedLossModel::ComputeLossForStep() E = "1066 << kineticEnergy / MeV << " MeV * "1067 << value.energyScaling << " = "1068 << kineticEnergy * value.energyScaling / MeV1069 << " MeV, dE/dx = " << dedx / MeV * cm << " MeV/cm = "1070 << dedx/factor/MeV*cm << " * " << factor << " MeV/cm; index = "1071 << value.dEdxIndex << ", material = " << material -> GetName()1072 << G4endl;1073 #endif1074 1075 1218 } 1076 1219 1077 1220 return loss; 1078 1221 } 1222 1223 // ######################################################################### 1224 1225 G4bool G4IonParametrisedLossModel::AddDEDXTable( 1226 const G4String& name, 1227 G4VIonDEDXTable* table, 1228 G4VIonDEDXScalingAlgorithm* algorithm) { 1229 1230 if(table == 0) { 1231 G4cerr << "G4IonParametrisedLossModel::AddDEDXTable() Cannot " 1232 << " add table: Invalid pointer." 1233 << G4endl; 1234 1235 return false; 1236 } 1237 1238 // Checking uniqueness of name 1239 LossTableList::iterator iter = lossTableList.begin(); 1240 LossTableList::iterator iter_end = lossTableList.end(); 1241 1242 for(;iter != iter_end; iter++) { 1243 G4String tableName = (*iter) -> GetName(); 1244 1245 if(tableName == name) { 1246 G4cerr << "G4IonParametrisedLossModel::AddDEDXTable() Cannot " 1247 << " add table: Name already exists." 1248 << G4endl; 1249 1250 return false; 1251 } 1252 } 1253 1254 G4VIonDEDXScalingAlgorithm* scalingAlgorithm = algorithm; 1255 if(scalingAlgorithm == 0) 1256 scalingAlgorithm = new G4VIonDEDXScalingAlgorithm; 1257 1258 G4IonDEDXHandler* handler = 1259 new G4IonDEDXHandler(table, scalingAlgorithm, name); 1260 1261 lossTableList.push_front(handler); 1262 1263 return true; 1264 } 1265 1266 // ######################################################################### 1267 1268 G4bool G4IonParametrisedLossModel::RemoveDEDXTable( 1269 const G4String& name) { 1270 1271 LossTableList::iterator iter = lossTableList.begin(); 1272 LossTableList::iterator iter_end = lossTableList.end(); 1273 1274 for(;iter != iter_end; iter++) { 1275 G4String tableName = (*iter) -> GetName(); 1276 1277 if(tableName == name) { 1278 delete (*iter); 1279 1280 lossTableList.erase(iter); 1281 return true; 1282 } 1283 } 1284 1285 return false; 1286 } 1287 1288 // ######################################################################### 1289 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreComptonModel.cc,v 1.1 2008/10/30 14:17:46 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 // 26 // $Id: G4LivermoreComptonModel.cc,v 1.6 2009/04/18 18:29:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // 30 // Author: Sebastien Inserti 31 // 30 October 2008 32 // 33 // History: 34 // -------- 35 // 18 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 36 // - apply internal high-energy limit only in constructor 37 // - do not apply low-energy limit (default is 0) 38 // - remove GetMeanFreePath method and table 39 // - added protection against numerical problem in energy sampling 40 // - use G4ElementSelector 29 41 30 42 #include "G4LivermoreComptonModel.hh" … … 37 49 38 50 G4LivermoreComptonModel::G4LivermoreComptonModel(const G4ParticleDefinition*, 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 51 const G4String& nam) 52 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0), 53 scatterFunctionData(0),crossSectionHandler(0) 41 54 { 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?55 lowEnergyLimit = 250 * eV; 43 56 highEnergyLimit = 100 * GeV; 44 SetLowEnergyLimit(lowEnergyLimit);57 // SetLowEnergyLimit(lowEnergyLimit); 45 58 SetHighEnergyLimit(highEnergyLimit); 46 59 47 verboseLevel= 0;60 verboseLevel=0 ; 48 61 // Verbosity scale: 49 62 // 0 = nothing … … 52 65 // 3 = calculation of cross sections, file openings, sampling of atoms 53 66 // 4 = entering in methods 54 55 G4cout << "Livermore Compton model is constructed " << G4endl 56 << "Energy range: " 57 << lowEnergyLimit / keV << " keV - " 58 << highEnergyLimit / GeV << " GeV" 59 << G4endl; 60 67 68 if( verboseLevel>0 ) { 69 G4cout << "Livermore Compton model is constructed " << G4endl 70 << "Energy range: " 71 << lowEnergyLimit / eV << " eV - " 72 << highEnergyLimit / GeV << " GeV" 73 << G4endl; 74 } 61 75 } 62 76 … … 65 79 G4LivermoreComptonModel::~G4LivermoreComptonModel() 66 80 { 67 delete meanFreePathTable; 68 delete crossSectionHandler; 69 delete scatterFunctionData; 81 if (crossSectionHandler) delete crossSectionHandler; 82 if (scatterFunctionData) delete scatterFunctionData; 70 83 } 71 84 … … 73 86 74 87 void G4LivermoreComptonModel::Initialise(const G4ParticleDefinition* particle, 75 const G4DataVector& cuts)88 const G4DataVector& cuts) 76 89 { 77 90 if (verboseLevel > 3) 78 91 G4cout << "Calling G4LivermoreComptonModel::Initialise()" << G4endl; 79 92 80 InitialiseElementSelectors(particle,cuts); 81 82 // Energy limits 83 84 if (LowEnergyLimit() < lowEnergyLimit) 85 { 86 G4cout << "G4LivermoreComptonModel: low energy limit increased from " << 87 LowEnergyLimit()/eV << " eV to " << lowEnergyLimit << " eV" << G4endl; 88 SetLowEnergyLimit(lowEnergyLimit); 89 } 90 91 if (HighEnergyLimit() > highEnergyLimit) 92 { 93 G4cout << "G4LivermoreComptonModel: high energy limit decreased from " << 94 HighEnergyLimit()/GeV << " GeV to " << highEnergyLimit << " GeV" << G4endl; 95 SetHighEnergyLimit(highEnergyLimit); 96 } 97 93 if (crossSectionHandler) 94 { 95 crossSectionHandler->Clear(); 96 delete crossSectionHandler; 97 } 98 98 99 // Reading of data files - all materials are read 99 100 … … 113 114 shellData.LoadData(file); 114 115 115 meanFreePathTable = 0;116 meanFreePathTable = crossSectionHandler->BuildMeanFreePathForMaterials();117 118 116 if (verboseLevel > 2) 119 117 G4cout << "Loaded cross section files for Livermore Compton model" << G4endl; 120 118 121 G4cout << "Livermore Compton model is initialized " << G4endl 122 << "Energy range: " 123 << LowEnergyLimit() / keV << " keV - " 124 << HighEnergyLimit() / GeV << " GeV" 125 << G4endl; 126 127 // 128 119 InitialiseElementSelectors(particle,cuts); 120 121 if( verboseLevel>0 ) { 122 G4cout << "Livermore Compton model is initialized " << G4endl 123 << "Energy range: " 124 << LowEnergyLimit() / eV << " eV - " 125 << HighEnergyLimit() / GeV << " GeV" 126 << G4endl; 127 } 128 // 129 129 if(isInitialised) return; 130 131 if(pParticleChange) 132 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 133 else 134 fParticleChange = new G4ParticleChangeForGamma(); 135 130 fParticleChange = GetParticleChangeForGamma(); 136 131 isInitialised = true; 137 132 } … … 148 143 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermoreComptonModel" << G4endl; 149 144 150 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); 145 if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) return 0.0; 146 147 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); 151 148 return cs; 152 149 } … … 155 152 156 153 void G4LivermoreComptonModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect, 157 const G4MaterialCutsCouple* couple, 158 const G4DynamicParticle* aDynamicGamma, 159 G4double, 160 G4double) 154 const G4MaterialCutsCouple* couple, 155 const G4DynamicParticle* aDynamicGamma, 156 G4double, G4double) 161 157 { 158 162 159 // The scattered gamma energy is sampled according to Klein - Nishina formula. 163 160 // then accepted or rejected depending on the Scattering Function multiplied … … 174 171 // (Nucl Phys 20(1960),15). 175 172 176 if (verboseLevel > 3)177 G4cout << "Calling SampleSecondaries() of G4LivermoreComptonModel" << G4endl;178 179 173 G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy(); 180 181 if (photonEnergy0 <= lowEnergyLimit) 182 { 174 175 if (verboseLevel > 3) { 176 G4cout << "G4LivermoreComptonModel::SampleSecondaries() E(MeV)= " 177 << photonEnergy0/MeV << " in " << couple->GetMaterial()->GetName() 178 << G4endl; 179 } 180 181 // low-energy gamma is absorpted by this process 182 if (photonEnergy0 <= lowEnergyLimit) 183 { 183 184 fParticleChange->ProposeTrackStatus(fStopAndKill); 184 185 fParticleChange->SetProposedKineticEnergy(0.); 185 186 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 186 // SI - IS THE FOLLOWING RETURN NECESSARY ?187 187 return ; 188 }188 } 189 189 190 190 G4double e0m = photonEnergy0 / electron_mass_c2 ; … … 192 192 193 193 // Select randomly one element in the current material 194 G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy0); 194 // G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy0); 195 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition(); 196 const G4Element* elm = SelectRandomAtom(couple,particle,photonEnergy0); 197 G4int Z = (G4int)elm->GetZ(); 195 198 196 199 G4double epsilon0 = 1. / (1. + 2. * e0m); … … 212 215 if ( alpha1/(alpha1+alpha2) > G4UniformRand()) 213 216 { 214 epsilon = std::exp(-alpha1 * G4UniformRand()); // std::pow(epsilon0,G4UniformRand()) 217 // std::pow(epsilon0,G4UniformRand()) 218 epsilon = std::exp(-alpha1 * G4UniformRand()); 215 219 epsilonSq = epsilon * epsilon; 216 220 } … … 238 242 // Doppler broadening - Method based on: 239 243 // Y. Namito, S. Ban and H. Hirayama, 240 // "Implementation of the Doppler Broadening of a Compton-Scattered Photon Into the EGS4 Code"241 // NIM A 349, pp. 489-494, 1994244 // "Implementation of the Doppler Broadening of a Compton-Scattered Photon 245 // into the EGS4 Code", NIM A 349, pp. 489-494, 1994 242 246 243 247 // Maximum number of sampling iterations … … 257 261 eMax = photonEnergy0 - bindingE; 258 262 259 // Randomly sample bound electron momentum (memento: the data set is in Atomic Units) 263 // Randomly sample bound electron momentum 264 // (memento: the data set is in Atomic Units) 260 265 G4double pSample = profileData.RandomSelectMomentum(Z,shell); 261 266 // Rescale from atomic units … … 299 304 300 305 if (photonEnergy1 > 0.) 301 {302 fParticleChange->SetProposedKineticEnergy(photonEnergy1) ;303 }306 { 307 fParticleChange->SetProposedKineticEnergy(photonEnergy1) ; 308 } 304 309 else 305 { 306 fParticleChange->SetProposedKineticEnergy(0.) ; 307 fParticleChange->ProposeTrackStatus(fStopAndKill); 308 } 310 { 311 photonEnergy1 = 0.; 312 fParticleChange->SetProposedKineticEnergy(0.) ; 313 fParticleChange->ProposeTrackStatus(fStopAndKill); 314 } 309 315 310 316 // Kinematics of the scattered electron 311 317 G4double eKineticEnergy = photonEnergy0 - photonEnergy1 - bindingE; 318 319 // protection against negative final energy: no e- is created 320 if(eKineticEnergy < 0.0) { 321 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0 - photonEnergy1); 322 return; 323 } 312 324 G4double eTotalEnergy = eKineticEnergy + electron_mass_c2; 313 325 … … 329 341 eDirection.rotateUz(photonDirection0); 330 342 331 // SI - The range test has been removed wrt original G4LowEnergyCompton class343 // SI - The range test has been removed wrt original G4LowEnergyCompton class 332 344 333 345 fParticleChange->ProposeLocalEnergyDeposit(bindingE); 334 346 335 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),eDirection,eKineticEnergy) ; 347 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(), 348 eDirection,eKineticEnergy) ; 336 349 fvect->push_back(dp); 337 350 } 338 351 339 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....340 341 G4double G4LivermoreComptonModel::GetMeanFreePath(const G4Track& track,342 G4double, // previousStepSize343 G4ForceCondition*)344 {345 const G4DynamicParticle* photon = track.GetDynamicParticle();346 G4double energy = photon->GetKineticEnergy();347 const G4MaterialCutsCouple* couple = track.GetMaterialCutsCouple();348 size_t materialIndex = couple->GetIndex();349 350 G4double meanFreePath;351 if (energy > highEnergyLimit) meanFreePath = meanFreePathTable->FindValue(highEnergyLimit,materialIndex);352 else if (energy < lowEnergyLimit) meanFreePath = DBL_MAX;353 else meanFreePath = meanFreePathTable->FindValue(energy,materialIndex);354 return meanFreePath;355 }356 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreGammaConversionModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreGammaConversionModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 // 26 // $Id: G4LivermoreGammaConversionModel.cc,v 1.6 2009/05/02 09:14:43 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // 30 // Author: Sebastien Inserti 31 // 30 October 2008 32 // 33 // History: 34 // -------- 35 // 12 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 36 // - apply internal high-energy limit only in constructor 37 // - do not apply low-energy limit (default is 0) 38 // - use CLHEP electron mass for low-enegry limit 39 // - remove MeanFreePath method and table 40 29 41 30 42 #include "G4LivermoreGammaConversionModel.hh" … … 37 49 38 50 G4LivermoreGammaConversionModel::G4LivermoreGammaConversionModel(const G4ParticleDefinition*, 39 const G4String& nam) 40 :G4VEmModel(nam),smallEnergy(2.*MeV),isInitialised(false) 41 { 42 lowEnergyLimit = 1.022000 * MeV; 51 const G4String& nam) 52 :G4VEmModel(nam),smallEnergy(2.*MeV),isInitialised(false), 53 crossSectionHandler(0),meanFreePathTable(0) 54 { 55 lowEnergyLimit = 2.0*electron_mass_c2; 43 56 highEnergyLimit = 100 * GeV; 44 45 G4cout << "Livermore Gamma conversion is constructed " << G4endl 46 << "Energy range: " 47 << lowEnergyLimit / keV << " keV - " 48 << highEnergyLimit / GeV << " GeV" 49 << G4endl; 50 57 SetHighEnergyLimit(highEnergyLimit); 58 51 59 verboseLevel= 0; 52 60 // Verbosity scale: … … 57 65 // 4 = entering in methods 58 66 67 if(verboseLevel > 0) { 68 G4cout << "Livermore Gamma conversion is constructed " << G4endl 69 << "Energy range: " 70 << lowEnergyLimit / MeV << " MeV - " 71 << highEnergyLimit / GeV << " GeV" 72 << G4endl; 73 } 59 74 } 60 75 … … 63 78 G4LivermoreGammaConversionModel::~G4LivermoreGammaConversionModel() 64 79 { 65 delete meanFreePathTable;66 delete crossSectionHandler; 67 } 68 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 70 71 void G4LivermoreGammaConversionModel::Initialise(const G4ParticleDefinition* particle,72 const G4DataVector& cuts)80 if (crossSectionHandler) delete crossSectionHandler; 81 } 82 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 84 85 void 86 G4LivermoreGammaConversionModel::Initialise(const G4ParticleDefinition*, 87 const G4DataVector&) 73 88 { 74 89 if (verboseLevel > 3) 75 90 G4cout << "Calling G4LivermoreGammaConversionModel::Initialise()" << G4endl; 76 91 77 InitialiseElementSelectors(particle,cuts); 78 79 // Energy limits 80 81 if (LowEnergyLimit() < lowEnergyLimit) 92 if (crossSectionHandler) 82 93 { 83 G4cout << "G4LivermoreGammaConversionModel: low energy limit increased from " << 84 LowEnergyLimit()/eV << " eV to " << lowEnergyLimit << " eV" << G4endl; 85 SetLowEnergyLimit(lowEnergyLimit); 94 crossSectionHandler->Clear(); 95 delete crossSectionHandler; 86 96 } 87 97 88 if (HighEnergyLimit() > highEnergyLimit)89 {90 G4cout << "G4LivermoreGammaConversionModel: high energy limit decreased from " <<91 HighEnergyLimit()/GeV << " GeV to " << highEnergyLimit << " GeV" << G4endl;92 SetHighEnergyLimit(highEnergyLimit);93 }94 95 98 // Read data tables for all materials 96 99 97 100 crossSectionHandler = new G4CrossSectionHandler(); 98 crossSectionHandler->Initialise(0, 1.0220*MeV,100.*GeV,400);101 crossSectionHandler->Initialise(0,lowEnergyLimit,100.*GeV,400); 99 102 G4String crossSectionFile = "pair/pp-cs-"; 100 103 crossSectionHandler->LoadData(crossSectionFile); 101 104 102 meanFreePathTable = 0;103 meanFreePathTable = crossSectionHandler->BuildMeanFreePathForMaterials();104 105 105 // 106 106 … … 108 108 G4cout << "Loaded cross section files for PenelopeGammaConversion" << G4endl; 109 109 110 G4cout << "Livermore Gamma Conversion model is initialized " << G4endl 111 << "Energy range: " 112 << LowEnergyLimit() / MeV << " MeV - " 113 << HighEnergyLimit() / GeV << " GeV" 114 << G4endl; 110 if (verboseLevel > 0) { 111 G4cout << "Livermore Gamma Conversion model is initialized " << G4endl 112 << "Energy range: " 113 << LowEnergyLimit() / MeV << " MeV - " 114 << HighEnergyLimit() / GeV << " GeV" 115 << G4endl; 116 } 115 117 116 118 if(isInitialised) return; 117 118 i f(pParticleChange)119 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 120 else 121 fParticleChange = new G4ParticleChangeForGamma(); 122 isInitialised = true;} 123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 126 G4double G4LivermoreGammaConversionModel::ComputeCrossSectionPerAtom( 127 const G4ParticleDefinition*, 128 G4double GammaEnergy, 129 G4double Z, G4double,130 G4double, G4double)131 { 132 if (verboseLevel > 3)133 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermoreGammaConversionModel" << G4endl;119 fParticleChange = GetParticleChangeForGamma(); 120 isInitialised = true; 121 } 122 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 124 125 G4double 126 G4LivermoreGammaConversionModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 127 G4double GammaEnergy, 128 G4double Z, G4double, 129 G4double, G4double) 130 { 131 if (verboseLevel > 3) { 132 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermoreGammaConversionModel" 133 << G4endl; 134 } 135 if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) return 0; 134 136 135 137 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); … … 173 175 { 174 176 // Select randomly one element in the current material 175 const G4Element* element = crossSectionHandler->SelectRandomElement(couple,photonEnergy); 177 //const G4Element* element = crossSectionHandler->SelectRandomElement(couple,photonEnergy); 178 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition(); 179 const G4Element* element = SelectRandomAtom(couple,particle,photonEnergy); 176 180 177 181 if (element == 0) 178 182 { 179 G4cout << "G4LivermoreGammaConversionModel::SampleSecondaries - element = 0" << G4endl; 183 G4cout << "G4LivermoreGammaConversionModel::SampleSecondaries - element = 0" 184 << G4endl; 185 return; 180 186 } 181 187 G4IonisParamElm* ionisation = element->GetIonisation(); 182 if (ionisation == 0)188 if (ionisation == 0) 183 189 { 184 G4cout << "G4LivermoreGammaConversionModel::SampleSecondaries - ionisation = 0" << G4endl; 190 G4cout << "G4LivermoreGammaConversionModel::SampleSecondaries - ionisation = 0" 191 << G4endl; 192 return; 185 193 } 186 194 … … 272 280 // distribution with respect to the Z axis along the parent photon 273 281 274 // aParticleChange.SetNumberOfSecondaries(2) ;275 282 G4double electronKineEnergy = std::max(0.,electronTotEnergy - electron_mass_c2) ; 276 283 277 // SI - The range test has been removed wrt original G4LowEnergyGammaconversion class284 // SI - The range test has been removed wrt original G4LowEnergyGammaconversion class 278 285 279 286 G4ThreeVector electronDirection (dxEle, dyEle, dzEle); … … 287 294 G4double positronKineEnergy = std::max(0.,positronTotEnergy - electron_mass_c2) ; 288 295 289 // SI - The range test has been removed wrt original G4LowEnergyGammaconversion class296 // SI - The range test has been removed wrt original G4LowEnergyGammaconversion class 290 297 291 298 G4ThreeVector positronDirection (dxPos, dyPos, dzPos); … … 337 344 } 338 345 339 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....340 341 G4double G4LivermoreGammaConversionModel::GetMeanFreePath(const G4Track& track,342 G4double, // previousStepSize343 G4ForceCondition*)344 {345 const G4DynamicParticle* photon = track.GetDynamicParticle();346 G4double energy = photon->GetKineticEnergy();347 const G4MaterialCutsCouple* couple = track.GetMaterialCutsCouple();348 size_t materialIndex = couple->GetIndex();349 350 G4double meanFreePath;351 if (energy > highEnergyLimit) meanFreePath = meanFreePathTable->FindValue(highEnergyLimit,materialIndex);352 else if (energy < lowEnergyLimit) meanFreePath = DBL_MAX;353 else meanFreePath = meanFreePathTable->FindValue(energy,materialIndex);354 return meanFreePath;355 }356 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePhotoElectricModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePhotoElectricModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 // 26 // $Id: G4LivermorePhotoElectricModel.cc,v 1.7 2009/04/18 18:29:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // 30 // Author: Sebastien Inserti 31 // 30 October 2008 32 // 33 // History: 34 // -------- 35 // 15 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 36 // - apply internal high-energy limit only in constructor 37 // - do not apply low-energy limit (default is 0) 38 // - remove GetMeanFreePath method and table 39 // - simplify sampling of deexcitation by using cut in energy 40 // - added protection against numerical problem in energy sampling 41 // - use G4ElementSelector 29 42 30 43 #include "G4LivermorePhotoElectricModel.hh" … … 38 51 G4LivermorePhotoElectricModel::G4LivermorePhotoElectricModel(const G4ParticleDefinition*, 39 52 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 41 { 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? 53 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0), 54 crossSectionHandler(0),shellCrossSectionHandler(0),ElectronAngularGenerator(0) 55 { 56 lowEnergyLimit = 250 * eV; 43 57 highEnergyLimit = 100 * GeV; 44 SetLowEnergyLimit(lowEnergyLimit);58 // SetLowEnergyLimit(lowEnergyLimit); 45 59 SetHighEnergyLimit(highEnergyLimit); 46 47 G4cout << "Livermore Compton is constructed " << G4endl 48 << "Energy range: " 49 << lowEnergyLimit / keV << " keV - " 50 << highEnergyLimit / GeV << " GeV" 51 << G4endl; 52 60 61 ActivateAuger(false); 62 53 63 verboseLevel= 0; 54 64 // Verbosity scale: … … 58 68 // 3 = calculation of cross sections, file openings, sampling of atoms 59 69 // 4 = entering in methods 70 if(verboseLevel>0) { 71 G4cout << "Livermore PhotoElectric is constructed " << G4endl 72 << "Energy range: " 73 << lowEnergyLimit / eV << " eV - " 74 << highEnergyLimit / GeV << " GeV" 75 << G4endl; 76 } 60 77 } 61 78 … … 64 81 G4LivermorePhotoElectricModel::~G4LivermorePhotoElectricModel() 65 82 { 66 delete meanFreePathTable;67 delete crossSectionHandler;68 delete shellCrossSectionHandler;69 delete ElectronAngularGenerator; 70 } 71 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 73 74 void G4LivermorePhotoElectricModel::Initialise(const G4ParticleDefinition* particle,75 const G4DataVector& cuts)83 if (crossSectionHandler) delete crossSectionHandler; 84 if (shellCrossSectionHandler) delete shellCrossSectionHandler; 85 if (ElectronAngularGenerator) delete ElectronAngularGenerator; 86 } 87 88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 89 90 void 91 G4LivermorePhotoElectricModel::Initialise(const G4ParticleDefinition*, 92 const G4DataVector&) 76 93 { 77 94 if (verboseLevel > 3) 78 95 G4cout << "Calling G4LivermorePhotoElectricModel::Initialise()" << G4endl; 79 96 80 InitialiseElementSelectors(particle,cuts); 81 82 // Energy limits 83 84 if (LowEnergyLimit() < lowEnergyLimit) 97 if (crossSectionHandler) 85 98 { 86 G4cout << "G4LivermorePhotoElectricModel: low energy limit increased from " << 87 LowEnergyLimit()/eV << " eV to " << lowEnergyLimit << " eV" << 88 G4endl; 89 SetLowEnergyLimit(lowEnergyLimit); 90 } 91 92 if (HighEnergyLimit() > highEnergyLimit) 99 crossSectionHandler->Clear(); 100 delete crossSectionHandler; 101 } 102 103 if (shellCrossSectionHandler) 93 104 { 94 G4cout << "G4LivermorePhotoElectricModel: high energy limit decreased from " << 95 HighEnergyLimit()/GeV << " GeV to " << highEnergyLimit << " GeV" 96 << G4endl; 97 SetHighEnergyLimit(highEnergyLimit); 98 } 99 105 shellCrossSectionHandler->Clear(); 106 delete shellCrossSectionHandler; 107 } 108 100 109 // Read data tables for all materials 101 110 … … 105 114 crossSectionHandler->LoadData(crossSectionFile); 106 115 107 meanFreePathTable = 0;108 meanFreePathTable = crossSectionHandler->BuildMeanFreePathForMaterials();109 110 116 shellCrossSectionHandler = new G4CrossSectionHandler(); 111 117 shellCrossSectionHandler->Clear(); … … 113 119 shellCrossSectionHandler->LoadShellData(shellCrossSectionFile); 114 120 115 // SI - Buggy default ?121 // SI - Simple generator is buggy 116 122 //generatorName = "geant4.6.2"; 117 123 //ElectronAngularGenerator = new G4PhotoElectricAngularGeneratorSimple("GEANTSimpleGenerator"); // default generator 118 119 // 120 124 ElectronAngularGenerator = 125 new G4PhotoElectricAngularGeneratorSauterGavrila("GEANTSauterGavrilaGenerator"); 126 127 // 121 128 if (verboseLevel > 2) 122 129 G4cout << "Loaded cross section files for Livermore PhotoElectric model" << G4endl; 123 130 124 G4cout << "Livermore PhotoElectric model is initialized " << G4endl 125 << "Energy range: " 126 << LowEnergyLimit() / keV << " keV - " 127 << HighEnergyLimit() / GeV << " GeV" 128 << G4endl; 131 // InitialiseElementSelectors(particle,cuts); 132 133 if (verboseLevel > 0) { 134 G4cout << "Livermore PhotoElectric model is initialized " << G4endl 135 << "Energy range: " 136 << LowEnergyLimit() / eV << " eV - " 137 << HighEnergyLimit() / GeV << " GeV" 138 << G4endl; 139 } 129 140 130 141 if(isInitialised) return; 131 132 if(pParticleChange) 133 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 134 else 135 fParticleChange = new G4ParticleChangeForGamma(); 136 142 fParticleChange = GetParticleChangeForGamma(); 137 143 isInitialised = true; 138 144 } … … 147 153 { 148 154 if (verboseLevel > 3) 149 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermorePhotoElectricModel" << G4endl; 155 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermorePhotoElectricModel" 156 << G4endl; 157 158 if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) 159 return 0; 150 160 151 161 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); … … 155 165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 156 166 157 void G4LivermorePhotoElectricModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect, 158 const G4MaterialCutsCouple* couple, 159 const G4DynamicParticle* aDynamicGamma, 160 G4double, 161 G4double) 167 void 168 G4LivermorePhotoElectricModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect, 169 const G4MaterialCutsCouple* couple, 170 const G4DynamicParticle* aDynamicGamma, 171 G4double, 172 G4double) 162 173 { 163 174 … … 172 183 G4double photonEnergy = aDynamicGamma->GetKineticEnergy(); 173 184 185 // kill incident photon 186 fParticleChange->SetProposedKineticEnergy(0.); 187 fParticleChange->ProposeTrackStatus(fStopAndKill); 188 189 // low-energy gamma is absorpted by this process 174 190 if (photonEnergy <= lowEnergyLimit) 175 191 { 176 fParticleChange->ProposeTrackStatus(fStopAndKill);177 fParticleChange->SetProposedKineticEnergy(0.);178 192 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy); 179 // SI - IS THE FOLLOWING RETURN NECESSARY ? 180 return ; 193 return; 181 194 } 182 195 183 G4ThreeVector photonDirection = aDynamicGamma->GetMomentumDirection(); // Returns the normalized direction of the momentum 196 // Returns the normalized direction of the momentum 197 G4ThreeVector photonDirection = aDynamicGamma->GetMomentumDirection(); 184 198 185 199 // Select randomly one element in the current material 186 G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy); 200 // G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy); 201 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition(); 202 const G4Element* elm = SelectRandomAtom(couple->GetMaterial(),particle,photonEnergy); 203 G4int Z = (G4int)elm->GetZ(); 187 204 188 205 // Select the ionised shell in the current atom according to shell cross sections … … 195 212 G4int shellId = shell->ShellId(); 196 213 197 // Create lists of pointers to DynamicParticles (photons and electrons)198 // (Is the electron vector necessary? To be checked)199 std::vector<G4DynamicParticle*>* photonVector = 0;200 std::vector<G4DynamicParticle*> electronVector;201 202 G4double energyDeposit = 0.0;203 204 214 // Primary outcoming electron 205 215 G4double eKineticEnergy = photonEnergy - bindingEnergy; … … 209 219 if (eKineticEnergy > 0.) 210 220 { 211 // SI - Removed safety 212 213 // Generate the electron only if with large enough range w.r.t. cuts and safety 214 //G4double safety = aStep.GetPostStepPoint()->GetSafety(); 215 216 //if (rangeTest->Escape(G4Electron::Electron(),couple,eKineticEnergy,safety)) 217 { 218 219 // Calculate direction of the photoelectron 220 G4ThreeVector gammaPolarization = aDynamicGamma->GetPolarization(); 221 G4ThreeVector electronDirection = ElectronAngularGenerator->GetPhotoElectronDirection(photonDirection,eKineticEnergy,gammaPolarization,shellId); 222 223 // The electron is created ... 224 G4DynamicParticle* electron = new G4DynamicParticle (G4Electron::Electron(), 225 electronDirection, 226 eKineticEnergy); 227 electronVector.push_back(electron); 228 } 229 /*else 230 { 231 energyDeposit += eKineticEnergy; 232 }*/ 221 // Calculate direction of the photoelectron 222 G4ThreeVector gammaPolarization = aDynamicGamma->GetPolarization(); 223 G4ThreeVector electronDirection = 224 ElectronAngularGenerator->GetPhotoElectronDirection(photonDirection, 225 eKineticEnergy, 226 gammaPolarization, 227 shellId); 228 229 // The electron is created ... 230 G4DynamicParticle* electron = new G4DynamicParticle (G4Electron::Electron(), 231 electronDirection, 232 eKineticEnergy); 233 fvect->push_back(electron); 233 234 } 234 235 else … … 237 238 } 238 239 239 G4int nElectrons = electronVector.size(); 240 size_t nTotPhotons = 0; 241 G4int nPhotons=0; 242 const G4ProductionCutsTable* theCoupleTable= 243 G4ProductionCutsTable::GetProductionCutsTable(); 244 245 size_t index = couple->GetIndex(); 246 G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[index]; 247 cutg = std::min(cutForLowEnergySecondaryPhotons,cutg); 248 249 G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[index]; 250 cute = std::min(cutForLowEnergySecondaryPhotons,cute); 251 252 G4DynamicParticle* aPhoton; 253 254 // Generation of fluorescence 255 // Data in EADL are available only for Z > 5 256 // Protection to avoid generating photons in the unphysical case of 257 // shell binding energy > photon energy 258 if (Z > 5 && (bindingEnergy > cutg || bindingEnergy > cute)) 259 { 260 photonVector = deexcitationManager.GenerateParticles(Z,shellId); 261 nTotPhotons = photonVector->size(); 262 for (size_t k=0; k<nTotPhotons; k++) 263 { 264 aPhoton = (*photonVector)[k]; 265 if (aPhoton) 266 { 267 G4double itsCut = cutg; 268 if(aPhoton->GetDefinition() == G4Electron::Electron()) itsCut = cute; 269 G4double itsEnergy = aPhoton->GetKineticEnergy(); 270 271 if (itsEnergy > itsCut && itsEnergy <= bindingEnergy) 272 { 273 nPhotons++; 274 // Local energy deposit is given as the sum of the 275 // energies of incident photons minus the energies 276 // of the outcoming fluorescence photons 277 bindingEnergy -= itsEnergy; 278 279 } 280 else 281 { 282 delete aPhoton; 283 (*photonVector)[k] = 0; 284 } 285 } 286 } 287 } 288 289 energyDeposit += bindingEnergy; 290 291 // Final state 292 293 for (G4int l = 0; l<nElectrons; l++ ) 294 { 295 aPhoton = electronVector[l]; 296 if(aPhoton) { 297 fvect->push_back(aPhoton); 240 // deexcitation 241 if(DeexcitationFlag() && Z > 5) { 242 243 const G4ProductionCutsTable* theCoupleTable= 244 G4ProductionCutsTable::GetProductionCutsTable(); 245 246 size_t index = couple->GetIndex(); 247 G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[index]; 248 G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[index]; 249 250 // Generation of fluorescence 251 // Data in EADL are available only for Z > 5 252 // Protection to avoid generating photons in the unphysical case of 253 // shell binding energy > photon energy 254 if (bindingEnergy > cutg || bindingEnergy > cute) 255 { 256 G4DynamicParticle* aPhoton; 257 deexcitationManager.SetCutForSecondaryPhotons(cutg); 258 deexcitationManager.SetCutForAugerElectrons(cute); 259 260 std::vector<G4DynamicParticle*>* photonVector = 261 deexcitationManager.GenerateParticles(Z,shellId); 262 size_t nTotPhotons = photonVector->size(); 263 for (size_t k=0; k<nTotPhotons; k++) 264 { 265 aPhoton = (*photonVector)[k]; 266 if (aPhoton) 267 { 268 G4double itsEnergy = aPhoton->GetKineticEnergy(); 269 if (itsEnergy <= bindingEnergy) 270 { 271 // Local energy deposit is given as the sum of the 272 // energies of incident photons minus the energies 273 // of the outcoming fluorescence photons 274 bindingEnergy -= itsEnergy; 275 fvect->push_back(aPhoton); 276 } 277 else 278 { 279 // abnormal case of energy non-conservation 280 delete aPhoton; 281 (*photonVector)[k] = 0; 282 } 283 } 284 } 285 delete photonVector; 298 286 } 299 } 300 for ( size_t ll = 0; ll < nTotPhotons; ll++) 301 { 302 aPhoton = (*photonVector)[ll]; 303 if(aPhoton) { 304 fvect->push_back(aPhoton); 305 } 306 } 307 308 delete photonVector; 309 310 if (energyDeposit < 0) 311 { 312 G4cout << "WARNING - " 313 << "G4LowEnergyPhotoElectric::PostStepDoIt - Negative energy deposit" 314 << G4endl; 315 energyDeposit = 0; 316 } 317 318 // kill incident photon 319 fParticleChange->ProposeMomentumDirection( 0., 0., 0. ); 320 fParticleChange->SetProposedKineticEnergy(0.); 321 fParticleChange->ProposeTrackStatus(fStopAndKill); 322 fParticleChange->ProposeLocalEnergyDeposit(energyDeposit); 287 } 288 // excitation energy left 289 fParticleChange->ProposeLocalEnergyDeposit(bindingEnergy); 323 290 } 324 291 … … 348 315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 349 316 350 void G4LivermorePhotoElectricModel::SetAngularGenerator(G4VPhotoElectricAngularDistribution* distribution) 351 { 352 ElectronAngularGenerator = distribution; 317 void 318 G4LivermorePhotoElectricModel::SetAngularGenerator(G4VPhotoElectricAngularDistribution* dist) 319 { 320 ElectronAngularGenerator = dist; 353 321 ElectronAngularGenerator->PrintGeneratorInformation(); 354 322 } … … 361 329 { 362 330 delete ElectronAngularGenerator; 363 ElectronAngularGenerator = new G4PhotoElectricAngularGeneratorSimple("GEANT4LowEnergySimpleGenerator"); 331 ElectronAngularGenerator = 332 new G4PhotoElectricAngularGeneratorSimple("GEANT4LowEnergySimpleGenerator"); 364 333 generatorName = name; 365 334 } … … 367 336 { 368 337 delete ElectronAngularGenerator; 369 ElectronAngularGenerator = new G4PhotoElectricAngularGeneratorSauterGavrila("GEANT4SauterGavrilaGenerator"); 338 ElectronAngularGenerator = 339 new G4PhotoElectricAngularGeneratorSauterGavrila("GEANT4SauterGavrilaGenerator"); 370 340 generatorName = name; 371 341 } … … 373 343 { 374 344 delete ElectronAngularGenerator; 375 ElectronAngularGenerator = new G4PhotoElectricAngularGeneratorPolarized("GEANT4LowEnergyPolarizedGenerator"); 345 ElectronAngularGenerator = 346 new G4PhotoElectricAngularGeneratorPolarized("GEANT4LowEnergyPolarizedGenerator"); 376 347 generatorName = name; 377 348 } … … 384 355 } 385 356 386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....387 388 G4double G4LivermorePhotoElectricModel::GetMeanFreePath(const G4Track& track,389 G4double, // previousStepSize390 G4ForceCondition*)391 {392 const G4DynamicParticle* photon = track.GetDynamicParticle();393 G4double energy = photon->GetKineticEnergy();394 G4Material* material = track.GetMaterial();395 // size_t materialIndex = material->GetIndex();396 397 G4double meanFreePath = DBL_MAX;398 399 // if (energy > highEnergyLimit)400 // meanFreePath = meanFreePathTable->FindValue(highEnergyLimit,materialIndex);401 // else if (energy < lowEnergyLimit) meanFreePath = DBL_MAX;402 // else meanFreePath = meanFreePathTable->FindValue(energy,materialIndex);403 404 G4double cross = shellCrossSectionHandler->ValueForMaterial(material,energy);405 if(cross > 0.0) meanFreePath = 1.0/cross;406 407 return meanFreePath;408 }409 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedComptonModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1. 1 2008/10/30 14:16:35 sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1.6 2009/05/03 08:29:55 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 // History: 30 // -------- 31 // 02 May 2009 S Incerti as V. Ivanchenko proposed in G4LivermoreComptonModel.cc 32 // 33 // Cleanup initialisation and generation of secondaries: 34 // - apply internal high-energy limit only in constructor 35 // - do not apply low-energy limit (default is 0) 36 // - remove GetMeanFreePath method and table 37 // - added protection against numerical problem in energy sampling 38 // - use G4ElementSelector 29 39 30 40 #include "G4LivermorePolarizedComptonModel.hh" … … 38 48 G4LivermorePolarizedComptonModel::G4LivermorePolarizedComptonModel(const G4ParticleDefinition*, 39 49 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 41 { 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?50 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0) 51 { 52 lowEnergyLimit = 250 * eV; 43 53 highEnergyLimit = 100 * GeV; 44 SetLowEnergyLimit(lowEnergyLimit);54 //SetLowEnergyLimit(lowEnergyLimit); 45 55 SetHighEnergyLimit(highEnergyLimit); 46 56 … … 53 63 // 4 = entering in methods 54 64 65 if( verboseLevel>0 ) { 55 66 G4cout << "Livermore Polarized Compton is constructed " << G4endl 56 67 << "Energy range: " 57 << lowEnergyLimit / keV << " keV - "68 << lowEnergyLimit / eV << " eV - " 58 69 << highEnergyLimit / GeV << " GeV" 59 70 << G4endl; 60 71 } 61 72 } 62 73 … … 65 76 G4LivermorePolarizedComptonModel::~G4LivermorePolarizedComptonModel() 66 77 { 67 delete meanFreePathTable;68 delete crossSectionHandler;69 delete scatterFunctionData;78 if (meanFreePathTable) delete meanFreePathTable; 79 if (crossSectionHandler) delete crossSectionHandler; 80 if (scatterFunctionData) delete scatterFunctionData; 70 81 } 71 82 … … 78 89 G4cout << "Calling G4LivermorePolarizedComptonModel::Initialise()" << G4endl; 79 90 80 InitialiseElementSelectors(particle,cuts); 81 82 // Energy limits 83 84 if (LowEnergyLimit() < lowEnergyLimit) 85 { 86 G4cout << "G4LivermorePolarizedComptonModel: low energy limit increased from " << 87 LowEnergyLimit()/eV << " eV to " << lowEnergyLimit << " eV" << G4endl; 88 SetLowEnergyLimit(lowEnergyLimit); 89 } 90 91 if (HighEnergyLimit() > highEnergyLimit) 92 { 93 G4cout << "G4LivermorePolarizedComptonModel: high energy limit decreased from " << 94 HighEnergyLimit()/GeV << " GeV to " << highEnergyLimit << " GeV" << G4endl; 95 SetHighEnergyLimit(highEnergyLimit); 96 } 91 if (crossSectionHandler) 92 { 93 crossSectionHandler->Clear(); 94 delete crossSectionHandler; 95 } 97 96 98 97 // Reading of data files - all materials are read … … 116 115 shellData.LoadData(file); 117 116 118 //119 117 if (verboseLevel > 2) 120 118 G4cout << "Loaded cross section files for Livermore Polarized Compton model" << G4endl; 121 119 122 G4cout << "Livermore Polarized Compton model is initialized " << G4endl 120 InitialiseElementSelectors(particle,cuts); 121 122 if( verboseLevel>0 ) { 123 G4cout << "Livermore Polarized Compton model is initialized " << G4endl 123 124 << "Energy range: " 124 << LowEnergyLimit() / keV << " keV - "125 << LowEnergyLimit() / eV << " eV - " 125 126 << HighEnergyLimit() / GeV << " GeV" 126 127 << G4endl; 127 128 } 129 128 130 // 129 131 130 132 if(isInitialised) return; 131 132 if(pParticleChange) 133 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 134 else 135 fParticleChange = new G4ParticleChangeForGamma(); 136 133 fParticleChange = GetParticleChangeForGamma(); 137 134 isInitialised = true; 138 135 } … … 149 146 G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermorePolarizedComptonModel" << G4endl; 150 147 148 if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) return 0.0; 149 151 150 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); 152 151 return cs; … … 203 202 fParticleChange->SetProposedKineticEnergy(0.); 204 203 fParticleChange->ProposeLocalEnergyDeposit(gammaEnergy0); 205 // SI - IS THE FOLLOWING RETURN NECESSARY ?206 204 return; 207 205 } … … 210 208 211 209 // Select randomly one element in the current material 212 213 G4int Z = crossSectionHandler->SelectRandomAtom(couple,gammaEnergy0); 210 //G4int Z = crossSectionHandler->SelectRandomAtom(couple,gammaEnergy0); 211 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition(); 212 const G4Element* elm = SelectRandomAtom(couple,particle,gammaEnergy0); 213 G4int Z = (G4int)elm->GetZ(); 214 214 215 215 // Sample the energy and the polarization of the scattered photon … … 429 429 else 430 430 { 431 gammaEnergy1 = 0.; 431 432 fParticleChange->SetProposedKineticEnergy(0.) ; 432 433 fParticleChange->ProposeTrackStatus(fStopAndKill); … … 439 440 G4double ElecKineEnergy = gammaEnergy0 - gammaEnergy1 -bindingE; 440 441 442 // SI -protection against negative final energy: no e- is created 443 // like in G4LivermoreComptonModel.cc 444 if(ElecKineEnergy < 0.0) { 445 fParticleChange->ProposeLocalEnergyDeposit(gammaEnergy0 - gammaEnergy1); 446 return; 447 } 448 441 449 // SI - Removed range test 442 450 … … 664 672 } 665 673 666 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 667 668 G4double G4LivermorePolarizedComptonModel::GetMeanFreePath(const G4Track& track, 669 G4double, 670 G4ForceCondition*) 671 { 672 const G4DynamicParticle* photon = track.GetDynamicParticle(); 673 G4double energy = photon->GetKineticEnergy(); 674 const G4MaterialCutsCouple* couple = track.GetMaterialCutsCouple(); 675 size_t materialIndex = couple->GetIndex(); 676 G4double meanFreePath; 677 if (energy > highEnergyLimit) meanFreePath = meanFreePathTable->FindValue(highEnergyLimit,materialIndex); 678 else if (energy < lowEnergyLimit) meanFreePath = DBL_MAX; 679 else meanFreePath = meanFreePathTable->FindValue(energy,materialIndex); 680 return meanFreePath; 681 } 682 683 674 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedRayleighModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1. 1 2008/10/30 14:16:35sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1.5 2009/05/02 15:20:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 // History: 30 // -------- 31 // 02 May 2009 S Incerti as V. Ivanchenko proposed in G4LivermoreRayleighModel.cc 32 // 33 // Cleanup initialisation and generation of secondaries: 34 // - apply internal high-energy limit only in constructor 35 // - do not apply low-energy limit (default is 0) 36 // - remove GetMeanFreePath method and table 37 // - remove initialisation of element selector 38 // - use G4ElementSelector 29 39 30 40 #include "G4LivermorePolarizedRayleighModel.hh" … … 38 48 G4LivermorePolarizedRayleighModel::G4LivermorePolarizedRayleighModel(const G4ParticleDefinition*, 39 49 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 41 { 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?50 :G4VEmModel(nam),isInitialised(false),crossSectionHandler(0),formFactorData(0) 51 { 52 lowEnergyLimit = 250 * eV; 43 53 highEnergyLimit = 100 * GeV; 44 54 45 SetLowEnergyLimit(lowEnergyLimit);55 //SetLowEnergyLimit(lowEnergyLimit); 46 56 SetHighEnergyLimit(highEnergyLimit); 47 57 // … … 54 64 // 4 = entering in methods 55 65 56 G4cout << "Livermore Polarized Rayleigh is constructed " << G4endl 66 if(verboseLevel > 0) { 67 G4cout << "Livermore Polarized Rayleigh is constructed " << G4endl 57 68 << "Energy range: " 58 << lowEnergyLimit / keV << " keV - "69 << lowEnergyLimit / eV << " eV - " 59 70 << highEnergyLimit / GeV << " GeV" 60 71 << G4endl; 72 } 61 73 } 62 74 … … 65 77 G4LivermorePolarizedRayleighModel::~G4LivermorePolarizedRayleighModel() 66 78 { 67 delete crossSectionHandler;68 delete formFactorData;79 if (crossSectionHandler) delete crossSectionHandler; 80 if (formFactorData) delete formFactorData; 69 81 } 70 82 … … 84 96 G4cout << "Calling G4LivermorePolarizedRayleighModel::Initialise()" << G4endl; 85 97 86 InitialiseElementSelectors(particle,cuts); 87 88 // Energy limits 89 90 if (LowEnergyLimit() < lowEnergyLimit) 91 { 92 G4cout << "G4LivermorePolarizedRayleighModel: low energy limit increased from " << 93 LowEnergyLimit()/eV << " eV to " << lowEnergyLimit << " eV" << G4endl; 94 SetLowEnergyLimit(lowEnergyLimit); 95 } 96 if (HighEnergyLimit() > highEnergyLimit) 97 { 98 G4cout << "G4LivermorePolarizedRayleighModel: high energy limit decreased from " << 99 HighEnergyLimit()/GeV << " GeV to " << highEnergyLimit << " GeV" << G4endl; 100 SetHighEnergyLimit(highEnergyLimit); 101 } 102 98 if (crossSectionHandler) 99 { 100 crossSectionHandler->Clear(); 101 delete crossSectionHandler; 102 } 103 103 104 // Read data files for all materials 104 105 … … 113 114 formFactorData->LoadData(formFactorFile); 114 115 116 InitialiseElementSelectors(particle,cuts); 117 115 118 // 116 119 if (verboseLevel > 2) 117 120 G4cout << "Loaded cross section files for Livermore Polarized Rayleigh model" << G4endl; 118 121 119 G4cout << "Livermore Polarized Rayleigh model is initialized " << G4endl 122 InitialiseElementSelectors(particle,cuts); 123 124 if (verboseLevel > 0) { 125 G4cout << "Livermore Polarized Rayleigh model is initialized " << G4endl 120 126 << "Energy range: " 121 << LowEnergyLimit() / keV << " keV - "127 << LowEnergyLimit() / eV << " eV - " 122 128 << HighEnergyLimit() / GeV << " GeV" 123 129 << G4endl; 130 } 124 131 125 132 if(isInitialised) return; 126 127 if(pParticleChange) 128 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 129 else 130 fParticleChange = new G4ParticleChangeForGamma(); 131 133 fParticleChange = GetParticleChangeForGamma(); 132 134 isInitialised = true; 133 135 } … … 144 146 G4cout << "Calling CrossSectionPerAtom() of G4LivermorePolarizedRayleighModel" << G4endl; 145 147 148 if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) return 0.0; 149 146 150 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); 147 151 return cs; … … 166 170 fParticleChange->SetProposedKineticEnergy(0.); 167 171 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 168 // SI - IS THE FOLLOWING RETURN NECESSARY ?169 172 return ; 170 173 } … … 173 176 174 177 // Select randomly one element in the current material 175 G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy0); 178 // G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy0); 179 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition(); 180 const G4Element* elm = SelectRandomAtom(couple,particle,photonEnergy0); 181 G4int Z = (G4int)elm->GetZ(); 176 182 177 183 G4double outcomingPhotonCosTheta = GenerateCosTheta(photonEnergy0, Z); -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreRayleighModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreRayleighModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 // 26 // $Id: G4LivermoreRayleighModel.cc,v 1.6 2009/04/18 18:29:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // Author: Sebastien Inserti 30 // 30 October 2008 31 // 32 // History: 33 // -------- 34 // 18 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 35 // - apply internal high-energy limit only in constructor 36 // - do not apply low-energy limit (default is 0) 37 // - remove GetMeanFreePath method and table 38 // - remove initialisation of element selector 39 // - use G4ElementSelector 29 40 30 41 #include "G4LivermoreRayleighModel.hh" … … 37 48 38 49 G4LivermoreRayleighModel::G4LivermoreRayleighModel(const G4ParticleDefinition*, 39 const G4String& nam) 40 :G4VEmModel(nam),isInitialised(false) 41 { 42 lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ? 50 const G4String& nam) 51 :G4VEmModel(nam),isInitialised(false),meanFreePathTable(0), 52 formFactorData(0),crossSectionHandler(0) 53 { 54 lowEnergyLimit = 250 * eV; 43 55 highEnergyLimit = 100 * GeV; 44 56 45 SetLowEnergyLimit(lowEnergyLimit);57 // SetLowEnergyLimit(lowEnergyLimit); 46 58 SetHighEnergyLimit(highEnergyLimit); 47 59 // … … 54 66 // 4 = entering in methods 55 67 56 G4cout << "Livermore Rayleigh is constructed " << G4endl 57 << "Energy range: " 58 << lowEnergyLimit / keV << " keV - " 59 << highEnergyLimit / GeV << " GeV" 60 << G4endl; 68 if(verboseLevel > 0) { 69 G4cout << "Livermore Rayleigh is constructed " << G4endl 70 << "Energy range: " 71 << lowEnergyLimit / eV << " eV - " 72 << highEnergyLimit / GeV << " GeV" 73 << G4endl; 74 } 61 75 } 62 76 … … 65 79 G4LivermoreRayleighModel::~G4LivermoreRayleighModel() 66 80 { 67 delete meanFreePathTable; 68 delete crossSectionHandler; 69 delete formFactorData; 81 if (crossSectionHandler) delete crossSectionHandler; 82 if (formFactorData) delete formFactorData; 70 83 } 71 84 … … 73 86 74 87 void G4LivermoreRayleighModel::Initialise(const G4ParticleDefinition* particle, 75 const G4DataVector& cuts)88 const G4DataVector& cuts) 76 89 { 77 90 if (verboseLevel > 3) 78 91 G4cout << "Calling G4LivermoreRayleighModel::Initialise()" << G4endl; 79 92 80 InitialiseElementSelectors(particle,cuts); 81 82 // Energy limits 93 if (crossSectionHandler) 94 { 95 crossSectionHandler->Clear(); 96 delete crossSectionHandler; 97 } 83 98 84 if (LowEnergyLimit() < lowEnergyLimit)85 {86 G4cout << "G4LivermoreRayleighModel: low energy limit increased from " <<87 LowEnergyLimit()/eV << " eV to " << lowEnergyLimit << " eV" << G4endl;88 SetLowEnergyLimit(lowEnergyLimit);89 }90 91 if (HighEnergyLimit() > highEnergyLimit)92 {93 G4cout << "G4LivermoreRayleighModel: high energy limit decreased from " <<94 HighEnergyLimit()/GeV << " GeV to " << highEnergyLimit << " GeV" << G4endl;95 SetHighEnergyLimit(highEnergyLimit);96 }97 98 99 // Data are read for all materials 99 100 … … 103 104 crossSectionHandler->LoadData(crossSectionFile); 104 105 105 meanFreePathTable = 0;106 meanFreePathTable = crossSectionHandler->BuildMeanFreePathForMaterials();107 108 106 G4VDataSetAlgorithm* ffInterpolation = new G4LogLogInterpolation; 109 107 G4String formFactorFile = "rayl/re-ff-"; … … 111 109 formFactorData->LoadData(formFactorFile); 112 110 113 // 114 111 InitialiseElementSelectors(particle,cuts); 112 113 // 115 114 if (verboseLevel > 2) 116 115 G4cout << "Loaded cross section files for Livermore Rayleigh model" << G4endl; 117 116 118 G4cout << "Livermore Rayleigh model is initialized " << G4endl 119 << "Energy range: " 120 << LowEnergyLimit() / keV << " keV - " 121 << HighEnergyLimit() / GeV << " GeV" 122 << G4endl; 117 if (verboseLevel > 0) { 118 G4cout << "Livermore Rayleigh model is initialized " << G4endl 119 << "Energy range: " 120 << LowEnergyLimit() / eV << " eV - " 121 << HighEnergyLimit() / GeV << " GeV" 122 << G4endl; 123 } 123 124 124 125 if(isInitialised) return; 125 126 if(pParticleChange) 127 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 128 else 129 fParticleChange = new G4ParticleChangeForGamma(); 130 126 fParticleChange = GetParticleChangeForGamma(); 131 127 isInitialised = true; 132 128 … … 144 140 G4cout << "Calling CrossSectionPerAtom() of G4LivermoreRayleighModel" << G4endl; 145 141 142 if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) 143 return 0.0; 144 146 145 G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy); 147 146 return cs; … … 160 159 161 160 G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy(); 162 161 162 // absorption of low-energy gamma 163 163 if (photonEnergy0 <= lowEnergyLimit) 164 {164 { 165 165 fParticleChange->ProposeTrackStatus(fStopAndKill); 166 166 fParticleChange->SetProposedKineticEnergy(0.); 167 167 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 168 // SI - IS THE FOLLOWING RETURN NECESSARY ?169 168 return ; 170 }169 } 171 170 172 171 G4ParticleMomentum photonDirection0 = aDynamicGamma->GetMomentumDirection(); 173 172 174 173 // Select randomly one element in the current material 175 G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy0); 174 // G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy0); 175 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition(); 176 const G4Element* elm = SelectRandomAtom(couple,particle,photonEnergy0); 177 G4int Z = (G4int)elm->GetZ(); 176 178 177 179 // Sample the angle of the scattered photon … … 188 190 { 189 191 do 190 {191 cosTheta = 2. * G4UniformRand() - 1.;192 fcostheta = ( 1. + cosTheta*cosTheta)/2.;193 } while (fcostheta < G4UniformRand());192 { 193 cosTheta = 2. * G4UniformRand() - 1.; 194 fcostheta = ( 1. + cosTheta*cosTheta)/2.; 195 } while (fcostheta < G4UniformRand()); 194 196 195 197 G4double sinThetaHalf = std::sqrt((1. - cosTheta) / 2.); 196 198 x = sinThetaHalf / (wlPhoton/cm); 197 199 if (x > 1.e+005) 198 dataFormFactor = formFactorData->FindValue(x,Z-1); 200 { 201 dataFormFactor = formFactorData->FindValue(x,Z-1); 202 } 199 203 else 200 dataFormFactor = formFactorData->FindValue(0.,Z-1); 204 { 205 dataFormFactor = formFactorData->FindValue(0.,Z-1); 206 } 201 207 randomFormFactor = G4UniformRand() * Z * Z; 202 208 sinTheta = std::sqrt(1. - cosTheta*cosTheta); … … 219 225 } 220 226 221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 222 223 G4double G4LivermoreRayleighModel::GetMeanFreePath(const G4Track& track, 224 G4double, // previousStepSize 225 G4ForceCondition*) 226 { 227 const G4DynamicParticle* photon = track.GetDynamicParticle(); 228 G4double energy = photon->GetKineticEnergy(); 229 const G4MaterialCutsCouple* couple = track.GetMaterialCutsCouple(); 230 size_t materialIndex = couple->GetIndex(); 231 232 G4double meanFreePath; 233 if (energy > highEnergyLimit) meanFreePath = meanFreePathTable->FindValue(highEnergyLimit,materialIndex); 234 else if (energy < lowEnergyLimit) meanFreePath = DBL_MAX; 235 else meanFreePath = meanFreePathTable->FindValue(energy,materialIndex); 236 return meanFreePath; 237 } 238 227 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyBremsstrahlung.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyBremsstrahlung.cc,v 1.7 1 2006/06/29 19:40:13 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LowEnergyBremsstrahlung.cc,v 1.72 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 93 93 // angularDistribution->PrintGeneratorInformation(); 94 94 TsaiAngularDistribution = new G4ModifiedTsai("TsaiGenerator"); 95 96 97 G4cout << G4endl; 98 G4cout << "*******************************************************************************" << G4endl; 99 G4cout << "*******************************************************************************" << G4endl; 100 G4cout << " The class G4LowEnergyBremsstrahlung is NOT SUPPORTED ANYMORE. " << G4endl; 101 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 102 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 103 G4cout << "*******************************************************************************" << G4endl; 104 G4cout << "*******************************************************************************" << G4endl; 105 G4cout << G4endl; 95 106 } 96 107 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyCompton.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyCompton.cc,v 1.4 7 2008/12/18 13:01:28 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LowEnergyCompton.cc,v 1.48 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: A. Forti … … 104 104 << G4endl; 105 105 } 106 107 G4cout << G4endl; 108 G4cout << "*******************************************************************************" << G4endl; 109 G4cout << "*******************************************************************************" << G4endl; 110 G4cout << " The class G4LowEnergyCompton is NOT SUPPORTED ANYMORE. " << G4endl; 111 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 112 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 113 G4cout << "*******************************************************************************" << G4endl; 114 G4cout << "*******************************************************************************" << G4endl; 115 G4cout << G4endl; 106 116 } 107 117 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyGammaConversion.cc
r1007 r1055 26 26 // -------------------------------------------------------------------- 27 27 /// 28 // $Id: G4LowEnergyGammaConversion.cc,v 1.3 6 2006/06/29 19:40:17 gunterExp $29 // GEANT4 tag $Name: geant4-09-0 2$28 // $Id: G4LowEnergyGammaConversion.cc,v 1.37 2009/05/02 09:59:16 sincerti Exp $ 29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 30 30 // 31 31 // … … 104 104 << G4endl; 105 105 } 106 107 G4cout << G4endl; 108 G4cout << "*******************************************************************************" << G4endl; 109 G4cout << "*******************************************************************************" << G4endl; 110 G4cout << " The class G4LowEnergyGammaConversion is NOT SUPPORTED ANYMORE. " << G4endl; 111 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 112 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 113 G4cout << "*******************************************************************************" << G4endl; 114 G4cout << "*******************************************************************************" << G4endl; 115 G4cout << G4endl; 106 116 } 107 117 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyIonisation.cc,v 1.10 3 2008/05/02 19:23:38 piaExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LowEnergyIonisation.cc,v 1.104 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 131 131 cutForElectrons = 250.0*eV; 132 132 verboseLevel = 0; 133 134 G4cout << G4endl; 135 G4cout << "*******************************************************************************" << G4endl; 136 G4cout << "*******************************************************************************" << G4endl; 137 G4cout << " The class G4LowEnergyIonisation is NOT SUPPORTED ANYMORE. " << G4endl; 138 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 139 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 140 G4cout << "*******************************************************************************" << G4endl; 141 G4cout << "*******************************************************************************" << G4endl; 142 G4cout << G4endl; 133 143 } 134 144 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPhotoElectric.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4LowEnergyPhotoElectric.cc,v 1.5 6 2006/06/29 19:40:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4LowEnergyPhotoElectric.cc,v 1.57 2009/05/02 09:59:16 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Author: A. Forti … … 122 122 << G4endl; 123 123 } 124 125 G4cout << G4endl; 126 G4cout << "*******************************************************************************" << G4endl; 127 G4cout << "*******************************************************************************" << G4endl; 128 G4cout << " The class G4LowEnergyPhotoElectric is NOT SUPPORTED ANYMORE. " << G4endl; 129 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 130 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 131 G4cout << "*******************************************************************************" << G4endl; 132 G4cout << "*******************************************************************************" << G4endl; 133 G4cout << G4endl; 124 134 } 125 135 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPolarizedCompton.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4LowEnergyPolarizedCompton.cc,v 1.2 5 2008/05/02 19:23:38 piaExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4LowEnergyPolarizedCompton.cc,v 1.26 2009/05/02 09:59:16 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ … … 122 122 << G4endl; 123 123 } 124 125 G4cout << G4endl; 126 G4cout << "*******************************************************************************" << G4endl; 127 G4cout << "*******************************************************************************" << G4endl; 128 G4cout << " The class G4LowEnergyPolarizedCompton is NOT SUPPORTED ANYMORE. " << G4endl; 129 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 130 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 131 G4cout << "*******************************************************************************" << G4endl; 132 G4cout << "*******************************************************************************" << G4endl; 133 G4cout << G4endl; 124 134 } 125 135 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPolarizedRayleigh.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyPolarizedRayleigh.cc,v 1. 7 2006/06/29 19:40:27 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LowEnergyPolarizedRayleigh.cc,v 1.8 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 63 63 64 64 65 G4cout << G4endl; 66 G4cout << "*******************************************************************************" << G4endl; 67 G4cout << "*******************************************************************************" << G4endl; 68 G4cout << " The class G4LowEnergyPolarizedRayleigh is NOT SUPPORTED ANYMORE. " << G4endl; 69 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 70 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 71 G4cout << "*******************************************************************************" << G4endl; 72 G4cout << "*******************************************************************************" << G4endl; 73 G4cout << G4endl; 65 74 } 66 75 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyRayleigh.cc
r1007 r1055 26 26 // -------------------------------------------------------------------- 27 27 // 28 // $Id: G4LowEnergyRayleigh.cc,v 1.3 7 2006/06/29 19:40:29 gunterExp $29 // GEANT4 tag $Name: geant4-09-0 2$28 // $Id: G4LowEnergyRayleigh.cc,v 1.38 2009/05/02 09:59:16 sincerti Exp $ 29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 30 30 // 31 31 // Author: A. Forti … … 99 99 << G4endl; 100 100 } 101 102 G4cout << G4endl; 103 G4cout << "*******************************************************************************" << G4endl; 104 G4cout << "*******************************************************************************" << G4endl; 105 G4cout << " The class G4LowEnergyRayleigh is NOT SUPPORTED ANYMORE. " << G4endl; 106 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 107 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 108 G4cout << "*******************************************************************************" << G4endl; 109 G4cout << "*******************************************************************************" << G4endl; 110 G4cout << G4endl; 101 111 } 102 112 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeAnnihilation.cc
r819 r1055 64 64 << G4endl; 65 65 } 66 67 G4cout << G4endl; 68 G4cout << "*******************************************************************************" << G4endl; 69 G4cout << "*******************************************************************************" << G4endl; 70 G4cout << " The class G4PenelopeAnnihilation is NOT SUPPORTED ANYMORE. " << G4endl; 71 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 72 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 73 G4cout << "*******************************************************************************" << G4endl; 74 G4cout << "*******************************************************************************" << G4endl; 75 G4cout << G4endl; 66 76 } 67 77 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeAnnihilationModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeAnnihilationModel.cc,v 1. 2 2008/12/04 14:09:36 pandolaExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeAnnihilationModel.cc,v 1.3 2009/04/17 10:29:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 32 32 // -------- 33 33 // 29 Oct 2008 L Pandola Migration from process to model 34 // 34 // 15 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 35 // - apply internal high-energy limit only in constructor 36 // - do not apply low-energy limit (default is 0) 37 // - do not use G4ElementSelector 35 38 36 39 #include "G4PenelopeAnnihilationModel.hh" … … 48 51 :G4VEmModel(nam),isInitialised(false) 49 52 { 50 fIntrinsicLowEnergyLimit = 0.0 *eV;53 fIntrinsicLowEnergyLimit = 0.0; 51 54 fIntrinsicHighEnergyLimit = 100.0*GeV; 52 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);55 // SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 53 56 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 54 57 … … 73 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 74 77 75 void G4PenelopeAnnihilationModel::Initialise(const G4ParticleDefinition* particle,76 const G4DataVector& cuts)78 void G4PenelopeAnnihilationModel::Initialise(const G4ParticleDefinition*, 79 const G4DataVector&) 77 80 { 78 81 if (verboseLevel > 3) 79 82 G4cout << "Calling G4PenelopeAnnihilationModel::Initialise()" << G4endl; 80 83 81 InitialiseElementSelectors(particle,cuts); 82 if (LowEnergyLimit() < fIntrinsicLowEnergyLimit) 83 { 84 G4cout << "G4PenelopeAnnihilationModel: low energy limit increased from " << 85 LowEnergyLimit()/eV << " eV to " << fIntrinsicLowEnergyLimit/eV << " eV" << G4endl; 86 SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 87 } 88 if (HighEnergyLimit() > fIntrinsicHighEnergyLimit) 89 { 90 G4cout << "G4PenelopeAnnihilationModel: high energy limit decreased from " << 91 HighEnergyLimit()/GeV << " GeV to " << fIntrinsicHighEnergyLimit/GeV << " GeV" << G4endl; 92 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 93 } 94 95 G4cout << "Penelope Annihilation model is initialized " << G4endl 96 << "Energy range: " 97 << LowEnergyLimit() / keV << " keV - " 98 << HighEnergyLimit() / GeV << " GeV" 99 << G4endl; 84 if(verboseLevel > 0) { 85 G4cout << "Penelope Annihilation model is initialized " << G4endl 86 << "Energy range: " 87 << LowEnergyLimit() / keV << " keV - " 88 << HighEnergyLimit() / GeV << " GeV" 89 << G4endl; 90 } 100 91 101 92 if(isInitialised) return; 102 103 if(pParticleChange) 104 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 105 else 106 fParticleChange = new G4ParticleChangeForGamma(); 93 fParticleChange = GetParticleChangeForGamma(); 107 94 isInitialised = true; 108 95 } … … 155 142 156 143 G4double kineticEnergy = aDynamicPositron->GetKineticEnergy(); 157 158 if (kineticEnergy == 0) 144 145 // kill primary 146 fParticleChange->SetProposedKineticEnergy(0.); 147 fParticleChange->ProposeTrackStatus(fStopAndKill); 148 149 if (kineticEnergy == 0.0) 159 150 { 160 151 //Old AtRestDoIt … … 170 161 fvect->push_back(firstGamma); 171 162 fvect->push_back(secondGamma); 172 fParticleChange->SetProposedKineticEnergy(0.);173 fParticleChange->ProposeTrackStatus(fStopAndKill);174 163 return; 175 164 } … … 227 216 photon2Energy); 228 217 fvect->push_back(aParticle2); 229 fParticleChange->SetProposedKineticEnergy(0.);230 fParticleChange->ProposeTrackStatus(fStopAndKill);231 218 232 219 if (verboseLevel > 1) … … 244 231 } 245 232 if (verboseLevel > 0) 246 { 247 233 { 248 234 G4double energyDiff = std::fabs(totalAvailableEnergy-photon1Energy-photon2Energy); 249 235 if (energyDiff > 0.05*keV) -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlung.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlung.cc,v 1.1 8 2006/06/29 19:40:35 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeBremsstrahlung.cc,v 1.19 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 71 71 cutForPhotons = 0.; 72 72 verboseLevel = 0; 73 74 G4cout << G4endl; 75 G4cout << "*******************************************************************************" << G4endl; 76 G4cout << "*******************************************************************************" << G4endl; 77 G4cout << " The class G4PenelopeBremsstrahlung is NOT SUPPORTED ANYMORE. " << G4endl; 78 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 79 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 80 G4cout << "*******************************************************************************" << G4endl; 81 G4cout << "*******************************************************************************" << G4endl; 82 G4cout << G4endl; 83 73 84 } 74 85 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.1 0 2008/12/09 15:08:13pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.11 2008/12/15 09:23:06 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 97 97 G4String dirFile = pathString + "/penelope/" + name; 98 98 std::ifstream file(dirFile); 99 std::filebuf* lsdp = file.rdbuf(); 100 if (!(lsdp->is_open())) 99 if (!file.is_open()) 101 100 { 102 101 G4String excep = "G4PenelopeBremsstrahlungContinuous - data file " + name + " not found!"; … … 112 111 for (size_t j=0;j<NumberofKPoints;j++){ 113 112 file >> a1; 114 ReducedCS[i][j]=a1*cm2; //coversion present in Penelope source113 ReducedCS[i][j]=a1*cm2; 115 114 } 116 115 //3) read the total cross section, in cm2 117 116 file >> a1; 118 TotalCS[i]=a1*cm2; //conversion present in Penelope source117 TotalCS[i]=a1*cm2; 119 118 // Check closing item 120 119 file >> a1; 121 120 if (a1 != ((G4double) -1)) 122 121 { 123 G4String excep = "G4PenelopeBremsstrahlungContinuous - Check the bremms data file " + name; 122 G4String excep = "G4PenelopeBremsstrahlungContinuous - Check the bremms data file " 123 + name; 124 124 G4Exception(excep); 125 125 } … … 229 229 230 230 //Global x-section factor 231 G4double Fact=Zmat*Zmat*(energy+electron_mass_c2)*(energy+electron_mass_c2)/(energy*(energy+2.0*electron_mass_c2)); 231 G4double Fact=Zmat*Zmat*(energy+electron_mass_c2)*(energy+electron_mass_c2)/ 232 (energy*(energy+2.0*electron_mass_c2)); 232 233 Fact *= PositronCorrection(energy); 233 234 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeCompton.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeCompton.cc,v 1.3 3 2008/06/03 15:44:25 pandolaExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeCompton.cc,v 1.34 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 120 120 << G4endl; 121 121 } 122 123 124 G4cout << G4endl; 125 G4cout << "*******************************************************************************" << G4endl; 126 G4cout << "*******************************************************************************" << G4endl; 127 G4cout << " The class G4PenelopeCompton is NOT SUPPORTED ANYMORE. " << G4endl; 128 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 129 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 130 G4cout << "*******************************************************************************" << G4endl; 131 G4cout << "*******************************************************************************" << G4endl; 132 G4cout << G4endl; 133 122 134 } 123 135 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeComptonModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeComptonModel.cc,v 1. 2 2008/12/04 14:11:21 pandolaExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeComptonModel.cc,v 1.4 2009/04/18 18:29:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 40 40 // that are read from the external files. 41 41 // 24 Nov 2008 L Pandola Find a cleaner way to delete vectors. 42 // 16 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 43 // - apply internal high-energy limit only in constructor 44 // - do not apply low-energy limit (default is 0) 45 // - do not apply production threshold on level of the model 42 46 // 43 47 … … 69 73 fIntrinsicLowEnergyLimit = 100.0*eV; 70 74 fIntrinsicHighEnergyLimit = 100.0*GeV; 71 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);75 // SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 72 76 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 73 77 // … … 118 122 119 123 void G4PenelopeComptonModel::Initialise(const G4ParticleDefinition* particle, 120 const G4DataVector& cuts)124 const G4DataVector& cuts) 121 125 { 122 126 if (verboseLevel > 3) … … 124 128 125 129 InitialiseElementSelectors(particle,cuts); 126 if (LowEnergyLimit() < fIntrinsicLowEnergyLimit) 127 { 128 G4cout << "G4PenelopeComptonModel: low energy limit increased from " << 129 LowEnergyLimit()/eV << " eV to " << fIntrinsicLowEnergyLimit/eV << " eV" << G4endl; 130 SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 131 } 132 if (HighEnergyLimit() > fIntrinsicHighEnergyLimit) 133 { 134 G4cout << "G4PenelopeComptonModel: high energy limit decreased from " << 135 HighEnergyLimit()/GeV << " GeV to " << fIntrinsicHighEnergyLimit/GeV << " GeV" << G4endl; 136 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 137 } 138 139 G4cout << "Penelope Compton model is initialized " << G4endl 140 << "Energy range: " 141 << LowEnergyLimit() / keV << " keV - " 142 << HighEnergyLimit() / GeV << " GeV" 143 << G4endl; 130 131 if (verboseLevel > 0) { 132 G4cout << "Penelope Compton model is initialized " << G4endl 133 << "Energy range: " 134 << LowEnergyLimit() / keV << " keV - " 135 << HighEnergyLimit() / GeV << " GeV" 136 << G4endl; 137 } 144 138 145 139 if(isInitialised) return; 146 147 if(pParticleChange) 148 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 149 else 150 fParticleChange = new G4ParticleChangeForGamma(); 140 fParticleChange = GetParticleChangeForGamma(); 151 141 isInitialised = true; 152 142 } … … 249 239 G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy(); 250 240 251 if (photonEnergy0 <= LowEnergyLimit())252 {241 if (photonEnergy0 <= fIntrinsicLowEnergyLimit) 242 { 253 243 fParticleChange->ProposeTrackStatus(fStopAndKill); 254 244 fParticleChange->SetProposedKineticEnergy(0.); 255 245 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 256 246 return ; 257 }247 } 258 248 259 249 G4ParticleMomentum photonDirection0 = aDynamicGamma->GetMomentumDirection(); … … 263 253 G4cout << "Going to select element in " << couple->GetMaterial()->GetName() << G4endl; 264 254 // atom can be selected effitiantly if element selectors are initialised 265 const G4Element* anElement = SelectRandomAtom(couple,G4Gamma::GammaDefinition(),photonEnergy0); 255 const G4Element* anElement = 256 SelectRandomAtom(couple,G4Gamma::GammaDefinition(),photonEnergy0); 266 257 G4int Z = (G4int) anElement->GetZ(); 267 258 if (verboseLevel > 2) … … 320 311 }while((epsilon*photonEnergy0-photonEnergy0+ionEnergy) >0); 321 312 } 322 else //photonEnergy0 <5 MeV313 else //photonEnergy0 < 5 MeV 323 314 { 324 315 //Incoherent scattering function for theta=PI … … 472 463 } 473 464 474 475 465 //Create scattered electron 476 466 G4double diffEnergy = photonEnergy0*(1-epsilon); 477 467 ionEnergy = (*(ionizationEnergy->find(Z)->second))[iosc]; 478 G4double Q2 = photonEnergy0*photonEnergy0+photonEnergy1*(photonEnergy1-2.0*photonEnergy0*cosTheta); 468 G4double Q2 = 469 photonEnergy0*photonEnergy0+photonEnergy1*(photonEnergy1-2.0*photonEnergy0*cosTheta); 479 470 G4double cosThetaE; //scattering angle for the electron 480 471 if (Q2 > 1.0e-12) … … 496 487 G4int shellId = shell->ShellId(); 497 488 G4double ionEnergyInPenelopeDatabase = ionEnergy; 498 ionEnergy = std::max(bindingEnergy,ionEnergyInPenelopeDatabase); //protection against energy non-conservation 499 500 G4double eKineticEnergy = diffEnergy - ionEnergy; //subtract the excitation energy. If not emitted by fluorescence, 489 //protection against energy non-conservation 490 ionEnergy = std::max(bindingEnergy,ionEnergyInPenelopeDatabase); 491 492 //subtract the excitation energy. If not emitted by fluorescence 501 493 //the ionization energy is deposited as local energy deposition 494 G4double eKineticEnergy = diffEnergy - ionEnergy; 502 495 G4double localEnergyDeposit = ionEnergy; 503 496 G4double energyInFluorescence = 0.; //testing purposes only … … 505 498 if (eKineticEnergy < 0) 506 499 { 507 //It means that there was some problem/mismatch between the two databases. Try to make it work 500 //It means that there was some problem/mismatch between the two databases. 501 //Try to make it work 508 502 //In this case available Energy (diffEnergy) < ionEnergy 509 503 //Full residual energy is deposited locally … … 511 505 eKineticEnergy = 0.0; 512 506 } 513 G4double cutForLowEnergySecondaryPhotons = 250.0*eV;514 515 //Get the cut for electrons516 const G4ProductionCutsTable* theCoupleTable=517 G4ProductionCutsTable::GetProductionCutsTable();518 size_t indx = couple->GetIndex();519 G4double cutE = (*(theCoupleTable->GetEnergyCutsVector(1)))[indx];520 cutE = std::max(cutForLowEnergySecondaryPhotons,cutE);521 507 522 508 //the local energy deposit is what remains: part of this may be spent for fluorescence. 523 if (fUseAtomicDeexcitation) 524 { 525 G4int nPhotons=0; 526 527 G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[indx]; 528 cutg = std::max(cutForLowEnergySecondaryPhotons,cutg); 529 530 G4DynamicParticle* aPhoton; 531 G4AtomicDeexcitation deexcitationManager; 509 if(DeexcitationFlag() && Z > 5) { 510 511 const G4ProductionCutsTable* theCoupleTable= 512 G4ProductionCutsTable::GetProductionCutsTable(); 513 514 size_t index = couple->GetIndex(); 515 G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[index]; 516 G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[index]; 517 518 // Generation of fluorescence 519 // Data in EADL are available only for Z > 5 520 // Protection to avoid generating photons in the unphysical case of 521 // shell binding energy > photon energy 522 if (localEnergyDeposit > cutg || localEnergyDeposit > cute) 523 { 524 G4DynamicParticle* aPhoton; 525 G4AtomicDeexcitation deexcitationManager; 526 deexcitationManager.SetCutForSecondaryPhotons(cutg); 527 deexcitationManager.SetCutForAugerElectrons(cute); 528 deexcitationManager.ActivateAugerElectronProduction(false); 532 529 533 if (Z>5 && (localEnergyDeposit > cutg || localEnergyDeposit > cutE)) 534 { 535 photonVector = deexcitationManager.GenerateParticles(Z,shellId); 536 for (size_t k=0;k<photonVector->size();k++){ 537 aPhoton = (*photonVector)[k]; 538 if (aPhoton) 530 photonVector = deexcitationManager.GenerateParticles(Z,shellId); 531 if(photonVector) 532 { 533 size_t nPhotons = photonVector->size(); 534 for (size_t k=0; k<nPhotons; k++) 539 535 { 540 G4double itsCut = cutg; 541 if (aPhoton->GetDefinition() == G4Electron::Electron()) itsCut = cutE; 542 G4double itsEnergy = aPhoton->GetKineticEnergy(); 543 if (itsEnergy > itsCut && itsEnergy <= localEnergyDeposit) 536 aPhoton = (*photonVector)[k]; 537 if (aPhoton) 544 538 { 545 nPhotons++; 546 localEnergyDeposit -= itsEnergy; 547 energyInFluorescence += itsEnergy; 548 } 549 else 550 { 551 delete aPhoton; 552 (*photonVector)[k]=0; 539 G4double itsEnergy = aPhoton->GetKineticEnergy(); 540 if (itsEnergy <= localEnergyDeposit) 541 { 542 localEnergyDeposit -= itsEnergy; 543 if (aPhoton->GetDefinition() == G4Gamma::Gamma()) 544 energyInFluorescence += itsEnergy;; 545 fvect->push_back(aPhoton); 546 } 547 else 548 { 549 delete aPhoton; 550 (*photonVector)[k]=0; 551 } 553 552 } 554 553 } 555 } 556 } 557 } 554 delete photonVector; 555 } 556 } 557 } 558 558 559 559 //Produce explicitely the electron only if its proposed kinetic energy is 560 560 //above the cut, otherwise add local energy deposition 561 561 G4DynamicParticle* electron = 0; 562 if (eKineticEnergy > cutE) 562 // if (eKineticEnergy > cutE) // VI: may be consistency problem if cut is applied here 563 if (eKineticEnergy > 0.0) 563 564 { 564 565 G4double xEl = sinThetaE * std::cos(phi+pi); … … 576 577 } 577 578 578 //This block below is executed only if there is at least one secondary photon produced by579 //AtomicDeexcitation580 if (photonVector)581 {582 for (size_t ll=0;ll<photonVector->size();ll++)583 {584 if ((*photonVector)[ll])585 {586 G4DynamicParticle* aFluorescencePhoton = (*photonVector)[ll];587 fvect->push_back(aFluorescencePhoton);588 }589 }590 }591 delete photonVector;592 579 if (localEnergyDeposit < 0) 593 580 { -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeGammaConversion.cc
r819 r1055 97 97 << G4endl; 98 98 } 99 100 G4cout << G4endl; 101 G4cout << "*******************************************************************************" << G4endl; 102 G4cout << "*******************************************************************************" << G4endl; 103 G4cout << " The class G4PenelopeGammaConversion is NOT SUPPORTED ANYMORE. " << G4endl; 104 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 105 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 106 G4cout << "*******************************************************************************" << G4endl; 107 G4cout << "*******************************************************************************" << G4endl; 108 G4cout << G4endl; 99 109 } 100 110 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeGammaConversionModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeGammaConversionModel.cc,v 1. 2 2008/12/04 14:09:36pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeGammaConversionModel.cc,v 1.4 2009/05/19 14:57:01 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 32 32 // -------- 33 33 // 06 Oct 2008 L Pandola Migration from process to model 34 // 17 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 35 // - apply internal high-energy limit only in constructor 36 // - do not apply low-energy limit (default is 0) 37 // - do not apply production threshold on level of the model 38 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 39 // Initialise(), since they might be checked later on 34 40 // 35 41 … … 56 62 fSmallEnergy = 1.1*MeV; 57 63 58 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);64 // SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 59 65 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 60 66 // … … 89 95 crossSectionHandler->Clear(); 90 96 delete crossSectionHandler; 97 crossSectionHandler = 0; 91 98 } 92 99 93 //Check energy limits94 if (LowEnergyLimit() < fIntrinsicLowEnergyLimit)95 {96 G4cout << "G4PenelopeGammaConversionModel: low energy limit increased from " <<97 LowEnergyLimit()/eV << " eV to " << fIntrinsicLowEnergyLimit/eV << " eV" << G4endl;98 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);99 }100 if (HighEnergyLimit() > fIntrinsicHighEnergyLimit)101 {102 G4cout << "G4PenelopeGammaConversionModel: high energy limit decreased from " <<103 HighEnergyLimit()/GeV << " GeV to " << fIntrinsicHighEnergyLimit/GeV << " GeV" << G4endl;104 SetHighEnergyLimit(fIntrinsicHighEnergyLimit);105 }106 107 100 //Re-initialize cross section handler 108 101 crossSectionHandler = new G4CrossSectionHandler(); 109 crossSectionHandler->Initialise(0, LowEnergyLimit(),HighEnergyLimit(),400);102 crossSectionHandler->Initialise(0,fIntrinsicLowEnergyLimit,HighEnergyLimit(),400); 110 103 crossSectionHandler->Clear(); 111 104 G4String crossSectionFile = "penelope/pp-cs-pen-"; … … 117 110 G4cout << "Loaded cross section files for PenelopeGammaConversion" << G4endl; 118 111 119 G4cout << "Penelope Gamma Conversion model is initialized " << G4endl 120 << "Energy range: " 121 << LowEnergyLimit() / MeV << " MeV - " 122 << HighEnergyLimit() / GeV << " GeV" 123 << G4endl; 112 if (verboseLevel > 0) { 113 G4cout << "Penelope Gamma Conversion model is initialized " << G4endl 114 << "Energy range: " 115 << LowEnergyLimit() / MeV << " MeV - " 116 << HighEnergyLimit() / GeV << " GeV" 117 << G4endl; 118 } 124 119 125 120 if(isInitialised) return; 126 127 if(pParticleChange) 128 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 129 else 130 fParticleChange = new G4ParticleChangeForGamma(); 121 fParticleChange = GetParticleChangeForGamma(); 131 122 isInitialised = true; 132 123 } … … 151 142 152 143 G4int iZ = (G4int) Z; 153 if (!crossSectionHandler)154 {155 G4cout << "G4PenelopeGammaConversionModel::ComputeCrossSectionPerAtom" << G4endl;156 G4cout << "The cross section handler is not correctly initialized" << G4endl;157 G4Exception();158 }144 // if (!crossSectionHandler) //VI: should not be checked in run time 145 // { 146 // G4cout << "G4PenelopeGammaConversionModel::ComputeCrossSectionPerAtom" << G4endl; 147 // G4cout << "The cross section handler is not correctly initialized" << G4endl; 148 // G4Exception(); 149 // } 159 150 G4double cs = crossSectionHandler->FindValue(iZ,energy); 160 151 … … 167 158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 168 159 169 void G4PenelopeGammaConversionModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect, 170 const G4MaterialCutsCouple* couple, 171 const G4DynamicParticle* aDynamicGamma, 172 G4double, 173 G4double) 160 void 161 G4PenelopeGammaConversionModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect, 162 const G4MaterialCutsCouple* couple, 163 const G4DynamicParticle* aDynamicGamma, 164 G4double, 165 G4double) 174 166 { 175 167 // … … 191 183 G4double photonEnergy = aDynamicGamma->GetKineticEnergy(); 192 184 193 if (photonEnergy <= LowEnergyLimit()) 194 { 195 fParticleChange->ProposeTrackStatus(fStopAndKill); 196 fParticleChange->SetProposedKineticEnergy(0.); 185 // Always kill primary 186 fParticleChange->ProposeTrackStatus(fStopAndKill); 187 fParticleChange->SetProposedKineticEnergy(0.); 188 189 if (photonEnergy <= fIntrinsicLowEnergyLimit) 190 { 197 191 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy); 198 192 return ; 199 }193 } 200 194 201 195 G4ParticleMomentum photonDirection = aDynamicGamma->GetMomentumDirection(); … … 310 304 311 305 //Generate explicitely the electron in the pair, only if it is > threshold 312 const G4ProductionCutsTable* theCoupleTable= 313 G4ProductionCutsTable::GetProductionCutsTable(); 314 size_t indx = couple->GetIndex(); 315 G4double cutE = (*(theCoupleTable->GetEnergyCutsVector(1)))[indx]; 316 //G4double cutP = (*(theCoupleTable->GetEnergyCutsVector(2)))[indx]; 317 318 if (electronKineEnergy > cutE) 306 //VI: applying cut here provides inconsistency 307 308 if (electronKineEnergy > 0.0) 319 309 { 320 310 G4ThreeVector electronDirection ( dirX_el, dirY_el, dirZ_el); … … 333 323 //Generate the positron. Real particle in any case, because it will annihilate. If below 334 324 //threshold, produce it at rest 335 if (positronKineEnergy < cutE) 325 // VI: here there was a bug - positron and electron cuts are different 326 if (positronKineEnergy < 0.0) 336 327 { 337 328 localEnergyDeposit += positronKineEnergy; … … 344 335 fvect->push_back(positron); 345 336 346 //Update the status of the primary gamma (kill it) 347 fParticleChange->SetProposedKineticEnergy(0.); 337 //Add rest of energy to the local energy deposit 348 338 fParticleChange->ProposeLocalEnergyDeposit(localEnergyDeposit); 349 fParticleChange->ProposeTrackStatus(fStopAndKill);350 351 339 352 if (verboseLevel > 1)340 if (verboseLevel > 1) 353 341 { 354 342 G4cout << "-----------------------------------------------------------" << G4endl; … … 357 345 G4cout << "-----------------------------------------------------------" << G4endl; 358 346 if (electronKineEnergy) 359 G4cout << "Electron (explicitely produced) " << electronKineEnergy/keV << " keV" << G4endl; 347 G4cout << "Electron (explicitely produced) " << electronKineEnergy/keV << " keV" 348 << G4endl; 360 349 if (positronKineEnergy) 361 350 G4cout << "Positron (not at rest) " << positronKineEnergy/keV << " keV" << G4endl; … … 373 362 localEnergyDeposit+2.0*electron_mass_c2-photonEnergy); 374 363 if (energyDiff > 0.05*keV) 375 G4cout << "Warning from G4PenelopeGammaConversion: problem with energy conservation: " << 376 (electronKineEnergy+positronKineEnergy+ 377 localEnergyDeposit+2.0*electron_mass_c2)/keV << " keV (final) vs. " << 378 photonEnergy/keV << " keV (initial)" << G4endl; 379 } 380 364 G4cout << "Warning from G4PenelopeGammaConversion: problem with energy conservation: " 365 << (electronKineEnergy+positronKineEnergy+ 366 localEnergyDeposit+2.0*electron_mass_c2)/keV 367 << " keV (final) vs. " << photonEnergy/keV << " keV (initial)" << G4endl; 368 } 381 369 } 382 370 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisation.cc,v 1. 19 2006/06/29 19:40:49 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeIonisation.cc,v 1.20 2009/05/02 09:59:16 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------- … … 93 93 ReadData(); //Read data from file 94 94 95 G4cout << G4endl; 96 G4cout << "*******************************************************************************" << G4endl; 97 G4cout << "*******************************************************************************" << G4endl; 98 G4cout << " The class G4PenelopeIonisation is NOT SUPPORTED ANYMORE. " << G4endl; 99 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 100 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 101 G4cout << "*******************************************************************************" << G4endl; 102 G4cout << "*******************************************************************************" << G4endl; 103 G4cout << G4endl; 104 95 105 } 96 106 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisationModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisationModel.cc,v 1. 2 2008/12/05 09:15:43pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeIonisationModel.cc,v 1.5 2009/05/19 14:57:01 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 32 32 // -------- 33 33 // 26 Nov 2008 L Pandola Migration from process to model 34 // 17 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 35 // - apply internal high-energy limit only in constructor 36 // - do not apply low-energy limit (default is 0) 37 // - added MinEnergyCut method 38 // - do not change track status 39 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 40 // Initialise(), since they might be checked later on 34 41 // 35 42 … … 48 55 #include "G4CrossSectionHandler.hh" 49 56 #include "G4AtomicDeexcitation.hh" 50 #include "G4ProcessManager.hh"51 57 #include "G4VEMDataSet.hh" 52 58 … … 68 74 fIntrinsicLowEnergyLimit = 100.0*eV; 69 75 fIntrinsicHighEnergyLimit = 100.0*GeV; 70 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);76 // SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 71 77 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 72 78 // … … 136 142 G4cout << "Calling G4PenelopeIonisationModel::Initialise()" << G4endl; 137 143 138 InitialiseElementSelectors(particle,cuts);139 140 144 //Delete and re-initialize the cross section handler 141 145 if (crossSectionHandler) … … 143 147 crossSectionHandler->Clear(); 144 148 delete crossSectionHandler; 149 crossSectionHandler = 0; 145 150 } 146 151 … … 148 153 { 149 154 for (size_t i=0; i<theXSTable->size(); i++) 150 delete (*theXSTable)[i]; 155 { 156 delete (*theXSTable)[i]; 157 (*theXSTable)[i] = 0; 158 } 151 159 delete theXSTable; 160 theXSTable = 0; 152 161 } 153 154 155 if (LowEnergyLimit() < fIntrinsicLowEnergyLimit)156 {157 G4cout << "G4PenelopeIonisationModel: low energy limit increased from " <<158 LowEnergyLimit()/eV << " eV to " << fIntrinsicLowEnergyLimit/eV << " eV" << G4endl;159 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);160 }161 if (HighEnergyLimit() > fIntrinsicHighEnergyLimit)162 {163 G4cout << "G4PenelopeIonisationModel: high energy limit decreased from " <<164 HighEnergyLimit()/GeV << " GeV to " << fIntrinsicHighEnergyLimit/GeV << " GeV" << G4endl;165 SetHighEnergyLimit(fIntrinsicHighEnergyLimit);166 }167 162 168 163 crossSectionHandler = new G4CrossSectionHandler(); … … 177 172 //This is used to retrieve cross section values later on 178 173 crossSectionHandler->BuildMeanFreePathForMaterials(); 179 180 if (verboseLevel > 2) 174 175 InitialiseElementSelectors(particle,cuts); 176 177 if (verboseLevel > 2) 181 178 G4cout << "Loaded cross section files for PenelopeIonisationModel" << G4endl; 182 179 183 184 G4cout << "Penelope Ionisation model is initialized " << G4endl 185 << "Energy range: " 186 << LowEnergyLimit() / keV << " keV - " 187 << HighEnergyLimit() / GeV << " GeV" 188 << G4endl; 180 if (verboseLevel > 2) { 181 G4cout << "Penelope Ionisation model is initialized " << G4endl 182 << "Energy range: " 183 << LowEnergyLimit() / keV << " keV - " 184 << HighEnergyLimit() / GeV << " GeV" 185 << G4endl; 186 } 189 187 190 188 if(isInitialised) return; 191 192 if(pParticleChange) 193 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 194 else 195 fParticleChange = new G4ParticleChangeForLoss(); 189 fParticleChange = GetParticleChangeForLoss(); 196 190 isInitialised = true; 197 191 } … … 227 221 SetupForMaterial(theParticle, material, energy); 228 222 223 // VI - should be check at initialisation not in run time 224 /* 229 225 if (!crossSectionHandler) 230 226 { … … 233 229 G4Exception(); 234 230 } 235 231 */ 236 232 if (!theXSTable) 237 233 { … … 244 240 theXSTable = BuildCrossSectionTable(theParticle); 245 241 } 246 242 247 243 G4double totalCross = 0.0; 248 244 G4double cross = 0.0; … … 356 352 const G4MaterialCutsCouple* couple, 357 353 const G4DynamicParticle* aDynamicParticle, 358 G4double, 359 G4double) 354 G4double cutE, G4double) 360 355 { 361 356 // Penelope model to sample the final state following an hard inelastic interaction. … … 397 392 const G4ParticleDefinition* theParticle = aDynamicParticle->GetDefinition(); 398 393 399 if (kineticEnergy0 <= LowEnergyLimit())394 if (kineticEnergy0 <= fIntrinsicLowEnergyLimit) 400 395 { 401 396 fParticleChange->SetProposedKineticEnergy(0.); 402 397 fParticleChange->ProposeLocalEnergyDeposit(kineticEnergy0); 403 //Check if there are AtRest processes404 if (theParticle->GetProcessManager()->GetAtRestProcessVector()->size())405 //In this case there is at least one AtRest process406 fParticleChange->ProposeTrackStatus(fStopButAlive);407 else408 fParticleChange->ProposeTrackStatus(fStopAndKill);409 398 return ; 410 399 } … … 430 419 G4int iZ = SampleRandomAtom(couple,kineticEnergy0); 431 420 432 G4double cutForLowEnergySecondaryParticles = 250.0*eV;433 421 const G4ProductionCutsTable* theCoupleTable= 434 422 G4ProductionCutsTable::GetProductionCutsTable(); 435 423 size_t indx = couple->GetIndex(); 436 G4double cutE = (*(theCoupleTable->GetEnergyCutsVector(1)))[indx];437 424 G4double cutG = (*(theCoupleTable->GetEnergyCutsVector(0)))[indx]; 438 439 //Production cut for delta-rays (electrons)440 cutE = std::max(cutForLowEnergySecondaryParticles,cutE);441 //Production cut for gamma (fluorescence)442 cutG = std::max(cutForLowEnergySecondaryParticles,cutG);443 425 444 426 if (verboseLevel > 2) … … 474 456 else 475 457 { 476 fParticleChange->ProposeMomentumDirection(electronDirection1); 477 fParticleChange->SetProposedKineticEnergy(0.*eV); 478 if (theParticle->GetProcessManager()->GetAtRestProcessVector()->size()) 479 //In this case there is at least one AtRest process 480 fParticleChange->ProposeTrackStatus(fStopButAlive); 481 else 482 fParticleChange->ProposeTrackStatus(fStopAndKill); 458 fParticleChange->SetProposedKineticEnergy(0.); 483 459 } 484 460 … … 517 493 //Penelope subtracted the fluorescence, but one has to match the databases 518 494 eKineticEnergy = energySecondary+ioniEnergy-bindingEnergy; 519 520 //VERIFICA QUI LA STORIA DEL LOCAL ENERGY DEPOSIT! 521 495 522 496 G4double localEnergyDeposit = ionEnergy; 523 497 G4double energyInFluorescence = 0.0*eV; 524 498 525 std::vector<G4DynamicParticle*> *photonVector = 0; 526 if (fUseAtomicDeexcitation) 527 { 528 if (iZ>5 && (ionEnergy > cutG || ionEnergy > cutE)) 499 if(DeexcitationFlag() && iZ > 5) 500 { 501 if (ionEnergy > cutG || ionEnergy > cutE) 529 502 { 530 photonVector = deexcitationManager.GenerateParticles(iZ,shellId); 531 //Check for single photons if they are above threshold 532 for (size_t k=0;k<photonVector->size();k++) 503 deexcitationManager.SetCutForSecondaryPhotons(cutG); 504 deexcitationManager.SetCutForAugerElectrons(cutE); 505 std::vector<G4DynamicParticle*> *photonVector = 506 deexcitationManager.GenerateParticles(iZ,shellId); 507 //Check for secondaries 508 if(photonVector) 533 509 { 534 G4DynamicParticle* aPhoton = (*photonVector)[k]; 535 if (aPhoton) 510 for (size_t k=0;k<photonVector->size();k++) 536 511 { 537 G4double itsCut = cutG; 538 if (aPhoton->GetDefinition() == G4Electron::Electron()) itsCut = cutE; 539 G4double itsEnergy = aPhoton->GetKineticEnergy(); 540 if (itsEnergy > itsCut && itsEnergy <= ionEnergy) 512 G4DynamicParticle* aPhoton = (*photonVector)[k]; 513 if (aPhoton) 541 514 { 542 localEnergyDeposit -= itsEnergy; 543 energyInFluorescence += itsEnergy; 544 } 545 else 546 { 547 delete aPhoton; 548 (*photonVector)[k] = 0; 515 G4double itsEnergy = aPhoton->GetKineticEnergy(); 516 if (itsEnergy <= localEnergyDeposit) 517 { 518 if(aPhoton->GetDefinition() == G4Gamma::Gamma()) 519 energyInFluorescence += itsEnergy; 520 localEnergyDeposit -= itsEnergy; 521 fvect->push_back(aPhoton); 522 } 523 else 524 { 525 delete aPhoton; 526 (*photonVector)[k] = 0; 527 } 549 528 } 550 529 } 530 delete photonVector; 551 531 } 552 532 } … … 567 547 fvect->push_back(deltaElectron); 568 548 569 //Generate fluorescence, if it is the case570 //This block is executed only if there is at least one secondary photon produced by571 //G4AtomicDeexcitation572 if (photonVector)573 {574 for (size_t ll=0;ll<photonVector->size();ll++)575 if ((*photonVector)[ll])576 {577 G4DynamicParticle* aFluorescencePhoton = (*photonVector)[ll];578 fvect->push_back(aFluorescencePhoton);579 }580 }581 delete photonVector;582 583 549 if (localEnergyDeposit < 0) 584 550 { … … 753 719 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 754 720 755 void G4PenelopeIonisationModel::CalculateDiscreteForElectrons(G4double kinEnergy,G4double cutoffEnergy, 756 G4int Z,G4double electronVolumeDensity) 721 void 722 G4PenelopeIonisationModel::CalculateDiscreteForElectrons(G4double kinEnergy, 723 G4double cutoffEnergy, 724 G4int Z, 725 G4double electronVolumeDensity) 757 726 { 758 727 if (verboseLevel > 2) … … 1030 999 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1031 1000 1032 void G4PenelopeIonisationModel::CalculateDiscreteForPositrons(G4double kinEnergy,G4double cutoffEnergy, 1033 G4int Z,G4double electronVolumeDensity) 1001 void 1002 G4PenelopeIonisationModel::CalculateDiscreteForPositrons(G4double kinEnergy, 1003 G4double cutoffEnergy, 1004 G4int Z, 1005 G4double electronVolumeDensity) 1034 1006 { 1035 1007 kineticEnergy1=kinEnergy; … … 1287 1259 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1288 1260 1289 G4double G4PenelopeIonisationModel::CalculateCrossSectionsRatio(G4double kinEnergy, 1290 G4double cutoffEnergy, 1291 G4int Z, G4double electronVolumeDensity, 1292 const G4ParticleDefinition* theParticle) 1261 G4double 1262 G4PenelopeIonisationModel::CalculateCrossSectionsRatio(G4double kinEnergy, 1263 G4double cutoffEnergy, 1264 G4int Z, G4double electronVolumeDensity, 1265 const G4ParticleDefinition* theParticle) 1293 1266 { 1294 1267 //Constants … … 1320 1293 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1321 1294 1322 std::pair<G4double,G4double> G4PenelopeIonisationModel::CrossSectionsRatioForElectrons(G4double kineticEnergy, 1323 G4double resEnergy, 1324 G4double densityCorrection, 1325 G4double cutoffEnergy) 1295 std::pair<G4double,G4double> 1296 G4PenelopeIonisationModel::CrossSectionsRatioForElectrons(G4double kineticEnergy, 1297 G4double resEnergy, 1298 G4double densityCorrection, 1299 G4double cutoffEnergy) 1326 1300 { 1327 1301 std::pair<G4double,G4double> theResult(0.,0.); … … 1410 1384 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1411 1385 1412 std::pair<G4double,G4double> G4PenelopeIonisationModel::CrossSectionsRatioForPositrons(G4double kineticEnergy, 1413 G4double resEnergy, 1414 G4double densityCorrection, 1415 G4double cutoffEnergy) 1386 std::pair<G4double,G4double> 1387 G4PenelopeIonisationModel::CrossSectionsRatioForPositrons(G4double kineticEnergy, 1388 G4double resEnergy, 1389 G4double densityCorrection, 1390 G4double cutoffEnergy) 1416 1391 { 1417 1392 … … 1640 1615 #include "G4EMDataSet.hh" 1641 1616 1642 std::vector<G4VEMDataSet*>* G4PenelopeIonisationModel::BuildCrossSectionTable(const1643 G4ParticleDefinition* theParticle)1617 std::vector<G4VEMDataSet*>* 1618 G4PenelopeIonisationModel::BuildCrossSectionTable(const G4ParticleDefinition* theParticle) 1644 1619 { 1645 1620 std::vector<G4VEMDataSet*>* set = new std::vector<G4VEMDataSet*>; -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectric.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4PenelopePhotoElectric.cc,v 1.1 2 2006/06/29 19:40:51 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4PenelopePhotoElectric.cc,v 1.14 2009/05/02 09:59:17 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Author: L. Pandola … … 37 37 // 31 May 2005 L. Pandola Added Sauter formula for the sampling of 38 38 // the electron direction 39 // 08 Jan 2009 L. Pandola Check shell index to avoid mismatch between 40 // the Penelope cross section database and the 41 // G4AtomicTransitionManager database. It suppresses 42 // a warning from G4AtomicTransitionManager only. 43 // Results are unchanged. 39 44 // -------------------------------------------------------------- 40 45 … … 89 94 << G4endl; 90 95 } 96 97 G4cout << G4endl; 98 G4cout << "*******************************************************************************" << G4endl; 99 G4cout << "*******************************************************************************" << G4endl; 100 G4cout << " The class G4PenelopePhotoElectric is NOT SUPPORTED ANYMORE. " << G4endl; 101 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 102 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 103 G4cout << "*******************************************************************************" << G4endl; 104 G4cout << "*******************************************************************************" << G4endl; 105 G4cout << G4endl; 106 91 107 } 92 108 … … 146 162 // Retrieve the corresponding identifier and binding energy of the selected shell 147 163 const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance(); 164 165 //The number of shell cross section possibly reported in the Penelope database 166 //might be different from the number of shells in the G4AtomicTransitionManager 167 //(namely, Penelope may contain more shell, especially for very light elements). 168 //In order to avoid a warning message from the G4AtomicTransitionManager, I 169 //add this protection. Results are anyway changed, because when G4AtomicTransitionManager 170 //has a shellID>maxID, it sets the shellID to the last valid shell. 171 size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z); 172 if (shellIndex >= numberOfShells) 173 shellIndex = numberOfShells-1; 174 148 175 const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex); 149 176 G4double bindingEnergy = shell->BindingEnergy(); -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectricModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopePhotoElectricModel.cc,v 1. 2 2008/12/04 14:09:36pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopePhotoElectricModel.cc,v 1.6 2009/05/19 14:57:01 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 31 31 // History: 32 32 // -------- 33 // 08 Oct 2008 L Pandola Migration from process to model 33 // 08 Oct 2008 L Pandola Migration from process to model 34 // 08 Jan 2009 L Pandola Check shell index to avoid mismatch between 35 // the Penelope cross section database and the 36 // G4AtomicTransitionManager database. It suppresses 37 // a warning from G4AtomicTransitionManager only. 38 // Results are unchanged. 39 // 25 Mar 2009 L Pandola Small fix to avoid wrong energy-violation warnings 40 // 17 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 41 // - apply internal high-energy limit only in constructor 42 // - do not apply low-energy limit (default is 0) 43 // - do not apply production threshold on secondaries 44 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 45 // Initialise(), since they might be checked later on 34 46 // 35 47 … … 58 70 fIntrinsicLowEnergyLimit = 100.0*eV; 59 71 fIntrinsicHighEnergyLimit = 100.0*GeV; 60 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);72 // SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 61 73 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 62 74 // … … 90 102 crossSectionHandler->Clear(); 91 103 delete crossSectionHandler; 104 crossSectionHandler = 0; 92 105 } 93 106 if (shellCrossSectionHandler) … … 95 108 shellCrossSectionHandler->Clear(); 96 109 delete shellCrossSectionHandler; 97 } 98 99 //Check energy limits 100 if (LowEnergyLimit() < fIntrinsicLowEnergyLimit) 101 { 102 G4cout << "G4PenelopePhotoElectricModel: low energy limit increased from " << 103 LowEnergyLimit()/eV << " eV to " << fIntrinsicLowEnergyLimit/eV << " eV" << 104 G4endl; 105 SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 106 } 107 if (HighEnergyLimit() > fIntrinsicHighEnergyLimit) 108 { 109 G4cout << "G4PenelopePhotoElectricModel: high energy limit decreased from " << 110 HighEnergyLimit()/GeV << " GeV to " << fIntrinsicHighEnergyLimit/GeV << " GeV" 111 << G4endl; 112 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 113 } 114 110 shellCrossSectionHandler =0; 111 } 115 112 116 113 //Re-initialize cross section handlers … … 129 126 G4cout << "Loaded cross section files for PenelopePhotoElectric" << G4endl; 130 127 131 G4cout << "Penelope Photo-Electric model is initialized " << G4endl 132 << "Energy range: " 133 << LowEnergyLimit() / MeV << " MeV - " 134 << HighEnergyLimit() / GeV << " GeV" 135 << G4endl; 128 if (verboseLevel > 0) { 129 G4cout << "Penelope Photo-Electric model is initialized " << G4endl 130 << "Energy range: " 131 << LowEnergyLimit() / MeV << " MeV - " 132 << HighEnergyLimit() / GeV << " GeV" 133 << G4endl; 134 } 136 135 137 136 if(isInitialised) return; 138 139 if(pParticleChange) 140 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 141 else 142 fParticleChange = new G4ParticleChangeForGamma(); 137 fParticleChange = GetParticleChangeForGamma(); 143 138 isInitialised = true; 144 139 } … … 162 157 163 158 G4int iZ = (G4int) Z; 164 if (!crossSectionHandler)165 {166 G4cout << "G4PenelopePhotoElectricModel::ComputeCrossSectionPerAtom" << G4endl;167 G4cout << "The cross section handler is not correctly initialized" << G4endl;168 G4Exception();169 }159 // if (!crossSectionHandler) // VI: should not be 160 // { 161 // G4cout << "G4PenelopePhotoElectricModel::ComputeCrossSectionPerAtom" << G4endl; 162 // G4cout << "The cross section handler is not correctly initialized" << G4endl; 163 // G4Exception(); 164 // } 170 165 G4double cs = crossSectionHandler->FindValue(iZ,energy); 171 166 … … 203 198 G4double photonEnergy = aDynamicGamma->GetKineticEnergy(); 204 199 205 if (photonEnergy <= LowEnergyLimit()) 206 { 207 fParticleChange->ProposeTrackStatus(fStopAndKill); 208 fParticleChange->SetProposedKineticEnergy(0.); 200 // always kill primary 201 fParticleChange->ProposeTrackStatus(fStopAndKill); 202 fParticleChange->SetProposedKineticEnergy(0.); 203 204 if (photonEnergy <= fIntrinsicLowEnergyLimit) 205 { 209 206 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy); 210 207 return ; 211 }208 } 212 209 213 210 G4ParticleMomentum photonDirection = aDynamicGamma->GetMomentumDirection(); … … 217 214 G4cout << "Going to select element in " << couple->GetMaterial()->GetName() << G4endl; 218 215 //use crossSectionHandler instead of G4EmElementSelector because in this case 219 //the dimension of the table is equal to the dimension of the database (less interpolation errors) 216 //the dimension of the table is equal to the dimension of the database 217 //(less interpolation errors) 220 218 G4int Z = crossSectionHandler->SelectRandomAtom(couple,photonEnergy); 221 219 if (verboseLevel > 2) … … 227 225 // Retrieve the corresponding identifier and binding energy of the selected shell 228 226 const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance(); 227 228 //The number of shell cross section possibly reported in the Penelope database 229 //might be different from the number of shells in the G4AtomicTransitionManager 230 //(namely, Penelope may contain more shell, especially for very light elements). 231 //In order to avoid a warning message from the G4AtomicTransitionManager, I 232 //add this protection. Results are anyway changed, because when G4AtomicTransitionManager 233 //has a shellID>maxID, it sets the shellID to the last valid shell. 234 size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z); 235 if (shellIndex >= numberOfShells) 236 shellIndex = numberOfShells-1; 237 229 238 const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex); 230 239 G4double bindingEnergy = shell->BindingEnergy(); … … 236 245 G4double eKineticEnergy = photonEnergy - bindingEnergy; 237 246 238 G4double cutForLowEnergySecondaryParticles = 250.0*eV;239 const G4ProductionCutsTable* theCoupleTable=240 G4ProductionCutsTable::GetProductionCutsTable();241 size_t indx = couple->GetIndex();242 G4double cutE = (*(theCoupleTable->GetEnergyCutsVector(1)))[indx];243 cutE = std::max(cutForLowEnergySecondaryParticles,cutE);244 245 247 // There may be cases where the binding energy of the selected shell is > photon energy 246 248 // In such cases do not generate secondaries … … 248 250 { 249 251 //Now check if the electron is above cuts: if so, it is created explicitely 250 if (eKineticEnergy > cutE) 251 { 252 // The electron is created 253 // Direction sampled from the Sauter distribution 254 G4double cosTheta = SampleElectronDirection(eKineticEnergy); 255 G4double sinTheta = std::sqrt(1-cosTheta*cosTheta); 256 G4double phi = twopi * G4UniformRand() ; 257 G4double dirx = sinTheta * std::cos(phi); 258 G4double diry = sinTheta * std::sin(phi); 259 G4double dirz = cosTheta ; 260 G4ThreeVector electronDirection(dirx,diry,dirz); //electron direction 261 electronDirection.rotateUz(photonDirection); 262 G4DynamicParticle* electron = new G4DynamicParticle (G4Electron::Electron(), 263 electronDirection, 264 eKineticEnergy); 265 fvect->push_back(electron); 266 } 267 else 268 localEnergyDeposit += eKineticEnergy; 269 } 252 //VI: checking cut here provides inconsistency in testing 253 // if (eKineticEnergy > cutE) 254 // The electron is created 255 // Direction sampled from the Sauter distribution 256 G4double cosTheta = SampleElectronDirection(eKineticEnergy); 257 G4double sinTheta = std::sqrt(1-cosTheta*cosTheta); 258 G4double phi = twopi * G4UniformRand() ; 259 G4double dirx = sinTheta * std::cos(phi); 260 G4double diry = sinTheta * std::sin(phi); 261 G4double dirz = cosTheta ; 262 G4ThreeVector electronDirection(dirx,diry,dirz); //electron direction 263 electronDirection.rotateUz(photonDirection); 264 G4DynamicParticle* electron = new G4DynamicParticle (G4Electron::Electron(), 265 electronDirection, 266 eKineticEnergy); 267 fvect->push_back(electron); 268 } 269 // else 270 // { 271 // localEnergyDeposit += eKineticEnergy; 272 // eKineticEnergy = 0; 273 // } 274 // } 270 275 else 276 { 271 277 bindingEnergy = photonEnergy; 272 273 278 } 274 279 G4double energyInFluorescence = 0; //testing purposes 275 280 276 281 //Now, take care of fluorescence, if required 277 if (fUseAtomicDeexcitation) 278 { 282 if(DeexcitationFlag() && Z > 5) 283 { 284 const G4ProductionCutsTable* theCoupleTable= 285 G4ProductionCutsTable::GetProductionCutsTable(); 286 size_t indx = couple->GetIndex(); 279 287 G4double cutG = (*(theCoupleTable->GetEnergyCutsVector(0)))[indx]; 280 cutG = std::min(cutForLowEnergySecondaryParticles,cutG);288 G4double cutE = (*(theCoupleTable->GetEnergyCutsVector(1)))[indx]; 281 289 282 std::vector<G4DynamicParticle*>* photonVector = 0;283 284 290 // Protection to avoid generating photons in the unphysical case of 285 291 // shell binding energy > photon energy 286 if ( Z > 5 && (bindingEnergy > cutG || bindingEnergy > cutE))292 if (bindingEnergy > cutG || bindingEnergy > cutE) 287 293 { 288 photonVector = deexcitationManager.GenerateParticles(Z,shellId); 289 //Check for single photons (if they are above threshold) 290 for (size_t k=0; k< photonVector->size(); k++) 294 deexcitationManager.SetCutForSecondaryPhotons(cutG); 295 deexcitationManager.SetCutForAugerElectrons(cutE); 296 std::vector<G4DynamicParticle*>* photonVector = 297 deexcitationManager.GenerateParticles(Z,shellId); 298 //Check for secondaries 299 if(photonVector) 291 300 { 292 G4DynamicParticle* aPhoton = (*photonVector)[k]; 293 if (aPhoton) 301 for (size_t k=0; k< photonVector->size(); k++) 294 302 { 295 G4double itsCut = cutG; 296 if(aPhoton->GetDefinition() == G4Electron::Electron()) itsCut = cutE; 297 G4double itsEnergy = aPhoton->GetKineticEnergy(); 298 299 if (itsEnergy > itsCut && itsEnergy <= bindingEnergy) 303 G4DynamicParticle* aPhoton = (*photonVector)[k]; 304 if (aPhoton) 300 305 { 301 // Local energy deposit is given as the sum of the 302 // energies of incident photons minus the energies 303 // of the outcoming fluorescence photons 304 bindingEnergy -= itsEnergy; 305 306 } 307 else 308 { 309 (*photonVector)[k] = 0; 306 G4double itsEnergy = aPhoton->GetKineticEnergy(); 307 if (itsEnergy <= bindingEnergy) 308 { 309 if(aPhoton->GetDefinition() == G4Gamma::Gamma()) 310 energyInFluorescence += itsEnergy; 311 bindingEnergy -= itsEnergy; 312 fvect->push_back(aPhoton); 313 } 314 else 315 { 316 delete aPhoton; 317 (*photonVector)[k] = 0; 318 } 310 319 } 311 320 } 321 delete photonVector; 312 322 } 313 }314 //Register valid secondaries315 if (photonVector)316 {317 for ( size_t ll = 0; ll <photonVector->size(); ll++)318 {319 G4DynamicParticle* aPhoton = (*photonVector)[ll];320 if (aPhoton)321 {322 energyInFluorescence += aPhoton->GetKineticEnergy();323 fvect->push_back(aPhoton);324 }325 }326 delete photonVector;327 323 } 328 324 } … … 330 326 localEnergyDeposit += bindingEnergy; 331 327 332 333 328 if (localEnergyDeposit < 0) 334 329 { … … 339 334 } 340 335 341 //Update the status of the primary gamma (kill it)342 fParticleChange->SetProposedKineticEnergy(0.);343 336 fParticleChange->ProposeLocalEnergyDeposit(localEnergyDeposit); 344 fParticleChange->ProposeTrackStatus(fStopAndKill);345 337 346 338 if (verboseLevel > 1) … … 360 352 if (verboseLevel > 0) 361 353 { 362 G4double energyDiff = std::fabs(eKineticEnergy+energyInFluorescence+localEnergyDeposit-photonEnergy); 354 G4double energyDiff = 355 std::fabs(eKineticEnergy+energyInFluorescence+localEnergyDeposit-photonEnergy); 363 356 if (energyDiff > 0.05*keV) 364 357 G4cout << "Warning from G4PenelopePhotoElectric: problem with energy conservation: " << 365 (eKineticEnergy+energyInFluorescence+localEnergyDeposit)/keV << " keV (final) vs. " << 358 (eKineticEnergy+energyInFluorescence+localEnergyDeposit)/keV 359 << " keV (final) vs. " << 366 360 photonEnergy/keV << " keV (initial)" << G4endl; 367 361 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeRayleigh.cc
r1007 r1055 26 26 // -------------------------------------------------------------------- 27 27 // 28 // $Id: G4PenelopeRayleigh.cc,v 1.1 5 2007/09/03 09:43:14 pandolaExp $29 // GEANT4 tag $Name: geant4-09-0 2$28 // $Id: G4PenelopeRayleigh.cc,v 1.17 2009/05/02 09:59:17 sincerti Exp $ 29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 30 30 // 31 31 // Author: L. Pandola (luciano.pandola@cern.ch) … … 41 41 // 03 Sep 2007 L.Pandola Bug fix for the filling of physics table for 42 42 // compounds defined by the mass fraction (bug #965) 43 // 02 Apr 2009 L.Pandola Bux fixed in the calculation of mfp for compound 44 // materials defined as fraction of mass 45 // (reported by Zhang Qiwei) 43 46 // -------------------------------------------------------------------- 44 47 … … 93 96 << G4endl; 94 97 } 98 99 G4cout << G4endl; 100 G4cout << "*******************************************************************************" << G4endl; 101 G4cout << "*******************************************************************************" << G4endl; 102 G4cout << " The class G4PenelopeRayleigh is NOT SUPPORTED ANYMORE. " << G4endl; 103 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl; 104 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl; 105 G4cout << "*******************************************************************************" << G4endl; 106 G4cout << "*******************************************************************************" << G4endl; 107 G4cout << G4endl; 95 108 } 96 109 … … 162 175 const G4double* vector_of_atoms = material->GetVecNbOfAtomsPerVolume(); 163 176 const G4int* stechiometric = material->GetAtomsVector(); 164 G4double density = vector_of_atoms[iright]; //non-bound molecules (default) 177 //cs is the cross section _per atom_ in the case of compounds, while it is 178 //_per molecule_ in the case of molecules 179 G4double density = material->GetTotNbOfAtomsPerVolume(); //non-bound molecules (default) 165 180 if (stechiometric) 166 181 { -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeRayleighModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeRayleighModel.cc,v 1. 2 2008/12/04 14:09:36pandola Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PenelopeRayleighModel.cc,v 1.4 2009/05/19 14:57:01 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: Luciano Pandola … … 32 32 // -------- 33 33 // 14 Oct 2008 L Pandola Migration from process to model 34 // 17 Apr 2009 V Ivanchenko Cleanup initialisation and generation of secondaries: 35 // - apply internal high-energy limit only in constructor 36 // - do not apply low-energy limit (default is 0) 37 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 38 // PrepareConstants(), since they might be checked later on 34 39 // 35 40 … … 56 61 fIntrinsicLowEnergyLimit = 100.0*eV; 57 62 fIntrinsicHighEnergyLimit = 100.0*GeV; 58 SetLowEnergyLimit(fIntrinsicLowEnergyLimit);63 // SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 59 64 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 60 65 // … … 90 95 G4cout << "Calling G4PenelopeRayleighModel::Initialise()" << G4endl; 91 96 92 if (LowEnergyLimit() < fIntrinsicLowEnergyLimit) 93 { 94 G4cout << "G4PenelopeRayleighModel: low energy limit increased from " << 95 LowEnergyLimit()/eV << " eV to " << fIntrinsicLowEnergyLimit/eV << " eV" << G4endl; 96 SetLowEnergyLimit(fIntrinsicLowEnergyLimit); 97 } 98 if (HighEnergyLimit() > fIntrinsicHighEnergyLimit) 99 { 100 G4cout << "G4PenelopeRayleighModel: high energy limit decreased from " << 101 HighEnergyLimit()/GeV << " GeV to " << fIntrinsicHighEnergyLimit/GeV << " GeV" << G4endl; 102 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 103 } 104 105 G4cout << "Penelope Rayleigh model is initialized " << G4endl 106 << "Energy range: " 107 << LowEnergyLimit() / keV << " keV - " 108 << HighEnergyLimit() / GeV << " GeV" 109 << G4endl; 97 98 if (verboseLevel > 0) { 99 G4cout << "Penelope Rayleigh model is initialized " << G4endl 100 << "Energy range: " 101 << LowEnergyLimit() / keV << " keV - " 102 << HighEnergyLimit() / GeV << " GeV" 103 << G4endl; 104 } 110 105 111 106 if(isInitialised) return; 112 113 if(pParticleChange) 114 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 115 else 116 fParticleChange = new G4ParticleChangeForGamma(); 107 fParticleChange = GetParticleChangeForGamma(); 117 108 isInitialised = true; 118 109 } … … 120 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 121 112 122 G4double G4PenelopeRayleighModel::CrossSectionPerVolume(const G4Material* material, 123 const G4ParticleDefinition* p, 124 G4double ekin, 125 G4double, 126 G4double) 113 G4double 114 G4PenelopeRayleighModel::CrossSectionPerVolume(const G4Material* material, 115 const G4ParticleDefinition* p, 116 G4double ekin, 117 G4double, 118 G4double) 127 119 { 128 120 // Penelope model to calculate the Rayleigh scattering inverse mean … … 233 225 234 226 void G4PenelopeRayleighModel::SampleSecondaries(std::vector<G4DynamicParticle*>* , 235 const G4MaterialCutsCouple* couple,236 const G4DynamicParticle* aDynamicGamma,237 G4double,238 G4double)227 const G4MaterialCutsCouple* couple, 228 const G4DynamicParticle* aDynamicGamma, 229 G4double, 230 G4double) 239 231 { 240 232 // Penelope model to sample the Rayleigh scattering final state. … … 249 241 if (verboseLevel > 3) 250 242 G4cout << "Calling SamplingSecondaries() of G4PenelopeRayleighModel" << G4endl; 251 243 252 244 G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy(); 253 245 254 if (photonEnergy0 <= LowEnergyLimit())255 {246 if (photonEnergy0 <= fIntrinsicLowEnergyLimit) 247 { 256 248 fParticleChange->ProposeTrackStatus(fStopAndKill); 257 249 fParticleChange->SetProposedKineticEnergy(0.); 258 250 fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0); 259 251 return ; 260 }252 } 261 253 262 254 G4ParticleMomentum photonDirection0 = aDynamicGamma->GetMomentumDirection(); … … 534 526 Xhigh=1e06; 535 527 if (samplingFunction_x) 536 delete samplingFunction_x; 528 { 529 delete samplingFunction_x; 530 samplingFunction_x = 0; 531 } 537 532 if (samplingFunction_xNoLog) 538 delete samplingFunction_xNoLog; 539 533 { 534 delete samplingFunction_xNoLog; 535 samplingFunction_xNoLog = 0; 536 } 537 540 538 samplingFunction_x = new G4DataVector(); 541 539 samplingFunction_xNoLog = new G4DataVector(); -
trunk/source/processes/electromagnetic/lowenergy/src/G4ShellVacancy.cc
r819 r1055 50 50 51 51 { 52 /* 52 53 G4int size = xsis.size(); 53 54 for (G4int k =0; k<size; k++) … … 56 57 xsis[k] = 0; 57 58 } 59 */ 58 60 } 59 61 60 void G4ShellVacancy::AddXsiTable(G4VEMDataSet* set) 61 62 void G4ShellVacancy::AddXsiTable(G4VEMDataSet* p) 62 63 { 63 xsis.push_back( set);64 xsis.push_back(p); 64 65 } 65 66 -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationCrossSectionHandler.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.1 1 2006/06/29 19:42:00 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.12 2009/01/29 08:13:34 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 42 42 // 19 Jul 2002 VI Create composite data set for material 43 43 // 21 Jan 2003 V.Ivanchenko Cut per region 44 // 28 Jan 2009 L.Pandola Added public method to make a easier migration of 45 // G4LowEnergyIonisation to G4LivermoreIonisationModel 44 46 // 45 47 // ------------------------------------------------------------------- … … 98 100 G4int nElements = material->GetNumberOfElements(); 99 101 100 if(verbose > 0) { 101 G4cout << "eIonisation CS for " << m << "th material " 102 << material->GetName() 103 << " eEl= " << nElements << G4endl; 104 } 102 if(verbose > 0) 103 { 104 G4cout << "eIonisation CS for " << m << "th material " 105 << material->GetName() 106 << " eEl= " << nElements << G4endl; 107 } 105 108 106 109 G4double tcut = (*energyCuts)[m]; … … 129 132 value += cross * p * density; 130 133 131 if(verbose>0 && m == 0 && e>=1. && e<=0.) { 134 if(verbose>0 && m == 0 && e>=1. && e<=0.) 135 { 132 136 G4cout << "G4eIonCrossSH: e(MeV)= " << e/MeV 133 137 << " n= " << n … … 139 143 << " Z= " << Z 140 144 << G4endl; 141 }145 } 142 146 143 147 } … … 155 159 } 156 160 157 161 G4double G4eIonisationCrossSectionHandler::GetCrossSectionAboveThresholdForElement(G4double energy, 162 G4double cutEnergy, 163 G4int Z) 164 { 165 G4int nShells = NumberOfComponents(Z); 166 G4double value = 0.; 167 if(energy > cutEnergy) 168 { 169 for (G4int n=0; n<nShells; n++) { 170 G4double cross = FindValue(Z, energy, n); 171 G4double p = theParam->Probability(Z, cutEnergy, energy, energy, n); 172 value += cross * p; 173 } 174 } 175 return value; 176 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationParameters.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4eIonisationParameters.cc,v 1.2 3 2006/06/29 19:42:02 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4eIonisationParameters.cc,v 1.24 2009/03/23 09:13:44 pandola Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 41 41 // chenged to "ion-..." 42 42 // 17.02.04 V.Ivanchenko Increase buffer size 43 // 23.03.09 L.Pandola Updated warning message 43 44 // 44 45 // ------------------------------------------------------------------- … … 199 200 if (! (lsdp->is_open()) ) { 200 201 G4String excep = G4String("G4IonisationParameters - data file: ") 201 + name + G4String(" not found. The version 1.# of G4LEDATA should be used");202 + name + G4String(" not found. Please check and/or update G4LEDATA"); 202 203 G4Exception(excep); 203 204 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationSpectrum.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationSpectrum.cc,v 1.2 5 2006/06/29 19:42:04 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eIonisationSpectrum.cc,v 1.26 2009/03/23 09:13:44 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 46 46 // 30.05.2002 VI Update to 24-parameters data 47 47 // 11.07.2002 VI Fix in integration over spectrum 48 // 23.03.2009 LP Added protection against division by zero (for 49 // faulty database files), Bug Report 1042 48 50 // 49 51 // ------------------------------------------------------------------- … … 125 127 p.push_back((2.0*g - 1.0)/(g*g)); 126 128 127 p[iMax-1] = Function(p[3], p); 129 //Add protection against division by zero: actually in Function() 130 //parameter p[3] appears in the denominator. Bug report 1042 131 if (p[3] > 0) 132 p[iMax-1] = Function(p[3], p); 133 else 134 { 135 G4cout << "WARNING: G4eIonisationSpectrum::Probability " 136 << "parameter p[3] <= 0. G4LEDATA dabatase might be corrupted for Z = " 137 << Z << ". Please check and/or update it " << G4endl; 138 } 128 139 129 140 if(e >= 1. && e <= 0. && Z == 4) p.push_back(0.0); … … 210 221 p.push_back((2.0*g - 1.0)/(g*g)); 211 222 212 p[iMax-1] = Function(p[3], p); 223 224 //Add protection against division by zero: actually in Function() 225 //parameter p[3] appears in the denominator. Bug report 1042 226 if (p[3] > 0) 227 p[iMax-1] = Function(p[3], p); 228 else 229 { 230 G4cout << "WARNING: G4eIonisationSpectrum::AverageEnergy " 231 << "parameter p[3] <= 0. G4LEDATA dabatase might be corrupted for Z = " 232 << Z << ". Please check and/or update it " << G4endl; 233 } 213 234 214 235 G4double val = AverageValue(x1, x2, p); … … 288 309 p.push_back((2.0*g - 1.0)/(g*g)); 289 310 290 p[iMax-1] = Function(p[3], p); 311 312 //Add protection against division by zero: actually in Function() 313 //parameter p[3] appears in the denominator. Bug report 1042 314 if (p[3] > 0) 315 p[iMax-1] = Function(p[3], p); 316 else 317 { 318 G4cout << "WARNING: G4eIonisationSpectrum::SampleSpectrum " 319 << "parameter p[3] <= 0. G4LEDATA dabatase might be corrupted for Z = " 320 << Z << ". Please check and/or update it " << G4endl; 321 } 291 322 292 323 G4double aria1 = 0.0; -
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyLoss.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4hLowEnergyLoss.cc,v 1.2 7 2008/06/20 19:54:03sincerti Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4hLowEnergyLoss.cc,v 1.28 2009/02/20 10:49:54 sincerti Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------- … … 145 145 G4double G4hLowEnergyLoss::HighestKineticEnergy= 100.*GeV; 146 146 G4int G4hLowEnergyLoss::TotBin = 360; 147 G4double G4hLowEnergyLoss::RTable,G4hLowEnergyLoss::LOGRTable; 147 G4double G4hLowEnergyLoss::RTable =1.1; 148 G4double G4hLowEnergyLoss::LOGRTable = 1.1; 148 149 149 150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 772 773 theRangeTable = theRangepbarTable ; 773 774 } 774 775 775 G4double R2 = RTable*RTable ; 776 776 G4double R1 = RTable+1.; … … 1062 1062 { 1063 1063 G4double LowEdgeRange,A,B,C,discr,KineticEnergy ; 1064 G4double Tbin = LowestKineticEnergy/RTable ; 1064 G4double Tbin = 0; 1065 if (RTable !=0.) Tbin = LowestKineticEnergy/RTable ; 1065 1066 G4double rangebin = 0.0 ; 1066 1067 G4int binnumber = -1 ; -
trunk/source/processes/electromagnetic/muons/History
r1007 r1055 1 $Id: History,v 1.12 4 2008/11/13 14:14:07vnivanch Exp $1 $Id: History,v 1.127 2009/04/12 17:19:01 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 12 April 09: V.Ivant (emmuons-V09-02-02) 21 G4MuBetheBlochModel, G4MuBremsstrahlungModel, G4MuPairProductionModel 22 - simplified initialisation 23 24 26 February 09: V.Ivant (emmuons-V09-02-01) 25 G4MuIonisation - fixed initialisation alowing to configure external model 26 of fluctuations 27 28 20 February 09: V.Ivant (emmuons-V09-02-00) 29 - Cleanup: improved comments, move virtual methods from .hh to .cc 19 30 20 31 12 November 08: V.Ivant (emmuons-V09-01-15) -
trunk/source/processes/electromagnetic/muons/include/G4MuBetheBlochModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBetheBlochModel.hh,v 1.1 7 2007/05/22 17:35:58vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuBetheBlochModel.hh,v 1.18 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 76 76 virtual ~G4MuBetheBlochModel(); 77 77 78 v oid Initialise(const G4ParticleDefinition*, const G4DataVector&);78 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 79 79 80 G4double MinEnergyCut(const G4ParticleDefinition*,81 const G4MaterialCutsCouple*);80 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 81 const G4MaterialCutsCouple*); 82 82 83 83 virtual G4double ComputeCrossSectionPerElectron( … … 113 113 protected: 114 114 115 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,116 G4double kinEnergy);115 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 116 G4double kinEnergy); 117 117 118 118 private: 119 119 120 void SetParticle(const G4ParticleDefinition* p);120 inline void SetParticle(const G4ParticleDefinition* p); 121 121 122 122 // hide assignment operator … … 141 141 }; 142 142 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 144 144 145 inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy( 146 const G4ParticleDefinition*, 147 G4double kinEnergy) 145 inline void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p) 148 146 { 149 G4double tau = kinEnergy/mass; 150 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 151 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 152 return tmax; 147 if(!particle) { 148 particle = p; 149 mass = particle->GetPDGMass(); 150 massSquare = mass*mass; 151 ratio = electron_mass_c2/mass; 152 } 153 153 } 154 154 -
trunk/source/processes/electromagnetic/muons/include/G4MuBremsstrahlung.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBremsstrahlung.hh,v 1.3 0 2008/02/29 17:50:05vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuBremsstrahlung.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 86 86 virtual ~G4MuBremsstrahlung(); 87 87 88 G4bool IsApplicable(const G4ParticleDefinition& p);88 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 89 89 90 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,91 const G4Material*,92 G4double cut);90 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 91 const G4Material*, 92 G4double cut); 93 93 94 94 // Print out of the class parameters 95 v oid PrintInfo();95 virtual void PrintInfo(); 96 96 97 97 protected: 98 98 99 v oid InitialiseEnergyLossProcess(const G4ParticleDefinition*,100 const G4ParticleDefinition*);99 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 100 const G4ParticleDefinition*); 101 101 102 102 private: … … 114 114 115 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....117 118 inline119 G4bool G4MuBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)120 {121 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);122 }123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....125 126 inline127 G4double G4MuBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*,128 const G4Material*,129 G4double)130 {131 return lowestKinEnergy;132 }133 134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....135 116 136 117 #endif -
trunk/source/processes/electromagnetic/muons/include/G4MuBremsstrahlungModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBremsstrahlungModel.hh,v 1.2 1 2008/07/22 16:11:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuBremsstrahlungModel.hh,v 1.22 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 78 78 virtual ~G4MuBremsstrahlungModel(); 79 79 80 v oid SetParticle(const G4ParticleDefinition*);80 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 81 81 82 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 83 84 G4double MinEnergyCut(const G4ParticleDefinition*, 85 const G4MaterialCutsCouple*); 82 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 83 const G4MaterialCutsCouple*); 86 84 87 85 virtual G4double ComputeCrossSectionPerAtom( … … 97 95 G4double cutEnergy); 98 96 99 v oid SampleSecondaries(std::vector<G4DynamicParticle*>*,100 const G4MaterialCutsCouple*,101 const G4DynamicParticle*,102 G4double tmin,103 G4double maxEnergy);97 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 98 const G4MaterialCutsCouple*, 99 const G4DynamicParticle*, 100 G4double tmin, 101 G4double maxEnergy); 104 102 105 103 inline void SetLowestKineticEnergy(G4double e); … … 117 115 G4double gammaEnergy); 118 116 119 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 120 G4double kineticEnergy); 117 inline void SetParticle(const G4ParticleDefinition*); 121 118 122 119 private: … … 160 157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 161 158 162 inline163 G4double G4MuBremsstrahlungModel::MaxSecondaryEnergy(const G4ParticleDefinition*,164 G4double kineticEnergy)165 {166 return kineticEnergy;167 }168 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......170 171 159 inline void G4MuBremsstrahlungModel::SetLowestKineticEnergy(G4double e) 172 160 { 173 161 lowestKinEnergy = e; 174 }175 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......177 178 inline179 G4double G4MuBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition*,180 const G4MaterialCutsCouple*)181 {182 return minThreshold;183 162 } 184 163 -
trunk/source/processes/electromagnetic/muons/include/G4MuIonisation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuIonisation.hh,v 1.3 0 2007/05/23 08:49:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuIonisation.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 95 95 virtual ~G4MuIonisation(); 96 96 97 G4bool IsApplicable(const G4ParticleDefinition& p);97 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 98 98 99 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,100 const G4Material*, G4double cut);99 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 100 const G4Material*, G4double cut); 101 101 102 102 // Print out of the class parameters 103 v oid PrintInfo();103 virtual void PrintInfo(); 104 104 105 105 protected: … … 127 127 128 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....130 131 inline G4bool G4MuIonisation::IsApplicable(const G4ParticleDefinition& p)132 {133 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);134 }135 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....137 138 inline G4double G4MuIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,139 const G4Material*,140 G4double cut)141 {142 G4double x = 0.5*cut/electron_mass_c2;143 G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));144 return mass*(g - 1.0);145 }146 147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....148 129 149 130 #endif -
trunk/source/processes/electromagnetic/muons/include/G4MuPairProduction.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProduction.hh,v 1.3 0 2008/02/29 17:50:05vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuPairProduction.hh,v 1.31 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 84 84 virtual ~G4MuPairProduction(); 85 85 86 G4bool IsApplicable(const G4ParticleDefinition& p);86 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 87 87 88 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,89 const G4Material*, G4double cut);88 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 89 const G4Material*, G4double cut); 90 90 91 91 // Print out of the class parameters 92 v oid PrintInfo();92 virtual void PrintInfo(); 93 93 94 94 protected: 95 95 96 v oid InitialiseEnergyLossProcess(const G4ParticleDefinition*,97 const G4ParticleDefinition*);96 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 97 const G4ParticleDefinition*); 98 98 99 99 private: … … 113 113 114 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....116 117 inline118 G4bool G4MuPairProduction::IsApplicable(const G4ParticleDefinition& p)119 {120 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);121 }122 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....124 125 inline126 G4double G4MuPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*,127 const G4Material*,128 G4double)129 {130 return lowestKinEnergy;131 }132 133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....134 115 135 116 #endif -
trunk/source/processes/electromagnetic/muons/include/G4MuPairProductionModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProductionModel.hh,v 1.2 7 2008/07/22 16:11:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuPairProductionModel.hh,v 1.28 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 virtual ~G4MuPairProductionModel(); 80 80 81 v oid Initialise(const G4ParticleDefinition*, const G4DataVector&);81 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 82 82 83 83 … … 100 100 G4double maxEnergy); 101 101 102 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 103 const G4MaterialCutsCouple*); 104 102 105 inline void SetLowestKineticEnergy(G4double e); 103 104 inline G4double MinEnergyCut(const G4ParticleDefinition*,105 const G4MaterialCutsCouple*);106 106 107 107 inline void SetParticle(const G4ParticleDefinition*); … … 120 120 G4double pairEnergy); 121 121 122 inlineG4double MaxSecondaryEnergy(const G4ParticleDefinition*,123 G4double kineticEnergy);122 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 123 G4double kineticEnergy); 124 124 125 125 inline void SetCurrentElement(G4double Z); … … 193 193 194 194 inline 195 G4double G4MuPairProductionModel::MinEnergyCut(const G4ParticleDefinition*,196 const G4MaterialCutsCouple* )197 {198 return minPairEnergy;199 }200 201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......202 203 inline204 195 void G4MuPairProductionModel::SetParticle(const G4ParticleDefinition* p) 205 196 { … … 208 199 particleMass = particle->GetPDGMass(); 209 200 } 210 }211 212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......213 214 inline G4double G4MuPairProductionModel::MaxSecondaryEnergy(215 const G4ParticleDefinition*,216 G4double kineticEnergy)217 {218 G4double maxPairEnergy = kineticEnergy + particleMass*(1.0 - 0.75*sqrte*z13);219 return maxPairEnergy;220 201 } 221 202 -
trunk/source/processes/electromagnetic/muons/src/G4MuBetheBlochModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBetheBlochModel.cc,v 1.2 4 2008/03/25 12:31:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuBetheBlochModel.cc,v 1.26 2009/04/12 17:19:01 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 88 88 theElectron = G4Electron::Electron(); 89 89 corr = G4LossTableManager::Instance()->EmCorrections(); 90 fParticleChange = 0; 90 91 91 92 if(p) SetParticle(p); … … 99 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 100 101 101 void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p)102 {103 if(!particle) {104 particle = p;105 mass = particle->GetPDGMass();106 massSquare = mass*mass;107 ratio = electron_mass_c2/mass;108 }109 }110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......112 113 102 G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition*, 114 103 const G4MaterialCutsCouple* couple) … … 117 106 } 118 107 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 109 110 G4double G4MuBetheBlochModel::MaxSecondaryEnergy(const G4ParticleDefinition*, 111 G4double kinEnergy) 112 { 113 G4double tau = kinEnergy/mass; 114 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 115 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 116 return tmax; 117 } 118 119 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 120 120 … … 123 123 { 124 124 if(p) SetParticle(p); 125 126 if(pParticleChange) 127 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 128 (pParticleChange); 129 else 130 fParticleChange = new G4ParticleChangeForLoss(); 125 if(!fParticleChange) fParticleChange = GetParticleChangeForLoss(); 131 126 } 132 127 -
trunk/source/processes/electromagnetic/muons/src/G4MuBremsstrahlung.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBremsstrahlung.cc,v 1.4 1 2008/10/16 13:37:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuBremsstrahlung.cc,v 1.42 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 94 94 95 G4bool G4MuBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) 96 { 97 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV); 98 } 99 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 101 102 G4double G4MuBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*, 103 const G4Material*, 104 G4double) 105 { 106 return lowestKinEnergy; 107 } 108 109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 110 95 111 void G4MuBremsstrahlung::InitialiseEnergyLossProcess( 96 112 const G4ParticleDefinition* part, -
trunk/source/processes/electromagnetic/muons/src/G4MuBremsstrahlungModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBremsstrahlungModel.cc,v 1.3 2 2008/07/22 16:11:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuBremsstrahlungModel.cc,v 1.35 2009/04/12 17:48:45 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 111 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 112 113 G4double G4MuBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition*, 114 const G4MaterialCutsCouple*) 115 { 116 return minThreshold; 117 } 118 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 120 113 121 void G4MuBremsstrahlungModel::Initialise(const G4ParticleDefinition* p, 114 122 const G4DataVector& cuts) … … 131 139 if(nn > 0) { 132 140 for (G4int ii=0; ii<nn; ii++){ 133 G4DataVector* a =partialSumSigma[ii];141 G4DataVector* a = partialSumSigma[ii]; 134 142 if ( a ) delete a; 135 143 } … … 154 162 155 163 // define pointer to G4ParticleChange 156 if(!fParticleChange) { 157 if(pParticleChange) 158 fParticleChange = 159 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 160 else 161 fParticleChange = new G4ParticleChangeForLoss(); 162 } 164 if(!fParticleChange) fParticleChange = GetParticleChangeForLoss(); 163 165 } 164 166 -
trunk/source/processes/electromagnetic/muons/src/G4MuIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuIonisation.cc,v 1.5 7 2008/10/27 10:55:07vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuIonisation.cc,v 1.59 2009/02/26 11:04:20 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 86 86 #include "G4MuBetheBlochModel.hh" 87 87 #include "G4UniversalFluctuation.hh" 88 #include "G4IonFluctuations.hh" 88 89 #include "G4BohrFluctuations.hh" 89 90 #include "G4UnitsTable.hh" … … 112 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 114 115 G4bool G4MuIonisation::IsApplicable(const G4ParticleDefinition& p) 116 { 117 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV); 118 } 119 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 121 122 G4double G4MuIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 123 const G4Material*, 124 G4double cut) 125 { 126 G4double x = 0.5*cut/electron_mass_c2; 127 G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio)); 128 return mass*(g - 1.0); 129 } 130 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 132 114 133 void G4MuIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* part, 115 134 const G4ParticleDefinition* bpart) … … 123 142 SetSecondaryParticle(G4Electron::Electron()); 124 143 125 flucModel = new G4UniversalFluctuation(); 144 // Bragg peak model 145 if (!EmModel(1)) SetEmModel(new G4BraggModel(),1); 146 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 147 EmModel(1)->SetHighEnergyLimit(0.2*MeV); 148 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 126 149 127 G4VEmModel* em = new G4BraggModel(); 128 em->SetLowEnergyLimit(MinKinEnergy()); 129 em->SetHighEnergyLimit(0.2*MeV); 130 AddEmModel(1, em, flucModel); 131 G4VEmModel* em1 = new G4BetheBlochModel(); 132 em1->SetLowEnergyLimit(0.2*MeV); 133 em1->SetHighEnergyLimit(1.0*GeV); 134 AddEmModel(2, em1, flucModel); 135 G4VEmModel* em2 = new G4MuBetheBlochModel(); 136 em2->SetLowEnergyLimit(1.0*GeV); 137 em2->SetHighEnergyLimit(MaxKinEnergy()); 138 AddEmModel(3, em2, flucModel); 150 // high energy fluctuation model 151 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation()); 152 153 // moderate energy model 154 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 155 EmModel(2)->SetLowEnergyLimit(0.2*MeV); 156 EmModel(2)->SetHighEnergyLimit(1.0*GeV); 157 AddEmModel(2, EmModel(2), FluctModel()); 158 159 // high energy model 160 if (!EmModel(3)) SetEmModel(new G4MuBetheBlochModel(),3); 161 EmModel(3)->SetLowEnergyLimit(1.0*GeV); 162 EmModel(3)->SetHighEnergyLimit(MaxKinEnergy()); 163 AddEmModel(3, EmModel(3), FluctModel()); 139 164 140 165 ratio = electron_mass_c2/mass; -
trunk/source/processes/electromagnetic/muons/src/G4MuPairProduction.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProduction.cc,v 1.5 1 2008/10/16 13:37:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuPairProduction.cc,v 1.52 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 100 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 101 101 102 G4bool G4MuPairProduction::IsApplicable(const G4ParticleDefinition& p) 103 { 104 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV); 105 } 106 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 108 109 G4double G4MuPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*, 110 const G4Material*, 111 G4double) 112 { 113 return lowestKinEnergy; 114 } 115 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 117 102 118 void G4MuPairProduction::InitialiseEnergyLossProcess( 103 119 const G4ParticleDefinition* part, -
trunk/source/processes/electromagnetic/muons/src/G4MuPairProductionModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuPairProductionModel.cc,v 1. 39 2008/07/22 16:11:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MuPairProductionModel.cc,v 1.41 2009/04/12 17:19:01 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 137 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 138 138 139 G4double G4MuPairProductionModel::MinEnergyCut(const G4ParticleDefinition*, 140 const G4MaterialCutsCouple* ) 141 { 142 return minPairEnergy; 143 } 144 145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 146 147 G4double G4MuPairProductionModel::MaxSecondaryEnergy(const G4ParticleDefinition*, 148 G4double kineticEnergy) 149 { 150 G4double maxPairEnergy = kineticEnergy + particleMass*(1.0 - 0.75*sqrte*z13); 151 return maxPairEnergy; 152 } 153 154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 155 139 156 void G4MuPairProductionModel::Initialise(const G4ParticleDefinition* p, 140 157 const G4DataVector&) … … 144 161 MakeSamplingTables(); 145 162 } 146 if(!fParticleChange) { 147 if(pParticleChange) 148 fParticleChange = 149 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 150 else 151 fParticleChange = new G4ParticleChangeForLoss(); 152 } 163 if(!fParticleChange) fParticleChange = GetParticleChangeForLoss(); 153 164 } 154 165 -
trunk/source/processes/electromagnetic/polarisation/History
r961 r1055 1 $Id: History,v 1.1 6 2008/10/30 22:34:23 schaelicExp $1 $Id: History,v 1.18 2009/04/12 17:43:35 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 12 April 09: V.Ivanchenko (empolar-V09-02-00) 21 G4PolarizedAnnihilationModel - simplified initialisation 22 19 23 30 October 08: A.Schaelicke (empolar-V09-01-01) 20 24 For all process classes set sub-types according to the enumeration -
trunk/source/processes/electromagnetic/polarisation/src/G4PolarizedAnnihilationModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PolarizedAnnihilationModel.cc,v 1. 6 2007/07/10 09:38:17 schaelicExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PolarizedAnnihilationModel.cc,v 1.8 2009/04/12 17:47:58 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 83 83 // G4eeToTwoGammaModel::Initialise(part,dv); 84 84 if(gIsInitialised) return; 85 86 if(pParticleChange) 87 gParticleChange = 88 reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 89 else 90 gParticleChange = new G4ParticleChangeForGamma(); 91 85 gParticleChange = GetParticleChangeForGamma(); 92 86 gIsInitialised = true; 93 87 } -
trunk/source/processes/electromagnetic/standard/History
r1007 r1055 1 $Id: History,v 1.4 30 2008/11/24 18:28:09vnivanch Exp $1 $Id: History,v 1.452 2009/05/18 12:31:46 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 18 May 09: V.Ivant (emstand-V09-02-12) 21 - G4UrbanMscModel2 - (L.Urban) correction in tail tuning using MuScat data 22 23 15 May 09: V.Ivant (emstand-V09-02-11) 24 - G4WaterStopping - fixed Ar data 25 - G4PairProductionRelModel - (A.Schaelicke) new relativistic model for 26 gamma conversion 27 - G4UrbanMscModel2 - (L.Urban) new version of theta0 and tail tuning 28 29 10 May 09: V.Ivant (emstand-V09-02-10) 30 - G4WentzelVIModel, G4eCoulombScattering, G4CoulombScattering - added relativistic 31 factor to Reserford cross section; set default limit on 32 kinetic energy of the recoil 100 keV 33 34 28 April 09: V.Ivant (emstand-V09-02-09) 35 - G4UrbanMscModel2 - (L.Urban) new tuning for the central part and for the 36 tail of the angular distribution using the old e- 37 scattering data only (Phys. Rev. 84 (1951) 634; 38 Phys. Rev. 61 (1942) 254) 39 - corrected logic in ComputeTruePathLengthLimit method 40 for type=fUseDistanceToBoundary 41 - G4UrbanMscModel - frozen version of G4UrbanMscModel2 of g4 9.2 42 - G4WentzelVIModel, G4eCoulombScattering - reduce low-limit from 1 keV to 0.1 keV 43 to provide smooth transport cross section table 44 45 23 April 09: V.Ivant (emstand-V09-02-08) 46 - G4BetheBlochModel - do not use pointer to GenericIon introduced in the 47 previous tag due to problem of simple PhysLists without ions 48 49 20 April 09: V.Ivant (emstand-V09-02-07) 50 - G4BetheBlochModel - fixed and simplified initialisation for ions needed for 51 the new G4IonParametrisedLossModel of low-energy package 52 - G4GoudsmitSaundersonMscModel - (O.Kadri) cleanup: discarded no scattering and 53 single scattering theta sampling from SampleCosineTheta() 54 which means the splitting step into two sub-steps occur 55 only for msc regime 56 57 12 April 09: V.Ivant (emstand-V09-02-06) 58 - Simplified initialisation of all models 59 - G4UrbanMscModel, G4UrbanMscModel2, G4UrbanMscModel90 - use methods 60 of G4VMscModel for interface to geometry 61 62 07 April 09: V.Ivant (emstand-V09-02-05) 63 - G4IonFluctuations - T.Toshito removed extra phenomenological factor 64 in fluctuation width 65 - G4HeatedKleinNishinaCompton - V.Grichine added a prototype model for 66 plasma 67 68 21 March 09: V.Ivant (emstand-V09-02-04) 69 - G4UniversalFluctuation - L.Urban introduce modification in width 70 correction, the dependence of the correction on energy deposition 71 at previous steps is removed (addresses T2K report) 72 73 20 March 09: V.Ivant (emstand-V09-02-03) 74 - G4GoudsmitSaundersonMscModel fixed compillation problem 75 76 12 March 09: V.Ivant (emstand-V09-02-02) 77 - G4GoudsmitSaundersonMscModel fixed compillation problem 78 - G4UniversalFluctuation - add temporary fix for T2K report 79 80 05 March 09: V.Ivant (emstand-V09-02-01) 81 - New G4GoudsmitSaundersonMscModel is added 82 - G4WentzelVIModel, G4eCoulombScattringModel: 83 o substitute scaling of low-energy limit by setting 1 keV for 84 all particles; 85 o use EGSnrc form of screening parameter (second order correction) 86 87 20 February 09: V.Ivant (emstand-V09-02-00) 88 - Move all virtual methods from inline to source 89 G4PEEffectModel - substitute ComputeMeanFreePath by CrossSectionPerVolume 90 (minor CPU speadup for compound materials) 91 G4PAIModel, G4PAIPhotonModel - remove usage of random numbers at 92 initialisation (potential non-reproducibility) 93 G4WentzelVIModel - use generic methods of G4VMscModel to access safety 94 and other geometry information 19 95 20 96 24 November 08: V.Ivant (emstand-V09-01-45) -
trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.hh,v 1. 16 2008/10/22 16:00:57vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BetheBlochModel.hh,v 1.20 2009/04/23 17:44:43 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 64 64 65 65 #include "G4VEmModel.hh" 66 #include "G4NistManager.hh" 66 67 67 68 class G4EmCorrections; 68 69 class G4ParticleChangeForLoss; 69 class G4NistManager;70 71 70 72 71 class G4BetheBlochModel : public G4VEmModel … … 82 81 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 83 82 84 G4double MinEnergyCut(const G4ParticleDefinition*,85 const G4MaterialCutsCouple*);83 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 84 const G4MaterialCutsCouple*); 86 85 87 86 virtual G4double ComputeCrossSectionPerElectron( … … 131 130 protected: 132 131 133 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,134 G4double kinEnergy);132 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 133 G4double kinEnergy); 135 134 136 135 private: 137 136 138 void SetParticle(const G4ParticleDefinition* p); 137 inline void SetupParameters(); 138 139 inline void SetParticle(const G4ParticleDefinition* p); 140 141 inline void SetGenericIon(const G4ParticleDefinition* p); 139 142 140 143 // hide assignment operator … … 166 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 167 170 168 inline G4double G4BetheBlochModel::MaxSecondaryEnergy( 169 const G4ParticleDefinition* pd, 170 G4double kinEnergy) 171 { 172 if(isIon) SetParticle(pd); 173 G4double tau = kinEnergy/mass; 174 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 175 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 176 return std::min(tmax,tlimit); 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 } 177 191 } 178 192 179 193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 180 194 195 inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p) 196 { 197 if(particle != p) { 198 particle = p; 199 if (p->GetPDGCharge()/eplus > 1.5 && p->GetBaryonNumber() > 2) isIon = true; 200 SetupParameters(); 201 } 202 } 203 204 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 205 206 inline void G4BetheBlochModel::SetGenericIon(const G4ParticleDefinition* p) 207 { 208 if(p && particle != p) { 209 if(p->GetParticleName() == "GenericIon") isIon = true; 210 } 211 } 212 181 213 #endif -
trunk/source/processes/electromagnetic/standard/include/G4BohrFluctuations.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BohrFluctuations.hh,v 1. 3 2007/09/27 13:53:11vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BohrFluctuations.hh,v 1.4 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 void InitialiseMe(const G4ParticleDefinition*); 80 80 81 protected:82 83 81 private: 84 82 … … 103 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 104 102 105 106 inline G4double G4BohrFluctuations::Dispersion(107 const G4Material* material,108 const G4DynamicParticle* dp,109 G4double& tmax,110 G4double& length)111 {112 if(!particle) InitialiseMe(dp->GetDefinition());113 114 G4double electronDensity = material->GetElectronDensity();115 kineticEnergy = dp->GetKineticEnergy();116 G4double etot = kineticEnergy + particleMass;117 beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);118 G4double siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length119 * electronDensity * chargeSquare;120 121 return siga;122 }123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....125 126 103 #endif 127 104 -
trunk/source/processes/electromagnetic/standard/include/G4BraggIonModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggIonModel.hh,v 1.1 1 2008/10/22 16:00:57 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BraggIonModel.hh,v 1.12 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 77 77 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 78 78 79 G4double MinEnergyCut(const G4ParticleDefinition*,80 const G4MaterialCutsCouple*);79 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 80 const G4MaterialCutsCouple*); 81 81 82 82 virtual G4double ComputeCrossSectionPerElectron( … … 128 128 protected: 129 129 130 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,131 G4double kinEnergy);130 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 131 G4double kinEnergy); 132 132 133 133 private: … … 180 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 181 181 182 inline G4double G4BraggIonModel::MaxSecondaryEnergy(183 const G4ParticleDefinition* pd,184 G4double kinEnergy)185 {186 if(pd != particle) SetParticle(pd);187 G4double tau = kinEnergy/mass;188 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /189 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);190 return tmax;191 }192 193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......194 195 182 inline void G4BraggIonModel::SetParticle(const G4ParticleDefinition* p) 196 183 { -
trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.hh,v 1.1 2 2008/09/14 17:11:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BraggModel.hh,v 1.13 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 80 80 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 81 81 82 G4double MinEnergyCut(const G4ParticleDefinition*,83 const G4MaterialCutsCouple*);82 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 83 const G4MaterialCutsCouple*); 84 84 85 85 virtual G4double ComputeCrossSectionPerElectron( … … 131 131 protected: 132 132 133 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,134 G4double kinEnergy);133 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 134 G4double kinEnergy); 135 135 136 136 private: 137 137 138 void SetParticle(const G4ParticleDefinition* p);138 inline void SetParticle(const G4ParticleDefinition* p); 139 139 140 140 G4bool HasMaterial(const G4Material* material); … … 182 182 G4bool isInitialised; 183 183 }; 184 185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......186 187 inline G4double G4BraggModel::MaxSecondaryEnergy(188 const G4ParticleDefinition* pd,189 G4double kinEnergy)190 {191 if(pd != particle) SetParticle(pd);192 G4double tau = kinEnergy/mass;193 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /194 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);195 return tmax;196 }197 184 198 185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/include/G4ComptonScattering.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4ComptonScattering.hh,v 1.2 0 2007/05/23 08:47:34vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ComptonScattering.hh,v 1.21 2009/02/20 12:06:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 //------------------ G4ComptonScattering physics process ----------------------- … … 82 82 83 83 // true for Gamma only. 84 G4bool IsApplicable(const G4ParticleDefinition&);84 virtual G4bool IsApplicable(const G4ParticleDefinition&); 85 85 86 86 // Print few lines of informations about the process: validity range, 87 87 virtual void PrintInfo(); 88 89 88 90 89 protected: … … 97 96 }; 98 97 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....101 102 inline103 G4bool G4ComptonScattering::IsApplicable(const G4ParticleDefinition& p)104 {105 return (&p == G4Gamma::Gamma());106 }107 108 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 109 99 -
trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.hh,v 1.1 1 2008/06/13 08:19:43vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CoulombScattering.hh,v 1.13 2009/05/07 18:41:45 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 59 59 public: 60 60 61 G4CoulombScattering(const G4String& name = " eCoulombScat");61 G4CoulombScattering(const G4String& name = "CoulombScat"); 62 62 63 63 virtual ~G4CoulombScattering(); … … 104 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 105 106 inline G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p)107 {108 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());109 }110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....112 113 106 inline void G4CoulombScattering::SetThetaMin(G4double val) 114 107 { -
trunk/source/processes/electromagnetic/standard/include/G4GammaConversion.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4GammaConversion.hh,v 1.2 2 2007/05/23 08:47:34vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4GammaConversion.hh,v 1.23 2009/02/20 12:06:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 85 85 86 86 // true for Gamma only. 87 G4bool IsApplicable(const G4ParticleDefinition&);87 virtual G4bool IsApplicable(const G4ParticleDefinition&); 88 88 89 89 // Print few lines of informations about the process: validity range, … … 99 99 }; 100 100 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....103 104 inline G4bool G4GammaConversion::IsApplicable(const G4ParticleDefinition& p)105 {106 return (&p == G4Gamma::Gamma());107 }108 109 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 110 102 -
trunk/source/processes/electromagnetic/standard/include/G4IonFluctuations.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4IonFluctuations.hh,v 1. 8 2008/10/22 16:04:33vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4IonFluctuations.hh,v 1.9 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 84 84 85 85 // Initialisation prestep 86 inlinevoid SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);86 void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2); 87 87 88 88 private: … … 117 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 118 118 119 inline120 void G4IonFluctuations::SetParticleAndCharge(const G4ParticleDefinition* part,121 G4double q2)122 {123 if(part != particle) {124 particle = part;125 particleMass = part->GetPDGMass();126 charge = part->GetPDGCharge()/eplus;127 chargeSquare = charge*charge;128 }129 effChargeSquare = q2;130 uniFluct.SetParticleAndCharge(part, q2);131 }132 133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....134 135 119 #endif 136 120 -
trunk/source/processes/electromagnetic/standard/include/G4MollerBhabhaModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MollerBhabhaModel.hh,v 1. 19 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MollerBhabhaModel.hh,v 1.20 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 74 74 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 75 75 76 G4double MinEnergyCut(const G4ParticleDefinition*,77 const G4MaterialCutsCouple*);76 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 77 const G4MaterialCutsCouple*); 78 78 79 79 virtual G4double ComputeCrossSectionPerElectron( … … 109 109 protected: 110 110 111 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,112 G4double kinEnergy);111 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 112 G4double kinEnergy); 113 113 114 void SetParticle(const G4ParticleDefinition* p);114 inline void SetParticle(const G4ParticleDefinition* p); 115 115 116 116 const G4ParticleDefinition* particle; … … 127 127 G4MollerBhabhaModel & operator=(const G4MollerBhabhaModel &right); 128 128 G4MollerBhabhaModel(const G4MollerBhabhaModel&); 129 130 G4bool isInitialised; 131 129 132 }; 130 133 131 134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 132 135 133 inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy( 134 const G4ParticleDefinition*, 135 G4double kinEnergy) 136 inline void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p) 136 137 { 137 G4double tmax = kinEnergy; 138 if(isElectron) tmax *= 0.5; 139 return tmax; 138 particle = p; 139 if(p != theElectron) isElectron = false; 140 140 } 141 141 -
trunk/source/processes/electromagnetic/standard/include/G4PAIModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIModel.hh,v 1.22 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 75 77 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 76 78 77 virtual void InitialiseMe(const G4ParticleDefinition*) {};78 79 virtual G4double ComputeDEDX (const G4MaterialCutsCouple*,79 virtual void InitialiseMe(const G4ParticleDefinition*); 80 81 virtual G4double ComputeDEDXPerVolume(const G4Material*, 80 82 const G4ParticleDefinition*, 81 83 G4double kineticEnergy, 82 84 G4double cutEnergy); 83 85 84 virtual G4double CrossSection (const G4MaterialCutsCouple*,86 virtual G4double CrossSectionPerVolume(const G4Material*, 85 87 const G4ParticleDefinition*, 86 88 G4double kineticEnergy, … … 118 120 119 121 void SetVerboseLevel(G4int verbose){fVerbose=verbose;}; 120 121 122 122 123 123 protected: … … 192 192 }; 193 193 194 /////////////////////////////////////////////////////////////////////195 196 inline G4double G4PAIModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,197 G4double kinEnergy)198 {199 G4double tmax = kinEnergy;200 if(p == fElectron) tmax *= 0.5;201 else if(p != fPositron) {202 G4double mass = p->GetPDGMass();203 G4double ratio= electron_mass_c2/mass;204 G4double gamma= kinEnergy/mass + 1.0;205 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /206 (1. + 2.0*gamma*ratio + ratio*ratio);207 }208 return tmax;209 }210 211 ///////////////////////////////////////////////////////////////212 213 inline void G4PAIModel::DefineForRegion(const G4Region* r)214 {215 fPAIRegionVector.push_back(r);216 }217 218 194 #endif 219 195 -
trunk/source/processes/electromagnetic/standard/include/G4PAIPhotonModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIPhotonModel.hh,v 1.12 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 74 76 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 75 77 76 virtual void InitialiseMe(const G4ParticleDefinition*) {};77 78 virtual G4double ComputeDEDX (const G4MaterialCutsCouple*,79 const G4ParticleDefinition*,80 G4double kineticEnergy,81 G4double cutEnergy);82 83 virtual G4double CrossSection (const G4MaterialCutsCouple*,84 const G4ParticleDefinition*,85 G4double kineticEnergy,86 G4double cutEnergy,87 G4double maxEnergy);78 virtual void InitialiseMe(const G4ParticleDefinition*); 79 80 virtual G4double ComputeDEDXPerVolume(const G4Material*, 81 const G4ParticleDefinition*, 82 G4double kineticEnergy, 83 G4double cutEnergy); 84 85 virtual G4double CrossSectionPerVolume(const G4Material*, 86 const G4ParticleDefinition*, 87 G4double kineticEnergy, 88 G4double cutEnergy, 89 G4double maxEnergy); 88 90 89 91 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 122 124 G4double position, G4int iTransfer ); 123 125 124 125 126 126 protected: 127 127 128 128 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 129 G4double kinEnergy);129 G4double kinEnergy); 130 130 131 131 private: … … 145 145 G4int fVerbose; 146 146 G4PhysicsLogVector* fProtonEnergyVector ; 147 148 149 147 150 148 // vectors … … 204 202 }; 205 203 206 /////////////////////////////////////////////////////////////////////207 208 inline G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,209 G4double kinEnergy)210 {211 G4double tmax = kinEnergy;212 if(p == fElectron) tmax *= 0.5;213 else if(p != fPositron) {214 G4double mass = p->GetPDGMass();215 G4double ratio= electron_mass_c2/mass;216 G4double gamma= kinEnergy/mass + 1.0;217 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /218 (1. + 2.0*gamma*ratio + ratio*ratio);219 }220 return tmax;221 }222 223 ///////////////////////////////////////////////////////////////224 225 inline void G4PAIPhotonModel::DefineForRegion(const G4Region* r)226 {227 fPAIRegionVector.push_back(r);228 }229 230 204 #endif 231 205 -
trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PEEffectModel.hh,v 1. 6 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PEEffectModel.hh,v 1.7 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 42 42 // 06.02.2006 : added ComputeMeanFreePath() (mma) 43 // 20.02.2009 : move virtual inline to .cc, substitute 44 // ComputeMeanFreePath() by CrossSectionPerVolume (VI) 43 45 // 44 46 // Class Description: … … 70 72 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 71 73 72 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,73 G4double kinEnergy,74 G4double Z,75 G4double A,76 G4double, G4double);74 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 75 G4double kinEnergy, 76 G4double Z, 77 G4double A, 78 G4double, G4double); 77 79 78 G4double ComputeMeanFreePath( const G4ParticleDefinition*, 79 G4double kinEnergy, 80 const G4Material* material, 81 G4double, G4double); 80 virtual G4double CrossSectionPerVolume(const G4Material*, 81 const G4ParticleDefinition*, 82 G4double kineticEnergy, 83 G4double cutEnergy, 84 G4double maxEnergy); 82 85 83 86 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 100 103 }; 101 104 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....103 104 inline G4double G4PEEffectModel::ComputeCrossSectionPerAtom(105 const G4ParticleDefinition*,106 G4double energy,107 G4double Z, G4double,108 G4double, G4double)109 {110 G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);111 112 G4double energy2 = energy*energy, energy3 = energy*energy2,113 energy4 = energy2*energy2;114 115 return SandiaCof[0]/energy + SandiaCof[1]/energy2 +116 SandiaCof[2]/energy3 + SandiaCof[3]/energy4;117 }118 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....120 121 inline G4double G4PEEffectModel::ComputeMeanFreePath(122 const G4ParticleDefinition*,123 G4double energy,124 const G4Material* material,125 G4double, G4double)126 {127 G4double* SandiaCof = material->GetSandiaTable()128 ->GetSandiaCofForMaterial(energy);129 130 G4double energy2 = energy*energy, energy3 = energy*energy2,131 energy4 = energy2*energy2;132 133 G4double cross = SandiaCof[0]/energy + SandiaCof[1]/energy2 +134 SandiaCof[2]/energy3 + SandiaCof[3]/energy4;135 136 G4double mfp = DBL_MAX;137 if (cross > 0.) mfp = 1./cross;138 return mfp;139 }140 141 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 142 106 -
trunk/source/processes/electromagnetic/standard/include/G4PhotoElectricEffect.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4PhotoElectricEffect.hh,v 1.2 4 2007/05/23 08:47:34vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4PhotoElectricEffect.hh,v 1.25 2009/02/20 12:06:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 91 91 92 92 // true for Gamma only. 93 G4bool IsApplicable(const G4ParticleDefinition&);93 virtual G4bool IsApplicable(const G4ParticleDefinition&); 94 94 95 95 // Print few lines of informations about the process: validity range, 96 v oid PrintInfo();96 virtual void PrintInfo(); 97 97 98 98 protected: 99 99 100 v oid InitialiseProcess(const G4ParticleDefinition*);100 virtual void InitialiseProcess(const G4ParticleDefinition*); 101 101 102 102 private: … … 105 105 }; 106 106 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....109 110 inline111 G4bool G4PhotoElectricEffect::IsApplicable(const G4ParticleDefinition& p)112 {113 return (&p == G4Gamma::Gamma());114 }115 116 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 117 108 -
trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UniversalFluctuation.hh,v 1. 6 2008/10/22 16:04:33vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4UniversalFluctuation.hh,v 1.10 2009/03/19 14:15:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 70 70 virtual ~G4UniversalFluctuation(); 71 71 72 G4double SampleFluctuations(const G4Material*,73 const G4DynamicParticle*,74 G4double&,75 G4double&,76 G4double&);72 virtual G4double SampleFluctuations(const G4Material*, 73 const G4DynamicParticle*, 74 G4double&, 75 G4double&, 76 G4double&); 77 77 78 G4double Dispersion( const G4Material*,79 const G4DynamicParticle*,80 G4double&,81 G4double&);78 virtual G4double Dispersion( const G4Material*, 79 const G4DynamicParticle*, 80 G4double&, 81 G4double&); 82 82 83 v oid InitialiseMe(const G4ParticleDefinition*);83 virtual void InitialiseMe(const G4ParticleDefinition*); 84 84 85 85 // Initialisation prestep 86 inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2); 87 88 protected: 86 virtual void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2); 89 87 90 88 private: … … 113 111 G4double e0; 114 112 115 G4double facwidth;116 G4double oldloss;117 G4double samestep;118 113 G4double e1,e2; 119 114 … … 126 121 }; 127 122 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....129 130 inline void131 G4UniversalFluctuation::SetParticleAndCharge(const G4ParticleDefinition* part,132 G4double q2)133 {134 if(part != particle) {135 particle = part;136 particleMass = part->GetPDGMass();137 }138 chargeSquare = q2;139 }140 141 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 142 124 -
trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel.hh,v 1.3 3 2008/03/10 10:39:21vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4UrbanMscModel.hh,v 1.35 2009/04/29 13:30:22 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 37 37 // Author: Laszlo Urban 38 38 // 39 // Creation date: 0 1.03.200139 // Creation date: 06.03.2008 40 40 // 41 41 // Modifications: 42 42 // 43 // 27-03-03 Move model part from G4MultipleScattering (V.Ivanchenko) 44 // 27-03-03 Rename (V.Ivanchenko) 45 // 46 // 05-08-03 angle distribution has been modified (L.Urban) 47 // 26-11-03 new data member currentRange (L.Urban) 48 // 01-03-04 changes in data members + signature changed in SampleCosineTheta 49 // 11-03-04 changes in data members (L.Urban) 50 // 23-04-04 changes in data members and in signature of SampleCosineTheta 51 // (L.Urban) 52 // 17-08-04 name of data member facxsi changed to factail (L.Urban) 53 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 54 // 15-04-05 optimize internal interface - add SampleSecondaries method (V.Ivanchenko) 55 // 11-08-05 computation of lateral correlation added (L.Urban) 56 // 02-10-05 nuclear size correction computation removed, the correction 57 // included in the (theoretical) tabulated values (L.Urban) 58 // 16-02-06 data members b and xsi have been removed (L.Urban) 59 // 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko) 60 // 07-03-06 Create G4UrbanMscModel and move there step limit calculation (V.Ivanchenko) 61 // 10-05-06 SetMscStepLimitation at initialisation (V.Ivantchenko) 62 // 11-05-06 name of data member safety changed to presafety, some new data 63 // members added (frscaling1,frscaling2,tlimitminfix,nstepmax) 64 // (L.Urban) 65 // 13-10-06 data member factail removed, data member tkinlimit changed 66 // to lambdalimit, 67 // new data members tgeom,tnow,skin,skindepth,Zeff,geomlimit 68 // G4double GeomLimit(const G4Track& track) changed to 69 // void GeomLimit(const G4Track& track) (L.Urban) 70 // 20-10-06 parameter theta0 now computed in the (public) 71 // function ComputeTheta0, 72 // single scattering modified allowing not small 73 // angles as well (L.Urban) 74 // 31-01-07 code cleaning (L.Urban) 75 // 06-02-07 Move SetMscStepLimitation method into the source (VI) 76 // 15-02-07 new data member : smallstep (L.Urban) 77 // 10-04-07 remove navigator, smallstep, tnow (V.Ivanchenko) 78 // 43 // 28-04-09 move G4UrbanMscModel2 from the g49.2 to G4UrbanMscModel. 44 // now it is frozen (V.Ivanchenk0) 79 45 // 80 46 // Class Description: … … 111 77 112 78 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 113 79 114 80 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle, 115 81 G4double KineticEnergy, … … 119 85 G4double emax=DBL_MAX); 120 86 121 void SampleSecondaries(std::vector<G4DynamicParticle*>*,122 const G4MaterialCutsCouple*,123 const G4DynamicParticle*,124 G4double,125 G4double);126 127 87 void SampleScattering(const G4DynamicParticle*, 128 88 G4double safety); … … 141 101 private: 142 102 103 G4double SimpleScattering(G4double xmeanth, G4double x2meanth); 104 143 105 G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy); 144 106 … … 147 109 G4double LatCorrelation(); 148 110 149 void GeomLimit(const G4Track& track);150 151 111 inline G4double GetLambda(G4double kinEnergy); 152 112 153 113 inline void SetParticle(const G4ParticleDefinition*); 114 115 inline void UpdateCache(); 154 116 155 117 // hide assignment operator … … 160 122 G4ParticleChangeForMSC* fParticleChange; 161 123 162 G4SafetyHelper* safetyHelper;163 124 G4PhysicsTable* theLambdaTable; 164 125 const G4MaterialCutsCouple* couple; … … 166 127 167 128 G4double mass; 168 G4double charge; 169 170 G4double masslimite,masslimitmu; 129 G4double charge,ChargeSquare; 130 G4double masslimite,lambdalimit,fr; 171 131 172 132 G4double taubig; … … 174 134 G4double taulim; 175 135 G4double currentTau; 176 G4double frscaling1,frscaling2;177 136 G4double tlimit; 178 137 G4double tlimitmin; 179 138 G4double tlimitminfix; 180 181 G4double nstepmax; 139 G4double tgeom; 140 182 141 G4double geombig; 183 142 G4double geommin; … … 198 157 G4double currentKinEnergy; 199 158 G4double currentRange; 159 G4double rangeinit; 200 160 G4double currentRadLength; 201 161 202 G4double Zeff; 162 G4double theta0max,rellossmax; 163 G4double third; 203 164 204 165 G4int currentMaterialIndex; 166 167 G4double y; 168 G4double Zold; 169 G4double Zeff,Z2,Z23,lnZ; 170 G4double coeffth1,coeffth2; 171 G4double coeffc1,coeffc2; 172 G4double scr1ini,scr2ini,scr1,scr2; 205 173 206 174 G4bool isInitialized; 207 175 G4bool inside; 208 176 G4bool insideskin; 209 210 177 }; 211 178 179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 212 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 213 181 … … 236 204 mass = p->GetPDGMass(); 237 205 charge = p->GetPDGCharge()/eplus; 206 ChargeSquare = charge*charge; 238 207 } 239 208 } … … 241 210 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 242 211 212 inline 213 void G4UrbanMscModel::UpdateCache() 214 { 215 lnZ = std::log(Zeff); 216 coeffth1 = 0.885+lnZ*(0.104-0.0170*lnZ); 217 coeffth2 = 0.028+lnZ*(0.012-0.00125*lnZ); 218 coeffc1 = 2.134-lnZ*(0.1045-0.00602*lnZ); 219 coeffc2 = 0.001126-lnZ*(0.0001089+0.0000247*lnZ); 220 Z2 = Zeff*Zeff; 221 Z23 = std::exp(2.*lnZ/3.); 222 scr1 = scr1ini*Z23; 223 scr2 = scr2ini*Z2*ChargeSquare; 224 // lastMaterial = couple->GetMaterial(); 225 Zold = Zeff; 226 } 227 243 228 #endif 244 229 -
trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel2.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel2.hh,v 1.1 1 2008/12/18 13:01:34 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4UrbanMscModel2.hh,v 1.17 2009/05/15 09:26:42 urban Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 40 40 // 41 41 // Modifications: 42 // 42 // 23.04.2009 L.Urban updated parameterization in UpdateCache method 43 43 // 44 44 // … … 84 84 G4double emax=DBL_MAX); 85 85 86 void SampleSecondaries(std::vector<G4DynamicParticle*>*,87 const G4MaterialCutsCouple*,88 const G4DynamicParticle*,89 G4double,90 G4double);91 92 86 void SampleScattering(const G4DynamicParticle*, 93 87 G4double safety); … … 114 108 G4double LatCorrelation(); 115 109 116 void GeomLimit(const G4Track& track);117 118 110 inline G4double GetLambda(G4double kinEnergy); 119 111 … … 129 121 G4ParticleChangeForMSC* fParticleChange; 130 122 131 G4SafetyHelper* safetyHelper;132 123 G4PhysicsTable* theLambdaTable; 133 124 const G4MaterialCutsCouple* couple; 134 125 G4LossTableManager* theManager; 135 136 126 137 127 G4double mass; … … 223 213 { 224 214 lnZ = std::log(Zeff); 225 coeffth1 = 0.885+lnZ*(0.104-0.0170*lnZ); 226 coeffth2 = 0.028+lnZ*(0.012-0.00125*lnZ); 227 coeffc1 = 2.134-lnZ*(0.1045-0.00602*lnZ); 228 coeffc2 = 0.001126-lnZ*(0.0001089+0.0000247*lnZ); 215 //new correction in theta0 formula 216 coeffth1 = (1.-8.7780e-2/Zeff)*(0.87+0.03*lnZ); 217 coeffth2 = (4.0780e-2+1.7315e-4*Zeff)*(0.87+0.03*lnZ); 218 // tail parameters 219 G4double lnZ1 = std::log(Zeff+1.); 220 coeffc1 = 2.943-0.197*lnZ1; 221 coeffc2 = 0.0987-0.0143*lnZ1; 222 // for single scattering 229 223 Z2 = Zeff*Zeff; 230 224 Z23 = std::exp(2.*lnZ/3.); 231 225 scr1 = scr1ini*Z23; 232 226 scr2 = scr2ini*Z2*ChargeSquare; 233 // lastMaterial = couple->GetMaterial();227 234 228 Zold = Zeff; 235 229 } -
trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel90.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel90.hh,v 1. 4 2008/10/29 14:15:30vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4UrbanMscModel90.hh,v 1.5 2009/04/10 16:34:56 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 110 110 111 111 G4double LatCorrelation(); 112 113 void GeomLimit(const G4Track& track);114 112 115 113 inline G4double GetLambda(G4double kinEnergy); -
trunk/source/processes/electromagnetic/standard/include/G4WentzelVIModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WentzelVIModel.hh,v 1. 7 2008/08/04 08:49:09 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4WentzelVIModel.hh,v 1.17 2009/05/10 16:09:29 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 66 66 class G4LossTableManager; 67 67 class G4ParticleChangeForMSC; 68 class G4SafetyHelper;69 68 class G4ParticleDefinition; 70 69 … … 80 79 virtual ~G4WentzelVIModel(); 81 80 82 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 83 84 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 85 G4double KineticEnergy, 86 G4double AtomicNumber, 87 G4double AtomicWeight=0., 88 G4double cut = DBL_MAX, 89 G4double emax= DBL_MAX); 90 91 void SampleScattering(const G4DynamicParticle*, G4double safety); 92 93 void SampleSecondaries(std::vector<G4DynamicParticle*>*, 94 const G4MaterialCutsCouple*, 95 const G4DynamicParticle*, 96 G4double, 97 G4double); 98 99 G4double ComputeTruePathLengthLimit(const G4Track& track, 100 G4PhysicsTable* theLambdaTable, 101 G4double currentMinimalStep); 102 103 G4double ComputeGeomPathLength(G4double truePathLength); 104 105 G4double ComputeTrueStepLength(G4double geomStepLength); 81 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 82 83 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 84 G4double KineticEnergy, 85 G4double AtomicNumber, 86 G4double AtomicWeight=0., 87 G4double cut = DBL_MAX, 88 G4double emax= DBL_MAX); 89 90 virtual void SampleScattering(const G4DynamicParticle*, G4double safety); 91 92 virtual G4double ComputeTruePathLengthLimit(const G4Track& track, 93 G4PhysicsTable* theLambdaTable, 94 G4double currentMinimalStep); 95 96 virtual G4double ComputeGeomPathLength(G4double truePathLength); 97 98 virtual G4double ComputeTrueStepLength(G4double geomStepLength); 106 99 107 100 private: 108 101 109 G4double ComputeTransportXSectionPer Volume();102 G4double ComputeTransportXSectionPerAtom(); 110 103 111 104 G4double ComputeXSectionPerVolume(); … … 133 126 G4ParticleChangeForMSC* fParticleChange; 134 127 135 G4SafetyHelper* safetyHelper;136 128 G4PhysicsTable* theLambdaTable; 137 129 G4PhysicsTable* theLambda2Table; … … 173 165 // single scattering parameters 174 166 G4double coeff; 175 G4double constn;176 167 G4double cosThetaMin; 177 168 G4double cosThetaMax; … … 182 173 G4double q2Limit; 183 174 G4double alpha2; 184 G4double a0;185 175 186 176 // projectile … … 193 183 G4double mom2; 194 184 G4double invbeta2; 185 G4double kinFactor; 195 186 G4double etag; 196 187 G4double lowEnergyLimit; … … 198 189 // target 199 190 G4double targetZ; 191 G4double targetMass; 200 192 G4double screenZ; 201 193 G4double formfactA; 202 G4double FF[100]; 194 G4int iz; 195 196 static G4double ScreenRSquare[100]; 197 static G4double FormFactor[100]; 203 198 204 199 // flags … … 240 235 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 241 236 242 inline 243 void G4WentzelVIModel::SetupParticle(const G4ParticleDefinition* p) 237 inline void G4WentzelVIModel::SetupParticle(const G4ParticleDefinition* p) 244 238 { 245 239 // Initialise mass and charge … … 251 245 chargeSquare = q*q; 252 246 tkin = 0.0; 253 lowEnergyLimit = keV*mass/electron_mass_c2;254 247 } 255 248 } … … 264 257 invbeta2 = 1.0 + mass*mass/mom2; 265 258 cosTetMaxNuc = cosThetaMax; 266 if( ekin <= 10.*cut && mass < MeV) {259 if(mass < MeV && ekin <= 10.*cut) { 267 260 cosTetMaxNuc = ekin*(cosThetaMax + 1.0)/(10.*cut) - 1.0; 268 261 } … … 278 271 etag = e; 279 272 targetZ = Z; 280 G4int iz= G4int(Z);273 iz = G4int(Z); 281 274 if(iz > 99) iz = 99; 282 G4double x = fNistManager->GetZ13(iz); 283 screenZ = a0*x*x/mom2; 284 if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2); 285 // screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2; 286 // A.V. Butkevich et al., NIM A 488 (2002) 282 287 formfactA = FF[iz]; 288 if(formfactA == 0.0) { 289 x = fNistManager->GetA27(iz); 290 formfactA = constn*x*x; 291 FF[iz] = formfactA; 275 targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2; 276 G4double m12 = mass*mass; 277 G4double x = 1.0 + mass/targetMass; 278 kinFactor = coeff*targetZ*chargeSquare*(1.0 + m12/mom2)/mom2; 279 screenZ = ScreenRSquare[iz]/mom2; 280 if(iz > 1) { 281 screenZ *=(1.13 + 3.76*Z*Z*alpha2); 282 kinFactor /= (x*x); 292 283 } 293 formfactA *= mom2; 284 //if(iz > 1) screenZ *=(1.13 + std::min(0.5,3.76*Z*Z*invbeta2*alpha2)); 285 formfactA = FormFactor[iz]*mom2; 294 286 cosTetMaxNuc2 = cosTetMaxNuc; 295 /*296 G4double ee = 10.*eV*Z;297 if(1 == iz) ee *= 2.0;298 G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2299 *fNistManager->GetAtomicMassAmu(iz)/mom2);300 cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);301 */302 287 cosTetMaxElec2 = cosTetMaxElec; 303 288 } -
trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlung.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlung.hh,v 1.3 6 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eBremsstrahlung.hh,v 1.37 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 89 89 virtual ~G4eBremsstrahlung(); 90 90 91 G4bool IsApplicable(const G4ParticleDefinition& p);91 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 92 92 93 93 // Print out of the class parameters … … 111 111 112 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....114 115 inline G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)116 {117 return (&p == G4Electron::Electron() || &p == G4Positron::Positron());118 }119 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....121 113 122 114 #endif -
trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlungModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungModel.hh,v 1.2 5 2008/11/13 19:28:58vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eBremsstrahlungModel.hh,v 1.26 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 76 76 77 G4double MinEnergyCut(const G4ParticleDefinition*,78 const G4MaterialCutsCouple*);77 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 78 const G4MaterialCutsCouple*); 79 79 80 80 virtual G4double ComputeDEDXPerVolume(const G4Material*, … … 102 102 103 103 protected: 104 105 inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,106 G4double kineticEnergy);107 104 108 105 const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple); … … 191 188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 192 189 193 inline194 G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(195 const G4ParticleDefinition*,196 G4double kineticEnergy)197 {198 return kineticEnergy;199 }200 201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....202 203 190 #endif -
trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlungRelModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungRelModel.hh,v 1.1 0 2008/11/14 09:25:19vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eBremsstrahlungRelModel.hh,v 1.11 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 71 71 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 72 72 73 G4double MinEnergyCut(const G4ParticleDefinition*,74 const G4MaterialCutsCouple*);73 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 74 const G4MaterialCutsCouple*); 75 75 76 76 virtual G4double ComputeDEDXPerVolume(const G4Material*, … … 97 97 inline G4double LPMconstant() const; 98 98 99 protected:100 101 inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,102 G4double kineticEnergy);103 104 99 private: 105 100 … … 207 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 208 203 209 inline G4double210 G4eBremsstrahlungRelModel::MaxSecondaryEnergy(const G4ParticleDefinition*,211 G4double kineticEnergy)212 {213 return kineticEnergy;214 }215 216 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....217 218 204 219 205 inline G4double G4eBremsstrahlungRelModel::Phi1(G4double gg, G4double) -
trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.hh,v 1. 36 2008/08/04 08:49:09 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eCoulombScatteringModel.hh,v 1.43 2009/05/10 16:09:29 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 65 65 #include "G4VEmModel.hh" 66 66 #include "G4PhysicsTable.hh" 67 #include "globals.hh" 67 68 #include "G4NistManager.hh" 68 #include "globals.hh"69 69 70 70 class G4ParticleChangeForGamma; … … 137 137 138 138 G4double coeff; 139 G4double constn;140 139 G4double cosThetaMin; 141 140 G4double cosThetaMax; … … 160 159 G4double mom2; 161 160 G4double invbeta2; 161 G4double kinFactor; 162 162 G4double etag; 163 163 G4double lowEnergyLimit; … … 165 165 // target 166 166 G4double targetZ; 167 G4double targetMass; 167 168 G4double screenZ; 168 169 G4double formfactA; 169 170 G4int idxelm; 171 G4int iz; 170 172 171 173 private: 172 174 173 G4double a0;174 175 G4double alpha2; 175 176 G4double faclim; 176 G4double FF[100]; 177 178 static G4double ScreenRSquare[100]; 179 static G4double FormFactor[100]; 177 180 178 181 G4bool isInitialised; … … 204 207 chargeSquare = q*q; 205 208 tkin = 0.0; 206 lowEnergyLimit = keV*mass/electron_mass_c2;207 209 } 208 210 } … … 219 221 cosTetMinNuc = cosThetaMin; 220 222 cosTetMaxNuc = cosThetaMax; 221 if( ekin <= 10.*cut && mass < MeV && cosThetaMin < 1.0) {223 if(mass < MeV && cosThetaMin < 1.0 && ekin <= 10.*cut) { 222 224 cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0; 223 225 } … … 233 235 etag = e; 234 236 targetZ = Z; 235 G4intiz= G4int(Z);237 iz= G4int(Z); 236 238 if(iz > 99) iz = 99; 237 G4double x = fNistManager->GetZ13(iz); 238 screenZ = a0*x*x/mom2; 239 if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2); 240 //screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2; 241 // A.V. Butkevich et al., NIM A 488 (2002) 282 242 formfactA = FF[iz]; 243 if(formfactA == 0.0) { 244 x = fNistManager->GetA27(iz); 245 formfactA = constn*x*x; 246 FF[iz] = formfactA; 239 targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2; 240 G4double m12 = mass*mass; 241 G4double x = 1.0 + mass/targetMass; 242 kinFactor = (1.0 + m12/mom2)/mom2; 243 244 screenZ = ScreenRSquare[iz]/mom2; 245 if(iz > 1) { 246 screenZ *=(1.13 + 3.76*Z*Z*alpha2); 247 kinFactor /= (x*x); 247 248 } 248 formfactA *= mom2; 249 // if(iz > 1) screenZ *=(1.13 + std::min(0.5,3.76*Z*Z*invbeta2*alpha2)); 250 formfactA = FormFactor[iz]*mom2; 249 251 cosTetMaxNuc2 = cosTetMaxNuc; 250 if( particle == theProton && 1 == iz&& cosTetMaxNuc2 < 0.0) {252 if(1 == iz && particle == theProton && cosTetMaxNuc2 < 0.0) { 251 253 cosTetMaxNuc2 = 0.0; 252 254 } 253 /*254 G4double ee = 10.*eV*Z;255 if(1 == iz) ee *= 2.0;256 G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2257 *fNistManager->GetAtomicMassAmu(iz)/mom2);258 cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);259 */260 255 cosTetMaxElec2 = cosTetMaxElec; 261 256 } -
trunk/source/processes/electromagnetic/standard/include/G4eIonisation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisation.hh,v 1.3 5 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eIonisation.hh,v 1.36 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 88 88 virtual ~G4eIonisation(); 89 89 90 G4bool IsApplicable(const G4ParticleDefinition& p);90 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 91 91 92 92 // Print out of the class parameters … … 98 98 const G4ParticleDefinition*); 99 99 100 G4double MinPrimaryEnergy(const G4ParticleDefinition*,101 const G4Material*, G4double cut);100 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*, 101 const G4Material*, G4double cut); 102 102 103 103 private: … … 114 114 }; 115 115 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....118 119 inline G4double G4eIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,120 const G4Material*,121 G4double cut)122 {123 G4double x = cut;124 if(isElectron) x += cut;125 return x;126 }127 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....129 130 inline G4bool G4eIonisation::IsApplicable(const G4ParticleDefinition& p)131 {132 return (&p == G4Electron::Electron() || &p == G4Positron::Positron());133 }134 135 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 117 -
trunk/source/processes/electromagnetic/standard/include/G4eplusAnnihilation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eplusAnnihilation.hh,v 1.2 3 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eplusAnnihilation.hh,v 1.24 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 73 73 virtual ~G4eplusAnnihilation(); 74 74 75 G4bool IsApplicable(const G4ParticleDefinition& p);75 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 76 76 77 77 virtual G4VParticleChange* AtRestDoIt( … … 79 79 const G4Step& stepData); 80 80 81 G4double AtRestGetPhysicalInteractionLength(81 virtual G4double AtRestGetPhysicalInteractionLength( 82 82 const G4Track& track, 83 83 G4ForceCondition* condition … … 96 96 }; 97 97 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....100 101 inline G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& p)102 {103 return (&p == G4Positron::Positron());104 }105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....107 108 inline109 G4double G4eplusAnnihilation::AtRestGetPhysicalInteractionLength(110 const G4Track&, G4ForceCondition* condition)111 {112 *condition = NotForced;113 return 0.0;114 }115 116 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 117 99 -
trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.hh,v 1.4 1 2008/09/14 17:11:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hIonisation.hh,v 1.42 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 virtual ~G4hIonisation(); 94 94 95 G4bool IsApplicable(const G4ParticleDefinition& p);95 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 96 96 97 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,98 const G4Material*, G4double cut);97 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 98 const G4Material*, G4double cut); 99 99 100 100 // Print out of the class parameters … … 123 123 124 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....126 127 inline G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p)128 {129 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV &&130 !p.IsShortLived());131 }132 133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....134 135 inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,136 const G4Material*,137 G4double cut)138 {139 G4double x = 0.5*cut/electron_mass_c2;140 G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));141 return mass*(g - 1.0);142 }143 144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....145 125 146 126 inline void G4hIonisation::ActivateNuclearStopping(G4bool val) -
trunk/source/processes/electromagnetic/standard/include/G4ionIonisation.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionIonisation.hh,v 1.5 6 2008/09/14 17:11:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ionIonisation.hh,v 1.57 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 85 85 virtual ~G4ionIonisation(); 86 86 87 inlineG4bool IsApplicable(const G4ParticleDefinition& p);87 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 88 88 89 89 // Print out of the class parameters … … 102 102 const G4ParticleDefinition*); 103 103 104 inlineG4double MinPrimaryEnergy(const G4ParticleDefinition* p,104 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 105 105 const G4Material*, G4double cut); 106 106 … … 127 127 128 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....130 131 inline G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)132 {133 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() &&134 p.GetParticleType() == "nucleus");135 }136 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....138 139 inline G4double G4ionIonisation::MinPrimaryEnergy(140 const G4ParticleDefinition* p, const G4Material*, G4double cut)141 {142 return143 p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0);144 }145 146 129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 147 130 -
trunk/source/processes/electromagnetic/standard/src/G4BetheBlochModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.cc,v 1. 24 2008/10/22 16:00:57vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BetheBlochModel.cc,v 1.31 2009/04/24 14:24:00 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 65 65 #include "G4EmCorrections.hh" 66 66 #include "G4ParticleChangeForLoss.hh" 67 #include "G4NistManager.hh"68 67 69 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 83 82 { 84 83 fParticleChange = 0; 85 if(p) SetParticle(p); 84 if(p) { 85 SetGenericIon(p); 86 SetParticle(p); 87 } 86 88 theElectron = G4Electron::Electron(); 87 89 corr = G4LossTableManager::Instance()->EmCorrections(); … … 108 110 const G4DataVector&) 109 111 { 110 if (!particle) SetParticle(p); 112 SetGenericIon(p); 113 SetParticle(p); 114 115 //G4cout << "G4BetheBlochModel::Initialise for " << p->GetParticleName() 116 // << " isIon= " << isIon 117 // << G4endl; 111 118 112 119 corrFactor = chargeSquare; 120 // always false before the run 121 SetDeexcitationFlag(false); 113 122 114 123 if(!isInitialised) { 115 124 isInitialised = true; 116 117 if(!fParticleChange) { 118 if (pParticleChange) { 119 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 120 (pParticleChange); 121 } else { 122 fParticleChange = new G4ParticleChangeForLoss(); 123 } 124 } 125 } 126 } 127 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 129 130 void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p) 131 { 132 if(particle != p) { 133 particle = p; 134 G4String pname = particle->GetParticleName(); 135 if (particle->GetParticleType() == "nucleus" && 136 pname != "deuteron" && pname != "triton") { 137 isIon = true; 138 } 139 140 mass = particle->GetPDGMass(); 141 spin = particle->GetPDGSpin(); 142 G4double q = particle->GetPDGCharge()/eplus; 143 chargeSquare = q*q; 144 ratio = electron_mass_c2/mass; 145 G4double magmom = particle->GetPDGMagneticMoment() 146 *mass/(0.5*eplus*hbar_Planck*c_squared); 147 magMoment2 = magmom*magmom - 1.0; 148 formfact = 0.0; 149 if(particle->GetLeptonNumber() == 0) { 150 G4double x = 0.8426*GeV; 151 if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;} 152 else if(mass > GeV) { 153 x /= nist->GetZ13(mass/proton_mass_c2); 154 // tlimit = 51.2*GeV*A13[iz]*A13[iz]; 155 } 156 formfact = 2.0*electron_mass_c2/(x*x); 157 tlimit = 2.0/formfact; 158 } 125 fParticleChange = GetParticleChangeForLoss(); 159 126 } 160 127 } … … 415 382 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) / 416 383 (deltaMomentum * totMomentum); 384 /* 417 385 if(cost > 1.0) { 418 386 G4cout << "### G4BetheBlochModel WARNING: cost= " … … 429 397 cost = 1.0; 430 398 } 399 */ 431 400 G4double sint = sqrt((1.0 - cost)*(1.0 + cost)); 432 401 … … 440 409 // create G4DynamicParticle object for delta ray 441 410 G4DynamicParticle* delta = new G4DynamicParticle(theElectron, 442 deltaDirection,deltaKinEnergy);411 deltaDirection,deltaKinEnergy); 443 412 444 413 vdp->push_back(delta); … … 453 422 } 454 423 455 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 424 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 425 426 G4double G4BetheBlochModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd, 427 G4double kinEnergy) 428 { 429 // here particle type is checked for any method 430 SetParticle(pd); 431 G4double tau = kinEnergy/mass; 432 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 433 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 434 return std::min(tmax,tlimit); 435 } 436 437 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4BetheHeitlerModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheHeitlerModel.cc,v 1.1 2 2008/10/15 15:54:57vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BetheHeitlerModel.cc,v 1.13 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 94 94 const G4DataVector&) 95 95 { 96 if(!fParticleChange) { 97 if(pParticleChange) { 98 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 99 } else { 100 fParticleChange = new G4ParticleChangeForGamma(); 101 } 102 } 96 if(!fParticleChange) fParticleChange = GetParticleChangeForGamma(); 103 97 104 98 if(theCrossSectionTable) { -
trunk/source/processes/electromagnetic/standard/src/G4BohrFluctuations.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BohrFluctuations.cc,v 1. 6 2007/09/27 14:02:41vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BohrFluctuations.cc,v 1.7 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 137 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 138 138 139 G4double G4BohrFluctuations::Dispersion(const G4Material* material, 140 const G4DynamicParticle* dp, 141 G4double& tmax, 142 G4double& length) 143 { 144 if(!particle) InitialiseMe(dp->GetDefinition()); 139 145 146 G4double electronDensity = material->GetElectronDensity(); 147 kineticEnergy = dp->GetKineticEnergy(); 148 G4double etot = kineticEnergy + particleMass; 149 beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot); 150 G4double siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length 151 * electronDensity * chargeSquare; 152 153 return siga; 154 } 155 156 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 157 158 -
trunk/source/processes/electromagnetic/standard/src/G4BraggIonModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggIonModel.cc,v 1.2 2 2008/10/22 16:00:57vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BraggIonModel.cc,v 1.24 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 114 114 corrFactor = chargeSquare; 115 115 116 // always false before the run 117 SetDeexcitationFlag(false); 118 116 119 if(!isInitialised) { 117 120 isInitialised = true; … … 123 126 corr = G4LossTableManager::Instance()->EmCorrections(); 124 127 125 if(!fParticleChange) { 126 if(pParticleChange) { 127 fParticleChange = 128 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 129 } else { 130 fParticleChange = new G4ParticleChangeForLoss(); 131 } 132 } 128 fParticleChange = GetParticleChangeForLoss(); 133 129 } 134 130 } … … 352 348 fParticleChange->SetProposedKineticEnergy(kineticEnergy); 353 349 fParticleChange->SetProposedMomentumDirection(finalP); 350 } 351 352 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 353 354 G4double G4BraggIonModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd, 355 G4double kinEnergy) 356 { 357 if(pd != particle) SetParticle(pd); 358 G4double tau = kinEnergy/mass; 359 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 360 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 361 return tmax; 354 362 } 355 363 -
trunk/source/processes/electromagnetic/standard/src/G4BraggModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.cc,v 1.2 0 2008/10/22 16:01:46vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4BraggModel.cc,v 1.22 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 112 112 if(p != particle) SetParticle(p); 113 113 114 // always false before the run 115 SetDeexcitationFlag(false); 116 114 117 if(!isInitialised) { 115 118 isInitialised = true; … … 121 124 corr = G4LossTableManager::Instance()->EmCorrections(); 122 125 123 if(pParticleChange) { 124 fParticleChange = 125 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 126 } else { 127 fParticleChange = new G4ParticleChangeForLoss(); 128 } 126 fParticleChange = GetParticleChangeForLoss(); 129 127 } 130 128 } … … 337 335 338 336 vdp->push_back(delta); 337 } 338 339 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 340 341 G4double G4BraggModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd, 342 G4double kinEnergy) 343 { 344 if(pd != particle) SetParticle(pd); 345 G4double tau = kinEnergy/mass; 346 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 347 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 348 return tmax; 339 349 } 340 350 -
trunk/source/processes/electromagnetic/standard/src/G4ComptonScattering.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ComptonScattering.cc,v 1.3 0 2008/10/15 17:53:44vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ComptonScattering.cc,v 1.31 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 84 84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 85 86 G4bool G4ComptonScattering::IsApplicable(const G4ParticleDefinition& p) 87 { 88 return (&p == G4Gamma::Gamma()); 89 } 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 86 93 void G4ComptonScattering::InitialiseProcess(const G4ParticleDefinition*) 87 94 { -
trunk/source/processes/electromagnetic/standard/src/G4CoulombScattering.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.cc,v 1. 19 2008/10/15 17:53:44vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CoulombScattering.cc,v 1.20 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 G4CoulombScattering::~G4CoulombScattering() 80 80 {} 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 84 G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p) 85 { 86 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived()); 87 } 81 88 82 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4CoulombScatteringModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScatteringModel.cc,v 1.3 7 2008/07/31 13:11:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4CoulombScatteringModel.cc,v 1.39 2009/05/10 16:09:29 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 94 94 // CM system 95 G4int iz= G4int(Z);95 iz = G4int(Z); 96 96 G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2; 97 97 G4double etot = tkin + mass; … … 137 137 138 138 G4double Z = currentElement->GetZ(); 139 G4int iz= G4int(Z);139 iz = G4int(Z); 140 140 G4int ia = SelectIsotopeNumber(currentElement); 141 141 G4double m2 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia); … … 182 182 // recoil 183 183 G4double erec = kinEnergy - ekin; 184 G4double th =185 std::min(recoilThreshold,186 Z*currentElement->GetIonisation()->GetMeanExcitationEnergy());187 184 188 if(erec > th) {185 if(erec > recoilThreshold) { 189 186 G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz); 190 187 G4double plab = sqrt(ekin*(ekin + 2.0*mass)); -
trunk/source/processes/electromagnetic/standard/src/G4GammaConversion.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GammaConversion.cc,v 1.3 0 2008/10/15 17:53:44vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4GammaConversion.cc,v 1.31 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 90 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 91 91 92 G4bool G4GammaConversion::IsApplicable(const G4ParticleDefinition& p) 93 { 94 return (&p == G4Gamma::Gamma()); 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 92 99 void G4GammaConversion::InitialiseProcess(const G4ParticleDefinition*) 93 100 { -
trunk/source/processes/electromagnetic/standard/src/G4IonFluctuations.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4IonFluctuations.cc,v 1.2 4 2008/10/22 16:25:21 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4IonFluctuations.cc,v 1.26 2009/03/31 13:24:40 toshito Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 190 190 191 191 // heavy ion correction 192 G4double f1 = 1.065e-4*chargeSquare;193 if(beta2 > theBohrBeta2) f1/= beta2;194 else f1/= theBohrBeta2;195 if(f1 > 2.5) f1 = 2.5;196 fac *= (1.0 + f1);192 // G4double f1 = 1.065e-4*chargeSquare; 193 // if(beta2 > theBohrBeta2) f1/= beta2; 194 // else f1/= theBohrBeta2; 195 // if(f1 > 2.5) f1 = 2.5; 196 // fac *= (1.0 + f1); 197 197 198 198 // taking into account the cut 199 if(fac > 1.0) { 200 siga *= (1.0 + (fac - 1.0)*2.0*electron_mass_c2*beta2/(tmax*(1.0 - beta2))); 201 } 199 G4double fac_cut = 1.0 + (fac - 1.0)*2.0*electron_mass_c2*beta2/(tmax*(1.0 - beta2)); 200 if(fac_cut > 0.01 && fac > 0.01) { 201 siga *= fac_cut; 202 } 203 202 204 //G4cout << "siga(keV)= " << sqrt(siga)/keV << " fac= " << fac 203 205 // << " f1= " << f1 << G4endl; … … 420 422 421 423 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 424 425 void G4IonFluctuations::SetParticleAndCharge(const G4ParticleDefinition* part, 426 G4double q2) 427 { 428 if(part != particle) { 429 particle = part; 430 particleMass = part->GetPDGMass(); 431 charge = part->GetPDGCharge()/eplus; 432 chargeSquare = charge*charge; 433 } 434 effChargeSquare = q2; 435 uniFluct.SetParticleAndCharge(part, q2); 436 } 437 438 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4KleinNishinaCompton.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4KleinNishinaCompton.cc,v 1. 9 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4KleinNishinaCompton.cc,v 1.10 2009/05/15 17:12:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 const G4DataVector&) 80 80 { 81 if(pParticleChange) 82 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 83 else 84 fParticleChange = new G4ParticleChangeForGamma(); 81 fParticleChange = GetParticleChangeForGamma(); 85 82 } 86 83 -
trunk/source/processes/electromagnetic/standard/src/G4MollerBhabhaModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MollerBhabhaModel.cc,v 1.3 0 2007/05/22 17:34:36 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MollerBhabhaModel.cc,v 1.34 2009/04/24 17:15:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 74 74 const G4String& nam) 75 75 : G4VEmModel(nam), 76 particle(0), 77 isElectron(true), 78 twoln10(2.0*log(10.0)), 79 lowLimit(0.2*keV) 76 particle(0), 77 isElectron(true), 78 twoln10(2.0*log(10.0)), 79 lowLimit(0.2*keV), 80 isInitialised(false) 80 81 { 81 82 theElectron = G4Electron::Electron(); … … 87 88 G4MollerBhabhaModel::~G4MollerBhabhaModel() 88 89 {} 89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......91 92 void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p)93 {94 particle = p;95 if(p != theElectron) isElectron = false;96 }97 90 98 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 108 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 109 102 103 G4double G4MollerBhabhaModel::MaxSecondaryEnergy(const G4ParticleDefinition*, 104 G4double kinEnergy) 105 { 106 G4double tmax = kinEnergy; 107 if(isElectron) tmax *= 0.5; 108 return tmax; 109 } 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 110 113 void G4MollerBhabhaModel::Initialise(const G4ParticleDefinition* p, 111 114 const G4DataVector&) 112 115 { 113 116 if(!particle) SetParticle(p); 114 if(pParticleChange) 115 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 116 (pParticleChange); 117 else 118 fParticleChange = new G4ParticleChangeForLoss(); 117 SetDeexcitationFlag(false); 118 119 if(isInitialised) return; 120 121 isInitialised = true; 122 fParticleChange = GetParticleChangeForLoss(); 119 123 } 120 124 … … 289 293 G4double maxEnergy) 290 294 { 291 G4double tmax = std::min(maxEnergy, MaxSecondaryKinEnergy(dp)); 295 G4double kineticEnergy = dp->GetKineticEnergy(); 296 G4double tmax = kineticEnergy; 297 if(isElectron) tmax *= 0.5; 298 if(maxEnergy < tmax) tmax = maxEnergy; 292 299 if(tmin >= tmax) return; 293 300 294 G4double kineticEnergy = dp->GetKineticEnergy();295 301 G4double energy = kineticEnergy + electron_mass_c2; 296 302 G4double totalMomentum = sqrt(kineticEnergy*(energy + electron_mass_c2)); … … 339 345 G4double b3 = b4 + y122; 340 346 341 y = xmax*xmax; 342 grej = -xmin*b1; 343 grej += y*b2; 344 grej -= xmin*xmin*xmin*b3; 345 grej += y*y*b4; 346 grej *= beta2; 347 grej += 1.0; 347 y = xmax*xmax; 348 grej = 1.0 + (y*y*b4 - xmin*xmin*xmin*b3 + y*b2 - xmin*b1)*beta2; 348 349 do { 349 q = G4UniformRand(); 350 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q); 351 z = -x*b1; 352 y = x*x; 353 z += y*b2; 354 y *= x; 355 z -= y*b3; 356 y *= x; 357 z += y*b4; 358 z *= beta2; 359 z += 1.0; 350 q = G4UniformRand(); 351 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q); 352 y = x*x; 353 z = 1.0 + (y*y*b4 - x*y*b3 + y*b2 - x*b1)*beta2; 360 354 /* 361 355 if(z > grej) { … … 396 390 // create G4DynamicParticle object for delta ray 397 391 G4DynamicParticle* delta = new G4DynamicParticle(theElectron, 398 deltaDirection,deltaKinEnergy);392 deltaDirection,deltaKinEnergy); 399 393 vdp->push_back(delta); 400 394 } -
trunk/source/processes/electromagnetic/standard/src/G4MscModel71.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MscModel71.cc,v 1. 6 2008/03/13 17:20:07vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4MscModel71.cc,v 1.7 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 140 140 141 141 if(pParticleChange) 142 fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange);142 fParticleChange = static_cast<G4ParticleChangeForMSC*>(pParticleChange); 143 143 else 144 144 fParticleChange = new G4ParticleChangeForMSC(); -
trunk/source/processes/electromagnetic/standard/src/G4PAIModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIModel.cc,v 1.47 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class 26 32 // File name: G4PAIModel.cc 27 33 // … … 153 159 fTotBin); 154 160 155 if(pParticleChange) 156 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 157 else 158 fParticleChange = new G4ParticleChangeForLoss(); 161 fParticleChange = GetParticleChangeForLoss(); 159 162 160 163 // Prepare initialization … … 177 180 fCutCouple = theCoupleTable->GetMaterialCutsCouple( fMaterial, 178 181 curReg->GetProductionCuts() ); 182 //G4cout << "Reg <" <<curReg->GetName() << "> mat <" 183 // << fMaterial->GetName() << "> fCouple= " 184 // << fCutCouple<<G4endl; 179 185 if( fCutCouple ) { 180 186 fMaterialCutsCoupleVector.push_back(fCutCouple); … … 197 203 } 198 204 } 205 206 ////////////////////////////////////////////////////////////////// 207 208 void G4PAIModel::InitialiseMe(const G4ParticleDefinition*) 209 {} 199 210 200 211 ////////////////////////////////////////////////////////////////// … … 393 404 { 394 405 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 395 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 406 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 407 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 396 408 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 397 409 } … … 435 447 { 436 448 // if ( x1 == x2 ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 437 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 449 // if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 450 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*0.5 ; 438 451 else dEdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 439 452 } … … 444 457 ////////////////////////////////////////////////////////////////////////////// 445 458 446 G4double G4PAIModel::ComputeDEDX (const G4MaterialCutsCouple* matCC,447 const G4ParticleDefinition* p,448 G4double kineticEnergy,449 G4double cutEnergy)459 G4double G4PAIModel::ComputeDEDXPerVolume(const G4Material*, 460 const G4ParticleDefinition* p, 461 G4double kineticEnergy, 462 G4double cutEnergy) 450 463 { 451 464 G4int iTkin,iPlace; 452 465 size_t jMat; 466 467 //G4double cut = std::min(MaxSecondaryEnergy(p, kineticEnergy), cutEnergy); 468 G4double cut = cutEnergy; 469 453 470 G4double massRatio = fMass/p->GetPDGMass(); 454 471 G4double scaledTkin = kineticEnergy*massRatio; 455 472 G4double charge = p->GetPDGCharge(); 456 G4double charge2 = charge*charge, dEdx; 473 G4double charge2 = charge*charge; 474 const G4MaterialCutsCouple* matCC = CurrentCouple(); 457 475 458 476 for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat ) … … 470 488 iPlace = iTkin - 1; 471 489 if(iPlace < 0) iPlace = 0; 472 dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cutEnergy) ) ; 473 490 G4double dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut) ); 474 491 if( dEdx < 0.) dEdx = 0.; 475 492 return dEdx; … … 478 495 ///////////////////////////////////////////////////////////////////////// 479 496 480 G4double G4PAIModel::CrossSection ( const G4MaterialCutsCouple* matCC,481 const G4ParticleDefinition* p,482 G4double kineticEnergy,483 G4double cutEnergy,484 G4double maxEnergy )497 G4double G4PAIModel::CrossSectionPerVolume( const G4Material*, 498 const G4ParticleDefinition* p, 499 G4double kineticEnergy, 500 G4double cutEnergy, 501 G4double maxEnergy ) 485 502 { 486 503 G4int iTkin,iPlace; 487 504 size_t jMat; 488 G4double tmax = min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 505 G4double tmax = std::min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 506 if(tmax <= cutEnergy) return 0.0; 489 507 G4double massRatio = fMass/p->GetPDGMass(); 490 508 G4double scaledTkin = kineticEnergy*massRatio; 491 509 G4double charge = p->GetPDGCharge(); 492 510 G4double charge2 = charge*charge, cross, cross1, cross2; 511 const G4MaterialCutsCouple* matCC = CurrentCouple(); 493 512 494 513 for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat ) … … 935 954 } 936 955 956 ///////////////////////////////////////////////////////////////////// 957 958 G4double G4PAIModel::MaxSecondaryEnergy( const G4ParticleDefinition* p, 959 G4double kinEnergy) 960 { 961 G4double tmax = kinEnergy; 962 if(p == fElectron) tmax *= 0.5; 963 else if(p != fPositron) { 964 G4double mass = p->GetPDGMass(); 965 G4double ratio= electron_mass_c2/mass; 966 G4double gamma= kinEnergy/mass + 1.0; 967 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) / 968 (1. + 2.0*gamma*ratio + ratio*ratio); 969 } 970 return tmax; 971 } 972 973 /////////////////////////////////////////////////////////////// 974 975 void G4PAIModel::DefineForRegion(const G4Region* r) 976 { 977 fPAIRegionVector.push_back(r); 978 } 937 979 938 980 // -
trunk/source/processes/electromagnetic/standard/src/G4PAIPhotonModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIPhotonModel.cc,v 1.22 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class 26 32 // File name: G4PAIPhotonModel.cc 27 33 // … … 160 166 if(!fParticle) SetParticle(p); 161 167 162 if(pParticleChange) 163 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 164 else 165 fParticleChange = new G4ParticleChangeForLoss(); 168 fParticleChange = GetParticleChangeForLoss(); 166 169 167 170 const G4ProductionCutsTable* theCoupleTable = … … 214 217 } 215 218 } 219 220 ////////////////////////////////////////////////////////////////// 221 222 void G4PAIPhotonModel::InitialiseMe(const G4ParticleDefinition*) 223 {} 216 224 217 225 ////////////////////////////////////////////////////////////////// … … 487 495 { 488 496 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 489 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 497 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 498 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 490 499 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 491 500 } … … 530 539 { 531 540 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 532 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 541 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 542 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 533 543 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 534 544 } … … 574 584 { 575 585 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 576 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 586 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 587 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 577 588 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 578 589 } … … 617 628 { 618 629 // if ( x1 == x2 ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 619 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 630 // if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 631 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*0.5 ; 620 632 else dEdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 621 633 } … … 626 638 ////////////////////////////////////////////////////////////////////////////// 627 639 628 G4double G4PAIPhotonModel::ComputeDEDX (const G4MaterialCutsCouple* matCC,629 const G4ParticleDefinition* p,630 G4double kineticEnergy,631 G4double cutEnergy)640 G4double G4PAIPhotonModel::ComputeDEDXPerVolume(const G4Material*, 641 const G4ParticleDefinition* p, 642 G4double kineticEnergy, 643 G4double cutEnergy) 632 644 { 633 645 G4int iTkin,iPlace; 634 646 size_t jMat; 647 648 //G4double cut = std::min(MaxSecondaryEnergy(p, kineticEnergy), cutEnergy); 649 G4double cut = cutEnergy; 650 635 651 G4double particleMass = p->GetPDGMass(); 636 652 G4double scaledTkin = kineticEnergy*proton_mass_c2/particleMass; … … 638 654 G4double charge2 = charge*charge; 639 655 G4double dEdx = 0.; 656 const G4MaterialCutsCouple* matCC = CurrentCouple(); 640 657 641 658 for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat ) … … 653 670 iPlace = iTkin - 1; 654 671 if(iPlace < 0) iPlace = 0; 655 dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut Energy) ) ;672 dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut) ) ; 656 673 657 674 if( dEdx < 0.) dEdx = 0.; … … 661 678 ///////////////////////////////////////////////////////////////////////// 662 679 663 G4double G4PAIPhotonModel::CrossSection ( const G4MaterialCutsCouple* matCC,664 const G4ParticleDefinition* p,665 G4double kineticEnergy,666 G4double cutEnergy,667 G4double maxEnergy )680 G4double G4PAIPhotonModel::CrossSectionPerVolume( const G4Material*, 681 const G4ParticleDefinition* p, 682 G4double kineticEnergy, 683 G4double cutEnergy, 684 G4double maxEnergy ) 668 685 { 669 686 G4int iTkin,iPlace; 670 687 size_t jMat, jMatCC; 671 G4double tmax = min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 688 G4double tmax = std::min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 689 if(cutEnergy >= tmax) return 0.0; 672 690 G4double particleMass = p->GetPDGMass(); 673 691 G4double scaledTkin = kineticEnergy*proton_mass_c2/particleMass; … … 675 693 G4double charge2 = charge*charge, cross, cross1, cross2; 676 694 G4double photon1, photon2, plasmon1, plasmon2; 695 696 const G4MaterialCutsCouple* matCC = CurrentCouple(); 677 697 678 698 const G4ProductionCutsTable* theCoupleTable= … … 1225 1245 } 1226 1246 1247 ///////////////////////////////////////////////////////////////////// 1248 1249 G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p, 1250 G4double kinEnergy) 1251 { 1252 G4double tmax = kinEnergy; 1253 if(p == fElectron) tmax *= 0.5; 1254 else if(p != fPositron) { 1255 G4double mass = p->GetPDGMass(); 1256 G4double ratio= electron_mass_c2/mass; 1257 G4double gamma= kinEnergy/mass + 1.0; 1258 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) / 1259 (1. + 2.0*gamma*ratio + ratio*ratio); 1260 } 1261 return tmax; 1262 } 1263 1264 /////////////////////////////////////////////////////////////// 1265 1266 void G4PAIPhotonModel::DefineForRegion(const G4Region* r) 1267 { 1268 fPAIRegionVector.push_back(r); 1269 } 1270 1227 1271 1228 1272 // -
trunk/source/processes/electromagnetic/standard/src/G4PEEffectModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PEEffectModel.cc,v 1. 6 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PEEffectModel.cc,v 1.8 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 42 42 // 04.12.05 : SetProposedKineticEnergy(0.) for the killed photon (mma) 43 // 20.02.09 : Added initialisation of deexcitation flag and method 44 // CrossSectionPerVolume instead of mfp (V.Ivanchenko) 43 45 // 44 46 // Class Description: … … 66 68 theGamma = G4Gamma::Gamma(); 67 69 theElectron = G4Electron::Electron(); 70 fminimalEnergy = 1.0*eV; 68 71 } 69 72 … … 71 74 72 75 G4PEEffectModel::~G4PEEffectModel() 73 { 74 } 76 {} 75 77 76 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 79 81 const G4DataVector&) 80 82 { 81 if (isInitialized) return; 82 if (pParticleChange) 83 fParticleChange = 84 reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 85 else 86 fParticleChange = new G4ParticleChangeForGamma(); 87 88 fminimalEnergy = 1.0*eV; 83 // always false before the run 84 SetDeexcitationFlag(false); 85 86 if (isInitialized) return; 87 fParticleChange = GetParticleChangeForGamma(); 88 isInitialized = true; 89 } 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 92 93 G4double G4PEEffectModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 94 G4double energy, 95 G4double Z, G4double, 96 G4double, G4double) 97 { 98 G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy); 99 100 G4double energy2 = energy*energy; 101 G4double energy3 = energy*energy2; 102 G4double energy4 = energy2*energy2; 103 104 return SandiaCof[0]/energy + SandiaCof[1]/energy2 + 105 SandiaCof[2]/energy3 + SandiaCof[3]/energy4; 106 } 107 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 109 110 G4double G4PEEffectModel::CrossSectionPerVolume(const G4Material* material, 111 const G4ParticleDefinition*, 112 G4double energy, 113 G4double, G4double) 114 { 115 G4double* SandiaCof = 116 material->GetSandiaTable()->GetSandiaCofForMaterial(energy); 117 118 G4double energy2 = energy*energy; 119 G4double energy3 = energy*energy2; 120 G4double energy4 = energy2*energy2; 121 122 return SandiaCof[0]/energy + SandiaCof[1]/energy2 + 123 SandiaCof[2]/energy3 + SandiaCof[3]/energy4; 89 124 } 90 125 -
trunk/source/processes/electromagnetic/standard/src/G4PhotoElectricEffect.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PhotoElectricEffect.cc,v 1.4 1 2008/10/16 14:12:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4PhotoElectricEffect.cc,v 1.42 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 89 89 {} 90 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 93 G4bool G4PhotoElectricEffect::IsApplicable(const G4ParticleDefinition& p) 94 { 95 return (&p == G4Gamma::Gamma()); 96 } 97 91 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 92 99 -
trunk/source/processes/electromagnetic/standard/src/G4UniversalFluctuation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UniversalFluctuation.cc,v 1. 16 2008/10/22 16:04:33 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4UniversalFluctuation.cc,v 1.22 2009/03/20 18:11:23 urban Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 57 57 // 03-04-07 correction to get better width of eloss distr.(L.Urban) 58 58 // 13-07-07 add protection for very small step or low-density material (VI) 59 // 59 // 19-03-09 new width correction (does not depend on previous steps) (L.Urban) 60 // 20-03-09 modification in the width correction (L.Urban) 61 // 60 62 61 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 84 86 { 85 87 lastMaterial = 0; 86 facwidth = 1.000/keV;87 oldloss = 0.;88 samestep = 0.;89 88 } 90 89 … … 120 119 // 121 120 if (meanLoss < minLoss) 122 {123 oldloss = meanLoss;124 121 return meanLoss; 125 }126 122 127 123 if(!particle) InitialiseMe(dp->GetDefinition()); … … 179 175 e0 = material->GetIonisation()->GetEnergy0fluct(); 180 176 lastMaterial = material; 177 178 // modification of some model parameters 179 // (this part should go to materials later) 180 G4double p = 1.40; 181 f2Fluct *= p; 182 f1Fluct = 1.-f2Fluct; 183 G4double q = 1.00; 184 e2Fluct *= q; 185 e2LogFluct = log(e2Fluct); 186 e1LogFluct = (ipotLogFluct-f2Fluct*e2LogFluct)/f1Fluct; 187 e1Fluct = exp(e1LogFluct); 181 188 } 182 189 … … 185 192 186 193 G4double a1 = 0. , a2 = 0., a3 = 0. ; 187 188 // correction to get better width even using stepmax189 if(abs(meanLoss- oldloss) < 1.*eV)190 samestep += 1;191 else192 samestep = 1.;193 oldloss = meanLoss;194 G4double width = 1.+samestep*facwidth*meanLoss;195 if(width > 4.50) width = 4.50;196 e1 = width*e1Fluct;197 e2 = width*e2Fluct;198 194 199 195 // cut and material dependent rate … … 206 202 rate = 0.03+0.23*log(log(tmax/ipotFluct)); 207 203 G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct); 208 a1 = C*f1Fluct*(w2-e1LogFluct)/e1; 209 a2 = C*f2Fluct*(w2-e2LogFluct)/e2; 204 a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct; 205 a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct; 206 // correction in order to get better FWHM values 207 // ( scale parameters a1 and e1) 208 G4double width = 1.; 209 if(meanLoss > 10.*e1Fluct) 210 { 211 width = 3.1623/sqrt(meanLoss/e1Fluct); 212 if(width < a2/a1) 213 width = a2/a1; 214 } 215 a1 *= width; 216 e1 = e1Fluct/width; 217 e2 = e2Fluct; 210 218 } 211 219 } … … 305 313 } 306 314 307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 316 317 void 318 G4UniversalFluctuation::SetParticleAndCharge(const G4ParticleDefinition* part, 319 G4double q2) 320 { 321 if(part != particle) { 322 particle = part; 323 particleMass = part->GetPDGMass(); 324 } 325 chargeSquare = q2; 326 } 327 328 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel.cc,v 1.86 2008/10/29 14:15:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 26 // 27 // $Id: G4UrbanMscModel.cc,v 1.90 2009/04/29 13:30:22 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 29 // 29 30 // ------------------------------------------------------------------- … … 36 37 // Author: Laszlo Urban 37 38 // 38 // Creation date: 0 3.03.200139 // Creation date: 06.03.2008 39 40 // 40 41 // Modifications: 41 42 // 42 // 27-03-03 Move model part from G4MultipleScattering80 (V.Ivanchenko) 43 // 23-05-03 important change in angle distribution for muons/hadrons 44 // the central part now is similar to the Highland parametrization + 45 // minor correction in angle sampling algorithm (for all particles) 46 // (L.Urban) 47 // 30-05-03 misprint in SampleCosineTheta corrected(L.Urban) 48 // 27-03-03 Rename (V.Ivanchenko) 49 // 05-08-03 angle distribution has been modified (L.Urban) 50 // 06-11-03 precision problems solved for high energy (PeV) particles 51 // change in the tail of the angular distribution 52 // highKinEnergy is set to 100 PeV (L.Urban) 53 // 54 // 10-11-03 highKinEnergy is set back to 100 TeV, some tail tuning + 55 // cleaning (L.Urban) 56 // 26-11-03 correction in TrueStepLength : 57 // trueLength <= currentRange (L.Urban) 58 // 01-03-04 signature changed in SampleCosineTheta, 59 // energy dependence calculations has been simplified, 60 // 11-03-04 corrections in GeomPathLength,TrueStepLength, 61 // SampleCosineTheta 62 // 23-04-04 true -> geom and geom -> true transformation has been 63 // rewritten, changes in the angular distribution (L.Urban) 64 // 19-07-04 correction in SampleCosineTheta in order to avoid 65 // num. precision problems at high energy/small step(L.Urban) 66 // 17-08-04 changes in the angle distribution (slightly modified 67 // Highland formula for the width of the central part, 68 // changes in the numerical values of some other parameters) 69 // ---> approximately step independent distribution (L.Urban) 70 // 21-09-04 change in the tail of the angular distribution (L.Urban) 71 // 72 // 03-11-04 precision problem for very high energy ions and small stepsize 73 // solved in SampleCosineTheta (L.Urban). 74 // 15-04-05 optimize internal interface 75 // add SampleSecondaries method (V.Ivanchenko) 76 // 11-08-05 computation of lateral correlation added (L.Urban) 77 // 02-10-05 nuclear size correction computation removed, the correction 78 // included in the (theoretical) tabulated values (L.Urban) 79 // 17-01-06 computation of tail changed in SampleCosineTheta (l.Urban) 80 // 16-02-06 code cleaning + revised 'z' sampling (L.Urban) 81 // 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko) 82 // 07-03-06 Create G4UrbanMscModel and move there step limit 83 // calculation (V.Ivanchenko) 84 // 23-03-06 Bugfix in SampleCosineTheta method (L.Urban) 85 // 10-05-06 SetMscStepLimitation at initialisation (V.Ivantchenko) 86 // 11-05-06 name of data member safety changed to presafety, some new data 87 // members added (frscaling1,frscaling2,tlimitminfix,nstepmax) 88 // changes in ComputeTruePathLengthLimit,SampleCosineTheta (L.Urban) 89 // 17-05-06 parameters of theta0 in SampleCosineTheta changed 90 // c_highland 13.6*MeV ---> 13.26*MeV, 91 // corr_highland 0.555 ---> 0.54, 92 // value of data member geommin changed (5 nm -> 1 nm) (L.Urban) 93 // 13-10-06 data member factail removed, data member tkinlimit changed 94 // to lambdalimit, 95 // new data members tgeom,tnow,skin,skindepth,Zeff,geomlimit 96 // G4double GeomLimit(const G4Track& track) changed to 97 // void GeomLimit(const G4Track& track) 98 // - important changes in ComputeTruePathLengthLimit: 99 // possibility to have very small step(s) with single scattering 100 // before boundary crossing (with skin > 0) 101 // - changes in SampleCosineTheta : 102 // single scattering if step <= stepmin, parameter theta0 103 // slightly modified, tail modified (L.Urban) 104 // 20-10-06 parameter theta0 now computed in the (public) 105 // function ComputeTheta0, 106 // single scattering modified allowing not small 107 // angles as well (L.Urban) 108 // 23-10-06 correction in SampleSecondaries, now safety update 109 // computed in a simpler/faster way (L.Urban) 110 // 06-11-06 corrections in ComputeTruePathLengthLimit, results are 111 // more stable in calorimeters (L.Urban) 112 // 07-11-06 fix in GeomPathLength and SampleCosineTheta (L.Urban) 113 // 15-11-06 bugfix in SampleCosineTheta (L.Urban) 114 // 20-11-06 bugfix in single scattering part of SampleCosineTheta, 115 // single scattering just before boundary crossing now (L.Urban) 116 // 04-12-06 fix in ComputeTruePathLengthLimit (L.Urban) 117 // 17-01-07 remove LocatePoint from GeomLimit method (V.Ivanchenko) 118 // 19-01-07 fix of true < geom problem (L.Urban) 119 // 25-01-07 add protections from NaN vaues and for zero geometry step (VI) 120 // 31-01-07 correction in SampleCosineTheta: screening parameter 121 // corrected in single/plural scattering + 122 // code cleaning (L.Urban) 123 // 01-02-07 restore logic inside ComputeTrueStepLength (V.Ivanchenko) 124 // 06-02-07 Move SetMscStepLimitation method into the source, add there 125 // reinitialisation of some private members, add protection inside 126 // SampleDisplacement(VI) 127 // 07-02-07 fix single scattering for heavy particles, now skin=1 can be used 128 // for heavy particles as well (L.Urban) 129 // 08-02-07 randomization of tlimit removed (L.Urban) 130 // 11-02-07 modified stepping algorithm for skin=0 131 // 15-02-07 new data member: smallstep, small steps with single scattering 132 // before + after boundary for skin > 1 133 // 23-02-07 use tPathLength inside ComputeStep instead of geombig 134 // 24-02-07 step reduction before boundary for 'small' geomlimit only 135 // 03-03-07 single scattering around boundaries only (L.Urban) 136 // 07-03-07 bugfix in ComputeTruePathLengthLimit (for skin > 0.) (L.Urban) 137 // 10-04-07 optimize logic of ComputeTruePathLengthLimit, remove 138 // unused members, use unique G4SafetyHelper (V.Ivanchenko) 139 // 01-05-07 optimization for skin > 0 (L.Urban) 140 // 05-07-07 modified model functions in SampleCosineTheta (L.Urban) 141 // 06-07-07 theta0 is not the same for e-/e+ as for heavy particles (L.Urban) 142 // 02-08-07 compare safety not with 0. but with tlimitminfix (V.Ivanchenko) 143 // 09-08-07 tail of angular distribution has been modified (L.Urban) 144 // 22-10-07 - corr. in ComputeGeomPathLength in order to get better low 145 // energy behaviour for heavy particles, 146 // - theta0 is slightly modified, 147 // - some old inconsistency/bug is cured in SampleCosineTheta, 148 // now 0 <= prob <= 1 in any case (L.Urban) 149 // 26-10-07 different correction parameters for e/mu/hadrons in ComputeTheta0 150 // 30-11-07 fix in ComputeTheta0 (L.Urban) 151 // 43 // 06-03-2008 starting point : G4UrbanMscModel2 = G4UrbanMscModel 9.1 ref 02 44 // 45 // 13-03-08 Bug in SampleScattering (which caused lateral asymmetry) fixed 46 // (L.Urban) 47 // 48 // 14-03-08 Simplification of step limitation in ComputeTruePathLengthLimit, 49 // + tlimitmin is the same for UseDistancetoBoundary and 50 // UseSafety (L.Urban) 51 // 52 // 16-03-08 Reorganization of SampleCosineTheta + new method SimpleScattering 53 // SimpleScattering is used if the relative energy loss is too big 54 // or theta0 is too big (see data members rellossmax, theta0max) 55 // (L.Urban) 56 // 57 // 17-03-08 tuning of the correction factor in ComputeTheta0 (L.Urban) 58 // 59 // 19-03-08 exponent c of the 'tail' model function is not equal to 2 any more, 60 // value of c has been extracted from some e- scattering data (L.Urban) 61 // 62 // 24-03-08 Step limitation in ComputeTruePathLengthLimit has been 63 // simplified further + some data members have been removed (L.Urban) 64 // 65 // 24-07-08 central part of scattering angle (theta0) has been tuned 66 // tail of the scattering angle distribution has been tuned 67 // using some e- and proton scattering data 68 // 69 // 05-08-08 bugfix in ComputeTruePathLengthLimit (L.Urban) 70 // 71 // 09-10-08 theta0 and tail have been retuned using some e-,mu,proton 72 // scattering data (L.Urban) 73 // + single scattering without path length correction for 74 // small steps (t < tlimitmin, for UseDistanceToBoundary only) 75 // 76 // 15-10-08 Moliere-Bethe screening in the single scattering part(L.Urban) 77 // 78 // 17-10-08 stepping similar to that in model (9.1) for UseSafety case 79 // for e+/e- in order to speed up the code for calorimeters 80 // 81 // 23-10-08 bugfix in the screeningparameter of the single scattering part, 82 // some technical change in order to speed up the code (UpdateCache) 83 // 84 // 27-10-08 bugfix in ComputeTruePathLengthLimit (affects UseDistanceToBoundary 85 // stepping type only) (L.Urban) 86 // 87 // 28-04-09 move G4UrbanMscModel2 from the g49.2 to G4UrbanMscModel. 88 // now it is frozen (V.Ivanchenk0) 152 89 153 90 // Class Description: … … 157 94 158 95 // ------------------------------------------------------------------- 96 // In its present form the model can be used for simulation 97 // of the e-/e+, muon and charged hadron multiple scattering 159 98 // 160 99 … … 166 105 #include "Randomize.hh" 167 106 #include "G4Electron.hh" 168 169 107 #include "G4LossTableManager.hh" 170 108 #include "G4ParticleChangeForMSC.hh" 171 #include "G4TransportationManager.hh"172 #include "G4SafetyHelper.hh"173 109 174 110 #include "G4Poisson.hh" 111 #include "globals.hh" 175 112 176 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 182 119 isInitialized(false) 183 120 { 184 masslimite = 0.6*MeV; 185 masslimitmu = 110.*MeV; 186 121 masslimite = 0.6*MeV; 122 lambdalimit = 1.*mm; 123 fr = 0.02; 124 facsafety = 0.3; 187 125 taubig = 8.0; 188 126 tausmall = 1.e-16; … … 193 131 smallstep = 1.e10; 194 132 currentRange = 0. ; 195 frscaling2 = 0.25; 196 frscaling1 = 1.-frscaling2; 133 rangeinit = 0.; 197 134 tlimit = 1.e10*mm; 198 135 tlimitmin = 10.*tlimitminfix; 199 nstepmax = 25.;136 tgeom = 1.e50*mm; 200 137 geombig = 1.e50*mm; 201 138 geommin = 1.e-3*mm; 202 139 geomlimit = geombig; 203 140 presafety = 0.*mm; 141 142 y = 0.; 143 144 Zold = 0.; 204 145 Zeff = 1.; 146 Z2 = 1.; 147 Z23 = 1.; 148 lnZ = 0.; 149 coeffth1 = 0.; 150 coeffth2 = 0.; 151 coeffc1 = 0.; 152 coeffc2 = 0.; 153 scr1ini = fine_structure_const*fine_structure_const* 154 electron_mass_c2*electron_mass_c2/(0.885*0.885*4.*pi); 155 scr2ini = 3.76*fine_structure_const*fine_structure_const; 156 scr1 = 0.; 157 scr2 = 0.; 158 159 theta0max = pi/6.; 160 rellossmax = 0.50; 161 third = 1./3.; 205 162 particle = 0; 206 163 theManager = G4LossTableManager::Instance(); … … 218 175 219 176 void G4UrbanMscModel::Initialise(const G4ParticleDefinition* p, 220 const G4DataVector&)177 const G4DataVector&) 221 178 { 222 179 skindepth = skin*stepmin; 223 180 if(isInitialized) return; 224 225 181 // set values of some data members 226 182 SetParticle(p); 227 183 228 if (pParticleChange) 229 fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange); 230 else 231 fParticleChange = new G4ParticleChangeForMSC(); 232 233 safetyHelper = G4TransportationManager::GetTransportationManager() 234 ->GetSafetyHelper(); 235 safetyHelper->InitialiseHelper(); 184 fParticleChange = GetParticleChangeForMSC(); 185 InitialiseSafetyHelper(); 236 186 237 187 isInitialized = true; … … 385 335 if(mass > electron_mass_c2) 386 336 { 387 G4double TAU = KineticEnergy/mass ; 388 G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ; 389 G4double w = c-2. ; 390 G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ; 391 eKineticEnergy = electron_mass_c2*tau ; 392 } 393 394 G4double ChargeSquare = charge*charge; 337 G4double TAU = KineticEnergy/mass ; 338 G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ; 339 G4double w = c-2. ; 340 G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ; 341 eKineticEnergy = electron_mass_c2*tau ; 342 } 395 343 396 344 G4double eTotalEnergy = eKineticEnergy + electron_mass_c2 ; … … 490 438 { 491 439 tPathLength = currentMinimalStep; 492 const G4DynamicParticle* dp = track.GetDynamicParticle();493 440 G4StepPoint* sp = track.GetStep()->GetPreStepPoint(); 494 441 G4StepStatus stepStatus = sp->GetStepStatus(); 442 443 const G4DynamicParticle* dp = track.GetDynamicParticle(); 495 444 496 445 if(stepStatus == fUndefined) { … … 516 465 presafety = sp->GetSafety(); 517 466 518 // G4cout << "G4UrbanMscModel::ComputeTruePathLengthLimit tPathLength= "519 // <<tPathLength<<" safety= " << presafety520 // << " range= " <<currentRange<<G4endl;467 // G4cout << "G4UrbanMscModel::ComputeTruePathLengthLimit tPathLength= " 468 // <<tPathLength<<" safety= " << presafety 469 // << " range= " <<currentRange<<G4endl; 521 470 522 471 // far from geometry boundary … … 532 481 { 533 482 //compute geomlimit and presafety 534 G eomLimit(track);535 536 // is far from boundary537 if(currentRange < =presafety)483 G4double geomlimit = ComputeGeomLimit(track, presafety, currentRange); 484 485 // is it far from boundary ? 486 if(currentRange < presafety) 538 487 { 539 488 inside = true; … … 546 495 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 547 496 { 497 rangeinit = currentRange; 548 498 if(stepStatus == fUndefined) smallstep = 1.e10; 549 499 else smallstep = 1.; 550 500 551 // facrange scaling in lambda 552 // not so strong step restriction above lambdalimit 553 G4double facr = facrange; 554 if(lambda0 > lambdalimit) 555 facr *= frscaling1+frscaling2*lambda0/lambdalimit; 556 557 // constraint from the physics 558 if (currentRange > lambda0) tlimit = facr*currentRange; 559 else tlimit = facr*lambda0; 560 561 if(tlimit > currentRange) tlimit = currentRange; 562 563 //define stepmin here (it depends on lambda!) 564 //rough estimation of lambda_elastic/lambda_transport 565 G4double rat = currentKinEnergy/MeV ; 566 rat = 1.e-3/(rat*(10.+rat)) ; 567 //stepmin ~ lambda_elastic 568 stepmin = rat*lambda0; 569 skindepth = skin*stepmin; 570 571 //define tlimitmin 572 tlimitmin = 10.*stepmin; 573 if(tlimitmin < tlimitminfix) tlimitmin = tlimitminfix; 574 575 //lower limit for tlimit 576 if(tlimit < tlimitmin) tlimit = tlimitmin; 577 578 // constraint from the geometry (if tlimit above is too big) 579 G4double tgeom = geombig; 580 501 // constraint from the geometry 581 502 if((geomlimit < geombig) && (geomlimit > geommin)) 582 503 { … … 585 506 else 586 507 tgeom = 2.*geomlimit/facgeom; 587 588 if(tlimit > tgeom) tlimit = tgeom;589 508 } 590 } 591 592 //if track starts far from boundaries increase tlimit! 593 if(tlimit < facsafety*presafety) tlimit = facsafety*presafety ; 509 else 510 tgeom = geombig; 511 512 //define stepmin here (it depends on lambda!) 513 //rough estimation of lambda_elastic/lambda_transport 514 G4double rat = currentKinEnergy/MeV ; 515 rat = 1.e-3/(rat*(10.+rat)) ; 516 //stepmin ~ lambda_elastic 517 stepmin = rat*lambda0; 518 skindepth = skin*stepmin; 519 520 //define tlimitmin 521 tlimitmin = 10.*stepmin; 522 if(tlimitmin < tlimitminfix) tlimitmin = tlimitminfix; 523 524 } 525 526 //step limit 527 tlimit = facrange*rangeinit; 528 if(tlimit < facsafety*presafety) 529 tlimit = facsafety*presafety; 530 531 //lower limit for tlimit 532 if(tlimit < tlimitmin) tlimit = tlimitmin; 533 534 if(tlimit > tgeom) tlimit = tgeom; 594 535 595 536 // G4cout << "tgeom= " << tgeom << " geomlimit= " << geomlimit … … 597 538 598 539 // shortcut 599 if((tPathLength < tlimit) && (tPathLength < presafety)) 540 if((tPathLength < tlimit) && (tPathLength < presafety) && 541 (smallstep >= skin) && (tPathLength < geomlimit-0.999*skindepth)) 600 542 return tPathLength; 601 602 G4double tnow = tlimit;603 // optimization ...604 if(geomlimit < geombig) tnow = max(tlimit,facsafety*geomlimit);605 543 606 544 // step reduction near to boundary 607 545 if(smallstep < skin) 608 546 { 609 t now= stepmin;547 tlimit = stepmin; 610 548 insideskin = true; 611 549 } … … 614 552 if(geomlimit > skindepth) 615 553 { 616 if(t now> geomlimit-0.999*skindepth)617 t now= geomlimit-0.999*skindepth;554 if(tlimit > geomlimit-0.999*skindepth) 555 tlimit = geomlimit-0.999*skindepth; 618 556 } 619 557 else 620 558 { 621 559 insideskin = true; 622 if(t now > stepmin) tnow= stepmin;560 if(tlimit > stepmin) tlimit = stepmin; 623 561 } 624 562 } 625 563 626 if(tnow < stepmin) tnow = stepmin; 627 628 if(tPathLength > tnow) tPathLength = tnow ; 564 if(tlimit < stepmin) tlimit = stepmin; 565 566 if(tPathLength > tlimit) tPathLength = tlimit ; 567 629 568 } 630 569 // for 'normal' simulation with or without magnetic field … … 635 574 // i.e. when it is needed for optimization purposes 636 575 if((stepStatus != fGeomBoundary) && (presafety < tlimitminfix)) 637 presafety = safetyHelper->ComputeSafety(sp->GetPosition());576 presafety = ComputeSafety(sp->GetPosition(),tPathLength); 638 577 639 578 // is far from boundary … … 645 584 646 585 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 647 { 648 // facrange scaling in lambda 649 // not so strong step restriction above lambdalimit 650 G4double facr = facrange; 651 if(lambda0 > lambdalimit) 652 facr *= frscaling1+frscaling2*lambda0/lambdalimit; 653 654 // constraint from the physics 655 if (currentRange > lambda0) tlimit = facr*currentRange; 656 else tlimit = facr*lambda0; 657 658 //lower limit for tlimit 659 tlimitmin = std::max(tlimitminfix,lambda0/nstepmax); 660 if(tlimit < tlimitmin) tlimit = tlimitmin; 661 } 662 663 //if track starts far from boundaries increase tlimit! 664 if(tlimit < facsafety*presafety) tlimit = facsafety*presafety ; 586 { 587 rangeinit = currentRange; 588 fr = facrange; 589 // 9.1 like stepping for e+/e- only (not for muons,hadrons) 590 if(mass < masslimite) 591 { 592 if(lambda0 > currentRange) 593 rangeinit = lambda0; 594 if(lambda0 > lambdalimit) 595 fr *= 0.75+0.25*lambda0/lambdalimit; 596 } 597 598 //lower limit for tlimit 599 G4double rat = currentKinEnergy/MeV ; 600 rat = 1.e-3/(rat*(10.+rat)) ; 601 tlimitmin = 10.*lambda0*rat; 602 if(tlimitmin < tlimitminfix) tlimitmin = tlimitminfix; 603 } 604 //step limit 605 tlimit = fr*rangeinit; 606 607 if(tlimit < facsafety*presafety) 608 tlimit = facsafety*presafety; 609 610 //lower limit for tlimit 611 if(tlimit < tlimitmin) tlimit = tlimitmin; 665 612 666 613 if(tPathLength > tlimit) tPathLength = tlimit; … … 679 626 } 680 627 } 681 // G4cout << "tPathLength= " << tPathLength << " geomlimit= " << geomlimit628 // G4cout << "tPathLength= " << tPathLength << " geomlimit= " << geomlimit 682 629 // << " currentMinimalStep= " << currentMinimalStep << G4endl; 683 684 630 return tPathLength ; 685 }686 687 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......688 689 void G4UrbanMscModel::GeomLimit(const G4Track& track)690 {691 geomlimit = geombig;692 693 // no geomlimit for the World volume694 if((track.GetVolume() != 0) &&695 (track.GetVolume() != safetyHelper->GetWorldVolume()))696 {697 G4double cstep = currentRange;698 699 geomlimit = safetyHelper->CheckNextStep(700 track.GetStep()->GetPreStepPoint()->GetPosition(),701 track.GetMomentumDirection(),702 cstep,703 presafety);704 // G4cout << "!!!G4UrbanMscModel::GeomLimit presafety= " << presafety705 // << " limit= " << geomlimit << G4endl;706 }707 631 } 708 632 … … 761 685 if(samplez) 762 686 { 763 const G4double ztmax = 0.99 , onethird = 1./3.;687 const G4double ztmax = 0.99 ; 764 688 G4double zt = zmean/tPathLength ; 765 689 … … 767 691 { 768 692 G4double u,cz1; 769 if(zt >= onethird)693 if(zt >= third) 770 694 { 771 695 G4double cz = 0.5*(3.*zt-1.)/(1.-zt) ; … … 835 759 KineticEnergy*(KineticEnergy+2.*mass)/ 836 760 ((currentKinEnergy+mass)*(KineticEnergy+mass))); 837 G4doubley = trueStepLength/currentRadLength;761 y = trueStepLength/currentRadLength; 838 762 G4double theta0 = c_highland*std::abs(charge)*sqrt(y)/betacp; 839 763 y = log(y); 840 if(mass < masslimite) 841 theta0 *= (1.+0.051*y); 842 else if(mass < masslimitmu) 843 theta0 *= (1.+0.044*y); 844 else 845 theta0 *= (1.+0.038*y); 846 764 // correction factor from e-/proton scattering data 765 G4double corr = coeffth1+coeffth2*y; 766 if(y < -6.5) corr -= 0.011*(6.5+y); 767 theta0 *= corr ; 768 847 769 return theta0; 848 770 } … … 854 776 { 855 777 G4double kineticEnergy = dynParticle->GetKineticEnergy(); 778 856 779 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix) || 857 (tPathLength/tausmall < lambda0) ) return;780 (tPathLength/tausmall < lambda0)) return; 858 781 859 782 G4double cth = SampleCosineTheta(tPathLength,kineticEnergy); 783 860 784 // protection against 'bad' cth values 861 if( abs(cth) > 1.) return;785 if(std::abs(cth) > 1.) return; 862 786 863 787 G4double sth = sqrt((1.0 - cth)*(1.0 + cth)); … … 874 798 875 799 G4double r = SampleDisplacement(); 876 /*800 /* 877 801 G4cout << "G4UrbanMscModel::SampleSecondaries: e(MeV)= " << kineticEnergy 878 802 << " sinTheta= " << sth << " r(mm)= " << r … … 880 804 << " geomStep(mm)= " << zPathLength 881 805 << G4endl; 882 */806 */ 883 807 if(r > 0.) 884 808 { … … 889 813 // compute it from the lateral correlation 890 814 G4double Phi = 0.; 891 if(std::abs(r*sth) < latcorr) {815 if(std::abs(r*sth) < latcorr) 892 816 Phi = twopi*G4UniformRand(); 893 } else { 817 else 818 { 894 819 G4double psi = std::acos(latcorr/(r*sth)); 895 if(G4UniformRand() < 0.5) Phi = phi+psi; 896 else Phi = phi-psi; 897 } 820 if(G4UniformRand() < 0.5) 821 Phi = phi+psi; 822 else 823 Phi = phi-psi; 824 } 898 825 899 826 dirx = std::cos(Phi); … … 903 830 latDirection.rotateUz(oldDirection); 904 831 905 G4ThreeVector Position = *(fParticleChange->GetProposedPosition()); 906 G4double fac = 1.; 907 if(r > safety) { 908 // ******* so safety is computed at boundary too ************ 909 G4double newsafety = safetyHelper->ComputeSafety(Position); 910 if(r > newsafety) 911 fac = newsafety/r ; 912 } 913 914 if(fac > 0.) 915 { 916 // compute new endpoint of the Step 917 G4ThreeVector newPosition = Position+fac*r*latDirection; 918 919 // definitely not on boundary 920 if(1. == fac) { 921 safetyHelper->ReLocateWithinVolume(newPosition); 922 923 } else { 924 // check safety after displacement 925 G4double postsafety = safetyHelper->ComputeSafety(newPosition); 926 927 // displacement to boundary 928 // if(postsafety < tlimitminfix) { 929 if(postsafety <= 0.0) { 930 safetyHelper->Locate(newPosition, newDirection); 931 932 // not on the boundary 933 } else { 934 safetyHelper->ReLocateWithinVolume(newPosition); 935 } 936 } 937 fParticleChange->ProposePosition(newPosition); 938 } 939 } 832 ComputeDisplacement(fParticleChange, latDirection, r, safety); 833 } 940 834 } 941 835 } … … 951 845 Zeff = couple->GetMaterial()->GetTotNbOfElectPerVolume()/ 952 846 couple->GetMaterial()->GetTotNbOfAtomsPerVolume() ; 847 848 if(Zold != Zeff) 849 UpdateCache(); 953 850 954 851 if(insideskin) … … 960 857 if(n > 0) 961 858 { 962 G4double tm = KineticEnergy/electron_mass_c2; 963 // ascr - screening parameter 964 G4double ascr = exp(log(Zeff)/3.)/(137.*sqrt(tm*(tm+2.))); 965 G4double ascr1 = 1.+0.5*ascr*ascr; 859 //screening (Moliere-Bethe) 860 G4double mom2 = KineticEnergy*(2.*mass+KineticEnergy); 861 G4double beta2 = mom2/((KineticEnergy+mass)*(KineticEnergy+mass)); 862 G4double ascr = scr1/mom2; 863 ascr *= 1.13+scr2/beta2; 864 G4double ascr1 = 1.+2.*ascr; 966 865 G4double bp1=ascr1+1.; 967 866 G4double bm1=ascr1-1.; 867 968 868 // single scattering from screened Rutherford x-section 969 869 G4double ct,st,phi; … … 1001 901 else if (tau >= tausmall) 1002 902 { 1003 G4double b=2.,bp1=3.,bm1=1.;1004 G4double prob = 0.;903 G4double xsi = 3.0; 904 G4double x0 = 1.; 1005 905 G4double a = 1., ea = 0., eaa = 1.; 906 G4double b=2.,b1=3.,bx=1.,eb1=3.,ebx=1.; 907 G4double prob = 1. , qprob = 1. ; 1006 908 G4double xmean1 = 1., xmean2 = 0.; 1007 909 G4double xmeanth = exp(-tau); 910 G4double x2meanth = (1.+2.*exp(-2.5*tau))/3.; 911 912 G4double relloss = 1.-KineticEnergy/currentKinEnergy; 913 if(relloss > rellossmax) 914 return SimpleScattering(xmeanth,x2meanth); 915 1008 916 G4double theta0 = ComputeTheta0(trueStepLength,KineticEnergy); 1009 917 1010 // prote xction for very small angles918 // protection for very small angles 1011 919 if(theta0 < tausmall) return cth; 1012 920 921 if(theta0 > theta0max) 922 return SimpleScattering(xmeanth,x2meanth); 1013 923 G4double sth = sin(0.5*theta0); 1014 924 a = 0.25/(sth*sth); 1015 925 1016 ea = exp(-2.*a); 1017 eaa = 1.-ea ; 1018 xmean1 = (1.+ea)/eaa-1./a; 1019 1020 G4double xmeanth = exp(-tau); 1021 b = 1./xmeanth ; 1022 bp1 = b+1.; 1023 bm1 = b-1.; 1024 // protection 1025 if(bm1 > 0.) 1026 xmean2 = b-0.5*bp1*bm1*log(bp1/bm1); 1027 else 926 ea = exp(-xsi); 927 eaa = 1.-ea ; 928 xmean1 = 1.-(1.-(1.+xsi)*ea)/(a*eaa); 929 x0 = 1.-xsi/a; 930 931 if(xmean1 <= 0.999*xmeanth) 932 return SimpleScattering(xmeanth,x2meanth); 933 934 // from MUSCAT H,Be,Fe data 935 G4double c = coeffc1; 936 if(y > -13.5) 937 c += coeffc2*exp(3.*log(y+13.5)); 938 939 if(abs(c-3.) < 0.001) c = 3.001; 940 if(abs(c-2.) < 0.001) c = 2.001; 941 942 G4double c1 = c-1.; 943 944 //from continuity of derivatives 945 b = 1.+(c-xsi)/a; 946 947 b1 = b+1.; 948 bx = c/a; 949 eb1 = exp(c1*log(b1)); 950 ebx = exp(c1*log(bx)); 951 952 xmean2 = (x0*eb1+ebx-(eb1*bx-b1*ebx)/(c-2.))/(eb1-ebx); 953 954 G4double f1x0 = a*ea/eaa; 955 G4double f2x0 = c1*eb1/(bx*(eb1-ebx)); 956 prob = f2x0/(f1x0+f2x0); 957 958 qprob = xmeanth/(prob*xmean1+(1.-prob)*xmean2); 959 960 // sampling of costheta 961 if(G4UniformRand() < qprob) 1028 962 { 1029 b = 1.+tau; 1030 bp1 = 2.+tau; 1031 bm1 = tau; 1032 xmean2 = 1.+tau*(1.-log(2./tau)); 1033 } 1034 1035 if((xmean1 >= xmeanth) && (xmean2 <= xmeanth)) 1036 { 1037 //normal case 1038 prob = (xmeanth-xmean2)/(xmean1-xmean2); 963 if(G4UniformRand() < prob) 964 cth = 1.+log(ea+G4UniformRand()*eaa)/a ; 965 else 966 cth = b-b1*bx/exp(log(ebx+(eb1-ebx)*G4UniformRand())/c1) ; 1039 967 } 1040 968 else 1041 { 1042 // x1 < xth ( x2 < xth automatically if b = 1/xth) 1043 // correct a (xmean1) 1044 if((xmeanth-xmean1)/xmeanth < 1.e-5) 1045 { 1046 // xmean1 is small probably due to precision problems 1047 xmean1 = 0.50*(1.+xmeanth); 1048 prob = (xmeanth-xmean2)/(xmean1-xmean2); 1049 } 1050 else 1051 { 1052 // correct a in order to have x1=xth 1053 G4int i=0, imax=10; 1054 do 1055 { 1056 a = 1./(1.-xmeanth+2.*ea/eaa); 1057 ea = exp(-2.*a); 1058 eaa = 1.-ea; 1059 xmean1 = (1.+ea)/eaa-1./a; 1060 i += 1; 1061 } while ((std::abs((xmeanth-xmean1)/xmeanth) > 0.05) && (i < imax)); 1062 prob = 1.; 1063 } 1064 } 1065 1066 // sampling of costheta 1067 if (G4UniformRand() < prob) 1068 cth = 1.+log(ea+G4UniformRand()*eaa)/a ; 1069 else 1070 cth = b-bp1*bm1/(bm1+2.*G4UniformRand()) ; 969 cth = -1.+2.*G4UniformRand(); 1071 970 } 1072 971 } 1073 972 return cth ; 973 } 974 975 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 976 977 G4double G4UrbanMscModel::SimpleScattering(G4double xmeanth,G4double x2meanth) 978 { 979 // 'large angle scattering' 980 // 2 model functions with correct xmean and x2mean 981 G4double a = (2.*xmeanth+9.*x2meanth-3.)/(2.*xmeanth-3.*x2meanth+1.); 982 G4double prob = (a+2.)*xmeanth/a; 983 984 // sampling 985 G4double cth = 1.; 986 if(G4UniformRand() < prob) 987 cth = -1.+2.*exp(log(G4UniformRand())/(a+1.)); 988 else 989 cth = -1.+2.*G4UniformRand(); 990 return cth; 1074 991 } 1075 992 … … 1137 1054 1138 1055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 1139 1140 void G4UrbanMscModel::SampleSecondaries(std::vector<G4DynamicParticle*>*,1141 const G4MaterialCutsCouple*,1142 const G4DynamicParticle*,1143 G4double,1144 G4double)1145 {}1146 1147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel2.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4UrbanMscModel2.cc,v 1. 18 2008/12/18 13:01:36 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4UrbanMscModel2.cc,v 1.26 2009/05/19 06:26:10 urban Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- … … 104 104 #include "G4LossTableManager.hh" 105 105 #include "G4ParticleChangeForMSC.hh" 106 #include "G4TransportationManager.hh"107 #include "G4SafetyHelper.hh"108 106 109 107 #include "G4Poisson.hh" … … 181 179 SetParticle(p); 182 180 183 if (pParticleChange) 184 fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange); 185 else 186 fParticleChange = new G4ParticleChangeForMSC(); 187 188 safetyHelper = G4TransportationManager::GetTransportationManager() 189 ->GetSafetyHelper(); 190 safetyHelper->InitialiseHelper(); 181 fParticleChange = GetParticleChangeForMSC(); 182 InitialiseSafetyHelper(); 191 183 192 184 isInitialized = true; … … 486 478 { 487 479 //compute geomlimit and presafety 488 G eomLimit(track);480 G4double geomlimit = ComputeGeomLimit(track, presafety, currentRange); 489 481 490 482 // is it far from boundary ? … … 499 491 500 492 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 501 {493 { 502 494 rangeinit = currentRange; 503 if(stepStatus == fUndefined) smallstep = 1.e10; 504 else smallstep = 1.; 505 506 // constraint from the geometry 507 if((geomlimit < geombig) && (geomlimit > geommin)) 508 { 509 if(stepStatus == fGeomBoundary) 510 tgeom = geomlimit/facgeom; 511 else 512 tgeom = 2.*geomlimit/facgeom; 513 } 514 else 515 tgeom = geombig; 495 if(stepStatus == fUndefined) smallstep = 1.e10; 496 else smallstep = 1.; 516 497 517 498 //define stepmin here (it depends on lambda!) … … 522 503 stepmin = rat*lambda0; 523 504 skindepth = skin*stepmin; 524 525 505 //define tlimitmin 526 506 tlimitmin = 10.*stepmin; 527 507 if(tlimitmin < tlimitminfix) tlimitmin = tlimitminfix; 528 508 509 // constraint from the geometry 510 if((geomlimit < geombig) && (geomlimit > geommin)) 511 { 512 // geomlimit is a geometrical step length 513 // transform it to true path length (estimation) 514 if((1.-geomlimit/lambda0) > 0.) 515 geomlimit = -lambda0*log(1.-geomlimit/lambda0)+tlimitmin ; 516 517 if(stepStatus == fGeomBoundary) 518 tgeom = geomlimit/facgeom; 519 else 520 tgeom = 2.*geomlimit/facgeom; 521 } 522 else 523 tgeom = geombig; 529 524 } 525 530 526 531 527 //step limit … … 579 575 // i.e. when it is needed for optimization purposes 580 576 if((stepStatus != fGeomBoundary) && (presafety < tlimitminfix)) 581 presafety = safetyHelper->ComputeSafety(sp->GetPosition());577 presafety = ComputeSafety(sp->GetPosition(),tPathLength); 582 578 583 579 // is far from boundary … … 634 630 // << " currentMinimalStep= " << currentMinimalStep << G4endl; 635 631 return tPathLength ; 636 }637 638 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......639 640 void G4UrbanMscModel2::GeomLimit(const G4Track& track)641 {642 geomlimit = geombig;643 644 // no geomlimit for the World volume645 if((track.GetVolume() != 0) &&646 (track.GetVolume() != safetyHelper->GetWorldVolume()))647 {648 G4double cstep = currentRange;649 650 geomlimit = safetyHelper->CheckNextStep(651 track.GetStep()->GetPreStepPoint()->GetPosition(),652 track.GetMomentumDirection(),653 cstep,654 presafety);655 /*656 G4cout << "!!!G4UrbanMscModel2::GeomLimit presafety= " << presafety657 << " r= " << currentRange658 << " limit= " << geomlimit << G4endl;659 */660 }661 632 } 662 633 … … 792 763 G4double theta0 = c_highland*std::abs(charge)*sqrt(y)/betacp; 793 764 y = log(y); 794 // correction factor from e- /protonscattering data765 // correction factor from e- scattering data 795 766 G4double corr = coeffth1+coeffth2*y; 796 if(y < -6.5) corr -= 0.011*(6.5+y); 767 797 768 theta0 *= corr ; 798 769 … … 860 831 latDirection.rotateUz(oldDirection); 861 832 862 G4ThreeVector Position = *(fParticleChange->GetProposedPosition()); 863 G4double fac = 1.; 864 if(r > safety) { 865 // ******* so safety is computed at boundary too ************ 866 G4double newsafety = safetyHelper->ComputeSafety(Position); 867 if(r > newsafety) 868 fac = newsafety/r ; 869 } 870 871 if(fac > 0.) 872 { 873 // compute new endpoint of the Step 874 G4ThreeVector newPosition = Position+fac*r*latDirection; 875 876 // definitely not on boundary 877 if(1. == fac) { 878 safetyHelper->ReLocateWithinVolume(newPosition); 879 880 } else { 881 // check safety after displacement 882 G4double postsafety = safetyHelper->ComputeSafety(newPosition); 883 884 // displacement to boundary 885 if(postsafety <= 0.0) { 886 safetyHelper->Locate(newPosition, newDirection); 887 888 // not on the boundary 889 } else { 890 safetyHelper->ReLocateWithinVolume(newPosition); 891 } 892 } 893 fParticleChange->ProposePosition(newPosition); 894 } 895 } 833 ComputeDisplacement(fParticleChange, latDirection, r, safety); 834 } 896 835 } 897 836 } … … 963 902 else if (tau >= tausmall) 964 903 { 965 G4double xsi = 3. 0;904 G4double xsi = 3.; 966 905 G4double x0 = 1.; 967 906 G4double a = 1., ea = 0., eaa = 1.; … … 994 933 return SimpleScattering(xmeanth,x2meanth); 995 934 996 // from MUSCAT H,Be,Fe data 997 G4double c = coeffc1; 998 if(y > -13.5) 999 c += coeffc2*exp(3.*log(y+13.5)); 935 // from e- and muon scattering data 936 G4double c = coeffc1+coeffc2*y; ; 1000 937 1001 938 if(abs(c-3.) < 0.001) c = 3.001; 1002 939 if(abs(c-2.) < 0.001) c = 2.001; 940 if(abs(c-1.) < 0.001) c = 1.001; 1003 941 1004 942 G4double c1 = c-1.; … … 1116 1054 1117 1055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 1118 1119 void G4UrbanMscModel2::SampleSecondaries(std::vector<G4DynamicParticle*>*,1120 const G4MaterialCutsCouple*,1121 const G4DynamicParticle*,1122 G4double,1123 G4double)1124 {}1125 1126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel90.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel90.cc,v 1.1 0 2008/10/29 14:15:30vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4UrbanMscModel90.cc,v 1.13 2009/04/10 18:10:58 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 60 60 #include "G4LossTableManager.hh" 61 61 #include "G4ParticleChangeForMSC.hh" 62 #include "G4TransportationManager.hh"63 #include "G4SafetyHelper.hh"64 62 65 63 #include "G4Poisson.hh" … … 113 111 SetParticle(p); 114 112 115 if (pParticleChange) { 116 fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange); 117 } else { 118 fParticleChange = new G4ParticleChangeForMSC(); 119 } 120 safetyHelper = G4TransportationManager::GetTransportationManager() 121 ->GetSafetyHelper(); 122 safetyHelper->InitialiseHelper(); 113 fParticleChange = GetParticleChangeForMSC(); 114 InitialiseSafetyHelper(); 123 115 124 116 isInitialized = true; … … 419 411 { 420 412 //compute geomlimit and presafety 421 G eomLimit(track);413 G4double geomlimit = ComputeGeomLimit(track, presafety, currentRange); 422 414 423 415 // is far from boundary … … 522 514 // i.e. when it is needed for optimization purposes 523 515 if((stepStatus != fGeomBoundary) && (presafety < tlimitminfix)) 524 presafety = safetyHelper->ComputeSafety(sp->GetPosition());516 presafety = ComputeSafety(sp->GetPosition(),tPathLength); 525 517 526 518 // is far from boundary … … 569 561 // << " currentMinimalStep= " << currentMinimalStep << G4endl; 570 562 return tPathLength ; 571 }572 573 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......574 575 void G4UrbanMscModel90::GeomLimit(const G4Track& track)576 {577 geomlimit = geombig;578 579 // no geomlimit for the World volume580 if((track.GetVolume() != 0) &&581 (track.GetVolume() != safetyHelper->GetWorldVolume()))582 {583 G4double cstep = currentRange;584 geomlimit = safetyHelper->CheckNextStep(585 track.GetStep()->GetPreStepPoint()->GetPosition(),586 track.GetMomentumDirection(),587 cstep,588 presafety);589 // G4cout << "!!!G4UrbanMscModel90::GeomLimit presafety= " << presafety590 // << " limit= " << geomlimit << G4endl;591 }592 563 } 593 564 … … 788 759 G4ThreeVector latDirection(dirx,diry,0.0); 789 760 latDirection.rotateUz(oldDirection); 790 791 G4ThreeVector Position = *(fParticleChange->GetProposedPosition()); 792 G4double fac = 1.; 793 if(r > safety) { 794 // ******* so safety is computed at boundary too ************ 795 G4double newsafety = safetyHelper->ComputeSafety(Position); 796 //G4double newsafety = safety; 797 if(r > newsafety) 798 fac = newsafety/r ; 799 } 800 801 if(fac > 0.) 802 { 803 // compute new endpoint of the Step 804 G4ThreeVector newPosition = Position+fac*r*latDirection; 805 806 // definetly not on boundary 807 if(1. == fac) { 808 //if(0. < fac) { 809 safetyHelper->ReLocateWithinVolume(newPosition); 810 811 812 } else { 813 // check safety after displacement 814 G4double postsafety = safetyHelper->ComputeSafety(newPosition); 815 816 // displacement to boundary 817 if(postsafety <= 0.) { 818 safetyHelper->Locate(newPosition, newDirection); 819 820 // not on the boundary 821 } else { 822 safetyHelper->ReLocateWithinVolume(newPosition); 823 } 824 } 825 fParticleChange->ProposePosition(newPosition); 826 } 827 } 761 ComputeDisplacement(fParticleChange, latDirection, r, safety); 762 } 828 763 } 829 764 } -
trunk/source/processes/electromagnetic/standard/src/G4WaterStopping.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WaterStopping.cc,v 1.1 1 2008/12/18 13:01:38 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4WaterStopping.cc,v 1.16 2009/05/15 19:04:21 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 36 36 // 37 37 // Modifications: 38 // 29.04.2009 A.Ivantchenko added revised data for G4WATER, provided by 39 // Prof.P.Sigmund Univ. Southern Denmark in the framework of 40 // the ESA Technology Research Programme (ESA contract 21435/08/NL/AT) 38 41 // 39 42 //---------------------------------------------------------------------------- … … 98 101 G4int zz[16] = {3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18}; 99 102 G4int aa[16] = {7, 9, 11, 12, 14, 16, 19, 20, 23, 24, 27, 28,31,32, 35,40}; 100 // G4double A_Ion[1 6] = {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};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}; 101 104 for(i=0; i<16; i++) { 102 105 Z[i] = zz[i]; … … 109 112 G4double factor = 1000.*MeV/cm; 110 113 111 G4double G4_WATER_Li [53]={2.626, 2.84, 3.191, 3.461, 3.665, 3.817, 3.927, 4.004, 4.056, 4.102, 3.998, 3.853, 3.702, 3.413, 3.158, 2.934, 2.739, 2.567, 2.415, 2.28, 1.782, 1.465, 1.247, 1.087, 0.8706, 0.7299, 0.631, 0.5575, 0.5005, 0.455, 0.4178, 0.3004, 0.2376, 0.1981, 0.1708, 0.1354, 0.1132, 0.09803, 0.08692, 0.07842, 0.07171, 0.06627, 0.0495, 0.04085, 0.03557, 0.03203, 0.0276, 0.02498, 0.02327, 0.0221, 0.02126, 0.02064, 0.02016, }; 112 AddData(E,G4_WATER_Li,factor); 113 114 G4double G4_WATER_Be [53]={3.272, 3.565, 4.061, 4.463, 4.79, 5.052, 5.258, 5.419, 5.542, 5.803, 5.787, 5.675, 5.529, 5.215, 4.912, 4.634, 4.381, 4.152, 3.944, 3.756, 3.026, 2.533, 2.179, 1.913, 1.542, 1.296, 1.122, 0.9911, 0.8898, 0.8087, 0.7423, 0.5335, 0.4219, 0.3518, 0.3034, 0.2406, 0.2013, 0.1743, 0.1545, 0.1394, 0.1275, 0.1178, 0.08805, 0.07266, 0.06328, 0.05698, 0.0491, 0.04444, 0.04141, 0.03933, 0.03783, 0.03672, 0.03588, }; 115 AddData(E,G4_WATER_Be,factor); 116 117 G4double G4_WATER_B [53]={3.773, 4.142, 4.776, 5.304, 5.749, 6.122, 6.431, 6.684, 6.89, 7.432, 7.551, 7.505, 7.391, 7.091, 6.772, 6.463, 6.172, 5.901, 5.65, 5.418, 4.484, 3.817, 3.322, 2.94, 2.392, 2.02, 1.752, 1.549, 1.391, 1.265, 1.161, 0.8332, 0.6587, 0.5492, 0.4737, 0.3757, 0.3144, 0.2723, 0.2415, 0.2179, 0.1993, 0.1842, 0.1376, 0.1136, 0.09894, 0.08909, 0.07678, 0.0695, 0.06477, 0.06151, 0.05916, 0.05743, 0.05611, }; 118 AddData(E,G4_WATER_B,factor); 119 120 G4double G4_WATER_C [53]={4.154, 4.593, 5.358, 6.009, 6.568, 7.049, 7.46, 7.809, 8.103, 8.968, 9.262, 9.311, 9.25, 8.994, 8.68, 8.358, 8.045, 7.747, 7.465, 7.199, 6.093, 5.269, 4.636, 4.137, 3.403, 2.891, 2.516, 2.23, 2.004, 1.823, 1.673, 1.2, 0.9483, 0.7904, 0.6817, 0.5406, 0.4525, 0.392, 0.3477, 0.3138, 0.287, 0.2653, 0.1983, 0.1637, 0.1426, 0.1284, 0.1107, 0.1002, 0.09335, 0.08865, 0.08528, 0.08278, 0.08088, }; 121 AddData(E,G4_WATER_C,factor); 122 123 G4double G4_WATER_N [53]={4.49, 4.984, 5.86, 6.616, 7.276, 7.854, 8.36, 8.799, 9.179, 10.39, 10.89, 11.07, 11.08, 10.9, 10.61, 10.3, 9.974, 9.66, 9.357, 9.068, 7.823, 6.859, 6.097, 5.484, 4.56, 3.9, 3.408, 3.029, 2.727, 2.482, 2.28, 1.636, 1.291, 1.076, 0.9274, 0.7354, 0.6156, 0.5333, 0.4731, 0.427, 0.3906, 0.3611, 0.27, 0.2229, 0.1942, 0.1749, 0.1507, 0.1365, 0.1272, 0.1208, 0.1162, 0.1128, 0.1102, }; 124 AddData(E,G4_WATER_N,factor); 125 126 G4double G4_WATER_O [53]={4.778, 5.321, 6.298, 7.152, 7.907, 8.578, 9.173, 9.7, 10.16, 11.73, 12.46, 12.78, 12.89, 12.81, 12.57, 12.27, 11.95, 11.63, 11.32, 11.01, 9.659, 8.571, 7.691, 6.967, 5.854, 5.042, 4.427, 3.945, 3.56, 3.245, 2.983, 2.142, 1.689, 1.406, 1.212, 0.9602, 0.8037, 0.6963, 0.6178, 0.5577, 0.5102, 0.4716, 0.3527, 0.2913, 0.2538, 0.2285, 0.197, 0.1784, 0.1663, 0.1579, 0.1519, 0.1475, 0.1441, }; 127 AddData(E,G4_WATER_O,factor); 128 129 G4double G4_WATER_F [53]={4.992, 5.575, 6.637, 7.578, 8.418, 9.171, 9.847, 10.45, 11, 12.9, 13.88, 14.35, 14.56, 14.59, 14.4, 14.13, 13.83, 13.51, 13.19, 12.87, 11.44, 10.26, 9.279, 8.463, 7.187, 6.237, 5.506, 4.928, 4.461, 4.076, 3.753, 2.707, 2.137, 1.779, 1.533, 1.215, 1.017, 0.8809, 0.7816, 0.7056, 0.6456, 0.5969, 0.4466, 0.3688, 0.3213, 0.2894, 0.2496, 0.2259, 0.2106, 0.2, 0.1924, 0.1868, 0.1825, }; 130 AddData(E,G4_WATER_F,factor); 131 132 G4double G4_WATER_Ne [53]={5.182, 5.797, 6.931, 7.948, 8.865, 9.693, 10.44, 11.12, 11.74, 13.98, 15.21, 15.85, 16.17, 16.33, 16.21, 15.98, 15.69, 15.38, 15.06, 14.74, 13.24, 11.98, 10.91, 10.01, 8.584, 7.503, 6.66, 5.986, 5.436, 4.979, 4.595, 3.332, 2.635, 2.195, 1.892, 1.499, 1.255, 1.087, 0.9646, 0.8709, 0.7969, 0.7368, 0.5514, 0.4555, 0.3969, 0.3576, 0.3083, 0.2792, 0.2602, 0.2472, 0.2378, 0.2308, 0.2255, }; 133 AddData(E,G4_WATER_Ne,factor); 134 135 G4double G4_WATER_Na [53]={5.352, 5.998, 7.203, 8.3, 9.298, 10.21, 11.04, 11.81, 12.5, 15.13, 16.68, 17.56, 18.04, 18.43, 18.44, 18.29, 18.05, 17.78, 17.48, 17.18, 15.67, 14.32, 13.15, 12.14, 10.5, 9.226, 8.218, 7.401, 6.728, 6.166, 5.69, 4.112, 3.237, 2.686, 2.307, 1.821, 1.521, 1.317, 1.168, 1.054, 0.9644, 0.8917, 0.6674, 0.5514, 0.4806, 0.4329, 0.3734, 0.3381, 0.3152, 0.2993, 0.288, 0.2796, 0.2732, }; 136 AddData(E,G4_WATER_Na,factor); 137 138 G4double G4_WATER_Mg [53]={5.542, 6.193, 7.42, 8.551, 9.59, 10.54, 11.42, 12.23, 12.98, 15.85, 17.62, 18.66, 19.26, 19.76, 19.83, 19.7, 19.47, 19.2, 18.89, 18.58, 17.02, 15.62, 14.41, 13.36, 11.64, 10.3, 9.233, 8.362, 7.64, 7.033, 6.516, 4.777, 3.792, 3.162, 2.725, 2.159, 1.806, 1.565, 1.388, 1.254, 1.147, 1.061, 0.7944, 0.6565, 0.5722, 0.5156, 0.4447, 0.4027, 0.3754, 0.3566, 0.343, 0.333, 0.3254, }; 139 AddData(E,G4_WATER_Mg,factor); 140 141 G4double G4_WATER_Al [53]={5.724, 6.39, 7.649, 8.82, 9.905, 10.91, 11.84, 12.71, 13.51, 16.66, 18.69, 19.93, 20.68, 21.38, 21.56, 21.5, 21.32, 21.07, 20.79, 20.48, 18.91, 17.47, 16.19, 15.08, 13.24, 11.78, 10.61, 9.641, 8.835, 8.153, 7.569, 5.583, 4.444, 3.71, 3.199, 2.534, 2.12, 1.836, 1.629, 1.471, 1.346, 1.245, 0.9325, 0.7707, 0.6719, 0.6054, 0.5223, 0.473, 0.441, 0.4189, 0.403, 0.3912, 0.3823, }; 142 AddData(E,G4_WATER_Al,factor); 143 144 G4double G4_WATER_Si [53]={5.905, 6.583, 7.868, 9.073, 10.2, 11.25, 12.23, 13.14, 13.99, 17.4, 19.66, 21.1, 22.01, 22.91, 23.21, 23.22, 23.09, 22.87, 22.61, 22.32, 20.76, 19.28, 17.95, 16.78, 14.83, 13.26, 11.99, 10.94, 10.06, 9.304, 8.656, 6.43, 5.135, 4.294, 3.705, 2.938, 2.458, 2.129, 1.889, 1.706, 1.561, 1.444, 1.082, 0.8942, 0.7796, 0.7026, 0.6061, 0.549, 0.5119, 0.4862, 0.4678, 0.4542, 0.4438, }; 145 AddData(E,G4_WATER_Si,factor); 146 147 G4double G4_WATER_P [53]={6.12, 6.81, 8.118, 9.352, 10.51, 11.61, 12.63, 13.58, 14.48, 18.13, 20.63, 22.28, 23.34, 24.47, 24.91, 25.02, 24.95, 24.78, 24.55, 24.28, 22.76, 21.26, 19.89, 18.67, 16.59, 14.92, 13.54, 12.39, 11.42, 10.59, 9.867, 7.367, 5.896, 4.935, 4.259, 3.376, 2.824, 2.445, 2.169, 1.959, 1.792, 1.657, 1.242, 1.027, 0.8954, 0.807, 0.6963, 0.6308, 0.5881, 0.5587, 0.5375, 0.5219, 0.51, }; 148 AddData(E,G4_WATER_P,factor); 149 150 G4double G4_WATER_S [53]={6.294, 7, 8.338, 9.604, 10.8, 11.94, 13, 14, 14.94, 18.82, 21.55, 23.41, 24.65, 26.01, 26.6, 26.81, 26.81, 26.69, 26.5, 26.26, 24.79, 23.28, 21.88, 20.61, 18.43, 16.64, 15.16, 13.92, 12.86, 11.95, 11.15, 8.371, 6.715, 5.624, 4.856, 3.847, 3.217, 2.785, 2.47, 2.229, 2.04, 1.886, 1.413, 1.169, 1.019, 0.9187, 0.7929, 0.7183, 0.6697, 0.6362, 0.6122, 0.5944, 0.5808, }; 151 AddData(E,G4_WATER_S,factor); 152 153 G4double G4_WATER_Cl [53]={6.522, 7.237, 8.59, 9.875, 11.1, 12.26, 13.36, 14.39, 15.37, 19.45, 22.4, 24.45, 25.86, 27.46, 28.19, 28.5, 28.57, 28.5, 28.34, 28.13, 26.72, 25.21, 23.78, 22.47, 20.2, 18.32, 16.75, 15.42, 14.28, 13.3, 12.44, 9.392, 7.557, 6.34, 5.479, 4.344, 3.633, 3.145, 2.789, 2.517, 2.303, 2.13, 1.596, 1.32, 1.151, 1.038, 0.8957, 0.8115, 0.7567, 0.7189, 0.6917, 0.6717, 0.6563, }; 154 AddData(E,G4_WATER_Cl,factor); 155 156 G4double G4_WATER_Ar [53]={6.642, 7.369, 8.739, 10.04, 11.28, 12.47, 13.59, 14.66, 15.66, 19.93, 23.08, 25.32, 26.89, 28.72, 29.6, 30.01, 30.15, 30.13, 30, 29.82, 28.46, 26.94, 25.49, 24.15, 21.81, 19.86, 18.22, 16.82, 15.61, 14.57, 13.65, 10.39, 8.394, 7.063, 6.114, 4.859, 4.067, 3.522, 3.125, 2.821, 2.581, 2.387, 1.789, 1.48, 1.291, 1.164, 1.005, 0.9105, 0.8491, 0.8067, 0.7763, 0.7537, 0.7365, }; 157 AddData(E,G4_WATER_Ar,factor); 114 G4double G4_WATER_Li[53]={2.3193,2.5198,2.8539,3.1164,3.3203,3.4756,3.5914,3.6755,3.7347,3.8125,3.7349,3.6134,3.4818,3.2258,2.9949,2.7909,2.611,2.4517,2.3103,2.1841,1.7151,1.4139,1.2053,1.0525,0.84417,0.70862,0.61317,0.54214,0.48708,0.44305,0.40697,0.29312,0.23208,0.19364,0.16706,0.13252,0.11092,0.09608,0.08522,0.076915,0.07035,0.065026,0.048615,0.040137,0.034964,0.03149,0.027148,0.024579,0.022911,0.021761,0.020937,0.020327,0.019862}; 115 AddData(E,G4_WATER_Li,factor); 116 G4double G4_WATER_Be[53]={2.872,3.1439,3.6102,3.9967,4.3169,4.5788,4.7897,4.9568,5.0872,5.387,5.4028,5.3185,5.1971,4.9243,4.6549,4.4036,4.1732,3.9629,3.771,3.5957,2.9117,2.4439,2.1062,1.8518,1.4956,1.2587,1.0901,0.96393,0.86589,0.78742,0.72313,0.52053,0.41214,0.34394,0.2968,0.2355,0.19717,0.17081,0.15152,0.13676,0.1251,0.11564,0.086471,0.071399,0.062202,0.056023,0.048303,0.043734,0.040767,0.038723,0.037256,0.036172,0.035345}; 117 AddData(E,G4_WATER_Be,factor); 118 G4double G4_WATER_B[53]={3.2922,3.6315,4.2226,4.7242,5.1543,5.5219,5.8323,6.0911,6.3043,6.8888,7.0451,7.0309,6.9445,6.6925,6.4129,6.1372,5.8747,5.6283,5.3983,5.1841,4.3121,3.6826,3.2109,2.8459,2.3203,1.9619,1.7028,1.5072,1.3543,1.2315,1.1307,0.81305,0.64344,0.53693,0.46337,0.36777,0.30797,0.26684,0.23674,0.21371,0.1955,0.18072,0.13517,0.11163,0.097256,0.087601,0.075535,0.068395,0.063757,0.060561,0.058268,0.056574,0.05528}; 119 AddData(E,G4_WATER_B,factor); 120 G4double G4_WATER_C[53]={3.6037,4.0035,4.7125,5.3248,5.8601,6.3287,6.7363,7.0875,7.3872,8.2986,8.635,8.7189,8.6879,8.485,8.2162,7.9331,7.6534,7.3839,7.1272,6.884,5.8573,5.0814,4.4808,4.0044,3.3005,2.808,2.4458,2.1691,1.9511,1.7751,1.6302,1.1714,0.9263,0.77269,0.66676,0.52925,0.44328,0.38415,0.34086,0.30773,0.28154,0.26028,0.19473,0.16083,0.14014,0.12624,0.10886,0.098575,0.091894,0.08729,0.083986,0.081545,0.079682}; 121 AddData(E,G4_WATER_C,factor); 122 G4double G4_WATER_N[53]={3.8821,4.3278,5.1314,5.8371,6.4632,7.021,7.5168,7.9545,8.3378,9.5943,10.145,10.356,10.402,10.278,10.041,9.7677,9.4845,9.2035,8.9301,8.6668,7.5173,6.6126,5.8919,5.308,4.4226,3.7883,3.3138,2.9467,2.655,2.4179,2.2217,1.5965,1.2614,1.0516,0.90715,0.71995,0.60305,0.52268,0.46384,0.41882,0.3832,0.35431,0.26515,0.21903,0.19087,0.17194,0.14829,0.13429,0.12519,0.11892,0.11442,0.1111,0.10856}; 123 AddData(E,G4_WATER_N,factor); 124 G4double G4_WATER_O[53]={4.1215,4.6063,5.4945,6.2868,6.9978,7.6391,8.2175,8.7372,9.201,10.808,11.596,11.955,12.096,12.077,11.89,11.639,11.364,11.081,10.799,10.523,9.2787,8.2615,7.4307,6.7431,5.6787,4.8981,4.3045,3.8393,3.4663,3.161,2.9069,2.0903,1.6501,1.3745,1.1851,0.94004,0.78733,0.68244,0.60568,0.54694,0.50048,0.46278,0.34643,0.28622,0.24945,0.22474,0.19384,0.17555,0.16367,0.15547,0.14959,0.14525,0.14194}; 125 AddData(E,G4_WATER_O,factor); 126 G4double G4_WATER_F[53]={4.2951,4.8107,5.7678,6.6342,7.4196,8.1343,8.7858,9.3786,9.9152,11.857,12.89,13.408,13.652,13.749,13.62,13.398,13.136,12.857,12.573,12.291,10.982,9.88,8.9601,8.1871,6.9687,6.0574,5.3535,4.7954,4.3434,3.9704,3.658,2.642,2.0878,1.7393,1.4994,1.1892,0.99601,0.86336,0.76632,0.69207,0.63334,0.58568,0.43857,0.36242,0.3159,0.28462,0.24552,0.22237,0.20733,0.19696,0.18951,0.18401,0.17981}; 127 AddData(E,G4_WATER_F,factor); 128 G4double G4_WATER_Ne[53]={4.4513,4.991,6.004,6.9338,7.7852,8.5662,9.284,9.9435,10.547,12.813,14.099,14.791,15.151,15.382,15.321,15.136,14.895,14.626,14.345,14.061,12.705,11.53,10.532,9.6823,8.3208,7.2846,6.4735,5.8234,5.2919,4.8502,4.4779,3.252,2.5745,2.146,1.8503,1.4675,1.2291,1.0654,0.94575,0.85419,0.78178,0.72301,0.54158,0.44763,0.39022,0.35162,0.30335,0.27477,0.25619,0.24339,0.23419,0.2274,0.22222}; 129 AddData(E,G4_WATER_Ne,factor); 130 G4double G4_WATER_Na[53]={4.5914,5.1553,6.2244,7.2203,8.1435,8.9982,9.7906,10.526,11.206,13.848,15.453,16.384,16.916,17.369,17.442,17.344,17.16,16.93,16.675,16.407,15.045,13.799,12.706,11.753,10.187,8.9672,7.9956,7.2072,6.5562,6.0112,5.5493,4.0154,3.1635,2.6262,2.2573,1.7832,1.4904,1.2907,1.1451,1.0339,0.94615,0.87498,0.65548,0.54186,0.47243,0.42574,0.36734,0.33275,0.31027,0.29478,0.28364,0.27542,0.26915}; 131 AddData(E,G4_WATER_Na,factor); 132 G4double G4_WATER_Mg[53]={4.7537,5.3178,6.3962,7.4137,8.3663,9.2554,10.085,10.859,11.581,14.455,16.279,17.373,18.018,18.598,18.727,18.654,18.479,18.25,17.99,17.716,16.313,15.026,13.895,12.907,11.277,9.9981,8.9727,8.1344,7.4376,6.8507,6.35,4.6625,3.7049,3.0916,2.666,2.1135,1.7695,1.5336,1.3613,1.2296,1.1255,1.041,0.7802,0.64511,0.56252,0.50698,0.43749,0.39634,0.36958,0.35114,0.33789,0.3281,0.32063}; 133 AddData(E,G4_WATER_Mg,factor); 134 G4double G4_WATER_Al[53]={4.911,5.4856,6.5852,7.6302,8.6193,9.551,10.426,11.248,12.018,15.152,17.23,18.531,19.33,20.11,20.354,20.352,20.224,20.024,19.785,19.521,18.12,16.795,15.611,14.565,12.819,11.431,10.305,9.3772,8.6003,7.9413,7.3761,5.45,4.342,3.6272,3.129,2.4808,2.0767,1.7997,1.5975,1.4429,1.3207,1.2216,0.91581,0.75739,0.66053,0.59537,0.51383,0.46554,0.43413,0.41248,0.39693,0.38544,0.37667}; 135 AddData(E,G4_WATER_Al,factor); 136 G4double G4_WATER_Si[53]={5.0697,5.6529,6.77,7.8376,8.8564,9.8229,10.736,11.597,12.409,15.773,18.09,19.594,20.549,21.535,21.9,21.975,21.896,21.73,21.513,21.265,19.878,18.525,17.298,16.202,14.354,12.867,11.651,10.64,9.7876,9.0607,8.4341,6.2756,5.0169,4.1981,3.6247,2.8758,2.4078,2.0868,1.8523,1.6731,1.5315,1.4167,1.0623,0.8787,0.76644,0.69091,0.59637,0.54036,0.50394,0.47883,0.46078,0.44746,0.43728}; 137 AddData(E,G4_WATER_Si,factor); 138 G4double G4_WATER_P[53]={5.2616,5.8538,6.9867,8.074,9.1192,10.117,11.065,11.964,12.815,16.396,18.945,20.657,21.779,22.993,23.502,23.672,23.659,23.54,23.356,23.132,21.792,20.425,19.162,18.02,16.066,14.472,13.155,12.051,11.114,10.311,9.6149,7.1917,5.7614,4.8249,4.1667,3.305,2.7661,2.3966,2.1269,1.9215,1.7603,1.6263,1.2197,1.0091,0.88027,0.79361,0.68512,0.62083,0.57902,0.55019,0.52947,0.51417,0.50248}; 139 AddData(E,G4_WATER_P,factor); 140 G4double G4_WATER_S[53]={5.4129,6.0193,7.1761,8.2871,9.36,10.39,11.373,12.308,13.196,16.986,19.762,21.683,22.976,24.431,25.091,25.363,25.421,25.354,25.208,25.013,23.734,22.366,21.074,19.891,17.84,16.146,14.731,13.536,12.516,11.636,10.869,8.1727,6.5617,5.4997,4.7505,3.7671,3.1514,2.7293,2.4215,2.1866,2.0012,1.8509,1.3881,1.1485,1.002,0.90348,0.78008,0.70695,0.65938,0.62657,0.60299,0.58558,0.57229}; 141 AddData(E,G4_WATER_S,factor); 142 G4double G4_WATER_Cl[53]={5.6171,6.2307,7.3984,8.5209,9.6097,10.661,11.669,12.632,13.551,17.518,20.497,22.615,24.076,25.769,26.58,26.953,27.082,27.066,26.958,26.791,25.579,24.214,22.901,21.685,19.553,17.771,16.271,14.996,13.9,12.949,12.118,9.1688,7.385,6.2003,5.3604,4.2535,3.5588,3.0821,2.7343,2.4689,2.2595,2.0898,1.5673,1.297,1.1318,1.0205,0.88128,0.79874,0.74504,0.708,0.68138,0.66172,0.64671}; 143 AddData(E,G4_WATER_Cl,factor); 144 G4double G4_WATER_Ar[53]={5.7158,6.3394,7.5204,8.6525,9.7528,10.82,11.849,12.836,13.78,17.904,21.07,23.375,24.999,26.928,27.889,28.361,28.559,28.592,28.521,28.381,27.228,25.869,24.541,23.299,21.103,19.255,17.686,16.346,15.19,14.183,13.3,10.137,8.2021,6.9062,5.9819,4.757,3.9841,3.4523,3.0636,2.7668,2.5324,2.3425,1.7573,1.4546,1.2694,1.1448,0.98872,0.8962,0.83601,0.79448,0.76464,0.74259,0.72575}; 145 AddData(E,G4_WATER_Ar,factor); 158 146 159 147 if(corr) { -
trunk/source/processes/electromagnetic/standard/src/G4WentzelVIModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WentzelVIModel.cc,v 1. 16 2008/11/19 11:47:50vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4WentzelVIModel.cc,v 1.32 2009/05/10 16:09:29 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 52 52 // 53 53 54 55 54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 56 55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 60 59 #include "G4LossTableManager.hh" 61 60 #include "G4ParticleChangeForMSC.hh" 62 #include "G4TransportationManager.hh"63 #include "G4SafetyHelper.hh"64 61 #include "G4PhysicsTableHelper.hh" 65 62 #include "G4ElementVector.hh" … … 71 68 72 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 70 71 G4double G4WentzelVIModel::ScreenRSquare[] = {0.0}; 72 G4double G4WentzelVIModel::FormFactor[] = {0.0}; 73 73 74 74 using namespace std; … … 96 96 thePositron = G4Positron::Positron(); 97 97 theProton = G4Proton::Proton(); 98 a0 = alpha2*electron_mass_c2*electron_mass_c2/(0.885*0.885);98 lowEnergyLimit = 0.1*keV; 99 99 G4double p0 = electron_mass_c2*classic_electr_radius; 100 100 coeff = twopi*p0*p0; 101 constn = 6.937e-6/(MeV*MeV);102 101 tkin = targetZ = mom2 = DBL_MIN; 103 102 ecut = etag = DBL_MAX; … … 106 105 xsecn.resize(nelments); 107 106 prob.resize(nelments); 108 for(size_t j=0; j<100; j++) { 109 FF[j] = 0.0; 110 } 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 } 111 123 } 112 124 … … 132 144 if(!isInitialized) { 133 145 isInitialized = true; 134 135 if (pParticleChange) 136 fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange); 137 else 138 fParticleChange = new G4ParticleChangeForMSC(); 139 140 safetyHelper = G4TransportationManager::GetTransportationManager() 141 ->GetSafetyHelper(); 142 safetyHelper->InitialiseHelper(); 146 fParticleChange = GetParticleChangeForMSC(); 147 InitialiseSafetyHelper(); 143 148 } 144 149 } … … 156 161 SetupKinematic(ekin, cutEnergy); 157 162 SetupTarget(Z, ekin); 158 G4double xsec = ComputeTransportXSectionPer Volume();163 G4double xsec = ComputeTransportXSectionPerAtom(); 159 164 /* 160 165 G4cout << "CS: e= " << tkin << " cosEl= " << cosTetMaxElec2 … … 167 172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 168 173 169 G4double G4WentzelVIModel::ComputeTransportXSectionPer Volume()174 G4double G4WentzelVIModel::ComputeTransportXSectionPerAtom() 170 175 { 171 176 G4double xSection = 0.0; … … 189 194 y = 0.0; 190 195 } 191 xSection += y/targetZ; 192 } 193 /* 194 G4cout << "G4WentzelVIModel:XS per A " << " Z= " << Z << " e(MeV)= " << kinEnergy/MeV 196 xSection = y; 197 } 198 /* 199 G4cout << "G4WentzelVI:XS per A " << " Z= " << targetZ 200 << " e(MeV)= " << tkin/MeV << " XSel= " << xSection 195 201 << " cut(MeV)= " << ecut/MeV 196 202 << " zmaxE= " << (1.0 - cosTetMaxElec)/screenZ 197 << " zmaxN= " << (1.0 - cosTetMsxNuc)/screenZ << G4endl; 203 << " zmaxN= " << (1.0 - cosTetMaxNuc2)/screenZ 204 << " costm= " << cosTetMaxNuc2 << G4endl; 198 205 */ 199 200 206 // scattering off nucleus 201 207 if(cosTetMaxNuc2 < 1.0) { 202 208 x = 1.0 - cosTetMaxNuc2; 203 209 x1 = screenZ*formfactA; 204 x2 = 1.0 /(1.0 - x1);210 x2 = 1.0 - x1; 205 211 x3 = x/screenZ; 206 212 x4 = formfactA*x; 207 213 // low-energy limit 208 214 if(x3 < numlimit && x1 < numlimit) { 209 y = 0.5*x3*x3* x2*x2*x2*(1.0 - 1.333333*x3 + 1.5*x3*x3 - 1.5*x1210 + 3.0*x1*x1 + 2.666666*x3*x1);215 y = 0.5*x3*x3*(1.0 - 1.3333333*x3 + 1.5*x3*x3 - 1.5*x1 216 + 3.0*x1*x1 + 2.666666*x3*x1)/(x2*x2*x2); 211 217 // high energy limit 212 } else if( 1.0 < x1) {218 } else if(x2 <= 0.0) { 213 219 x4 = x1*(1.0 + x3); 214 220 y = x3*(1.0 + 0.5*x3 - (2.0 - x1)*(1.0 + x3 + x3*x3/3.0)/x4)/(x4*x4); … … 216 222 } else { 217 223 y = ((1.0 + x1)*x2*log((1. + x3)/(1. + x4)) 218 - x3/(1. + x3) - x4/(1. + x4))*x2*x2; 219 } 224 - x3/(1. + x3) - x4/(1. + x4))/(x2*x2); 225 } 226 //G4cout << "y= " << y << " x1= " <<x1<<" x2= " <<x2 227 // <<" x3= "<<x3<<" x4= " << x4<<G4endl; 220 228 if(y < 0.0) { 221 229 nwarnings++; … … 230 238 y = 0.0; 231 239 } 232 xSection += y; 233 } 234 xSection *= (coeff*targetZ*targetZ*chargeSquare*invbeta2/mom2); 235 // G4cout << " XStotal= " << xSection/barn << " screenZ= " << screenZ 236 // << " formF= " << formfactA << " for " << p->GetParticleName() << G4endl; 240 xSection += y*targetZ; 241 } 242 xSection *= kinFactor; 243 /* 244 G4cout << "Z= " << targetZ << " XStot= " << xSection/barn 245 << " screenZ= " << screenZ << " formF= " << formfactA 246 << " for " << particle->GetParticleName() 247 << " m= " << mass << " 1/v= " << sqrt(invbeta2) << " p= " << sqrt(mom2) 248 << " x= " << x 249 << G4endl; 250 */ 237 251 return xSection; 238 252 } … … 277 291 // i.e. when it is needed for optimization purposes 278 292 if(stepStatus != fGeomBoundary && presafety < tlimitminfix) 279 presafety = safetyHelper->ComputeSafety(sp->GetPosition());293 presafety = ComputeSafety(sp->GetPosition(), tlimit); 280 294 /* 281 295 G4cout << "G4WentzelVIModel::ComputeTruePathLengthLimit tlimit= " … … 291 305 G4double rlimit = facrange*lambda0; 292 306 G4double rcut = currentCouple->GetProductionCuts()->GetProductionCut(1); 293 if(rcut > rlimit) rlimit = std::pow(2.0*rcut*rcut*lambda0,0.33333333); 307 if(rcut > rlimit) rlimit = std::pow(rcut*rcut*rlimit,0.33333333); 308 rlimit = std::min(rlimit, facgeom*currentMaterial->GetRadlen()); 294 309 if(rlimit < tlimit) tlimit = rlimit; 295 310 } … … 404 419 } else { 405 420 406 // define threshold angle as 2 sigma of central value421 // define threshold angle between single and multiple scattering 407 422 cosThetaMin = 1.0 - 3.0*x1; 408 423 … … 570 585 571 586 if(r > tlimitminfix) { 572 G4ThreeVector Position = *(fParticleChange->GetProposedPosition()); 573 G4double fac= 1.; 574 if(r >= safety) { 575 // ******* so safety is computed at boundary too ************ 576 G4double newsafety = 577 safetyHelper->ComputeSafety(Position) - tlimitminfix; 578 if(newsafety <= 0.0) fac = 0.0; 579 else if(r > newsafety) fac = newsafety/r ; 580 //G4cout << "NewSafety= " << newsafety << " fac= " << fac 581 // << " r= " << r << " sint= " << sint << " pos " << Position << G4endl; 582 } 583 584 if(fac > 0.) { 585 // compute new endpoint of the Step 586 G4ThreeVector newPosition = Position + fac*pos; 587 588 // check safety after displacement 589 G4double postsafety = safetyHelper->ComputeSafety(newPosition); 590 591 // displacement to boundary 592 if(postsafety <= 0.0) { 593 safetyHelper->Locate(newPosition, newDirection); 594 595 // not on the boundary 596 } else { 597 safetyHelper->ReLocateWithinVolume(newPosition); 598 // if(fac < 1.0) G4cout << "NewPosition " << newPosition << G4endl; 599 } 600 601 fParticleChange->ProposePosition(newPosition); 602 } 587 pos /= r; 588 ComputeDisplacement(fParticleChange, pos, r, safety); 603 589 } 604 590 } … … 624 610 G4double xs = 0.0; 625 611 626 G4double fac = coeff*chargeSquare*invbeta2/mom2;627 628 612 for (G4int i=0; i<nelm; i++) { 629 613 SetupTarget((*theElementVector)[i]->GetZ(), tkin); … … 635 619 cosTetMaxNuc2 = std::max(cosnm,cosThetaMin); 636 620 cosTetMaxElec2 = std::max(cosem,cosThetaMin); 637 xtsec += ComputeTransportXSectionPer Volume()*density;621 xtsec += ComputeTransportXSectionPerAtom()*density; 638 622 // return limit back 639 623 cosTetMaxElec2 = cosem; … … 643 627 G4double nsec = 0.0; 644 628 G4double x1 = 1.0 - cosThetaMin + screenZ; 645 G4double f = fac*targetZ*density;629 G4double f = kinFactor*density; 646 630 647 631 // scattering off electrons … … 656 640 G4double s = screenZ*formfactA; 657 641 G4double z1 = 1.0 - cosnm + screenZ; 658 G4double d = (1.0 - s)/formfactA; 642 G4double s1 = 1.0 - s; 643 G4double d = s1/formfactA; 659 644 660 645 // check numerical limit … … 667 652 G4double x2 = x1 + d; 668 653 G4double z2 = z1 + d; 669 nsec = (1.0 + 2.0*s)*((cosThetaMin - cosnm)*(1.0/(x1*z1) + 1.0/(x2*z2)) - 670 2.0*log(z1*x2/(z2*x1))/d); 654 nsec = (1.0/x1 - 1.0/z1 + 1.0/x2 - 1.0/z2 - 2.0*log(z1*x2/(z2*x1))/d)/(s1*s1); 671 655 } 672 656 nsec *= f*targetZ; … … 801 785 G4double mom22 = t1*(t1 + 2.0*mass); 802 786 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22); 803 if(ctm < 1.0) cosTetMaxElec = ctm; 787 if(ctm < 1.0) cosTetMaxElec = ctm; 788 if(ctm < -1.0) cosTetMaxElec = -1.0; 804 789 } 805 790 } … … 808 793 809 794 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 810 811 void G4WentzelVIModel::SampleSecondaries(std::vector<G4DynamicParticle*>*,812 const G4MaterialCutsCouple*,813 const G4DynamicParticle*,814 G4double,815 G4double)816 {}817 818 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlung.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlung.cc,v 1.5 5 2008/11/14 19:23:07 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eBremsstrahlung.cc,v 1.56 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 104 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 105 106 G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) 107 { 108 return (&p == G4Electron::Electron() || &p == G4Positron::Positron()); 109 } 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 112 106 113 void G4eBremsstrahlung::InitialiseEnergyLossProcess( 107 114 const G4ParticleDefinition* p, -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungModel.cc,v 1.4 3 2008/11/13 19:28:58 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eBremsstrahlungModel.cc,v 1.44 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 160 160 } 161 161 if(isInitialised) return; 162 163 if(pParticleChange) { 164 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 165 } else { 166 fParticleChange = new G4ParticleChangeForLoss(); 167 } 162 fParticleChange = GetParticleChangeForLoss(); 168 163 isInitialised = true; 169 164 } -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungRelModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungRelModel.cc,v 1.1 2 2008/11/13 23:28:27 schaelicExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eBremsstrahlungRelModel.cc,v 1.14 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 178 178 179 179 if(isInitialised) return; 180 181 if(pParticleChange) { 182 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 183 } else { 184 fParticleChange = new G4ParticleChangeForLoss(); 185 } 180 fParticleChange = GetParticleChangeForLoss(); 186 181 isInitialised = true; 187 182 } -
trunk/source/processes/electromagnetic/standard/src/G4eCoulombScatteringModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.cc,v 1. 59 2008/10/22 18:39:29 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eCoulombScatteringModel.cc,v 1.69 2009/05/10 16:09:29 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 66 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 67 67 68 G4double G4eCoulombScatteringModel::ScreenRSquare[] = {0.0}; 69 G4double G4eCoulombScatteringModel::FormFactor[] = {0.0}; 70 68 71 using namespace std; 69 72 … … 84 87 currentMaterial = 0; 85 88 currentElement = 0; 86 a0 = alpha2*electron_mass_c2*electron_mass_c2/(0.885*0.885);89 lowEnergyLimit = keV; 87 90 G4double p0 = electron_mass_c2*classic_electr_radius; 88 91 coeff = twopi*p0*p0; 89 constn = 6.937e-6/(MeV*MeV);90 92 tkin = targetZ = mom2 = DBL_MIN; 91 93 elecXSection = nucXSection = 0.0; 92 recoilThreshold = DBL_MAX;94 recoilThreshold = 100.*keV; 93 95 ecut = DBL_MAX; 94 96 particle = 0; 95 97 currentCouple = 0; 96 for(size_t j=0; j<100; j++) { 97 FF[j] = 0.0; 98 } 98 99 // Thomas-Fermi screening radii 100 // Formfactors from A.V. Butkevich et al., NIM A 488 (2002) 282 101 102 if(0.0 == ScreenRSquare[0]) { 103 G4double a0 = electron_mass_c2/0.88534; 104 G4double constn = 6.937e-6/(MeV*MeV); 105 106 ScreenRSquare[0] = alpha2*a0*a0; 107 for(G4int j=1; j<100; j++) { 108 G4double x = a0*fNistManager->GetZ13(j); 109 ScreenRSquare[j] = alpha2*x*x; 110 x = fNistManager->GetA27(j); 111 FormFactor[j] = constn*x*x; 112 } 113 } 99 114 } 100 115 … … 121 136 if(!isInitialised) { 122 137 isInitialised = true; 123 124 if(pParticleChange) 125 fParticleChange = 126 reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 127 else 128 fParticleChange = new G4ParticleChangeForGamma(); 138 fParticleChange = GetParticleChangeForGamma(); 129 139 } 130 140 if(mass < GeV && particle->GetParticleType() != "nucleus") { … … 157 167 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22); 158 168 //G4cout << "ctm= " << ctm << G4endl; 159 if(ctm < 1.0) cosTetMaxElec = ctm; 169 if(ctm < 1.0) cosTetMaxElec = ctm; 170 if(ctm < -1.0) cosTetMaxElec = -1.0; 160 171 } 161 172 } … … 196 207 { 197 208 // This method needs initialisation before be called 198 199 G4double fac = coeff*targetZ*chargeSquare*invbeta2/mom2; 209 G4double fac = coeff*targetZ*chargeSquare*kinFactor; 200 210 elecXSection = 0.0; 201 211 nucXSection = 0.0; … … 216 226 G4double s = screenZ*formfactA; 217 227 G4double z1 = 1.0 - cosTetMaxNuc2 + screenZ; 218 G4double d = (1.0 - s)/formfactA; 228 G4double s1 = 1.0 - s; 229 G4double d = s1/formfactA; 219 230 //G4cout <<"x1= "<<x1<<" z1= " <<z1<<" s= "<<s << " d= " <<d <<G4endl; 220 231 if(d < 0.2*x1) { … … 226 237 G4double x2 = x1 + d; 227 238 G4double z2 = z1 + d; 228 x = (1.0 + 2.0*s)*((cosTetMinNuc - cosTetMaxNuc2)*(1.0/(x1*z1) + 1.0/(x2*z2)) - 229 2.0*log(z1*x2/(z2*x1))/d); 239 x = (1.0/x1 - 1.0/z1 + 1.0/x2 - 1.0/z2 - 2.0*log(z1*x2/(z2*x1))/d)/(s1*s1); 230 240 } 231 241 nucXSection += fac*targetZ*x; 232 242 } 233 234 243 //G4cout<<" cross(bn)= "<<nucXSection/barn<<" xsElec(bn)= "<<elecXSection/barn 235 244 // << " Asc= " << screenZ << G4endl; … … 283 292 G4int ia = SelectIsotopeNumber(currentElement); 284 293 G4double Trec = z1*mom2/(amu_c2*G4double(ia)); 285 G4double th = 286 std::min(recoilThreshold, 287 targetZ*currentElement->GetIonisation()->GetMeanExcitationEnergy()); 288 289 if(Trec > th) { 290 G4int iz = G4int(targetZ); 294 295 if(Trec > recoilThreshold) { 291 296 G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz); 292 297 Trec = z1*mom2/ion->GetPDGMass(); -
trunk/source/processes/electromagnetic/standard/src/G4eIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisation.cc,v 1.5 6 2008/10/20 08:56:41vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eIonisation.cc,v 1.57 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 103 103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 104 104 105 G4double G4eIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 106 const G4Material*, 107 G4double cut) 108 { 109 G4double x = cut; 110 if(isElectron) x += cut; 111 return x; 112 } 113 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 115 116 G4bool G4eIonisation::IsApplicable(const G4ParticleDefinition& p) 117 { 118 return (&p == G4Electron::Electron() || &p == G4Positron::Positron()); 119 } 120 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 122 105 123 void G4eIonisation::InitialiseEnergyLossProcess( 106 124 const G4ParticleDefinition* part, -
trunk/source/processes/electromagnetic/standard/src/G4eeToTwoGammaModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eeToTwoGammaModel.cc,v 1.1 4 2007/05/23 08:47:35vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eeToTwoGammaModel.cc,v 1.15 2009/04/09 18:41:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 102 102 { 103 103 if(isInitialised) return; 104 105 if(pParticleChange) 106 fParticleChange = 107 reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 108 else 109 fParticleChange = new G4ParticleChangeForGamma(); 110 104 fParticleChange = GetParticleChangeForGamma(); 111 105 isInitialised = true; 112 106 } -
trunk/source/processes/electromagnetic/standard/src/G4eplusAnnihilation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eplusAnnihilation.cc,v 1. 29 2008/10/15 17:53:44vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eplusAnnihilation.cc,v 1.30 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 80 80 81 G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& p) 82 { 83 return (&p == G4Positron::Positron()); 84 } 85 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 87 88 G4double G4eplusAnnihilation::AtRestGetPhysicalInteractionLength( 89 const G4Track&, G4ForceCondition* condition) 90 { 91 *condition = NotForced; 92 return 0.0; 93 } 94 95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 96 81 97 void G4eplusAnnihilation::InitialiseProcess(const G4ParticleDefinition*) 82 98 { -
trunk/source/processes/electromagnetic/standard/src/G4hIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.cc,v 1.8 1 2008/10/22 16:02:20vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4hIonisation.cc,v 1.82 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 122 122 {} 123 123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 126 G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p) 127 { 128 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV && 129 !p.IsShortLived()); 130 } 131 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 133 134 G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 135 const G4Material*, 136 G4double cut) 137 { 138 G4double x = 0.5*cut/electron_mass_c2; 139 G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio)); 140 return mass*(g - 1.0); 141 } 142 124 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 144 -
trunk/source/processes/electromagnetic/standard/src/G4ionIonisation.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionIonisation.cc,v 1.6 5 2008/10/15 17:53:44vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4ionIonisation.cc,v 1.66 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 104 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 105 106 G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p) 107 { 108 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() && 109 p.GetParticleType() == "nucleus"); 110 } 111 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 114 G4double G4ionIonisation::MinPrimaryEnergy(const G4ParticleDefinition* p, 115 const G4Material*, 116 G4double cut) 117 { 118 return 119 p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0); 120 } 121 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 123 106 124 void G4ionIonisation::InitialiseEnergyLossProcess( 107 125 const G4ParticleDefinition* part, -
trunk/source/processes/electromagnetic/utils/History
r1007 r1055 1 $Id: History,v 1.3 64 2008/11/20 20:32:40vnivanch Exp $1 $Id: History,v 1.383 2009/05/27 11:55:02 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 27 May 09: V.Ivant (emutils-V09-02-11) 21 - G4VMultipleScattering - discarded changes from the previous tag 22 23 26 May 09: V.Ivant (emutils-V09-02-10) 24 - G4VEmModel: remove protection in from previous tag and include protection 25 to G4ParticleChangeForLoss; 26 more save initialisation of G4EmElementSelectors 27 - G4VMultipleScattering - added a protection against zero kinetic energy 28 - G4EmElementSelector - do not use spline 29 30 22 May 09: V.Ivant (emutils-V09-02-09) 31 - Added protection into G4VEmModel for zero input energy 32 33 15 May 09: V.Ivant (emutils-V09-02-08) 34 - Added new testG4EnergyLossTables and fixed GNUmakefile for tests 35 36 10 May 09: V.Ivant (emutils-V09-02-07) 37 G4EmElementSelector - added protection for zero cross section at first and last 38 bins of physics vector 39 G4VMscModel, G4VMultipleScattering - set default Range Factor to 0.04 40 41 17 April 09: V.Ivant (emutils-V09-02-06) 42 - G4EmModelManager - fixed energy range selection algorithm for the case of 43 a small intersection of model energy intervals 44 - G4VEnergyLossProcess, G4VEmProcess, G4VMultipleScattering - set high enegry 45 limit 10 TeV and number of bins 77 46 47 08 April 09: V.Ivant (emutils-V09-02-05) 48 - G4LossTableManager - added G4EmConfigurator providing easier addition of 49 models per region 50 - G4VMultipleScattering, G4VEmProcess, G4VEnergyLossProcess: added 51 initialisation of the G4EmConfigurator 52 53 08 April 09: V.Ivant (emutils-V09-02-04) 54 - G4EmModelManager - fixed energy range selection algorithm for the case 55 when there is an intersection of energy regions of standard 56 and low-energy models, 57 - reduce internal vectors if no model per region are initialized. 58 - do not initilise unused models. 59 - G4VEmModel - msc methods are moved to G4VMscModel, added protected 60 methods for initialisation of ParticleChange 61 - G4VMultipleScattering, G4VEmProcess, G4VEnergyLossProcess: 62 methods for initialisations are moved from inline to source 63 64 26 February 09: V.Ivant (emutils-V09-02-03) 65 G4EmConfigurator - fixed for the case if only fluctuation model is set 66 and main model is default 67 68 22 February 09: V.Ivant (emutils-V09-02-02) 69 - G4VEmModel - make methods to access geometry protected, added new 70 method SetSampleZ, added geommax private member 71 - G4EmCalculator - added possibility to be used by DNA processes: 72 take into account special DNA particles 73 74 18 February 09: V.Ivant (emutils-V09-02-01) 75 G4VEmModel, G4VEmFluctuationModel, G4VEnegryLossProcess, G4VEmProcess, 76 G4VMultipleScattering - move all virtual methods to source, update comments 77 G4VEmModel - added flagDeexcitation and Get/Set methods 78 G4VEnegryLossProcess, G4VEmProcess - added calls to deexcitation PostStep 79 G4EmProcessOptions - added ActivateDeexcitation method 80 G4EnergyLossMessenger - added /process/em/deexcitation UI command 81 G4LossTableBuilder - added protection in BuildRangeTable against zero dedx 82 83 27 January 09: V.Ivant (emutils-V09-02-00) 84 G4VEmModel - added method SampleDeexcitationAlongStep 85 G4VEnegryLossProcess - added deexcitation AlongStep per region 86 G4VMscModel - added methdos: InitialiseSafetyHelper, ComputeSafety, 87 ComputeGeomLimit, ComputeDisplacement 88 G4VEmProcess - added possibility to set more than 1 model 19 89 20 90 20 November 08: V.Ivant (emutils-V09-01-37) -
trunk/source/processes/electromagnetic/utils/include/G4DummyModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DummyModel.hh,v 1. 3 2007/05/22 17:31:57 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4DummyModel.hh,v 1.4 2009/04/07 18:39:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 51 51 52 52 #include "globals.hh" 53 #include "G4V EmModel.hh"53 #include "G4VMscModel.hh" 54 54 55 class G4DummyModel : public G4V EmModel55 class G4DummyModel : public G4VMscModel 56 56 { 57 57 -
trunk/source/processes/electromagnetic/utils/include/G4EmElementSelector.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmElementSelector.hh,v 1. 2 2008/07/22 15:55:15vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmElementSelector.hh,v 1.4 2009/05/10 18:26:43 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 89 89 G4VEmModel* model; 90 90 const G4Material* material; 91 const G4Element* element; 91 92 const G4ElementVector* theElementVector; 92 93 … … 107 108 inline const G4Element* G4EmElementSelector::SelectRandomAtom(G4double e) 108 109 { 109 const G4Element* elm = (*theElementVector)[nElmMinusOne];110 110 if (nElmMinusOne > 0) { 111 111 G4bool b; … … 113 113 for(G4int i=0; i<nElmMinusOne; i++) { 114 114 if (x <= (xSections[i])->GetValue(e,b)) { 115 el m= (*theElementVector)[i];115 element = (*theElementVector)[i]; 116 116 break; 117 117 } 118 118 } 119 119 } 120 return el m;120 return element; 121 121 } 122 122 -
trunk/source/processes/electromagnetic/utils/include/G4EmModelManager.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmModelManager.hh,v 1.2 5 2008/10/13 14:56:56vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmModelManager.hh,v 1.28 2009/04/09 15:53:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 53 53 // 13-05-06 Add GetModel by index method (VI) 54 54 // 15-03-07 Add maxCutInRange (V.Ivanchenko) 55 // 08-04-08 Simplify Select method for only one G4RegionModel (VI) 55 56 // 56 57 // Class Description: … … 91 92 ~G4RegionModels(); 92 93 93 G4int SelectIndex(G4double e) const {94 inline G4int SelectIndex(G4double e) const { 94 95 G4int idx = 0; 95 96 if (nModelsForRegion>1) { … … 100 101 }; 101 102 102 G4int ModelIndex(G4int n) const {103 inline G4int ModelIndex(G4int n) const { 103 104 return theListOfModelIndexes[n]; 104 105 }; 105 106 106 G4int NumberOfModels() const {107 inline G4int NumberOfModels() const { 107 108 return nModelsForRegion; 108 109 }; 109 110 110 G4double LowEdgeEnergy(G4int n) const {111 inline G4double LowEdgeEnergy(G4int n) const { 111 112 return lowKineticEnergy[n]; 112 113 }; 113 114 114 const G4Region* Region() const {115 inline const G4Region* Region() const { 115 116 return theRegion; 116 117 }; … … 150 151 G4int); 151 152 152 const G4DataVector* Cuts() const;153 154 const G4DataVector* SubCutoff() const;155 156 153 void FillDEDXVector(G4PhysicsVector*, const G4MaterialCutsCouple*, 157 154 G4EmTableType t = fRestricted); … … 160 157 G4bool startFromNull = true, G4EmTableType t = fRestricted); 161 158 162 G4VEmModel* SelectModel(G4double& energy, size_t& index);163 164 159 G4VEmModel* GetModel(G4int, G4bool ver = false); 165 166 G4int NumberOfModels() const;167 160 168 161 void AddEmModel(G4int, G4VEmModel*, G4VEmFluctuationModel*, const G4Region*); … … 171 164 172 165 void DumpModelList(G4int verb); 166 167 inline G4VEmModel* SelectModel(G4double& energy, size_t& index); 168 169 inline const G4DataVector* Cuts() const; 170 171 inline const G4DataVector* SubCutoff() const; 172 173 inline G4int NumberOfModels() const; 173 174 174 175 private: … … 190 191 std::vector<const G4Region*> regions; 191 192 std::vector<G4int> orderOfModels; 193 std::vector<G4int> isUsed; 192 194 193 195 G4int nEmModels; … … 209 211 G4int verboseLevel; 210 212 211 // cash 212 G4int currentIdx; 213 213 // may be changed in run time 214 G4RegionModels* currRegionModel; 214 215 }; 215 216 … … 220 221 size_t& index) 221 222 { 222 currentIdx = 223 (setOfRegionModels[idxOfRegionModels[index]])->SelectIndex(kinEnergy); 224 return models[currentIdx]; 223 if(nRegions > 1) currRegionModel = setOfRegionModels[idxOfRegionModels[index]]; 224 return models[currRegionModel->SelectIndex(kinEnergy)]; 225 225 } 226 226 -
trunk/source/processes/electromagnetic/utils/include/G4EmProcessOptions.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmProcessOptions.hh,v 1.1 4 2008/04/17 10:33:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmProcessOptions.hh,v 1.15 2009/02/18 14:40:10 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 107 107 void SetLinearLossLimit(G4double val); 108 108 109 void ActivateDeexcitation(G4bool val, const G4Region* r = 0); 109 void ActivateDeexcitation(const G4String& proc, G4bool val, 110 const G4String& reg = ""); 110 111 111 112 void SetMscStepLimitation(G4MscStepLimitType val); -
trunk/source/processes/electromagnetic/utils/include/G4EnergyLossMessenger.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4EnergyLossMessenger.hh,v 1.2 2 2008/10/20 13:27:45vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4EnergyLossMessenger.hh,v 1.23 2009/02/18 14:40:10 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- … … 107 107 G4UIcmdWithADouble* MinSubSecCmd; 108 108 G4UIcommand* StepFuncCmd; 109 G4UIcommand* deexCmd; 109 110 G4UIcmdWithAString* mscCmd; 110 111 G4UIcmdWithADoubleAndUnit* MinEnCmd; -
trunk/source/processes/electromagnetic/utils/include/G4LossTableManager.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LossTableManager.hh,v 1.5 3 2008/07/15 16:56:38vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LossTableManager.hh,v 1.54 2009/04/09 16:10:57 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 91 91 class G4EmCorrections; 92 92 class G4EmSaturation; 93 class G4EmConfigurator; 93 94 class G4LossTableBuilder; 94 95 … … 232 233 233 234 G4EmSaturation* EmSaturation(); 235 236 G4EmConfigurator* EmConfigurator(); 234 237 235 238 private: … … 304 307 G4EmCorrections* emCorrections; 305 308 G4EmSaturation* emSaturation; 309 G4EmConfigurator* emConfigurator; 306 310 307 311 const G4ParticleDefinition* firstParticle; -
trunk/source/processes/electromagnetic/utils/include/G4VEmFluctuationModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmFluctuationModel.hh,v 1.1 1 2008/09/12 14:47:38vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEmFluctuationModel.hh,v 1.12 2009/02/19 11:25:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 101 101 //------------------------------------------------------------------------ 102 102 103 G4String GetName() const;103 inline G4String GetName() const; 104 104 105 105 private: … … 115 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 116 116 117 inline void G4VEmFluctuationModel::InitialiseMe(const G4ParticleDefinition*)118 {}119 120 inline121 void G4VEmFluctuationModel::SetParticleAndCharge(const G4ParticleDefinition*,122 G4double)123 {}124 125 117 inline G4String G4VEmFluctuationModel::GetName() const 126 118 { -
trunk/source/processes/electromagnetic/utils/include/G4VEmModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmModel.hh,v 1. 59 2008/11/13 19:29:41vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEmModel.hh,v 1.69 2009/05/26 15:00:49 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 65 65 // 12-09-08 Added methods GetParticleCharge, GetChargeSquareRatio, 66 66 // CorrectionsAlongStep, ActivateNuclearStopping (VI) 67 // 16-02-09 Moved implementations of virtual methods to source (VI) 68 // 07-04-09 Moved msc methods from G4VEmModel to G4VMscModel (VI) 67 69 // 68 70 // Class Description: … … 92 94 class G4Region; 93 95 class G4VParticleChange; 96 class G4ParticleChangeForLoss; 97 class G4ParticleChangeForGamma; 94 98 class G4Track; 95 99 … … 120 124 //------------------------------------------------------------------------ 121 125 122 // dEdx per unit length123 virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,124 const G4ParticleDefinition*,125 G4double kineticEnergy,126 G4double cutEnergy = DBL_MAX);127 128 126 // main method to compute dEdx 129 127 virtual G4double ComputeDEDXPerVolume(const G4Material*, … … 131 129 G4double kineticEnergy, 132 130 G4double cutEnergy = DBL_MAX); 133 134 // cross section per volume135 virtual G4double CrossSection(const G4MaterialCutsCouple*,136 const G4ParticleDefinition*,137 G4double kineticEnergy,138 G4double cutEnergy = 0.0,139 G4double maxEnergy = DBL_MAX);140 131 141 132 // main method to compute cross section per Volume … … 175 166 G4double length); 176 167 168 // sample PIXE deexcitation 169 virtual void SampleDeexcitationAlongStep(const G4Material*, 170 const G4Track&, 171 G4double& eloss); 172 173 // add region for the model 174 virtual void DefineForRegion(const G4Region*); 175 176 // initilisation at run time for given material 177 virtual void SetupForMaterial(const G4ParticleDefinition*, 178 const G4Material*, 179 G4double kineticEnergy); 180 177 181 protected: 182 183 // initialisation of the ParticleChange for the model 184 G4ParticleChangeForLoss* GetParticleChangeForLoss(); 185 186 // initialisation of the ParticleChange for the model 187 G4ParticleChangeForGamma* GetParticleChangeForGamma(); 178 188 179 189 // kinematically allowed max kinetic energy of a secondary 180 190 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 181 191 G4double kineticEnergy); 182 183 //------------------------------------------------------------------------184 // Methods for msc simulation which needs to be overwritten185 //------------------------------------------------------------------------186 192 187 193 public: 188 189 virtual void SampleScattering(const G4DynamicParticle*,190 G4double safety);191 192 virtual G4double ComputeTruePathLengthLimit(const G4Track& track,193 G4PhysicsTable* theLambdaTable,194 G4double currentMinimalStep);195 196 virtual G4double ComputeGeomPathLength(G4double truePathLength);197 198 virtual G4double ComputeTrueStepLength(G4double geomPathLength);199 200 virtual void DefineForRegion(const G4Region*);201 202 virtual void SetupForMaterial(const G4ParticleDefinition*,203 const G4Material*,204 G4double kineticEnergy);205 194 206 195 //------------------------------------------------------------------------ … … 212 201 const G4DataVector&); 213 202 203 // dEdx per unit length 204 inline G4double ComputeDEDX(const G4MaterialCutsCouple*, 205 const G4ParticleDefinition*, 206 G4double kineticEnergy, 207 G4double cutEnergy = DBL_MAX); 208 209 // cross section per volume 210 inline G4double CrossSection(const G4MaterialCutsCouple*, 211 const G4ParticleDefinition*, 212 G4double kineticEnergy, 213 G4double cutEnergy = 0.0, 214 G4double maxEnergy = DBL_MAX); 215 214 216 // compute mean free path via cross section per volume 215 G4double ComputeMeanFreePath(const G4ParticleDefinition*,216 G4double kineticEnergy,217 const G4Material*,218 G4double cutEnergy = 0.0,219 G4double maxEnergy = DBL_MAX);217 inline G4double ComputeMeanFreePath(const G4ParticleDefinition*, 218 G4double kineticEnergy, 219 const G4Material*, 220 G4double cutEnergy = 0.0, 221 G4double maxEnergy = DBL_MAX); 220 222 221 223 // generic cross section per element … … 233 235 G4double maxEnergy = DBL_MAX); 234 236 235 // this method can be used only in the case if generic method to compute 236 // cross section per volume is used and not overwritten in derived class 237 // to select atom cross section per volume is recomputed for each element 237 238 inline const G4Element* SelectRandomAtom(const G4Material*, 238 239 const G4ParticleDefinition*, … … 260 261 inline G4bool LPMFlag() const; 261 262 263 inline G4bool DeexcitationFlag() const; 264 262 265 inline void SetHighEnergyLimit(G4double); 263 266 … … 270 273 inline void SetLPMFlag(G4bool val); 271 274 275 inline void SetDeexcitationFlag(G4bool val); 276 272 277 inline void ActivateNuclearStopping(G4bool); 273 278 … … 278 283 inline void SetParticleChange(G4VParticleChange*, G4VEmFluctuationModel*); 279 284 285 inline void SetCurrentCouple(const G4MaterialCutsCouple*); 286 280 287 protected: 281 288 289 inline const G4MaterialCutsCouple* CurrentCouple() const; 290 291 inline void SetCurrentElement(const G4Element*); 292 282 293 inline const G4Element* GetCurrentElement() const; 283 284 inline void SetCurrentElement(const G4Element*);285 294 286 295 private: … … 315 324 private: 316 325 317 const G4Element* currentElement; 326 const G4MaterialCutsCouple* currentCouple; 327 const G4Element* currentElement; 328 318 329 G4int nsec; 330 G4bool flagDeexcitation; 319 331 std::vector<G4double> xsec; 320 332 … … 324 336 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 325 337 326 inline G4double G4VEmModel::HighEnergyLimit() const 327 { 328 return highLimit; 329 } 330 331 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 332 333 inline G4double G4VEmModel::LowEnergyLimit() const 334 { 335 return lowLimit; 336 } 337 338 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 339 340 inline G4double G4VEmModel::PolarAngleLimit() const 341 { 342 return polarAngleLimit; 343 } 344 345 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 346 347 inline G4double G4VEmModel::SecondaryThreshold() const 348 { 349 return secondaryThreshold; 350 } 351 352 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 353 354 inline G4bool G4VEmModel::LPMFlag() const 355 { 356 return theLPMflag; 357 } 358 359 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 360 361 inline void G4VEmModel::SetHighEnergyLimit(G4double val) 362 { 363 highLimit = val; 364 } 365 366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 367 368 inline void G4VEmModel::SetLowEnergyLimit(G4double val) 369 { 370 lowLimit = val; 371 } 372 373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 374 375 inline void G4VEmModel::SetPolarAngleLimit(G4double val) 376 { 377 polarAngleLimit = val; 378 } 379 380 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 381 382 inline void G4VEmModel::SetSecondaryThreshold(G4double val) 383 { 384 secondaryThreshold = val; 385 } 386 387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 388 389 inline void G4VEmModel::SetLPMFlag(G4bool val) 390 { 391 theLPMflag = val; 392 } 393 394 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 395 396 inline void G4VEmModel::ActivateNuclearStopping(G4bool val) 397 { 398 nuclearStopping = val; 338 inline G4double G4VEmModel::ComputeDEDX(const G4MaterialCutsCouple* c, 339 const G4ParticleDefinition* p, 340 G4double kinEnergy, 341 G4double cutEnergy) 342 { 343 currentCouple = c; 344 return ComputeDEDXPerVolume(c->GetMaterial(),p,kinEnergy,cutEnergy); 345 } 346 347 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 348 349 inline G4double G4VEmModel::CrossSection(const G4MaterialCutsCouple* c, 350 const G4ParticleDefinition* p, 351 G4double kinEnergy, 352 G4double cutEnergy, 353 G4double maxEnergy) 354 { 355 currentCouple = c; 356 return CrossSectionPerVolume(c->GetMaterial(),p,kinEnergy,cutEnergy,maxEnergy); 357 } 358 359 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 360 361 inline G4double G4VEmModel::ComputeMeanFreePath(const G4ParticleDefinition* p, 362 G4double ekin, 363 const G4Material* material, 364 G4double emin, 365 G4double emax) 366 { 367 G4double mfp = DBL_MAX; 368 G4double cross = CrossSectionPerVolume(material,p,ekin,emin,emax); 369 if (cross > DBL_MIN) mfp = 1./cross; 370 return mfp; 399 371 } 400 372 … … 415 387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 416 388 417 inline void G4VEmModel::SetParticleChange(G4VParticleChange* p,418 G4VEmFluctuationModel* f = 0)419 {420 if(p && pParticleChange != p) pParticleChange = p;421 fluc = f;422 }423 424 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......425 426 427 inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations()428 {429 return fluc;430 }431 432 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......433 434 inline G4double G4VEmModel::MinEnergyCut(const G4ParticleDefinition*,435 const G4MaterialCutsCouple*)436 {437 return 0.0;438 }439 440 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......441 442 inline G4double G4VEmModel::GetChargeSquareRatio(const G4ParticleDefinition* p,443 const G4Material*, G4double)444 {445 G4double q = p->GetPDGCharge()/CLHEP::eplus;446 return q*q;447 }448 449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......450 451 inline G4double G4VEmModel::GetParticleCharge(const G4ParticleDefinition* p,452 const G4Material*, G4double)453 {454 return p->GetPDGCharge();455 }456 457 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......458 459 inline void G4VEmModel::CorrectionsAlongStep(const G4MaterialCutsCouple*,460 const G4DynamicParticle*,461 G4double&,G4double&,G4double)462 {}463 464 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......465 466 inline G4double G4VEmModel::ComputeDEDXPerVolume(const G4Material*,467 const G4ParticleDefinition*,468 G4double,G4double)469 {470 return 0.0;471 }472 473 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......474 475 inline G4double G4VEmModel::ComputeDEDX(const G4MaterialCutsCouple* c,476 const G4ParticleDefinition* p,477 G4double kinEnergy,478 G4double cutEnergy)479 {480 return ComputeDEDXPerVolume(c->GetMaterial(),p,kinEnergy,cutEnergy);481 }482 483 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......484 485 inline G4double G4VEmModel::CrossSection(const G4MaterialCutsCouple* c,486 const G4ParticleDefinition* p,487 G4double kinEnergy,488 G4double cutEnergy,489 G4double maxEnergy)490 {491 return CrossSectionPerVolume(c->GetMaterial(),p,492 kinEnergy,cutEnergy,maxEnergy);493 }494 495 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......496 497 inline G4double G4VEmModel::ComputeCrossSectionPerAtom(498 const G4ParticleDefinition*,499 G4double, G4double, G4double,500 G4double, G4double)501 {502 return 0.0;503 }504 505 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......506 507 389 inline 508 390 const G4Element* G4VEmModel::SelectRandomAtom(const G4MaterialCutsCouple* couple, … … 512 394 G4double maxEnergy) 513 395 { 396 currentCouple = couple; 514 397 if(nSelectors > 0) { 515 398 currentElement = … … 571 454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 572 455 573 inline const G4Element* G4VEmModel::GetCurrentElement() const 574 { 575 return currentElement; 576 } 577 578 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 579 580 inline void G4VEmModel::SetCurrentElement(const G4Element* elm) 581 { 582 currentElement = elm; 456 inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations() 457 { 458 return fluc; 459 } 460 461 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 462 463 inline G4double G4VEmModel::HighEnergyLimit() const 464 { 465 return highLimit; 466 } 467 468 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 469 470 inline G4double G4VEmModel::LowEnergyLimit() const 471 { 472 return lowLimit; 473 } 474 475 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 476 477 inline G4double G4VEmModel::PolarAngleLimit() const 478 { 479 return polarAngleLimit; 480 } 481 482 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 483 484 inline G4double G4VEmModel::SecondaryThreshold() const 485 { 486 return secondaryThreshold; 487 } 488 489 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 490 491 inline G4bool G4VEmModel::LPMFlag() const 492 { 493 return theLPMflag; 494 } 495 496 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 497 498 inline G4bool G4VEmModel::DeexcitationFlag() const 499 { 500 return flagDeexcitation; 501 } 502 503 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 504 505 inline void G4VEmModel::SetHighEnergyLimit(G4double val) 506 { 507 highLimit = val; 508 } 509 510 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 511 512 inline void G4VEmModel::SetLowEnergyLimit(G4double val) 513 { 514 lowLimit = val; 515 } 516 517 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 518 519 inline void G4VEmModel::SetPolarAngleLimit(G4double val) 520 { 521 polarAngleLimit = val; 522 } 523 524 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 525 526 inline void G4VEmModel::SetSecondaryThreshold(G4double val) 527 { 528 secondaryThreshold = val; 529 } 530 531 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 532 533 inline void G4VEmModel::SetLPMFlag(G4bool val) 534 { 535 theLPMflag = val; 536 } 537 538 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 539 540 inline void G4VEmModel::SetDeexcitationFlag(G4bool val) 541 { 542 flagDeexcitation = val; 543 } 544 545 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 546 547 inline void G4VEmModel::ActivateNuclearStopping(G4bool val) 548 { 549 nuclearStopping = val; 583 550 } 584 551 … … 594 561 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 595 562 596 inline G4double G4VEmModel::MaxSecondaryEnergy(const G4ParticleDefinition*,597 G4double kineticEnergy)598 {599 return kineticEnergy;600 }601 602 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......603 604 563 inline const G4String& G4VEmModel::GetName() const 605 564 { … … 608 567 609 568 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 610 // Methods for msc simulation 611 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 612 613 inline void G4VEmModel::SampleScattering(const G4DynamicParticle*, G4double) 614 {} 615 616 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 617 618 inline G4double G4VEmModel::ComputeTruePathLengthLimit( 619 const G4Track&, 620 G4PhysicsTable*, 621 G4double) 622 { 623 return DBL_MAX; 624 } 625 626 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 627 628 inline G4double G4VEmModel::ComputeGeomPathLength(G4double truePathLength) 629 { 630 return truePathLength; 631 } 632 633 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 634 635 inline G4double G4VEmModel::ComputeTrueStepLength(G4double geomPathLength) 636 { 637 return geomPathLength; 638 } 639 640 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 641 642 inline void G4VEmModel::DefineForRegion(const G4Region*) 643 {} 644 645 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 646 647 inline void G4VEmModel::SetupForMaterial(const G4ParticleDefinition*, 648 const G4Material*, G4double) 649 {} 569 570 inline void G4VEmModel::SetParticleChange(G4VParticleChange* p, 571 G4VEmFluctuationModel* f = 0) 572 { 573 if(p && pParticleChange != p) pParticleChange = p; 574 fluc = f; 575 } 576 577 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 578 579 inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* p) 580 { 581 currentCouple = p; 582 } 583 584 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 585 586 inline const G4MaterialCutsCouple* G4VEmModel::CurrentCouple() const 587 { 588 return currentCouple; 589 } 590 591 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 592 593 inline void G4VEmModel::SetCurrentElement(const G4Element* elm) 594 { 595 currentElement = elm; 596 } 597 598 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 599 600 inline const G4Element* G4VEmModel::GetCurrentElement() const 601 { 602 return currentElement; 603 } 650 604 651 605 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/utils/include/G4VEmProcess.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmProcess.hh,v 1. 47 2008/07/31 13:01:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEmProcess.hh,v 1.51 2009/04/07 18:39:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 108 108 109 109 //------------------------------------------------------------------------ 110 // Methods with standard implementation; may be overwritten if needed 111 //------------------------------------------------------------------------ 112 113 inline G4double RecalculateLambda(G4double kinEnergy, 114 const G4MaterialCutsCouple* couple); 115 116 //------------------------------------------------------------------------ 117 // Generic methods common to all Discrete processes 110 // Implementation of virtual methods common to all Discrete processes 118 111 //------------------------------------------------------------------------ 119 112 120 113 public: 121 122 void PrintInfoDefinition();123 124 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);125 114 126 115 // Initialise for build of tables … … 129 118 // Build physics table during initialisation 130 119 void BuildPhysicsTable(const G4ParticleDefinition&); 120 121 void PrintInfoDefinition(); 122 123 // implementation of virtual method, specific for G4VEmProcess 124 G4double PostStepGetPhysicalInteractionLength( 125 const G4Track& track, 126 G4double previousStepSize, 127 G4ForceCondition* condition 128 ); 129 130 // implementation of virtual method, specific for G4VEmProcess 131 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&); 131 132 132 133 // Store PhysicsTable in a file. … … 145 146 G4bool ascii); 146 147 148 // deexcitation activated per G4Region 149 void ActivateDeexcitation(G4bool, const G4Region* r = 0); 150 147 151 //------------------------------------------------------------------------ 148 152 // Specific methods for Discrete EM post step simulation … … 152 156 G4double CrossSectionPerVolume(G4double kineticEnergy, 153 157 const G4MaterialCutsCouple* couple); 154 155 // implementation of virtual method156 virtual G4double PostStepGetPhysicalInteractionLength(157 const G4Track& track,158 G4double previousStepSize,159 G4ForceCondition* condition160 );161 158 162 159 // It returns the cross section of the process per atom … … 167 164 inline G4double MeanFreePath(const G4Track& track); 168 165 169 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy,170 size_t& idxRegion) const;171 172 166 // It returns cross section per volume 173 167 inline G4double GetLambda(G4double& kinEnergy, … … 203 197 204 198 //------------------------------------------------------------------------ 205 // Specific methods to set, access, modify models 206 //------------------------------------------------------------------------ 207 208 // Add EM model coupled for the region 209 inline void AddEmModel(G4int, G4VEmModel*, const G4Region* region = 0); 199 // Specific methods to set, access, modify models and basic parameters 200 //------------------------------------------------------------------------ 201 202 protected: 203 // Select model in run time 204 inline void SelectModel(G4double& kinEnergy); 205 206 public: 207 // Select model by energy and region index 208 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 209 size_t& idxRegion) const; 210 210 211 // Add model for region, smaller value of order defines which 212 // model will be selected for a given energy interval 213 void AddEmModel(G4int, G4VEmModel*, const G4Region* region = 0); 214 211 215 // Assign a model to a process 212 inline void SetModel(G4VEmModel*);216 void SetModel(G4VEmModel*, G4int index = 1); 213 217 214 218 // return the assigned model 215 inline G4VEmModel* Model();219 G4VEmModel* Model(G4int index = 1); 216 220 217 221 // Define new energy range for the model identified by the name 218 inlinevoid UpdateEmModel(const G4String&, G4double, G4double);222 void UpdateEmModel(const G4String&, G4double, G4double); 219 223 220 224 // Access to models 221 inline G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false); 222 223 //------------------------------------------------------------------------ 224 // Get/set parameters used for simulation of energy loss 225 //------------------------------------------------------------------------ 226 227 inline void ActivateDeexcitation(G4bool, const G4Region* r = 0); 225 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false); 228 226 229 227 inline void SetLambdaFactor(G4double val); … … 233 231 234 232 inline void SetApplyCuts(G4bool val); 233 234 //------------------------------------------------------------------------ 235 // Other generic methods 236 //------------------------------------------------------------------------ 235 237 236 238 protected: … … 242 244 G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*); 243 245 246 inline G4double RecalculateLambda(G4double kinEnergy, 247 const G4MaterialCutsCouple* couple); 248 244 249 inline G4ParticleChangeForGamma* GetParticleChange(); 245 250 … … 248 253 inline void SetSecondaryParticle(const G4ParticleDefinition* p); 249 254 250 inline G4VEmModel* SelectModel(G4double& kinEnergy);251 252 255 inline size_t CurrentMaterialCutsCoupleIndex() const; 253 256 … … 280 283 inline G4double ComputeCurrentLambda(G4double kinEnergy); 281 284 282 // hide assignment operator 283 285 // copy constructor and hide assignment operator 284 286 G4VEmProcess(G4VEmProcess &); 285 287 G4VEmProcess & operator=(const G4VEmProcess &right); … … 297 299 // ======== Parameters of the class fixed at initialisation ======= 298 300 301 std::vector<G4VEmModel*> emModels; 302 299 303 // tables and vectors 300 304 G4PhysicsTable* theLambdaTable; … … 317 321 G4bool applyCuts; 318 322 G4bool startFromNull; 319 320 G4int nRegions; 321 std::vector<G4Region*> regions; 322 std::vector<G4bool> flagsDeexcitation; 323 G4bool useDeexcitation; 324 325 G4int nDERegions; 326 std::vector<const G4Region*> deRegions; 327 G4bool* idxDERegions; 323 328 324 329 // ======== Cashed values - may be state dependent ================ … … 332 337 std::vector<G4DynamicParticle*> secParticles; 333 338 334 G4VEmModel* selectedModel;339 G4VEmModel* currentModel; 335 340 336 341 const G4ParticleDefinition* particle; … … 348 353 349 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); 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 void G4VEmProcess::SelectModel(G4double& kinEnergy) 471 { 472 currentModel = modelManager->SelectModel(kinEnergy, currentMaterialIndex); 473 currentModel->SetCurrentCouple(currentCouple); 474 } 475 476 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 477 478 inline G4VEmModel* G4VEmProcess::SelectModelForMaterial( 479 G4double kinEnergy, size_t& idxRegion) const 480 { 481 return modelManager->SelectModel(kinEnergy, idxRegion); 482 } 483 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 485 486 inline void G4VEmProcess::SetLambdaFactor(G4double val) 487 { 488 if(val > 0.0 && val <= 1.0) lambdaFactor = val; 489 } 490 491 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 492 493 inline void G4VEmProcess::SetIntegral(G4bool val) 494 { 495 if(particle && particle != theGamma) integral = val; 496 if(integral) buildLambdaTable = true; 497 } 498 499 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 500 501 inline G4bool G4VEmProcess::IsIntegral() const 502 { 503 return integral; 504 } 505 506 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 507 508 inline void G4VEmProcess::SetApplyCuts(G4bool val) 509 { 510 applyCuts = val; 511 } 512 513 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 514 515 inline G4double G4VEmProcess::RecalculateLambda(G4double e, 516 const G4MaterialCutsCouple* couple) 517 { 518 DefineMaterial(couple); 519 return ComputeCurrentLambda(e); 520 } 521 522 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 523 524 inline G4ParticleChangeForGamma* G4VEmProcess::GetParticleChange() 525 { 526 return &fParticleChange; 527 } 528 529 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 530 531 inline void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 532 { 533 particle = p; 534 } 535 536 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 537 538 inline void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 539 { 540 secondaryParticle = p; 541 } 542 543 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 544 545 inline size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex() const 546 { 547 return currentMaterialIndex; 548 } 549 550 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 551 552 inline G4double G4VEmProcess::GetGammaEnergyCut() 553 { 554 return (*theCutsGamma)[currentMaterialIndex]; 555 } 556 557 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 558 559 inline G4double G4VEmProcess::GetElectronEnergyCut() 560 { 561 return (*theCutsElectron)[currentMaterialIndex]; 562 } 563 564 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 565 566 inline void G4VEmProcess::SetBuildTableFlag(G4bool val) 567 { 568 buildLambdaTable = val; 569 if(!val) integral = false; 570 } 571 572 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 573 574 inline void G4VEmProcess::SetStartFromNullFlag(G4bool val) 575 { 576 startFromNull = val; 577 } 578 579 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 580 581 inline void G4VEmProcess::InitialiseStep(const G4Track& track) 582 { 583 preStepKinEnergy = track.GetKineticEnergy(); 584 DefineMaterial(track.GetMaterialCutsCouple()); 585 if (theNumberOfInteractionLengthLeft < 0.0) mfpKinEnergy = DBL_MAX; 586 } 587 350 588 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 351 589 … … 358 596 mfpKinEnergy = DBL_MAX; 359 597 } 360 }361 362 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....363 364 inline void G4VEmProcess::InitialiseStep(const G4Track& track)365 {366 preStepKinEnergy = track.GetKineticEnergy();367 DefineMaterial(track.GetMaterialCutsCouple());368 if (theNumberOfInteractionLengthLeft < 0.0) mfpKinEnergy = DBL_MAX;369 }370 371 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....372 373 inline G4double G4VEmProcess::GetLambda(G4double& kineticEnergy,374 const G4MaterialCutsCouple* couple)375 {376 DefineMaterial(couple);377 return GetCurrentLambda(kineticEnergy);378 }379 380 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....381 382 inline G4double G4VEmProcess::GetCurrentLambda(G4double e)383 {384 G4double x = 0.0;385 if(theLambdaTable) x = GetLambdaFromTable(e);386 else x = ComputeCurrentLambda(e);387 return x;388 }389 390 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....391 392 inline G4double G4VEmProcess::RecalculateLambda(G4double e,393 const G4MaterialCutsCouple* couple)394 {395 DefineMaterial(couple);396 return ComputeCurrentLambda(e);397 }398 399 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....400 401 inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e)402 {403 G4VEmModel* currentModel = SelectModel(e);404 G4double x = 0.0;405 if(currentModel)406 x = currentModel->CrossSectionPerVolume(currentMaterial,particle,407 e,(*theCuts)[currentMaterialIndex]);408 return x;409 }410 411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....412 413 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e)414 {415 G4bool b;416 return (((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b));417 598 } 418 599 … … 442 623 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 443 624 444 inline G4double G4VEmProcess::MeanFreePath(const G4Track& track) 445 { 446 DefineMaterial(track.GetMaterialCutsCouple()); 447 preStepLambda = GetCurrentLambda(track.GetKineticEnergy()); 448 G4double x = DBL_MAX; 449 if(DBL_MIN < preStepLambda) x = 1.0/preStepLambda; 625 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e) 626 { 627 G4bool b; 628 return (((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b)); 629 } 630 631 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 632 633 inline G4double G4VEmProcess::GetCurrentLambda(G4double e) 634 { 635 G4double x = 0.0; 636 if(theLambdaTable) x = GetLambdaFromTable(e); 637 else x = ComputeCurrentLambda(e); 450 638 return x; 451 639 } … … 453 641 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 454 642 455 inline G4VEmModel* G4VEmProcess::SelectModel(G4double& kinEnergy) 456 { 457 return modelManager->SelectModel(kinEnergy, currentMaterialIndex); 458 } 459 460 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 461 462 inline G4VEmModel* G4VEmProcess::SelectModelForMaterial( 463 G4double kinEnergy, size_t& idxRegion) const 464 { 465 return modelManager->SelectModel(kinEnergy, idxRegion); 466 } 467 468 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 469 470 inline const G4ParticleDefinition* G4VEmProcess::Particle() const 471 { 472 return particle; 473 } 474 475 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 476 477 inline const G4ParticleDefinition* G4VEmProcess::SecondaryParticle() const 478 { 479 return secondaryParticle; 480 } 481 482 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 483 484 inline G4double G4VEmProcess::GetGammaEnergyCut() 485 { 486 return (*theCutsGamma)[currentMaterialIndex]; 487 } 488 489 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 490 491 inline G4double G4VEmProcess::GetElectronEnergyCut() 492 { 493 return (*theCutsElectron)[currentMaterialIndex]; 494 } 495 496 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 497 498 inline void G4VEmProcess::SetLambdaFactor(G4double val) 499 { 500 if(val > 0.0 && val <= 1.0) lambdaFactor = val; 501 } 502 503 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 504 505 inline G4VEmModel* G4VEmProcess::GetModelByIndex(G4int idx, G4bool ver) 506 { 507 return modelManager->GetModel(idx, ver); 508 } 509 510 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 511 512 inline G4ParticleChangeForGamma* G4VEmProcess::GetParticleChange() 513 { 514 return &fParticleChange; 515 } 516 517 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 518 519 inline void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 520 { 521 particle = p; 522 } 523 524 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 525 526 inline void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 527 { 528 secondaryParticle = p; 529 } 530 531 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 532 533 inline void G4VEmProcess::AddEmModel(G4int order, G4VEmModel* p, 534 const G4Region* region) 535 { 536 G4VEmFluctuationModel* fm = 0; 537 modelManager->AddEmModel(order, p, fm, region); 538 if(p) p->SetParticleChange(pParticleChange); 539 } 540 541 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 542 543 inline void G4VEmProcess::SetModel(G4VEmModel* model) 544 { 545 selectedModel = model; 546 } 547 548 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 549 550 inline G4VEmModel* G4VEmProcess::Model() 551 { 552 return selectedModel; 553 } 554 555 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 556 557 inline void G4VEmProcess::UpdateEmModel(const G4String& nam, 558 G4double emin, G4double emax) 559 { 560 modelManager->UpdateEmModel(nam, emin, emax); 561 } 562 563 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 564 565 inline G4double G4VEmProcess::ComputeCrossSectionPerAtom( 566 G4double kineticEnergy, G4double Z, G4double A, G4double cut) 567 { 568 G4VEmModel* model = SelectModel(kineticEnergy); 569 return model->ComputeCrossSectionPerAtom(particle,kineticEnergy,Z,A,cut); 570 } 571 572 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 573 574 inline void G4VEmProcess::SetLambdaBinning(G4int nbins) 575 { 576 nLambdaBins = nbins; 577 } 578 579 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 580 581 inline G4int G4VEmProcess::LambdaBinning() const 582 { 583 return nLambdaBins; 584 } 585 586 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 587 588 inline void G4VEmProcess::SetMinKinEnergy(G4double e) 589 { 590 minKinEnergy = e; 591 } 592 593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 594 595 inline G4double G4VEmProcess::MinKinEnergy() const 596 { 597 return minKinEnergy; 598 } 599 600 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 601 602 inline void G4VEmProcess::SetMaxKinEnergy(G4double e) 603 { 604 maxKinEnergy = e; 605 } 606 607 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 608 609 inline G4double G4VEmProcess::MaxKinEnergy() const 610 { 611 return maxKinEnergy; 612 } 613 614 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 615 616 inline void G4VEmProcess::SetPolarAngleLimit(G4double val) 617 { 618 if(val < 0.0) polarAngleLimit = 0.0; 619 else if(val > pi) polarAngleLimit = pi; 620 else polarAngleLimit = val; 621 } 622 623 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 624 625 inline G4double G4VEmProcess::PolarAngleLimit() const 626 { 627 return polarAngleLimit; 628 } 629 630 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 631 632 inline void G4VEmProcess::ActivateDeexcitation(G4bool, const G4Region*) 633 {} 634 635 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 636 637 inline const G4PhysicsTable* G4VEmProcess::LambdaTable() const 638 { 639 return theLambdaTable; 640 } 641 642 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 643 644 inline void G4VEmProcess::SetIntegral(G4bool val) 645 { 646 if(particle && particle != theGamma) integral = val; 647 if(integral) buildLambdaTable = true; 648 } 649 650 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 651 652 inline G4bool G4VEmProcess::IsIntegral() const 653 { 654 return integral; 655 } 656 657 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 658 659 inline void G4VEmProcess::SetBuildTableFlag(G4bool val) 660 { 661 buildLambdaTable = val; 662 if(!val) integral = false; 663 } 664 665 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 666 667 inline void G4VEmProcess::SetStartFromNullFlag(G4bool val) 668 { 669 startFromNull = val; 670 } 671 672 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 673 674 inline void G4VEmProcess::SetApplyCuts(G4bool val) 675 { 676 applyCuts = val; 677 } 678 679 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 680 681 inline size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex() const 682 { 683 return currentMaterialIndex; 643 inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e) 644 { 645 SelectModel(e); 646 G4double x = 0.0; 647 if(currentModel) { 648 x = currentModel->CrossSectionPerVolume(currentMaterial,particle, 649 e,(*theCuts)[currentMaterialIndex]); 650 } 651 return x; 684 652 } 685 653 -
trunk/source/processes/electromagnetic/utils/include/G4VEnergyLossProcess.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEnergyLossProcess.hh,v 1.8 3 2008/09/12 16:19:01vnivanch Exp $26 // $Id: G4VEnergyLossProcess.hh,v 1.87 2009/04/07 18:39:47 vnivanch Exp $ 27 27 // GEANT4 tag $Name: 28 28 // … … 126 126 virtual ~G4VEnergyLossProcess(); 127 127 128 private: 129 // clean vectors and arrays 130 void Clean(); 131 128 132 //------------------------------------------------------------------------ 129 133 // Virtual methods to be implemented in concrete processes 130 134 //------------------------------------------------------------------------ 131 135 136 public: 132 137 virtual G4bool IsApplicable(const G4ParticleDefinition& p) = 0; 133 138 … … 143 148 //------------------------------------------------------------------------ 144 149 145 protected:146 147 150 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*, 148 151 const G4Material*, G4double cut); 149 152 150 153 //------------------------------------------------------------------------ 151 // Virtual methods common to all EM ContinuousDiscrete processes152 // Further inheritance is not assumed154 // Virtual methods implementation common to all EM ContinuousDiscrete 155 // processes. Further inheritance is not assumed 153 156 //------------------------------------------------------------------------ 154 157 155 158 public: 156 159 160 // prepare all tables 161 void PreparePhysicsTable(const G4ParticleDefinition&); 162 163 // build all tables 164 void BuildPhysicsTable(const G4ParticleDefinition&); 165 166 // build a table 167 G4PhysicsTable* BuildDEDXTable(G4EmTableType tType = fRestricted); 168 169 // build a table 170 G4PhysicsTable* BuildLambdaTable(G4EmTableType tType = fRestricted); 171 172 // summary printout after initialisation 157 173 void PrintInfoDefinition(); 158 174 159 void PreparePhysicsTable(const G4ParticleDefinition&); 160 161 void BuildPhysicsTable(const G4ParticleDefinition&); 162 175 // Add subcutoff option for the region 176 void ActivateSubCutoff(G4bool val, const G4Region* region = 0); 177 178 // Activate deexcitation code for region 179 void ActivateDeexcitation(G4bool, const G4Region* region = 0); 180 181 // Step limit from AlongStep 163 182 G4double AlongStepGetPhysicalInteractionLength(const G4Track&, 164 183 G4double previousStepSize, … … 167 186 G4GPILSelection* selection); 168 187 188 // Step limit from cross section 169 189 G4double PostStepGetPhysicalInteractionLength(const G4Track& track, 170 190 G4double previousStepSize, 171 191 G4ForceCondition* condition); 172 192 193 // AlongStep computations 173 194 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&); 174 195 196 // Sampling of secondaries in vicinity of geometrical boundary 197 void SampleSubCutSecondaries(std::vector<G4Track*>&, const G4Step&, 198 G4VEmModel* model, G4int matIdx, 199 G4double& extraEdep); 200 201 // PostStep sampling of secondaries 175 202 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&); 176 203 177 // Store PhysicsTable in a file.178 // Return false in case of failure at I/O204 // Store all PhysicsTable in files. 205 // Return false in case of any fatal failure at I/O 179 206 G4bool StorePhysicsTable(const G4ParticleDefinition*, 180 207 const G4String& directory, 181 208 G4bool ascii = false); 182 209 183 // Retrieve Physics from a file. 184 // (return true if the Physics Table can be build by using file) 185 // (return false if the process has no functionality or in case of failure) 186 // File name should is constructed as processName+particleName and the 187 // should be placed under the directory specifed by the argument. 210 // Retrieve all Physics from a files. 211 // Return true if all the Physics Table are built. 212 // Return false if any fatal failure. 188 213 G4bool RetrievePhysicsTable(const G4ParticleDefinition*, 189 214 const G4String& directory, 190 215 G4bool ascii); 191 216 217 private: 218 // store a table 219 G4bool StoreTable(const G4ParticleDefinition* p, 220 G4PhysicsTable*, G4bool ascii, 221 const G4String& directory, 222 const G4String& tname); 223 224 // retrieve a table 225 G4bool RetrieveTable(const G4ParticleDefinition* p, 226 G4PhysicsTable*, G4bool ascii, 227 const G4String& directory, 228 const G4String& tname, 229 G4bool mandatory); 230 231 //------------------------------------------------------------------------ 232 // Public interface to cross section, mfp and sampling of fluctuations 233 // These methods are not used in run time 234 //------------------------------------------------------------------------ 235 236 public: 237 // access to dispersion of restricted energy loss 238 G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, 239 const G4DynamicParticle* dp, 240 G4double length); 241 242 // Access to cross section table 243 G4double CrossSectionPerVolume(G4double kineticEnergy, 244 const G4MaterialCutsCouple* couple); 245 246 // access to cross section 247 G4double MeanFreePath(const G4Track& track); 248 249 // access to step limit 250 G4double ContinuousStepLimit(const G4Track& track, 251 G4double previousStepSize, 252 G4double currentMinimumStep, 253 G4double& currentSafety); 254 192 255 protected: 193 256 257 // implementation of the pure virtual method 194 258 G4double GetMeanFreePath(const G4Track& track, 195 259 G4double previousStepSize, 196 260 G4ForceCondition* condition); 197 261 262 // implementation of the pure virtual method 198 263 G4double GetContinuousStepLimit(const G4Track& track, 199 264 G4double previousStepSize, … … 202 267 203 268 //------------------------------------------------------------------------ 204 // Specific methods for along/post step EM processes 205 //------------------------------------------------------------------------ 269 // Run time method which may be also used by derived processes 270 //------------------------------------------------------------------------ 271 272 // creeation of an empty vector for cross section 273 G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*, 274 G4double cut); 275 276 inline size_t CurrentMaterialCutsCoupleIndex() const; 277 278 inline G4double GetCurrentRange() const; 279 280 //------------------------------------------------------------------------ 281 // Specific methods to set, access, modify models 282 //------------------------------------------------------------------------ 283 284 // Select model in run time 285 inline void SelectModel(G4double kinEnergy); 206 286 207 287 public: 208 288 // Select model by energy and region index 289 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 290 size_t& idx) const; 291 292 // Add EM model coupled with fluctuation model for region, smaller value 293 // of order defines which pair of models will be selected for a given 294 // energy interval 295 void AddEmModel(G4int, G4VEmModel*, 296 G4VEmFluctuationModel* fluc = 0, 297 const G4Region* region = 0); 298 299 // Define new energy range for the model identified by the name 300 void UpdateEmModel(const G4String&, G4double, G4double); 301 302 // Assign a model to a process 303 void SetEmModel(G4VEmModel*, G4int index=1); 304 305 // return the assigned model 306 G4VEmModel* EmModel(G4int index=1); 307 308 // Access to models 309 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false); 310 311 G4int NumberOfModels(); 312 313 // Assign a fluctuation model to a process 314 void SetFluctModel(G4VEmFluctuationModel*); 315 316 // return the assigned fluctuation model 317 inline G4VEmFluctuationModel* FluctModel(); 318 319 //------------------------------------------------------------------------ 320 // Define and access particle type 321 //------------------------------------------------------------------------ 322 323 protected: 324 inline void SetParticle(const G4ParticleDefinition* p); 325 inline void SetSecondaryParticle(const G4ParticleDefinition* p); 326 327 public: 328 inline void SetBaseParticle(const G4ParticleDefinition* p); 329 inline const G4ParticleDefinition* Particle() const; 330 inline const G4ParticleDefinition* BaseParticle() const; 331 inline const G4ParticleDefinition* SecondaryParticle() const; 332 333 //------------------------------------------------------------------------ 334 // Get/set parameters to configure the process at initialisation time 335 //------------------------------------------------------------------------ 336 337 // Add subcutoff process (bremsstrahlung) to sample secondary 338 // particle production in vicinity of the geometry boundary 209 339 void AddCollaborativeProcess(G4VEnergyLossProcess*); 210 340 211 void SampleSubCutSecondaries(std::vector<G4Track*>&, const G4Step&, 212 G4VEmModel* model, G4int matIdx, 213 G4double& extraEdep); 214 215 G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, 216 const G4DynamicParticle* dp, 217 G4double length); 218 219 //------------------------------------------------------------------------ 220 // Specific methods to build and access Physics Tables 221 //------------------------------------------------------------------------ 222 223 G4PhysicsTable* BuildDEDXTable(G4EmTableType tType = fRestricted); 224 225 G4PhysicsTable* BuildLambdaTable(G4EmTableType tType = fRestricted); 341 inline void SetLossFluctuations(G4bool val); 342 inline void SetRandomStep(G4bool val); 343 344 inline void SetIntegral(G4bool val); 345 inline G4bool IsIntegral() const; 346 347 // Set/Get flag "isIonisation" 348 inline void SetIonisation(G4bool val); 349 inline G4bool IsIonisationProcess() const; 350 351 // Redefine parameteters for stepping control 352 // 353 inline void SetLinearLossLimit(G4double val); 354 inline void SetMinSubRange(G4double val); 355 inline void SetLambdaFactor(G4double val); 356 inline void SetStepFunction(G4double v1, G4double v2); 357 358 inline G4int NumberOfSubCutoffRegions() const; 359 inline G4int NumberOfDERegions() const; 360 361 //------------------------------------------------------------------------ 362 // Specific methods to path Physics Tables to the process 363 //------------------------------------------------------------------------ 226 364 227 365 void SetDEDXTable(G4PhysicsTable* p, G4EmTableType tType); 228 366 void SetCSDARangeTable(G4PhysicsTable* pRange); 229 367 void SetRangeTableForLoss(G4PhysicsTable* p); 368 void SetSecondaryRangeTable(G4PhysicsTable* p); 230 369 void SetInverseRangeTable(G4PhysicsTable* p); 231 void SetSecondaryRangeTable(G4PhysicsTable* p);232 370 233 371 void SetLambdaTable(G4PhysicsTable* p); … … 251 389 // Max kinetic energy for tables 252 390 inline void SetMaxKinEnergyForCSDARange(G4double e); 391 392 // Return values for given G4MaterialCutsCouple 393 inline G4double GetDEDX(G4double& kineticEnergy, const G4MaterialCutsCouple*); 394 inline G4double GetDEDXForSubsec(G4double& kineticEnergy, 395 const G4MaterialCutsCouple*); 396 inline G4double GetRange(G4double& kineticEnergy, const G4MaterialCutsCouple*); 397 inline G4double GetCSDARange(G4double& kineticEnergy, const G4MaterialCutsCouple*); 398 inline G4double GetRangeForLoss(G4double& kineticEnergy, const G4MaterialCutsCouple*); 399 inline G4double GetKineticEnergy(G4double& range, const G4MaterialCutsCouple*); 400 inline G4double GetLambda(G4double& kineticEnergy, const G4MaterialCutsCouple*); 401 402 inline G4bool TablesAreBuilt() const; 253 403 254 404 // Access to specific tables … … 264 414 inline G4PhysicsTable* SubLambdaTable(); 265 415 266 // Return values for given G4MaterialCutsCouple267 inline G4double GetDEDX(G4double& kineticEnergy, const G4MaterialCutsCouple*);268 inline G4double GetDEDXForSubsec(G4double& kineticEnergy,269 const G4MaterialCutsCouple*);270 inline G4double GetRange(G4double& kineticEnergy, const G4MaterialCutsCouple*);271 inline G4double GetCSDARange(G4double& kineticEnergy, const G4MaterialCutsCouple*);272 inline G4double GetRangeForLoss(G4double& kineticEnergy, const G4MaterialCutsCouple*);273 inline G4double GetKineticEnergy(G4double& range, const G4MaterialCutsCouple*);274 inline G4double GetLambda(G4double& kineticEnergy, const G4MaterialCutsCouple*);275 276 inline G4bool TablesAreBuilt() const;277 278 //------------------------------------------------------------------------279 // Define and access particle type280 //------------------------------------------------------------------------281 282 inline void SetBaseParticle(const G4ParticleDefinition* p);283 inline const G4ParticleDefinition* Particle() const;284 inline const G4ParticleDefinition* BaseParticle() const;285 inline const G4ParticleDefinition* SecondaryParticle() const;286 287 //------------------------------------------------------------------------288 // Specific methods to set, access, modify models289 //------------------------------------------------------------------------290 291 // Add EM model coupled with fluctuation model for the region292 inline void AddEmModel(G4int, G4VEmModel*,293 G4VEmFluctuationModel* fluc = 0,294 const G4Region* region = 0);295 296 // Assign a model to a process297 inline void SetEmModel(G4VEmModel*, G4int index=1);298 299 // return the assigned model300 inline G4VEmModel* EmModel(G4int index=1);301 302 // Assign a fluctuation model to a process303 inline void SetFluctModel(G4VEmFluctuationModel*);304 305 // return the assigned fluctuation model306 inline G4VEmFluctuationModel* FluctModel();307 308 // Define new energy range for the model identified by the name309 inline void UpdateEmModel(const G4String&, G4double, G4double);310 311 // Access to models312 inline G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false);313 314 inline G4int NumberOfModels();315 316 //------------------------------------------------------------------------317 // Get/set parameters used for simulation of energy loss318 //------------------------------------------------------------------------319 320 inline void SetLossFluctuations(G4bool val);321 inline void SetRandomStep(G4bool val);322 inline void SetIntegral(G4bool val);323 inline G4bool IsIntegral() const;324 325 // Set/Get flag "isIonisation"326 inline void SetIonisation(G4bool val);327 inline G4bool IsIonisationProcess() const;328 329 // Redefine parameteters for stepping control330 //331 inline void SetLinearLossLimit(G4double val);332 inline void SetMinSubRange(G4double val);333 inline void SetStepFunction(G4double v1, G4double v2);334 inline void SetLambdaFactor(G4double val);335 336 337 // Add subcutoff option for the region338 void ActivateSubCutoff(G4bool val, const G4Region* region = 0);339 340 inline G4int NumberOfSubCutoffRegions() const;341 342 // Activate deexcitation code343 virtual void ActivateDeexcitation(G4bool, const G4Region* region = 0);344 345 //------------------------------------------------------------------------346 // Public interface to helper functions347 //------------------------------------------------------------------------348 349 inline350 G4VEmModel* SelectModelForMaterial(G4double kinEnergy, size_t& idx) const;351 352 inline G4double MeanFreePath(const G4Track& track);353 354 inline G4double ContinuousStepLimit(const G4Track& track,355 G4double previousStepSize,356 G4double currentMinimumStep,357 G4double& currentSafety);358 359 416 //------------------------------------------------------------------------ 360 417 // Run time method for simulation of ionisation … … 367 424 inline void SetDynamicMassCharge(G4double massratio, G4double charge2ratio); 368 425 369 // Access to cross section table370 G4double CrossSectionPerVolume(G4double kineticEnergy,371 const G4MaterialCutsCouple* couple);372 373 protected:374 375 G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*,376 G4double cut);377 378 inline G4ParticleChangeForLoss* GetParticleChange();379 380 inline void SetParticle(const G4ParticleDefinition* p);381 382 inline void SetSecondaryParticle(const G4ParticleDefinition* p);383 384 inline void SelectModel(G4double kinEnergy);385 386 inline size_t CurrentMaterialCutsCoupleIndex() const;387 388 inline G4double GetCurrentRange() const;389 390 426 private: 391 392 //------------------------------------------------------------------------393 // Management of tables394 //------------------------------------------------------------------------395 396 void Clear();397 398 G4bool StoreTable(const G4ParticleDefinition* p,399 G4PhysicsTable*, G4bool ascii,400 const G4String& directory,401 const G4String& tname);402 403 G4bool RetrieveTable(const G4ParticleDefinition* p,404 G4PhysicsTable*, G4bool ascii,405 const G4String& directory,406 const G4String& tname,407 G4bool mandatory);408 427 409 428 // define material and indexes 410 429 inline void DefineMaterial(const G4MaterialCutsCouple* couple); 411 430 412 // Returnd values for scaled energy using mass of the base particle 413 // 431 //------------------------------------------------------------------------ 432 // Compute values using scaling relation, mass and charge of based particle 433 //------------------------------------------------------------------------ 434 414 435 inline G4double GetDEDXForScaledEnergy(G4double scaledKinEnergy); 415 436 inline G4double GetSubDEDXForScaledEnergy(G4double scaledKinEnergy); … … 418 439 inline G4double GetScaledRangeForScaledEnergy(G4double scaledKinEnergy); 419 440 inline G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy); 441 inline G4double ScaledKinEnergyForLoss(G4double range); 420 442 inline G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy); 421 inline G4double ScaledKinEnergyForLoss(G4double range);422 443 inline void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy); 423 444 424 445 // hide assignment operator 425 426 446 G4VEnergyLossProcess(G4VEnergyLossProcess &); 427 447 G4VEnergyLossProcess & operator=(const G4VEnergyLossProcess &right); … … 444 464 G4VEmFluctuationModel* fluctModel; 445 465 std::vector<const G4Region*> scoffRegions; 466 std::vector<const G4Region*> deRegions; 446 467 G4int nSCoffRegions; 447 G4int* idxSCoffRegions; 468 G4int nDERegions; 469 G4bool* idxSCoffRegions; 470 G4bool* idxDERegions; 448 471 449 472 std::vector<G4VEnergyLossProcess*> scProcesses; … … 493 516 G4bool isIonisation; 494 517 G4bool useSubCutoff; 518 G4bool useDeexcitation; 495 519 496 520 protected: … … 531 555 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 532 556 533 inline void G4VEnergyLossProcess::DefineMaterial( 534 const G4MaterialCutsCouple* couple) 535 { 536 if(couple != currentCouple) { 537 currentCouple = couple; 538 currentMaterial = couple->GetMaterial(); 539 currentMaterialIndex = couple->GetIndex(); 540 mfpKinEnergy = DBL_MAX; 541 } 557 inline size_t G4VEnergyLossProcess::CurrentMaterialCutsCoupleIndex() const 558 { 559 return currentMaterialIndex; 560 } 561 562 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 563 564 inline G4double G4VEnergyLossProcess::GetCurrentRange() const 565 { 566 return fRange; 567 } 568 569 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 570 571 inline void G4VEnergyLossProcess::SelectModel(G4double kinEnergy) 572 { 573 currentModel = modelManager->SelectModel(kinEnergy, currentMaterialIndex); 574 currentModel->SetCurrentCouple(currentCouple); 575 } 576 577 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 578 579 inline G4VEmModel* G4VEnergyLossProcess::SelectModelForMaterial( 580 G4double kinEnergy, size_t& idx) const 581 { 582 return modelManager->SelectModel(kinEnergy, idx); 583 } 584 585 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 586 587 inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p) 588 { 589 fluctModel = p; 590 } 591 592 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 593 594 inline G4VEmFluctuationModel* G4VEnergyLossProcess::FluctModel() 595 { 596 return fluctModel; 597 } 598 599 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 600 601 inline void G4VEnergyLossProcess::SetParticle(const G4ParticleDefinition* p) 602 { 603 particle = p; 604 } 605 606 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 607 608 inline void G4VEnergyLossProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 609 { 610 secondaryParticle = p; 611 } 612 613 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 614 615 inline void G4VEnergyLossProcess::SetBaseParticle(const G4ParticleDefinition* p) 616 { 617 baseParticle = p; 618 } 619 620 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 621 622 inline const G4ParticleDefinition* G4VEnergyLossProcess::Particle() const 623 { 624 return particle; 625 } 626 627 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 628 629 inline const G4ParticleDefinition* G4VEnergyLossProcess::BaseParticle() const 630 { 631 return baseParticle; 632 } 633 634 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 635 636 inline const G4ParticleDefinition* G4VEnergyLossProcess::SecondaryParticle() const 637 { 638 return secondaryParticle; 639 } 640 641 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 642 643 inline void G4VEnergyLossProcess::SetLossFluctuations(G4bool val) 644 { 645 lossFluctuationFlag = val; 646 } 647 648 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 649 650 inline void G4VEnergyLossProcess::SetRandomStep(G4bool val) 651 { 652 rndmStepFlag = val; 653 } 654 655 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 656 657 inline void G4VEnergyLossProcess::SetIntegral(G4bool val) 658 { 659 integral = val; 660 } 661 662 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 663 664 inline G4bool G4VEnergyLossProcess::IsIntegral() const 665 { 666 return integral; 667 } 668 669 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 670 671 inline void G4VEnergyLossProcess::SetIonisation(G4bool val) 672 { 673 isIonisation = val; 674 if(val) aGPILSelection = CandidateForSelection; 675 else aGPILSelection = NotCandidateForSelection; 676 } 677 678 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 679 680 inline G4bool G4VEnergyLossProcess::IsIonisationProcess() const 681 { 682 return isIonisation; 683 } 684 685 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 686 687 inline void G4VEnergyLossProcess::SetLinearLossLimit(G4double val) 688 { 689 linLossLimit = val; 690 } 691 692 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 693 694 inline void G4VEnergyLossProcess::SetMinSubRange(G4double val) 695 { 696 minSubRange = val; 697 } 698 699 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 700 701 inline void G4VEnergyLossProcess::SetLambdaFactor(G4double val) 702 { 703 if(val > 0.0 && val <= 1.0) lambdaFactor = val; 704 } 705 706 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 707 708 void G4VEnergyLossProcess::SetStepFunction(G4double v1, G4double v2) 709 { 710 dRoverRange = v1; 711 finalRange = v2; 712 if (dRoverRange > 0.999) dRoverRange = 1.0; 713 currentCouple = 0; 714 mfpKinEnergy = DBL_MAX; 715 } 716 717 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 718 719 inline G4int G4VEnergyLossProcess::NumberOfSubCutoffRegions() const 720 { 721 return nSCoffRegions; 722 } 723 724 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 725 726 inline G4int G4VEnergyLossProcess::NumberOfDERegions() const 727 { 728 return nDERegions; 729 } 730 731 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 732 733 inline void G4VEnergyLossProcess::SetDEDXBinning(G4int nbins) 734 { 735 nBins = nbins; 736 } 737 738 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 739 740 inline void G4VEnergyLossProcess::SetLambdaBinning(G4int nbins) 741 { 742 nBins = nbins; 743 } 744 745 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 746 747 inline void G4VEnergyLossProcess::SetDEDXBinningForCSDARange(G4int nbins) 748 { 749 nBinsCSDA = nbins; 750 } 751 752 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 753 754 inline void G4VEnergyLossProcess::SetMinKinEnergy(G4double e) 755 { 756 minKinEnergy = e; 757 } 758 759 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 760 761 inline G4double G4VEnergyLossProcess::MinKinEnergy() const 762 { 763 return minKinEnergy; 764 } 765 766 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 767 768 inline void G4VEnergyLossProcess::SetMaxKinEnergy(G4double e) 769 { 770 maxKinEnergy = e; 771 if(e < maxKinEnergyCSDA) maxKinEnergyCSDA = e; 772 } 773 774 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 775 776 inline G4double G4VEnergyLossProcess::MaxKinEnergy() const 777 { 778 return maxKinEnergy; 779 } 780 781 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 782 783 inline void G4VEnergyLossProcess::SetMaxKinEnergyForCSDARange(G4double e) 784 { 785 maxKinEnergyCSDA = e; 542 786 } 543 787 … … 558 802 DefineMaterial(couple); 559 803 return GetSubDEDXForScaledEnergy(kineticEnergy*massRatio); 560 }561 562 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....563 564 inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e)565 {566 G4bool b;567 G4double x =568 ((*theDEDXTable)[currentMaterialIndex]->GetValue(e, b))*chargeSqRatio;569 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);570 return x;571 }572 573 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....574 575 inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e)576 {577 G4bool b;578 G4double x =579 ((*theDEDXSubTable)[currentMaterialIndex]->GetValue(e, b))*chargeSqRatio;580 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);581 return x;582 }583 584 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....585 586 inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e)587 {588 G4bool b;589 G4double x = 0.0;590 // if(theIonisationTable) {591 x = ((*theIonisationTable)[currentMaterialIndex]->GetValue(e, b))592 *chargeSqRatio;593 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);594 //}595 return x;596 }597 598 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....599 600 inline601 G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e)602 {603 G4bool b;604 G4double x = 0.0;605 //if(theIonisationSubTable) {606 x = ((*theIonisationSubTable)[currentMaterialIndex]->GetValue(e, b))607 *chargeSqRatio;608 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);609 //}610 return x;611 804 } 612 805 … … 643 836 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 644 837 838 inline G4double G4VEnergyLossProcess::GetRangeForLoss( 839 G4double& kineticEnergy, 840 const G4MaterialCutsCouple* couple) 841 { 842 DefineMaterial(couple); 843 G4double x = DBL_MAX; 844 if(theRangeTableForLoss) 845 x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor; 846 // G4cout << "Range from " << GetProcessName() 847 // << " e= " << kineticEnergy << " r= " << x << G4endl; 848 return x; 849 } 850 851 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 852 853 inline G4double G4VEnergyLossProcess::GetKineticEnergy( 854 G4double& range, 855 const G4MaterialCutsCouple* couple) 856 { 857 DefineMaterial(couple); 858 G4double r = range/reduceFactor; 859 G4double e = ScaledKinEnergyForLoss(r)/massRatio; 860 return e; 861 } 862 863 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 864 865 inline G4double G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy, 866 const G4MaterialCutsCouple* couple) 867 { 868 DefineMaterial(couple); 869 G4double x = 0.0; 870 if(theLambdaTable) x = GetLambdaForScaledEnergy(kineticEnergy*massRatio); 871 return x; 872 } 873 874 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 875 876 inline G4bool G4VEnergyLossProcess::TablesAreBuilt() const 877 { 878 return tablesAreBuilt; 879 } 880 881 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 882 883 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTable() const 884 { 885 return theDEDXTable; 886 } 887 888 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 889 890 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTableForSubsec() const 891 { 892 return theDEDXSubTable; 893 } 894 895 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 896 897 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const 898 { 899 return theDEDXunRestrictedTable; 900 } 901 902 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 903 904 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const 905 { 906 G4PhysicsTable* t = theDEDXTable; 907 if(theIonisationTable) t = theIonisationTable; 908 return t; 909 } 910 911 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 912 913 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const 914 { 915 G4PhysicsTable* t = theDEDXSubTable; 916 if(theIonisationSubTable) t = theIonisationSubTable; 917 return t; 918 } 919 920 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 921 922 inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const 923 { 924 return theCSDARangeTable; 925 } 926 927 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 928 929 inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const 930 { 931 return theRangeTableForLoss; 932 } 933 934 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 935 936 inline G4PhysicsTable* G4VEnergyLossProcess::InverseRangeTable() const 937 { 938 return theInverseRangeTable; 939 } 940 941 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 942 943 inline G4PhysicsTable* G4VEnergyLossProcess::LambdaTable() 944 { 945 return theLambdaTable; 946 } 947 948 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 949 950 inline G4PhysicsTable* G4VEnergyLossProcess::SubLambdaTable() 951 { 952 return theSubLambdaTable; 953 } 954 955 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 956 957 inline G4double G4VEnergyLossProcess::SampleRange() 958 { 959 G4double e = amu_c2*preStepKinEnergy/particle->GetPDGMass(); 960 G4bool b; 961 G4double s = fRange*std::pow(10.,vstrag->GetValue(e,b)); 962 G4double x = fRange + G4RandGauss::shoot(0.0,s); 963 if(x > 0.0) fRange = x; 964 return fRange; 965 } 966 967 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 968 969 inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio, 970 G4double charge2ratio) 971 { 972 massRatio = massratio; 973 chargeSqRatio = charge2ratio; 974 reduceFactor = 1.0/(chargeSqRatio*massRatio); 975 } 976 977 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 978 979 inline void G4VEnergyLossProcess::DefineMaterial( 980 const G4MaterialCutsCouple* couple) 981 { 982 if(couple != currentCouple) { 983 currentCouple = couple; 984 currentMaterial = couple->GetMaterial(); 985 currentMaterialIndex = couple->GetIndex(); 986 mfpKinEnergy = DBL_MAX; 987 } 988 } 989 990 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 991 992 inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e) 993 { 994 G4bool b; 995 G4double x = 996 ((*theDEDXTable)[currentMaterialIndex]->GetValue(e, b))*chargeSqRatio; 997 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy); 998 return x; 999 } 1000 1001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1002 1003 inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e) 1004 { 1005 G4bool b; 1006 G4double x = 1007 ((*theDEDXSubTable)[currentMaterialIndex]->GetValue(e, b))*chargeSqRatio; 1008 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy); 1009 return x; 1010 } 1011 1012 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1013 1014 inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e) 1015 { 1016 G4bool b; 1017 G4double x = 0.0; 1018 // if(theIonisationTable) { 1019 x = ((*theIonisationTable)[currentMaterialIndex]->GetValue(e, b)) 1020 *chargeSqRatio; 1021 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy); 1022 //} 1023 return x; 1024 } 1025 1026 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1027 1028 inline 1029 G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e) 1030 { 1031 G4bool b; 1032 G4double x = 0.0; 1033 //if(theIonisationSubTable) { 1034 x = ((*theIonisationSubTable)[currentMaterialIndex]->GetValue(e, b)) 1035 *chargeSqRatio; 1036 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy); 1037 //} 1038 return x; 1039 } 1040 1041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1042 1043 inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e) 1044 { 1045 G4bool b; 1046 G4double x = ((*theRangeTableForLoss)[currentMaterialIndex])->GetValue(e, b); 1047 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy); 1048 return x; 1049 } 1050 1051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1052 645 1053 inline G4double G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy( 646 1054 G4double e) … … 657 1065 } 658 1066 return x; 659 }660 661 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....662 663 inline G4double G4VEnergyLossProcess::GetRangeForLoss(664 G4double& kineticEnergy,665 const G4MaterialCutsCouple* couple)666 {667 DefineMaterial(couple);668 G4double x = DBL_MAX;669 if(theRangeTableForLoss)670 x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;671 // G4cout << "Range from " << GetProcessName()672 // << " e= " << kineticEnergy << " r= " << x << G4endl;673 return x;674 }675 676 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....677 678 inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e)679 {680 G4bool b;681 G4double x = ((*theRangeTableForLoss)[currentMaterialIndex])->GetValue(e, b);682 if(e < minKinEnergy) x *= std::sqrt(e/minKinEnergy);683 return x;684 }685 686 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....687 688 inline G4double G4VEnergyLossProcess::GetKineticEnergy(689 G4double& range,690 const G4MaterialCutsCouple* couple)691 {692 DefineMaterial(couple);693 G4double r = range/reduceFactor;694 G4double e = ScaledKinEnergyForLoss(r)/massRatio;695 return e;696 1067 } 697 1068 … … 711 1082 } 712 1083 return e; 713 }714 715 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....716 717 inline G4double G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy,718 const G4MaterialCutsCouple* couple)719 {720 DefineMaterial(couple);721 G4double x = 0.0;722 if(theLambdaTable) x = GetLambdaForScaledEnergy(kineticEnergy*massRatio);723 return x;724 1084 } 725 1085 … … 758 1118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 759 1119 760 inline G4double G4VEnergyLossProcess::ContinuousStepLimit(761 const G4Track& track, G4double x, G4double y, G4double& z)762 {763 G4GPILSelection sel;764 return AlongStepGetPhysicalInteractionLength(track, x, y, z, &sel);765 }766 767 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....768 769 inline G4double G4VEnergyLossProcess::SampleRange()770 {771 G4double e = amu_c2*preStepKinEnergy/particle->GetPDGMass();772 G4bool b;773 G4double s = fRange*std::pow(10.,vstrag->GetValue(e,b));774 G4double x = fRange + G4RandGauss::shoot(0.0,s);775 if(x > 0.0) fRange = x;776 return fRange;777 }778 779 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....780 781 inline G4double G4VEnergyLossProcess::MeanFreePath(const G4Track& track)782 {783 DefineMaterial(track.GetMaterialCutsCouple());784 preStepLambda = GetLambdaForScaledEnergy(track.GetKineticEnergy()*massRatio);785 G4double x = DBL_MAX;786 if(DBL_MIN < preStepLambda) x = 1.0/preStepLambda;787 return x;788 }789 790 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....791 792 inline G4double G4VEnergyLossProcess::MinPrimaryEnergy(793 const G4ParticleDefinition*, const G4Material*, G4double cut)794 {795 return cut;796 }797 798 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....799 800 inline void G4VEnergyLossProcess::SelectModel(G4double kinEnergy)801 {802 currentModel = modelManager->SelectModel(kinEnergy, currentMaterialIndex);803 }804 805 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....806 807 inline G4VEmModel* G4VEnergyLossProcess::SelectModelForMaterial(808 G4double kinEnergy, size_t& idx) const809 {810 return modelManager->SelectModel(kinEnergy, idx);811 }812 813 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....814 815 inline G4ParticleChangeForLoss* G4VEnergyLossProcess::GetParticleChange()816 {817 return &fParticleChange;818 }819 820 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....821 822 inline const G4ParticleDefinition* G4VEnergyLossProcess::Particle() const823 {824 return particle;825 }826 827 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....828 829 inline const G4ParticleDefinition* G4VEnergyLossProcess::BaseParticle() const830 {831 return baseParticle;832 }833 834 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....835 836 inline const G4ParticleDefinition* G4VEnergyLossProcess::SecondaryParticle() const837 {838 return secondaryParticle;839 }840 841 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....842 843 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTable() const844 {845 return theDEDXTable;846 }847 848 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....849 850 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTableForSubsec() const851 {852 return theDEDXSubTable;853 }854 855 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....856 857 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const858 {859 return theDEDXunRestrictedTable;860 }861 862 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....863 864 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const865 {866 G4PhysicsTable* t = theDEDXTable;867 if(theIonisationTable) t = theIonisationTable;868 return t;869 }870 871 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....872 873 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const874 {875 G4PhysicsTable* t = theDEDXSubTable;876 if(theIonisationSubTable) t = theIonisationSubTable;877 return t;878 }879 880 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....881 882 inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const883 {884 return theCSDARangeTable;885 }886 887 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....888 889 inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const890 {891 return theRangeTableForLoss;892 }893 894 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....895 896 inline G4PhysicsTable* G4VEnergyLossProcess::InverseRangeTable() const897 {898 return theInverseRangeTable;899 }900 901 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....902 903 inline G4PhysicsTable* G4VEnergyLossProcess::LambdaTable()904 {905 return theLambdaTable;906 }907 908 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....909 910 inline G4PhysicsTable* G4VEnergyLossProcess::SubLambdaTable()911 {912 return theSubLambdaTable;913 }914 915 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....916 917 inline G4bool G4VEnergyLossProcess::IsIntegral() const918 {919 return integral;920 }921 922 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....923 924 inline size_t G4VEnergyLossProcess::CurrentMaterialCutsCoupleIndex() const925 {926 return currentMaterialIndex;927 }928 929 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....930 931 inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio,932 G4double charge2ratio)933 {934 massRatio = massratio;935 chargeSqRatio = charge2ratio;936 reduceFactor = 1.0/(chargeSqRatio*massRatio);937 }938 939 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....940 941 inline G4double G4VEnergyLossProcess::GetCurrentRange() const942 {943 return fRange;944 }945 946 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....947 948 inline949 void G4VEnergyLossProcess::AddEmModel(G4int order, G4VEmModel* p,950 G4VEmFluctuationModel* fluc,951 const G4Region* region)952 {953 modelManager->AddEmModel(order, p, fluc, region);954 if(p) p->SetParticleChange(pParticleChange, fluc);955 }956 957 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....958 959 inline960 G4VEmModel* G4VEnergyLossProcess::GetModelByIndex(G4int idx, G4bool ver)961 {962 return modelManager->GetModel(idx, ver);963 }964 965 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....966 967 inline G4int G4VEnergyLossProcess::NumberOfModels()968 {969 return modelManager->NumberOfModels();970 }971 972 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....973 974 inline void G4VEnergyLossProcess::SetEmModel(G4VEmModel* p, G4int index)975 {976 G4int n = emModels.size();977 if(index >= n) for(G4int i=n; i<index+1; i++) {emModels.push_back(0);}978 emModels[index] = p;979 }980 981 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....982 983 inline G4VEmModel* G4VEnergyLossProcess::EmModel(G4int index)984 {985 G4VEmModel* p = 0;986 if(index >= 0 && index < G4int(emModels.size())) p = emModels[index];987 return p;988 }989 990 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....991 992 inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p)993 {994 fluctModel = p;995 }996 997 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....998 999 inline G4VEmFluctuationModel* G4VEnergyLossProcess::FluctModel()1000 {1001 return fluctModel;1002 }1003 1004 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1005 1006 inline void G4VEnergyLossProcess::UpdateEmModel(const G4String& nam,1007 G4double emin, G4double emax)1008 {1009 modelManager->UpdateEmModel(nam, emin, emax);1010 }1011 1012 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1013 1014 inline void G4VEnergyLossProcess::SetIntegral(G4bool val)1015 {1016 integral = val;1017 }1018 1019 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1020 1021 inline void G4VEnergyLossProcess::SetParticle(const G4ParticleDefinition* p)1022 {1023 particle = p;1024 }1025 1026 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1027 1028 inline void G4VEnergyLossProcess::SetBaseParticle(const G4ParticleDefinition* p)1029 {1030 baseParticle = p;1031 }1032 1033 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1034 1035 inline void G4VEnergyLossProcess::SetSecondaryParticle(const G4ParticleDefinition* p)1036 {1037 secondaryParticle = p;1038 }1039 1040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1041 1042 inline void G4VEnergyLossProcess::SetLinearLossLimit(G4double val)1043 {1044 linLossLimit = val;1045 }1046 1047 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1048 1049 inline void G4VEnergyLossProcess::SetLossFluctuations(G4bool val)1050 {1051 lossFluctuationFlag = val;1052 }1053 1054 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1055 1056 inline void G4VEnergyLossProcess::SetRandomStep(G4bool val)1057 {1058 rndmStepFlag = val;1059 }1060 1061 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1062 1063 inline void G4VEnergyLossProcess::SetMinSubRange(G4double val)1064 {1065 minSubRange = val;1066 }1067 1068 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1069 1070 inline G4bool G4VEnergyLossProcess::TablesAreBuilt() const1071 {1072 return tablesAreBuilt;1073 }1074 1075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1076 1077 inline G4int G4VEnergyLossProcess::NumberOfSubCutoffRegions() const1078 {1079 return nSCoffRegions;1080 }1081 1082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1083 1084 inline void G4VEnergyLossProcess::SetDEDXBinning(G4int nbins)1085 {1086 nBins = nbins;1087 }1088 1089 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1090 1091 inline void G4VEnergyLossProcess::SetLambdaBinning(G4int nbins)1092 {1093 nBins = nbins;1094 }1095 1096 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1097 1098 inline void G4VEnergyLossProcess::SetDEDXBinningForCSDARange(G4int nbins)1099 {1100 nBinsCSDA = nbins;1101 }1102 1103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1104 1105 inline G4double G4VEnergyLossProcess::MinKinEnergy() const1106 {1107 return minKinEnergy;1108 }1109 1110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1111 1112 inline void G4VEnergyLossProcess::SetMinKinEnergy(G4double e)1113 {1114 minKinEnergy = e;1115 }1116 1117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1118 1119 inline void G4VEnergyLossProcess::SetMaxKinEnergy(G4double e)1120 {1121 maxKinEnergy = e;1122 if(e < maxKinEnergyCSDA) maxKinEnergyCSDA = e;1123 }1124 1125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1126 1127 inline void G4VEnergyLossProcess::SetMaxKinEnergyForCSDARange(G4double e)1128 {1129 maxKinEnergyCSDA = e;1130 }1131 1132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1133 1134 inline G4double G4VEnergyLossProcess::MaxKinEnergy() const1135 {1136 return maxKinEnergy;1137 }1138 1139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1140 1141 inline void G4VEnergyLossProcess::SetLambdaFactor(G4double val)1142 {1143 if(val > 0.0 && val <= 1.0) lambdaFactor = val;1144 }1145 1146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1147 1148 inline void G4VEnergyLossProcess::SetIonisation(G4bool val)1149 {1150 isIonisation = val;1151 if(val) aGPILSelection = CandidateForSelection;1152 else aGPILSelection = NotCandidateForSelection;1153 }1154 1155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1156 1157 inline G4bool G4VEnergyLossProcess::IsIonisationProcess() const1158 {1159 return isIonisation;1160 }1161 1162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1163 1164 void G4VEnergyLossProcess::SetStepFunction(G4double v1, G4double v2)1165 {1166 dRoverRange = v1;1167 finalRange = v2;1168 if (dRoverRange > 0.999) dRoverRange = 1.0;1169 currentCouple = 0;1170 mfpKinEnergy = DBL_MAX;1171 }1172 1173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1174 1175 1120 #endif -
trunk/source/processes/electromagnetic/utils/include/G4VMscModel.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMscModel.hh,v 1. 4 2008/03/10 10:39:28vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VMscModel.hh,v 1.9 2009/04/07 18:39:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 39 39 // 40 40 // Modifications: 41 // 41 // 07.04.2009 V.Ivanchenko moved msc methods from G4VEmModel to G4VMscModel 42 42 // 43 43 // Class Description: … … 54 54 #include "G4MscStepLimitType.hh" 55 55 #include "globals.hh" 56 #include "G4ThreeVector.hh" 57 #include "G4Track.hh" 58 #include "G4SafetyHelper.hh" 59 60 class G4ParticleChangeForMSC; 56 61 57 62 class G4VMscModel : public G4VEmModel … … 64 69 virtual ~G4VMscModel(); 65 70 71 virtual G4double ComputeTruePathLengthLimit(const G4Track& track, 72 G4PhysicsTable* theLambdaTable, 73 G4double currentMinimalStep); 74 75 virtual G4double ComputeGeomPathLength(G4double truePathLength); 76 77 virtual G4double ComputeTrueStepLength(G4double geomPathLength); 78 79 virtual void SampleScattering(const G4DynamicParticle*, 80 G4double safety); 81 82 // empty 83 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 84 const G4MaterialCutsCouple*, 85 const G4DynamicParticle*, 86 G4double tmin, 87 G4double tmax); 88 89 //================================================================ 90 // Set parameters of multiple scattering models 91 //================================================================ 92 66 93 inline void SetStepLimitType(G4MscStepLimitType); 67 94 … … 73 100 74 101 inline void SetSkin(G4double); 102 103 inline void SetSampleZ(G4bool); 104 105 protected: 106 107 // initialisation of the ParticleChange for the model 108 G4ParticleChangeForMSC* GetParticleChangeForMSC(); 109 110 // initialisation of interface with geometry 111 void InitialiseSafetyHelper(); 112 113 // shift point of the track PostStep 114 void ComputeDisplacement(G4ParticleChangeForMSC*, 115 const G4ThreeVector& displDir, 116 G4double displacement, 117 G4double postsafety); 118 119 // compute safety 120 inline G4double ComputeSafety(const G4ThreeVector& position, G4double limit); 121 122 // compute linear distance to a geometry boundary 123 inline G4double ComputeGeomLimit(const G4Track& position, G4double& presafety, 124 G4double limit); 75 125 76 126 private: … … 79 129 G4VMscModel & operator=(const G4VMscModel &right); 80 130 G4VMscModel(const G4VMscModel&); 131 132 G4SafetyHelper* safetyHelper; 81 133 82 134 protected: … … 88 140 G4double dtrl; 89 141 G4double lambdalimit; 142 G4double geommax; 90 143 91 144 G4MscStepLimitType steppingAlgorithm; … … 134 187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 135 188 189 inline void G4VMscModel::SetSampleZ(G4bool val) 190 { 191 samplez = val; 192 } 193 194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 195 196 inline G4double G4VMscModel::ComputeSafety(const G4ThreeVector& position, 197 G4double) 198 { 199 return safetyHelper->ComputeSafety(position); 200 } 201 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 203 204 inline G4double G4VMscModel::ComputeGeomLimit(const G4Track& track, 205 G4double& presafety, 206 G4double limit) 207 { 208 G4double res = geommax; 209 if(track.GetVolume() != safetyHelper->GetWorldVolume()) { 210 res = safetyHelper->CheckNextStep( 211 track.GetStep()->GetPreStepPoint()->GetPosition(), 212 track.GetMomentumDirection(), 213 limit, presafety); 214 } 215 return res; 216 } 217 218 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 219 136 220 #endif 137 221 -
trunk/source/processes/electromagnetic/utils/include/G4VMultipleScattering.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMultipleScattering.hh,v 1.5 4 2008/07/31 13:01:26vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VMultipleScattering.hh,v 1.56 2009/04/07 18:39:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 64 64 // 27-10-07 Virtual functions moved to source (V.Ivanchenko) 65 65 // 15-07-08 Reorder class members for further multi-thread development (VI) 66 // 07-04-09 Moved msc methods from G4VEmModel to G4VMscModel (VI) 66 67 // 67 68 … … 80 81 #include "G4Step.hh" 81 82 #include "G4EmModelManager.hh" 82 #include "G4V EmModel.hh"83 #include "G4VMscModel.hh" 83 84 #include "G4MscStepLimitType.hh" 84 85 … … 145 146 G4bool ascii); 146 147 147 //------------------------------------------------------------------------148 // Specific methods for msc processes149 //------------------------------------------------------------------------150 151 148 // The function overloads the corresponding function of the base 152 149 // class.It limits the step near to boundaries only 153 150 // and invokes the method GetMscContinuousStepLimit at every step. 154 virtualG4double AlongStepGetPhysicalInteractionLength(151 G4double AlongStepGetPhysicalInteractionLength( 155 152 const G4Track&, 156 153 G4double previousStepSize, … … 192 189 inline G4PhysicsTable* LambdaTable() const; 193 190 194 //------------------------------------------------------------------------ 195 // Define and access particle type 196 //------------------------------------------------------------------------ 197 191 // access particle type 198 192 inline const G4ParticleDefinition* Particle() const; 199 inline void SetParticle(const G4ParticleDefinition*);200 193 201 194 //------------------------------------------------------------------------ … … 203 196 //------------------------------------------------------------------------ 204 197 205 inline void AddEmModel(G4int, G4VEmModel*, const G4Region* region = 0); 206 198 protected: 199 // Select model in run time 200 inline G4VEmModel* SelectModel(G4double kinEnergy); 201 202 public: 203 // Select model in run time 207 204 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 208 205 size_t& idxRegion) const; 209 206 210 // Access to models 211 inline G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false); 212 213 //------------------------------------------------------------------------ 214 // Set parameters for simulation of multiple scattering 215 //------------------------------------------------------------------------ 216 207 // Add model for region, smaller value of order defines which 208 // model will be selected for a given energy interval 209 void AddEmModel(G4int order, G4VEmModel*, const G4Region* region = 0); 210 211 // Access to models by index 212 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false); 213 214 //------------------------------------------------------------------------ 215 // Get/Set parameters for simulation of multiple scattering 216 //------------------------------------------------------------------------ 217 218 inline G4bool LateralDisplasmentFlag() const; 217 219 inline void SetLateralDisplasmentFlag(G4bool val); 218 220 221 inline G4double Skin() const; 219 222 inline void SetSkin(G4double val); 220 223 224 inline G4double RangeFactor() const; 221 225 inline void SetRangeFactor(G4double val); 222 226 227 inline G4double GeomFactor() const; 223 228 inline void SetGeomFactor(G4double val); 224 229 230 inline G4double PolarAngleLimit() const; 225 231 inline void SetPolarAngleLimit(G4double val); 226 232 233 inline G4MscStepLimitType StepLimitType() const; 227 234 inline void SetStepLimitType(G4MscStepLimitType val); 228 235 236 //------------------------------------------------------------------------ 237 // Run time methods 238 //------------------------------------------------------------------------ 239 229 240 protected: 230 241 231 // This method is used for tracking, it returns mean free path value242 // This method is not used for tracking, it returns mean free path value 232 243 G4double GetMeanFreePath(const G4Track& track, 233 244 G4double, 234 245 G4ForceCondition* condition); 235 236 //------------------------------------------------------------------------237 // Run time methods238 //------------------------------------------------------------------------239 246 240 247 // This method is not used for tracking, it returns step limit … … 244 251 G4double& currentSafety); 245 252 253 // This method returns inversed transport cross section 246 254 inline G4double GetLambda(const G4ParticleDefinition* p, 247 255 G4double& kineticEnergy); … … 253 261 G4double& currentSafety); 254 262 255 inline G4VEmModel* SelectModel(G4double kinEnergy);256 // Select concrete model263 // defines current material in run time 264 inline void DefineMaterial(const G4MaterialCutsCouple* couple); 257 265 258 266 inline const G4MaterialCutsCouple* CurrentMaterialCutsCouple() const; 259 267 260 // define current material261 inline void DefineMaterial(const G4MaterialCutsCouple* couple);262 263 //------------------------------------------------------------------------264 // Access parameters of multiple scattering265 //------------------------------------------------------------------------266 267 inline G4ParticleChangeForMSC* GetParticleChange();268 269 inline G4double Skin() const;270 271 inline G4double RangeFactor() const;272 273 inline G4double GeomFactor() const;274 275 inline G4double PolarAngleLimit() const;276 277 inline G4MscStepLimitType StepLimitType() const;278 279 inline G4bool LateralDisplasmentFlag() const;280 281 268 private: 282 269 283 270 // hide assignment operator 284 285 271 G4VMultipleScattering(G4VMultipleScattering &); 286 272 G4VMultipleScattering & operator=(const G4VMultipleScattering &right); … … 318 304 private: 319 305 320 G4V EmModel*currentModel;306 G4VMscModel* currentModel; 321 307 322 308 // cache … … 330 316 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 331 317 318 inline G4double G4VMultipleScattering::ContinuousStepLimit( 319 const G4Track& track, 320 G4double previousStepSize, 321 G4double currentMinimalStep, 322 G4double& currentSafety) 323 { 324 return GetMscContinuousStepLimit(track,previousStepSize,currentMinimalStep, 325 currentSafety); 326 } 327 328 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 329 330 inline void G4VMultipleScattering::SetBinning(G4int nbins) 331 { 332 nBins = nbins; 333 } 334 335 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 336 337 inline G4int G4VMultipleScattering::Binning() const 338 { 339 return nBins; 340 } 341 342 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 343 344 inline void G4VMultipleScattering::SetMinKinEnergy(G4double e) 345 { 346 minKinEnergy = e; 347 } 348 349 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 350 351 inline G4double G4VMultipleScattering::MinKinEnergy() const 352 { 353 return minKinEnergy; 354 } 355 356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 357 358 inline void G4VMultipleScattering::SetMaxKinEnergy(G4double e) 359 { 360 maxKinEnergy = e; 361 } 362 363 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 364 365 inline G4double G4VMultipleScattering::MaxKinEnergy() const 366 { 367 return maxKinEnergy; 368 } 369 370 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 371 372 inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val) 373 { 374 buildLambdaTable = val; 375 } 376 377 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 378 379 inline G4PhysicsTable* G4VMultipleScattering::LambdaTable() const 380 { 381 return theLambdaTable; 382 } 383 384 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 385 386 inline const G4ParticleDefinition* G4VMultipleScattering::Particle() const 387 { 388 return currentParticle; 389 } 390 391 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 392 393 inline G4VEmModel* G4VMultipleScattering::SelectModel(G4double kinEnergy) 394 { 395 return modelManager->SelectModel(kinEnergy, currentMaterialIndex); 396 } 397 398 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 399 400 inline G4VEmModel* G4VMultipleScattering::SelectModelForMaterial( 401 G4double kinEnergy, size_t& idxRegion) const 402 { 403 return modelManager->SelectModel(kinEnergy, idxRegion); 404 } 405 406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 407 408 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 409 { 410 return latDisplasment; 411 } 412 413 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 414 415 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) 416 { 417 latDisplasment = val; 418 } 419 420 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 421 422 inline G4double G4VMultipleScattering::Skin() const 423 { 424 return skin; 425 } 426 427 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 428 429 inline void G4VMultipleScattering::SetSkin(G4double val) 430 { 431 if(val < 1.0) skin = 0.0; 432 else skin = val; 433 } 434 435 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 436 437 inline G4double G4VMultipleScattering::RangeFactor() const 438 { 439 return facrange; 440 } 441 442 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 443 444 inline void G4VMultipleScattering::SetRangeFactor(G4double val) 445 { 446 if(val > 0.0) facrange = val; 447 } 448 449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 450 451 inline G4double G4VMultipleScattering::GeomFactor() const 452 { 453 return facgeom; 454 } 455 456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 457 458 inline void G4VMultipleScattering::SetGeomFactor(G4double val) 459 { 460 if(val > 0.0) facgeom = val; 461 } 462 463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 464 465 inline G4double G4VMultipleScattering::PolarAngleLimit() const 466 { 467 return polarAngleLimit; 468 } 469 470 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 471 472 inline void G4VMultipleScattering::SetPolarAngleLimit(G4double val) 473 { 474 if(val < 0.0) polarAngleLimit = 0.0; 475 else if(val > pi) polarAngleLimit = pi; 476 else polarAngleLimit = val; 477 } 478 479 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 480 481 inline G4MscStepLimitType G4VMultipleScattering::StepLimitType() const 482 { 483 return stepLimit; 484 } 485 486 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 487 488 inline void G4VMultipleScattering::SetStepLimitType(G4MscStepLimitType val) 489 { 490 stepLimit = val; 491 if(val == fMinimal) facrange = 0.2; 492 } 493 494 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 495 332 496 inline 333 void G4VMultipleScattering::DefineMaterial(const G4MaterialCutsCouple* couple) 334 { 335 if(couple != currentCouple) { 336 currentCouple = couple; 337 currentMaterialIndex = couple->GetIndex(); 497 G4double G4VMultipleScattering::GetLambda(const G4ParticleDefinition* p, 498 G4double& e) 499 { 500 G4double x; 501 if(theLambdaTable) { 502 G4bool b; 503 x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b); 504 } else { 505 x = currentModel->CrossSection(currentCouple,p,e); 338 506 } 507 if(x > DBL_MIN) x = 1./x; 508 else x = DBL_MAX; 509 return x; 339 510 } 340 511 … … 349 520 G4double x = currentMinimalStep; 350 521 DefineMaterial(track.GetMaterialCutsCouple()); 351 currentModel = SelectModel(scaledKinEnergy);522 currentModel = static_cast<G4VMscModel*>(SelectModel(scaledKinEnergy)); 352 523 if(x > 0.0 && scaledKinEnergy > 0.0) { 353 524 G4double tPathLength = … … 364 535 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 365 536 366 inline G4double G4VMultipleScattering::ContinuousStepLimit(367 const G4Track& track,368 G4double previousStepSize,369 G4double currentMinimalStep,370 G4double& currentSafety)371 {372 return GetMscContinuousStepLimit(track,previousStepSize,currentMinimalStep,373 currentSafety);374 }375 376 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....377 378 537 inline 379 G4double G4VMultipleScattering::GetLambda(const G4ParticleDefinition* p, 380 G4double& e) 381 { 382 G4double x; 383 if(theLambdaTable) { 384 G4bool b; 385 x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b); 386 } else { 387 x = currentModel->CrossSection(currentCouple,p,e); 538 void G4VMultipleScattering::DefineMaterial(const G4MaterialCutsCouple* couple) 539 { 540 if(couple != currentCouple) { 541 currentCouple = couple; 542 currentMaterialIndex = couple->GetIndex(); 388 543 } 389 if(x > DBL_MIN) x = 1./x; 390 else x = DBL_MAX; 391 return x; 392 } 393 394 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 395 396 inline G4VEmModel* G4VMultipleScattering::SelectModel(G4double kinEnergy) 397 { 398 return modelManager->SelectModel(kinEnergy, currentMaterialIndex); 399 } 400 401 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 402 403 inline G4VEmModel* G4VMultipleScattering::SelectModelForMaterial( 404 G4double kinEnergy, size_t& idxRegion) const 405 { 406 return modelManager->SelectModel(kinEnergy, idxRegion); 407 } 408 409 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 410 411 inline void G4VMultipleScattering::SetBinning(G4int nbins) 412 { 413 nBins = nbins; 414 } 415 416 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 417 418 inline G4int G4VMultipleScattering::Binning() const 419 { 420 return nBins; 421 } 422 423 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 424 425 inline void G4VMultipleScattering::SetMinKinEnergy(G4double e) 426 { 427 minKinEnergy = e; 428 } 429 430 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 431 432 inline G4double G4VMultipleScattering::MinKinEnergy() const 433 { 434 return minKinEnergy; 435 } 436 437 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 438 439 inline void G4VMultipleScattering::SetMaxKinEnergy(G4double e) 440 { 441 maxKinEnergy = e; 442 } 443 444 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 445 446 inline G4double G4VMultipleScattering::MaxKinEnergy() const 447 { 448 return maxKinEnergy; 449 } 450 451 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 452 453 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 454 { 455 return latDisplasment; 456 } 457 458 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 459 460 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) 461 { 462 latDisplasment = val; 463 } 464 465 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 466 467 inline G4ParticleChangeForMSC* G4VMultipleScattering::GetParticleChange() 468 { 469 return &fParticleChange; 470 } 471 472 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 473 474 inline G4double G4VMultipleScattering::Skin() const 475 { 476 return skin; 477 } 478 479 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 480 481 inline void G4VMultipleScattering::SetSkin(G4double val) 482 { 483 if(val < 1.0) skin = 0.0; 484 else skin = val; 485 } 486 487 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 488 489 inline G4double G4VMultipleScattering::RangeFactor() const 490 { 491 return facrange; 492 } 493 494 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 495 496 inline void G4VMultipleScattering::SetRangeFactor(G4double val) 497 { 498 if(val > 0.0) facrange = val; 499 } 500 501 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 502 503 inline G4double G4VMultipleScattering::GeomFactor() const 504 { 505 return facgeom; 506 } 507 508 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 509 510 inline void G4VMultipleScattering::SetGeomFactor(G4double val) 511 { 512 if(val > 0.0) facgeom = val; 513 } 514 515 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 516 517 inline G4double G4VMultipleScattering::PolarAngleLimit() const 518 { 519 return polarAngleLimit; 520 } 521 522 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 523 524 inline void G4VMultipleScattering::SetPolarAngleLimit(G4double val) 525 { 526 if(val < 0.0) polarAngleLimit = 0.0; 527 else if(val > pi) polarAngleLimit = pi; 528 else polarAngleLimit = val; 529 } 530 531 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 532 533 inline G4MscStepLimitType G4VMultipleScattering::StepLimitType() const 534 { 535 return stepLimit; 536 } 537 538 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 539 540 inline void G4VMultipleScattering::SetStepLimitType(G4MscStepLimitType val) 541 { 542 stepLimit = val; 543 if(val == fMinimal) facrange = 0.2; 544 } 545 546 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 547 548 inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val) 549 { 550 buildLambdaTable = val; 551 } 552 553 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 554 555 inline const G4ParticleDefinition* G4VMultipleScattering::Particle() const 556 { 557 return currentParticle; 558 } 559 560 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 561 562 inline G4PhysicsTable* G4VMultipleScattering::LambdaTable() const 563 { 564 return theLambdaTable; 565 } 566 567 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 568 569 inline 570 const G4MaterialCutsCouple* G4VMultipleScattering::CurrentMaterialCutsCouple() const 544 } 545 546 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 547 548 inline const G4MaterialCutsCouple* 549 G4VMultipleScattering::CurrentMaterialCutsCouple() const 571 550 { 572 551 return currentCouple; … … 575 554 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 576 555 577 inline void G4VMultipleScattering::AddEmModel(G4int order, G4VEmModel* p,578 const G4Region* region)579 {580 G4VEmFluctuationModel* fm = 0;581 modelManager->AddEmModel(order, p, fm, region);582 if(p) p->SetParticleChange(pParticleChange);583 }584 585 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....586 587 inline588 G4VEmModel* G4VMultipleScattering::GetModelByIndex(G4int idx, G4bool ver)589 {590 return modelManager->GetModel(idx, ver);591 }592 593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....594 595 556 #endif -
trunk/source/processes/electromagnetic/utils/src/G4DummyModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DummyModel.cc,v 1. 3 2007/05/22 17:31:58vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4DummyModel.cc,v 1.4 2009/04/07 18:39:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 52 52 53 53 G4DummyModel::G4DummyModel(const G4String& nam) 54 : G4V EmModel(nam)54 : G4VMscModel(nam) 55 55 {} 56 56 -
trunk/source/processes/electromagnetic/utils/src/G4EmCalculator.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmCalculator.cc,v 1.4 4 2008/08/03 18:47:15vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmCalculator.cc,v 1.46 2009/02/24 09:56:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 755 755 if(currentProcess) currentProcessName = currentProcess->GetProcessName(); 756 756 757 if(p->GetParticleType() == "nucleus" && 758 currentParticleName != "deuteron" && currentParticleName != "triton") { 757 if(p->GetParticleType() == "nucleus" 758 && currentParticleName != "deuteron" 759 && currentParticleName != "triton" 760 && currentParticleName != "alpha+" 761 && currentParticleName != "helium" 762 && currentParticleName != "hydrogen" 763 ) { 759 764 baseParticle = theGenericIon; 760 765 massRatio = baseParticle->GetPDGMass()/p->GetPDGMass(); -
trunk/source/processes/electromagnetic/utils/src/G4EmConfigurator.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmConfigurator.cc,v 1. 3 2008/11/21 12:30:29vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmConfigurator.cc,v 1.4 2009/02/26 11:33:33 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 117 117 G4String fname = ""; 118 118 if(fm) fname = fm->GetName(); 119 AddModelForRegion(particleName, processName, mod->GetName(), regionName, 119 G4String mname = ""; 120 if(mod) mname = mod->GetName(); 121 AddModelForRegion(particleName, processName, mname, regionName, 120 122 emin, emax, fname); 121 123 } … … 203 205 204 206 for(G4int i=0; i<nm; i++) { 205 if(modelName == modelList[i]->GetName() && 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 && 206 212 (particleList[i] == "" || particleList[i] == particleName) ) { 207 213 mod = modelList[i]; … … 214 220 215 221 if(!mod) { 216 G4cout << "### G4EmConfigurator WARNING: fails to find a model <" 217 << modelName << "> for process <" 218 << processName << "> and " << particleName 219 << G4endl; 220 if(flucModelName != "") 221 G4cout << " fluctuation model <" 222 << flucModelName << G4endl; 222 223 // set fluctuation model for ionisation processes 224 if(fluc && ptype == eloss) { 225 G4VEnergyLossProcess* p = reinterpret_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 } 223 238 } else { 224 239 -
trunk/source/processes/electromagnetic/utils/src/G4EmElementSelector.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmElementSelector.cc,v 1. 4 2008/08/21 18:53:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmElementSelector.cc,v 1.10 2009/05/26 16:59:35 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-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) … … 65 65 nElmMinusOne = n - 1; 66 66 theElementVector = material->GetElementVector(); 67 element = (*theElementVector)[0]; 67 68 if(nElmMinusOne > 0) { 68 for(G4int i=0; i<nElmMinusOne; i++) { 69 xSections.reserve(n); 70 for(G4int i=0; i<n; i++) { 69 71 G4PhysicsLogVector* v = new G4PhysicsLogVector(lowEnergy,highEnergy,nbins); 70 v->SetSpline(spline);72 //v->SetSpline(spline); 71 73 xSections.push_back(v); 72 74 } … … 80 82 { 81 83 if(nElmMinusOne > 0) { 82 for(G4int i=0; i< nElmMinusOne; i++) {84 for(G4int i=0; i<=nElmMinusOne; i++) { 83 85 delete xSections[i]; 84 86 } … … 101 103 102 104 G4int i; 103 G4int n = nElmMinusOne + 1;104 G4double* xsec = new G4double[n];105 105 106 106 // loop over bins … … 110 110 cross = 0.0; 111 111 //G4cout << "j= " << j << " e(MeV)= " << e/MeV << G4endl; 112 for (i=0; i< n; i++) {112 for (i=0; i<=nElmMinusOne; i++) { 113 113 cross += theAtomNumDensityVector[i]* 114 114 model->ComputeCrossSectionPerAtom(part, (*theElementVector)[i], e, 115 115 cutEnergy, e); 116 xsec[i] = cross; 117 } 118 if(DBL_MIN >= cross) cross = 1.0; 119 // normalise cross section sum 120 for (i=0; i<nElmMinusOne; i++) { 121 xSections[i]->PutValue(j, xsec[i]/cross); 122 //G4cout << "i= " << i << " xs= " << xsec[i]/cross << G4endl; 116 xSections[i]->PutValue(j, cross); 123 117 } 124 118 } 125 delete [] xsec; 119 120 // 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++) { 123 xSections[i]->PutValue(0, (*xSections[i])[1]); 124 } 125 } 126 // xSections ends with null, so use probabilities from the previous bin 127 if(DBL_MIN >= (*xSections[nElmMinusOne])[nbins-1]) { 128 for (i=0; i<=nElmMinusOne; i++) { 129 xSections[i]->PutValue(nbins-1, (*xSections[i])[nbins-2]); 130 } 131 } 132 // perform normalization 133 for(G4int j=0; j<nbins; j++) { 134 cross = (*xSections[nElmMinusOne])[j]; 135 // only for positive X-section 136 if(cross > DBL_MIN) { 137 for (i=0; i<nElmMinusOne; i++) { 138 xSections[i]->PutValue(j, (*xSections[i])[j]/cross); 139 } 140 } 141 } 126 142 } 127 143 … … 139 155 } 140 156 } 141 G4cout << "Last Element in element vector "157 G4cout << "Last Element in element vector " 142 158 << (*theElementVector)[nElmMinusOne]->GetName() 143 159 << G4endl; -
trunk/source/processes/electromagnetic/utils/src/G4EmModelManager.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmModelManager.cc,v 1.4 6 2008/10/13 14:56:56vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmModelManager.cc,v 1.49 2009/04/17 10:35:32 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 61 61 // 15-03-07 Add maxCutInRange (V.Ivanchenko) 62 62 // 12-04-07 Add verbosity at destruction (V.Ivanchenko) 63 // 08-04-08 Fixed and simplified initialisation of G4RegionModel (VI) 63 64 // 64 65 // Class Description: … … 134 135 theGamma = G4Gamma::Gamma(); 135 136 thePositron = G4Positron::Positron(); 137 models.reserve(4); 138 flucModels.reserve(4); 139 regions.reserve(4); 140 orderOfModels.reserve(4); 141 isUsed.reserve(4); 136 142 } 137 143 … … 178 184 regions.push_back(r); 179 185 orderOfModels.push_back(num); 186 isUsed.push_back(0); 180 187 p->DefineForRegion(r); 181 188 nEmModels++; … … 187 194 G4double emin, G4double emax) 188 195 { 189 if (nEmModels ) {196 if (nEmModels > 0) { 190 197 for(G4int i=0; i<nEmModels; i++) { 191 198 if(nam == models[i]->GetName()) { … … 225 232 { 226 233 verboseLevel = val; 234 G4String partname = p->GetParticleName(); 227 235 if(1 < verboseLevel) { 228 236 G4cout << "G4EmModelManager::Initialise() for " 229 << p->GetParticleName() 230 << G4endl; 237 << partname << G4endl; 231 238 } 232 239 // Are models defined? 233 240 if(!nEmModels) { 234 G4Exception("G4EmModelManager::Initialise without any model defined ");241 G4Exception("G4EmModelManager::Initialise without any model defined for "+partname); 235 242 } 236 243 particle = p; … … 271 278 G4ProductionCutsTable::GetProductionCutsTable(); 272 279 G4int numOfCouples = theCoupleTable->GetTableSize(); 273 idxOfRegionModels = new G4int[numOfCouples+1]; 274 idxOfRegionModels[numOfCouples] = 0; 280 if(nRegions > 1) idxOfRegionModels = new G4int[numOfCouples]; 275 281 setOfRegionModels = new G4RegionModels*[nRegions]; 276 282 277 283 std::vector<G4int> modelAtRegion(nEmModels); 278 284 std::vector<G4int> modelOrd(nEmModels); 279 G4DataVector eLow(nEmModels );285 G4DataVector eLow(nEmModels+1); 280 286 G4DataVector eHigh(nEmModels); 281 G4int nmax = nEmModels;282 287 283 288 // Order models for regions … … 305 310 if (region) G4cout << region->GetName(); 306 311 G4cout << "> " 307 << " tmin(MeV)= " << tmin/MeV308 << "; tmax(MeV)= " << tmax/MeV309 << "; order= " << ord310 << G4endl;312 << " tmin(MeV)= " << tmin/MeV 313 << "; tmax(MeV)= " << tmax/MeV 314 << "; order= " << ord 315 << G4endl; 311 316 } 312 317 313 if (n == 0) n++; 314 else { 318 if(n > 0) { 319 320 // extend energy range to previous models 315 321 tmin = std::min(tmin, eHigh[n-1]); 316 if(tmin >= tmax) push = false; 317 else { 318 319 // high energy model 320 if(tmin == eHigh[n-1] && tmax > eHigh[n-1]) n++; 321 else if (tmax > eHigh[n-1]) { 322 323 // compare order of models 324 for(G4int k = n-1; k>=0; k--) { 325 326 if (ord >= modelOrd[k]) { 327 tmin = std::max(tmin, eHigh[k]); 328 if(k < n-1) n = k + 2; 329 break; 330 } else if (tmin > eLow[k]) { 331 eHigh[k] = tmin; 332 n = k + 2; 333 break; 334 } else if (tmin == eLow[k]) { 335 n = k + 1; 336 break; 322 tmax = std::max(tmax, eLow[0]); 323 //G4cout << "tmin= " << tmin << " tmax= " 324 // << tmax << " ord= " << ord <<G4endl; 325 // empty energy range 326 if( tmax - tmin <= eV) push = false; 327 // low-energy model 328 else if (tmax == eLow[0]) { 329 push = false; 330 insert = true; 331 idx = 0; 332 // resolve intersections 333 } else if(tmin < eHigh[n-1]) { 334 // compare order 335 for(G4int k=0; k<n; k++) { 336 // new model has lower application 337 if(ord >= modelOrd[k]) { 338 if(tmin < eHigh[k] && tmin >= eLow[k]) tmin = eHigh[k]; 339 if(tmax <= eHigh[k] && tmax > eLow[k]) tmax = eLow[k]; 340 if(tmax > eHigh[k] && tmin < eLow[k]) { 341 if(tmax - eHigh[k] > eLow[k] - tmin) tmin = eHigh[k]; 342 else tmax = eLow[k]; 343 } 344 if( tmax - tmin <= eV) { 345 push = false; 346 break; 337 347 } 338 348 } 339 if(tmin < eLow[0]) n = 1; 340 idx = n - 1; 341 342 // low energy model 343 } else { 344 345 tmax = std::max(tmax, eLow[0]); 346 insert = true; 347 push = false; 348 idx = 0; 349 if(tmax <= eLow[0]) tmax = eLow[0]; 350 else { 351 352 for(G4int k=0; k<n; k++) { 353 354 if (ord >= modelOrd[k]) { 355 if(k == 0) { 356 if(tmin < eLow[0]) tmax = eLow[0]; 357 else insert = false; 358 break; 359 } else { 360 insert = false; 361 break; 362 } 363 } else if(tmax < eHigh[k]) { 364 idx = k; 365 if(k > 0) tmin = eLow[k]; 366 eLow[k] = tmax; 367 break; 368 } else if(tmax == eHigh[k]) { 369 insert = false; 370 push = true; 371 idx = k; 372 if(k > 0) tmin = eLow[k]; 373 else tmin = std::min(tmin,eLow[0]); 374 break; 375 } else { 376 modelAtRegion[k] = ii; 377 modelOrd[k] = ord; 378 if(k == 0) eLow[idx] = std::min(tmin,eLow[0]); 349 } 350 //G4cout << "tmin= " << tmin << " tmax= " 351 // << tmax << " push= " << push << " idx= " << idx <<G4endl; 352 if(push) { 353 if (tmax == eLow[0]) { 354 push = false; 355 insert = true; 356 idx = 0; 357 // continue resolve intersections 358 } else if(tmin < eHigh[n-1]) { 359 // last energy interval 360 if(tmin > eLow[n-1] && tmax >= eHigh[n-1]) { 361 eHigh[n-1] = tmin; 362 // first energy interval 363 } else if(tmin <= eLow[0] && tmax < eHigh[0]) { 364 eLow[0] = tmax; 365 push = false; 366 insert = true; 367 idx = 0; 368 } else { 369 // find energy interval to replace 370 for(G4int k=0; k<n; k++) { 371 if(tmin <= eLow[k] && tmax >= eHigh[k]) { 372 push = false; 373 modelAtRegion[k] = ii; 374 modelOrd[k] = ord; 375 isUsed[ii] = 1; 376 } 379 377 } 380 378 } 381 379 } 382 if(insert && idx < n) n++;383 else insert = false;384 380 } 385 381 } 386 382 } 387 if(n > nmax) {388 nmax = n;389 modelAtRegion.resize(nmax);390 modelOrd.resize(nmax);391 eLow.resize(nmax);392 eHigh.resize(nmax);393 }394 383 if(insert) { 395 for(G4int k=n- 2; k>=idx; k--) {384 for(G4int k=n-1; k>=idx; k--) { 396 385 modelAtRegion[k+1] = modelAtRegion[k]; 397 386 modelOrd[k+1] = modelOrd[k]; … … 400 389 } 401 390 } 391 //G4cout << "push= " << push << " insert= " << insert 392 //<< " idx= " << idx <<G4endl; 402 393 if (push || insert) { 394 n++; 403 395 modelAtRegion[idx] = ii; 404 396 modelOrd[idx] = ord; 405 397 eLow[idx] = tmin; 406 398 eHigh[idx] = tmax; 399 isUsed[ii] = 1; 407 400 } 408 401 } … … 416 409 } 417 410 eLow[0] = 0.0; 418 if(n >= nmax) eLow.resize(nmax+1);419 411 eLow[n] = eHigh[n-1]; 420 412 … … 430 422 } 431 423 424 currRegionModel = setOfRegionModels[0]; 425 432 426 // Access to materials and build cuts 433 434 427 for(G4int i=0; i<numOfCouples; i++) { 435 428 … … 439 432 const G4ProductionCuts* pcuts = couple->GetProductionCuts(); 440 433 441 G4int reg = nRegions; 442 do {reg--;} while (reg>0 && pcuts != (setr[reg]->GetProductionCuts())); 443 idxOfRegionModels[i] = reg; 444 434 G4int reg = 0; 435 if(nRegions > 1) { 436 reg = nRegions; 437 do {reg--;} while (reg>0 && pcuts != (setr[reg]->GetProductionCuts())); 438 idxOfRegionModels[i] = reg; 439 } 445 440 if(1 < verboseLevel) { 446 441 G4cout << "G4EmModelManager::Initialise() for " 447 << material->GetName()448 << " indexOfCouple= " << i449 << " indexOfRegion= " << reg450 << G4endl;442 << material->GetName() 443 << " indexOfCouple= " << i 444 << " indexOfRegion= " << reg 445 << G4endl; 451 446 } 452 447 … … 494 489 495 490 for(G4int jj=0; jj<nEmModels; jj++) { 496 models[jj]->Initialise(particle, theCuts); 497 if(flucModels[jj]) flucModels[jj]->InitialiseMe(particle); 498 } 499 491 if(1 == isUsed[jj]) { 492 models[jj]->Initialise(particle, theCuts); 493 if(flucModels[jj]) flucModels[jj]->InitialiseMe(particle); 494 } 495 } 500 496 501 497 if(1 < verboseLevel) { … … 534 530 } 535 531 536 G4int reg = idxOfRegionModels[i]; 532 G4int reg = 0; 533 if(nRegions > 1) reg = idxOfRegionModels[i]; 537 534 const G4RegionModels* regModels = setOfRegionModels[reg]; 538 535 G4int nmod = regModels->NumberOfModels(); … … 683 680 } 684 681 685 G4int reg = idxOfRegionModels[i]; 682 G4int reg = 0; 683 if(nRegions > 1) reg = idxOfRegionModels[i]; 686 684 const G4RegionModels* regModels = setOfRegionModels[reg]; 687 685 G4int nmod = regModels->NumberOfModels(); … … 799 797 G4RegionModels* r = setOfRegionModels[i]; 800 798 const G4Region* reg = r->Region(); 801 if(verb >1 || nRegions > 1) {802 }799 // if(verb > -1 || nRegions > 1) { 800 // } 803 801 G4int n = r->NumberOfModels(); 804 if(verb > 1 || n > 0) {802 if(verb > -1 || n > 0) { 805 803 G4cout << " ===== EM models for the G4Region " << reg->GetName() 806 804 << " ======" << G4endl;; -
trunk/source/processes/electromagnetic/utils/src/G4EmProcessOptions.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmProcessOptions.cc,v 1.2 4 2008/04/17 10:33:27 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4EmProcessOptions.cc,v 1.26 2009/02/18 14:43:27 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 59 59 #include "G4VMultipleScattering.hh" 60 60 #include "G4Region.hh" 61 #include "G4RegionStore.hh" 61 62 62 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 392 393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 393 394 394 void G4EmProcessOptions::ActivateDeexcitation(G4bool val, const G4Region* r) 395 { 396 const std::vector<G4VEnergyLossProcess*>& v = 397 theManager->GetEnergyLossProcessVector(); 398 std::vector<G4VEnergyLossProcess*>::const_iterator itr; 399 for(itr = v.begin(); itr != v.end(); itr++) { 400 G4VEnergyLossProcess* p = *itr; 401 if(p) p->ActivateDeexcitation(val,r); 402 } 403 const std::vector<G4VEmProcess*>& w = 404 theManager->GetEmProcessVector(); 405 std::vector<G4VEmProcess*>::const_iterator itp; 406 for(itp = w.begin(); itp != w.end(); itp++) { 407 G4VEmProcess* q = *itp; 408 if(q) q->ActivateDeexcitation(val,r); 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 } 409 429 } 410 430 } -
trunk/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4EnergyLossMessenger.cc,v 1.3 5 2008/10/20 13:27:45vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4EnergyLossMessenger.cc,v 1.37 2009/02/18 14:43:27 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- … … 178 178 aplCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 179 179 180 deexCmd = new G4UIcommand("/process/em/deexcitation",this); 181 deexCmd->SetGuidance("Set deexcitation flag per process and G4Region."); 182 deexCmd->SetGuidance(" procName : process name"); 183 deexCmd->SetGuidance(" flag : flag"); 184 deexCmd->SetGuidance(" regName : G4Region name"); 185 186 G4UIparameter* pName = new G4UIparameter("pName",'s',false); 187 deexCmd->SetParameter(pName); 188 189 G4UIparameter* flag = new G4UIparameter("flag",'s',false); 190 deexCmd->SetParameter(flag); 191 192 G4UIparameter* regName = new G4UIparameter("regName",'s',false); 193 deexCmd->SetParameter(regName); 194 180 195 dedxCmd = new G4UIcmdWithAnInteger("/process/eLoss/binsDEDX",this); 181 196 dedxCmd->SetGuidance("Set number of bins for DEDX tables"); … … 259 274 delete MinSubSecCmd; 260 275 delete StepFuncCmd; 276 delete deexCmd; 261 277 delete eLossDirectory; 262 278 delete mscDirectory; … … 320 336 } 321 337 338 if (command == deexCmd) { 339 G4String s1 (""), s2(""), s3(""); 340 G4bool b = false; 341 std::istringstream is(newValue); 342 is >> s1 >> s2 >> s3; 343 if(s2 == "true") b = true; 344 opt->ActivateDeexcitation(s1,b,s3); 345 } 346 322 347 if (command == mscCmd) { 323 348 if(newValue == "Minimal") -
trunk/source/processes/electromagnetic/utils/src/G4LossTableBuilder.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LossTableBuilder.cc,v 1.2 7 2008/07/22 15:55:15vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LossTableBuilder.cc,v 1.28 2009/02/18 16:24:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 132 132 G4double dedx1 = pv->GetValue(elow, b); 133 133 134 //G4cout << "nbins= " << nbins << " dedx1= " << dedx1 << G4endl; 135 134 136 // protection for specific cases dedx=0 135 137 if(dedx1 == 0.0) { 136 for (size_t k=1; k<nbins ; k++) {138 for (size_t k=1; k<nbins-1; k++) { 137 139 bin0++; 138 140 elow = pv->GetLowEdgeEnergy(k); … … 143 145 } 144 146 147 //G4cout << "nbins= " << nbins << " elow= " << elow << " ehigh= " << ehigh << G4endl; 145 148 // initialisation of a new vector 146 149 G4PhysicsLogVector* v = new G4PhysicsLogVector(elow, ehigh, nbins); 150 // dedx is exect zero 151 if(nbins <= 2) { 152 v->PutValue(0,1000.); 153 v->PutValue(1,2000.); 154 G4PhysicsTableHelper::SetPhysicsVector(rangeTable, i, v); 155 return; 156 } 147 157 v->SetSpline(splineFlag); 148 158 -
trunk/source/processes/electromagnetic/utils/src/G4LossTableManager.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LossTableManager.cc,v 1.9 5 2008/11/13 18:23:39 schaelicExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4LossTableManager.cc,v 1.96 2009/04/09 16:10:57 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 #include "G4EmCorrections.hh" 94 94 #include "G4EmSaturation.hh" 95 #include "G4EmConfigurator.hh" 95 96 #include "G4EmTableType.hh" 96 97 #include "G4LossTableBuilder.hh" … … 164 165 emCorrections= new G4EmCorrections(); 165 166 emSaturation = new G4EmSaturation(); 167 emConfigurator = new G4EmConfigurator(); 166 168 integral = true; 167 169 integralActive = false; … … 932 934 } 933 935 936 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 937 938 G4EmConfigurator* G4LossTableManager::EmConfigurator() 939 { 940 return emConfigurator; 941 } 942 934 943 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/utils/src/G4VEmFluctuationModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmFluctuationModel.cc,v 1. 3 2008/07/15 16:56:39vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEmFluctuationModel.cc,v 1.4 2009/02/19 11:25:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 65 65 } 66 66 67 void G4VEmFluctuationModel::InitialiseMe(const G4ParticleDefinition*) 68 {} 67 69 70 void G4VEmFluctuationModel::SetParticleAndCharge(const G4ParticleDefinition*, 71 G4double) 72 {} 73 74 -
trunk/source/processes/electromagnetic/utils/src/G4VEmModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmModel.cc,v 1.2 0 2008/11/13 23:13:18 schaelicExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEmModel.cc,v 1.27 2009/05/26 15:00:49 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 25.10.2005 Set default highLimit=100.TeV (V.Ivanchenko) 42 42 // 06.02.2006 add method ComputeMeanFreePath() (mma) 43 // 16.02.2009 Move implementations of virtual methods to source (VI) 43 44 // 44 45 // … … 53 54 #include "G4LossTableManager.hh" 54 55 #include "G4ProductionCutsTable.hh" 56 #include "G4ParticleChangeForLoss.hh" 57 #include "G4ParticleChangeForGamma.hh" 55 58 56 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 60 63 fluc(0), name(nam), lowLimit(0.1*keV), highLimit(100.0*TeV), 61 64 polarAngleLimit(0.0),secondaryThreshold(DBL_MAX),theLPMflag(false), 62 pParticleChange(0),nuclearStopping(false),nsec(5) 65 pParticleChange(0),nuclearStopping(false), 66 currentCouple(0),currentElement(0), 67 nsec(5),flagDeexcitation(false) 63 68 { 64 69 xsec.resize(nsec); … … 78 83 } 79 84 } 85 } 86 87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 88 89 G4ParticleChangeForLoss* G4VEmModel::GetParticleChangeForLoss() 90 { 91 G4ParticleChangeForLoss* p = 0; 92 if (pParticleChange) { 93 p = static_cast<G4ParticleChangeForLoss*>(pParticleChange); 94 } else { 95 p = new G4ParticleChangeForLoss(); 96 } 97 return p; 98 } 99 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 101 102 G4ParticleChangeForGamma* G4VEmModel::GetParticleChangeForGamma() 103 { 104 G4ParticleChangeForGamma* p = 0; 105 if (pParticleChange) { 106 p = static_cast<G4ParticleChangeForGamma*>(pParticleChange); 107 } else { 108 p = new G4ParticleChangeForGamma(); 109 } 110 return p; 111 } 112 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 114 115 void G4VEmModel::InitialiseElementSelectors(const G4ParticleDefinition* p, 116 const G4DataVector& cuts) 117 { 118 // initialise before run 119 flagDeexcitation = false; 120 121 G4int nbins = G4int(std::log10(highLimit/lowLimit) + 0.5); 122 if(nbins < 3) nbins = 3; 123 G4bool spline = G4LossTableManager::Instance()->SplineFlag(); 124 125 G4ProductionCutsTable* theCoupleTable= 126 G4ProductionCutsTable::GetProductionCutsTable(); 127 G4int numOfCouples = theCoupleTable->GetTableSize(); 128 129 // prepare vector 130 if(numOfCouples > nSelectors) elmSelectors.reserve(numOfCouples); 131 132 // initialise vector 133 for(G4int i=0; i<numOfCouples; i++) { 134 const G4MaterialCutsCouple* couple = 135 theCoupleTable->GetMaterialCutsCouple(i); 136 const G4Material* material = couple->GetMaterial(); 137 G4int idx = couple->GetIndex(); 138 139 // selector already exist check if should be deleted 140 G4bool create = true; 141 if(i < nSelectors) { 142 if(elmSelectors[i]) { 143 if(material == elmSelectors[i]->GetMaterial()) create = false; 144 else delete elmSelectors[i]; 145 } 146 } else { 147 nSelectors++; 148 elmSelectors.push_back(0); 149 } 150 if(create) { 151 elmSelectors[i] = new G4EmElementSelector(this,material,nbins, 152 lowLimit,highLimit,spline); 153 } 154 elmSelectors[i]->Initialise(p, cuts[idx]); 155 //elmSelectors[i]->Dump(p); 156 } 157 } 158 159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 160 161 G4double G4VEmModel::ComputeDEDXPerVolume(const G4Material*, 162 const G4ParticleDefinition*, 163 G4double,G4double) 164 { 165 return 0.0; 80 166 } 81 167 … … 107 193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 108 194 109 G4double G4VEmModel::ComputeMeanFreePath(const G4ParticleDefinition* p, 110 G4double ekin, 111 const G4Material* material, 112 G4double emin, 113 G4double emax) 114 { 115 G4double mfp = DBL_MAX; 116 G4double cross = CrossSectionPerVolume(material,p,ekin,emin,emax); 117 if (cross > DBL_MIN) mfp = 1./cross; 118 return mfp; 119 } 120 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 122 123 void G4VEmModel::InitialiseElementSelectors(const G4ParticleDefinition* p, 124 const G4DataVector& cuts) 125 { 126 G4int nbins = G4int(std::log10(highLimit/lowLimit) + 0.5); 127 if(nbins < 3) nbins = 3; 128 G4bool spline = G4LossTableManager::Instance()->SplineFlag(); 129 130 G4ProductionCutsTable* theCoupleTable= 131 G4ProductionCutsTable::GetProductionCutsTable(); 132 G4int numOfCouples = theCoupleTable->GetTableSize(); 133 134 // prepare vector 135 if(numOfCouples > nSelectors) { 136 elmSelectors.resize(numOfCouples); 137 nSelectors = numOfCouples; 138 } 139 140 // initialise vector 141 for(G4int i=0; i<numOfCouples; i++) { 142 const G4MaterialCutsCouple* couple = 143 theCoupleTable->GetMaterialCutsCouple(i); 144 const G4Material* material = couple->GetMaterial(); 145 G4int idx = couple->GetIndex(); 146 147 // selector already exist check if should be deleted 148 G4bool create = true; 149 if(elmSelectors[i]) { 150 if(material == elmSelectors[i]->GetMaterial()) create = false; 151 else delete elmSelectors[i]; 152 } 153 if(create) { 154 elmSelectors[i] = new G4EmElementSelector(this,material,nbins, 155 lowLimit,highLimit,spline); 156 } 157 elmSelectors[i]->Initialise(p, cuts[idx]); 158 //elmSelectors[i]->Dump(p); 159 } 160 } 161 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 163 164 195 G4double G4VEmModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 196 G4double, G4double, G4double, 197 G4double, G4double) 198 { 199 return 0.0; 200 } 201 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 203 204 G4double G4VEmModel::MinEnergyCut(const G4ParticleDefinition*, 205 const G4MaterialCutsCouple*) 206 { 207 return 0.0; 208 } 209 210 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 211 212 G4double G4VEmModel::GetChargeSquareRatio(const G4ParticleDefinition* p, 213 const G4Material*, G4double) 214 { 215 G4double q = p->GetPDGCharge()/CLHEP::eplus; 216 return q*q; 217 } 218 219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 220 221 G4double G4VEmModel::GetParticleCharge(const G4ParticleDefinition* p, 222 const G4Material*, G4double) 223 { 224 return p->GetPDGCharge(); 225 } 226 227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 228 229 void G4VEmModel::CorrectionsAlongStep(const G4MaterialCutsCouple*, 230 const G4DynamicParticle*, 231 G4double&,G4double&,G4double) 232 {} 233 234 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 235 236 void G4VEmModel::SampleDeexcitationAlongStep(const G4Material*, 237 const G4Track&, 238 G4double& ) 239 {} 240 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 242 243 G4double G4VEmModel::MaxSecondaryEnergy(const G4ParticleDefinition*, 244 G4double kineticEnergy) 245 { 246 return kineticEnergy; 247 } 248 249 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 250 251 void G4VEmModel::DefineForRegion(const G4Region*) 252 {} 253 254 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 255 256 void G4VEmModel::SetupForMaterial(const G4ParticleDefinition*, 257 const G4Material*, G4double) 258 {} 259 260 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/utils/src/G4VEmProcess.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEmProcess.cc,v 1.6 0 2008/10/17 14:46:16vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEmProcess.cc,v 1.66 2009/04/17 10:35:32 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 78 78 #include "G4Positron.hh" 79 79 #include "G4PhysicsTableHelper.hh" 80 #include "G4EmConfigurator.hh" 80 81 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 91 92 applyCuts(false), 92 93 startFromNull(true), 93 nRegions(0), 94 selectedModel(0), 94 useDeexcitation(false), 95 nDERegions(0), 96 idxDERegions(0), 97 currentModel(0), 95 98 particle(0), 96 99 currentCouple(0) … … 100 103 // Size of tables assuming spline 101 104 minKinEnergy = 0.1*keV; 102 maxKinEnergy = 10 0.0*TeV;103 nLambdaBins = 84;105 maxKinEnergy = 10.0*TeV; 106 nLambdaBins = 77; 104 107 105 108 // default lambda factor … … 139 142 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 140 143 144 void G4VEmProcess::Clear() 145 { 146 delete [] theEnergyOfCrossSectionMax; 147 delete [] theCrossSectionMax; 148 delete [] idxDERegions; 149 theEnergyOfCrossSectionMax = 0; 150 theCrossSectionMax = 0; 151 idxDERegions = 0; 152 currentCouple = 0; 153 preStepLambda = 0.0; 154 mfpKinEnergy = DBL_MAX; 155 deRegions.clear(); 156 nDERegions = 0; 157 } 158 159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 160 161 void G4VEmProcess::AddEmModel(G4int order, G4VEmModel* p, 162 const G4Region* region) 163 { 164 G4VEmFluctuationModel* fm = 0; 165 modelManager->AddEmModel(order, p, fm, region); 166 if(p) p->SetParticleChange(pParticleChange); 167 } 168 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 170 171 void G4VEmProcess::SetModel(G4VEmModel* p, G4int index) 172 { 173 G4int n = emModels.size(); 174 if(index >= n) for(G4int i=n; i<index+1; i++) {emModels.push_back(0);} 175 emModels[index] = p; 176 } 177 178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 179 180 G4VEmModel* G4VEmProcess::Model(G4int index) 181 { 182 G4VEmModel* p = 0; 183 if(index >= 0 && index < G4int(emModels.size())) p = emModels[index]; 184 return p; 185 } 186 187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 188 189 void G4VEmProcess::UpdateEmModel(const G4String& nam, 190 G4double emin, G4double emax) 191 { 192 modelManager->UpdateEmModel(nam, emin, emax); 193 } 194 195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 196 197 G4VEmModel* G4VEmProcess::GetModelByIndex(G4int idx, G4bool ver) 198 { 199 return modelManager->GetModel(idx, ver); 200 } 201 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 203 141 204 void G4VEmProcess::PreparePhysicsTable(const G4ParticleDefinition& part) 142 205 { … … 149 212 << G4endl; 150 213 } 214 215 (G4LossTableManager::Instance())->EmConfigurator()->AddModels(); 151 216 152 217 if(particle == &part) { … … 159 224 theCutsElectron = theCoupleTable->GetEnergyCutsVector(idxG4ElectronCut); 160 225 theCutsPositron = theCoupleTable->GetEnergyCutsVector(idxG4PositronCut); 161 if(buildLambdaTable) 226 if(buildLambdaTable){ 162 227 theLambdaTable = G4PhysicsTableHelper::PreparePhysicsTable(theLambdaTable); 163 } 164 } 165 166 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 167 168 void G4VEmProcess::Clear() 169 { 170 if(theEnergyOfCrossSectionMax) delete [] theEnergyOfCrossSectionMax; 171 if(theCrossSectionMax) delete [] theCrossSectionMax; 172 theEnergyOfCrossSectionMax = 0; 173 theCrossSectionMax = 0; 174 currentCouple = 0; 175 preStepLambda = 0.0; 176 mfpKinEnergy = DBL_MAX; 228 } 229 } 230 // Sub Cutoff and Deexcitation 231 if (nDERegions>0) { 232 233 const G4ProductionCutsTable* theCoupleTable= 234 G4ProductionCutsTable::GetProductionCutsTable(); 235 size_t numOfCouples = theCoupleTable->GetTableSize(); 236 237 idxDERegions = new G4bool[numOfCouples]; 238 239 for (size_t j=0; j<numOfCouples; j++) { 240 241 const G4MaterialCutsCouple* couple = 242 theCoupleTable->GetMaterialCutsCouple(j); 243 const G4ProductionCuts* pcuts = couple->GetProductionCuts(); 244 G4bool reg = false; 245 for(G4int i=0; i<nDERegions; i++) { 246 if(deRegions[i]) { 247 if(pcuts == deRegions[i]->GetProductionCuts()) reg = true; 248 } 249 } 250 idxDERegions[j] = reg; 251 } 252 } 253 if (1 < verboseLevel && nDERegions>0) { 254 G4cout << " Deexcitation is activated for regions: " << G4endl; 255 for (G4int i=0; i<nDERegions; i++) { 256 const G4Region* r = deRegions[i]; 257 G4cout << " " << r->GetName() << G4endl; 258 } 259 } 177 260 } 178 261 … … 237 320 G4cout << *theLambdaTable << G4endl; 238 321 } 322 } 323 } 324 325 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 326 327 void G4VEmProcess::PrintInfoDefinition() 328 { 329 if(verboseLevel > 0) { 330 G4cout << G4endl << GetProcessName() << ": for " 331 << particle->GetParticleName(); 332 if(integral) G4cout << ", integral: 1 "; 333 if(applyCuts) G4cout << ", applyCuts: 1 "; 334 G4cout << " SubType= " << GetProcessSubType() << G4endl; 335 if(buildLambdaTable) { 336 G4cout << " Lambda tables from " 337 << G4BestUnit(minKinEnergy,"Energy") 338 << " to " 339 << G4BestUnit(maxKinEnergy,"Energy") 340 << " in " << nLambdaBins << " bins, spline: " 341 << (G4LossTableManager::Instance())->SplineFlag() 342 << G4endl; 343 } 344 PrintInfo(); 345 modelManager->DumpModelList(verboseLevel); 346 } 347 348 if(verboseLevel > 2 && buildLambdaTable) { 349 G4cout << " LambdaTable address= " << theLambdaTable << G4endl; 350 if(theLambdaTable) G4cout << (*theLambdaTable) << G4endl; 239 351 } 240 352 } … … 304 416 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 305 417 306 G4double G4VEmProcess::GetMeanFreePath(const G4Track& track,307 G4double,308 G4ForceCondition* condition)309 {310 *condition = NotForced;311 return G4VEmProcess::MeanFreePath(track);312 }313 314 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....315 316 418 G4VParticleChange* G4VEmProcess::PostStepDoIt(const G4Track& track, 317 419 const G4Step&) … … 342 444 } 343 445 344 G4VEmModel* currentModel = SelectModel(finalT); 345 446 SelectModel(finalT); 447 if(useDeexcitation) { 448 currentModel->SetDeexcitationFlag(idxDERegions[currentMaterialIndex]); 449 } 346 450 /* 347 451 if(0 < verboseLevel) { … … 404 508 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 405 509 406 void G4VEmProcess::PrintInfoDefinition()407 {408 if(verboseLevel > 0) {409 G4cout << G4endl << GetProcessName() << ": for "410 << particle->GetParticleName();411 if(integral) G4cout << ", integral: 1 ";412 if(applyCuts) G4cout << ", applyCuts: 1 ";413 G4cout << " SubType= " << GetProcessSubType() << G4endl;414 if(buildLambdaTable) {415 G4cout << " Lambda tables from "416 << G4BestUnit(minKinEnergy,"Energy")417 << " to "418 << G4BestUnit(maxKinEnergy,"Energy")419 << " in " << nLambdaBins << " bins, spline: "420 << (G4LossTableManager::Instance())->SplineFlag()421 << G4endl;422 }423 PrintInfo();424 modelManager->DumpModelList(verboseLevel);425 }426 427 if(verboseLevel > 2 && buildLambdaTable) {428 G4cout << " LambdaTable address= " << theLambdaTable << G4endl;429 if(theLambdaTable) G4cout << (*theLambdaTable) << G4endl;430 }431 }432 433 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....434 435 G4double G4VEmProcess::CrossSectionPerVolume(G4double kineticEnergy,436 const G4MaterialCutsCouple* couple)437 {438 // Cross section per atom is calculated439 DefineMaterial(couple);440 G4double cross = 0.0;441 G4bool b;442 if(theLambdaTable) {443 cross = (((*theLambdaTable)[currentMaterialIndex])->444 GetValue(kineticEnergy, b));445 } else {446 G4VEmModel* model = SelectModel(kineticEnergy);447 cross =448 model->CrossSectionPerVolume(currentMaterial,particle,kineticEnergy);449 }450 451 return cross;452 }453 454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....455 456 510 G4bool G4VEmProcess::StorePhysicsTable(const G4ParticleDefinition* part, 457 511 const G4String& directory, … … 521 575 522 576 return yes; 577 } 578 579 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 580 581 void G4VEmProcess::ActivateDeexcitation(G4bool val, const G4Region* r) 582 { 583 G4RegionStore* regionStore = G4RegionStore::GetInstance(); 584 const G4Region* reg = r; 585 if (!reg) {reg = regionStore->GetRegion("DefaultRegionForTheWorld", false);} 586 587 // the region is in the list 588 if (nDERegions) { 589 for (G4int i=0; i<nDERegions; i++) { 590 if (reg == deRegions[i]) { 591 if(!val) deRegions[i] = 0; 592 return; 593 } 594 } 595 } 596 597 // new region 598 if(val) { 599 useDeexcitation = true; 600 deRegions.push_back(reg); 601 nDERegions++; 602 } else { 603 useDeexcitation = false; 604 } 605 } 606 607 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 608 609 G4double G4VEmProcess::CrossSectionPerVolume(G4double kineticEnergy, 610 const G4MaterialCutsCouple* couple) 611 { 612 // Cross section per atom is calculated 613 DefineMaterial(couple); 614 G4double cross = 0.0; 615 G4bool b; 616 if(theLambdaTable) { 617 cross = (((*theLambdaTable)[currentMaterialIndex])-> 618 GetValue(kineticEnergy, b)); 619 } else { 620 SelectModel(kineticEnergy); 621 cross = currentModel->CrossSectionPerVolume(currentMaterial, 622 particle,kineticEnergy); 623 } 624 625 return cross; 626 } 627 628 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 629 630 G4double G4VEmProcess::GetMeanFreePath(const G4Track& track, 631 G4double, 632 G4ForceCondition* condition) 633 { 634 *condition = NotForced; 635 return G4VEmProcess::MeanFreePath(track); 523 636 } 524 637 -
trunk/source/processes/electromagnetic/utils/src/G4VEnergyLossProcess.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEnergyLossProcess.cc,v 1.14 3 2008/10/17 14:46:16vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VEnergyLossProcess.cc,v 1.149 2009/04/17 10:35:32 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 142 142 #include "G4SafetyHelper.hh" 143 143 #include "G4TransportationManager.hh" 144 #include "G4EmConfigurator.hh" 144 145 145 146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 150 151 secondaryParticle(0), 151 152 nSCoffRegions(0), 153 nDERegions(0), 152 154 idxSCoffRegions(0), 155 idxDERegions(0), 153 156 nProcesses(0), 154 157 theDEDXTable(0), … … 176 179 isIonisation(true), 177 180 useSubCutoff(false), 181 useDeexcitation(false), 178 182 particle(0), 179 183 currentCouple(0), … … 188 192 // Size of tables assuming spline 189 193 minKinEnergy = 0.1*keV; 190 maxKinEnergy = 10 0.0*TeV;191 nBins = 84;194 maxKinEnergy = 10.0*TeV; 195 nBins = 77; 192 196 maxKinEnergyCSDA = 1.0*GeV; 193 197 nBinsCSDA = 35; … … 237 241 << G4endl; 238 242 delete vstrag; 239 Clea r();243 Clean(); 240 244 241 245 if ( !baseParticle ) { … … 291 295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 292 296 293 void G4VEnergyLossProcess::Clea r()297 void G4VEnergyLossProcess::Clean() 294 298 { 295 299 if(1 < verboseLevel) { … … 302 306 delete [] theCrossSectionMax; 303 307 delete [] idxSCoffRegions; 308 delete [] idxDERegions; 304 309 305 310 theDEDXAtMaxEnergy = 0; … … 312 317 scProcesses.clear(); 313 318 nProcesses = 0; 319 } 320 321 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 322 323 G4double G4VEnergyLossProcess::MinPrimaryEnergy(const G4ParticleDefinition*, 324 const G4Material*, 325 G4double cut) 326 { 327 return cut; 328 } 329 330 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 331 332 void G4VEnergyLossProcess::AddEmModel(G4int order, G4VEmModel* p, 333 G4VEmFluctuationModel* fluc, 334 const G4Region* region) 335 { 336 modelManager->AddEmModel(order, p, fluc, region); 337 if(p) p->SetParticleChange(pParticleChange, fluc); 338 } 339 340 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 341 342 void G4VEnergyLossProcess::UpdateEmModel(const G4String& nam, 343 G4double emin, G4double emax) 344 { 345 modelManager->UpdateEmModel(nam, emin, emax); 346 } 347 348 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 349 350 void G4VEnergyLossProcess::SetEmModel(G4VEmModel* p, G4int index) 351 { 352 G4int n = emModels.size(); 353 if(index >= n) for(G4int i=n; i<index+1; i++) {emModels.push_back(0);} 354 emModels[index] = p; 355 } 356 357 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 358 359 G4VEmModel* G4VEnergyLossProcess::EmModel(G4int index) 360 { 361 G4VEmModel* p = 0; 362 if(index >= 0 && index < G4int(emModels.size())) p = emModels[index]; 363 return p; 364 } 365 366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 367 368 G4VEmModel* G4VEnergyLossProcess::GetModelByIndex(G4int idx, G4bool ver) 369 { 370 return modelManager->GetModel(idx, ver); 371 } 372 373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 374 375 G4int G4VEnergyLossProcess::NumberOfModels() 376 { 377 return modelManager->NumberOfModels(); 314 378 } 315 379 … … 364 428 } 365 429 366 Clear(); 430 Clean(); 431 lManager->EmConfigurator()->AddModels(); 367 432 368 433 // Base particle and set of models can be defined here … … 407 472 minSubRange, verboseLevel); 408 473 409 // Sub Cutoff Regime410 if (nSCoffRegions>0 ) {474 // Sub Cutoff and Deexcitation 475 if (nSCoffRegions>0 || nDERegions>0) { 411 476 theSubCuts = modelManager->SubCutoff(); 412 477 … … 414 479 G4ProductionCutsTable::GetProductionCutsTable(); 415 480 size_t numOfCouples = theCoupleTable->GetTableSize(); 416 idxSCoffRegions = new G4int[numOfCouples]; 481 482 if(nSCoffRegions>0) idxSCoffRegions = new G4bool[numOfCouples]; 483 if(nDERegions>0) idxDERegions = new G4bool[numOfCouples]; 417 484 418 485 for (size_t j=0; j<numOfCouples; j++) { … … 421 488 theCoupleTable->GetMaterialCutsCouple(j); 422 489 const G4ProductionCuts* pcuts = couple->GetProductionCuts(); 423 G4int reg = 0; 424 for(G4int i=0; i<nSCoffRegions; i++) { 425 if( pcuts == scoffRegions[i]->GetProductionCuts()) reg = 1; 426 } 427 idxSCoffRegions[j] = reg; 490 491 if(nSCoffRegions>0) { 492 G4bool reg = false; 493 for(G4int i=0; i<nSCoffRegions; i++) { 494 if( pcuts == scoffRegions[i]->GetProductionCuts()) reg = true; 495 } 496 idxSCoffRegions[j] = reg; 497 } 498 if(nDERegions>0) { 499 G4bool reg = false; 500 for(G4int i=0; i<nDERegions; i++) { 501 if( pcuts == deRegions[i]->GetProductionCuts()) reg = true; 502 } 503 idxDERegions[j] = reg; 504 } 428 505 } 429 506 } … … 445 522 } 446 523 } 524 if (nDERegions) { 525 G4cout << " Deexcitation is ON for regions: " << G4endl; 526 for (G4int i=0; i<nDERegions; i++) { 527 const G4Region* r = deRegions[i]; 528 G4cout << " " << r->GetName() << G4endl; 529 } 530 } 447 531 } 448 532 } … … 479 563 if(isIonisation) G4cout << " isIonisation flag = 1"; 480 564 G4cout << G4endl; 481 }482 }483 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....485 486 void G4VEnergyLossProcess::ActivateSubCutoff(G4bool val, const G4Region* r)487 {488 G4RegionStore* regionStore = G4RegionStore::GetInstance();489 if(val) {490 useSubCutoff = true;491 if (!r) {r = regionStore->GetRegion("DefaultRegionForTheWorld", false);}492 if (nSCoffRegions) {493 for (G4int i=0; i<nSCoffRegions; i++) {494 if (r == scoffRegions[i]) return;495 }496 }497 scoffRegions.push_back(r);498 nSCoffRegions++;499 } else {500 useSubCutoff = false;501 565 } 502 566 } … … 640 704 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 641 705 642 G4double G4VEnergyLossProcess::GetContinuousStepLimit( 643 const G4Track&, 644 G4double, G4double, G4double&) 645 { 646 return DBL_MAX; 706 void G4VEnergyLossProcess::PrintInfoDefinition() 707 { 708 if(0 < verboseLevel) { 709 G4cout << G4endl << GetProcessName() << ": for " 710 << particle->GetParticleName() 711 << " SubType= " << GetProcessSubType() 712 << G4endl 713 << " dE/dx and range tables from " 714 << G4BestUnit(minKinEnergy,"Energy") 715 << " to " << G4BestUnit(maxKinEnergy,"Energy") 716 << " in " << nBins << " bins" << G4endl 717 << " Lambda tables from threshold to " 718 << G4BestUnit(maxKinEnergy,"Energy") 719 << " in " << nBins << " bins, spline: " 720 << (G4LossTableManager::Instance())->SplineFlag() 721 << G4endl; 722 if(theRangeTableForLoss && isIonisation) { 723 G4cout << " finalRange(mm)= " << finalRange/mm 724 << ", dRoverRange= " << dRoverRange 725 << ", integral: " << integral 726 << ", fluct: " << lossFluctuationFlag 727 << ", linLossLimit= " << linLossLimit 728 << G4endl; 729 } 730 PrintInfo(); 731 modelManager->DumpModelList(verboseLevel); 732 if(theCSDARangeTable && isIonisation) { 733 G4cout << " CSDA range table up" 734 << " to " << G4BestUnit(maxKinEnergyCSDA,"Energy") 735 << " in " << nBinsCSDA << " bins" << G4endl; 736 } 737 if(nSCoffRegions>0 && isIonisation) { 738 G4cout << " Subcutoff sampling in " << nSCoffRegions 739 << " regions" << G4endl; 740 } 741 if(2 < verboseLevel) { 742 G4cout << " DEDXTable address= " << theDEDXTable << G4endl; 743 if(theDEDXTable && isIonisation) G4cout << (*theDEDXTable) << G4endl; 744 G4cout << "non restricted DEDXTable address= " 745 << theDEDXunRestrictedTable << G4endl; 746 if(theDEDXunRestrictedTable && isIonisation) { 747 G4cout << (*theDEDXunRestrictedTable) << G4endl; 748 } 749 if(theDEDXSubTable && isIonisation) { 750 G4cout << (*theDEDXSubTable) << G4endl; 751 } 752 G4cout << " CSDARangeTable address= " << theCSDARangeTable 753 << G4endl; 754 if(theCSDARangeTable && isIonisation) { 755 G4cout << (*theCSDARangeTable) << G4endl; 756 } 757 G4cout << " RangeTableForLoss address= " << theRangeTableForLoss 758 << G4endl; 759 if(theRangeTableForLoss && isIonisation) { 760 G4cout << (*theRangeTableForLoss) << G4endl; 761 } 762 G4cout << " InverseRangeTable address= " << theInverseRangeTable 763 << G4endl; 764 if(theInverseRangeTable && isIonisation) { 765 G4cout << (*theInverseRangeTable) << G4endl; 766 } 767 G4cout << " LambdaTable address= " << theLambdaTable << G4endl; 768 if(theLambdaTable && isIonisation) { 769 G4cout << (*theLambdaTable) << G4endl; 770 } 771 G4cout << " SubLambdaTable address= " << theSubLambdaTable << G4endl; 772 if(theSubLambdaTable && isIonisation) { 773 G4cout << (*theSubLambdaTable) << G4endl; 774 } 775 } 776 } 777 } 778 779 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 780 781 void G4VEnergyLossProcess::ActivateSubCutoff(G4bool val, const G4Region* r) 782 { 783 G4RegionStore* regionStore = G4RegionStore::GetInstance(); 784 const G4Region* reg = r; 785 if (!reg) {reg = regionStore->GetRegion("DefaultRegionForTheWorld", false);} 786 787 // the region is in the list 788 if (nSCoffRegions) { 789 for (G4int i=0; i<nSCoffRegions; i++) { 790 if (reg == scoffRegions[i]) { 791 if(!val) deRegions[i] = 0; 792 return; 793 } 794 } 795 } 796 797 // new region 798 if(val) { 799 useSubCutoff = true; 800 scoffRegions.push_back(reg); 801 nSCoffRegions++; 802 } else { 803 useSubCutoff = false; 804 } 805 } 806 807 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 808 809 void G4VEnergyLossProcess::ActivateDeexcitation(G4bool val, const G4Region* r) 810 { 811 G4RegionStore* regionStore = G4RegionStore::GetInstance(); 812 const G4Region* reg = r; 813 if (!reg) {reg = regionStore->GetRegion("DefaultRegionForTheWorld", false);} 814 815 // the region is in the list 816 if (nDERegions) { 817 for (G4int i=0; i<nDERegions; i++) { 818 if (reg == deRegions[i]) { 819 if(!val) deRegions[i] = 0; 820 return; 821 } 822 } 823 } 824 825 // new region 826 if(val) { 827 useDeexcitation = true; 828 deRegions.push_back(reg); 829 nDERegions++; 830 } else { 831 useDeexcitation = false; 832 } 647 833 } 648 834 … … 674 860 // <<" stepLimit= "<<x<<G4endl; 675 861 return x; 676 }677 678 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....679 680 G4double G4VEnergyLossProcess::GetMeanFreePath(681 const G4Track& track,682 G4double,683 G4ForceCondition* condition)684 685 {686 *condition = NotForced;687 return MeanFreePath(track);688 862 } 689 863 … … 806 980 if (length >= fRange) { 807 981 eloss = preStepKinEnergy; 808 currentModel->CorrectionsAlongStep(currentCouple, dynParticle, 809 eloss, esecdep, length); 982 if (useDeexcitation) { 983 if(idxDERegions[currentMaterialIndex]) { 984 currentModel->SampleDeexcitationAlongStep(currentMaterial, track, eloss); 985 if(eloss < 0.0) eloss = 0.0; 986 } 987 } 810 988 fParticleChange.SetProposedKineticEnergy(0.0); 811 fParticleChange.ProposeLocalEnergyDeposit( preStepKinEnergy);989 fParticleChange.ProposeLocalEnergyDeposit(eloss); 812 990 return &fParticleChange; 813 991 } … … 934 1112 G4double tmax = 935 1113 std::min(currentModel->MaxSecondaryKinEnergy(dynParticle),cut); 1114 G4double emean = eloss; 936 1115 eloss = fluc->SampleFluctuations(currentMaterial,dynParticle, 937 tmax,length,e loss);1116 tmax,length,emean); 938 1117 /* 939 1118 if(-1 < verboseLevel) … … 950 1129 eloss += esecdep; 951 1130 if(eloss < 0.0) eloss = 0.0; 1131 1132 // deexcitation 1133 else if (useDeexcitation) { 1134 if(idxDERegions[currentMaterialIndex]) { 1135 currentModel->SampleDeexcitationAlongStep(currentMaterial, track, eloss); 1136 if(eloss < 0.0) eloss = 0.0; 1137 } 1138 } 952 1139 953 1140 // Energy balanse … … 1106 1293 1107 1294 SelectModel(postStepScaledEnergy); 1295 if(useDeexcitation) { 1296 currentModel->SetDeexcitationFlag(idxDERegions[currentMaterialIndex]); 1297 } 1298 1108 1299 const G4DynamicParticle* dynParticle = track.GetDynamicParticle(); 1109 1300 G4double tcut = (*theCuts)[currentMaterialIndex]; … … 1140 1331 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1141 1332 1142 void G4VEnergyLossProcess::PrintInfoDefinition() 1143 { 1144 if(0 < verboseLevel) { 1145 G4cout << G4endl << GetProcessName() << ": for " 1146 << particle->GetParticleName() 1147 << " SubType= " << GetProcessSubType() 1148 << G4endl 1149 << " dE/dx and range tables from " 1150 << G4BestUnit(minKinEnergy,"Energy") 1151 << " to " << G4BestUnit(maxKinEnergy,"Energy") 1152 << " in " << nBins << " bins" << G4endl 1153 << " Lambda tables from threshold to " 1154 << G4BestUnit(maxKinEnergy,"Energy") 1155 << " in " << nBins << " bins, spline: " 1156 << (G4LossTableManager::Instance())->SplineFlag() 1333 G4bool G4VEnergyLossProcess::StorePhysicsTable( 1334 const G4ParticleDefinition* part, const G4String& directory, 1335 G4bool ascii) 1336 { 1337 G4bool res = true; 1338 if ( baseParticle || part != particle ) return res; 1339 1340 if(!StoreTable(part,theDEDXTable,ascii,directory,"DEDX")) 1341 {res = false;} 1342 1343 if(!StoreTable(part,theDEDXunRestrictedTable,ascii,directory,"DEDXnr")) 1344 {res = false;} 1345 1346 if(!StoreTable(part,theDEDXSubTable,ascii,directory,"SubDEDX")) 1347 {res = false;} 1348 1349 if(!StoreTable(part,theIonisationTable,ascii,directory,"Ionisation")) 1350 {res = false;} 1351 1352 if(!StoreTable(part,theIonisationSubTable,ascii,directory,"SubIonisation")) 1353 {res = false;} 1354 1355 if(isIonisation && 1356 !StoreTable(part,theCSDARangeTable,ascii,directory,"CSDARange")) 1357 {res = false;} 1358 1359 if(isIonisation && 1360 !StoreTable(part,theRangeTableForLoss,ascii,directory,"Range")) 1361 {res = false;} 1362 1363 if(isIonisation && 1364 !StoreTable(part,theInverseRangeTable,ascii,directory,"InverseRange")) 1365 {res = false;} 1366 1367 if(!StoreTable(part,theLambdaTable,ascii,directory,"Lambda")) 1368 {res = false;} 1369 1370 if(!StoreTable(part,theSubLambdaTable,ascii,directory,"SubLambda")) 1371 {res = false;} 1372 1373 if ( res ) { 1374 if(0 < verboseLevel) { 1375 G4cout << "Physics tables are stored for " << particle->GetParticleName() 1376 << " and process " << GetProcessName() 1377 << " in the directory <" << directory 1378 << "> " << G4endl; 1379 } 1380 } else { 1381 G4cout << "Fail to store Physics Tables for " 1382 << particle->GetParticleName() 1383 << " and process " << GetProcessName() 1384 << " in the directory <" << directory 1385 << "> " << G4endl; 1386 } 1387 return res; 1388 } 1389 1390 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 1391 1392 G4bool G4VEnergyLossProcess::RetrievePhysicsTable( 1393 const G4ParticleDefinition* part, const G4String& directory, 1394 G4bool ascii) 1395 { 1396 G4bool res = true; 1397 const G4String particleName = part->GetParticleName(); 1398 1399 if(1 < verboseLevel) { 1400 G4cout << "G4VEnergyLossProcess::RetrievePhysicsTable() for " 1401 << particleName << " and process " << GetProcessName() 1402 << "; tables_are_built= " << tablesAreBuilt 1157 1403 << G4endl; 1158 if(theRangeTableForLoss && isIonisation) { 1159 G4cout << " finalRange(mm)= " << finalRange/mm 1160 << ", dRoverRange= " << dRoverRange 1161 << ", integral: " << integral 1162 << ", fluct: " << lossFluctuationFlag 1163 << ", linLossLimit= " << linLossLimit 1164 << G4endl; 1165 } 1166 PrintInfo(); 1167 modelManager->DumpModelList(verboseLevel); 1168 if(theCSDARangeTable && isIonisation) { 1169 G4cout << " CSDA range table up" 1170 << " to " << G4BestUnit(maxKinEnergyCSDA,"Energy") 1171 << " in " << nBinsCSDA << " bins" << G4endl; 1172 } 1173 if(nSCoffRegions>0 && isIonisation) { 1174 G4cout << " Subcutoff sampling in " << nSCoffRegions 1175 << " regions" << G4endl; 1176 } 1177 if(2 < verboseLevel) { 1178 G4cout << " DEDXTable address= " << theDEDXTable << G4endl; 1179 if(theDEDXTable && isIonisation) G4cout << (*theDEDXTable) << G4endl; 1180 G4cout << "non restricted DEDXTable address= " 1181 << theDEDXunRestrictedTable << G4endl; 1182 if(theDEDXunRestrictedTable && isIonisation) { 1183 G4cout << (*theDEDXunRestrictedTable) << G4endl; 1184 } 1185 if(theDEDXSubTable && isIonisation) { 1186 G4cout << (*theDEDXSubTable) << G4endl; 1187 } 1188 G4cout << " CSDARangeTable address= " << theCSDARangeTable 1404 } 1405 if(particle == part) { 1406 1407 // G4bool yes = true; 1408 if ( !baseParticle ) { 1409 1410 G4bool fpi = true; 1411 if(!RetrieveTable(part,theDEDXTable,ascii,directory,"DEDX",fpi)) 1412 {fpi = false;} 1413 1414 if(!RetrieveTable(part,theIonisationTable,ascii,directory,"Ionisation",false)) 1415 {fpi = false;} 1416 1417 if(!RetrieveTable(part,theRangeTableForLoss,ascii,directory,"Range",fpi)) 1418 {res = false;} 1419 1420 if(!RetrieveTable(part,theDEDXunRestrictedTable,ascii,directory,"DEDXnr",false)) 1421 {res = false;} 1422 1423 if(!RetrieveTable(part,theCSDARangeTable,ascii,directory,"CSDARange",false)) 1424 {res = false;} 1425 1426 if(!RetrieveTable(part,theInverseRangeTable,ascii,directory,"InverseRange",fpi)) 1427 {res = false;} 1428 1429 if(!RetrieveTable(part,theLambdaTable,ascii,directory,"Lambda",true)) 1430 {res = false;} 1431 1432 G4bool yes = false; 1433 if(nSCoffRegions > 0) {yes = true;} 1434 1435 if(!RetrieveTable(part,theDEDXSubTable,ascii,directory,"SubDEDX",yes)) 1436 {res = false;} 1437 1438 if(!RetrieveTable(part,theSubLambdaTable,ascii,directory,"SubLambda",yes)) 1439 {res = false;} 1440 1441 if(!fpi) yes = false; 1442 if(!RetrieveTable(part,theIonisationSubTable,ascii,directory,"SubIonisation",yes)) 1443 {res = false;} 1444 } 1445 } 1446 1447 return res; 1448 } 1449 1450 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 1451 1452 G4bool G4VEnergyLossProcess::StoreTable(const G4ParticleDefinition* part, 1453 G4PhysicsTable* aTable, G4bool ascii, 1454 const G4String& directory, 1455 const G4String& tname) 1456 { 1457 G4bool res = true; 1458 if ( aTable ) { 1459 const G4String name = GetPhysicsTableFileName(part,directory,tname,ascii); 1460 if( !aTable->StorePhysicsTable(name,ascii)) res = false; 1461 } 1462 return res; 1463 } 1464 1465 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 1466 1467 G4bool G4VEnergyLossProcess::RetrieveTable(const G4ParticleDefinition* part, 1468 G4PhysicsTable* aTable, G4bool ascii, 1469 const G4String& directory, 1470 const G4String& tname, 1471 G4bool mandatory) 1472 { 1473 G4bool res = true; 1474 G4String filename = GetPhysicsTableFileName(part,directory,tname,ascii); 1475 G4bool yes = aTable->ExistPhysicsTable(filename); 1476 if(yes) { 1477 yes = G4PhysicsTableHelper::RetrievePhysicsTable(aTable,filename,ascii); 1478 if((G4LossTableManager::Instance())->SplineFlag()) { 1479 size_t n = aTable->length(); 1480 for(size_t i=0; i<n; i++) {(*aTable)[i]->SetSpline(true);} 1481 } 1482 } 1483 if(yes) { 1484 if (0 < verboseLevel) { 1485 G4cout << tname << " table for " << part->GetParticleName() 1486 << " is Retrieved from <" << filename << ">" 1189 1487 << G4endl; 1190 if(theCSDARangeTable && isIonisation) { 1191 G4cout << (*theCSDARangeTable) << G4endl; 1192 } 1193 G4cout << " RangeTableForLoss address= " << theRangeTableForLoss 1488 } 1489 } else { 1490 if(mandatory) res = false; 1491 if(mandatory || 1 < verboseLevel) { 1492 G4cout << tname << " table for " << part->GetParticleName() 1493 << " from file <" 1494 << filename << "> is not Retrieved" 1194 1495 << G4endl; 1195 if(theRangeTableForLoss && isIonisation) { 1196 G4cout << (*theRangeTableForLoss) << G4endl; 1197 } 1198 G4cout << " InverseRangeTable address= " << theInverseRangeTable 1199 << G4endl; 1200 if(theInverseRangeTable && isIonisation) { 1201 G4cout << (*theInverseRangeTable) << G4endl; 1202 } 1203 G4cout << " LambdaTable address= " << theLambdaTable << G4endl; 1204 if(theLambdaTable && isIonisation) { 1205 G4cout << (*theLambdaTable) << G4endl; 1206 } 1207 G4cout << " SubLambdaTable address= " << theSubLambdaTable << G4endl; 1208 if(theSubLambdaTable && isIonisation) { 1209 G4cout << (*theSubLambdaTable) << G4endl; 1210 } 1496 } 1497 } 1498 return res; 1499 } 1500 1501 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1502 1503 G4double G4VEnergyLossProcess::GetDEDXDispersion( 1504 const G4MaterialCutsCouple *couple, 1505 const G4DynamicParticle* dp, 1506 G4double length) 1507 { 1508 DefineMaterial(couple); 1509 G4double ekin = dp->GetKineticEnergy(); 1510 SelectModel(ekin*massRatio); 1511 G4double tmax = currentModel->MaxSecondaryKinEnergy(dp); 1512 tmax = std::min(tmax,(*theCuts)[currentMaterialIndex]); 1513 G4double d = 0.0; 1514 G4VEmFluctuationModel* fm = currentModel->GetModelOfFluctuations(); 1515 if(fm) d = fm->Dispersion(currentMaterial,dp,tmax,length); 1516 return d; 1517 } 1518 1519 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1520 1521 G4double G4VEnergyLossProcess::CrossSectionPerVolume( 1522 G4double kineticEnergy, const G4MaterialCutsCouple* couple) 1523 { 1524 // Cross section per volume is calculated 1525 DefineMaterial(couple); 1526 G4double cross = 0.0; 1527 G4bool b; 1528 if(theLambdaTable) { 1529 cross = 1530 ((*theLambdaTable)[currentMaterialIndex])->GetValue(kineticEnergy, b); 1531 } else { 1532 SelectModel(kineticEnergy); 1533 cross = 1534 currentModel->CrossSectionPerVolume(currentMaterial, 1535 particle, kineticEnergy, 1536 (*theCuts)[currentMaterialIndex]); 1537 } 1538 1539 return cross; 1540 } 1541 1542 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1543 1544 G4double G4VEnergyLossProcess::MeanFreePath(const G4Track& track) 1545 { 1546 DefineMaterial(track.GetMaterialCutsCouple()); 1547 preStepLambda = GetLambdaForScaledEnergy(track.GetKineticEnergy()*massRatio); 1548 G4double x = DBL_MAX; 1549 if(DBL_MIN < preStepLambda) x = 1.0/preStepLambda; 1550 return x; 1551 } 1552 1553 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1554 1555 G4double G4VEnergyLossProcess::ContinuousStepLimit(const G4Track& track, 1556 G4double x, G4double y, 1557 G4double& z) 1558 { 1559 G4GPILSelection sel; 1560 return AlongStepGetPhysicalInteractionLength(track, x, y, z, &sel); 1561 } 1562 1563 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1564 1565 G4double G4VEnergyLossProcess::GetMeanFreePath( 1566 const G4Track& track, 1567 G4double, 1568 G4ForceCondition* condition) 1569 1570 { 1571 *condition = NotForced; 1572 return MeanFreePath(track); 1573 } 1574 1575 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1576 1577 G4double G4VEnergyLossProcess::GetContinuousStepLimit( 1578 const G4Track&, 1579 G4double, G4double, G4double&) 1580 { 1581 return DBL_MAX; 1582 } 1583 1584 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1585 1586 G4PhysicsVector* G4VEnergyLossProcess::LambdaPhysicsVector( 1587 const G4MaterialCutsCouple* couple, G4double cut) 1588 { 1589 // G4double cut = (*theCuts)[couple->GetIndex()]; 1590 // G4int nbins = nLambdaBins; 1591 G4double tmin = 1592 std::max(MinPrimaryEnergy(particle, couple->GetMaterial(), cut), 1593 minKinEnergy); 1594 if(tmin >= maxKinEnergy) tmin = 0.5*maxKinEnergy; 1595 G4PhysicsVector* v = new G4PhysicsLogVector(tmin, maxKinEnergy, nBins); 1596 v->SetSpline((G4LossTableManager::Instance())->SplineFlag()); 1597 1598 return v; 1599 } 1600 1601 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1602 1603 void G4VEnergyLossProcess::AddCollaborativeProcess( 1604 G4VEnergyLossProcess* p) 1605 { 1606 G4bool add = true; 1607 if(p->GetProcessName() != "eBrem") add = false; 1608 if(add && nProcesses > 0) { 1609 for(G4int i=0; i<nProcesses; i++) { 1610 if(p == scProcesses[i]) { 1611 add = false; 1612 break; 1613 } 1614 } 1615 } 1616 if(add) { 1617 scProcesses.push_back(p); 1618 nProcesses++; 1619 if (1 < verboseLevel) { 1620 G4cout << "### The process " << p->GetProcessName() 1621 << " is added to the list of collaborative processes of " 1622 << GetProcessName() << G4endl; 1211 1623 } 1212 1624 } … … 1377 1789 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1378 1790 1379 G4PhysicsVector* G4VEnergyLossProcess::LambdaPhysicsVector(1380 const G4MaterialCutsCouple* couple, G4double cut)1381 {1382 // G4double cut = (*theCuts)[couple->GetIndex()];1383 // G4int nbins = nLambdaBins;1384 G4double tmin =1385 std::max(MinPrimaryEnergy(particle, couple->GetMaterial(), cut),1386 minKinEnergy);1387 if(tmin >= maxKinEnergy) tmin = 0.5*maxKinEnergy;1388 G4PhysicsVector* v = new G4PhysicsLogVector(tmin, maxKinEnergy, nBins);1389 v->SetSpline((G4LossTableManager::Instance())->SplineFlag());1390 1391 return v;1392 }1393 1394 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1395 1396 G4double G4VEnergyLossProcess::CrossSectionPerVolume(1397 G4double kineticEnergy, const G4MaterialCutsCouple* couple)1398 {1399 // Cross section per volume is calculated1400 DefineMaterial(couple);1401 G4double cross = 0.0;1402 G4bool b;1403 if(theLambdaTable) {1404 cross =1405 ((*theLambdaTable)[currentMaterialIndex])->GetValue(kineticEnergy, b);1406 } else {1407 SelectModel(kineticEnergy);1408 cross =1409 currentModel->CrossSectionPerVolume(currentMaterial,1410 particle, kineticEnergy,1411 (*theCuts)[currentMaterialIndex]);1412 }1413 1414 return cross;1415 }1416 1417 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1418 1419 G4bool G4VEnergyLossProcess::StorePhysicsTable(1420 const G4ParticleDefinition* part, const G4String& directory,1421 G4bool ascii)1422 {1423 G4bool res = true;1424 if ( baseParticle || part != particle ) return res;1425 1426 if(!StoreTable(part,theDEDXTable,ascii,directory,"DEDX"))1427 {res = false;}1428 1429 if(!StoreTable(part,theDEDXunRestrictedTable,ascii,directory,"DEDXnr"))1430 {res = false;}1431 1432 if(!StoreTable(part,theDEDXSubTable,ascii,directory,"SubDEDX"))1433 {res = false;}1434 1435 if(!StoreTable(part,theIonisationTable,ascii,directory,"Ionisation"))1436 {res = false;}1437 1438 if(!StoreTable(part,theIonisationSubTable,ascii,directory,"SubIonisation"))1439 {res = false;}1440 1441 if(isIonisation &&1442 !StoreTable(part,theCSDARangeTable,ascii,directory,"CSDARange"))1443 {res = false;}1444 1445 if(isIonisation &&1446 !StoreTable(part,theRangeTableForLoss,ascii,directory,"Range"))1447 {res = false;}1448 1449 if(isIonisation &&1450 !StoreTable(part,theInverseRangeTable,ascii,directory,"InverseRange"))1451 {res = false;}1452 1453 if(!StoreTable(part,theLambdaTable,ascii,directory,"Lambda"))1454 {res = false;}1455 1456 if(!StoreTable(part,theSubLambdaTable,ascii,directory,"SubLambda"))1457 {res = false;}1458 1459 if ( res ) {1460 if(0 < verboseLevel) {1461 G4cout << "Physics tables are stored for " << particle->GetParticleName()1462 << " and process " << GetProcessName()1463 << " in the directory <" << directory1464 << "> " << G4endl;1465 }1466 } else {1467 G4cout << "Fail to store Physics Tables for "1468 << particle->GetParticleName()1469 << " and process " << GetProcessName()1470 << " in the directory <" << directory1471 << "> " << G4endl;1472 }1473 return res;1474 }1475 1476 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....1477 1478 G4bool G4VEnergyLossProcess::StoreTable(const G4ParticleDefinition* part,1479 G4PhysicsTable* aTable, G4bool ascii,1480 const G4String& directory,1481 const G4String& tname)1482 {1483 G4bool res = true;1484 if ( aTable ) {1485 const G4String name = GetPhysicsTableFileName(part,directory,tname,ascii);1486 if( !aTable->StorePhysicsTable(name,ascii)) res = false;1487 }1488 return res;1489 }1490 1491 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....1492 1493 G4bool G4VEnergyLossProcess::RetrievePhysicsTable(1494 const G4ParticleDefinition* part, const G4String& directory,1495 G4bool ascii)1496 {1497 G4bool res = true;1498 const G4String particleName = part->GetParticleName();1499 1500 if(1 < verboseLevel) {1501 G4cout << "G4VEnergyLossProcess::RetrievePhysicsTable() for "1502 << particleName << " and process " << GetProcessName()1503 << "; tables_are_built= " << tablesAreBuilt1504 << G4endl;1505 }1506 if(particle == part) {1507 1508 // G4bool yes = true;1509 if ( !baseParticle ) {1510 1511 G4bool fpi = true;1512 if(!RetrieveTable(part,theDEDXTable,ascii,directory,"DEDX",fpi))1513 {fpi = false;}1514 1515 if(!RetrieveTable(part,theIonisationTable,ascii,directory,"Ionisation",false))1516 {fpi = false;}1517 1518 if(!RetrieveTable(part,theRangeTableForLoss,ascii,directory,"Range",fpi))1519 {res = false;}1520 1521 if(!RetrieveTable(part,theDEDXunRestrictedTable,ascii,directory,"DEDXnr",false))1522 {res = false;}1523 1524 if(!RetrieveTable(part,theCSDARangeTable,ascii,directory,"CSDARange",false))1525 {res = false;}1526 1527 if(!RetrieveTable(part,theInverseRangeTable,ascii,directory,"InverseRange",fpi))1528 {res = false;}1529 1530 if(!RetrieveTable(part,theLambdaTable,ascii,directory,"Lambda",true))1531 {res = false;}1532 1533 G4bool yes = false;1534 if(nSCoffRegions > 0) {yes = true;}1535 1536 if(!RetrieveTable(part,theDEDXSubTable,ascii,directory,"SubDEDX",yes))1537 {res = false;}1538 1539 if(!RetrieveTable(part,theSubLambdaTable,ascii,directory,"SubLambda",yes))1540 {res = false;}1541 1542 if(!fpi) yes = false;1543 if(!RetrieveTable(part,theIonisationSubTable,ascii,directory,"SubIonisation",yes))1544 {res = false;}1545 }1546 }1547 1548 return res;1549 }1550 1551 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....1552 1553 G4bool G4VEnergyLossProcess::RetrieveTable(const G4ParticleDefinition* part,1554 G4PhysicsTable* aTable, G4bool ascii,1555 const G4String& directory,1556 const G4String& tname,1557 G4bool mandatory)1558 {1559 G4bool res = true;1560 G4String filename = GetPhysicsTableFileName(part,directory,tname,ascii);1561 G4bool yes = aTable->ExistPhysicsTable(filename);1562 if(yes) {1563 yes = G4PhysicsTableHelper::RetrievePhysicsTable(aTable,filename,ascii);1564 if((G4LossTableManager::Instance())->SplineFlag()) {1565 size_t n = aTable->length();1566 for(size_t i=0; i<n; i++) {(*aTable)[i]->SetSpline(true);}1567 }1568 }1569 if(yes) {1570 if (0 < verboseLevel) {1571 G4cout << tname << " table for " << part->GetParticleName()1572 << " is Retrieved from <" << filename << ">"1573 << G4endl;1574 }1575 } else {1576 if(mandatory) res = false;1577 if(mandatory || 1 < verboseLevel) {1578 G4cout << tname << " table for " << part->GetParticleName()1579 << " from file <"1580 << filename << "> is not Retrieved"1581 << G4endl;1582 }1583 }1584 return res;1585 }1586 1587 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1588 1589 void G4VEnergyLossProcess::AddCollaborativeProcess(1590 G4VEnergyLossProcess* p)1591 {1592 G4bool add = true;1593 if(p->GetProcessName() != "eBrem") add = false;1594 if(add && nProcesses > 0) {1595 for(G4int i=0; i<nProcesses; i++) {1596 if(p == scProcesses[i]) {1597 add = false;1598 break;1599 }1600 }1601 }1602 if(add) {1603 scProcesses.push_back(p);1604 nProcesses++;1605 if (1 < verboseLevel) {1606 G4cout << "### The process " << p->GetProcessName()1607 << " is added to the list of collaborative processes of "1608 << GetProcessName() << G4endl;1609 }1610 }1611 }1612 1613 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1614 1615 G4double G4VEnergyLossProcess::GetDEDXDispersion(1616 const G4MaterialCutsCouple *couple,1617 const G4DynamicParticle* dp,1618 G4double length)1619 {1620 DefineMaterial(couple);1621 G4double ekin = dp->GetKineticEnergy();1622 SelectModel(ekin*massRatio);1623 G4double tmax = currentModel->MaxSecondaryKinEnergy(dp);1624 tmax = std::min(tmax,(*theCuts)[currentMaterialIndex]);1625 G4double d = 0.0;1626 G4VEmFluctuationModel* fm = currentModel->GetModelOfFluctuations();1627 if(fm) d = fm->Dispersion(currentMaterial,dp,tmax,length);1628 return d;1629 }1630 1631 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1632 1633 void G4VEnergyLossProcess::ActivateDeexcitation(G4bool, const G4Region*)1634 {}1635 1636 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....1637 -
trunk/source/processes/electromagnetic/utils/src/G4VMscModel.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMscModel.cc,v 1. 4 2008/03/10 18:39:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VMscModel.cc,v 1.12 2009/05/10 19:36:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 49 49 50 50 #include "G4VMscModel.hh" 51 #include "G4ParticleChangeForMSC.hh" 52 #include "G4TransportationManager.hh" 51 53 52 54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 55 57 G4VMscModel::G4VMscModel(const G4String& nam): 56 58 G4VEmModel(nam), 57 facrange(0.02), 59 safetyHelper(0), 60 facrange(0.04), 58 61 facgeom(2.5), 59 62 facsafety(0.25), … … 61 64 dtrl(0.05), 62 65 lambdalimit(mm), 66 geommax(1.e50*mm), 63 67 steppingAlgorithm(fUseSafety), 64 68 samplez(false), … … 72 76 73 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 79 G4ParticleChangeForMSC* G4VMscModel::GetParticleChangeForMSC() 80 { 81 G4ParticleChangeForMSC* p = 0; 82 if (pParticleChange) { 83 p = static_cast<G4ParticleChangeForMSC*>(pParticleChange); 84 } else { 85 p = new G4ParticleChangeForMSC(); 86 } 87 return p; 88 } 89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 91 92 void G4VMscModel::InitialiseSafetyHelper() 93 { 94 if(!safetyHelper) { 95 safetyHelper = G4TransportationManager::GetTransportationManager() 96 ->GetSafetyHelper(); 97 safetyHelper->InitialiseHelper(); 98 } 99 } 100 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 102 103 void G4VMscModel::ComputeDisplacement(G4ParticleChangeForMSC* fParticleChange, 104 const G4ThreeVector& dir, 105 G4double displacement, 106 G4double postsafety) 107 { 108 const G4ThreeVector* pos = fParticleChange->GetProposedPosition(); 109 G4double r = displacement; 110 if(r > postsafety) { 111 G4double newsafety = safetyHelper->ComputeSafety(*pos); 112 if(r > newsafety) r = newsafety; 113 } 114 if(r > 0.) { 115 116 // compute new endpoint of the Step 117 G4ThreeVector newPosition = *pos + r*dir; 118 119 // definitely not on boundary 120 if(displacement == r) { 121 safetyHelper->ReLocateWithinVolume(newPosition); 122 123 } else { 124 // check safety after displacement 125 G4double postsafety = safetyHelper->ComputeSafety(newPosition); 126 127 // displacement to boundary 128 if(postsafety <= 0.0) { 129 safetyHelper->Locate(newPosition, 130 *fParticleChange->GetProposedMomentumDirection()); 131 132 // not on the boundary 133 } else { 134 safetyHelper->ReLocateWithinVolume(newPosition); 135 } 136 } 137 fParticleChange->ProposePosition(newPosition); 138 } 139 } 140 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 142 143 void G4VMscModel::SampleScattering(const G4DynamicParticle*, G4double) 144 {} 145 146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 147 148 G4double G4VMscModel::ComputeTruePathLengthLimit(const G4Track&, 149 G4PhysicsTable*, 150 G4double) 151 { 152 return DBL_MAX; 153 } 154 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 156 157 G4double G4VMscModel::ComputeGeomPathLength(G4double truePathLength) 158 { 159 return truePathLength; 160 } 161 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 163 164 G4double G4VMscModel::ComputeTrueStepLength(G4double geomPathLength) 165 { 166 return geomPathLength; 167 } 168 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 170 171 void G4VMscModel::SampleSecondaries(std::vector<G4DynamicParticle*>*, 172 const G4MaterialCutsCouple*, 173 const G4DynamicParticle*, 174 G4double, G4double) 175 {} 176 177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMultipleScattering.cc,v 1.6 0 2008/11/20 20:32:40vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4VMultipleScattering.cc,v 1.66 2009/05/27 11:55:02 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 83 83 #include "G4GenericIon.hh" 84 84 #include "G4Electron.hh" 85 #include "G4EmConfigurator.hh" 85 86 86 87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 94 95 stepLimit(fUseSafety), 95 96 skin(3.0), 96 facrange(0.0 2),97 facrange(0.04), 97 98 facgeom(2.5), 98 99 latDisplasment(true), … … 105 106 // Size of tables assuming spline 106 107 minKinEnergy = 0.1*keV; 107 maxKinEnergy = 10 0.0*TeV;108 nBins = 84;108 maxKinEnergy = 10.0*TeV; 109 nBins = 77; 109 110 110 111 // default limit on polar angle … … 132 133 } 133 134 (G4LossTableManager::Instance())->DeRegister(this); 135 } 136 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 138 139 void G4VMultipleScattering::AddEmModel(G4int order, G4VEmModel* p, 140 const G4Region* region) 141 { 142 G4VEmFluctuationModel* fm = 0; 143 modelManager->AddEmModel(order, p, fm, region); 144 if(p) p->SetParticleChange(pParticleChange); 145 } 146 147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 148 149 G4VEmModel* G4VMultipleScattering::GetModelByIndex(G4int idx, G4bool ver) 150 { 151 return modelManager->GetModel(idx, ver); 134 152 } 135 153 … … 208 226 << G4endl; 209 227 } 228 229 (G4LossTableManager::Instance())->EmConfigurator()->AddModels(); 210 230 211 231 if(firstParticle == &part) {
Note:
See TracChangeset
for help on using the changeset viewer.
