Changeset 1347 for trunk/source/processes/hadronic/models
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models
- Files:
-
- 284 edited
-
abla/History (modified) (2 diffs)
-
abrasion/History (modified) (1 diff)
-
abrasion/src/G4NuclearAbrasionGeometry.cc (modified) (3 diffs)
-
abrasion/src/G4WilsonAbrasionModel.cc (modified) (5 diffs)
-
binary_cascade/History (modified) (2 diffs)
-
binary_cascade/include/G4BinaryCascade.hh (modified) (2 diffs)
-
binary_cascade/src/G4BinaryCascade.cc (modified) (12 diffs)
-
cascade/History (modified) (2 diffs)
-
cascade/cascade/include/G4Analyser.hh (modified) (1 diff)
-
cascade/cascade/include/G4ExitonConfiguration.hh (modified) (1 diff)
-
cascade/cascade/include/G4FissionStore.hh (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKminusNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKminusPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKplusNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKplusPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKzeroBarPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKzeroNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeKzeroPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeLambdaNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeLambdaPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeSigmaMinusNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeSigmaMinusPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeSigmaPlusNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeSigmaPlusPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeSigmaZeroNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeSigmaZeroPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeXiMinusNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeXiMinusPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeXiZeroNChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4CascadeXiZeroPChannel.cc (modified) (1 diff)
-
cascade/cascade/src/G4FissionStore.cc (modified) (1 diff)
-
cascade/cascade/src/bindingEnergy.cc (modified) (1 diff)
-
cascade/cascade/src/nucleiLevelDensity.cc (modified) (1 diff)
-
chiral_inv_phase_space/History (modified) (1 diff)
-
chiral_inv_phase_space/body/History (modified) (1 diff)
-
chiral_inv_phase_space/fragmentation/History (modified) (2 diffs)
-
chiral_inv_phase_space/interface/History (modified) (1 diff)
-
chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc (modified) (1 diff)
-
coherent_elastic/History (modified) (1 diff)
-
de_excitation/History (modified) (1 diff)
-
de_excitation/ablation/src/G4WilsonAblationModel.cc (modified) (1 diff)
-
de_excitation/evaporation/include/G4AlphaEvaporationChannel.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4AlphaEvaporationProbability.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4DeuteronEvaporationChannel.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4DeuteronEvaporationProbability.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4Evaporation.hh (modified) (1 diff)
-
de_excitation/evaporation/include/G4EvaporationChannel.hh (modified) (8 diffs)
-
de_excitation/evaporation/include/G4EvaporationDefaultGEMFactory.hh (modified) (1 diff)
-
de_excitation/evaporation/include/G4EvaporationFactory.hh (modified) (1 diff)
-
de_excitation/evaporation/include/G4EvaporationProbability.hh (modified) (5 diffs)
-
de_excitation/evaporation/include/G4He3EvaporationChannel.hh (modified) (2 diffs)
-
de_excitation/evaporation/include/G4He3EvaporationProbability.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4NeutronEvaporationChannel.hh (modified) (2 diffs)
-
de_excitation/evaporation/include/G4NeutronEvaporationProbability.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4ProtonEvaporationChannel.hh (modified) (2 diffs)
-
de_excitation/evaporation/include/G4ProtonEvaporationProbability.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4TritonEvaporationChannel.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4TritonEvaporationProbability.hh (modified) (3 diffs)
-
de_excitation/evaporation/include/G4UnstableFragmentBreakUp.hh (modified) (1 diff)
-
de_excitation/evaporation/include/G4VEvaporation.hh (modified) (2 diffs)
-
de_excitation/evaporation/src/G4AlphaEvaporationChannel.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc (modified) (8 diffs)
-
de_excitation/evaporation/src/G4DeuteronEvaporationChannel.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc (modified) (6 diffs)
-
de_excitation/evaporation/src/G4Evaporation.cc (modified) (6 diffs)
-
de_excitation/evaporation/src/G4EvaporationChannel.cc (modified) (15 diffs)
-
de_excitation/evaporation/src/G4EvaporationDefaultGEMFactory.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4EvaporationFactory.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4EvaporationProbability.cc (modified) (5 diffs)
-
de_excitation/evaporation/src/G4He3EvaporationChannel.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4He3EvaporationProbability.cc (modified) (8 diffs)
-
de_excitation/evaporation/src/G4NeutronEvaporationChannel.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4NeutronEvaporationProbability.cc (modified) (11 diffs)
-
de_excitation/evaporation/src/G4ProtonEvaporationChannel.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4ProtonEvaporationProbability.cc (modified) (11 diffs)
-
de_excitation/evaporation/src/G4TritonEvaporationChannel.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4TritonEvaporationProbability.cc (modified) (6 diffs)
-
de_excitation/evaporation/src/G4UnstableFragmentBreakUp.cc (modified) (1 diff)
-
de_excitation/evaporation/src/G4VEvaporation.cc (modified) (2 diffs)
-
de_excitation/fermi_breakup/include/G4VFermiFragment.hh (modified) (4 diffs)
-
de_excitation/fermi_breakup/src/G4VFermiFragment.cc (modified) (2 diffs)
-
de_excitation/fission/include/G4CompetitiveFission.hh (modified) (4 diffs)
-
de_excitation/fission/include/G4FissionBarrier.hh (modified) (3 diffs)
-
de_excitation/fission/include/G4FissionLevelDensityParameter.hh (modified) (3 diffs)
-
de_excitation/fission/include/G4FissionParameters.hh (modified) (2 diffs)
-
de_excitation/fission/include/G4FissionProbability.hh (modified) (3 diffs)
-
de_excitation/fission/include/G4ParaFissionModel.hh (modified) (5 diffs)
-
de_excitation/fission/include/G4VFissionBarrier.hh (modified) (3 diffs)
-
de_excitation/fission/src/G4CompetitiveFission.cc (modified) (4 diffs)
-
de_excitation/fission/src/G4FissionBarrier.cc (modified) (1 diff)
-
de_excitation/fission/src/G4FissionLevelDensityParameter.cc (modified) (2 diffs)
-
de_excitation/fission/src/G4FissionParameters.cc (modified) (2 diffs)
-
de_excitation/fission/src/G4FissionProbability.cc (modified) (2 diffs)
-
de_excitation/fission/src/G4VFissionBarrier.cc (modified) (2 diffs)
-
de_excitation/gem_evaporation/include/G4AlphaGEMChannel.hh (modified) (2 diffs)
-
de_excitation/gem_evaporation/include/G4GEMChannel.hh (modified) (2 diffs)
-
de_excitation/gem_evaporation/include/G4GEMProbability.hh (modified) (7 diffs)
-
de_excitation/gem_evaporation/src/G4AlphaGEMChannel.cc (modified) (2 diffs)
-
de_excitation/gem_evaporation/src/G4GEMChannel.cc (modified) (13 diffs)
-
de_excitation/gem_evaporation/src/G4GEMProbability.cc (modified) (9 diffs)
-
de_excitation/handler/include/G4ExcitationHandler.hh (modified) (4 diffs)
-
de_excitation/handler/src/G4ExcitationHandler.cc (modified) (8 diffs)
-
de_excitation/management/include/G4VEvaporationChannel.hh (modified) (4 diffs)
-
de_excitation/management/src/G4VEvaporationChannel.cc (modified) (2 diffs)
-
de_excitation/multifragmentation/include/G4StatMFMacroTemperature.hh (modified) (2 diffs)
-
de_excitation/multifragmentation/src/G4StatMF.cc (modified) (2 diffs)
-
de_excitation/multifragmentation/src/G4StatMFMacroTemperature.cc (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4ContinuumGammaDeexcitation.hh (modified) (2 diffs)
-
de_excitation/photon_evaporation/include/G4ContinuumGammaTransition.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4DiscreteGammaDeexcitation.hh (modified) (2 diffs)
-
de_excitation/photon_evaporation/include/G4DiscreteGammaTransition.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4E1Probability.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4E1SingleProbability1.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4NeutronRadCapture.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4NuclearLevel.hh (modified) (6 diffs)
-
de_excitation/photon_evaporation/include/G4NuclearLevelManager.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4NuclearLevelStore.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4PhotonEvaporation.hh (modified) (2 diffs)
-
de_excitation/photon_evaporation/include/G4PtrLevelVector.hh (modified) (2 diffs)
-
de_excitation/photon_evaporation/include/G4RandGeneralTmp.hh (modified) (1 diff)
-
de_excitation/photon_evaporation/include/G4VGammaDeexcitation.hh (modified) (3 diffs)
-
de_excitation/photon_evaporation/include/G4VGammaTransition.hh (modified) (4 diffs)
-
de_excitation/photon_evaporation/include/G4VPhotonEvaporation.hh (modified) (4 diffs)
-
de_excitation/photon_evaporation/src/G4ContinuumGammaDeexcitation.cc (modified) (5 diffs)
-
de_excitation/photon_evaporation/src/G4ContinuumGammaTransition.cc (modified) (14 diffs)
-
de_excitation/photon_evaporation/src/G4DiscreteGammaDeexcitation.cc (modified) (4 diffs)
-
de_excitation/photon_evaporation/src/G4DiscreteGammaTransition.cc (modified) (4 diffs)
-
de_excitation/photon_evaporation/src/G4E1Probability.cc (modified) (6 diffs)
-
de_excitation/photon_evaporation/src/G4E1SingleProbability1.cc (modified) (10 diffs)
-
de_excitation/photon_evaporation/src/G4NeutronRadCapture.cc (modified) (4 diffs)
-
de_excitation/photon_evaporation/src/G4NuclearLevel.cc (modified) (12 diffs)
-
de_excitation/photon_evaporation/src/G4NuclearLevelManager.cc (modified) (13 diffs)
-
de_excitation/photon_evaporation/src/G4NuclearLevelStore.cc (modified) (2 diffs)
-
de_excitation/photon_evaporation/src/G4PhotonEvaporation.cc (modified) (10 diffs)
-
de_excitation/photon_evaporation/src/G4VGammaDeexcitation.cc (modified) (3 diffs)
-
de_excitation/photon_evaporation/src/G4VPhotonEvaporation.cc (modified) (1 diff)
-
de_excitation/util/include/G4AlphaCoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4ConstantLevelDensityParameter.hh (modified) (3 diffs)
-
de_excitation/util/include/G4CookPairingCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4CookShellCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4CoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4DeuteronCoulombBarrier.hh (modified) (2 diffs)
-
de_excitation/util/include/G4EvaporationLevelDensityParameter.hh (modified) (2 diffs)
-
de_excitation/util/include/G4He3CoulombBarrier.hh (modified) (2 diffs)
-
de_excitation/util/include/G4NeutronCoulombBarrier.hh (modified) (2 diffs)
-
de_excitation/util/include/G4PairingCorrection.hh (modified) (4 diffs)
-
de_excitation/util/include/G4ProtonCoulombBarrier.hh (modified) (2 diffs)
-
de_excitation/util/include/G4TritonCoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4VEmissionProbability.hh (modified) (3 diffs)
-
de_excitation/util/src/G4AlphaCoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CameronGilbertPairingCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CameronGilbertShellCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CameronShellPlusPairingCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CameronTruranHilfPairingCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CameronTruranHilfShellCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4ConstantLevelDensityParameter.cc (modified) (1 diff)
-
de_excitation/util/src/G4CookPairingCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CookShellCorrections.cc (modified) (2 diffs)
-
de_excitation/util/src/G4CoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4DeuteronCoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4EvaporationLevelDensityParameter.cc (modified) (3 diffs)
-
de_excitation/util/src/G4He3CoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4NeutronCoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4PairingCorrection.cc (modified) (3 diffs)
-
de_excitation/util/src/G4ProtonCoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4ShellCorrection.cc (modified) (2 diffs)
-
de_excitation/util/src/G4TritonCoulombBarrier.cc (modified) (2 diffs)
-
de_excitation/util/src/G4VEmissionProbability.cc (modified) (1 diff)
-
high_energy/History (modified) (1 diff)
-
high_energy/include/G4HEAntiKaonZeroInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiLambdaInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiNeutronInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiOmegaMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiProtonInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiSigmaMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiSigmaPlusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiSigmaZeroInelastic.hh (modified) (1 diff)
-
high_energy/include/G4HEAntiXiMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEAntiXiZeroInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEInelastic.hh (modified) (4 diffs)
-
high_energy/include/G4HEKaonMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEKaonPlusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEKaonZeroInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEKaonZeroLongInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEKaonZeroShortInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HELambdaInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HENeutronInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEOmegaMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEPionMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEPionPlusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEProtonInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HESigmaMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HESigmaPlusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HESigmaZeroInelastic.hh (modified) (1 diff)
-
high_energy/include/G4HEVector.hh (modified) (10 diffs)
-
high_energy/include/G4HEXiMinusInelastic.hh (modified) (3 diffs)
-
high_energy/include/G4HEXiZeroInelastic.hh (modified) (3 diffs)
-
high_energy/src/G4HEAntiKaonZeroInelastic.cc (modified) (3 diffs)
-
high_energy/src/G4HEAntiLambdaInelastic.cc (modified) (3 diffs)
-
high_energy/src/G4HEAntiNeutronInelastic.cc (modified) (3 diffs)
-
high_energy/src/G4HEAntiOmegaMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEAntiProtonInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEAntiSigmaMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEAntiSigmaPlusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEAntiSigmaZeroInelastic.cc (modified) (3 diffs)
-
high_energy/src/G4HEAntiXiMinusInelastic.cc (modified) (3 diffs)
-
high_energy/src/G4HEAntiXiZeroInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEInelastic.cc (modified) (28 diffs)
-
high_energy/src/G4HEKaonMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEKaonPlusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEKaonZeroInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEKaonZeroLongInelastic.cc (modified) (10 diffs)
-
high_energy/src/G4HEKaonZeroShortInelastic.cc (modified) (12 diffs)
-
high_energy/src/G4HELambdaInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HENeutronInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEOmegaMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEPionMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEPionPlusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEProtonInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HESigmaMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HESigmaPlusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HESigmaZeroInelastic.cc (modified) (3 diffs)
-
high_energy/src/G4HEVector.cc (modified) (9 diffs)
-
high_energy/src/G4HEXiMinusInelastic.cc (modified) (4 diffs)
-
high_energy/src/G4HEXiZeroInelastic.cc (modified) (4 diffs)
-
incl/GNUmakefile (modified) (2 diffs)
-
incl/History (modified) (2 diffs)
-
incl/include/G4Abla.hh (modified) (4 diffs)
-
incl/include/G4AblaDataDefs.hh (modified) (5 diffs)
-
incl/include/G4Incl.hh (modified) (2 diffs)
-
incl/include/G4InclAblaCascadeInterface.hh (modified) (2 diffs)
-
incl/include/G4InclAblaDataFile.hh (modified) (2 diffs)
-
incl/include/G4InclCascadeInterface.hh (modified) (7 diffs)
-
incl/include/G4InclDataDefs.hh (modified) (31 diffs)
-
incl/include/G4InclLightIonInterface.hh (modified) (6 diffs)
-
incl/include/G4InclRandomNumbers.hh (modified) (2 diffs)
-
incl/src/G4Abla.cc (modified) (9 diffs)
-
incl/src/G4AblaFission.cc (modified) (3 diffs)
-
incl/src/G4AblaFissionSimfis18.cc (modified) (3 diffs)
-
incl/src/G4Incl.cc (modified) (24 diffs)
-
incl/src/G4InclAblaCascadeInterface.cc (modified) (3 diffs)
-
incl/src/G4InclAblaDataFile.cc (modified) (3 diffs)
-
incl/src/G4InclAblaLightIonInterface.cc (modified) (6 diffs)
-
incl/src/G4InclCascadeInterface.cc (modified) (22 diffs)
-
incl/src/G4InclLightIonInterface.cc (modified) (22 diffs)
-
management/History (modified) (1 diff)
-
neutron_hp/History (modified) (1 diff)
-
neutron_hp/src/G4NeutronHPCaptureFS.cc (modified) (5 diffs)
-
neutron_hp/src/G4NeutronHPDiscreteTwoBody.cc (modified) (7 diffs)
-
neutron_hp/src/G4NeutronHPFinalState.cc (modified) (5 diffs)
-
neutron_hp/src/G4NeutronHPInelasticBaseFS.cc (modified) (4 diffs)
-
neutron_hp/src/G4NeutronHPInelasticCompFS.cc (modified) (2 diffs)
-
neutron_hp/src/G4NeutronHPPhotonDist.cc (modified) (2 diffs)
-
parton_string/History (modified) (1 diff)
-
parton_string/diffraction/History (modified) (2 diffs)
-
parton_string/diffraction/include/G4DiffractiveSplitableHadron.hh (modified) (1 diff)
-
parton_string/diffraction/include/G4FTFModel.hh (modified) (1 diff)
-
parton_string/diffraction/include/G4FTFParameters.hh (modified) (7 diffs)
-
parton_string/diffraction/include/G4FTFParticipants.hh (modified) (1 diff)
-
parton_string/diffraction/src/G4DiffractiveExcitation.cc (modified) (10 diffs)
-
parton_string/diffraction/src/G4DiffractiveSplitableHadron.cc (modified) (1 diff)
-
parton_string/diffraction/src/G4FTFModel.cc (modified) (7 diffs)
-
parton_string/diffraction/src/G4FTFParameters.cc (modified) (12 diffs)
-
parton_string/diffraction/src/G4FTFParticipants.cc (modified) (1 diff)
-
parton_string/hadronization/History (modified) (2 diffs)
-
parton_string/management/History (modified) (2 diffs)
-
pre_equilibrium/History (modified) (1 diff)
-
qmd/History (modified) (1 diff)
-
qmd/include/G4QMDMeanField.hh (modified) (1 diff)
-
qmd/include/G4QMDReaction.hh (modified) (2 diffs)
-
qmd/src/G4QMDMeanField.cc (modified) (4 diffs)
-
qmd/src/G4QMDReaction.cc (modified) (2 diffs)
-
radioactive_decay/History (modified) (1 diff)
-
radioactive_decay/include/G4RadioactiveDecay.hh (modified) (2 diffs)
-
radioactive_decay/src/G4RadioactiveDecay.cc (modified) (70 diffs)
-
radioactive_decay/src/G4RadioactiveDecaymessenger.cc (modified) (5 diffs)
-
rpg/History (modified) (1 diff)
-
util/History (modified) (2 diffs)
-
util/include/G4DecayStrongResonances.hh (modified) (2 diffs)
-
util/include/G4NuclearFermiDensity.hh (modified) (1 diff)
-
util/include/G4NuclearShellModelDensity.hh (modified) (1 diff)
-
util/src/G4KineticTrack.cc (modified) (4 diffs)
-
util/src/G4NuclearFermiDensity.cc (modified) (1 diff)
-
util/src/G4NuclearShellModelDensity.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/abla/History
r1340 r1347 4 4 Geant4 - an Object-Oriented Toolkit for Physics Simulation 5 5 ========================================================== 6 $Id: History,v 1. 1 2008/02/27 18:31:10 miheikkiExp $6 $Id: History,v 1.2 2010/11/11 02:13:12 dennis Exp $ 7 7 --------------------------------------------------------------------- 8 8 … … 17 17 --------------------------------------------------------------- 18 18 19 10 November 2010 Dennis Wright 20 ------------------------------- 21 - the code in this directory is not used as of this date 22 19 23 27 February 2008 - Pekka Kaitaniemi 20 24 ----------------------------------- -
trunk/source/processes/hadronic/models/abrasion/History
r1340 r1347 14 14 --------------------------------------------------------------- 15 15 16 12-Nov-2010, Dennis Wright (had-abrasion-V09-03-01) 17 -------------------------------------------------------------------- 18 - G4WilsonAbrasionModel.cc : initialize r0sq in ctor (CoVerity) 19 - G4NuclearAbrasionGeometry::GetExcitationEnergyOfTarget : 20 fix memory leak by deleting revAbrasionGeometry (CoVerity) 21 16 22 08-Sep-2010, Gunter Folger (had-abrasion-V09-03-00) 23 -------------------------------------------------------------------- 17 24 - G4WilsonAbrasionModel.cc: remove several unused #includes 18 25 -
trunk/source/processes/hadronic/models/abrasion/src/G4NuclearAbrasionGeometry.cc
r819 r1347 194 194 return Es; 195 195 } 196 ////////////////////////////////////////////////////////////////////////////////////// 197 // 196 197 198 198 G4double G4NuclearAbrasionGeometry::GetExcitationEnergyOfTarget () 199 199 { 200 // 201 // 202 // This member function declares a new G4NuclearAbrasionGeometry object but with the 203 // projectile and target exchanged to determine the values for F and P. Determination 204 // of the excess surface area and excitation energy is as above. 205 // 206 G4NuclearAbrasionGeometry *revAbrasionGeometry = 200 // This member function declares a new G4NuclearAbrasionGeometry object 201 // but with the projectile and target exchanged to determine the values 202 // for F and P. Determination of the excess surface area and excitation 203 // energy is as above. 204 205 G4NuclearAbrasionGeometry* revAbrasionGeometry = 207 206 new G4NuclearAbrasionGeometry(AT, AP, r); 208 207 G4double F1 = revAbrasionGeometry->F(); … … 212 211 Es = 0.95 * MeV * 4.0 * pi * rT*rT/fermi/fermi * 213 212 (1.0+P1-std::pow(1.0-F1,2.0/3.0)); 213 214 214 // if (rP < rT && r < rT-rP) 215 if ((r-rT)/rP < rth) 216 { 215 if ((r-rT)/rP < rth) { 217 216 G4double omega = 0.0; 218 217 if (AT < 12.0) omega = 1500.0; … … 225 224 else if (Es > B * AT) 226 225 Es = B * AT; 226 227 delete revAbrasionGeometry; 228 227 229 return Es; 228 230 } 229 ////////////////////////////////////////////////////////////////////////////////230 // -
trunk/source/processes/hadronic/models/abrasion/src/G4WilsonAbrasionModel.cc
r1340 r1347 34 34 // ******************************************************************** 35 35 // 36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 37 37 // 38 38 // MODULE: G4WilsonAbrasionModel.cc … … 45 45 // Contract: 17191/03/NL/LvH 46 46 // 47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 48 // 49 49 // CHANGE HISTORY … … 72 72 // Additional clauses have been included in 73 73 // G4WilsonAbrasionModel::GetNucleonInducedExcitation 74 // Previously it was possible to get sqrt of negative number as Wilson algorithm75 // not properly defined if either:74 // Previously it was possible to get sqrt of negative number as Wilson 75 // algorithm not properly defined if either: 76 76 // rT > rP && rsq < rTsq - rPsq) or (rP > rT && rsq < rPsq - rTsq) 77 77 // 78 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %79 /////////////////////////////////////////////////////////////////////////////// /80 // 78 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 79 /////////////////////////////////////////////////////////////////////////////// 80 81 81 #include "G4WilsonAbrasionModel.hh" 82 82 #include "G4WilsonRadius.hh" … … 99 99 #include "G4IonTable.hh" 100 100 #include "globals.hh" 101 //////////////////////////////////////////////////////////////////////////////// 102 // 101 102 103 103 G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4bool useAblation1) 104 104 :G4HadronicInteraction("G4WilsonAbrasion") 105 105 { 106 // 107 // 108 // Send message to stdout to advise that the G4Abrasion model is being used. 109 // 106 // Send message to stdout to advise that the G4Abrasion model is being used. 110 107 PrintWelcomeMessage(); 111 // 112 // 113 // Set the default verbose level to 0 - no output. 114 // 108 109 // Set the default verbose level to 0 - no output. 115 110 verboseLevel = 0; 116 111 useAblation = useAblation1; 117 // 118 // 119 // No de-excitation handler has been supplied - define the default handler. 120 // 112 113 // No de-excitation handler has been supplied - define the default handler. 114 121 115 theExcitationHandler = new G4ExcitationHandler; 122 116 theExcitationHandlerx = new G4ExcitationHandler; … … 146 140 theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6); 147 141 } 148 // 149 // 150 // Set the minimum and maximum range for the model (despite nomanclature, this 151 // is in energy per nucleon number). 152 // 142 143 // Set the minimum and maximum range for the model (despite nomanclature, 144 // this is in energy per nucleon number). 145 153 146 SetMinEnergy(70.0*MeV); 154 147 SetMaxEnergy(10.1*GeV); 155 148 isBlocked = false; 156 // 157 // 158 // npK, when mutiplied by the nuclear Fermi momentum, determines the range of 159 // momentum over which the secondary nucleon momentum is sampled. 160 // 161 npK = 5.0;162 B = 10.0 * MeV;163 third = 1.0 / 3.0;164 fradius = 0.99;165 conserveEnergy = false;149 150 // npK, when mutiplied by the nuclear Fermi momentum, determines the range of 151 // momentum over which the secondary nucleon momentum is sampled. 152 153 r0sq = 0.0; 154 npK = 5.0; 155 B = 10.0 * MeV; 156 third = 1.0 / 3.0; 157 fradius = 0.99; 158 conserveEnergy = false; 166 159 conserveMomentum = true; 167 160 } 168 //////////////////////////////////////////////////////////////////////////////// 169 // 161 162 170 163 G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4ExcitationHandler *aExcitationHandler) 171 164 { -
trunk/source/processes/hadronic/models/binary_cascade/History
r1340 r1347 13 13 * Please list in reverse chronological order (last date on top) 14 14 --------------------------------------------------------------- 15 16 11 Nov 2010, G.Folger had-binary-V09-03-05 17 - fix compilation errors and warnings in G4BinaryCascade. 18 19 10 Nov 2010, G.Folger had-binary-V09-03-04 20 - *** lower CaptureThreshold in G4GeneratorPrecompoundInterface.cc 21 from 80 to 10 MeV. 22 - G4BinaryCascade: disable G4Exception in StepParticlesOut() introduced in 23 previous tag. Need to investigate why this happens first. 24 25 3 Nov 2010, G.Folger had-binary-V09-03-03 26 - Fix coverity warnings 27 - in Propagate(), mem leak for products 28 - in StepParticlesOut, check return code of GetSphereInter.... 29 - Scatter1H1(0 always check secs 15 30 16 31 8 Sep 2010, G.Folger had-binary-V09-03-02 … … 51 66 1. Shift of particle's formation times that the min. time=0. 52 67 53 2. Including of captured particles (Due to absend of the options there 54 were 55 a large energy-non-conservation). 68 2. Including of captured particles (Due to absence of the options there 69 were a large energy-non-conservation). 56 70 57 71 3. GetExcitationEnergy() - correction for the case when all nucleons are -
trunk/source/processes/hadronic/models/binary_cascade/include/G4BinaryCascade.hh
r1228 r1347 85 85 G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV) 86 86 { 87 G4cout<<"GetTotalCharge(std::vector<G4KineticTrack *> & aV)"<<G4endl; // Uzhi88 87 G4int result = 0; 89 88 std::vector<G4KineticTrack *>::iterator i; … … 91 90 { 92 91 result += G4lrint((*i)->GetDefinition()->GetPDGCharge()); 93 G4cout<<(*i)->GetDefinition()->GetParticleName()<<" "<<(*i)->GetDefinition()->GetPDGCharge()<<G4endl; // Uzhi 92 } 93 return result; 94 } 95 G4int GetTotalBaryonCharge(std::vector<G4KineticTrack *> & aV) 96 { 97 G4int result = 0; 98 std::vector<G4KineticTrack *>::iterator i; 99 for(i = aV.begin(); i != aV.end(); ++i) 100 { 101 if ( (*i)->GetDefinition()->GetBaryonNumber() != 0 ){ 102 result += G4lrint((*i)->GetDefinition()->GetPDGCharge()); 103 } 94 104 } 95 105 return result; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryCascade.cc
r1340 r1347 152 152 { 153 153 static G4int eventcounter=0; 154 155 // if ( eventcounter == 0 ) { 156 // SetEpReportLevel(3); // report non conservation with model etc. 157 // G4double relativeLevel = 1*perCent; 158 // G4double absoluteLevel = 2*MeV; 159 // SetEnergyMomentumCheckLevels(relativeLevel,absoluteLevel); 160 // } 161 154 162 //if(eventcounter == 100*(eventcounter/100) ) 155 163 eventcounter++; … … 278 286 G4cout << "G4BinaryCascade Propagate starting -------------------------------------------------------" <<G4endl; 279 287 #endif 288 289 // *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply.... 290 if(nucleus->GetMassNumber() == 1) // 1H1 is special case 291 { 292 #ifdef debug_BIC_Propagate 293 G4cout << " special case 1H1.... " << G4endl; 294 #endif 295 return Propagate1H1(secondaries,nucleus); 296 } 297 280 298 G4ReactionProductVector * products = new G4ReactionProductVector; 281 299 the3DNucleus = nucleus; … … 289 307 ClearAndDestroy(&theFinalState); 290 308 std::vector<G4KineticTrack *>::iterator iter; 291 292 // *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply....293 if(nucleus->GetMassNumber() == 1) // 1H1 is special case294 {295 #ifdef debug_BIC_Propagate296 G4cout << " special case 1H1.... " << G4endl;297 #endif298 return Propagate1H1(secondaries,nucleus);299 }300 309 301 310 BuildTargetList(); … … 1068 1077 PrintKTVector(&target_collection,std::string("... targets")); 1069 1078 //*GF* throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCasacde::ApplyCollision()"); 1070 #e lse1079 #endif 1071 1080 return false; 1072 #endif1073 1081 } 1074 1082 … … 1117 1125 G4KineticTrackVector * products=0; 1118 1126 products = collision->GetFinalState(); 1127 1128 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1; 1119 1129 1120 1130 #ifdef debug_BIC_ApplyCollision … … 1139 1149 PrintKTVector(&collision->GetTargetCollection(),std::string(" Target particles")); 1140 1150 } 1141 #endif1142 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;1143 1151 // if ( lateParticleCollision ) G4cout << " Added late particle--------------------------"<<G4endl; 1144 1152 // if ( lateParticleCollision && products ) PrintKTVector(products, " reaction products"); 1153 #endif 1145 1154 //**************************************** 1146 1155 … … 1561 1570 { 1562 1571 nsec++; 1563 G4double tStep(0), tdummy(0); 1564 ((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep); 1572 G4double tStep(0), tdummy(0); 1573 G4bool intersect = 1574 ((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep); 1565 1575 #ifdef debug_BIC_StepParticlesOut 1566 1576 G4cout << " minTimeStep, tStep Particle " <<minTimeStep << " " <<tStep 1567 1577 << " " <<kt->GetDefinition()->GetParticleName() 1568 1578 << " 4mom " << kt->GetTrackingMomentum()<<G4endl; 1569 #endif 1570 if(tStep<minTimeStep && tStep> 0 ) 1579 if ( ! intersect ); 1580 { 1581 PrintKTVector(&theSecondaryList, std::string(" state ERROR.....")); 1582 throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade::StepParticlesOut() particle not in nucleus"); 1583 } 1584 #endif 1585 if(intersect && tStep<minTimeStep && tStep> 0 ) 1571 1586 { 1572 1587 minTimeStep = tStep; … … 2462 2477 } 2463 2478 size_t current(0); 2464 for(current=0; current<secs->size(); current++)2479 for(current=0; secs && current<secs->size(); current++) 2465 2480 { 2466 2481 if((*secs)[current]->GetDefinition()->IsShortLived()) … … 2708 2723 G4KineticTrackVector * products) 2709 2724 { 2710 G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;2711 2725 2712 2726 G4KineticTrackVector debug1; … … 2716 2730 PrintKTVector(products,std::string(" Scatterer products")); 2717 2731 2732 #ifdef dontUse 2718 2733 G4double thisExcitation(0); 2719 2734 // excitation energy from this collision … … 2722 2737 G4KineticTrack * kt=collision->GetPrimary(); 2723 2738 initial += kt->Get4Momentum().e(); 2739 2740 G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator; 2724 2741 2725 2742 initial += RKprop->GetField(kt->GetDefinition()->GetPDGEncoding(),kt->GetPosition()); … … 2789 2806 << G4endl; 2790 2807 currentInitialEnergy-=final; 2791 2808 #endif 2792 2809 } 2793 2810 -
trunk/source/processes/hadronic/models/cascade/History
r1340 r1347 1 $Id: History,v 1.20 3 2010/10/22 20:41:05mkelsey Exp $1 $Id: History,v 1.206 2010/11/24 21:16:17 mkelsey Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 18 24 November 2010 Michael Kelsey (hadr-casc-V09-03-87) 19 ----------------------------------------------------- 20 - G4InuclCollider.cc: Delete local "zbullet" before exiting. Fixes memory 21 leak reported for 9.4 cand-01. 22 23 19 November 2010 Michael Kelsey (hadr-casc-V09-03-86) 24 ----------------------------------------------------- 25 - G4NucleiModel.cc: Put messages related to negative-path-length and 26 zero-interaction-partners behind verbosity flag. 27 28 29 October 2010 Michael Kelsey (hadr-casc-V09-03-85) 29 ---------------------------------------------------- 30 - G4NucleiModel: Bring tagged version kelsey-20101020 (refactoring) to HEAD 31 and tag for 9.4 release. This is the last substantive modification to be 32 included; validated by direct |diff|ing of output vs. V09-03-84 code. 17 33 18 34 22 October 2010 Michael Kelsey (hadr-casc-V09-03-84) -
trunk/source/processes/hadronic/models/cascade/cascade/include/G4Analyser.hh
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4Analyser.hh,v 1.10 2010/10/14 20:55:10 mkelsey Exp $ 25 // 26 // $Id: G4Analyser.hh,v 1.11 2010/12/15 07:39:28 gunter Exp $ 26 27 // 27 28 // 20101010 M. Kelsey -- Migrate to integer A and Z -
trunk/source/processes/hadronic/models/cascade/cascade/include/G4ExitonConfiguration.hh
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4ExitonConfiguration.hh,v 1.7 2010/09/24 06:26:06 mkelsey Exp $ 25 // 26 // $Id: G4ExitonConfiguration.hh,v 1.8 2010/12/15 07:39:50 gunter Exp $ 26 27 // 27 28 // 20100909 Add function to reset values to zero -
trunk/source/processes/hadronic/models/cascade/cascade/include/G4FissionStore.hh
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4FissionStore.hh,v 1.11 2010/10/19 21:33:58 mkelsey Exp $ 25 // 26 // $Id: G4FissionStore.hh,v 1.12 2010/12/15 07:39:52 gunter Exp $ 26 27 // 27 28 // 20100728 Move ::addConfig() to .cc file, add setVerboseLevel(), clear() -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKminusNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKminusNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKminusNChannel.cc,v 1.6 2010/12/15 07:40:17 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKminusPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKminusPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKminusPChannel.cc,v 1.6 2010/12/15 07:40:19 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKplusNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKplusNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKplusNChannel.cc,v 1.6 2010/12/15 07:40:21 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKplusPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKplusPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKplusPChannel.cc,v 1.6 2010/12/15 07:40:23 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKzeroBarPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKzeroBarPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKzeroBarPChannel.cc,v 1.6 2010/12/15 07:40:25 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKzeroNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKzeroNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKzeroNChannel.cc,v 1.6 2010/12/15 07:40:27 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeKzeroPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeKzeroPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeKzeroPChannel.cc,v 1.6 2010/12/15 07:40:29 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeLambdaNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeLambdaNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeLambdaNChannel.cc,v 1.6 2010/12/15 07:40:31 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeLambdaPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeLambdaPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeLambdaPChannel.cc,v 1.6 2010/12/15 07:40:33 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeSigmaMinusNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeSigmaMinusNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeSigmaMinusNChannel.cc,v 1.6 2010/12/15 07:40:37 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeSigmaMinusPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeSigmaMinusPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeSigmaMinusPChannel.cc,v 1.6 2010/12/15 07:40:39 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeSigmaPlusNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeSigmaPlusNChannel.cc,v 1.6 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeSigmaPlusNChannel.cc,v 1.7 2010/12/15 07:40:41 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeSigmaPlusPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeSigmaPlusPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeSigmaPlusPChannel.cc,v 1.6 2010/12/15 07:40:43 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeSigmaZeroNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeSigmaZeroNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeSigmaZeroNChannel.cc,v 1.6 2010/12/15 07:40:45 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeSigmaZeroPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeSigmaZeroPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeSigmaZeroPChannel.cc,v 1.6 2010/12/15 07:40:47 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeXiMinusNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeXiMinusNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeXiMinusNChannel.cc,v 1.6 2010/12/15 07:40:52 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeXiMinusPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeXiMinusPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeXiMinusPChannel.cc,v 1.6 2010/12/15 07:40:54 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeXiZeroNChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeXiZeroNChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeXiZeroNChannel.cc,v 1.6 2010/12/15 07:40:56 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadeXiZeroPChannel.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4CascadeXiZeroPChannel.cc,v 1.5 2010/08/04 05:28:24 mkelsey Exp $ 25 // 26 // $Id: G4CascadeXiZeroPChannel.cc,v 1.6 2010/12/15 07:40:59 gunter Exp $ 26 27 // 27 28 // 20100804 M. Kelsey -- Add name string to ctor -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4FissionStore.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4FissionStore.cc,v 1.16 2010/10/19 21:33:58 mkelsey Exp $ 25 // 26 // $Id: G4FissionStore.cc,v 1.17 2010/12/15 07:41:05 gunter Exp $ 26 27 // 27 28 // 20100728 Move ::addConfig() implementation to .cc file -
trunk/source/processes/hadronic/models/cascade/cascade/src/bindingEnergy.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: bindingEnergy.cc,v 1.10 2010/09/14 17:51:36 mkelsey Exp $ 25 // 26 // $Id: bindingEnergy.cc,v 1.11 2010/12/15 07:41:25 gunter Exp $ 26 27 // 27 28 // 20100622 M. Kelsey -- Replace all functionally with call-through to -
trunk/source/processes/hadronic/models/cascade/cascade/src/nucleiLevelDensity.cc
r1340 r1347 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: nucleiLevelDensity.cc,v 1.8 2010/09/14 17:51:36 mkelsey Exp $ 25 // 26 // $Id: nucleiLevelDensity.cc,v 1.9 2010/12/15 07:41:27 gunter Exp $ 26 27 // 27 28 // 20100914 M. Kelsey -- Migrate to integer A and Z; simplify code -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/History
r1340 r1347 18 18 19 19 <<<<<<< History (please, make changes only with Mikhail.Kossov@cern.ch approval) 20 21 21-Nov-2010 Dennis Wright (hadr-chips-V09-03-09) 22 ---------------------------------------------------------------------- 23 Overall CHIPS tag which includes integer Z and A conversion and some 24 correction of CoVerity errors 20 25 21 26 25-Jun-2010 M.Kosov (hadr-chips-V09-03-08) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/History
r1340 r1347 17 17 ----------------------------------------------------------------- 18 18 19 23-Jun-2010 M.Kosov (hadr-chips-body-V09-03-13) 19 11 Nov 2010 Dennis Wright (hadr-chips-body-V09-03-15) 20 ----------------------------------------------------------------------- 21 - G4QContent.cc : fix bug 1131 by removing dead code in quark ctor 22 and remove dead code indicated by CoVerity in method MakePartonPair. 23 Remove dead code due to efFlag being set permanently false. 24 - G4QNucleus.cc - remove dead code 25 - G4QEnvironment.cc - remove dead code 26 27 10 Nov 2010 Dennis Wright (hadr-chips-body-V09-03-14) 28 ----------------------------------------------------------------------- 29 Bring up to geant4-09-03-ref-09 and tag 30 31 23-Jun-2010 M.Kosov (hadr-chips-body-V09-03-13) 20 32 ----------------------------------------------------------------------- 21 33 Using HARP data a big bug is fixed, which influences CHIPS physics -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/fragmentation/History
r1337 r1347 4 4 ========================================================== 5 5 6 History file for hadronic/models/chiral_inv_phase_space/fragmentation directory. 6 History file for hadronic/models/chiral_inv_phase_space/fragmentation 7 directory. 7 8 8 9 Summarize all code modifications & keep track of all tags in this file. … … 13 14 ----------------------------------------------------------------- 14 15 16 10 Nov 2010 Dennis Wright (hadr-chips-frag-V09-03-07) 17 ----------------------------------------------------------------------- 18 Previous tag was already used - retag 19 20 10 Nov 2010 Dennis Wright (hadr-chips-V09-03-07) 21 ----------------------------------------------------------------------- 22 Bring up to geant4-09-03-ref-09 and tag 23 15 24 19-Jun-2010 M.Kosov (hadr-chips-V09-03-06) 16 ---------------------------------------------------------------------- -25 ---------------------------------------------------------------------- 17 26 Mutual CHIPS tag for the G4-9-4-beta debugging 18 27 19 11-Jun-2010 M.Kosov (hadr-chips-frag-V09-03-05)20 ----------------------------------------------------------------------- ---28 11-Jun-2010 M.Kosov (hadr-chips-frag-V09-03-05) 29 ----------------------------------------------------------------------- 21 30 Trap and cure for the bug: return to vacuum what appeared from vacuum 22 31 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/History
r1340 r1347 12 12 * Please list in reverse chronological order (last date on top) 13 13 --------------------------------------------------------------- 14 15 18-Nov-2010 J.Apostolakis (hadr-chips-inter-V09-03-03) 16 --------------------------------------------------------------------------- 17 - G4ChiralInvariantPhaseSpace.cc: Change to use integer value of Z and A. 18 19 10-Nov-2010 V.Ivanchenko (hadr-chips-inter-V09-03-02) 20 --------------------------------------------------------------------------- 21 - G4ElectroNuclearReaction - cross section classes are included by pointer 22 and not by value, this should not change any result but providing 23 clear siquence of removel of cross sections after execution 24 (fixed old problem reported in HyperNews) 14 25 15 26 13-Sep-2010 A. Dotti (hadr-chips-inter-V09-03-01) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc
r1340 r1347 72 72 73 73 //target properties needed in constructor of quasmon 74 G4int targetZ = G4int(aTargetNucleus.GetZ()+0.5);75 G4int targetA = G4int(aTargetNucleus.GetN()+0.5);74 G4int targetZ = aTargetNucleus.GetZ_asInt(); 75 G4int targetA = aTargetNucleus.GetA_asInt(); 76 76 G4int targetPDGCode = 90000000 + 1000*targetZ + (targetA-targetZ); 77 77 // NOT NECESSARY ______________ -
trunk/source/processes/hadronic/models/coherent_elastic/History
r1340 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 19 November 2010 - V.Ivanchenko (hadr-cohe-V09-03-07) 18 ------------------------------------------------------ 19 - G4WHadronElasticProcess, G4VHadronElastic, G4HadronElastic, 20 G4ChargeExchange - fixed bug introduced in the previous tag - 21 use now GetA_asInt() method instead of GetN_asInt() 22 23 18 November 2010 - V.Ivanchenko (hadr-cohe-V09-03-06) 24 ------------------------------------------------------ 25 - G4NuclNuclDiffuseElastic - new model 26 - Use integer Z and A in other classes 16 27 17 28 28 September 2010 - G.Cosmo (hadr-cohe-V09-03-05) -
trunk/source/processes/hadronic/models/de_excitation/History
r1340 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 23 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-27) 18 ---------------------------------------------------------- 19 - G4Evaporation, G4EvaporationChannel, G4EvaporationProbability - 20 improved computation of minimal and maximal evaporation energy 21 - G4E1Probability, G4PhotonEvaporation - fixed probability 22 23 19 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-26) 24 ---------------------------------------------------------- 25 - G4ParaFissionModel - use GetA_asInt() 26 27 18 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-25) 28 ---------------------------------------------------------- 29 G4GEMChannel - cleanup: integer Z,A; G4Pow; use the same formulas as in 30 G4GEMProbability class 31 32 17 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-24) 33 ---------------------------------------------------------- 34 - photon_evaporation, fission - integer Z and A, constructors 35 moved to src, usage of G4Pow, general cleanup 36 - G4ContiniumGammaTransition - use exponential law for sampling of 37 decay time 38 - removed unused classes: G4DummyProbability, G4E1ProbabilityXXX, 39 G4E1SingleProbabilityXXX, where XXX=001,01,1,10,100 - these classes 40 are the same as the one really used but a scale factor for the 41 probability is different, scale factor may be applied in the main 42 class if needed 43 44 17 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-23) 45 ---------------------------------------------------------- 46 - utils, management, evaporation - integer Z and A, constructors 47 moved to src, usage of G4Pow, general cleanup 48 - G4EvaporationChannel - removed new and delete of probability objects 49 at each to the class, use instead local G4EvaporationProbability 50 of the channel 51 52 29 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-22) 53 ---------------------------------------------------------- 54 - Fixed problems reported by the Coveruty tool (mainly pedantic 55 initialisation); moved constructors and destructors to source 56 57 12 October 2010 Dennis Wright (hadr-deex-V09-03-21) 58 --------------------------------------------------- 59 - add Luciano Pandola's README file explaining the photo-evaporation 60 data files 16 61 17 62 11 October 2010 Vladimir Ivanchenko (hadr-deex-V09-03-20) -
trunk/source/processes/hadronic/models/de_excitation/ablation/src/G4WilsonAblationModel.cc
r1228 r1347 150 150 OPTxs = 3; 151 151 useSICB = false; 152 fragmentVector = 0; 152 153 } 153 154 //////////////////////////////////////////////////////////////////////////////// -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4AlphaEvaporationChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4AlphaEvaporationChannel.hh,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4AlphaEvaporationChannel.hh,v 1.9 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #ifndef G4AlphaEvaporationChannel_h … … 43 44 public: 44 45 // only available constructor 45 G4AlphaEvaporationChannel() : G4EvaporationChannel(4,2,"alpha", 46 &theEvaporationProbability,&theCoulombBarrier) {}; 46 G4AlphaEvaporationChannel(); 47 47 48 48 // destructor 49 ~G4AlphaEvaporationChannel() {};49 virtual ~G4AlphaEvaporationChannel(); 50 50 51 51 private: … … 54 54 G4AlphaEvaporationChannel(const G4AlphaEvaporationChannel & right); 55 55 56 57 public:58 56 G4bool operator==(const G4AlphaEvaporationChannel & right) const; 59 57 G4bool operator!=(const G4AlphaEvaporationChannel & right) const; 60 61 private:62 58 63 59 G4AlphaCoulombBarrier theCoulombBarrier; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4AlphaEvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4AlphaEvaporationProbability.hh,v 1.14 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 33 // 34 // Modified: 35 // 17-11-2010 V.Ivanchenko integer Z and A 30 36 // 31 37 #ifndef G4AlphaEvaporationProbability_h … … 42 48 G4AlphaEvaporationProbability(); 43 49 44 ~G4AlphaEvaporationProbability() {} 50 virtual ~G4AlphaEvaporationProbability(); 51 45 52 private: 46 53 // Copy constructor … … 51 58 G4bool operator!=(const G4AlphaEvaporationProbability &right) const; 52 59 53 54 60 private: 55 61 56 virtual G4double CrossSection(const G4Fragment & fragment, constG4double K);62 virtual G4double CrossSection(const G4Fragment & fragment, G4double K); 57 63 58 G4double GetOpt0(const G4double K); 59 G4double GetOpt12(const G4double K); 60 G4double GetOpt34(const G4double K); 64 G4double GetOpt0(G4double K); 65 G4double GetOpt12(G4double K); 66 G4double GetOpt34(G4double K); 67 68 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 69 70 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 71 72 G4double CCoeficient(G4int aZ) ; 73 74 //data members 75 76 G4AlphaCoulombBarrier theCoulombBarrier; 61 77 62 63 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 64 65 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 66 67 G4double CCoeficient(const G4double aZ) ; 68 69 //data members 70 71 G4AlphaCoulombBarrier theCoulombBarrier; 72 73 G4double ResidualA; 74 G4double ResidualZ; 75 G4double theA; 76 G4double theZ; 77 G4double ResidualAthrd; 78 G4double FragmentA; 79 G4double FragmentAthrd; 80 78 G4int ResidualA; 79 G4int ResidualZ; 80 G4int theA; 81 G4int theZ; 82 G4double ResidualAthrd; 83 G4int FragmentA; 84 G4double FragmentAthrd; 81 85 82 86 }; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4DeuteronEvaporationChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4DeuteronEvaporationChannel.hh,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4DeuteronEvaporationChannel.hh,v 1.9 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #ifndef G4DeuteronEvaporationChannel_h … … 43 44 public: 44 45 // only available constructor 45 G4DeuteronEvaporationChannel() : G4EvaporationChannel(2,1,"deuteron", 46 &theEvaporationProbability,&theCoulombBarrier) {}; 46 G4DeuteronEvaporationChannel(); 47 47 48 48 // destructor 49 ~G4DeuteronEvaporationChannel() {};49 virtual ~G4DeuteronEvaporationChannel(); 50 50 51 51 private: … … 54 54 G4DeuteronEvaporationChannel(const G4DeuteronEvaporationChannel & right); 55 55 56 public:57 56 G4bool operator==(const G4DeuteronEvaporationChannel & right) const; 58 57 G4bool operator!=(const G4DeuteronEvaporationChannel & right) const; 59 60 private:61 58 62 59 G4DeuteronCoulombBarrier theCoulombBarrier; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4DeuteronEvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4DeuteronEvaporationProbability.hh,v 1.14 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 33 // 34 // Modified: 35 // 17-11-2010 V.Ivanchenko integer Z and A 30 36 // 31 37 … … 43 49 G4DeuteronEvaporationProbability(); 44 50 45 ~G4DeuteronEvaporationProbability() {} 51 virtual ~G4DeuteronEvaporationProbability(); 52 46 53 private: 47 54 // Copy constructor … … 55 62 private: 56 63 57 virtual G4double CrossSection(const G4Fragment & fragment, constG4double K);64 virtual G4double CrossSection(const G4Fragment & fragment, G4double K); 58 65 59 G4double GetOpt0( constG4double K);60 G4double GetOpt12( constG4double K);61 G4double GetOpt34( constG4double K);66 G4double GetOpt0(G4double K); 67 G4double GetOpt12(G4double K); 68 G4double GetOpt34(G4double K); 62 69 70 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 71 72 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 73 74 G4double CCoeficient(G4int aZ) ; 63 75 64 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 65 66 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 67 68 G4double CCoeficient(const G4double aZ) ; 69 70 //data members 76 //data members 71 77 72 G4DeuteronCoulombBarrier theCoulombBarrier;78 G4DeuteronCoulombBarrier theCoulombBarrier; 73 79 74 G4double ResidualA; 75 G4double ResidualZ; 76 G4double theA; 77 G4double theZ; 78 G4double ResidualAthrd; 79 G4double FragmentA; 80 G4double FragmentAthrd; 81 82 80 G4int ResidualA; 81 G4int ResidualZ; 82 G4int theA; 83 G4int theZ; 84 G4double ResidualAthrd; 85 G4int FragmentA; 86 G4double FragmentAthrd; 83 87 }; 84 88 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4Evaporation.hh
r1340 r1347 26 26 // 27 27 // $Id: G4Evaporation.hh,v 1.12 2010/05/11 11:34:09 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4EvaporationChannel.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EvaporationChannel.hh,v 1.11 2010/11/17 12:19:08 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // 26 30 //J.M. Quesada (August2008). Based on: 27 31 // … … 29 33 // by V. Lara (Oct 1998) 30 34 // 31 35 // 17-11-2010 V.Ivanchenko in constructor replace G4VEmissionProbability by 36 // G4EvaporationProbability and do not new and delete probability 37 // object at each call; use G4Pow 32 38 33 39 #ifndef G4EvaporationChannel_h … … 35 41 36 42 #include "G4VEvaporationChannel.hh" 37 #include "G4VEmissionProbability.hh"38 43 #include "G4EvaporationProbability.hh" 39 #include "G4NeutronEvaporationProbability.hh"40 #include "G4ProtonEvaporationProbability.hh"41 #include "G4DeuteronEvaporationProbability.hh"42 #include "G4TritonEvaporationProbability.hh"43 #include "G4He3EvaporationProbability.hh"44 #include "G4AlphaEvaporationProbability.hh"45 #include "G4VLevelDensityParameter.hh"46 44 #include "G4VCoulombBarrier.hh" 47 #include "G4EvaporationLevelDensityParameter.hh"48 #include "G4NucleiProperties.hh"49 #include "Randomize.hh"50 #include "G4ParticleTable.hh"51 #include "G4IonTable.hh"52 45 46 class G4EvaporationLevelDensityParameter; 53 47 54 48 class G4EvaporationChannel : public G4VEvaporationChannel … … 56 50 public: 57 51 // constructor 58 59 60 G4EvaporationChannel(const G4int theA, const G4int theZ, const G4String & aName, 61 G4VEmissionProbability * aEmissionStrategy, 52 G4EvaporationChannel(G4int theA, G4int theZ, const G4String & aName, 53 G4EvaporationProbability * aEmissionStrategy, 62 54 G4VCoulombBarrier * aCoulombBarrier); 63 55 public: 64 56 // destructor 65 ~G4EvaporationChannel();57 virtual ~G4EvaporationChannel(); 66 58 67 void SetEmissionStrategy(G4VEmissionProbability * aEmissionStrategy)59 inline void SetEmissionStrategy(G4EvaporationProbability * aEmissionStrategy) 68 60 {theEvaporationProbabilityPtr = aEmissionStrategy;} 69 61 70 void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier)62 inline void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier) 71 63 {theCoulombBarrierPtr = aCoulombBarrier;} 72 73 74 64 75 65 protected: 76 66 // default constructor 77 G4EvaporationChannel() {};67 G4EvaporationChannel(); 78 68 79 69 private: … … 93 83 G4FragmentVector * BreakUp(const G4Fragment & theNucleus); 94 84 95 // void SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity);96 97 85 public: 98 99 86 100 87 inline G4double GetEmissionProbability(void) const 101 88 {return EmissionProbability;} 102 103 89 104 90 inline G4double GetMaximalKineticEnergy(void) const 105 91 { return MaximalKineticEnergy; } … … 108 94 109 95 // Calculate Binding Energy for separate fragment from nucleus 110 G4double CalcBindingEnergy( const G4int anA, constG4int aZ);96 G4double CalcBindingEnergy(G4int anA, G4int aZ); 111 97 112 98 // Calculate maximal kinetic energy that can be carried by fragment (in MeV) 113 G4double CalcMaximalKineticEnergy( constG4double U);99 G4double CalcMaximalKineticEnergy(G4double U); 114 100 115 101 // Samples fragment kinetic energy. 116 G4double GetKineticEnergy(const G4Fragment & aFragment);102 G4double GetKineticEnergy(const G4Fragment & aFragment); 117 103 118 104 // This has to be removed and put in Random Generator 119 G4ThreeVector IsotropicVector( constG4double Magnitude = 1.0);105 G4ThreeVector IsotropicVector(G4double Magnitude = 1.0); 120 106 121 107 // Data Members … … 132 118 G4int theZ; 133 119 120 G4double EvaporatedMass; 121 G4double ResidualMass; 134 122 135 123 // For evaporation probability calcualation 136 G4 VEmissionProbability * theEvaporationProbabilityPtr;124 G4EvaporationProbability * theEvaporationProbabilityPtr; 137 125 138 126 // For Level Density calculation 139 // G4bool MyOwnLevelDensity;127 // G4bool MyOwnLevelDensity; 140 128 G4VLevelDensityParameter * theLevelDensityPtr; 141 142 129 143 130 // For Coulomb Barrier calculation 144 131 G4VCoulombBarrier * theCoulombBarrierPtr; 145 132 G4double CoulombBarrier; 146 147 133 148 134 //--------------------------------------------------- 149 135 … … 161 147 G4double EmissionProbability; 162 148 163 164 149 // Maximal Kinetic Energy that can be carried by fragment 165 150 G4double MaximalKineticEnergy; 166 167 151 168 152 }; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4EvaporationDefaultGEMFactory.hh
r1340 r1347 26 26 // 27 27 // $Id: G4EvaporationDefaultGEMFactory.hh,v 1.1 2009/07/27 10:20:13 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4EvaporationFactory.hh
r1340 r1347 26 26 // 27 27 // $Id: G4EvaporationFactory.hh,v 1.4 2010/04/27 11:43:16 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4EvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EvaporationProbability.hh,v 1.13 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 26 29 //J.M. Quesada (August2008). Based on: 27 30 // … … 44 47 public: 45 48 // Only available constructor 46 G4EvaporationProbability(const G4int anA, const G4int aZ, const G4double aGamma,G4VCoulombBarrier * aCoulombBarrier) : 47 theA(anA), 48 theZ(aZ), 49 Gamma(aGamma) 50 , theCoulombBarrierptr(aCoulombBarrier) 51 { 52 theEvapLDPptr = new G4EvaporationLevelDensityParameter; 49 G4EvaporationProbability(G4int anA, G4int aZ, G4double aGamma, 50 G4VCoulombBarrier * aCoulombBarrier); 53 51 54 55 } 52 virtual ~G4EvaporationProbability(); 56 53 57 ~G4EvaporationProbability() 58 { 59 if (theEvapLDPptr != 0) delete theEvapLDPptr; 60 61 } 62 63 54 inline G4int GetZ(void) const { return theZ; } 64 55 65 G4double GetZ(void) const { return theZ; } 66 67 G4double GetA(void) const { return theA;} 56 inline G4int GetA(void) const { return theA;} 68 57 69 58 protected: 70 59 71 60 // Default constructor 72 G4EvaporationProbability() {}61 G4EvaporationProbability(); 73 62 74 63 private: … … 82 71 public: 83 72 84 G4double ProbabilityDistributionFunction( const G4Fragment & aFragment, constG4double K);73 G4double ProbabilityDistributionFunction( const G4Fragment & aFragment, G4double K); 85 74 86 G4double EmissionProbability(const G4Fragment & fragment, constG4double anEnergy);75 G4double EmissionProbability(const G4Fragment & fragment, G4double anEnergy); 87 76 88 77 private: 89 78 90 G4double CalculateProbability(const G4Fragment & fragment, constG4double MaximalKineticEnergy );79 G4double CalculateProbability(const G4Fragment & fragment, G4double MaximalKineticEnergy ); 91 80 92 G4double IntegrateEmissionProbability(const G4Fragment & aFragment, const G4double & Low, const G4double & Up ); 81 G4double IntegrateEmissionProbability(const G4Fragment & aFragment, 82 const G4double & Low, const G4double & Up ); 93 83 94 84 protected: 95 85 96 virtual G4double CrossSection( const G4Fragment & fragment, constG4double K )= 0;86 virtual G4double CrossSection( const G4Fragment & fragment, G4double K )= 0; 97 87 98 88 virtual G4double CalcAlphaParam(const G4Fragment & fragment)=0 ; … … 102 92 private: 103 93 104 // Data Members 105 106 G4VLevelDensityParameter * theEvapLDPptr; 107 94 // Data Members 108 95 G4int theA; 109 96 G4int theZ; … … 113 100 G4double Gamma; 114 101 115 //The Coulomb Barrier 116 G4VCoulombBarrier * theCoulombBarrierptr; 117 102 //The Coulomb Barrier 103 G4VCoulombBarrier * theCoulombBarrierptr; 118 104 119 105 }; 120 106 121 122 123 124 107 #endif -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4He3EvaporationChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4He3EvaporationChannel.hh,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4He3EvaporationChannel.hh,v 1.9 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #ifndef G4He3EvaporationChannel_h … … 43 44 public: 44 45 // only available constructor 45 G4He3EvaporationChannel() : G4EvaporationChannel(3,2,"He3", 46 &theEvaporationProbability,&theCoulombBarrier) {}; 46 G4He3EvaporationChannel(); 47 47 48 48 // destructor 49 ~G4He3EvaporationChannel() {};49 virtual ~G4He3EvaporationChannel(); 50 50 51 51 private: 52 52 53 const G4He3EvaporationChannel & operator=(const G4He3EvaporationChannel & right); 53 54 54 55 G4He3EvaporationChannel(const G4He3EvaporationChannel & right); 55 56 56 public:57 57 G4bool operator==(const G4He3EvaporationChannel & right) const; 58 58 G4bool operator!=(const G4He3EvaporationChannel & right) const; 59 59 60 private: 61 62 G4He3CoulombBarrier theCoulombBarrier; 60 G4He3CoulombBarrier theCoulombBarrier; 63 61 64 62 G4He3EvaporationProbability theEvaporationProbability; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4He3EvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4He3EvaporationProbability.hh,v 1.14 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 33 // 34 // Modified: 35 // 17-11-2010 V.Ivanchenko integer Z and A 30 36 // 31 37 #ifndef G4He3EvaporationProbability_h … … 42 48 G4He3EvaporationProbability(); 43 49 44 ~G4He3EvaporationProbability() {} 50 virtual ~G4He3EvaporationProbability(); 51 45 52 private: 46 53 // Copy constructor … … 51 58 G4bool operator!=(const G4He3EvaporationProbability &right) const; 52 59 53 54 60 private: 55 61 56 virtual G4double CrossSection(const G4Fragment & fragment, constG4double K);62 virtual G4double CrossSection(const G4Fragment & fragment, G4double K); 57 63 58 G4double GetOpt0( constG4double K);59 G4double GetOpt12( constG4double K);60 G4double GetOpt34( constG4double K);64 G4double GetOpt0(G4double K); 65 G4double GetOpt12(G4double K); 66 G4double GetOpt34(G4double K); 61 67 68 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 69 70 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 71 72 G4double CCoeficient(G4int aZ) ; 62 73 63 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 64 65 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 66 67 G4double CCoeficient(const G4double aZ) ; 68 69 //data members 74 //data members 70 75 71 G4He3CoulombBarrier theCoulombBarrier;76 G4He3CoulombBarrier theCoulombBarrier; 72 77 73 G4double ResidualA; 74 G4double ResidualZ; 75 G4double theA; 76 G4double theZ; 77 G4double ResidualAthrd; 78 G4double FragmentA; 79 G4double FragmentAthrd; 80 81 78 G4int ResidualA; 79 G4int ResidualZ; 80 G4int theA; 81 G4int theZ; 82 G4double ResidualAthrd; 83 G4int FragmentA; 84 G4double FragmentAthrd; 82 85 }; 83 86 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4NeutronEvaporationChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4NeutronEvaporationChannel.hh,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4NeutronEvaporationChannel.hh,v 1.9 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #ifndef G4NeutronEvaporationChannel_h … … 43 44 public: 44 45 // only available constructor 45 G4NeutronEvaporationChannel() : G4EvaporationChannel(1,0,"neutron", 46 &theEvaporationProbability,&theCoulombBarrier) {}; 46 G4NeutronEvaporationChannel(); 47 47 48 48 // destructor 49 ~G4NeutronEvaporationChannel() {};49 virtual ~G4NeutronEvaporationChannel(); 50 50 51 51 private: 52 52 53 const G4NeutronEvaporationChannel & operator=(const G4NeutronEvaporationChannel & right); 53 54 54 55 G4NeutronEvaporationChannel(const G4NeutronEvaporationChannel & right); 55 56 56 public:57 57 G4bool operator==(const G4NeutronEvaporationChannel & right) const; 58 58 G4bool operator!=(const G4NeutronEvaporationChannel & right) const; 59 59 60 private: 61 62 G4NeutronCoulombBarrier theCoulombBarrier; 60 G4NeutronCoulombBarrier theCoulombBarrier; 63 61 64 62 G4NeutronEvaporationProbability theEvaporationProbability; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4NeutronEvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4NeutronEvaporationProbability.hh,v 1.15 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 33 // 34 // Modified: 35 // 17-11-2010 V.Ivanchenko integer Z and A 30 36 // 31 37 … … 43 49 G4NeutronEvaporationProbability(); 44 50 45 ~G4NeutronEvaporationProbability() {} 51 virtual ~G4NeutronEvaporationProbability(); 52 46 53 private: 47 54 … … 54 61 private: 55 62 56 virtual G4double CrossSection(const G4Fragment & fragment, constG4double K);63 virtual G4double CrossSection(const G4Fragment & fragment, G4double K); 57 64 58 G4double GetOpt12( constG4double K);59 G4double GetOpt34( constG4double K);65 G4double GetOpt12(G4double K); 66 G4double GetOpt34(G4double K); 60 67 61 virtual G4double CalcAlphaParam(const G4Fragment & fragment);68 virtual G4double CalcAlphaParam(const G4Fragment & fragment); 62 69 63 virtual G4double CalcBetaParam(const G4Fragment & fragment);70 virtual G4double CalcBetaParam(const G4Fragment & fragment); 64 71 65 66 //data members 72 //data members 67 73 68 G4NeutronCoulombBarrier theCoulombBarrier;74 G4NeutronCoulombBarrier theCoulombBarrier; 69 75 70 G4double ResidualA; 71 G4double ResidualZ; 72 G4double theA; 73 G4double theZ; 74 G4double ResidualAthrd; 75 G4double FragmentA; 76 G4double FragmentAthrd; 77 78 79 80 76 G4int ResidualA; 77 G4int ResidualZ; 78 G4int theA; 79 G4int theZ; 80 G4double ResidualAthrd; 81 G4int FragmentA; 82 G4double FragmentAthrd; 81 83 }; 82 84 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4ProtonEvaporationChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4ProtonEvaporationChannel.hh,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4ProtonEvaporationChannel.hh,v 1.9 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #ifndef G4ProtonEvaporationChannel_h … … 43 44 public: 44 45 // only available constructor 45 G4ProtonEvaporationChannel() : G4EvaporationChannel(1,1,"proton", 46 &theEvaporationProbability,&theCoulombBarrier) {}; 46 G4ProtonEvaporationChannel(); 47 47 48 48 // destructor 49 ~G4ProtonEvaporationChannel() {};49 virtual ~G4ProtonEvaporationChannel(); 50 50 51 51 private: 52 52 53 const G4ProtonEvaporationChannel & operator=(const G4ProtonEvaporationChannel & right); 53 54 54 55 G4ProtonEvaporationChannel(const G4ProtonEvaporationChannel & right); 55 56 56 public:57 57 G4bool operator==(const G4ProtonEvaporationChannel & right) const; 58 58 G4bool operator!=(const G4ProtonEvaporationChannel & right) const; 59 59 60 61 private: 62 63 G4ProtonCoulombBarrier theCoulombBarrier; 60 G4ProtonCoulombBarrier theCoulombBarrier; 64 61 65 62 G4ProtonEvaporationProbability theEvaporationProbability; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4ProtonEvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4ProtonEvaporationProbability.hh,v 1.14 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 33 // 34 // Modified: 35 // 17-11-2010 V.Ivanchenko integer Z and A 30 36 // 31 37 … … 43 49 G4ProtonEvaporationProbability(); 44 50 45 ~G4ProtonEvaporationProbability() {} 51 virtual ~G4ProtonEvaporationProbability(); 52 46 53 private: 47 54 // Copy constructor … … 52 59 G4bool operator!=(const G4ProtonEvaporationProbability &right) const; 53 60 54 55 61 private: 56 62 57 virtual G4double CrossSection(const G4Fragment & fragment, constG4double K);63 virtual G4double CrossSection(const G4Fragment & fragment, G4double K); 58 64 59 G4double GetOpt0( constG4double K);60 G4double GetOpt1( constG4double K);61 G4double GetOpt2( constG4double K);62 G4double GetOpt3( constG4double K);65 G4double GetOpt0(G4double K); 66 G4double GetOpt1(G4double K); 67 G4double GetOpt2(G4double K); 68 G4double GetOpt3(G4double K); 63 69 70 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 71 72 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 73 74 G4double CCoeficient(G4int aZ) ; 64 75 65 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 66 67 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 68 69 G4double CCoeficient(const G4double aZ) ; 70 71 //data members 76 //data members 72 77 73 G4ProtonCoulombBarrier theCoulombBarrier;78 G4ProtonCoulombBarrier theCoulombBarrier; 74 79 75 G4double ResidualA; 76 G4double ResidualZ; 77 G4double theA; 78 G4double theZ; 79 G4double ResidualAthrd; 80 G4double FragmentA; 81 G4double FragmentAthrd; 82 G4double U; 83 84 85 80 G4int ResidualA; 81 G4int ResidualZ; 82 G4int theA; 83 G4int theZ; 84 G4double ResidualAthrd; 85 G4int FragmentA; 86 G4double FragmentAthrd; 87 G4double U; 86 88 87 89 }; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4TritonEvaporationChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4TritonEvaporationChannel.hh,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4TritonEvaporationChannel.hh,v 1.9 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #ifndef G4TritonEvaporationChannel_h … … 43 44 public: 44 45 // only available constructor 45 G4TritonEvaporationChannel() : G4EvaporationChannel(3,1,"triton", 46 &theEvaporationProbability,&theCoulombBarrier) {}; 46 G4TritonEvaporationChannel(); 47 47 48 48 // destructor 49 ~G4TritonEvaporationChannel() {};49 virtual ~G4TritonEvaporationChannel(); 50 50 51 51 private: … … 54 54 G4TritonEvaporationChannel(const G4TritonEvaporationChannel & right); 55 55 56 public:57 56 G4bool operator==(const G4TritonEvaporationChannel & right) const; 58 57 G4bool operator!=(const G4TritonEvaporationChannel & right) const; 59 60 private:61 58 62 59 G4TritonCoulombBarrier theCoulombBarrier; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4TritonEvaporationProbability.hh
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4TritonEvaporationProbability.hh,v 1.14 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 34 // Modified: 35 // 17-11-2010 V.Ivanchenko integer Z and A 36 37 31 38 #ifndef G4TritonEvaporationProbability_h 32 39 #define G4TritonEvaporationProbability_h 1 … … 42 49 G4TritonEvaporationProbability(); 43 50 44 ~G4TritonEvaporationProbability() {} 51 virtual ~G4TritonEvaporationProbability(); 52 45 53 private: 46 54 // Copy constructor … … 54 62 private: 55 63 56 virtual G4double CrossSection(const G4Fragment & fragment, constG4double K);64 virtual G4double CrossSection(const G4Fragment & fragment, G4double K); 57 65 58 G4double GetOpt0( constG4double K);59 G4double GetOpt12( constG4double K);60 G4double GetOpt34( constG4double K);66 G4double GetOpt0(G4double K); 67 G4double GetOpt12(G4double K); 68 G4double GetOpt34(G4double K); 61 69 62 70 63 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ;71 virtual G4double CalcAlphaParam(const G4Fragment & fragment) ; 64 72 65 virtual G4double CalcBetaParam(const G4Fragment & fragment) ;73 virtual G4double CalcBetaParam(const G4Fragment & fragment) ; 66 74 67 G4double CCoeficient( const G4doubleaZ) ;75 G4double CCoeficient(G4int aZ) ; 68 76 69 //data members 77 //data members 78 79 G4TritonCoulombBarrier theCoulombBarrier; 70 80 71 72 G4TritonCoulombBarrier theCoulombBarrier; 73 74 G4double ResidualA; 75 G4double ResidualZ; 76 G4double theA; 77 G4double theZ; 78 G4double ResidualAthrd; 79 G4double FragmentA; 80 G4double FragmentAthrd; 81 81 G4int ResidualA; 82 G4int ResidualZ; 83 G4int theA; 84 G4int theZ; 85 G4double ResidualAthrd; 86 G4int FragmentA; 87 G4double FragmentAthrd; 82 88 83 89 }; 84 90 85 86 91 #endif 87 92 88 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4UnstableFragmentBreakUp.hh
r1340 r1347 25 25 // 26 26 // $Id: G4UnstableFragmentBreakUp.hh,v 1.2 2010/05/11 11:26:15 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/de_excitation/evaporation/include/G4VEvaporation.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4VEvaporation.hh,v 1.6 2010/04/27 14:00:40 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4VEvaporation.hh,v 1.8 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 66 65 // for superimposed Coulomb Barrier for inverse cross sections 67 66 inline void UseSICB(G4bool use) { useSICB = use; } 67 68 68 protected: 69 G4int OPTxs;70 G4bool useSICB;69 G4int OPTxs; 70 G4bool useSICB; 71 71 72 72 }; -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4AlphaEvaporationChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4AlphaEvaporationChannel.cc,v 1. 4 2006/06/29 20:10:17 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4AlphaEvaporationChannel.cc,v 1.5 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #include "G4AlphaEvaporationChannel.hh" 35 36 37 G4AlphaEvaporationChannel::G4AlphaEvaporationChannel() 38 : G4EvaporationChannel(4,2,"alpha",&theEvaporationProbability,&theCoulombBarrier) 39 {} 36 40 37 const G4AlphaEvaporationChannel & G4AlphaEvaporationChannel::operator=(const G4AlphaEvaporationChannel & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaEvaporationChannel::operator= meant to not be accessable"); 40 return *this; 41 } 41 G4AlphaEvaporationChannel::~G4AlphaEvaporationChannel() 42 {} 42 43 43 G4AlphaEvaporationChannel::G4AlphaEvaporationChannel(const G4AlphaEvaporationChannel & ) : G4EvaporationChannel()44 {45 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaEvaporationChannel::CopyConstructor meant to not be accessable");46 }47 48 G4bool G4AlphaEvaporationChannel::operator==(const G4AlphaEvaporationChannel &right ) const49 {50 return (this == (G4AlphaEvaporationChannel *) &right);51 // return false;52 }53 54 G4bool G4AlphaEvaporationChannel::operator!=(const G4AlphaEvaporationChannel &right ) const55 {56 return (this != (G4AlphaEvaporationChannel *) &right);57 // return true;58 }59 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc
r1315 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4AlphaEvaporationProbability.cc,v 1.18 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 31 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // cross section option 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 17-11-2010 V.Ivanchenko integer Z and A 33 37 34 38 #include "G4AlphaEvaporationProbability.hh" … … 36 40 G4AlphaEvaporationProbability::G4AlphaEvaporationProbability() : 37 41 G4EvaporationProbability(4,2,1,&theCoulombBarrier) // A,Z,Gamma,&theCoumlombBarrier 38 { 42 {} 43 44 G4AlphaEvaporationProbability::~G4AlphaEvaporationProbability() 45 {} 46 47 G4double G4AlphaEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 48 { return 1.0 + CCoeficient(fragment.GetZ_asInt()-GetZ());} 39 49 40 } 41 42 43 G4AlphaEvaporationProbability::G4AlphaEvaporationProbability(const G4AlphaEvaporationProbability &): G4EvaporationProbability() 44 { 45 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaEvaporationProbability::copy_constructor meant to not be accessable"); 46 } 47 48 49 50 51 const G4AlphaEvaporationProbability & G4AlphaEvaporationProbability:: 52 operator=(const G4AlphaEvaporationProbability &) 53 { 54 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaEvaporationProbability::operator= meant to not be accessable"); 55 return *this; 56 } 57 58 59 G4bool G4AlphaEvaporationProbability::operator==(const G4AlphaEvaporationProbability &) const 60 { 61 return false; 62 } 63 64 G4bool G4AlphaEvaporationProbability::operator!=(const G4AlphaEvaporationProbability &) const 65 { 66 return true; 67 } 68 69 70 G4double G4AlphaEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 71 { return 1.0 + CCoeficient(static_cast<G4double>(fragment.GetZ()-GetZ()));} 50 G4double G4AlphaEvaporationProbability::CalcBetaParam(const G4Fragment &) 51 { return 0.0; } 52 53 G4double G4AlphaEvaporationProbability::CCoeficient(G4int aZ) 54 { 55 // Data comes from 56 // Dostrovsky, Fraenkel and Friedlander 57 // Physical Review, vol 116, num. 3 1959 58 // 59 // const G4int size = 5; 60 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 61 // G4double Calpha[5] = { 0.10, 0.10, 0.10, 0.08, 0.06}; 62 G4double C = 0.0; 72 63 73 G4double G4AlphaEvaporationProbability::CalcBetaParam(const G4Fragment &) 74 { return 0.0; } 75 76 G4double G4AlphaEvaporationProbability::CCoeficient(const G4double aZ) 77 { 78 // Data comes from 79 // Dostrovsky, Fraenkel and Friedlander 80 // Physical Review, vol 116, num. 3 1959 81 // 82 // const G4int size = 5; 83 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 84 // G4double Calpha[5] = { 0.10, 0.10, 0.10, 0.08, 0.06}; 85 G4double C = 0.0; 86 87 88 if (aZ <= 30) { 89 C = 0.10; 90 } else if (aZ <= 50) { 91 C = 0.1 + -((aZ-50.)/20.)*0.02; 92 } else if (aZ < 70) { 93 C = 0.08 + -((aZ-70.)/20.)*0.02; 94 } else { 95 C = 0.06; 96 } 97 return C; 64 if (aZ <= 30) 65 { 66 C = 0.10; 67 } 68 else if (aZ <= 50) 69 { 70 C = 0.1 - (aZ-30)*0.001; 71 } 72 else if (aZ < 70) 73 { 74 C = 0.08 - (aZ-50)*0.001; 75 } 76 else 77 { 78 C = 0.06; 79 } 80 return C; 98 81 } 99 82 … … 104 87 //OPT=3,4 Kalbach's parameterization 105 88 // 106 G4double G4AlphaEvaporationProbability::CrossSection(const G4Fragment & fragment,107 constG4double K)89 G4double 90 G4AlphaEvaporationProbability::CrossSection(const G4Fragment & fragment, G4double K) 108 91 { 109 92 theA=GetA(); 110 93 theZ=GetZ(); 111 ResidualA=fragment.GetA()-theA; 112 ResidualZ=fragment.GetZ()-theZ; 113 114 ResidualAthrd=std::pow(ResidualA,0.33333); 115 FragmentA=fragment.GetA(); 116 FragmentAthrd=std::pow(FragmentA,0.33333); 117 94 ResidualA=fragment.GetA_asInt()-theA; 95 ResidualZ=fragment.GetZ_asInt()-theZ; 96 97 ResidualAthrd=fG4pow->Z13(ResidualA); 98 FragmentA=fragment.GetA_asInt(); 99 FragmentAthrd=fG4pow->Z13(FragmentA); 118 100 119 101 if (OPTxs==0) {std::ostringstream errOs; … … 133 115 } 134 116 135 136 // 137 //********************* OPT=1,2 : Chatterjee's cross section ************************ 117 // 118 //********************* OPT=1,2 : Chatterjee's cross section ******************** 138 119 //(fitting to cross section from Bechetti & Greenles OM potential) 139 120 140 G4double G4AlphaEvaporationProbability::GetOpt12(const G4double K) 141 { 142 // c ** alpha from huizenga and igo 121 G4double G4AlphaEvaporationProbability::GetOpt12(G4double K) 122 { 143 123 G4double Kc=K; 144 145 // JMQ xsec is set consta t above limit of validity146 if (K >50) Kc=50;147 124 125 // JMQ xsec is set constant above limit of validity 126 if (K > 50*MeV) { Kc = 50*MeV; } 127 148 128 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 149 129 150 130 G4double p0 = 10.95; 151 131 G4double p1 = -85.2; … … 160 140 G4double delta=1.2; 161 141 162 163 142 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 164 143 p = p0 + p1/Ec + p2/(Ec*Ec); 165 144 landa = landa0*ResidualA + landa1; 166 mu = mu0*std::pow(ResidualA,mu1); 167 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 145 G4double resmu1 = fG4pow->powZ(ResidualA,mu1); 146 mu = mu0*resmu1; 147 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 168 148 q = landa - nu/(Ec*Ec) - 2*p*Ec; 169 149 r = mu + 2*nu/Ec + p*(Ec*Ec); 170 150 171 151 ji=std::max(Kc,Ec); 172 152 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 173 153 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 174 154 175 155 if (xs <0.0) {xs=0.0;} 176 156 177 157 return xs; 178 179 158 } 180 159 181 160 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 182 G4double G4AlphaEvaporationProbability::GetOpt34( constG4double K)161 G4double G4AlphaEvaporationProbability::GetOpt34(G4double K) 183 162 // c ** alpha from huizenga and igo 184 163 { 185 186 164 G4double landa, mu, nu, p , signor(1.),sig; 187 165 G4double ec,ecsq,xnulam,etest(0.),a; 188 166 G4double b,ecut,cut,ecut2,geom,elab; 189 167 190 191 168 G4double flow = 1.e-18; 192 169 G4double spill= 1.e+18; 193 170 194 G4double p0 = 10.95;171 G4double p0 = 10.95; 195 172 G4double p1 = -85.2; 196 173 G4double p2 = 1146.; … … 204 181 205 182 G4double ra=1.20; 206 183 207 184 //JMQ 13/02/09 increase of reduced radius to lower the barrier 208 185 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); … … 211 188 p = p0 + p1/ec + p2/ecsq; 212 189 landa = landa0*ResidualA + landa1; 213 a = std::pow(ResidualA,mu1);190 a = fG4pow->powZ(ResidualA,mu1); 214 191 mu = mu0 * a; 215 192 nu = a* (nu0+nu1*ec+nu2*ecsq); 216 193 xnulam = nu / landa; 217 if (xnulam > spill) xnulam=0.;218 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);219 194 if (xnulam > spill) { xnulam=0.; } 195 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 196 220 197 a = -2.*p*ec + landa - nu/ecsq; 221 198 b = p*ecsq + mu + 2.*nu/ec; 222 199 ecut = 0.; 223 200 cut = a*a - 4.*p*b; 224 if (cut > 0.) ecut = std::sqrt(cut);201 if (cut > 0.) { ecut = std::sqrt(cut); } 225 202 ecut = (ecut-a) / (p+p); 226 203 ecut2 = ecut; 227 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 228 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 229 // if (cut < 0.) ecut2 = ecut - 2.; 230 if (cut < 0.) ecut2 = ecut; 231 elab = K * FragmentA / ResidualA; 204 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 205 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 206 // to 0 bellow minimum 207 // if (cut < 0.) ecut2 = ecut - 2.; 208 if (cut < 0.) { ecut2 = ecut; } 209 elab = K * FragmentA / G4double(ResidualA); 232 210 sig = 0.; 233 211 234 212 if (elab <= ec) { //start for E<Ec 235 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;213 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 236 214 } //end for E<Ec 237 215 else { //start for E>Ec 238 216 sig = (landa*elab+mu+nu/elab) * signor; 239 217 geom = 0.; 240 if (xnulam < flow || elab < etest) return sig;218 if (xnulam < flow || elab < etest) { return sig; } 241 219 geom = std::sqrt(theA*K); 242 220 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 245 223 } //end for E>Ec 246 224 return sig; 247 248 } 249 250 // ************************** end of cross sections ******************************* 225 } 226 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4DeuteronEvaporationChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4DeuteronEvaporationChannel.cc,v 1. 4 2006/06/29 20:10:21 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4DeuteronEvaporationChannel.cc,v 1.5 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #include "G4DeuteronEvaporationChannel.hh" 35 36 37 G4DeuteronEvaporationChannel::G4DeuteronEvaporationChannel() 38 : G4EvaporationChannel(2,1,"deuteron",&theEvaporationProbability,&theCoulombBarrier) 39 {} 36 40 37 const G4DeuteronEvaporationChannel & G4DeuteronEvaporationChannel::operator=(const G4DeuteronEvaporationChannel & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4DeuteronEvaporationChannel::operator= meant to not be accessable"); 40 return *this; 41 } 41 G4DeuteronEvaporationChannel::~G4DeuteronEvaporationChannel() 42 {} 42 43 43 G4DeuteronEvaporationChannel::G4DeuteronEvaporationChannel(const G4DeuteronEvaporationChannel & ) : G4EvaporationChannel()44 {45 throw G4HadronicException(__FILE__, __LINE__, "G4DeuteronEvaporationChannel::CopyConstructor meant to not be accessable");46 }47 48 G4bool G4DeuteronEvaporationChannel::operator==(const G4DeuteronEvaporationChannel & right) const49 {50 return (this == (G4DeuteronEvaporationChannel *) &right);51 // return false;52 }53 54 G4bool G4DeuteronEvaporationChannel::operator!=(const G4DeuteronEvaporationChannel & right) const55 {56 return (this != (G4DeuteronEvaporationChannel *) &right);57 // return true;58 } -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc
r1315 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4DeuteronEvaporationProbability.cc,v 1.20 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 31 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // cross section option 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 17-11-2010 V.Ivanchenko integer Z and A 33 37 34 38 … … 38 42 G4DeuteronEvaporationProbability::G4DeuteronEvaporationProbability() : 39 43 G4EvaporationProbability(2,1,3,&theCoulombBarrier) // A,Z,Gamma (fixed JMQ) 40 { } 41 G4DeuteronEvaporationProbability::G4DeuteronEvaporationProbability(const G4DeuteronEvaporationProbability &) : G4EvaporationProbability() 42 { 43 throw G4HadronicException(__FILE__, __LINE__, "G4DeuteronEvaporationProbability::copy_constructor meant to not be accessable"); 44 } 45 46 47 const G4DeuteronEvaporationProbability & G4DeuteronEvaporationProbability:: 48 operator=(const G4DeuteronEvaporationProbability &) 49 { 50 throw G4HadronicException(__FILE__, __LINE__, "G4DeuteronEvaporationProbability::operator= meant to not be accessable"); 51 return *this; 52 } 53 54 55 G4bool G4DeuteronEvaporationProbability::operator==(const G4DeuteronEvaporationProbability &) const 56 { 57 return false; 58 } 59 60 61 G4bool G4DeuteronEvaporationProbability::operator!=(const G4DeuteronEvaporationProbability &) const 62 { 63 return true; 64 } 65 44 {} 45 46 G4DeuteronEvaporationProbability::~G4DeuteronEvaporationProbability() 47 {} 66 48 67 49 G4double G4DeuteronEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 68 50 { 69 return 1.0 + CCoeficient(static_cast<G4double>(fragment.GetZ()-GetZ())); 70 } 71 51 return 1.0 + CCoeficient(fragment.GetZ_asInt()-GetZ()); 52 } 72 53 73 54 G4double G4DeuteronEvaporationProbability::CalcBetaParam(const G4Fragment & ) 74 55 { 75 return 0.0; 76 } 77 78 79 G4double G4DeuteronEvaporationProbability::CCoeficient(const G4double aZ) 80 { 81 // Data comes from 82 // Dostrovsky, Fraenkel and Friedlander 83 // Physical Review, vol 116, num. 3 1959 84 // 85 // const G4int size = 5; 86 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 87 // G4double Cp[5] = { 0.50, 0.28, 0.20, 0.15, 0.10}; 88 // C for deuteron is equal to C for protons divided by 2 89 G4double C = 0.0; 56 return 0.0; 57 } 58 59 G4double G4DeuteronEvaporationProbability::CCoeficient(G4int aZ) 60 { 61 // Data comes from 62 // Dostrovsky, Fraenkel and Friedlander 63 // Physical Review, vol 116, num. 3 1959 64 // 65 // const G4int size = 5; 66 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 67 // G4double Cp[5] = { 0.50, 0.28, 0.20, 0.15, 0.10}; 68 // C for deuteron is equal to C for protons divided by 2 69 G4double C = 0.0; 90 70 91 if (aZ >= 70) {92 C = 0.10;93 } else {94 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;95 }71 if (aZ >= 70) { 72 C = 0.10; 73 } else { 74 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 75 } 96 76 97 return C/2.0;77 return C/2.0; 98 78 99 79 } … … 106 86 //OPT=3,4 Kalbach's parameterization 107 87 // 108 G4double G4DeuteronEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 109 { 110 theA=GetA(); 111 theZ=GetZ(); 112 ResidualA=fragment.GetA()-theA; 113 ResidualZ=fragment.GetZ()-theZ; 88 G4double 89 G4DeuteronEvaporationProbability::CrossSection(const G4Fragment & fragment, G4double K) 90 { 91 theA=GetA(); 92 theZ=GetZ(); 93 ResidualA=fragment.GetA_asInt()-theA; 94 ResidualZ=fragment.GetZ_asInt()-theZ; 95 96 ResidualAthrd=fG4pow->Z13(ResidualA); 97 FragmentA=fragment.GetA_asInt(); 98 FragmentAthrd=fG4pow->Z13(FragmentA); 99 100 if (OPTxs==0) {std::ostringstream errOs; 101 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (deuterons)!!" 102 <<G4endl; 103 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 104 return 0.;} 105 if( OPTxs==1 || OPTxs==2) return G4DeuteronEvaporationProbability::GetOpt12( K); 106 else if (OPTxs==3 || OPTxs==4) return G4DeuteronEvaporationProbability::GetOpt34( K); 107 else{ 108 std::ostringstream errOs; 109 errOs << "BAD Deuteron CROSS SECTION OPTION AT EVAPORATION!!" <<G4endl; 110 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 111 return 0.; 112 } 113 } 114 115 // 116 //********************* OPT=1,2 : Chatterjee's cross section ******************** 117 //(fitting to cross section from Bechetti & Greenles OM potential) 118 119 G4double G4DeuteronEvaporationProbability::GetOpt12(G4double K) 120 { 121 G4double Kc = K; 122 123 // JMQ xsec is set constat above limit of validity 124 if (K > 50*MeV) { Kc = 50*MeV; } 125 126 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 114 127 115 ResidualAthrd=std::pow(ResidualA,0.33333); 116 FragmentA=fragment.GetA(); 117 FragmentAthrd=std::pow(FragmentA,0.33333); 118 119 if (OPTxs==0) {std::ostringstream errOs; 120 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (deuterons)!!" <<G4endl; 121 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 122 return 0.;} 123 if( OPTxs==1 || OPTxs==2) return G4DeuteronEvaporationProbability::GetOpt12( K); 124 else if (OPTxs==3 || OPTxs==4) return G4DeuteronEvaporationProbability::GetOpt34( K); 125 else{ 126 std::ostringstream errOs; 127 errOs << "BAD Deuteron CROSS SECTION OPTION AT EVAPORATION!!" <<G4endl; 128 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 129 return 0.; 130 } 131 } 132 133 134 //********************* OPT=1,2 : Chatterjee's cross section ************************ 135 //(fitting to cross section from Bechetti & Greenles OM potential) 136 137 G4double G4DeuteronEvaporationProbability::GetOpt12(const G4double K) 138 { 139 140 G4double Kc=K; 141 142 // JMQ xsec is set constat above limit of validity 143 if (K>50) Kc=50; 144 145 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 146 147 148 G4double p0 = -38.21; 149 G4double p1 = 922.6; 150 G4double p2 = -2804.; 151 G4double landa0 = -0.0323; 152 G4double landa1 = -5.48; 153 G4double mu0 = 336.1; 154 G4double mu1 = 0.48; 155 G4double nu0 = 524.3; 156 G4double nu1 = -371.8; 157 G4double nu2 = -5.924; 158 G4double delta=1.2; 159 160 161 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 162 p = p0 + p1/Ec + p2/(Ec*Ec); 163 landa = landa0*ResidualA + landa1; 164 mu = mu0*std::pow(ResidualA,mu1); 165 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 166 q = landa - nu/(Ec*Ec) - 2*p*Ec; 167 r = mu + 2*nu/Ec + p*(Ec*Ec); 168 169 ji=std::max(Kc,Ec); 170 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 171 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 128 G4double p0 = -38.21; 129 G4double p1 = 922.6; 130 G4double p2 = -2804.; 131 G4double landa0 = -0.0323; 132 G4double landa1 = -5.48; 133 G4double mu0 = 336.1; 134 G4double mu1 = 0.48; 135 G4double nu0 = 524.3; 136 G4double nu1 = -371.8; 137 G4double nu2 = -5.924; 138 G4double delta=1.2; 139 140 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 141 p = p0 + p1/Ec + p2/(Ec*Ec); 142 landa = landa0*ResidualA + landa1; 143 G4double resmu1 = fG4pow->powZ(ResidualA,mu1); 144 mu = mu0*resmu1; 145 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 146 q = landa - nu/(Ec*Ec) - 2*p*Ec; 147 r = mu + 2*nu/Ec + p*(Ec*Ec); 148 149 ji=std::max(Kc,Ec); 150 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 151 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 172 152 173 if (xs <0.0) {xs=0.0;} 174 175 return xs; 176 177 } 178 153 if (xs <0.0) {xs=0.0;} 154 155 return xs; 156 } 179 157 180 158 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 181 G4double G4DeuteronEvaporationProbability::GetOpt34( constG4double K)159 G4double G4DeuteronEvaporationProbability::GetOpt34(G4double K) 182 160 // ** d from o.m. of perey and perey 183 161 { 184 162 185 G4double landa, mu, nu, p , signor(1.),sig;163 G4double landa, mu, nu, p ,signor(1.),sig; 186 164 G4double ec,ecsq,xnulam,etest(0.),a; 187 165 G4double b,ecut,cut,ecut2,geom,elab; 188 166 189 190 167 G4double flow = 1.e-18; 191 168 G4double spill= 1.e+18; 192 193 169 194 170 G4double p0 = 0.798; … … 202 178 G4double nu1 = -474.5; 203 179 G4double nu2 = -3.592; 204 205 G4double ra=0.80;180 181 G4double ra=0.80; 206 182 207 183 //JMQ 13/02/09 increase of reduced radius to lower the barrier 208 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 209 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 210 184 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 185 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 211 186 ecsq = ec * ec; 212 187 p = p0 + p1/ec + p2/ecsq; 213 188 landa = landa0*ResidualA + landa1; 214 a = std::pow(ResidualA,mu1);189 a = fG4pow->powZ(ResidualA,mu1); 215 190 mu = mu0 * a; 216 191 nu = a* (nu0+nu1*ec+nu2*ecsq); 217 192 xnulam = nu / landa; 218 if (xnulam > spill) xnulam=0.;219 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);193 if (xnulam > spill) { xnulam=0.; } 194 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 220 195 221 196 a = -2.*p*ec + landa - nu/ecsq; … … 223 198 ecut = 0.; 224 199 cut = a*a - 4.*p*b; 225 if (cut > 0.) ecut = std::sqrt(cut);200 if (cut > 0.) { ecut = std::sqrt(cut); } 226 201 ecut = (ecut-a) / (p+p); 227 202 ecut2 = ecut; 228 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 229 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 230 // if (cut < 0.) ecut2 = ecut - 2.; 231 if (cut < 0.) ecut2 = ecut; 232 elab = K * FragmentA / ResidualA; 203 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 204 //ecut<0 means that there is no cut with energy axis, i.e. xs is set 205 //to 0 bellow minimum 206 // if (cut < 0.) ecut2 = ecut - 2.; 207 if (cut < 0.) { ecut2 = ecut; } 208 elab = K * FragmentA / G4double(ResidualA); 233 209 sig = 0.; 234 210 235 211 if (elab <= ec) { //start for E<Ec 236 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;212 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 237 213 } //end for E<Ec 238 214 else { //start for E>Ec 239 215 sig = (landa*elab+mu+nu/elab) * signor; 240 216 geom = 0.; 241 if (xnulam < flow || elab < etest) return sig;217 if (xnulam < flow || elab < etest) { return sig; } 242 218 geom = std::sqrt(theA*K); 243 219 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 246 222 } //end for E>Ec 247 223 return sig; 248 249 } 250 251 // ************************** end of cross sections ******************************* 224 } 225 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4Evaporation.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4Evaporation.cc,v 1.2 5 2010/06/09 11:56:47vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4Evaporation.cc,v 1.26 2010/11/23 18:10:10 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 142 142 G4int Z = theResidualNucleus->GetZ_asInt(); 143 143 G4double abun = nist->GetIsotopeAbundance(Z, A); 144 /*145 G4cout << "### G4Evaporation::BreakItUp step " << ia << " Z= " << Z146 << " A= " << A << " Eex(MeV)= "147 << theResidualNucleus->GetExcitationEnergy()148 << " aban= " << abun << G4endl;149 */144 145 // G4cout << "### G4Evaporation::BreakItUp step " << ia << " Z= " << Z 146 // << " A= " << A << " Eex(MeV)= " 147 // << theResidualNucleus->GetExcitationEnergy() 148 // << " aban= " << abun << G4endl; 149 150 150 if(theResidualNucleus->GetExcitationEnergy() <= minExcitation && 151 151 (abun > 0.0)) … … 184 184 // do evaporation chain and reset total probability 185 185 if(0.0 < totprob && probabilities[0] == totprob) { 186 //G4cout << "Start gamma evaporation" << G4endl; 186 187 theTempResult = (*theChannels)[0]->BreakUpFragment(theResidualNucleus); 187 188 if(theTempResult) { … … 228 229 // single photon evaporation, primary pointer is kept 229 230 if(0 == i) { 231 //G4cout << "Single gamma" << G4endl; 230 232 G4Fragment* gamma = (*theChannels)[0]->EmittedFragment(theResidualNucleus); 231 233 if(gamma) { theResult->push_back(gamma); } … … 233 235 // fission, return results to the main loop if fission is succesful 234 236 } else if(1 == i) { 237 //G4cout << "Fission" << G4endl; 235 238 theTempResult = (*theChannels)[1]->BreakUp(*theResidualNucleus); 236 239 if(theTempResult) { … … 248 251 // other channels 249 252 } else { 253 //G4cout << "Channel # " << i << G4endl; 250 254 theTempResult = (*theChannels)[i]->BreakUp(*theResidualNucleus); 251 255 if(theTempResult) { -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationChannel.cc
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EvaporationChannel.cc,v 1.19 2010/11/24 15:30:49 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 //J.M. Quesada (August2008). Based on: … … 30 32 // by V. Lara (Oct 1998) 31 33 // 32 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 33 // cross section option 34 // JMQ (06 September 2008) Also external choices have been added for 35 // superimposed Coulomb barrier (if useSICB is set true, by default is false) 36 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 06-09-2008 J.M. Quesada Also external choices have been added for superimposed 37 // Coulomb barrier (if useSICB is set true, by default is false) 38 // 17-11-2010 V.Ivanchenko in constructor replace G4VEmissionProbability by 39 // G4EvaporationProbability and do not new and delete probability 40 // object at each call; use G4Pow 37 41 38 42 #include "G4EvaporationChannel.hh" 39 43 #include "G4PairingCorrection.hh" 40 41 42 43 G4EvaporationChannel::G4EvaporationChannel(const G4int anA, const G4int aZ, const G4String & aName, 44 G4VEmissionProbability * aEmissionStrategy, 45 G4VCoulombBarrier * aCoulombBarrier): 44 #include "G4NucleiProperties.hh" 45 #include "G4Pow.hh" 46 #include "G4EvaporationLevelDensityParameter.hh" 47 #include "Randomize.hh" 48 #include "G4Alpha.hh" 49 50 G4EvaporationChannel::G4EvaporationChannel(G4int anA, G4int aZ, 51 const G4String & aName, 52 G4EvaporationProbability* aEmissionStrategy, 53 G4VCoulombBarrier* aCoulombBarrier): 46 54 G4VEvaporationChannel(aName), 47 55 theA(anA), … … 52 60 MaximalKineticEnergy(-1000.0) 53 61 { 54 theLevelDensityPtr = new G4EvaporationLevelDensityParameter; 55 // MyOwnLevelDensity = true; 62 ResidualA = 0; 63 ResidualZ = 0; 64 ResidualMass = CoulombBarrier=0.0; 65 EvaporatedMass = G4NucleiProperties::GetNuclearMass(theA, theZ); 66 theLevelDensityPtr = new G4EvaporationLevelDensityParameter; 67 } 68 69 G4EvaporationChannel::G4EvaporationChannel(): 70 G4VEvaporationChannel(""), 71 theA(0), 72 theZ(0), 73 theEvaporationProbabilityPtr(0), 74 theCoulombBarrierPtr(0), 75 EmissionProbability(0.0), 76 MaximalKineticEnergy(-1000.0) 77 { 78 ResidualA = 0; 79 ResidualZ = 0; 80 EvaporatedMass = ResidualMass = CoulombBarrier = 0.0; 81 theLevelDensityPtr = new G4EvaporationLevelDensityParameter; 56 82 } 57 83 … … 60 86 delete theLevelDensityPtr; 61 87 } 62 63 G4EvaporationChannel::G4EvaporationChannel(const G4EvaporationChannel & ) : G4VEvaporationChannel()64 {65 throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationChannel::copy_costructor meant to not be accessable");66 }67 68 const G4EvaporationChannel & G4EvaporationChannel::operator=(const G4EvaporationChannel & )69 {70 throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationChannel::operator= meant to not be accessable");71 return *this;72 }73 74 G4bool G4EvaporationChannel::operator==(const G4EvaporationChannel & right) const75 {76 return (this == (G4EvaporationChannel *) &right);77 // return false;78 }79 80 G4bool G4EvaporationChannel::operator!=(const G4EvaporationChannel & right) const81 {82 return (this != (G4EvaporationChannel *) &right);83 // return true;84 }85 86 //void G4EvaporationChannel::SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity)87 // {88 // if (MyOwnLevelDensity) delete theLevelDensityPtr;89 // theLevelDensityPtr = aLevelDensity;90 // MyOwnLevelDensity = false;91 // }92 88 93 89 void G4EvaporationChannel::Initialize(const G4Fragment & fragment) … … 98 94 theEvaporationProbabilityPtr->UseSICB(useSICB); 99 95 100 101 G4int FragmentA = static_cast<G4int>(fragment.GetA()); 102 G4int FragmentZ = static_cast<G4int>(fragment.GetZ()); 96 G4int FragmentA = fragment.GetA_asInt(); 97 G4int FragmentZ = fragment.GetZ_asInt(); 103 98 ResidualA = FragmentA - theA; 104 99 ResidualZ = FragmentZ - theZ; 100 //G4cout << "G4EvaporationChannel::Initialize Z= " << theZ << " A= " << theA 101 // << " FragZ= " << FragmentZ << " FragA= " << FragmentA << G4endl; 105 102 106 103 //Effective excitation energy … … 108 105 G4PairingCorrection::GetInstance()->GetPairingCorrection(FragmentA,FragmentZ); 109 106 110 111 107 // Only channels which are physically allowed are taken into account 112 108 if (ResidualA <= 0 || ResidualZ <= 0 || ResidualA < ResidualZ || 113 109 (ResidualA == ResidualZ && ResidualA > 1) || ExEnergy <= 0.0) { 114 CoulombBarrier =0.0;110 CoulombBarrier = ResidualMass = 0.0; 115 111 MaximalKineticEnergy = -1000.0*MeV; 116 112 EmissionProbability = 0.0; 117 113 } else { 114 ResidualMass = G4NucleiProperties::GetNuclearMass(ResidualA, ResidualZ); 115 G4double FragmentMass = fragment.GetGroundStateMass(); 118 116 CoulombBarrier = theCoulombBarrierPtr->GetCoulombBarrier(ResidualA,ResidualZ,ExEnergy); 119 117 // Maximal Kinetic Energy 120 MaximalKineticEnergy = CalcMaximalKineticEnergy 121 (G4ParticleTable::GetParticleTable()->122 GetIonTable()->GetNucleusMass(FragmentZ,FragmentA)+ExEnergy);118 MaximalKineticEnergy = CalcMaximalKineticEnergy(FragmentMass + ExEnergy); 119 //MaximalKineticEnergy = ExEnergy + fragment.GetGroundStateMass() 120 // - EvaporatedMass - ResidualMass; 123 121 124 122 // Emission probability … … 131 129 limit= CoulombBarrier; 132 130 else limit=0.; 131 limit = std::max(limit, FragmentMass - ResidualMass - EvaporatedMass); 133 132 134 133 // The threshold for charged particle emission must be set to 0 if Coulomb 135 134 //cutoff is included in the cross sections 136 //if (MaximalKineticEnergy <= 0.0) EmissionProbability = 0.0;137 135 if (MaximalKineticEnergy <= limit) EmissionProbability = 0.0; 138 136 else { … … 142 140 } 143 141 } 142 //G4cout << "G4EvaporationChannel:: probability= " << EmissionProbability << G4endl; 144 143 145 144 return; … … 148 147 G4FragmentVector * G4EvaporationChannel::BreakUp(const G4Fragment & theNucleus) 149 148 { 150 G4double EvaporatedKineticEnergy=GetKineticEnergy(theNucleus); 151 152 G4double EvaporatedMass = G4ParticleTable::GetParticleTable()->GetIonTable()-> 153 GetIonMass(theZ,theA); 154 G4double EvaporatedEnergy = EvaporatedKineticEnergy + EvaporatedMass; 155 149 /* 150 G4double Ecm = GetKineticEnergy(theNucleus) + ResidualMass + EvaporatedMass; 151 152 G4double EvaporatedEnergy = 153 ((Ecm-ResidualMass)*(Ecm+ResidualMass) + EvaporatedMass*EvaporatedMass)/(2*Ecm); 154 */ 155 G4double EvaporatedEnergy = GetKineticEnergy(theNucleus) + EvaporatedMass; 156 156 157 G4ThreeVector momentum(IsotropicVector 157 (std::sqrt(EvaporatedKineticEnergy* 158 (EvaporatedKineticEnergy+2.0*EvaporatedMass)))); 159 160 momentum.rotateUz(theNucleus.GetMomentum().vect().unit()); 158 (std::sqrt((EvaporatedEnergy - EvaporatedMass)* 159 (EvaporatedEnergy + EvaporatedMass)))); 161 160 162 161 G4LorentzVector EvaporatedMomentum(momentum,EvaporatedEnergy); 163 EvaporatedMomentum.boost(theNucleus.GetMomentum().boostVector()); 162 G4LorentzVector ResidualMomentum = theNucleus.GetMomentum(); 163 EvaporatedMomentum.boost(ResidualMomentum.boostVector()); 164 164 165 165 G4Fragment * EvaporatedFragment = new G4Fragment(theA,theZ,EvaporatedMomentum); 166 #ifdef PRECOMPOUND_TEST 167 EvaporatedFragment->SetCreatorModel(G4String("G4Evaporation")); 168 #endif 169 // ** And now the residual nucleus ** 170 G4double theExEnergy = theNucleus.GetExcitationEnergy(); 171 G4double theMass = G4ParticleTable::GetParticleTable()->GetIonTable()-> 172 GetNucleusMass(static_cast<G4int>(theNucleus.GetZ()), 173 static_cast<G4int>(theNucleus.GetA())); 174 G4double ResidualEnergy = theMass + 175 (theExEnergy - EvaporatedKineticEnergy) - EvaporatedMass; 176 177 G4LorentzVector ResidualMomentum(-momentum,ResidualEnergy); 178 ResidualMomentum.boost(theNucleus.GetMomentum().boostVector()); 179 180 G4Fragment * ResidualFragment = new G4Fragment(ResidualA, ResidualZ, ResidualMomentum ); 181 182 #ifdef PRECOMPOUND_TEST 183 ResidualFragment->SetCreatorModel(G4String("ResidualNucleus")); 184 #endif 166 ResidualMomentum -= EvaporatedMomentum; 167 168 G4Fragment * ResidualFragment = new G4Fragment(ResidualA, ResidualZ, ResidualMomentum); 169 185 170 G4FragmentVector * theResult = new G4FragmentVector; 186 171 … … 211 196 ///////////////////////////////////////// 212 197 // Calculates the maximal kinetic energy that can be carried by fragment. 213 G4double G4EvaporationChannel::CalcMaximalKineticEnergy(const G4double NucleusTotalE) 214 { 215 G4double ResidualMass = G4ParticleTable::GetParticleTable()-> 216 GetIonTable()->GetNucleusMass( ResidualZ, ResidualA ); 217 G4double EvaporatedMass = G4ParticleTable::GetParticleTable()-> 218 GetIonTable()->GetNucleusMass( theZ, theA ); 219 198 G4double G4EvaporationChannel::CalcMaximalKineticEnergy(G4double NucleusTotalE) 199 { 220 200 // This is the "true" assimptotic kinetic energy (from energy conservation) 221 G4double Tmax = (NucleusTotalE*NucleusTotalE + EvaporatedMass*EvaporatedMass - 222 ResidualMass*ResidualMass)/(2.0*NucleusTotalE) - EvaporatedMass; 201 G4double Tmax = 202 ((NucleusTotalE-ResidualMass)*(NucleusTotalE+ResidualMass) + EvaporatedMass*EvaporatedMass) 203 /(2.0*NucleusTotalE) - EvaporatedMass; 223 204 224 205 //JMQ (13-09-08) bug fixed: in the original version the Tmax is calculated … … 245 226 246 227 247 if (MaximalKineticEnergy < 0.0) 228 if (MaximalKineticEnergy < 0.0) { 248 229 throw G4HadronicException(__FILE__, __LINE__, 249 230 "G4EvaporationChannel::CalcKineticEnergy: maximal kinetic at the Coulomb barrier is less than 0"); 250 231 } 251 232 G4double Rb = 4.0*theLevelDensityPtr-> 252 233 LevelDensityParameter(ResidualA+theA,ResidualZ+theZ,MaximalKineticEnergy)* … … 263 244 G4double Q2 = 1.0; 264 245 if (theZ == 0) { // for emitted neutron 265 G4double Beta = (2.12/ std::pow(G4double(ResidualA),2./3.) - 0.05)*MeV/266 (0.76 + 2.2/ std::pow(G4double(ResidualA),1./3.));246 G4double Beta = (2.12/G4Pow::GetInstance()->Z23(ResidualA) - 0.05)*MeV/ 247 (0.76 + 2.2/G4Pow::GetInstance()->Z13(ResidualA)); 267 248 Q1 = 1.0 + Beta/(MaximalKineticEnergy); 268 249 Q2 = Q1*std::sqrt(Q1); … … 277 258 } else if (OPTxs==1 || OPTxs==2 || OPTxs==3 || OPTxs==4) { 278 259 279 G4double V;280 if(useSICB) V= CoulombBarrier;281 else V=0.;282 //If Coulomb barrier is just included in the cross sections 283 // G4double V=0.;260 // Coulomb barrier is just included in the cross sections 261 G4double V = 0; 262 if(useSICB) { V= CoulombBarrier; } 263 264 V = std::max(V, aFragment.GetGroundStateMass()-EvaporatedMass-ResidualMass); 284 265 285 266 G4double Tmax=MaximalKineticEnergy; 286 267 G4double T(0.0); 287 268 G4double NormalizedProbability(1.0); 288 269 270 // VI: This is very ineffective - create new objects at each call to the method 271 /* 289 272 // A pointer is created in order to access the distribution function. 290 G4EvaporationProbability * G4EPtemp ;273 G4EvaporationProbability * G4EPtemp = 0; 291 274 292 275 if (theA==1 && theZ==0) G4EPtemp=new G4NeutronEvaporationProbability(); … … 305 288 G4EPtemp->SetOPTxs(OPTxs); 306 289 G4EPtemp->UseSICB(useSICB); 307 290 */ 291 292 // use local pointer and not create a new one 308 293 do 309 294 { 310 295 T=V+G4UniformRand()*(Tmax-V); 311 NormalizedProbability=G4EPtemp->ProbabilityDistributionFunction(aFragment,T)/ 312 (this->GetEmissionProbability()); 296 NormalizedProbability = 297 theEvaporationProbabilityPtr->ProbabilityDistributionFunction(aFragment,T)/ 298 GetEmissionProbability(); 313 299 314 300 } 315 301 while (G4UniformRand() > NormalizedProbability); 316 delete G4EPtemp;317 return T;302 // delete G4EPtemp; 303 return T; 318 304 } else{ 319 305 std::ostringstream errOs; … … 323 309 } 324 310 325 G4ThreeVector G4EvaporationChannel::IsotropicVector( constG4double Magnitude)311 G4ThreeVector G4EvaporationChannel::IsotropicVector(G4double Magnitude) 326 312 // Samples a isotropic random vectorwith a magnitud given by Magnitude. 327 313 // By default Magnitude = 1.0 328 314 { 329 G4double CosTheta = 1.0 - 2.0*G4UniformRand();330 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta);331 G4double Phi = twopi*G4UniformRand();332 G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta,333 Magnitude*std::sin(Phi)*SinTheta,334 Magnitude*CosTheta);335 return Vector;336 }315 G4double CosTheta = 1.0 - 2.0*G4UniformRand(); 316 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta); 317 G4double Phi = twopi*G4UniformRand(); 318 G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta, 319 Magnitude*std::sin(Phi)*SinTheta, 320 Magnitude*CosTheta); 321 return Vector; 322 } 337 323 338 324 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationDefaultGEMFactory.cc
r1340 r1347 26 26 // 27 27 // $Id: G4EvaporationDefaultGEMFactory.cc,v 1.2 2010/04/27 11:43:16 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationFactory.cc
r1340 r1347 26 26 // 27 27 // $Id: G4EvaporationFactory.cc,v 1.5 2010/04/27 11:43:16 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationProbability.cc
r1315 r1347 44 44 #include "G4IonTable.hh" 45 45 46 47 G4EvaporationProbability::G4EvaporationProbability(const G4EvaporationProbability &) : G4VEmissionProbability() 46 G4EvaporationProbability::G4EvaporationProbability(G4int anA, G4int aZ, 47 G4double aGamma, 48 G4VCoulombBarrier * aCoulombBarrier) 49 : theA(anA), 50 theZ(aZ), 51 Gamma(aGamma), 52 theCoulombBarrierptr(aCoulombBarrier) 53 {} 54 55 G4EvaporationProbability::G4EvaporationProbability() 56 : theA(0), 57 theZ(0), 58 Gamma(0.0), 59 theCoulombBarrierptr(0) 60 {} 61 62 G4EvaporationProbability::~G4EvaporationProbability() 63 {} 64 65 G4double 66 G4EvaporationProbability::EmissionProbability(const G4Fragment & fragment, G4double anEnergy) 48 67 { 49 throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationProbability::copy_constructor meant to not be accessable"); 50 } 51 52 53 54 55 const G4EvaporationProbability & G4EvaporationProbability:: 56 operator=(const G4EvaporationProbability &) 68 G4double EmissionProbability = 0.0; 69 G4double MaximalKineticEnergy = anEnergy; 70 71 if (MaximalKineticEnergy > 0.0 && fragment.GetExcitationEnergy() > 0.0) { 72 EmissionProbability = CalculateProbability(fragment, MaximalKineticEnergy); 73 74 } 75 return EmissionProbability; 76 } 77 78 //////////////////////////////////// 79 80 // Computes the integrated probability of evaporation channel 81 G4double 82 G4EvaporationProbability::CalculateProbability(const G4Fragment & fragment, 83 G4double MaximalKineticEnergy) 57 84 { 58 throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationProbability::operator= meant to not be accessable"); 59 return *this; 60 } 61 62 63 G4bool G4EvaporationProbability::operator==(const G4EvaporationProbability &) const 64 { 65 return false; 66 } 67 68 G4bool G4EvaporationProbability::operator!=(const G4EvaporationProbability &) const 69 { 70 return true; 71 } 72 73 G4double G4EvaporationProbability::EmissionProbability(const G4Fragment & fragment, const G4double anEnergy) 74 { 75 G4double EmissionProbability = 0.0; 76 G4double MaximalKineticEnergy = anEnergy; 77 78 if (MaximalKineticEnergy > 0.0 && fragment.GetExcitationEnergy() > 0.0) { 79 EmissionProbability = CalculateProbability(fragment, MaximalKineticEnergy); 80 81 } 82 return EmissionProbability; 83 } 84 85 //////////////////////////////////// 86 87 // Computes the integrated probability of evaporation channel 88 G4double G4EvaporationProbability::CalculateProbability(const G4Fragment & fragment, const G4double MaximalKineticEnergy) 89 { 90 G4double ResidualA = fragment.GetA() - theA; 91 G4double ResidualZ = fragment.GetZ() - theZ; 92 G4double U = fragment.GetExcitationEnergy(); 85 G4int ResidualA = fragment.GetA_asInt() - theA; 86 G4int ResidualZ = fragment.GetZ_asInt() - theZ; 87 G4double U = fragment.GetExcitationEnergy(); 93 88 94 if (OPTxs==0) { 95 96 97 G4double NuclearMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetNucleusMass(theZ,theA); 98 99 100 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()), 101 static_cast<G4int>(fragment.GetZ())); 102 103 G4double SystemEntropy = 2.0*std::sqrt(theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()), 104 static_cast<G4int>(fragment.GetZ()),U)* 105 (U-delta0)); 89 if (OPTxs==0) { 90 91 G4double NuclearMass = fragment.ComputeGroundStateMass(theZ,theA); 92 93 G4double delta0 = fPairCorr->GetPairingCorrection(fragment.GetA_asInt(), 94 fragment.GetZ_asInt()); 95 96 G4double SystemEntropy = 2.0*std::sqrt( 97 theEvapLDPptr->LevelDensityParameter(fragment.GetA_asInt(),fragment.GetZ_asInt(),U)* 98 (U-delta0)); 106 99 107 108 G4double RN = 1.5*fermi; 100 const G4double RN = 1.5*fermi; 109 101 110 102 G4double Alpha = CalcAlphaParam(fragment); … … 112 104 113 105 G4double Rmax = MaximalKineticEnergy; 114 G4double a = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(ResidualA), 115 static_cast<G4int>(ResidualZ), 116 Rmax); 117 G4double GlobalFactor = static_cast<G4double>(Gamma) * (Alpha/(a*a)) * 118 (NuclearMass*RN*RN*std::pow(ResidualA,2./3.))/ 119 (2.*pi* hbar_Planck*hbar_Planck); 106 G4double a = theEvapLDPptr->LevelDensityParameter(ResidualA,ResidualZ,Rmax); 107 G4double GlobalFactor = Gamma * Alpha/(a*a) * 108 (NuclearMass*RN*RN*fG4pow->Z23(ResidualA))/ 109 (twopi* hbar_Planck*hbar_Planck); 120 110 G4double Term1 = (2.0*Beta*a-3.0)/2.0 + Rmax*a; 121 111 G4double Term2 = (2.0*Beta*a-3.0)*std::sqrt(Rmax*a) + 2.0*a*Rmax; 122 112 123 113 G4double ExpTerm1 = 0.0; 124 if (SystemEntropy <= 600.0) ExpTerm1 = std::exp(-SystemEntropy);114 if (SystemEntropy <= 600.0) { ExpTerm1 = std::exp(-SystemEntropy); } 125 115 126 116 G4double ExpTerm2 = 2.*std::sqrt(a*Rmax) - SystemEntropy; 127 if (ExpTerm2 > 700.0) ExpTerm2 = 700.0;117 if (ExpTerm2 > 700.0) { ExpTerm2 = 700.0; } 128 118 ExpTerm2 = std::exp(ExpTerm2); 129 119 … … 134 124 } else if (OPTxs==1 || OPTxs==2 ||OPTxs==3 || OPTxs==4) { 135 125 136 G4double limit; 137 if (useSICB) limit=theCoulombBarrierptr->GetCoulombBarrier(G4lrint(ResidualA),G4lrint(ResidualZ),U); 138 else limit=0.; 139 140 if (MaximalKineticEnergy <= limit) return 0.0; 141 142 143 // if Coulomb barrier cutoff is superimposed for all cross sections the limit is the Coulomb Barrier 126 G4double EvaporatedMass = fragment.ComputeGroundStateMass(theZ,theA); 127 G4double ResidulalMass = fragment.ComputeGroundStateMass(ResidualZ,ResidualA); 128 G4double limit = std::max(0.0,fragment.GetGroundStateMass()-EvaporatedMass-ResidulalMass); 129 if (useSICB) { 130 limit = std::max(limit,theCoulombBarrierptr->GetCoulombBarrier(ResidualA,ResidualZ,U)); 131 } 132 133 if (MaximalKineticEnergy <= limit) { return 0.0; } 134 135 // if Coulomb barrier cutoff is superimposed for all cross sections 136 // then the limit is the Coulomb Barrier 144 137 G4double LowerLimit= limit; 145 138 146 // MaximalKineticEnergy: asimptotic value (already accounted for in G4EvaporationChannel)139 //MaximalKineticEnergy: asimptotic value (already accounted for in G4EvaporationChannel) 147 140 148 141 G4double UpperLimit = MaximalKineticEnergy; 149 142 150 151 143 G4double Width = IntegrateEmissionProbability(fragment,LowerLimit,UpperLimit); 152 144 153 145 return Width; 154 } else {146 } else { 155 147 std::ostringstream errOs; 156 148 errOs << "Bad option for cross sections at evaporation" <<G4endl; … … 163 155 164 156 G4double G4EvaporationProbability:: 165 IntegrateEmissionProbability(const G4Fragment & fragment, const G4double & Low, const G4double & Up ) 157 IntegrateEmissionProbability(const G4Fragment & fragment, 158 const G4double & Low, const G4double & Up ) 166 159 { 167 168 160 static const G4int N = 10; 169 161 // 10-Points Gauss-Legendre abcisas and weights … … 212 204 //New method (OPT=1,2,3,4) 213 205 214 G4double G4EvaporationProbability::ProbabilityDistributionFunction( const G4Fragment & fragment, const G4double K) 206 G4double 207 G4EvaporationProbability::ProbabilityDistributionFunction( const G4Fragment & fragment, 208 G4double K) 215 209 { 216 210 G4int ResidualA = fragment.GetA_asInt() - theA; 211 G4int ResidualZ = fragment.GetZ_asInt() - theZ; 212 G4double U = fragment.GetExcitationEnergy(); 213 //G4cout << "### G4EvaporationProbability::ProbabilityDistributionFunction" << G4endl; 214 //G4cout << "FragZ= " << fragment.GetZ_asInt() << " FragA= " << fragment.GetA_asInt() 215 // << " Z= " << theZ << " A= " << theA << G4endl; 216 //G4cout << "PC " << fPairCorr << " DP " << theEvapLDPptr << G4endl; 217 218 // if(K <= theCoulombBarrierptr->GetCoulombBarrier(ResidualA,ResidualZ,U)) return 0.0; 219 220 G4double delta1 = fPairCorr->GetPairingCorrection(ResidualA,ResidualZ); 217 221 218 219 220 G4double ResidualA = fragment.GetA() - theA; 221 G4double ResidualZ = fragment.GetZ() - theZ; 222 G4double U = fragment.GetExcitationEnergy(); 223 224 // if(K <= theCoulombBarrierptr->GetCoulombBarrier(G4lrint(ResidualA),G4lrint(ResidualZ),U)) return 0.0; 225 226 G4double delta1 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(ResidualA),static_cast<G4int>(ResidualZ)); 227 228 229 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()),static_cast<G4int>(fragment.GetZ())); 230 231 232 G4double ParticleMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetNucleusMass(theZ,theA); 233 234 G4double theSeparationEnergy= G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) + 235 G4NucleiProperties::GetMassExcess(static_cast<G4int>(ResidualA),static_cast<G4int>(ResidualZ)) - 236 G4NucleiProperties::GetMassExcess(static_cast<G4int>(fragment.GetA()),static_cast<G4int>(fragment.GetZ())); 237 238 G4double a0 = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()),static_cast<G4int>(fragment.GetZ()),U - delta0); 239 240 G4double a1 = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(ResidualA),static_cast<G4int>(ResidualZ),U - theSeparationEnergy - delta1); 241 242 243 G4double E0=U-delta0; 244 245 G4double E1=U-theSeparationEnergy-delta1-K; 246 247 if (E1<0.) return 0.; 222 G4double delta0 = fPairCorr->GetPairingCorrection(fragment.GetA_asInt(), 223 fragment.GetZ_asInt()); 224 225 226 G4double ParticleMass = fragment.ComputeGroundStateMass(theZ,theA); 227 G4double ResidualMass = fragment.ComputeGroundStateMass(ResidualZ,ResidualA); 228 229 G4double theSeparationEnergy = ParticleMass + ResidualMass 230 - fragment.GetGroundStateMass(); 231 232 G4double a0 = theEvapLDPptr->LevelDensityParameter(fragment.GetA_asInt(), 233 fragment.GetZ_asInt(), 234 U - delta0); 235 236 G4double a1 = theEvapLDPptr->LevelDensityParameter(ResidualA, ResidualZ, 237 U - theSeparationEnergy - delta1); 238 239 240 G4double E0 = U - delta0; 241 242 G4double E1 = U - theSeparationEnergy - delta1 - K; 243 244 if (E1<0.) { return 0.; } 248 245 249 246 //JMQ 14/02/09 BUG fixed: hbarc should be in the denominator instead of hbar_Planck 250 247 //Without 1/hbar_Panck remains as a width 251 // G4double Prob=Gamma*ParticleMass/((pi*hbar_Planck)*(pi*hbar_Planck)*252 //std::exp(2*std::sqrt(a0*E0)))*K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn;253 248 254 249 G4double Prob=Gamma*ParticleMass/((pi*hbarc)*(pi*hbarc)*std::exp(2*std::sqrt(a0*E0))) -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4He3EvaporationChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4He3EvaporationChannel.cc,v 1. 4 2006/06/29 20:10:33 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4He3EvaporationChannel.cc,v 1.5 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #include "G4He3EvaporationChannel.hh" 35 36 37 G4He3EvaporationChannel::G4He3EvaporationChannel() 38 : G4EvaporationChannel(3,2,"He3",&theEvaporationProbability,&theCoulombBarrier) 39 {} 36 40 37 const G4He3EvaporationChannel & G4He3EvaporationChannel::operator=(const G4He3EvaporationChannel & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4He3EvaporationChannel::operator= meant to not be accessable"); 40 return *this; 41 } 41 G4He3EvaporationChannel::~G4He3EvaporationChannel() 42 {} 42 43 43 G4He3EvaporationChannel::G4He3EvaporationChannel(const G4He3EvaporationChannel & ) : G4EvaporationChannel()44 {45 throw G4HadronicException(__FILE__, __LINE__, "G4He3EvaporationChannel::CopyConstructor meant to not be accessable");46 }47 48 G4bool G4He3EvaporationChannel::operator==(const G4He3EvaporationChannel & right) const49 {50 return (this == (G4He3EvaporationChannel *) &right);51 // return false;52 }53 54 G4bool G4He3EvaporationChannel::operator!=(const G4He3EvaporationChannel & right) const55 {56 return (this != (G4He3EvaporationChannel *) &right);57 // return true;58 }59 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4He3EvaporationProbability.cc
r1315 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4He3EvaporationProbability.cc,v 1.18 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 31 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // cross section option 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 17-11-2010 V.Ivanchenko integer Z and A 33 37 34 38 #include "G4He3EvaporationProbability.hh" … … 36 40 G4He3EvaporationProbability::G4He3EvaporationProbability() : 37 41 G4EvaporationProbability(3,2,2,&theCoulombBarrier) // A,Z,Gamma,&theCoulombBarrier 38 { 39 40 } 41 42 G4He3EvaporationProbability::G4He3EvaporationProbability(const G4He3EvaporationProbability &) : G4EvaporationProbability() 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4He3EvaporationProbability::copy_constructor meant to not be accessable"); 45 } 46 47 48 49 50 const G4He3EvaporationProbability & G4He3EvaporationProbability:: 51 operator=(const G4He3EvaporationProbability &) 52 { 53 throw G4HadronicException(__FILE__, __LINE__, "G4He3EvaporationProbability::operator= meant to not be accessable"); 54 return *this; 55 } 56 57 58 G4bool G4He3EvaporationProbability::operator==(const G4He3EvaporationProbability &) const 59 { 60 return false; 61 } 62 63 G4bool G4He3EvaporationProbability::operator!=(const G4He3EvaporationProbability &) const 64 { 65 return true; 66 } 67 68 G4double G4He3EvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 69 { return 1.0 + CCoeficient(static_cast<G4double>(fragment.GetZ()-GetZ()));} 42 {} 43 44 G4He3EvaporationProbability::~G4He3EvaporationProbability() 45 {} 46 47 G4double G4He3EvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 48 { return 1.0 + CCoeficient(fragment.GetZ_asInt()-GetZ());} 70 49 71 G4double G4He3EvaporationProbability::CalcBetaParam(const G4Fragment & )50 G4double G4He3EvaporationProbability::CalcBetaParam(const G4Fragment & ) 72 51 { return 0.0; } 73 52 74 53 75 G4double G4He3EvaporationProbability::CCoeficient( const G4doubleaZ)76 { 77 // Data comes from78 // Dostrovsky, Fraenkel and Friedlander79 // Physical Review, vol 116, num. 3 195980 //81 // const G4int size = 5;82 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0};83 // G4double Calpha[5] = { 0.10, 0.10, 0.10, 0.08, 0.06};84 // C for He3 is equal to C for alpha times 4/385 G4double C = 0.0;54 G4double G4He3EvaporationProbability::CCoeficient(G4int aZ) 55 { 56 // Data comes from 57 // Dostrovsky, Fraenkel and Friedlander 58 // Physical Review, vol 116, num. 3 1959 59 // 60 // const G4int size = 5; 61 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 62 // G4double Calpha[5] = { 0.10, 0.10, 0.10, 0.08, 0.06}; 63 // C for He3 is equal to C for alpha times 4/3 64 G4double C = 0.0; 86 65 87 88 if (aZ <= 30) { 89 C = 0.10; 90 } else if (aZ <= 50) { 91 C = 0.1 + -((aZ-50.)/20.)*0.02; 92 } else if (aZ < 70) { 93 C = 0.08 + -((aZ-70.)/20.)*0.02; 94 } else { 95 C = 0.06; 96 } 97 return C*(4.0/3.0); 66 if (aZ <= 30) 67 { 68 C = 0.10; 69 } 70 else if (aZ <= 50) 71 { 72 C = 0.1 - (aZ - 30)*0.001; 73 } 74 else if (aZ < 70) 75 { 76 C = 0.08 - (aZ - 50)*0.001; 77 } 78 else 79 { 80 C = 0.06; 81 } 82 return C*(4.0/3.0); 98 83 } 99 84 … … 104 89 //OPT=3,4 Kalbach's parameterization 105 90 // 106 G4double G4He3EvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 107 { 108 theA=GetA(); 109 theZ=GetZ(); 110 ResidualA=fragment.GetA()-theA; 111 ResidualZ=fragment.GetZ()-theZ; 112 113 ResidualAthrd=std::pow(ResidualA,0.33333); 114 FragmentA=fragment.GetA(); 115 FragmentAthrd=std::pow(FragmentA,0.33333); 116 117 118 if (OPTxs==0) {std::ostringstream errOs; 119 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (He3's)!!" 120 <<G4endl; 121 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 122 return 0.;} 123 if( OPTxs==1 || OPTxs==2) return G4He3EvaporationProbability::GetOpt12( K); 124 else if (OPTxs==3 || OPTxs==4) return G4He3EvaporationProbability::GetOpt34( K); 125 else{ 126 std::ostringstream errOs; 127 errOs << "BAD He3's CROSS SECTION OPTION AT EVAPORATION!!" <<G4endl; 128 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 129 return 0.; 130 } 131 } 132 // 133 //********************* OPT=1,2 : Chatterjee's cross section ************************ 91 G4double 92 G4He3EvaporationProbability::CrossSection(const G4Fragment & fragment, G4double K) 93 { 94 95 theA=GetA(); 96 theZ=GetZ(); 97 ResidualA=fragment.GetA_asInt()-theA; 98 ResidualZ=fragment.GetZ_asInt()-theZ; 99 100 ResidualAthrd=fG4pow->Z13(ResidualA); 101 FragmentA=fragment.GetA_asInt(); 102 FragmentAthrd=fG4pow->Z13(FragmentA); 103 104 if (OPTxs==0) {std::ostringstream errOs; 105 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (He3's)!!" 106 <<G4endl; 107 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 108 return 0.;} 109 if( OPTxs==1 || OPTxs==2) return G4He3EvaporationProbability::GetOpt12( K); 110 else if (OPTxs==3 || OPTxs==4) return G4He3EvaporationProbability::GetOpt34( K); 111 else{ 112 std::ostringstream errOs; 113 errOs << "BAD He3's CROSS SECTION OPTION AT EVAPORATION!!" <<G4endl; 114 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 115 return 0.; 116 } 117 } 118 119 //********************* OPT=1,2 : Chatterjee's cross section ***************** 134 120 //(fitting to cross section from Bechetti & Greenles OM potential) 135 121 136 122 G4double G4He3EvaporationProbability::GetOpt12(const G4double K) 137 123 { 138 139 G4double Kc=K; 140 141 // JMQ xsec is set constat above limit of validity 142 if (K>50) Kc=50; 143 144 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 145 146 G4double p0 = -3.06; 147 G4double p1 = 278.5; 148 G4double p2 = -1389.; 149 G4double landa0 = -0.00535; 150 G4double landa1 = -11.16; 151 G4double mu0 = 555.5; 152 G4double mu1 = 0.40; 153 G4double nu0 = 687.4; 154 G4double nu1 = -476.3; 155 G4double nu2 = 0.509; 156 G4double delta=1.2; 157 158 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 159 p = p0 + p1/Ec + p2/(Ec*Ec); 160 landa = landa0*ResidualA + landa1; 161 mu = mu0*std::pow(ResidualA,mu1); 162 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 163 q = landa - nu/(Ec*Ec) - 2*p*Ec; 164 r = mu + 2*nu/Ec + p*(Ec*Ec); 165 166 ji=std::max(Kc,Ec); 167 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 168 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 169 170 if (xs <0.0) {xs=0.0;} 124 G4double Kc = K; 125 126 // JMQ xsec is set constat above limit of validity 127 if (K > 50*MeV) { Kc = 50*MeV; } 128 129 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 130 131 G4double p0 = -3.06; 132 G4double p1 = 278.5; 133 G4double p2 = -1389.; 134 G4double landa0 = -0.00535; 135 G4double landa1 = -11.16; 136 G4double mu0 = 555.5; 137 G4double mu1 = 0.40; 138 G4double nu0 = 687.4; 139 G4double nu1 = -476.3; 140 G4double nu2 = 0.509; 141 G4double delta=1.2; 142 143 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 144 p = p0 + p1/Ec + p2/(Ec*Ec); 145 landa = landa0*ResidualA + landa1; 146 147 G4double resmu1 = fG4pow->powZ(ResidualA,mu1); 148 mu = mu0*resmu1; 149 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 150 q = landa - nu/(Ec*Ec) - 2*p*Ec; 151 r = mu + 2*nu/Ec + p*(Ec*Ec); 152 153 ji=std::max(Kc,Ec); 154 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 155 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 156 157 if (xs <0.0) {xs=0.0;} 171 158 172 return xs;159 return xs; 173 160 174 161 } … … 178 165 //c ** 3he from o.m. of gibson et al 179 166 { 180 181 167 G4double landa, mu, nu, p , signor(1.),sig; 182 168 G4double ec,ecsq,xnulam,etest(0.),a; 183 169 G4double b,ecut,cut,ecut2,geom,elab; 184 185 170 186 171 G4double flow = 1.e-18; 187 172 G4double spill= 1.e+18; 188 189 173 190 174 G4double p0 = -2.88; … … 200 184 201 185 G4double ra=0.80; 202 186 203 187 //JMQ 13/02/09 increase of reduced radius to lower the barrier 204 188 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); … … 207 191 p = p0 + p1/ec + p2/ecsq; 208 192 landa = landa0*ResidualA + landa1; 209 a = std::pow(ResidualA,mu1);193 a = fG4pow->powZ(ResidualA,mu1); 210 194 mu = mu0 * a; 211 195 nu = a* (nu0+nu1*ec+nu2*ecsq); 212 196 xnulam = nu / landa; 213 if (xnulam > spill) xnulam=0.;214 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);197 if (xnulam > spill) { xnulam=0.; } 198 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 215 199 216 200 a = -2.*p*ec + landa - nu/ecsq; … … 221 205 ecut = (ecut-a) / (p+p); 222 206 ecut2 = ecut; 223 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 224 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 225 // if (cut < 0.) ecut2 = ecut - 2.; 226 if (cut < 0.) ecut2 = ecut; 227 elab = K * FragmentA / ResidualA; 207 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 208 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 209 // to 0 bellow minimum 210 // if (cut < 0.) ecut2 = ecut - 2.; 211 if (cut < 0.) { ecut2 = ecut; } 212 elab = K * FragmentA /G4double(ResidualA); 228 213 sig = 0.; 229 214 230 215 if (elab <= ec) { //start for E<Ec 231 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;216 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 232 217 } //end for E<Ec 233 218 else { //start for E>Ec 234 219 sig = (landa*elab+mu+nu/elab) * signor; 235 220 geom = 0.; 236 if (xnulam < flow || elab < etest) return sig;221 if (xnulam < flow || elab < etest) { return sig; } 237 222 geom = std::sqrt(theA*K); 238 223 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 243 228 244 229 } 245 246 // ************************** end of cross sections *******************************247 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4NeutronEvaporationChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4NeutronEvaporationChannel.cc,v 1. 4 2006/06/29 20:10:37 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4NeutronEvaporationChannel.cc,v 1.5 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #include "G4NeutronEvaporationChannel.hh" 35 36 37 G4NeutronEvaporationChannel::G4NeutronEvaporationChannel() 38 : G4EvaporationChannel(1,0,"neutron",&theEvaporationProbability,&theCoulombBarrier) 39 {} 36 40 37 const G4NeutronEvaporationChannel & G4NeutronEvaporationChannel::operator=(const G4NeutronEvaporationChannel & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronEvaporationChannel::operator= meant to not be accessable"); 40 return *this; 41 } 42 43 G4NeutronEvaporationChannel::G4NeutronEvaporationChannel(const G4NeutronEvaporationChannel & ) : G4EvaporationChannel() 44 { 45 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronEvaporationChannel::CopyConstructor meant to not be accessable"); 46 } 47 48 G4bool G4NeutronEvaporationChannel::operator==(const G4NeutronEvaporationChannel & right) const 49 { 50 return (this == (G4NeutronEvaporationChannel *) &right); 51 // return false; 52 } 53 54 G4bool G4NeutronEvaporationChannel::operator!=(const G4NeutronEvaporationChannel & right) const 55 { 56 return (this != (G4NeutronEvaporationChannel *) &right); 57 // return true; 58 } 59 41 G4NeutronEvaporationChannel::~G4NeutronEvaporationChannel() 42 {} -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4NeutronEvaporationProbability.cc
r962 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4NeutronEvaporationProbability.cc,v 1.16 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 31 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // cross section option 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 17-11-2010 V.Ivanchenko integer Z and A 33 37 34 38 #include "G4NeutronEvaporationProbability.hh" … … 36 40 G4NeutronEvaporationProbability::G4NeutronEvaporationProbability() : 37 41 G4EvaporationProbability(1,0,2,&theCoulombBarrier) // A,Z,Gamma,&theCoulombBarrier 38 { 39 40 } 41 42 43 G4NeutronEvaporationProbability::G4NeutronEvaporationProbability(const G4NeutronEvaporationProbability &) : G4EvaporationProbability() 44 { 45 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronEvaporationProbability::copy_constructor meant to not be accessable"); 46 } 47 48 49 50 51 const G4NeutronEvaporationProbability & G4NeutronEvaporationProbability:: 52 operator=(const G4NeutronEvaporationProbability &) 53 { 54 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronEvaporationProbability::operator= meant to not be accessable"); 55 return *this; 56 } 57 58 59 G4bool G4NeutronEvaporationProbability::operator==(const G4NeutronEvaporationProbability &) const 60 { 61 return false; 62 } 63 64 G4bool G4NeutronEvaporationProbability::operator!=(const G4NeutronEvaporationProbability &) const 65 { 66 return true; 67 } 68 69 G4double G4NeutronEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 70 { return 0.76+2.2/std::pow(static_cast<G4double>(fragment.GetA()-GetA()),1.0/3.0);} 71 42 {} 43 44 G4NeutronEvaporationProbability::~G4NeutronEvaporationProbability() 45 {} 46 47 G4double G4NeutronEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 48 { 49 return 0.76+2.2/fG4pow->Z13(fragment.GetA_asInt()-GetA()); 50 } 72 51 73 G4double G4NeutronEvaporationProbability::CalcBetaParam(const G4Fragment & fragment) 74 { return (2.12/std::pow(static_cast<G4double>(fragment.GetA()-GetA()),2.0/3.0) - 0.05)*MeV/ 75 CalcAlphaParam(fragment); } 76 52 G4double G4NeutronEvaporationProbability::CalcBetaParam(const G4Fragment & fragment) 53 { 54 return (2.12/fG4pow->Z23(fragment.GetA_asInt()-GetA()) - 0.05)*MeV/ 55 CalcAlphaParam(fragment); 56 } 77 57 78 58 //////////////////////////////////////////////////////////////////////////////////// … … 82 62 //OPT=3,4 Kalbach's parameterization 83 63 // 84 G4double G4NeutronEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 64 G4double 65 G4NeutronEvaporationProbability::CrossSection(const G4Fragment & fragment, G4double K) 85 66 { 86 67 theA=GetA(); 87 68 theZ=GetZ(); 88 ResidualA=fragment.GetA()-theA; 89 ResidualZ=fragment.GetZ()-theZ; 90 91 ResidualAthrd=std::pow(ResidualA,0.33333); 92 FragmentA=fragment.GetA(); 93 FragmentAthrd=std::pow(FragmentA,0.33333); 94 69 ResidualA=fragment.GetA_asInt()-theA; 70 ResidualZ=fragment.GetZ_asInt()-theZ; 71 72 ResidualAthrd=fG4pow->Z13(ResidualA); 73 FragmentA=fragment.GetA_asInt(); 74 FragmentAthrd=fG4pow->Z13(FragmentA); 95 75 96 76 if (OPTxs==0) {std::ostringstream errOs; … … 107 87 } 108 88 } 109 110 111 112 113 114 115 //********************* OPT=1,2 : Chatterjee's cross section ************************ 89 90 //********************* OPT=1,2 : Chatterjee's cross section *************** 116 91 //(fitting to cross section from Bechetti & Greenles OM potential) 117 92 118 G4double G4NeutronEvaporationProbability::GetOpt12( constG4double K)93 G4double G4NeutronEvaporationProbability::GetOpt12(G4double K) 119 94 { 120 121 95 G4double Kc=K; 122 96 123 // JMQ xsec is set constat above limit of validity 124 if (K>50) Kc=50; 97 // Pramana (Bechetti & Greenles) for neutrons is chosen 98 99 // JMQ xsec is set constat above limit of validity 100 if (K > 50*MeV) { Kc = 50*MeV; } 125 101 126 102 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs; … … 143 119 errOs <<" xsec("<<Kc<<" MeV) ="<<xs <<G4endl; 144 120 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 145 }121 } 146 122 return xs; 147 123 } 148 124 149 150 125 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 151 G4double G4NeutronEvaporationProbability::GetOpt34( constG4double K)126 G4double G4NeutronEvaporationProbability::GetOpt34(G4double K) 152 127 { 153 154 128 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2; 155 129 G4double p, p0, p1, p2; … … 157 131 G4double b,ecut,cut,ecut2,geom,elab; 158 132 159 //safety initialization133 //safety initialization 160 134 landa0=0; 161 135 landa1=0; … … 169 143 p2=0.; 170 144 171 172 145 flow = 1.e-18; 173 146 spill= 1.0e+18; 174 147 175 176 177 // PRECO xs for neutrons is choosen 178 148 // PRECO xs for neutrons is choosen 179 149 p0 = -312.; 180 150 p1= 0.; … … 188 158 nu2 = 1280.8; 189 159 190 if (ResidualA < 40 .) signor=0.7+ResidualA*0.0075;191 if (ResidualA > 210 .) signor = 1. + (ResidualA-210.)/250.;160 if (ResidualA < 40) { signor =0.7 + ResidualA*0.0075; } 161 if (ResidualA > 210) { signor = 1. + (ResidualA-210)/250.; } 192 162 landa = landa0/ResidualAthrd + landa1; 193 163 mu = mu0*ResidualAthrd + mu1*ResidualAthrd*ResidualAthrd; … … 195 165 196 166 // JMQ very low energy behaviour corrected (problem for A (apprx.)>60) 197 if (nu < 0.) nu=-nu;167 if (nu < 0.) { nu=-nu; } 198 168 199 169 ec = 0.5; … … 202 172 xnulam = 1.; 203 173 etest = 32.; 204 // ** etest is the energy above which the rxn cross section is 205 // ** compared with the geometrical limit and the max taken. 206 // ** xnulam here is a dummy value to be used later. 207 208 174 // ** etest is the energy above which the rxn cross section is 175 // ** compared with the geometrical limit and the max taken. 176 // ** xnulam here is a dummy value to be used later. 209 177 210 178 a = -2.*p*ec + landa - nu/ecsq; … … 212 180 ecut = 0.; 213 181 cut = a*a - 4.*p*b; 214 if (cut > 0.) ecut = std::sqrt(cut);182 if (cut > 0.) { ecut = std::sqrt(cut); } 215 183 ecut = (ecut-a) / (p+p); 216 184 ecut2 = ecut; 217 if (cut < 0.) ecut2 = ecut - 2.;218 elab = K * FragmentA / ResidualA;185 if (cut < 0.) { ecut2 = ecut - 2.; } 186 elab = K * FragmentA / G4double(ResidualA); 219 187 sig = 0.; 220 188 if (elab <= ec) { //start for E<Ec 221 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;189 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 222 190 } //end for E<Ec 223 191 else { //start for E>Ec 224 192 sig = (landa*elab+mu+nu/elab) * signor; 225 193 geom = 0.; 226 if (xnulam < flow || elab < etest) return sig;194 if (xnulam < flow || elab < etest) { return sig; } 227 195 geom = std::sqrt(theA*K); 228 196 geom = 1.23*ResidualAthrd + ra + 4.573/geom; 229 197 geom = 31.416 * geom * geom; 230 198 sig = std::max(geom,sig); 199 231 200 } 232 return sig;} 233 234 // ************************** end of cross sections ******************************* 235 201 return sig; 202 } 203 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4ProtonEvaporationChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4ProtonEvaporationChannel.cc,v 1. 4 2006/06/29 20:10:41 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4ProtonEvaporationChannel.cc,v 1.5 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #include "G4ProtonEvaporationChannel.hh" 35 36 37 G4ProtonEvaporationChannel::G4ProtonEvaporationChannel() 38 : G4EvaporationChannel(1,1,"proton",&theEvaporationProbability,&theCoulombBarrier) 39 {} 36 40 37 const G4ProtonEvaporationChannel & G4ProtonEvaporationChannel::operator=(const G4ProtonEvaporationChannel & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4ProtonEvaporationChannel::operator= meant to not be accessable"); 40 return *this; 41 } 42 43 G4ProtonEvaporationChannel::G4ProtonEvaporationChannel(const G4ProtonEvaporationChannel & ) : G4EvaporationChannel() 44 { 45 throw G4HadronicException(__FILE__, __LINE__, "G4ProtonEvaporationChannel::CopyConstructor meant to not be accessable"); 46 } 47 48 G4bool G4ProtonEvaporationChannel::operator==(const G4ProtonEvaporationChannel & right) const 49 { 50 return (this == (G4ProtonEvaporationChannel *) &right); 51 // return false; 52 } 53 54 G4bool G4ProtonEvaporationChannel::operator!=(const G4ProtonEvaporationChannel & right) const 55 { 56 return (this != (G4ProtonEvaporationChannel *) &right); 57 // return true; 58 } 59 60 41 G4ProtonEvaporationChannel::~G4ProtonEvaporationChannel() 42 {} -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4ProtonEvaporationProbability.cc
r1315 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4ProtonEvaporationProbability.cc,v 1.17 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 31 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // cross section option 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 17-11-2010 V.Ivanchenko integer Z and A 33 37 34 38 #include "G4ProtonEvaporationProbability.hh" … … 36 40 G4ProtonEvaporationProbability::G4ProtonEvaporationProbability() : 37 41 G4EvaporationProbability(1,1,2,&theCoulombBarrier) // A,Z,Gamma,&theCoulombBarrier 38 { 39 40 } 41 42 G4ProtonEvaporationProbability::G4ProtonEvaporationProbability(const G4ProtonEvaporationProbability &) : G4EvaporationProbability() 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4ProtonEvaporationProbability::copy_constructor meant to not be accessable"); 45 } 46 47 const G4ProtonEvaporationProbability & G4ProtonEvaporationProbability:: 48 operator=(const G4ProtonEvaporationProbability &) 49 { 50 throw G4HadronicException(__FILE__, __LINE__, "G4ProtonEvaporationProbability::operator= meant to not be accessable"); 51 return *this; 52 } 53 54 55 G4bool G4ProtonEvaporationProbability::operator==(const G4ProtonEvaporationProbability &) const 56 { 57 return false; 58 } 59 60 G4bool G4ProtonEvaporationProbability::operator!=(const G4ProtonEvaporationProbability &) const 61 { 62 return true; 63 } 64 65 G4double G4ProtonEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 66 { return 1.0 + CCoeficient(static_cast<G4double>(fragment.GetZ()-GetZ()));} 67 68 G4double G4ProtonEvaporationProbability::CalcBetaParam(const G4Fragment & ) 42 {} 43 44 G4ProtonEvaporationProbability::~G4ProtonEvaporationProbability() 45 {} 46 47 G4double G4ProtonEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 48 { return 1.0 + CCoeficient(fragment.GetZ_asInt()-GetZ());} 49 50 G4double G4ProtonEvaporationProbability::CalcBetaParam(const G4Fragment & ) 69 51 { return 0.0; } 70 52 71 G4double G4ProtonEvaporationProbability::CCoeficient(const G4doubleaZ)72 { 73 // Data comes from74 // Dostrovsky, Fraenkel and Friedlander75 // Physical Review, vol 116, num. 3 195976 //77 // const G4int size = 5;78 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0};79 // G4double Cp[5] = { 0.50, 0.28, 0.20, 0.15, 0.10};80 G4double C = 0.0;81 82 if (aZ >= 70) {83 C = 0.10;84 } else {85 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;86 }87 88 return C;53 G4double G4ProtonEvaporationProbability::CCoeficient(G4int aZ) 54 { 55 // Data comes from 56 // Dostrovsky, Fraenkel and Friedlander 57 // Physical Review, vol 116, num. 3 1959 58 // 59 // const G4int size = 5; 60 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 61 // G4double Cp[5] = { 0.50, 0.28, 0.20, 0.15, 0.10}; 62 G4double C = 0.0; 63 64 if (aZ >= 70) { 65 C = 0.10; 66 } else { 67 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 68 } 69 70 return C; 89 71 90 72 } … … 97 79 //OPT=3 Kalbach's parameterization 98 80 // 99 G4double G4ProtonEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 100 { 101 // G4cout<<" In G4ProtonEVaporationProbability OPTxs="<<OPTxs<<G4endl; 102 // G4cout<<" In G4ProtonEVaporationProbability useSICB="<<useSICB<<G4endl; 81 G4double 82 G4ProtonEvaporationProbability::CrossSection(const G4Fragment & fragment, G4double K) 83 { 84 // G4cout<<" In G4ProtonEVaporationProbability OPTxs="<<OPTxs<<G4endl; 85 // G4cout<<" In G4ProtonEVaporationProbability useSICB="<<useSICB<<G4endl; 103 86 104 87 theA=GetA(); 105 88 theZ=GetZ(); 106 ResidualA=fragment.GetA()-theA; 107 ResidualZ=fragment.GetZ()-theZ; 108 109 ResidualAthrd=std::pow(ResidualA,0.33333); 110 FragmentA=fragment.GetA(); 111 FragmentAthrd=std::pow(FragmentA,0.33333); 89 ResidualA=fragment.GetA_asInt()-theA; 90 ResidualZ=fragment.GetZ_asInt()-theZ; 91 92 ResidualAthrd=fG4pow->Z13(ResidualA); 93 FragmentA=fragment.GetA_asInt(); 94 FragmentAthrd=fG4pow->Z13(FragmentA); 95 112 96 U=fragment.GetExcitationEnergy(); 113 97 … … 126 110 } 127 111 } 128 //********************* OPT=1 : Chatterjee's cross section ************************ 112 113 //********************* OPT=1 : Chatterjee's cross section ********************* 129 114 //(fitting to cross section from Bechetti & Greenles OM potential) 130 115 131 G4double G4ProtonEvaporationProbability::GetOpt1( constG4double K)116 G4double G4ProtonEvaporationProbability::GetOpt1(G4double K) 132 117 { 133 118 G4double Kc=K; 134 119 135 // JMQ xsec is set constat above limit of validity136 if (K >50) Kc=50;120 // JMQ xsec is set constat above limit of validity 121 if (K > 50*MeV) { Kc = 50*MeV; } 137 122 138 123 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs; … … 154 139 p = p0 + p1/Ec + p2/(Ec*Ec); 155 140 landa = landa0*ResidualA + landa1; 156 mu = mu0*std::pow(ResidualA,mu1); 157 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 141 142 G4double resmu1 = fG4pow->powZ(ResidualA,mu1); 143 mu = mu0*resmu1; 144 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 158 145 q = landa - nu/(Ec*Ec) - 2*p*Ec; 159 146 r = mu + 2*nu/Ec + p*(Ec*Ec); … … 162 149 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 163 150 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 164 if (xs <0.0) {xs=0.0;} 165 166 return xs; 167 168 } 169 170 171 172 //************* OPT=2 : Wellisch's proton reaction cross section ************************ 173 174 G4double G4ProtonEvaporationProbability::GetOpt2(const G4double K) 175 { 176 177 G4double rnpro,rnneu,eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0); 151 if (xs <0.0) {xs=0.0;} 152 153 return xs; 154 } 155 156 //************* OPT=2 : Welisch's proton reaction cross section *************** 157 158 G4double G4ProtonEvaporationProbability::GetOpt2(G4double K) 159 { 160 161 G4double eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0); 178 162 179 //This is redundant when the Coulomb barrier is overimposed to all cross sections 180 //It should be kept when Coulomb barrier only imposed at OPTxs=2, this is why .. 181 182 if(!useSICB && K <= theCoulombBarrier.GetCoulombBarrier(G4lrint(ResidualA),G4lrint(ResidualZ),U)) return xine_th=0.0; 163 // This is redundant when the Coulomb barrier is overimposed to all 164 // cross sections 165 // It should be kept when Coulomb barrier only imposed at OPTxs=2 166 167 if(!useSICB && K<=theCoulombBarrier.GetCoulombBarrier(ResidualA,ResidualZ,U)) 168 { return 0.0; } 183 169 184 170 eekin=K; 185 rnpro=ResidualZ; 186 rnneu=ResidualA-ResidualZ; 171 G4int rnneu=ResidualA-ResidualZ; 187 172 ekin=eekin/1000; 188 189 173 r0=1.36*1.e-15; 190 174 fac=pi*r0*r0; … … 192 176 fac1=b0*(1.-1./ResidualAthrd); 193 177 fac2=1.; 194 if(rnneu > 1.5) fac2=std::log(rnneu);178 if(rnneu > 1.5) { fac2 = fG4pow->logZ(rnneu); } 195 179 xine_th= 1.e+31*fac*fac2*(1.+ResidualAthrd-fac1); 196 180 xine_th=(1.-0.15*std::exp(-ekin))*xine_th/(1.00-0.0007*ResidualA); 197 ff1=0.70-0.0020*ResidualA ;198 ff2=1.00+1/ ResidualA;199 ff3=0.8+18/ ResidualA-0.002*ResidualA;181 ff1=0.70-0.0020*ResidualA; 182 ff2=1.00+1/G4double(ResidualA); 183 ff3=0.8+18/G4double(ResidualA)-0.002*ResidualA; 200 184 fac=1.-(1./(1.+std::exp(-8.*ff1*(std::log10(ekin)+1.37*ff2)))); 201 185 xine_th=xine_th*(1.+ff3*fac); 202 ff1=1.-1/ ResidualA-0.001*ResidualA;203 ff2=1.17-2.7/ ResidualA-0.0014*ResidualA;186 ff1=1.-1/G4double(ResidualA)-0.001*ResidualA; 187 ff2=1.17-2.7/G4double(ResidualA)-0.0014*ResidualA; 204 188 fac=-8.*ff1*(std::log10(ekin)+2.0*ff2); 205 189 fac=1./(1.+std::exp(fac)); 206 xine_th=xine_th*fac; 190 xine_th=xine_th*fac; 207 191 if (xine_th < 0.0){ 208 192 std::ostringstream errOs; … … 212 196 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 213 197 } 214 215 198 return xine_th; 216 217 } 218 199 } 219 200 220 201 // *********** OPT=3 : Kalbach's cross sections (from PRECO code)************* 221 202 G4double G4ProtonEvaporationProbability::GetOpt3(const G4double K) 222 203 { 223 // ** p from becchetti and greenlees (but modified with sub-barrier224 // ** correction function and xp2 changed from -449)204 // ** p from becchetti and greenlees (but modified with sub-barrier 205 // ** correction function and xp2 changed from -449) 225 206 226 207 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2; … … 236 217 nu1 = -182.4; 237 218 nu2 = -1.872; 238 239 // parameters for proton cross section refinement219 220 // parameters for proton cross section refinement 240 221 G4double afit,bfit,a2,b2; 241 222 afit=-0.0785656; … … 243 224 a2= -0.00089076; 244 225 b2= 0.0231597; 245 226 246 227 G4double ec,ecsq,xnulam,etest(0.),ra(0.),a,w,c,signor(1.),signor2,sig; 247 228 G4double b,ecut,cut,ecut2,geom,elab; 248 249 229 250 230 G4double flow = 1.e-18; 251 231 G4double spill= 1.e+18; 252 253 254 if (ResidualA <= 60.) signor = 0.92; 255 else if (ResidualA < 100.) signor = 0.8 + ResidualA*0.002; 256 257 232 233 if (ResidualA <= 60) { signor = 0.92; } 234 else if (ResidualA < 100) { signor = 0.8 + ResidualA*0.002; } 235 258 236 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 259 237 ecsq = ec * ec; 260 238 p = p0 + p1/ec + p2/ecsq; 261 239 landa = landa0*ResidualA + landa1; 262 a = std::pow(ResidualA,mu1);240 a = fG4pow->powZ(ResidualA,mu1); 263 241 mu = mu0 * a; 264 242 nu = a* (nu0+nu1*ec+nu2*ecsq); 265 243 266 244 c =std::min(3.15,ec*0.5); 267 245 w = 0.7 * c / 3.15; 268 246 269 247 xnulam = nu / landa; 270 if (xnulam > spill) xnulam=0.;271 if (xnulam >= flow) etest =std::sqrt(xnulam) + 7.;272 248 if (xnulam > spill) { xnulam=0.; } 249 if (xnulam >= flow) { etest =std::sqrt(xnulam) + 7.; } 250 273 251 a = -2.*p*ec + landa - nu/ecsq; 274 252 b = p*ecsq + mu + 2.*nu/ec; 275 253 ecut = 0.; 276 254 cut = a*a - 4.*p*b; 277 if (cut > 0.) ecut = std::sqrt(cut);255 if (cut > 0.) { ecut = std::sqrt(cut); } 278 256 ecut = (ecut-a) / (p+p); 279 257 ecut2 = ecut; 280 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 281 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 282 // if (cut < 0.) ecut2 = ecut - 2.; 283 if (cut < 0.) ecut2 = ecut; 284 elab = K * FragmentA / ResidualA; 258 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 259 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 260 // to 0 bellow minimum 261 // if (cut < 0.) ecut2 = ecut - 2.; 262 if (cut < 0.) { ecut2 = ecut; } 263 elab = K * FragmentA /G4double(ResidualA); 285 264 sig = 0.; 286 265 if (elab <= ec) { //start for E<Ec 287 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 266 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 267 288 268 signor2 = (ec-elab-c) / w; 289 269 signor2 = 1. + std::exp(signor2); 290 sig = sig / signor2; 291 }//end for E<=Ec292 else { //start for E>Ec270 sig = sig / signor2; 271 } //end for E<=Ec 272 else{ //start for E>Ec 293 273 sig = (landa*elab+mu+nu/elab) * signor; 294 274 geom = 0.; 295 296 if (xnulam < flow || elab < etest) 297 {275 276 if (xnulam < flow || elab < etest) 277 { 298 278 if (sig <0.0) {sig=0.0;} 299 279 return sig; … … 303 283 geom = 31.416 * geom * geom; 304 284 sig = std::max(geom,sig); 305 285 306 286 } //end for E>Ec 307 return sig;} 308 309 310 311 // ************************** end of cross sections ******************************* 312 287 return sig; 288 } 289 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4TritonEvaporationChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4TritonEvaporationChannel.cc,v 1. 4 2006/06/29 20:10:45 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4TritonEvaporationChannel.cc,v 1.5 2010/11/17 12:14:59 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Nov. 1999) 32 32 // 33 // 17-11-2010 V.Ivanchenko moved constructor and destructor to source and cleanup 33 34 34 35 #include "G4TritonEvaporationChannel.hh" 35 36 37 G4TritonEvaporationChannel::G4TritonEvaporationChannel() 38 : G4EvaporationChannel(3,1,"triton",&theEvaporationProbability,&theCoulombBarrier) 39 {} 36 40 37 const G4TritonEvaporationChannel & G4TritonEvaporationChannel:: 38 operator=(const G4TritonEvaporationChannel & ) 39 { 40 throw G4HadronicException(__FILE__, __LINE__, "G4TritonEvaporationChannel::operator= meant to not be accessable"); 41 return *this; 42 } 41 G4TritonEvaporationChannel::~G4TritonEvaporationChannel() 42 {} 43 43 44 G4TritonEvaporationChannel::G4TritonEvaporationChannel(const G4TritonEvaporationChannel & ) : G4EvaporationChannel()45 {46 throw G4HadronicException(__FILE__, __LINE__, "G4TritonEvaporationChannel::CopyConstructor meant to not be accessable");47 }48 49 G4bool G4TritonEvaporationChannel::operator==(const G4TritonEvaporationChannel & right) const50 {51 return (this == (G4TritonEvaporationChannel *) &right);52 }53 54 G4bool G4TritonEvaporationChannel::operator!=(const G4TritonEvaporationChannel & right) const55 {56 return (this != (G4TritonEvaporationChannel *) &right);57 } -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4TritonEvaporationProbability.cc
r1315 r1347 24 24 // ******************************************************************** 25 25 // 26 //J.M. Quesada (August2008). Based on: 26 // $Id: G4TritonEvaporationProbability.cc,v 1.18 2010/11/17 11:06:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // J.M. Quesada (August2008). Based on: 27 30 // 28 31 // Hadronic Process: Nuclear De-excitations 29 32 // by V. Lara (Oct 1998) 30 33 // 31 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // cross section option 34 // Modified: 35 // 03-09-2008 J.M. Quesada for external choice of inverse cross section option 36 // 17-11-2010 V.Ivanchenko integer Z and A 33 37 34 38 #include "G4TritonEvaporationProbability.hh" … … 36 40 G4TritonEvaporationProbability::G4TritonEvaporationProbability() : 37 41 G4EvaporationProbability(3,1,2,&theCoulombBarrier) // A,Z,Gamma,&theCoulombBarrier 38 { 39 40 } 41 42 G4TritonEvaporationProbability::G4TritonEvaporationProbability(const G4TritonEvaporationProbability &) : G4EvaporationProbability() 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4TritonEvaporationProbability::copy_constructor meant to not be accessable"); 45 } 46 47 48 49 50 const G4TritonEvaporationProbability & G4TritonEvaporationProbability:: 51 operator=(const G4TritonEvaporationProbability &) 52 { 53 throw G4HadronicException(__FILE__, __LINE__, "G4TritonEvaporationProbability::operator= meant to not be accessable"); 54 return *this; 55 } 56 57 58 G4bool G4TritonEvaporationProbability::operator==(const G4TritonEvaporationProbability &) const 59 { 60 return false; 61 } 62 63 G4bool G4TritonEvaporationProbability::operator!=(const G4TritonEvaporationProbability &) const 64 { 65 return true; 66 } 67 68 G4double G4TritonEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 69 { return 1.0 + CCoeficient(static_cast<G4double>(fragment.GetZ()-GetZ()));} 42 {} 43 44 G4TritonEvaporationProbability::~G4TritonEvaporationProbability() 45 {} 46 47 G4double G4TritonEvaporationProbability::CalcAlphaParam(const G4Fragment & fragment) 48 { 49 return 1.0 + CCoeficient(fragment.GetZ_asInt()-GetZ()); 50 } 70 51 71 G4double G4TritonEvaporationProbability::CalcBetaParam(const G4Fragment & ) 72 { return 0.0; } 73 74 G4double G4TritonEvaporationProbability::CCoeficient(const G4double aZ) 75 { 76 // Data comes from 77 // Dostrovsky, Fraenkel and Friedlander 78 // Physical Review, vol 116, num. 3 1959 79 // 80 // const G4int size = 5; 81 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 82 // G4double Cp[5] = { 0.50, 0.28, 0.20, 0.15, 0.10}; 83 // C for triton is equal to C for protons divided by 3 84 G4double C = 0.0; 52 G4double G4TritonEvaporationProbability::CalcBetaParam(const G4Fragment & ) 53 { 54 return 0.0; 55 } 56 57 G4double G4TritonEvaporationProbability::CCoeficient(G4int aZ) 58 { 59 // Data comes from 60 // Dostrovsky, Fraenkel and Friedlander 61 // Physical Review, vol 116, num. 3 1959 62 // 63 // const G4int size = 5; 64 // G4double Zlist[5] = { 10.0, 20.0, 30.0, 50.0, 70.0}; 65 // G4double Cp[5] = { 0.50, 0.28, 0.20, 0.15, 0.10}; 66 // C for triton is equal to C for protons divided by 3 67 G4double C = 0.0; 85 68 86 if (aZ >= 70) {87 C = 0.10;88 } else {89 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;90 }69 if (aZ >= 70) { 70 C = 0.10; 71 } else { 72 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 73 } 91 74 92 return C/3.0; 93 75 return C/3.0; 94 76 } 95 77 … … 100 82 //OPT=3,4 Kalbach's parameterization 101 83 // 102 G4double G4TritonEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 84 G4double 85 G4TritonEvaporationProbability::CrossSection(const G4Fragment & fragment, G4double K) 103 86 { 104 87 theA=GetA(); 105 88 theZ=GetZ(); 106 ResidualA=fragment.GetA ()-theA;107 ResidualZ=fragment.GetZ ()-theZ;89 ResidualA=fragment.GetA_asInt()-theA; 90 ResidualZ=fragment.GetZ_asInt()-theZ; 108 91 109 ResidualAthrd=std::pow(ResidualA,0.33333); 110 FragmentA=fragment.GetA(); 111 FragmentAthrd=std::pow(FragmentA,0.33333); 112 113 92 ResidualAthrd=fG4pow->Z13(ResidualA); 93 FragmentA=fragment.GetA_asInt(); 94 FragmentAthrd=fG4pow->Z13(FragmentA); 95 114 96 if (OPTxs==0) {std::ostringstream errOs; 115 97 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (tritons)!!" … … 128 110 129 111 // 130 //********************* OPT=1,2 : Chatterjee's cross section ***************** *******112 //********************* OPT=1,2 : Chatterjee's cross section ***************** 131 113 //(fitting to cross section from Bechetti & Greenles OM potential) 132 114 133 G4double G4TritonEvaporationProbability::GetOpt12(const G4double K) 134 { 135 115 G4double G4TritonEvaporationProbability::GetOpt12(G4double K) 116 { 136 117 G4double Kc=K; 137 118 138 // JMQ xsec is set constat above limit of validity 139 if (K>50) Kc=50; 140 141 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 142 //G4double Eo(0),epsilon1(0),epsilon2(0),discri(0); 143 119 // JMQ xsec is set constat above limit of validity 120 if (K > 50*MeV) { Kc=50*MeV; } 121 122 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 144 123 145 G4double p0 = -11.04; 146 G4double p1 = 619.1; 147 G4double p2 = -2147.; 148 G4double landa0 = -0.0426; 149 G4double landa1 = -10.33; 150 G4double mu0 = 601.9; 151 G4double mu1 = 0.37; 152 G4double nu0 = 583.0; 153 G4double nu1 = -546.2; 154 G4double nu2 = 1.718; 155 G4double delta=1.2; 156 157 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 158 p = p0 + p1/Ec + p2/(Ec*Ec); 159 landa = landa0*ResidualA + landa1; 160 mu = mu0*std::pow(ResidualA,mu1); 161 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 162 q = landa - nu/(Ec*Ec) - 2*p*Ec; 163 r = mu + 2*nu/Ec + p*(Ec*Ec); 164 165 ji=std::max(Kc,Ec); 166 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 167 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 168 169 if (xs <0.0) {xs=0.0;} 170 171 return xs; 172 124 G4double p0 = -11.04; 125 G4double p1 = 619.1; 126 G4double p2 = -2147.; 127 G4double landa0 = -0.0426; 128 G4double landa1 = -10.33; 129 G4double mu0 = 601.9; 130 G4double mu1 = 0.37; 131 G4double nu0 = 583.0; 132 G4double nu1 = -546.2; 133 G4double nu2 = 1.718; 134 G4double delta=1.2; 135 136 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 137 p = p0 + p1/Ec + p2/(Ec*Ec); 138 landa = landa0*ResidualA + landa1; 139 140 G4double resmu1 = fG4pow->powZ(ResidualA,mu1); 141 mu = mu0*resmu1; 142 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 143 q = landa - nu/(Ec*Ec) - 2*p*Ec; 144 r = mu + 2*nu/Ec + p*(Ec*Ec); 145 146 ji=std::max(Kc,Ec); 147 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 148 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 149 150 if (xs <0.0) {xs=0.0;} 151 152 return xs; 173 153 } 174 154 175 155 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 176 G4double G4TritonEvaporationProbability::GetOpt34( constG4double K)156 G4double G4TritonEvaporationProbability::GetOpt34(G4double K) 177 157 // ** t from o.m. of hafele, flynn et al 178 158 { 179 180 159 G4double landa, mu, nu, p , signor(1.),sig; 181 160 G4double ec,ecsq,xnulam,etest(0.),a; 182 161 G4double b,ecut,cut,ecut2,geom,elab; 183 184 162 185 163 G4double flow = 1.e-18; 186 164 G4double spill= 1.e+18; … … 205 183 p = p0 + p1/ec + p2/ecsq; 206 184 landa = landa0*ResidualA + landa1; 207 a = std::pow(ResidualA,mu1);185 a = fG4pow->powZ(ResidualA,mu1); 208 186 mu = mu0 * a; 209 187 nu = a* (nu0+nu1*ec+nu2*ecsq); 210 188 xnulam = nu / landa; 211 if (xnulam > spill) xnulam=0.;212 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);213 189 if (xnulam > spill) { xnulam=0.; } 190 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 191 214 192 a = -2.*p*ec + landa - nu/ecsq; 215 193 b = p*ecsq + mu + 2.*nu/ec; 216 194 ecut = 0.; 217 195 cut = a*a - 4.*p*b; 218 if (cut > 0.) ecut = std::sqrt(cut);196 if (cut > 0.) { ecut = std::sqrt(cut); } 219 197 ecut = (ecut-a) / (p+p); 220 198 ecut2 = ecut; 221 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 222 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 223 // if (cut < 0.) ecut2 = ecut - 2.; 224 if (cut < 0.) ecut2 = ecut; 225 elab = K * FragmentA / ResidualA; 199 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 200 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 201 // to 0 bellow minimum 202 // if (cut < 0.) ecut2 = ecut - 2.; 203 if (cut < 0.) { ecut2 = ecut; } 204 elab = K * FragmentA / G4double(ResidualA); 226 205 sig = 0.; 227 206 228 207 if (elab <= ec) { //start for E<Ec 229 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;208 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 230 209 } //end for E<Ec 231 else { //start for E>Ec 210 else { //start for E>Ec 232 211 sig = (landa*elab+mu+nu/elab) * signor; 233 212 geom = 0.; 234 if (xnulam < flow || elab < etest) return sig;213 if (xnulam < flow || elab < etest) { return sig; } 235 214 geom = std::sqrt(theA*K); 236 215 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 239 218 } //end for E>Ec 240 219 return sig; 241 242 } 243 244 // ************************** end of cross sections ******************************* 245 220 } 221 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4UnstableFragmentBreakUp.cc
r1340 r1347 25 25 // 26 26 // $Id: G4UnstableFragmentBreakUp.cc,v 1.8 2010/06/25 09:46:09 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4VEvaporation.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEvaporation.cc,v 1. 7 2010/04/27 14:00:40vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4VEvaporation.cc,v 1.8 2010/10/29 17:35:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // Hadronic Process: Nuclear De-excitations … … 33 33 #include "G4VEvaporation.hh" 34 34 35 G4VEvaporation::G4VEvaporation() 35 G4VEvaporation::G4VEvaporation():OPTxs(3),useSICB(false) 36 36 {} 37 37 -
trunk/source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4VFermiFragment.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4VFermiFragment.hh,v 1. 3 2006/06/29 20:12:37 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4VFermiFragment.hh,v 1.4 2010/10/29 17:35:03 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 35 35 36 36 #include "G4FragmentVector.hh" 37 #include "G4NucleiProperties.hh" 38 #include "G4ParticleTable.hh" 39 #include "G4IonTable.hh" 37 #include "globals.hh" 40 38 41 39 class G4VFermiFragment 42 40 { 43 41 public: 44 G4VFermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE): 45 A(anA), 46 Z(aZ), 47 Polarization(Pol), 48 ExcitEnergy(ExE) 49 {} 42 G4VFermiFragment(G4int anA, G4int aZ, G4int Pol, G4double ExE); 50 43 51 virtual ~G4VFermiFragment() {};44 virtual ~G4VFermiFragment(); 52 45 53 46 protected: 54 G4VFermiFragment() {};47 G4VFermiFragment(); 55 48 56 49 private: … … 66 59 virtual G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum) const = 0; 67 60 68 G4int GetA(void) const61 inline G4int GetA(void) const 69 62 { 70 63 return A; 71 64 } 72 65 73 G4int GetZ(void) const66 inline G4int GetZ(void) const 74 67 { 75 68 return Z; 76 69 } 77 70 78 G4int GetPolarization(void) const71 inline G4int GetPolarization(void) const 79 72 { 80 73 return Polarization; 81 74 } 82 75 83 G4double GetExcitationEnergy(void) const76 inline G4double GetExcitationEnergy(void) const 84 77 { 85 78 return ExcitEnergy; 86 79 } 87 80 88 G4double GetFragmentMass(void) const81 inline G4double GetFragmentMass(void) const 89 82 { 90 return G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A);83 return fragmentMass; 91 84 } 92 85 93 G4double GetTotalEnergy(void) const86 inline G4double GetTotalEnergy(void) const 94 87 { 95 return this->GetFragmentMass() + this->GetExcitationEnergy();88 return (GetFragmentMass() + GetExcitationEnergy()); 96 89 } 97 90 … … 106 99 G4double ExcitEnergy; 107 100 101 G4double fragmentMass; 108 102 109 103 }; -
trunk/source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4VFermiFragment.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4VFermiFragment.cc,v 1.5 2006/06/29 20:13:15 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4VFermiFragment.cc,v 1.6 2010/10/29 17:35:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 32 31 33 32 #include "G4VFermiFragment.hh" 34 #include "G4 HadronicException.hh"33 #include "G4NucleiProperties.hh" 35 34 36 G4VFermiFragment::G4VFermiFragment(const G4VFermiFragment &) 35 G4VFermiFragment::G4VFermiFragment(G4int anA, G4int aZ, G4int Pol, G4double ExE): 36 A(anA), 37 Z(aZ), 38 Polarization(Pol), 39 ExcitEnergy(ExE) 37 40 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4VFermiFragment::copy_constructor meant to not be accessable"); 41 fragmentMass = 0.0; 42 if(A > 0) { fragmentMass = G4NucleiProperties::GetNuclearMass(A, Z); } 39 43 } 40 44 41 42 const G4VFermiFragment & G4VFermiFragment::operator=(const G4VFermiFragment &) 45 G4VFermiFragment::G4VFermiFragment(): 46 A(0), 47 Z(0), 48 Polarization(0), 49 ExcitEnergy(0.0) 43 50 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4VFermiFragment::operator= meant to not be accessable"); 45 return *this; 51 fragmentMass = 0.0; 46 52 } 47 53 48 49 G4bool G4VFermiFragment::operator==(const G4VFermiFragment &) const 50 { 51 return false; 52 } 53 54 G4bool G4VFermiFragment::operator!=(const G4VFermiFragment &) const 55 { 56 return true; 57 } 54 G4VFermiFragment::~G4VFermiFragment() 55 {} 58 56 59 57 60 58 59 -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4CompetitiveFission.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CompetitiveFission.hh,v 1. 3 2006/06/29 20:13:19 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CompetitiveFission.hh,v 1.5 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 58 58 private: 59 59 G4CompetitiveFission(const G4CompetitiveFission &right); 60 61 60 const G4CompetitiveFission & operator=(const G4CompetitiveFission &right); 62 public:63 61 G4bool operator==(const G4CompetitiveFission &right) const; 64 62 G4bool operator!=(const G4CompetitiveFission &right) const; … … 121 119 G4double LevelDensityParameter; 122 120 123 124 125 126 121 // -------------------- 127 122 128 129 123 // Sample AtomicNumber of Fission products 130 G4int FissionAtomicNumber( constG4int A, const G4FissionParameters & theParam);131 G4double MassDistribution( const G4double x, constG4double A, const G4FissionParameters & theParam);124 G4int FissionAtomicNumber(G4int A, const G4FissionParameters & theParam); 125 G4double MassDistribution(G4double x, G4double A, const G4FissionParameters & theParam); 132 126 133 127 134 128 // Sample Charge of fission products 135 G4int FissionCharge( const G4double A, const G4double Z, constG4double Af);129 G4int FissionCharge(G4double A, G4double Z, G4double Af); 136 130 137 131 138 132 // Sample Kinetic energy of fission products 139 G4double FissionKineticEnergy( const G4double A, const G4doubleZ,140 const G4double Af1, constG4double Zf1,141 const G4double Af2, constG4double Zf2,142 const G4double U, constG4double Tmax,133 G4double FissionKineticEnergy(G4int A, G4int Z, 134 G4double Af1, G4double Zf1, 135 G4double Af2, G4double Zf2, 136 G4double U, G4double Tmax, 143 137 const G4FissionParameters & theParam); 144 138 139 G4double Ratio(G4double A, G4double A11, G4double B1, G4double A00); 140 G4double SymmetricRatio(G4int A, G4double A11); 141 G4double AsymmetricRatio(G4int A, G4double A11); 145 142 146 147 G4double Ratio(const G4double A,const G4double A11,const G4double B1,const G4double A00); 148 G4double SymmetricRatio(const G4double A,const G4double A11); 149 G4double AsymmetricRatio(const G4double A,const G4double A11); 150 151 152 153 G4ThreeVector IsotropicVector(const G4double Magnitude = 1.0); 154 143 G4ThreeVector IsotropicVector(G4double Magnitude = 1.0); 155 144 156 145 #ifdef debug … … 159 148 #endif 160 149 161 162 150 }; 163 164 165 151 166 152 #endif -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4FissionBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionBarrier.hh,v 1. 5 2009/12/16 16:50:07vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionBarrier.hh,v 1.6 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 41 41 { 42 42 public: 43 G4FissionBarrier() {};44 ~G4FissionBarrier() {};43 G4FissionBarrier(); 44 ~G4FissionBarrier(); 45 45 46 46 private: … … 52 52 53 53 public: 54 G4double FissionBarrier( const G4int A, const G4int Z, constG4double U);54 G4double FissionBarrier(G4int A, G4int Z, G4double U); 55 55 56 56 57 57 private: 58 58 59 G4double BarashenkovFissionBarrier( const G4int A, constG4int Z);59 G4double BarashenkovFissionBarrier(G4int A, G4int Z); 60 60 61 G4double SellPlusPairingCorrection(const G4int Z, constG4int N)61 inline G4double SellPlusPairingCorrection(G4int Z, G4int N) 62 62 { 63 63 G4CameronShellPlusPairingCorrections* SPtr = G4CameronShellPlusPairingCorrections::GetInstance(); -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4FissionLevelDensityParameter.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionLevelDensityParameter.hh,v 1. 3 2006/06/29 20:13:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionLevelDensityParameter.hh,v 1.4 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 45 45 { 46 46 public: 47 G4FissionLevelDensityParameter() {};48 virtual ~G4FissionLevelDensityParameter() {};47 G4FissionLevelDensityParameter(); 48 virtual ~G4FissionLevelDensityParameter(); 49 49 50 50 private: … … 56 56 57 57 public: 58 G4double LevelDensityParameter( const G4int A,const G4int Z,constG4double U) const;58 G4double LevelDensityParameter(G4int A, G4int Z, G4double U) const; 59 59 60 60 -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4FissionParameters.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionParameters.hh,v 1. 3 2006/06/29 20:13:25 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionParameters.hh,v 1.4 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 44 44 public: 45 45 // Only available constructor 46 G4FissionParameters( const G4int A, const G4int Z, const G4double ExEnergy, constG4double FissionBarrier);46 G4FissionParameters(G4int A, G4int Z, G4double ExEnergy, G4double FissionBarrier); 47 47 48 ~G4FissionParameters() {};48 ~G4FissionParameters(); 49 49 50 50 private: 51 51 // Default constructor 52 G4FissionParameters() {};52 G4FissionParameters(); 53 53 54 54 // Copy constructor -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4FissionProbability.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionProbability.hh,v 1. 3 2006/06/29 20:13:27 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionProbability.hh,v 1.4 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 46 46 public: 47 47 // Default constructor 48 G4FissionProbability() {};48 G4FissionProbability(); 49 49 50 ~G4FissionProbability() {};50 ~G4FissionProbability(); 51 51 52 52 private: … … 59 59 60 60 public: 61 G4double EmissionProbability(const G4Fragment & fragment, constG4double MaximalKineticEnergy);61 G4double EmissionProbability(const G4Fragment & fragment, G4double MaximalKineticEnergy); 62 62 63 63 private: 64 G4EvaporationLevelDensityParameter theEvapLDP;65 G4FissionLevelDensityParameter theFissLDP;64 G4EvaporationLevelDensityParameter theEvapLDP; 65 G4FissionLevelDensityParameter theFissLDP; 66 66 67 67 -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4ParaFissionModel.hh
r819 r1347 25 25 // 26 26 #ifndef G4ParaFissionModel_h 27 #define G4ParaFissionModel_h 27 #define G4ParaFissionModel_h 1 28 28 29 29 #include "G4CompetitiveFission.hh" … … 49 49 SetMaxEnergy( 60.*MeV ); 50 50 } 51 52 ~G4ParaFissionModel() {}; 51 53 52 54 virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 53 G4Nucleus& theNucleus)55 G4Nucleus& theNucleus) 54 56 { 55 57 theParticleChange.Clear(); … … 59 61 // prepare the fragment 60 62 61 G4Fragment anInitialState; 62 G4double anA = theNucleus.GetN(); 63 G4double aZ = theNucleus.GetZ(); 64 G4double nucMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4int(aZ) ,G4int(anA)); 65 66 anA += aTrack.GetDefinition()->GetBaryonNumber(); 67 aZ += aTrack.GetDefinition()->GetPDGCharge(); 63 G4int A = theNucleus.GetA_asInt(); 64 G4int Z = theNucleus.GetZ_asInt(); 65 G4double nucMass = 66 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A); 68 67 69 68 G4int numberOfEx = aTrack.GetDefinition()->GetBaryonNumber(); 70 G4int numberOfCh = G4int( std::abs(aTrack.GetDefinition()->GetPDGCharge()));69 G4int numberOfCh = G4int(aTrack.GetDefinition()->GetPDGCharge() + 0.5); 71 70 G4int numberOfHoles = 0; 71 72 A += numberOfEx; 73 Z += numberOfCh; 72 74 73 G4ThreeVector exciton3Momentum = aTrack.Get4Momentum().vect(); 74 G4double compoundMass = aTrack.GetTotalEnergy(); 75 compoundMass += nucMass; 76 compoundMass = std::sqrt(compoundMass*compoundMass - exciton3Momentum*exciton3Momentum); 77 G4LorentzVector fragment4Momentum(exciton3Momentum, 78 std::sqrt(exciton3Momentum.mag2()+compoundMass*compoundMass)); 79 80 anInitialState.SetA(anA); 81 anInitialState.SetZ(aZ); 82 anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles); 83 anInitialState.SetNumberOfCharged(numberOfCh); 84 anInitialState.SetNumberOfHoles(numberOfHoles); 85 anInitialState.SetMomentum(fragment4Momentum); 75 G4LorentzVector v = aTrack.Get4Momentum() + G4LorentzVector(0.0,0.0,0.0,nucMass); 76 G4Fragment anInitialState(Z,A,v); 77 anInitialState.SetNumberOfExcitedParticle(numberOfEx,numberOfCh); 78 anInitialState.SetNumberOfHoles(0,0); 86 79 87 80 // do the fission … … 103 96 { 104 97 G4ReactionProduct* rp0 = (*theExcitationResult)[j]; 105 G4DynamicParticle* p0 = new G4DynamicParticle; 106 p0->SetDefinition(rp0->GetDefinition() ); 107 p0->SetMomentum(rp0->GetMomentum() ); 98 G4DynamicParticle* p0 = 99 new G4DynamicParticle(rp0->GetDefinition(),rp0->GetMomentum()); 108 100 theParticleChange.AddSecondary(p0); 109 101 delete rp0; … … 114 106 { 115 107 // add secondary 116 G4DynamicParticle* p0 = new G4DynamicParticle;117 p0->SetDefinition(aFragment->GetParticleDefinition());118 p0->SetMomentum(aFragment->GetMomentum().vect());108 G4DynamicParticle* p0 = 109 new G4DynamicParticle(aFragment->GetParticleDefinition(), 110 aFragment->GetMomentum()); 119 111 theParticleChange.AddSecondary(p0); 120 112 } -
trunk/source/processes/hadronic/models/de_excitation/fission/include/G4VFissionBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4VFissionBarrier.hh,v 1. 4 2006/06/29 20:13:31 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4VFissionBarrier.hh,v 1.5 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 41 41 { 42 42 public: 43 G4VFissionBarrier() {};44 virtual ~G4VFissionBarrier() {};43 G4VFissionBarrier(); 44 virtual ~G4VFissionBarrier(); 45 45 46 46 private: … … 52 52 53 53 public: 54 virtual G4double FissionBarrier( const G4int A, constG4int Z,const G4double U) = 0;54 virtual G4double FissionBarrier(G4int A, G4int Z,const G4double U) = 0; 55 55 56 56 -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4CompetitiveFission.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CompetitiveFission.cc,v 1.1 2 2010/05/03 16:49:19vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CompetitiveFission.cc,v 1.14 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 39 39 #include "G4PairingCorrection.hh" 40 40 #include "G4ParticleMomentum.hh" 41 #include "G4Pow.hh" 41 42 42 43 G4CompetitiveFission::G4CompetitiveFission() : G4VEvaporationChannel("fission") … … 57 58 } 58 59 59 G4CompetitiveFission::G4CompetitiveFission(const G4CompetitiveFission &) : G4VEvaporationChannel()60 {61 }62 63 60 G4CompetitiveFission::~G4CompetitiveFission() 64 61 { … … 70 67 } 71 68 72 const G4CompetitiveFission & G4CompetitiveFission::operator=(const G4CompetitiveFission &)73 {74 throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::operator= meant to not be accessable");75 return *this;76 }77 78 G4bool G4CompetitiveFission::operator==(const G4CompetitiveFission &right) const79 {80 return (this == (G4CompetitiveFission *) &right);81 }82 83 G4bool G4CompetitiveFission::operator!=(const G4CompetitiveFission &right) const84 {85 return (this != (G4CompetitiveFission *) &right);86 }87 88 89 90 91 69 void G4CompetitiveFission::Initialize(const G4Fragment & fragment) 92 70 { 93 G4int anA = static_cast<G4int>(fragment.GetA()); 94 G4int aZ = static_cast<G4int>(fragment.GetZ()); 95 G4double ExEnergy = fragment.GetExcitationEnergy() - 96 G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(anA,aZ); 97 98 99 // Saddle point excitation energy ---> A = 65 100 // Fission is excluded for A < 65 101 if (anA >= 65 && ExEnergy > 0.0) { 102 FissionBarrier = theFissionBarrierPtr->FissionBarrier(anA,aZ,ExEnergy); 103 MaximalKineticEnergy = ExEnergy - FissionBarrier; 104 LevelDensityParameter = theLevelDensityPtr->LevelDensityParameter(anA,aZ,ExEnergy); 105 FissionProbability = theFissionProbabilityPtr->EmissionProbability(fragment,MaximalKineticEnergy); 106 } 107 else { 108 MaximalKineticEnergy = -1000.0*MeV; 109 LevelDensityParameter = 0.0; 110 FissionProbability = 0.0; 111 } 112 113 return; 114 } 115 116 71 G4int anA = fragment.GetA_asInt(); 72 G4int aZ = fragment.GetZ_asInt(); 73 G4double ExEnergy = fragment.GetExcitationEnergy() - 74 G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(anA,aZ); 75 76 77 // Saddle point excitation energy ---> A = 65 78 // Fission is excluded for A < 65 79 if (anA >= 65 && ExEnergy > 0.0) { 80 FissionBarrier = theFissionBarrierPtr->FissionBarrier(anA,aZ,ExEnergy); 81 MaximalKineticEnergy = ExEnergy - FissionBarrier; 82 LevelDensityParameter = 83 theLevelDensityPtr->LevelDensityParameter(anA,aZ,ExEnergy); 84 FissionProbability = 85 theFissionProbabilityPtr->EmissionProbability(fragment,MaximalKineticEnergy); 86 } 87 else { 88 MaximalKineticEnergy = -1000.0*MeV; 89 LevelDensityParameter = 0.0; 90 FissionProbability = 0.0; 91 } 92 } 117 93 118 94 G4FragmentVector * G4CompetitiveFission::BreakUp(const G4Fragment & theNucleus) 119 95 { 120 // Nucleus data 121 // Atomic number of nucleus 122 G4int A = static_cast<G4int>(theNucleus.GetA()); 123 // Charge of nucleus 124 G4int Z = static_cast<G4int>(theNucleus.GetZ()); 125 // Excitation energy (in MeV) 126 G4double U = theNucleus.GetExcitationEnergy() - 127 G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z); 128 // Check that U > 0 129 if (U <= 0.0) { 130 G4FragmentVector * theResult = new G4FragmentVector; 131 theResult->push_back(new G4Fragment(theNucleus)); 132 return theResult; 133 } 134 135 136 // Atomic Mass of Nucleus (in MeV) 137 G4double M = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A); 138 139 // Nucleus Momentum 140 G4LorentzVector theNucleusMomentum = theNucleus.GetMomentum(); 141 142 // Calculate fission parameters 143 G4FissionParameters theParameters(A,Z,U,FissionBarrier); 144 145 // First fragment 146 G4int A1 = 0; 147 G4int Z1 = 0; 148 G4double M1 = 0.0; 149 150 // Second fragment 151 G4int A2 = 0; 152 G4int Z2 = 0; 153 G4double M2 = 0.0; 154 155 G4double FragmentsExcitationEnergy = 0.0; 156 G4double FragmentsKineticEnergy = 0.0; 157 158 //JMQ 04/03/09 It will be used latter to fix the bug in energy conservation 159 G4double FissionPairingEnergy=G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z); 160 161 G4int Trials = 0; 162 do { 163 164 // First fragment 165 A1 = FissionAtomicNumber(A,theParameters); 166 Z1 = FissionCharge(A,Z,A1); 167 M1 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z1,A1); 168 169 170 // Second Fragment 171 A2 = A - A1; 172 Z2 = Z - Z1; 173 if (A2 < 1 || Z2 < 0) 174 throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakUp: Can't define second fragment! "); 175 176 M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2); 177 178 // Check that fragment masses are less or equal than total energy 179 if (M1 + M2 > theNucleusMomentum.e()) 180 throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakUp: Fragments Mass > Total Energy"); 181 182 // Maximal Kinetic Energy (available energy for fragments) 183 G4double Tmax = M + U - M1 - M2; 184 185 FragmentsKineticEnergy = FissionKineticEnergy( A , Z, 186 A1, Z1, 187 A2, Z2, 188 U , Tmax, 189 theParameters); 96 // Nucleus data 97 // Atomic number of nucleus 98 G4int A = theNucleus.GetA_asInt(); 99 // Charge of nucleus 100 G4int Z = theNucleus.GetZ_asInt(); 101 // Excitation energy (in MeV) 102 G4double U = theNucleus.GetExcitationEnergy() - 103 G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z); 104 // Check that U > 0 105 if (U <= 0.0) { 106 G4FragmentVector * theResult = new G4FragmentVector; 107 theResult->push_back(new G4Fragment(theNucleus)); 108 return theResult; 109 } 110 111 // Atomic Mass of Nucleus (in MeV) 112 G4double M = theNucleus.GetGroundStateMass(); 113 114 // Nucleus Momentum 115 G4LorentzVector theNucleusMomentum = theNucleus.GetMomentum(); 116 117 // Calculate fission parameters 118 G4FissionParameters theParameters(A,Z,U,FissionBarrier); 119 120 // First fragment 121 G4int A1 = 0; 122 G4int Z1 = 0; 123 G4double M1 = 0.0; 124 125 // Second fragment 126 G4int A2 = 0; 127 G4int Z2 = 0; 128 G4double M2 = 0.0; 129 130 G4double FragmentsExcitationEnergy = 0.0; 131 G4double FragmentsKineticEnergy = 0.0; 132 133 //JMQ 04/03/09 It will be used latter to fix the bug in energy conservation 134 G4double FissionPairingEnergy= 135 G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z); 136 137 G4int Trials = 0; 138 do { 139 140 // First fragment 141 A1 = FissionAtomicNumber(A,theParameters); 142 Z1 = FissionCharge(A,Z,A1); 143 M1 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z1,A1); 144 145 // Second Fragment 146 A2 = A - A1; 147 Z2 = Z - Z1; 148 if (A2 < 1 || Z2 < 0) { 149 throw G4HadronicException(__FILE__, __LINE__, 150 "G4CompetitiveFission::BreakUp: Can't define second fragment! "); 151 } 152 M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2); 153 154 // Check that fragment masses are less or equal than total energy 155 if (M1 + M2 > theNucleusMomentum.e()) { 156 throw G4HadronicException(__FILE__, __LINE__, 157 "G4CompetitiveFission::BreakUp: Fragments Mass > Total Energy"); 158 } 159 // Maximal Kinetic Energy (available energy for fragments) 160 G4double Tmax = M + U - M1 - M2; 161 162 FragmentsKineticEnergy = FissionKineticEnergy( A , Z, 163 A1, Z1, 164 A2, Z2, 165 U , Tmax, 166 theParameters); 190 167 191 // Excitation Energy 192 // FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy; 193 // JMQ 04/03/09 BUG FIXED: in order to fulfill energy conservation the 194 // fragments carry the fission pairing energy in form of 195 //excitation energy 196 197 FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy+FissionPairingEnergy; 198 199 } while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100); 168 // Excitation Energy 169 // FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy; 170 // JMQ 04/03/09 BUG FIXED: in order to fulfill energy conservation the 171 // fragments carry the fission pairing energy in form of 172 //excitation energy 173 174 FragmentsExcitationEnergy = 175 Tmax - FragmentsKineticEnergy+FissionPairingEnergy; 176 177 } while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100); 200 178 201 202 203 if (FragmentsExcitationEnergy <= 0.0) 204 throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakItUp: Excitation energy for fragments < 0.0!"); 205 206 207 // while (FragmentsExcitationEnergy < 0 && Trials < 100); 208 209 // Fragment 1 210 G4double U1 = FragmentsExcitationEnergy * (static_cast<G4double>(A1)/static_cast<G4double>(A)); 179 if (FragmentsExcitationEnergy <= 0.0) { 180 throw G4HadronicException(__FILE__, __LINE__, 181 "G4CompetitiveFission::BreakItUp: Excitation energy for fragments < 0.0!"); 182 } 183 184 // while (FragmentsExcitationEnergy < 0 && Trials < 100); 185 186 // Fragment 1 187 G4double U1 = FragmentsExcitationEnergy * A1/static_cast<G4double>(A); 211 188 // Fragment 2 212 G4double U2 = FragmentsExcitationEnergy * (static_cast<G4double>(A2)/static_cast<G4double>(A)); 213 214 215 //JMQ 04/03/09 Full relativistic calculation is performed 216 // 217 G4double Fragment1KineticEnergy=(FragmentsKineticEnergy*(FragmentsKineticEnergy+2*(M2+U2)))/(2*(M1+U1+M2+U2+FragmentsKineticEnergy)); 218 G4ParticleMomentum Momentum1(IsotropicVector(std::sqrt(Fragment1KineticEnergy*(Fragment1KineticEnergy+2*(M1+U1))))); 219 G4ParticleMomentum Momentum2(-Momentum1); 220 G4LorentzVector FourMomentum1(Momentum1,std::sqrt(Momentum1.mag2()+(M1+U1)*(M1+U1))); 221 G4LorentzVector FourMomentum2(Momentum2,std::sqrt(Momentum2.mag2()+(M2+U2)*(M2+U2))); 222 223 //JMQ 04/03/09 now we do Lorentz boosts (instead of Galileo boosts) 224 FourMomentum1.boost(theNucleusMomentum.boostVector()); 225 FourMomentum2.boost(theNucleusMomentum.boostVector()); 189 G4double U2 = FragmentsExcitationEnergy * A2/static_cast<G4double>(A); 190 191 //JMQ 04/03/09 Full relativistic calculation is performed 192 // 193 G4double Fragment1KineticEnergy= 194 (FragmentsKineticEnergy*(FragmentsKineticEnergy+2*(M2+U2))) 195 /(2*(M1+U1+M2+U2+FragmentsKineticEnergy)); 196 G4ParticleMomentum Momentum1(IsotropicVector(std::sqrt(Fragment1KineticEnergy*(Fragment1KineticEnergy+2*(M1+U1))))); 197 G4ParticleMomentum Momentum2(-Momentum1); 198 G4LorentzVector FourMomentum1(Momentum1,std::sqrt(Momentum1.mag2()+(M1+U1)*(M1+U1))); 199 G4LorentzVector FourMomentum2(Momentum2,std::sqrt(Momentum2.mag2()+(M2+U2)*(M2+U2))); 200 201 //JMQ 04/03/09 now we do Lorentz boosts (instead of Galileo boosts) 202 FourMomentum1.boost(theNucleusMomentum.boostVector()); 203 FourMomentum2.boost(theNucleusMomentum.boostVector()); 226 204 227 //////////JMQ 04/03: Old version calculation is commented 228 // There was vioation of energy momentum conservation 229 230 // G4double Pmax = std::sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) / 231 // ( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy); 232 233 //G4ParticleMomentum momentum1 = IsotropicVector( Pmax ); 234 // G4ParticleMomentum momentum2( -momentum1 ); 235 236 // Perform a Galileo boost for fragments 237 // momentum1 += (theNucleusMomentum.boostVector() * (M1+U1)); 238 // momentum2 += (theNucleusMomentum.boostVector() * (M2+U2)); 239 240 241 // Create 4-momentum for first fragment 242 // Warning!! Energy conservation is broken 243 //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 244 // G4LorentzVector FourMomentum1( momentum1 , std::sqrt(momentum1.mag2() + (M1+U1)*(M1+U1))); 245 246 // Create 4-momentum for second fragment 247 // Warning!! Energy conservation is broken 248 //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 249 // G4LorentzVector FourMomentum2( momentum2 , std::sqrt(momentum2.mag2() + (M2+U2)*(M2+U2))); 250 251 ////////// 252 253 // Create Fragments 254 G4Fragment * Fragment1 = new G4Fragment( A1, Z1, FourMomentum1); 255 if (!Fragment1) throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakItUp: Can't create Fragment1! "); 256 G4Fragment * Fragment2 = new G4Fragment( A2, Z2, FourMomentum2); 257 if (!Fragment2) throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakItUp: Can't create Fragment2! "); 258 259 #ifdef PRECOMPOUND_TEST 260 Fragment1->SetCreatorModel(G4String("G4CompetitiveFission")); 261 Fragment2->SetCreatorModel(G4String("G4CompetitiveFission")); 205 //////////JMQ 04/03: Old version calculation is commented 206 // There was vioation of energy momentum conservation 207 208 // G4double Pmax = std::sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) / 209 // ( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy); 210 211 //G4ParticleMomentum momentum1 = IsotropicVector( Pmax ); 212 // G4ParticleMomentum momentum2( -momentum1 ); 213 214 // Perform a Galileo boost for fragments 215 // momentum1 += (theNucleusMomentum.boostVector() * (M1+U1)); 216 // momentum2 += (theNucleusMomentum.boostVector() * (M2+U2)); 217 218 219 // Create 4-momentum for first fragment 220 // Warning!! Energy conservation is broken 221 //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 222 // G4LorentzVector FourMomentum1( momentum1 , std::sqrt(momentum1.mag2() + (M1+U1)*(M1+U1))); 223 224 // Create 4-momentum for second fragment 225 // Warning!! Energy conservation is broken 226 //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 227 // G4LorentzVector FourMomentum2( momentum2 , std::sqrt(momentum2.mag2() + (M2+U2)*(M2+U2))); 228 229 ////////// 230 231 // Create Fragments 232 G4Fragment * Fragment1 = new G4Fragment( A1, Z1, FourMomentum1); 233 G4Fragment * Fragment2 = new G4Fragment( A2, Z2, FourMomentum2); 234 235 // Create Fragment Vector 236 G4FragmentVector * theResult = new G4FragmentVector; 237 238 theResult->push_back(Fragment1); 239 theResult->push_back(Fragment2); 240 241 #ifdef debug 242 CheckConservation(theNucleus,theResult); 262 243 #endif 263 // Create Fragment Vector 264 G4FragmentVector * theResult = new G4FragmentVector; 265 266 theResult->push_back(Fragment1); 267 theResult->push_back(Fragment2); 268 269 #ifdef debug 270 CheckConservation(theNucleus,theResult); 271 #endif 272 273 return theResult; 274 } 275 276 277 278 G4int G4CompetitiveFission::FissionAtomicNumber(const G4int A, const G4FissionParameters & theParam) 279 // Calculates the atomic number of a fission product 280 { 281 282 // For Simplicity reading code 283 const G4double A1 = theParam.GetA1(); 284 const G4double A2 = theParam.GetA2(); 285 const G4double As = theParam.GetAs(); 286 // const G4double Sigma1 = theParam.GetSigma1(); 287 const G4double Sigma2 = theParam.GetSigma2(); 288 const G4double SigmaS = theParam.GetSigmaS(); 289 const G4double w = theParam.GetW(); 290 291 292 // G4double FasymAsym = 2.0*std::exp(-((A2-As)*(A2-As))/(2.0*Sigma2*Sigma2)) + 293 // std::exp(-((A1-As)*(A1-As))/(2.0*Sigma1*Sigma1)); 294 295 // G4double FsymA1A2 = std::exp(-((As-(A1+A2))*(As-(A1+A2)))/(2.0*SigmaS*SigmaS)); 296 297 298 G4double C2A = A2 + 3.72*Sigma2; 299 G4double C2S = As + 3.72*SigmaS; 300 301 G4double C2 = 0.0; 302 if (w > 1000.0 ) C2 = C2S; 303 else if (w < 0.001) C2 = C2A; 304 else C2 = std::max(C2A,C2S); 305 306 G4double C1 = A-C2; 307 if (C1 < 30.0) { 308 C2 = A-30.0; 309 C1 = 30.0; 310 } 311 312 G4double Am1 = (As + A1)/2.0; 313 G4double Am2 = (A1 + A2)/2.0; 314 315 // Get Mass distributions as sum of symmetric and asymmetric Gasussians 316 G4double Mass1 = MassDistribution(As,A,theParam); 317 G4double Mass2 = MassDistribution(Am1,A,theParam); 318 G4double Mass3 = MassDistribution(A1,A,theParam); 319 G4double Mass4 = MassDistribution(Am2,A,theParam); 320 G4double Mass5 = MassDistribution(A2,A,theParam); 321 // get maximal value among Mass1,...,Mass5 322 G4double MassMax = Mass1; 323 if (Mass2 > MassMax) MassMax = Mass2; 324 if (Mass3 > MassMax) MassMax = Mass3; 325 if (Mass4 > MassMax) MassMax = Mass4; 326 if (Mass5 > MassMax) MassMax = Mass5; 327 328 // Sample a fragment mass number, which lies between C1 and C2 329 G4double m; 330 G4double Pm; 331 do { 332 m = C1+G4UniformRand()*(C2-C1); 333 Pm = MassDistribution(m,A,theParam); 334 } while (G4UniformRand() > Pm/MassMax); 335 336 return static_cast<G4int>(m+0.5); 337 } 338 339 340 341 342 343 344 G4double G4CompetitiveFission::MassDistribution(const G4double x, const G4double A, 345 const G4FissionParameters & theParam) 346 // This method gives mass distribution F(x) = F_{asym}(x)+w*F_{sym}(x) 347 // which consist of symmetric and asymmetric sum of gaussians components. 348 { 349 G4double Xsym = std::exp(-0.5*(x-theParam.GetAs())*(x-theParam.GetAs())/ 350 (theParam.GetSigmaS()*theParam.GetSigmaS())); 351 352 G4double Xasym = std::exp(-0.5*(x-theParam.GetA2())*(x-theParam.GetA2())/ 353 (theParam.GetSigma2()*theParam.GetSigma2())) + 354 std::exp(-0.5*(x-(A-theParam.GetA2()))*(x-(A-theParam.GetA2()))/ 355 (theParam.GetSigma2()*theParam.GetSigma2())) + 356 0.5*std::exp(-0.5*(x-theParam.GetA1())*(x-theParam.GetA1())/ 357 (theParam.GetSigma1()*theParam.GetSigma1())) + 358 0.5*std::exp(-0.5*(x-(A-theParam.GetA1()))*(x-(A-theParam.GetA1()))/ 359 (theParam.GetSigma1()*theParam.GetSigma1())); 360 361 if (theParam.GetW() > 1000) return Xsym; 362 else if (theParam.GetW() < 0.001) return Xasym; 363 else return theParam.GetW()*Xsym+Xasym; 364 } 365 366 367 368 369 G4int G4CompetitiveFission::FissionCharge(const G4double A, 370 const G4double Z, 371 const G4double Af) 372 // Calculates the charge of a fission product for a given atomic number Af 373 { 374 const G4double sigma = 0.6; 375 G4double DeltaZ = 0.0; 376 if (Af >= 134.0) DeltaZ = -0.45; // 134 <= Af 377 else if (Af <= (A-134.0)) DeltaZ = 0.45; // Af <= (A-134) 378 else DeltaZ = -0.45*(Af-(A/2.0))/(134.0-(A/2.0)); // (A-134) < Af < 134 379 380 G4double Zmean = (Af/A)*Z + DeltaZ; 244 245 return theResult; 246 } 247 248 G4int 249 G4CompetitiveFission::FissionAtomicNumber(G4int A, 250 const G4FissionParameters & theParam) 251 // Calculates the atomic number of a fission product 252 { 253 254 // For Simplicity reading code 255 const G4double A1 = theParam.GetA1(); 256 const G4double A2 = theParam.GetA2(); 257 const G4double As = theParam.GetAs(); 258 // const G4double Sigma1 = theParam.GetSigma1(); 259 const G4double Sigma2 = theParam.GetSigma2(); 260 const G4double SigmaS = theParam.GetSigmaS(); 261 const G4double w = theParam.GetW(); 262 263 // G4double FasymAsym = 2.0*std::exp(-((A2-As)*(A2-As))/(2.0*Sigma2*Sigma2)) + 264 // std::exp(-((A1-As)*(A1-As))/(2.0*Sigma1*Sigma1)); 265 266 // G4double FsymA1A2 = std::exp(-((As-(A1+A2))*(As-(A1+A2)))/(2.0*SigmaS*SigmaS)); 267 268 G4double C2A = A2 + 3.72*Sigma2; 269 G4double C2S = As + 3.72*SigmaS; 270 271 G4double C2 = 0.0; 272 if (w > 1000.0 ) C2 = C2S; 273 else if (w < 0.001) C2 = C2A; 274 else C2 = std::max(C2A,C2S); 275 276 G4double C1 = A-C2; 277 if (C1 < 30.0) { 278 C2 = A-30.0; 279 C1 = 30.0; 280 } 281 282 G4double Am1 = (As + A1)/2.0; 283 G4double Am2 = (A1 + A2)/2.0; 284 285 // Get Mass distributions as sum of symmetric and asymmetric Gasussians 286 G4double Mass1 = MassDistribution(As,A,theParam); 287 G4double Mass2 = MassDistribution(Am1,A,theParam); 288 G4double Mass3 = MassDistribution(A1,A,theParam); 289 G4double Mass4 = MassDistribution(Am2,A,theParam); 290 G4double Mass5 = MassDistribution(A2,A,theParam); 291 // get maximal value among Mass1,...,Mass5 292 G4double MassMax = Mass1; 293 if (Mass2 > MassMax) MassMax = Mass2; 294 if (Mass3 > MassMax) MassMax = Mass3; 295 if (Mass4 > MassMax) MassMax = Mass4; 296 if (Mass5 > MassMax) MassMax = Mass5; 297 298 // Sample a fragment mass number, which lies between C1 and C2 299 G4double m; 300 G4double Pm; 301 do { 302 m = C1+G4UniformRand()*(C2-C1); 303 Pm = MassDistribution(m,A,theParam); 304 } while (MassMax*G4UniformRand() > Pm); 305 306 return static_cast<G4int>(m+0.5); 307 } 308 309 G4double 310 G4CompetitiveFission::MassDistribution(G4double x, G4double A, 311 const G4FissionParameters & theParam) 312 // This method gives mass distribution F(x) = F_{asym}(x)+w*F_{sym}(x) 313 // which consist of symmetric and asymmetric sum of gaussians components. 314 { 315 G4double Xsym = std::exp(-0.5*(x-theParam.GetAs())*(x-theParam.GetAs())/ 316 (theParam.GetSigmaS()*theParam.GetSigmaS())); 317 318 G4double Xasym = std::exp(-0.5*(x-theParam.GetA2())*(x-theParam.GetA2())/ 319 (theParam.GetSigma2()*theParam.GetSigma2())) + 320 std::exp(-0.5*(x-(A-theParam.GetA2()))*(x-(A-theParam.GetA2()))/ 321 (theParam.GetSigma2()*theParam.GetSigma2())) + 322 0.5*std::exp(-0.5*(x-theParam.GetA1())*(x-theParam.GetA1())/ 323 (theParam.GetSigma1()*theParam.GetSigma1())) + 324 0.5*std::exp(-0.5*(x-(A-theParam.GetA1()))*(x-(A-theParam.GetA1()))/ 325 (theParam.GetSigma1()*theParam.GetSigma1())); 326 327 if (theParam.GetW() > 1000) return Xsym; 328 else if (theParam.GetW() < 0.001) return Xasym; 329 else return theParam.GetW()*Xsym+Xasym; 330 } 331 332 G4int G4CompetitiveFission::FissionCharge(G4double A, G4double Z, 333 G4double Af) 334 // Calculates the charge of a fission product for a given atomic number Af 335 { 336 const G4double sigma = 0.6; 337 G4double DeltaZ = 0.0; 338 if (Af >= 134.0) DeltaZ = -0.45; // 134 <= Af 339 else if (Af <= (A-134.0)) DeltaZ = 0.45; // Af <= (A-134) 340 else DeltaZ = -0.45*(Af-(A/2.0))/(134.0-(A/2.0)); // (A-134) < Af < 134 341 342 G4double Zmean = (Af/A)*Z + DeltaZ; 381 343 382 G4double theZ; 383 do { 384 theZ = G4RandGauss::shoot(Zmean,sigma); 385 } while (theZ < 1.0 || theZ > (Z-1.0) || theZ > Af); 386 // return static_cast<G4int>(theZ+0.5); 387 return static_cast<G4int>(theZ+0.5); 388 } 389 390 391 392 393 G4double G4CompetitiveFission::FissionKineticEnergy(const G4double A, const G4double Z, 394 const G4double Af1, const G4double /*Zf1*/, 395 const G4double Af2, const G4double /*Zf2*/, 396 const G4double /*U*/, const G4double Tmax, 397 const G4FissionParameters & theParam) 398 // Gives the kinetic energy of fission products 399 { 400 // Find maximal value of A for fragments 401 G4double AfMax = std::max(Af1,Af2); 402 if (AfMax < (A/2.0)) AfMax = A - AfMax; 403 404 // Weights for symmetric and asymmetric components 405 G4double Pas; 406 if (theParam.GetW() > 1000) Pas = 0.0; 407 else { 408 G4double P1 = 0.5*std::exp(-0.5*(AfMax-theParam.GetA1())*(AfMax-theParam.GetA1())/ 409 (theParam.GetSigma1()*theParam.GetSigma1())); 410 411 G4double P2 = std::exp(-0.5*(AfMax-theParam.GetA2())*(AfMax-theParam.GetA2())/ 412 (theParam.GetSigma2()*theParam.GetSigma2())); 413 414 Pas = P1+P2; 415 } 416 417 418 G4double Ps; 419 if (theParam.GetW() < 0.001) Ps = 0.0; 420 else 421 Ps = theParam.GetW()*std::exp(-0.5*(AfMax-theParam.GetAs())*(AfMax-theParam.GetAs())/ 422 (theParam.GetSigmaS()*theParam.GetSigmaS())); 423 424 425 426 G4double Psy = Ps/(Pas+Ps); 427 428 429 // Fission fractions Xsy and Xas formed in symmetric and asymmetric modes 430 G4double PPas = theParam.GetSigma1() + 2.0 * theParam.GetSigma2(); 431 G4double PPsy = theParam.GetW() * theParam.GetSigmaS(); 432 G4double Xas = PPas / (PPas+PPsy); 433 G4double Xsy = PPsy / (PPas+PPsy); 434 435 436 // Average kinetic energy for symmetric and asymmetric components 437 G4double Eaverage = 0.1071*MeV*(Z*Z)/std::pow(A,1.0/3.0) + 22.2*MeV; 438 439 440 // Compute maximal average kinetic energy of fragments and Energy Dispersion (sqrt) 441 G4double TaverageAfMax; 442 G4double ESigma; 443 // Select randomly fission mode (symmetric or asymmetric) 444 if (G4UniformRand() > Psy) { // Asymmetric Mode 445 G4double A11 = theParam.GetA1()-0.7979*theParam.GetSigma1(); 446 G4double A12 = theParam.GetA1()+0.7979*theParam.GetSigma1(); 447 G4double A21 = theParam.GetA2()-0.7979*theParam.GetSigma2(); 448 G4double A22 = theParam.GetA2()+0.7979*theParam.GetSigma2(); 449 // scale factor 450 G4double ScaleFactor = 0.5*theParam.GetSigma1()*(AsymmetricRatio(A,A11)+AsymmetricRatio(A,A12))+ 451 theParam.GetSigma2()*(AsymmetricRatio(A,A21)+AsymmetricRatio(A,A22)); 452 // Compute average kinetic energy for fragment with AfMax 453 TaverageAfMax = (Eaverage + 12.5 * Xsy) * (PPas/ScaleFactor) * AsymmetricRatio(A,AfMax); 454 ESigma = 10.0*MeV; // MeV 455 456 } else { // Symmetric Mode 457 G4double As0 = theParam.GetAs() + 0.7979*theParam.GetSigmaS(); 458 // scale factor 459 G4double ScaleFactor = theParam.GetW()*theParam.GetSigmaS()*SymmetricRatio(A,As0); 460 // Compute average kinetic energy for fragment with AfMax 461 TaverageAfMax = (Eaverage - 12.5*MeV*Xas) * (PPsy/ScaleFactor) * SymmetricRatio(A,AfMax); 462 ESigma = 8.0*MeV; 463 } 464 465 466 // Select randomly, in accordance with Gaussian distribution, fragment kinetic energy 467 G4double KineticEnergy; 468 G4int i = 0; 469 do { 470 KineticEnergy = G4RandGauss::shoot(TaverageAfMax,ESigma); 471 if (i++ > 100) return Eaverage; 472 } while (KineticEnergy < Eaverage-3.72*ESigma || 473 KineticEnergy > Eaverage+3.72*ESigma || 474 KineticEnergy > Tmax); 475 476 return KineticEnergy; 477 } 478 479 480 481 482 483 G4double G4CompetitiveFission::AsymmetricRatio(const G4double A,const G4double A11) 484 { 485 const G4double B1 = 23.5; 486 const G4double A00 = 134.0; 487 return Ratio(A,A11,B1,A00); 488 } 489 490 G4double G4CompetitiveFission::SymmetricRatio(const G4double A,const G4double A11) 491 { 492 const G4double B1 = 5.32; 493 const G4double A00 = A/2.0; 494 return Ratio(A,A11,B1,A00); 495 } 496 497 G4double G4CompetitiveFission::Ratio(const G4double A,const G4double A11, 498 const G4double B1,const G4double A00) 499 { 500 if (A == 0) throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::Ratio: A == 0!"); 501 if (A11 >= A/2.0 && A11 <= (A00+10.0)) return 1.0-B1*((A11-A00)/A)*((A11-A00)/A); 502 else return 1.0-B1*(10.0/A)*(10.0/A)-2.0*(10.0/A)*B1*((A11-A00-10.0)/A); 503 } 504 505 506 507 344 G4double theZ; 345 do { 346 theZ = G4RandGauss::shoot(Zmean,sigma); 347 } while (theZ < 1.0 || theZ > (Z-1.0) || theZ > Af); 348 // return static_cast<G4int>(theZ+0.5); 349 return static_cast<G4int>(theZ+0.5); 350 } 351 352 G4double 353 G4CompetitiveFission::FissionKineticEnergy(G4int A, G4int Z, 354 G4double Af1, G4double /*Zf1*/, 355 G4double Af2, G4double /*Zf2*/, 356 G4double /*U*/, G4double Tmax, 357 const G4FissionParameters & theParam) 358 // Gives the kinetic energy of fission products 359 { 360 // Find maximal value of A for fragments 361 G4double AfMax = std::max(Af1,Af2); 362 if (AfMax < (A/2.0)) AfMax = A - AfMax; 363 364 // Weights for symmetric and asymmetric components 365 G4double Pas; 366 if (theParam.GetW() > 1000) Pas = 0.0; 367 else { 368 G4double P1 = 0.5*std::exp(-0.5*(AfMax-theParam.GetA1())*(AfMax-theParam.GetA1())/ 369 (theParam.GetSigma1()*theParam.GetSigma1())); 370 371 G4double P2 = std::exp(-0.5*(AfMax-theParam.GetA2())*(AfMax-theParam.GetA2())/ 372 (theParam.GetSigma2()*theParam.GetSigma2())); 373 374 Pas = P1+P2; 375 } 376 377 G4double Ps; 378 if (theParam.GetW() < 0.001) Ps = 0.0; 379 else { 380 Ps = theParam.GetW()*std::exp(-0.5*(AfMax-theParam.GetAs())*(AfMax-theParam.GetAs())/ 381 (theParam.GetSigmaS()*theParam.GetSigmaS())); 382 } 383 G4double Psy = Ps/(Pas+Ps); 384 385 // Fission fractions Xsy and Xas formed in symmetric and asymmetric modes 386 G4double PPas = theParam.GetSigma1() + 2.0 * theParam.GetSigma2(); 387 G4double PPsy = theParam.GetW() * theParam.GetSigmaS(); 388 G4double Xas = PPas / (PPas+PPsy); 389 G4double Xsy = PPsy / (PPas+PPsy); 390 391 // Average kinetic energy for symmetric and asymmetric components 392 G4double Eaverage = 0.1071*MeV*(Z*Z)/G4Pow::GetInstance()->Z13(A) + 22.2*MeV; 393 394 395 // Compute maximal average kinetic energy of fragments and Energy Dispersion (sqrt) 396 G4double TaverageAfMax; 397 G4double ESigma; 398 // Select randomly fission mode (symmetric or asymmetric) 399 if (G4UniformRand() > Psy) { // Asymmetric Mode 400 G4double A11 = theParam.GetA1()-0.7979*theParam.GetSigma1(); 401 G4double A12 = theParam.GetA1()+0.7979*theParam.GetSigma1(); 402 G4double A21 = theParam.GetA2()-0.7979*theParam.GetSigma2(); 403 G4double A22 = theParam.GetA2()+0.7979*theParam.GetSigma2(); 404 // scale factor 405 G4double ScaleFactor = 0.5*theParam.GetSigma1()*(AsymmetricRatio(A,A11)+AsymmetricRatio(A,A12))+ 406 theParam.GetSigma2()*(AsymmetricRatio(A,A21)+AsymmetricRatio(A,A22)); 407 // Compute average kinetic energy for fragment with AfMax 408 TaverageAfMax = (Eaverage + 12.5 * Xsy) * (PPas/ScaleFactor) * AsymmetricRatio(A,AfMax); 409 ESigma = 10.0*MeV; // MeV 410 411 } else { // Symmetric Mode 412 G4double As0 = theParam.GetAs() + 0.7979*theParam.GetSigmaS(); 413 // scale factor 414 G4double ScaleFactor = theParam.GetW()*theParam.GetSigmaS()*SymmetricRatio(A,As0); 415 // Compute average kinetic energy for fragment with AfMax 416 TaverageAfMax = (Eaverage - 12.5*MeV*Xas) * (PPsy/ScaleFactor) * SymmetricRatio(A,AfMax); 417 ESigma = 8.0*MeV; 418 } 419 420 421 // Select randomly, in accordance with Gaussian distribution, fragment kinetic energy 422 G4double KineticEnergy; 423 G4int i = 0; 424 do { 425 KineticEnergy = G4RandGauss::shoot(TaverageAfMax,ESigma); 426 if (i++ > 100) return Eaverage; 427 } while (KineticEnergy < Eaverage-3.72*ESigma || 428 KineticEnergy > Eaverage+3.72*ESigma || 429 KineticEnergy > Tmax); 430 431 return KineticEnergy; 432 } 433 434 G4double G4CompetitiveFission::AsymmetricRatio(G4int A, G4double A11) 435 { 436 const G4double B1 = 23.5; 437 const G4double A00 = 134.0; 438 return Ratio(G4double(A),A11,B1,A00); 439 } 440 441 G4double G4CompetitiveFission::SymmetricRatio(G4int A, G4double A11) 442 { 443 const G4double B1 = 5.32; 444 const G4double A00 = A/2.0; 445 return Ratio(G4double(A),A11,B1,A00); 446 } 447 448 G4double G4CompetitiveFission::Ratio(G4double A, G4double A11, 449 G4double B1, G4double A00) 450 { 451 if (A == 0.0) { 452 throw G4HadronicException(__FILE__, __LINE__, 453 "G4CompetitiveFission::Ratio: A == 0!"); 454 } 455 if (A11 >= A/2.0 && A11 <= (A00+10.0)) { 456 return 1.0-B1*((A11-A00)/A)*((A11-A00)/A); 457 } else { 458 return 1.0-B1*(10.0/A)*(10.0/A)-2.0*(10.0/A)*B1*((A11-A00-10.0)/A); 459 } 460 } 508 461 509 462 G4ThreeVector G4CompetitiveFission::IsotropicVector(const G4double Magnitude) 510 // Samples a isotropic random vectorwith a magnitud given by Magnitude. 511 // By default Magnitude = 1.0 512 { 513 G4double CosTheta = 1.0 - 2.0*G4UniformRand(); 514 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta); 515 G4double Phi = twopi*G4UniformRand(); 516 G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta, 517 Magnitude*std::sin(Phi)*SinTheta, 518 Magnitude*CosTheta); 519 return Vector; 520 } 521 463 // Samples a isotropic random vectorwith a magnitud given by Magnitude. 464 // By default Magnitude = 1.0 465 { 466 G4double CosTheta = 1.0 - 2.0*G4UniformRand(); 467 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta); 468 G4double Phi = twopi*G4UniformRand(); 469 G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta, 470 Magnitude*std::sin(Phi)*SinTheta, 471 Magnitude*CosTheta); 472 return Vector; 473 } 522 474 523 475 #ifdef debug -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionBarrier.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionBarrier.cc,v 1. 7 2009/12/16 16:50:07vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionBarrier.cc,v 1.8 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Oct 1998) 32 32 // 33 // 17.11.2010 V.Ivanchenko cleanup and add usage of G4Pow 33 34 34 35 #include "G4FissionBarrier.hh" 36 #include "G4Pow.hh" 35 37 36 G4FissionBarrier::G4FissionBarrier(const G4FissionBarrier & ) : G4VFissionBarrier() 38 G4FissionBarrier::G4FissionBarrier() 39 {} 40 41 G4FissionBarrier::~G4FissionBarrier() 42 {} 43 44 G4double 45 G4FissionBarrier::FissionBarrier(G4int A, G4int Z, G4double U) 46 // Compute fission barrier according with Barashenkov's 47 // prescription for A >= 65 37 48 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4FissionBarrier::copy_constructor meant to not be accessable."); 49 if (A >= 65) { 50 return BarashenkovFissionBarrier(A,Z)/(1.0 + std::sqrt(U/(2.0*A))); 51 } else { return 100.0*GeV; } 39 52 } 40 53 54 G4double 55 G4FissionBarrier::BarashenkovFissionBarrier(G4int A, G4int Z) 56 // Calculates Fission Barrier heights 57 { 58 // Liquid drop model parameters for 59 // surface energy of a spherical nucleus 60 const G4double aSurf = 17.9439*MeV; 61 // and coulomb energy 62 const G4double aCoul = 0.7053*MeV; 63 const G4double k = 1.7826; 64 G4int N = A - Z; 41 65 42 const G4FissionBarrier & G4FissionBarrier::operator=(const G4FissionBarrier & ) 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4FissionBarrier::operator= meant to not be accessable."); 45 return *this; 66 // fissibility parameter 67 G4double x = (aCoul/(2.0*aSurf))*(Z*Z)/static_cast<G4double>(A); 68 x /= (1.0 - k*(N-Z)*(N-Z)/static_cast<G4double>(A*A)); 69 70 // Liquid drop model part of Fission Barrier 71 G4double BF0 = aSurf*G4Pow::GetInstance()->Z23(A); 72 if (x <= 2./3.) { BF0 *= 0.38*(3./4.-x); } 73 else { BF0 *= 0.83*(1. - x)*(1. - x)*(1. - x); } 74 75 // 76 G4double D = 1.248*MeV; 77 D *= (N - 2*(N/2) + Z - 2*(Z/2)); 78 79 return BF0 + D - SellPlusPairingCorrection(Z,N); 46 80 } 47 81 48 G4bool G4FissionBarrier::operator==(const G4FissionBarrier & ) const49 {50 return false;51 }52 53 G4bool G4FissionBarrier::operator!=(const G4FissionBarrier & ) const54 {55 return true;56 }57 58 59 60 G4double G4FissionBarrier::FissionBarrier(const G4int A, const G4int Z, const G4double U)61 // Compute fission barrier according with Barashenkov's prescription for A >= 6562 {63 if (A >= 65) return BarashenkovFissionBarrier(A,Z)/(1.0 + std::sqrt(U/(2.0*static_cast<G4double>(A))));64 else return 100.0*GeV;65 }66 67 68 G4double G4FissionBarrier::BarashenkovFissionBarrier(const G4int A, const G4int Z)69 // Calculates Fission Barrier heights70 {71 // Liquid drop model parameters for72 // surface energy of a spherical nucleus73 const G4double aSurf = 17.9439*MeV;74 // and coulomb energy75 const G4double aCoul = 0.7053*MeV;76 const G4int N = A - Z;77 const G4double k = 1.7826;78 79 // fissibility parameter80 G4double x = (aCoul/(2.0*aSurf))*(static_cast<G4double>(Z)*static_cast<G4double>(Z))/static_cast<G4double>(A);81 x /= (1.0 - k*(static_cast<G4double>(N-Z)/static_cast<G4double>(A))*82 (static_cast<G4double>(N-Z)/static_cast<G4double>(A)));83 84 // Liquid drop model part of Fission Barrier85 G4double BF0 = aSurf*std::pow(static_cast<G4double>(A),2./3.);86 if (x <= 2./3.) BF0 *= 0.38*(3./4.-x);87 else BF0 *= 0.83*(1. - x)*(1. - x)*(1. - x);88 89 90 //91 G4double D = 1.248*MeV;92 D *= (static_cast<G4double>(N)-2.0*(N/2)) + (static_cast<G4double>(Z)-2.0*(Z/2));93 94 return BF0 + D - SellPlusPairingCorrection(Z,N);95 }96 -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionLevelDensityParameter.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionLevelDensityParameter.cc,v 1. 7 2009/11/21 18:05:26 vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionLevelDensityParameter.cc,v 1.8 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 39 39 40 40 41 G4FissionLevelDensityParameter:: 42 G4FissionLevelDensityParameter(const G4FissionLevelDensityParameter &) : G4VLevelDensityParameter() 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4FissionLevelDensityParameter::copy_constructor meant to not be accessable"); 45 } 41 G4FissionLevelDensityParameter::G4FissionLevelDensityParameter() 42 {} 46 43 47 48 const G4FissionLevelDensityParameter & G4FissionLevelDensityParameter:: 49 operator=(const G4FissionLevelDensityParameter &) 50 { 51 throw G4HadronicException(__FILE__, __LINE__, "G4FissionLevelDensityParameter::operator= meant to not be accessable"); 52 return *this; 53 } 54 55 56 G4bool G4FissionLevelDensityParameter:: 57 operator==(const G4FissionLevelDensityParameter &) const 58 { 59 return false; 60 } 61 62 G4bool G4FissionLevelDensityParameter:: 63 operator!=(const G4FissionLevelDensityParameter &) const 64 { 65 return true; 66 } 44 G4FissionLevelDensityParameter::~G4FissionLevelDensityParameter() 45 {} 67 46 68 47 69 48 G4double G4FissionLevelDensityParameter:: 70 LevelDensityParameter( const G4int A,const G4int Z,constG4double U) const49 LevelDensityParameter(G4int A, G4int Z, G4double U) const 71 50 { 72 51 G4double EvapLDP = -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionParameters.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionParameters.cc,v 1. 7 2009/11/19 10:30:49vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionParameters.cc,v 1.8 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 41 41 const G4double G4FissionParameters::A2 = 141.0; 42 42 43 44 G4FissionParameters::G4FissionParameters(const G4int A, const G4int Z, const G4double ExEnergy, 45 const G4double FissionBarrier) 43 G4FissionParameters::G4FissionParameters(G4int A, G4int Z, G4double ExEnergy, 44 G4double FissionBarrier) 46 45 { 47 G4double U = ExEnergy; 46 G4double U = ExEnergy; 47 48 As = A/2.0; 48 49 49 As = A/2.0; 50 if (A <= 235) Sigma2 = 5.6; // MeV 51 else Sigma2 = 5.6 + 0.096*(A-235); // MeV 50 52 51 if (A <= 235) Sigma2 = 5.6; // MeV 52 else Sigma2 = 5.6 + 0.096*(A-235); // MeV 53 Sigma1 = 0.5*Sigma2; // MeV 53 54 54 Sigma1 = 0.5*Sigma2; // MeV55 SigmaS = std::exp(0.00553*U/MeV + 2.1386); // MeV 55 56 56 SigmaS = std::exp(0.00553*U/MeV + 2.1386); // MeV 57 //JMQ 310509 58 // if (SigmaS > 20.0) SigmaS = 20.0; 59 // SigmaS*=1.3; 60 //JMQ 301009: retuning (after CEM transition prob.have been chosen as default) 61 SigmaS*=0.8; 62 // 57 63 58 //JMQ 310509 59 // if (SigmaS > 20.0) SigmaS = 20.0; 60 // SigmaS*=1.3; 61 //JMQ 301009: retuning (after CEM transition prob.have been chosen as default) 62 SigmaS*=0.8; 63 // 64 G4double FasymAsym = 2.0*std::exp(-((A2-As)*(A2-As))/(2.0*Sigma2*Sigma2)) + 65 std::exp(-((A1-As)*(A1-As))/(2.0*Sigma1*Sigma1)); 64 66 65 G4double FasymAsym = 2.0*std::exp(-((A2-As)*(A2-As))/(2.0*Sigma2*Sigma2)) + 66 std::exp(-((A1-As)*(A1-As))/(2.0*Sigma1*Sigma1)); 67 68 G4double FsymA1A2 = std::exp(-((As-(A1+A2)/2.0)*(As-(A1+A2)/2.0))/(2.0*SigmaS*SigmaS)); 67 G4double FsymA1A2 = std::exp(-((As-(A1+A2)/2.0)*(As-(A1+A2)/2.0)) 68 /(2.0*SigmaS*SigmaS)); 69 69 70 70 71 G4double wa = 0.0;72 w = 0.0;73 if (Z >= 90) { // Z >= 9074 if (U <= 16.25) wa = std::exp(0.5385*U/MeV-9.9564); // U <= 16.25 MeV75 else wa = std::exp(0.09197*U/MeV-2.7003); // U > 16.25 MeV76 } else if (Z == 89) { // Z == 8977 wa = std::exp(0.09197*U-1.0808);78 } else if (Z >= 82) { // 82 <= Z <= 8879 G4double X = FissionBarrier - 7.5*MeV;80 if (X < 0.0) X = 0.0;81 wa = std::exp(0.09197*(U-X)/MeV-1.0808);82 } else { // Z < 8283 w = 1001.0;84 }71 G4double wa = 0.0; 72 w = 0.0; 73 if (Z >= 90) { // Z >= 90 74 if (U <= 16.25) wa = std::exp(0.5385*U/MeV-9.9564); // U <= 16.25 MeV 75 else wa = std::exp(0.09197*U/MeV-2.7003); // U > 16.25 MeV 76 } else if (Z == 89) { // Z == 89 77 wa = std::exp(0.09197*U-1.0808); 78 } else if (Z >= 82) { // 82 <= Z <= 88 79 G4double X = FissionBarrier - 7.5*MeV; 80 if (X < 0.0) X = 0.0; 81 wa = std::exp(0.09197*(U-X)/MeV-1.0808); 82 } else { // Z < 82 83 w = 1001.0; 84 } 85 85 86 if (w == 0.0) { 87 G4double w1 = std::max(1.03*wa - FasymAsym, 0.0001); 88 G4double w2 = std::max(1.0 - FsymA1A2*wa, 0.0001); 86 if (w == 0.0) { 87 G4double w1 = std::max(1.03*wa - FasymAsym, 0.0001); 88 G4double w2 = std::max(1.0 - FsymA1A2*wa, 0.0001); 89 90 w = w1/w2; 89 91 90 w = w1/w2; 91 92 if (82 <= Z && Z < 89 && A < 227) w *= std::exp(0.3*(227-A)); 93 } 92 if (82 <= Z && Z < 89 && A < 227) w *= std::exp(0.3*(227-A)); 93 } 94 94 95 95 } 96 96 97 G4FissionParameters::~G4FissionParameters() 98 {} 97 99 98 G4FissionParameters::G4FissionParameters(const G4FissionParameters &)99 {100 throw G4HadronicException(__FILE__, __LINE__, "G4FissionParameters::copy_constructor meant to not be accessable");101 }102 103 104 const G4FissionParameters & G4FissionParameters::operator=(const G4FissionParameters &)105 {106 throw G4HadronicException(__FILE__, __LINE__, "G4FissionParameters::operator= meant to not be accessable");107 return *this;108 }109 110 111 G4bool G4FissionParameters::operator==(const G4FissionParameters &) const112 {113 return false;114 }115 116 G4bool G4FissionParameters::operator!=(const G4FissionParameters &) const117 {118 return true;119 }120 121 -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionProbability.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FissionProbability.cc,v 1. 9 2009/02/15 17:03:25vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FissionProbability.cc,v 1.10 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 38 38 #include "G4PairingCorrection.hh" 39 39 40 G4FissionProbability::G4FissionProbability() 41 {} 42 43 G4FissionProbability::~G4FissionProbability() 44 {} 40 45 41 46 42 G4FissionProbability::G4FissionProbability(const G4FissionProbability &) : G4VEmissionProbability() 47 G4double 48 G4FissionProbability::EmissionProbability(const G4Fragment & fragment, 49 G4double MaximalKineticEnergy) 50 // Compute integrated probability of fission channel 43 51 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4FissionProbability::copy_constructor meant to not be accessable"); 52 if (MaximalKineticEnergy <= 0.0) return 0.0; 53 G4int A = fragment.GetA_asInt(); 54 G4int Z = fragment.GetZ_asInt(); 55 G4double U = fragment.GetExcitationEnergy(); 56 57 G4double Ucompound = U - 58 G4PairingCorrection::GetInstance()->GetPairingCorrection(A,Z); 59 60 G4double Ufission = U - 61 G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z); 62 63 G4double SystemEntropy = 64 2.0*std::sqrt(theEvapLDP.LevelDensityParameter(A,Z,Ucompound)*Ucompound); 65 66 G4double afission = theFissLDP.LevelDensityParameter(A,Z,Ufission); 67 68 G4double Cf = 2.0*std::sqrt(afission*MaximalKineticEnergy); 69 70 // G4double Q1 = 1.0 + (Cf - 1.0)*std::exp(Cf); 71 // G4double Q2 = 4.0*pi*afission*std::exp(SystemEntropy); 72 73 // G4double probability = Q1/Q2; 74 75 G4double Exp1 = 0.0; 76 if (SystemEntropy <= 160.0) { Exp1 = std::exp(-SystemEntropy); } 77 // @@@@@@@@@@@@@@@@@ hpw changed max to min - cannot notify vicente now 78 G4double Exp2 = std::exp( std::min(700.0,Cf-SystemEntropy) ); 79 80 // JMQ 14/02/09 BUG fixed in fission probability (missing parenthesis 81 // at denominator) 82 //AH fix from Vincente: G4double probability = 83 // (Exp1 + (1.0-Cf)*Exp2) / 4.0*pi*afission; 84 // G4double probability = (Exp1 + (Cf-1.0)*Exp2) / 4.0*pi*afission; 85 G4double probability = (Exp1 + (Cf-1.0)*Exp2) / (4.0*pi*afission); 86 87 return probability; 45 88 } 46 89 47 48 49 50 const G4FissionProbability & G4FissionProbability::operator=(const G4FissionProbability &)51 {52 throw G4HadronicException(__FILE__, __LINE__, "G4FissionProbability::operator= meant to not be accessable");53 return *this;54 }55 56 57 G4bool G4FissionProbability::operator==(const G4FissionProbability &) const58 {59 return false;60 }61 62 G4bool G4FissionProbability::operator!=(const G4FissionProbability &) const63 {64 return true;65 }66 67 68 G4double G4FissionProbability::EmissionProbability(const G4Fragment & fragment, const G4double MaximalKineticEnergy)69 // Compute integrated probability of fission channel70 {71 if (MaximalKineticEnergy <= 0.0) return 0.0;72 G4double A = fragment.GetA();73 G4double Z = fragment.GetZ();74 G4double U = fragment.GetExcitationEnergy();75 76 G4double Ucompound = U - G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(A),77 static_cast<G4int>(Z));78 G4double Ufission = U - G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(static_cast<G4int>(A),79 static_cast<G4int>(Z));80 81 G4double SystemEntropy = 2.0*std::sqrt(theEvapLDP.LevelDensityParameter(static_cast<G4int>(A),82 static_cast<G4int>(Z),83 Ucompound)*Ucompound);84 85 G4double afission = theFissLDP.LevelDensityParameter(static_cast<G4int>(A),86 static_cast<G4int>(Z),87 Ufission);88 89 G4double Cf = 2.0*std::sqrt(afission*MaximalKineticEnergy);90 91 // G4double Q1 = 1.0 + (Cf - 1.0)*std::exp(Cf);92 // G4double Q2 = 4.0*pi*afission*std::exp(SystemEntropy);93 94 // G4double probability = Q1/Q2;95 96 97 G4double Exp1 = 0.0;98 if (SystemEntropy <= 160.0) Exp1 = std::exp(-SystemEntropy);99 // @@@@@@@@@@@@@@@@@ hpw changed max to min - cannot notify vicente now100 G4double Exp2 = std::exp( std::min(700.0,Cf-SystemEntropy) );101 102 // JMQ 14/02/09 BUG fixed in fission probability (missing parenthesis at denominator)103 //AH fix from Vincente: G4double probability = (Exp1 + (1.0-Cf)*Exp2) / 4.0*pi*afission;104 // G4double probability = (Exp1 + (Cf-1.0)*Exp2) / 4.0*pi*afission;105 G4double probability = (Exp1 + (Cf-1.0)*Exp2) / (4.0*pi*afission);106 107 108 109 return probability;110 }111 -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4VFissionBarrier.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4VFissionBarrier.cc,v 1. 4 2006/06/29 20:13:43 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4VFissionBarrier.cc,v 1.5 2010/11/17 20:22:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 34 34 #include "G4VFissionBarrier.hh" 35 35 36 G4VFissionBarrier::G4VFissionBarrier(const G4VFissionBarrier & ) 37 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4VFissionBarrier::copy_constructor meant to not be accessable."); 39 } 36 G4VFissionBarrier::G4VFissionBarrier() {} 37 G4VFissionBarrier::~G4VFissionBarrier() {} 40 38 41 42 const G4VFissionBarrier & G4VFissionBarrier::operator=(const G4VFissionBarrier & )43 {44 throw G4HadronicException(__FILE__, __LINE__, "G4VFissionBarrier::operator= meant to not be accessable.");45 return *this;46 }47 48 G4bool G4VFissionBarrier::operator==(const G4VFissionBarrier & ) const49 {50 return false;51 }52 53 G4bool G4VFissionBarrier::operator!=(const G4VFissionBarrier & ) const54 {55 return true;56 }57 -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/include/G4AlphaGEMChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4AlphaGEMChannel.hh,v 1. 4 2009/09/15 12:54:16vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4AlphaGEMChannel.hh,v 1.5 2010/10/29 17:35:04 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 57 57 private: 58 58 const G4AlphaGEMChannel & operator=(const G4AlphaGEMChannel & right); 59 60 G4AlphaGEMChannel(const G4AlphaGEMChannel & right); 61 62 public: 59 G4AlphaGEMChannel(const G4AlphaGEMChannel & right); 63 60 G4bool operator==(const G4AlphaGEMChannel & right) const; 64 61 G4bool operator!=(const G4AlphaGEMChannel & right) const; 65 62 66 private:67 63 // JMQ 190709 68 64 // G4AlphaCoulombBarrier theCoulombBarrier; -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/include/G4GEMChannel.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4GEMChannel.hh,v 1. 5 2009/09/15 12:54:16vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4GEMChannel.hh,v 1.7 2010/11/18 16:21:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 48 48 //#define debug 49 49 50 class G4Pow; 51 50 52 class G4GEMChannel : public G4VEvaporationChannel 51 53 { 52 54 public: 53 // Available constructors 54 G4GEMChannel(const G4int theA, const G4int theZ, 55 G4GEMProbability * aEmissionStrategy, 56 G4VCoulombBarrier * aCoulombBarrier); 55 56 G4GEMChannel(const G4int theA, const G4int theZ, const G4String & aName, 57 G4GEMProbability * aEmissionStrategy, 58 G4VCoulombBarrier * aCoulombBarrier); 59 60 // destructor 61 virtual ~G4GEMChannel(); 57 62 58 G4GEMChannel(const G4int theA, const G4int theZ, const G4String & aName, 59 G4GEMProbability * aEmissionStrategy, 60 G4VCoulombBarrier * aCoulombBarrier); 63 void Initialize(const G4Fragment & fragment); 64 65 G4FragmentVector * BreakUp(const G4Fragment & theNucleus); 66 67 inline void SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity) 68 { 69 if (MyOwnLevelDensity) { delete theLevelDensityPtr; } 70 theLevelDensityPtr = aLevelDensity; 71 MyOwnLevelDensity = false; 72 } 73 74 inline G4double GetEmissionProbability(void) const 75 { return EmissionProbability; } 76 77 inline G4double GetMaximalKineticEnergy(void) const 78 { return MaximalKineticEnergy; } 79 80 private: 61 81 62 G4GEMChannel(const G4int theA, const G4int theZ, const G4String * aName, 63 G4GEMProbability * aEmissionStrategy, 64 G4VCoulombBarrier * aCoulombBarrier); 65 66 public: 67 // destructor 68 ~G4GEMChannel(); 69 70 void SetEmissionStrategy(G4GEMProbability * aEmissionStrategy) 71 { 72 theEvaporationProbabilityPtr = aEmissionStrategy; 73 } 74 75 void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier) 76 { 77 theCoulombBarrierPtr = aCoulombBarrier; 78 } 82 // Calculate Binding Energy for separate fragment from nucleus 83 G4double CalcBindingEnergy(G4int anA, G4int aZ); 84 85 // Calculate maximal kinetic energy that can be carried by fragment (in MeV) 86 G4double CalcMaximalKineticEnergy(G4double U); 87 88 // Samples fragment kinetic energy. 89 G4double CalcKineticEnergy(const G4Fragment & fragment); 90 91 // This has to be removed and put in Random Generator 92 G4ThreeVector IsotropicVector(G4double Magnitude = 1.0); 93 94 G4GEMChannel(const G4GEMChannel & right); 95 const G4GEMChannel & operator=(const G4GEMChannel & right); 96 G4bool operator==(const G4GEMChannel & right) const; 97 G4bool operator!=(const G4GEMChannel & right) const; 79 98 80 99 protected: 81 // default constructor 82 G4GEMChannel() {}; 83 100 G4GEMChannel(); 101 102 // Data Members ************ 103 84 104 private: 85 // copy constructor86 G4GEMChannel(const G4GEMChannel & right);87 88 private:89 const G4GEMChannel & operator=(const G4GEMChannel & right);90 91 public:92 G4bool operator==(const G4GEMChannel & right) const;93 G4bool operator!=(const G4GEMChannel & right) const;94 105 95 public: 96 void Initialize(const G4Fragment & fragment); 106 // This data member define the channel. 107 // They are intializated at object creation (constructor) time. 108 109 // Atomic Number 110 G4int A; 111 112 // Charge 113 G4int Z; 97 114 98 G4FragmentVector * BreakUp(const G4Fragment & theNucleus); 115 G4double EvaporatedMass; 116 G4double ResidualMass; 99 117 100 inline void SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity) 101 { 102 if (MyOwnLevelDensity) delete theLevelDensityPtr; 103 theLevelDensityPtr = aLevelDensity; 104 MyOwnLevelDensity = false; 105 } 106 107 public: 118 G4Pow* fG4pow; 119 120 // For evaporation probability calcualtion 121 G4GEMProbability * theEvaporationProbabilityPtr; 122 123 // For Level Density calculation 124 G4bool MyOwnLevelDensity; 125 G4VLevelDensityParameter * theLevelDensityPtr; 126 127 // For Coulomb Barrier calculation 128 G4VCoulombBarrier * theCoulombBarrierPtr; 129 G4double CoulombBarrier; 130 131 //--------------------------------------------------- 132 133 // These values depend on the nucleus that is being evaporated. 134 // They are calculated through the Initialize method which takes as parameters 135 // the atomic number, charge and excitation energy of nucleus. 136 137 // Residual Atomic Number 138 G4int ResidualA; 139 140 // Residual Charge 141 G4int ResidualZ; 142 143 // Emission Probability 144 G4double EmissionProbability; 145 146 // Maximal Kinetic Energy that can be carried by fragment 147 G4double MaximalKineticEnergy; 108 148 109 149 110 inline G4double GetEmissionProbability(void) const111 {112 return EmissionProbability;113 }114 115 116 inline G4double GetMaximalKineticEnergy(void) const117 {118 return MaximalKineticEnergy;119 }120 121 // ----------------------122 123 private:124 125 // Calculate Binding Energy for separate fragment from nucleus126 G4double CalcBindingEnergy(const G4int anA, const G4int aZ);127 128 // Calculate maximal kinetic energy that can be carried by fragment (in MeV)129 G4double CalcMaximalKineticEnergy(const G4double U);130 131 // Samples fragment kinetic energy.132 G4double CalcKineticEnergy(const G4Fragment & fragment);133 134 // This has to be removed and put in Random Generator135 G4ThreeVector IsotropicVector(const G4double Magnitude = 1.0);136 137 // Data Members138 // ************139 private:140 141 // This data member define the channel.142 // They are intializated at object creation (constructor) time.143 144 // Atomic Number145 G4int A;146 147 // Charge148 G4int Z;149 150 151 // For evaporation probability calcualtion152 G4GEMProbability * theEvaporationProbabilityPtr;153 154 // For Level Density calculation155 G4bool MyOwnLevelDensity;156 G4VLevelDensityParameter * theLevelDensityPtr;157 158 // For Coulomb Barrier calculation159 G4VCoulombBarrier * theCoulombBarrierPtr;160 G4double CoulombBarrier;161 162 //---------------------------------------------------163 164 // These values depend on the nucleus that is being evaporated.165 // They are calculated through the Initialize method which takes as parameters166 // the atomic number, charge and excitation energy of nucleus.167 168 // Residual Atomic Number169 G4int AResidual;170 171 // Residual Charge172 G4int ZResidual;173 174 // Emission Probability175 G4double EmissionProbability;176 177 178 // Maximal Kinetic Energy that can be carried by fragment179 G4double MaximalKineticEnergy;180 150 }; 181 151 -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/include/G4GEMProbability.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GEMProbability.hh,v 1. 4 2010/05/19 10:21:16vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4GEMProbability.hh,v 1.6 2010/11/05 14:42:52 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 //--------------------------------------------------------------------- … … 43 43 #define G4GEMProbability_h 1 44 44 45 46 45 #include "G4VEmissionProbability.hh" 47 46 #include "G4VLevelDensityParameter.hh" … … 60 59 61 60 // Only available constructor 62 G4GEMProbability( const G4int anA, const G4int aZ, constG4double aSpin);61 G4GEMProbability(G4int anA, G4int aZ, G4double aSpin); 63 62 64 63 virtual ~G4GEMProbability(); … … 114 113 } 115 114 116 inline void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier)117 {118 theCoulombBarrierPtr = aCoulombBarrier;119 }120 121 115 private: 122 116 … … 130 124 public: 131 125 132 G4double EmissionProbability(const G4Fragment & fragment, constG4double anEnergy);126 G4double EmissionProbability(const G4Fragment & fragment, G4double anEnergy); 133 127 134 128 private: 135 129 136 G4double CalcProbability(const G4Fragment & fragment, constG4double MaximalKineticEnergy,137 constG4double V);130 G4double CalcProbability(const G4Fragment & fragment, G4double MaximalKineticEnergy, 131 G4double V); 138 132 139 virtual G4double CCoeficient( constG4double ) const;133 virtual G4double CCoeficient(G4double ) const; 140 134 141 inline G4double I0( constG4double t);142 inline G4double I1( const G4double t, constG4double tx);143 inline G4double I2( const G4double s, constG4double sx);144 G4double I3( const G4double s, constG4double sx);135 inline G4double I0(G4double t); 136 inline G4double I1(G4double t, G4double tx); 137 inline G4double I2(G4double s, G4double sx); 138 G4double I3(G4double s, G4double sx); 145 139 146 140 // Data Members … … 174 168 }; 175 169 176 inline G4double G4GEMProbability::I0( constG4double t)170 inline G4double G4GEMProbability::I0(G4double t) 177 171 { 178 172 return std::exp(t) - 1.0; 179 173 } 180 174 181 inline G4double G4GEMProbability::I1( const G4double t, constG4double tx)175 inline G4double G4GEMProbability::I1(G4double t, G4double tx) 182 176 { 183 177 return (t - tx + 1.0)*std::exp(tx) - t - 1.0; … … 185 179 186 180 187 inline G4double G4GEMProbability::I2( const G4double s, constG4double sx)181 inline G4double G4GEMProbability::I2(G4double s, G4double sx) 188 182 { 189 183 G4double S = 1.0/std::sqrt(s); -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4AlphaGEMChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4AlphaGEMChannel.cc,v 1. 5 2009/09/15 12:54:16vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4AlphaGEMChannel.cc,v 1.6 2010/10/29 17:35:04 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 35 35 36 36 37 const G4AlphaGEMChannel & G4AlphaGEMChannel::operator=(const G4AlphaGEMChannel & )38 {39 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaGEMChannel::operator= meant to not be accessable");40 return *this;41 }42 43 G4AlphaGEMChannel::G4AlphaGEMChannel(const G4AlphaGEMChannel & ): G4GEMChannel()44 {45 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaGEMChannel::CopyConstructor meant to not be accessable");46 }47 48 G4bool G4AlphaGEMChannel::operator==(const G4AlphaGEMChannel & right) const49 {50 return (this == (G4AlphaGEMChannel *) &right);51 // return false;52 }53 54 G4bool G4AlphaGEMChannel::operator!=(const G4AlphaGEMChannel & right) const55 {56 return (this != (G4AlphaGEMChannel *) &right);57 // return true;58 }59 -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMChannel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4GEMChannel.cc,v 1.1 0 2009/10/08 07:55:39vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4GEMChannel.cc,v 1.12 2010/11/18 16:21:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 #include "G4GEMChannel.hh" 41 41 #include "G4PairingCorrection.hh" 42 43 44 G4GEMChannel::G4GEMChannel(const G4int theA, const G4int theZ, 45 G4GEMProbability * aEmissionStrategy, 46 G4VCoulombBarrier * aCoulombBarrier): 47 A(theA), 48 Z(theZ), 49 theEvaporationProbabilityPtr(aEmissionStrategy), 50 theCoulombBarrierPtr(aCoulombBarrier), 51 EmissionProbability(0.0), 52 MaximalKineticEnergy(-1000.0) 53 { 54 theLevelDensityPtr = new G4EvaporationLevelDensityParameter; 55 MyOwnLevelDensity = true; 56 } 57 58 G4GEMChannel::G4GEMChannel(const G4int theA, const G4int theZ, const G4String & aName, 42 #include "G4Pow.hh" 43 44 G4GEMChannel::G4GEMChannel(G4int theA, G4int theZ, const G4String & aName, 59 45 G4GEMProbability * aEmissionStrategy, 60 46 G4VCoulombBarrier * aCoulombBarrier) : … … 69 55 theLevelDensityPtr = new G4EvaporationLevelDensityParameter; 70 56 MyOwnLevelDensity = true; 57 EvaporatedMass = G4NucleiProperties::GetNuclearMass(A, Z); 58 ResidualMass = CoulombBarrier = 0.0; 59 fG4pow = G4Pow::GetInstance(); 60 } 61 62 G4GEMChannel::G4GEMChannel() : 63 G4VEvaporationChannel("dummy"), 64 A(0), 65 Z(0), 66 theEvaporationProbabilityPtr(0), 67 theCoulombBarrierPtr(0), 68 EmissionProbability(0.0), 69 MaximalKineticEnergy(-1000.0) 70 { 71 theLevelDensityPtr = 0; 72 MyOwnLevelDensity = true; 73 EvaporatedMass = 0.0; 74 ResidualMass = CoulombBarrier = 0.0; 75 fG4pow = G4Pow::GetInstance(); 71 76 } 72 77 73 78 G4GEMChannel::~G4GEMChannel() 74 79 { 75 if (MyOwnLevelDensity) delete theLevelDensityPtr; 76 } 77 78 G4GEMChannel::G4GEMChannel(const G4GEMChannel & ) : G4VEvaporationChannel() 79 { 80 throw G4HadronicException(__FILE__, __LINE__, "G4GEMChannel::copy_costructor meant to not be accessable"); 81 } 82 83 const G4GEMChannel & G4GEMChannel::operator=(const G4GEMChannel & ) 84 { 85 throw G4HadronicException(__FILE__, __LINE__, "G4GEMChannel::operator= meant to not be accessable"); 86 return *this; 87 } 88 89 G4bool G4GEMChannel::operator==(const G4GEMChannel & right) const 90 { 91 return (this == (G4GEMChannel *) &right); 92 // return false; 93 } 94 95 G4bool G4GEMChannel::operator!=(const G4GEMChannel & right) const 96 { 97 return (this != (G4GEMChannel *) &right); 98 // return true; 80 if (MyOwnLevelDensity) { delete theLevelDensityPtr; } 99 81 } 100 82 101 83 void G4GEMChannel::Initialize(const G4Fragment & fragment) 102 84 { 103 G4int anA = static_cast<G4int>(fragment.GetA());104 G4int aZ = static_cast<G4int>(fragment.GetZ());105 AResidual= anA - A;106 ZResidual= aZ - Z;85 G4int anA = fragment.GetA_asInt(); 86 G4int aZ = fragment.GetZ_asInt(); 87 ResidualA = anA - A; 88 ResidualZ = aZ - Z; 107 89 //G4cout << "G4GEMChannel::Initialize: Z= " << aZ << " A= " << anA 108 // << " Zres= " << ZResidual << " Ares= " << AResidual<< G4endl;90 // << " Zres= " << ResidualZ << " Ares= " << ResidualA << G4endl; 109 91 110 92 // We only take into account channels which are physically allowed 111 if ( AResidual <= 0 || ZResidual <= 0 || AResidual < ZResidual||112 ( AResidual == ZResidual && AResidual> 1))93 if (ResidualA <= 0 || ResidualZ <= 0 || ResidualA < ResidualZ || 94 (ResidualA == ResidualZ && ResidualA > 1)) 113 95 { 114 96 CoulombBarrier = 0.0; … … 118 100 else 119 101 { 120 121 102 // Effective excitation energy 122 103 // JMQ 071009: pairing in ExEnergy should be the one of parent compound nucleus … … 125 106 // param for protons must be the same) 126 107 // G4double ExEnergy = fragment.GetExcitationEnergy() - 127 // G4PairingCorrection::GetInstance()->GetPairingCorrection( AResidual,ZResidual);108 // G4PairingCorrection::GetInstance()->GetPairingCorrection(ResidualA,ResidualZ); 128 109 G4double ExEnergy = fragment.GetExcitationEnergy() - 129 110 G4PairingCorrection::GetInstance()->GetPairingCorrection(anA,aZ); … … 138 119 } else { 139 120 121 ResidualMass = G4NucleiProperties::GetNuclearMass(ResidualA, ResidualZ); 122 140 123 // Coulomb Barrier calculation 141 CoulombBarrier = theCoulombBarrierPtr->GetCoulombBarrier( AResidual,ZResidual,ExEnergy);124 CoulombBarrier = theCoulombBarrierPtr->GetCoulombBarrier(ResidualA,ResidualZ,ExEnergy); 142 125 //G4cout << "CBarrier(MeV)= " << CoulombBarrier/MeV << G4endl; 143 126 144 127 //Maximal kinetic energy (JMQ : at the Coulomb barrier) 145 128 MaximalKineticEnergy = 146 CalcMaximalKineticEnergy(G4ParticleTable::GetParticleTable()-> 147 GetIonTable()->GetNucleusMass(aZ,anA)+ExEnergy); 129 CalcMaximalKineticEnergy(fragment.GetGroundStateMass()+ExEnergy); 148 130 //G4cout << "MaxE(MeV)= " << MaximalKineticEnergy/MeV << G4endl; 149 150 131 151 132 // Emission probability … … 161 142 } 162 143 } 163 } 164 144 } 165 145 //G4cout << "Prob= " << EmissionProbability << G4endl; 166 146 return; … … 169 149 G4FragmentVector * G4GEMChannel::BreakUp(const G4Fragment & theNucleus) 170 150 { 171 G4double EvaporatedKineticEnergy = CalcKineticEnergy(theNucleus); 172 G4double EvaporatedMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A); 173 G4double EvaporatedEnergy = EvaporatedKineticEnergy + EvaporatedMass; 174 175 176 G4ThreeVector momentum(IsotropicVector(std::sqrt(EvaporatedKineticEnergy* 177 (EvaporatedKineticEnergy+2.0*EvaporatedMass)))); 178 179 momentum.rotateUz(theNucleus.GetMomentum().vect().unit()); 180 181 G4LorentzVector EvaporatedMomentum(momentum,EvaporatedEnergy); 182 EvaporatedMomentum.boost(theNucleus.GetMomentum().boostVector()); 183 G4Fragment * EvaporatedFragment = new G4Fragment(A,Z,EvaporatedMomentum); 184 #ifdef PRECOMPOUND_TEST 185 EvaporatedFragment->SetCreatorModel(G4String("G4Evaporation")); 151 G4double EvaporatedKineticEnergy = CalcKineticEnergy(theNucleus); 152 G4double EvaporatedEnergy = EvaporatedKineticEnergy + EvaporatedMass; 153 154 G4ThreeVector momentum(IsotropicVector(std::sqrt(EvaporatedKineticEnergy* 155 (EvaporatedKineticEnergy+2.0*EvaporatedMass)))); 156 157 momentum.rotateUz(theNucleus.GetMomentum().vect().unit()); 158 159 G4LorentzVector EvaporatedMomentum(momentum,EvaporatedEnergy); 160 EvaporatedMomentum.boost(theNucleus.GetMomentum().boostVector()); 161 G4Fragment * EvaporatedFragment = new G4Fragment(A,Z,EvaporatedMomentum); 162 // ** And now the residual nucleus ** 163 G4double theExEnergy = theNucleus.GetExcitationEnergy(); 164 G4double theMass = theNucleus.GetGroundStateMass(); 165 G4double ResidualEnergy = theMass + (theExEnergy - EvaporatedKineticEnergy) - EvaporatedMass; 166 167 G4LorentzVector ResidualMomentum(-momentum,ResidualEnergy); 168 ResidualMomentum.boost(theNucleus.GetMomentum().boostVector()); 169 170 G4Fragment * ResidualFragment = new G4Fragment( ResidualA, ResidualZ, ResidualMomentum ); 171 172 G4FragmentVector * theResult = new G4FragmentVector; 173 174 #ifdef debug 175 G4double Efinal = ResidualMomentum.e() + EvaporatedMomentum.e(); 176 G4ThreeVector Pfinal = ResidualMomentum.vect() + EvaporatedMomentum.vect(); 177 if (std::abs(Efinal-theNucleus.GetMomentum().e()) > 10.0*eV) { 178 G4cout << "@@@@@@@@@@@@@@@@@@@@@ G4GEMChanel: ENERGY @@@@@@@@@@@@@@@@" << G4endl; 179 G4cout << "Initial : " << theNucleus.GetMomentum().e()/MeV << " MeV Final :" 180 <<Efinal/MeV << " MeV Delta: " << (Efinal-theNucleus.GetMomentum().e())/MeV 181 << " MeV" << G4endl; 182 } 183 if (std::abs(Pfinal.x()-theNucleus.GetMomentum().x()) > 10.0*eV || 184 std::abs(Pfinal.y()-theNucleus.GetMomentum().y()) > 10.0*eV || 185 std::abs(Pfinal.z()-theNucleus.GetMomentum().z()) > 10.0*eV ) { 186 G4cout << "@@@@@@@@@@@@@@@@@@@@@ G4GEMChanel: MOMENTUM @@@@@@@@@@@@@@@@" << G4endl; 187 G4cout << "Initial : " << theNucleus.GetMomentum().vect() << " MeV Final :" 188 <<Pfinal/MeV << " MeV Delta: " << Pfinal-theNucleus.GetMomentum().vect() 189 << " MeV" << G4endl; 190 191 } 186 192 #endif 187 // ** And now the residual nucleus ** 188 G4double theExEnergy = theNucleus.GetExcitationEnergy(); 189 G4double theMass = G4ParticleTable::GetParticleTable()-> 190 GetIonTable()->GetNucleusMass(static_cast<G4int>(theNucleus.GetZ()), 191 static_cast<G4int>(theNucleus.GetA())); 192 G4double ResidualEnergy = theMass + (theExEnergy - EvaporatedKineticEnergy) - EvaporatedMass; 193 194 G4LorentzVector ResidualMomentum(-momentum,ResidualEnergy); 195 ResidualMomentum.boost(theNucleus.GetMomentum().boostVector()); 196 197 G4Fragment * ResidualFragment = new G4Fragment( AResidual, ZResidual, ResidualMomentum ); 198 199 #ifdef PRECOMPOUND_TEST 200 ResidualFragment->SetCreatorModel(G4String("ResidualNucleus")); 201 #endif 202 203 204 G4FragmentVector * theResult = new G4FragmentVector; 205 206 #ifdef debug 207 G4double Efinal = ResidualMomentum.e() + EvaporatedMomentum.e(); 208 G4ThreeVector Pfinal = ResidualMomentum.vect() + EvaporatedMomentum.vect(); 209 if (std::abs(Efinal-theNucleus.GetMomentum().e()) > 10.0*eV) { 210 G4cout << "@@@@@@@@@@@@@@@@@@@@@ G4GEMChanel: ENERGY @@@@@@@@@@@@@@@@" << G4endl; 211 G4cout << "Initial : " << theNucleus.GetMomentum().e()/MeV << " MeV Final :" 212 <<Efinal/MeV << " MeV Delta: " << (Efinal-theNucleus.GetMomentum().e())/MeV 213 << " MeV" << G4endl; 214 } 215 if (std::abs(Pfinal.x()-theNucleus.GetMomentum().x()) > 10.0*eV || 216 std::abs(Pfinal.y()-theNucleus.GetMomentum().y()) > 10.0*eV || 217 std::abs(Pfinal.z()-theNucleus.GetMomentum().z()) > 10.0*eV ) { 218 G4cout << "@@@@@@@@@@@@@@@@@@@@@ G4GEMChanel: MOMENTUM @@@@@@@@@@@@@@@@" << G4endl; 219 G4cout << "Initial : " << theNucleus.GetMomentum().vect() << " MeV Final :" 220 <<Pfinal/MeV << " MeV Delta: " << Pfinal-theNucleus.GetMomentum().vect() 221 << " MeV" << G4endl; 222 223 } 224 #endif 225 theResult->push_back(EvaporatedFragment); 226 theResult->push_back(ResidualFragment); 227 return theResult; 193 theResult->push_back(EvaporatedFragment); 194 theResult->push_back(ResidualFragment); 195 return theResult; 228 196 } 229 230 231 197 232 198 G4double G4GEMChannel::CalcMaximalKineticEnergy(const G4double NucleusTotalE) … … 234 200 //JMQ this is not the assimptotic kinetic energy but the one at the Coulomb barrier 235 201 { 236 G4double ResidualMass = G4ParticleTable::GetParticleTable()->237 GetIonTable()->GetNucleusMass( ZResidual, AResidual );238 G4double EvaporatedMass = G4ParticleTable::GetParticleTable()->239 GetIonTable()->GetNucleusMass( Z, A );240 241 202 G4double T = (NucleusTotalE*NucleusTotalE + EvaporatedMass*EvaporatedMass - ResidualMass*ResidualMass)/ 242 (2.0*NucleusTotalE) - 243 EvaporatedMass - CoulombBarrier; 203 (2.0*NucleusTotalE) - EvaporatedMass - CoulombBarrier; 244 204 245 205 return T; 246 206 } 247 207 248 249 250 251 208 G4double G4GEMChannel::CalcKineticEnergy(const G4Fragment & fragment) 252 209 // Samples fragment kinetic energy. 253 210 { 254 211 G4double U = fragment.GetExcitationEnergy(); 255 G4double NuclearMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetNucleusMass(Z,A);256 212 257 213 G4double Alpha = theEvaporationProbabilityPtr->CalcAlphaParam(fragment); … … 260 216 G4double Normalization = theEvaporationProbabilityPtr->GetNormalization(); 261 217 262 // ***RESIDUAL***218 // ***RESIDUAL*** 263 219 //JMQ (September 2009) the following quantities refer to the RESIDUAL: 264 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection( AResidual,ZResidual);265 G4double Ux = (2.5 + 150.0/ AResidual)*MeV;220 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(ResidualA,ResidualZ); 221 G4double Ux = (2.5 + 150.0/ResidualA)*MeV; 266 222 G4double Ex = Ux + delta0; 267 223 G4double InitialLevelDensity; … … 271 227 //JMQ (September 2009) the following quantities refer to the PARENT: 272 228 273 G4double deltaCN = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()), 274 static_cast<G4int>(fragment.GetZ())); 275 G4double aCN = theLevelDensityPtr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()), 276 static_cast<G4int>(fragment.GetZ()),U-deltaCN); 229 G4double deltaCN = 230 G4PairingCorrection::GetInstance()->GetPairingCorrection(fragment.GetA_asInt(), 231 fragment.GetZ_asInt()); 232 G4double aCN = theLevelDensityPtr->LevelDensityParameter(fragment.GetA_asInt(), 233 fragment.GetZ_asInt(),U-deltaCN); 277 234 G4double UxCN = (2.5 + 150.0/fragment.GetA())*MeV; 278 235 G4double ExCN = UxCN + deltaCN; 279 236 G4double TCN = 1.0/(std::sqrt(aCN/UxCN) - 1.5/UxCN); 280 G4double E0CN = ExCN - TCN*(std::log(TCN/MeV) - std::log(aCN*MeV)/4.0 - 1.25*std::log(UxCN/MeV) + 2.0*std::sqrt(aCN*UxCN));281 237 // ***end PARENT*** 282 238 … … 284 240 if ( U < ExCN ) 285 241 { 242 G4double E0CN = ExCN - TCN*(std::log(TCN/MeV) - std::log(aCN*MeV)/4.0 243 - 1.25*std::log(UxCN/MeV) + 2.0*std::sqrt(aCN*UxCN)); 286 244 InitialLevelDensity = (pi/12.0)*std::exp((U-E0CN)/TCN)/TCN; 287 245 } 288 246 else 289 247 { 290 InitialLevelDensity = (pi/12.0)*std::exp(2*std::sqrt(aCN*(U-deltaCN)))/std::pow(aCN*std::pow(U-deltaCN,5.0),1.0/4.0); 248 G4double x = U-deltaCN; 249 G4double x1 = std::sqrt(aCN*x); 250 InitialLevelDensity = (pi/12.0)*std::exp(2*x1)/(x*std::sqrt(x1)); 251 //InitialLevelDensity = 252 //(pi/12.0)*std::exp(2*std::sqrt(aCN*(U-deltaCN)))/std::pow(aCN*std::pow(U-deltaCN,5.0),1.0/4.0); 291 253 } 292 254 293 255 const G4double Spin = theEvaporationProbabilityPtr->GetSpin(); 294 //JMQ BIG BUG fixed: hbarc instead of hbar_Planck !!!!295 // it was fixed in total probability (for this channel) but remained still here!!296 // G4double g = (2.0*Spin+1.0)*NuclearMass/(pi2* hbar_Planck*hbar_Planck);297 G4double g = (2.0*Spin+1.0)*NuclearMass/(pi2* hbarc*hbarc);298 //299 //JMQ fix on Rb and geometrical cross sections according to Furihata's paper300 // (JAERI-Data/Code 2001-105, p6)256 //JMQ BIG BUG fixed: hbarc instead of hbar_Planck !!!! 257 // it was fixed in total probability (for this channel) but remained still here!! 258 // G4double g = (2.0*Spin+1.0)*NuclearMass/(pi2* hbar_Planck*hbar_Planck); 259 G4double g = (2.0*Spin+1.0)*EvaporatedMass/(pi2* hbarc*hbarc); 260 // 261 //JMQ fix on Rb and geometrical cross sections according to Furihata's paper 262 // (JAERI-Data/Code 2001-105, p6) 301 263 G4double Rb = 0.0; 302 if (A > 4) 303 { 304 G4double Ad = std::pow(G4double(fragment.GetA()-A),1.0/3.0); 305 G4double Aj = std::pow(G4double(A),1.0/3.0); 264 if (A > 4) 265 { 266 G4double Ad = fG4pow->Z13(ResidualA); 267 G4double Aj = fG4pow->Z13(A); 268 // RN = 1.12*(R1 + R2) - 0.86*((R1+R2)/(R1*R2)); 306 269 Rb = 1.12*(Aj + Ad) - 0.86*((Aj+Ad)/(Aj*Ad))+2.85; 307 270 Rb *= fermi; 308 271 } 309 else if (A>1) 310 { 311 // G4double R1 = std::pow(G4double(fragment.GetA()-A),1.0/3.0); 312 // G4double R2 = std::pow(G4double(A),1.0/3.0); 313 G4double Ad = std::pow(G4double(fragment.GetA()-A),1.0/3.0); 314 G4double Aj = std::pow(G4double(A),1.0/3.0); 315 // RN = 1.12*(R1 + R2) - 0.86*((R1+R2)/(R1*R2)); 272 else if (A>1) 273 { 274 G4double Ad = fG4pow->Z13(ResidualA); 275 G4double Aj = fG4pow->Z13(A); 316 276 Rb=1.5*(Aj+Ad)*fermi; 317 277 } 318 else 319 { 320 G4double Ad = std::pow(G4double(fragment.GetA()-A),1.0/3.0); 321 // RN = 1.5*fermi; 278 else 279 { 280 G4double Ad = fG4pow->Z13(ResidualA); 322 281 Rb = 1.5*Ad*fermi; 323 282 } 324 // G4double GeometricalXS = pi*RN*RN*std::pow(G4double(fragment.GetA()-A),2./3.); 325 G4double GeometricalXS = pi*Rb*Rb; 326 327 328 G4double ConstantFactor = g*GeometricalXS*Alpha/InitialLevelDensity; 329 ConstantFactor *= pi/12.0; 330 //JMQ : this is the assimptotic maximal kinetic energy of the ejectile 331 // (obtained by energy-momentum conservation). 332 // In general smaller than U-theSeparationEnergy 333 G4double theEnergy = MaximalKineticEnergy + CoulombBarrier; 334 G4double KineticEnergy; 335 G4double Probability; 336 337 do 338 { 339 KineticEnergy = CoulombBarrier + G4UniformRand()*MaximalKineticEnergy; 340 Probability = ConstantFactor*(KineticEnergy + Beta); 341 G4double a = theLevelDensityPtr->LevelDensityParameter(AResidual,ZResidual,theEnergy-KineticEnergy-delta0); 342 G4double T = 1.0/(std::sqrt(a/Ux) - 1.5/Ux); 343 //JMQ fix in units 344 G4double E0 = Ex - T*(std::log(T/MeV) - std::log(a*MeV)/4.0 - 1.25*std::log(Ux/MeV) + 2.0*std::sqrt(a*Ux)); 283 // G4double GeometricalXS = pi*RN*RN*std::pow(G4double(fragment.GetA()-A),2./3.); 284 G4double GeometricalXS = pi*Rb*Rb; 285 286 G4double ConstantFactor = g*GeometricalXS*Alpha/InitialLevelDensity; 287 ConstantFactor *= pi/12.0; 288 //JMQ : this is the assimptotic maximal kinetic energy of the ejectile 289 // (obtained by energy-momentum conservation). 290 // In general smaller than U-theSeparationEnergy 291 G4double theEnergy = MaximalKineticEnergy + CoulombBarrier; 292 G4double KineticEnergy; 293 G4double Probability; 294 295 do 296 { 297 KineticEnergy = CoulombBarrier + G4UniformRand()*MaximalKineticEnergy; 298 Probability = ConstantFactor*(KineticEnergy + Beta); 299 G4double a = 300 theLevelDensityPtr->LevelDensityParameter(ResidualA,ResidualZ,theEnergy-KineticEnergy-delta0); 301 G4double T = 1.0/(std::sqrt(a/Ux) - 1.5/Ux); 302 //JMQ fix in units 345 303 346 if ( theEnergy-KineticEnergy < Ex) 347 { 348 Probability *= std::exp((theEnergy-KineticEnergy-E0)/T)/T; 349 } 350 else 351 { 352 Probability *= std::exp(2*std::sqrt(a*(theEnergy-KineticEnergy-delta0)))/ 353 std::pow(a*std::pow(theEnergy-KineticEnergy-delta0,5.0),1.0/4.0); 354 } 355 Probability /= Normalization; 356 } 357 while (G4UniformRand() > Probability); 358 359 return KineticEnergy; 304 if ( theEnergy-KineticEnergy < Ex) 305 { 306 G4double E0 = Ex - T*(std::log(T/MeV) - std::log(a*MeV)/4.0 307 - 1.25*std::log(Ux/MeV) + 2.0*std::sqrt(a*Ux)); 308 Probability *= std::exp((theEnergy-KineticEnergy-E0)/T)/T; 309 } 310 else 311 { 312 Probability *= std::exp(2*std::sqrt(a*(theEnergy-KineticEnergy-delta0)))/ 313 std::pow(a*fG4pow->powN(theEnergy-KineticEnergy-delta0,5), 0.25); 314 } 315 } 316 while (Normalization*G4UniformRand() > Probability); 317 318 return KineticEnergy; 360 319 } 361 320 … … 365 324 // By default Magnitude = 1.0 366 325 { 367 G4double CosTheta = 1.0 - 2.0*G4UniformRand();368 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta);369 G4double Phi = twopi*G4UniformRand();370 G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta,371 Magnitude*std::sin(Phi)*SinTheta,372 Magnitude*CosTheta);373 return Vector;374 } 375 376 377 326 G4double CosTheta = 1.0 - 2.0*G4UniformRand(); 327 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta); 328 G4double Phi = twopi*G4UniformRand(); 329 G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta, 330 Magnitude*std::sin(Phi)*SinTheta, 331 Magnitude*CosTheta); 332 return Vector; 333 } 334 335 336 -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMProbability.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GEMProbability.cc,v 1.1 3 2010/05/19 10:21:16vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4GEMProbability.cc,v 1.15 2010/11/05 14:43:27 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 //--------------------------------------------------------------------- … … 65 65 } 66 66 67 G4GEMProbability:: G4GEMProbability( const G4int anA, const G4int aZ, constG4double aSpin) :67 G4GEMProbability:: G4GEMProbability(G4int anA, G4int aZ, G4double aSpin) : 68 68 theA(anA), theZ(aZ), Spin(aSpin), theCoulombBarrierPtr(0), 69 69 ExcitationEnergies(0), ExcitationSpins(0), ExcitationLifetimes(0), Normalization(1.0) … … 95 95 96 96 G4double G4GEMProbability::EmissionProbability(const G4Fragment & fragment, 97 constG4double MaximalKineticEnergy)97 G4double MaximalKineticEnergy) 98 98 { 99 99 G4double EmissionProbability = 0.0; … … 130 130 131 131 G4double G4GEMProbability::CalcProbability(const G4Fragment & fragment, 132 constG4double MaximalKineticEnergy,133 constG4double V)132 G4double MaximalKineticEnergy, 133 G4double V) 134 134 135 135 // Calculate integrated probability (width) for evaporation channel … … 146 146 G4double Alpha = CalcAlphaParam(fragment); 147 147 G4double Beta = CalcBetaParam(fragment); 148 149 148 150 149 // ***RESIDUAL*** 151 150 //JMQ (September 2009) the following quantities refer to the RESIDUAL: … … 159 158 G4double T = 1.0/(std::sqrt(a/Ux) - 1.5/Ux); 160 159 //JMQ fixed bug in units 161 G4double E0 = Ex - T*(std::log(T/MeV) - std::log(a*MeV)/4.0 - 1.25*std::log(Ux/MeV) + 2.0*std::sqrt(a*Ux)); 160 G4double E0 = Ex - T*(std::log(T/MeV) - std::log(a*MeV)/4.0 161 - 1.25*std::log(Ux/MeV) + 2.0*std::sqrt(a*Ux)); 162 162 // ***end RESIDUAL *** 163 163 … … 165 165 //JMQ (September 2009) the following quantities refer to the PARENT: 166 166 167 G4double deltaCN=fPairCorr->GetPairingCorrection(A, Z); 168 G4double aCN = theEvapLDPptr->LevelDensityParameter(A, Z, U-deltaCN); 169 G4double UxCN = (2.5 + 150.0/G4double(A))*MeV; 170 G4double ExCN = UxCN + deltaCN; 171 G4double TCN = 1.0/(std::sqrt(aCN/UxCN) - 1.5/UxCN); 172 //JMQ fixed bug in units 173 G4double E0CN = ExCN - TCN*(std::log(TCN/MeV) - std::log(aCN*MeV)/4.0 - 1.25*std::log(UxCN/MeV) + 2.0*std::sqrt(aCN*UxCN)); 174 // ***end PARENT*** 167 G4double deltaCN = fPairCorr->GetPairingCorrection(A, Z); 168 G4double aCN = theEvapLDPptr->LevelDensityParameter(A, Z, U-deltaCN); 169 G4double UxCN = (2.5 + 150.0/G4double(A))*MeV; 170 G4double ExCN = UxCN + deltaCN; 171 G4double TCN = 1.0/(std::sqrt(aCN/UxCN) - 1.5/UxCN); 172 // ***end PARENT*** 175 173 176 174 G4double Width; … … 231 229 //end of JMQ fix on Rb by 190709 232 230 233 234 235 //JMQ 160909 fix: initial level density must be calculated according to the 236 // conditions at the initial compound nucleus 237 // (it has been removed from previous "if" for the residual) 238 239 if ( U < ExCN ) 240 { 241 InitialLevelDensity = (pi/12.0)*std::exp((U-E0CN)/TCN)/TCN; 242 } 243 else 244 { 245 // InitialLevelDensity = (pi/12.0)*std::exp(2*std::sqrt(aCN*(U-deltaCN)))/std::pow(aCN*std::pow(U-deltaCN,5.0),1.0/4.0); 246 //VI speedup 247 G4double x = U-deltaCN; 248 G4double x2 = x*x; 249 G4double x3 = x2*x; 250 InitialLevelDensity = (pi/12.0)*std::exp(2*std::sqrt(aCN*x))/std::sqrt(std::sqrt(aCN*x2*x3)); 251 } 252 // 253 231 //JMQ 160909 fix: initial level density must be calculated according to the 232 // conditions at the initial compound nucleus 233 // (it has been removed from previous "if" for the residual) 234 235 if ( U < ExCN ) 236 { 237 //JMQ fixed bug in units 238 //VI moved the computation here 239 G4double E0CN = ExCN - TCN*(std::log(TCN/MeV) - std::log(aCN*MeV)/4.0 240 - 1.25*std::log(UxCN/MeV) + 2.0*std::sqrt(aCN*UxCN)); 241 InitialLevelDensity = (pi/12.0)*std::exp((U-E0CN)/TCN)/TCN; 242 } 243 else 244 { 245 //InitialLevelDensity = (pi/12.0)*std::exp(2*std::sqrt(aCN*(U-deltaCN)))/std::pow(aCN*std::pow(U-deltaCN,5.0),1.0/4.0); 246 //VI speedup 247 G4double x = U-deltaCN; 248 G4double x1 = std::sqrt(aCN*x); 249 InitialLevelDensity = (pi/12.0)*std::exp(2*x1)/(x*std::sqrt(x1)); 250 } 254 251 255 252 //JMQ 190709 BUG : pi instead of sqrt(pi) must be here according to Furihata's report: … … 257 254 Width *= pi*g*GeometricalXS*Alpha/(12.0*InitialLevelDensity); 258 255 259 260 256 return Width; 261 257 } 262 258 263 /* 264 265 G4double G4GEMProbability::CalcProbability(const G4Fragment & fragment, 266 const G4double MaximalKineticEnergy, 267 const G4double V) 268 // Calculate integrated probability (width) for evaporation channel 269 { 270 G4double ResidualA = static_cast<G4double>(fragment.GetA() - theA); 271 G4double ResidualZ = static_cast<G4double>(fragment.GetZ() - theZ); 272 G4double U = fragment.GetExcitationEnergy(); 273 274 G4double NuclearMass = G4ParticleTable::GetParticleTable()-> 275 GetIonTable()->GetNucleusMass(theZ,theA); 276 277 278 G4double Alpha = CalcAlphaParam(fragment); 279 G4double Beta = CalcBetaParam(fragment); 280 281 282 // ***RESIDUAL*** 283 //JMQ (September 2009) the following quantities refer to the RESIDUAL: 284 285 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection( static_cast<G4int>( ResidualA ) , static_cast<G4int>( ResidualZ ) ); 286 287 G4double a = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(ResidualA), 288 static_cast<G4int>(ResidualZ),MaximalKineticEnergy+V-delta0); 289 G4double Ux = (2.5 + 150.0/ResidualA)*MeV; 290 G4double Ex = Ux + delta0; 291 G4double T = 1.0/(std::sqrt(a/Ux) - 1.5/Ux); 292 //JMQ fixed bug in units 293 G4double E0 = Ex - T*(std::log(T/MeV) - std::log(a*MeV)/4.0 - 1.25*std::log(Ux/MeV) + 2.0*std::sqrt(a*Ux)); 294 // ***end RESIDUAL *** 295 296 // ***PARENT*** 297 //JMQ (September 2009) the following quantities refer to the PARENT: 298 299 G4double deltaCN=G4PairingCorrection::GetInstance()-> 300 GetPairingCorrection(static_cast<G4int>(fragment.GetA()),static_cast<G4int>(fragment.GetZ())); 301 G4double aCN = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()), 302 static_cast<G4int>(fragment.GetZ()),U-deltaCN); 303 G4double UxCN = (2.5 + 150.0/fragment.GetA())*MeV; 304 G4double ExCN = UxCN + deltaCN; 305 G4double TCN = 1.0/(std::sqrt(aCN/UxCN) - 1.5/UxCN); 306 //JMQ fixed bug in units 307 G4double E0CN = ExCN - TCN*(std::log(TCN/MeV) - std::log(aCN*MeV)/4.0 - 1.25*std::log(UxCN/MeV) + 2.0*std::sqrt(aCN*UxCN)); 308 // ***end PARENT*** 309 310 G4double Width; 311 G4double InitialLevelDensity; 312 G4double t = MaximalKineticEnergy/T; 313 if ( MaximalKineticEnergy < Ex ) { 314 //JMQ 190709 bug in I1 fixed (T was missing) 315 Width = (I1(t,t)*T + (Beta+V)*I0(t))/std::exp(E0/T); 316 //JMQ 160909 fix: InitialLevelDensity has been taken away (different conditions for initial CN..) 317 } else { 318 G4double tx = Ex/T; 319 G4double s = 2.0*std::sqrt(a*(MaximalKineticEnergy-delta0)); 320 G4double sx = 2.0*std::sqrt(a*(Ex-delta0)); 321 Width = I1(t,tx)*T/std::exp(E0/T) + I3(s,sx)*std::exp(s)/(std::sqrt(2.0)*a); 322 // For charged particles (Beta+V) = 0 beacuse Beta = -V 323 if (theZ == 0) { 324 Width += (Beta+V)*(I0(tx)/std::exp(E0/T) + 2.0*std::sqrt(2.0)*I2(s,sx)*std::exp(s)); 325 } 326 } 327 328 //JMQ 14/07/2009 BIG BUG : NuclearMass is in MeV => hbarc instead of hbar_planck must be used 329 // G4double g = (2.0*Spin+1.0)*NuclearMass/(pi2* hbar_Planck*hbar_Planck); 330 G4double g = (2.0*Spin+1.0)*NuclearMass/(pi2* hbarc*hbarc); 331 332 //JMQ 190709 fix on Rb and geometrical cross sections according to Furihata's paper 333 // (JAERI-Data/Code 2001-105, p6) 334 // G4double RN = 0.0; 335 G4double Rb = 0.0; 336 if (theA > 4) 337 { 338 // G4double R1 = std::pow(ResidualA,1.0/3.0); 339 // G4double R2 = std::pow(G4double(theA),1.0/3.0); 340 G4double Ad = std::pow(ResidualA,1.0/3.0); 341 G4double Aj = std::pow(G4double(theA),1.0/3.0); 342 // RN = 1.12*(R1 + R2) - 0.86*((R1+R2)/(R1*R2)); 343 Rb = 1.12*(Aj + Ad) - 0.86*((Aj+Ad)/(Aj*Ad))+2.85; 344 Rb *= fermi; 345 } 346 else if (theA>1) 347 { 348 G4double Ad = std::pow(ResidualA,1.0/3.0); 349 G4double Aj = std::pow(G4double(theA),1.0/3.0); 350 Rb=1.5*(Aj+Ad)*fermi; 351 } 352 else 353 { 354 G4double Ad = std::pow(ResidualA,1.0/3.0); 355 Rb = 1.5*Ad*fermi; 356 } 357 // G4double GeometricalXS = pi*RN*RN*std::pow(ResidualA,2./3.); 358 G4double GeometricalXS = pi*Rb*Rb; 359 //end of JMQ fix on Rb by 190709 360 361 362 363 //JMQ 160909 fix: initial level density must be calculated according to the 364 // conditions at the initial compound nucleus 365 // (it has been removed from previous "if" for the residual) 366 367 if ( U < ExCN ) 368 { 369 InitialLevelDensity = (pi/12.0)*std::exp((U-E0CN)/TCN)/TCN; 370 } 371 else 372 { 373 InitialLevelDensity = (pi/12.0)*std::exp(2*std::sqrt(aCN*(U-deltaCN)))/std::pow(aCN*std::pow(U-deltaCN,5.0),1.0/4.0); 374 } 375 // 376 377 378 //JMQ 190709 BUG : pi instead of sqrt(pi) must be here according to Furihata's report: 379 // Width *= std::sqrt(pi)*g*GeometricalXS*Alpha/(12.0*InitialLevelDensity); 380 Width *= pi*g*GeometricalXS*Alpha/(12.0*InitialLevelDensity); 381 382 383 return Width; 384 } 385 */ 386 387 G4double G4GEMProbability::I3(const G4double s, const G4double sx) 259 G4double G4GEMProbability::I3(G4double s, G4double sx) 388 260 { 389 261 G4double s2 = s*s; -
trunk/source/processes/hadronic/models/de_excitation/handler/include/G4ExcitationHandler.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ExcitationHandler.hh,v 1.1 2 2010/04/27 14:00:23vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4ExcitationHandler.hh,v 1.13 2010/11/17 16:20:31 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // Hadronic Process: Nuclear De-excitations … … 59 59 #include "G4ReactionProductVector.hh" 60 60 #include "G4ReactionProduct.hh" 61 #include "G4ParticleTypes.hh"62 #include "G4ParticleTable.hh"63 61 // needed for default models 64 62 #include "G4Evaporation.hh" … … 66 64 #include "G4FermiBreakUp.hh" 67 65 #include "G4PhotonEvaporation.hh" 68 #include "G4IonConstructor.hh" 66 67 class G4IonTable; 69 68 70 69 class G4ExcitationHandler … … 141 140 G4double minExcitation; 142 141 143 G4 ParticleTable *theTableOfParticles;142 G4IonTable* theTableOfIons; 144 143 145 144 G4bool MyOwnEvaporationClass; -
trunk/source/processes/hadronic/models/de_excitation/handler/src/G4ExcitationHandler.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ExcitationHandler.cc,v 1. 39 2010/05/18 15:46:11vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4ExcitationHandler.cc,v 1.40 2010/11/17 16:20:38 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // Hadronic Process: Nuclear De-excitations … … 62 62 #include "G4LorentzVector.hh" 63 63 #include "G4NistManager.hh" 64 #include "G4ParticleTable.hh" 65 #include "G4IonTable.hh" 66 #include "G4IonConstructor.hh" 67 #include "G4ParticleTypes.hh" 68 64 69 #include <list> 65 70 … … 70 75 maxZForFermiBreakUp(9),maxAForFermiBreakUp(17),minEForMultiFrag(4.0*GeV), 71 76 // maxZForFermiBreakUp(9),maxAForFermiBreakUp(17),minEForMultiFrag(3.0*MeV), 72 //maxZForFermiBreakUp(1),maxAForFermiBreakUp(1),minEForMultiFrag(4.0*GeV),73 77 minExcitation(CLHEP::keV), 74 78 MyOwnEvaporationClass(true), MyOwnMultiFragmentationClass(true),MyOwnFermiBreakUpClass(true), 75 79 MyOwnPhotonEvaporationClass(true),OPTxs(3),useSICB(false) 76 80 { 77 theTableOf Particles = G4ParticleTable::GetParticleTable();81 theTableOfIons = G4ParticleTable::GetParticleTable()->GetIonTable(); 78 82 79 83 theEvaporation = new G4Evaporation; … … 335 339 theKindOfFragment = G4Alpha::AlphaDefinition();; 336 340 } else { 337 theKindOfFragment = theTableOfParticles->FindIon(theFragmentZ,theFragmentA,0,theFragmentZ); 341 theKindOfFragment = 342 theTableOfIons->GetIon(theFragmentZ,theFragmentA,0.0); 338 343 } 339 344 if (theKindOfFragment != 0) … … 350 355 return theReactionProductVector; 351 356 } 352 353 354 357 355 358 G4ReactionProductVector * … … 399 402 theKindOfFragment = theAlpha; 400 403 } else { 401 theKindOfFragment = theTableOfParticles->FindIon(theFragmentZ,theFragmentA,0,theFragmentZ); 404 theKindOfFragment = 405 theTableOfIons->GetIon(theFragmentZ,theFragmentA,0.0); 402 406 } 403 407 if (theKindOfFragment != 0) … … 407 411 theNew->SetTotalEnergy(theFragmentMomentum.e()); 408 412 theNew->SetFormationTime((*i)->GetCreationTime()); 409 #ifdef PRECOMPOUND_TEST410 theNew->SetCreatorModel((*i)->GetCreatorModel());411 #endif412 413 theReactionProductVector->push_back(theNew); 413 414 } … … 458 459 ProductsEnergy += tmp.e(); 459 460 ProductsMomentum += tmp.vect(); 460 ProductsA += static_cast<G4int>((*h)->GetA());461 ProductsZ += static_cast<G4int>((*h)->GetZ());461 ProductsA += (*h)->GetA_asInt(); 462 ProductsZ += (*h)->GetZ_asInt(); 462 463 } 463 464 464 if (ProductsA != theInitialState.GetA ()) {465 if (ProductsA != theInitialState.GetA_asInt()) { 465 466 G4cout << "!!!!!!!!!! Baryonic Number Conservation Violation !!!!!!!!!!" << G4endl; 466 467 G4cout << "G4ExcitationHandler.cc: Barionic Number Conservation test for deexcitation fragments" 467 468 << G4endl; 468 G4cout << "Initial A = " << theInitialState.GetA ()469 G4cout << "Initial A = " << theInitialState.GetA_asInt() 469 470 << " Fragments A = " << ProductsA << " Diference --> " 470 471 << theInitialState.GetA() - ProductsA << G4endl; 471 472 } 472 if (ProductsZ != theInitialState.GetZ ()) {473 if (ProductsZ != theInitialState.GetZ_asInt()) { 473 474 G4cout << "!!!!!!!!!! Charge Conservation Violation !!!!!!!!!!" << G4endl; 474 475 G4cout << "G4ExcitationHandler.cc: Charge Conservation test for deexcitation fragments" -
trunk/source/processes/hadronic/models/de_excitation/management/include/G4VEvaporationChannel.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEvaporationChannel.hh,v 1. 6 2010/05/11 11:16:04 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4VEvaporationChannel.hh,v 1.7 2010/10/29 17:35:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // Hadronic Process: Nuclear De-excitations … … 52 52 virtual ~G4VEvaporationChannel(); 53 53 54 private:55 56 G4VEvaporationChannel(const G4VEvaporationChannel & right);57 const G4VEvaporationChannel & operator=(const G4VEvaporationChannel & right);58 59 public:60 61 G4bool operator==(const G4VEvaporationChannel & right) const;62 G4bool operator!=(const G4VEvaporationChannel & right) const;63 64 54 virtual void Initialize(const G4Fragment & fragment) = 0; 65 55 … … 78 68 virtual G4double GetEmissionProbability(void) const = 0; 79 69 80 G4String GetName() const {return Name;}81 void SetName(const G4String & aName) { Name = aName;}70 inline G4String GetName() const {return Name;} 71 inline void SetName(const G4String & aName) { Name = aName;} 82 72 83 73 // for cross section selection … … 94 84 G4String Name; 95 85 86 G4VEvaporationChannel(const G4VEvaporationChannel & right); 87 const G4VEvaporationChannel & operator=(const G4VEvaporationChannel & right); 88 G4bool operator==(const G4VEvaporationChannel & right) const; 89 G4bool operator!=(const G4VEvaporationChannel & right) const; 90 96 91 }; 97 92 -
trunk/source/processes/hadronic/models/de_excitation/management/src/G4VEvaporationChannel.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VEvaporationChannel.cc,v 1. 6 2010/04/25 18:43:08vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4VEvaporationChannel.cc,v 1.7 2010/10/29 17:35:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // Hadronic Process: Nuclear De-excitations … … 34 34 // new virtual methods EmittedFragment(s) to allow more optimal 35 35 // work with G4Fragment objects; removed unnecesary exceptions 36 // 28.10.2010 V.Ivanchenko defined members in constructor and cleaned up 36 37 37 38 #include "G4VEvaporationChannel.hh" 38 #include "G4HadronicException.hh"39 39 40 40 G4VEvaporationChannel::G4VEvaporationChannel(const G4String & aName) 41 : Name(aName)41 :OPTxs(3),useSICB(false),Name(aName) 42 42 {} 43 43 44 44 G4VEvaporationChannel::~G4VEvaporationChannel() 45 45 {} 46 47 //G4VEvaporationChannel::G4VEvaporationChannel(const G4VEvaporationChannel &)48 //{49 // throw G4HadronicException(__FILE__, __LINE__, "G4VEvaporationChannel::copy_constructor meant to not be accessable");50 //}51 //const G4VEvaporationChannel & G4VEvaporationChannel::operator=(const G4VEvaporationChannel &)52 //{53 // throw G4HadronicException(__FILE__, __LINE__, "G4VEvaporationChannel::operator= meant to not be accessable");54 // return *this;55 //}56 57 G4bool G4VEvaporationChannel::operator==(const G4VEvaporationChannel &right) const58 {59 return (this == (G4VEvaporationChannel *) &right);60 }61 62 G4bool G4VEvaporationChannel::operator!=(const G4VEvaporationChannel &right) const63 {64 return (this != (G4VEvaporationChannel *) &right);65 }66 46 67 47 G4Fragment* G4VEvaporationChannel::EmittedFragment(G4Fragment*) -
trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroTemperature.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4StatMFMacroTemperature.hh,v 1. 4 2010/04/16 17:04:08vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4StatMFMacroTemperature.hh,v 1.5 2010/10/29 17:35:04 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 71 71 public: 72 72 73 G4double GetMeanMultiplicity(void) const {return _MeanMultiplicity;}73 inline G4double GetMeanMultiplicity(void) const {return _MeanMultiplicity;} 74 74 75 G4double GetChemicalPotentialMu(void) const {return _ChemPotentialMu;}75 inline G4double GetChemicalPotentialMu(void) const {return _ChemPotentialMu;} 76 76 77 G4double GetChemicalPotentialNu(void) const {return _ChemPotentialNu;}77 inline G4double GetChemicalPotentialNu(void) const {return _ChemPotentialNu;} 78 78 79 G4double GetTemperature(void) const {return _MeanTemperature;}79 inline G4double GetTemperature(void) const {return _MeanTemperature;} 80 80 81 G4double GetEntropy(void) const {return _MeanEntropy;}81 inline G4double GetEntropy(void) const {return _MeanEntropy;} 82 82 83 83 G4double CalcTemperature(void); -
trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMF.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4StatMF.cc,v 1. 6 2008/07/25 11:20:47vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4StatMF.cc,v 1.7 2010/10/29 17:35:04 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 81 81 82 82 if (theFragment.GetExcitationEnergy() <= 0.0) { 83 G4FragmentVector * theResult = new G4FragmentVector;84 theResult->push_back(new G4Fragment(theFragment));83 //G4FragmentVector * theResult = new G4FragmentVector; 84 //theResult->push_back(new G4Fragment(theFragment)); 85 85 return 0; 86 86 } -
trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroTemperature.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4StatMFMacroTemperature.cc,v 1. 8 2010/04/16 17:04:08vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4StatMFMacroTemperature.cc,v 1.9 2010/10/29 17:35:04 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 39 39 // to protect code from rare unwanted exception; moved constructor 40 40 // and destructor to source 41 // 28.10.10 V.Ivanchenko defined members in constructor and cleaned up 41 42 42 43 #include "G4StatMFMacroTemperature.hh" … … 54 55 _ChemPotentialMu(0.0), 55 56 _ChemPotentialNu(0.0), 57 _MeanEntropy(0.0), 56 58 _theClusters(ClusterVector) 57 {}58 59 G4StatMFMacroTemperature::G4StatMFMacroTemperature()60 59 {} 61 60 62 61 G4StatMFMacroTemperature::~G4StatMFMacroTemperature() 63 62 {} 64 65 // operators definitions66 G4StatMFMacroTemperature &67 G4StatMFMacroTemperature::operator=(const G4StatMFMacroTemperature & )68 {69 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::operator= meant to not be accessable");70 return *this;71 }72 73 G4bool G4StatMFMacroTemperature::operator==(const G4StatMFMacroTemperature & ) const74 {75 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::operator== meant to not be accessable");76 return false;77 }78 79 80 G4bool G4StatMFMacroTemperature::operator!=(const G4StatMFMacroTemperature & ) const81 {82 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::operator!= meant to not be accessable");83 return true;84 }85 86 87 63 88 64 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4ContinuumGammaDeexcitation.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ContinuumGammaDeexcitation.hh,v 1. 4 2010/04/25 18:43:21vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4ContinuumGammaDeexcitation.hh,v 1.5 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 47 47 // 48 48 #ifndef G4ContinuumGammaDeexcitation_hh 49 #define G4ContinuumGammaDeexcitation_hh 49 #define G4ContinuumGammaDeexcitation_hh 1 50 50 51 51 #include "G4VGammaDeexcitation.hh" -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4ContinuumGammaTransition.hh
r819 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ContinuumGammaTransition.hh,v 1.3 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 49 51 50 52 #ifndef G4ContinuumGammaTransition_hh 51 #define G4ContinuumGammaTransition_hh 53 #define G4ContinuumGammaTransition_hh 1 52 54 53 55 #include "globals.hh" … … 66 68 67 69 // Destructor 68 ~G4ContinuumGammaTransition();70 virtual ~G4ContinuumGammaTransition(); 69 71 70 72 // Functions 71 73 72 //-- virtual G4double GammaEnergy();73 //-- virtual G4double GetEnergyTo() const;74 virtual void SetEnergyFrom( constG4double energy);74 //-- virtual G4double GammaEnergy(); 75 //-- virtual G4double GetEnergyTo() const; 76 virtual void SetEnergyFrom(G4double energy); 75 77 virtual G4double GetGammaEnergy(); 76 78 virtual G4double GetGammaCreationTime(); -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4DiscreteGammaDeexcitation.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiscreteGammaDeexcitation.hh,v 1. 4 2010/04/25 18:43:21vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4DiscreteGammaDeexcitation.hh,v 1.5 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 84 84 virtual G4bool CanDoTransition(); 85 85 86 void SetICM(G4bool hl) { _icm = hl; };86 inline void SetICM(G4bool hl) { _icm = hl; }; 87 87 88 void SetRDM(G4bool hl) { _rdm = hl; };88 inline void SetRDM(G4bool hl) { _rdm = hl; }; 89 89 90 void SetHL(G4double hl) { _max_hl = hl; };90 inline void SetHL(G4double hl) { _max_hl = hl; }; 91 91 92 92 private: -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4DiscreteGammaTransition.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiscreteGammaTransition.hh,v 1. 5 2010/10/07 12:31:00 mkelseyExp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4DiscreteGammaTransition.hh,v 1.6 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 81 81 // Constructor 82 82 G4DiscreteGammaTransition(const G4NuclearLevel& level); 83 //JMQ 18041084 // G4DiscreteGammaTransition(const G4NuclearLevel& level, G4int Z);83 //JMQ 180410 84 // G4DiscreteGammaTransition(const G4NuclearLevel& level, G4int Z); 85 85 G4DiscreteGammaTransition(const G4NuclearLevel& level, G4int Z, G4int A); 86 86 87 87 // Destructor 88 ~G4DiscreteGammaTransition();88 virtual ~G4DiscreteGammaTransition(); 89 89 90 90 // Functions … … 92 92 public: 93 93 94 virtual void SetEnergyFrom( constG4double energy);94 virtual void SetEnergyFrom(G4double energy); 95 95 virtual G4double GetGammaEnergy(); 96 96 virtual G4double GetGammaCreationTime(); 97 97 virtual void SelectGamma(); 98 98 99 void SetICM(G4bool ic) { _icm = ic;};100 G4double GetBondEnergy () {return _bondE;};101 G4int GetOrbitNumber () {return _orbitE;};102 G4bool IsAGamma() {return _aGamma;};99 inline void SetICM(G4bool ic) { _icm = ic;}; 100 inline G4double GetBondEnergy () {return _bondE;}; 101 inline G4int GetOrbitNumber () {return _orbitE;}; 102 inline G4bool IsAGamma() {return _aGamma;}; 103 103 104 104 private: -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4E1Probability.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4E1Probability.hh,v 1. 5 2010/05/19 10:21:44 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4E1Probability.hh,v 1.6 2010/11/17 17:59:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 //--------------------------------------------------------------------- … … 57 57 virtual ~G4E1Probability(); 58 58 59 G4double EmissionProbability(const G4Fragment& frag, constG4double excite);60 G4double EmissionProbDensity(const G4Fragment& frag, constG4double ePhoton);59 G4double EmissionProbability(const G4Fragment& frag, G4double excite); 60 G4double EmissionProbDensity(const G4Fragment& frag, G4double ePhoton); 61 61 62 62 private: … … 69 69 70 70 // Integrator (simple Gaussian quadrature) 71 G4double EmissionIntegration(const G4Fragment& frag, const G4double excite, 72 const G4double lowLim, const G4double upLim, 73 const G4int numIters); 71 G4double EmissionIntegration(const G4Fragment& frag, 72 G4double lowLim, G4double upLim); 74 73 75 74 // members -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4E1SingleProbability1.hh
r819 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4E1SingleProbability1.hh,v 1.3 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 // … … 40 42 public: 41 43 42 G4E1SingleProbability1() {};44 G4E1SingleProbability1(); 43 45 44 ~G4E1SingleProbability1();46 virtual ~G4E1SingleProbability1(); 45 47 46 G4double EmissionProbability(const G4Fragment& frag, constG4double excite);47 G4double EmissionProbDensity(const G4Fragment& frag, constG4double ePhoton);48 G4double EmissionProbability(const G4Fragment& frag, G4double excite); 49 G4double EmissionProbDensity(const G4Fragment& frag, G4double ePhoton); 48 50 49 51 private: 50 51 // G4E1SingleProbability1() {};52 52 53 53 G4E1SingleProbability1(const G4E1SingleProbability1& right); … … 59 59 // Integrator (simple Gaussian quadrature) 60 60 61 G4double EmissionIntegration(const G4Fragment& frag, const G4double excite, 62 const G4double lowLim, const G4double upLim, 63 const G4int numIters); 64 65 // G4VLevelDensityParameter* _levelDensity; // Don't need this 61 G4double EmissionIntegration(const G4Fragment& frag, G4double excite, 62 G4double lowLim, G4double upLim, 63 G4int numIters); 66 64 67 65 }; -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4NeutronRadCapture.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronRadCapture.hh,v 1. 1 2009/08/31 13:52:42vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4NeutronRadCapture.hh,v 1.2 2010/10/29 17:35:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // … … 47 47 #include "G4Nucleus.hh" 48 48 49 class G4ParticleDefinition;50 49 class G4PhotonEvaporation; 51 50 … … 64 63 65 64 G4double lowestEnergyLimit; 66 G4ParticleDefinition* theNeutron;67 65 G4PhotonEvaporation* photonEvaporation; 68 66 }; -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4NuclearLevel.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclearLevel.hh,v 1.4 2010/10/07 07:50:13 mkelsey Exp $ 26 // $Id: G4NuclearLevel.hh,v 1.7 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 27 29 // ------------------------------------------------------------------- 28 30 // GEANT 4 class file … … 50 52 // Added half-life, angular momentum, parity, emissioni type 51 53 // reading from experimental data. 54 // 55 // 28 October 2010, V.Ivanchenko moved copy constructor to source, cleanup 56 // 52 57 // 53 58 // ------------------------------------------------------------------- 54 59 55 60 #ifndef G4NUCLEARLEVEL_HH 56 #define G4NUCLEARLEVEL_HH 61 #define G4NUCLEARLEVEL_HH 1 57 62 58 63 #include "globals.hh" 59 #include "G4NuclearLevel.hh"60 64 #include <vector> 61 65 … … 64 68 65 69 public: 66 G4NuclearLevel( const G4double energy, constG4double halfLife,67 const G4double angularMomentum, const std::vector<double>& eGamma,68 const std::vector< double>& wGamma, const std::vector<double>& polarities,69 const std::vector< double>& kCC, const std::vector<double>& l1CC,70 const std::vector< double>& l2CC, const std::vector<double>& l3CC,71 const std::vector< double>& m1CC, const std::vector<double>& m2CC,72 const std::vector< double>& m3CC, const std::vector<double>& m4CC,73 const std::vector< double>& m5CC, const std::vector<double>& nPlusCC,74 const std::vector< double>& totalCC);70 G4NuclearLevel(G4double energy, G4double halfLife, 71 G4double angularMomentum, const std::vector<G4double>& eGamma, 72 const std::vector<G4double>& wGamma, const std::vector<G4double>& polarities, 73 const std::vector<G4double>& kCC, const std::vector<G4double>& l1CC, 74 const std::vector<G4double>& l2CC, const std::vector<G4double>& l3CC, 75 const std::vector<G4double>& m1CC, const std::vector<G4double>& m2CC, 76 const std::vector<G4double>& m3CC, const std::vector<G4double>& m4CC, 77 const std::vector<G4double>& m5CC, const std::vector<G4double>& nPlusCC, 78 const std::vector<G4double>& totalCC); 75 79 76 80 ~G4NuclearLevel(); 77 81 78 const std::vector< double>& GammaEnergies() const;82 const std::vector<G4double>& GammaEnergies() const; 79 83 80 const std::vector< double>& GammaWeights() const;84 const std::vector<G4double>& GammaWeights() const; 81 85 82 const std::vector< double>& GammaProbabilities() const;86 const std::vector<G4double>& GammaProbabilities() const; 83 87 84 const std::vector< double>& GammaCumulativeProbabilities() const;88 const std::vector<G4double>& GammaCumulativeProbabilities() const; 85 89 86 const std::vector< double>& GammaPolarities() const;90 const std::vector<G4double>& GammaPolarities() const; 87 91 88 const std::vector< double>& KConvertionProbabilities() const;92 const std::vector<G4double>& KConvertionProbabilities() const; 89 93 90 const std::vector< double>& L1ConvertionProbabilities() const;94 const std::vector<G4double>& L1ConvertionProbabilities() const; 91 95 92 const std::vector< double>& L2ConvertionProbabilities() const;96 const std::vector<G4double>& L2ConvertionProbabilities() const; 93 97 94 const std::vector< double>& L3ConvertionProbabilities() const;98 const std::vector<G4double>& L3ConvertionProbabilities() const; 95 99 96 const std::vector< double>& M1ConvertionProbabilities() const;100 const std::vector<G4double>& M1ConvertionProbabilities() const; 97 101 98 const std::vector< double>& M2ConvertionProbabilities() const;102 const std::vector<G4double>& M2ConvertionProbabilities() const; 99 103 100 const std::vector< double>& M3ConvertionProbabilities() const;104 const std::vector<G4double>& M3ConvertionProbabilities() const; 101 105 102 const std::vector< double>& M4ConvertionProbabilities() const;106 const std::vector<G4double>& M4ConvertionProbabilities() const; 103 107 104 const std::vector< double>& M5ConvertionProbabilities() const;108 const std::vector<G4double>& M5ConvertionProbabilities() const; 105 109 106 const std::vector< double>& NPlusConvertionProbabilities() const;110 const std::vector<G4double>& NPlusConvertionProbabilities() const; 107 111 108 const std::vector< double>& TotalConvertionProbabilities() const;112 const std::vector<G4double>& TotalConvertionProbabilities() const; 109 113 110 114 G4double Energy() const; … … 121 125 G4bool operator!=(const G4NuclearLevel &right) const; 122 126 G4bool operator<(const G4NuclearLevel &right) const; 127 const G4NuclearLevel& operator=(const G4NuclearLevel &right); 123 128 124 const G4NuclearLevel& operator=(const G4NuclearLevel &right) 125 { 126 if(this != &right) 127 { 128 _energies = right._energies; 129 _weights =right._weights; 130 _prob =right._prob; 131 _cumProb =right._cumProb; 132 _polarities =right._polarities; 133 _kCC = right._kCC; 134 _l1CC =right._l1CC; 135 _l2CC =right._l2CC; 136 _l3CC =right._l3CC; 137 _m1CC = right._m1CC; 138 _m2CC = right._m2CC; 139 _m3CC = right._m3CC; 140 _m4CC = right._m4CC; 141 _m5CC = right._m5CC; 142 _nPlusCC = right._nPlusCC; 143 _totalCC = right._totalCC; 144 _energy = right._energy; 145 _halfLife = right._halfLife; 146 _angularMomentum = right._angularMomentum; 147 _nGammas = right._nGammas; 148 } 149 return *this; 150 } 151 152 G4NuclearLevel(const G4NuclearLevel &right) 153 { 154 if(this != &right) *this = right; 155 // G4cout << "####### Incrementing "<<Increment(1)<<G4endl; 156 } 157 158 protected: 129 G4NuclearLevel(const G4NuclearLevel &right); 159 130 160 131 private: 132 161 133 friend class G4NuclearLevelManager; 162 134 163 135 G4NuclearLevel(); 164 136 165 G4NuclearLevel( const G4double energy, constG4double halfLife,166 constG4double angularMomentum);137 G4NuclearLevel(G4double energy, G4double halfLife, 138 G4double angularMomentum); 167 139 168 140 void Finalize(); … … 173 145 G4int Increment(G4int aF); 174 146 175 std::vector< double> _energies;176 std::vector< double> _weights;177 std::vector< double> _prob;178 std::vector< double> _cumProb;179 std::vector< double> _polarities;180 std::vector< double> _kCC;181 std::vector< double> _l1CC;182 std::vector< double> _l2CC;183 std::vector< double> _l3CC;184 std::vector< double> _m1CC;185 std::vector< double> _m2CC;186 std::vector< double> _m3CC;187 std::vector< double> _m4CC;188 std::vector< double> _m5CC;189 std::vector< double> _nPlusCC;190 std::vector< double> _totalCC;147 std::vector<G4double> _energies; 148 std::vector<G4double> _weights; 149 std::vector<G4double> _prob; 150 std::vector<G4double> _cumProb; 151 std::vector<G4double> _polarities; 152 std::vector<G4double> _kCC; 153 std::vector<G4double> _l1CC; 154 std::vector<G4double> _l2CC; 155 std::vector<G4double> _l3CC; 156 std::vector<G4double> _m1CC; 157 std::vector<G4double> _m2CC; 158 std::vector<G4double> _m3CC; 159 std::vector<G4double> _m4CC; 160 std::vector<G4double> _m5CC; 161 std::vector<G4double> _nPlusCC; 162 std::vector<G4double> _totalCC; 191 163 192 164 G4double _energy; … … 203 175 204 176 205 206 207 208 209 210 211 212 213 214 215 216 217 218 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4NuclearLevelManager.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclearLevelManager.hh,v 1.5 2010/10/10 23:01:39 mkelsey Exp $ 26 // $Id: G4NuclearLevelManager.hh,v 1.6 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 27 29 // ------------------------------------------------------------------- 28 30 // GEANT 4 class file … … 51 53 52 54 #ifndef G4NUCLEARLEVELMANAGER_HH 53 #define G4NUCLEARLEVELMANAGER_HH 55 #define G4NUCLEARLEVELMANAGER_HH 1 54 56 55 57 #include "globals.hh" … … 66 68 67 69 G4NuclearLevelManager(); 68 G4NuclearLevelManager( const G4int Z, constG4int A, const G4String& filename);70 G4NuclearLevelManager(G4int Z, G4int A, const G4String& filename); 69 71 G4NuclearLevelManager(const G4NuclearLevelManager & right); 70 72 71 73 ~G4NuclearLevelManager(); 72 74 73 void SetNucleus( const G4int Z, constG4int A, const G4String& filename);75 void SetNucleus(G4int Z, G4int A, const G4String& filename); 74 76 75 G4bool IsValid() const { return _validity; }77 inline G4bool IsValid() const { return _validity; } 76 78 77 G4int NumberOfLevels() const { return (_levels ? _levels->size() : 0); }79 inline G4int NumberOfLevels() const { return (_levels ? _levels->size() : 0); } 78 80 79 81 const G4NuclearLevel* GetLevel(G4int i) const; 80 82 81 const G4NuclearLevel* NearestLevel( constG4double energy,82 constG4double eDiffMax=9999.*GeV) const;83 const G4NuclearLevel* NearestLevel(G4double energy, 84 G4double eDiffMax=9999.*GeV) const; 83 85 84 86 const G4NuclearLevel* LowestLevel() const; -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4NuclearLevelStore.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclearLevelStore.hh,v 1.3 2010/10/07 07:50:13 mkelsey Exp $ 26 // $Id: G4NuclearLevelStore.hh,v 1.4 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 27 28 // 28 // 20101004 M. Kelsey -- Replace G4String keys with integers (ZZZAAA), 29 // move string operation to GenerateFilename() 29 // 04-10-2010 M. Kelsey -- Replace G4String keys with integers (ZZZAAA), 30 // move string operation to GenerateFilename() 31 // 17-11-2010 V. Ivanchenko - make as a classical singleton. 30 32 31 33 #ifndef G4NuclearLevelStore_hh … … 42 44 43 45 public: 46 44 47 static G4NuclearLevelStore* GetInstance(); 45 48 46 G4NuclearLevelManager* GetManager( const G4int Z, constG4int A);49 G4NuclearLevelManager* GetManager(G4int Z, G4int A); 47 50 ~G4NuclearLevelStore(); 48 51 49 52 private: 50 G4int GenerateKey( const G4int Z, constG4int A) const { return Z*1000+A; }53 G4int GenerateKey(G4int Z, G4int A) const { return Z*1000+A; } 51 54 52 G4String GenerateFilename( const G4int Z, constG4int A) const;55 G4String GenerateFilename(G4int Z, G4int A) const; 53 56 54 57 typedef std::map<G4int,G4NuclearLevelManager*> ManagersMap; … … 56 59 ManagersMap theManagers; 57 60 G4String dirName; 61 62 static G4NuclearLevelStore* theInstance; 58 63 }; 59 64 #endif -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4PhotonEvaporation.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PhotonEvaporation.hh,v 1. 7 2010/05/11 11:22:14vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4PhotonEvaporation.hh,v 1.8 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 63 63 64 64 #ifndef G4PHOTONEVAPORATION_HH 65 #define G4PHOTONEVAPORATION_HH 65 #define G4PHOTONEVAPORATION_HH 1 66 66 67 67 #include "globals.hh" -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4PtrLevelVector.hh
r819 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PtrLevelVector.hh,v 1.3 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 40 42 // ------------------------------------------------------------------- 41 43 42 43 44 44 #ifndef G4PTRLEVELVECTOR_HH 45 #define G4PTRLEVELVECTOR_HH 45 #define G4PTRLEVELVECTOR_HH 1 46 46 47 47 #include "G4NuclearLevel.hh" -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4RandGeneralTmp.hh
r819 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RandGeneralTmp.hh,v 1.5 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 26 29 // ----------------------------------------------------------------------- 27 30 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4VGammaDeexcitation.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VGammaDeexcitation.hh,v 1. 8 2010/04/28 14:22:40vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4VGammaDeexcitation.hh,v 1.9 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 63 63 64 64 #ifndef G4VGAMMADEEXCITATION_HH 65 #define G4VGAMMADEEXCITATION_HH 65 #define G4VGAMMADEEXCITATION_HH 1 66 66 67 67 #include "globals.hh" … … 98 98 inline void Initialize(); 99 99 100 void SetEO(G4ElectronOccupancy eo) { _electronO = eo; };101 void SetVaccantSN( G4int val ) { _vSN = val;};100 inline void SetEO(G4ElectronOccupancy eo) { _electronO = eo; }; 101 inline void SetVaccantSN( G4int val ) { _vSN = val;}; 102 102 103 G4ElectronOccupancy GetEO() { return _electronO; };104 G4int GetVacantSN() {return _vSN;};103 inline G4ElectronOccupancy GetEO() { return _electronO; }; 104 inline G4int GetVacantSN() {return _vSN;}; 105 105 106 106 protected: -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4VGammaTransition.hh
r819 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VGammaTransition.hh,v 1.6 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 38 40 // Modifications: 39 41 // 40 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) 41 // Added creation time evaluation for products of evaporation 42 // 15.04.1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) 43 // Added creation time evaluation for products of evaporation 44 // 30.10.2010 V.Ivanchenko moved constructor and destructor to the source 42 45 // 43 46 // ------------------------------------------------------------------- 44 47 45 48 #ifndef G4VGAMMATRANSITION_HH 46 #define G4VGAMMATRANSITION_HH 49 #define G4VGAMMATRANSITION_HH 1 47 50 48 51 #include "globals.hh" … … 52 55 public: 53 56 54 G4VGammaTransition() {};57 G4VGammaTransition(); 55 58 56 virtual ~G4VGammaTransition() {};59 virtual ~G4VGammaTransition(); 57 60 58 61 virtual void SelectGamma() = 0; … … 60 63 virtual G4double GetGammaCreationTime() = 0; 61 64 62 virtual void SetEnergyFrom( constG4double energy) = 0;65 virtual void SetEnergyFrom(G4double energy) = 0; 63 66 64 67 private: -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4VPhotonEvaporation.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VPhotonEvaporation.hh,v 1. 3 2010/04/25 18:43:21vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4VPhotonEvaporation.hh,v 1.4 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 39 39 // 40 40 // Modifications: 41 // 42 // 17-11-2010 V.Ivanchenko moved constructor an ddestructor to the source 41 43 // 42 44 // ------------------------------------------------------------------- 43 45 44 46 #ifndef G4VPHOTONEVAPORATION_HH 45 #define G4VPHOTONEVAPORATION_HH 47 #define G4VPHOTONEVAPORATION_HH 1 46 48 47 49 #include "globals.hh" … … 52 54 public: 53 55 54 G4VPhotonEvaporation() {}; 55 virtual ~G4VPhotonEvaporation() {}; 56 57 G4bool operator==(const G4VPhotonEvaporation &right) const; 58 G4bool operator!=(const G4VPhotonEvaporation &right) const; 59 56 G4VPhotonEvaporation(); 57 virtual ~G4VPhotonEvaporation(); 58 60 59 virtual G4FragmentVector* BreakItUp(const G4Fragment &theNucleus) = 0; 61 60 … … 63 62 64 63 G4VPhotonEvaporation(const G4VPhotonEvaporation &right); 65 const G4VPhotonEvaporation& operator=(const G4VPhotonEvaporation &right); 64 const G4VPhotonEvaporation& operator=(const G4VPhotonEvaporation &right); 65 66 G4bool operator==(const G4VPhotonEvaporation &right) const; 67 G4bool operator!=(const G4VPhotonEvaporation &right) const; 66 68 67 69 }; -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaDeexcitation.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ContinuumGammaDeexcitation.cc,v 1. 7 2010/04/30 16:08:03vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4ContinuumGammaDeexcitation.cc,v 1.8 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 67 67 G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation() 68 68 : _nucleusZ(0), _nucleusA(0), _levelManager(0) 69 { } 70 69 {} 71 70 72 71 G4ContinuumGammaDeexcitation::~G4ContinuumGammaDeexcitation() 73 { } 74 72 {} 75 73 76 74 G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition() 77 75 { 78 76 G4Fragment* nucleus = GetNucleus(); 79 G4int Z = static_cast<G4int>(nucleus->GetZ());80 G4int A = static_cast<G4int>(nucleus->GetA());77 G4int Z = nucleus->GetZ_asInt(); 78 G4int A = nucleus->GetA_asInt(); 81 79 G4double excitation = nucleus->GetExcitationEnergy(); 82 80 … … 91 89 G4cout << "G4ContinuumGammaDeexcitation::CreateTransition - Created" << G4endl; 92 90 } 93 G4VGammaTransition* gt = new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose ); 91 G4VGammaTransition* gt = 92 new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose ); 94 93 95 94 return gt; … … 99 98 G4bool G4ContinuumGammaDeexcitation::CanDoTransition() 100 99 { 101 //JMQ: far too small, creating sometimes continuum gammas instead of the right discrete ones 102 // (when excitation energy is slightly over maximum discrete energy): changed 100 //JMQ: far too small, creating sometimes continuum gammas instead 101 // of the right discrete ones (when excitation energy is slightly 102 // over maximum discrete energy): changed 103 103 // G4double tolerance = 10*eV; 104 104 const G4double tolerance = CLHEP::keV; … … 116 116 G4double excitation = nucleus->GetExcitationEnergy(); 117 117 118 // G4int A = (G4int)nucleus->GetA(); 119 // G4int Z = (G4int)nucleus->GetZ(); 120 if (_nucleusA<2 || _nucleusZ<3) 118 if (_nucleusZ < 2 || _nucleusA < 3) 121 119 { 122 120 if (_verbose > 1) { -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaTransition.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ContinuumGammaTransition.cc,v 1.4 2010/10/07 07:50:13 mkelsey Exp $ 26 // $Id: G4ContinuumGammaTransition.cc,v 1.5 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 27 29 // ------------------------------------------------------------------- 28 30 // GEANT 4 class file … … 41 43 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) 42 44 // Added creation time evaluation for products of evaporation 43 // 02 May 2003, Vladimir Ivanchenko change interface to G4NuclearlevelManager 44 // 06 Oct 2010, M. Kelsey -- follow changes to G4NuclearLevelManager 45 // ------------------------------------------------------------------- 45 // 02 May 2003, V. Ivanchenko change interface to G4NuclearlevelManager 46 // 06 Oct 2010, M. Kelsey -- follow changes to G4NuclearLevelManager 47 // 17 Nov 2010, V. Ivanchenko use exponential law for sampling of time 48 // and extra cleanup 49 // ---------------------------------------------------------------------------- 46 50 // 47 51 // Class G4ContinuumGammaTransition.cc … … 52 56 #include "G4ConstantLevelDensityParameter.hh" 53 57 #include "G4RandGeneralTmp.hh" 58 #include "Randomize.hh" 59 #include "G4Pow.hh" 60 54 61 // 55 62 // Constructor … … 83 90 _eMin = 0.001 * MeV; 84 91 // Giant Dipole Resonance energy 85 G4double energyGDR = (40.3 / std::pow(G4double(_nucleusA),0.2) ) * MeV;92 G4double energyGDR = (40.3 / G4Pow::GetInstance()->powZ(_nucleusA,0.2) ) * MeV; 86 93 // Giant Dipole Resonance width 87 94 G4double widthGDR = 0.30 * energyGDR; … … 97 104 // 98 105 99 G4ContinuumGammaTransition::~G4ContinuumGammaTransition() {} 100 101 // 102 // Override GammaEnergy function from G4VGammaTransition 103 // 106 G4ContinuumGammaTransition::~G4ContinuumGammaTransition() 107 {} 104 108 105 109 void G4ContinuumGammaTransition::SelectGamma() … … 127 131 G4double finalExcitation = _excitation - _eGamma; 128 132 129 if(_verbose > 10) 133 if(_verbose > 10) { 130 134 G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma 131 135 << " finalExcitation = " << finalExcitation 132 136 << " random = " << random << G4endl; 133 134 // if (finalExcitation < 0)137 } 138 // if (finalExcitation < 0) 135 139 if(finalExcitation < _minLevelE/2.) 136 140 { … … 148 152 _gammaCreationTime = GammaTime(); 149 153 150 if(_verbose > 10) 154 if(_verbose > 10) { 151 155 G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = " 152 156 << _gammaCreationTime/second << G4endl; 153 157 } 154 158 return; 155 159 } … … 166 170 167 171 168 void G4ContinuumGammaTransition::SetEnergyFrom(const G4double energy) 169 { 170 172 void G4ContinuumGammaTransition::SetEnergyFrom(G4double energy) 173 { 171 174 if (energy > 0.) _excitation = energy; 172 return;173 174 175 } 175 176 … … 178 179 { 179 180 G4double theProb = 0.0; 180 181 if( (_excitation - e) < 0.0 || e < 0 || _excitation < 0) return theProb; 181 G4double U = std::max(0.0, _excitation - e); 182 183 if(e < 0.0 || _excitation < 0.0) { return theProb; } 182 184 183 185 G4ConstantLevelDensityParameter ldPar; 184 G4double aLevelDensityParam = ldPar.LevelDensityParameter(_nucleusA,_nucleusZ,_excitation); 185 186 G4double levelDensBef = std::exp(2.0*std::sqrt(aLevelDensityParam*_excitation)); 187 G4double levelDensAft = std::exp(2.0*std::sqrt(aLevelDensityParam*(_excitation - e))); 188 189 if(_verbose > 20) 190 G4cout << _nucleusA << " LevelDensityParameter = " << aLevelDensityParam 191 << " Bef Aft " << levelDensBef << " " << levelDensAft << G4endl; 186 G4double aLevelDensityParam = 187 ldPar.LevelDensityParameter(_nucleusA,_nucleusZ,_excitation); 188 189 //G4double levelDensBef = std::exp(2.0*std::sqrt(aLevelDensityParam*_excitation)); 190 //G4double levelDensAft = std::exp(2.0*std::sqrt(aLevelDensityParam*(_excitation - e))); 191 G4double coeff = std::exp(2.0*(std::sqrt(aLevelDensityParam*U) 192 - std::sqrt(aLevelDensityParam*_excitation))); 193 194 //if(_verbose > 20) 195 // G4cout << _nucleusA << " LevelDensityParameter = " << aLevelDensityParam 196 // << " Bef Aft " << levelDensBef << " " << levelDensAft << G4endl; 192 197 193 198 // Now form the probability density … … 199 204 G4double sigma0 = 2.5 * _nucleusA; 200 205 201 G4double Egdp = (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV;206 G4double Egdp = (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV; 202 207 G4double GammaR = 0.30 * Egdp; 203 208 204 G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc);209 const G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc); 205 210 206 211 G4double numerator = sigma0 * e*e * GammaR*GammaR; … … 210 215 G4double sigmaAbs = numerator/denominator ; 211 216 212 if(_verbose > 20) 217 if(_verbose > 20) { 213 218 G4cout << ".. " << Egdp << " .. " << GammaR 214 219 << " .. " << normC << " .. " << sigmaAbs 215 << " .. " << e*e << " .. " << levelDensAft/levelDensBef220 << " .. " << e*e << " .. " << coeff 216 221 << G4endl; 222 } 217 223 218 224 // theProb = normC * sigmaAbs * e*e * levelDensAft/levelDensBef; 219 theProb = sigmaAbs * e*e * levelDensAft/levelDensBef;225 theProb = sigmaAbs * e*e * coeff; 220 226 221 227 return theProb; … … 226 232 { 227 233 228 G4double GammaR = 0.30 * (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV;234 G4double GammaR = 0.30 * (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV; 229 235 G4double tau = hbar_Planck/GammaR; 230 236 G4double creationTime = -tau*std::log(G4UniformRand()); 237 /* 231 238 G4double tMin = 0; 232 239 G4double tMax = 10.0 * tau; … … 234 241 G4double sampleArray[200]; 235 242 236 for(G4int i = 0; i<nBins;i++)243 for(G4int i = 0; i<nBins;i++) 237 244 { 238 245 G4double t = tMin + ((tMax-tMin)/nBins)*i; … … 244 251 245 252 G4double creationTime = tMin + (tMax - tMin) * random; 246 253 */ 247 254 return creationTime; 248 255 } -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4DiscreteGammaDeexcitation.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiscreteGammaDeexcitation.cc,v 1.1 5 2010/05/10 07:20:40vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4DiscreteGammaDeexcitation.cc,v 1.17 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 76 76 { 77 77 G4Fragment* nucleus = GetNucleus(); 78 G4int A = static_cast<G4int>(nucleus->GetA());79 G4int Z = static_cast<G4int>(nucleus->GetZ());78 G4int A = nucleus->GetA_asInt(); 79 G4int Z = nucleus->GetZ_asInt(); 80 80 // _verbose =2; 81 81 // G4cout << "G4DiscreteGammaDeexcitation::CreateTransition: " << nucleus << G4endl; … … 163 163 } 164 164 } else { 165 if (excitation > _levelManager->MaxLevelEnergy() + _tolerance) canDo = false;165 if (excitation > _levelManager->MaxLevelEnergy() + _tolerance) { canDo = false; } 166 166 //if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false; 167 167 // The following is a protection to avoid looping in case of elements with very low … … 180 180 if (canDo) { 181 181 const G4NuclearLevel* level = _levelManager->NearestLevel(excitation); 182 if (level != 0) { 183 if (level->HalfLife() > _max_hl && !_rdm ) canDo = false; 182 if (!level) { 183 canDo = false; 184 184 185 } else { 185 canDo = false; 186 } 187 if (_verbose > 0) { 188 G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Halflife " 189 << level->HalfLife() << ", Calling from RDM " 190 << (_rdm ? " True " : " False ") << ", Max-HL = " << _max_hl << G4endl; 186 if (level->HalfLife() > _max_hl && !_rdm ) { canDo = false; } 187 188 if (_verbose > 0) { 189 G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Halflife " 190 << level->HalfLife() << ", Calling from RDM " 191 << (_rdm ? " True " : " False ") << ", Max-HL = " << _max_hl 192 << G4endl; 193 } 191 194 } 192 195 } 193 196 if (_verbose > 0) { 194 G4cout <<"G4DiscreteGammaDeexcitation::CanDoTransition - CanDo: "197 G4cout <<"G4DiscreteGammaDeexcitation::CanDoTransition - CanDo: " 195 198 << (canDo ? " True " : " False ") << G4endl; 196 199 } -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4DiscreteGammaTransition.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiscreteGammaTransition.cc,v 1.12 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 70 72 G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level): 71 73 _gammaEnergy(0.), _level(level), _excitation(0.), _gammaCreationTime(0.) 72 { } 74 { 75 _levelManager = 0; 76 } 73 77 74 78 //JMQ: now A is also needed in the constructor … … 78 82 _level(level), _excitation(0.), _gammaCreationTime(0.),_A(A),_Z(Z) 79 83 { 84 _levelManager = 0; 80 85 _verbose = 0; 81 86 //JMQ: added tolerence in the mismatch … … 250 255 } 251 256 252 void G4DiscreteGammaTransition::SetEnergyFrom( constG4double energy)257 void G4DiscreteGammaTransition::SetEnergyFrom(G4double energy) 253 258 { 254 259 _excitation = energy; -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4E1Probability.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4E1Probability.cc,v 1.9 2010/05/25 10:47:24 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4E1Probability.cc,v 1.11 2010/11/23 18:05:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 //--------------------------------------------------------------------- … … 37 36 // 18.05.2010 V.Ivanchenko trying to speedup the most slow method 38 37 // by usage of G4Pow, integer A and introduction of const members 39 // 38 // 17.11.2010 V.Ivanchenko perform general cleanup and simplification 39 // of integration method; low-limit of integration is defined 40 // by gamma energy or is zero (was always zero before) 40 41 // 41 42 42 43 #include "G4E1Probability.hh" 43 //#include "G4ConstantLevelDensityParameter.hh"44 44 #include "Randomize.hh" 45 45 #include "G4Pow.hh" … … 63 63 64 64 G4double G4E1Probability::EmissionProbDensity(const G4Fragment& frag, 65 constG4double gammaE)65 G4double gammaE) 66 66 { 67 67 … … 77 77 G4int Afrag = frag.GetA_asInt(); 78 78 G4double Uexcite = frag.GetExcitationEnergy(); 79 G4double U = std::max(0.0,Uexcite-gammaE); 79 80 80 if( (Uexcite-gammaE) < 0.0 || gammaE <0) { return theProb; }81 if(gammaE < 0.0) { return theProb; } 81 82 82 83 // Need a level density parameter. … … 89 90 // G4double levelDensAft = std::exp(2*std::sqrt(aLevelDensityParam*(Uexcite-gammaE))); 90 91 // VI reduce number of calls to exp 91 G4double levelDens = 1.0; 92 if( aLevelDensityParam > 0.0 ) { 93 levelDens = std::exp(2*(std::sqrt(aLevelDensityParam*(Uexcite-gammaE)) 94 - std::sqrt(aLevelDensityParam*Uexcite))); 95 } 92 G4double levelDens = 93 std::exp(2*(std::sqrt(aLevelDensityParam*U)-std::sqrt(aLevelDensityParam*Uexcite))); 96 94 // Now form the probability density 97 95 … … 140 138 141 139 G4double G4E1Probability::EmissionProbability(const G4Fragment& frag, 142 constG4double gammaE)140 G4double gammaE) 143 141 { 144 145 142 // From nuclear fragment properties and the excitation energy, calculate 146 143 // the probability for photon evaporation down to last ground level. 147 144 // fragment = nuclear fragment BEFORE de-excitation 148 145 149 G4double theProb = 0.0; 146 G4double upperLim = gammaE; 147 G4double lowerLim = 0.0; 150 148 151 G4double Uafter = 0.0; 152 const G4double Uexcite = frag.GetExcitationEnergy(); 153 154 G4double normC = 3.0; 155 156 const G4double upperLim = Uexcite; 157 const G4double lowerLim = Uafter; 158 const G4int numIters = 100; 159 160 // Fall-back is a uniform random number 161 162 //G4double uniformNum = G4UniformRand(); 163 //theProb = uniformNum; 149 //G4cout << "G4E1Probability::EmissionProbability: Emin= " << lowerLim 150 // << " Emax= " << upperLim << G4endl; 151 if( upperLim - lowerLim <= CLHEP::keV ) { return 0.0; } 164 152 165 153 // Need to integrate EmissionProbDensity from lowerLim to upperLim 166 // and multiply by normC154 // and multiply by factor 3 (?!) 167 155 168 G4double integ = normC * 169 EmissionIntegration(frag,gammaE,lowerLim,upperLim,numIters); 170 if(integ > 0.0) theProb = integ/(upperLim-lowerLim); 156 G4double integ = 3.0 * EmissionIntegration(frag,lowerLim,upperLim); 171 157 172 return theProb;158 return integ; 173 159 174 160 } 175 161 176 162 G4double G4E1Probability::EmissionIntegration(const G4Fragment& frag, 177 const G4double , 178 const G4double lowLim, const G4double upLim, 179 const G4int numIters) 163 G4double lowLim, G4double upLim) 180 164 181 165 { 166 // Simple integration 167 // VI replace by direct integration over 100 point 182 168 183 // Simple Gaussian quadrature integration 169 const G4int numIters = 100; 170 G4double Step = (upLim-lowLim)/G4double(numIters); 184 171 185 G4double x;186 G4double root3 = 1.0/std::sqrt(3.0);172 G4double res = 0.0; 173 G4double x = lowLim - 0.5*Step; 187 174 188 G4double Step = (upLim-lowLim)/(2.0*numIters); 189 G4double Delta = Step*root3; 190 191 G4double mean = 0.0; 192 193 G4double theInt = 0.0; 194 195 for(G4int i = 0; i < numIters; i++) { 196 197 x = (2*i + 1)*Step; 198 G4double E1ProbDensityA = EmissionProbDensity(frag,x+Delta); 199 G4double E1ProbDensityB = EmissionProbDensity(frag,x-Delta); 200 201 mean += E1ProbDensityA + E1ProbDensityB; 202 175 for(G4int i = 0; i < numIters; ++i) { 176 x += Step; 177 res += EmissionProbDensity(frag, x); 203 178 } 204 179 205 if(mean*Step > 0.0) theInt = mean*Step; 180 if(res > 0.0) { res /= G4double(numIters); } 181 else { res = 0.0; } 206 182 207 return theInt;183 return res; 208 184 209 185 } -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4E1SingleProbability1.cc
r819 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4E1SingleProbability1.cc,v 1.5 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 29 // Class G4E1SingleProbability1.cc … … 31 33 #include "G4ConstantLevelDensityParameter.hh" 32 34 #include "Randomize.hh" 35 #include "G4Pow.hh" 33 36 34 37 // Constructors and operators 35 38 // 36 39 37 G4E1SingleProbability1::G4E1SingleProbability1(const G4E1SingleProbability1& 38 ) : G4VEmissionProbability() 39 { 40 G4E1SingleProbability1::G4E1SingleProbability1() 41 {} 40 42 41 throw G4HadronicException(__FILE__, __LINE__, "G4E1SingleProbability1::copy_constructor meant to not be accessible"); 42 43 } 44 45 const G4E1SingleProbability1& G4E1SingleProbability1:: 46 operator=(const G4E1SingleProbability1& ) 47 { 48 49 throw G4HadronicException(__FILE__, __LINE__, "G4E1SingleProbability1::operator= meant to not be accessible"); 50 return *this; 51 } 52 53 G4bool G4E1SingleProbability1::operator==(const G4E1SingleProbability1& 54 ) const 55 { 56 57 return false; 58 59 } 60 61 G4bool G4E1SingleProbability1::operator!=(const G4E1SingleProbability1& ) 62 const 63 { 64 65 return true; 66 67 } 43 G4E1SingleProbability1::~G4E1SingleProbability1() 44 {} 68 45 69 46 // Calculate the emission probability … … 71 48 72 49 G4double G4E1SingleProbability1::EmissionProbDensity(const G4Fragment& frag, 73 constG4double exciteE)50 G4double exciteE) 74 51 { 75 52 … … 84 61 G4double theProb = 0.0; 85 62 86 const G4double Afrag = frag.GetA();87 const G4double Zfrag = frag.GetZ();88 constG4double Uexcite = frag.GetExcitationEnergy();63 G4int Afrag = frag.GetA_asInt(); 64 G4int Zfrag = frag.GetZ_asInt(); 65 G4double Uexcite = frag.GetExcitationEnergy(); 89 66 90 67 if( (Uexcite-exciteE) < 0.0 || exciteE < 0 || Uexcite <= 0) return theProb; … … 95 72 96 73 G4ConstantLevelDensityParameter a; 97 G4double aLevelDensityParam = a.LevelDensityParameter(static_cast<G4int>(Afrag), 98 static_cast<G4int>(Zfrag), 99 Uexcite); 74 G4double aLevelDensityParam = a.LevelDensityParameter(Afrag,Zfrag,Uexcite); 100 75 101 76 G4double levelDensBef = std::exp(2.0*std::sqrt(aLevelDensityParam*Uexcite)); … … 109 84 G4double sigma0 = 2.5 * Afrag * millibarn; // millibarns 110 85 111 G4double Egdp = (40.3 / std::pow(Afrag,0.2) )*MeV;86 G4double Egdp = (40.3 / G4Pow::GetInstance()->powZ(Afrag,0.2) )*MeV; 112 87 G4double GammaR = 0.30 * Egdp; 113 88 114 G4double normC = 1.0 / ((pi * hbarc)*(pi * hbarc));89 const G4double normC = 1.0 / ((pi * hbarc)*(pi * hbarc)); 115 90 116 91 // CD … … 144 119 145 120 G4double G4E1SingleProbability1::EmissionProbability(const G4Fragment& frag, 146 constG4double exciteE)121 G4double exciteE) 147 122 { 148 123 … … 178 153 179 154 G4double G4E1SingleProbability1::EmissionIntegration(const G4Fragment& frag, 180 constG4double ,181 const G4double lowLim, constG4double upLim,182 constG4int numIters)155 G4double , 156 G4double lowLim, G4double upLim, 157 G4int numIters) 183 158 184 159 { … … 187 162 188 163 G4double x; 189 G4double root3 = 1.0/std::sqrt(3.0);164 const G4double root3 = 1.0/std::sqrt(3.0); 190 165 191 166 G4double Step = (upLim-lowLim)/(2.0*numIters); … … 212 187 } 213 188 214 G4E1SingleProbability1::~G4E1SingleProbability1() {}215 189 216 190 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4NeutronRadCapture.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronRadCapture.cc,v 1. 5 2010/09/09 15:40:48vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4NeutronRadCapture.cc,v 1.6 2010/11/17 16:21:32 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // … … 45 45 #include "G4ParticleDefinition.hh" 46 46 #include "G4ParticleTable.hh" 47 #include "G4IonTable.hh" 47 48 #include "G4Deuteron.hh" 48 49 #include "G4Triton.hh" … … 108 109 109 110 lv1 -= lv2; 110 if(Z > 2 || A > 4) 111 { 112 theDef = G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z); 113 } 114 else if (Z == 1 && A == 2) {theDef = G4Deuteron::Deuteron();} 111 if (Z == 1 && A == 2) {theDef = G4Deuteron::Deuteron();} 115 112 else if (Z == 1 && A == 3) {theDef = G4Triton::Triton();} 116 113 else if (Z == 2 && A == 3) {theDef = G4He3::He3();} 117 114 else if (Z == 2 && A == 4) {theDef = G4Alpha::Alpha();} 115 else 116 { 117 theDef = 118 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(Z,A,0.0); 119 } 118 120 119 121 if (verboseLevel > 1) { … … 155 157 else 156 158 { 157 theDef = G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z); 159 theDef = 160 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(Z,A,0.0); 158 161 } 159 162 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4NuclearLevel.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclearLevel.cc,v 1.5 2010/10/10 23:01:39 mkelsey Exp $ 26 // $Id: G4NuclearLevel.cc,v 1.7 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 27 29 // ------------------------------------------------------------------- 28 30 // GEANT 4 class file … … 55 57 // reading from experimental data. 56 58 // 59 // 28 October 2010, V.Ivanchenko moved copy constructor to source, cleanup 60 // 57 61 // ------------------------------------------------------------------- 58 62 59 63 #include "G4NuclearLevel.hh" 60 61 64 #include "globals.hh" 62 65 … … 73 76 } 74 77 75 G4NuclearLevel::G4NuclearLevel( const G4double energy, constG4double halfLife,76 constG4double angularMomentum)78 G4NuclearLevel::G4NuclearLevel(G4double energy, G4double halfLife, 79 G4double angularMomentum) 77 80 : _energy(energy), _halfLife(halfLife), _angularMomentum(angularMomentum), 78 81 _nGammas(0) { … … 80 83 } 81 84 82 G4NuclearLevel::G4NuclearLevel( const G4double energy, constG4double halfLife,83 constG4double angularMomentum,84 const std::vector< double>& eGamma,85 const std::vector< double>& wGamma,86 const std::vector< double>& polarities,87 const std::vector< double>& kCC, const std::vector<double>& l1CC,88 const std::vector< double>& l2CC, const std::vector<double>& l3CC,89 const std::vector< double>& m1CC, const std::vector<double>& m2CC,90 const std::vector< double>& m3CC, const std::vector<double>& m4CC,91 const std::vector< double>& m5CC, const std::vector<double>& nPlusCC,92 const std::vector< double>& totalCC)85 G4NuclearLevel::G4NuclearLevel(G4double energy, G4double halfLife, 86 G4double angularMomentum, 87 const std::vector<G4double>& eGamma, 88 const std::vector<G4double>& wGamma, 89 const std::vector<G4double>& polarities, 90 const std::vector<G4double>& kCC, const std::vector<G4double>& l1CC, 91 const std::vector<G4double>& l2CC, const std::vector<G4double>& l3CC, 92 const std::vector<G4double>& m1CC, const std::vector<G4double>& m2CC, 93 const std::vector<G4double>& m3CC, const std::vector<G4double>& m4CC, 94 const std::vector<G4double>& m5CC, const std::vector<G4double>& nPlusCC, 95 const std::vector<G4double>& totalCC) 93 96 94 97 : _energies(eGamma), _weights(wGamma), _polarities(polarities), … … 107 110 } 108 111 109 110 112 G4bool G4NuclearLevel::operator==(const G4NuclearLevel &right) const 111 113 { … … 118 120 return (this != (G4NuclearLevel *) &right); 119 121 } 120 121 122 122 123 G4bool G4NuclearLevel::operator<(const G4NuclearLevel &right) const … … 126 127 } 127 128 128 129 const std::vector<double>& G4NuclearLevel::GammaEnergies() const 129 const std::vector<G4double>& G4NuclearLevel::GammaEnergies() const 130 130 { 131 131 return _energies; 132 132 } 133 133 134 const std::vector< double>& G4NuclearLevel::GammaWeights() const134 const std::vector<G4double>& G4NuclearLevel::GammaWeights() const 135 135 { 136 136 return _weights; … … 138 138 139 139 140 const std::vector< double>& G4NuclearLevel::GammaProbabilities() const140 const std::vector<G4double>& G4NuclearLevel::GammaProbabilities() const 141 141 { 142 142 return _prob; … … 144 144 145 145 146 const std::vector< double>& G4NuclearLevel::GammaCumulativeProbabilities() const146 const std::vector<G4double>& G4NuclearLevel::GammaCumulativeProbabilities() const 147 147 { 148 148 return _cumProb; … … 150 150 151 151 152 const std::vector< double>& G4NuclearLevel::GammaPolarities() const152 const std::vector<G4double>& G4NuclearLevel::GammaPolarities() const 153 153 { 154 154 return _polarities; 155 155 } 156 156 157 const std::vector< double>& G4NuclearLevel::KConvertionProbabilities() const157 const std::vector<G4double>& G4NuclearLevel::KConvertionProbabilities() const 158 158 { 159 159 return _kCC; 160 160 } 161 161 162 const std::vector< double>& G4NuclearLevel::L1ConvertionProbabilities() const162 const std::vector<G4double>& G4NuclearLevel::L1ConvertionProbabilities() const 163 163 { 164 164 return _l1CC; 165 165 } 166 166 167 const std::vector< double>& G4NuclearLevel::L2ConvertionProbabilities() const167 const std::vector<G4double>& G4NuclearLevel::L2ConvertionProbabilities() const 168 168 { 169 169 return _l2CC; 170 170 } 171 171 172 const std::vector< double>& G4NuclearLevel::L3ConvertionProbabilities() const172 const std::vector<G4double>& G4NuclearLevel::L3ConvertionProbabilities() const 173 173 { 174 174 return _l3CC; 175 175 } 176 176 177 const std::vector< double>& G4NuclearLevel::M1ConvertionProbabilities() const177 const std::vector<G4double>& G4NuclearLevel::M1ConvertionProbabilities() const 178 178 { 179 179 return _m1CC; 180 180 } 181 181 182 const std::vector< double>& G4NuclearLevel::M2ConvertionProbabilities() const182 const std::vector<G4double>& G4NuclearLevel::M2ConvertionProbabilities() const 183 183 { 184 184 return _m2CC; 185 185 } 186 186 187 const std::vector< double>& G4NuclearLevel::M3ConvertionProbabilities() const187 const std::vector<G4double>& G4NuclearLevel::M3ConvertionProbabilities() const 188 188 { 189 189 return _m3CC; 190 190 } 191 191 192 const std::vector< double>& G4NuclearLevel::M4ConvertionProbabilities() const192 const std::vector<G4double>& G4NuclearLevel::M4ConvertionProbabilities() const 193 193 { 194 194 return _m4CC; 195 195 } 196 196 197 const std::vector< double>& G4NuclearLevel::M5ConvertionProbabilities() const197 const std::vector<G4double>& G4NuclearLevel::M5ConvertionProbabilities() const 198 198 { 199 199 return _m5CC; 200 200 } 201 201 202 const std::vector< double>& G4NuclearLevel::NPlusConvertionProbabilities() const202 const std::vector<G4double>& G4NuclearLevel::NPlusConvertionProbabilities() const 203 203 { 204 204 return _nPlusCC; 205 205 } 206 206 207 const std::vector< double>& G4NuclearLevel::TotalConvertionProbabilities() const207 const std::vector<G4double>& G4NuclearLevel::TotalConvertionProbabilities() const 208 208 { 209 209 return _totalCC; … … 225 225 } 226 226 227 228 227 G4int G4NuclearLevel::NumberOfGammas() const 229 228 { … … 294 293 } 295 294 296 297 295 const G4NuclearLevel& G4NuclearLevel::operator=(const G4NuclearLevel &right) 296 { 297 if(this != &right) 298 { 299 _energies = right._energies; 300 _weights =right._weights; 301 _prob =right._prob; 302 _cumProb =right._cumProb; 303 _polarities =right._polarities; 304 _kCC = right._kCC; 305 _l1CC =right._l1CC; 306 _l2CC =right._l2CC; 307 _l3CC =right._l3CC; 308 _m1CC = right._m1CC; 309 _m2CC = right._m2CC; 310 _m3CC = right._m3CC; 311 _m4CC = right._m4CC; 312 _m5CC = right._m5CC; 313 _nPlusCC = right._nPlusCC; 314 _totalCC = right._totalCC; 315 _energy = right._energy; 316 _halfLife = right._halfLife; 317 _angularMomentum = right._angularMomentum; 318 _nGammas = right._nGammas; 319 } 320 return *this; 321 } 322 323 G4NuclearLevel::G4NuclearLevel(const G4NuclearLevel &right) 324 { 325 _energies = right._energies; 326 _weights =right._weights; 327 _prob =right._prob; 328 _cumProb =right._cumProb; 329 _polarities =right._polarities; 330 _kCC = right._kCC; 331 _l1CC =right._l1CC; 332 _l2CC =right._l2CC; 333 _l3CC =right._l3CC; 334 _m1CC = right._m1CC; 335 _m2CC = right._m2CC; 336 _m3CC = right._m3CC; 337 _m4CC = right._m4CC; 338 _m5CC = right._m5CC; 339 _nPlusCC = right._nPlusCC; 340 _totalCC = right._totalCC; 341 _energy = right._energy; 342 _halfLife = right._halfLife; 343 _angularMomentum = right._angularMomentum; 344 _nGammas = right._nGammas; 345 } 346 347 348 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4NuclearLevelManager.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclearLevelManager.cc,v 1.13 2010/10/10 23:01:39 mkelsey Exp $ 26 // $Id: G4NuclearLevelManager.cc,v 1.14 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 27 29 // ------------------------------------------------------------------- 28 30 // GEANT 4 class file … … 63 65 { } 64 66 65 G4NuclearLevelManager::G4NuclearLevelManager( const G4int Z, constG4int A, const G4String& filename) :67 G4NuclearLevelManager::G4NuclearLevelManager(G4int Z, G4int A, const G4String& filename) : 66 68 _nucleusA(A), _nucleusZ(Z), _fileName(filename), _validity(false), 67 69 _levels(0), _levelEnergy(0), _gammaEnergy(0), _probability(0) … … 78 80 } 79 81 80 void G4NuclearLevelManager::SetNucleus( const G4int Z, constG4int A, const G4String& filename)82 void G4NuclearLevelManager::SetNucleus(G4int Z, G4int A, const G4String& filename) 81 83 { 82 84 if (A <= 0 || Z <= 0 || Z > A ) … … 92 94 } 93 95 94 const G4NuclearLevel* G4NuclearLevelManager::GetLevel( int i) const {96 const G4NuclearLevel* G4NuclearLevelManager::GetLevel(G4int i) const { 95 97 return (i>=0 && i<NumberOfLevels()) ? (*_levels)[i] : 0; 96 98 } … … 98 100 99 101 const G4NuclearLevel* 100 G4NuclearLevelManager::NearestLevel(const G4double energy, 101 const G4double eDiffMax) const { 102 G4NuclearLevelManager::NearestLevel(G4double energy, 103 G4double eDiffMax) const 104 { 102 105 if (NumberOfLevels() <= 0) return 0; 103 106 … … 144 147 145 148 146 G4bool G4NuclearLevelManager::Read(std::ifstream& dataFile) { 149 G4bool G4NuclearLevelManager::Read(std::ifstream& dataFile) 150 { 147 151 G4bool goodRead = ReadDataLine(dataFile); 148 152 … … 187 191 188 192 G4bool 189 G4NuclearLevelManager::ReadDataItem(std::istream& dataFile, G4double& x) { 193 G4NuclearLevelManager::ReadDataItem(std::istream& dataFile, G4double& x) 194 { 190 195 G4bool okay = (dataFile >> buffer); // Get next token 191 196 if (okay) x = strtod(buffer, NULL); … … 194 199 } 195 200 196 197 void G4NuclearLevelManager::ProcessDataLine(){201 void G4NuclearLevelManager::ProcessDataLine() 202 { 198 203 const G4double minProbability = 1e-8; 199 204 … … 259 264 } 260 265 261 262 266 void G4NuclearLevelManager::MakeLevels() 263 267 { … … 304 308 305 309 G4NuclearLevel* 306 G4NuclearLevelManager::UseLevelOrMakeNew(G4NuclearLevel* level) { 310 G4NuclearLevelManager::UseLevelOrMakeNew(G4NuclearLevel* level) 311 { 307 312 if (level && _levelEnergy == level->Energy()) return level; // No change 308 313 … … 313 318 } 314 319 315 void G4NuclearLevelManager::AddDataToLevel(G4NuclearLevel* level) { 320 void G4NuclearLevelManager::AddDataToLevel(G4NuclearLevel* level) 321 { 316 322 if (!level) return; // Sanity check 317 323 … … 332 338 } 333 339 334 void G4NuclearLevelManager::FinishLevel(G4NuclearLevel* level) { 340 void G4NuclearLevelManager::FinishLevel(G4NuclearLevel* level) 341 { 335 342 if (!level || !_levels) return; // Sanity check 336 343 … … 353 360 GetLevel(i)->PrintAll(); 354 361 } 355 356 362 357 363 G4NuclearLevelManager::G4NuclearLevelManager(const G4NuclearLevelManager &right) -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4NuclearLevelStore.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclearLevelStore.cc,v 1.4 2010/10/07 07:50:13 mkelsey Exp $ 26 // $Id: G4NuclearLevelStore.cc,v 1.5 2010/11/17 16:50:53 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 27 28 // 28 // 20101006 M. Kelsey -- Drop static data members. 29 // 06-10-2010 M. Kelsey -- Drop static data members. 30 // 17-11-2010 V. Ivanchenko - make as a classical singleton. 29 31 30 32 #include "G4NuclearLevelStore.hh" 31 33 #include <sstream> 32 34 35 G4NuclearLevelStore* G4NuclearLevelStore::theInstance = 0; 36 33 37 G4NuclearLevelStore* G4NuclearLevelStore::GetInstance() 34 38 { 35 static G4NuclearLevelStore theInstance; 36 return &theInstance; 39 if(!theInstance) { 40 static G4NuclearLevelStore store; 41 theInstance = &store; 42 } 43 return theInstance; 37 44 } 38 45 39 46 G4NuclearLevelStore::G4NuclearLevelStore() 40 47 { 41 char* env = getenv("G4LEVELGAMMADATA");42 if (env == 0)48 char* env = getenv("G4LEVELGAMMADATA"); 49 if (env == 0) 43 50 { 44 G4cout << "G4NuclarLevelStore: please set the G4LEVELGAMMADATA environment variable\n";45 dirName = "";51 G4cout << "G4NuclarLevelStore: please set the G4LEVELGAMMADATA environment variable\n"; 52 dirName = ""; 46 53 } 47 else54 else 48 55 { 49 dirName = env;50 dirName += '/';56 dirName = env; 57 dirName += '/'; 51 58 } 52 59 } 53 60 54 55 61 G4NuclearLevelStore::~G4NuclearLevelStore() 56 62 { 57 ManagersMap::iterator i;58 for (i = theManagers.begin(); i != theManagers.end(); ++i)59 delete i->second;63 ManagersMap::iterator i; 64 for (i = theManagers.begin(); i != theManagers.end(); ++i) 65 delete i->second; 60 66 } 61 67 62 68 G4String 63 G4NuclearLevelStore::GenerateFilename(const G4int Z, const G4int A) const { 64 std::ostringstream streamName; 65 streamName << 'z' << Z << ".a" << A; 66 G4String name(streamName.str()); 67 return name; 69 G4NuclearLevelStore::GenerateFilename(G4int Z, G4int A) const 70 { 71 std::ostringstream streamName; 72 streamName << 'z' << Z << ".a" << A; 73 G4String name(streamName.str()); 74 return name; 68 75 } 69 76 70 71 77 G4NuclearLevelManager* 72 G4NuclearLevelStore::GetManager(const G4int Z, const G4int A) { 73 G4NuclearLevelManager * result = 0; 74 if (A < 1 || Z < 1 || A < Z) 78 G4NuclearLevelStore::GetManager(G4int Z, G4int A) 79 { 80 G4NuclearLevelManager * result = 0; 81 if (A < 1 || Z < 1 || A < Z) 75 82 { 76 83 G4cerr << "G4NuclearLevelStore::GetManager: Wrong values Z = " << Z … … 79 86 } 80 87 81 // Generate the key = filename82 G4int key = GenerateKey(Z,A);88 // Generate the key = filename 89 G4int key = GenerateKey(Z,A); 83 90 84 // Check if already exists that key85 ManagersMap::iterator idx = theManagers.find(key);86 // If doesn't exists then create it87 if ( idx == theManagers.end() )91 // Check if already exists that key 92 ManagersMap::iterator idx = theManagers.find(key); 93 // If doesn't exists then create it 94 if ( idx == theManagers.end() ) 88 95 { 89 G4String file = GenerateFilename(Z,A);90 result = new G4NuclearLevelManager(Z,A,dirName + file);91 theManagers.insert(std::make_pair(key,result));96 G4String file = GenerateFilename(Z,A); 97 result = new G4NuclearLevelManager(Z,A,dirName + file); 98 theManagers.insert(std::make_pair(key,result)); 92 99 } 93 // But if it exists...94 else100 // But if it exists... 101 else 95 102 { 96 result = idx->second;103 result = idx->second; 97 104 } 98 105 99 return result;106 return result; 100 107 } -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4PhotonEvaporation.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PhotonEvaporation.cc,v 1.1 3 2010/05/17 11:47:43 fleiExp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4PhotonEvaporation.cc,v 1.16 2010/11/23 18:03:21 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 { 76 76 _probAlgorithm = new G4E1Probability; 77 _discrDeexcitation = new G4DiscreteGammaDeexcitation; 77 G4DiscreteGammaDeexcitation* p = new G4DiscreteGammaDeexcitation(); 78 p->SetICM(false); 79 _discrDeexcitation = p; 78 80 _contDeexcitation = new G4ContinuumGammaDeexcitation; 79 (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetICM(false); 80 } 81 81 _nucleus = 0; 82 } 82 83 83 84 G4PhotonEvaporation::~G4PhotonEvaporation() … … 87 88 delete _contDeexcitation; 88 89 } 89 90 90 91 91 void G4PhotonEvaporation::Initialize(const G4Fragment& fragment) … … 290 290 G4double G4PhotonEvaporation::GetEmissionProbability() const 291 291 { 292 G4double prob = 0.; 293 if (_probAlgorithm != 0) { 294 prob = _probAlgorithm->EmissionProbability(*_nucleus,_gammaE); 295 } 292 G4double prob = 293 _probAlgorithm->EmissionProbability(*_nucleus,_nucleus->GetExcitationEnergy()); 296 294 return prob; 297 295 } … … 308 306 309 307 _myOwnProbAlgorithm = false; 310 311 return;312 308 } 313 309 … … 318 314 _contDeexcitation->SetVerboseLevel(verbose); 319 315 _discrDeexcitation->SetVerboseLevel(verbose); 320 321 return;322 316 } 323 317 … … 325 319 { 326 320 (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetICM(ic); 327 return;328 321 } 329 322 … … 331 324 { 332 325 (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetHL(hl); 333 return;334 326 } 335 327 … … 337 329 { 338 330 (dynamic_cast <G4DiscreteGammaDeexcitation*> (_discrDeexcitation))->SetRDM(fromRDM); 339 return;340 331 } 341 332 … … 343 334 { 344 335 _discrDeexcitation->SetEO(eo); 345 return;346 336 } 347 337 -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4VGammaDeexcitation.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VGammaDeexcitation.cc,v 1. 18 2010/06/25 09:46:13 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4VGammaDeexcitation.cc,v 1.20 2010/11/17 19:17:17 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 74 74 G4VGammaDeexcitation::G4VGammaDeexcitation(): _transition(0), _verbose(0), 75 75 _electronO (0), _vSN(-1) 76 { } 76 { 77 _nucleus = 0; 78 } 77 79 78 80 G4VGammaDeexcitation::~G4VGammaDeexcitation() … … 154 156 G4ParticleDefinition* gamma = G4Gamma::Gamma(); 155 157 156 G4DiscreteGammaTransition* dtransition = 0;157 dtransition =dynamic_cast <G4DiscreteGammaTransition*> (_transition);158 G4DiscreteGammaTransition* dtransition = 159 dynamic_cast <G4DiscreteGammaTransition*> (_transition); 158 160 if ( dtransition && !( dtransition->IsAGamma()) ) { 159 161 gamma = G4Electron::Electron(); -
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4VPhotonEvaporation.cc
r1340 r1347 38 38 // Modifications: 39 39 // 40 // 17-11-2010 V.Ivanchenko moved constructor an ddestructor to the source 41 // 40 42 // ------------------------------------------------------------------- 41 43 // 42 // $Id: G4VPhotonEvaporation.cc,v 1. 3 2010/04/25 18:43:21vnivanch Exp $43 // GEANT4 tag $Name: geant4-09-0 3-ref-09$44 // $Id: G4VPhotonEvaporation.cc,v 1.4 2010/11/17 16:50:53 vnivanch Exp $ 45 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 44 46 45 47 46 48 #include "G4VPhotonEvaporation.hh" 47 49 50 G4VPhotonEvaporation::G4VPhotonEvaporation() 51 {} 48 52 49 G4bool G4VPhotonEvaporation::operator==(const G4VPhotonEvaporation &right) const 50 { 51 return (this == (G4VPhotonEvaporation*) &right); 52 } 53 54 G4bool G4VPhotonEvaporation::operator!=(const G4VPhotonEvaporation &right) const 55 { 56 return (this != (G4VPhotonEvaporation*) &right); 57 } 53 G4VPhotonEvaporation::~G4VPhotonEvaporation() 54 {} 58 55 59 56 57 -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4AlphaCoulombBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4AlphaCoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4AlphaCoulombBarrier.hh,v 1.5 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4AlphaCoulombBarrier() : G4CoulombBarrier(4,2) {}; 43 ~G4AlphaCoulombBarrier() {}; 42 43 G4AlphaCoulombBarrier(); 44 virtual ~G4AlphaCoulombBarrier(); 44 45 45 46 private: … … 50 51 G4bool operator!=(const G4AlphaCoulombBarrier & right) const; 51 52 52 private: 53 54 virtual G4double BarrierPenetrationFactor(const G4double aZ) const; 55 53 virtual G4double BarrierPenetrationFactor(G4double aZ) const; 56 54 57 55 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4ConstantLevelDensityParameter.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4ConstantLevelDensityParameter.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4ConstantLevelDensityParameter.hh,v 1.6 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations (photon evaporation) … … 40 40 { 41 41 public: 42 G4ConstantLevelDensityParameter() : EvapLevelDensityParameter(0.125*(1./MeV)) {}; 42 43 G4ConstantLevelDensityParameter(); 43 44 virtual ~G4ConstantLevelDensityParameter(); 44 45 … … 56 57 private: 57 58 58 constG4double EvapLevelDensityParameter;59 G4double EvapLevelDensityParameter; 59 60 60 61 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookPairingCorrections.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CookPairingCorrections.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CookPairingCorrections.hh,v 1.6 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 52 52 ~G4CookPairingCorrections(); 53 53 54 G4double GetParingCorrection( const G4int A, constG4int Z) const {54 G4double GetParingCorrection(G4int A, G4int Z) const { 55 55 return GetPairingZ(Z) + GetPairingN(A-Z); 56 56 } 57 57 58 58 59 G4double GetPairingZ( constG4int Z) const {59 G4double GetPairingZ(G4int Z) const { 60 60 if ( this->IsInTableThisZ(Z) ) return PairingZTable[Z-ZTableMin]*MeV; 61 61 else { -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookShellCorrections.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CookShellCorrections.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CookShellCorrections.hh,v 1.6 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 54 54 ~G4CookShellCorrections(); 55 55 56 G4double GetShellCorrection( const G4int A, constG4int Z) const56 G4double GetShellCorrection(G4int A, G4int Z) const 57 57 { 58 58 return GetShellZ(Z) + GetShellN(A-Z); -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CoulombBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CoulombBarrier.hh,v 1. 6 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CoulombBarrier.hh,v 1.8 2010/11/15 13:23:27 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Dec 1999) 32 // 33 // 15-11-2010 V.Ivanchenko cleanup 32 34 33 35 #ifndef G4CoulombBarrier_h … … 41 43 class G4CoulombBarrier : public G4VCoulombBarrier 42 44 { 45 43 46 public: 47 44 48 G4CoulombBarrier(); 45 G4CoulombBarrier( const G4int anA,constG4int aZ);49 G4CoulombBarrier(G4int anA, G4int aZ); 46 50 virtual ~G4CoulombBarrier(); 51 52 G4double GetCoulombBarrier(G4int ARes, G4int ZRes, G4double U) const; 47 53 48 54 private: … … 53 59 G4bool operator!=(const G4CoulombBarrier & right) const; 54 60 55 public: 56 G4double GetCoulombBarrier(const G4int ARes, const G4int ZRes, 57 const G4double U) const; 61 virtual G4double BarrierPenetrationFactor(G4double ) const; 58 62 59 60 private: 61 62 virtual G4double BarrierPenetrationFactor(const G4double ) const {return 1.0;} 63 64 virtual G4double CalcCompoundRadius(const G4double ZRes) const 63 inline G4double CalcCompoundRadius(const G4double ZRes) const 65 64 { 66 65 return 2.173*fermi*(1.0+0.006103*static_cast<G4double>(GetZ())*ZRes)/ -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4DeuteronCoulombBarrier.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4DeuteronCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4DeuteronCoulombBarrier.hh,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 40 39 { 41 40 public: 42 G4DeuteronCoulombBarrier() : G4CoulombBarrier(2,1) {} 43 ~G4DeuteronCoulombBarrier() {} 41 42 G4DeuteronCoulombBarrier(); 43 virtual ~G4DeuteronCoulombBarrier(); 44 44 45 45 private: 46 G4DeuteronCoulombBarrier(const G4DeuteronCoulombBarrier & right);47 46 48 const G4DeuteronCoulombBarrier & operator=(const G4DeuteronCoulombBarrier & right); 49 G4bool operator==(const G4DeuteronCoulombBarrier & right) const; 50 G4bool operator!=(const G4DeuteronCoulombBarrier & right) const; 47 G4DeuteronCoulombBarrier(const G4DeuteronCoulombBarrier & right); 48 49 const G4DeuteronCoulombBarrier & operator=(const G4DeuteronCoulombBarrier & right); 50 G4bool operator==(const G4DeuteronCoulombBarrier & right) const; 51 G4bool operator!=(const G4DeuteronCoulombBarrier & right) const; 51 52 52 private: 53 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 53 virtual G4double BarrierPenetrationFactor(G4double aZ) const; 55 54 56 55 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4EvaporationLevelDensityParameter.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4EvaporationLevelDensityParameter.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4EvaporationLevelDensityParameter.hh,v 1.6 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 58 58 59 59 public: 60 G4double LevelDensityParameter(const G4int A,const G4int Z,const G4double U) const; 60 61 G4double LevelDensityParameter(G4int A, G4int Z, G4double U) const; 61 62 62 63 private: 63 64 64 G4double ShellCorrection(const G4int Z, constG4int N) const65 inline G4double ShellCorrection(G4int Z, G4int N) const 65 66 { 66 67 G4CameronTruranHilfShellCorrections* SPtr = G4CameronTruranHilfShellCorrections::GetInstance(); -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4He3CoulombBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4He3CoulombBarrier.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4He3CoulombBarrier.hh,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4He3CoulombBarrier() : G4CoulombBarrier(3,2) {} 43 ~G4He3CoulombBarrier() {} 42 43 G4He3CoulombBarrier(); 44 virtual ~G4He3CoulombBarrier(); 44 45 45 46 private: 46 G4He3CoulombBarrier(const G4He3CoulombBarrier & right);47 47 48 const G4He3CoulombBarrier & operator=(const G4He3CoulombBarrier & right); 49 G4bool operator==(const G4He3CoulombBarrier & right) const; 50 G4bool operator!=(const G4He3CoulombBarrier & right) const; 48 G4He3CoulombBarrier(const G4He3CoulombBarrier & right); 49 50 const G4He3CoulombBarrier & operator=(const G4He3CoulombBarrier & right); 51 G4bool operator==(const G4He3CoulombBarrier & right) const; 52 G4bool operator!=(const G4He3CoulombBarrier & right) const; 51 53 52 private: 53 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 54 virtual G4double BarrierPenetrationFactor(G4double aZ) const; 55 55 56 56 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4NeutronCoulombBarrier.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4NeutronCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4NeutronCoulombBarrier.hh,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 40 39 { 41 40 public: 42 G4NeutronCoulombBarrier() : G4CoulombBarrier(1,0) {} 43 ~G4NeutronCoulombBarrier() {} 41 42 G4NeutronCoulombBarrier(); 43 virtual ~G4NeutronCoulombBarrier(); 44 44 45 45 private: 46 G4NeutronCoulombBarrier(const G4NeutronCoulombBarrier & right);46 G4NeutronCoulombBarrier(const G4NeutronCoulombBarrier & right); 47 47 48 const G4NeutronCoulombBarrier & operator=(const G4NeutronCoulombBarrier & right);49 G4bool operator==(const G4NeutronCoulombBarrier & right) const;50 G4bool operator!=(const G4NeutronCoulombBarrier & right) const;48 const G4NeutronCoulombBarrier & operator=(const G4NeutronCoulombBarrier & right); 49 G4bool operator==(const G4NeutronCoulombBarrier & right) const; 50 G4bool operator!=(const G4NeutronCoulombBarrier & right) const; 51 51 52 private:53 54 G4double BarrierPenetrationFactor(const G4double ) const55 { return 1.0;}56 57 52 }; 58 53 -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4PairingCorrection.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4PairingCorrection.hh,v 1. 6 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4PairingCorrection.hh,v 1.8 2010/11/15 12:39:27 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 38 38 #include "G4CameronGilbertPairingCorrections.hh" 39 39 //#include "G4CameronTruranHilfPairingCorrections.hh" 40 41 40 42 41 class G4PairingCorrection … … 55 54 ~G4PairingCorrection(); 56 55 57 G4double GetPairingCorrection(const G4int A, const G4int Z) const 58 { 59 G4double PCorrection = 0.0; 60 const G4int N = A - Z; 61 if (theCookPairingCorrections->IsInTableThisN(N) && 62 theCookPairingCorrections->IsInTableThisZ(Z)) 63 PCorrection = theCookPairingCorrections->GetParingCorrection(A,Z); 64 else if (theCameronGilbertPairingCorrections->IsInTableThisN(N) && 65 theCameronGilbertPairingCorrections->IsInTableThisZ(Z)) 66 PCorrection = theCameronGilbertPairingCorrections->GetPairingCorrection(A,Z); 67 else { 68 const G4double PairingConstant = 12.0*MeV; 69 G4double Pair = (1.0 - static_cast<G4double>(Z) + 2.0*(Z/2)) + (1.0 - static_cast<G4double>(N) + 2.0*(N/2)); 70 PCorrection = Pair*PairingConstant/std::sqrt(static_cast<G4double>(A)); 71 } 72 return std::max(PCorrection,0.0); 73 } 56 G4double GetPairingCorrection(G4int A, G4int Z) const; 74 57 75 76 G4double GetFissionPairingCorrection(const G4int A, const G4int Z) const 77 { 78 const G4double PairingConstant = 14.0*MeV; 79 const G4int N = A - Z; 80 G4double Pair = (1.0 - static_cast<G4double>(Z) + 2.0*(Z/2)) + (1.0 - static_cast<G4double>(N) + 2.0*(N/2)); 81 G4double PCorrection = Pair*PairingConstant/std::sqrt(static_cast<G4double>(A)); 82 return PCorrection; 83 } 58 G4double GetFissionPairingCorrection(G4int A, G4int Z) const; 84 59 85 60 private: … … 87 62 88 63 G4CookPairingCorrections* theCookPairingCorrections; 89 // G4CameronTruranHilfPairingCorrections* theCameronTruranHilfPairingCorrections;64 // G4CameronTruranHilfPairingCorrections* theCameronTruranHilfPairingCorrections; 90 65 G4CameronGilbertPairingCorrections* theCameronGilbertPairingCorrections; 91 66 -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4ProtonCoulombBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4ProtonCoulombBarrier.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4ProtonCoulombBarrier.hh,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4ProtonCoulombBarrier() : G4CoulombBarrier(1,1) {} 43 ~G4ProtonCoulombBarrier() {} 42 43 G4ProtonCoulombBarrier(); 44 virtual ~G4ProtonCoulombBarrier(); 44 45 45 46 private: 46 G4ProtonCoulombBarrier(const G4ProtonCoulombBarrier & right);47 G4ProtonCoulombBarrier(const G4ProtonCoulombBarrier & right); 47 48 48 const G4ProtonCoulombBarrier & operator=(const G4ProtonCoulombBarrier & right);49 G4bool operator==(const G4ProtonCoulombBarrier & right) const;50 G4bool operator!=(const G4ProtonCoulombBarrier & right) const;49 const G4ProtonCoulombBarrier & operator=(const G4ProtonCoulombBarrier & right); 50 G4bool operator==(const G4ProtonCoulombBarrier & right) const; 51 G4bool operator!=(const G4ProtonCoulombBarrier & right) const; 51 52 52 53 private: 53 54 54 G4double BarrierPenetrationFactor(constG4double aZ) const;55 virtual G4double BarrierPenetrationFactor(G4double aZ) const; 55 56 56 57 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4TritonCoulombBarrier.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4TritonCoulombBarrier.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4TritonCoulombBarrier.hh,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4TritonCoulombBarrier() : G4CoulombBarrier(3,1) {} 43 ~G4TritonCoulombBarrier() {} 42 43 G4TritonCoulombBarrier(); 44 virtual ~G4TritonCoulombBarrier(); 44 45 45 46 private: … … 50 51 G4bool operator!=(const G4TritonCoulombBarrier & right) const; 51 52 52 private: 53 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 53 virtual G4double BarrierPenetrationFactor(G4double aZ) const; 55 54 56 55 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4VEmissionProbability.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4VEmissionProbability.hh,v 1. 5 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4VEmissionProbability.hh,v 1.7 2010/11/15 20:30:26 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 43 43 #include "globals.hh" 44 44 #include "G4Fragment.hh" 45 #include "G4PairingCorrection.hh" 46 #include "G4EvaporationLevelDensityParameter.hh" 47 #include "G4Pow.hh" 45 48 46 49 class G4VEmissionProbability … … 64 67 // for superimposed Coulomb Barrier for inverse cross sections 65 68 inline void UseSICB(G4bool use) { useSICB = use; } 69 66 70 protected: 67 G4int OPTxs; 68 G4bool useSICB; 71 G4int OPTxs; 72 G4bool useSICB; 73 74 G4Pow* fG4pow; 75 G4PairingCorrection* fPairCorr; 76 G4EvaporationLevelDensityParameter * theEvapLDPptr; 69 77 70 78 }; -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4AlphaCoulombBarrier.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4AlphaCoulombBarrier.cc,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4AlphaCoulombBarrier.cc,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 35 35 #include "G4HadronicException.hh" 36 36 37 G4AlphaCoulombBarrier::G4AlphaCoulombBarrier(const G4AlphaCoulombBarrier & ) : G4CoulombBarrier() 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaCoulombBarrier::copy_constructor meant to not be accessable."); 40 } 37 G4AlphaCoulombBarrier::G4AlphaCoulombBarrier() : G4CoulombBarrier(4,2) {} 38 G4AlphaCoulombBarrier::~G4AlphaCoulombBarrier() {} 41 39 42 40 43 const G4AlphaCoulombBarrier & G4AlphaCoulombBarrier::operator=(const G4AlphaCoulombBarrier & ) 44 { 45 throw G4HadronicException(__FILE__, __LINE__, "G4AlphaCoulombBarrier::operator= meant to not be accessable."); 46 return *this; 47 } 48 49 G4bool G4AlphaCoulombBarrier::operator==(const G4AlphaCoulombBarrier & ) const 50 { 51 return false; 52 } 53 54 G4bool G4AlphaCoulombBarrier::operator!=(const G4AlphaCoulombBarrier & ) const 55 { 56 return true; 57 } 58 59 60 G4double G4AlphaCoulombBarrier::BarrierPenetrationFactor(const G4double aZ) const 41 G4double G4AlphaCoulombBarrier::BarrierPenetrationFactor(G4double aZ) const 61 42 { 62 43 // Data comes from -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertPairingCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CameronGilbertPairingCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CameronGilbertPairingCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 79 79 G4CameronGilbertPairingCorrections* G4CameronGilbertPairingCorrections::GetInstance() 80 80 { 81 static G4CameronGilbertPairingCorrections theCorrections; 82 if (!theInstance) { theInstance = &theCorrections; } 81 if (!theInstance) { 82 static G4CameronGilbertPairingCorrections theCorrections; 83 theInstance = &theCorrections; 84 } 83 85 return theInstance; 84 86 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertShellCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CameronGilbertShellCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CameronGilbertShellCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 79 79 G4CameronGilbertShellCorrections* G4CameronGilbertShellCorrections::GetInstance() 80 80 { 81 static G4CameronGilbertShellCorrections theCorrections; 82 if (!theInstance) { theInstance = &theCorrections; } 81 if (!theInstance) { 82 static G4CameronGilbertShellCorrections theCorrections; 83 theInstance = &theCorrections; 84 } 83 85 return theInstance; 84 86 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronShellPlusPairingCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CameronShellPlusPairingCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CameronShellPlusPairingCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 97 97 G4CameronShellPlusPairingCorrections* G4CameronShellPlusPairingCorrections::GetInstance() 98 98 { 99 static G4CameronShellPlusPairingCorrections theCorrections; 100 if (!theInstance) { theInstance = &theCorrections; } 99 if (!theInstance) { 100 static G4CameronShellPlusPairingCorrections theCorrections; 101 theInstance = &theCorrections; 102 } 101 103 return theInstance; 102 104 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfPairingCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CameronTruranHilfPairingCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CameronTruranHilfPairingCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 84 84 G4CameronTruranHilfPairingCorrections* G4CameronTruranHilfPairingCorrections::GetInstance() 85 85 { 86 static G4CameronTruranHilfPairingCorrections theCorrections; 87 if (!theInstance) { theInstance = &theCorrections; } 86 if (!theInstance) { 87 static G4CameronTruranHilfPairingCorrections theCorrections; 88 theInstance = &theCorrections; 89 } 88 90 return theInstance; 89 91 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfShellCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CameronTruranHilfShellCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CameronTruranHilfShellCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 86 86 G4CameronTruranHilfShellCorrections* G4CameronTruranHilfShellCorrections::GetInstance() 87 87 { 88 static G4CameronTruranHilfShellCorrections theCorrections; 89 if (!theInstance) { theInstance = &theCorrections; } 88 if (!theInstance) { 89 static G4CameronTruranHilfShellCorrections theCorrections; 90 theInstance = &theCorrections; 91 } 90 92 return theInstance; 91 93 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4ConstantLevelDensityParameter.cc
r1055 r1347 35 35 #include "G4HadronicException.hh" 36 36 37 G4ConstantLevelDensityParameter:: 38 G4ConstantLevelDensityParameter(const G4ConstantLevelDensityParameter& ) : 39 G4VLevelDensityParameter(), EvapLevelDensityParameter(0.125*(1./MeV)) 40 { 41 throw G4HadronicException(__FILE__, __LINE__, "G4ConstantLevelDensityParameter::copy_constructor meant to not be accessable"); 42 } 37 G4ConstantLevelDensityParameter::G4ConstantLevelDensityParameter() 38 : EvapLevelDensityParameter(0.125/MeV) 39 {} 43 40 44 41 G4ConstantLevelDensityParameter::~G4ConstantLevelDensityParameter() 45 { 46 } 42 {} 47 43 48 const G4ConstantLevelDensityParameter & G4ConstantLevelDensityParameter::49 operator=(const G4ConstantLevelDensityParameter &)50 {51 throw G4HadronicException(__FILE__, __LINE__, "G4ConstantLevelDensityParameter::operator= meant to not be accessable");52 return *this;53 }54 55 56 G4bool G4ConstantLevelDensityParameter::operator==(const G4ConstantLevelDensityParameter &) const57 {58 return false;59 }60 61 G4bool G4ConstantLevelDensityParameter::operator!=(const G4ConstantLevelDensityParameter &) const62 {63 return true;64 }65 66 67 68 69 -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookPairingCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CookPairingCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CookPairingCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 78 78 G4CookPairingCorrections* G4CookPairingCorrections::GetInstance() 79 79 { 80 static G4CookPairingCorrections theCorrections; 81 if (!theInstance) { theInstance = &theCorrections; } 80 if (!theInstance) { 81 static G4CookPairingCorrections theCorrections; 82 theInstance = &theCorrections; 83 } 82 84 return theInstance; 83 85 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookShellCorrections.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4CookShellCorrections.cc,v 1. 6 2009/11/30 10:33:33 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4CookShellCorrections.cc,v 1.7 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 78 78 G4CookShellCorrections* G4CookShellCorrections::GetInstance() 79 79 { 80 static G4CookShellCorrections theCorrections; 81 if (!theInstance) { theInstance = &theCorrections; } 80 if (!theInstance) { 81 static G4CookShellCorrections theCorrections; 82 theInstance = &theCorrections; 83 } 82 84 return theInstance; 83 85 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CoulombBarrier.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4CoulombBarrier.cc,v 1.9 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4CoulombBarrier.cc,v 1.10 2010/11/15 12:44:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations 31 30 // by V. Lara (Dec 1999) 32 // modified barrier by JMQ (test30) by 14-11-07 31 // 32 // 14-11-2007 modified barrier by JMQ (test30) 33 // 15-11-2010 V.Ivanchenko use G4Pow and cleanup 33 34 34 35 #include "G4CoulombBarrier.hh" 35 36 #include "G4HadronicException.hh" 37 #include "G4Pow.hh" 36 38 #include <sstream> 37 39 38 G4CoulombBarrier::G4CoulombBarrier() 39 : G4VCoulombBarrier(1,0){}40 G4CoulombBarrier::G4CoulombBarrier(): G4VCoulombBarrier(1,0) 41 {} 40 42 41 G4CoulombBarrier::G4CoulombBarrier(const G4int anA,const G4int aZ) 42 : G4VCoulombBarrier(anA,aZ) {} 43 G4CoulombBarrier::G4CoulombBarrier(G4int anA, G4int aZ) 44 : G4VCoulombBarrier(anA,aZ) 45 {} 43 46 44 G4CoulombBarrier::~G4CoulombBarrier() {} 47 G4CoulombBarrier::~G4CoulombBarrier() 48 {} 45 49 46 G4 CoulombBarrier::G4CoulombBarrier(const G4CoulombBarrier & ) : G4VCoulombBarrier()50 G4double G4CoulombBarrier::BarrierPenetrationFactor(G4double ) const 47 51 { 48 throw G4HadronicException(__FILE__, __LINE__, "G4CoulombBarrier::copy_constructor meant to not be accessable.");52 return 1.0; 49 53 } 50 51 52 const G4CoulombBarrier & G4CoulombBarrier::operator=(const G4CoulombBarrier & )53 {54 throw G4HadronicException(__FILE__, __LINE__, "G4CoulombBarrier::operator= meant to not be accessable.");55 return *this;56 }57 58 G4bool G4CoulombBarrier::operator==(const G4CoulombBarrier & ) const59 {60 return false;61 }62 63 G4bool G4CoulombBarrier::operator!=(const G4CoulombBarrier & ) const64 {65 return true;66 }67 68 69 54 70 55 G4double G4CoulombBarrier::GetCoulombBarrier(const G4int ARes, const G4int ZRes, const G4double) const … … 85 70 } else { 86 71 87 // JMQ: old coulomb barrier commented since it does not agree with Dostrovski's prescription88 // and too low barriers are obtained (for protons at least)89 // calculation of K penetration factor is correct90 // G4double CompoundRadius = CalcCompoundRadius(static_cast<G4double>(ZRes));91 // Barrier = elm_coupling/CompoundRadius * static_cast<G4double>(GetZ())*static_cast<G4double>(ZRes)/92 // (std::pow(static_cast<G4double>(GetA()),1./3.) + std::pow(static_cast<G4double>(ARes),1./3.));72 // JMQ: old coulomb barrier commented since it does not agree with Dostrovski's prescription 73 // and too low barriers are obtained (for protons at least) 74 // calculation of K penetration factor is correct 75 // G4double CompoundRadius = CalcCompoundRadius(static_cast<G4double>(ZRes)); 76 // Barrier = elm_coupling/CompoundRadius * static_cast<G4double>(GetZ())*static_cast<G4double>(ZRes)/ 77 // (std::pow(static_cast<G4double>(GetA()),1./3.) + std::pow(static_cast<G4double>(ARes),1./3.)); 93 78 94 ///New coulomb Barrier according to original Dostrovski's paper95 G4double rho=1.2*fermi;96 if(GetA()==1 && GetZ()==1){ rho=0.0;}79 ///New coulomb Barrier according to original Dostrovski's paper 80 G4double rho=1.2*fermi; 81 if(GetA()==1 && GetZ()==1){ rho=0.0;} 97 82 98 G4double RN=1.5*fermi; 99 Barrier=elm_coupling* static_cast<G4double>(GetZ())*static_cast<G4double>(ZRes)/(RN*std::pow(static_cast<G4double>(ARes),1./3.)+rho); 83 G4double RN=1.5*fermi; 84 // VI cleanup 85 Barrier=elm_coupling*(GetZ()*ZRes)/(RN * G4Pow::GetInstance()->Z13(ARes) + rho); 100 86 101 87 // Barrier penetration coeficient 102 88 G4double K = BarrierPenetrationFactor(ZRes); 103 89 104 105 90 Barrier *= K; 106 //107 108 109 110 91 111 // JMQ : the following statement has unknown origin and dimensionally is meaningless( energy divided by mass number in argument of sqrt function). Energy dependence of Coulomb barrier penetrability should be included in proper way (if needed..)112 // Barrier /= (1.0 + std::sqrt(U/(2.0*static_cast<G4double>(ARes))));113 //92 // JMQ : the following statement has unknown origin and dimensionally is meaningless( energy divided by mass number in argument of sqrt function). Energy dependence of Coulomb barrier penetrability should be included in proper way (if needed..) 93 // Barrier /= (1.0 + std::sqrt(U/(2.0*static_cast<G4double>(ARes)))); 94 // 114 95 } 115 96 return Barrier; -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4DeuteronCoulombBarrier.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4DeuteronCoulombBarrier.cc,v 1.5 2008/09/19 13:32:54 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4DeuteronCoulombBarrier.cc,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 34 33 #include "G4DeuteronCoulombBarrier.hh" 35 34 36 G4DeuteronCoulombBarrier::G4DeuteronCoulombBarrier(const G4DeuteronCoulombBarrier & ) : G4CoulombBarrier() 37 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4DeuteronCoulombBarrier::copy_constructor meant to not be accessable."); 39 } 35 G4DeuteronCoulombBarrier::G4DeuteronCoulombBarrier() : G4CoulombBarrier(2,1) {} 36 G4DeuteronCoulombBarrier::~G4DeuteronCoulombBarrier() {} 40 37 41 42 const G4DeuteronCoulombBarrier & G4DeuteronCoulombBarrier::operator=(const G4DeuteronCoulombBarrier & ) 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4DeuteronCoulombBarrier::operator= meant to not be accessable."); 45 return *this; 46 } 47 48 G4bool G4DeuteronCoulombBarrier::operator==(const G4DeuteronCoulombBarrier & ) const 49 { 50 return false; 51 } 52 53 G4bool G4DeuteronCoulombBarrier::operator!=(const G4DeuteronCoulombBarrier & ) const 54 { 55 return true; 56 } 57 58 59 G4double G4DeuteronCoulombBarrier::BarrierPenetrationFactor(const G4double aZ) const 38 G4double G4DeuteronCoulombBarrier::BarrierPenetrationFactor(G4double aZ) const 60 39 { 61 40 // Data comes from -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4EvaporationLevelDensityParameter.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4EvaporationLevelDensityParameter.cc,v 1. 9 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4EvaporationLevelDensityParameter.cc,v 1.10 2010/11/15 16:09:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 42 42 43 43 //JMQ 17-04-08 these are not used at present in G4Evaporation 44 const G4double G4EvaporationLevelDensityParameter::ConstEvapLevelDensityParameter = 0.125 *(1./MeV);45 //const G4double G4EvaporationLevelDensityParameter::ConstEvapLevelDensityParameter= 0.0769231 *(1./MeV);46 const G4double G4EvaporationLevelDensityParameter::alpha = 0.072 *(1./MeV);47 const G4double G4EvaporationLevelDensityParameter::beta = 0.257 *(1./MeV);48 const G4double G4EvaporationLevelDensityParameter::gamma = 0.059 *(1./MeV);44 const G4double G4EvaporationLevelDensityParameter::ConstEvapLevelDensityParameter = 0.125/MeV; 45 //const G4double G4EvaporationLevelDensityParameter::ConstEvapLevelDensityParameter= 0.0769231/MeV; 46 const G4double G4EvaporationLevelDensityParameter::alpha = 0.072/MeV; 47 const G4double G4EvaporationLevelDensityParameter::beta = 0.257/MeV; 48 const G4double G4EvaporationLevelDensityParameter::gamma = 0.059/MeV; 49 49 const G4double G4EvaporationLevelDensityParameter::Bs = 1.0; 50 50 … … 52 52 G4EvaporationLevelDensityParameter::~G4EvaporationLevelDensityParameter() {} 53 53 54 G4EvaporationLevelDensityParameter:: 55 G4EvaporationLevelDensityParameter(const G4EvaporationLevelDensityParameter &) : G4VLevelDensityParameter() 56 { 57 throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationLevelDensityParameter::copy_constructor meant to not be accessable"); 58 } 59 60 61 const G4EvaporationLevelDensityParameter & G4EvaporationLevelDensityParameter:: 62 operator=(const G4EvaporationLevelDensityParameter &) 63 { 64 throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationLevelDensityParameter::operator= meant to not be accessable"); 65 return *this; 66 } 67 68 69 G4bool G4EvaporationLevelDensityParameter::operator==(const G4EvaporationLevelDensityParameter &) const 70 { 71 return false; 72 } 73 74 G4bool G4EvaporationLevelDensityParameter::operator!=(const G4EvaporationLevelDensityParameter &) const 75 { 76 return true; 77 } 78 79 G4double G4EvaporationLevelDensityParameter::LevelDensityParameter(const G4int A,const G4int, 80 const G4double) const 54 G4double 55 G4EvaporationLevelDensityParameter::LevelDensityParameter(G4int A, G4int, G4double) const 81 56 //JMQ (Apr .08) this is the method used in G4Evaporation 82 57 { 83 58 84 //JMQ 25/04/08 a=A/10 according to original Gudima's prescription85 G4double a=static_cast<G4double>(A)/10.;86 return a;59 //JMQ 25/04/08 a=A/10 according to original Gudima's prescription 60 G4double a=static_cast<G4double>(A)/10.; 61 return a; 87 62 // 88 63 -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4He3CoulombBarrier.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4He3CoulombBarrier.cc,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4He3CoulombBarrier.cc,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 34 34 #include "G4He3CoulombBarrier.hh" 35 35 36 G4He3CoulombBarrier::G4He3CoulombBarrier(const G4He3CoulombBarrier & ) : G4CoulombBarrier() 37 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4He3CoulombBarrier::copy_constructor meant to not be accessable."); 39 } 36 G4He3CoulombBarrier::G4He3CoulombBarrier() : G4CoulombBarrier(3,2) {} 37 G4He3CoulombBarrier::~G4He3CoulombBarrier() {} 40 38 41 42 const G4He3CoulombBarrier & G4He3CoulombBarrier::operator=(const G4He3CoulombBarrier & ) 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4He3CoulombBarrier::operator= meant to not be accessable."); 45 return *this; 46 } 47 48 G4bool G4He3CoulombBarrier::operator==(const G4He3CoulombBarrier & ) const 49 { 50 return false; 51 } 52 53 G4bool G4He3CoulombBarrier::operator!=(const G4He3CoulombBarrier & ) const 54 { 55 return true; 56 } 57 58 59 G4double G4He3CoulombBarrier::BarrierPenetrationFactor(const G4double aZ) const 39 G4double G4He3CoulombBarrier::BarrierPenetrationFactor(G4double aZ) const 60 40 { 61 41 // Data comes from -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4NeutronCoulombBarrier.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4NeutronCoulombBarrier.cc,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4NeutronCoulombBarrier.cc,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 34 34 #include "G4NeutronCoulombBarrier.hh" 35 35 36 G4NeutronCoulombBarrier::G4NeutronCoulombBarrier(const G4NeutronCoulombBarrier & ) : G4CoulombBarrier() 37 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronCoulombBarrier::copy_constructor meant to not be accessable."); 39 } 36 G4NeutronCoulombBarrier::G4NeutronCoulombBarrier() : G4CoulombBarrier(1,0) {} 37 G4NeutronCoulombBarrier::~G4NeutronCoulombBarrier() {} 40 38 41 39 42 const G4NeutronCoulombBarrier & G4NeutronCoulombBarrier::operator=(const G4NeutronCoulombBarrier & )43 {44 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronCoulombBarrier::operator= meant to not be accessable.");45 return *this;46 }47 48 G4bool G4NeutronCoulombBarrier::operator==(const G4NeutronCoulombBarrier & ) const49 {50 return false;51 }52 53 G4bool G4NeutronCoulombBarrier::operator!=(const G4NeutronCoulombBarrier & ) const54 {55 return true;56 }57 -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4PairingCorrection.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PairingCorrection.cc,v 1.6 2009/11/30 10:33:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4PairingCorrection.cc,v 1.8 2010/11/15 12:41:58 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 33 32 34 33 #include "G4PairingCorrection.hh" 35 36 34 37 35 G4PairingCorrection* G4PairingCorrection::theInstance = 0; … … 49 47 G4PairingCorrection* G4PairingCorrection::GetInstance() 50 48 { 51 static G4PairingCorrection theCorrections; 52 if (!theInstance) { theInstance = &theCorrections; } 49 if (!theInstance) { 50 static G4PairingCorrection theCorrections; 51 theInstance = &theCorrections; 52 } 53 53 return theInstance; 54 54 } 55 56 G4double G4PairingCorrection::GetPairingCorrection(G4int A, G4int Z) const 57 { 58 G4double PCorrection = 0.0; 59 G4int N = A - Z; 60 if (theCookPairingCorrections->IsInTableThisN(N) && 61 theCookPairingCorrections->IsInTableThisZ(Z)) 62 PCorrection = theCookPairingCorrections->GetParingCorrection(A,Z); 63 else if (theCameronGilbertPairingCorrections->IsInTableThisN(N) && 64 theCameronGilbertPairingCorrections->IsInTableThisZ(Z)) 65 PCorrection = theCameronGilbertPairingCorrections->GetPairingCorrection(A,Z); 66 else { 67 const G4double PairingConstant = 12.0*MeV; 68 G4double Pair = (1 - Z + 2*(Z/2)) + (1 - N + 2*(N/2)); 69 PCorrection = Pair*PairingConstant/std::sqrt(static_cast<G4double>(A)); 70 } 71 return std::max(PCorrection,0.0); 72 } 73 74 75 G4double G4PairingCorrection::GetFissionPairingCorrection(G4int A, G4int Z) const 76 { 77 const G4double PairingConstant = 14.0*MeV; 78 G4int N = A - Z; 79 G4double Pair = (1 - Z + 2*(Z/2)) + (1 - N + 2*(N/2)); 80 G4double PCorrection = Pair*PairingConstant/std::sqrt(static_cast<G4double>(A)); 81 return PCorrection; 82 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4ProtonCoulombBarrier.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4ProtonCoulombBarrier.cc,v 1.5 2008/09/19 13:32:54 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4ProtonCoulombBarrier.cc,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 34 33 #include "G4ProtonCoulombBarrier.hh" 35 34 36 G4ProtonCoulombBarrier::G4ProtonCoulombBarrier(const G4ProtonCoulombBarrier & ) : G4CoulombBarrier() 37 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4ProtonCoulombBarrier::copy_constructor meant to not be accessable."); 39 } 35 G4ProtonCoulombBarrier::G4ProtonCoulombBarrier() : G4CoulombBarrier(1,1) 36 {} 40 37 38 G4ProtonCoulombBarrier::~G4ProtonCoulombBarrier() 39 {} 41 40 42 const G4ProtonCoulombBarrier & G4ProtonCoulombBarrier::operator=(const G4ProtonCoulombBarrier & ) 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4ProtonCoulombBarrier::operator= meant to not be accessable."); 45 return *this; 46 } 47 48 G4bool G4ProtonCoulombBarrier::operator==(const G4ProtonCoulombBarrier & ) const 49 { 50 return false; 51 } 52 53 G4bool G4ProtonCoulombBarrier::operator!=(const G4ProtonCoulombBarrier & ) const 54 { 55 return true; 56 } 57 58 59 G4double G4ProtonCoulombBarrier::BarrierPenetrationFactor(const G4double aZ) const 41 G4double G4ProtonCoulombBarrier::BarrierPenetrationFactor(G4double aZ) const 60 42 { 61 43 // Data comes from -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4ShellCorrection.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4ShellCorrection.cc,v 1.6 2009/11/30 10:33:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4ShellCorrection.cc,v 1.7 2010/11/15 11:47:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations 31 30 // by V. Lara 32 31 // 33 32 34 33 #include "G4ShellCorrection.hh" … … 50 49 G4ShellCorrection* G4ShellCorrection::GetInstance() 51 50 { 52 static G4ShellCorrection theCorrections; 53 if (!theInstance) { theInstance = &theCorrections; } 51 if (!theInstance) { 52 static G4ShellCorrection theCorrections; 53 theInstance = &theCorrections; 54 } 54 55 return theInstance; 55 56 } -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4TritonCoulombBarrier.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4TritonCoulombBarrier.cc,v 1.5 2008/09/19 13:32:54 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4TritonCoulombBarrier.cc,v 1.6 2010/11/15 12:44:06 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // Hadronic Process: Nuclear De-excitations … … 34 33 #include "G4TritonCoulombBarrier.hh" 35 34 36 G4TritonCoulombBarrier::G4TritonCoulombBarrier(const G4TritonCoulombBarrier & ) : G4CoulombBarrier() 37 { 38 throw G4HadronicException(__FILE__, __LINE__, "G4TritonCoulombBarrier::copy_constructor meant to not be accessable."); 39 } 35 G4TritonCoulombBarrier::G4TritonCoulombBarrier() : G4CoulombBarrier(3,1) {} 36 G4TritonCoulombBarrier::~G4TritonCoulombBarrier() {} 40 37 41 42 const G4TritonCoulombBarrier & G4TritonCoulombBarrier::operator=(const G4TritonCoulombBarrier & ) 43 { 44 throw G4HadronicException(__FILE__, __LINE__, "G4TritonCoulombBarrier::operator= meant to not be accessable."); 45 return *this; 46 } 47 48 G4bool G4TritonCoulombBarrier::operator==(const G4TritonCoulombBarrier & ) const 49 { 50 return false; 51 } 52 53 G4bool G4TritonCoulombBarrier::operator!=(const G4TritonCoulombBarrier & ) const 54 { 55 return true; 56 } 57 58 59 G4double G4TritonCoulombBarrier::BarrierPenetrationFactor(const G4double aZ) const 38 G4double G4TritonCoulombBarrier::BarrierPenetrationFactor(G4double aZ) const 60 39 { 61 40 // Data comes from -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4VEmissionProbability.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4VEmissionProbability.cc,v 1. 7 2009/03/04 11:05:02 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4VEmissionProbability.cc,v 1.10 2010/11/15 20:30:26 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Oct 1998) 32 32 // 33 33 // Modifications: 34 // 28.10.2010 V.Ivanchenko defined members in constructor and cleaned up 34 35 35 36 #include "G4VEmissionProbability.hh" 36 #include "G4HadronicException.hh"37 37 38 39 G4VEmissionProbability::G4VEmissionProbability() {} 40 G4VEmissionProbability::~G4VEmissionProbability() {} 41 42 43 G4VEmissionProbability::G4VEmissionProbability(const G4VEmissionProbability &) 38 G4VEmissionProbability::G4VEmissionProbability():OPTxs(3),useSICB(false) 44 39 { 45 throw G4HadronicException(__FILE__, __LINE__, "G4VEmissionProbability::copy_constructor meant to not be accessable"); 40 fG4pow = G4Pow::GetInstance(); 41 fPairCorr = G4PairingCorrection::GetInstance(); 42 theEvapLDPptr = new G4EvaporationLevelDensityParameter; 46 43 } 47 44 48 49 const G4VEmissionProbability & G4VEmissionProbability::operator=(const G4VEmissionProbability &) 45 G4VEmissionProbability::~G4VEmissionProbability() 50 46 { 51 throw G4HadronicException(__FILE__, __LINE__, "G4VEmissionProbability::operator= meant to not be accessable"); 52 return *this; 47 delete theEvapLDPptr; 53 48 } 54 55 56 G4bool G4VEmissionProbability::operator==(const G4VEmissionProbability &) const57 {58 return false;59 }60 61 G4bool G4VEmissionProbability::operator!=(const G4VEmissionProbability &) const62 {63 return true;64 }65 66 67 68 69 -
trunk/source/processes/hadronic/models/high_energy/History
r1315 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 3 Dec 2010 - Dennis Wright (hadr-hep-V09-03-03) 18 ------------------------------------------------ 19 - more CoVerity bug fixes in G4HEInelastic.cc : 20 array overrun in method QuasiElasticScattering (change pvmx[4] to 21 pvmx[0] 22 dead code due to bools dummy and dum always being false 23 memory leak in methods HighEnergyCascading, MediumEnergyCascading, 24 QuasiElasticScattering 25 use of loop variable outside of for loop 26 27 27 Nov 2010 - Dennis Wright (hadr-hep-V09-03-02) 28 ------------------------------------------------ 29 - more CoVerity bug fixes: G4HEInelastic.hh (init verboseLevel), 30 - make incidentParticle and targetParticle args const & 31 32 12 Nov 2010 - Dennis Wright (hadr-hep-V09-03-01) 33 ------------------------------------------------ 34 - Fix uninitialized variable (vecLength = 0) in header files of 35 G4HEAntiLambdaInelastic, G4HEAntiNeutronInelastic 36 G4HEAntiOmegaMinusInelastic, G4HEAntiProtonInelastic 37 G4HEAntiSigmaMinusInelastic, G4HEAntiSigmaPlusInelastic 38 G4HEAntiXiMinusInelastic, G4HEAntiXiZeroInelastic 39 G4HEKaonMinusInelastic, G4HEKaonPlusInelastic 40 G4HEKaonZeroInelastic, G4HELambdaInelastic 41 G4HENeutronInelastic, G4HEOmegaMinusInelastic 42 G4HEPionMinusInelastic, G4HEPionPlusInelastic 43 G4HEProtonInelastic, G4HESigmaMinusInelastic 44 G4HESigmaPlusInelastic, G4HEXiMinusInelastic 45 G4HEXiZeroInelastic 46 and remove dead code in .cc files of above 47 48 - Fix uninitialized variable (MAXPART = 0) in header file of 49 G4HEInelastic 50 - Initialize theQuarkContent and theAntiQuarkContent 51 in G4HEVector.hh 16 52 17 53 23 Jan 2010 - Dennis Wright (hadr-hep-V09-03-00) -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiKaonZeroInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiKaonZeroInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiKaonZeroInelastic.hh,v 1.15 2010/11/27 02:02:19 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiKaonZeroInelastic() : G4HEInelastic("G4HEAntiKaonZeroInelastic") 58 58 { 59 theMinEnergy = 20*GeV;59 theMinEnergy = 20*GeV; 60 60 theMaxEnergy = 10*TeV; 61 61 MAXPART = 2048; … … 67 67 G4int vecLength; 68 68 69 G4HadFinalState * ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ); 69 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 70 G4Nucleus& targetNucleus); 70 71 71 G4int GetNumberOfSecondaries()72 G4int GetNumberOfSecondaries() 72 73 { return vecLength; } 73 74 74 75 75 void FirstIntInCasAntiKaonZero(G4bool &inElastic, const G4double availableEnergy, 76 G4HEVector pv[], 77 G4int &vecLen, 78 G4HEVector incidentParticle, 79 G4HEVector targetParticle); 76 void FirstIntInCasAntiKaonZero(G4bool& inElastic, 77 const G4double availableEnergy, 78 G4HEVector pv[], 79 G4int& vecLen, 80 const G4HEVector& incidentParticle, 81 const G4HEVector& targetParticle); 80 82 }; 81 83 #endif 82 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiLambdaInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiLambdaInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiLambdaInelastic.hh,v 1.16 2010/11/27 02:02:59 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiLambdaInelastic() : G4HEInelastic("G4HEAntiLambdaInelastic") 58 58 { 59 vecLength = 0; 59 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState * ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiLambda(G4bool &inElastic, const G4double availableEnergy, 75 G4HEVector pv[], 76 G4int &vecLen, 77 G4HEVector incidentParticle, 78 G4HEVector targetParticle, 79 const G4double atomicWeight); 75 void FirstIntInCasAntiLambda(G4bool& inElastic, 76 const G4double availableEnergy, 77 G4HEVector pv[], 78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 81 const G4double atomicWeight); 80 82 }; 81 83 #endif -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiNeutronInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiNeutronInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiNeutronInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiNeutronInelastic() : G4HEInelastic("G4HEAntiNeutronInelastic") 58 58 { 59 vecLength = 0; 59 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, 71 G4Nucleus &targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiNeutron(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiNeutron(G4bool &inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 78 G4int &vecLen, 77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiOmegaMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiOmegaMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiOmegaMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiOmegaMinusInelastic() : G4HEInelastic("G4HEAntiOmegaMinusInelastic") 58 58 { 59 vecLength = 0; 59 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiOmegaMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiOmegaMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiProtonInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiProtonInelastic.hh,v 1.1 5 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiProtonInelastic.hh,v 1.17 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiProtonInelastic() : G4HEInelastic("G4HEAntiProtonInelastic") 58 58 { 59 vecLength = 0; 59 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, 71 G4Nucleus &targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiProton(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiProton(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiSigmaMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiSigmaMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiSigmaMinusInelastic() : G4HEInelastic("G4HEAntiSigmaMinusInelastic") 58 58 { 59 vecLength = 0; 59 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiSigmaMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiSigmaMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaPlusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiSigmaPlusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiSigmaPlusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiSigmaPlusInelastic() : G4HEInelastic("G4HEAntiSigmaPlusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiSigmaPlus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiSigmaPlus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiSigmaZeroInelastic.hh
r1340 r1347 26 26 // 27 27 // $Id: G4HEAntiSigmaZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiXiMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiXiMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiXiMinusInelastic() : G4HEInelastic("G4HEAntiXiMinusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiXiMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiXiMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEAntiXiZeroInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiXiZeroInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEAntiXiZeroInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEAntiXiZeroInelastic() : G4HEInelastic("G4HEAntiXiZeroInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasAntiXiZero(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasAntiXiZero(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEInelastic.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 // $Id: G4HEInelastic.hh,v 1.17 2010/11/29 05:45:06 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 // … … 71 70 { 72 71 SetParticles(); 72 verboseLevel = 0; 73 MAXPART = 0; 73 74 conserveEnergy = true; 74 75 }; … … 76 77 ~G4HEInelastic(){ }; 77 78 78 void SetMaxNumberOfSecondaries( const G4int maxnumber )79 {MAXPART = maxnumber;}79 void SetMaxNumberOfSecondaries(const G4int maxnumber) 80 {MAXPART = maxnumber;} 80 81 81 void SetVerboseLevel( const G4int level) 82 { verboseLevel = level;} 83 84 G4int verboseLevel; 85 G4int MAXPART; 86 G4bool conserveEnergy; 87 88 void ForceEnergyConservation(G4bool energyConservation) 89 { conserveEnergy = energyConservation;} 90 G4bool EnergyConservation(void) 91 { return conserveEnergy;} 92 93 G4double Amin(G4double a, G4double b); 94 G4double Amax(G4double a, G4double b); 95 G4int Imin(G4int a, G4int b); 96 G4int Imax(G4int a, G4int b); 82 void SetVerboseLevel(const G4int level) {verboseLevel = level;} 83 84 G4int verboseLevel; 85 G4int MAXPART; 86 G4bool conserveEnergy; 87 88 void ForceEnergyConservation(G4bool energyConservation) 89 {conserveEnergy = energyConservation;} 90 91 G4bool EnergyConservation(void) {return conserveEnergy;} 92 93 G4double Amin(G4double a, G4double b); 94 G4double Amax(G4double a, G4double b); 95 G4int Imin(G4int a, G4int b); 96 G4int Imax(G4int a, G4int b); 97 97 98 void FillParticleChange(G4HEVector pv[], G4int aVecLength); 99 100 G4double pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c); 101 102 G4int Factorial(G4int n); 103 104 G4double NuclearInelasticity(G4double incidentKineticEnergy, 105 G4double atomicWeight, 106 G4double atomicNumber); 107 G4double NuclearExcitation(G4double incidentKineticEnergy, 108 G4double atomicWeight, 109 G4double atomicNumber, 110 G4double& excitationEnergyCascade, 111 G4double& excitationEnergyEvaporation); 98 void FillParticleChange(G4HEVector pv[], G4int aVecLength); 99 100 G4double pmltpc(G4int np, G4int nm, G4int nz, 101 G4int n, G4double b, G4double c); 102 103 G4int Factorial(G4int n); 104 105 G4double NuclearInelasticity(G4double incidentKineticEnergy, 106 G4double atomicWeight, 107 G4double atomicNumber); 108 109 G4double NuclearExcitation(G4double incidentKineticEnergy, 110 G4double atomicWeight, 111 G4double atomicNumber, 112 G4double& excitationEnergyCascade, 113 G4double& excitationEnergyEvaporation); 112 114 113 void HighEnergyCascading(G4bool &successful, 114 G4HEVector pv[], 115 G4int &vecLen, 116 G4double &excitationEnergyGNP, 117 G4double &excitationEnergyDTA, 118 G4HEVector incidentParticle, 119 G4HEVector targetParticle, 120 G4double atomicWeight, 121 G4double atomicNumber); 122 123 void HighEnergyClusterProduction(G4bool &successful, 124 G4HEVector pv[], 125 G4int &vecLen, 126 G4double &excitationEnergyGNP, 127 G4double &excitationEnergyDTA, 128 G4HEVector incidentParticle, 129 G4HEVector targetParticle, 130 G4double atomicWeight, 131 G4double atomicNumber); 132 133 void TuningOfHighEnergyCascading(G4HEVector pv[], 134 G4int &vecLen, 135 G4HEVector incidentParticle, 136 G4HEVector targetParticle, 137 G4double atomicWeight, 138 G4double atomicNumber); 139 140 void MediumEnergyCascading(G4bool &successful, 115 void HighEnergyCascading(G4bool& successful, 116 G4HEVector pv[], 117 G4int& vecLen, 118 G4double& excitationEnergyGNP, 119 G4double& excitationEnergyDTA, 120 const G4HEVector& incidentParticle, 121 const G4HEVector& targetParticle, 122 G4double atomicWeight, 123 G4double atomicNumber); 124 125 void HighEnergyClusterProduction(G4bool& successful, 141 126 G4HEVector pv[], 142 G4int &vecLen,143 G4double &excitationEnergyGNP,144 G4double &excitationEnergyDTA,145 G4HEVectorincidentParticle,146 G4HEVectortargetParticle,127 G4int& vecLen, 128 G4double& excitationEnergyGNP, 129 G4double& excitationEnergyDTA, 130 const G4HEVector& incidentParticle, 131 const G4HEVector& targetParticle, 147 132 G4double atomicWeight, 148 G4double atomicNumber); 149 150 void MediumEnergyClusterProduction(G4bool &successful, 151 G4HEVector pv[], 152 G4int &vecLen, 153 G4double &excitationEnergyGNP, 154 G4double &excitationEnergyDTA, 155 G4HEVector incidentParticle, 156 G4HEVector targetParticle, 157 G4double atomicWeight, 158 G4double atomicNumber); 159 160 void QuasiElasticScattering(G4bool &successful, 161 G4HEVector pv[], 162 G4int &vecLen, 163 G4double &excitationEnergyGNP, 164 G4double &excitationEnergyDTA, 165 G4HEVector incidentParticle, 166 G4HEVector targetParticle, 167 G4double atomicWeight, 168 G4double atomicNumber); 169 170 void ElasticScattering(G4bool &successful, 171 G4HEVector pv[], 172 G4int &vecLen, 173 G4HEVector incidentParticle, 174 G4double atomicWeight, 175 G4double atomicNumber); 176 177 G4int rtmi(G4double *x, G4double xli, G4double xri, G4double eps, 178 G4int iend, G4double aa, G4double bb, G4double cc, 179 G4double dd, G4double rr); 180 181 G4double fctcos(G4double t, G4double aa, G4double bb,G4double cc, 182 G4double dd, G4double rr); 133 G4double atomicNumber); 134 135 void TuningOfHighEnergyCascading(G4HEVector pv[], 136 G4int& vecLen, 137 const G4HEVector& incidentParticle, 138 const G4HEVector& targetParticle, 139 G4double atomicWeight, 140 G4double atomicNumber); 141 142 void MediumEnergyCascading(G4bool& successful, 143 G4HEVector pv[], 144 G4int& vecLen, 145 G4double& excitationEnergyGNP, 146 G4double& excitationEnergyDTA, 147 const G4HEVector& incidentParticle, 148 const G4HEVector& targetParticle, 149 G4double atomicWeight, 150 G4double atomicNumber); 151 152 void MediumEnergyClusterProduction(G4bool& successful, 153 G4HEVector pv[], 154 G4int& vecLen, 155 G4double& excitationEnergyGNP, 156 G4double& excitationEnergyDTA, 157 const G4HEVector& incidentParticle, 158 const G4HEVector& targetParticle, 159 G4double atomicWeight, 160 G4double atomicNumber); 161 162 void QuasiElasticScattering(G4bool& successful, 163 G4HEVector pv[], 164 G4int& vecLen, 165 G4double& excitationEnergyGNP, 166 G4double& excitationEnergyDTA, 167 const G4HEVector& incidentParticle, 168 const G4HEVector& targetParticle, 169 G4double atomicWeight, 170 G4double atomicNumber); 171 172 void ElasticScattering(G4bool& successful, 173 G4HEVector pv[], 174 G4int& vecLen, 175 const G4HEVector& incidentParticle, 176 G4double atomicWeight, 177 G4double atomicNumber); 178 179 G4int rtmi(G4double *x, G4double xli, G4double xri, G4double eps, 180 G4int iend, G4double aa, G4double bb, G4double cc, 181 G4double dd, G4double rr); 182 183 G4double fctcos(G4double t, G4double aa, G4double bb,G4double cc, 184 G4double dd, G4double rr); 183 185 184 void StrangeParticlePairProduction(const G4double availableEnergy,185 const G4double centerOfMassEnergy,186 G4HEVector pv[],187 G4int &vecLen,188 G4HEVectorincidentParticle,189 G4HEVectortargetParticle);190 191 G4double NBodyPhaseSpace(const G4double totalEnergy,192 const G4bool constantCrossSection,193 G4HEVector pv[],194 G4int &vecLen);186 void StrangeParticlePairProduction(const G4double availableEnergy, 187 const G4double centerOfMassEnergy, 188 G4HEVector pv[], 189 G4int& vecLen, 190 const G4HEVector& incidentParticle, 191 const G4HEVector& targetParticle); 192 193 G4double NBodyPhaseSpace(const G4double totalEnergy, 194 const G4bool constantCrossSection, 195 G4HEVector pv[], 196 G4int &vecLen); 195 197 196 G4double NBodyPhaseSpace(G4int npart,197 G4HEVector pv[],198 G4double wmax,199 G4double wfcn,200 G4int maxtrial,201 G4int ntrial);202 203 G4double gpdk(G4double a, G4double b, G4double c);204 205 void QuickSort(G4double arr[], const G4int lidx, const G4int ridx);206 207 G4double Alam(G4double a, G4double b, G4double c);198 G4double NBodyPhaseSpace(G4int npart, 199 G4HEVector pv[], 200 G4double wmax, 201 G4double wfcn, 202 G4int maxtrial, 203 G4int ntrial); 204 205 G4double gpdk(G4double a, G4double b, G4double c); 206 207 void QuickSort(G4double arr[], const G4int lidx, const G4int ridx); 208 209 G4double Alam(G4double a, G4double b, G4double c); 208 210 209 G4double CalculatePhaseSpaceWeight( G4int npart);211 G4double CalculatePhaseSpaceWeight( G4int npart); 210 212 211 G4double normal(void);212 G4double GammaRand(G4double avalue);213 G4double Erlang(G4int mvalue);214 G4int Poisson(G4double x);215 void SetParticles(void);213 G4double normal(void); 214 G4double GammaRand(G4double avalue); 215 G4double Erlang(G4int mvalue); 216 G4int Poisson(G4double x); 217 void SetParticles(void); 216 218 217 219 G4HEVector PionPlus; … … 248 250 }; 249 251 250 #endif 251 252 252 #endif -
trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEKaonMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEKaonMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEKaonMinusInelastic() : G4HEInelastic("G4HEKaonMinusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasKaonMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasKaonMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle);78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle); 79 81 }; 80 #endif 81 82 #endif 82 83 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonPlusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEKaonPlusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEKaonPlusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEKaonPlusInelastic() : G4HEInelastic("G4HEKaonPlusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasKaonPlus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasKaonPlus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEKaonZeroInelastic.hh,v 1.1 3 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEKaonZeroInelastic.hh,v 1.15 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEKaonZeroInelastic() : G4HEInelastic("G4HEKaonZeroInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 75 75 void FirstIntInCasKaonZero(G4bool &inElastic, const G4double availableEnergy, 76 void FirstIntInCasKaonZero(G4bool& inElastic, 77 const G4double availableEnergy, 76 78 G4HEVector pv[], 77 G4int &vecLen,78 G4HEVectorincidentParticle,79 G4HEVectortargetParticle,79 G4int& vecLen, 80 const G4HEVector& incidentParticle, 81 const G4HEVector& targetParticle, 80 82 const G4double atomicWeight); 81 83 }; 82 #endif 83 84 #endif 84 85 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroLongInelastic.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HEKaonZeroLongInelastic.hh,v 1.1 5 2010/02/09 21:58:09dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4HEKaonZeroLongInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // … … 56 56 G4HEKaonZeroLongInelastic() : G4HEInelastic("G4HEKaonZeroLongInelastic") 57 57 { 58 theMinEnergy = 20*GeV;58 theMinEnergy = 20*GeV; 59 59 theMaxEnergy = 10*TeV; 60 60 MAXPART = 2048; … … 64 64 ~G4HEKaonZeroLongInelastic(){ }; 65 65 66 // G4int verboseLevel;67 66 G4int vecLength; 68 67 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 68 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 69 G4Nucleus& targetNucleus); 70 70 71 71 G4int GetNumberOfSecondaries() 72 72 { return vecLength;}; 73 73 74 void FirstIntInCasKaonZero(G4bool &inElastic, const G4double availableEnergy, 74 void FirstIntInCasKaonZero(G4bool& inElastic, 75 const G4double availableEnergy, 75 76 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,77 G4int& vecLen, 78 const G4HEVector& incidentParticle, 79 const G4HEVector& targetParticle, 79 80 const G4double atomicWeight); 80 81 81 void FirstIntInCasAntiKaonZero(G4bool &inElastic, const G4double availableEnergy, 82 void FirstIntInCasAntiKaonZero(G4bool& inElastic, 83 const G4double availableEnergy, 82 84 G4HEVector pv[], 83 G4int &vecLen, 84 G4HEVector incidentParticle, 85 G4HEVector targetParticle); 85 G4int& vecLen, 86 const G4HEVector& incidentParticle, 87 const G4HEVector& targetParticle); 88 }; 89 #endif 86 90 87 // void SetVerboseLevel(G4int verbose)88 // { verboseLevel = verbose;};89 90 91 };92 #endif93 94 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEKaonZeroShortInelastic.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HEKaonZeroShortInelastic.hh,v 1.1 5 2010/02/09 21:58:33dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 3-ref-09$26 // $Id: G4HEKaonZeroShortInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // … … 56 56 G4HEKaonZeroShortInelastic() : G4HEInelastic("G4HEKaonZeroShortInelastic") 57 57 { 58 theMinEnergy = 20*GeV;58 theMinEnergy = 20*GeV; 59 59 theMaxEnergy = 10*TeV; 60 60 MAXPART = 2048; … … 66 66 G4int vecLength; 67 67 68 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 68 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 69 G4Nucleus& targetNucleus); 69 70 70 71 G4int GetNumberOfSecondaries() 71 72 { return vecLength;}; 72 73 73 void FirstIntInCasKaonZero(G4bool &inElastic, const G4double availableEnergy, 74 void FirstIntInCasKaonZero(G4bool& inElastic, 75 const G4double availableEnergy, 74 76 G4HEVector pv[], 75 G4int &vecLen,76 G4HEVectorincidentParticle,77 G4HEVectortargetParticle,77 G4int& vecLen, 78 const G4HEVector& incidentParticle, 79 const G4HEVector& targetParticle, 78 80 const G4double atomicWeight); 79 81 80 void FirstIntInCasAntiKaonZero(G4bool &inElastic, const G4double availableEnergy, 82 void FirstIntInCasAntiKaonZero(G4bool& inElastic, 83 const G4double availableEnergy, 81 84 G4HEVector pv[], 82 G4int &vecLen, 83 G4HEVector incidentParticle, 84 G4HEVector targetParticle); 85 G4int& vecLen, 86 const G4HEVector& incidentParticle, 87 const G4HEVector& targetParticle); 88 }; 89 #endif 85 90 86 };87 #endif88 89 -
trunk/source/processes/hadronic/models/high_energy/include/G4HELambdaInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HELambdaInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HELambdaInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HELambdaInelastic() : G4HEInelastic("G4HELambdaInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasLambda(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasLambda(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HENeutronInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HENeutronInelastic.hh,v 1.1 5 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HENeutronInelastic.hh,v 1.17 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HENeutronInelastic() : G4HEInelastic("G4HENeutronInelastic") 58 58 { 59 theMinEnergy = 45*GeV; 59 vecLength = 0; 60 theMinEnergy = 45*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasNeutron(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasNeutron(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEOmegaMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEOmegaMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEOmegaMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEOmegaMinusInelastic() : G4HEInelastic("G4HEOmegaMinusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasOmegaMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasOmegaMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEPionMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEPionMinusInelastic.hh,v 1.1 5 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEPionMinusInelastic.hh,v 1.17 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEPionMinusInelastic() : G4HEInelastic("G4HEPionMinusInelastic") 58 58 { 59 theMinEnergy = 45*GeV; 59 vecLength = 0; 60 theMinEnergy = 45*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasPionMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasPionMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle);78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle); 79 81 }; 80 #endif 81 82 #endif 82 83 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEPionPlusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEPionPlusInelastic.hh,v 1.1 5 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEPionPlusInelastic.hh,v 1.17 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEPionPlusInelastic() : G4HEInelastic("G4HEPionPlusInelastic") 58 58 { 59 theMinEnergy = 45*GeV; 59 vecLength = 0; 60 theMinEnergy = 45*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasPionPlus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasPionPlus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEProtonInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEProtonInelastic.hh,v 1.1 5 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEProtonInelastic.hh,v 1.17 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEProtonInelastic() : G4HEInelastic("G4HEProtonInelastic") 58 58 { 59 theMinEnergy = 45*GeV; 59 vecLength = 0; 60 theMinEnergy = 45*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasProton(G4bool &inElastic, const G4double availableEnergy, 75 G4HEVector pv[], 76 G4int &vecLen, 77 G4HEVector incidentParticle, 78 G4HEVector targetParticle, 79 const G4double atomicWeight); 75 void FirstIntInCasProton(G4bool& inElastic, 76 const G4double availableEnergy, 77 G4HEVector pv[], 78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HESigmaMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HESigmaMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HESigmaMinusInelastic() : G4HEInelastic("G4HESigmaMinusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasSigmaMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasSigmaMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaPlusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HESigmaPlusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HESigmaPlusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HESigmaPlusInelastic() : G4HEInelastic("G4HESigmaPlusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasSigmaPlus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasSigmaPlus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HESigmaZeroInelastic.hh
r1340 r1347 26 26 // 27 27 // $Id: G4HESigmaZeroInelastic.hh,v 1.14 2007/04/11 18:11:30 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/models/high_energy/include/G4HEVector.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEVector.hh,v 1.1 2 2006/06/29 20:29:48 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEVector.hh,v 1.15 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 91 91 baryon = 0; 92 92 strangeness = 0; 93 for (G4int i = 0; i < NumberOfQuarkFlavor; i++) { 94 theQuarkContent[i] = 0; 95 theAntiQuarkContent[i] = 0; 96 } 93 97 } 94 98 … … 150 154 const G4ParticleMomentum getMomentum() const ; 151 155 152 G4double getTotalMomentum() ;156 G4double getTotalMomentum() const; 153 157 154 158 void setMomentum( G4double x, G4double y, G4double z); … … 172 176 void setKineticEnergyAndUpdate(G4double ekin); 173 177 174 G4double getEnergy() ;175 176 G4double getKineticEnergy() ;178 G4double getEnergy() const; 179 180 G4double getKineticEnergy() const; 177 181 178 182 void setMass( G4double m ); … … 180 184 void setMassAndUpdate( G4double m ); 181 185 182 G4double getMass() ;186 G4double getMass() const; 183 187 184 188 void setCharge( G4double c ); 185 189 186 G4double getCharge() ;190 G4double getCharge() const; 187 191 188 192 void setTOF( G4double t ); … … 200 204 void setCode( G4int c ); 201 205 202 G4int getCode() ;203 204 G4String getName() ;205 206 G4int getBaryonNumber() ;207 208 G4int getStrangenessNumber() ;206 G4int getCode() const; 207 208 G4String getName() const; 209 210 G4int getBaryonNumber() const; 211 212 G4int getStrangenessNumber() const; 209 213 210 214 G4int getQuarkContent(G4int flavor); … … 214 218 void setZero(); 215 219 216 G4String getType() ;220 G4String getType() const; 217 221 218 222 void Add( const G4HEVector & p1, const G4HEVector & p2 ); … … 222 226 void Lor( const G4HEVector & p1, const G4HEVector & p2 ); 223 227 224 G4double CosAng( const G4HEVector & p );228 G4double CosAng(const G4HEVector& p) const; 225 229 226 230 G4double Ang(const G4HEVector & p ); … … 244 248 void Norz( const G4HEVector & p ); 245 249 246 G4double Length() ;250 G4double Length() const; 247 251 248 252 void Exch( G4HEVector & p1); … … 260 264 G4int FillQuarkContent(); 261 265 262 void Print( G4int L);266 void Print(G4int L) const; 263 267 }; 264 268 265 269 #endif 266 270 267 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEXiMinusInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEXiMinusInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEXiMinusInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEXiMinusInelastic() : G4HEInelastic("G4HEXiMinusInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasXiMinus(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasXiMinus(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/include/G4HEXiZeroInelastic.hh
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEXiZeroInelastic.hh,v 1.1 4 2007/04/11 18:11:30dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEXiZeroInelastic.hh,v 1.16 2010/11/29 05:45:06 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 57 57 G4HEXiZeroInelastic() : G4HEInelastic("G4HEXiZeroInelastic") 58 58 { 59 theMinEnergy = 20*GeV; 59 vecLength = 0; 60 theMinEnergy = 20*GeV; 60 61 theMaxEnergy = 10*TeV; 61 62 MAXPART = 2048; … … 67 68 G4int vecLength; 68 69 69 G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus); 70 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 71 G4Nucleus& targetNucleus); 70 72 71 G4int GetNumberOfSecondaries() 72 { return vecLength; } 73 G4int GetNumberOfSecondaries() {return vecLength;} 73 74 74 void FirstIntInCasXiZero(G4bool &inElastic, const G4double availableEnergy, 75 void FirstIntInCasXiZero(G4bool& inElastic, 76 const G4double availableEnergy, 75 77 G4HEVector pv[], 76 G4int &vecLen,77 G4HEVectorincidentParticle,78 G4HEVectortargetParticle,78 G4int& vecLen, 79 const G4HEVector& incidentParticle, 80 const G4HEVector& targetParticle, 79 81 const G4double atomicWeight); 80 82 }; 81 #endif 82 83 #endif 83 84 -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiKaonZeroInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiKaonZeroInelastic.cc,v 1.16 2010/02/09 22:02:04 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiKaonZeroInelastic.cc,v 1.18 2010/11/27 00:06:50 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included arethe low energy stuff like35 // and the low energy two-body model. Not included is the low energy stuff like 39 36 // nuclear reactions, nuclear fission without any cascading and all processes for 40 37 // particles at rest. … … 45 42 #include "G4HEAntiKaonZeroInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiKaonZeroInelastic:: 48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 53 const G4double atomicWeight = targetNucleus.GetN(); 54 const G4double atomicNumber = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if(incidentKineticEnergy < 1.) 64 { 65 G4cout << "GHEAntiKaonZeroInelastic: incident energy < 1 GeV" << G4endl; 66 } 67 if(verboseLevel > 1) 68 { 69 G4cout << "G4HEAntiKaonZeroInelastic::ApplyYourself" << G4endl; 70 G4cout << "incident particle " << incidentParticle.getName() 71 << "mass " << incidentMass 72 << "kinetic energy " << incidentKineticEnergy 73 << G4endl; 74 G4cout << "target material with (A,Z) = (" 75 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 } 44 G4HadFinalState* 45 G4HEAntiKaonZeroInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double atomicWeight = targetNucleus.GetN(); 51 const G4double atomicNumber = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 53 54 G4int incidentCode = incidentParticle.getCode(); 55 G4double incidentMass = incidentParticle.getMass(); 56 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 59 60 if (incidentKineticEnergy < 1.) 61 G4cout << "GHEAntiKaonZeroInelastic: incident energy < 1 GeV" << G4endl; 62 63 if (verboseLevel > 1) { 64 G4cout << "G4HEAntiKaonZeroInelastic::ApplyYourself" << G4endl; 65 G4cout << "incident particle " << incidentParticle.getName() 66 << "mass " << incidentMass 67 << "kinetic energy " << incidentKineticEnergy 68 << G4endl; 69 G4cout << "target material with (A,Z) = (" 70 << atomicWeight << "," << atomicNumber << ")" << G4endl; 71 } 77 72 78 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,79 atomicWeight, atomicNumber);80 if(verboseLevel > 1)81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;73 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 74 atomicWeight, atomicNumber); 75 if (verboseLevel > 1) 76 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 82 77 83 incidentKineticEnergy -= inelasticity;78 incidentKineticEnergy -= inelasticity; 84 79 85 G4double excitationEnergyGNP = 0.;86 G4double excitationEnergyDTA = 0.;87 88 G4double excitation= NuclearExcitation(incidentKineticEnergy,89 atomicWeight, atomicNumber,90 excitationEnergyGNP,91 excitationEnergyDTA);92 if(verboseLevel > 1)93 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP80 G4double excitationEnergyGNP = 0.; 81 G4double excitationEnergyDTA = 0.; 82 83 G4double excitation = NuclearExcitation(incidentKineticEnergy, 84 atomicWeight, atomicNumber, 85 excitationEnergyGNP, 86 excitationEnergyDTA); 87 if (verboseLevel > 1) 88 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 94 89 << excitationEnergyDTA << G4endl; 95 90 96 91 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 103 G4HEVector targetParticle; 104 if(G4UniformRand() < atomicNumber/atomicWeight) 105 { 106 targetParticle.setDefinition("Proton"); 107 } 108 else 109 { 110 targetParticle.setDefinition("Neutron"); 111 } 112 113 G4double targetMass = targetParticle.getMass(); 114 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 115 + 2.0*targetMass*incidentTotalEnergy); 116 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 117 118 // this was the meaning of inElastic in the 119 // original Gheisha stand-alone version. 120 // G4bool inElastic = InElasticCrossSectionInFirstInt 121 // (availableEnergy, incidentCode, incidentTotalMomentum); 122 // by unknown reasons, it has been replaced 123 // to the following code in Geant??? 124 G4bool inElastic = true; 125 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 126 127 vecLength = 0; 92 incidentKineticEnergy -= excitation; 93 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 94 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 95 *(incidentTotalEnergy+incidentMass)); 96 97 G4HEVector targetParticle; 98 if (G4UniformRand() < atomicNumber/atomicWeight) { 99 targetParticle.setDefinition("Proton"); 100 } else { 101 targetParticle.setDefinition("Neutron"); 102 } 103 104 G4double targetMass = targetParticle.getMass(); 105 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 106 + targetMass*targetMass 107 + 2.0*targetMass*incidentTotalEnergy); 108 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 109 110 vecLength = 0; 128 111 129 if(verboseLevel > 1)130 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "112 if (verboseLevel > 1) 113 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 131 114 << incidentCode << G4endl; 132 115 133 G4bool successful = false; 134 135 if(inElastic || (!inElastic && atomicWeight < 1.5)) 136 { 137 FirstIntInCasAntiKaonZero(inElastic, availableEnergy, pv, vecLength, 138 incidentParticle, targetParticle ); 139 140 if(verboseLevel > 1) 141 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 142 143 144 if ((vecLength > 0) && (availableEnergy > 1.)) 145 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 146 pv, vecLength, 147 incidentParticle, targetParticle); 148 HighEnergyCascading( successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 HighEnergyClusterProduction( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 MediumEnergyCascading( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 MediumEnergyClusterProduction( successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 QuasiElasticScattering( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 } 174 if (!successful) 175 { 176 ElasticScattering( successful, pv, vecLength, 177 incidentParticle, 178 atomicWeight, atomicNumber); 179 } 180 181 if (!successful) 182 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 183 << G4endl; 184 185 FillParticleChange(pv, vecLength); 186 delete [] pv; 187 theParticleChange.SetStatusChange(stopAndKill); 188 return & theParticleChange; 189 } 116 G4bool successful = false; 117 118 G4bool inElastic = true; 119 FirstIntInCasAntiKaonZero(inElastic, availableEnergy, pv, vecLength, 120 incidentParticle, targetParticle ); 121 122 if (verboseLevel > 1) 123 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 124 125 if ((vecLength > 0) && (availableEnergy > 1.)) 126 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 127 pv, vecLength, 128 incidentParticle, targetParticle); 129 HighEnergyCascading(successful, pv, vecLength, 130 excitationEnergyGNP, excitationEnergyDTA, 131 incidentParticle, targetParticle, 132 atomicWeight, atomicNumber); 133 if (!successful) 134 HighEnergyClusterProduction(successful, pv, vecLength, 135 excitationEnergyGNP, excitationEnergyDTA, 136 incidentParticle, targetParticle, 137 atomicWeight, atomicNumber); 138 if (!successful) 139 MediumEnergyCascading(successful, pv, vecLength, 140 excitationEnergyGNP, excitationEnergyDTA, 141 incidentParticle, targetParticle, 142 atomicWeight, atomicNumber); 143 if (!successful) 144 MediumEnergyClusterProduction(successful, pv, vecLength, 145 excitationEnergyGNP, excitationEnergyDTA, 146 incidentParticle, targetParticle, 147 atomicWeight, atomicNumber); 148 if (!successful) 149 QuasiElasticScattering(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 ElasticScattering(successful, pv, vecLength, 155 incidentParticle, 156 atomicWeight, atomicNumber); 157 158 if (!successful) 159 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 160 << G4endl; 161 162 FillParticleChange(pv, vecLength); 163 delete [] pv; 164 theParticleChange.SetStatusChange(stopAndKill); 165 return &theParticleChange; 166 } 167 190 168 191 169 void 192 G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero( G4bool &inElastic, 193 const G4double availableEnergy, 194 G4HEVector pv[], 195 G4int &vecLen, 196 G4HEVector incidentParticle, 197 G4HEVector targetParticle ) 198 199 // AntiKaon0 undergoes interaction with nucleon within a nucleus. Check if it is 200 // energetically possible to produce pions/kaons. In not, assume nuclear excitation 201 // occurs and input particle is degraded in energy. No other particles are produced. 170 G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero(G4bool& inElastic, 171 const G4double availableEnergy, 172 G4HEVector pv[], 173 G4int &vecLen, 174 const G4HEVector& incidentParticle, 175 const G4HEVector& targetParticle) 176 177 // AntiKaon0 undergoes interaction with nucleon within a nucleus. Check if it 178 // is energetically possible to produce pions/kaons. In not, assume nuclear 179 // excitation occurs and input particle is degraded in energy. No other 180 // particles are produced. 202 181 // If reaction is possible, find the correct number of pions/protons/neutrons 203 182 // produced using an interpolation to multiplicity data. Replace some pions or 204 183 // protons/neutrons by kaons or strange baryons according to the average 205 184 // multiplicity per inelastic reaction. 206 207 { 208 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 209 static const G4double expxl = -expxu; // lower bound for arg. of exp 210 211 static const G4double protb = 0.7; 212 static const G4double neutb = 0.7; 213 static const G4double c = 1.25; 214 215 static const G4int numMul = 1200; 216 static const G4int numSec = 60; 217 218 G4int neutronCode = Neutron.getCode(); 219 G4int protonCode = Proton.getCode(); 220 G4int kaonMinusCode = KaonMinus.getCode(); 221 G4int kaonZeroCode = KaonZero.getCode(); 222 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 223 224 G4int targetCode = targetParticle.getCode(); 225 // G4double incidentMass = incidentParticle.getMass(); 226 // G4double incidentEnergy = incidentParticle.getEnergy(); 227 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 228 229 static G4bool first = true; 230 static G4double protmul[numMul], protnorm[numSec]; // proton constants 231 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 232 233 // misc. local variables 234 // np = number of pi+, nm = number of pi-, nz = number of pi0 235 236 G4int i, counter, nt, np, nm, nz; 185 { 186 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 187 static const G4double expxl = -expxu; // lower bound for arg. of exp 188 189 static const G4double protb = 0.7; 190 static const G4double neutb = 0.7; 191 static const G4double c = 1.25; 192 193 static const G4int numMul = 1200; 194 static const G4int numSec = 60; 195 196 G4int neutronCode = Neutron.getCode(); 197 G4int protonCode = Proton.getCode(); 198 G4int kaonMinusCode = KaonMinus.getCode(); 199 G4int kaonZeroCode = KaonZero.getCode(); 200 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 201 202 G4int targetCode = targetParticle.getCode(); 203 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 204 205 static G4bool first = true; 206 static G4double protmul[numMul], protnorm[numSec]; // proton constants 207 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 208 209 // misc. local variables 210 // np = number of pi+, nm = number of pi-, nz = number of pi0 211 212 G4int i, counter, nt, np, nm, nz; 237 213 238 214 if( first ) 239 { // compute normalization constants, this will only be done once215 { // compute normalization constants, this will only be done once 240 216 first = false; 241 217 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiLambdaInelastic.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEAntiLambdaInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 27 // $Id: G4HEAntiLambdaInelastic.cc,v 1.17 2010/11/27 02:00:07 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 29 // 31 30 … … 33 32 #include "G4ios.hh" 34 33 35 //36 34 // G4 Process: Gheisha High Energy Collision model. 37 35 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.36 // and the low energy two-body model. Not included are the low energy stuff 37 // like nuclear reactions, nuclear fission without any cascading and all 38 // processes for particles at rest. 41 39 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 40 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 43 #include "G4HEAntiLambdaInelastic.hh" 46 44 47 G4HadFinalState * G4HEAntiLambdaInelastic:: 48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 53 const G4double atomicWeight = targetNucleus.GetN(); 54 const G4double atomicNumber = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if(incidentKineticEnergy < 1.) 64 { 65 G4cout << "GHEAntiLambdaInelastic: incident energy < 1 GeV" << G4endl; 66 } 67 if(verboseLevel > 1) 68 { 69 G4cout << "G4HEAntiLambdaInelastic::ApplyYourself" << G4endl; 70 G4cout << "incident particle " << incidentParticle.getName() 71 << "mass " << incidentMass 72 << "kinetic energy " << incidentKineticEnergy 73 << G4endl; 74 G4cout << "target material with (A,Z) = (" 75 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 } 77 78 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 79 atomicWeight, atomicNumber); 80 if(verboseLevel > 1) 81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 45 46 G4HadFinalState* 47 G4HEAntiLambdaInelastic::ApplyYourself(const G4HadProjectile &aTrack, 48 G4Nucleus &targetNucleus) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 const G4double atomicWeight = targetNucleus.GetN(); 53 const G4double atomicNumber = targetNucleus.GetZ(); 54 G4HEVector incidentParticle(aParticle); 55 56 G4int incidentCode = incidentParticle.getCode(); 57 G4double incidentMass = incidentParticle.getMass(); 58 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 59 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 60 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 61 62 if (incidentKineticEnergy < 1.) 63 G4cout << "GHEAntiLambdaInelastic: incident energy < 1 GeV" << G4endl; 64 65 if (verboseLevel > 1) { 66 G4cout << "G4HEAntiLambdaInelastic::ApplyYourself" << G4endl; 67 G4cout << "incident particle " << incidentParticle.getName() 68 << "mass " << incidentMass 69 << "kinetic energy " << incidentKineticEnergy 70 << G4endl; 71 G4cout << "target material with (A,Z) = (" 72 << atomicWeight << "," << atomicNumber << ")" << G4endl; 73 } 74 75 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 76 atomicWeight, atomicNumber); 77 if (verboseLevel > 1) 78 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 82 79 83 incidentKineticEnergy -= inelasticity;80 incidentKineticEnergy -= inelasticity; 84 81 85 G4double excitationEnergyGNP = 0.;86 G4double excitationEnergyDTA = 0.;87 88 G4double excitation= NuclearExcitation(incidentKineticEnergy,89 atomicWeight, atomicNumber,90 excitationEnergyGNP,91 excitationEnergyDTA);92 if(verboseLevel > 1)93 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP82 G4double excitationEnergyGNP = 0.; 83 G4double excitationEnergyDTA = 0.; 84 85 G4double excitation = NuclearExcitation(incidentKineticEnergy, 86 atomicWeight, atomicNumber, 87 excitationEnergyGNP, 88 excitationEnergyDTA); 89 if (verboseLevel > 1) 90 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 94 91 << excitationEnergyDTA << G4endl; 95 92 96 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 103 G4HEVector targetParticle; 104 if(G4UniformRand() < atomicNumber/atomicWeight) 105 { 106 targetParticle.setDefinition("Proton"); 107 } 108 else 109 { 110 targetParticle.setDefinition("Neutron"); 111 } 112 113 G4double targetMass = targetParticle.getMass(); 114 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 115 + 2.0*targetMass*incidentTotalEnergy); 116 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 117 118 // this was the meaning of inElastic in the 119 // original Gheisha stand-alone version. 120 // G4bool inElastic = InElasticCrossSectionInFirstInt 121 // (availableEnergy, incidentCode, incidentTotalMomentum); 122 // by unknown reasons, it has been replaced 123 // to the following code in Geant??? 124 G4bool inElastic = true; 125 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 126 127 vecLength = 0; 93 incidentKineticEnergy -= excitation; 94 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 95 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 96 *(incidentTotalEnergy+incidentMass)); 97 98 G4HEVector targetParticle; 99 if (G4UniformRand() < atomicNumber/atomicWeight) { 100 targetParticle.setDefinition("Proton"); 101 } else { 102 targetParticle.setDefinition("Neutron"); 103 } 104 105 G4double targetMass = targetParticle.getMass(); 106 G4double centerOfMassEnergy = 107 std::sqrt( incidentMass*incidentMass + targetMass*targetMass 108 + 2.0*targetMass*incidentTotalEnergy); 109 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 110 111 G4bool inElastic = true; 112 vecLength = 0; 128 113 129 if(verboseLevel > 1)130 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "114 if (verboseLevel > 1) 115 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 131 116 << incidentCode << G4endl; 132 117 133 G4bool successful = false;118 G4bool successful = false; 134 119 135 if(inElastic || (!inElastic && atomicWeight < 1.5)) 136 { 137 FirstIntInCasAntiLambda(inElastic, availableEnergy, pv, vecLength, 138 incidentParticle, targetParticle, atomicWeight); 139 140 if(verboseLevel > 1) 141 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 142 143 144 if ((vecLength > 0) && (availableEnergy > 1.)) 145 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 146 pv, vecLength, 147 incidentParticle, targetParticle); 148 HighEnergyCascading( successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 HighEnergyClusterProduction( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 MediumEnergyCascading( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 MediumEnergyClusterProduction( successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 QuasiElasticScattering( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 } 174 if (!successful) 175 { 176 ElasticScattering( successful, pv, vecLength, 177 incidentParticle, 178 atomicWeight, atomicNumber); 179 } 180 181 if (!successful) 182 { 183 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 184 } 185 FillParticleChange(pv, vecLength); 186 delete [] pv; 187 theParticleChange.SetStatusChange(stopAndKill); 188 return & theParticleChange; 189 } 120 FirstIntInCasAntiLambda(inElastic, availableEnergy, pv, vecLength, 121 incidentParticle, targetParticle, atomicWeight); 122 123 if (verboseLevel > 1) 124 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 125 126 if ((vecLength > 0) && (availableEnergy > 1.)) 127 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 128 pv, vecLength, 129 incidentParticle, targetParticle); 130 HighEnergyCascading(successful, pv, vecLength, 131 excitationEnergyGNP, excitationEnergyDTA, 132 incidentParticle, targetParticle, 133 atomicWeight, atomicNumber); 134 if (!successful) 135 HighEnergyClusterProduction(successful, pv, vecLength, 136 excitationEnergyGNP, excitationEnergyDTA, 137 incidentParticle, targetParticle, 138 atomicWeight, atomicNumber); 139 if (!successful) 140 MediumEnergyCascading(successful, pv, vecLength, 141 excitationEnergyGNP, excitationEnergyDTA, 142 incidentParticle, targetParticle, 143 atomicWeight, atomicNumber); 144 145 if (!successful) 146 MediumEnergyClusterProduction(successful, pv, vecLength, 147 excitationEnergyGNP, excitationEnergyDTA, 148 incidentParticle, targetParticle, 149 atomicWeight, atomicNumber); 150 if (!successful) 151 QuasiElasticScattering(successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 ElasticScattering(successful, pv, vecLength, 157 incidentParticle, 158 atomicWeight, atomicNumber); 159 160 if (!successful) 161 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 162 << G4endl; 163 164 FillParticleChange(pv, vecLength); 165 delete [] pv; 166 theParticleChange.SetStatusChange(stopAndKill); 167 return & theParticleChange; 168 } 169 190 170 191 171 void 192 G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic, 193 const G4double availableEnergy, 194 G4HEVector pv[], 195 G4int &vecLen, 196 G4HEVector incidentParticle, 197 G4HEVector targetParticle, 198 const G4double atomicWeight) 199 200 // AntiLambda undergoes interaction with nucleon within a nucleus. Check if it is 201 // energetically possible to produce pions/kaons. In not, assume nuclear excitation 202 // occurs and input particle is degraded in energy. No other particles are produced. 172 G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda(G4bool& inElastic, 173 const G4double availableEnergy, 174 G4HEVector pv[], 175 G4int &vecLen, 176 const G4HEVector& incidentParticle, 177 const G4HEVector& targetParticle, 178 const G4double atomicWeight) 179 180 // AntiLambda undergoes interaction with nucleon within a nucleus. 181 // Check if it is energetically possible to produce pions/kaons. If not, 182 // assume nuclear excitation occurs and input particle is degraded in 183 // energy. No other particles are produced. 203 184 // If reaction is possible, find the correct number of pions/protons/neutrons 204 185 // produced using an interpolation to multiplicity data. Replace some pions or 205 186 // protons/neutrons by kaons or strange baryons according to the average 206 187 // multiplicity per inelastic reaction. 207 208 { 209 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 210 static const G4double expxl = -expxu; // lower bound for arg. of exp 211 212 static const G4double protb = 0.7; 213 static const G4double neutb = 0.7; 214 static const G4double c = 1.25; 215 216 static const G4int numMul = 1200; 217 static const G4int numMulAn = 400; 218 static const G4int numSec = 60; 219 220 // G4int neutronCode = Neutron.getCode(); 221 G4int protonCode = Proton.getCode(); 222 223 G4int targetCode = targetParticle.getCode(); 224 // G4double incidentMass = incidentParticle.getMass(); 225 // G4double incidentEnergy = incidentParticle.getEnergy(); 226 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 227 228 static G4bool first = true; 229 static G4double protmul[numMul], protnorm[numSec]; // proton constants 230 static G4double protmulAn[numMulAn],protnormAn[numSec]; 231 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 232 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 188 { 189 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 190 static const G4double expxl = -expxu; // lower bound for arg. of exp 191 192 static const G4double protb = 0.7; 193 static const G4double neutb = 0.7; 194 static const G4double c = 1.25; 195 196 static const G4int numMul = 1200; 197 static const G4int numMulAn = 400; 198 static const G4int numSec = 60; 199 200 G4int protonCode = Proton.getCode(); 201 202 G4int targetCode = targetParticle.getCode(); 203 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 204 205 static G4bool first = true; 206 static G4double protmul[numMul], protnorm[numSec]; // proton constants 207 static G4double protmulAn[numMulAn],protnormAn[numSec]; 208 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 209 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 210 211 // misc. local variables 212 // np = number of pi+, nm = number of pi-, nz = number of pi0 213 214 G4int i, counter, nt, np, nm, nz; 238 215 239 216 if( first ) 240 { // compute normalization constants, this will only be done once217 { // compute normalization constants, this will only be done once 241 218 first = false; 242 219 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiNeutronInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiNeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiNeutronInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included is the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiNeutronInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiNeutronInelastic:: 48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 53 const G4double atomicWeight = targetNucleus.GetN(); 54 const G4double atomicNumber = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if(incidentKineticEnergy < 1.) 64 { 65 G4cout << "GHEAntiNeutronInelastic: incident energy < 1 GeV" << G4endl;; 66 } 67 if(verboseLevel > 1) 68 { 69 G4cout << "G4HEAntiNeutronInelastic::ApplyYourself" << G4endl; 70 G4cout << "incident particle " << incidentParticle.getName() 71 << "mass " << incidentMass 72 << "kinetic energy " << incidentKineticEnergy 73 << G4endl; 74 G4cout << "target material with (A,Z) = (" 75 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 } 77 78 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 79 atomicWeight, atomicNumber); 80 if(verboseLevel > 1) 81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 44 G4HadFinalState* 45 G4HEAntiNeutronInelastic::ApplyYourself(const G4HadProjectile &aTrack, 46 G4Nucleus &targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double atomicWeight = targetNucleus.GetN(); 51 const G4double atomicNumber = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 53 54 G4int incidentCode = incidentParticle.getCode(); 55 G4double incidentMass = incidentParticle.getMass(); 56 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 59 60 if (incidentKineticEnergy < 1.) 61 G4cout << "GHEAntiNeutronInelastic: incident energy < 1 GeV" << G4endl;; 62 63 if (verboseLevel > 1) { 64 G4cout << "G4HEAntiNeutronInelastic::ApplyYourself" << G4endl; 65 G4cout << "incident particle " << incidentParticle.getName() 66 << "mass " << incidentMass 67 << "kinetic energy " << incidentKineticEnergy 68 << G4endl; 69 G4cout << "target material with (A,Z) = (" 70 << atomicWeight << "," << atomicNumber << ")" << G4endl; 71 } 72 73 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 74 atomicWeight, atomicNumber); 75 if (verboseLevel > 1) 76 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 82 77 83 incidentKineticEnergy -= inelasticity;78 incidentKineticEnergy -= inelasticity; 84 79 85 G4double excitationEnergyGNP = 0.;86 G4double excitationEnergyDTA = 0.;87 88 G4double excitation= NuclearExcitation(incidentKineticEnergy,89 atomicWeight, atomicNumber,90 excitationEnergyGNP,91 excitationEnergyDTA);92 if(verboseLevel > 1)93 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP80 G4double excitationEnergyGNP = 0.; 81 G4double excitationEnergyDTA = 0.; 82 83 G4double excitation = NuclearExcitation(incidentKineticEnergy, 84 atomicWeight, atomicNumber, 85 excitationEnergyGNP, 86 excitationEnergyDTA); 87 if (verboseLevel > 1) 88 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 94 89 << excitationEnergyDTA << G4endl; 95 90 96 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 103 G4HEVector targetParticle; 104 if(G4UniformRand() < atomicNumber/atomicWeight) 105 { 106 targetParticle.setDefinition("Proton"); 107 } 108 else 109 { 110 targetParticle.setDefinition("Neutron"); 111 } 112 113 G4double targetMass = targetParticle.getMass(); 114 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 115 + 2.0*targetMass*incidentTotalEnergy); 116 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 117 118 // this was the meaning of inElastic in the 119 // original Gheisha stand-alone version. 120 // G4bool inElastic = InElasticCrossSectionInFirstInt 121 // (availableEnergy, incidentCode, incidentTotalMomentum); 122 // by unknown reasons, it has been replaced 123 // to the following code in Geant??? 124 G4bool inElastic = true; 125 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 126 127 vecLength = 0; 91 incidentKineticEnergy -= excitation; 92 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 93 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 94 *(incidentTotalEnergy+incidentMass)); 95 96 G4HEVector targetParticle; 97 if (G4UniformRand() < atomicNumber/atomicWeight) { 98 targetParticle.setDefinition("Proton"); 99 } else { 100 targetParticle.setDefinition("Neutron"); 101 } 102 103 G4double targetMass = targetParticle.getMass(); 104 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 105 + targetMass*targetMass 106 + 2.0*targetMass*incidentTotalEnergy); 107 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 108 109 G4bool inElastic = true; 110 vecLength = 0; 128 111 129 if(verboseLevel > 1)130 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "112 if (verboseLevel > 1) 113 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 131 114 << incidentCode << G4endl; 132 115 133 G4bool successful = false;116 G4bool successful = false; 134 117 135 if(inElastic || (!inElastic && atomicWeight < 1.5)) 136 { 137 FirstIntInCasAntiNeutron(inElastic, availableEnergy, pv, vecLength, 138 incidentParticle, targetParticle, atomicWeight); 139 140 if(verboseLevel > 1) 141 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 142 143 144 if ((vecLength > 0) && (availableEnergy > 1.)) 145 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 146 pv, vecLength, 147 incidentParticle, targetParticle); 148 HighEnergyCascading( successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 HighEnergyClusterProduction( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 MediumEnergyCascading( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 MediumEnergyClusterProduction( successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 QuasiElasticScattering( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 } 174 if (!successful) 175 { 176 ElasticScattering( successful, pv, vecLength, 177 incidentParticle, 178 atomicWeight, atomicNumber); 179 } 180 181 if (!successful) 182 { 183 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 184 } 185 FillParticleChange(pv, vecLength); 186 delete [] pv; 187 theParticleChange.SetStatusChange(stopAndKill); 188 return & theParticleChange; 189 } 118 FirstIntInCasAntiNeutron(inElastic, availableEnergy, pv, vecLength, 119 incidentParticle, targetParticle, atomicWeight); 120 121 if (verboseLevel > 1) 122 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 123 124 if ((vecLength > 0) && (availableEnergy > 1.)) 125 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 126 pv, vecLength, 127 incidentParticle, targetParticle); 128 HighEnergyCascading(successful, pv, vecLength, 129 excitationEnergyGNP, excitationEnergyDTA, 130 incidentParticle, targetParticle, 131 atomicWeight, atomicNumber); 132 if (!successful) 133 HighEnergyClusterProduction(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 MediumEnergyCascading(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 143 if (!successful) 144 MediumEnergyClusterProduction(successful, pv, vecLength, 145 excitationEnergyGNP, excitationEnergyDTA, 146 incidentParticle, targetParticle, 147 atomicWeight, atomicNumber); 148 if (!successful) 149 QuasiElasticScattering(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 ElasticScattering(successful, pv, vecLength, 155 incidentParticle, 156 atomicWeight, atomicNumber); 157 158 if (!successful) 159 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 160 << G4endl; 161 162 FillParticleChange(pv, vecLength); 163 delete [] pv; 164 theParticleChange.SetStatusChange(stopAndKill); 165 return &theParticleChange; 166 } 167 190 168 191 169 void 192 G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron( G4bool &inElastic, 193 const G4double availableEnergy, 194 G4HEVector pv[], 195 G4int &vecLen, 196 G4HEVector incidentParticle, 197 G4HEVector targetParticle, 198 const G4double atomicWeight) 199 200 // AntiNeutron undergoes interaction with nucleon within a nucleus. Check if it is 201 // energetically possible to produce pions/kaons. In not, assume nuclear excitation 202 // occurs and input particle is degraded in energy. No other particles are produced. 170 G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron(G4bool& inElastic, 171 const G4double availableEnergy, 172 G4HEVector pv[], 173 G4int& vecLen, 174 const G4HEVector& incidentParticle, 175 const G4HEVector& targetParticle, 176 const G4double atomicWeight) 177 178 // AntiNeutron undergoes interaction with nucleon within a nucleus. Check if 179 // it is energetically possible to produce pions/kaons. If not, assume 180 // nuclear excitation occurs and input particle is degraded in energy. No 181 // other particles are produced. 203 182 // If reaction is possible, find the correct number of pions/protons/neutrons 204 183 // produced using an interpolation to multiplicity data. Replace some pions or 205 184 // protons/neutrons by kaons or strange baryons according to the average 206 185 // multiplicity per inelastic reaction. 207 208 { 209 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 210 static const G4double expxl = -expxu; // lower bound for arg. of exp 211 212 static const G4double protb = 0.7; 213 static const G4double neutb = 0.7; 214 static const G4double c = 1.25; 215 216 static const G4int numMul = 1200; 217 static const G4int numMulAn = 400; 218 static const G4int numSec = 60; 219 220 G4int neutronCode = Neutron.getCode(); 221 G4int protonCode = Proton.getCode(); 222 223 G4int targetCode = targetParticle.getCode(); 224 // G4double incidentMass = incidentParticle.getMass(); 225 // G4double incidentEnergy = incidentParticle.getEnergy(); 226 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 227 228 static G4bool first = true; 229 static G4double protmul[numMul], protnorm[numSec]; // proton constants 230 static G4double protmulAn[numMulAn],protnormAn[numSec]; 231 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 232 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 186 { 187 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 188 static const G4double expxl = -expxu; // lower bound for arg. of exp 189 190 static const G4double protb = 0.7; 191 static const G4double neutb = 0.7; 192 static const G4double c = 1.25; 193 194 static const G4int numMul = 1200; 195 static const G4int numMulAn = 400; 196 static const G4int numSec = 60; 197 198 G4int neutronCode = Neutron.getCode(); 199 G4int protonCode = Proton.getCode(); 200 201 G4int targetCode = targetParticle.getCode(); 202 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 203 204 static G4bool first = true; 205 static G4double protmul[numMul], protnorm[numSec]; // proton constants 206 static G4double protmulAn[numMulAn],protnormAn[numSec]; 207 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 208 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 209 210 // misc. local variables 211 // np = number of pi+, nm = number of pi-, nz = number of pi0 212 213 G4int i, counter, nt, np, nm, nz; 238 214 239 215 if( first ) 240 { // compute normalization constants, this will only be done once216 { // compute normalization constants, this will only be done once 241 217 first = false; 242 218 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiOmegaMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included is the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiOmegaMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiOmegaMinusInelastic:: 48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 53 const G4double atomicWeight = targetNucleus.GetN(); 54 const G4double atomicNumber = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if(incidentKineticEnergy < 1.) 64 { 65 G4cout << "GHEAntiOmegaMinusInelastic: incident energy < 1 GeV" << G4endl; 66 } 67 if(verboseLevel > 1) 68 { 44 G4HadFinalState* 45 G4HEAntiOmegaMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double atomicWeight = targetNucleus.GetN(); 51 const G4double atomicNumber = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 53 54 G4int incidentCode = incidentParticle.getCode(); 55 G4double incidentMass = incidentParticle.getMass(); 56 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 59 60 if (incidentKineticEnergy < 1.) 61 G4cout << "GHEAntiOmegaMinusInelastic: incident energy < 1 GeV" << G4endl; 62 63 if (verboseLevel > 1) { 69 64 G4cout << "G4HEAntiOmegaMinusInelastic::ApplyYourself" << G4endl; 70 65 G4cout << "incident particle " << incidentParticle.getName() … … 74 69 G4cout << "target material with (A,Z) = (" 75 70 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 }71 } 77 72 78 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,79 atomicWeight, atomicNumber);80 if(verboseLevel > 1)81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;73 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 74 atomicWeight, atomicNumber); 75 if (verboseLevel > 1) 76 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 82 77 83 incidentKineticEnergy -= inelasticity;78 incidentKineticEnergy -= inelasticity; 84 79 85 G4double excitationEnergyGNP = 0.;86 G4double excitationEnergyDTA = 0.;87 88 G4double excitation= NuclearExcitation(incidentKineticEnergy,89 atomicWeight, atomicNumber,90 excitationEnergyGNP,91 excitationEnergyDTA);92 if(verboseLevel > 1)93 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP80 G4double excitationEnergyGNP = 0.; 81 G4double excitationEnergyDTA = 0.; 82 83 G4double excitation = NuclearExcitation(incidentKineticEnergy, 84 atomicWeight, atomicNumber, 85 excitationEnergyGNP, 86 excitationEnergyDTA); 87 if (verboseLevel > 1) 88 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 94 89 << excitationEnergyDTA << G4endl; 95 90 96 91 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 103 G4HEVector targetParticle; 104 if(G4UniformRand() < atomicNumber/atomicWeight) 105 { 106 targetParticle.setDefinition("Proton"); 107 } 108 else 109 { 110 targetParticle.setDefinition("Neutron"); 111 } 112 113 G4double targetMass = targetParticle.getMass(); 114 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 115 + 2.0*targetMass*incidentTotalEnergy); 116 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 117 118 // this was the meaning of inElastic in the 119 // original Gheisha stand-alone version. 120 // G4bool inElastic = InElasticCrossSectionInFirstInt 121 // (availableEnergy, incidentCode, incidentTotalMomentum); 122 // by unknown reasons, it has been replaced 123 // to the following code in Geant??? 124 G4bool inElastic = true; 125 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 126 127 vecLength = 0; 92 incidentKineticEnergy -= excitation; 93 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 94 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 95 *(incidentTotalEnergy+incidentMass)); 96 97 G4HEVector targetParticle; 98 if (G4UniformRand() < atomicNumber/atomicWeight) { 99 targetParticle.setDefinition("Proton"); 100 } else { 101 targetParticle.setDefinition("Neutron"); 102 } 103 104 G4double targetMass = targetParticle.getMass(); 105 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 106 + targetMass*targetMass 107 + 2.0*targetMass*incidentTotalEnergy); 108 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 109 110 G4bool inElastic = true; 111 vecLength = 0; 128 112 129 if(verboseLevel > 1)130 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "113 if (verboseLevel > 1) 114 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 131 115 << incidentCode << G4endl; 132 116 133 G4bool successful = false;117 G4bool successful = false; 134 118 135 if(inElastic || (!inElastic && atomicWeight < 1.5)) 136 { 137 FirstIntInCasAntiOmegaMinus(inElastic, availableEnergy, pv, vecLength, 138 incidentParticle, targetParticle, atomicWeight); 139 140 if(verboseLevel > 1) 141 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 142 143 144 if ((vecLength > 0) && (availableEnergy > 1.)) 145 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 146 pv, vecLength, 147 incidentParticle, targetParticle); 148 HighEnergyCascading( successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 HighEnergyClusterProduction( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 MediumEnergyCascading( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 MediumEnergyClusterProduction( successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 QuasiElasticScattering( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 } 174 if (!successful) 175 { 176 ElasticScattering( successful, pv, vecLength, 177 incidentParticle, 178 atomicWeight, atomicNumber); 179 } 180 181 if (!successful) 182 { 183 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 184 } 185 FillParticleChange(pv, vecLength); 186 delete [] pv; 187 theParticleChange.SetStatusChange(stopAndKill); 188 return & theParticleChange; 189 } 119 FirstIntInCasAntiOmegaMinus(inElastic, availableEnergy, pv, vecLength, 120 incidentParticle, targetParticle, atomicWeight); 121 122 if (verboseLevel > 1) 123 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 124 125 if ((vecLength > 0) && (availableEnergy > 1.)) 126 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 127 pv, vecLength, 128 incidentParticle, targetParticle); 129 HighEnergyCascading(successful, pv, vecLength, 130 excitationEnergyGNP, excitationEnergyDTA, 131 incidentParticle, targetParticle, 132 atomicWeight, atomicNumber); 133 if (!successful) 134 HighEnergyClusterProduction(successful, pv, vecLength, 135 excitationEnergyGNP, excitationEnergyDTA, 136 incidentParticle, targetParticle, 137 atomicWeight, atomicNumber); 138 if (!successful) 139 MediumEnergyCascading(successful, pv, vecLength, 140 excitationEnergyGNP, excitationEnergyDTA, 141 incidentParticle, targetParticle, 142 atomicWeight, atomicNumber); 143 144 if (!successful) 145 MediumEnergyClusterProduction(successful, pv, vecLength, 146 excitationEnergyGNP, excitationEnergyDTA, 147 incidentParticle, targetParticle, 148 atomicWeight, atomicNumber); 149 if (!successful) 150 QuasiElasticScattering(successful, pv, vecLength, 151 excitationEnergyGNP, excitationEnergyDTA, 152 incidentParticle, targetParticle, 153 atomicWeight, atomicNumber); 154 if (!successful) 155 ElasticScattering(successful, pv, vecLength, 156 incidentParticle, 157 atomicWeight, atomicNumber); 158 159 if (!successful) 160 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 161 << G4endl; 162 163 FillParticleChange(pv, vecLength); 164 delete [] pv; 165 theParticleChange.SetStatusChange(stopAndKill); 166 return &theParticleChange; 167 } 168 190 169 191 170 void 192 G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,193 const G4double availableEnergy,194 G4HEVector pv[],195 G4int &vecLen,196 G4HEVectorincidentParticle,197 G4HEVectortargetParticle,198 const G4double atomicWeight)171 G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus(G4bool& inElastic, 172 const G4double availableEnergy, 173 G4HEVector pv[], 174 G4int& vecLen, 175 const G4HEVector& incidentParticle, 176 const G4HEVector& targetParticle, 177 const G4double atomicWeight) 199 178 200 179 // AntiOmega undergoes interaction with nucleon within a nucleus. 201 180 // As in Geant3, we think that this routine has absolutely no influence 202 181 // on the whole performance of the program. Take AntiLambda instaed. 203 204 { 205 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 206 static const G4double expxl = -expxu; // lower bound for arg. of exp 207 208 static const G4double protb = 0.7; 209 static const G4double neutb = 0.7; 210 static const G4double c = 1.25; 211 212 static const G4int numMul = 1200; 213 static const G4int numMulAn = 400; 214 static const G4int numSec = 60; 215 216 // G4int neutronCode = Neutron.getCode(); 217 G4int protonCode = Proton.getCode(); 218 219 G4int targetCode = targetParticle.getCode(); 220 // G4double incidentMass = incidentParticle.getMass(); 221 // G4double incidentEnergy = incidentParticle.getEnergy(); 222 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 223 224 static G4bool first = true; 225 static G4double protmul[numMul], protnorm[numSec]; // proton constants 226 static G4double protmulAn[numMulAn],protnormAn[numSec]; 227 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 228 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 229 230 // misc. local variables 231 // np = number of pi+, nm = number of pi-, nz = number of pi0 182 { 183 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 184 static const G4double expxl = -expxu; // lower bound for arg. of exp 185 186 static const G4double protb = 0.7; 187 static const G4double neutb = 0.7; 188 static const G4double c = 1.25; 189 190 static const G4int numMul = 1200; 191 static const G4int numMulAn = 400; 192 static const G4int numSec = 60; 193 194 G4int protonCode = Proton.getCode(); 195 196 G4int targetCode = targetParticle.getCode(); 197 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 198 199 static G4bool first = true; 200 static G4double protmul[numMul], protnorm[numSec]; // proton constants 201 static G4double protmulAn[numMulAn],protnormAn[numSec]; 202 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 203 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 204 205 // misc. local variables 206 // np = number of pi+, nm = number of pi-, nz = number of pi0 232 207 233 208 G4int i, counter, nt, np, nm, nz; 234 209 235 210 if( first ) 236 { // compute normalization constants, this will only be done once211 { // compute normalization constants, this will only be done once 237 212 first = false; 238 213 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiProtonInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiProtonInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiProtonInelastic.cc,v 1.16 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiProtonInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiProtonInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double atomicWeight = targetNucleus.GetN();54 const G4double atomicNumber= targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);56 57 G4int incidentCode= incidentParticle.getCode();58 G4double incidentMass= incidentParticle.getMass();59 G4double incidentTotalEnergy= incidentParticle.getEnergy();60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;62 63 if(incidentKineticEnergy < 1.)64 {65 G4cout << "GHEAntiProtonInelastic: incident energy < 1 GeV" << G4endl; 66 }67 if(verboseLevel > 1)68 {69 G4cout << "G4HEAntiProtonInelastic::ApplyYourself" << G4endl;70 G4cout << "incident particle " << incidentParticle.getName()71 << "mass " << incidentMass72 << "kinetic energy " << incidentKineticEnergy73 << G4endl;74 G4cout << "target material with (A,Z) = ("75 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 }77 78 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy,79 atomicWeight, atomicNumber);80 if(verboseLevel > 1) 81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;44 G4HadFinalState* 45 G4HEAntiProtonInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double atomicWeight = targetNucleus.GetN(); 51 const G4double atomicNumber = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 53 54 G4int incidentCode = incidentParticle.getCode(); 55 G4double incidentMass = incidentParticle.getMass(); 56 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 59 60 if (incidentKineticEnergy < 1.) 61 G4cout << "GHEAntiProtonInelastic: incident energy < 1 GeV" << G4endl; 62 63 if (verboseLevel > 1) { 64 G4cout << "G4HEAntiProtonInelastic::ApplyYourself" << G4endl; 65 G4cout << "incident particle " << incidentParticle.getName() 66 << "mass " << incidentMass 67 << "kinetic energy " << incidentKineticEnergy 68 << G4endl; 69 G4cout << "target material with (A,Z) = (" 70 << atomicWeight << "," << atomicNumber << ")" << G4endl; 71 } 72 73 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 74 atomicWeight, atomicNumber); 75 if (verboseLevel > 1) 76 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 77 78 incidentKineticEnergy -= inelasticity; 82 79 83 84 incidentKineticEnergy -= inelasticity; 80 G4double excitationEnergyGNP = 0.; 81 G4double excitationEnergyDTA = 0.; 82 83 G4double excitation = NuclearExcitation(incidentKineticEnergy, 84 atomicWeight, atomicNumber, 85 excitationEnergyGNP, 86 excitationEnergyDTA); 87 if (verboseLevel > 1) 88 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 89 << excitationEnergyDTA << G4endl; 90 91 92 incidentKineticEnergy -= excitation; 93 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 94 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 95 *(incidentTotalEnergy+incidentMass)); 96 97 G4HEVector targetParticle; 98 if (G4UniformRand() < atomicNumber/atomicWeight) { 99 targetParticle.setDefinition("Proton"); 100 } else { 101 targetParticle.setDefinition("Neutron"); 102 } 103 104 G4double targetMass = targetParticle.getMass(); 105 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 106 + targetMass*targetMass 107 + 2.0*targetMass*incidentTotalEnergy); 108 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 109 110 G4bool inElastic = true; 111 vecLength = 0; 112 113 if (verboseLevel > 1) 114 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 115 << incidentCode << G4endl; 116 117 G4bool successful = false; 85 118 86 G4double excitationEnergyGNP = 0.; 87 G4double excitationEnergyDTA = 0.; 88 89 G4double excitation = NuclearExcitation(incidentKineticEnergy, 90 atomicWeight, atomicNumber, 91 excitationEnergyGNP, 92 excitationEnergyDTA); 93 if(verboseLevel > 1) 94 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 95 << excitationEnergyDTA << G4endl; 96 97 98 incidentKineticEnergy -= excitation; 99 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 100 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 101 *(incidentTotalEnergy+incidentMass)); 102 103 G4HEVector targetParticle; 104 if(G4UniformRand() < atomicNumber/atomicWeight) 105 { 106 targetParticle.setDefinition("Proton"); 107 } 108 else 109 { 110 targetParticle.setDefinition("Neutron"); 111 } 112 113 G4double targetMass = targetParticle.getMass(); 114 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 115 + 2.0*targetMass*incidentTotalEnergy); 116 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 117 118 // this was the meaning of inElastic in the 119 // original Gheisha stand-alone version. 120 // G4bool inElastic = InElasticCrossSectionInFirstInt 121 // (availableEnergy, incidentCode, incidentTotalMomentum); 122 // by unknown reasons, it has been replaced 123 // to the following code in Geant??? 124 G4bool inElastic = true; 125 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 126 127 vecLength = 0; 128 129 if(verboseLevel > 1) 130 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 131 << incidentCode << G4endl; 132 133 G4bool successful = false; 134 135 if(inElastic || (!inElastic && atomicWeight < 1.5)) 136 { 137 FirstIntInCasAntiProton(inElastic, availableEnergy, pv, vecLength, 138 incidentParticle, targetParticle, atomicWeight); 139 140 if(verboseLevel > 1) 141 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 142 143 144 if ((vecLength > 0) && (availableEnergy > 1.)) 145 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 146 pv, vecLength, 147 incidentParticle, targetParticle); 148 HighEnergyCascading( successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 HighEnergyClusterProduction( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 MediumEnergyCascading( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 MediumEnergyClusterProduction( successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 QuasiElasticScattering( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 } 174 if (!successful) 175 { 176 ElasticScattering( successful, pv, vecLength, 177 incidentParticle, 178 atomicWeight, atomicNumber); 179 } 180 181 if (!successful) 182 { 183 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 184 } 185 FillParticleChange(pv, vecLength); 186 delete [] pv; 187 theParticleChange.SetStatusChange(stopAndKill); 188 return & theParticleChange; 189 } 119 FirstIntInCasAntiProton(inElastic, availableEnergy, pv, vecLength, 120 incidentParticle, targetParticle, atomicWeight); 121 122 if (verboseLevel > 1) 123 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 124 125 if ((vecLength > 0) && (availableEnergy > 1.)) 126 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 127 pv, vecLength, 128 incidentParticle, targetParticle); 129 HighEnergyCascading(successful, pv, vecLength, 130 excitationEnergyGNP, excitationEnergyDTA, 131 incidentParticle, targetParticle, 132 atomicWeight, atomicNumber); 133 if (!successful) 134 HighEnergyClusterProduction(successful, pv, vecLength, 135 excitationEnergyGNP, excitationEnergyDTA, 136 incidentParticle, targetParticle, 137 atomicWeight, atomicNumber); 138 if (!successful) 139 MediumEnergyCascading(successful, pv, vecLength, 140 excitationEnergyGNP, excitationEnergyDTA, 141 incidentParticle, targetParticle, 142 atomicWeight, atomicNumber); 143 144 if (!successful) 145 MediumEnergyClusterProduction(successful, pv, vecLength, 146 excitationEnergyGNP, excitationEnergyDTA, 147 incidentParticle, targetParticle, 148 atomicWeight, atomicNumber); 149 if (!successful) 150 QuasiElasticScattering(successful, pv, vecLength, 151 excitationEnergyGNP, excitationEnergyDTA, 152 incidentParticle, targetParticle, 153 atomicWeight, atomicNumber); 154 if (!successful) 155 ElasticScattering(successful, pv, vecLength, 156 incidentParticle, 157 atomicWeight, atomicNumber); 158 159 if (!successful) 160 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 161 << G4endl; 162 163 FillParticleChange(pv, vecLength); 164 delete [] pv; 165 theParticleChange.SetStatusChange(stopAndKill); 166 return & theParticleChange; 167 } 168 190 169 191 170 void 192 G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,193 const G4double availableEnergy,194 G4HEVector pv[],195 G4int &vecLen,196 G4HEVectorincidentParticle,197 G4HEVectortargetParticle,198 const G4double atomicWeight)171 G4HEAntiProtonInelastic::FirstIntInCasAntiProton(G4bool& inElastic, 172 const G4double availableEnergy, 173 G4HEVector pv[], 174 G4int& vecLen, 175 const G4HEVector& incidentParticle, 176 const G4HEVector& targetParticle, 177 const G4double atomicWeight) 199 178 200 179 // AntiProton undergoes interaction with nucleon within a nucleus. Check if it is … … 205 184 // protons/neutrons by kaons or strange baryons according to the average 206 185 // multiplicity per inelastic reaction. 207 208 { 209 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 210 static const G4double expxl = -expxu; // lower bound for arg. of exp 211 212 static const G4double protb = 0.7; 213 static const G4double neutb = 0.7; 214 static const G4double c = 1.25; 215 216 static const G4int numMul = 1200; 217 static const G4int numMulAn = 400; 218 static const G4int numSec = 60; 219 220 G4int neutronCode = Neutron.getCode(); 221 G4int protonCode = Proton.getCode(); 222 223 G4int targetCode = targetParticle.getCode(); 224 // G4double incidentMass = incidentParticle.getMass(); 225 // G4double incidentEnergy = incidentParticle.getEnergy(); 226 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 227 228 static G4bool first = true; 229 static G4double protmul[numMul], protnorm[numSec]; // proton constants 230 static G4double protmulAn[numMulAn],protnormAn[numSec]; 231 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 232 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 186 { 187 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 188 static const G4double expxl = -expxu; // lower bound for arg. of exp 189 190 static const G4double protb = 0.7; 191 static const G4double neutb = 0.7; 192 static const G4double c = 1.25; 193 194 static const G4int numMul = 1200; 195 static const G4int numMulAn = 400; 196 static const G4int numSec = 60; 197 198 G4int neutronCode = Neutron.getCode(); 199 G4int protonCode = Proton.getCode(); 200 201 G4int targetCode = targetParticle.getCode(); 202 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 203 204 static G4bool first = true; 205 static G4double protmul[numMul], protnorm[numSec]; // proton constants 206 static G4double protmulAn[numMulAn],protnormAn[numSec]; 207 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 208 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 209 210 // misc. local variables 211 // np = number of pi+, nm = number of pi-, nz = number of pi0 212 213 G4int i, counter, nt, np, nm, nz; 238 214 239 215 if( first ) 240 { // compute normalization constants, this will only be done once216 { // compute normalization constants, this will only be done once 241 217 first = false; 242 218 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiSigmaMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiSigmaMinusInelastic:: 48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 53 const G4double atomicWeight = targetNucleus.GetN(); 54 const G4double atomicNumber = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if(incidentKineticEnergy < 1.) 64 { 65 G4cout << "GHEAntiSigmaMinusInelastic: incident energy < 1 GeV" << G4endl; 66 } 67 if(verboseLevel > 1) 68 { 69 G4cout << "G4HEAntiSigmaMinusInelastic::ApplyYourself" << G4endl; 70 G4cout << "incident particle " << incidentParticle.getName() 71 << "mass " << incidentMass 72 << "kinetic energy " << incidentKineticEnergy 73 << G4endl; 74 G4cout << "target material with (A,Z) = (" 75 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 } 44 G4HadFinalState* 45 G4HEAntiSigmaMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double atomicWeight = targetNucleus.GetN(); 51 const G4double atomicNumber = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 53 54 G4int incidentCode = incidentParticle.getCode(); 55 G4double incidentMass = incidentParticle.getMass(); 56 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 59 60 if (incidentKineticEnergy < 1.) 61 G4cout << "GHEAntiSigmaMinusInelastic: incident energy < 1 GeV" << G4endl; 62 63 if (verboseLevel > 1) { 64 G4cout << "G4HEAntiSigmaMinusInelastic::ApplyYourself" << G4endl; 65 G4cout << "incident particle " << incidentParticle.getName() 66 << "mass " << incidentMass 67 << "kinetic energy " << incidentKineticEnergy 68 << G4endl; 69 G4cout << "target material with (A,Z) = (" 70 << atomicWeight << "," << atomicNumber << ")" << G4endl; 71 } 77 72 78 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,79 atomicWeight, atomicNumber);80 if(verboseLevel > 1)81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;73 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 74 atomicWeight, atomicNumber); 75 if (verboseLevel > 1) 76 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 82 77 83 incidentKineticEnergy -= inelasticity;78 incidentKineticEnergy -= inelasticity; 84 79 85 G4double excitationEnergyGNP = 0.; 86 G4double excitationEnergyDTA = 0.; 87 88 G4double excitation = NuclearExcitation(incidentKineticEnergy, 89 atomicWeight, atomicNumber, 90 excitationEnergyGNP, 91 excitationEnergyDTA); 92 if(verboseLevel > 1) 93 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 94 << excitationEnergyDTA << G4endl; 95 96 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 G4HEVector targetParticle; 103 if(G4UniformRand() < atomicNumber/atomicWeight) 104 { 105 targetParticle.setDefinition("Proton"); 106 } 107 else 108 { 109 targetParticle.setDefinition("Neutron"); 110 } 111 112 G4double targetMass = targetParticle.getMass(); 113 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 114 + 2.0*targetMass*incidentTotalEnergy); 115 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 116 117 // this was the meaning of inElastic in the 118 // original Gheisha stand-alone version. 119 // G4bool inElastic = InElasticCrossSectionInFirstInt 120 // (availableEnergy, incidentCode, incidentTotalMomentum); 121 // by unknown reasons, it has been replaced 122 // to the following code in Geant??? 123 G4bool inElastic = true; 124 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 125 126 vecLength = 0; 80 G4double excitationEnergyGNP = 0.; 81 G4double excitationEnergyDTA = 0.; 82 83 G4double excitation = NuclearExcitation(incidentKineticEnergy, 84 atomicWeight, atomicNumber, 85 excitationEnergyGNP, 86 excitationEnergyDTA); 87 if (verboseLevel > 1) 88 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 89 << excitationEnergyDTA << G4endl; 90 91 incidentKineticEnergy -= excitation; 92 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 93 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 94 *(incidentTotalEnergy+incidentMass)); 95 96 G4HEVector targetParticle; 97 if (G4UniformRand() < atomicNumber/atomicWeight) { 98 targetParticle.setDefinition("Proton"); 99 } else { 100 targetParticle.setDefinition("Neutron"); 101 } 102 103 G4double targetMass = targetParticle.getMass(); 104 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 105 + targetMass*targetMass 106 + 2.0*targetMass*incidentTotalEnergy); 107 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 108 109 G4bool inElastic = true; 110 vecLength = 0; 127 111 128 if(verboseLevel > 1)129 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "112 if (verboseLevel > 1) 113 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 130 114 << incidentCode << G4endl; 131 115 132 G4bool successful = false;116 G4bool successful = false; 133 117 134 if(inElastic || (!inElastic && atomicWeight < 1.5)) 135 { 136 FirstIntInCasAntiSigmaMinus(inElastic, availableEnergy, pv, vecLength, 137 incidentParticle, targetParticle, atomicWeight); 138 139 if(verboseLevel > 1) 140 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 141 142 143 if ((vecLength > 0) && (availableEnergy > 1.)) 144 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 145 pv, vecLength, 146 incidentParticle, targetParticle); 147 HighEnergyCascading( successful, pv, vecLength, 148 excitationEnergyGNP, excitationEnergyDTA, 149 incidentParticle, targetParticle, 150 atomicWeight, atomicNumber); 151 if (!successful) 152 HighEnergyClusterProduction( successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 if (!successful) 157 MediumEnergyCascading( successful, pv, vecLength, 158 excitationEnergyGNP, excitationEnergyDTA, 159 incidentParticle, targetParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 MediumEnergyClusterProduction( successful, pv, vecLength, 164 excitationEnergyGNP, excitationEnergyDTA, 165 incidentParticle, targetParticle, 166 atomicWeight, atomicNumber); 167 if (!successful) 168 QuasiElasticScattering( successful, pv, vecLength, 169 excitationEnergyGNP, excitationEnergyDTA, 170 incidentParticle, targetParticle, 171 atomicWeight, atomicNumber); 172 } 173 if (!successful) 174 { 175 ElasticScattering( successful, pv, vecLength, 176 incidentParticle, 177 atomicWeight, atomicNumber); 178 } 179 180 if (!successful) 181 { 182 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 183 } 184 FillParticleChange(pv, vecLength); 185 delete [] pv; 186 theParticleChange.SetStatusChange(stopAndKill); 187 return & theParticleChange; 188 } 118 FirstIntInCasAntiSigmaMinus(inElastic, availableEnergy, pv, vecLength, 119 incidentParticle, targetParticle, atomicWeight); 120 121 if (verboseLevel > 1) 122 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 123 124 if ((vecLength > 0) && (availableEnergy > 1.)) 125 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 126 pv, vecLength, 127 incidentParticle, targetParticle); 128 HighEnergyCascading(successful, pv, vecLength, 129 excitationEnergyGNP, excitationEnergyDTA, 130 incidentParticle, targetParticle, 131 atomicWeight, atomicNumber); 132 if (!successful) 133 HighEnergyClusterProduction(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 MediumEnergyCascading(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 143 if (!successful) 144 MediumEnergyClusterProduction(successful, pv, vecLength, 145 excitationEnergyGNP, excitationEnergyDTA, 146 incidentParticle, targetParticle, 147 atomicWeight, atomicNumber); 148 if (!successful) 149 QuasiElasticScattering(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 ElasticScattering(successful, pv, vecLength, 155 incidentParticle, 156 atomicWeight, atomicNumber); 157 158 if (!successful) 159 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 160 << G4endl; 161 FillParticleChange(pv, vecLength); 162 delete [] pv; 163 theParticleChange.SetStatusChange(stopAndKill); 164 return &theParticleChange; 165 } 166 189 167 190 168 void 191 G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,192 const G4double availableEnergy,193 G4HEVector pv[],194 G4int &vecLen,195 G4HEVectorincidentParticle,196 G4HEVectortargetParticle,197 const G4double atomicWeight)169 G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus(G4bool& inElastic, 170 const G4double availableEnergy, 171 G4HEVector pv[], 172 G4int& vecLen, 173 const G4HEVector& incidentParticle, 174 const G4HEVector& targetParticle, 175 const G4double atomicWeight) 198 176 199 177 // AntiSigma- undergoes interaction with nucleon within a nucleus. Check if it is … … 204 182 // protons/neutrons by kaons or strange baryons according to the average 205 183 // multiplicity per inelastic reaction. 206 207 { 208 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 209 static const G4double expxl = -expxu; // lower bound for arg. of exp 210 211 static const G4double protb = 0.7; 212 static const G4double neutb = 0.7; 213 static const G4double c = 1.25; 214 215 static const G4int numMul = 1200; 216 static const G4int numMulAn = 400; 217 static const G4int numSec = 60; 218 219 G4int neutronCode = Neutron.getCode(); 220 G4int protonCode = Proton.getCode(); 221 222 G4int targetCode = targetParticle.getCode(); 223 // G4double incidentMass = incidentParticle.getMass(); 224 // G4double incidentEnergy = incidentParticle.getEnergy(); 225 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 226 227 static G4bool first = true; 228 static G4double protmul[numMul], protnorm[numSec]; // proton constants 229 static G4double protmulAn[numMulAn],protnormAn[numSec]; 230 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 231 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 232 233 // misc. local variables 234 // np = number of pi+, nm = number of pi-, nz = number of pi0 235 236 G4int i, counter, nt, np, nm, nz; 184 { 185 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 186 static const G4double expxl = -expxu; // lower bound for arg. of exp 187 188 static const G4double protb = 0.7; 189 static const G4double neutb = 0.7; 190 static const G4double c = 1.25; 191 192 static const G4int numMul = 1200; 193 static const G4int numMulAn = 400; 194 static const G4int numSec = 60; 195 196 G4int neutronCode = Neutron.getCode(); 197 G4int protonCode = Proton.getCode(); 198 199 G4int targetCode = targetParticle.getCode(); 200 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 201 202 static G4bool first = true; 203 static G4double protmul[numMul], protnorm[numSec]; // proton constants 204 static G4double protmulAn[numMulAn],protnormAn[numSec]; 205 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 206 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 207 208 // misc. local variables 209 // np = number of pi+, nm = number of pi-, nz = number of pi0 210 211 G4int i, counter, nt, np, nm, nz; 237 212 238 213 if( first ) 239 { // compute normalization constants, this will only be done once214 { // compute normalization constants, this will only be done once 240 215 first = false; 241 216 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaPlusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiSigmaPlusInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiSigmaPlusInelastic:: 48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 { 50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack; 52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle(); 53 const G4double atomicWeight = targetNucleus.GetN(); 54 const G4double atomicNumber = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if(incidentKineticEnergy < 1.) 64 { 65 G4cout << "GHEAntiSigmaPlusInelastic: incident energy < 1 GeV" << G4endl; 66 } 67 if(verboseLevel > 1) 68 { 69 G4cout << "G4HEAntiSigmaPlusInelastic::ApplyYourself" << G4endl; 70 G4cout << "incident particle " << incidentParticle.getName() 71 << "mass " << incidentMass 72 << "kinetic energy " << incidentKineticEnergy 73 << G4endl; 74 G4cout << "target material with (A,Z) = (" 75 << atomicWeight << "," << atomicNumber << ")" << G4endl; 76 } 77 78 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 79 atomicWeight, atomicNumber); 80 if(verboseLevel > 1) 81 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 82 83 incidentKineticEnergy -= inelasticity; 44 G4HadFinalState* 45 G4HEAntiSigmaPlusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double atomicWeight = targetNucleus.GetN(); 51 const G4double atomicNumber = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 53 54 G4int incidentCode = incidentParticle.getCode(); 55 G4double incidentMass = incidentParticle.getMass(); 56 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 59 60 if (incidentKineticEnergy < 1.) 61 G4cout << "GHEAntiSigmaPlusInelastic: incident energy < 1 GeV" << G4endl; 62 63 if (verboseLevel > 1) { 64 G4cout << "G4HEAntiSigmaPlusInelastic::ApplyYourself" << G4endl; 65 G4cout << "incident particle " << incidentParticle.getName() 66 << "mass " << incidentMass 67 << "kinetic energy " << incidentKineticEnergy 68 << G4endl; 69 G4cout << "target material with (A,Z) = (" 70 << atomicWeight << "," << atomicNumber << ")" << G4endl; 71 } 72 73 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 74 atomicWeight, atomicNumber); 75 if (verboseLevel > 1) 76 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 77 78 incidentKineticEnergy -= inelasticity; 84 79 85 G4double excitationEnergyGNP = 0.;86 G4double excitationEnergyDTA = 0.;87 88 G4double excitation= NuclearExcitation(incidentKineticEnergy,89 atomicWeight, atomicNumber,90 excitationEnergyGNP,91 excitationEnergyDTA);92 if(verboseLevel > 1)93 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP80 G4double excitationEnergyGNP = 0.; 81 G4double excitationEnergyDTA = 0.; 82 83 G4double excitation = NuclearExcitation(incidentKineticEnergy, 84 atomicWeight, atomicNumber, 85 excitationEnergyGNP, 86 excitationEnergyDTA); 87 if (verboseLevel > 1) 88 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 94 89 << excitationEnergyDTA << G4endl; 95 90 96 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 103 G4HEVector targetParticle; 104 if(G4UniformRand() < atomicNumber/atomicWeight) 105 { 106 targetParticle.setDefinition("Proton"); 107 } 108 else 109 { 110 targetParticle.setDefinition("Neutron"); 111 } 112 113 G4double targetMass = targetParticle.getMass(); 114 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 115 + 2.0*targetMass*incidentTotalEnergy); 116 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 117 118 // this was the meaning of inElastic in the 119 // original Gheisha stand-alone version. 120 // G4bool inElastic = InElasticCrossSectionInFirstInt 121 // (availableEnergy, incidentCode, incidentTotalMomentum); 122 // by unknown reasons, it has been replaced 123 // to the following code in Geant??? 124 G4bool inElastic = true; 125 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 126 127 vecLength = 0; 91 incidentKineticEnergy -= excitation; 92 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 93 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 94 *(incidentTotalEnergy+incidentMass)); 95 96 G4HEVector targetParticle; 97 if (G4UniformRand() < atomicNumber/atomicWeight) { 98 targetParticle.setDefinition("Proton"); 99 } else { 100 targetParticle.setDefinition("Neutron"); 101 } 102 103 G4double targetMass = targetParticle.getMass(); 104 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 105 + targetMass*targetMass 106 + 2.0*targetMass*incidentTotalEnergy); 107 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 108 109 G4bool inElastic = true; 110 vecLength = 0; 128 111 129 if(verboseLevel > 1)130 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "112 if (verboseLevel > 1) 113 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 131 114 << incidentCode << G4endl; 132 115 133 G4bool successful = false;116 G4bool successful = false; 134 117 135 if(inElastic || (!inElastic && atomicWeight < 1.5)) 136 { 137 FirstIntInCasAntiSigmaPlus(inElastic, availableEnergy, pv, vecLength, 138 incidentParticle, targetParticle, atomicWeight); 139 140 if(verboseLevel > 1) 141 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 142 143 144 if ((vecLength > 0) && (availableEnergy > 1.)) 145 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 146 pv, vecLength, 147 incidentParticle, targetParticle); 148 HighEnergyCascading( successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 HighEnergyClusterProduction( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 MediumEnergyCascading( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 MediumEnergyClusterProduction( successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 QuasiElasticScattering( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 } 174 if (!successful) 175 { 176 ElasticScattering( successful, pv, vecLength, 177 incidentParticle, 178 atomicWeight, atomicNumber); 179 } 180 181 if (!successful) 182 { 183 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 184 } 185 FillParticleChange(pv, vecLength); 186 delete [] pv; 187 theParticleChange.SetStatusChange(stopAndKill); 188 return & theParticleChange; 189 } 118 FirstIntInCasAntiSigmaPlus(inElastic, availableEnergy, pv, vecLength, 119 incidentParticle, targetParticle, atomicWeight); 120 121 if (verboseLevel > 1) 122 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 123 124 if ((vecLength > 0) && (availableEnergy > 1.)) 125 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 126 pv, vecLength, 127 incidentParticle, targetParticle); 128 129 HighEnergyCascading(successful, pv, vecLength, 130 excitationEnergyGNP, excitationEnergyDTA, 131 incidentParticle, targetParticle, 132 atomicWeight, atomicNumber); 133 if (!successful) 134 HighEnergyClusterProduction(successful, pv, vecLength, 135 excitationEnergyGNP, excitationEnergyDTA, 136 incidentParticle, targetParticle, 137 atomicWeight, atomicNumber); 138 if (!successful) 139 MediumEnergyCascading(successful, pv, vecLength, 140 excitationEnergyGNP, excitationEnergyDTA, 141 incidentParticle, targetParticle, 142 atomicWeight, atomicNumber); 143 144 if (!successful) 145 MediumEnergyClusterProduction(successful, pv, vecLength, 146 excitationEnergyGNP, excitationEnergyDTA, 147 incidentParticle, targetParticle, 148 atomicWeight, atomicNumber); 149 if (!successful) 150 QuasiElasticScattering(successful, pv, vecLength, 151 excitationEnergyGNP, excitationEnergyDTA, 152 incidentParticle, targetParticle, 153 atomicWeight, atomicNumber); 154 if (!successful) 155 ElasticScattering(successful, pv, vecLength, 156 incidentParticle, 157 atomicWeight, atomicNumber); 158 159 if (!successful) 160 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 161 << G4endl; 162 163 FillParticleChange(pv, vecLength); 164 delete [] pv; 165 theParticleChange.SetStatusChange(stopAndKill); 166 return &theParticleChange; 167 } 168 190 169 191 170 void 192 G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,193 const G4double availableEnergy,194 G4HEVector pv[],195 G4int &vecLen,196 G4HEVectorincidentParticle,197 G4HEVectortargetParticle,198 const G4double atomicWeight)171 G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus(G4bool& inElastic, 172 const G4double availableEnergy, 173 G4HEVector pv[], 174 G4int& vecLen, 175 const G4HEVector& incidentParticle, 176 const G4HEVector& targetParticle, 177 const G4double atomicWeight) 199 178 200 179 // AntiSigma+ undergoes interaction with nucleon within a nucleus. Check if it is … … 205 184 // protons/neutrons by kaons or strange baryons according to the average 206 185 // multiplicity per inelastic reaction. 207 208 { 209 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 210 static const G4double expxl = -expxu; // lower bound for arg. of exp 211 212 static const G4double protb = 0.7; 213 static const G4double neutb = 0.7; 214 static const G4double c = 1.25; 215 216 static const G4int numMul = 1200; 217 static const G4int numMulAn = 400; 218 static const G4int numSec = 60; 219 220 // G4int neutronCode = Neutron.getCode(); 221 G4int protonCode = Proton.getCode(); 222 223 G4int targetCode = targetParticle.getCode(); 224 // G4double incidentMass = incidentParticle.getMass(); 225 // G4double incidentEnergy = incidentParticle.getEnergy(); 226 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 227 228 static G4bool first = true; 229 static G4double protmul[numMul], protnorm[numSec]; // proton constants 230 static G4double protmulAn[numMulAn],protnormAn[numSec]; 231 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 232 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 186 { 187 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 188 static const G4double expxl = -expxu; // lower bound for arg. of exp 189 190 static const G4double protb = 0.7; 191 static const G4double neutb = 0.7; 192 static const G4double c = 1.25; 193 194 static const G4int numMul = 1200; 195 static const G4int numMulAn = 400; 196 static const G4int numSec = 60; 197 198 G4int protonCode = Proton.getCode(); 199 200 G4int targetCode = targetParticle.getCode(); 201 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 202 203 static G4bool first = true; 204 static G4double protmul[numMul], protnorm[numSec]; // proton constants 205 static G4double protmulAn[numMulAn],protnormAn[numSec]; 206 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 207 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 208 209 // misc. local variables 210 // np = number of pi+, nm = number of pi-, nz = number of pi0 211 212 G4int i, counter, nt, np, nm, nz; 238 213 239 214 if( first ) 240 { // compute normalization constants, this will only be done once215 { // compute normalization constants, this will only be done once 241 216 first = false; 242 217 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaZeroInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiSigmaZeroInelastic.cc,v 1.10 2006/06/29 20:30:08 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiSigmaZeroInelastic.cc,v 1.11 2010/11/20 04:01:33 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included is the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 46 43 #include "G4Gamma.hh" 47 44 48 G4HadFinalState * G4HEAntiSigmaZeroInelastic:: 49 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 50 { 51 G4HEVector * pv = new G4HEVector[MAXPART]; 52 const G4HadProjectile *aParticle = &aTrack; 53 G4HEVector incidentParticle(aParticle); 54 G4HEAntiLambdaInelastic theAntiLambdaInelastic; 55 theAntiLambdaInelastic.SetMaxNumberOfSecondaries(MAXPART); 56 theAntiLambdaInelastic.SetVerboseLevel(verboseLevel); 45 G4HadFinalState* 46 G4HEAntiSigmaZeroInelastic::ApplyYourself(const G4HadProjectile& aTrack, 47 G4Nucleus& targetNucleus) 48 { 49 G4HEVector* pv = new G4HEVector[MAXPART]; 50 const G4HadProjectile *aParticle = &aTrack; 51 G4HEVector incidentParticle(aParticle); 52 G4HEAntiLambdaInelastic theAntiLambdaInelastic; 53 theAntiLambdaInelastic.SetMaxNumberOfSecondaries(MAXPART); 54 theAntiLambdaInelastic.SetVerboseLevel(verboseLevel); 57 55 58 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 59 G4double pgam = G4UniformRand()*incidentTotalMomentum*0.75; 60 G4HEVector incidentAntiLambda; 61 incidentAntiLambda.SmulAndUpdate( incidentParticle, 62 (incidentTotalMomentum - pgam)/incidentTotalMomentum); 63 G4DynamicParticle * aLambda = new G4DynamicParticle(); 64 aLambda->SetDefinition(G4AntiLambda::AntiLambda()); 65 aLambda->SetMomentum(incidentAntiLambda.getMomentum()); 66 G4HadProjectile aLambdaTrack(*aLambda); 67 G4HadFinalState * result = theAntiLambdaInelastic.ApplyYourself(aLambdaTrack, targetNucleus); 68 vecLength = theAntiLambdaInelastic.GetNumberOfSecondaries(); 69 pv[vecLength] = Gamma; 70 pv[vecLength].setMomentum(incidentParticle.getMomentum()); 71 pv[vecLength].SmulAndUpdate( pv[vecLength],pgam/incidentTotalMomentum); 72 G4DynamicParticle * aPhoton = new G4DynamicParticle(); 73 aPhoton->SetDefinition(G4Gamma::Gamma()); 74 aPhoton->SetMomentum(pv[vecLength].getMomentum()); 75 result->AddSecondary(aPhoton); 76 delete [] pv; 77 return result; 78 } 79 56 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 57 G4double pgam = G4UniformRand()*incidentTotalMomentum*0.75; 58 G4HEVector incidentAntiLambda; 59 incidentAntiLambda.SmulAndUpdate(incidentParticle, 60 (incidentTotalMomentum - pgam)/incidentTotalMomentum); 61 G4DynamicParticle* aLambda = new G4DynamicParticle(); 62 aLambda->SetDefinition(G4AntiLambda::AntiLambda()); 63 aLambda->SetMomentum(incidentAntiLambda.getMomentum()); 64 G4HadProjectile aLambdaTrack(*aLambda); 65 G4HadFinalState* result = theAntiLambdaInelastic.ApplyYourself(aLambdaTrack, targetNucleus); 66 vecLength = theAntiLambdaInelastic.GetNumberOfSecondaries(); 67 pv[vecLength] = Gamma; 68 pv[vecLength].setMomentum(incidentParticle.getMomentum()); 69 pv[vecLength].SmulAndUpdate( pv[vecLength],pgam/incidentTotalMomentum); 70 G4DynamicParticle * aPhoton = new G4DynamicParticle(); 71 aPhoton->SetDefinition(G4Gamma::Gamma()); 72 aPhoton->SetMomentum(pv[vecLength].getMomentum()); 73 result->AddSecondary(aPhoton); 74 delete [] pv; 75 return result; 76 } 80 77 81 82 83 84 85 86 87 -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiXiMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiXiMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiXiMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiXiMinusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEAntiXiMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEAntiXiMinusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEAntiXiMinusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEAntiXiMinusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEAntiXiMinusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.; 89 G4double excitationEnergyDTA = 0.; 90 91 G4double excitation = NuclearExcitation(incidentKineticEnergy, 92 atomicWeight, atomicNumber, 93 excitationEnergyGNP, 94 excitationEnergyDTA); 95 if(verboseLevel > 1) 96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 << excitationEnergyDTA << G4endl; 98 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 92 << excitationEnergyDTA << G4endl; 93 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasAntiXiMinus(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles"; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasAntiXiMinus(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 HighEnergyCascading(successful, pv, vecLength, 132 excitationEnergyGNP, excitationEnergyDTA, 133 incidentParticle, targetParticle, 134 atomicWeight, atomicNumber); 135 if (!successful) 136 HighEnergyClusterProduction(successful, pv, vecLength, 137 excitationEnergyGNP, excitationEnergyDTA, 138 incidentParticle, targetParticle, 139 atomicWeight, atomicNumber); 140 if (!successful) 141 MediumEnergyCascading(successful, pv, vecLength, 142 excitationEnergyGNP, excitationEnergyDTA, 143 incidentParticle, targetParticle, 144 atomicWeight, atomicNumber); 145 146 if (!successful) 147 MediumEnergyClusterProduction(successful, pv, vecLength, 148 excitationEnergyGNP, excitationEnergyDTA, 149 incidentParticle, targetParticle, 150 atomicWeight, atomicNumber); 151 if (!successful) 152 QuasiElasticScattering(successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 if (!successful) 157 ElasticScattering(successful, pv, vecLength, 158 incidentParticle, 159 atomicWeight, atomicNumber); 160 161 if (!successful) 162 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 163 << G4endl; 164 165 FillParticleChange(pv, vecLength); 166 delete [] pv; 167 theParticleChange.SetStatusChange(stopAndKill); 168 return &theParticleChange; 169 } 170 193 171 194 172 void 195 G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)173 G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus(G4bool& inElastic, 174 const G4double availableEnergy, 175 G4HEVector pv[], 176 G4int& vecLen, 177 const G4HEVector& incidentParticle, 178 const G4HEVector& targetParticle, 179 const G4double atomicWeight) 202 180 203 181 // AntiXi- undergoes interaction with nucleon within a nucleus. 204 182 // As in Geant3, we think that this routine has absolutely no influence 205 183 // on the whole performance of the program. Take AntiLambda instaed. 206 207 { 208 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 209 static const G4double expxl = -expxu; // lower bound for arg. of exp 210 211 static const G4double protb = 0.7; 212 static const G4double neutb = 0.7; 213 static const G4double c = 1.25; 214 215 static const G4int numMul = 1200; 216 static const G4int numMulAn = 400; 217 static const G4int numSec = 60; 218 219 // G4int neutronCode = Neutron.getCode(); 220 G4int protonCode = Proton.getCode(); 221 222 G4int targetCode = targetParticle.getCode(); 223 // G4double incidentMass = incidentParticle.getMass(); 224 // G4double incidentEnergy = incidentParticle.getEnergy(); 225 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 226 227 static G4bool first = true; 228 static G4double protmul[numMul], protnorm[numSec]; // proton constants 229 static G4double protmulAn[numMulAn],protnormAn[numSec]; 230 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 231 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 232 233 // misc. local variables 234 // np = number of pi+, nm = number of pi-, nz = number of pi0 235 236 G4int i, counter, nt, np, nm, nz; 184 { 185 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 186 static const G4double expxl = -expxu; // lower bound for arg. of exp 187 188 static const G4double protb = 0.7; 189 static const G4double neutb = 0.7; 190 static const G4double c = 1.25; 191 192 static const G4int numMul = 1200; 193 static const G4int numMulAn = 400; 194 static const G4int numSec = 60; 195 196 G4int protonCode = Proton.getCode(); 197 198 G4int targetCode = targetParticle.getCode(); 199 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 200 201 static G4bool first = true; 202 static G4double protmul[numMul], protnorm[numSec]; // proton constants 203 static G4double protmulAn[numMulAn],protnormAn[numSec]; 204 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 205 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 206 207 // misc. local variables 208 // np = number of pi+, nm = number of pi-, nz = number of pi0 209 210 G4int i, counter, nt, np, nm, nz; 237 211 238 212 if( first ) 239 { // compute normalization constants, this will only be done once213 { // compute normalization constants, this will only be done once 240 214 first = false; 241 215 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiZeroInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEAntiXiZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEAntiXiZeroInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEAntiXiZeroInelastic.hh" 46 43 47 G4HadFinalState * G4HEAntiXiZeroInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEAntiXiZeroInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEAntiXiZeroInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEAntiXiZeroInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEAntiXiZeroInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEAntiXiZeroInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 80 75 81 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,82 atomicWeight, atomicNumber);83 if(verboseLevel > 1)84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt((incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasAntiXiZero(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 152 HighEnergyCascading( successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 if (!successful) 157 HighEnergyClusterProduction( successful, pv, vecLength, 158 excitationEnergyGNP, excitationEnergyDTA, 159 incidentParticle, targetParticle, 160 atomicWeight, atomicNumber); 161 if (!successful) 162 MediumEnergyCascading( successful, pv, vecLength, 163 excitationEnergyGNP, excitationEnergyDTA, 164 incidentParticle, targetParticle, 165 atomicWeight, atomicNumber); 166 167 if (!successful) 168 MediumEnergyClusterProduction( successful, pv, vecLength, 169 excitationEnergyGNP, excitationEnergyDTA, 170 incidentParticle, targetParticle, 171 atomicWeight, atomicNumber); 172 if (!successful) 173 QuasiElasticScattering( successful, pv, vecLength, 174 excitationEnergyGNP, excitationEnergyDTA, 175 incidentParticle, targetParticle, 176 atomicWeight, atomicNumber); 177 } 178 if (!successful) 179 { 180 ElasticScattering( successful, pv, vecLength, 181 incidentParticle, 182 atomicWeight, atomicNumber); 183 } 184 185 if (!successful) 186 { 187 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 188 } 189 FillParticleChange(pv, vecLength); 190 delete [] pv; 191 theParticleChange.SetStatusChange(stopAndKill); 192 return & theParticleChange; 193 } 121 FirstIntInCasAntiXiZero(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 if (!successful) 162 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 163 << G4endl; 164 165 FillParticleChange(pv, vecLength); 166 delete [] pv; 167 theParticleChange.SetStatusChange(stopAndKill); 168 return &theParticleChange; 169 } 170 194 171 195 172 void 196 G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,197 const G4double availableEnergy,198 G4HEVector pv[],199 G4int &vecLen,200 G4HEVectorincidentParticle,201 G4HEVectortargetParticle,202 const G4double atomicWeight)173 G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero(G4bool& inElastic, 174 const G4double availableEnergy, 175 G4HEVector pv[], 176 G4int& vecLen, 177 const G4HEVector& incidentParticle, 178 const G4HEVector& targetParticle, 179 const G4double atomicWeight) 203 180 204 181 // AntiXi0 undergoes interaction with nucleon within a nucleus. … … 206 183 // on the whole performance of the program. Take AntiLambda instaed. 207 184 // ( decay Xi0 -> L Pi > 99 % ) 208 { 209 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 210 static const G4double expxl = -expxu; // lower bound for arg. of exp 211 212 static const G4double protb = 0.7; 213 static const G4double neutb = 0.7; 214 static const G4double c = 1.25; 215 216 static const G4int numMul = 1200; 217 static const G4int numMulAn = 400; 218 static const G4int numSec = 60; 219 220 // G4int neutronCode = Neutron.getCode(); 221 G4int protonCode = Proton.getCode(); 222 223 G4int targetCode = targetParticle.getCode(); 224 // G4double incidentMass = incidentParticle.getMass(); 225 // G4double incidentEnergy = incidentParticle.getEnergy(); 226 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 227 228 static G4bool first = true; 229 static G4double protmul[numMul], protnorm[numSec]; // proton constants 230 static G4double protmulAn[numMulAn],protnormAn[numSec]; 231 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 232 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 185 { 186 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 187 static const G4double expxl = -expxu; // lower bound for arg. of exp 188 189 static const G4double protb = 0.7; 190 static const G4double neutb = 0.7; 191 static const G4double c = 1.25; 192 193 static const G4int numMul = 1200; 194 static const G4int numMulAn = 400; 195 static const G4int numSec = 60; 196 197 G4int protonCode = Proton.getCode(); 198 199 G4int targetCode = targetParticle.getCode(); 200 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 201 202 static G4bool first = true; 203 static G4double protmul[numMul], protnorm[numSec]; // proton constants 204 static G4double protmulAn[numMulAn],protnormAn[numSec]; 205 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 206 static G4double neutmulAn[numMulAn],neutnormAn[numSec]; 207 208 // misc. local variables 209 // np = number of pi+, nm = number of pi-, nz = number of pi0 210 211 G4int i, counter, nt, np, nm, nz; 238 212 239 213 if( first ) 240 { // compute normalization constants, this will only be done once214 { // compute normalization constants, this will only be done once 241 215 first = false; 242 216 for( i=0; i<numMul ; i++ ) protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEInelastic.cc
r962 r1347 25 25 // 26 26 // 27 //28 27 29 28 #include "globals.hh" … … 55 54 #include "G4Alpha.hh" 56 55 57 void G4HEInelastic::FillParticleChange(G4HEVector pv[], G4int aVecLength)56 void G4HEInelastic::FillParticleChange(G4HEVector pv[], G4int aVecLength) 58 57 { 59 58 theParticleChange.Clear(); … … 77 76 aParticle->SetMomentum(pv[i].getMomentum()*GeV); 78 77 theParticleChange.AddSecondary(aParticle); 79 G4ParticleDefinition * dummy = G4KaonZero::KaonZero();80 dummy = G4AntiKaonZero::AntiKaonZero();81 78 } 82 79 } 83 80 84 void 85 G4HEInelastic::SetParticles() 86 { 87 PionPlus.setDefinition("PionPlus"); 88 PionZero.setDefinition("PionZero"); 89 PionMinus.setDefinition("PionMinus"); 90 KaonPlus.setDefinition("KaonPlus"); 91 KaonZero.setDefinition("KaonZero"); 92 AntiKaonZero.setDefinition("AntiKaonZero"); 93 KaonMinus.setDefinition("KaonMinus"); 94 KaonZeroShort.setDefinition("KaonZeroShort"); 95 KaonZeroLong.setDefinition("KaonZeroLong"); 96 Proton.setDefinition("Proton"); 97 AntiProton.setDefinition("AntiProton"); 98 Neutron.setDefinition("Neutron"); 99 AntiNeutron.setDefinition("AntiNeutron"); 100 Lambda.setDefinition("Lambda"); 101 AntiLambda.setDefinition("AntiLambda"); 102 SigmaPlus.setDefinition("SigmaPlus"); 103 SigmaZero.setDefinition("SigmaZero"); 104 SigmaMinus.setDefinition("SigmaMinus"); 105 AntiSigmaPlus.setDefinition("AntiSigmaPlus"); 106 AntiSigmaZero.setDefinition("AntiSigmaZero"); 107 AntiSigmaMinus.setDefinition("AntiSigmaMinus"); 108 XiZero.setDefinition("XiZero"); 109 XiMinus.setDefinition("XiMinus"); 110 AntiXiZero.setDefinition("AntiXiZero"); 111 AntiXiMinus.setDefinition("AntiXiMinus"); 112 OmegaMinus.setDefinition("OmegaMinus"); 113 AntiOmegaMinus.setDefinition("AntiOmegaMinus"); 114 Deuteron.setDefinition("Deuteron"); 115 Triton.setDefinition("Triton"); 116 Alpha.setDefinition("Alpha"); 117 Gamma.setDefinition("Gamma"); 118 return; 119 } 81 void G4HEInelastic::SetParticles() 82 { 83 PionPlus.setDefinition("PionPlus"); 84 PionZero.setDefinition("PionZero"); 85 PionMinus.setDefinition("PionMinus"); 86 KaonPlus.setDefinition("KaonPlus"); 87 KaonZero.setDefinition("KaonZero"); 88 AntiKaonZero.setDefinition("AntiKaonZero"); 89 KaonMinus.setDefinition("KaonMinus"); 90 KaonZeroShort.setDefinition("KaonZeroShort"); 91 KaonZeroLong.setDefinition("KaonZeroLong"); 92 Proton.setDefinition("Proton"); 93 AntiProton.setDefinition("AntiProton"); 94 Neutron.setDefinition("Neutron"); 95 AntiNeutron.setDefinition("AntiNeutron"); 96 Lambda.setDefinition("Lambda"); 97 AntiLambda.setDefinition("AntiLambda"); 98 SigmaPlus.setDefinition("SigmaPlus"); 99 SigmaZero.setDefinition("SigmaZero"); 100 SigmaMinus.setDefinition("SigmaMinus"); 101 AntiSigmaPlus.setDefinition("AntiSigmaPlus"); 102 AntiSigmaZero.setDefinition("AntiSigmaZero"); 103 AntiSigmaMinus.setDefinition("AntiSigmaMinus"); 104 XiZero.setDefinition("XiZero"); 105 XiMinus.setDefinition("XiMinus"); 106 AntiXiZero.setDefinition("AntiXiZero"); 107 AntiXiMinus.setDefinition("AntiXiMinus"); 108 OmegaMinus.setDefinition("OmegaMinus"); 109 AntiOmegaMinus.setDefinition("AntiOmegaMinus"); 110 Deuteron.setDefinition("Deuteron"); 111 Triton.setDefinition("Triton"); 112 Alpha.setDefinition("Alpha"); 113 Gamma.setDefinition("Gamma"); 114 return; 115 } 120 116 121 G4double 122 G4HEInelastic::Amin(G4double a, G4double b) 123 {124 G4double c = a;125 if(b < a) c = b;126 return c; 127 } 128 G4double 129 G4HEInelastic::Amax(G4double a, G4double b) 130 {131 G4double c = a;132 if(b > a) c = b;133 return c; 134 }117 G4double G4HEInelastic::Amin(G4double a, G4double b) 118 { 119 G4double c = a; 120 if(b < a) c = b; 121 return c; 122 } 123 124 G4double G4HEInelastic::Amax(G4double a, G4double b) 125 { 126 G4double c = a; 127 if(b > a) c = b; 128 return c; 129 } 130 135 131 G4int 136 132 G4HEInelastic::Imin(G4int a, G4int b) … … 338 334 G4HEVector pv[], 339 335 G4int &vecLen, 340 G4HEVectorincidentParticle,341 G4HEVector targetParticle)336 const G4HEVector& incidentParticle, 337 const G4HEVector& targetParticle) 342 338 343 339 // Choose charge combinations K+ K-, K+ K0, K0 K0, K0 K-, … … 602 598 603 599 void 604 G4HEInelastic::HighEnergyCascading(G4bool &successful,600 G4HEInelastic::HighEnergyCascading(G4bool& successful, 605 601 G4HEVector pv[], 606 G4int &vecLen,607 G4double &excitationEnergyGNP,608 G4double &excitationEnergyDTA,609 G4HEVectorincidentParticle,610 G4HEVectortargetParticle,602 G4int& vecLen, 603 G4double& excitationEnergyGNP, 604 G4double& excitationEnergyDTA, 605 const G4HEVector& incidentParticle, 606 const G4HEVector& targetParticle, 611 607 G4double atomicWeight, 612 608 G4double atomicNumber) 613 { 614 // 615 // The multiplicity of particles produced in the first interaction has been 616 // calculated in one of the FirstIntInNuc.... routines. The nuclear 617 // cascading particles are parameterized from experimental data. 618 // A simple single variable description E D3S/DP3= F(Q) with 619 // Q^2 = (M*X)^2 + PT^2 is used. Final state kinematics are produced 620 // by an FF-type iterative cascade method. 621 // Nuclear evaporation particles are added at the end of the routine. 622 623 // All quantities in the G4HEVector Array pv are in GeV- units. 624 // The method is a copy of MediumEnergyCascading with some special tuning 625 // for high energy interactions. 626 627 628 G4int protonCode = Proton.getCode(); 629 G4double protonMass = Proton.getMass(); 630 G4int neutronCode = Neutron.getCode(); 631 G4double neutronMass = Neutron.getMass(); 632 G4double kaonPlusMass = KaonPlus.getMass(); 633 G4int kaonPlusCode = KaonPlus.getCode(); 634 G4int kaonMinusCode = KaonMinus.getCode(); 635 G4int kaonZeroSCode = KaonZeroShort.getCode(); 636 G4int kaonZeroLCode = KaonZeroLong.getCode(); 637 G4int kaonZeroCode = KaonZero.getCode(); 638 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 639 G4int pionPlusCode = PionPlus.getCode(); 640 G4int pionZeroCode = PionZero.getCode(); 641 G4int pionMinusCode = PionMinus.getCode(); 642 G4String mesonType = PionPlus.getType(); 643 G4String baryonType = Proton.getType(); 644 G4String antiBaryonType= AntiProton.getType(); 645 646 G4double targetMass = targetParticle.getMass(); 647 648 G4int incidentCode = incidentParticle.getCode(); 649 G4double incidentMass = incidentParticle.getMass(); 650 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 651 G4double incidentEnergy = incidentParticle.getEnergy(); 652 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 653 G4String incidentType = incidentParticle.getType(); 609 { 610 // The multiplicity of particles produced in the first interaction has been 611 // calculated in one of the FirstIntInNuc.... routines. The nuclear 612 // cascading particles are parameterized from experimental data. 613 // A simple single variable description E D3S/DP3= F(Q) with 614 // Q^2 = (M*X)^2 + PT^2 is used. Final state kinematics are produced 615 // by an FF-type iterative cascade method. 616 // Nuclear evaporation particles are added at the end of the routine. 617 618 // All quantities in the G4HEVector Array pv are in GeV- units. 619 // The method is a copy of MediumEnergyCascading with some special tuning 620 // for high energy interactions. 621 622 G4int protonCode = Proton.getCode(); 623 G4double protonMass = Proton.getMass(); 624 G4int neutronCode = Neutron.getCode(); 625 G4double neutronMass = Neutron.getMass(); 626 G4double kaonPlusMass = KaonPlus.getMass(); 627 G4int kaonPlusCode = KaonPlus.getCode(); 628 G4int kaonMinusCode = KaonMinus.getCode(); 629 G4int kaonZeroSCode = KaonZeroShort.getCode(); 630 G4int kaonZeroLCode = KaonZeroLong.getCode(); 631 G4int kaonZeroCode = KaonZero.getCode(); 632 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 633 G4int pionPlusCode = PionPlus.getCode(); 634 G4int pionZeroCode = PionZero.getCode(); 635 G4int pionMinusCode = PionMinus.getCode(); 636 G4String mesonType = PionPlus.getType(); 637 G4String baryonType = Proton.getType(); 638 G4String antiBaryonType = AntiProton.getType(); 639 640 G4double targetMass = targetParticle.getMass(); 641 642 G4int incidentCode = incidentParticle.getCode(); 643 G4double incidentMass = incidentParticle.getMass(); 644 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 645 G4double incidentEnergy = incidentParticle.getEnergy(); 646 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 647 G4String incidentType = incidentParticle.getType(); 654 648 // G4double incidentTOF = incidentParticle.getTOF(); 655 G4double incidentTOF= 0.;656 657 // some local variables658 659 G4int i, j, l;660 661 if (verboseLevel > 1)662 G4cout << " G4HEInelastic::HighEnergyCascading "<< G4endl;663 successful = false;664 if(incidentTotalMomentum < 25. + G4UniformRand()*25.) return;649 G4double incidentTOF = 0.; 650 651 // some local variables 652 653 G4int i, j, l; 654 655 if (verboseLevel > 1) G4cout << " G4HEInelastic::HighEnergyCascading " 656 << G4endl; 657 successful = false; 658 if (incidentTotalMomentum < 25. + G4UniformRand()*25.) return; 665 659 666 // define annihilation channels.660 // define annihilation channels. 667 661 668 G4bool annihilation = false; 669 if (incidentCode < 0 && incidentType == antiBaryonType && 670 pv[0].getType() != antiBaryonType && 671 pv[1].getType() != antiBaryonType ) 672 { 673 annihilation = true; 674 } 675 676 677 678 G4double twsup[] = { 1., 1., 0.7, 0.5, 0.3, 0.2, 0.1, 0.0 }; 679 680 if( annihilation ) goto start; 681 if( vecLen >= 8) goto start; 682 if( incidentKineticEnergy < 1.) return; 683 if( ( incidentCode == kaonPlusCode || incidentCode == kaonMinusCode 684 || incidentCode == kaonZeroCode || incidentCode == antiKaonZeroCode 685 || incidentCode == kaonZeroSCode || incidentCode == kaonZeroLCode ) 686 && ( G4UniformRand() < 0.5) ) goto start; 687 if( G4UniformRand() > twsup[vecLen-1]) goto start; 688 if( incidentKineticEnergy > (G4UniformRand()*200 + 50.) ) goto start; 689 return; 690 691 start: 692 693 if (annihilation) 694 { // do some corrections of incident particle kinematic 695 G4double ekcor = Amax( 1., 1./incidentKineticEnergy); 696 incidentKineticEnergy = 2*targetMass + incidentKineticEnergy*(1.+ekcor/atomicWeight); 697 G4double excitation = NuclearExcitation(incidentKineticEnergy, 698 atomicWeight, 699 atomicNumber, 700 excitationEnergyGNP, 701 excitationEnergyDTA); 702 incidentKineticEnergy -= excitation; 703 if (incidentKineticEnergy < excitationEnergyDTA) incidentKineticEnergy = 0.; 704 incidentEnergy = incidentKineticEnergy + incidentMass; 705 incidentTotalMomentum = 706 std::sqrt( Amax(0., incidentEnergy*incidentEnergy - incidentMass*incidentMass)); 707 } 662 G4bool annihilation = false; 663 if (incidentCode < 0 && incidentType == antiBaryonType && 664 pv[0].getType() != antiBaryonType && 665 pv[1].getType() != antiBaryonType) { 666 annihilation = true; 667 } 668 669 G4double twsup[] = { 1., 1., 0.7, 0.5, 0.3, 0.2, 0.1, 0.0 }; 670 671 if (annihilation) goto start; 672 if (vecLen >= 8) goto start; 673 if( incidentKineticEnergy < 1.) return; 674 if( ( incidentCode == kaonPlusCode || incidentCode == kaonMinusCode 675 || incidentCode == kaonZeroCode || incidentCode == antiKaonZeroCode 676 || incidentCode == kaonZeroSCode || incidentCode == kaonZeroLCode ) 677 && ( G4UniformRand() < 0.5) ) goto start; 678 if( G4UniformRand() > twsup[vecLen-1]) goto start; 679 if( incidentKineticEnergy > (G4UniformRand()*200 + 50.) ) goto start; 680 return; 681 682 start: 683 684 if (annihilation) { 685 // do some corrections of incident particle kinematic 686 G4double ekcor = Amax( 1., 1./incidentKineticEnergy); 687 incidentKineticEnergy = 2*targetMass + incidentKineticEnergy*(1.+ekcor/atomicWeight); 688 G4double excitation = NuclearExcitation(incidentKineticEnergy, 689 atomicWeight, 690 atomicNumber, 691 excitationEnergyGNP, 692 excitationEnergyDTA); 693 incidentKineticEnergy -= excitation; 694 if (incidentKineticEnergy < excitationEnergyDTA) incidentKineticEnergy = 0.; 695 incidentEnergy = incidentKineticEnergy + incidentMass; 696 incidentTotalMomentum = 697 std::sqrt( Amax(0., incidentEnergy*incidentEnergy - incidentMass*incidentMass)); 698 } 708 699 709 G4HEVector pTemp; 710 for (i = 2; i<vecLen; i++) 711 { 712 j = Imin( vecLen-1, (G4int)(2. + G4UniformRand()*(vecLen - 2))); 713 pTemp = pv[j]; 714 pv[j] = pv[i]; 715 pv[i] = pTemp; 716 } 717 // randomize the first two leading particles 718 // for kaon induced reactions only 719 // (need from experimental data) 700 G4HEVector pTemp; 701 for (i = 2; i < vecLen; i++) { 702 j = Imin( vecLen-1, (G4int)(2. + G4UniformRand()*(vecLen - 2))); 703 pTemp = pv[j]; 704 pv[j] = pv[i]; 705 pv[i] = pTemp; 706 } 707 // randomize the first two leading particles 708 // for kaon induced reactions only 709 // (need from experimental data) 720 710 721 711 if( (incidentCode==kaonPlusCode || incidentCode==kaonMinusCode || … … 760 750 } 761 751 762 // Distribute particles in forward and backward hemispheres in center 763 // of mass system. Incident particle goes in forward hemisphere. 764 765 G4HEVector pvI = incidentParticle; // for the incident particle 766 pvI.setSide( 1 ); 767 768 G4HEVector pvT = targetParticle; // for the target particle 769 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 770 pvT.setSide( -1 ); 771 pvT.setTOF( -1.); 772 773 774 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass)+sqr(targetMass) 752 // Distribute particles in forward and backward hemispheres in center 753 // of mass system. Incident particle goes in forward hemisphere. 754 755 G4HEVector pvI = incidentParticle; // for the incident particle 756 pvI.setSide( 1 ); 757 758 G4HEVector pvT = targetParticle; // for the target particle 759 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 760 pvT.setSide( -1 ); 761 pvT.setTOF( -1.); 762 763 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass)+sqr(targetMass) 775 764 +2.0*targetMass*incidentEnergy ); 776 // G4double availableEnergy = centerOfMassEnergy - ( targetMass + incidentMass ); 777 778 G4double tavai1 = centerOfMassEnergy/2.0 - incidentMass; 779 G4double tavai2 = centerOfMassEnergy/2.0 - targetMass; 780 781 // define G4HEVector- array for kinematic manipulations, 782 // with a one by one correspondence to the pv-Array. 783 784 G4int ntb = 1; 785 for( i=0; i < vecLen; i++ ) 786 { 787 if (i == 0) pv[i].setSide( 1 ); 788 else if (i == 1) pv[i].setSide( -1 ); 789 else 790 { if( G4UniformRand() < 0.5 ) 791 { 792 pv[i].setSide( -1 ); 793 ntb++; 794 } 795 else 796 pv[i].setSide( 1 ); 797 } 798 pv[i].setTOF( incidentTOF); 799 } 800 G4double tb = 2. * ntb; 801 if (centerOfMassEnergy < (2. + G4UniformRand())) 802 tb = (2. * ntb + vecLen)/2.; 803 804 if (verboseLevel > 1) 805 { G4cout << " pv Vector after Randomization " << vecLen << G4endl; 806 pvI.Print(-1); 807 pvT.Print(-1); 808 for (i=0; i < vecLen ; i++) pv[i].Print(i); 809 } 810 811 // Add particles from intranuclear cascade 812 // nuclearCascadeCount = number of new secondaries produced by nuclear 813 // cascading. 814 // extraCount = number of nucleons within these new secondaries 765 // G4double availableEnergy = centerOfMassEnergy - ( targetMass + incidentMass ); 766 767 G4double tavai1 = centerOfMassEnergy/2.0 - incidentMass; 768 G4double tavai2 = centerOfMassEnergy/2.0 - targetMass; 769 770 // define G4HEVector- array for kinematic manipulations, 771 // with a one by one correspondence to the pv-Array. 772 773 G4int ntb = 1; 774 for (i = 0; i < vecLen; i++) { 775 if (i == 0) pv[i].setSide(1); 776 else if (i == 1) pv[i].setSide(-1); 777 else { 778 if (G4UniformRand() < 0.5) { 779 pv[i].setSide(-1); 780 ntb++; 781 } else { 782 pv[i].setSide(1); 783 } 784 } 785 pv[i].setTOF(incidentTOF); 786 } 787 788 G4double tb = 2. * ntb; 789 if (centerOfMassEnergy < (2. + G4UniformRand())) 790 tb = (2. * ntb + vecLen)/2.; 791 792 if (verboseLevel > 1) { 793 G4cout << " pv Vector after Randomization " << vecLen << G4endl; 794 pvI.Print(-1); 795 pvT.Print(-1); 796 for (i = 0; i < vecLen; i++) pv[i].Print(i); 797 } 798 799 // Add particles from intranuclear cascade 800 // nuclearCascadeCount = number of new secondaries produced by nuclear 801 // cascading. 802 // extraCount = number of nucleons within these new secondaries 815 803 816 804 G4double s, xtarg, ran; … … 928 916 } 929 917 930 // assume conservation of kinetic energy931 // in forward & backward hemispheres932 933 G4int is, iskip, iavai1;934 if(vecLen <= 1) return;935 936 tavai1 = centerOfMassEnergy/2.;937 iavai1 = 0;918 // assume conservation of kinetic energy 919 // in forward & backward hemispheres 920 921 G4int is, iskip, iavai1; 922 if (vecLen <= 1) return; 923 924 tavai1 = centerOfMassEnergy/2.; 925 iavai1 = 0; 938 926 939 for (i = 0; i < vecLen; i++)927 for (i = 0; i < vecLen; i++) 940 928 { 941 929 if (pv[i].getSide() > 0) … … 945 933 } 946 934 } 947 if ( iavai1 == 0) return; 948 949 while( tavai1 <= 0.0 ) 950 { // must eliminate a particle from the forward side 951 iskip = G4int(G4UniformRand()*iavai1) + 1; 952 is = 0; 953 for( i=vecLen-1; i>=0; i-- ) 954 { 955 if( pv[i].getSide() > 0 ) 956 { 957 if (++is == iskip) 958 { 959 tavai1 += pv[i].getMass(); 960 iavai1--; 961 if ( i != vecLen-1) 962 { 963 for( j=i; j<vecLen; j++ ) 964 { 965 pv[j] = pv[j+1]; 966 } 967 } 968 if( --vecLen == 0 ) return; // all the secondaries except of the 969 break; // --+ 970 } // | 971 } // v 972 } // break goes down to here 973 } // to the end of the for- loop. 974 975 976 tavai2 = (targ+1)*centerOfMassEnergy/2.; 977 G4int iavai2 = 0; 935 if ( iavai1 == 0) return; 936 937 while (tavai1 <= 0.0) { 938 // must eliminate a particle from the forward side 939 iskip = G4int(G4UniformRand()*iavai1) + 1; 940 is = 0; 941 for (i = vecLen-1; i >= 0; i--) { 942 if (pv[i].getSide() > 0) { 943 if (++is == iskip) { 944 tavai1 += pv[i].getMass(); 945 iavai1--; 946 if (i != vecLen-1) { 947 for (j = i; j < vecLen; j++) pv[j] = pv[j+1]; 948 } 949 if (--vecLen == 0) return; // all the secondaries except the 950 break; // --+ 951 } // | 952 } // v 953 } // break goes down to here 954 } // to the end of the for- loop. 955 956 tavai2 = (targ+1)*centerOfMassEnergy/2.; 957 G4int iavai2 = 0; 978 958 979 959 for (i = 0; i < vecLen; i++) … … 1014 994 } 1015 995 1016 if (verboseLevel > 1) 1017 { G4cout << " pv Vector after Energy checks " 1018 << vecLen << " " << tavai1 << " " << iavai1 << " " << tavai2 1019 << " " << iavai2 << " " << ntarg << G4endl; 1020 pvI.Print(-1); 1021 pvT.Print(-1); 1022 for (i=0; i < vecLen ; i++) pv[i].Print(i); 1023 } 1024 1025 // define some vectors for Lorentz transformations 1026 1027 G4HEVector* pvmx = new G4HEVector [10]; 1028 1029 pvmx[0].setMass( incidentMass ); 1030 pvmx[0].setMomentumAndUpdate( 0.0, 0.0, incidentTotalMomentum ); 1031 pvmx[1].setMass( protonMass); 1032 pvmx[1].setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 1033 pvmx[3].setMass( protonMass*(1+targ)); 1034 pvmx[3].setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 1035 pvmx[4].setZero(); 1036 pvmx[5].setZero(); 1037 pvmx[7].setZero(); 1038 pvmx[8].setZero(); 1039 pvmx[8].setMomentum( 1.0, 0.0 ); 1040 pvmx[2].Add( pvmx[0], pvmx[1] ); 1041 pvmx[3].Add( pvmx[3], pvmx[0] ); 1042 pvmx[0].Lor( pvmx[0], pvmx[2] ); 1043 pvmx[1].Lor( pvmx[1], pvmx[2] ); 1044 1045 if (verboseLevel > 1) 1046 { G4cout << " General Vectors after Definition " << G4endl; 1047 for (i=0; i<10; i++) pvmx[i].Print(i); 1048 } 1049 1050 // Main loop for 4-momentum generation - see Pitha-report (Aachen) 1051 // for a detailed description of the method. 1052 // Process the secondary particles in reverse order. 1053 1054 G4double dndl[20]; 1055 G4double binl[20]; 1056 G4double pvMass(0), pvEnergy(0); 1057 G4int pvCode; 1058 G4double aspar, pt, phi, et, xval; 1059 G4double ekin = 0.; 1060 G4double ekin1 = 0.; 1061 G4double ekin2 = 0.; 1062 G4int npg = 0; 1063 G4double rmg0 = 0.; 1064 G4int targ1 = 0; // No fragmentation model for nucleons from 1065 phi = G4UniformRand()*twopi; 1066 for( i=vecLen-1; i>=0; i-- ) // the intranuclear cascade. Mark them with 1067 { // -3 and leave the loop 996 if (verboseLevel > 1) { 997 G4cout << " pv Vector after Energy checks " 998 << vecLen << " " << tavai1 << " " << iavai1 << " " << tavai2 999 << " " << iavai2 << " " << ntarg << G4endl; 1000 pvI.Print(-1); 1001 pvT.Print(-1); 1002 for (i=0; i < vecLen ; i++) pv[i].Print(i); 1003 } 1004 1005 // define some vectors for Lorentz transformations 1006 1007 G4HEVector* pvmx = new G4HEVector [10]; 1008 1009 pvmx[0].setMass( incidentMass ); 1010 pvmx[0].setMomentumAndUpdate( 0.0, 0.0, incidentTotalMomentum ); 1011 pvmx[1].setMass( protonMass); 1012 pvmx[1].setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 1013 pvmx[3].setMass( protonMass*(1+targ)); 1014 pvmx[3].setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 1015 pvmx[4].setZero(); 1016 pvmx[5].setZero(); 1017 pvmx[7].setZero(); 1018 pvmx[8].setZero(); 1019 pvmx[8].setMomentum( 1.0, 0.0 ); 1020 pvmx[2].Add( pvmx[0], pvmx[1] ); 1021 pvmx[3].Add( pvmx[3], pvmx[0] ); 1022 pvmx[0].Lor( pvmx[0], pvmx[2] ); 1023 pvmx[1].Lor( pvmx[1], pvmx[2] ); 1024 1025 if (verboseLevel > 1) { 1026 G4cout << " General Vectors after Definition " << G4endl; 1027 for (i=0; i<10; i++) pvmx[i].Print(i); 1028 } 1029 1030 // Main loop for 4-momentum generation - see Pitha-report (Aachen) 1031 // for a detailed description of the method. 1032 // Process the secondary particles in reverse order. 1033 1034 G4double dndl[20]; 1035 G4double binl[20]; 1036 G4double pvMass(0), pvEnergy(0); 1037 G4int pvCode; 1038 G4double aspar, pt, phi, et, xval; 1039 G4double ekin = 0.; 1040 G4double ekin1 = 0.; 1041 G4double ekin2 = 0.; 1042 G4int npg = 0; 1043 G4double rmg0 = 0.; 1044 G4int targ1 = 0; // No fragmentation model for nucleons from 1045 phi = G4UniformRand()*twopi; 1046 1047 for (i = vecLen-1; i >= 0; i--) { 1048 // Intranuclear cascade: mark them with -3 and leave the loop 1068 1049 if( i == 1) 1069 1050 { … … 1277 1258 } // closes outer iteration 1278 1259 1279 if( eliminateThisParticle ) // not enough energy, 1280 { // eliminate this particle 1281 if (verboseLevel > 1) { 1282 G4cout << " Eliminate particle index " << i << G4endl; 1283 pv[i].Print(i); 1284 } 1285 if(i != vecLen-1) 1286 { 1287 for( j=i; j < vecLen-1; j++ ) 1288 { // shift down 1289 pv[j] = pv[j+1]; 1290 } 1291 } 1292 vecLen--; 1293 if(vecLen < 2) return; 1294 i++; 1295 pvmx[6].Add( pvmx[4], pvmx[5] ); 1296 pvmx[6].setMomentum( 0.0 ); // set z-momentum 1297 } 1298 } // closes main for loop 1299 if (verboseLevel > 1) 1300 { G4cout << " pv Vector after lambda fragmentation " << vecLen << G4endl; 1301 pvI.Print(-1); 1302 pvT.Print(-1); 1303 for (i=0; i < vecLen ; i++) pv[i].Print(i); 1304 for (i=0; i < 10; i++) pvmx[i].Print(i); 1305 } 1306 1307 1308 // Backward nucleons produced with a cluster model 1309 1310 G4double gpar[] = {2.6, 2.6, 1.80, 1.30, 1.20}; 1311 G4double cpar[] = {0.6, 0.6, 0.35, 0.15, 0.10}; 1260 if (eliminateThisParticle) { 1261 // Not enough energy - eliminate this particle 1262 if (verboseLevel > 1) { 1263 G4cout << " Eliminate particle index " << i << G4endl; 1264 pv[i].Print(i); 1265 } 1266 if (i != vecLen-1) { 1267 // shift down 1268 for (j = i; j < vecLen-1; j++) pv[j] = pv[j+1]; 1269 } 1270 vecLen--; 1271 1272 if (vecLen < 2) { 1273 delete [] pvmx; 1274 return; 1275 } 1276 i++; 1277 pvmx[6].Add( pvmx[4], pvmx[5] ); 1278 pvmx[6].setMomentum( 0.0 ); // set z-momentum 1279 } 1280 } // closes main for loop 1281 1282 if (verboseLevel > 1) { 1283 G4cout << " pv Vector after lambda fragmentation " << vecLen << G4endl; 1284 pvI.Print(-1); 1285 pvT.Print(-1); 1286 for (i=0; i < vecLen ; i++) pv[i].Print(i); 1287 for (i=0; i < 10; i++) pvmx[i].Print(i); 1288 } 1289 1290 // Backward nucleons produced with a cluster model 1291 1292 G4double gpar[] = {2.6, 2.6, 1.80, 1.30, 1.20}; 1293 G4double cpar[] = {0.6, 0.6, 0.35, 0.15, 0.10}; 1312 1294 1313 if (npg > 0) 1314 { 1315 G4double rmg = rmg0; 1316 if (npg > 1) 1317 { 1318 G4int npg1 = npg-1; 1319 if (npg1 >4) npg1 = 4; 1320 rmg += std::pow( -std::log(1.-G4UniformRand()), cpar[npg1])/gpar[npg1]; 1321 } 1322 G4double ga = 1.2; 1323 G4double ekit1 = 0.04, ekit2 = 0.6; 1324 if(incidentKineticEnergy < 5.) 1325 { 1326 ekit1 *= sqr(incidentKineticEnergy)/25.; 1327 ekit2 *= sqr(incidentKineticEnergy)/25.; 1328 } 1329 G4double avalue = (1.-ga)/(std::pow(ekit2,1.-ga)-std::pow(ekit1,1.-ga)); 1330 for (i = 0; i < vecLen; i++) 1331 { 1332 if (pv[i].getSide() == -3) 1333 { 1334 G4double ekit = std::pow(G4UniformRand()*(1.-ga)/avalue + std::pow(ekit1,1.-ga), 1./(1.-ga) ); 1335 G4double cost = Amax(-1., Amin(1., std::log(2.23*G4UniformRand()+0.383)/0.96)); 1336 G4double sint = std::sqrt(1. - cost*cost); 1337 G4double phi = twopi*G4UniformRand(); 1338 G4double pp = std::sqrt(ekit*(ekit+2*pv[i].getMass())); 1339 pv[i].setMomentum( pp*sint*std::sin(phi), 1340 pp*sint*std::cos(phi), 1341 pp*cost ); 1342 pv[i].Lor( pv[i], pvmx[2] ); 1343 pvmx[5].Add( pvmx[5], pv[i] ); 1344 } 1345 } 1346 } 1295 if (npg > 0) { 1296 G4double rmg = rmg0; 1297 if (npg > 1) { 1298 G4int npg1 = npg-1; 1299 if (npg1 >4) npg1 = 4; 1300 rmg += std::pow( -std::log(1.-G4UniformRand()), cpar[npg1])/gpar[npg1]; 1301 } 1302 G4double ga = 1.2; 1303 G4double ekit1 = 0.04, ekit2 = 0.6; 1304 if (incidentKineticEnergy < 5.) { 1305 ekit1 *= sqr(incidentKineticEnergy)/25.; 1306 ekit2 *= sqr(incidentKineticEnergy)/25.; 1307 } 1308 G4double avalue = (1.-ga)/(std::pow(ekit2,1.-ga)-std::pow(ekit1,1.-ga)); 1309 for (i = 0; i < vecLen; i++) { 1310 if (pv[i].getSide() == -3) { 1311 G4double ekit = std::pow(G4UniformRand()*(1.-ga)/avalue + std::pow(ekit1,1.-ga), 1./(1.-ga) ); 1312 G4double cost = Amax(-1., Amin(1., std::log(2.23*G4UniformRand()+0.383)/0.96)); 1313 G4double sint = std::sqrt(1. - cost*cost); 1314 G4double phi = twopi*G4UniformRand(); 1315 G4double pp = std::sqrt(ekit*(ekit+2*pv[i].getMass())); 1316 pv[i].setMomentum(pp*sint*std::sin(phi), 1317 pp*sint*std::cos(phi), 1318 pp*cost); 1319 pv[i].Lor( pv[i], pvmx[2] ); 1320 pvmx[5].Add( pvmx[5], pv[i] ); 1321 } 1322 } 1323 } 1347 1324 1348 if (vecLen <= 2) { 1349 successful = false; 1350 return; 1351 } 1352 1353 // Lorentz transformation in lab system 1325 if (vecLen <= 2) { 1326 successful = false; 1327 delete [] pvmx; 1328 return; 1329 } 1330 1331 // Lorentz transformation in lab system 1354 1332 1355 1333 targ = 0; … … 1398 1376 } 1399 1377 1400 pvmx[3].setMass( incidentMass);1401 pvmx[3].setMomentumAndUpdate( 0.0, 0.0, incidentTotalMomentum );1402 1403 G4double ekin0 = pvmx[3].getKineticEnergy();1404 1405 pvmx[4].setMass( protonMass * targ);1406 pvmx[4].setEnergy( protonMass * targ);1407 pvmx[4].setKineticEnergy(0.);1408 pvmx[4].setMomentum(0., 0., 0.);1409 ekin = pvmx[3].getEnergy() + pvmx[4].getEnergy();1378 pvmx[3].setMass( incidentMass); 1379 pvmx[3].setMomentumAndUpdate( 0.0, 0.0, incidentTotalMomentum ); 1380 1381 G4double ekin0 = pvmx[3].getKineticEnergy(); 1382 1383 pvmx[4].setMass( protonMass * targ); 1384 pvmx[4].setEnergy( protonMass * targ); 1385 pvmx[4].setKineticEnergy(0.); 1386 pvmx[4].setMomentum(0., 0., 0.); 1387 ekin = pvmx[3].getEnergy() + pvmx[4].getEnergy(); 1410 1388 1411 1389 pvmx[5].Add( pvmx[3], pvmx[4] ); … … 1471 1449 } 1472 1450 1473 // Do some smearing in the transverse direction due to Fermi motion1451 // Do some smearing in the transverse direction due to Fermi motion 1474 1452 1475 1453 G4double ry = G4UniformRand(); … … 1491 1469 } 1492 1470 1493 // Rotate in the direction of the primary particle momentum (z-axis). 1494 // This does disturb our inclusive distributions somewhat, but it is 1495 // necessary for momentum conservation 1496 1497 // Also subtract binding energies and make some further corrections 1498 // if required 1499 1500 G4double dekin = 0.0; 1501 G4int npions = 0; 1502 G4double ek1 = 0.0; 1503 G4double alekw, xxh; 1504 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 1505 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00, 10.00}; 1506 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65, 0.70}; 1507 1508 if (verboseLevel > 1) 1509 G4cout << " Rotation in Direction of primary particle (Defs1)" << G4endl; 1510 1511 for (i = 0; i < vecLen; i++) 1512 { 1513 if(verboseLevel > 1) pv[i].Print(i); 1514 pv[i].Defs1( pv[i], pvI ); 1515 if(verboseLevel > 1) pv[i].Print(i); 1516 if (atomicWeight > 1.5) 1517 { 1518 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 1519 alekw = std::log( incidentKineticEnergy ); 1520 xxh = 1.; 1521 if(incidentCode == pionPlusCode || incidentCode == pionMinusCode) 1522 { 1523 if(pv[i].getCode() == pionZeroCode) 1524 { 1525 if(G4UniformRand() < std::log(atomicWeight)) 1526 { 1527 if (alekw > alem[0]) 1528 { 1529 for (j = 1; j < 8; j++) 1530 { 1531 if(alekw < alem[j]) break; 1532 } 1533 xxh = (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alekw 1534 + val0[j-1] - (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alem[j-1]; 1535 xxh = 1. - xxh; 1536 } 1537 } 1538 } 1539 } 1540 dekin += ekin*(1.-xxh); 1541 ekin *= xxh; 1542 pv[i].setKineticEnergyAndUpdate( ekin ); 1543 pvCode = pv[i].getCode(); 1544 if ((pvCode == pionPlusCode) || (pvCode == pionMinusCode) || (pvCode == pionZeroCode)) 1545 { 1546 npions += 1; 1547 ek1 += ekin; 1471 // Rotate in the direction of the primary particle momentum (z-axis). 1472 // This does disturb our inclusive distributions somewhat, but it is 1473 // necessary for momentum conservation 1474 1475 // Also subtract binding energies and make some further corrections 1476 // if required 1477 1478 G4double dekin = 0.0; 1479 G4int npions = 0; 1480 G4double ek1 = 0.0; 1481 G4double alekw, xxh; 1482 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 1483 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00, 10.00}; 1484 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65, 0.70}; 1485 1486 if (verboseLevel > 1) 1487 G4cout << " Rotation in Direction of primary particle (Defs1)" << G4endl; 1488 1489 for (i = 0; i < vecLen; i++) { 1490 if(verboseLevel > 1) pv[i].Print(i); 1491 pv[i].Defs1( pv[i], pvI ); 1492 if(verboseLevel > 1) pv[i].Print(i); 1493 if (atomicWeight > 1.5) { 1494 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 1495 alekw = std::log( incidentKineticEnergy ); 1496 xxh = 1.; 1497 if (incidentCode == pionPlusCode || incidentCode == pionMinusCode) { 1498 if (pv[i].getCode() == pionZeroCode) { 1499 if (G4UniformRand() < std::log(atomicWeight)) { 1500 if (alekw > alem[0]) { 1501 G4int jmax = 1; 1502 for (j = 1; j < 8; j++) { 1503 if (alekw < alem[j]) { 1504 jmax = j; 1505 break; 1548 1506 } 1549 }1550 }1551 if( (ek1 > 0.0) && (npions > 0) )1552 {1553 dekin = 1.+dekin/ek1;1554 for (i = 0; i < vecLen; i++)1555 {1556 pvCode = pv[i].getCode();1557 if((pvCode == pionPlusCode) || (pvCode == pionMinusCode) || (pvCode == pionZeroCode))1558 {1559 ekin = Amax( 1.0e-6, pv[i].getKineticEnergy() * dekin );1560 pv[i].setKineticEnergyAndUpdate( ekin );1561 1507 } 1562 } 1563 } 1564 if (verboseLevel > 1) 1565 { G4cout << " Lab-System " << ek1 << " " << npions << G4endl; 1566 incidentParticle.Print(0); 1567 targetParticle.Print(1); 1568 for (i=0; i<vecLen; i++) pv[i].Print(i); 1569 } 1570 1571 // Add black track particles 1572 // the total number of particles produced is restricted to 198 1573 // this may have influence on very high energies 1508 xxh = (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alekw 1509 + val0[jmax-1] - (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alem[jmax-1]; 1510 xxh = 1. - xxh; 1511 } 1512 } 1513 } 1514 } 1515 dekin += ekin*(1.-xxh); 1516 ekin *= xxh; 1517 pv[i].setKineticEnergyAndUpdate( ekin ); 1518 pvCode = pv[i].getCode(); 1519 if ((pvCode == pionPlusCode) || 1520 (pvCode == pionMinusCode) || 1521 (pvCode == pionZeroCode)) { 1522 npions += 1; 1523 ek1 += ekin; 1524 } 1525 } 1526 } 1527 1528 if ( (ek1 > 0.0) && (npions > 0) ) { 1529 dekin = 1.+dekin/ek1; 1530 for (i = 0; i < vecLen; i++) { 1531 pvCode = pv[i].getCode(); 1532 if ((pvCode == pionPlusCode) || 1533 (pvCode == pionMinusCode) || 1534 (pvCode == pionZeroCode)) { 1535 ekin = Amax(1.0e-6, pv[i].getKineticEnergy() * dekin); 1536 pv[i].setKineticEnergyAndUpdate( ekin ); 1537 } 1538 } 1539 } 1540 1541 if (verboseLevel > 1) { 1542 G4cout << " Lab-System " << ek1 << " " << npions << G4endl; 1543 incidentParticle.Print(0); 1544 targetParticle.Print(1); 1545 for (i = 0; i < vecLen; i++) pv[i].Print(i); 1546 } 1547 1548 // Add black track particles 1549 // the total number of particles produced is restricted to 198 1550 // this may have influence on very high energies 1574 1551 1575 1552 if (verboseLevel > 1) … … 1781 1758 } 1782 1759 1783 return;1784 }1760 return; 1761 } 1785 1762 1786 1763 void 1787 1764 G4HEInelastic::TuningOfHighEnergyCascading(G4HEVector pv[], 1788 G4int &vecLen,1789 G4HEVectorincidentParticle,1790 G4HEVectortargetParticle,1765 G4int& vecLen, 1766 const G4HEVector& incidentParticle, 1767 const G4HEVector& targetParticle, 1791 1768 G4double atomicWeight, 1792 1769 G4double atomicNumber) … … 2127 2104 2128 2105 void 2129 G4HEInelastic::HighEnergyClusterProduction(G4bool &successful,2106 G4HEInelastic::HighEnergyClusterProduction(G4bool& successful, 2130 2107 G4HEVector pv[], 2131 G4int &vecLen,2132 G4double &excitationEnergyGNP,2133 G4double &excitationEnergyDTA,2134 G4HEVectorincidentParticle,2135 G4HEVectortargetParticle,2108 G4int& vecLen, 2109 G4double& excitationEnergyGNP, 2110 G4double& excitationEnergyDTA, 2111 const G4HEVector& incidentParticle, 2112 const G4HEVector& targetParticle, 2136 2113 G4double atomicWeight, 2137 2114 G4double atomicNumber) 2138 {2115 { 2139 2116 // For low multiplicity in the first intranuclear interaction the cascading process 2140 2117 // as described in G4HEInelastic::MediumEnergyCascading does not work … … 2144 2121 // All quantities on the G4HEVector Array pv are in GeV- units. 2145 2122 2146 G4int protonCode = Proton.getCode();2147 G4double protonMass = Proton.getMass();2148 G4int neutronCode = Neutron.getCode();2149 G4double kaonPlusMass = KaonPlus.getMass();2150 G4int pionPlusCode = PionPlus.getCode();2151 G4int pionZeroCode = PionZero.getCode();2152 G4int pionMinusCode = PionMinus.getCode();2153 G4String mesonType= PionPlus.getType();2154 G4String baryonType= Proton.getType();2155 G4String antiBaryonType= AntiProton.getType();2123 G4int protonCode = Proton.getCode(); 2124 G4double protonMass = Proton.getMass(); 2125 G4int neutronCode = Neutron.getCode(); 2126 G4double kaonPlusMass = KaonPlus.getMass(); 2127 G4int pionPlusCode = PionPlus.getCode(); 2128 G4int pionZeroCode = PionZero.getCode(); 2129 G4int pionMinusCode = PionMinus.getCode(); 2130 G4String mesonType = PionPlus.getType(); 2131 G4String baryonType = Proton.getType(); 2132 G4String antiBaryonType = AntiProton.getType(); 2156 2133 2157 G4double targetMass= targetParticle.getMass();2134 G4double targetMass = targetParticle.getMass(); 2158 2135 2159 2136 G4int incidentCode = incidentParticle.getCode(); … … 2166 2143 G4double incidentTOF = 0.; 2167 2144 2168 // some local variables 2169 2170 G4int i, j; 2171 2172 if(verboseLevel > 1) G4cout << " G4HEInelastic::HighEnergyClusterProduction " << G4endl; 2173 2174 successful = false; 2175 if(incidentTotalMomentum < 25. + G4UniformRand()*25.) return; 2176 2177 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass) + sqr(targetMass) 2178 +2.*targetMass*incidentEnergy); 2179 2180 G4HEVector pvI = incidentParticle; // for the incident particle 2181 pvI.setSide( 1 ); 2182 2183 G4HEVector pvT = targetParticle; // for the target particle 2184 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 2185 pvT.setSide( -1 ); 2186 pvT.setTOF( -1.); 2187 // distribute particles in forward and backward 2188 // hemispheres. Note that only low multiplicity 2189 // events from FirstIntInNuc.... should go into 2190 // this routine. 2191 G4int targ = 0; 2192 G4int ifor = 0; 2193 G4int iback = 0; 2194 G4int pvCode; 2195 G4double pvMass, pvEnergy; 2196 2197 pv[0].setSide( 1 ); 2198 pv[1].setSide( -1 ); 2199 for(i = 0; i < vecLen; i++) 2200 { 2201 if (i > 1) 2202 { 2203 if( G4UniformRand() < 0.5) 2204 { 2205 pv[i].setSide( 1 ); 2206 if (++ifor > 18) 2207 { 2208 pv[i].setSide( -1 ); 2209 ifor--; 2210 iback++; 2211 } 2212 } 2213 else 2214 { 2215 pv[i].setSide( -1 ); 2216 if (++iback > 18) 2217 { 2218 pv[i].setSide( 1 ); 2219 ifor++; 2220 iback--; 2221 } 2222 } 2223 } 2224 2225 pvCode = pv[i].getCode(); 2226 2227 if ( ( (incidentCode == protonCode) || (incidentCode == neutronCode) 2228 || (incidentType == mesonType) ) 2229 && ( (pvCode == pionPlusCode) || (pvCode == pionMinusCode) ) 2230 && ( (G4UniformRand() < (10.-incidentTotalMomentum)/6.) ) 2231 && ( (G4UniformRand() < atomicWeight/300.) ) ) 2232 { 2233 if (G4UniformRand() > atomicNumber/atomicWeight) 2234 pv[i].setDefinition( "Neutron" ); 2235 else 2236 pv[i].setDefinition( "Proton" ); 2237 targ++; 2238 } 2239 pv[i].setTOF( incidentTOF ); 2240 } 2241 G4double tb = 2. * iback; 2242 if (centerOfMassEnergy < (2+G4UniformRand())) tb = (2.*iback + vecLen)/2.; 2243 2244 G4double nucsup[] = { 1.0, 0.7, 0.5, 0.4, 0.35, 0.3}; 2245 G4double psup[] = { 3. , 6. , 20., 50., 100.,1000.}; 2246 G4double s = centerOfMassEnergy*centerOfMassEnergy; 2247 2248 G4double xtarg = Amax(0.01, Amin(0.50, 0.312+0.2*std::log(std::log(s))+std::pow(s,1.5)/6000.) 2145 // some local variables 2146 G4int i, j; 2147 2148 if (verboseLevel > 1) 2149 G4cout << " G4HEInelastic::HighEnergyClusterProduction " << G4endl; 2150 2151 successful = false; 2152 if (incidentTotalMomentum < 25. + G4UniformRand()*25.) return; 2153 2154 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass) + sqr(targetMass) 2155 +2.*targetMass*incidentEnergy); 2156 2157 G4HEVector pvI = incidentParticle; // for the incident particle 2158 pvI.setSide(1); 2159 2160 G4HEVector pvT = targetParticle; // for the target particle 2161 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 2162 pvT.setSide( -1 ); 2163 pvT.setTOF( -1.); 2164 // distribute particles in forward and backward 2165 // hemispheres. Note that only low multiplicity 2166 // events from FirstIntInNuc.... should go into 2167 // this routine. 2168 G4int targ = 0; 2169 G4int ifor = 0; 2170 G4int iback = 0; 2171 G4int pvCode; 2172 G4double pvMass, pvEnergy; 2173 2174 pv[0].setSide(1); 2175 pv[1].setSide(-1); 2176 for (i = 0; i < vecLen; i++) { 2177 if (i > 1) { 2178 if (G4UniformRand() < 0.5) { 2179 pv[i].setSide( 1 ); 2180 if (++ifor > 18) { 2181 pv[i].setSide(-1); 2182 ifor--; 2183 iback++; 2184 } 2185 } else { 2186 pv[i].setSide( -1 ); 2187 if (++iback > 18) { 2188 pv[i].setSide(1); 2189 ifor++; 2190 iback--; 2191 } 2192 } 2193 } 2194 2195 pvCode = pv[i].getCode(); 2196 2197 if ( ( (incidentCode == protonCode) || (incidentCode == neutronCode) 2198 || (incidentType == mesonType) ) 2199 && ( (pvCode == pionPlusCode) || (pvCode == pionMinusCode) ) 2200 && ( (G4UniformRand() < (10.-incidentTotalMomentum)/6.) ) 2201 && ( (G4UniformRand() < atomicWeight/300.) ) ) { 2202 if (G4UniformRand() > atomicNumber/atomicWeight) 2203 pv[i].setDefinition("Neutron"); 2204 else 2205 pv[i].setDefinition("Proton"); 2206 targ++; 2207 } 2208 pv[i].setTOF( incidentTOF ); 2209 } 2210 2211 G4double tb = 2. * iback; 2212 if (centerOfMassEnergy < (2+G4UniformRand())) tb = (2.*iback + vecLen)/2.; 2213 2214 G4double nucsup[] = {1.0, 0.7, 0.5, 0.4, 0.35, 0.3}; 2215 G4double psup[] = {3. , 6. , 20., 50., 100.,1000.}; 2216 G4double s = centerOfMassEnergy*centerOfMassEnergy; 2217 2218 G4double xtarg = Amax(0.01, Amin(0.50, 0.312+0.2*std::log(std::log(s))+std::pow(s,1.5)/6000.) 2249 2219 * (std::pow(atomicWeight,0.33)-1.) * tb); 2250 G4int momentumBin = 0;2220 G4int momentumBin = 0; 2251 2221 while( (momentumBin < 6) && (incidentTotalMomentum > psup[momentumBin])) momentumBin++; 2252 2222 momentumBin = Imin(5, momentumBin); … … 2729 2699 } 2730 2700 2731 // Do some smearing in the transverse direction due to Fermi motion 2732 2733 G4double ry = G4UniformRand(); 2734 G4double rz = G4UniformRand(); 2735 G4double rx = twopi*rz; 2736 G4double a1 = std::sqrt(-2.0*std::log(ry)); 2737 G4double rantarg1 = a1*std::cos(rx)*0.02*targ/G4double(vecLen); 2738 G4double rantarg2 = a1*std::sin(rx)*0.02*targ/G4double(vecLen); 2739 2740 for (i = 0; i < vecLen; i++) 2741 pv[i].setMomentum( pv[i].getMomentum().x()+rantarg1, 2742 pv[i].getMomentum().y()+rantarg2 ); 2743 2744 if (verboseLevel > 1) { 2745 pvmx[7].setZero(); 2746 for (i = 0; i < vecLen; i++) pvmx[7].Add( pvmx[7], pv[i] ); 2747 teta = pvmx[7].Ang( pvmx[4] ); 2748 G4cout << " After smearing " << teta << G4endl; 2749 } 2750 2751 // Rotate in the direction of the primary particle momentum (z-axis). 2752 // This does disturb our inclusive distributions somewhat, but it is 2753 // necessary for momentum conservation 2754 2755 // Also subtract binding energies and make some further corrections 2756 // if required 2757 2758 G4double dekin = 0.0; 2759 G4int npions = 0; 2760 G4double ek1 = 0.0; 2761 G4double alekw, xxh; 2762 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 2763 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00, 10.0}; 2764 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65, 0.70}; 2765 2766 2767 for (i = 0; i < vecLen; i++) 2768 { 2769 pv[i].Defs1( pv[i], pvI ); 2770 if (atomicWeight > 1.5) 2771 { 2772 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 2773 alekw = std::log( incidentKineticEnergy ); 2774 xxh = 1.; 2775 xxh = 1.; 2776 if(incidentCode == pionPlusCode || incidentCode == pionMinusCode) 2777 { 2778 if(pv[i].getCode() == pionZeroCode) 2779 { 2780 if(G4UniformRand() < std::log(atomicWeight)) 2781 { 2782 if (alekw > alem[0]) 2783 { 2784 for (j = 1; j < 8; j++) 2785 { 2786 if(alekw < alem[j]) break; 2787 } 2788 xxh = (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alekw 2789 + val0[j-1] - (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alem[j-1]; 2790 xxh = 1. - xxh; 2791 } 2792 } 2793 } 2794 } 2795 dekin += ekin*(1.-xxh); 2796 ekin *= xxh; 2797 pv[i].setKineticEnergyAndUpdate( ekin ); 2798 pvCode = pv[i].getCode(); 2799 if ((pvCode == pionPlusCode) || (pvCode == pionMinusCode) || (pvCode == pionZeroCode)) 2800 { 2801 npions += 1; 2802 ek1 += ekin; 2701 // Do some smearing in the transverse direction due to Fermi motion 2702 2703 G4double ry = G4UniformRand(); 2704 G4double rz = G4UniformRand(); 2705 G4double rx = twopi*rz; 2706 G4double a1 = std::sqrt(-2.0*std::log(ry)); 2707 G4double rantarg1 = a1*std::cos(rx)*0.02*targ/G4double(vecLen); 2708 G4double rantarg2 = a1*std::sin(rx)*0.02*targ/G4double(vecLen); 2709 2710 for (i = 0; i < vecLen; i++) 2711 pv[i].setMomentum(pv[i].getMomentum().x()+rantarg1, 2712 pv[i].getMomentum().y()+rantarg2); 2713 2714 if (verboseLevel > 1) { 2715 pvmx[7].setZero(); 2716 for (i = 0; i < vecLen; i++) pvmx[7].Add( pvmx[7], pv[i] ); 2717 teta = pvmx[7].Ang( pvmx[4] ); 2718 G4cout << " After smearing " << teta << G4endl; 2719 } 2720 2721 // Rotate in the direction of the primary particle momentum (z-axis). 2722 // This does disturb our inclusive distributions somewhat, but it is 2723 // necessary for momentum conservation 2724 2725 // Also subtract binding energies and make some further corrections 2726 // if required 2727 2728 G4double dekin = 0.0; 2729 G4int npions = 0; 2730 G4double ek1 = 0.0; 2731 G4double alekw, xxh; 2732 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 2733 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00, 10.0}; 2734 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65, 0.70}; 2735 2736 for (i = 0; i < vecLen; i++) { 2737 pv[i].Defs1( pv[i], pvI ); 2738 if (atomicWeight > 1.5) { 2739 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 2740 alekw = std::log( incidentKineticEnergy ); 2741 xxh = 1.; 2742 if (incidentCode == pionPlusCode || incidentCode == pionMinusCode) { 2743 if (pv[i].getCode() == pionZeroCode) { 2744 if (G4UniformRand() < std::log(atomicWeight)) { 2745 if (alekw > alem[0]) { 2746 G4int jmax = 1; 2747 for (j = 1; j < 8; j++) { 2748 if (alekw < alem[j]) { 2749 jmax = j; 2750 break; 2803 2751 } 2804 } 2805 } 2752 } 2753 xxh = (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alekw 2754 + val0[jmax-1] - (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alem[jmax-1]; 2755 xxh = 1. - xxh; 2756 } 2757 } 2758 } 2759 } 2760 dekin += ekin*(1.-xxh); 2761 ekin *= xxh; 2762 pv[i].setKineticEnergyAndUpdate( ekin ); 2763 pvCode = pv[i].getCode(); 2764 if ((pvCode == pionPlusCode) || 2765 (pvCode == pionMinusCode) || 2766 (pvCode == pionZeroCode)) { 2767 npions += 1; 2768 ek1 += ekin; 2769 } 2770 } 2771 } 2772 2806 2773 if( (ek1 > 0.0) && (npions > 0) ) 2807 2774 { … … 3003 2970 } 3004 2971 3005 successful = true;3006 delete [] pvmx;3007 delete [] tempV;3008 return;3009 }2972 successful = true; 2973 delete [] pvmx; 2974 delete [] tempV; 2975 return; 2976 } 3010 2977 3011 2978 void 3012 G4HEInelastic::MediumEnergyCascading(G4bool &successful,2979 G4HEInelastic::MediumEnergyCascading(G4bool& successful, 3013 2980 G4HEVector pv[], 3014 G4int &vecLen,3015 G4double &excitationEnergyGNP,3016 G4double &excitationEnergyDTA,3017 G4HEVectorincidentParticle,3018 G4HEVectortargetParticle,2981 G4int& vecLen, 2982 G4double& excitationEnergyGNP, 2983 G4double& excitationEnergyDTA, 2984 const G4HEVector& incidentParticle, 2985 const G4HEVector& targetParticle, 3019 2986 G4double atomicWeight, 3020 2987 G4double atomicNumber) 3021 { 3022 // 3023 // The multiplicity of particles produced in the first interaction has been 3024 // calculated in one of the FirstIntInNuc.... routines. The nuclear 3025 // cascading particles are parametrized from experimental data. 3026 // A simple single variable description E D3S/DP3= F(Q) with 3027 // Q^2 = (M*X)^2 + PT^2 is used. Final state kinematic is produced 3028 // by an FF-type iterative cascade method. 3029 // Nuclear evaporation particles are added at the end of the routine. 3030 3031 // All quantities on the G4HEVector Array pv are in GeV- units. 3032 3033 G4int protonCode = Proton.getCode(); 3034 G4double protonMass = Proton.getMass(); 3035 G4int neutronCode = Neutron.getCode(); 3036 G4double kaonPlusMass = KaonPlus.getMass(); 3037 G4int kaonPlusCode = KaonPlus.getCode(); 3038 G4int kaonMinusCode = KaonMinus.getCode(); 3039 G4int kaonZeroSCode = KaonZeroShort.getCode(); 3040 G4int kaonZeroLCode = KaonZeroLong.getCode(); 3041 G4int kaonZeroCode = KaonZero.getCode(); 3042 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 3043 G4int pionPlusCode = PionPlus.getCode(); 3044 G4int pionZeroCode = PionZero.getCode(); 3045 G4int pionMinusCode = PionMinus.getCode(); 3046 G4String mesonType = PionPlus.getType(); 3047 G4String baryonType = Proton.getType(); 3048 G4String antiBaryonType= AntiProton.getType(); 3049 3050 G4double targetMass = targetParticle.getMass(); 3051 3052 G4int incidentCode = incidentParticle.getCode(); 3053 G4double incidentMass = incidentParticle.getMass(); 3054 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 3055 G4double incidentEnergy = incidentParticle.getEnergy(); 3056 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 3057 G4String incidentType = incidentParticle.getType(); 3058 // G4double incidentTOF = incidentParticle.getTOF(); 3059 G4double incidentTOF = 0.; 3060 3061 // some local variables 3062 3063 G4int i, j, l; 3064 3065 if(verboseLevel > 1) 2988 { 2989 // The multiplicity of particles produced in the first interaction has been 2990 // calculated in one of the FirstIntInNuc.... routines. The nuclear 2991 // cascading particles are parametrized from experimental data. 2992 // A simple single variable description E D3S/DP3= F(Q) with 2993 // Q^2 = (M*X)^2 + PT^2 is used. Final state kinematic is produced 2994 // by an FF-type iterative cascade method. 2995 // Nuclear evaporation particles are added at the end of the routine. 2996 2997 // All quantities on the G4HEVector Array pv are in GeV- units. 2998 2999 G4int protonCode = Proton.getCode(); 3000 G4double protonMass = Proton.getMass(); 3001 G4int neutronCode = Neutron.getCode(); 3002 G4double kaonPlusMass = KaonPlus.getMass(); 3003 G4int kaonPlusCode = KaonPlus.getCode(); 3004 G4int kaonMinusCode = KaonMinus.getCode(); 3005 G4int kaonZeroSCode = KaonZeroShort.getCode(); 3006 G4int kaonZeroLCode = KaonZeroLong.getCode(); 3007 G4int kaonZeroCode = KaonZero.getCode(); 3008 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 3009 G4int pionPlusCode = PionPlus.getCode(); 3010 G4int pionZeroCode = PionZero.getCode(); 3011 G4int pionMinusCode = PionMinus.getCode(); 3012 G4String mesonType = PionPlus.getType(); 3013 G4String baryonType = Proton.getType(); 3014 G4String antiBaryonType = AntiProton.getType(); 3015 3016 G4double targetMass = targetParticle.getMass(); 3017 3018 G4int incidentCode = incidentParticle.getCode(); 3019 G4double incidentMass = incidentParticle.getMass(); 3020 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 3021 G4double incidentEnergy = incidentParticle.getEnergy(); 3022 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 3023 G4String incidentType = incidentParticle.getType(); 3024 // G4double incidentTOF = incidentParticle.getTOF(); 3025 G4double incidentTOF = 0.; 3026 3027 // some local variables 3028 3029 G4int i, j, l; 3030 3031 if(verboseLevel > 1) 3066 3032 G4cout << " G4HEInelastic::MediumEnergyCascading " << G4endl; 3067 3033 3068 // define annihilation channels.3034 // define annihilation channels. 3069 3035 3070 G4bool annihilation = false; 3071 if (incidentCode < 0 && incidentType == antiBaryonType && 3072 pv[0].getType() != antiBaryonType && 3073 pv[1].getType() != antiBaryonType ) 3074 { 3075 annihilation = true; 3076 } 3077 3078 successful = false; 3079 3080 G4double twsup[] = { 1., 1., 0.7, 0.5, 0.3, 0.2, 0.1, 0.0 }; 3036 G4bool annihilation = false; 3037 if (incidentCode < 0 && incidentType == antiBaryonType && 3038 pv[0].getType() != antiBaryonType && 3039 pv[1].getType() != antiBaryonType) { 3040 annihilation = true; 3041 } 3042 3043 successful = false; 3044 3045 G4double twsup[] = { 1., 1., 0.7, 0.5, 0.3, 0.2, 0.1, 0.0 }; 3081 3046 3082 3047 if(annihilation) goto start; … … 3593 3558 } 3594 3559 vecLen--; 3595 if(vecLen < 2) return; 3560 if (vecLen < 2) { 3561 delete [] pvmx; 3562 return; 3563 } 3596 3564 i++; 3597 3565 pvmx[6].Add( pvmx[4], pvmx[5] ); … … 3829 3797 } 3830 3798 3831 // Rotate in the direction of the primary particle momentum (z-axis). 3832 // This does disturb our inclusive distributions somewhat, but it is 3833 // necessary for momentum conservation. 3834 3835 // Also subtract binding energies and make some further corrections 3836 // if required. 3837 3838 G4double dekin = 0.0; 3839 G4int npions = 0; 3840 G4double ek1 = 0.0; 3841 G4double alekw, xxh; 3842 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 3843 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00, 10.00}; 3844 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65, 0.70}; 3845 3846 3847 for (i = 0; i < vecLen; i++) 3848 { 3849 pv[i].Defs1( pv[i], pvI ); 3850 if (atomicWeight > 1.5) 3851 { 3852 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 3853 alekw = std::log( incidentKineticEnergy ); 3854 xxh = 1.; 3855 if(incidentCode == pionPlusCode || incidentCode == pionMinusCode) 3856 { 3857 if(pv[i].getCode() == pionZeroCode) 3858 { 3859 if(G4UniformRand() < std::log(atomicWeight)) 3860 { 3861 if (alekw > alem[0]) 3862 { 3863 for (j = 1; j < 8; j++) 3864 { 3865 if(alekw < alem[j]) break; 3866 } 3867 xxh = (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alekw 3868 + val0[j-1] - (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alem[j-1]; 3869 xxh = 1. - xxh; 3870 } 3871 } 3872 } 3873 } 3874 dekin += ekin*(1.-xxh); 3875 ekin *= xxh; 3876 pv[i].setKineticEnergyAndUpdate( ekin ); 3877 pvCode = pv[i].getCode(); 3878 if ((pvCode == pionPlusCode) || (pvCode == pionMinusCode) || (pvCode == pionZeroCode)) 3879 { 3880 npions += 1; 3881 ek1 += ekin; 3799 // Rotate in the direction of the primary particle momentum (z-axis). 3800 // This does disturb our inclusive distributions somewhat, but it is 3801 // necessary for momentum conservation. 3802 3803 // Also subtract binding energies and make some further corrections 3804 // if required. 3805 3806 G4double dekin = 0.0; 3807 G4int npions = 0; 3808 G4double ek1 = 0.0; 3809 G4double alekw, xxh; 3810 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 3811 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00, 10.00}; 3812 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65, 0.70}; 3813 3814 for (i = 0; i < vecLen; i++) { 3815 pv[i].Defs1( pv[i], pvI ); 3816 if (atomicWeight > 1.5) { 3817 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 3818 alekw = std::log( incidentKineticEnergy ); 3819 xxh = 1.; 3820 if (incidentCode == pionPlusCode || incidentCode == pionMinusCode) { 3821 if (pv[i].getCode() == pionZeroCode) { 3822 if (G4UniformRand() < std::log(atomicWeight)) { 3823 if (alekw > alem[0]) { 3824 G4int jmax = 1; 3825 for (j = 1; j < 8; j++) { 3826 if (alekw < alem[j]) { 3827 jmax = j; 3828 break; 3882 3829 } 3883 } 3884 } 3830 } 3831 xxh = (val0[jmax] - val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alekw 3832 + val0[jmax-1] - (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alem[jmax-1]; 3833 xxh = 1. - xxh; 3834 } 3835 } 3836 } 3837 } 3838 dekin += ekin*(1.-xxh); 3839 ekin *= xxh; 3840 pv[i].setKineticEnergyAndUpdate( ekin ); 3841 pvCode = pv[i].getCode(); 3842 if ((pvCode == pionPlusCode) || 3843 (pvCode == pionMinusCode) || 3844 (pvCode == pionZeroCode)) { 3845 npions += 1; 3846 ek1 += ekin; 3847 } 3848 } 3849 } 3850 3885 3851 if( (ek1 > 0.0) && (npions > 0) ) 3886 3852 { … … 4087 4053 4088 4054 void 4089 G4HEInelastic::MediumEnergyClusterProduction(G4bool &successful,4055 G4HEInelastic::MediumEnergyClusterProduction(G4bool& successful, 4090 4056 G4HEVector pv[], 4091 G4int &vecLen,4092 G4double &excitationEnergyGNP,4093 G4double &excitationEnergyDTA,4094 G4HEVectorincidentParticle,4095 G4HEVectortargetParticle,4057 G4int& vecLen, 4058 G4double& excitationEnergyGNP, 4059 G4double& excitationEnergyDTA, 4060 const G4HEVector& incidentParticle, 4061 const G4HEVector& targetParticle, 4096 4062 G4double atomicWeight, 4097 4063 G4double atomicNumber) 4098 { 4064 { 4099 4065 // For low multiplicity in the first intranuclear interaction the cascading 4100 4066 // process as described in G4HEInelastic::MediumEnergyCascading does not work … … 4104 4070 // All quantities on the G4HEVector Array pv are in GeV- units. 4105 4071 4106 G4int protonCode = Proton.getCode();4107 G4double protonMass = Proton.getMass();4108 G4int neutronCode = Neutron.getCode();4109 G4double kaonPlusMass = KaonPlus.getMass();4110 G4int pionPlusCode = PionPlus.getCode();4111 G4int pionZeroCode = PionZero.getCode();4112 G4int pionMinusCode= PionMinus.getCode();4113 G4String mesonType= PionPlus.getType();4114 G4String baryonType= Proton.getType();4115 G4String antiBaryonType= AntiProton.getType();4116 4117 G4double targetMass= targetParticle.getMass();4118 4119 G4int incidentCode= incidentParticle.getCode();4120 G4double incidentMass= incidentParticle.getMass();4121 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();4122 G4double incidentEnergy= incidentParticle.getEnergy();4123 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy();4124 G4String incidentType= incidentParticle.getType();4072 G4int protonCode = Proton.getCode(); 4073 G4double protonMass = Proton.getMass(); 4074 G4int neutronCode = Neutron.getCode(); 4075 G4double kaonPlusMass = KaonPlus.getMass(); 4076 G4int pionPlusCode = PionPlus.getCode(); 4077 G4int pionZeroCode = PionZero.getCode(); 4078 G4int pionMinusCode = PionMinus.getCode(); 4079 G4String mesonType = PionPlus.getType(); 4080 G4String baryonType = Proton.getType(); 4081 G4String antiBaryonType = AntiProton.getType(); 4082 4083 G4double targetMass = targetParticle.getMass(); 4084 4085 G4int incidentCode = incidentParticle.getCode(); 4086 G4double incidentMass = incidentParticle.getMass(); 4087 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 4088 G4double incidentEnergy = incidentParticle.getEnergy(); 4089 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 4090 G4String incidentType = incidentParticle.getType(); 4125 4091 // G4double incidentTOF = incidentParticle.getTOF(); 4126 G4double incidentTOF= 0.;4127 4128 // some local variables4129 4130 G4int i, j;4131 4132 if(verboseLevel > 1) G4cout << " G4HEInelastic::MediumEnergyClusterProduction " << G4endl;4133 4134 if (incidentTotalMomentum < 0.01) 4135 {4136 successful = false;4137 return;4138 }4139 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass) + sqr(targetMass)4140 +2.*targetMass*incidentEnergy);4141 4142 G4HEVector pvI = incidentParticle; // for the incident particle4143 pvI.setSide( 1 );4144 4145 G4HEVector pvT = targetParticle; // for the target particle4146 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 );4147 pvT.setSide( -1 );4148 pvT.setTOF( -1.);4092 G4double incidentTOF = 0.; 4093 4094 // some local variables 4095 4096 G4int i, j; 4097 4098 if (verboseLevel > 1) 4099 G4cout << " G4HEInelastic::MediumEnergyClusterProduction " << G4endl; 4100 4101 if (incidentTotalMomentum < 0.01) { 4102 successful = false; 4103 return; 4104 } 4105 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass) + sqr(targetMass) 4106 +2.*targetMass*incidentEnergy); 4107 4108 G4HEVector pvI = incidentParticle; // for the incident particle 4109 pvI.setSide( 1 ); 4110 4111 G4HEVector pvT = targetParticle; // for the target particle 4112 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 4113 pvT.setSide( -1 ); 4114 pvT.setTOF( -1.); 4149 4115 4150 // Distribute particles in forward and backward hemispheres. Note that4151 // only low multiplicity events from FirstIntInNuc.... should go into4152 // this routine.4116 // Distribute particles in forward and backward hemispheres. Note that 4117 // only low multiplicity events from FirstIntInNuc.... should go into 4118 // this routine. 4153 4119 4154 G4int targ= 0;4155 G4int ifor= 0;4156 G4int iback = 0;4157 G4int pvCode;4158 G4double pvMass, pvEnergy;4120 G4int targ = 0; 4121 G4int ifor = 0; 4122 G4int iback = 0; 4123 G4int pvCode; 4124 G4double pvMass, pvEnergy; 4159 4125 4160 4126 pv[0].setSide( 1 ); … … 4207 4173 G4double nucsup[] = { 1.0, 0.8, 0.6, 0.5, 0.4}; 4208 4174 4209 G4double xtarg = Amax(0.01, (0.312+0.2*std::log(std::log(centerOfMassEnergy*centerOfMassEnergy)))4175 G4double xtarg = Amax(0.01, (0.312+0.2*std::log(std::log(centerOfMassEnergy*centerOfMassEnergy))) 4210 4176 * (std::pow(atomicWeight,0.33)-1.) * tb); 4211 4177 G4int ntarg = Poisson(xtarg); … … 4558 4524 } 4559 4525 4560 G4bool dum(0); 4561 G4double ekin, teta; 4562 4563 if( lead ) 4564 { 4565 for( i=0; i<vecLen; i++ ) 4566 { 4567 if( pv[i].getCode() == lead ) 4568 { 4569 dum = false; 4570 break; 4571 } 4572 } 4573 if( dum ) 4574 { 4575 i = 0; 4526 G4bool dum(0); 4527 G4double ekin, teta; 4528 4529 if (lead) { 4530 for (i = 0; i < vecLen; i++) { 4531 if (pv[i].getCode() == lead) { 4532 dum = false; 4533 break; 4534 } 4535 } 4536 // At this point dum is always false, so the following code 4537 // cannot be executed. For now, comment it out. 4538 /* 4539 if (dum) { 4540 i = 0; 4576 4541 4577 if( ((leadParticle.getType() == baryonType ||4578 leadParticle.getType() == antiBaryonType)4579 && (pv[1].getType() == baryonType ||4580 pv[1].getType() == antiBaryonType))4581 || ((leadParticle.getType() == mesonType)4582 && (pv[1].getType() == mesonType)))4583 {4584 i = 1;4585 } 4586 4587 ekin = pv[i].getKineticEnergy();4588 pv[i] = leadParticle;4589 if( pv[i].getFlag() )4590 pv[i].setTOF( -1.0 );4591 else4592 pv[i].setTOF( 1.0);4593 pv[i].setKineticEnergyAndUpdate( ekin );4594 }4595 }4542 if ( ( (leadParticle.getType() == baryonType || 4543 leadParticle.getType() == antiBaryonType) 4544 && (pv[1].getType() == baryonType || 4545 pv[1].getType() == antiBaryonType)) 4546 || ( (leadParticle.getType() == mesonType) 4547 && (pv[1].getType() == mesonType))) { 4548 i = 1; 4549 } 4550 4551 ekin = pv[i].getKineticEnergy(); 4552 pv[i] = leadParticle; 4553 if (pv[i].getFlag() ) 4554 pv[i].setTOF( -1.0 ); 4555 else 4556 pv[i].setTOF( 1.0 ); 4557 pv[i].setKineticEnergyAndUpdate( ekin ); 4558 } 4559 */ 4560 } 4596 4561 4597 4562 pvmx[4].setMass( incidentMass); … … 4682 4647 } 4683 4648 4684 // Rotate in the direction of the primary particle momentum (z-axis). 4685 // This does disturb our inclusive distributions somewhat, but it is 4686 // necessary for momentum conservation. 4687 4688 // Also subtract binding energies and make some further corrections 4689 // if required. 4690 4691 G4double dekin = 0.0; 4692 G4int npions = 0; 4693 G4double ek1 = 0.0; 4694 G4double alekw, xxh; 4695 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 4696 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00}; 4697 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65}; 4698 4699 4700 for (i = 0; i < vecLen; i++) 4701 { 4702 pv[i].Defs1( pv[i], pvI ); 4703 if (atomicWeight > 1.5) 4704 { 4705 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 4706 alekw = std::log( incidentKineticEnergy ); 4707 xxh = 1.; 4708 xxh = 1.; 4709 if(incidentCode == pionPlusCode || incidentCode == pionMinusCode) 4710 { 4711 if(pv[i].getCode() == pionZeroCode) 4712 { 4713 if(G4UniformRand() < std::log(atomicWeight)) 4714 { 4715 if (alekw > alem[0]) 4716 { 4717 for (j = 1; j < 8; j++) 4718 { 4719 if(alekw < alem[j]) break; 4720 } 4721 xxh = (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alekw 4722 + val0[j-1] - (val0[j]-val0[j-1])/(alem[j]-alem[j-1])*alem[j-1]; 4723 xxh = 1. - xxh; 4724 } 4725 } 4726 } 4727 } 4728 dekin += ekin*(1.-xxh); 4729 ekin *= xxh; 4730 pv[i].setKineticEnergyAndUpdate( ekin ); 4731 pvCode = pv[i].getCode(); 4732 if ((pvCode == pionPlusCode) || (pvCode == pionMinusCode) || (pvCode == pionZeroCode)) 4733 { 4734 npions += 1; 4735 ek1 += ekin; 4649 // Rotate in the direction of the primary particle momentum (z-axis). 4650 // This does disturb our inclusive distributions somewhat, but it is 4651 // necessary for momentum conservation. 4652 4653 // Also subtract binding energies and make some further corrections 4654 // if required. 4655 4656 G4double dekin = 0.0; 4657 G4int npions = 0; 4658 G4double ek1 = 0.0; 4659 G4double alekw, xxh; 4660 G4double cfa = 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.); 4661 G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00}; 4662 G4double val0[] = {0.00, 0.40, 0.48, 0.51, 0.54, 0.60, 0.65}; 4663 4664 for (i = 0; i < vecLen; i++) { 4665 pv[i].Defs1( pv[i], pvI ); 4666 if (atomicWeight > 1.5) { 4667 ekin = Amax( 1.e-6,pv[i].getKineticEnergy() - cfa*( 1. + 0.5*normal())); 4668 alekw = std::log( incidentKineticEnergy ); 4669 xxh = 1.; 4670 xxh = 1.; 4671 if (incidentCode == pionPlusCode || incidentCode == pionMinusCode) { 4672 if (pv[i].getCode() == pionZeroCode) { 4673 if (G4UniformRand() < std::log(atomicWeight)) { 4674 if (alekw > alem[0]) { 4675 G4int jmax = 1; 4676 for (j = 1; j < 8; j++) { 4677 if (alekw < alem[j]) { 4678 jmax = j; 4679 break; 4736 4680 } 4737 } 4738 } 4681 } 4682 xxh = (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alekw 4683 + val0[jmax-1] - (val0[jmax]-val0[jmax-1])/(alem[jmax]-alem[jmax-1])*alem[jmax-1]; 4684 xxh = 1. - xxh; 4685 } 4686 } 4687 } 4688 } 4689 dekin += ekin*(1.-xxh); 4690 ekin *= xxh; 4691 pv[i].setKineticEnergyAndUpdate( ekin ); 4692 pvCode = pv[i].getCode(); 4693 if ((pvCode == pionPlusCode) || 4694 (pvCode == pionMinusCode) || 4695 (pvCode == pionZeroCode)) { 4696 npions += 1; 4697 ek1 += ekin; 4698 } 4699 } 4700 } 4701 4739 4702 if( (ek1 > 0.0) && (npions > 0) ) 4740 4703 { … … 4941 4904 4942 4905 void 4943 G4HEInelastic::QuasiElasticScattering(G4bool &successful, 4944 G4HEVector pv[], 4945 G4int &vecLen, 4946 G4double &excitationEnergyGNP, 4947 G4double &excitationEnergyDTA, 4948 G4HEVector incidentParticle, 4949 G4HEVector targetParticle, 4950 G4double atomicWeight, 4951 G4double atomicNumber ) 4952 { 4953 // if the Cascading or Resonance - model fails, we try this, 4954 // QuasiElasticScattering. 4955 // 4956 // All quantities on the G4HEVector Array pv are in GeV- units. 4957 4958 G4int protonCode = Proton.getCode(); 4959 G4String mesonType = PionPlus.getType(); 4960 G4String baryonType = Proton.getType(); 4961 G4String antiBaryonType= AntiProton.getType(); 4962 4963 G4double targetMass = targetParticle.getMass(); 4964 4965 G4double incidentMass = incidentParticle.getMass(); 4966 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 4967 G4double incidentEnergy = incidentParticle.getEnergy(); 4968 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 4969 G4String incidentType = incidentParticle.getType(); 4906 G4HEInelastic::QuasiElasticScattering(G4bool& successful, 4907 G4HEVector pv[], 4908 G4int& vecLen, 4909 G4double& excitationEnergyGNP, 4910 G4double& excitationEnergyDTA, 4911 const G4HEVector& incidentParticle, 4912 const G4HEVector& targetParticle, 4913 G4double atomicWeight, 4914 G4double atomicNumber) 4915 { 4916 // if the Cascading or Resonance - model fails, we try this, 4917 // QuasiElasticScattering. 4918 // 4919 // All quantities on the G4HEVector Array pv are in GeV- units. 4920 4921 G4int protonCode = Proton.getCode(); 4922 G4String mesonType = PionPlus.getType(); 4923 G4String baryonType = Proton.getType(); 4924 G4String antiBaryonType = AntiProton.getType(); 4925 4926 G4double targetMass = targetParticle.getMass(); 4927 G4double incidentMass = incidentParticle.getMass(); 4928 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 4929 G4double incidentEnergy = incidentParticle.getEnergy(); 4930 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 4931 G4String incidentType = incidentParticle.getType(); 4970 4932 // G4double incidentTOF = incidentParticle.getTOF(); 4971 G4double incidentTOF = 0.; 4972 4973 // some local variables 4974 4975 G4int i; 4976 4977 if(verboseLevel > 1) 4978 G4cout << " G4HEInelastic::QuasiElasticScattering " << G4endl; 4979 4980 if (incidentTotalMomentum < 0.01 || vecLen < 2 ) 4981 { 4982 successful = false; 4983 return; 4984 } 4985 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass) + sqr(targetMass) 4986 +2.*targetMass*incidentEnergy); 4987 4988 G4HEVector pvI = incidentParticle; // for the incident particle 4989 pvI.setSide( 1 ); 4990 4991 G4HEVector pvT = targetParticle; // for the target particle 4992 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 4993 pvT.setSide( -1 ); 4994 pvT.setTOF( -1.); 4995 4996 G4HEVector* pvmx = new G4HEVector[3]; 4997 4998 if (atomicWeight > 1.5) // for the following case better use ElasticScattering. 4999 { 5000 if ( (pvI.getCode() == pv[0].getCode() ) 5001 && (pvT.getCode() == pv[1].getCode() ) 5002 && (excitationEnergyGNP < 0.001) 5003 && (excitationEnergyDTA < 0.001) ) 5004 { 5005 successful = false; 5006 return; 5007 } 5008 } 5009 5010 pv[0].setSide( 1 ); 5011 pv[0].setFlag( false ); 5012 pv[0].setTOF( incidentTOF); 5013 pv[0].setMomentumAndUpdate( incidentParticle.getMomentum() ); 5014 pv[1].setSide( -1 ); 5015 pv[1].setFlag( false ); 5016 pv[1].setTOF( incidentTOF); 5017 pv[1].setMomentumAndUpdate(targetParticle.getMomentum() ); 5018 5019 if ( (incidentTotalMomentum > 0.1) && (centerOfMassEnergy > 0.01) ) 5020 { 5021 if ( pv[1].getType() == mesonType ) 5022 { 5023 if (G4UniformRand() < 0.5) 5024 pv[1].setDefinition( "Proton"); 5025 else 5026 pv[1].setDefinition( "Neutron"); 5027 } 5028 pvmx[0].Add( pvI, pvT ); 5029 pvmx[1].Lor( pvI, pvmx[0] ); 5030 pvmx[2].Lor( pvT, pvmx[0] ); 5031 G4double pin = pvmx[1].Length(); 5032 G4double bvalue = Amax(0.01 , 4.225+1.795*std::log(incidentTotalMomentum)); 5033 G4double pf = sqr( sqr(centerOfMassEnergy) + sqr(pv[1].getMass()) - sqr(pv[0].getMass())) 5034 - 4 * sqr(centerOfMassEnergy) * sqr(pv[1].getMass()); 5035 if ( pf < 0.001) 5036 { 5037 successful = false; 5038 return; 5039 } 5040 pf = std::sqrt(pf)/(2.*centerOfMassEnergy); 5041 G4double btrang = 4. * bvalue * pin * pf; 5042 G4double exindt = -1.; 5043 if (btrang < 46.) exindt += std::exp(-btrang); 5044 G4double tdn = std::log(1. + G4UniformRand()*exindt)/btrang; 5045 G4double ctet = Amax( -1., Amin(1., 1. + 2.*tdn)); 5046 G4double stet = std::sqrt((1.-ctet)*(1.+ctet)); 5047 G4double phi = twopi * G4UniformRand(); 5048 pv[0].setMomentumAndUpdate( pf*stet*std::sin(phi), 5049 pf*stet*std::cos(phi), 5050 pf*ctet ); 5051 pv[1].SmulAndUpdate( pv[0], -1.); 5052 5053 for (i = 0; i < 2; i++) 5054 { 5055 pv[i].Lor( pv[i], pvmx[4] ); 5056 pv[i].Defs1( pv[i], pvI ); 5057 if (atomicWeight > 1.5) 5058 { 5059 G4double ekin = pv[i].getKineticEnergy() 5060 - 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.) 5061 *(1. + 0.5*normal()); 5062 ekin = Amax(0.0001, ekin); 5063 pv[i].setKineticEnergyAndUpdate( ekin ); 5064 } 5065 } 5066 } 5067 vecLen = 2; 5068 5069 // add black track particles 5070 // the total number of particles produced is restricted to 198 5071 // this may have influence on very high energies 5072 5073 if (verboseLevel > 1) 5074 G4cout << " Evaporation " << atomicWeight << " " << 5075 excitationEnergyGNP << " " << excitationEnergyDTA << G4endl; 4933 G4double incidentTOF = 0.; 4934 4935 // some local variables 4936 G4int i; 4937 4938 if (verboseLevel > 1) 4939 G4cout << " G4HEInelastic::QuasiElasticScattering " << G4endl; 4940 4941 if (incidentTotalMomentum < 0.01 || vecLen < 2) { 4942 successful = false; 4943 return; 4944 } 4945 4946 G4double centerOfMassEnergy = std::sqrt( sqr(incidentMass) + sqr(targetMass) 4947 +2.*targetMass*incidentEnergy); 4948 4949 G4HEVector pvI = incidentParticle; // for the incident particle 4950 pvI.setSide( 1 ); 4951 4952 G4HEVector pvT = targetParticle; // for the target particle 4953 pvT.setMomentumAndUpdate( 0.0, 0.0, 0.0 ); 4954 pvT.setSide( -1 ); 4955 pvT.setTOF( -1.); 4956 4957 G4HEVector* pvmx = new G4HEVector[3]; 4958 4959 if (atomicWeight > 1.5) { 4960 // for the following case better use ElasticScattering 4961 if ( (pvI.getCode() == pv[0].getCode() ) 4962 && (pvT.getCode() == pv[1].getCode() ) 4963 && (excitationEnergyGNP < 0.001) 4964 && (excitationEnergyDTA < 0.001) ) { 4965 successful = false; 4966 delete [] pvmx; 4967 return; 4968 } 4969 } 4970 4971 pv[0].setSide( 1 ); 4972 pv[0].setFlag( false ); 4973 pv[0].setTOF( incidentTOF); 4974 pv[0].setMomentumAndUpdate( incidentParticle.getMomentum() ); 4975 pv[1].setSide( -1 ); 4976 pv[1].setFlag( false ); 4977 pv[1].setTOF( incidentTOF); 4978 pv[1].setMomentumAndUpdate(targetParticle.getMomentum() ); 4979 4980 if ((incidentTotalMomentum > 0.1) && (centerOfMassEnergy > 0.01) ) { 4981 if (pv[1].getType() == mesonType) { 4982 if (G4UniformRand() < 0.5) 4983 pv[1].setDefinition( "Proton"); 4984 else 4985 pv[1].setDefinition( "Neutron"); 4986 } 4987 pvmx[0].Add( pvI, pvT ); 4988 pvmx[1].Lor( pvI, pvmx[0] ); 4989 pvmx[2].Lor( pvT, pvmx[0] ); 4990 G4double pin = pvmx[1].Length(); 4991 G4double bvalue = Amax(0.01 , 4.225+1.795*std::log(incidentTotalMomentum)); 4992 G4double pf = sqr(sqr(centerOfMassEnergy) + sqr(pv[1].getMass()) - sqr(pv[0].getMass())) 4993 - 4 * sqr(centerOfMassEnergy) * sqr(pv[1].getMass()); 4994 4995 if (pf < 0.001) { 4996 successful = false; 4997 delete [] pvmx; 4998 return; 4999 } 5000 pf = std::sqrt(pf)/(2.*centerOfMassEnergy); 5001 G4double btrang = 4. * bvalue * pin * pf; 5002 G4double exindt = -1.; 5003 if (btrang < 46.) exindt += std::exp(-btrang); 5004 G4double tdn = std::log(1. + G4UniformRand()*exindt)/btrang; 5005 G4double ctet = Amax( -1., Amin(1., 1. + 2.*tdn)); 5006 G4double stet = std::sqrt((1.-ctet)*(1.+ctet)); 5007 G4double phi = twopi * G4UniformRand(); 5008 pv[0].setMomentumAndUpdate( pf*stet*std::sin(phi), 5009 pf*stet*std::cos(phi), 5010 pf*ctet ); 5011 pv[1].SmulAndUpdate( pv[0], -1.); 5012 for (i = 0; i < 2; i++) { 5013 // ** pv[i].Lor( pv[i], pvmx[4] ); 5014 // ** DHW 1 Dec 2010 : index 4 out of range : use 0 5015 pv[i].Lor(pv[i], pvmx[0]); 5016 pv[i].Defs1(pv[i], pvI); 5017 if (atomicWeight > 1.5) { 5018 G4double ekin = pv[i].getKineticEnergy() 5019 - 0.025*((atomicWeight-1.)/120.)*std::exp(-(atomicWeight-1.)/120.) 5020 *(1. + 0.5*normal()); 5021 ekin = Amax(0.0001, ekin); 5022 pv[i].setKineticEnergyAndUpdate( ekin ); 5023 } 5024 } 5025 } 5026 vecLen = 2; 5027 5028 // add black track particles 5029 // the total number of particles produced is restricted to 198 5030 // this may have influence on very high energies 5031 5032 if (verboseLevel > 1) 5033 G4cout << " Evaporation " << atomicWeight << " " 5034 << excitationEnergyGNP << " " << excitationEnergyDTA << G4endl; 5076 5035 5077 5036 if( atomicWeight > 1.5 ) … … 5230 5189 } 5231 5190 5232 successful = true;5233 delete [] pvmx;5234 return;5235 }5191 successful = true; 5192 delete [] pvmx; 5193 return; 5194 } 5236 5195 5237 5196 void 5238 G4HEInelastic::ElasticScattering(G4bool &successful,5197 G4HEInelastic::ElasticScattering(G4bool& successful, 5239 5198 G4HEVector pv[], 5240 G4int &vecLen,5241 G4HEVectorincidentParticle,5199 G4int& vecLen, 5200 const G4HEVector& incidentParticle, 5242 5201 G4double atomicWeight, 5243 5202 G4double /* atomicNumber*/) 5244 {5245 if(verboseLevel > 1)5246 G4cout << " G4HEInelastic::ElasticScattering " << G4endl;5247 5248 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum();5249 if (verboseLevel > 1)5250 G4cout << "DoIt: Incident particle momentum="5251 << incidentTotalMomentum << " GeV" << G4endl;5252 if (incidentTotalMomentum < 0.01)5253 {5254 successful = false;5255 return;5256 } 5203 { 5204 if (verboseLevel > 1) 5205 G4cout << " G4HEInelastic::ElasticScattering " << G4endl; 5206 5207 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 5208 if (verboseLevel > 1) 5209 G4cout << "DoIt: Incident particle momentum=" 5210 << incidentTotalMomentum << " GeV" << G4endl; 5211 if (incidentTotalMomentum < 0.01) { 5212 successful = false; 5213 return; 5214 } 5215 5257 5216 if (atomicWeight < 0.5) 5258 5217 { -
trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEKaonMinusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEKaonMinusInelastic.cc,v 1.16 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included arethe low energy stuff35 // and the low energy two-body model. Not included is the low energy stuff 39 36 // like nuclear reactions, nuclear fission without any cascading and all 40 37 // processes for particles at rest. … … 45 42 #include "G4HEKaonMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEKaonMinusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEKaonMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEKaonMinusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEKaonMinusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 86 incidentKineticEnergy -= inelasticity; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEKaonMinusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEKaonMinusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 80 81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 131 vecLength = 0; 132 133 if(verboseLevel > 1) 134 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 114 vecLength = 0; 115 116 if (verboseLevel > 1) 117 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 135 118 << incidentCode << G4endl; 136 119 137 G4bool successful = false;120 G4bool successful = false; 138 121 139 if(inElastic || (!inElastic && atomicWeight < 1.5)) 140 { 141 FirstIntInCasKaonMinus(inElastic, availableEnergy, pv, vecLength, 142 incidentParticle, targetParticle); 143 144 if(verboseLevel > 1) 145 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 146 147 148 if ((vecLength > 0) && (availableEnergy > 1.)) 149 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 150 pv, vecLength, 151 incidentParticle, targetParticle); 152 HighEnergyCascading( successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 if (!successful) 157 HighEnergyClusterProduction( successful, pv, vecLength, 158 excitationEnergyGNP, excitationEnergyDTA, 159 incidentParticle, targetParticle, 160 atomicWeight, atomicNumber); 161 if (!successful) 162 MediumEnergyCascading( successful, pv, vecLength, 163 excitationEnergyGNP, excitationEnergyDTA, 164 incidentParticle, targetParticle, 165 atomicWeight, atomicNumber); 166 167 if (!successful) 168 MediumEnergyClusterProduction( successful, pv, vecLength, 169 excitationEnergyGNP, excitationEnergyDTA, 170 incidentParticle, targetParticle, 171 atomicWeight, atomicNumber); 172 if (!successful) 173 QuasiElasticScattering( successful, pv, vecLength, 174 excitationEnergyGNP, excitationEnergyDTA, 175 incidentParticle, targetParticle, 176 atomicWeight, atomicNumber); 177 } 178 if (!successful) 179 { 180 ElasticScattering( successful, pv, vecLength, 181 incidentParticle, 182 atomicWeight, atomicNumber); 183 } 184 185 if (!successful) 186 { 187 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 188 } 189 FillParticleChange(pv, vecLength); 190 delete [] pv; 191 theParticleChange.SetStatusChange(stopAndKill); 192 return & theParticleChange; 193 } 122 FirstIntInCasKaonMinus(inElastic, availableEnergy, pv, vecLength, 123 incidentParticle, targetParticle); 124 125 if (verboseLevel > 1) 126 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 127 128 if ((vecLength > 0) && (availableEnergy > 1.)) 129 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 130 pv, vecLength, 131 incidentParticle, targetParticle); 132 133 HighEnergyCascading(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 HighEnergyClusterProduction(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 if (!successful) 143 MediumEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 148 if (!successful) 149 MediumEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 QuasiElasticScattering(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 158 if (!successful) 159 ElasticScattering(successful, pv, vecLength, 160 incidentParticle, 161 atomicWeight, atomicNumber); 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 194 172 195 173 void 196 G4HEKaonMinusInelastic::FirstIntInCasKaonMinus( G4bool &inElastic,197 const G4double availableEnergy,198 G4HEVector pv[],199 G4int &vecLen,200 G4HEVectorincidentParticle,201 G4HEVectortargetParticle)174 G4HEKaonMinusInelastic::FirstIntInCasKaonMinus(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle) 202 180 203 181 // Kaon- undergoes interaction with nucleon within a nucleus. Check if it is … … 208 186 // protons/neutrons by kaons or strange baryons according to the average 209 187 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 G4int kaonMinusCode = KaonMinus.getCode(); 225 G4int kaonZeroCode = KaonZero.getCode(); 226 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 227 228 G4int targetCode = targetParticle.getCode(); 229 // G4double incidentMass = incidentParticle.getMass(); 230 // G4double incidentEnergy = incidentParticle.getEnergy(); 231 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 232 233 static G4bool first = true; 234 static G4double protmul[numMul], protnorm[numSec]; // proton constants 235 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 236 237 // misc. local variables 238 // np = number of pi+, nm = number of pi-, nz = number of pi0 239 240 G4int i, counter, nt, np, nm, nz; 188 { 189 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 190 static const G4double expxl = -expxu; // lower bound for arg. of exp 191 192 static const G4double protb = 0.7; 193 static const G4double neutb = 0.7; 194 static const G4double c = 1.25; 195 196 static const G4int numMul = 1200; 197 static const G4int numSec = 60; 198 199 G4int neutronCode = Neutron.getCode(); 200 G4int protonCode = Proton.getCode(); 201 G4int kaonMinusCode = KaonMinus.getCode(); 202 G4int kaonZeroCode = KaonZero.getCode(); 203 G4int antiKaonZeroCode = AntiKaonZero.getCode(); 204 205 G4int targetCode = targetParticle.getCode(); 206 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 207 208 static G4bool first = true; 209 static G4double protmul[numMul], protnorm[numSec]; // proton constants 210 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 211 212 // misc. local variables 213 // np = number of pi+, nm = number of pi-, nz = number of pi0 214 215 G4int i, counter, nt, np, nm, nz; 241 216 242 217 if( first ) 243 { // compute normalization constants, this will only be done once218 { // compute normalization constants, this will only be done once 244 219 first = false; 245 220 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonPlusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEKaonPlusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEKaonPlusInelastic.cc,v 1.16 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEKaonPlusInelastic.hh" 46 43 47 G4HadFinalState * G4HEKaonPlusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEKaonPlusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEKaonPlusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEKaonPlusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEKaonPlusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEKaonPlusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 108 if(G4UniformRand() < atomicNumber/atomicWeight) 109 { 110 targetParticle.setDefinition("Proton"); 111 } 112 else 113 { 114 targetParticle.setDefinition("Neutron"); 115 } 116 117 G4double targetMass = targetParticle.getMass(); 118 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 119 + 2.0*targetMass*incidentTotalEnergy); 120 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 121 122 // this was the meaning of inElastic in the 123 // original Gheisha stand-alone version. 124 // G4bool inElastic = InElasticCrossSectionInFirstInt 125 // (availableEnergy, incidentCode, incidentTotalMomentum); 126 // by unknown reasons, it has been replaced 127 // to the following code in Geant??? 128 G4bool inElastic = true; 129 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 130 131 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 101 if (G4UniformRand() < atomicNumber/atomicWeight) { 102 targetParticle.setDefinition("Proton"); 103 } else { 104 targetParticle.setDefinition("Neutron"); 105 } 106 107 G4double targetMass = targetParticle.getMass(); 108 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 109 + targetMass*targetMass 110 + 2.0*targetMass*incidentTotalEnergy); 111 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 112 113 G4bool inElastic = true; 114 vecLength = 0; 132 115 133 if(verboseLevel > 1)134 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "116 if (verboseLevel > 1) 117 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 135 118 << incidentCode << G4endl; 136 119 137 G4bool successful = false;120 G4bool successful = false; 138 121 139 if(inElastic || (!inElastic && atomicWeight < 1.5)) 140 { 141 FirstIntInCasKaonPlus(inElastic, availableEnergy, pv, vecLength, 142 incidentParticle, targetParticle, atomicWeight); 143 144 if(verboseLevel > 1) 145 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 146 147 148 149 if ((vecLength > 0) && (availableEnergy > 1.)) 150 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 151 pv, vecLength, 152 incidentParticle, targetParticle); 153 HighEnergyCascading( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 HighEnergyClusterProduction( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 if (!successful) 163 MediumEnergyCascading( successful, pv, vecLength, 164 excitationEnergyGNP, excitationEnergyDTA, 165 incidentParticle, targetParticle, 166 atomicWeight, atomicNumber); 167 168 if (!successful) 169 MediumEnergyClusterProduction( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 if (!successful) 174 QuasiElasticScattering( successful, pv, vecLength, 175 excitationEnergyGNP, excitationEnergyDTA, 176 incidentParticle, targetParticle, 177 atomicWeight, atomicNumber); 178 } 179 if (!successful) 180 { 181 ElasticScattering( successful, pv, vecLength, 182 incidentParticle, 183 atomicWeight, atomicNumber); 184 } 185 186 if (!successful) 187 { 188 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 189 } 190 FillParticleChange(pv, vecLength); 191 delete [] pv; 192 theParticleChange.SetStatusChange(stopAndKill); 193 return & theParticleChange; 194 } 122 FirstIntInCasKaonPlus(inElastic, availableEnergy, pv, vecLength, 123 incidentParticle, targetParticle, atomicWeight); 124 125 if (verboseLevel > 1) 126 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 127 128 if ((vecLength > 0) && (availableEnergy > 1.)) 129 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 130 pv, vecLength, 131 incidentParticle, targetParticle); 132 133 HighEnergyCascading(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 HighEnergyClusterProduction(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 if (!successful) 143 MediumEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 148 if (!successful) 149 MediumEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 QuasiElasticScattering(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 158 if (!successful) 159 ElasticScattering(successful, pv, vecLength, 160 incidentParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 165 << G4endl; 166 167 FillParticleChange(pv, vecLength); 168 delete [] pv; 169 theParticleChange.SetStatusChange(stopAndKill); 170 return &theParticleChange; 171 } 172 195 173 196 174 void 197 G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,198 const G4double availableEnergy,199 G4HEVector pv[],200 G4int &vecLen,201 G4HEVectorincidentParticle,202 G4HEVectortargetParticle,203 const G4double atomicWeight)175 G4HEKaonPlusInelastic::FirstIntInCasKaonPlus(G4bool& inElastic, 176 const G4double availableEnergy, 177 G4HEVector pv[], 178 G4int& vecLen, 179 const G4HEVector& incidentParticle, 180 const G4HEVector& targetParticle, 181 const G4double atomicWeight) 204 182 205 183 // Kaon+ undergoes interaction with nucleon within a nucleus. Check if it is … … 210 188 // protons/neutrons by kaons or strange baryons according to the average 211 189 // multiplicity per inelastic reaction. 212 213 { 214 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 215 static const G4double expxl = -expxu; // lower bound for arg. of exp 216 217 static const G4double protb = 0.7; 218 static const G4double neutb = 0.7; 219 static const G4double c = 1.25; 220 221 static const G4int numMul = 1200; 222 static const G4int numSec = 60; 223 224 G4int neutronCode = Neutron.getCode(); 225 G4int protonCode = Proton.getCode(); 226 227 G4int targetCode = targetParticle.getCode(); 228 // G4double incidentMass = incidentParticle.getMass(); 229 // G4double incidentEnergy = incidentParticle.getEnergy(); 230 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 231 232 static G4bool first = true; 233 static G4double protmul[numMul], protnorm[numSec]; // proton constants 234 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 235 236 // misc. local variables 237 // np = number of pi+, nm = number of pi-, nz = number of pi0 238 239 G4int i, counter, nt, np, nm, nz; 190 { 191 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 192 static const G4double expxl = -expxu; // lower bound for arg. of exp 193 194 static const G4double protb = 0.7; 195 static const G4double neutb = 0.7; 196 static const G4double c = 1.25; 197 198 static const G4int numMul = 1200; 199 static const G4int numSec = 60; 200 201 G4int neutronCode = Neutron.getCode(); 202 G4int protonCode = Proton.getCode(); 203 204 G4int targetCode = targetParticle.getCode(); 205 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 206 207 static G4bool first = true; 208 static G4double protmul[numMul], protnorm[numSec]; // proton constants 209 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 210 211 // misc. local variables 212 // np = number of pi+, nm = number of pi-, nz = number of pi0 213 214 G4int i, counter, nt, np, nm, nz; 240 215 241 216 if( first ) 242 { // compute normalization constants, this will only be done once217 { // compute normalization constants, this will only be done once 243 218 first = false; 244 219 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEKaonZeroInelastic.cc,v 1.16 2010/02/09 22:02:20 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEKaonZeroInelastic.cc,v 1.18 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEKaonZeroInelastic.hh" 46 43 47 G4HadFinalState * G4HEKaonZeroInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEKaonZeroInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEKaonZeroInelastic: incident energy < 1 GeV" << G4endl;; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEKaonZeroInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEKaonZeroInelastic: incident energy < 1 GeV" << G4endl;; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEKaonZeroInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 80 75 81 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,82 atomicWeight, atomicNumber);83 if(verboseLevel > 1)84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 131 132 if(verboseLevel > 1) 133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 114 115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasKaonZero(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 186 << G4endl; 187 188 FillParticleChange(pv, vecLength); 189 190 delete [] pv; 191 theParticleChange.SetStatusChange(stopAndKill); 192 return & theParticleChange; 193 } 121 FirstIntInCasKaonZero(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 168 delete [] pv; 169 theParticleChange.SetStatusChange(stopAndKill); 170 return &theParticleChange; 171 } 172 194 173 195 174 void 196 G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,197 const G4double availableEnergy,198 G4HEVector pv[],199 G4int &vecLen,200 G4HEVectorincidentParticle,201 G4HEVectortargetParticle,202 const G4double atomicWeight)175 G4HEKaonZeroInelastic::FirstIntInCasKaonZero(G4bool& inElastic, 176 const G4double availableEnergy, 177 G4HEVector pv[], 178 G4int& vecLen, 179 const G4HEVector& incidentParticle, 180 const G4HEVector& targetParticle, 181 const G4double atomicWeight) 203 182 204 183 // Kaon0 undergoes interaction with nucleon within a nucleus. Check if it is … … 209 188 // protons/neutrons by kaons or strange baryons according to the average 210 189 // multiplicity per inelastic reaction. 211 212 { 213 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 214 static const G4double expxl = -expxu; // lower bound for arg. of exp 215 216 static const G4double protb = 0.7; 217 static const G4double neutb = 0.7; 218 static const G4double c = 1.25; 219 220 static const G4int numMul = 1200; 221 static const G4int numSec = 60; 222 223 G4int neutronCode = Neutron.getCode(); 224 G4int protonCode = Proton.getCode(); 225 226 G4int targetCode = targetParticle.getCode(); 227 // G4double incidentMass = incidentParticle.getMass(); 228 // G4double incidentEnergy = incidentParticle.getEnergy(); 229 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 230 231 static G4bool first = true; 232 static G4double protmul[numMul], protnorm[numSec]; // proton constants 233 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 234 235 // misc. local variables 236 // np = number of pi+, nm = number of pi-, nz = number of pi0 237 238 G4int i, counter, nt, np, nm, nz; 190 { 191 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 192 static const G4double expxl = -expxu; // lower bound for arg. of exp 193 194 static const G4double protb = 0.7; 195 static const G4double neutb = 0.7; 196 static const G4double c = 1.25; 197 198 static const G4int numMul = 1200; 199 static const G4int numSec = 60; 200 201 G4int neutronCode = Neutron.getCode(); 202 G4int protonCode = Proton.getCode(); 203 204 G4int targetCode = targetParticle.getCode(); 205 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 206 207 static G4bool first = true; 208 static G4double protmul[numMul], protnorm[numSec]; // proton constants 209 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 210 211 // misc. local variables 212 // np = number of pi+, nm = number of pi-, nz = number of pi0 213 214 G4int i, counter, nt, np, nm, nz; 239 215 240 216 if( first ) 241 { // compute normalization constants, this will only be done once217 { // compute normalization constants, this will only be done once 242 218 first = false; 243 219 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroLongInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HEKaonZeroLongInelastic.cc,v 1.11 2010/02/09 21:59:10 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 // $Id: G4HEKaonZeroLongInelastic.cc,v 1.13 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 … … 32 31 #include "G4ios.hh" 33 32 34 //35 33 // G4 Process: Gheisha High Energy Collision model. 36 34 // This includes the high energy cascading model, the two-body-resonance model 37 // and the low energy two-body model. Not included are the low energy stuff like38 // nuclear reactions, nuclear fission without any cascading and all processes for39 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 40 38 // 41 39 // New version by D.H. Wright (SLAC) to fix seg fault in old version … … 45 43 #include "G4HEKaonZeroLongInelastic.hh" 46 44 47 G4HadFinalState* G4HEKaonZeroLongInelastic:: 48 ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus) 45 G4HadFinalState* 46 G4HEKaonZeroLongInelastic::ApplyYourself(const G4HadProjectile& aTrack, 47 G4Nucleus& targetNucleus) 49 48 { 50 G4HEVector * pv = new G4HEVector[MAXPART];51 const G4HadProjectile *aParticle = &aTrack;49 G4HEVector* pv = new G4HEVector[MAXPART]; 50 const G4HadProjectile* aParticle = &aTrack; 52 51 const G4double atomicWeight = targetNucleus.GetN(); 53 52 const G4double atomicNumber = targetNucleus.GetZ(); 54 53 G4HEVector incidentParticle(aParticle); 55 54 56 G4int incidentCode= incidentParticle.getCode();57 G4double incidentMass = incidentParticle.getMass();58 G4double incidentTotalEnergy = incidentParticle.getEnergy();55 G4int incidentCode = incidentParticle.getCode(); 56 G4double incidentMass = incidentParticle.getMass(); 57 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 59 58 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 60 59 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; … … 93 92 incidentKineticEnergy -= excitation; 94 93 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 95 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 96 *(incidentTotalEnergy+incidentMass)); 97 94 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 95 *(incidentTotalEnergy+incidentMass)); 98 96 99 97 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) {98 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 99 targetParticle.setDefinition("Proton"); 102 100 } else { … … 105 103 106 104 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 108 + 2.0*targetMass*incidentTotalEnergy); 105 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 106 + targetMass*targetMass 107 + 2.0*targetMass*incidentTotalEnergy); 109 108 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 110 // this was the meaning of inElastic in the111 // original Gheisha stand-alone version.112 // G4bool inElastic = InElasticCrossSectionInFirstInt113 // (availableEnergy, incidentCode, incidentTotalMomentum);114 // for unknown reasons, it has been replaced by the following code in Geant???115 109 116 110 G4bool inElastic = true; 117 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false;118 119 111 vecLength = 0; 120 112 … … 125 117 G4bool successful = false; 126 118 127 if(inElastic || (!inElastic && atomicWeight < 1.5)) { 128 129 // Split K0L into K0 and K0bar 130 if (G4UniformRand() < 0.5) 131 FirstIntInCasAntiKaonZero(inElastic, availableEnergy, pv, vecLength, 132 incidentParticle, targetParticle ); 133 else 134 FirstIntInCasKaonZero(inElastic, availableEnergy, pv, vecLength, 135 incidentParticle, targetParticle, atomicWeight ); 136 137 // Do nuclear interaction with either K0 or K0bar 138 if ((vecLength > 0) && (availableEnergy > 1.)) 139 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 140 pv, vecLength, 141 incidentParticle, targetParticle); 142 HighEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 if (!successful) 147 HighEnergyClusterProduction(successful, pv, vecLength, 148 excitationEnergyGNP, excitationEnergyDTA, 119 // Split K0L into K0 and K0bar 120 if (G4UniformRand() < 0.5) 121 FirstIntInCasAntiKaonZero(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle); 123 else 124 FirstIntInCasKaonZero(inElastic, availableEnergy, pv, vecLength, 125 incidentParticle, targetParticle, atomicWeight); 126 127 // Do nuclear interaction with either K0 or K0bar 128 if ((vecLength > 0) && (availableEnergy > 1.)) 129 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 130 pv, vecLength, 131 incidentParticle, targetParticle); 132 133 HighEnergyCascading(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 HighEnergyClusterProduction(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 if (!successful) 143 MediumEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 148 if (!successful) 149 MediumEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 149 151 incidentParticle, targetParticle, 150 152 atomicWeight, atomicNumber); 151 if (!successful) 152 MediumEnergyCascading(successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 157 if (!successful) 158 MediumEnergyClusterProduction(successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 if (!successful) 163 QuasiElasticScattering(successful, pv, vecLength, 164 excitationEnergyGNP, excitationEnergyDTA, 165 incidentParticle, targetParticle, 166 atomicWeight, atomicNumber); 167 } 153 if (!successful) 154 QuasiElasticScattering(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 168 158 169 159 if (!successful) … … 193 183 delete [] pv; 194 184 theParticleChange.SetStatusChange(stopAndKill); 195 return & theParticleChange;185 return &theParticleChange; 196 186 } 197 187 198 188 199 189 void 200 G4HEKaonZeroLongInelastic::FirstIntInCasKaonZero(G4bool &inElastic,190 G4HEKaonZeroLongInelastic::FirstIntInCasKaonZero(G4bool& inElastic, 201 191 const G4double availableEnergy, 202 192 G4HEVector pv[], 203 G4int &vecLen,204 G4HEVectorincidentParticle,205 G4HEVectortargetParticle,193 G4int& vecLen, 194 const G4HEVector& incidentParticle, 195 const G4HEVector& targetParticle, 206 196 const G4double atomicWeight) 207 197 … … 213 203 // protons/neutrons by kaons or strange baryons according to the average 214 204 // multiplicity per inelastic reaction. 215 216 205 { 217 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp218 static const G4double expxl = -expxu; // lower bound for arg. of exp206 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 207 static const G4double expxl = -expxu; // lower bound for arg. of exp 219 208 220 209 static const G4double protb = 0.7; … … 521 510 522 511 void 523 G4HEKaonZeroLongInelastic::FirstIntInCasAntiKaonZero(G4bool &inElastic,512 G4HEKaonZeroLongInelastic::FirstIntInCasAntiKaonZero(G4bool& inElastic, 524 513 const G4double availableEnergy, 525 514 G4HEVector pv[], 526 G4int &vecLen,527 G4HEVectorincidentParticle,528 G4HEVector targetParticle)515 G4int& vecLen, 516 const G4HEVector& incidentParticle, 517 const G4HEVector& targetParticle) 529 518 530 519 // AntiKaon0 undergoes interaction with nucleon within a nucleus. Check if it is … … 560 549 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 561 550 562 // misc. local variables563 // np = number of pi+, nm = number of pi-, nz = number of pi0551 // misc. local variables 552 // np = number of pi+, nm = number of pi-, nz = number of pi0 564 553 565 554 G4int i, counter, nt, np, nm, nz; 566 555 567 if (first) {556 if (first) { 568 557 // compute normalization constants, this will only be done once 569 558 first = false; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroShortInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HEKaonZeroShortInelastic.cc,v 1.11 2010/02/09 21:58:57 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 // $Id: G4HEKaonZeroShortInelastic.cc,v 1.13 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 28 // 30 29 … … 32 31 #include "G4ios.hh" 33 32 34 //35 33 // G4 Process: Gheisha High Energy Collision model. 36 34 // This includes the high energy cascading model, the two-body-resonance model 37 // and the low energy two-body model. Not included are the low energy stuff like38 // nuclear reactions, nuclear fission without any cascading and all processes for39 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 40 38 // 41 39 // New version by D.H. Wright (SLAC) to fix seg fault in old version … … 45 43 #include "G4HEKaonZeroShortInelastic.hh" 46 44 47 G4HadFinalState* G4HEKaonZeroShortInelastic:: 48 ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus) 45 G4HadFinalState* 46 G4HEKaonZeroShortInelastic::ApplyYourself(const G4HadProjectile& aTrack, 47 G4Nucleus& targetNucleus) 49 48 { 50 G4HEVector * pv = new G4HEVector[MAXPART];51 const G4HadProjectile *aParticle = &aTrack;49 G4HEVector* pv = new G4HEVector[MAXPART]; 50 const G4HadProjectile* aParticle = &aTrack; 52 51 const G4double atomicWeight = targetNucleus.GetN(); 53 52 const G4double atomicNumber = targetNucleus.GetZ(); 54 53 G4HEVector incidentParticle(aParticle); 55 54 56 G4int incidentCode= incidentParticle.getCode();57 G4double incidentMass = incidentParticle.getMass();58 G4double incidentTotalEnergy = incidentParticle.getEnergy();55 G4int incidentCode = incidentParticle.getCode(); 56 G4double incidentMass = incidentParticle.getMass(); 57 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 59 58 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 60 59 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; … … 92 91 93 92 incidentKineticEnergy -= excitation; 94 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 95 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 96 *(incidentTotalEnergy+incidentMass)); 97 93 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 94 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 95 *(incidentTotalEnergy+incidentMass)); 98 96 99 97 G4HEVector targetParticle; … … 105 103 106 104 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 108 + 2.0*targetMass*incidentTotalEnergy); 105 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 106 + targetMass*targetMass 107 + 2.0*targetMass*incidentTotalEnergy); 109 108 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 110 // this was the meaning of inElastic in the111 // original Gheisha stand-alone version.112 // G4bool inElastic = InElasticCrossSectionInFirstInt113 // (availableEnergy, incidentCode, incidentTotalMomentum);114 // for unknown reasons, it has been replaced by the following code in Geant???115 109 116 110 G4bool inElastic = true; 117 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false;118 119 111 vecLength = 0; 120 112 … … 125 117 G4bool successful = false; 126 118 127 if(inElastic || (!inElastic && atomicWeight < 1.5)) { 128 129 // Split K0L into K0 and K0bar 130 if (G4UniformRand() < 0.5) 131 FirstIntInCasAntiKaonZero(inElastic, availableEnergy, pv, vecLength, 132 incidentParticle, targetParticle ); 133 else 134 FirstIntInCasKaonZero(inElastic, availableEnergy, pv, vecLength, 135 incidentParticle, targetParticle, atomicWeight ); 136 137 // Do nuclear interaction with either K0 or K0bar 138 if ((vecLength > 0) && (availableEnergy > 1.)) 139 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 140 pv, vecLength, 141 incidentParticle, targetParticle); 142 HighEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 if (!successful) 147 HighEnergyClusterProduction(successful, pv, vecLength, 148 excitationEnergyGNP, excitationEnergyDTA, 119 // Split K0L into K0 and K0bar 120 if (G4UniformRand() < 0.5) 121 FirstIntInCasAntiKaonZero(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle ); 123 else 124 FirstIntInCasKaonZero(inElastic, availableEnergy, pv, vecLength, 125 incidentParticle, targetParticle, atomicWeight ); 126 127 // Do nuclear interaction with either K0 or K0bar 128 if ((vecLength > 0) && (availableEnergy > 1.)) 129 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 130 pv, vecLength, 131 incidentParticle, targetParticle); 132 133 HighEnergyCascading(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 HighEnergyClusterProduction(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 if (!successful) 143 MediumEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 148 if (!successful) 149 MediumEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 149 151 incidentParticle, targetParticle, 150 152 atomicWeight, atomicNumber); 151 if (!successful) 152 MediumEnergyCascading(successful, pv, vecLength, 153 excitationEnergyGNP, excitationEnergyDTA, 154 incidentParticle, targetParticle, 155 atomicWeight, atomicNumber); 156 157 if (!successful) 158 MediumEnergyClusterProduction(successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 if (!successful) 163 QuasiElasticScattering(successful, pv, vecLength, 164 excitationEnergyGNP, excitationEnergyDTA, 165 incidentParticle, targetParticle, 166 atomicWeight, atomicNumber); 167 } 153 if (!successful) 154 QuasiElasticScattering(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 168 158 169 159 if (!successful) … … 193 183 delete [] pv; 194 184 theParticleChange.SetStatusChange(stopAndKill); 195 return & theParticleChange;185 return &theParticleChange; 196 186 } 197 187 198 188 199 189 void 200 G4HEKaonZeroShortInelastic::FirstIntInCasKaonZero(G4bool &inElastic,201 const G4double availableEnergy,202 G4HEVector pv[],203 G4int &vecLen,204 G4HEVectorincidentParticle,205 G4HEVectortargetParticle,206 const G4double atomicWeight)190 G4HEKaonZeroShortInelastic::FirstIntInCasKaonZero(G4bool& inElastic, 191 const G4double availableEnergy, 192 G4HEVector pv[], 193 G4int& vecLen, 194 const G4HEVector& incidentParticle, 195 const G4HEVector& targetParticle, 196 const G4double atomicWeight) 207 197 208 198 // Kaon0 undergoes interaction with nucleon within a nucleus. Check if it is … … 213 203 // protons/neutrons by kaons or strange baryons according to the average 214 204 // multiplicity per inelastic reaction. 215 216 205 { 217 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp218 static const G4double expxl = -expxu; // lower bound for arg. of exp206 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 207 static const G4double expxl = -expxu; // lower bound for arg. of exp 219 208 220 209 static const G4double protb = 0.7; … … 521 510 522 511 void 523 G4HEKaonZeroShortInelastic::FirstIntInCasAntiKaonZero(G4bool &inElastic,524 const G4double availableEnergy,525 G4HEVector pv[],526 G4int &vecLen,527 G4HEVectorincidentParticle,528 G4HEVector targetParticle)512 G4HEKaonZeroShortInelastic::FirstIntInCasAntiKaonZero(G4bool& inElastic, 513 const G4double availableEnergy, 514 G4HEVector pv[], 515 G4int& vecLen, 516 const G4HEVector& incidentParticle, 517 const G4HEVector& targetParticle) 529 518 530 519 // AntiKaon0 undergoes interaction with nucleon within a nucleus. Check if it is … … 535 524 // protons/neutrons by kaons or strange baryons according to the average 536 525 // multiplicity per inelastic reaction. 537 538 526 { 539 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp540 static const G4double expxl = -expxu; // lower bound for arg. of exp527 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 528 static const G4double expxl = -expxu; // lower bound for arg. of exp 541 529 542 530 static const G4double protb = 0.7; … … 544 532 static const G4double c = 1.25; 545 533 546 static const G4int numMul = 1200;547 static const G4int numSec = 60;534 static const G4int numMul = 1200; 535 static const G4int numSec = 60; 548 536 549 537 G4int neutronCode = Neutron.getCode(); … … 560 548 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 561 549 562 //misc. local variables563 //np = number of pi+, nm = number of pi-, nz = number of pi0550 // misc. local variables 551 // np = number of pi+, nm = number of pi-, nz = number of pi0 564 552 565 553 G4int i, counter, nt, np, nm, nz; 566 554 567 if (first) {555 if (first) { 568 556 // compute normalization constants, this will only be done once 569 557 first = false; -
trunk/source/processes/hadronic/models/high_energy/src/G4HELambdaInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HELambdaInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HELambdaInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HELambdaInelastic.hh" 46 43 47 G4HadFinalState * G4HELambdaInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HELambdaInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHELambdaInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HELambdaInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHELambdaInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HELambdaInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasLambda(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasLambda(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 FillParticleChange(pv, vecLength); 166 delete [] pv; 167 theParticleChange.SetStatusChange(stopAndKill); 168 return &theParticleChange; 169 } 170 193 171 194 172 void 195 G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)173 G4HELambdaInelastic::FirstIntInCasLambda(G4bool& inElastic, 174 const G4double availableEnergy, 175 G4HEVector pv[], 176 G4int& vecLen, 177 const G4HEVector& incidentParticle, 178 const G4HEVector& targetParticle, 179 const G4double atomicWeight) 202 180 203 181 // Lambda undergoes interaction with nucleon within a nucleus. Check if it is … … 208 186 // data. Replace some pions or protons/neutrons by kaons or strange baryons 209 187 // according to the average multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 // G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 188 { 189 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 190 static const G4double expxl = -expxu; // lower bound for arg. of exp 191 192 static const G4double protb = 0.7; 193 static const G4double neutb = 0.7; 194 static const G4double c = 1.25; 195 196 static const G4int numMul = 1200; 197 static const G4int numSec = 60; 198 199 G4int protonCode = Proton.getCode(); 200 201 G4int targetCode = targetParticle.getCode(); 202 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 203 204 static G4bool first = true; 205 static G4double protmul[numMul], protnorm[numSec]; // proton constants 206 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 207 208 // misc. local variables 209 // np = number of pi+, nm = number of pi-, nz = number of pi0 210 211 G4int i, counter, nt, np, nm, nz; 238 212 239 213 if( first ) -
trunk/source/processes/hadronic/models/high_energy/src/G4HENeutronInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HENeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HENeutronInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HENeutronInelastic.hh" 46 43 47 G4HadFinalState * G4HENeutronInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HENeutronInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHENeutronInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HENeutronInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHENeutronInelastic: incident energy < 1 GeV" << G4endl; 80 65 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 66 if (verboseLevel > 1) { 67 G4cout << "G4HENeutronInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 85 75 86 incidentKineticEnergy -= inelasticity; 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 87 80 88 G4double excitationEnergyGNP = 0.; 89 G4double excitationEnergyDTA = 0.; 90 91 G4double excitation = NuclearExcitation(incidentKineticEnergy, 92 atomicWeight, atomicNumber, 93 excitationEnergyGNP, 94 excitationEnergyDTA); 95 if(verboseLevel > 1) 96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 81 incidentKineticEnergy -= inelasticity; 82 83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 131 132 if(verboseLevel > 1) 133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 // In the original Gheisha code the inElastic flag was set as follows 113 // G4bool inElastic = InElasticCrossSectionInFirstInt 114 // (availableEnergy, incidentCode, incidentTotalMomentum); 115 // For unknown reasons, it has been replaced by the following code in Geant??? 116 // 117 G4bool inElastic = true; 118 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 119 120 vecLength = 0; 121 122 if (verboseLevel > 1) 123 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 124 << incidentCode << G4endl; 135 125 136 G4bool successful = false;126 G4bool successful = false; 137 127 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasNeutron(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 128 FirstIntInCasNeutron(inElastic, availableEnergy, pv, vecLength, 129 incidentParticle, targetParticle, atomicWeight); 130 131 if (verboseLevel > 1) 132 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 133 134 if ((vecLength > 0) && (availableEnergy > 1.)) 135 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 136 pv, vecLength, 137 incidentParticle, targetParticle); 138 139 HighEnergyCascading(successful, pv, vecLength, 140 excitationEnergyGNP, excitationEnergyDTA, 141 incidentParticle, targetParticle, 142 atomicWeight, atomicNumber); 143 if (!successful) 144 HighEnergyClusterProduction(successful, pv, vecLength, 145 excitationEnergyGNP, excitationEnergyDTA, 146 incidentParticle, targetParticle, 147 atomicWeight, atomicNumber); 148 if (!successful) 149 MediumEnergyCascading(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 154 if (!successful) 155 MediumEnergyClusterProduction(successful, pv, vecLength, 156 excitationEnergyGNP, excitationEnergyDTA, 157 incidentParticle, targetParticle, 158 atomicWeight, atomicNumber); 159 if (!successful) 160 QuasiElasticScattering(successful, pv, vecLength, 161 excitationEnergyGNP, excitationEnergyDTA, 162 incidentParticle, targetParticle, 163 atomicWeight, atomicNumber); 164 if (!successful) 165 ElasticScattering(successful, pv, vecLength, 166 incidentParticle, 167 atomicWeight, atomicNumber); 168 169 if (!successful) 170 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 171 << G4endl; 172 173 FillParticleChange(pv, vecLength); 174 delete [] pv; 175 theParticleChange.SetStatusChange(stopAndKill); 176 return &theParticleChange; 177 } 178 193 179 194 180 void 195 G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)181 G4HENeutronInelastic::FirstIntInCasNeutron(G4bool& inElastic, 182 const G4double availableEnergy, 183 G4HEVector pv[], 184 G4int& vecLen, 185 const G4HEVector& incidentParticle, 186 const G4HEVector& targetParticle, 187 const G4double atomicWeight) 202 188 203 189 // Neutron undergoes interaction with nucleon within a nucleus. Check if it is … … 208 194 // protons/neutrons by kaons or strange baryons according to the average 209 195 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.35; 216 static const G4double neutb = 0.35; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 196 { 197 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 198 static const G4double expxl = -expxu; // lower bound for arg. of exp 199 200 static const G4double protb = 0.35; 201 static const G4double neutb = 0.35; 202 static const G4double c = 1.25; 203 204 static const G4int numMul = 1200; 205 static const G4int numSec = 60; 206 207 G4int neutronCode = Neutron.getCode(); 208 G4int protonCode = Proton.getCode(); 209 210 G4int targetCode = targetParticle.getCode(); 211 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 212 213 static G4bool first = true; 214 static G4double protmul[numMul], protnorm[numSec]; // proton constants 215 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 216 217 // misc. local variables 218 // np = number of pi+, nm = number of pi-, nz = number of pi0 219 220 G4int i, counter, nt, np, nm, nz; 238 221 239 222 if( first ) 240 { // compute normalization constants, this will only be done once223 { // compute normalization constants, this will only be done once 241 224 first = false; 242 225 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEOmegaMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEOmegaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEOmegaMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEOmegaMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEOmegaMinusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEOmegaMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEOmegaMinusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEOmegaMinusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEOmegaMinusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEOmegaMinusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 80 75 81 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,82 atomicWeight, atomicNumber);83 if(verboseLevel > 1)84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasOmegaMinus(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasOmegaMinus(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 193 172 194 173 void 195 G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)174 G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle, 180 const G4double atomicWeight) 202 181 203 182 // Xi0 undergoes interaction with nucleon within a nucleus. Check if it is … … 208 187 // protons/neutrons by kaons or strange baryons according to the average 209 188 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 // G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 189 { 190 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 191 static const G4double expxl = -expxu; // lower bound for arg. of exp 192 193 static const G4double protb = 0.7; 194 static const G4double neutb = 0.7; 195 static const G4double c = 1.25; 196 197 static const G4int numMul = 1200; 198 static const G4int numSec = 60; 199 200 G4int protonCode = Proton.getCode(); 201 202 G4int targetCode = targetParticle.getCode(); 203 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 204 205 static G4bool first = true; 206 static G4double protmul[numMul], protnorm[numSec]; // proton constants 207 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 208 209 // misc. local variables 210 // np = number of pi+, nm = number of pi-, nz = number of pi0 211 212 G4int i, counter, nt, np, nm, nz; 238 213 239 214 if( first ) 240 { // compute normalization constants, this will only be done once215 { // compute normalization constants, this will only be done once 241 216 first = false; 242 217 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEPionMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HEPionMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 28 // 27 // $Id: G4HEPionMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $28 // GEANT4 tag $Name: geant4-09-03-ref-09 $29 30 29 // 11-OCT-2007 F.W. Jones: fixed incorrect Imax (should be Imin) in 31 30 // sampling of charge exchange. … … 35 34 #include "G4ios.hh" 36 35 37 //38 36 // G4 Process: Gheisha High Energy Collision model. 39 37 // This includes the high energy cascading model, the two-body-resonance model 40 // and the low energy two-body model. Not included are the low energy stuff like41 // nuclear reactions, nuclear fission without any cascading and all processes for42 // p articles at rest.38 // and the low energy two-body model. Not included are the low energy stuff 39 // like nuclear reactions, nuclear fission without any cascading and all 40 // processes for particles at rest. 43 41 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 44 42 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 47 45 #include "G4HEPionMinusInelastic.hh" 48 46 49 G4HadFinalState * G4HEPionMinusInelastic::50 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 51 {52 G4HEVector * pv = new G4HEVector[MAXPART]; 53 const G4HadProjectile *aParticle = &aTrack;54 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();55 const G4double A = targetNucleus.GetN();56 const G4double Z = targetNucleus.GetZ();57 G4HEVector incidentParticle(aParticle);47 G4HadFinalState* 48 G4HEPionMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 49 G4Nucleus& targetNucleus) 50 { 51 G4HEVector* pv = new G4HEVector[MAXPART]; 52 const G4HadProjectile* aParticle = &aTrack; 53 const G4double A = targetNucleus.GetN(); 54 const G4double Z = targetNucleus.GetZ(); 55 G4HEVector incidentParticle(aParticle); 58 56 59 G4double atomicNumber = Z; 60 G4double atomicWeight = A; 61 62 G4int incidentCode = incidentParticle.getCode(); 63 G4double incidentMass = incidentParticle.getMass(); 64 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 65 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 66 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 67 68 if(incidentKineticEnergy < 1.) 69 { 70 G4cout << "GHEPionMinusInelastic: incident energy < 1 GeV" << G4endl ; 71 } 72 if(verboseLevel > 1) 73 { 74 G4cout << "G4HEPionMinusInelastic::ApplyYourself" << G4endl; 75 G4cout << "incident particle " << incidentParticle.getName() 76 << "mass " << incidentMass 77 << "kinetic energy " << incidentKineticEnergy 78 << G4endl; 79 G4cout << "target material with (A,Z) = (" 80 << atomicWeight << "," << atomicNumber << ")" << G4endl; 81 } 82 83 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 84 atomicWeight, atomicNumber); 85 if(verboseLevel > 1) 86 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 87 88 incidentKineticEnergy -= inelasticity; 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if (incidentKineticEnergy < 1.) 67 G4cout << "GHEPionMinusInelastic: incident energy < 1 GeV" << G4endl; 68 69 if (verboseLevel > 1) { 70 G4cout << "G4HEPionMinusInelastic::ApplyYourself" << G4endl; 71 G4cout << "incident particle " << incidentParticle.getName() 72 << "mass " << incidentMass 73 << "kinetic energy " << incidentKineticEnergy 74 << G4endl; 75 G4cout << "target material with (A,Z) = (" 76 << atomicWeight << "," << atomicNumber << ")" << G4endl; 77 } 78 79 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 80 atomicWeight, atomicNumber); 81 if (verboseLevel > 1) 82 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 83 84 incidentKineticEnergy -= inelasticity; 89 85 90 G4double excitationEnergyGNP = 0.; 91 G4double excitationEnergyDTA = 0.; 92 93 G4double excitation = NuclearExcitation(incidentKineticEnergy, 94 atomicWeight, atomicNumber, 95 excitationEnergyGNP, 96 excitationEnergyDTA); 97 if(verboseLevel > 1) 98 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 99 << excitationEnergyDTA << G4endl; 100 101 102 incidentKineticEnergy -= excitation; 103 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 104 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 105 *(incidentTotalEnergy+incidentMass)); 106 107 G4HEVector targetParticle; 86 G4double excitationEnergyGNP = 0.; 87 G4double excitationEnergyDTA = 0.; 88 89 G4double excitation = NuclearExcitation(incidentKineticEnergy, 90 atomicWeight, atomicNumber, 91 excitationEnergyGNP, 92 excitationEnergyDTA); 93 if (verboseLevel > 1) 94 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 95 << excitationEnergyDTA << G4endl; 96 97 incidentKineticEnergy -= excitation; 98 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 99 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 100 *(incidentTotalEnergy+incidentMass)); 101 102 G4HEVector targetParticle; 108 103 109 if(G4UniformRand() < atomicNumber/atomicWeight) 110 { 111 targetParticle.setDefinition("Proton"); 112 } 113 else 114 { 115 targetParticle.setDefinition("Neutron"); 116 } 117 118 G4double targetMass = targetParticle.getMass(); 119 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 120 + 2.0*targetMass*incidentTotalEnergy); 121 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 122 123 // this was the meaning of inElastic in the 124 // original Gheisha stand-alone version. 125 // G4bool inElastic = InElasticCrossSectionInFirstInt 126 // (availableEnergy, incidentCode, incidentTotalMomentum); 127 // by unknown reasons, it has been replaced 128 // to the following code in Geant??? 129 G4bool inElastic = true; 130 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 131 132 vecLength = 0; 104 if (G4UniformRand() < atomicNumber/atomicWeight) { 105 targetParticle.setDefinition("Proton"); 106 } else { 107 targetParticle.setDefinition("Neutron"); 108 } 109 110 G4double targetMass = targetParticle.getMass(); 111 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 112 + targetMass*targetMass 113 + 2.0*targetMass*incidentTotalEnergy); 114 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 115 116 // The value of the inElastic flag was originally defined in the Gheisha 117 // stand-alone code as follows: 118 // G4bool inElastic = InElasticCrossSectionInFirstInt 119 // (availableEnergy, incidentCode, incidentTotalMomentum); 120 // For unknown reasons, it was replaced by the following code in Geant 121 122 G4bool inElastic = true; 123 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 124 125 vecLength = 0; 133 126 134 if(verboseLevel > 1)135 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "127 if (verboseLevel > 1) 128 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 136 129 << incidentCode << G4endl; 137 130 138 G4bool successful = false;131 G4bool successful = false; 139 132 140 if(inElastic || (!inElastic && atomicWeight < 1.5)) 141 { 142 FirstIntInCasPionMinus(inElastic, availableEnergy, pv, vecLength, 143 incidentParticle, targetParticle); 144 145 if(verboseLevel > 1) 146 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 147 148 149 if ((vecLength > 0) && (availableEnergy > 1.)) 150 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 151 pv, vecLength, 152 incidentParticle, targetParticle); 153 HighEnergyCascading( successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 HighEnergyClusterProduction( successful, pv, vecLength, 159 excitationEnergyGNP, excitationEnergyDTA, 160 incidentParticle, targetParticle, 161 atomicWeight, atomicNumber); 162 if (!successful) 163 MediumEnergyCascading( successful, pv, vecLength, 164 excitationEnergyGNP, excitationEnergyDTA, 165 incidentParticle, targetParticle, 166 atomicWeight, atomicNumber); 167 168 if (!successful) 169 MediumEnergyClusterProduction( successful, pv, vecLength, 170 excitationEnergyGNP, excitationEnergyDTA, 171 incidentParticle, targetParticle, 172 atomicWeight, atomicNumber); 173 if (!successful) 174 QuasiElasticScattering( successful, pv, vecLength, 175 excitationEnergyGNP, excitationEnergyDTA, 176 incidentParticle, targetParticle, 177 atomicWeight, atomicNumber); 178 } 179 if (!successful) 180 { 181 ElasticScattering( successful, pv, vecLength, 182 incidentParticle, 183 atomicWeight, atomicNumber); 184 } 185 186 if (!successful) 187 { 188 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 189 } 190 FillParticleChange(pv, vecLength); 191 delete [] pv; 192 theParticleChange.SetStatusChange(stopAndKill); 193 return & theParticleChange; 194 } 133 FirstIntInCasPionMinus(inElastic, availableEnergy, pv, vecLength, 134 incidentParticle, targetParticle); 135 136 if (verboseLevel > 1) 137 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 138 139 if ((vecLength > 0) && (availableEnergy > 1.)) 140 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 141 pv, vecLength, 142 incidentParticle, targetParticle); 143 144 HighEnergyCascading(successful, pv, vecLength, 145 excitationEnergyGNP, excitationEnergyDTA, 146 incidentParticle, targetParticle, 147 atomicWeight, atomicNumber); 148 if (!successful) 149 HighEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 MediumEnergyCascading(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 158 159 if (!successful) 160 MediumEnergyClusterProduction(successful, pv, vecLength, 161 excitationEnergyGNP, excitationEnergyDTA, 162 incidentParticle, targetParticle, 163 atomicWeight, atomicNumber); 164 if (!successful) 165 QuasiElasticScattering(successful, pv, vecLength, 166 excitationEnergyGNP, excitationEnergyDTA, 167 incidentParticle, targetParticle, 168 atomicWeight, atomicNumber); 169 if (!successful) 170 ElasticScattering(successful, pv, vecLength, 171 incidentParticle, 172 atomicWeight, atomicNumber); 173 174 if (!successful) 175 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 176 << G4endl; 177 178 FillParticleChange(pv, vecLength); 179 delete [] pv; 180 theParticleChange.SetStatusChange(stopAndKill); 181 return &theParticleChange; 182 } 183 195 184 196 185 void 197 G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,198 const G4double availableEnergy,199 G4HEVector pv[],200 G4int &vecLen,201 G4HEVectorincidentParticle,202 G4HEVectortargetParticle)186 G4HEPionMinusInelastic::FirstIntInCasPionMinus(G4bool& inElastic, 187 const G4double availableEnergy, 188 G4HEVector pv[], 189 G4int& vecLen, 190 const G4HEVector& incidentParticle, 191 const G4HEVector& targetParticle) 203 192 204 193 // Pion- undergoes interaction with nucleon within a nucleus. Check if it is … … 209 198 // protons/neutrons by kaons or strange baryons according to the average 210 199 // multiplicity per inelastic reaction. 211 212 { 213 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 214 static const G4double expxl = -expxu; // lower bound for arg. of exp 215 216 static const G4double protb = 0.7; 217 static const G4double neutb = 0.7; 218 static const G4double c = 1.25; 219 220 static const G4int numMul = 1200; 221 static const G4int numSec = 60; 222 223 // G4int neutronCode = Neutron.getCode(); 224 G4int protonCode = Proton.getCode(); 225 226 G4int targetCode = targetParticle.getCode(); 227 // G4double incidentMass = incidentParticle.getMass(); 228 // G4double incidentEnergy = incidentParticle.getEnergy(); 229 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 230 231 static G4bool first = true; 232 static G4double protmul[numMul], protnorm[numSec]; // proton constants 233 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 234 235 // misc. local variables 236 // np = number of pi+, nm = number of pi-, nz = number of pi0 237 238 G4int i, counter, nt, np, nm, nz; 200 { 201 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 202 static const G4double expxl = -expxu; // lower bound for arg. of exp 203 204 static const G4double protb = 0.7; 205 static const G4double neutb = 0.7; 206 static const G4double c = 1.25; 207 208 static const G4int numMul = 1200; 209 static const G4int numSec = 60; 210 211 G4int protonCode = Proton.getCode(); 212 213 G4int targetCode = targetParticle.getCode(); 214 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 215 216 static G4bool first = true; 217 static G4double protmul[numMul], protnorm[numSec]; // proton constants 218 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 219 220 // misc. local variables 221 // np = number of pi+, nm = number of pi-, nz = number of pi0 222 223 G4int i, counter, nt, np, nm, nz; 239 224 240 225 if( first ) 241 { // compute normalization constants, this will only be done once226 { // compute normalization constants, this will only be done once 242 227 first = false; 243 228 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEPionPlusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEPionPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEPionPlusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEPionPlusInelastic.hh" 46 43 47 G4HadFinalState * G4HEPionPlusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEPionPlusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "G4HEPionPlusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEPionPlusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "G4HEPionPlusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEPionPlusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 114 vecLength = 0; 131 115 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "116 if (verboseLevel > 1) 117 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 118 << incidentCode << G4endl; 135 119 136 G4bool successful = false;120 G4bool successful = false; 137 121 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasPionPlus(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 189 FillParticleChange(pv, vecLength); 190 delete [] pv; 191 theParticleChange.SetStatusChange(stopAndKill); 192 return & theParticleChange; 193 } 122 FirstIntInCasPionPlus(inElastic, availableEnergy, pv, vecLength, 123 incidentParticle, targetParticle, atomicWeight); 124 125 if (verboseLevel > 1) 126 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 127 128 if ((vecLength > 0) && (availableEnergy > 1.)) 129 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 130 pv, vecLength, 131 incidentParticle, targetParticle); 132 133 HighEnergyCascading(successful, pv, vecLength, 134 excitationEnergyGNP, excitationEnergyDTA, 135 incidentParticle, targetParticle, 136 atomicWeight, atomicNumber); 137 if (!successful) 138 HighEnergyClusterProduction(successful, pv, vecLength, 139 excitationEnergyGNP, excitationEnergyDTA, 140 incidentParticle, targetParticle, 141 atomicWeight, atomicNumber); 142 if (!successful) 143 MediumEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 148 if (!successful) 149 MediumEnergyClusterProduction(successful, pv, vecLength, 150 excitationEnergyGNP, excitationEnergyDTA, 151 incidentParticle, targetParticle, 152 atomicWeight, atomicNumber); 153 if (!successful) 154 QuasiElasticScattering(successful, pv, vecLength, 155 excitationEnergyGNP, excitationEnergyDTA, 156 incidentParticle, targetParticle, 157 atomicWeight, atomicNumber); 158 if (!successful) 159 ElasticScattering(successful, pv, vecLength, 160 incidentParticle, 161 atomicWeight, atomicNumber); 162 163 if (!successful) 164 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 165 << G4endl; 166 167 FillParticleChange(pv, vecLength); 168 delete [] pv; 169 theParticleChange.SetStatusChange(stopAndKill); 170 return &theParticleChange; 171 } 172 194 173 195 174 void 196 G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,197 const G4double availableEnergy,198 G4HEVector pv[],199 G4int &vecLen,200 G4HEVectorincidentParticle,201 G4HEVectortargetParticle,202 const G4double atomicWeight)175 G4HEPionPlusInelastic::FirstIntInCasPionPlus(G4bool& inElastic, 176 const G4double availableEnergy, 177 G4HEVector pv[], 178 G4int& vecLen, 179 const G4HEVector& incidentParticle, 180 const G4HEVector& targetParticle, 181 const G4double atomicWeight) 203 182 204 183 // Pion+ undergoes interaction with nucleon within a nucleus. Check if it is … … 209 188 // protons/neutrons by kaons or strange baryons according to the average 210 189 // multiplicity per inelastic reaction. 211 212 { 213 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 214 static const G4double expxl = -expxu; // lower bound for arg. of exp 215 216 static const G4double protb = 0.7; 217 static const G4double neutb = 0.7; 218 static const G4double c = 1.25; 219 220 static const G4int numMul = 1200; 221 static const G4int numSec = 60; 222 223 G4int neutronCode = Neutron.getCode(); 224 G4int protonCode = Proton.getCode(); 225 G4double pionMass = PionPlus.getMass(); 226 227 G4int targetCode = targetParticle.getCode(); 228 // G4double incidentMass = incidentParticle.getMass(); 229 // G4double incidentEnergy = incidentParticle.getEnergy(); 230 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 231 232 static G4bool first = true; 233 static G4double protmul[numMul], protnorm[numSec]; // proton constants 234 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 235 236 // misc. local variables 237 // np = number of pi+, nm = number of pi-, nz = number of pi0 238 239 G4int i, counter, nt, np, nm, nz; 190 { 191 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 192 static const G4double expxl = -expxu; // lower bound for arg. of exp 193 194 static const G4double protb = 0.7; 195 static const G4double neutb = 0.7; 196 static const G4double c = 1.25; 197 198 static const G4int numMul = 1200; 199 static const G4int numSec = 60; 200 201 G4int neutronCode = Neutron.getCode(); 202 G4int protonCode = Proton.getCode(); 203 G4double pionMass = PionPlus.getMass(); 204 205 G4int targetCode = targetParticle.getCode(); 206 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 207 208 static G4bool first = true; 209 static G4double protmul[numMul], protnorm[numSec]; // proton constants 210 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 211 212 // misc. local variables 213 // np = number of pi+, nm = number of pi-, nz = number of pi0 214 215 G4int i, counter, nt, np, nm, nz; 240 216 241 217 if( first ) 242 { // compute normalization constants, this will only be done once218 { // compute normalization constants, this will only be done once 243 219 first = false; 244 220 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEProtonInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEProtonInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEProtonInelastic.cc,v 1.16 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEProtonInelastic.hh" 46 43 47 G4HadFinalState * G4HEProtonInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEProtonInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 if(verboseLevel > 1) 61 G4cout << "Z , A = " << atomicNumber << " " << atomicWeight << G4endl; 62 63 G4int incidentCode = incidentParticle.getCode(); 64 G4double incidentMass = incidentParticle.getMass(); 65 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 66 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 67 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 68 69 if(incidentKineticEnergy < 1.) 70 { 71 G4cout << "GHEProtonInelastic: incident energy < 1 GeV" << G4endl; 72 } 73 if(verboseLevel > 1) 74 { 75 G4cout << "G4HEProtonInelastic::ApplyYourself" << G4endl; 76 G4cout << "incident particle " << incidentParticle.getName() << " " 77 << "mass " << incidentMass << " " 78 << "kinetic energy " << incidentKineticEnergy 79 << G4endl; 80 G4cout << "target material with (A,Z) = (" 81 << atomicWeight << "," << atomicNumber << ")" << G4endl; 82 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 if (verboseLevel > 1) 58 G4cout << "Z , A = " << atomicNumber << " " << atomicWeight << G4endl; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentParticle.getKineticEnergy(); 65 66 if (incidentKineticEnergy < 1.) 67 G4cout << "GHEProtonInelastic: incident energy < 1 GeV" << G4endl; 68 69 if (verboseLevel > 1) { 70 G4cout << "G4HEProtonInelastic::ApplyYourself" << G4endl; 71 G4cout << "incident particle " << incidentParticle.getName() << " " 72 << "mass " << incidentMass << " " 73 << "kinetic energy " << incidentKineticEnergy 74 << G4endl; 75 G4cout << "target material with (A,Z) = (" 76 << atomicWeight << "," << atomicNumber << ")" << G4endl; 77 } 83 78 84 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,85 atomicWeight, atomicNumber);86 if(verboseLevel > 1)87 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;88 89 incidentKineticEnergy -= inelasticity;79 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 80 atomicWeight, atomicNumber); 81 if (verboseLevel > 1) 82 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 83 84 incidentKineticEnergy -= inelasticity; 90 85 91 G4double excitationEnergyGNP = 0.; 92 G4double excitationEnergyDTA = 0.; 93 94 G4double excitation = NuclearExcitation(incidentKineticEnergy, 95 atomicWeight, atomicNumber, 96 excitationEnergyGNP, 97 excitationEnergyDTA); 98 99 if(verboseLevel > 1) 100 G4cout << "nuclear excitation = " << excitation << " " << excitationEnergyGNP << " " 101 << excitationEnergyDTA << G4endl; 102 103 104 incidentKineticEnergy -= excitation; 105 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 106 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 107 *(incidentTotalEnergy+incidentMass)); 108 109 110 G4HEVector targetParticle; 111 if(G4UniformRand() < atomicNumber/atomicWeight) 112 { 113 targetParticle.setDefinition("Proton"); 114 } 115 else 116 { 117 targetParticle.setDefinition("Neutron"); 118 } 119 120 G4double targetMass = targetParticle.getMass(); 121 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 122 + 2.0*targetMass*incidentTotalEnergy); 123 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 124 125 // this was the meaning of inElastic in the 126 // original Gheisha stand-alone version. 127 // G4bool inElastic = InElasticCrossSectionInFirstInt 128 // (availableEnergy, incidentCode, incidentTotalMomentum); 129 // by unknown reasons, it has been replaced 130 // to the following code in Geant??? 131 G4bool inElastic = true; 132 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 133 134 vecLength = 0; 86 G4double excitationEnergyGNP = 0.; 87 G4double excitationEnergyDTA = 0.; 88 89 G4double excitation = NuclearExcitation(incidentKineticEnergy, 90 atomicWeight, atomicNumber, 91 excitationEnergyGNP, 92 excitationEnergyDTA); 93 94 if (verboseLevel > 1) 95 G4cout << "nuclear excitation = " << excitation << " " 96 << excitationEnergyGNP << " " << excitationEnergyDTA << G4endl; 97 98 incidentKineticEnergy -= excitation; 99 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 100 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 101 *(incidentTotalEnergy+incidentMass)); 102 103 G4HEVector targetParticle; 104 if (G4UniformRand() < atomicNumber/atomicWeight) { 105 targetParticle.setDefinition("Proton"); 106 } else { 107 targetParticle.setDefinition("Neutron"); 108 } 109 110 G4double targetMass = targetParticle.getMass(); 111 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 112 + targetMass*targetMass 113 + 2.0*targetMass*incidentTotalEnergy); 114 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 115 116 // In the original Gheisha code, the inElastic flag was defined as follows: 117 // G4bool inElastic = InElasticCrossSectionInFirstInt 118 // (availableEnergy, incidentCode, incidentTotalMomentum); 119 // For unknown reasons, it was replaced by the following code in Geant??? 120 121 G4bool inElastic = true; 122 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 123 124 vecLength = 0; 135 125 136 if(verboseLevel > 1)137 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "126 if (verboseLevel > 1) 127 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 138 128 << incidentCode << G4endl; 139 129 140 G4bool successful = false;130 G4bool successful = false; 141 131 142 if(inElastic || (!inElastic && atomicWeight < 1.5)) 143 { 144 FirstIntInCasProton(inElastic, availableEnergy, pv, vecLength, 145 incidentParticle, targetParticle, atomicWeight); 146 147 if(verboseLevel > 1) 148 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 149 150 151 if ((vecLength > 0) && (availableEnergy > 1.)) 152 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 153 pv, vecLength, 154 incidentParticle, targetParticle); 155 HighEnergyCascading( successful, pv, vecLength, 156 excitationEnergyGNP, excitationEnergyDTA, 157 incidentParticle, targetParticle, 158 atomicWeight, atomicNumber); 159 if (!successful) 160 HighEnergyClusterProduction( successful, pv, vecLength, 161 excitationEnergyGNP, excitationEnergyDTA, 162 incidentParticle, targetParticle, 163 atomicWeight, atomicNumber); 164 if (!successful) 165 MediumEnergyCascading( successful, pv, vecLength, 166 excitationEnergyGNP, excitationEnergyDTA, 167 incidentParticle, targetParticle, 168 atomicWeight, atomicNumber); 169 170 if (!successful) 171 MediumEnergyClusterProduction( successful, pv, vecLength, 172 excitationEnergyGNP, excitationEnergyDTA, 173 incidentParticle, targetParticle, 174 atomicWeight, atomicNumber); 175 if (!successful) 176 QuasiElasticScattering( successful, pv, vecLength, 177 excitationEnergyGNP, excitationEnergyDTA, 178 incidentParticle, targetParticle, 179 atomicWeight, atomicNumber); 180 } 181 if (!successful) 182 { 183 ElasticScattering( successful, pv, vecLength, 184 incidentParticle, 185 atomicWeight, atomicNumber); 186 } 187 188 if (!successful) 189 { 190 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 191 } 192 FillParticleChange(pv, vecLength); 193 delete [] pv; 194 theParticleChange.SetStatusChange(stopAndKill); 195 return & theParticleChange; 196 } 132 FirstIntInCasProton(inElastic, availableEnergy, pv, vecLength, 133 incidentParticle, targetParticle, atomicWeight); 134 135 if (verboseLevel > 1) 136 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 137 138 if ((vecLength > 0) && (availableEnergy > 1.)) 139 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 140 pv, vecLength, 141 incidentParticle, targetParticle); 142 143 HighEnergyCascading(successful, pv, vecLength, 144 excitationEnergyGNP, excitationEnergyDTA, 145 incidentParticle, targetParticle, 146 atomicWeight, atomicNumber); 147 if (!successful) 148 HighEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 MediumEnergyCascading(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 158 if (!successful) 159 MediumEnergyClusterProduction(successful, pv, vecLength, 160 excitationEnergyGNP, excitationEnergyDTA, 161 incidentParticle, targetParticle, 162 atomicWeight, atomicNumber); 163 if (!successful) 164 QuasiElasticScattering(successful, pv, vecLength, 165 excitationEnergyGNP, excitationEnergyDTA, 166 incidentParticle, targetParticle, 167 atomicWeight, atomicNumber); 168 if (!successful) 169 ElasticScattering(successful, pv, vecLength, 170 incidentParticle, 171 atomicWeight, atomicNumber); 172 173 if (!successful) 174 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 175 << G4endl; 176 177 FillParticleChange(pv, vecLength); 178 delete [] pv; 179 theParticleChange.SetStatusChange(stopAndKill); 180 return &theParticleChange; 181 } 182 197 183 198 184 void 199 G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,200 const G4double availableEnergy,201 G4HEVector pv[],202 G4int &vecLen,203 G4HEVectorincidentParticle,204 G4HEVectortargetParticle,205 const G4double atomicWeight)185 G4HEProtonInelastic::FirstIntInCasProton(G4bool& inElastic, 186 const G4double availableEnergy, 187 G4HEVector pv[], 188 G4int& vecLen, 189 const G4HEVector& incidentParticle, 190 const G4HEVector& targetParticle, 191 const G4double atomicWeight) 206 192 207 193 // Proton undergoes interaction with nucleon within a nucleus. Check if it is … … 212 198 // protons/neutrons by kaons or strange baryons according to the average 213 199 // multiplicity per inelastic reaction. 214 215 { 216 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 217 static const G4double expxl = -expxu; // lower bound for arg. of exp 218 219 static const G4double protb = 0.7; 220 static const G4double neutb = 0.35; 221 static const G4double c = 1.25; 222 223 static const G4int numMul = 1200; 224 static const G4int numSec = 60; 225 226 G4int neutronCode = Neutron.getCode(); 227 G4int protonCode = Proton.getCode(); 228 G4double pionMass = PionPlus.getMass(); 229 230 G4int targetCode = targetParticle.getCode(); 231 // G4double incidentMass = incidentParticle.getMass(); 232 // G4double incidentEnergy = incidentParticle.getEnergy(); 233 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 234 235 static G4bool first = true; 236 static G4double protmul[numMul], protnorm[numSec]; // proton constants 237 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 238 239 // misc. local variables 240 // np = number of pi+, nm = number of pi-, nz = number of pi0 241 242 G4int i, counter, nt, np, nm, nz; 243 244 if( first ) 245 { // compute normalization constants, this will only be done once 246 first = false; 247 for( i=0; i<numMul; i++ )protmul[i] = 0.0; 248 for( i=0; i<numSec; i++ )protnorm[i] = 0.0; 249 counter = -1; 250 for( np=0; np<(numSec/3); np++ ) 251 { 252 for( nm=Imax(0,np-2); nm<=np; nm++ ) 253 { 254 for( nz=0; nz<numSec/3; nz++ ) 255 { 256 if( ++counter < numMul ) 257 { 258 nt = np+nm+nz; 259 if( (nt>0) && (nt<=numSec) ) 260 { 261 protmul[counter] = pmltpc(np,nm,nz,nt,protb,c) 262 /(Factorial(2-np+nm)*Factorial(np-nm)) ; 263 protnorm[nt-1] += protmul[counter]; 264 } 265 } 266 } 267 } 200 { 201 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 202 static const G4double expxl = -expxu; // lower bound for arg. of exp 203 204 static const G4double protb = 0.7; 205 static const G4double neutb = 0.35; 206 static const G4double c = 1.25; 207 208 static const G4int numMul = 1200; 209 static const G4int numSec = 60; 210 211 G4int neutronCode = Neutron.getCode(); 212 G4int protonCode = Proton.getCode(); 213 G4double pionMass = PionPlus.getMass(); 214 215 G4int targetCode = targetParticle.getCode(); 216 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 217 218 static G4bool first = true; 219 static G4double protmul[numMul], protnorm[numSec]; // proton constants 220 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 221 222 // misc. local variables 223 // np = number of pi+, nm = number of pi-, nz = number of pi0 224 225 G4int i, counter, nt, np, nm, nz; 226 227 if (first) { 228 // compute normalization constants, this will only be done once 229 first = false; 230 for (i=0; i<numMul; i++) protmul[i] = 0.0; 231 for (i=0; i<numSec; i++) protnorm[i] = 0.0; 232 counter = -1; 233 for (np=0; np<(numSec/3); np++) { 234 for (nm=Imax(0,np-2); nm<=np; nm++) { 235 for (nz=0; nz<numSec/3; nz++) { 236 if (++counter < numMul) { 237 nt = np+nm+nz; 238 if ( (nt>0) && (nt<=numSec) ) { 239 protmul[counter] = pmltpc(np,nm,nz,nt,protb,c) 240 /(Factorial(2-np+nm)*Factorial(np-nm)) ; 241 protnorm[nt-1] += protmul[counter]; 242 } 268 243 } 269 for( i=0; i<numMul; i++ )neutmul[i] = 0.0; 270 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0; 271 counter = -1; 272 for( np=0; np<numSec/3; np++ ) 273 { 274 for( nm=Imax(0,np-1); nm<=(np+1); nm++ ) 275 { 276 for( nz=0; nz<numSec/3; nz++ ) 277 { 278 if( ++counter < numMul ) 279 { 280 nt = np+nm+nz; 281 if( (nt>0) && (nt<=numSec) ) 282 { 283 neutmul[counter] = pmltpc(np,nm,nz,nt,neutb,c) 284 /(Factorial(1-np+nm)*Factorial(1+np-nm)); 285 neutnorm[nt-1] += neutmul[counter]; 286 } 287 } 288 } 289 } 244 } 245 } 246 } 247 248 for( i=0; i<numMul; i++ )neutmul[i] = 0.0; 249 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0; 250 counter = -1; 251 for (np=0; np<numSec/3; np++) { 252 for (nm=Imax(0,np-1); nm<=(np+1); nm++) { 253 for (nz=0; nz<numSec/3; nz++) { 254 if (++counter < numMul) { 255 nt = np+nm+nz; 256 if ( (nt>0) && (nt<=numSec) ) { 257 neutmul[counter] = pmltpc(np,nm,nz,nt,neutb,c) 258 /(Factorial(1-np+nm)*Factorial(1+np-nm)); 259 neutnorm[nt-1] += neutmul[counter]; 260 } 290 261 } 291 for( i=0; i<numSec; i++ ) 292 { 293 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i]; 294 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i]; 295 } 296 } // end of initialization 262 } 263 } 264 } 265 for (i=0; i<numSec; i++) { 266 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i]; 267 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i]; 268 } 269 } // end of initialization 297 270 298 271 299 // initialize the first two places300 // the same as beam and target301 pv[0] = incidentParticle;302 pv[1] = targetParticle;303 vecLen = 2;272 // initialize the first two places 273 // the same as beam and target 274 pv[0] = incidentParticle; 275 pv[1] = targetParticle; 276 vecLen = 2; 304 277 305 278 if( !inElastic ) -
trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HESigmaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HESigmaMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HESigmaMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HESigmaMinusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HESigmaMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHESigmaMinusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HESigmaMinusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 86 incidentKineticEnergy -= inelasticity; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHESigmaMinusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HESigmaMinusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 80 81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.; 89 G4double excitationEnergyDTA = 0.; 90 91 G4double excitation = NuclearExcitation(incidentKineticEnergy, 92 atomicWeight, atomicNumber, 93 excitationEnergyGNP, 94 excitationEnergyDTA); 95 if(verboseLevel > 1) 96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 << excitationEnergyDTA << G4endl; 98 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 92 << excitationEnergyDTA << G4endl; 93 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasSigmaMinus(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasSigmaMinus(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 193 172 194 173 void 195 G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)174 G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle, 180 const G4double atomicWeight) 202 181 203 182 // Sigma- undergoes interaction with nucleon within a nucleus. Check if it is … … 208 187 // protons/neutrons by kaons or strange baryons according to the average 209 188 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 189 { 190 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 191 static const G4double expxl = -expxu; // lower bound for arg. of exp 192 193 static const G4double protb = 0.7; 194 static const G4double neutb = 0.7; 195 static const G4double c = 1.25; 196 197 static const G4int numMul = 1200; 198 static const G4int numSec = 60; 199 200 G4int neutronCode = Neutron.getCode(); 201 G4int protonCode = Proton.getCode(); 202 203 G4int targetCode = targetParticle.getCode(); 204 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 205 206 static G4bool first = true; 207 static G4double protmul[numMul], protnorm[numSec]; // proton constants 208 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 209 210 // misc. local variables 211 // np = number of pi+, nm = number of pi-, nz = number of pi0 212 213 G4int i, counter, nt, np, nm, nz; 238 214 239 215 if( first ) 240 { // compute normalization constants, this will only be done once216 { // compute normalization constants, this will only be done once 241 217 first = false; 242 218 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaPlusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HESigmaPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HESigmaPlusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HESigmaPlusInelastic.hh" 46 43 47 G4HadFinalState * G4HESigmaPlusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HESigmaPlusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHESigmaPlusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HESigmaPlusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 86 incidentKineticEnergy -= inelasticity; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHESigmaPlusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HESigmaPlusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 80 81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.; 89 G4double excitationEnergyDTA = 0.; 90 91 G4double excitation = NuclearExcitation(incidentKineticEnergy, 92 atomicWeight, atomicNumber, 93 excitationEnergyGNP, 94 excitationEnergyDTA); 95 if(verboseLevel > 1) 96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 << excitationEnergyDTA << G4endl; 98 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 92 << excitationEnergyDTA << G4endl; 93 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasSigmaPlus(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasSigmaPlus(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 193 172 194 173 void 195 G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)174 G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle, 180 const G4double atomicWeight) 202 181 203 182 // Sigma+ undergoes interaction with nucleon within a nucleus. Check if it is … … 208 187 // protons/neutrons by kaons or strange baryons according to the average 209 188 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 // G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 189 { 190 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 191 static const G4double expxl = -expxu; // lower bound for arg. of exp 192 193 static const G4double protb = 0.7; 194 static const G4double neutb = 0.7; 195 static const G4double c = 1.25; 196 197 static const G4int numMul = 1200; 198 static const G4int numSec = 60; 199 200 G4int protonCode = Proton.getCode(); 201 202 G4int targetCode = targetParticle.getCode(); 203 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 204 205 static G4bool first = true; 206 static G4double protmul[numMul], protnorm[numSec]; // proton constants 207 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 208 209 // misc. local variables 210 // np = number of pi+, nm = number of pi-, nz = number of pi0 211 212 G4int i, counter, nt, np, nm, nz; 238 213 239 214 if( first ) 240 { // compute normalization constants, this will only be done once215 { // compute normalization constants, this will only be done once 241 216 first = false; 242 217 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaZeroInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HESigmaZeroInelastic.cc,v 1.11 2006/06/29 20:30:44 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HESigmaZeroInelastic.cc,v 1.12 2010/11/20 04:01:33 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 46 43 #include "G4Gamma.hh" 47 44 48 G4HadFinalState * G4HESigmaZeroInelastic::49 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 50 {51 G4HEVector * pv = new G4HEVector[MAXPART]; 52 const G4HadProjectile *aParticle = &aTrack;53 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();54 G4HEVector incidentParticle(aParticle);45 G4HadFinalState* 46 G4HESigmaZeroInelastic::ApplyYourself(const G4HadProjectile& aTrack, 47 G4Nucleus& targetNucleus) 48 { 49 G4HEVector* pv = new G4HEVector[MAXPART]; 50 const G4HadProjectile* aParticle = &aTrack; 51 G4HEVector incidentParticle(aParticle); 55 52 56 G4HELambdaInelastic theLambdaInelastic;57 theLambdaInelastic.SetMaxNumberOfSecondaries(MAXPART);58 theLambdaInelastic.SetVerboseLevel(verboseLevel);53 G4HELambdaInelastic theLambdaInelastic; 54 theLambdaInelastic.SetMaxNumberOfSecondaries(MAXPART); 55 theLambdaInelastic.SetVerboseLevel(verboseLevel); 59 56 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double pgam = G4UniformRand()*incidentTotalMomentum*0.75; 62 G4HEVector incidentLambda; 63 incidentLambda.SmulAndUpdate( incidentParticle, 64 (incidentTotalMomentum - pgam)/incidentTotalMomentum); 65 G4DynamicParticle * aLambda = new G4DynamicParticle(); 66 aLambda->SetDefinition(G4Lambda::Lambda()); 67 aLambda->SetMomentum(incidentLambda.getMomentum()); 68 G4HadProjectile aLambdaTrack(*aLambda); 69 G4HadFinalState * result = theLambdaInelastic.ApplyYourself(aLambdaTrack, targetNucleus); 70 vecLength = theLambdaInelastic.GetNumberOfSecondaries(); 57 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 58 G4double pgam = G4UniformRand()*incidentTotalMomentum*0.75; 59 G4HEVector incidentLambda; 60 incidentLambda.SmulAndUpdate(incidentParticle, 61 (incidentTotalMomentum - pgam)/incidentTotalMomentum); 62 G4DynamicParticle* aLambda = new G4DynamicParticle(); 63 aLambda->SetDefinition(G4Lambda::Lambda()); 64 aLambda->SetMomentum(incidentLambda.getMomentum()); 65 G4HadProjectile aLambdaTrack(*aLambda); 66 G4HadFinalState* result = 67 theLambdaInelastic.ApplyYourself(aLambdaTrack, targetNucleus); 68 vecLength = theLambdaInelastic.GetNumberOfSecondaries(); 71 69 72 pv[vecLength] = Gamma; 73 pv[vecLength].setMomentum(incidentParticle.getMomentum()); 74 pv[vecLength].SmulAndUpdate( pv[vecLength],pgam/incidentTotalMomentum); 75 G4DynamicParticle * aPhoton = new G4DynamicParticle(); 76 aPhoton->SetDefinition(G4Gamma::Gamma()); 77 aPhoton->SetMomentum(pv[vecLength].getMomentum()); 78 result->AddSecondary(aPhoton); 79 delete [] pv; 80 return result; 81 } 82 70 pv[vecLength] = Gamma; 71 pv[vecLength].setMomentum(incidentParticle.getMomentum()); 72 pv[vecLength].SmulAndUpdate( pv[vecLength],pgam/incidentTotalMomentum); 73 G4DynamicParticle* aPhoton = new G4DynamicParticle(); 74 aPhoton->SetDefinition(G4Gamma::Gamma()); 75 aPhoton->SetMomentum(pv[vecLength].getMomentum()); 76 result->AddSecondary(aPhoton); 77 delete [] pv; 78 return result; 79 } 83 80 84 85 86 87 88 89 90 -
trunk/source/processes/hadronic/models/high_energy/src/G4HEVector.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4HEVector.cc,v 1.2 0 2006/11/22 23:52:32dennis Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4HEVector.cc,v 1.22 2010/11/29 05:44:44 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 164 164 } 165 165 166 G4double 167 G4HEVector::getTotalMomentum() 168 { 169 return std::sqrt(px*px + py*py + pz*pz); 170 } 166 G4double G4HEVector::getTotalMomentum() const 167 { 168 return std::sqrt(px*px + py*py + pz*pz); 169 } 171 170 172 171 void 173 G4HEVector::setMomentum( G4double x, G4double y, G4double z)174 {175 px = x;176 py = y;177 pz = z;178 return;179 }180 181 void 182 G4HEVector::setMomentumAndUpdate( G4double x, G4double y, G4double z)183 {184 px = x;185 py = y;186 pz = z;187 energy= std::sqrt(mass*mass + px*px + py*py + pz*pz);188 kineticEnergy = Amax(0.,energy-mass);189 return;190 }191 192 void 193 G4HEVector::setMomentum( G4double x, G4double y)194 {195 px = x;196 py = y;197 return;198 }172 G4HEVector::setMomentum(G4double x, G4double y, G4double z) 173 { 174 px = x; 175 py = y; 176 pz = z; 177 return; 178 } 179 180 void 181 G4HEVector::setMomentumAndUpdate(G4double x, G4double y, G4double z) 182 { 183 px = x; 184 py = y; 185 pz = z; 186 energy = std::sqrt(mass*mass + px*px + py*py + pz*pz); 187 kineticEnergy = Amax(0.,energy-mass); 188 return; 189 } 190 191 void 192 G4HEVector::setMomentum(G4double x, G4double y) 193 { 194 px = x; 195 py = y; 196 return; 197 } 199 198 200 199 void … … 312 311 } 313 312 314 G4double 315 G4HEVector::getEnergy() 316 { 317 return energy; 318 } 319 320 G4double 321 G4HEVector::getKineticEnergy() 322 { 323 return kineticEnergy; 324 } 313 G4double G4HEVector::getEnergy() const 314 { 315 return energy; 316 } 317 318 G4double G4HEVector::getKineticEnergy() const 319 { 320 return kineticEnergy; 321 } 325 322 326 323 void … … 367 364 } 368 365 369 G4double 370 G4HEVector::getMass() 371 { 372 return mass; 373 } 366 G4double G4HEVector::getMass() const 367 { 368 return mass; 369 } 374 370 375 371 void … … 380 376 } 381 377 382 G4double 383 G4HEVector::getCharge() 384 { 385 return charge; 386 } 378 G4double G4HEVector::getCharge() const 379 { 380 return charge; 381 } 387 382 388 383 void … … 433 428 } 434 429 435 G4int 436 G4HEVector::getCode() 437 { 438 return code; 439 } 440 441 G4String 442 G4HEVector::getName() 443 { 444 return particleName; 445 } 446 447 G4String 448 G4HEVector::getType() 449 { 450 return particleType; 451 } 430 G4int G4HEVector::getCode() const 431 { 432 return code; 433 } 434 435 G4String G4HEVector::getName() const 436 { 437 return particleName; 438 } 439 440 G4String G4HEVector::getType() const 441 { 442 return particleType; 443 } 452 444 453 G4int 454 G4HEVector::getBaryonNumber() 455 { 456 return baryon; 457 } 458 459 G4int 460 G4HEVector::getStrangenessNumber() 461 { 462 return strangeness; 463 } 445 G4int G4HEVector::getBaryonNumber() const 446 { 447 return baryon; 448 } 449 450 G4int G4HEVector::getStrangenessNumber() const 451 { 452 return strangeness; 453 } 454 464 455 G4int 465 456 G4HEVector::getQuarkContent(G4int flavor) … … 589 580 } 590 581 591 G4double 592 G4HEVector::CosAng( const G4HEVector & p ) 593 { 594 G4double a = std::sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) ); 595 if( a != 0.0 ) 596 { 597 a = (px*p.px + py*p.py + pz*p.pz)/a; 598 if( std::fabs(a) > 1.0 ) 599 { 600 if(a<0.0) a=-1.0; 601 else a=1.0; 602 } 603 } 604 return a; 605 } 582 G4double G4HEVector::CosAng(const G4HEVector& p) const 583 { 584 G4double a = std::sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) ); 585 if (a != 0.0) { 586 a = (px*p.px + py*p.py + pz*p.pz)/a; 587 if (std::fabs(a) > 1.0) { 588 if (a < 0.0) a = -1.0; 589 else a = 1.0; 590 } 591 } 592 return a; 593 } 606 594 607 595 G4double … … 725 713 } 726 714 727 G4double 728 G4HEVector::Length() 729 { 730 return std::sqrt(px*px + py*py + pz*pz); 731 } 715 G4double G4HEVector::Length() const 716 { 717 return std::sqrt(px*px + py*py + pz*pz); 718 } 732 719 733 720 void … … 1297 1284 } 1298 1285 1299 void 1300 G4HEVector::Print( G4int L) 1301 { 1302 G4cout << "HEV: " 1303 << L << " " << px << " " << py << " " << pz << " " 1304 << energy << " " << mass << " " << charge << " " 1305 << timeOfFlight << " " << side << " " << flag << " " 1306 << code << " " << baryon << " " << particleName << G4endl; 1307 /* 1308 printf("HEV: %3d %6f.2 %6f.2 %6f.2 %6f.2 %6f.2 %3f.0 %4f.1 %3d 1309 %3d %6d %6d %s \n", L, px, py, pz, energy, mass, charge, 1310 timeOfFlight, side, flag, code, baryon, particleName); 1311 */ 1312 return; 1313 } 1314 1286 void G4HEVector::Print(G4int L) const 1287 { 1288 G4cout << "HEV: " 1289 << L << " " << px << " " << py << " " << pz << " " 1290 << energy << " " << mass << " " << charge << " " 1291 << timeOfFlight << " " << side << " " << flag << " " 1292 << code << " " << baryon << " " << particleName << G4endl; 1293 return; 1294 } -
trunk/source/processes/hadronic/models/high_energy/src/G4HEXiMinusInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEXiMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEXiMinusInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEXiMinusInelastic.hh" 46 43 47 G4HadFinalState * G4HEXiMinusInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEXiMinusInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEXiMinusInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEXiMinusInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEXiMinusInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEXiMinusInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 80 75 81 G4double inelasticity= NuclearInelasticity(incidentKineticEnergy,82 atomicWeight, atomicNumber);83 if(verboseLevel > 1)84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl;76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasXiMinus(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasXiMinus(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 193 172 194 173 void 195 G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)174 G4HEXiMinusInelastic::FirstIntInCasXiMinus(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle, 180 const G4double atomicWeight) 202 181 203 182 // Xi0 undergoes interaction with nucleon within a nucleus. Check if it is … … 208 187 // protons/neutrons by kaons or strange baryons according to the average 209 188 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 189 { 190 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 191 static const G4double expxl = -expxu; // lower bound for arg. of exp 192 193 static const G4double protb = 0.7; 194 static const G4double neutb = 0.7; 195 static const G4double c = 1.25; 196 197 static const G4int numMul = 1200; 198 static const G4int numSec = 60; 199 200 G4int neutronCode = Neutron.getCode(); 201 G4int protonCode = Proton.getCode(); 202 203 G4int targetCode = targetParticle.getCode(); 204 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 205 206 static G4bool first = true; 207 static G4double protmul[numMul], protnorm[numSec]; // proton constants 208 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 209 210 // misc. local variables 211 // np = number of pi+, nm = number of pi-, nz = number of pi0 212 213 G4int i, counter, nt, np, nm, nz; 238 214 239 215 if( first ) 240 { // compute normalization constants, this will only be done once216 { // compute normalization constants, this will only be done once 241 217 first = false; 242 218 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/high_energy/src/G4HEXiZeroInelastic.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4HEXiZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 // 26 // $Id: G4HEXiZeroInelastic.cc,v 1.17 2010/11/29 05:44:44 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 30 28 // 31 29 … … 33 31 #include "G4ios.hh" 34 32 35 //36 33 // G4 Process: Gheisha High Energy Collision model. 37 34 // This includes the high energy cascading model, the two-body-resonance model 38 // and the low energy two-body model. Not included are the low energy stuff like39 // nuclear reactions, nuclear fission without any cascading and all processes for40 // p articles at rest.35 // and the low energy two-body model. Not included are the low energy stuff 36 // like nuclear reactions, nuclear fission without any cascading and all 37 // processes for particles at rest. 41 38 // First work done by J.L.Chuma and F.W.Jones, TRIUMF, June 96. 42 39 // H. Fesefeldt, RWTH-Aachen, 23-October-1996 … … 45 42 #include "G4HEXiZeroInelastic.hh" 46 43 47 G4HadFinalState * G4HEXiZeroInelastic::48 ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus ) 49 {50 G4HEVector * pv = new G4HEVector[MAXPART]; 51 const G4HadProjectile *aParticle = &aTrack;52 // G4DynamicParticle *originalTarget = targetNucleus.ReturnTargetParticle();53 const G4double A = targetNucleus.GetN();54 const G4double Z = targetNucleus.GetZ();55 G4HEVector incidentParticle(aParticle);44 G4HadFinalState* 45 G4HEXiZeroInelastic::ApplyYourself(const G4HadProjectile& aTrack, 46 G4Nucleus& targetNucleus) 47 { 48 G4HEVector* pv = new G4HEVector[MAXPART]; 49 const G4HadProjectile* aParticle = &aTrack; 50 const G4double A = targetNucleus.GetN(); 51 const G4double Z = targetNucleus.GetZ(); 52 G4HEVector incidentParticle(aParticle); 56 53 57 G4double atomicNumber = Z; 58 G4double atomicWeight = A; 59 60 G4int incidentCode = incidentParticle.getCode(); 61 G4double incidentMass = incidentParticle.getMass(); 62 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 63 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 64 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 65 66 if(incidentKineticEnergy < 1.) 67 { 68 G4cout << "GHEXiZeroInelastic: incident energy < 1 GeV" << G4endl; 69 } 70 if(verboseLevel > 1) 71 { 72 G4cout << "G4HEXiZeroInelastic::ApplyYourself" << G4endl; 73 G4cout << "incident particle " << incidentParticle.getName() 74 << "mass " << incidentMass 75 << "kinetic energy " << incidentKineticEnergy 76 << G4endl; 77 G4cout << "target material with (A,Z) = (" 78 << atomicWeight << "," << atomicNumber << ")" << G4endl; 79 } 80 81 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 82 atomicWeight, atomicNumber); 83 if(verboseLevel > 1) 84 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 54 G4double atomicNumber = Z; 55 G4double atomicWeight = A; 56 57 G4int incidentCode = incidentParticle.getCode(); 58 G4double incidentMass = incidentParticle.getMass(); 59 G4double incidentTotalEnergy = incidentParticle.getEnergy(); 60 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 61 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass; 62 63 if (incidentKineticEnergy < 1.) 64 G4cout << "GHEXiZeroInelastic: incident energy < 1 GeV" << G4endl; 65 66 if (verboseLevel > 1) { 67 G4cout << "G4HEXiZeroInelastic::ApplyYourself" << G4endl; 68 G4cout << "incident particle " << incidentParticle.getName() 69 << "mass " << incidentMass 70 << "kinetic energy " << incidentKineticEnergy 71 << G4endl; 72 G4cout << "target material with (A,Z) = (" 73 << atomicWeight << "," << atomicNumber << ")" << G4endl; 74 } 75 76 G4double inelasticity = NuclearInelasticity(incidentKineticEnergy, 77 atomicWeight, atomicNumber); 78 if (verboseLevel > 1) 79 G4cout << "nuclear inelasticity = " << inelasticity << G4endl; 85 80 86 incidentKineticEnergy -= inelasticity;81 incidentKineticEnergy -= inelasticity; 87 82 88 G4double excitationEnergyGNP = 0.;89 G4double excitationEnergyDTA = 0.;90 91 G4double excitation= NuclearExcitation(incidentKineticEnergy,92 atomicWeight, atomicNumber,93 excitationEnergyGNP,94 excitationEnergyDTA);95 if(verboseLevel > 1)96 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP83 G4double excitationEnergyGNP = 0.; 84 G4double excitationEnergyDTA = 0.; 85 86 G4double excitation = NuclearExcitation(incidentKineticEnergy, 87 atomicWeight, atomicNumber, 88 excitationEnergyGNP, 89 excitationEnergyDTA); 90 if (verboseLevel > 1) 91 G4cout << "nuclear excitation = " << excitation << excitationEnergyGNP 97 92 << excitationEnergyDTA << G4endl; 98 93 99 100 incidentKineticEnergy -= excitation; 101 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 102 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 103 *(incidentTotalEnergy+incidentMass)); 104 105 106 G4HEVector targetParticle; 107 if(G4UniformRand() < atomicNumber/atomicWeight) 108 { 109 targetParticle.setDefinition("Proton"); 110 } 111 else 112 { 113 targetParticle.setDefinition("Neutron"); 114 } 115 116 G4double targetMass = targetParticle.getMass(); 117 G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass 118 + 2.0*targetMass*incidentTotalEnergy); 119 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 120 121 // this was the meaning of inElastic in the 122 // original Gheisha stand-alone version. 123 // G4bool inElastic = InElasticCrossSectionInFirstInt 124 // (availableEnergy, incidentCode, incidentTotalMomentum); 125 // by unknown reasons, it has been replaced 126 // to the following code in Geant??? 127 G4bool inElastic = true; 128 // if (G4UniformRand() < elasticCrossSection/totalCrossSection) inElastic = false; 129 130 vecLength = 0; 94 incidentKineticEnergy -= excitation; 95 incidentTotalEnergy = incidentKineticEnergy + incidentMass; 96 incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass) 97 *(incidentTotalEnergy+incidentMass)); 98 99 G4HEVector targetParticle; 100 if (G4UniformRand() < atomicNumber/atomicWeight) { 101 targetParticle.setDefinition("Proton"); 102 } else { 103 targetParticle.setDefinition("Neutron"); 104 } 105 106 G4double targetMass = targetParticle.getMass(); 107 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass 108 + targetMass*targetMass 109 + 2.0*targetMass*incidentTotalEnergy); 110 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass; 111 112 G4bool inElastic = true; 113 vecLength = 0; 131 114 132 if(verboseLevel > 1)133 G4cout << "ApplyYourself: CallFirstIntInCascade for particle "115 if (verboseLevel > 1) 116 G4cout << "ApplyYourself: CallFirstIntInCascade for particle " 134 117 << incidentCode << G4endl; 135 118 136 G4bool successful = false;119 G4bool successful = false; 137 120 138 if(inElastic || (!inElastic && atomicWeight < 1.5)) 139 { 140 FirstIntInCasXiZero(inElastic, availableEnergy, pv, vecLength, 141 incidentParticle, targetParticle, atomicWeight); 142 143 if(verboseLevel > 1) 144 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 145 146 147 if ((vecLength > 0) && (availableEnergy > 1.)) 148 StrangeParticlePairProduction( availableEnergy, centerOfMassEnergy, 149 pv, vecLength, 150 incidentParticle, targetParticle); 151 HighEnergyCascading( successful, pv, vecLength, 152 excitationEnergyGNP, excitationEnergyDTA, 153 incidentParticle, targetParticle, 154 atomicWeight, atomicNumber); 155 if (!successful) 156 HighEnergyClusterProduction( successful, pv, vecLength, 157 excitationEnergyGNP, excitationEnergyDTA, 158 incidentParticle, targetParticle, 159 atomicWeight, atomicNumber); 160 if (!successful) 161 MediumEnergyCascading( successful, pv, vecLength, 162 excitationEnergyGNP, excitationEnergyDTA, 163 incidentParticle, targetParticle, 164 atomicWeight, atomicNumber); 165 166 if (!successful) 167 MediumEnergyClusterProduction( successful, pv, vecLength, 168 excitationEnergyGNP, excitationEnergyDTA, 169 incidentParticle, targetParticle, 170 atomicWeight, atomicNumber); 171 if (!successful) 172 QuasiElasticScattering( successful, pv, vecLength, 173 excitationEnergyGNP, excitationEnergyDTA, 174 incidentParticle, targetParticle, 175 atomicWeight, atomicNumber); 176 } 177 if (!successful) 178 { 179 ElasticScattering( successful, pv, vecLength, 180 incidentParticle, 181 atomicWeight, atomicNumber); 182 } 183 184 if (!successful) 185 { 186 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl; 187 } 188 FillParticleChange(pv, vecLength); 189 delete [] pv; 190 theParticleChange.SetStatusChange(stopAndKill); 191 return & theParticleChange; 192 } 121 FirstIntInCasXiZero(inElastic, availableEnergy, pv, vecLength, 122 incidentParticle, targetParticle, atomicWeight); 123 124 if (verboseLevel > 1) 125 G4cout << "ApplyYourself::StrangeParticlePairProduction" << G4endl; 126 127 if ((vecLength > 0) && (availableEnergy > 1.)) 128 StrangeParticlePairProduction(availableEnergy, centerOfMassEnergy, 129 pv, vecLength, 130 incidentParticle, targetParticle); 131 132 HighEnergyCascading(successful, pv, vecLength, 133 excitationEnergyGNP, excitationEnergyDTA, 134 incidentParticle, targetParticle, 135 atomicWeight, atomicNumber); 136 if (!successful) 137 HighEnergyClusterProduction(successful, pv, vecLength, 138 excitationEnergyGNP, excitationEnergyDTA, 139 incidentParticle, targetParticle, 140 atomicWeight, atomicNumber); 141 if (!successful) 142 MediumEnergyCascading(successful, pv, vecLength, 143 excitationEnergyGNP, excitationEnergyDTA, 144 incidentParticle, targetParticle, 145 atomicWeight, atomicNumber); 146 147 if (!successful) 148 MediumEnergyClusterProduction(successful, pv, vecLength, 149 excitationEnergyGNP, excitationEnergyDTA, 150 incidentParticle, targetParticle, 151 atomicWeight, atomicNumber); 152 if (!successful) 153 QuasiElasticScattering(successful, pv, vecLength, 154 excitationEnergyGNP, excitationEnergyDTA, 155 incidentParticle, targetParticle, 156 atomicWeight, atomicNumber); 157 if (!successful) 158 ElasticScattering(successful, pv, vecLength, 159 incidentParticle, 160 atomicWeight, atomicNumber); 161 162 if (!successful) 163 G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" 164 << G4endl; 165 166 FillParticleChange(pv, vecLength); 167 delete [] pv; 168 theParticleChange.SetStatusChange(stopAndKill); 169 return &theParticleChange; 170 } 171 193 172 194 173 void 195 G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,196 const G4double availableEnergy,197 G4HEVector pv[],198 G4int &vecLen,199 G4HEVectorincidentParticle,200 G4HEVectortargetParticle,201 const G4double atomicWeight)174 G4HEXiZeroInelastic::FirstIntInCasXiZero(G4bool& inElastic, 175 const G4double availableEnergy, 176 G4HEVector pv[], 177 G4int& vecLen, 178 const G4HEVector& incidentParticle, 179 const G4HEVector& targetParticle, 180 const G4double atomicWeight) 202 181 203 182 // Xi0 undergoes interaction with nucleon within a nucleus. Check if it is … … 208 187 // protons/neutrons by kaons or strange baryons according to the average 209 188 // multiplicity per inelastic reaction. 210 211 { 212 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 213 static const G4double expxl = -expxu; // lower bound for arg. of exp 214 215 static const G4double protb = 0.7; 216 static const G4double neutb = 0.7; 217 static const G4double c = 1.25; 218 219 static const G4int numMul = 1200; 220 static const G4int numSec = 60; 221 222 // G4int neutronCode = Neutron.getCode(); 223 G4int protonCode = Proton.getCode(); 224 225 G4int targetCode = targetParticle.getCode(); 226 // G4double incidentMass = incidentParticle.getMass(); 227 // G4double incidentEnergy = incidentParticle.getEnergy(); 228 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 229 230 static G4bool first = true; 231 static G4double protmul[numMul], protnorm[numSec]; // proton constants 232 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 233 234 // misc. local variables 235 // np = number of pi+, nm = number of pi-, nz = number of pi0 236 237 G4int i, counter, nt, np, nm, nz; 189 { 190 static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp 191 static const G4double expxl = -expxu; // lower bound for arg. of exp 192 193 static const G4double protb = 0.7; 194 static const G4double neutb = 0.7; 195 static const G4double c = 1.25; 196 197 static const G4int numMul = 1200; 198 static const G4int numSec = 60; 199 200 G4int protonCode = Proton.getCode(); 201 202 G4int targetCode = targetParticle.getCode(); 203 G4double incidentTotalMomentum = incidentParticle.getTotalMomentum(); 204 205 static G4bool first = true; 206 static G4double protmul[numMul], protnorm[numSec]; // proton constants 207 static G4double neutmul[numMul], neutnorm[numSec]; // neutron constants 208 209 // misc. local variables 210 // np = number of pi+, nm = number of pi-, nz = number of pi0 211 212 G4int i, counter, nt, np, nm, nz; 238 213 239 214 if( first ) 240 { // compute normalization constants, this will only be done once215 { // compute normalization constants, this will only be done once 241 216 first = false; 242 217 for( i=0; i<numMul; i++ )protmul[i] = 0.0; -
trunk/source/processes/hadronic/models/incl/GNUmakefile
r1340 r1347 1 # $Id: GNUmakefile,v 1.1 1 2010/10/26 02:47:58kaitanie Exp $1 # $Id: GNUmakefile,v 1.13 2010/11/13 00:08:36 kaitanie Exp $ 2 2 # ----------------------------------------------------------- 3 3 # GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96. … … 36 36 -I$(G4BASE)/processes/hadronic/models/management/include \ 37 37 -I$(G4BASE)/processes/hadronic/models/util/include \ 38 -I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \ 38 39 -I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \ 39 40 -I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \ 41 -I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \ 42 -I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \ 43 -I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include \ 44 -I$(G4BASE)/processes/hadronic/models/de_excitation/management/include \ 45 -I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include/ \ 40 46 -I$(G4BASE)/particles/management/include \ 41 47 -I$(G4BASE)/particles/leptons/include \ -
trunk/source/processes/hadronic/models/incl/History
r1340 r1347 4 4 Geant4 - an Object-Oriented Toolkit for Physics Simulation 5 5 ========================================================== 6 $Id: History,v 1.3 2 2010/10/29 06:54:23 gunterExp $6 $Id: History,v 1.37 2010/11/17 20:19:09 kaitanie Exp $ 7 7 --------------------------------------------------------------------- 8 8 … … 17 17 --------------------------------------------------------------- 18 18 19 17 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-10) 20 --------------------------------------------------------- 21 - Fixed several issues reported by Coverity: 22 o Fix: Fragment vector and Fermi break-up related emory leaks in 23 INCL/ABLA interfaces 24 o Initialize INCL internal variables properly 25 o Check array boundaries in datafile reader 26 27 16 November 2010 - Gabriele Cosmo (hadr-incl-V09-03-09) 28 ------------------------------------------------------- 29 - More minor fixes from Coverity reports... 30 31 12 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-08) 32 --------------------------------------------------------- 33 - Fixed several minor variable initialization issues reported by Coverity 34 35 11 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-07) 36 --------------------------------------------------------- 37 - Fixed some minor variable initialization issues reported by Coverity 38 - Updated interfaces: 39 o INCL + built-in ABLA de-excitation: G4InclAblaCascadeInterface and 40 G4InclAblaLightIonInterface 41 o INCL + PreCompound model: G4InclCascadeInterface and 42 G4InclLightIonInterface 43 44 03 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-06) 45 --------------------------------------------------------- 46 - Fixed insufficient array index safeguard in ABLA 47 - Silenced debugging output printed by G4InclAblaCascadeInterface 48 19 49 29 October 2010 - Gunter Folger (hadr-incl-V09-03-05) 50 ----------------------------------------------------- 20 51 - Fixed several more compilation warnings for conversion of double to int 21 52 in G4Incl.cc, G4InclAblaCascadeInterface.cc, and G4InclAblaLightIonInterface.cc. -
trunk/source/processes/hadronic/models/incl/include/G4Abla.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4Abla.hh,v 1.1 3 2010/10/26 02:47:59 kaitanie Exp $26 // $Id: G4Abla.hh,v 1.14 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 50 50 public: 51 51 /** 52 * Basic constructor.53 */54 G4Abla();55 56 /**57 52 * This constructor is used by standalone test driver and the Geant4 interface. 58 53 * … … 62 57 */ 63 58 G4Abla(G4Hazard *aHazard, G4Volant *aVolant, G4VarNtp *aVarntp); 64 65 /**66 * Constructor that is to be used only for testing purposes.67 * @param aHazard random seeds68 * @param aVolant data structure for ABLA output69 */70 G4Abla(G4Hazard *hazard, G4Volant *volant);71 59 72 60 /** … … 167 155 G4double *probp_par, G4double *probn_par, G4double *proba_par, 168 156 G4double *probf_par, G4double *ptotl_par, G4double *sn_par, G4double *sbp_par, G4double *sba_par, G4double *ecn_par, 169 G4double *ecp_par,G4double *eca_par, G4double *bp_par, G4double *ba_par, G4int inttype, G4int inum, G4int itest);157 G4double *ecp_par,G4double *eca_par, G4double *bp_par, G4double *ba_par, G4int, G4int inum, G4int itest); 170 158 171 159 /** -
trunk/source/processes/hadronic/models/incl/include/G4AblaDataDefs.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4AblaDataDefs.hh,v 1.1 1 2010/10/26 02:47:59kaitanie Exp $26 // $Id: G4AblaDataDefs.hh,v 1.13 2010/11/13 00:08:36 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 95 95 * 96 96 */ 97 G4Ald() {}; 97 G4Ald() 98 :av(0.0), as(0.0), ak(0.0), optafan(0.0) 99 {}; 98 100 ~G4Ald() {}; 99 101 … … 141 143 142 144 public: 143 G4Fiss() {}; 145 G4Fiss() 146 :akap(0.0), bet(0.0), homega(0.0), koeff(0.0), ifis(0.0), 147 optshp(0), optxfis(0), optles(0), optcol(0) 148 {}; 144 149 ~G4Fiss() {}; 145 150 … … 171 176 172 177 public: 173 G4Opt() {}; 178 G4Opt() 179 :optemd(0), optcha(0), eefac(0.0) 180 {}; 174 181 ~G4Opt() {}; 175 182 … … 182 189 class G4Eenuc { 183 190 public: 184 G4Eenuc() {}; 191 G4Eenuc() { 192 for(G4int i = 0; i < EENUCSIZE; ++i) { 193 she[i] = 0.0; 194 } 195 for(G4int i = 0; i < XHESIZE; ++i) { 196 for(G4int j = 0; j < EENUCSIZE; ++j) { 197 xhe[i][j] = 0.0; 198 } 199 } 200 }; 185 201 ~G4Eenuc() {}; 186 202 -
trunk/source/processes/hadronic/models/incl/include/G4Incl.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4Incl.hh,v 1.1 8 2010/10/26 02:47:59kaitanie Exp $26 // $Id: G4Incl.hh,v 1.19 2010/11/13 00:08:36 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 688 688 private: 689 689 690 /* 691 * (Re)Initialize INCL internal variables 692 */ 693 void clearState(); 694 690 695 /** 691 696 * Random seeds for INCL4 internal random number generators. -
trunk/source/processes/hadronic/models/incl/include/G4InclAblaCascadeInterface.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclAblaCascadeInterface.hh,v 1. 9 2010/10/26 02:47:59kaitanie Exp $26 // $Id: G4InclAblaCascadeInterface.hh,v 1.11 2010/11/13 00:08:36 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 91 91 * 92 92 * @see G4InclAblaLightIonInterface 93 * @see G4InclCascadeInterface 93 94 */ 94 95 -
trunk/source/processes/hadronic/models/incl/include/G4InclAblaDataFile.hh
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclAblaDataFile.hh,v 1. 3 2010/06/14 16:10:01 gcosmoExp $26 // $Id: G4InclAblaDataFile.hh,v 1.4 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 52 52 private: 53 53 G4int verboseLevel; 54 55 G4String *dataPath;56 54 }; 57 55 -
trunk/source/processes/hadronic/models/incl/include/G4InclCascadeInterface.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclCascadeInterface.hh,v 1. 6 2010/10/26 02:47:59kaitanie Exp $26 // $Id: G4InclCascadeInterface.hh,v 1.8 2010/11/13 00:08:36 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 59 59 #include "G4AblaDataDefs.hh" 60 60 #include "G4Incl.hh" 61 #include "G4InclInput.hh" 61 62 // Geant4 de-excitation 63 #include "G4ExcitationHandler.hh" 64 #include "G4PreCompoundModel.hh" 62 65 63 66 #include <fstream> … … 67 70 68 71 /** 72 * <h1>INCL intra-nuclear cascade with Geant4 PreCompound for de-excitation</h1> 73 * 69 74 * Interface for INCL. This interface handles basic hadron 70 75 * bullet particles (protons, neutrons, pions). 71 * @see G4InclAblaLightIonInterface 76 * 77 * Example usage in case of protons: 78 * @code 79 * G4InclCascadeInterface* inclModel = new G4InclCascadeInterface; 80 * inclModel -> SetMinEnergy(0.0 * MeV); // Set the energy limits 81 * inclModel -> SetMaxEnergy(3.0 * GeV); 82 * 83 * G4ProtonInelasticProcess* protonInelasticProcess = new G4ProtonInelasticProcess(); 84 * G4ProtonInelasticCrossSection* protonInelasticCrossSection = new G4ProtonInelasticCrossSection(); 85 * 86 * protonInelasticProcess -> RegisterMe(inclModel); 87 * protonInelasticProcess -> AddDataSet(protonInelasticCrossSection); 88 * 89 * particle = G4Proton::Proton(); 90 * processManager = particle -> GetProcessManager(); 91 * processManager -> AddDiscreteProcess(protonInelasticProcess); 92 * @endcode 93 * The same setup procedure is needed for neutron and pion inelastic processes 94 * as well. 95 * 96 * @see G4InclLightIonInterface 72 97 */ 73 98 … … 78 103 * Basic constructor. 79 104 */ 80 G4InclCascadeInterface( );105 G4InclCascadeInterface(const G4String& name = "INCL Cascade with Geant4 PreCompound"); 81 106 82 107 … … 94 119 95 120 /** 96 * Main method to apply the INCL /ABLAphysics model.121 * Main method to apply the INCL physics model. 97 122 * @param aTrack the projectile particle 98 123 * @param theNucleus target nucleus 99 * @return the output of the INCL /ABLAphysics model124 * @return the output of the INCL physics model 100 125 */ 101 126 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus); … … 108 133 G4Hazard *hazard; // The random seeds used by INCL. 109 134 G4VarNtp *varntp; 110 G4InclInput * inclInput;135 G4InclInput *calincl; 111 136 G4Ws *ws; 112 137 G4Mat *mat; 113 138 G4Incl *incl; 114 139 115 140 G4HadFinalState theResult; 116 141 ofstream diagdata; … … 119 144 G4double previousTargetA; 120 145 G4double previousTargetZ; 146 147 G4ExcitationHandler *theExcitationHandler; 148 G4PreCompoundModel *thePrecoModel; 121 149 }; 122 150 123 #endif // G4INCL CASCADEINTERFACE_H151 #endif // G4INCLABLACASCADEINTERFACE_H -
trunk/source/processes/hadronic/models/incl/include/G4InclDataDefs.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclDataDefs.hh,v 1.1 0 2010/10/28 15:35:50 gcosmoExp $26 // $Id: G4InclDataDefs.hh,v 1.12 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 63 63 class G4QuadvectProjo { 64 64 public: 65 G4QuadvectProjo() {}; 65 G4QuadvectProjo() { 66 for(G4int i = 0; i < max_a_proj; ++i) { 67 eps_c[i] = 0.0; 68 t_c[i] = 0.0; 69 p3_c[i] = 0.0; 70 p1_s[i] = 0.0; 71 p2_s[i] = 0.0; 72 p3_s[i] = 0.0; 73 } 74 }; 75 66 76 ~G4QuadvectProjo() {}; 67 77 … … 73 83 class G4VBe { 74 84 public: 75 G4VBe() {}; 85 G4VBe() 86 :ia_be(0), iz_be(0), 87 rms_be(0.0), pms_be(0.0), bind_be(0.0) 88 { }; 89 76 90 ~G4VBe() {}; 77 91 … … 87 101 G4InclProjSpect() { 88 102 // G4cout <<"Projectile spectator data structure created!" << G4endl; 103 clear(); 89 104 }; 90 105 ~G4InclProjSpect() {}; … … 95 110 a_projspec = 0; 96 111 z_projspec = 0; 97 m_projspec = 0.0;112 t_projspec = 0.0; 98 113 ex_projspec = 0.0; 99 114 p1_projspec = 0.0; 100 115 p2_projspec = 0.0; 101 116 p3_projspec = 0.0; 117 m_projspec = 0.0; 102 118 }; 103 119 … … 108 124 }; 109 125 110 #define FSIZE 15111 /**112 * Initial values of a hadronic cascade problem.113 */114 class G4Calincl {115 public:116 G4Calincl() {117 isExtendedProjectile = false;118 };119 120 G4Calincl(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus, G4bool inverseKinematics = false) {121 for(int i = 0; i < 15; i++) {122 f[i] = 0.0; // Initialize INCL input data123 }124 125 usingInverseKinematics = inverseKinematics;126 127 f[0] = theNucleus.GetA_asInt(); // Target mass number128 f[1] = theNucleus.GetZ_asInt(); // Target charge number129 f[6] = getBulletType(aTrack.GetDefinition()); // Projectile type (INCL particle code)130 f[2] = aTrack.GetKineticEnergy() / MeV; // Projectile energy (total, in MeV)131 f[5] = 1.0; // Time scaling132 f[4] = 45.0; // Nuclear potential133 setExtendedProjectileInfo(aTrack.GetDefinition());134 // G4cout <<"Projectile type = " << f[6] << G4endl;135 // G4cout <<"Energy = " << f[2] << G4endl;136 // G4cout <<"Target A = " << f[0] << " Z = " << f[1] << G4endl;137 };138 139 ~G4Calincl() {};140 141 static void printProjectileTargetInfo(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) {142 G4cout <<"Projectile = " << aTrack.GetDefinition()->GetParticleName() << G4endl;143 G4cout <<" four-momentum: " << aTrack.Get4Momentum() << G4endl;144 G4cout <<"Energy = " << aTrack.GetKineticEnergy() / MeV << G4endl;145 G4cout <<"Target A = " << theNucleus.GetA_asInt() << " Z = " << theNucleus.GetZ_asInt() << G4endl;146 }147 148 static G4bool canUseInverseKinematics(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) {149 G4int targetA = theNucleus.GetA_asInt();150 const G4ParticleDefinition *projectileDef = aTrack.GetDefinition();151 G4int projectileA = projectileDef->GetAtomicMass();152 // G4int projectileZ = projectileDef->GetAtomicNumber();153 if(targetA > 0 && targetA < 18 && (projectileDef != G4Proton::Proton() &&154 projectileDef != G4Neutron::Neutron() &&155 projectileDef != G4PionPlus::PionPlus() &&156 projectileDef != G4PionZero::PionZero() &&157 projectileDef != G4PionMinus::PionMinus()) &&158 projectileA > 1) {159 return true;160 } else {161 return false;162 }163 }164 165 G4double bulletE() {166 return f[2];167 }168 169 G4int getBulletType() {170 return G4int(f[6]);171 };172 173 void setExtendedProjectileInfo(const G4ParticleDefinition *pd) {174 if(getBulletType(pd) == -666) {175 extendedProjectileA = pd->GetAtomicMass();176 extendedProjectileZ = pd->GetAtomicNumber();177 isExtendedProjectile = true;178 } else {179 isExtendedProjectile = false;180 }181 };182 183 G4int getBulletType(const G4ParticleDefinition *pd) {184 G4ParticleTable *pt = G4ParticleTable::GetParticleTable();185 186 if(pd == G4Proton::Proton()) {187 return 1;188 } else if(pd == G4Neutron::Neutron()) {189 return 2;190 } else if(pd == G4PionPlus::PionPlus()) {191 return 3;192 } else if(pd == G4PionMinus::PionMinus()) {193 return 5;194 } else if(pd == G4PionZero::PionZero()) {195 return 4;196 } else if(pd == G4Deuteron::Deuteron()) {197 return 6;198 } else if(pd == G4Triton::Triton()) {199 return 7;200 } else if(pd == G4He3::He3()) {201 return 8;202 } else if(pd == G4Alpha::Alpha()) {203 return 9;204 } else if(pd == pt->GetIon(6, 12, 0.0)) { // C12 special case. This should be phased-out in favor of "extended projectile"205 return -12;206 } else { // Is this extended projectile?207 G4int A = pd->GetAtomicMass();208 G4int Z = pd->GetAtomicNumber();209 if(A > 4 && A <= 16 && Z > 2 && Z <= 8) { // Ions from Lithium to Oxygen210 return -666; // Code of an extended projectile211 }212 }213 G4cout <<"Error! Projectile " << pd->GetParticleName() << " not defined!" << G4endl;214 return 0;215 };216 217 G4bool isInverseKinematics() {218 return usingInverseKinematics;219 };220 221 G4double targetA() { return f[0]; };222 G4double targetZ() { return f[1]; };223 224 G4int extendedProjectileA;225 G4int extendedProjectileZ;226 G4bool isExtendedProjectile;227 228 /**229 * Here f is an array containing the following initial values:230 * - f[0] : target mass number231 * - f[1] : target charge number232 * - f[2] : bullet energy233 * - f[3] : minimum proton energy to leave the target (default: 0.0)234 * - f[4] : nuclear potential (default: 45.0 MeV)235 * - f[5] : time scale (default: 1.0)236 * - f[6] : bullet type (1: proton, 2: neutron, 3: pi+, 4: pi0 5: pi-, 6:H2, 7: H3, 8: He3, 9: He4237 * - f[7] : minimum neutron energy to leave the target (default: 0.0)238 * - f[8] : target material identifier (G4Mat)239 * - f[9] : not used240 * - f[10] : not used241 * - f[11] : not used242 * - f[12] : not used243 * - f[13] : not used244 * - f[14] : not used245 */246 G4double f[FSIZE];247 248 /**249 * Number of events to be processed.250 */251 G4int icoup;252 253 G4bool usingInverseKinematics;254 };255 256 126 #define IGRAINESIZE 19 257 127 /** … … 262 132 class G4Hazard{ 263 133 public: 264 G4Hazard() {}; 134 G4Hazard() { 135 ial = 0; 136 for(G4int i = 0; i < IGRAINESIZE; ++i) { 137 igraine[i] = 0; 138 } 139 }; 140 265 141 ~G4Hazard() {}; 266 142 … … 283 159 class G4Mat { 284 160 public: 285 G4Mat() { }; 161 G4Mat() { 162 nbmat = 0; 163 164 for(G4int i = 0; i < MATSIZE; ++i) { 165 zmat[i] = 0; 166 amat[i] = 0; 167 } 168 169 for(G4int i = 0; i < MATGEOSIZE; ++i) { 170 for(G4int j = 0; j < MATSIZE; ++j) { 171 bmax_geo[i][j] = 0; 172 } 173 } 174 }; 175 286 176 ~G4Mat() { }; 287 177 … … 313 203 class G4LightGausNuc { 314 204 public: 315 G4LightGausNuc() {}; 205 G4LightGausNuc() { 206 for(G4int i = 0; i < LGNSIZE; ++i) { 207 rms1t[i] = 0.0; 208 pf1t[i] = 0.0; 209 pfln[i] = 0.0; 210 tfln[i] = 0.0; 211 vnuc[i] = 0.0; 212 } 213 }; 214 316 215 ~G4LightGausNuc() {}; 317 216 … … 329 228 class G4LightNuc { 330 229 public: 331 G4LightNuc() {}; 230 G4LightNuc() { 231 for(G4int i = 0; i < LNSIZE; ++i) { 232 r[i] = 0.0; 233 a[i] = 0.0; 234 } 235 }; 236 332 237 ~G4LightNuc() {}; 333 238 … … 350 255 class G4Saxw { 351 256 public: 352 G4Saxw() {}; 257 G4Saxw() { 258 for(G4int i = 0; i < SAXWROWS; ++i) { 259 for(G4int j = 0; j < SAXWCOLS; ++j) { 260 x[i][j] = 0.0; 261 y[i][j] = 0.0; 262 s[i][j] = 0.0; 263 } 264 } 265 imat = 0; n = 0; k = 0; 266 }; 267 353 268 ~G4Saxw() {}; 354 269 … … 391 306 G4Ws() { 392 307 fneck = 0.0; 393 }; 308 r0 = 0.0; 309 adif = 0.0; 310 rmaxws = 0.0; 311 drws = 0.0; 312 nosurf = 0.0; 313 xfoisa = 0.0; 314 bmax = 0.0; 315 npaulstr = 0.0; 316 }; 317 394 318 ~G4Ws() {}; 395 319 … … 453 377 class G4Dton { 454 378 public: 455 G4Dton() {}; 379 G4Dton() { 380 fn = 0.0; 381 for(G4int i = 0; i < DTONSIZE; ++i) { 382 c[i] = 0.0; 383 d[i] = 0.0; 384 } 385 }; 386 456 387 ~G4Dton() {}; 457 388 … … 469 400 class G4Spl2 { 470 401 public: 471 G4Spl2() {}; 402 G4Spl2() { 403 for(G4int i = 0; i < SPL2SIZE; ++i) { 404 x[i] = 0.0; y[i] = 0.0; 405 a[i] = 0.0; b[i] = 0.0; c[i] = 0.0; 406 } 407 n = 0; 408 }; 409 472 410 ~G4Spl2() {}; 473 411 … … 491 429 class G4Bl1 { 492 430 public: 493 G4Bl1() {}; 431 G4Bl1() { 432 ta = 0.0; 433 for(G4int i = 0; i < BL1SIZE; ++i) { 434 p1[i] = 0.0; p2[i] = 0.0; p3[i] = 0.0; eps[i] = 0.0; 435 ind1[i] = 0; ind2[i] = 0; 436 } 437 }; 438 494 439 ~G4Bl1() {}; 495 440 … … 510 455 }; 511 456 512 #define BL2CROISSIZE 19900 513 #define BL2INDSIZE 19900 457 #define BL2SIZE 19900 514 458 /** 515 459 * … … 517 461 class G4Bl2 { 518 462 public: 519 G4Bl2() {}; 463 G4Bl2() { 464 k = 0; 465 for(G4int i = 0; i < BL2SIZE; ++i) { 466 crois[i] = 0.0; 467 ind[i] = 0; 468 jnd[i] = 0; 469 } 470 }; 471 520 472 ~G4Bl2() {}; 521 473 … … 533 485 * 534 486 */ 535 G4double crois[BL2 CROISSIZE];487 G4double crois[BL2SIZE]; 536 488 537 489 /** … … 543 495 * 544 496 */ 545 G4int ind[BL2 INDSIZE];546 547 /** 548 * 549 */ 550 G4int jnd[BL2 INDSIZE];497 G4int ind[BL2SIZE]; 498 499 /** 500 * 501 */ 502 G4int jnd[BL2SIZE]; 551 503 }; 552 504 … … 558 510 class G4Bl3 { 559 511 public: 560 G4Bl3() {}; 512 G4Bl3() { 513 r1 = 0.0; r2 = 0.0; 514 ia1 = 0; ia2 = 0; 515 rab2 = 0.0; 516 517 for(G4int i = 0; i < BL3SIZE; ++i) { 518 x1[i] = 0.0; x2[i] = 0.0; x3[i] = 0.0; 519 } 520 }; 521 561 522 ~G4Bl3() {}; 562 523 … … 599 560 class G4Bl4 { 600 561 public: 601 G4Bl4() {}; 562 G4Bl4() 563 :tmax5(0.0) 564 {}; 565 602 566 ~G4Bl4() {}; 603 567 … … 615 579 class G4Bl5 { 616 580 public: 617 G4Bl5() {}; 581 G4Bl5() { 582 for(G4int i = 0; i < BL5SIZE; ++i) { 583 tlg[i] = 0.0; 584 nesc[i] = 0; 585 } 586 }; 587 618 588 ~G4Bl5() {}; 619 589 … … 634 604 class G4Bl6 { 635 605 public: 636 G4Bl6() {}; 606 G4Bl6() 607 :xx10(0.0), isa(0.0) 608 {}; 609 637 610 ~G4Bl6() {}; 638 611 … … 653 626 class G4Bl8 { 654 627 public: 655 G4Bl8() {}; 628 G4Bl8() 629 :rathr(0.0), ramass(0.0) 630 {}; 631 656 632 ~G4Bl8() {}; 657 633 … … 677 653 l1 = 0; 678 654 l2 = 0; 655 for(G4int i = 0; i < BL9SIZE; ++i) { 656 hel[i] = 0.0; 657 } 679 658 }; 680 659 ~G4Bl9() {}; … … 696 675 class G4Bl10 { 697 676 public: 698 G4Bl10() {}; 677 G4Bl10() 678 :ri4(0.0), rs4(0.0), r2i(0.0), r2s(0.0), pdummy(0.0), pf(0.0) 679 {}; 699 680 ~G4Bl10() {}; 700 681 … … 710 691 class G4Kind { 711 692 public: 712 G4Kind() {}; 693 G4Kind() 694 :kindf7(0) 695 {}; 713 696 ~G4Kind() {}; 714 697 … … 770 753 class G4VarAvat { 771 754 public: 772 G4VarAvat() {}; 755 G4VarAvat() { 756 kveux = 0; 757 bavat = 0.0; 758 nopartavat = 0; ncolavat = 0; 759 nb_avat = 0; 760 761 for(G4int i = 0; i < VARSIZE; ++i) { 762 r1_in[i] = 0.0; 763 r1_first_avat[i] = 0.0; 764 } 765 766 for(G4int i = 0; i < VAEPSSIZE; ++i) { 767 epsd[i] = 0.0; 768 eps2[i] = 0.0; 769 eps4[i] = 0.0; 770 eps6[i] = 0.0; 771 epsf[i] = 0.0; 772 } 773 774 for(G4int i = 0; i < VAAVM; ++i) { 775 timeavat[i] = 0.0; 776 l1avat[i] = 0.0; 777 l2avat[i] = 0.0; 778 jpartl1[i] = 0.0; 779 jpartl2[i] = 0.0; 780 del1avat[i] = 0.0; 781 del2avat[i] = 0.0; 782 energyavat[i] = 0.0; 783 bloc_paul[i] = 0.0; 784 bloc_cdpp[i] = 0.0; 785 go_out[i] = 0.0; 786 } 787 }; 788 773 789 ~G4VarAvat() {}; 774 790 … … 822 838 class G4VarNtp { 823 839 public: 824 G4VarNtp() {}; 840 G4VarNtp() { 841 clear(); 842 }; 843 825 844 ~G4VarNtp() {}; 826 845 … … 834 853 targetA = 0; 835 854 targetZ = 0; 836 masp = 0.0; mzsp = 0.0; exsp = 0.0; 855 masp = 0.0; mzsp = 0.0; exsp = 0.0; mrem = 0.0; 837 856 // To be deleted? 838 857 spectatorA = 0; … … 1190 1209 class G4Paul { 1191 1210 public: 1192 G4Paul() {}; 1211 G4Paul() 1212 :ct0(0.0), ct1(0.0), ct2(0.0), ct3(0.0), ct4(0.0), ct5(0.0), ct6(0.0), 1213 pr(0.0), pr2(0.0), xrr(0.0), xrr2(0.0), 1214 cp0(0.0), cp1(0.0), cp2(0.0), cp3(0.0), cp4(0.0), cp5(0.0), cp6(0.0) 1215 {}; 1216 1193 1217 ~G4Paul() {}; 1194 1218 -
trunk/source/processes/hadronic/models/incl/include/G4InclLightIonInterface.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclLightIonInterface.hh,v 1. 6 2010/10/26 02:47:59kaitanie Exp $26 // $Id: G4InclLightIonInterface.hh,v 1.8 2010/11/13 00:08:36 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 46 46 #define G4INCLLIGHTIONINTERFACE_H 1 47 47 48 #include "G4Nucleon.hh"49 #include "G4Nucleus.hh"50 #include "G4HadronicInteraction.hh"51 48 #include "G4VIntraNuclearTransportModel.hh" 52 49 #include "G4KineticTrackVector.hh" … … 61 58 #include "G4Incl.hh" 62 59 60 // Geant4 de-excitation 61 #include "G4ExcitationHandler.hh" 62 #include "G4PreCompoundModel.hh" 63 63 64 #include <fstream> 64 65 #include <iostream> … … 67 68 68 69 /** 69 * Interface for INCL . This interface handles basic light ion70 * bullet particles (deuterons, tritons, he3 and alphas).71 * @see G4InclAblaLightIonInterface70 * Interface for INCL with Geant4 PreCompound de-excitation. This 71 * interface handles basic light ion bullet particles from deuterons 72 * up to carbon-12. @see G4InclAblaLightIonInterface 72 73 */ 73 74 … … 94 95 95 96 /** 96 * Main method to apply the INCL /ABLAphysics model.97 * Main method to apply the INCL physics model. 97 98 * @param aTrack the projectile particle 98 99 * @param theNucleus target nucleus 99 * @return the output of the INCL /ABLAphysics model100 * @return the output of the INCL physics model 100 101 */ 101 102 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus); … … 119 120 G4double previousTargetA; 120 121 G4double previousTargetZ; 122 G4bool useProjectileSpectator; 123 G4bool useFermiBreakup; 124 125 G4ExcitationHandler *theExcitationHandler; 126 G4PreCompoundModel *thePrecoModel; 121 127 }; 122 128 123 #endif // G4INCL LIGHTIONINTERFACE_H129 #endif // G4INCLABLALIGHTIONINTERFACE_H -
trunk/source/processes/hadronic/models/incl/include/G4InclRandomNumbers.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclRandomNumbers.hh,v 1. 6 2010/10/26 02:47:59kaitanie Exp $26 // $Id: G4InclRandomNumbers.hh,v 1.8 2010/11/13 00:08:36 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 43 43 44 44 public: 45 G4InclRandomInterface() { } 45 G4InclRandomInterface() { 46 this->seed = 1337; // Default seed, this is never actually used. 47 } 46 48 G4InclRandomInterface(G4long seed) { 47 49 this->seed = seed; -
trunk/source/processes/hadronic/models/incl/src/G4Abla.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4Abla.cc,v 1.2 2 2010/10/26 02:47:59 kaitanie Exp $26 // $Id: G4Abla.cc,v 1.27 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 40 40 #include "G4AblaFissionSimfis18.hh" 41 41 #include "G4AblaFission.hh" 42 43 G4Abla::G4Abla()44 {45 verboseLevel = 0;46 ilast = 0;47 }48 49 G4Abla::G4Abla(G4Hazard *hazard, G4Volant *volant)50 {51 verboseLevel = 0;52 ilast = 0;53 volant = volant; // ABLA internal particle data54 volant->iv = 0;55 hazard = hazard; // Random seeds56 57 randomGenerator = new G4InclGeant4Random();58 //randomGenerator = new G4Ranecu();59 varntp = new G4VarNtp();60 pace = new G4Pace();61 ald = new G4Ald();62 eenuc = new G4Eenuc();63 ec2sub = new G4Ec2sub();64 ecld = new G4Ecld();65 fb = new G4Fb();66 fiss = new G4Fiss();67 opt = new G4Opt();68 }69 42 70 43 G4Abla::G4Abla(G4Hazard *aHazard, G4Volant *aVolant, G4VarNtp *aVarntp) … … 109 82 G4Abla::~G4Abla() 110 83 { 84 delete fissionModel; 111 85 delete randomGenerator; 112 86 delete pace; … … 483 457 // G4double *pleva_par, G4double *pxeva_par, G4double *pyeva_par, 484 458 // G4double *ff_par, G4int *inttype_par, G4int *inum_par); 485 G4double zf1 , af1, malpha1, ffpleva1, ffpxeva1, ffpyeva1;486 G4int ff1 , ftype1;459 G4double zf1 = 0.0, af1 = 0.0, malpha1 = 0.0, ffpleva1 = 0.0, ffpxeva1 = 0.0, ffpyeva1 = 0.0; 460 G4int ff1 = 0, ftype1 = 0; 487 461 evapora(zff1, aff1, epf1_out, 0.0, &zf1, &af1, &malpha1, &ffpleva1, 488 462 &ffpxeva1, &ffpyeva1, &ff1, &ftype1, &inum); … … 560 534 // G4double *pleva_par, G4double *pxeva_par, G4double *pyeva_par, 561 535 // G4double *ff_par, G4int *inttype_par, G4int *inum_par); 562 G4double zf2 , af2, malpha2, ffpleva2, ffpxeva2, ffpyeva2;563 G4int ff2 , ftype2;536 G4double zf2 = 0.0, af2 = 0.0, malpha2 = 0.0, ffpleva2 = 0.0, ffpxeva2 = 0.0, ffpyeva2 = 0.0; 537 G4int ff2 = 0, ftype2 = 0; 564 538 evapora(zff2,aff2,epf2_out,0.0,&zf2,&af2,&malpha2,&ffpleva2, 565 539 &ffpxeva2,&ffpyeva2,&ff2,&ftype2,&inum); … … 1608 1582 G4double *sbp_par, G4double *sba_par, G4double *ecn_par, 1609 1583 G4double *ecp_par,G4double *eca_par, G4double *bp_par, 1610 G4double *ba_par, G4int inttype, G4int inum, G4int itest)1584 G4double *ba_par, G4int, G4int inum, G4int itest) 1611 1585 { 1612 1586 G4int dummy0 = 0; … … 1758 1732 1759 1733 imaxwell = 1; 1760 inttype = 0;1761 1734 1762 1735 // limiting of excitation energy where fission occurs … … 2842 2815 i = idint(y/(2.0e-02)) + 1; 2843 2816 2844 if( i>= bsbkSize) {2817 if((i + 1) >= bsbkSize) { 2845 2818 if(verboseLevel > 2) { 2846 G4cout <<"G4Abla error: index i = " << i<< " is greater than array size permits." << G4endl;2819 G4cout <<"G4Abla error: index " << i + 1 << " is greater than array size permits." << G4endl; 2847 2820 } 2848 2821 bipolResult = 0.0; … … 3704 3677 // own class 3705 3678 3706 void G4Abla::standardRandom(G4double *rndm, G4long *seed) 3707 { 3708 (*seed) = (*seed); // Avoid warning during compilation. 3679 void G4Abla::standardRandom(G4double *rndm, G4long*) 3680 { 3709 3681 // Use Geant4 G4UniformRand 3710 3682 (*rndm) = randomGenerator->getRandom(); -
trunk/source/processes/hadronic/models/incl/src/G4AblaFission.cc
r968 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4AblaFission.cc,v 1. 3 2008/11/06 08:42:00 gcosmoExp $26 // $Id: G4AblaFission.cc,v 1.5 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 36 36 G4AblaFission::G4AblaFission() 37 37 { 38 hazard = 0; 39 randomGenerator = 0; 38 40 } 39 41 … … 1086 1088 } 1087 1089 1088 void G4AblaFission::standardRandom(G4double *rndm, G4long *seed) 1089 { 1090 (*seed) = (*seed); // Avoid warning during compilation. 1090 void G4AblaFission::standardRandom(G4double *rndm, G4long*) 1091 { 1091 1092 // Use Geant4 G4UniformRand 1092 1093 (*rndm) = randomGenerator->getRandom(); -
trunk/source/processes/hadronic/models/incl/src/G4AblaFissionSimfis18.cc
r968 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4AblaFissionSimfis18.cc,v 1. 3 2008/11/06 08:42:00 gcosmoExp $26 // $Id: G4AblaFissionSimfis18.cc,v 1.5 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 36 36 G4AblaFissionSimfis18::G4AblaFissionSimfis18() 37 37 { 38 hazard = 0; 39 randomGenerator = 0; 38 40 } 39 41 … … 1412 1414 } 1413 1415 1414 void G4AblaFissionSimfis18::standardRandom(G4double *rndm, G4long *seed) 1415 { 1416 (*seed) = (*seed); // Avoid warning during compilation. 1416 void G4AblaFissionSimfis18::standardRandom(G4double *rndm, G4long*) 1417 { 1417 1418 // Use Geant4 G4UniformRand 1418 1419 (*rndm) = randomGenerator->getRandom(); -
trunk/source/processes/hadronic/models/incl/src/G4Incl.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4Incl.cc,v 1.3 3 2010/10/29 06:48:43gunter Exp $26 // $Id: G4Incl.cc,v 1.37 2010/12/15 07:41:31 gunter Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 57 57 randomGenerator = new G4InclGeant4Random(); 58 58 // randomGenerator = new G4Ranecu(); 59 clearState(); 59 60 } 60 61 … … 85 86 // randomGenerator = new G4Ranecu(); 86 87 randomGenerator = new G4InclGeant4Random(); 88 clearState(); 87 89 } 88 90 … … 149 151 150 152 theLogger = 0; 153 clearState(); 151 154 } 152 155 153 156 G4Incl::~G4Incl() 154 157 { 158 delete be; 159 delete ps; 160 delete fermi; 161 delete qvp; 162 155 163 delete randomGenerator; 156 164 delete light_gaus_nuc; … … 385 393 void G4Incl::processEventIncl(G4InclInput *input) 386 394 { 395 //G4cout <<"Starting event " << eventnumber << G4endl; 387 396 if(input == 0) { 388 397 G4cerr <<"G4Incl fatal error: NULL pointer passed as input!" << G4endl; … … 393 402 const G4double uma = 931.4942; 394 403 const G4double melec = 0.511; 395 396 G4double pcorem = 0.0; 397 G4double pxrem = 0.0; 398 G4double pyrem = 0.0; 399 G4double pzrem = 0.0; 404 const G4double fmp = 938.2796; 405 406 G4double pcorem = 0.0; 407 G4double pxrem = 0.0; 408 G4double pyrem = 0.0; 409 G4double pzrem = 0.0; 400 410 401 411 G4double ap = 0.0, zp = 0.0, mprojo = 0.0, pbeam = 0.0; 402 412 403 413 varntp->clear(); 404 if(calincl->bulletType() == 3) { // pi+ 414 415 if(calincl->bulletType() == -12) { 416 be->ia_be = std::abs(calincl->bulletType()); 417 be->iz_be = 6; 418 } else if(calincl->bulletType() == -666) { 419 be->iz_be = calincl->extendedProjectileZ(); 420 be->ia_be = calincl->extendedProjectileA(); 421 } 422 423 if(calincl->isExtendedProjectile() == false && calincl->bulletType() < -max_a_proj) { 424 // if(calincl->bulletType() < -max_a_proj) { 425 G4cout <<"max a of composite projectile is: " << max_a_proj << G4endl; 426 exit(0); 427 } 428 if(calincl->bulletType() < 0) { 429 // calincl->bulletType() = std::floor(calincl->bulletType() + 0.1); WTF??? 430 be->pms_be=100.; 431 G4int i_tabled=0; 432 if(be->iz_be == 3 && be->ia_be == 6) { 433 be->rms_be=2.56; 434 be->bind_be=32.0; 435 i_tabled=1; 436 } else if(be->iz_be == 3 && be->ia_be == 7) { // TODO: Check the values! 437 be->rms_be=2.56; 438 be->bind_be=32.0; 439 i_tabled=1; 440 } else if(be->iz_be == 3 && be->ia_be == 8) { 441 be->rms_be=2.40; 442 be->bind_be=39.25; 443 i_tabled=1; 444 } else if(be->iz_be == 4 && be->ia_be == 7) { 445 be->rms_be=2.51; 446 be->bind_be=58.17; 447 i_tabled=1; 448 } else if(be->iz_be == 4 && be->ia_be == 9) { 449 be->rms_be=2.51; 450 be->bind_be=58.17; 451 i_tabled=1; 452 } else if(be->iz_be == 4 && be->ia_be == 10) { 453 be->rms_be=2.45; 454 be->bind_be=64.75; 455 i_tabled=1; 456 } else if(be->iz_be == 5 && be->ia_be == 10) { 457 be->rms_be=2.45; 458 be->bind_be=64.75; 459 i_tabled=1; 460 } else if(be->iz_be == 5 && be->ia_be == 11) { 461 be->rms_be=2.40; 462 be->bind_be=76.21; 463 i_tabled=1; 464 } else if(be->iz_be == 6 && be->ia_be == 9) { // TODO: Check the values! 465 be->rms_be=2.44; 466 be->bind_be=92.17; 467 i_tabled=1; 468 } else if(be->iz_be == 6 && be->ia_be == 10) { // TODO: Check the values! 469 be->rms_be=2.44; 470 be->bind_be=92.17; 471 i_tabled=1; 472 } else if(be->iz_be == 6 && be->ia_be == 11) { // TODO: Check the values! 473 be->rms_be=2.44; 474 be->bind_be=92.17; 475 i_tabled=1; 476 } else if(be->iz_be == 6 && calincl->bulletType() == -12) { // Special Carbon case 477 G4cout <<"Carbon 12 (special) selected." << G4endl; 478 be->rms_be=2.44; 479 be->bind_be=92.17; 480 i_tabled=1; 481 } else if(be->iz_be == 6 && be->ia_be == 12) { 482 be->rms_be=2.44; 483 be->bind_be=92.17; 484 i_tabled=1; 485 } else if(be->iz_be == 7 && be->ia_be == 16) { 486 be->rms_be=2.73; 487 be->bind_be=127.62; 488 i_tabled=1; 489 } else { 490 G4cout <<"Warning: No rms and binding for projectile ion A = " << be->ia_be << " Z = " << be->iz_be << G4endl; 491 be->rms_be=2.44; 492 be->bind_be=92.17; 493 G4cout <<"Warning: Using probably bad values rms = " << be->rms_be << " binding = " << be->bind_be << G4endl; 494 i_tabled=1; 495 } 496 497 if(i_tabled == 0) { 498 G4cout <<"This heavy ion (a,z)= " << be->ia_be << " " << be->iz_be << " is not defined as beam in INCL" << G4endl; 499 exit(0); 500 } 501 502 // G4cout <<"z projectile, rms_r, rms_p (gaussian model)" << be->iz_be << " " << be->rms_be << " " << be->pms_be << G4endl; 503 // G4cout <<"binding energy (mev):" << be->bind_be << G4endl; 504 // G4cout <<"fermi-breakup dresner below a=" << calincl->f[11] << G4endl; 505 } 506 // G4cout <<"Target Mass and Charge: " << calincl->targetA() << " " << calincl->targetZ() << G4endl; 507 // calincl->f[10] = 0; // No clusters 508 509 if(calincl->bulletType() == -12) { // C12 special case 510 mprojo=fmp*std::abs(calincl->bulletType()) - be->bind_be; 511 pbeam=std::sqrt(calincl->bulletE()*(calincl->bulletE()+2.*mprojo)); 512 ap=std::abs(calincl->bulletType()); 513 zp=be->iz_be; 514 } else if(calincl->bulletType() == -666) { // Generic extended projectile 515 mprojo=fmp*be->ia_be - be->bind_be; 516 pbeam=std::sqrt(calincl->bulletE()*(calincl->bulletE()+2.*mprojo)); 517 ap=be->ia_be; 518 zp=be->iz_be; 519 } 520 // pi+ 521 if(calincl->bulletType() == 3) { 405 522 mprojo = 139.56995; 406 523 ap = 0.0; … … 408 525 } 409 526 410 if(calincl->bulletType() == 4) { // pi0 527 // pi0 528 if(calincl->bulletType() == 4) { 411 529 mprojo = 134.9764; 412 530 ap = 0.0; … … 414 532 } 415 533 416 if(calincl->bulletType() == 5) { // pi- 534 // pi- 535 if(calincl->bulletType() == 5) { 417 536 mprojo = 139.56995; 418 537 ap = 0.0; … … 420 539 } 421 540 422 // Coulomb en entree seulement pour les particules ci-dessous. 423 if(calincl->bulletType() == 1) { // proton 541 // coulomb en entree seulement pour les particules ci-dessous 542 543 // proton 544 if(calincl->bulletType() == 1) { 424 545 mprojo = 938.27231; 425 546 ap = 1.0; 426 547 zp = 1.0; 427 548 } 428 429 if(calincl->bulletType() == 2) { // neutron 549 550 // neutron 551 if(calincl->bulletType() == 2) { 430 552 mprojo = 939.56563; 431 553 ap = 1.0; 432 554 zp = 0.0; 433 555 } 434 435 if(calincl->bulletType() == 6) { // deuteron 556 557 // deuteron 558 if(calincl->bulletType() == 6) { 436 559 mprojo = 1875.61276; 437 560 ap = 2.0; 438 561 zp = 1.0; 439 562 } 440 441 if(calincl->bulletType() == 7) { // triton 563 564 // triton 565 if(calincl->bulletType() == 7) { 442 566 mprojo = 2808.95; 443 567 ap = 3.0; 444 568 zp = 1.0; 445 569 } 446 447 if(calincl->bulletType() == 8) { // He3 570 571 // He3 572 if(calincl->bulletType() == 8) { 448 573 mprojo = 2808.42; 449 574 ap = 3.0; … … 451 576 } 452 577 453 if(calincl->bulletType() == 9) { // Alpha 578 // Alpha 579 if(calincl->bulletType() == 9) { 454 580 mprojo = 3727.42; 455 581 ap = 4.0; … … 457 583 } 458 584 459 if(calincl->bulletType() == -12) { // Carbon 460 mprojo = 12.0 * 938.27231; 585 // Carbon 586 if(calincl->bulletType() == -12) { 587 mprojo = 6.0*938.27231 + 6.0*939.56563; 461 588 ap = 12.0; 462 589 zp = 6.0; 463 } else if(calincl->bulletType() == -666) { // Generic extended ion projectile464 mprojo = calincl->extendedProjectileA() * 938.27231;465 ap = calincl->extendedProjectileA();466 zp = calincl->extendedProjectileZ();467 590 } 468 591 … … 482 605 G4double bimpac = 0.0; 483 606 G4int jrem = 0; 607 G4double xjrem = 0.0, yjrem = 0.0, zjrem = 0.0; 484 608 G4double alrem = 0.0; 485 609 486 /** 487 * Coulomb barrier treatment. 488 */ 610 // Coulomb barrier 611 489 612 G4double probaTrans = 0.0; 490 613 G4double rndm = 0.0; 491 614 492 615 if((calincl->bulletType() == 1) || (calincl->bulletType() >= 6)) { 616 // probaTrans = coulombTransm(calincl->bulletE(),apro,zpro,calincl->targetA(),calincl->targetZ()); 493 617 probaTrans = coulombTransm(calincl->bulletE(),ap,zp,calincl->targetA(),calincl->targetZ()); 494 618 standardRandom(&rndm, &(hazard->ial)); … … 499 623 } 500 624 501 /** 502 * Call the actual INCL routine. 503 */ 504 625 // G4cout <<"Before PNU:" << G4endl; 505 626 // randomGenerator->printSeeds(); 506 G4double jremx, jremy, jremz; 507 pnu(&ibert, &nopart,&izrem,&iarem,&esrem,&erecrem,&alrem,&berem,&garem,&bimpac,&jrem, 508 &jremx, &jremy, &jremz); 627 // Call the actual INCL routine: 628 pnu(&ibert, &nopart,&izrem,&iarem,&esrem,&erecrem,&alrem,&berem,&garem,&bimpac, 629 &jrem, &xjrem, &yjrem, &zjrem); 630 // G4cout <<"After PNU:" << G4endl; 631 // randomGenerator->printSeeds(); 632 G4double mrem = int(zjrem/197.328); // CHECK 633 if (mrem > jrem) mrem=jrem; 634 if (mrem < -jrem) mrem=-jrem; 635 636 // nopart=1; 637 // kind[0]=1; 638 // ep[0]=799.835; 639 // alpha[0]=0.08716; 640 // beta[0]=0.; 641 // gam[0]=0.99619; 642 // izrem=82; 643 // iarem=208; 644 // esrem=200.; 645 // erecrem=0.18870; 646 // alrem=-0.47101; 647 // berem=0.; 648 // garem=0.88213; 649 // bimpac=2.; 509 650 forceAbsor(&nopart, &iarem, &izrem, &esrem, &erecrem, &alrem, &berem, &garem, &jrem); 510 G4double aprf = double(iarem); // mass number of the prefragment511 G4double jprf = 0.0; // angular momentum of the prefragment512 513 // Mean angular momentum of prefragment .514 jprf = 0.165 * std::pow(at,(2.0/3.0)) * aprf * (at - aprf) /(at - 1.0);651 G4double aprf = double(iarem); // mass number of the prefragment 652 G4double jprf = 0.0; // angular momentum of the prefragment 653 654 // Mean angular momentum of prefragment 655 jprf = 0.165 * std::pow(at,(2.0/3.0)) * aprf*(at - aprf)/(at - 1.0); 515 656 if (jprf < 0) { 516 657 jprf = 0.0; 517 658 } 518 659 519 // Reference M. de Jong, Ignatyuk, Schmidt Nuc. Phys A 613, p442, 7th line660 // check m.de jong, ignatyuk, schmidt nuc.phys a 613, pg442, 7th line 520 661 jprf = std::sqrt(2*jprf); 662 521 663 jprf = jrem; 522 varntp->jremn = jrem; // Copy jrem to output tuple. 523 524 G4double numpi = 0; // Number of pions. 525 G4double multn = 0; // Number (multiplicity) of neutrons. 526 G4double multp = 0; // Number (multiplicity) of protons. 527 528 // Ecriture dans le ntuple des particules de cascade (sauf remnant). 529 varntp->ntrack = nopart; // Nombre de particules pour ce tir. 664 varntp->jremn = jrem; // jrem copie dans le ntuple 665 666 G4double numpi = 0; // compteurs de pions, neutrons protons 667 G4double multn = 0; 668 G4double multp = 0; 669 670 // ecriture dans le ntuple des particules de cascade (sauf remnant) 671 varntp->ntrack = nopart; // nombre de particules pour ce tir 672 if(varntp->ntrack >= VARNTPSIZE) { 673 if(verboseLevel > 2) { 674 G4cout <<"G4Incl error: Output data structure not big enough." << G4endl; 675 } 676 } 530 677 varntp->massini = iarem; 531 678 varntp->mzini = izrem; … … 533 680 varntp->bimpact = bimpac; 534 681 535 /** 536 * Three ways to compute the mass of the remnant: 537 * -from the output of the cascade and the canonic mass 538 * -from energy balance (input - all emitted energies) 539 * -following the approximations of the cugnon code (esrem...) 540 */ 541 G4double f0 = calincl->targetA(); 542 G4double f1 = calincl->targetZ(); 543 G4double f2 = calincl->bulletE(); 544 G4double mcorem = mprojo + f2 + abla->pace2(f0, f1) + f0 * uma - f1 * melec; 682 // three ways to compute the mass of the remnant: 683 // -from the output of the cascade and the canonic mass 684 // -from energy balance (input - all emitted energies) 685 // -following the approximations of the cugnon code (esrem...) 686 G4double mcorem = mprojo + calincl->bulletE() + abla->pace2(double(calincl->targetA()),double(calincl->targetZ())) 687 + calincl->targetA()*uma - calincl->targetZ()*melec; 545 688 546 689 G4double pxbil = 0.0; … … 549 692 550 693 if(nopart > -1) { 551 for(G4int j = 0; j < nopart; j++) { 552 varntp->itypcasc[j] = 1; 694 // Fill the projectile spectator variables 695 varntp->masp = ps->a_projspec; 696 varntp->mzsp = ps->z_projspec; 697 varntp->exsp = ps->ex_projspec; 698 varntp->spectatorP1 = ps->p1_projspec; 699 varntp->spectatorP2 = ps->p2_projspec; 700 varntp->spectatorP3 = ps->p3_projspec; 701 varntp->spectatorT = ps->t_projspec; 702 for(G4int j = 0; j <= nopart; j++) { 703 if(ep[j] < 0.0) { // Workaround to avoid negative energies (and taking std::sqrt of a negative number). 704 G4cout <<"G4Incl: Not registering particle with energy: " << ep[j] << G4endl; 705 continue; 706 } 707 if(kind[j] == 0) continue; // Empty particle rows are sometimes produced by lurking indexing problems. We can simply skip those "bad" entries... 708 if(gam[j] > CLHEP::pi) { 709 if(verboseLevel > 2) { 710 G4cout <<"G4Incl: Just avoided floating point exception by using an ugly hack..." << G4endl; 711 } 712 continue; // Avoid floating point exception 713 } 714 715 varntp->itypcasc[j] = 1; // Particle was produced by the cascade 716 // Spectators of composite projectiles (7/2006, AB) 717 // (kind is negative in that case) 718 if(kind[j] <= 0) { // Particle is a projectile spectator that comes directly from the cascade 719 kind[j] *= -1; 720 varntp->itypcasc[j]=-1; 721 // G4cout <<"Spectator registered!" << G4endl; 722 // continue; 723 } 724 553 725 // kind(): 1=proton, 2=neutron, 3=pi+, 4=pi0, 5=pi - 554 726 if(kind[j] == 1) { 555 727 varntp->avv[j] = 1; 556 728 varntp->zvv[j] = 1; 557 varntp->plab[j] = std::sqrt(ep[j] * (ep[j] +1876.5592)); // cugnon729 varntp->plab[j] = std::sqrt(ep[j]*(ep[j]+1876.5592)); // cugnon 558 730 multp = multp + 1; 559 731 mcorem = mcorem - ep[j] - 938.27231; … … 568 740 varntp->zvv[j] = 0; 569 741 varntp->plab[j] = std::sqrt(ep[j]*(ep[j]+1876.5592)); // cugnon 570 //varntp->plab[j] = std::sqrt(ep[j] * (ep[j] + 1879.13126)); // PK mass check571 742 multn = multn + 1; 572 743 mcorem = mcorem - ep[j] - 939.56563; … … 576 747 } 577 748 } 578 749 579 750 if(kind[j] == 3) { 580 751 varntp->avv[j] = -1; … … 656 827 mcorem = mcorem - ep[j] - 3724.818; 657 828 if(verboseLevel > 3) { 658 G4cout <<"G4Incl: He 4produced! " << G4endl;829 G4cout <<"G4Incl: He3 produced! " << G4endl; 659 830 G4cout <<"G4Incl: Momentum: "<< varntp->plab[j] << G4endl; 660 831 } … … 669 840 670 841 if(verboseLevel > 3) { 671 G4cout <<"Momentum: " << varntp->plab[j] << G4endl;672 G4cout <<"Theta: " << varntp->tetlab[j] << G4endl;673 G4cout <<"Phi: " << varntp->philab[j] << G4endl;842 G4cout <<"Momentum: " << varntp->plab[j] << G4endl; 843 G4cout <<"Theta: " << varntp->tetlab[j] << G4endl; 844 G4cout <<"Phi: " << varntp->philab[j] << G4endl; 674 845 } 675 846 } 676 847 677 848 // calcul de la masse (impulsion) du remnant coherente avec la conservation d'energie: 678 pcorem=std::sqrt(erecrem*(erecrem +2.*938.2796*iarem)); // cugnon 679 mcorem = 938.2796*iarem; // cugnon 680 849 pcorem = std::sqrt(erecrem*(erecrem + 2.0 * 938.2796 * iarem)); // cugnon 850 mcorem = 938.2796 * iarem; // cugnon 851 varntp->pcorem = pcorem; 852 varntp->mcorem = mcorem; 681 853 // Note: Il faut negliger l'energie d'excitation (ESREM) pour que le bilan 682 854 // d'impulsion soit correct a la sortie de la cascade.....et prendre la 683 855 // masse MCOREM comme ci-dessus (fausse de ~1GeV par rapport aux tables...) 684 pxrem=pcorem*alrem; 685 pyrem=pcorem*berem; 686 pzrem=pcorem*garem; 687 688 pxbil=pxbil+pxrem; 689 pybil=pybil+pyrem; 690 pzbil=pzbil+pzrem; 691 692 if((std::fabs(pzbil-pbeam) > 5.0) || (std::sqrt(std::pow(pxbil,2)+std::pow(pybil,2)) >= 3.0)) { 856 pxrem = pcorem * alrem; 857 pyrem = pcorem * berem; 858 pzrem = pcorem * garem; 859 varntp->pxrem = pxrem; 860 varntp->pyrem = pyrem; 861 varntp->pzrem = pzrem; 862 pxbil = pxbil + pxrem; 863 pybil = pybil + pyrem; 864 pzbil = pzbil + pzrem; 865 866 // If on purpose, add here the spectator nuclei: 867 if(calincl->bulletType() < 0 && ps->a_projspec != 0) { 868 pxbil=pxbil+ps->p1_projspec; 869 pybil=pybil+ps->p2_projspec; 870 pzbil=pzbil+ps->p3_projspec; 871 } 872 873 if((std::fabs(pzbil - pbeam) > 5.0) || (std::sqrt(std::pow(pxbil,2) + std::pow(pybil,2)) >= 3.0)) { 693 874 if(verboseLevel > 3) { 694 875 G4cout <<"Bad momentum conservation after INCL:" << G4endl; … … 704 885 varntp->iafis = 0; 705 886 706 // varntp->ntrack = varntp->ntrack + 1; // on recopie le remnant dans le ntuple 887 // on recopie le remnant dans le ntuple 888 varntp->ntrack = varntp->ntrack + 1; 707 889 varntp->massini = iarem; 708 890 varntp->mzini = izrem; 709 891 varntp->exini = esrem; 710 varntp->itypcasc[varntp->ntrack] = 1; 711 varntp->avv[varntp->ntrack] = iarem; 712 varntp->zvv[varntp->ntrack]= izrem; 713 varntp->plab[varntp->ntrack] = pcorem; 714 varntp->enerj[varntp->ntrack] = std::sqrt(std::pow(pcorem,2) + std::pow(mcorem,2)) - mcorem; 715 varntp->tetlab[varntp->ntrack] = 180.0*std::acos(garem)/3.141592654; 716 varntp->philab[varntp->ntrack] = 180.0*std::atan2(berem,alrem)/3.141592654; 717 varntp->ntrack++; 718 varntp->mulncasc = varntp->ntrack; 719 varntp->mulnevap = 0; 720 varntp->mulntot = varntp->mulncasc + varntp->mulnevap; 721 if(verboseLevel > 3) { 722 G4cout <<"G4Incl: Returning nucleus fragment. " << G4endl; 723 G4cout <<"G4Incl: Fragment A = " << varntp->avv[varntp->ntrack] << " Z = " << varntp->zvv[varntp->ntrack] << G4endl; 724 G4cout <<"Energy: " << varntp->enerj[varntp->ntrack] << G4endl; 725 G4cout <<"Momentum: " << varntp->plab[varntp->ntrack] << G4endl; 726 G4cout <<"Theta: " << varntp->tetlab[varntp->ntrack] << G4endl; 727 G4cout <<"Phi: " << varntp->philab[varntp->ntrack] << G4endl; 728 } 729 } 730 else { 731 if(nopart == -2) { 732 varntp->ntrack = -2; //FIX: Error flag to remove events containing unphysical events (Ekin > Ebullet). 733 } 734 else { 735 varntp->ntrack = -1; 736 } 892 varntp->pxrem = pxrem; 893 varntp->pyrem = pyrem; 894 varntp->pzrem = pzrem; 895 varntp->mcorem = mcorem; 896 varntp->erecrem = pcorem; 897 varntp->erecrem = erecrem; 898 899 #ifdef G4INCLDEBUG 900 theLogger->fillHistogram1D("bimpact", varntp->bimpact); 901 #endif 902 903 #ifdef G4INCLDEBUG 904 theLogger->fillHistogram1D("mzini", varntp->mzini); 905 #endif 906 } 907 if(nopart == -2) { 908 varntp->ntrack = -2; //FIX: Error flag to remove events containing unphysical events (Ekin > Ebullet). 909 evaporationResult->ntrack = -2; //FIX: Error flag to remove events containing unphysical events (Ekin > Ebullet). 910 } 911 else if(nopart == -1) { 912 varntp->ntrack = -1; 913 evaporationResult->ntrack = -1; 914 } 915 if(verboseLevel > 2) { 916 G4cout << __FILE__ << ":" << __LINE__ << "Dump varntp after combining: " << G4endl; 917 varntp->dump(); 737 918 } 738 919 } … … 8150 8331 } 8151 8332 8152 void G4Incl::standardRandom(G4double *rndm, G4long *seed) 8153 { 8154 (*seed) = (*seed); // Avoid warning during compilation. 8333 void G4Incl::standardRandom(G4double *rndm, G4long*) 8334 { 8155 8335 // Use Geant4 G4UniformRand 8156 8336 // (*rndm) = G4UniformRand(); … … 8550 8730 } // enddo 8551 8731 G4double p_spec2=std::pow(p1_spec,2)+std::pow(p2_spec,2)+std::pow(p3_spec,2); 8552 G4double s_spec = s qrt(std::pow(e_spec,2)-p_spec2);8732 G4double s_spec = std::sqrt(std::pow(e_spec,2)-p_spec2); 8553 8733 8554 8734 // no projectile spectator if a>=4 and a=z or a=n (no dresner breakup) … … 8844 9024 } 8845 9025 9026 // Initialization helper 9027 void G4Incl::clearState() { 9028 G4int epSize = 300; 9029 for(G4int i = 0; i < epSize; ++i) { 9030 kind[i] = 0; 9031 ep[i] = 0.0; 9032 alpha[i] = 0.0; 9033 beta[i] = 0.0; 9034 gam[i] = 0.0; 9035 } 9036 inside_step = 0; 9037 } 9038 8846 9039 // C------------------------------------------------------------------------ 8847 9040 // C Logging … … 8923 9116 // COMMON/BL2/CROIS(19900),K,IND(20000),JND(20000) 8924 9117 // COMMON/BL3/R1,R2,X1(300),X2(300),X3(300),IA1,IA2,RAB2 P-N22270 9118 9119 if(index < 0) { 9120 G4cout <<";; Error! index < 0! index = " << index << G4endl; 9121 return; 9122 } 8925 9123 8926 9124 G4int i_ind1 = bl1->ind1[bl2->ind[index]]; -
trunk/source/processes/hadronic/models/incl/src/G4InclAblaCascadeInterface.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclAblaCascadeInterface.cc,v 1. 16 2010/10/29 06:48:43 gunterExp $26 // $Id: G4InclAblaCascadeInterface.cc,v 1.20 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 116 116 incl->setInput(calincl); 117 117 118 G4InclInput::printProjectileTargetInfo(aTrack, theNucleus);119 calincl->printInfo();118 // G4InclInput::printProjectileTargetInfo(aTrack, theNucleus); 119 // calincl->printInfo(); 120 120 121 121 #ifdef DEBUGINCL … … 439 439 } 440 440 } 441 delete theFermiBreakupResult; 442 theFermiBreakupResult = 0; 443 441 444 if(std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) { 442 445 G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl; -
trunk/source/processes/hadronic/models/incl/src/G4InclAblaDataFile.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclAblaDataFile.cc,v 1. 9 2010/06/14 16:10:01 gcosmoExp $26 // $Id: G4InclAblaDataFile.cc,v 1.10 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 116 116 vgsldin.close(); 117 117 118 int A = 0, Zbegin = 0, Zend = 0;119 118 G4String str1, str2, str3; 120 119 for(int i = 0; i < 500; i++) { … … 124 123 } 125 124 125 int A = 0, Zbegin = 0, Zend = 0; 126 126 for(int i = 0; i < massnumbers; i++) { 127 127 pace2in >> str1 >> A >> str2 >> Zbegin >> str3 >> Zend; 128 for(int j = Zbegin; j <= Zend; j++) { 129 pace2in >> pace2; 130 setPace2(A, j, pace2); 128 if(Zbegin >= 0 && Zbegin < getPaceCols() && 129 A >= 0 && A < getPaceRows()) { 130 for(int j = Zbegin; j <= Zend; j++) { 131 pace2in >> pace2; 132 setPace2(A, j, pace2); 133 } 131 134 } 132 135 } -
trunk/source/processes/hadronic/models/incl/src/G4InclAblaLightIonInterface.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclAblaLightIonInterface.cc,v 1.1 4 2010/10/29 06:48:43 gunterExp $26 // $Id: G4InclAblaLightIonInterface.cc,v 1.16 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 103 103 } 104 104 105 if(verboseLevel > 1) {106 G4Calincl::printProjectileTargetInfo(aTrack, theNucleus);107 }108 109 105 // Inverse kinematics for targets with Z = 1 and A = 1 110 106 // if(false) { 111 107 G4LorentzRotation toBreit = aTrack.Get4Momentum().boostVector(); 112 108 113 if(theNucleus.GetZ_asInt() == 1 && theNucleus.GetA_asInt() == 1 && G4 Calincl::canUseInverseKinematics(aTrack, theNucleus)) {109 if(theNucleus.GetZ_asInt() == 1 && theNucleus.GetA_asInt() == 1 && G4InclInput::canUseInverseKinematics(aTrack, theNucleus)) { 114 110 G4ParticleDefinition *oldTargetDef = theTableOfParticles->GetIon(theNucleus.GetA_asInt(), theNucleus.GetZ_asInt(), 0.0); 115 111 const G4ParticleDefinition *oldProjectileDef = aTrack.GetDefinition(); 116 112 113 if(oldProjectileDef != 0 && oldTargetDef != 0) { 117 114 G4int oldTargetA = oldTargetDef->GetAtomicMass(); 118 115 G4int newTargetA = oldProjectileDef->GetAtomicMass(); 119 116 G4int newTargetZ = oldProjectileDef->GetAtomicNumber(); 120 117 121 if(newTargetA > 0 && newTargetZ > 0 && oldTargetDef != 0 && oldProjectileDef != 0) {118 if(newTargetA > 0 && newTargetZ > 0) { 122 119 G4Nucleus swappedTarget(oldProjectileDef->GetAtomicMass(), oldProjectileDef->GetAtomicNumber()); 123 120 … … 137 134 G4cout <<"Badly defined target after swapping. Falling back to normal (non-swapped) mode." << G4endl; 138 135 calincl = new G4InclInput(aTrack, theNucleus, false); 136 } 139 137 } 140 138 } else { … … 489 487 } 490 488 } 489 delete theSpectatorFermiBreakupResult; 490 theSpectatorFermiBreakupResult = 0; 491 491 492 if(std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) { 492 493 G4cout <<"Four-momentum balance after spectator nucleus Fermi break-up:" << G4endl; … … 588 589 } 589 590 } 591 delete theFermiBreakupResult; 592 theFermiBreakupResult = 0; 593 590 594 if(std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) { 591 595 G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl; … … 697 701 } 698 702 703 delete fermiBreakUp; 699 704 delete calincl; 700 705 calincl = 0; -
trunk/source/processes/hadronic/models/incl/src/G4InclCascadeInterface.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclCascadeInterface.cc,v 1.1 2 2010/10/26 02:47:59 kaitanie Exp $26 // $Id: G4InclCascadeInterface.cc,v 1.15 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 34 34 35 35 #include "G4InclCascadeInterface.hh" 36 #include "G4FermiBreakUp.hh" 36 37 #include "math.h" 37 38 #include "G4GenericIon.hh" 38 39 #include "CLHEP/Random/Random.h" 39 40 40 G4InclCascadeInterface::G4InclCascadeInterface() 41 G4InclCascadeInterface::G4InclCascadeInterface(const G4String& nam) 42 :G4VIntraNuclearTransportModel(nam) 41 43 { 42 44 hazard = new G4Hazard(); … … 45 47 46 48 varntp = new G4VarNtp(); 47 inclInput= 0;49 calincl = 0; 48 50 ws = new G4Ws(); 49 51 mat = new G4Mat(); 50 incl = new G4Incl(hazard, inclInput, ws, mat, varntp); 52 incl = new G4Incl(hazard, calincl, ws, mat, varntp); 53 54 theExcitationHandler = new G4ExcitationHandler; 55 thePrecoModel = new G4PreCompoundModel(theExcitationHandler); 56 57 if(!getenv("G4INCLABLANOFERMIBREAKUP")) { // Use Fermi Break-up by default if it is NOT explicitly disabled 58 incl->setUseFermiBreakUp(true); 59 } 51 60 52 61 verboseLevel = 0; … … 55 64 G4InclCascadeInterface::~G4InclCascadeInterface() 56 65 { 66 delete thePrecoModel; 67 delete theExcitationHandler; 68 57 69 delete hazard; 58 70 delete varntp; 59 delete inclInput;60 71 delete ws; 61 72 delete mat; … … 68 79 69 80 G4int particleI; 81 G4int bulletType = 0; 70 82 71 83 // Print diagnostic messages: 0 = silent, 1 and 2 = verbose … … 91 103 G4DynamicParticle *cascadeParticle = 0; 92 104 G4ParticleDefinition *aParticleDefinition = 0; 105 106 G4ReactionProductVector *thePrecoResult = 0; 107 G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable(); 93 108 94 109 // INCL assumes the projectile particle is going in the direction of … … 102 117 G4LorentzRotation toLabFrame = toZ.inverse(); 103 118 104 inclInput = new G4InclInput(aTrack, theNucleus, false);105 106 119 theResult.Clear(); // Make sure the output data structure is clean. 120 121 calincl = new G4InclInput(aTrack, theNucleus, false); 122 incl->setInput(calincl); 123 124 // G4InclInput::printProjectileTargetInfo(aTrack, theNucleus); 125 // calincl->printInfo(); 107 126 108 127 #ifdef DEBUGINCL … … 117 136 G4double eKinSum = bulletE; 118 137 G4LorentzVector labv = G4LorentzVector(0.0, 0.0, std::sqrt(bulletE*(bulletE + 2.*mass)), bulletE + mass + amass); 138 G4LorentzVector labvA = G4LorentzVector(0.0, 0.0, 0.0, 0.0); 119 139 G4cout <<"Energy in the beginning = " << labv.e() / MeV << G4endl; 120 140 #endif 121 141 122 142 // Check wheter the input is acceptable. 123 if(( inclInput->bulletType() != 0) && ((inclInput->targetA() != 1) && (inclInput->targetZ() != 1))) {143 if((calincl->bulletType() != 0) && ((calincl->targetA() != 1) && (calincl->targetZ() != 1))) { 124 144 ws->nosurf = -2; // Nucleus surface, -2 = Woods-Saxon 125 145 ws->xfoisa = 8; … … 130 150 131 151 mat->nbmat = 1; 132 mat->amat[0] = int( inclInput->targetA());133 mat->zmat[0] = int( inclInput->targetZ());152 mat->amat[0] = int(calincl->targetA()); 153 mat->zmat[0] = int(calincl->targetZ()); 134 154 135 155 incl->initIncl(true); … … 140 160 G4cout <<"G4InclCascadeInterface: Try number = " << nTries << G4endl; 141 161 } 142 incl->processEventIncl( inclInput);162 incl->processEventIncl(calincl); 143 163 144 164 if(verboseLevel > 1) { … … 151 171 * Diagnostic output 152 172 */ 153 G4cout <<"G4InclCascadeInterface: Bullet type: " << inclInput->bulletType() << G4endl;154 G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << inclInput->bulletE() << " MeV" << G4endl;155 156 G4cout <<"G4InclCascadeInterface: Target A: " << inclInput->targetA() << G4endl;157 G4cout <<"G4InclCascadeInterface: Target Z: " << inclInput->targetZ() << G4endl;173 G4cout <<"G4InclCascadeInterface: Bullet type: " << calincl->bulletType() << G4endl; 174 G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl; 175 176 G4cout <<"G4InclCascadeInterface: Target A: " << calincl->targetA() << G4endl; 177 G4cout <<"G4InclCascadeInterface: Target Z: " << calincl->targetZ() << G4endl; 158 178 159 179 if(verboseLevel > 3) { 160 diagdata <<"G4InclCascadeInterface: Bullet type: " << inclInput->bulletType() << G4endl;161 diagdata <<"G4InclCascadeInterface: Bullet energy: " << inclInput->bulletE() << " MeV" << G4endl;180 diagdata <<"G4InclCascadeInterface: Bullet type: " << calincl->bulletType() << G4endl; 181 diagdata <<"G4InclCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl; 162 182 163 diagdata <<"G4InclCascadeInterface: Target A: " << inclInput->targetA() << G4endl; 164 diagdata <<"G4InclCascadeInterface: Target Z: " << inclInput->targetZ() << G4endl; 165 } 166 167 // for(particleI = 0; particleI < varntp->ntrack; particleI++) { 168 // G4cout << n << " " << inclInput->f[6] << " " << inclInput->f[2] << " "; 169 // G4cout << varntp->massini << " " << varntp->mzini << " "; 170 // G4cout << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " "; 171 // G4cout << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " "; 172 // G4cout << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " " << varntp->itypcasc[particleI] << " "; 173 // G4cout << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " "; 174 // G4cout << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl; 175 // // For diagnostic output 176 // if(verboseLevel > 3) { 177 // diagdata << n << " " << inclInput->f[6] << " " << inclInput->f[2] << " "; 178 // diagdata << varntp->massini << " " << varntp->mzini << " "; 179 // diagdata << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " "; 180 // diagdata << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " "; 181 // diagdata << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " "; 182 // diagdata << varntp->itypcasc[particleI] << " "; 183 // diagdata << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " "; 184 // diagdata << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl; 185 // } 186 // } 183 diagdata <<"G4InclCascadeInterface: Target A: " << calincl->targetA() << G4endl; 184 diagdata <<"G4InclCascadeInterface: Target Z: " << calincl->targetZ() << G4endl; 185 } 186 187 187 } 188 188 … … 196 196 197 197 theResult.SetStatusChange(stopAndKill); 198 aParticleDefinition = G4InclInput::getParticleDefinition(inclInput->bulletType()); 199 200 cascadeParticle = new G4DynamicParticle(); 201 cascadeParticle->SetDefinition(aParticleDefinition); 202 cascadeParticle->Set4Momentum(aTrack.Get4Momentum()); 203 theResult.AddSecondary(cascadeParticle); 198 199 G4int bulletType = calincl->bulletType(); 200 aParticleDefinition = G4InclInput::getParticleDefinition(bulletType); 201 202 if(aParticleDefinition != 0) { 203 cascadeParticle = new G4DynamicParticle(); 204 cascadeParticle->SetDefinition(aParticleDefinition); 205 cascadeParticle->Set4Momentum(aTrack.Get4Momentum()); 206 theResult.AddSecondary(cascadeParticle); 207 } 204 208 } 205 209 … … 209 213 210 214 #ifdef DEBUGINCL 211 G4cout << "E [MeV]" << std::setw(12) << " Ekin [MeV]" << std::setw(12) << " E* [MeV]" << std::setw(12) << "Px [MeV]" << std::setw(12) << " Py [MeV]" << std::setw(12) << "Pz [MeV]" << std::setw(12) << "Pt [MeV]" << std::setw(12) << "A" << std::setw(12) << "Z" << G4endl; 215 G4cout << "E [MeV]" << std::setw(12) 216 << " Ekin [MeV]" << std::setw(12) 217 << "Px [MeV]" << std::setw(12) 218 << " Py [MeV]" << std::setw(12) 219 << "Pz [MeV]" << std::setw(12) 220 << "Pt [MeV]" << std::setw(12) 221 << "A" << std::setw(12) 222 << "Z" << G4endl; 212 223 #endif 213 224 … … 276 287 if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) { // Nucleus fragment 277 288 G4ParticleDefinition * aIonDef = 0; 278 G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();279 289 280 290 G4int A = G4int(varntp->avv[particleI]); … … 315 325 G4double p = mom.mag(); 316 326 labv -= fm; 317 G4double px = mom.x() * MeV; 318 G4double py = mom.y() * MeV; 319 G4double pz = mom.z() * MeV; 327 if(varntp->avv[particleI] > 1) { 328 labvA += fm; 329 } 330 G4double px = mom.x() * MeV; 331 G4double py = mom.y() * MeV; 332 G4double pz = mom.z() * MeV; 320 333 G4double pt = std::sqrt(px*px+py*py); 321 334 G4double e = fm.e(); … … 330 343 G4cout << fm.e() / MeV 331 344 << std::setw(12) << cascadeParticle->GetKineticEnergy() / MeV 332 << std::setw(12) << exE / MeV333 345 << std::setw(12) << mom.x() / MeV 334 346 << std::setw(12) << mom.y() / MeV … … 351 363 } 352 364 } 365 366 G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->massini), G4int(varntp->mzini)) + varntp->exini * MeV; 367 G4LorentzVector fragmentMomentum(varntp->pxrem * MeV, varntp->pyrem * MeV, varntp->pzrem * MeV, 368 varntp->erecrem * MeV + nuclearMass); 369 G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->massini), G4int(varntp->mzini), 370 varntp->exini, 371 varntp->erecrem, 372 varntp->pxrem, 373 varntp->pyrem, 374 varntp->pzrem); 375 G4LorentzVector p4(momentumScaling * varntp->pxrem * MeV, momentumScaling * varntp->pyrem * MeV, 376 momentumScaling * varntp->pzrem * MeV, 377 varntp->erecrem + nuclearMass); 378 379 // For four-momentum, baryon number and charge conservation check: 380 G4LorentzVector fourMomentumBalance = p4; 381 G4int baryonNumberBalance = G4int(varntp->massini); 382 G4int chargeBalance = G4int(varntp->mzini); 383 384 G4LorentzRotation toFragmentZ; 385 toFragmentZ.rotateZ(-p4.theta()); 386 toFragmentZ.rotateY(-p4.phi()); 387 G4LorentzRotation toFragmentLab = toFragmentZ.inverse(); 388 p4 *= toFragmentZ; 389 390 G4LorentzVector p4rest = p4; 391 p4rest.boost(-p4.boostVector()); 392 if(verboseLevel > 0) { 393 G4cout <<"Cascade remnant nucleus:" << G4endl; 394 G4cout <<"p4: " << G4endl; 395 G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl; 396 G4cout <<" E = " << p4.e() << G4endl; 397 398 G4cout <<"p4rest: " << G4endl; 399 G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl; 400 G4cout <<" E = " << p4rest.e() << G4endl; 401 } 402 403 G4Fragment theCascadeRemnant(G4int(varntp->massini), G4int(varntp->mzini), p4rest); 404 thePrecoResult = thePrecoModel->DeExcite(theCascadeRemnant); 405 if(thePrecoResult != 0) { 406 G4ReactionProductVector::iterator fragment; 407 for(fragment = thePrecoResult->begin(); fragment != thePrecoResult->end(); fragment++) { 408 G4ParticleDefinition *theFragmentDefinition = (*fragment)->GetDefinition(); 409 410 if(theFragmentDefinition != 0) { 411 G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum()); 412 G4LorentzVector labMomentum = theFragment->Get4Momentum(); 413 labMomentum.boost(p4.boostVector()); 414 labMomentum *= toFragmentLab; 415 labMomentum *= toLabFrame; 416 theFragment->Set4Momentum(labMomentum); 417 fourMomentumBalance -= theFragment->Get4Momentum(); 418 baryonNumberBalance -= theFragmentDefinition->GetAtomicMass(); 419 chargeBalance -= theFragmentDefinition->GetAtomicNumber(); 420 if(verboseLevel > 0) { 421 G4cout <<"Resulting fragment: " << G4endl; 422 G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl; 423 G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl; 424 } 425 theResult.AddSecondary(theFragment); 426 } else { 427 G4cout <<"G4InclCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl; 428 G4cout <<"Resulting fragment: " << G4endl; 429 G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl; 430 } 431 } 432 delete thePrecoResult; 433 thePrecoResult = 0; 434 435 if(verboseLevel > 1 && std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) { 436 G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl; 437 G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl; 438 G4cout <<"Vector components (px, py, pz, E) = (" 439 << fourMomentumBalance.px() << ", " 440 << fourMomentumBalance.py() << ", " 441 << fourMomentumBalance.pz() << ", " 442 << fourMomentumBalance.e() << ")" << G4endl; 443 } 444 if(baryonNumberBalance != 0 && verboseLevel > 1) { 445 G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl; 446 } 447 if(chargeBalance != 0 && verboseLevel > 1) { 448 G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl; 449 } 450 } 451 // } // if(needsFermiBreakUp) 452 353 453 #ifdef DEBUGINCL 354 454 G4cout <<"--------------------------------------------------------------------------------" << G4endl; 355 455 G4double pt = std::sqrt(std::pow(labv.x(), 2) + std::pow(labv.y(), 2)); 356 G4cout << labv.e() / MeV << std::setw(12) << eKinSum / MeV << std::setw(12) << labv.x() << std::setw(12) << labv.y() << std::setw(12) << labv.z() << std::setw(12) << pt / MeV << std::setw(12) << baryonNumber << std::setw(12) << chargeNumber << " totals" << G4endl; 456 G4double ptA = std::sqrt(std::pow(labvA.x(), 2) + std::pow(labvA.y(), 2)); 457 G4cout << labv.e() / MeV << std::setw(12) 458 << eKinSum / MeV << std::setw(12) 459 << labv.x() / MeV << std::setw(12) 460 << labv.y() / MeV << std::setw(12) 461 << labv.z() / MeV << std::setw(12) 462 << pt / MeV << std::setw(12) 463 << baryonNumber << std::setw(12) 464 << chargeNumber << " totals" << G4endl; 465 G4cout << " - " << std::setw(12) 466 << " - " << std::setw(12) 467 << labvA.x() / MeV << std::setw(12) 468 << labvA.y() / MeV << std::setw(12) 469 << labvA.z() / MeV << std::setw(12) 470 << ptA / MeV << std::setw(12) 471 << " - " << std::setw(12) << " - " << " totals ABLA" << G4endl; 357 472 G4cout << G4endl; 358 473 359 474 if(verboseLevel > 3) { 360 475 if(baryonNumber != 0) { … … 369 484 } 370 485 #endif 371 486 372 487 varntp->ntrack = 0; // Clean up the number of generated particles in the event. 373 488 } … … 379 494 theResult.SetStatusChange(stopAndKill); 380 495 381 G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();382 496 cascadeParticle = new G4DynamicParticle(theTableOfParticles->FindParticle(aTrack.GetDefinition()), aTrack.Get4Momentum()); 383 497 … … 388 502 } 389 503 if(verboseLevel > 3) { 390 diagdata <<"ERROR G4InclCascadeInterface: Processing event number (internal) failed " << eventNumber << G4endl;391 } 392 393 if( inclInput->bulletType()== 0) {504 diagdata <<"ERROR G4InclCascadeInterface: Error processing event number (internal) failed " << eventNumber << G4endl; 505 } 506 507 if(bulletType == 0) { 394 508 if(verboseLevel > 1) { 395 509 G4cout <<"G4InclCascadeInterface: Unknown bullet type" << G4endl; … … 402 516 } 403 517 404 if(( inclInput->targetA() == 1) && (inclInput->targetZ() == 1)) { // Unsupported target518 if((calincl->targetA() == 1) && (calincl->targetZ() == 1)) { // Unsupported target 405 519 if(verboseLevel > 1) { 406 520 G4cout <<"Unsupported target: " << G4endl; 407 G4cout <<"Target A: " << inclInput->targetA() << G4endl;408 G4cout <<"TargetZ: " << inclInput->targetZ() << G4endl;521 G4cout <<"Target A: " << calincl->targetA() << G4endl; 522 G4cout <<"TargetZ: " << calincl->targetZ() << G4endl; 409 523 } 410 524 if(verboseLevel > 3) { 411 525 diagdata <<"Unsupported target: " << G4endl; 412 diagdata <<"Target A: " << inclInput->targetA() << G4endl;413 diagdata <<"TargetZ: " << inclInput->targetZ() << G4endl;414 } 415 } 416 417 if( inclInput->bulletE() < 100) { // INCL does not support E < 100 MeV.526 diagdata <<"Target A: " << calincl->targetA() << G4endl; 527 diagdata <<"TargetZ: " << calincl->targetZ() << G4endl; 528 } 529 } 530 531 if(calincl->bulletE() < 100) { // INCL does not support E < 100 MeV. 418 532 if(verboseLevel > 1) { 419 G4cout <<"Unsupported bullet energy: " << inclInput->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;533 G4cout <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl; 420 534 G4cout <<"WARNING: Returning the original bullet with original energy back to Geant4." << G4endl; 421 535 } 422 536 if(verboseLevel > 3) { 423 diagdata <<"Unsupported bullet energy: " << inclInput->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;537 diagdata <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl; 424 538 } 425 539 } … … 430 544 } 431 545 546 delete calincl; 547 calincl = 0; 432 548 return &theResult; 433 549 } -
trunk/source/processes/hadronic/models/incl/src/G4InclLightIonInterface.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclLightIonInterface.cc,v 1.1 2 2010/10/26 02:47:59 kaitanie Exp $26 // $Id: G4InclLightIonInterface.cc,v 1.15 2010/11/17 20:19:09 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 31 31 // Aatos Heikkinen, HIP (project coordination) 32 32 33 #include <vector> 34 33 35 #include "G4InclLightIonInterface.hh" 36 #include "G4FermiBreakUp.hh" 34 37 #include "math.h" 35 38 #include "G4GenericIon.hh" … … 39 42 { 40 43 hazard = new G4Hazard(); 44 41 45 const G4long* table_entry = CLHEP::HepRandom::getTheSeeds(); // Get random seed from CLHEP. 42 46 hazard->ial = (*table_entry); 47 48 theExcitationHandler = new G4ExcitationHandler; 49 thePrecoModel = new G4PreCompoundModel(theExcitationHandler); 43 50 44 51 varntp = new G4VarNtp(); … … 47 54 mat = new G4Mat(); 48 55 incl = new G4Incl(hazard, calincl, ws, mat, varntp); 49 56 useProjectileSpectator = true; 57 useFermiBreakup = true; 58 incl->setUseProjectileSpectators(useProjectileSpectator); 59 if(!getenv("G4INCLABLANOFERMIBREAKUP")) { // Use Fermi Break-up by default if it is NOT explicitly disabled 60 incl->setUseFermiBreakUp(true); 61 useFermiBreakup = true; 62 } 50 63 verboseLevel = 0; 64 if(getenv("G4INCLVERBOSE")) { 65 verboseLevel = 1; 66 } 51 67 } 52 68 53 69 G4InclLightIonInterface::~G4InclLightIonInterface() 54 70 { 71 delete thePrecoModel; 72 delete theExcitationHandler; 73 55 74 delete hazard; 56 75 delete varntp; … … 63 82 G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus) 64 83 { 84 // const G4bool useFermiBreakup = false; 65 85 G4int maxTries = 200; 66 86 67 G4int bulletType = 0;68 87 G4int particleI; 69 88 70 // Print diagnostic messages: 0 = silent, 1 and 2 = verbose 71 verboseLevel = 0; 89 G4int baryonNumberBalanceInINCL = 0; 90 G4int chargeNumberBalanceInINCL = 0; 91 92 G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable(); 72 93 73 94 // Increase the event number: 74 95 eventNumber++; 75 96 97 // Clean up the INCL input 98 if(calincl != 0) { 99 delete calincl; 100 calincl = 0; 101 } 102 76 103 if (verboseLevel > 1) { 77 104 G4cout << " >>> G4InclLightIonInterface::ApplyYourself called" << G4endl; … … 82 109 } 83 110 84 // INCL4 needs the energy in units MeV 85 G4double bulletE = aTrack.GetKineticEnergy() / MeV; 86 87 G4int targetA = theNucleus.GetA_asInt(); 88 G4int targetZ = theNucleus.GetZ_asInt(); 111 // Inverse kinematics for targets with Z = 1 and A = 1 112 // if(false) { 113 G4LorentzRotation toBreit = aTrack.Get4Momentum().boostVector(); 114 115 if(theNucleus.GetZ_asInt() == 1 && theNucleus.GetA_asInt() == 1 && G4InclInput::canUseInverseKinematics(aTrack, theNucleus)) { 116 G4ParticleDefinition *oldTargetDef = theTableOfParticles->GetIon(theNucleus.GetA_asInt(), theNucleus.GetZ_asInt(), 0.0); 117 const G4ParticleDefinition *oldProjectileDef = aTrack.GetDefinition(); 118 119 if(oldTargetDef != 0 && oldProjectileDef != 0) { 120 G4int oldTargetA = oldTargetDef->GetAtomicMass(); 121 G4int newTargetA = oldProjectileDef->GetAtomicMass(); 122 G4int newTargetZ = oldProjectileDef->GetAtomicNumber(); 123 124 if(newTargetA > 0 && newTargetZ > 0) { 125 G4Nucleus swappedTarget(oldProjectileDef->GetAtomicMass(), oldProjectileDef->GetAtomicNumber()); 126 127 // G4cout <<"Original projectile kinE = " << aTrack.GetKineticEnergy() / MeV << G4endl; 128 129 // We need the same energy/nucleon. 130 G4double projectileE = ((aTrack.GetKineticEnergy() / MeV) / newTargetA) * oldTargetA * MeV; 131 132 // G4cout <<"projectileE = " << projectileE << G4endl; 133 G4DynamicParticle swappedProjectileParticle(oldTargetDef, G4ThreeVector(0.0, 0.0, 1.0), projectileE); 134 const G4LorentzVector swapped4Momentum = (swappedProjectileParticle.Get4Momentum()*=toBreit); 135 swappedProjectileParticle.Set4Momentum(swapped4Momentum); 136 const G4HadProjectile swappedProjectile(swappedProjectileParticle); 137 // G4cout <<"New projectile kinE = " << swappedProjectile.GetKineticEnergy() / MeV << G4endl; 138 calincl = new G4InclInput(swappedProjectile, swappedTarget, true); 139 } else { 140 G4cout <<"Badly defined target after swapping. Falling back to normal (non-swapped) mode." << G4endl; 141 calincl = new G4InclInput(aTrack, theNucleus, false); 142 } 143 } 144 } else { 145 calincl = new G4InclInput(aTrack, theNucleus, false); 146 } 89 147 90 148 G4double eKin; … … 103 161 G4LorentzRotation toLabFrame = toZ.inverse(); 104 162 163 /* 164 G4cout <<"Projectile theta = " << projectileMomentum.theta() << " phi = " << projectileMomentum.phi() << G4endl; 165 G4cout <<"Projectile momentum " 166 << "(px = " << projectileMomentum.px() 167 << ", py = " << projectileMomentum.py() 168 << ", pz = " << projectileMomentum.pz() << ")" << G4endl; 169 G4cout << "Projectile energy = " << bulletE << " MeV" << G4endl; 170 */ 171 172 G4ReactionProductVector *thePrecoResult = 0; 173 G4ReactionProductVector *theSpectatorPrecoResult = 0; 174 105 175 theResult.Clear(); // Make sure the output data structure is clean. 176 177 std::vector<G4DynamicParticle*> result; // Temporary list for the results 106 178 107 179 // Map Geant4 particle types to corresponding INCL4 types. 108 180 enum bulletParticleType {nucleus = 0, proton = 1, neutron = 2, pionPlus = 3, pionZero = 4, 109 pionMinus = 5, deuteron = 6, triton = 7, he3 = 8, he4 = 9}; 110 111 // Coding particles for use with INCL4 and ABLA 112 if (aTrack.GetDefinition() == G4Deuteron::Deuteron() ) bulletType = deuteron; 113 if (aTrack.GetDefinition() == G4Triton::Triton() ) bulletType = triton; 114 if (aTrack.GetDefinition() == G4He3::He3() ) bulletType = he3; 115 if (aTrack.GetDefinition() == G4Alpha::Alpha() ) bulletType = he4; 116 117 calincl = new G4InclInput(); 181 pionMinus = 5, deuteron = 6, triton = 7, he3 = 8, he4 = 9, 182 c12 = -12}; // Carbon beam support. 183 184 G4int bulletType = calincl->bulletType(); 185 chargeNumberBalanceInINCL = calincl->targetZ(); 186 baryonNumberBalanceInINCL = calincl->targetA(); 187 188 // G4cout <<"Type of the projectile (INCL projectile code): " << bulletType << G4endl; 189 190 if(bulletType == proton) { 191 chargeNumberBalanceInINCL += 1; 192 baryonNumberBalanceInINCL += 1; 193 } else if(bulletType == neutron) { 194 baryonNumberBalanceInINCL += 1; 195 } else if(bulletType == pionPlus) { //Note: positive pion doesn't contribute to the baryon and charge number counters 196 chargeNumberBalanceInINCL += 1; 197 } else if(bulletType == pionMinus) { 198 chargeNumberBalanceInINCL -= 1; 199 } else if(bulletType == deuteron) { 200 chargeNumberBalanceInINCL += 1; 201 baryonNumberBalanceInINCL += 2; 202 } else if(bulletType == triton) { 203 chargeNumberBalanceInINCL += 1; 204 baryonNumberBalanceInINCL += 3; 205 } else if(bulletType == he3) { 206 chargeNumberBalanceInINCL += 2; 207 baryonNumberBalanceInINCL += 3; 208 } else if(bulletType == he4) { 209 chargeNumberBalanceInINCL += 2; 210 baryonNumberBalanceInINCL += 4; 211 } if(bulletType == c12) { 212 chargeNumberBalanceInINCL += 6; 213 baryonNumberBalanceInINCL += 12; 214 } if(bulletType == -666) { 215 chargeNumberBalanceInINCL += calincl->extendedProjectileZ(); 216 baryonNumberBalanceInINCL += calincl->extendedProjectileA(); 217 } 118 218 119 219 // Check wheter the input is acceptable. 120 if((bulletType != 0) && (( targetA != 1) && (targetZ!= 1))) {220 if((bulletType != 0) && ((calincl->targetA() != 1) && (calincl->targetZ() != 1))) { 121 221 ws->nosurf = -2; // Nucleus surface, -2 = Woods-Saxon 122 222 ws->xfoisa = 8; … … 128 228 mat->nbmat = 1; 129 229 mat->amat[0] = int(calincl->targetA()); 130 mat->zmat[0] = int(calincl->targetZ()); 131 230 mat->zmat[0] = int(calincl->targetA()); 231 232 incl->setInput(calincl); 132 233 incl->initIncl(true); 133 234 … … 148 249 * Diagnostic output 149 250 */ 150 G4cout <<"G4InclLightIonInterface: Bullet type: " << bulletType << G4endl; 151 G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl; 152 153 G4cout <<"G4InclLightIonInterface: Target A: " << targetA << G4endl; 154 G4cout <<"G4InclLightIonInterface: Target Z: " << targetZ << G4endl; 251 G4cout <<"G4InclLightIonInterface: Bullet type: " << calincl->bulletType() << G4endl; 252 G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl; 253 if(bulletType == -666) { 254 G4cout <<" Extended projectile: A = " << calincl->extendedProjectileA() 255 <<" Z = " << calincl->extendedProjectileZ() << G4endl; 256 } 257 258 G4cout <<"G4InclLightIonInterface: Target A: " << calincl->targetA() << G4endl; 259 G4cout <<"G4InclLightIonInterface: Target Z: " << calincl->targetZ() << G4endl; 155 260 156 261 if(verboseLevel > 3) { 157 diagdata <<"G4InclLightIonInterface: Bullet type: " << bulletType<< G4endl;158 diagdata <<"G4InclLightIonInterface: Bullet energy: " << bulletE<< " MeV" << G4endl;262 diagdata <<"G4InclLightIonInterface: Bullet type: " << calincl->bulletType() << G4endl; 263 diagdata <<"G4InclLightIonInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl; 159 264 160 diagdata <<"G4InclLightIonInterface: Target A: " << targetA<< G4endl;161 diagdata <<"G4InclLightIonInterface: Target Z: " << targetZ<< G4endl;265 diagdata <<"G4InclLightIonInterface: Target A: " << calincl->targetA() << G4endl; 266 diagdata <<"G4InclLightIonInterface: Target Z: " << calincl->targetZ() << G4endl; 162 267 } 163 268 } … … 175 280 if(bulletType == proton) { 176 281 aParticleDefinition = G4Proton::ProtonDefinition(); 177 } 178 if(bulletType == neutron) { 282 } else if(bulletType == neutron) { 179 283 aParticleDefinition = G4Neutron::NeutronDefinition(); 180 } 181 if(bulletType == pionPlus) { 284 } else if(bulletType == pionPlus) { 182 285 aParticleDefinition = G4PionPlus::PionPlusDefinition(); 183 } 184 if(bulletType == pionZero) { 286 } else if(bulletType == pionZero) { 185 287 aParticleDefinition = G4PionZero::PionZeroDefinition(); 186 } 187 if(bulletType == pionMinus) { 288 } else if(bulletType == pionMinus) { 188 289 aParticleDefinition = G4PionMinus::PionMinusDefinition(); 189 } 190 191 cascadeParticle = new G4DynamicParticle(); 192 cascadeParticle->SetDefinition(aParticleDefinition); 193 cascadeParticle->Set4Momentum(aTrack.Get4Momentum()); 194 theResult.AddSecondary(cascadeParticle); 290 } else if(bulletType == deuteron) { 291 aParticleDefinition = G4Deuteron::DeuteronDefinition(); 292 } else if(bulletType == triton) { 293 aParticleDefinition = G4Triton::TritonDefinition(); 294 } else if(bulletType == he3) { 295 aParticleDefinition = G4He3::He3Definition(); 296 } else if(bulletType == he4) { 297 aParticleDefinition = G4Alpha::AlphaDefinition(); 298 } else { // Particle was not recognized. Probably an unsupported particle was given as input 299 aParticleDefinition = 0; 300 } 301 302 if(aParticleDefinition != 0) { 303 cascadeParticle = new G4DynamicParticle(); 304 cascadeParticle->SetDefinition(aParticleDefinition); 305 cascadeParticle->Set4Momentum(aTrack.Get4Momentum()); 306 result.push_back(cascadeParticle); 307 } 195 308 } 196 309 … … 199 312 theResult.SetStatusChange(stopAndKill); 200 313 201 for(particleI = 0; particleI < varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output.314 for(particleI = 0; particleI <= varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output. 202 315 // Get energy/momentum and construct momentum vector in INCL4 coordinates. 316 // if(varntp->itypcasc[particleI] == -1) continue; // Avoid nucleons that are part of the spectator 317 if(varntp->avv[particleI] == 0 && varntp->zvv[particleI] == 0) continue; 203 318 momx = varntp->plab[particleI]*std::sin(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::cos(varntp->philab[particleI]*CLHEP::pi/180.0)*MeV; 204 319 momy = varntp->plab[particleI]*std::sin(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::sin(varntp->philab[particleI]*CLHEP::pi/180.0)*MeV; … … 222 337 new G4DynamicParticle(G4Proton::ProtonDefinition(), momDirection, eKin); 223 338 particleIdentified++; 339 baryonNumberBalanceInINCL -= 1; 340 chargeNumberBalanceInINCL -= 1; 224 341 } 225 342 … … 228 345 new G4DynamicParticle(G4Neutron::NeutronDefinition(), momDirection, eKin); 229 346 particleIdentified++; 347 baryonNumberBalanceInINCL -= 1; 230 348 } 231 349 … … 234 352 new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), momDirection, eKin); 235 353 particleIdentified++; 354 chargeNumberBalanceInINCL -= 1; 236 355 } 237 356 … … 240 359 new G4DynamicParticle(G4PionZero::PionZeroDefinition(), momDirection, eKin); 241 360 particleIdentified++; 361 chargeNumberBalanceInINCL -= 0; 242 362 } 243 363 … … 246 366 new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), momDirection, eKin); 247 367 particleIdentified++; 368 chargeNumberBalanceInINCL -= -1; 248 369 } 249 370 250 371 if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) { // Nucleus fragment 251 G4ParticleDefinition * aIonDef = 0; 252 G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable(); 372 G4ParticleDefinition * aIonDef = 0; 253 373 254 374 G4int A = G4int(varntp->avv[particleI]); … … 273 393 new G4DynamicParticle(aIonDef, momDirection, eKin); 274 394 particleIdentified++; 395 baryonNumberBalanceInINCL -= A; 396 chargeNumberBalanceInINCL -= Z; 275 397 } 276 398 } 277 399 278 400 if(particleIdentified == 1) { // Particle identified properly. 279 cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);280 theResult.AddSecondary(cascadeParticle); // Put data into G4HadFinalState.401 cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame); 402 result.push_back(cascadeParticle); 281 403 } 282 404 else { // Particle identification failed. … … 292 414 } 293 415 416 // Spectator nucleus Fermi break-up 417 if(useFermiBreakup && useProjectileSpectator && varntp->masp > 1) { 418 baryonNumberBalanceInINCL -= G4int(varntp->masp); 419 G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->masp), G4int(varntp->mzsp)) + varntp->exsp * MeV; 420 // Use momentum scaling to compensate for different masses in G4 and INCL: 421 G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->masp), 422 G4int(varntp->mzsp), 423 varntp->exsp, 424 varntp->spectatorT, 425 varntp->spectatorP1, 426 varntp->spectatorP2, 427 varntp->spectatorP3); 428 G4LorentzVector p4(momentumScaling * varntp->spectatorP1 * MeV, momentumScaling * varntp->spectatorP2 * MeV, 429 momentumScaling * varntp->spectatorP3 * MeV, 430 varntp->spectatorT * MeV + nuclearMass); 431 // Four-momentum, baryon number and charge balance: 432 G4LorentzVector fourMomentumBalance = p4; 433 G4int baryonNumberBalance = G4int(varntp->masp); 434 chargeNumberBalanceInINCL -= G4int(varntp->mzsp); 435 G4int chargeBalance = G4int(varntp->mzsp); 436 437 G4LorentzRotation toFragmentZ; 438 // Assume that Fermi breakup uses Z as the direction of the projectile 439 toFragmentZ.rotateZ(-p4.theta()); 440 toFragmentZ.rotateY(-p4.phi()); 441 G4LorentzRotation toFragmentLab = toFragmentZ.inverse(); 442 p4 *= toFragmentZ; 443 444 G4LorentzVector p4rest = p4; 445 p4rest.boost(-p4.boostVector()); 446 if(verboseLevel > 0) { 447 G4cout <<"Spectator nucleus:" << G4endl; 448 G4cout <<"p4: " << G4endl; 449 G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl; 450 G4cout <<" E = " << p4.e() << G4endl; 451 G4cout <<"p4rest: " << G4endl; 452 G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl; 453 G4cout <<" E = " << p4rest.e() << G4endl; 454 } 455 G4Fragment theSpectatorNucleus(G4int(varntp->masp), G4int(varntp->mzsp), p4rest); 456 theSpectatorPrecoResult = thePrecoModel->DeExcite(theSpectatorNucleus); 457 if(theSpectatorPrecoResult != 0) { 458 G4ReactionProductVector::iterator fragment; 459 for(fragment = theSpectatorPrecoResult->begin(); fragment != theSpectatorPrecoResult->end(); fragment++) { 460 G4ParticleDefinition *theFragmentDefinition = (*fragment)->GetDefinition(); 461 462 if(theFragmentDefinition != 0) { 463 G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum()); 464 G4LorentzVector labMomentum = theFragment->Get4Momentum(); 465 labMomentum.boost(p4.boostVector()); 466 labMomentum *= toFragmentLab; 467 labMomentum *= toLabFrame; 468 theFragment->Set4Momentum(labMomentum); 469 fourMomentumBalance -= theFragment->Get4Momentum(); 470 baryonNumberBalance -= theFragmentDefinition->GetAtomicMass(); 471 chargeBalance -= theFragmentDefinition->GetAtomicNumber(); 472 if(verboseLevel > 0) { 473 G4cout <<"Resulting fragment: " << G4endl; 474 G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl; 475 G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl; 476 } 477 theResult.AddSecondary(theFragment); 478 } else { 479 G4cout <<"G4InclCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl; 480 G4cout <<"Resulting fragment: " << G4endl; 481 G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl; 482 } 483 } 484 delete theSpectatorPrecoResult; 485 theSpectatorPrecoResult = 0; 486 487 if(verboseLevel > 1 && std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) { 488 G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl; 489 G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl; 490 G4cout <<"Vector components (px, py, pz, E) = (" 491 << fourMomentumBalance.px() << ", " 492 << fourMomentumBalance.py() << ", " 493 << fourMomentumBalance.pz() << ", " 494 << fourMomentumBalance.e() << ")" << G4endl; 495 } 496 if(baryonNumberBalance != 0 && verboseLevel > 1) { 497 G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl; 498 } 499 if(chargeBalance != 0 && verboseLevel > 1) { 500 G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl; 501 } 502 } 503 } 504 505 // Finally do Fermi break-up if needed 506 if(varntp->massini > 0) { 507 baryonNumberBalanceInINCL -= G4int(varntp->massini); 508 chargeNumberBalanceInINCL -= G4int(varntp->mzini); 509 // Call Fermi Break-up 510 G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->massini), G4int(varntp->mzini)) + varntp->exini * MeV; 511 G4LorentzVector fragmentMomentum(varntp->pxrem * MeV, varntp->pyrem * MeV, varntp->pzrem * MeV, 512 varntp->erecrem * MeV + nuclearMass); 513 G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->massini), G4int(varntp->mzini), 514 varntp->exini, 515 varntp->erecrem, 516 varntp->pxrem, 517 varntp->pyrem, 518 varntp->pzrem); 519 G4LorentzVector p4(momentumScaling * varntp->pxrem * MeV, momentumScaling * varntp->pyrem * MeV, 520 momentumScaling * varntp->pzrem * MeV, 521 varntp->erecrem + nuclearMass); 522 523 // For four-momentum, baryon number and charge conservation check: 524 G4LorentzVector fourMomentumBalance = p4; 525 G4int baryonNumberBalance = G4int(varntp->massini); 526 G4int chargeBalance = G4int(varntp->mzini); 527 528 G4LorentzRotation toFragmentZ; 529 toFragmentZ.rotateZ(-p4.theta()); 530 toFragmentZ.rotateY(-p4.phi()); 531 G4LorentzRotation toFragmentLab = toFragmentZ.inverse(); 532 p4 *= toFragmentZ; 533 534 G4LorentzVector p4rest = p4; 535 p4rest.boost(-p4.boostVector()); 536 if(verboseLevel > 0) { 537 G4cout <<"Cascade remnant nucleus:" << G4endl; 538 G4cout <<"p4: " << G4endl; 539 G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl; 540 G4cout <<" E = " << p4.e() << G4endl; 541 542 G4cout <<"p4rest: " << G4endl; 543 G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl; 544 G4cout <<" E = " << p4rest.e() << G4endl; 545 } 546 547 G4Fragment theCascadeRemnant(G4int(varntp->massini), G4int(varntp->mzini), p4rest); 548 thePrecoResult = thePrecoModel->DeExcite(theCascadeRemnant); 549 if(thePrecoResult != 0) { 550 G4ReactionProductVector::iterator fragment; 551 for(fragment = thePrecoResult->begin(); fragment != thePrecoResult->end(); fragment++) { 552 G4ParticleDefinition *theFragmentDefinition = (*fragment)->GetDefinition(); 553 554 if(theFragmentDefinition != 0) { 555 G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum()); 556 G4LorentzVector labMomentum = theFragment->Get4Momentum(); 557 labMomentum.boost(p4.boostVector()); 558 labMomentum *= toFragmentLab; 559 labMomentum *= toLabFrame; 560 theFragment->Set4Momentum(labMomentum); 561 fourMomentumBalance -= theFragment->Get4Momentum(); 562 baryonNumberBalance -= theFragmentDefinition->GetAtomicMass(); 563 chargeBalance -= theFragmentDefinition->GetAtomicNumber(); 564 if(verboseLevel > 0) { 565 G4cout <<"Resulting fragment: " << G4endl; 566 G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl; 567 G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl; 568 } 569 theResult.AddSecondary(theFragment); 570 } else { 571 G4cout <<"G4InclCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl; 572 G4cout <<"Resulting fragment: " << G4endl; 573 G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl; 574 } 575 } 576 delete thePrecoResult; 577 thePrecoResult = 0; 578 579 if(verboseLevel > 1 && std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) { 580 G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl; 581 G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl; 582 G4cout <<"Vector components (px, py, pz, E) = (" 583 << fourMomentumBalance.px() << ", " 584 << fourMomentumBalance.py() << ", " 585 << fourMomentumBalance.pz() << ", " 586 << fourMomentumBalance.e() << ")" << G4endl; 587 } 588 if(baryonNumberBalance != 0 && verboseLevel > 1) { 589 G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl; 590 } 591 if(chargeBalance != 0 && verboseLevel > 1) { 592 G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl; 593 } 594 } 595 } 596 294 597 varntp->ntrack = 0; // Clean up the number of generated particles in the event. 598 599 if(baryonNumberBalanceInINCL != 0 && verboseLevel > 1) { 600 G4cout <<"Event " << eventNumber <<": G4InclLightIonInterface: Baryon number conservation problem in INCL detected!" << G4endl; 601 G4cout <<"Baryon number balance: " << baryonNumberBalanceInINCL << G4endl; 602 if(baryonNumberBalanceInINCL < 0) { 603 G4cout <<"Event " << eventNumber <<": Too many outcoming baryons!" << G4endl; 604 } else if(baryonNumberBalanceInINCL > 0) { 605 G4cout <<"Event " << eventNumber <<": Too few outcoming baryons!" << G4endl; 606 } 607 } 608 609 if(chargeNumberBalanceInINCL != 0 && verboseLevel > 1) { 610 G4cout <<"Event " << eventNumber <<": G4InclLightIonInterface: Charge number conservation problem in INCL detected!" << G4endl; 611 G4cout <<"Event " << eventNumber <<": Charge number balance: " << chargeNumberBalanceInINCL << G4endl; 612 } 295 613 } 296 614 /** … … 304 622 cascadeParticle = new G4DynamicParticle(theTableOfParticles->FindParticle(aTrack.GetDefinition()), aTrack.Get4Momentum()); 305 623 306 theResult.AddSecondary(cascadeParticle);624 result.push_back(cascadeParticle); 307 625 308 626 if(verboseLevel > 1) { … … 317 635 G4cout <<"G4InclLightIonInterface: Unknown bullet type" << G4endl; 318 636 G4cout <<"Bullet particle name: " << cascadeParticle->GetDefinition()->GetParticleName() << G4endl; 319 } 637 } 320 638 if(verboseLevel > 3) { 321 639 diagdata <<"G4InclLightIonInterface: Unknown bullet type" << G4endl; … … 324 642 } 325 643 326 if(( targetA == 1) && (targetZ== 1)) { // Unsupported target644 if((calincl->targetA() == 1) && (calincl->targetZ() == 1)) { // Unsupported target 327 645 if(verboseLevel > 1) { 328 646 G4cout <<"Unsupported target: " << G4endl; 329 G4cout <<"Target A: " << targetA<< G4endl;330 G4cout <<"TargetZ: " << targetZ<< G4endl;647 G4cout <<"Target A: " << calincl->targetA() << G4endl; 648 G4cout <<"TargetZ: " << calincl->targetZ() << G4endl; 331 649 } 332 650 if(verboseLevel > 3) { 333 651 diagdata <<"Unsupported target: " << G4endl; 334 diagdata <<"Target A: " << targetA<< G4endl;335 diagdata <<"TargetZ: " << targetZ<< G4endl;336 } 337 } 338 339 if( bulletE< 100) { // INCL does not support E < 100 MeV.652 diagdata <<"Target A: " << calincl->targetA() << G4endl; 653 diagdata <<"TargetZ: " << calincl->targetZ() << G4endl; 654 } 655 } 656 657 if(calincl->bulletE() < 100) { // INCL does not support E < 100 MeV. 340 658 if(verboseLevel > 1) { 341 G4cout <<"Unsupported bullet energy: " << bulletE<< " MeV. (Lower limit is 100 MeV)." << G4endl;659 G4cout <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl; 342 660 G4cout <<"WARNING: Returning the original bullet with original energy back to Geant4." << G4endl; 343 661 } 344 662 if(verboseLevel > 3) { 345 diagdata <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl; 346 } 347 } 663 diagdata <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl; 664 } 665 } 666 348 667 if(verboseLevel > 3) { 349 668 diagdata <<"WARNING: returning the original bullet with original energy back to Geant4." << G4endl; … … 351 670 } 352 671 672 // Finally copy the accumulated secondaries into the result collection: 673 G4ThreeVector boostVector = aTrack.Get4Momentum().boostVector(); 674 G4LorentzRotation boostBack = toBreit.inverse(); 675 676 for(std::vector<G4DynamicParticle*>::iterator i = result.begin(); i != result.end(); ++i) { 677 // If the calculation was performed in inverse kinematics we have to 678 // convert the result back... 679 if(calincl->isInverseKinematics()) { 680 G4LorentzVector mom = (*i)->Get4Momentum(); 681 mom.setPz(-1.0 * mom.pz()); // Reverse the z-component of the momentum vector 682 mom *= boostBack; 683 (*i)->Set4Momentum(mom); 684 } 685 theResult.AddSecondary((*i)); 686 } 687 688 delete calincl; 689 calincl = 0; 353 690 return &theResult; 354 691 } -
trunk/source/processes/hadronic/models/management/History
r1340 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 3 November 2010 - G.Folger (hadr-modman-V09-03-05) 18 - G4VNuclearDensity: coverity warning: init data member in ctor 16 19 17 20 8 September 2010 - G.Folger (hadr-modman-V09-03-04) -
trunk/source/processes/hadronic/models/neutron_hp/History
r1340 r1347 15 15 --------------------------------------------------------------- 16 16 17 3 December 2010 Tatsumi Koi (hadr-hpn-V09-03-12) 18 -Bug fix Bugzilla/Geant4 Problem 1155 19 G4NeutronHPCaptureFS.cc 20 21 2 December 2010 Tatsumi Koi (hadr-hpn-V09-03-11) 22 -Delete Unnecessary warnings 23 G4NeutronHPInelasticBaseFS.cc 24 25 11 November 2010 Tatsumi Koi (hadr-hpn-V09-03-10) 26 -Change warning message for "repFlag == 2 && isoFlag != 1" case 27 G4NeutronHPPhotonDist.cc 28 29 11 November 2010 Tatsumi Koi (hadr-hpn-V09-03-09) 30 -Add Special treatment in Be9(n,2n)Be8(2a) case 31 G4NeutronHPInelasticBaseFS.cc 32 -Add Safty for _nat_ data 33 G4NeutronHPInelasticCompFS.cc 34 35 10 November 2010 Tatsumi Koi (hadr-hpn-V09-03-08) 36 -Set lower limit for gamma energy 37 G4NeutronHPFinalState.cc 38 39 10 November 2010 Tatsumi Koi (hadr-hpn-V09-03-07) 40 -Bug fix in MF=6, LAW=2 case; contribution from E. Mendoza, D. Cano-Ott (CIEMAT) 41 G4NeutronHPDiscreteTwoBody.cc 17 42 18 43 9 September 2010 Tatsumi Koi (hadr-hpn-V09-03-06) -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPCaptureFS.cc
r962 r1347 31 31 // 26-January-07 Add G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION flag 32 32 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 // 101203 Bugzilla/Geant4 Problem 1155 Lack of residual in some case 33 34 // 34 35 #include "G4NeutronHPCaptureFS.hh" … … 43 44 G4HadFinalState * G4NeutronHPCaptureFS::ApplyYourself(const G4HadProjectile & theTrack) 44 45 { 46 45 47 G4int i; 46 48 theResult.Clear(); … … 108 110 } 109 111 112 113 110 114 // add them to the final state 111 115 … … 114 118 G4int nParticles = nPhotons; 115 119 if(1==nPhotons) nParticles = 2; 120 121 122 //Make at least one photon 123 //101203 TK 124 if ( nPhotons == 0 ) 125 { 126 G4ReactionProduct * theOne = new G4ReactionProduct; 127 theOne->SetDefinition( G4Gamma::Gamma() ); 128 G4double theta = pi*G4UniformRand(); 129 G4double phi = twopi*G4UniformRand(); 130 G4double sinth = std::sin(theta); 131 G4ThreeVector direction( sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) ); 132 theOne->SetMomentum( direction ) ; 133 thePhotons->push_back(theOne); 134 nPhotons++; // 0 -> 1 135 } 136 //One photon case: energy set to Q-value 137 //101203 TK 138 if ( nPhotons == 1 ) 139 { 140 G4ThreeVector direction = thePhotons->operator[](0)->GetMomentum().unit(); 141 G4double Q = G4ParticleTable::GetParticleTable()->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA), 0, static_cast<G4int>(theBaseZ))->GetPDGMass() + G4Neutron::Neutron()->GetPDGMass() 142 - G4ParticleTable::GetParticleTable()->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ))->GetPDGMass(); 143 thePhotons->operator[](0)->SetMomentum( Q*direction ); 144 } 145 // 116 146 117 147 // back to lab system … … 156 186 } 157 187 delete thePhotons; 188 189 //101203TK 190 G4bool residual = false; 191 G4ParticleDefinition * aRecoil = G4ParticleTable::GetParticleTable() 192 ->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ)); 193 for ( G4int i = 0 ; i != theResult.GetNumberOfSecondaries() ; i++ ) 194 { 195 if ( theResult.GetSecondary(i)->GetParticle()->GetDefinition() == aRecoil ) residual = true; 196 } 197 198 if ( residual == false ) 199 { 200 G4ParticleDefinition * aRecoil = G4ParticleTable::GetParticleTable() 201 ->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ)); 202 G4int nNonZero = 0; 203 G4LorentzVector p_photons(0,0,0,0); 204 for ( G4int i = 0 ; i != theResult.GetNumberOfSecondaries() ; i++ ) 205 { 206 p_photons += theResult.GetSecondary(i)->GetParticle()->Get4Momentum(); 207 // To many 0 momentum photons -> Check PhotonDist 208 if ( theResult.GetSecondary(i)->GetParticle()->Get4Momentum() > 0 ) nNonZero++; 209 } 210 211 // Can we include kinetic energy here? 212 G4double deltaE = ( theTrack.Get4Momentum().e() + theTarget.GetTotalEnergy() ) 213 - ( p_photons.e() + aRecoil->GetPDGMass() ); 214 215 //Add photons 216 if ( nPhotons - nNonZero > 0 ) 217 { 218 //G4cout << "TKDB G4NeutronHPCaptureFS::ApplyYourself we will create additional " << nPhotons - nNonZero << " photons" << G4endl; 219 std::vector<G4double> vRand; 220 vRand.push_back( 0.0 ); 221 for ( G4int i = 0 ; i != nPhotons - nNonZero - 1 ; i++ ) 222 { 223 vRand.push_back( G4UniformRand() ); 224 } 225 vRand.push_back( 1.0 ); 226 std::sort( vRand.begin(), vRand.end() ); 227 228 std::vector<G4double> vEPhoton; 229 for ( G4int i = 0 ; i < (G4int)vRand.size() - 1 ; i++ ) 230 { 231 vEPhoton.push_back( deltaE * ( vRand[i+1] - vRand[i] ) ); 232 } 233 std::sort( vEPhoton.begin(), vEPhoton.end() ); 234 235 for ( G4int i = 0 ; i < nPhotons - nNonZero - 1 ; i++ ) 236 { 237 //Isotopic in LAB OK? 238 G4double theta = pi*G4UniformRand(); 239 G4double phi = twopi*G4UniformRand(); 240 G4double sinth = std::sin(theta); 241 G4double en = vEPhoton[i]; 242 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) ); 243 244 p_photons += G4LorentzVector ( tempVector, tempVector.mag() ); 245 G4DynamicParticle * theOne = new G4DynamicParticle; 246 theOne->SetDefinition( G4Gamma::Gamma() ); 247 theOne->SetMomentum( tempVector ); 248 theResult.AddSecondary(theOne); 249 } 250 251 // Add last photon 252 G4DynamicParticle * theOne = new G4DynamicParticle; 253 theOne->SetDefinition( G4Gamma::Gamma() ); 254 // For better momentum conservation 255 G4ThreeVector lastPhoton = -p_photons.vect().unit()*vEPhoton.back(); 256 p_photons += G4LorentzVector( lastPhoton , lastPhoton.mag() ); 257 theOne->SetMomentum( lastPhoton ); 258 theResult.AddSecondary(theOne); 259 } 260 261 //Add residual 262 G4DynamicParticle * theOne = new G4DynamicParticle; 263 G4ThreeVector aMomentum = theTrack.Get4Momentum().vect() + theTarget.GetMomentum() 264 - p_photons.vect(); 265 theOne->SetDefinition(aRecoil); 266 theOne->SetMomentum( aMomentum ); 267 theResult.AddSecondary(theOne); 268 269 } 270 //101203TK END 271 158 272 // clean up the primary neutron 159 273 theResult.SetStatusChange(stopAndKill); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPDiscreteTwoBody.cc
r962 r1347 30 30 //080612 Bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #2,3 31 31 //080709 Bug fix Sampling Legendre expansion by T. Koi 32 //101110 Bug fix in MF=6, LAW=2 case; contribution from E. Mendoza, D. Cano-Ott (CIEMAT) 32 33 // 33 34 #include "G4NeutronHPDiscreteTwoBody.hh" … … 111 112 for(i=0;i<theCoeff[it].GetNumberOfPoly(); i++) 112 113 { 113 theStore.SetX(i, theCoeff[it].GetCoeff(i)); 114 theStore.SetY(i, theCoeff[it].GetCoeff(i)); 114 //101110 115 //theStore.SetX(i, theCoeff[it].GetCoeff(i)); 116 //theStore.SetY(i, theCoeff[it].GetCoeff(i)); 117 theStore.SetX(i/2, theCoeff[it].GetCoeff(i)); 118 theStore.SetY(i/2, theCoeff[it].GetCoeff(i+1)); 115 119 i++; 116 120 } … … 125 129 for(i=0;i<theCoeff[it].GetNumberOfPoly(); i++) 126 130 { 127 theStore.SetX(i, theCoeff[it].GetCoeff(i)); 128 theStore.SetY(i, theCoeff[it].GetCoeff(i)); 131 //101110 132 //theStore.SetX(i, theCoeff[it].GetCoeff(i)); 133 //theStore.SetY(i, theCoeff[it].GetCoeff(i)); 134 theStore.SetX(i/2, theCoeff[it].GetCoeff(i)); 135 theStore.SetY(i/2, theCoeff[it].GetCoeff(i+1)); 129 136 i++; 130 137 } … … 161 168 for(i=0;i<theCoeff[it-1].GetNumberOfPoly(); i++) 162 169 { 163 theBuff1.SetX(i, theCoeff[it-1].GetCoeff(i)); 164 theBuff1.SetY(i, theCoeff[it-1].GetCoeff(i)); 170 //101110 171 //theBuff1.SetX(i, theCoeff[it-1].GetCoeff(i)); 172 //theBuff1.SetY(i, theCoeff[it-1].GetCoeff(i)); 173 theBuff1.SetX(i/2, theCoeff[it-1].GetCoeff(i)); 174 theBuff1.SetY(i/2, theCoeff[it-1].GetCoeff(i+1)); 165 175 i++; 166 176 } … … 171 181 for(i=0;i<theCoeff[it].GetNumberOfPoly(); i++) 172 182 { 183 //theBuff2.SetX(i, theCoeff[it].GetCoeff(i)); 184 //theBuff2.SetY(i, theCoeff[it].GetCoeff(i)); 173 185 theBuff2.SetX(i, theCoeff[it].GetCoeff(i)); 174 theBuff2.SetY(i, theCoeff[it].GetCoeff(i ));186 theBuff2.SetY(i, theCoeff[it].GetCoeff(i+1)); 175 187 i++; 176 188 } … … 215 227 for(i=0;i<theCoeff[it-1].GetNumberOfPoly(); i++) 216 228 { 217 theBuff1.SetX(i, theCoeff[it-1].GetCoeff(i)); 218 theBuff1.SetY(i, theCoeff[it-1].GetCoeff(i)); 229 //101110 230 //theBuff1.SetX(i, theCoeff[it-1].GetCoeff(i)); 231 //theBuff1.SetY(i, theCoeff[it-1].GetCoeff(i)); 232 theBuff1.SetX(i/2, theCoeff[it-1].GetCoeff(i)); 233 theBuff1.SetY(i/2, theCoeff[it-1].GetCoeff(i+1)); 219 234 i++; 220 235 } … … 226 241 for(i=0;i<theCoeff[it].GetNumberOfPoly(); i++) 227 242 { 228 theBuff2.SetX(i, theCoeff[it].GetCoeff(i)); 229 theBuff2.SetY(i, theCoeff[it].GetCoeff(i)); 243 //101110 244 //theBuff2.SetX(i, theCoeff[it].GetCoeff(i)); 245 //theBuff2.SetY(i, theCoeff[it].GetCoeff(i)); 246 theBuff2.SetX(i/2, theCoeff[it].GetCoeff(i)); 247 theBuff2.SetY(i/2, theCoeff[it].GetCoeff(i+1)); 230 248 i++; 231 249 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPFinalState.cc
r968 r1347 27 27 //080721 Create adjust_final_state method by T. Koi 28 28 //080801 Residual reconstruction with theNDLDataA,Z (A, Z, and momentum are adjusted) by T. Koi 29 //101110 Set lower limit for gamma energy(1keV) by T. Koi 29 30 30 31 #include "G4NeutronHPFinalState.hh" … … 37 38 void G4NeutronHPFinalState::adjust_final_state ( G4LorentzVector init_4p_lab ) 38 39 { 40 41 G4double minimum_energy = 1*keV; 39 42 40 43 if ( adjustResult != true ) return; … … 175 178 176 179 // Adjust p 177 if ( dif_4p.v().mag() < 1*MeV ) 180 //if ( dif_4p.v().mag() < 1*MeV ) 181 if ( minimum_energy < dif_4p.v().mag() && dif_4p.v().mag() < 1*MeV ) 178 182 { 179 183 … … 184 188 else 185 189 { 186 //G4cout << "HP_DB Difference in dif_p is too large (>1MeV) to adjust, so that give up tuning" << G4endl;190 //G4cout << "HP_DB Difference in dif_p is too large (>1MeV) or too small(<1keV) to adjust, so that give up tuning" << G4endl; 187 191 } 188 192 … … 213 217 nSecondaries += 2; 214 218 G4double e1 = ( dif_4p.e() -dif_4p.v().mag() ) / 2; 215 G4double costh = 2.*G4UniformRand()-1.; 216 G4double phi = twopi*G4UniformRand(); 217 G4ThreeVector dir( std::sin(std::acos(costh))*std::cos(phi), 218 std::sin(std::acos(costh))*std::sin(phi), 219 costh); 220 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , e1*dir ) ); 221 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , -e1*dir ) ); 219 220 if ( minimum_energy < e1 ) 221 { 222 G4double costh = 2.*G4UniformRand()-1.; 223 G4double phi = twopi*G4UniformRand(); 224 G4ThreeVector dir( std::sin(std::acos(costh))*std::cos(phi), 225 std::sin(std::acos(costh))*std::sin(phi), 226 costh); 227 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , e1*dir ) ); 228 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , -e1*dir ) ); 229 } 230 else 231 { 232 //G4cout << "HP_DB Difference is too small(<1keV) to adjust, so that neglect it" << G4endl; 233 } 222 234 223 235 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticBaseFS.cc
r962 r1347 31 31 // Introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi 32 32 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 // 101111 Add Special treatment for Be9(n,2n)Be8(2a) case by T. Koi 33 34 // 34 35 #include "G4NeutronHPInelasticBaseFS.hh" … … 360 361 else if(theEnergyAngData!=0) 361 362 { 363 362 364 G4double theGammaEnergy = theEnergyAngData->GetTotalMeanEnergy(); 363 365 G4double anEnergy = boosted.GetKineticEnergy(); … … 371 373 G4double eBindHe3 = G4NucleiProperties::GetBindingEnergy(3,2); 372 374 G4double eBindA = G4NucleiProperties::GetBindingEnergy(4,2); 375 G4int ia=0; 373 376 for(i=0; i<tmpHadrons->size(); i++) 374 377 { … … 396 399 { 397 400 eBindProducts+=eBindA; 398 } 399 } 401 ia++; 402 } 403 } 404 400 405 theGammaEnergy += eBindProducts; 406 407 //101111 408 //Special treatment for Be9 + n -> 2n + Be8 -> 2n + a + a 409 if ( (G4int)(theBaseZ+eps) == 4 && (G4int)(theBaseA+eps) == 9 ) 410 { 411 // This only valid for G4NDL3.13,,, 412 if ( std::abs( theNuclearMassDifference - 413 ( G4NucleiProperties::GetBindingEnergy( 8 , 4 ) - 414 G4NucleiProperties::GetBindingEnergy( 9 , 4 ) ) ) < 1*keV 415 && ia == 2 ) 416 { 417 theGammaEnergy -= (2*eBindA); 418 } 419 } 401 420 402 421 G4ReactionProductVector * theOtherPhotons = 0; -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc
r1340 r1347 41 41 // add two_body_reaction 42 42 // 100909 add safty 43 // 101111 add safty for _nat_ data case in Binary reaction, but break conservation 43 44 // 44 45 #include "G4NeutronHPInelasticCompFS.hh" … … 681 682 G4double AA = hadron->GetDefinition()->GetPDGMass() / proj->GetDefinition()->GetPDGMass(); 682 683 G4double E1 = proj->GetKineticEnergy(); 683 G4double beta = std::sqrt ( A*(A+1-AA)/AA*(1+(1+A)/A*Q/E1) ); 684 685 // 101111 686 // In _nat_ data (Q+E1) could become negative value, following line is safty for this case. 687 //if ( (Q+E1) < 0 ) 688 if ( ( 1 + (1+A)/A*Q/E1 ) < 0 ) 689 { 690 // 1.0e-6 eV is additional safty for numeric precision 691 Q = -( A/(1+A)*E1 ) + 1.0e-6*eV; 692 } 693 694 G4double beta = std::sqrt ( A*(A+1-AA)/AA*( 1 + (1+A)/A*Q/E1 ) ); 684 695 G4double gamma = AA/(A+1-AA)*beta; 685 696 G4double E3 = AA/std::pow((1+A),2)*(beta*beta+1+2*beta*mu)*E1; -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc
r1055 r1347 39 39 // Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu) 40 40 // But it looks like never cause real effect in G4NDL3.13 (at least Natural elements) TK 41 // 101111 Change warning message for "repFlag == 2 && isoFlag != 1" case 41 42 // 42 43 // there is a lot of unused (and undebugged) code in this file. Kept for the moment just in case. @@ … … 124 125 if (isoFlag != 1) 125 126 { 126 if ( repFlag == 2 ) G4cout << " TKDB repFlag == 2 && isoFlag !=1" << G4endl;127 if ( repFlag == 2 ) G4cout << "G4NeutronHPPhotonDist: repFlag == 2 && isoFlag != 1 is unexpected! If you use G4ND3.x, then please report to Geant4 Hyper News. Thanks." << G4endl; 127 128 aDataFile >> tabulationType >> nDiscrete2 >> nIso; 128 129 //080731 -
trunk/source/processes/hadronic/models/parton_string/History
r1196 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 9 Dec. 2009, V. Uzhinsky (hadr-prtn-V09-03-00) 17 Crush found by Alberto with AveragePt2=0 is erased in FTF. 18 -------------------------------------------------------- 19 6 December 2009, V. Uzhinsky (hadr-prtn-V09-02-10) 20 Some correstions are made in diffr., hadronization and managment 21 to treat kinky string fragmentation. 16 22 17 23 19 November 2009, Gunter Folger (hadr-prtn-V09-02-09) -
trunk/source/processes/hadronic/models/parton_string/diffraction/History
r1340 r1347 1 $Id: History,v 1.3 3 2010/09/20 15:55:33vuzhinsk Exp $1 $Id: History,v 1.34 2010/11/15 10:10:16 vuzhinsk Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 15 Nov. 2010, V. Uzhinsky (hadr-string-diff-V09-03-04) 18 FTF with tuned parameters for pA and PiA interactions. 19 Quark exchange is tuned. 20 Low mass string fragmentation is improved. 21 Reggeon cascade parameters are tuned. 22 23 -------------------------------------------------------- 17 24 20 Sept. 2010, V, Uzhinsky (hadr-string-diff-V09-03-03) 18 25 FTF with new tuned parameters of nuclear destrustion is implemented. -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4DiffractiveSplitableHadron.hh
r1340 r1347 26 26 // 27 27 // $Id: G4DiffractiveSplitableHadron.hh,v 1.6 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4FTFModel.hh
r1340 r1347 26 26 // 27 27 // $Id: G4FTFModel.hh,v 1.11 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // Class Description -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4FTFParameters.hh
r1340 r1347 27 27 #define G4FTFParameters_h 1 28 28 // 29 // $Id: G4FTFParameters.hh,v 1. 8 2010/09/20 15:50:46vuzhinsk Exp $30 // GEANT4 tag $Name: geant4-09-0 3-ref-09$29 // $Id: G4FTFParameters.hh,v 1.9 2010/11/15 10:05:19 vuzhinsk Exp $ 30 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 31 31 // 32 32 #include "G4Proton.hh" … … 35 35 36 36 public: 37 G4FTFParameters(const G4ParticleDefinition * , G4 doubletheA,38 G4 doubletheZ,37 G4FTFParameters(const G4ParticleDefinition * , G4int theA, 38 G4int theZ, 39 39 G4double s); 40 // G4FTFParameters(const G4ParticleDefinition * , G4double theA, 41 // G4double theZ, 42 // G4double s); 40 43 41 44 ~G4FTFParameters(); … … 63 66 void SetSlopeQuarkExchange(const G4double aValue); 64 67 void SetDeltaProbAtQuarkExchange(const G4double aValue); 68 void SetProbOfSameQuarkExchange(const G4double aValue); 65 69 66 70 void SetProjMinDiffMass(const G4double aValue); … … 112 116 G4double GetSlopeQuarkExchange(); 113 117 G4double GetDeltaProbAtQuarkExchange(); 118 G4double GetProbOfSameQuarkExchange(); 114 119 115 120 G4double GetProjMinDiffMass(); … … 161 166 G4double SlopeQuarkExchange; 162 167 G4double DeltaProbAtQuarkExchange; 168 G4double ProbOfSameQuarkExchange; 163 169 164 170 G4double ProjMinDiffMass; … … 236 242 inline void G4FTFParameters::SetDeltaProbAtQuarkExchange(const G4double aValue) 237 243 {DeltaProbAtQuarkExchange = aValue;} 244 inline void G4FTFParameters::SetProbOfSameQuarkExchange(const G4double aValue) 245 {ProbOfSameQuarkExchange = aValue;} 238 246 239 247 inline void G4FTFParameters::SetProjMinDiffMass(const G4double aValue) … … 331 339 inline G4double G4FTFParameters::GetMagQuarkExchange() {return MagQuarkExchange;} 332 340 inline G4double G4FTFParameters::GetSlopeQuarkExchange() {return SlopeQuarkExchange;} 333 inline G4double G4FTFParameters::GetDeltaProbAtQuarkExchange() 334 {returnDeltaProbAtQuarkExchange;}335 341 inline G4double G4FTFParameters::GetDeltaProbAtQuarkExchange(){return 342 DeltaProbAtQuarkExchange;} 343 inline G4double G4FTFParameters::GetProbOfSameQuarkExchange(){return ProbOfSameQuarkExchange;} 336 344 337 345 inline G4double G4FTFParameters::GetProjMinDiffMass() {return ProjMinDiffMass;} -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4FTFParticipants.hh
r1340 r1347 26 26 // 27 27 // $Id: G4FTFParticipants.hh,v 1.7 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveExcitation.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4DiffractiveExcitation.cc,v 1.2 2 2010/09/20 15:50:46vuzhinsk Exp $27 // $Id: G4DiffractiveExcitation.cc,v 1.23 2010/11/15 10:02:38 vuzhinsk Exp $ 28 28 // ------------------------------------------------------------ 29 29 // GEANT 4 class implemetation file … … 163 163 164 164 G4double SqrtS=std::sqrt(S); 165 165 //G4cout<<"SqrtS < 2300*MeV "<<SqrtS<<G4endl; 166 166 if(absProjectilePDGcode > 1000 && (SqrtS < 2300*MeV || SqrtS < SumMasses)) 167 167 {target->SetStatus(2); return false;} // The model cannot work for … … 221 221 G4cout<<"Targ "<<M0target <<" "<<TargetDiffStateMinMass <<" "<<TargetNonDiffStateMinMass<<G4endl; 222 222 G4cout<<"SqrtS "<<SqrtS<<G4endl; 223 G4cout<<"Rapid "<<ProjectileRapidity<< " "<<TargetRapidity<<G4endl;223 G4cout<<"Rapid "<<ProjectileRapidity<<G4endl; //" "<<TargetRapidity<<G4endl; 224 224 */ 225 225 // Charge exchange can be possible for baryons ----------------- … … 230 230 G4double DeltaProbAtQuarkExchange=theParameters->GetDeltaProbAtQuarkExchange(); 231 231 232 //G4cout<<"Q exc "<<MagQuarkExchange<<" "<<SlopeQuarkExchange<<" "<<DeltaProbAtQuarkExchange<<G4endl;233 232 // G4double NucleonMass= 234 233 // (G4ParticleTable::GetParticleTable()->FindParticle(2112))->GetPDGMass(); … … 237 236 238 237 //G4cout<<MagQuarkExchange*std::exp(-SlopeQuarkExchange*(ProjectileRapidity - TargetRapidity))<<G4endl; 238 239 //G4cout<<"Q exc Mag Slop Wdelta"<<MagQuarkExchange<<" "<<SlopeQuarkExchange<<" "<<DeltaProbAtQuarkExchange<<G4endl; 240 //G4cout<<"ProjectileRapidity "<<ProjectileRapidity<<G4endl; 239 241 //G4cout<<MagQuarkExchange*std::exp(-SlopeQuarkExchange*(ProjectileRapidity))<<G4endl; 240 //G4cout<<MagQuarkExchange*std::exp(-SlopeQuarkExchange*(ProjectileRapidity - 1.36))<<G4endl;241 242 //G4int Uzhi; G4cin>>Uzhi; 242 243 // Check for possible quark exchange ----------------------------------- … … 272 273 if(absProjectilePDGcode < 1000 ) 273 274 { // projectile is meson ----------------- 275 274 276 if(ProjQ1 > 0 ) // ProjQ1 is quark 275 277 { … … 300 302 TargExchangeQ = TargQ3; TargQ3=ProjExchangeQ; ProjQ2=TargExchangeQ; 301 303 } 302 303 304 } // End of if(ProjQ1 > 0 ) // ProjQ1 is quark 304 305 305 306 G4int aProjQ1=std::abs(ProjQ1); 306 307 G4int aProjQ2=std::abs(ProjQ2); 307 if(aProjQ1 == aProjQ2) {NewProjCode = 111;} // Pi0-meson 308 if(aProjQ1 == aProjQ2) {NewProjCode = 111;} // Pi0-meson 308 309 else // |ProjQ1| # |ProjQ2| 309 310 { 310 311 if(aProjQ1 > aProjQ2) {NewProjCode = aProjQ1*100+aProjQ2*10+1;} 311 312 else {NewProjCode = aProjQ2*100+aProjQ1*10+1;} 313 NewProjCode *=(ProjectilePDGcode/absProjectilePDGcode); 312 314 } 313 315 316 G4bool ProjExcited=false; 317 if(G4UniformRand() < 0.5) 318 { 319 NewProjCode +=2; // Excited Pi0-meson 320 ProjExcited=true; 321 } 322 //G4cout<<G4endl<<"NewProjCode "<<NewProjCode<<G4endl; 323 324 G4ParticleDefinition* TestParticle=0; 325 TestParticle=G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode); 326 if(TestParticle) 327 { 328 M0projectile= 329 (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass(); 330 M0projectile2 = M0projectile * M0projectile; 331 332 ProjectileDiffStateMinMass =M0projectile+210.*MeV; //210 MeV=m_pi+70 MeV 333 ProjectileNonDiffStateMinMass=M0projectile+210.*MeV; //210 MeV=m_pi+70 MeV 334 } else 335 {return false;} 336 337 //G4cout<<"New TrQ "<<TargQ1<<" "<<TargQ2<<" "<<TargQ3<<G4endl; 314 338 NewTargCode = NewNucleonId(TargQ1, TargQ2, TargQ3); 339 //G4cout<<"NewTargCode "<<NewTargCode<<G4endl; 315 340 316 341 if( (TargQ1 == TargQ2) && (TargQ1 == TargQ3) && 317 (SqrtS > M0projectile+DeltaMass)) {NewTargCode +=2;} //Create Delta isobar 318 319 else if( target->GetDefinition()->GetPDGiIsospin() == 3 ) //Delta was the target 320 { if(G4UniformRand() > DeltaProbAtQuarkExchange){NewTargCode +=2;} //Save Delta isobar 342 (SqrtS > M0projectile+DeltaMass)) {NewTargCode +=2; //Create Delta isobar 343 ProjExcited=true;} 344 else if( target->GetDefinition()->GetPDGiIsospin() == 3 ) //Delta was the target 345 { if(G4UniformRand() > DeltaProbAtQuarkExchange){NewTargCode +=2; //Save Delta isobar 346 ProjExcited=true;} 321 347 else {} // De-excite initial Delta isobar 322 348 } 323 349 324 else if((G4UniformRand() < DeltaProbAtQuarkExchange) && //Nucleon was the target 350 // else if((!CreateDelta) && 351 else if((!ProjExcited) && 352 (G4UniformRand() < DeltaProbAtQuarkExchange) && //Nucleon was the target 325 353 (SqrtS > M0projectile+DeltaMass)) {NewTargCode +=2;} //Create Delta isobar 354 // else if( CreateDelta) {NewTargCode +=2;} 326 355 else {} //Save initial nucleon 356 327 357 // target->SetDefinition( // Fix 15.12.09 328 358 // G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode));// Fix 15.12.09 359 360 //G4cout<<"NewTargCode "<<NewTargCode<<G4endl; 361 //G4int Uzhi; G4cin>>Uzhi; 362 TestParticle=G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode); 363 if(TestParticle) 364 { 365 M0target= 366 (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass(); 367 M0target2 = M0target * M0target; 368 369 TargetDiffStateMinMass =M0target+220.*MeV; //220 MeV=m_pi+80 MeV; 370 TargetNonDiffStateMinMass=M0target+220.*MeV; //220 MeV=m_pi+80 MeV; 371 } else 372 {return false;} 329 373 } else 330 374 { // projectile is baryon ---------------- 331 G4double Same=0.; //0.3; //0.5; 375 //========================================================================= 376 G4double Same=theParameters->GetProbOfSameQuarkExchange(); //0.3; //0.5; 0. 332 377 G4bool ProjDeltaHasCreated(false); 333 378 G4bool TargDeltaHasCreated(false); … … 485 530 } // End of if projectile is baryon --------------------------- 486 531 532 //G4cout<<"At end// NewProjCode "<<NewProjCode<<G4endl; 533 //G4cout<<"At end// NewTargCode "<<NewTargCode<<G4endl; 487 534 488 535 // If we assume that final state hadrons after the charge exchange will be 489 536 // in the ground states, we have to put ---------------------------------- 490 491 /* 492 // if(M0projectile < 493 // (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass()) 494 if(ProjDeltaHasCreated) 495 { 496 M0projectile= 497 (G4ParticleTable::GetParticleTable()->FindParticle(NewProjCode))->GetPDGMass(); 498 M0projectile2 = M0projectile * M0projectile; 499 500 ProjectileDiffStateMinMass =M0projectile+160.*MeV; //160 MeV=m_pi+20 MeV 501 ProjectileNonDiffStateMinMass=M0projectile+160.*MeV; //160 MeV=m_pi+20 MeV 502 } 503 504 // if(M0target < 505 // (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass()) 506 if(TargDeltaHasCreated) 507 { 508 M0target= 509 (G4ParticleTable::GetParticleTable()->FindParticle(NewTargCode))->GetPDGMass(); 510 M0target2 = M0target * M0target; 511 512 TargetDiffStateMinMass =M0target+160.*MeV; //160 MeV=m_pi+20 MeV; 513 TargetNonDiffStateMinMass=M0target+160.*MeV; //160 MeV=m_pi+20 MeV; 514 } 515 */ 537 //G4cout<<"M0pr M0tr SqS "<<M0projectile<<" "<<M0target<<" "<<SqrtS<<G4endl; 538 516 539 PZcms2=(S*S+M0projectile2*M0projectile2+M0target2*M0target2- 517 540 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2) 518 541 /4./S; 519 //G4cout<<"PZcms2 1 "<<PZcms2<<G4endl ;542 //G4cout<<"PZcms2 1 "<<PZcms2<<G4endl<<G4endl; 520 543 if(PZcms2 < 0) {return false;} // It can be if energy is not sufficient for Delta 521 544 //---------------------------------------------------------- … … 536 559 // ---------------------------------------------------------- 537 560 538 // G4double Wexcit=1.-1.97*std::exp(-0.5*ProjectileRapidity); 539 G4double Wexcit=1.-2.256*std::exp(-0.6*ProjectileRapidity); 540 541 //G4cout<<ProjectileRapidity<<" "<<1.72*std::exp(-0.4*ProjectileRapidity)<<" "<<std::exp(0.4*ProjectileRapidity)<<G4endl; 542 //G4int Uzhi;G4cin>>Uzhi; 543 //Wexcit=0.; 544 if(G4UniformRand() > Wexcit) 545 { // Make elastic scattering 546 //G4cout<<"Make elastic scattering"<<G4endl; 547 Pprojectile.transform(toLab); 548 Ptarget.transform(toLab); 549 550 projectile->SetTimeOfCreation(target->GetTimeOfCreation()); 551 projectile->SetPosition(target->GetPosition()); 552 553 projectile->Set4Momentum(Pprojectile); 554 target->Set4Momentum(Ptarget); 555 556 G4bool Result= theElastic->ElasticScattering (projectile,target,theParameters); 557 return Result; 558 } // end of if(G4UniformRand() > Wexcit) 561 if(absProjectilePDGcode < 1000) 562 { // For projectile meson 563 G4double Wexcit=1.-2.256*std::exp(-0.6*ProjectileRapidity); 564 Wexcit=0.; 565 if(G4UniformRand() > Wexcit) 566 { // Make elastic scattering 567 //G4cout<<"Make elastic scattering of new hadrons"<<G4endl; 568 Pprojectile.transform(toLab); 569 Ptarget.transform(toLab); 570 571 projectile->SetTimeOfCreation(target->GetTimeOfCreation()); 572 projectile->SetPosition(target->GetPosition()); 573 574 projectile->Set4Momentum(Pprojectile); 575 target->Set4Momentum(Ptarget); 576 577 G4bool Result= theElastic->ElasticScattering (projectile,target,theParameters); 578 return Result; 579 } // end of if(Make elastic scattering for projectile meson?) 580 } else 581 { // For projectile baryon 582 G4double Wexcit=1.-2.256*std::exp(-0.6*ProjectileRapidity); 583 //Wexcit=0.; 584 if(G4UniformRand() > Wexcit) 585 { // Make elastic scattering 586 //G4cout<<"Make elastic scattering of new hadrons"<<G4endl; 587 Pprojectile.transform(toLab); 588 Ptarget.transform(toLab); 589 590 projectile->SetTimeOfCreation(target->GetTimeOfCreation()); 591 projectile->SetPosition(target->GetPosition()); 592 593 projectile->Set4Momentum(Pprojectile); 594 target->Set4Momentum(Ptarget); 595 596 G4bool Result= theElastic->ElasticScattering (projectile,target,theParameters); 597 return Result; 598 } // end of if(Make elastic scattering for projectile baryon?) 599 } 600 //G4cout<<"Make excitation of new hadrons"<<G4endl; 559 601 } // End of charge exchange part ------------------------------ 560 602 … … 569 611 G4cout<<"Prob ProjDiff TargDiff "<<ProbProjectileDiffraction<<" "<<ProbTargetDiffraction<<" "<<ProbOfDiffraction<<G4endl; 570 612 G4cout<<"Pr Y "<<Pprojectile.rapidity()<<" Tr Y "<<Ptarget.rapidity()<<G4endl; 571 //G4int Uzhi; G4cin>>Uzhi;613 G4int Uzhi; G4cin>>Uzhi; 572 614 */ 573 615 /* -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveSplitableHadron.cc
r1340 r1347 26 26 // 27 27 // $Id: G4DiffractiveSplitableHadron.cc,v 1.9 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFModel.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FTFModel.cc,v 1.3 6 2010/09/20 15:50:46vuzhinsk Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FTFModel.cc,v 1.37 2010/11/15 10:02:38 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 … … 99 99 { 100 100 theProjectile = aProjectile; 101 //G4cout<<"FTF init Pro "<<theProjectile.GetMass()<<" "<<theProjectile.GetMomentum()<<G4endl; 102 //G4cout<<"FTF init A Z "<<aNucleus.GetA_asInt()<<" "<<aNucleus.GetZ_asInt()<<G4endl; 103 //G4cout<<" "<<aNucleus.GetN()<<" "<<aNucleus.GetZ()<<G4endl; 104 //G4int Uzhi; G4cin>>Uzhi; 101 105 102 106 theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt()); 103 107 //G4cout<<"End nucl init"<<G4endl; 104 108 // ----------- N-mass number Z-charge ------------------------- 105 109 … … 111 115 if( theParameters != 0 ) delete theParameters; 112 116 theParameters = new G4FTFParameters(theProjectile.GetDefinition(), 113 aNucleus.Get N(),aNucleus.GetZ(),117 aNucleus.GetA_asInt(),aNucleus.GetZ_asInt(), 114 118 s); 119 // theParameters = new G4FTFParameters(theProjectile.GetDefinition(), 120 // aNucleus.GetN(),aNucleus.GetZ(), 121 // s); 115 122 116 123 //theParameters->SetProbabilityOfElasticScatt(0.); … … 298 305 G4int ResidualMassNumber=theNucleus->GetMassNumber(); 299 306 G4int ResidualCharge =theNucleus->GetCharge(); 307 300 308 ResidualExcitationEnergy=0.; 301 309 G4LorentzVector PnuclearResidual(0.,0.,0.,0.); … … 340 348 341 349 // ResidualMass +=ResidualExcitationEnergy; // Will be given after checks 342 //G4cout<<"SumMasses End ResidualMass "<<SumMasses<<" "<<ResidualMass<<G4endl;350 //G4cout<<"SumMasses And ResidualMass "<<SumMasses<<" "<<ResidualMass<<G4endl; 343 351 SumMasses += ResidualMass; 344 352 //G4cout<<"SumMasses + ResM "<<SumMasses<<G4endl; … … 548 556 Pprojectile.transform(toLab); // The work with the projectile 549 557 primary->Set4Momentum(Pprojectile); // is finished at the moment. 558 //G4cout<<"Final proj mom "<<primary->Get4Momentum()<<G4endl; 550 559 551 560 //------------------------------------------------------------- … … 578 587 } // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ ) 579 588 589 //G4cout<<"ResidualMassNumber and Mom "<<ResidualMassNumber<<" "<<Residual3Momentum<<G4endl; 580 590 G4double Mt2Residual=sqr(ResidualMass) + 581 591 sqr(Residual3Momentum.x())+sqr(Residual3Momentum.y()); 582 583 G4double PzResidual=-WminusTarget*Residual3Momentum.z()/2. + 592 //========================== 593 //G4cout<<"WminusTarget Residual3Momentum.z() "<<WminusTarget<<" "<<Residual3Momentum.z()<<G4endl; 594 G4double PzResidual=0.; 595 G4double EResidual =0.; 596 if(ResidualMassNumber != 0) 597 { 598 PzResidual=-WminusTarget*Residual3Momentum.z()/2. + 584 599 Mt2Residual/(2.*WminusTarget*Residual3Momentum.z()); 585 G4doubleEResidual = WminusTarget*Residual3Momentum.z()/2. +600 EResidual = WminusTarget*Residual3Momentum.z()/2. + 586 601 Mt2Residual/(2.*WminusTarget*Residual3Momentum.z()); 587 602 } 603 //========================== 588 604 Residual4Momentum.setPx(Residual3Momentum.x()); 589 605 Residual4Momentum.setPy(Residual3Momentum.y()); 590 606 Residual4Momentum.setPz(PzResidual); 591 607 Residual4Momentum.setE(EResidual); 592 608 //G4cout<<"Residual4Momentum "<<Residual4Momentum<<G4endl; 593 609 Residual4Momentum.transform(toLab); 594 610 //------------------------------------------------------------- -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFParameters.cc
r1340 r1347 25 25 // 26 26 // 27 // $Id: G4FTFParameters.cc,v 1.1 4 2010/09/20 15:50:46vuzhinsk Exp $28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$27 // $Id: G4FTFParameters.cc,v 1.15 2010/11/15 10:02:38 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 … … 42 42 //********************************************************************************************** 43 43 44 //G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle, 45 // G4double theA, 46 // G4double theZ, 47 // G4double s) 44 48 G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle, 45 G4 doubletheA,46 G4 doubletheZ,49 G4int theA, 50 G4int theZ, 47 51 G4double s) 48 52 { … … 62 66 G4double sqrLogPlab = LogPlab * LogPlab; 63 67 64 G4int NumberOfTargetProtons = (G4int) theZ; 65 G4int NumberOfTargetNeutrons = (G4int) theA- (G4int) theZ; 68 G4int NumberOfTargetProtons = theZ; 69 G4int NumberOfTargetNeutrons = theA-theZ; 70 // G4int NumberOfTargetProtons = (G4int) theZ; 71 // G4int NumberOfTargetNeutrons = (G4int) theA- (G4int) theZ; 66 72 G4int NumberOfTargetNucleons = NumberOfTargetProtons + NumberOfTargetNeutrons; 67 73 68 74 G4double Xtotal, Xelastic; 69 75 70 if( absPDGcode > 1000 ) //------Projectile is baryon --------76 if( PDGcode > 1000 ) //------Projectile is baryon -------- 71 77 { 72 78 G4double XtotPP = 48.0 + 0. *std::pow(Plab, 0. ) + 0.522*sqrLogPlab - 4.51*LogPlab; … … 75 81 G4double XelPP = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab; 76 82 G4double XelPN = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab; 83 84 Xtotal = ( NumberOfTargetProtons * XtotPP + 85 NumberOfTargetNeutrons * XtotPN ) / NumberOfTargetNucleons; 86 Xelastic = ( NumberOfTargetProtons * XelPP + 87 NumberOfTargetNeutrons * XelPN ) / NumberOfTargetNucleons; 88 } 89 else if( PDGcode < -1000 ) //------Projectile is anti_baryon -------- 90 { 91 G4double XtotPP = 38.4 + 77.6*std::pow(Plab,-0.64) + 0.26*sqrLogPlab - 1.2*LogPlab; 92 G4double XtotPN = 0. + 133.6*std::pow(Plab,-0.70) + 1.22*sqrLogPlab +13.7*LogPlab; 93 94 G4double XelPP = 10.2 + 52.7*std::pow(Plab,-1.16) + 0.125*sqrLogPlab - 1.28*LogPlab; 95 G4double XelPN = 36.5 + 0. *std::pow(Plab, 0. ) + 0. *sqrLogPlab -11.9 *LogPlab; 77 96 78 97 Xtotal = ( NumberOfTargetProtons * XtotPP + … … 184 203 // Xtotal and Xelastic in mb 185 204 205 // For Pi- P interactions only! 206 if(std::abs(Plab-1.4) < 0.05) {Xtotal=3.500599e+01; Xelastic= 1.150032e+01;} 207 if(std::abs(Plab-1.5) < 0.05) {Xtotal=3.450591e+01; Xelastic= 1.050038e+01;} 208 if(std::abs(Plab-1.6) < 0.05) {Xtotal=3.430576e+01; Xelastic= 9.800433e+00;} 209 if(std::abs(Plab-1.7) < 0.05) {Xtotal=3.455560e+01; Xelastic= 9.300436e+00;} 210 if(std::abs(Plab-1.8) < 0.05) {Xtotal=3.480545e+01; Xelastic= 8.800438e+00;} 211 if(std::abs(Plab-2.0) < 0.05) {Xtotal=3.570503e+01; Xelastic= 8.200370e+00;} 212 if(std::abs(Plab-2.2) < 0.05) {Xtotal=3.530495e+01; Xelastic= 7.800362e+00;} 213 if(std::abs(Plab-2.5) < 0.05) {Xtotal=3.410484e+01; Xelastic= 7.350320e+00;} 214 if(std::abs(Plab-2.75) < 0.05){Xtotal=3.280479e+01; Xelastic= 7.050273e+00;} 215 if(std::abs(Plab-3.0) < 0.05) {Xtotal=3.180473e+01; Xelastic= 6.800258e+00;} 216 if(std::abs(Plab-4.0) < 0.05) {Xtotal=2.910441e+01; Xelastic= 6.100229e+00;} 217 if(std::abs(Plab-5.0) < 0.05) {Xtotal=2.820372e+01; Xelastic= 5.700275e+00;} 218 if(std::abs(Plab-6.0) < 0.05) {Xtotal=2.760367e+01; Xelastic= 5.400255e+00;} 219 if(std::abs(Plab-7.0) < 0.05) {Xtotal=2.725366e+01; Xelastic= 5.150256e+00;} 220 if(std::abs(Plab-8.0) < 0.05) {Xtotal=2.690365e+01; Xelastic= 4.900258e+00;} 221 if(std::abs(Plab-10.0) < 0.05){Xtotal=2.660342e+01; Xelastic= 4.600237e+00;} 222 if(std::abs(Plab-12.0) < 0.05){Xtotal=2.632341e+01; Xelastic= 4.480229e+00;} 223 if(std::abs(Plab-14.0) < 0.05){Xtotal=2.604340e+01; Xelastic= 4.360221e+00;} 224 if(std::abs(Plab-20.0) < 0.05){Xtotal=2.520337e+01; Xelastic= 4.000197e+00;} 225 if(std::abs(Plab-30.0) < 0.05){Xtotal=2.505334e+01; Xelastic= 3.912679e+00;} 226 // 186 227 //----------- Geometrical parameters ------------------------------------------------ 187 228 SetTotalCrossSection(Xtotal); … … 189 230 SetInelasticCrossSection(Xtotal-Xelastic); 190 231 191 //G4cout<<" Xtotal, Xelastic "<<Xtotal<<" "<<Xelastic<<G4endl;232 //G4cout<<"Plab Xtotal, Xelastic Xinel "<<Plab<<" "<<Xtotal<<" "<<Xelastic<<Xtotal-Xelastic)<<G4endl; 192 233 // // Interactions with elastic and inelastic collisions 193 234 SetProbabilityOfElasticScatt(Xtotal, Xelastic); … … 212 253 213 254 //----------- Parameters of excitations --------------------------------------------- 214 if( absPDGcode > 1000 ) //------Projectile is baryon --------255 if( PDGcode > 1000 ) //------Projectile is baryon -------- 215 256 { 216 257 SetMagQuarkExchange(1.84);//(3.63); 217 258 SetSlopeQuarkExchange(0.7);//(1.2); 218 259 SetDeltaProbAtQuarkExchange(0.); 260 if(NumberOfTargetNucleons > 26) {SetProbOfSameQuarkExchange(1.);} 261 else {SetProbOfSameQuarkExchange(0.);} 262 263 SetProjMinDiffMass(1.16); // GeV 264 SetProjMinNonDiffMass(1.16); // GeV 265 SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab));// 0.5 266 267 SetTarMinDiffMass(1.16); // GeV 268 SetTarMinNonDiffMass(1.16); // GeV 269 SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab));// 0.5 270 271 SetAveragePt2(0.15); // 0.15 GeV^2 272 } 273 if( PDGcode < -1000 ) //------Projectile is anti_baryon -------- 274 { 275 SetMagQuarkExchange(0.); 276 SetSlopeQuarkExchange(0.); 277 SetDeltaProbAtQuarkExchange(0.); 278 SetProbOfSameQuarkExchange(0.); 219 279 220 280 SetProjMinDiffMass(1.16); // GeV 221 281 SetProjMinNonDiffMass(1.16); // GeV 222 223 SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab));// 0.5 282 SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab));// 0.5 224 283 225 284 SetTarMinDiffMass(1.16); // GeV 226 285 SetTarMinNonDiffMass(1.16); // GeV 227 228 SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab));// 0.5 286 SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab));// 0.5 229 287 230 288 SetAveragePt2(0.15); // 0.15 GeV^2 … … 232 290 else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion ----------- 233 291 { 234 SetMagQuarkExchange( 120.); // 210.235 SetSlopeQuarkExchange(2. 0);236 SetDeltaProbAtQuarkExchange(0. 6);292 SetMagQuarkExchange(240.); 293 SetSlopeQuarkExchange(2.); 294 SetDeltaProbAtQuarkExchange(0.56); //(0.35); 237 295 238 296 SetProjMinDiffMass(0.5); // GeV 239 SetProjMinNonDiffMass(0.3); // GeV 240 SetProbabilityOfProjDiff(0.*0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel 241 242 SetTarMinDiffMass(1.1); // GeV 243 SetTarMinNonDiffMass(1.1); // GeV 244 245 SetProbabilityOfTarDiff(2.*0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel 297 SetProjMinNonDiffMass(0.5); // GeV 0.3 298 SetProbabilityOfProjDiff(0.);//(0.*0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel 299 300 SetTarMinDiffMass(1.16); // GeV 301 SetTarMinNonDiffMass(1.16); // GeV 302 // SetProbabilityOfTarDiff(1.);//(2.*0.62*std::pow(s/GeV/GeV,-0.51)); 303 // SetProbabilityOfTarDiff(2.6*std::exp(-0.46*Ylab)); 304 SetProbabilityOfTarDiff(0.8*std::exp(-0.6*(Ylab-3.))); 246 305 247 306 SetAveragePt2(0.3); // GeV^2 … … 295 354 SetMaxNumberOfCollisions(1000.,1.); //(Plab,2.); //3.); ############################## 296 355 297 SetCofNuclearDestruction(0.3); //1.0); // for meson projectile298 299 SetDofNuclearDestruction(0.4);300 SetPt2ofNuclearDestruction(0.17*GeV*GeV);301 SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV); 302 303 SetExcitationEnergyPerWoundedNucleon(100*MeV); 304 } else // for baryon projectile305 { 306 // Set MaxNumberOfCollisions(Plab,0.1); //6.); // ##############################307 SetMaxNumberOfCollisions(Plab,4.); //6.); // ############################## 308 309 SetCofNuclearDestruction(0.62*std::exp(4.*(Ylab-2.1))/(1.+std::exp(4.*(Ylab-2.1)))); 310 356 // SetCofNuclearDestruction(0.); //1.0); // for meson projectile 357 // SetCofNuclearDestruction(1.*std::exp(4.*(Ylab-2.1))/(1.+std::exp(4.*(Ylab-2.1)))); 358 //G4cout<<Ylab<<" "<<0.62*std::exp(4.*(Ylab-4.5))/(1.+std::exp(4.*(Ylab-4.5)))<<G4endl; 359 //G4int Uzhi; G4cin>>Uzhi; 360 361 // SetMaxNumberOfCollisions(Plab,2.); //4.); // ############################## 362 363 SetCofNuclearDestruction(1.*std::exp(4.*(Ylab-2.1))/(1.+std::exp(4.*(Ylab-2.1)))); //0.62 1.0 364 //------------------------------------------ 365 // SetDofNuclearDestruction(0.4); 366 // SetPt2ofNuclearDestruction(0.17*GeV*GeV); 367 // SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV); 368 369 // SetExcitationEnergyPerWoundedNucleon(100*MeV); 311 370 SetDofNuclearDestruction(0.4); 312 371 SetPt2ofNuclearDestruction((0.035+ … … 315 374 316 375 SetExcitationEnergyPerWoundedNucleon(75.*MeV); 376 } else // for baryon projectile 377 { 378 SetMaxNumberOfCollisions(Plab,2.); //4.); // ############################## 379 380 SetCofNuclearDestruction(1.*std::exp(4.*(Ylab-2.1))/(1.+std::exp(4.*(Ylab-2.1)))); //0.62 1.0 381 //G4cout<<Ylab<<" "<<0.62*std::exp(4.*(Ylab-2.1))/(1.+std::exp(4.*(Ylab-2.1)))<<G4endl; 382 //G4int Uzhi; G4cin>>Uzhi; 383 384 SetDofNuclearDestruction(0.4); 385 SetPt2ofNuclearDestruction((0.035+ 386 0.04*std::exp(4.*(Ylab-2.5))/(1.+std::exp(4.*(Ylab-2.5))))*GeV*GeV); //0.09 387 SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV); 388 389 SetExcitationEnergyPerWoundedNucleon(75.*MeV); 317 390 } 318 391 … … 322 395 //SetPt2ofNuclearDestruction((0.035+0.1*std::exp(4.*(Ylab-3.))/(1.+std::exp(4.*(Ylab-3.))))*GeV*GeV); 323 396 397 //SetMagQuarkExchange(120.); // 210. PipP 398 //SetSlopeQuarkExchange(2.0); 399 //SetDeltaProbAtQuarkExchange(0.6); 400 //SetProjMinDiffMass(0.7); // GeV 1.1 401 //SetProjMinNonDiffMass(0.7); // GeV 402 //SetProbabilityOfProjDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel 403 //SetTarMinDiffMass(1.1); // GeV 404 //SetTarMinNonDiffMass(1.1); // GeV 405 //SetProbabilityOfTarDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel 406 // 407 //SetAveragePt2(0.3); // GeV^2 408 //------------------------------------ 324 409 //SetProbabilityOfElasticScatt(1.,1.); //(Xtotal, Xelastic); 325 410 //SetProbabilityOfProjDiff(1.*0.62*std::pow(s/GeV/GeV,-0.51)); // 0->1 … … 328 413 //SetAvaragePt2ofElasticScattering(0.); 329 414 330 //SetCofNuclearDestruction(0.6); //(0.4); 331 SetExcitationEnergyPerWoundedNucleon(75.*MeV); //(75.*MeV); 332 //SetDofNuclearDestruction(0.6); //(0.4); 333 //SetPt2ofNuclearDestruction(0.12*GeV*GeV); //(0.168*GeV*GeV); 415 //SetMaxNumberOfCollisions(4.*(Plab+0.01),Plab); //6.); // ############################## 416 //SetCofNuclearDestruction(0.2); //(0.4); 417 //SetExcitationEnergyPerWoundedNucleon(0.*MeV); //(75.*MeV); 418 //SetDofNuclearDestruction(0.4); //(0.4); 419 //SetPt2ofNuclearDestruction(0.1*GeV*GeV); //(0.168*GeV*GeV); 334 420 335 421 } -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFParticipants.cc
r1340 r1347 26 26 // 27 27 // $Id: G4FTFParticipants.cc,v 1.17 2010/09/20 15:50:46 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-ref-09$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/parton_string/hadronization/History
r1340 r1347 1 $Id: History,v 1.1 7 2010/09/28 09:03:07 gcosmoExp $1 $Id: History,v 1.18 2010/11/03 17:11:31 gunter Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 18 3 Nov 2010, Gunter Folger (had-hadronization-V09-03-02) 19 - fix minor coverity warnings in G4HadronBuilder 17 20 18 21 22-September-2010 V. Uzhinsky (had-hadronization-V09-03-01) -
trunk/source/processes/hadronic/models/parton_string/management/History
r1340 r1347 1 $Id: History,v 1. 9 2010/09/08 16:57:50 gunterExp $1 $Id: History,v 1.10 2010/11/30 16:11:25 vuzhinsk Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 30 Nov. 2010 V. Uzhinsky (had-partonstring-mgt-V09-03-01) 18 Member G4int Status in G4VSplitableHadron was changed 19 into G4int curStatus 17 20 18 21 8-Sept-2010, G.Folger (had-partonstring-mgt-V09-03-00) -
trunk/source/processes/hadronic/models/pre_equilibrium/History
r1340 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 23-November 2010 V.Ivanchenko hadr-pre-V09-03-17 18 --------------------------------------------------- 19 G4PreCompoundFragment, G4PreCompoundEmission, G4PreCompoundModel - 20 return back ref-09 computations 21 22 18-November 2010 V.Ivanchenko hadr-pre-V09-03-16 23 --------------------------------------------------- 24 G4PreCompoundModel - change number of excitons to be as in 9.3 25 affects tail of neutron stectrum for low-energy projectile 26 27 17-November 2010 V.Ivanchenko hadr-pre-V09-03-15 28 --------------------------------------------------- 29 G4PreCompoundProton, G4PreCompoundNeutron, G4PreCompoundHe3 - fixed 30 usage of integer Z and A 31 32 02-November 2010 V.Ivanchenko hadr-pre-V09-03-14 33 --------------------------------------------------- 34 - Fixed Coverity warnings - pedantic initialisation in constructors 35 36 28-October 2010 V.Ivanchenko hadr-pre-V09-03-13 37 --------------------------------------------------- 38 G4PreCompoundModel - use more safe constructor of G4DynamicParticle 39 G4LowEIonFragmentation - complete transition to integar Z and A, 40 use of updated methods for G4Fragment 16 41 17 42 20-October 2010 V.Ivanchenko hadr-pre-V09-03-12 -
trunk/source/processes/hadronic/models/qmd/History
r1228 r1347 13 13 * Please list in reverse chronological order (last date on top) 14 14 --------------------------------------------------------------- 15 16 18-November-2010 Tatsumi Koi (hadr-qmd-V09-03-00) 17 - Enable RQMD 18 include/G4QMDReaction.hh 19 src/G4QMDReaction.cc 20 include/G4QMDMeanField.hh 21 src/G4QMDMeanField.cc 15 22 16 23 20-November-2009 Tatsumi Koi (hadr-qmd-V09-02-03) -
trunk/source/processes/hadronic/models/qmd/include/G4QMDMeanField.hh
r962 r1347 60 60 61 61 G4double GetTotalPotential(); 62 G4double GetPotential( G4int ); 62 63 63 64 void DoPropagation( G4double ); -
trunk/source/processes/hadronic/models/qmd/include/G4QMDReaction.hh
r1228 r1347 74 74 void EnableFermiG(){ heg = true; setHighEnergyModel(); }; 75 75 76 void SetTMAX( G4int i ){ maxTime = i; }; 77 void SetDT( G4double t ){ deltaT = t; }; 78 void SetEF( G4double x ){ envelopF = x; }; 79 76 80 private: 77 81 … … 89 93 G4double deltaT; 90 94 G4int maxTime; 95 G4double envelopF; 91 96 92 97 G4Evaporation* evaporation; -
trunk/source/processes/hadronic/models/qmd/src/G4QMDMeanField.cc
r962 r1347 392 392 G4ThreeVector ri = system->GetParticipant( i )->GetPosition(); 393 393 G4LorentzVector p4i = system->GetParticipant( i )->Get4Momentum(); 394 394 395 395 G4ThreeVector betai = p4i.v()/p4i.e(); 396 396 397 ffr[i] = betai; 397 // R-JQMD 398 G4double Vi = GetPotential( i ); 399 G4double p_zero = std::sqrt( p4i.e()*p4i.e() + 2*p4i.m()*Vi); 400 G4ThreeVector betai_R = p4i.v()/p_zero; 401 G4double mi_R = p4i.m()/p_zero; 402 // 403 ffr[i] = betai_R; 398 404 ffp[i] = G4ThreeVector( 0.0 ); 405 406 if ( false ) 407 { 408 ffr[i] = betai; 409 mi_R = 1.0; 410 } 399 411 400 412 for ( G4int j = 0 ; j < system->GetTotalNumberOfParticipant() ; j ++ ) … … 417 429 * ( 1. - 2. * std::abs( jcharge - icharge ) ) 418 430 + cl * rhc[j][i]; 431 ccpp *= mi_R; 419 432 420 433 /* … … 435 448 436 449 437 G4ThreeVector rij = ri - rj;438 G4ThreeVector betaij = ( p4i + p4j ).v()/eij;439 440 G4ThreeVector cij = betaij - betai;441 442 ffr[i] = ffr[i] + 2*ccrr* ( rij + grbb*cij );450 G4ThreeVector rij = ri - rj; 451 G4ThreeVector betaij = ( p4i + p4j ).v()/eij; 452 453 G4ThreeVector cij = betaij - betai; 454 455 ffr[i] = ffr[i] + 2*ccrr* ( rij + grbb*cij ); 443 456 444 ffp[i] = ffp[i] - 2*ccpp* ( rij + grbb*betaij );457 ffp[i] = ffp[i] - 2*ccpp* ( rij + grbb*betaij ); 445 458 446 459 } … … 450 463 //std::cout << "gradu 1 " << ffr[1] << " " << ffp[1] << std::endl; 451 464 465 } 466 467 468 469 G4double G4QMDMeanField::GetPotential( G4int i ) 470 { 471 G4int n = system->GetTotalNumberOfParticipant(); 472 473 G4double rhoa = 0.0; 474 G4double rho3 = 0.0; 475 G4double rhos = 0.0; 476 G4double rhoc = 0.0; 477 478 479 G4int icharge = system->GetParticipant(i)->GetChargeInUnitOfEplus(); 480 G4int inuc = system->GetParticipant(i)->GetNuc(); 481 482 for ( G4int j = 0 ; j < n ; j ++ ) 483 { 484 G4int jcharge = system->GetParticipant(j)->GetChargeInUnitOfEplus(); 485 G4int jnuc = system->GetParticipant(j)->GetNuc(); 486 487 rhoa += rha[j][i]; 488 rhoc += rhe[j][i]; 489 rhos += rha[j][i] * jnuc * inuc 490 * ( 1 - 2 * std::abs ( jcharge - icharge ) ); 491 } 492 493 rho3 = std::pow ( rhoa , gamm ); 494 495 G4double potential = c0 * rhoa 496 + c3 * rho3 497 + cs * rhos 498 + cl * rhoc; 499 500 return potential; 452 501 } 453 502 -
trunk/source/processes/hadronic/models/qmd/src/G4QMDReaction.cc
r1228 r1347 43 43 G4QMDReaction::G4QMDReaction() 44 44 : system ( NULL ) 45 , deltaT ( 1 ) // in fsec 45 , deltaT ( 1 ) // in fsec (c=1) 46 46 , maxTime ( 100 ) // will have maxTime-th time step 47 , envelopF ( 1.05 ) // 10% for Peripheral reactions 47 48 , gem ( true ) 48 49 , frag ( false ) … … 155 156 156 157 // impact parameter 157 G4double bmax = 1.05*(bmax_0/fermi); // 10% for Peripheral reactions 158 //G4double bmax = 1.05*(bmax_0/fermi); // 10% for Peripheral reactions 159 G4double bmax = envelopF*(bmax_0/fermi); 158 160 G4double b = bmax * std::sqrt ( G4UniformRand() ); 159 161 //071112 -
trunk/source/processes/hadronic/models/radioactive_decay/History
r1340 r1347 14 14 * Reverse chronological order (last date on top), please * 15 15 ---------------------------------------------------------- 16 18 November 2010 F.Lei (radioactive_decay-V09-03-04) 17 - src/G4RadioactiveDecay.cc:1593 get rid of the compalition warning with gcc4.5.1 18 19 17 November 2010 F.Lei (radioactive_decay-V09-03-03) 20 - Completed the implementation of generating the activity table in VR mode 21 - Set the default h-l threshold to 1 micros in VR mode. 22 - General improvement in VR mode implementation. 23 - G4RadioactiveDecaymessenger.cc: icmCMD,armCMD & hlThreshold are available at all states. 24 25 11 November 2010 F.Lei 26 - further updates to G4RadioactivityTable.hh .cc and G4RadioactiveDecay.hh .cc 27 28 10 November 2010 Dennis Wright (radioactive_decay-V09-03-02) 29 ------------------------------------------------------------- 30 - G4RadioactiveDecay.cc : replaced incorrect use of "->" with "." for G4Track 31 in DecayIt(const G4Track&, ) 32 33 - G4RadioactivityTable.cc : add include file for <map> and replace map 34 with std::map in method AddIsotope 35 36 29 Oct 2010 F. Lei 37 ------------------ 38 - Added G4RadioactivityTable.hh .cc files for tallying the accumulated radioactivitties in VR mode 39 - Added in G4RadioactiveDecay.hh: 40 std::vector<G4RadioactivityTable*> GetTheRadioactivityTables() {return theRadioactivityTables;} 41 // this is how the radioactivity tables can be retrieved by the user 42 std::vector<G4RadioactivityTable*> theRadioactivityTables; 43 std::map<G4int,G4int> decayWindows; 44 - In G4RadioactiveDecay.cc: 45 starting line 1291: changes need to setup the radioactivity tables 46 line 1624: include the track weight in the weight calculation 47 line 1627: add the rate to the radioactivity tables 48 - improved formatting of all the class files 49 16 50 17 51 11 Oct 2010 F. Lei (radioactive_decay-V09-03-01) -
trunk/source/processes/hadronic/models/radioactive_decay/include/G4RadioactiveDecay.hh
r1315 r1347 61 61 #include "G4RadioactiveDecayRateVector.hh" 62 62 #include "G4RIsotopeTable.hh" 63 #include "G4RadioactivityTable.hh" 64 63 65 #include <vector> 66 64 67 65 68 //class G4UserlimitsForRD; … … 74 77 class G4RadioactiveDecay : public G4VRestDiscreteProcess 75 78 { 76 // class description77 78 // Implementation of nuclear radioactive decay process.79 // It simulates the decays of radioactive nuclei, which is submitted to RDM in the form80 // of G4Ions. Half-liffe and decay schemes are hold in the Radioactivity database81 // All decay products are submitted back to the particle tracking process through82 // the G4ParticleChangeForRadDecay object.83 84 // class description - end85 79 // class description 80 81 // Implementation of nuclear radioactive decay process. 82 // It simulates the decays of radioactive nuclei, which is submitted to RDM in the form 83 // of G4Ions. Half-liffe and decay schemes are hold in the Radioactivity database 84 // All decay products are submitted back to the particle tracking process through 85 // the G4ParticleChangeForRadDecay object. 86 87 // class description - end 88 86 89 public: // with description 87 90 88 G4RadioactiveDecay (const G4String& processName="RadioactiveDecay"); 89 ~G4RadioactiveDecay(); 90 // constructor and destructor 91 // 92 93 G4bool IsApplicable(const G4ParticleDefinition &); 94 // Returns true if the specified isotope is 95 // 1) defined as "nucleus" and 96 // 2) it is within theNucleusLimit 97 // 98 G4bool IsLoaded (const G4ParticleDefinition &); 99 // Returns true if the decay table of the specified nuclei is ready. 100 // 101 void SelectAVolume(const G4String aVolume); 102 // Select a logical volume in which RDM applies. 103 // 104 void DeselectAVolume(const G4String aVolume); 105 // remove a logical volume from the RDM applied list 106 // 107 void SelectAllVolumes(); 108 // Select all logical volumes for the application of RDM. 109 // 110 void DeselectAllVolumes(); 111 // Remove all logical volumes from RDM applications. 112 // 113 void SetDecayBias (G4String filename); 114 // Sets the decay biasing scheme using the data in "filename" 115 // 116 void SetHLThreshold (G4double hl) {halflifethreshold = hl;} 117 // Set the half-life threshold for isomer production 118 // 119 void SetICM (G4bool icm) {applyICM = icm;} 120 // Enable/disable ICM 121 // 122 void SetARM (G4bool arm) {applyARM = arm;} 123 // Enable/disable ARM 124 // 125 void SetSourceTimeProfile (G4String filename) ; 126 // Sets source exposure function using histograms in "filename" 127 // 128 G4bool IsRateTableReady(const G4ParticleDefinition &); 129 // Returns true if the coefficient and decay time table for all the 130 // descendants of the specified isotope are ready. 131 // 132 // used in VR decay mode only 133 // 134 void AddDecayRateTable(const G4ParticleDefinition &); 135 // Calculates the coefficient and decay time table for all the descendants 136 // of the specified isotope. Adds the calculated table to the private data 137 // member "theDecayRateTableVector". 138 // 139 // 140 // used in VR decay mode only 141 // 142 void GetDecayRateTable(const G4ParticleDefinition &); 143 // Used to retrieve the coefficient and decay time table for all the 144 // descendants of the specified isotope from "theDecayRateTableVector" 145 // and place it in "theDecayRateTable". 146 // 147 // 148 // used in VR decay mode only 149 // 150 void SetDecayRate(G4int,G4int,G4double, G4int, std::vector<G4double>, 151 std::vector<G4double>); 152 // Sets "theDecayRate" with data supplied in the arguements. 153 // 154 // // 155 // used in VR decay mode only 156 // 157 158 G4DecayTable *LoadDecayTable (G4ParticleDefinition & theParentNucleus); 159 // Load the decay data of isotope theParentNucleus. 160 // 161 inline void SetVerboseLevel(G4int value) {verboseLevel = value;} 162 // Sets the VerboseLevel which controls duggering display. 163 // 164 inline G4int GetVerboseLevel() const {return verboseLevel;} 165 // Returns the VerboseLevel which controls level of debugging output. 166 // 167 inline void SetNucleusLimits(G4NucleusLimits theNucleusLimits1) 168 {theNucleusLimits = theNucleusLimits1 ;} 169 // Sets theNucleusLimits which specifies the range of isotopes 170 // the G4RadioactiveDecay applies. 171 // 172 inline G4NucleusLimits GetNucleusLimits() const 173 {return theNucleusLimits;} 174 // Returns theNucleusLimits which specifies the range of isotopes 175 // the G4RadioactiveDecay applies. 176 // 177 inline void SetAnalogueMonteCarlo (G4bool r ) { AnalogueMC = r; } 178 // Controls whether G4RadioactiveDecay runs in analogue mode or 179 // variance reduction mode. 180 inline void SetFBeta (G4bool r ) { FBeta = r; } 181 // Controls whether G4RadioactiveDecay uses fast beta simulation mode 182 // 183 inline G4bool IsAnalogueMonteCarlo () {return AnalogueMC;} 184 // Returns true if the simulation is an analogue Monte Carlo, and false if 185 // any of the biassing schemes have been selected. 186 // 187 inline void SetBRBias (G4bool r ) { BRBias = r; 188 SetAnalogueMonteCarlo(0);} 189 // Sets whether branching ration bias scheme applies. 190 // 191 inline void SetSplitNuclei (G4int r) { NSplit = r; SetAnalogueMonteCarlo(0); } 192 // Sets the N number for the Nuclei spliting bias scheme 193 // 194 inline G4int GetSplitNuclei () {return NSplit;} 195 // Returns the N number used for the Nuclei spliting bias scheme 196 // 91 G4RadioactiveDecay (const G4String& processName="RadioactiveDecay"); 92 ~G4RadioactiveDecay(); 93 // constructor and destructor 94 // 95 96 G4bool IsApplicable(const G4ParticleDefinition &); 97 // Returns true if the specified isotope is 98 // 1) defined as "nucleus" and 99 // 2) it is within theNucleusLimit 100 // 101 G4bool IsLoaded (const G4ParticleDefinition &); 102 // Returns true if the decay table of the specified nuclei is ready. 103 // 104 void SelectAVolume(const G4String aVolume); 105 // Select a logical volume in which RDM applies. 106 // 107 void DeselectAVolume(const G4String aVolume); 108 // remove a logical volume from the RDM applied list 109 // 110 void SelectAllVolumes(); 111 // Select all logical volumes for the application of RDM. 112 // 113 void DeselectAllVolumes(); 114 // Remove all logical volumes from RDM applications. 115 // 116 void SetDecayBias (G4String filename); 117 // Sets the decay biasing scheme using the data in "filename" 118 // 119 void SetHLThreshold (G4double hl) {halflifethreshold = hl;} 120 // Set the half-life threshold for isomer production 121 // 122 void SetICM (G4bool icm) {applyICM = icm;} 123 // Enable/disable ICM 124 // 125 void SetARM (G4bool arm) {applyARM = arm;} 126 // Enable/disable ARM 127 // 128 void SetSourceTimeProfile (G4String filename) ; 129 // Sets source exposure function using histograms in "filename" 130 // 131 G4bool IsRateTableReady(const G4ParticleDefinition &); 132 // Returns true if the coefficient and decay time table for all the 133 // descendants of the specified isotope are ready. 134 // 135 // used in VR decay mode only 136 // 137 void AddDecayRateTable(const G4ParticleDefinition &); 138 // Calculates the coefficient and decay time table for all the descendants 139 // of the specified isotope. Adds the calculated table to the private data 140 // member "theDecayRateTableVector". 141 // 142 // 143 // used in VR decay mode only 144 // 145 void GetDecayRateTable(const G4ParticleDefinition &); 146 // Used to retrieve the coefficient and decay time table for all the 147 // descendants of the specified isotope from "theDecayRateTableVector" 148 // and place it in "theDecayRateTable". 149 // 150 // 151 // used in VR decay mode only 152 // 153 void SetDecayRate(G4int,G4int,G4double, G4int, std::vector<G4double>, 154 std::vector<G4double>); 155 // Sets "theDecayRate" with data supplied in the arguements. 156 // 157 // // 158 // used in VR decay mode only 159 // 160 161 std::vector<G4RadioactivityTable*> GetTheRadioactivityTables() {return theRadioactivityTables;} 162 // return the vector of G4Radioactivity map 163 // should be used in VR mode only 164 165 G4DecayTable *LoadDecayTable (G4ParticleDefinition & theParentNucleus); 166 // Load the decay data of isotope theParentNucleus. 167 // 168 inline void SetVerboseLevel(G4int value) {verboseLevel = value;} 169 // Sets the VerboseLevel which controls duggering display. 170 // 171 inline G4int GetVerboseLevel() const {return verboseLevel;} 172 // Returns the VerboseLevel which controls level of debugging output. 173 // 174 inline void SetNucleusLimits(G4NucleusLimits theNucleusLimits1) 175 {theNucleusLimits = theNucleusLimits1 ;} 176 // Sets theNucleusLimits which specifies the range of isotopes 177 // the G4RadioactiveDecay applies. 178 // 179 inline G4NucleusLimits GetNucleusLimits() const 180 {return theNucleusLimits;} 181 // Returns theNucleusLimits which specifies the range of isotopes 182 // the G4RadioactiveDecay applies. 183 // 184 inline void SetAnalogueMonteCarlo (G4bool r ) { 185 AnalogueMC = r; 186 if (!AnalogueMC) halflifethreshold = 1e-6*s; 187 } 188 // Controls whether G4RadioactiveDecay runs in analogue mode or 189 // variance reduction mode. 190 inline void SetFBeta (G4bool r ) { FBeta = r; } 191 // Controls whether G4RadioactiveDecay uses fast beta simulation mode 192 // 193 inline G4bool IsAnalogueMonteCarlo () {return AnalogueMC;} 194 // Returns true if the simulation is an analogue Monte Carlo, and false if 195 // any of the biassing schemes have been selected. 196 // 197 inline void SetBRBias (G4bool r ) { BRBias = r; 198 SetAnalogueMonteCarlo(0);} 199 // Sets whether branching ration bias scheme applies. 200 // 201 inline void SetSplitNuclei (G4int r) { NSplit = r; SetAnalogueMonteCarlo(0); } 202 // Sets the N number for the Nuclei spliting bias scheme 203 // 204 inline G4int GetSplitNuclei () {return NSplit;} 205 // Returns the N number used for the Nuclei spliting bias scheme 206 // 197 207 public: 198 199 void BuildPhysicsTable(const G4ParticleDefinition &);208 209 void BuildPhysicsTable(const G4ParticleDefinition &); 200 210 201 211 protected: 202 212 203 G4VParticleChange* DecayIt( const G4Track& theTrack,204 const G4Step& theStep);205 206 G4DecayProducts* DoDecay(G4ParticleDefinition& theParticleDef);207 208 G4double GetMeanFreePath(const G4Track& theTrack,209 G4double previousStepSize,210 G4ForceCondition* condition);211 212 G4double GetMeanLifeTime(const G4Track& theTrack,213 G4ForceCondition* condition);214 215 G4double GetTaoTime(G4double,G4double);216 217 G4double GetDecayTime();218 219 G4int GetDecayTimeBin(const G4double aDecayTime);213 G4VParticleChange* DecayIt( const G4Track& theTrack, 214 const G4Step& theStep); 215 216 G4DecayProducts* DoDecay(G4ParticleDefinition& theParticleDef); 217 218 G4double GetMeanFreePath(const G4Track& theTrack, 219 G4double previousStepSize, 220 G4ForceCondition* condition); 221 222 G4double GetMeanLifeTime(const G4Track& theTrack, 223 G4ForceCondition* condition); 224 225 G4double GetTaoTime(G4double,G4double); 226 227 G4double GetDecayTime(); 228 229 G4int GetDecayTimeBin(const G4double aDecayTime); 220 230 221 231 private: 222 232 223 G4RadioactiveDecay(const G4RadioactiveDecay &right);224 G4RadioactiveDecay & operator=(const G4RadioactiveDecay &right);233 G4RadioactiveDecay(const G4RadioactiveDecay &right); 234 G4RadioactiveDecay & operator=(const G4RadioactiveDecay &right); 225 235 226 236 private: 227 237 228 G4RadioactiveDecaymessenger *theRadioactiveDecaymessenger; 229 230 G4PhysicsTable *aPhysicsTable; 231 232 G4RIsotopeTable *theIsotopeTable; 233 234 G4NucleusLimits theNucleusLimits; 235 236 const G4double HighestBinValue; 237 const G4double LowestBinValue; 238 239 const G4int TotBin; 240 241 G4bool AnalogueMC; 242 G4bool BRBias; 243 G4bool FBeta; 244 G4int NSplit; 245 246 G4double halflifethreshold; 247 G4bool applyICM; 248 G4bool applyARM; 249 250 G4int NSourceBin; 251 G4double SBin[99]; 252 G4double SProfile[99]; 253 254 G4int NDecayBin; 255 G4double DBin[99]; 256 G4double DProfile[99]; 257 258 std::vector<G4String> LoadedNuclei; 259 std::vector<G4String> ValidVolumes; 260 261 G4RadioactiveDecayRate theDecayRate; 262 G4RadioactiveDecayRates theDecayRateVector; 263 G4RadioactiveDecayRateVector theDecayRateTable; 264 G4RadioactiveDecayRateTable theDecayRateTableVector; 265 266 static const G4double levelTolerance; 267 268 // Remainder of life time at rest 269 G4double fRemainderLifeTime; 270 271 G4int verboseLevel; 272 273 274 // ParticleChange for decay process 275 G4ParticleChangeForRadDecay fParticleChangeForRadDecay; 276 277 inline G4double AtRestGetPhysicalInteractionLength 278 (const G4Track& track, G4ForceCondition* condition) 279 {fRemainderLifeTime = G4VRestDiscreteProcess:: 280 AtRestGetPhysicalInteractionLength(track, condition ); 281 return fRemainderLifeTime;} 282 283 inline G4VParticleChange* AtRestDoIt 284 (const G4Track& theTrack, const G4Step& theStep) 285 {return DecayIt(theTrack, theStep);} 286 287 inline G4VParticleChange* PostStepDoIt 288 (const G4Track& theTrack, const G4Step& theStep) 289 {return DecayIt(theTrack, theStep);} 238 G4RadioactiveDecaymessenger *theRadioactiveDecaymessenger; 239 240 G4PhysicsTable *aPhysicsTable; 241 242 G4RIsotopeTable *theIsotopeTable; 243 244 G4NucleusLimits theNucleusLimits; 245 246 const G4double HighestBinValue; 247 const G4double LowestBinValue; 248 249 const G4int TotBin; 250 251 G4bool AnalogueMC; 252 G4bool BRBias; 253 G4bool FBeta; 254 G4int NSplit; 255 256 G4double halflifethreshold; 257 G4bool applyICM; 258 G4bool applyARM; 259 260 G4int NSourceBin; 261 G4double SBin[99]; 262 G4double SProfile[99]; 263 264 G4int NDecayBin; 265 G4double DBin[99]; 266 G4double DProfile[99]; 267 268 std::vector<G4String> LoadedNuclei; 269 std::vector<G4String> ValidVolumes; 270 271 G4RadioactiveDecayRate theDecayRate; 272 G4RadioactiveDecayRates theDecayRateVector; 273 G4RadioactiveDecayRateVector theDecayRateTable; 274 G4RadioactiveDecayRateTable theDecayRateTableVector; 275 276 // for the radioactivity tables 277 std::vector<G4RadioactivityTable*> theRadioactivityTables; 278 G4int decayWindows[99]; 279 280 // 281 static const G4double levelTolerance; 282 283 // Remainder of life time at rest 284 G4double fRemainderLifeTime; 285 286 G4int verboseLevel; 287 288 289 // ParticleChange for decay process 290 G4ParticleChangeForRadDecay fParticleChangeForRadDecay; 291 292 inline G4double AtRestGetPhysicalInteractionLength 293 (const G4Track& track, G4ForceCondition* condition) 294 {fRemainderLifeTime = G4VRestDiscreteProcess:: 295 AtRestGetPhysicalInteractionLength(track, condition ); 296 return fRemainderLifeTime;} 297 298 inline G4VParticleChange* AtRestDoIt 299 (const G4Track& theTrack, const G4Step& theStep) 300 {return DecayIt(theTrack, theStep);} 301 302 inline G4VParticleChange* PostStepDoIt 303 (const G4Track& theTrack, const G4Step& theStep) 304 {return DecayIt(theTrack, theStep);} 290 305 291 306 }; -
trunk/source/processes/hadronic/models/radioactive_decay/src/G4RadioactiveDecay.cc
r1340 r1347 121 121 // Constructor 122 122 // 123 G4RadioactiveDecay::G4RadioactiveDecay 124 (const G4String& processName) 125 :G4VRestDiscreteProcess(processName, fDecay), HighestBinValue(10.0), 126 LowestBinValue(1.0e-3), TotBin(200), verboseLevel(0) 123 G4RadioactiveDecay::G4RadioactiveDecay (const G4String& processName) 124 :G4VRestDiscreteProcess(processName, fDecay), HighestBinValue(10.0), 125 LowestBinValue(1.0e-3), TotBin(200), verboseLevel(0) 127 126 { 128 127 #ifdef G4VERBOSE … … 136 135 aPhysicsTable = 0; 137 136 pParticleChange = &fParticleChangeForRadDecay; 138 137 139 138 // 140 139 // Now register the Isotopetable with G4IonTable. … … 156 155 NSourceBin = 1; 157 156 SBin[0] = 0.* s; 158 SBin[1] = 1 e10* s;157 SBin[1] = 1.* s; 159 158 SProfile[0] = 1.; 160 SProfile[1] = 1.;159 SProfile[1] = 0.; 161 160 NDecayBin = 1; 162 DBin[0] = 9.9e9* s ;163 DBin[1] = 1 e10* s;161 DBin[0] = 0. * s ; 162 DBin[1] = 1. * s; 164 163 DProfile[0] = 1.; 165 164 DProfile[1] = 0.; 165 decayWindows[0] = 0; 166 G4RadioactivityTable* rTable = new G4RadioactivityTable() ; 167 theRadioactivityTables.push_back(rTable); 166 168 NSplit = 1; 167 169 AnalogueMC = true ; … … 187 189 delete aPhysicsTable; 188 190 } 189 // delete theIsotopeTable;190 delete theRadioactiveDecaymessenger;191 // delete theIsotopeTable; 192 delete theRadioactiveDecaymessenger; 191 193 } 192 194 … … 197 199 // 198 200 G4bool G4RadioactiveDecay::IsApplicable( const G4ParticleDefinition & 199 aParticle)201 aParticle) 200 202 { 201 203 // … … 224 226 // 225 227 G4bool G4RadioactiveDecay::IsLoaded(const G4ParticleDefinition & 226 aParticle)228 aParticle) 227 229 { 228 230 // … … 232 234 // 233 235 return std::binary_search(LoadedNuclei.begin(), 234 LoadedNuclei.end(),235 aParticle.GetParticleName());236 LoadedNuclei.end(), 237 aParticle.GetParticleName()); 236 238 } 237 239 //////////////////////////////////////////////////////////////////////////////// … … 242 244 void G4RadioactiveDecay::SelectAVolume(const G4String aVolume) 243 245 { 244 246 245 247 G4LogicalVolumeStore *theLogicalVolumes; 246 248 G4LogicalVolume *volume; … … 331 333 G4cout << " RDM removed from all volumes" << G4endl; 332 334 #endif 333 335 334 336 } 335 337 … … 340 342 // 341 343 G4bool G4RadioactiveDecay::IsRateTableReady(const G4ParticleDefinition & 342 aParticle)344 aParticle) 343 345 { 344 346 // … … 351 353 { 352 354 if (theDecayRateTableVector[i].GetIonName() == aParticleName) 353 return true ;355 return true ; 354 356 } 355 357 return false; … … 363 365 // 364 366 void G4RadioactiveDecay::GetDecayRateTable(const G4ParticleDefinition & 365 aParticle)367 aParticle) 366 368 { 367 369 … … 376 378 } 377 379 #ifdef G4VERBOSE 378 if (GetVerboseLevel()>0)379 {380 G4cout <<"The DecayRate Table for "381 << aParticleName << " is selected." << G4endl;382 }380 if (GetVerboseLevel()>0) 381 { 382 G4cout <<"The DecayRate Table for " 383 << aParticleName << " is selected." << G4endl; 384 } 383 385 #endif 384 386 } … … 388 390 // GetTaoTime 389 391 // 390 // to perform the conv ilution of the sourcetimeprofile function with the392 // to perform the convolution of the source time profile function with the 391 393 // decay constants in the decay chain. 392 394 // … … 408 410 } 409 411 taotime += SProfile[nbin] * (1-std::exp(-(t-SBin[nbin])/tao)); 412 if (taotime < 0.) { 413 G4cout <<" Tao time: " <<taotime << " reset to zero!"<<G4endl; 414 taotime = 0.; 415 } 416 410 417 #ifdef G4VERBOSE 411 418 if (GetVerboseLevel()>1) 412 419 {G4cout <<" Tao time: " <<taotime <<G4endl;} 413 420 #endif 414 return taotime ;415 } 416 421 return taotime ; 422 } 423 417 424 //////////////////////////////////////////////////////////////////////////////// 418 425 // … … 433 440 #ifdef G4VERBOSE 434 441 if (GetVerboseLevel()>1) 435 {G4cout <<" Decay time: " <<decaytime <<"[ns]" <<G4endl;}442 {G4cout <<" Decay time: " <<decaytime/s <<"[s]" <<G4endl;} 436 443 #endif 437 444 return decaytime; … … 447 454 G4int G4RadioactiveDecay::GetDecayTimeBin(const G4double aDecayTime) 448 455 { 449 for (G4int i = 0; i < NDecayBin; i++) 450 { 451 if ( aDecayTime > DBin[i]) return i+1; 452 } 453 return 1; 456 G4int i = 0; 457 while ( aDecayTime > DBin[i] ) i++; 458 return i; 454 459 } 455 460 //////////////////////////////////////////////////////////////////////////////// … … 472 477 G4ParticleDefinition* theParticleDef = theParticle->GetDefinition(); 473 478 G4double theLife = theParticleDef->GetPDGLifeTime(); 474 479 475 480 #ifdef G4VERBOSE 476 481 if (GetVerboseLevel()>2) … … 485 490 else if (theLife < 0.0) {meanlife = DBL_MAX;} 486 491 else {meanlife = theLife;} 487 // set the meanlife to zero for excited istopes which is not in the RDM database492 // set the meanlife to zero for excited istopes which is not in the RDM database 488 493 if (((const G4Ions*)(theParticleDef))->GetExcitationEnergy() > 0. && meanlife == DBL_MAX) {meanlife = 0.;} 489 494 } 490 495 #ifdef G4VERBOSE 491 496 if (GetVerboseLevel()>1) 492 {G4cout <<"mean life time: " <<meanlife <<"[ns]" <<G4endl;}493 #endif 494 497 {G4cout <<"mean life time: " <<meanlife/s <<"[s]" <<G4endl;} 498 #endif 499 495 500 return meanlife; 496 501 } … … 507 512 // constants 508 513 G4bool isOutRange ; 509 514 510 515 // get particle 511 516 const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle(); 512 517 513 518 // returns the mean free path in GEANT4 internal units 514 519 G4double pathlength; … … 516 521 G4double aCtau = c_light * aParticleDef->GetPDGLifeTime(); 517 522 G4double aMass = aParticle->GetMass(); 518 523 519 524 #ifdef G4VERBOSE 520 525 if (GetVerboseLevel()>2) { … … 525 530 } 526 531 #endif 527 532 528 533 // check if the particle is stable? 529 534 if (aParticleDef->GetPDGStable()) { 530 535 pathlength = DBL_MAX; 531 536 532 537 } else if (aCtau < 0.0) { 533 538 pathlength = DBL_MAX; 534 539 535 540 //check if the particle has very short life time ? 536 541 } else if (aCtau < DBL_MIN) { 537 542 pathlength = DBL_MIN; 538 543 539 544 //check if zero mass 540 545 } else if (aMass < DBL_MIN) { … … 545 550 } 546 551 #endif 547 } else {548 //calculate the mean free path549 // by using normalized kinetic energy (= Ekin/mass)550 G4double rKineticEnergy = aParticle->GetKineticEnergy()/aMass;551 if ( rKineticEnergy > HighestBinValue) {552 // beta >> 1553 pathlength = ( rKineticEnergy + 1.0)* aCtau;554 } else if ( rKineticEnergy > LowestBinValue) {555 // check if aPhysicsTable exists556 if (aPhysicsTable == 0) BuildPhysicsTable(*aParticleDef);557 // beta is in the range valid for PhysicsTable558 pathlength = aCtau *559 ((*aPhysicsTable)(0))-> GetValue(rKineticEnergy,isOutRange);560 } else if ( rKineticEnergy < DBL_MIN ) {561 // too slow particle562 #ifdef G4VERBOSE 563 if (GetVerboseLevel()>2) {564 G4cout << "G4Decay::GetMeanFreePath() !!particle stops!!";565 G4cout << aParticleDef->GetParticleName() << G4endl;566 G4cout << "KineticEnergy:" << aParticle->GetKineticEnergy()/GeV <<"[GeV]";567 }568 #endif 569 pathlength = DBL_MIN;570 } else {571 // beta << 1572 pathlength = (aParticle->GetTotalMomentum())/aMass*aCtau ;573 }574 }575 #ifdef G4VERBOSE 576 if (GetVerboseLevel()>1) {577 G4cout << "mean free path: "<< pathlength/m << "[m]" << G4endl;578 }579 #endif 580 return pathlength;552 } else { 553 //calculate the mean free path 554 // by using normalized kinetic energy (= Ekin/mass) 555 G4double rKineticEnergy = aParticle->GetKineticEnergy()/aMass; 556 if ( rKineticEnergy > HighestBinValue) { 557 // beta >> 1 558 pathlength = ( rKineticEnergy + 1.0)* aCtau; 559 } else if ( rKineticEnergy > LowestBinValue) { 560 // check if aPhysicsTable exists 561 if (aPhysicsTable == 0) BuildPhysicsTable(*aParticleDef); 562 // beta is in the range valid for PhysicsTable 563 pathlength = aCtau * 564 ((*aPhysicsTable)(0))-> GetValue(rKineticEnergy,isOutRange); 565 } else if ( rKineticEnergy < DBL_MIN ) { 566 // too slow particle 567 #ifdef G4VERBOSE 568 if (GetVerboseLevel()>2) { 569 G4cout << "G4Decay::GetMeanFreePath() !!particle stops!!"; 570 G4cout << aParticleDef->GetParticleName() << G4endl; 571 G4cout << "KineticEnergy:" << aParticle->GetKineticEnergy()/GeV <<"[GeV]"; 572 } 573 #endif 574 pathlength = DBL_MIN; 575 } else { 576 // beta << 1 577 pathlength = (aParticle->GetTotalMomentum())/aMass*aCtau ; 578 } 579 } 580 #ifdef G4VERBOSE 581 if (GetVerboseLevel()>1) { 582 G4cout << "mean free path: "<< pathlength/m << "[m]" << G4endl; 583 } 584 #endif 585 return pathlength; 581 586 } 582 587 //////////////////////////////////////////////////////////////////////////////// … … 604 609 G4int i; 605 610 for ( i = 0 ; i < TotBin ; i++ ) { 606 gammainv = 1.0/(aVector->GetLowEdgeEnergy(i) + 1.0);607 beta = std::sqrt((1.0 - gammainv)*(1.0 +gammainv));608 aVector->PutValue(i, beta/gammainv);611 gammainv = 1.0/(aVector->GetLowEdgeEnergy(i) + 1.0); 612 beta = std::sqrt((1.0 - gammainv)*(1.0 +gammainv)); 613 aVector->PutValue(i, beta/gammainv); 609 614 } 610 615 aPhysicsTable->insert(aVector); … … 636 641 G4cout << "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files." << G4endl; 637 642 throw G4HadronicException(__FILE__, __LINE__, 638 "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files.");643 "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files."); 639 644 } 640 645 G4String dirName = getenv("G4RADIOACTIVEDATA"); … … 647 652 G4String file = os.str(); 648 653 649 654 650 655 std::ifstream DecaySchemeFile(file); 651 656 G4bool found(false); … … 664 669 modeSumBR[i] = 0.0; 665 670 } 666 671 667 672 G4bool complete(false); 668 673 char inputChars[80]={' '}; … … 718 723 a/=1000.; 719 724 c/=1000.; 720 725 721 726 // cout<< "The decay mode is [LoadTable] "<<theDecayMode<<G4endl; 722 727 723 728 switch (theDecayMode) { 724 729 case IT: … … 750 755 e0 = c*MeV/0.511; 751 756 n = aBetaFermiFunction->GetFFN(e0); 752 757 753 758 // now to work out the histogram and initialise the random generator 754 759 G4int npti = 100; … … 765 770 // Special treatment for K-40 (problem #1068) (flei,06/05/2010) 766 771 if (theParentNucleus.GetParticleName() == "K40[0.0]") f *= 767 (std::pow((g*g-1),3)+std::pow((ee-g),6)+7*(g*g-1)*std::pow((ee-g),2)*(g*g-1+std::pow((ee-g),2)));772 (std::pow((g*g-1),3)+std::pow((ee-g),6)+7*(g*g-1)*std::pow((ee-g),2)*(g*g-1+std::pow((ee-g),2))); 768 773 pdf[ptn] = f*aBetaFermiFunction->GetFF(e); 769 774 } … … 798 803 if (e0 > 0.) { 799 804 G4BetaFermiFunction* aBetaFermiFunction = new G4BetaFermiFunction (A, -(Z-1)); 800 805 801 806 n = aBetaFermiFunction->GetFFN(e0); 802 807 803 808 // now to work out the histogram and initialise the random generator 804 809 G4int npti = 100; … … 824 829 theDecayTable->Insert(aBetaPlusChannel); 825 830 modeSumBR[2] += b; 826 831 827 832 delete[] pdf; 828 833 delete aBetaFermiFunction; … … 909 914 G4Exception("G4RadioactiveDecay::LoadDecayTable()", "601", 910 915 FatalException, "Error in decay mode selection"); 911 916 912 917 } 913 918 } … … 972 977 // 973 978 void G4RadioactiveDecay::SetDecayRate(G4int theZ, G4int theA, G4double theE, 974 G4int theG, std::vector<G4double> theRates,975 std::vector<G4double> theTaos)979 G4int theG, std::vector<G4double> theRates, 980 std::vector<G4double> theTaos) 976 981 { 977 982 //fill the decay rate vector … … 993 998 // 2) Add the coefficiencies to the decay rate table vector 994 999 // 995 1000 996 1001 // 997 1002 // Create and initialise variables used in the method. … … 999 1004 1000 1005 theDecayRateVector.clear(); 1001 1006 1002 1007 G4int nGeneration = 0; 1003 1008 std::vector<G4double> rates; 1004 1009 std::vector<G4double> taos; 1005 1010 1006 1011 // start rate is -1. 1012 // Eq.4.26 of the Technical Note 1007 1013 rates.push_back(-1.); 1008 1014 // … … 1012 1018 G4double E = ((const G4Ions*)(&theParentNucleus))->GetExcitationEnergy(); 1013 1019 G4double tao = theParentNucleus.GetPDGLifeTime(); 1020 if (tao < 0.) tao = 1e-30; 1014 1021 taos.push_back(tao); 1015 1022 G4int nEntry = 0; 1016 1023 1017 1024 //fill the decay rate with the intial isotope data 1018 1025 SetDecayRate(Z,A,E,nGeneration,rates,taos); … … 1034 1041 G4AlphaDecayChannel *theAlphaChannel = 0; 1035 1042 G4RadioactiveDecayMode theDecayMode; 1036 // G4NuclearLevelManager levelManager;1037 //const G4NuclearLevel* level;1038 1043 G4double theBR = 0.0; 1039 1044 G4int AP = 0; … … 1056 1061 // 1057 1062 theIonTable = (G4IonTable *)(G4ParticleTable::GetParticleTable()->GetIonTable()); 1058 1063 1059 1064 while (!stable) { 1060 1065 nGeneration++; … … 1077 1082 aParentNucleus->SetDecayTable(LoadDecayTable(*aParentNucleus)); 1078 1083 } 1084 1085 G4DecayTable *theDecayTable = new G4DecayTable(); 1079 1086 aTempDecayTable = aParentNucleus->GetDecayTable(); 1087 for (i=0; i< 7; i++) brs[i] = 0.0; 1088 1080 1089 // 1081 1090 // 1082 1091 // Go through the decay table and to combine the same decay channels 1083 1092 // 1084 for (i=0; i< 7; i++) brs[i] = 0.0;1085 1086 G4DecayTable *theDecayTable = new G4DecayTable();1087 1088 1093 for (i=0; i<aTempDecayTable->entries(); i++) { 1089 1094 theChannel = aTempDecayTable->GetDecayChannel(i); … … 1099 1104 1100 1105 if (std::abs(daughterExcitation - level->Energy()) < levelTolerance) { 1101 1102 // Level hafe life is in ns and the gate as 1 micros by default 1103 if ( theDecayMode == 0 && level->HalfLife()*ns >= halflifethreshold ){ 1104 // some further though may needed here 1106 // Level half-life is in ns and the threshold is set to 1 micros by default, user can set it via the UI command 1107 if (level->HalfLife()*ns >= halflifethreshold ){ 1108 // save the metastable nucleus 1105 1109 theDecayTable->Insert(theChannel); 1106 1110 } … … 1120 1124 brs[3] = brs[4] =brs[5] = 0.0; 1121 1125 for (i= 0; i<7; i++){ 1122 if (brs[i] > 0 ) {1126 if (brs[i] > 0.) { 1123 1127 switch ( i ) { 1124 1128 case 0: … … 1127 1131 // Decay mode is isomeric transition. 1128 1132 // 1129 1133 1130 1134 theITChannel = new G4ITDecayChannel 1131 1135 (0, (const G4Ions*) aParentNucleus, brs[0]); 1132 1136 1133 1137 theDecayTable->Insert(theITChannel); 1134 1138 break; 1135 1139 1136 1140 case 1: 1137 1141 // … … 1142 1146 brs[1], 0.*MeV, 0.*MeV, 1, false, 0); 1143 1147 theDecayTable->Insert(theBetaMinusChannel); 1144 1148 1145 1149 break; 1146 1150 1147 1151 case 2: 1148 1152 // … … 1154 1158 theDecayTable->Insert(theBetaPlusChannel); 1155 1159 break; 1156 1160 1157 1161 case 6: 1158 1162 // … … 1164 1168 theDecayTable->Insert(theAlphaChannel); 1165 1169 break; 1166 1170 1167 1171 default: 1168 1172 break; … … 1170 1174 } 1171 1175 } 1172 1173 1176 // 1174 1177 // loop over all braches in theDecayTable … … 1179 1182 theBR = theChannel->GetBR(); 1180 1183 theDaughterNucleus = theNuclearDecayChannel->GetDaughterNucleus(); 1181 1182 // 1183 // now test if the daughterNucleus is a valid one 1184 // 1185 if (IsApplicable(*theDaughterNucleus) && theBR 1186 && aParentNucleus != theDaughterNucleus ) { 1184 // first check if the decay of the original nucleus is an IT channel, if true create a new groud-level nucleus 1185 if (theNuclearDecayChannel->GetDecayMode() == IT && nGeneration == 1 ) { 1186 A = ((const G4Ions*)(theDaughterNucleus))->GetAtomicMass(); 1187 Z = ((const G4Ions*)(theDaughterNucleus))->GetAtomicNumber(); 1188 theDaughterNucleus=theIonTable->GetIon(Z,A,0.); 1189 } 1190 if (IsApplicable(*theDaughterNucleus) && theBR && aParentNucleus != theDaughterNucleus) { 1187 1191 // need to make sure daugher has decaytable 1188 1192 if (!IsLoaded(*theDaughterNucleus)){ … … 1194 1198 Z = ((const G4Ions*)(theDaughterNucleus))->GetAtomicNumber(); 1195 1199 E = ((const G4Ions*)(theDaughterNucleus))->GetExcitationEnergy(); 1196 1200 1197 1201 TaoPlus = theDaughterNucleus->GetPDGLifeTime(); 1198 1202 // cout << TaoPlus <<G4endl; 1199 if (TaoPlus > 0.) { 1200 // first set the taos, one simply need to add to the parent ones 1201 taos.clear(); 1202 taos = TP; 1203 taos.push_back(TaoPlus); 1204 // now calculate the coefficiencies 1205 // 1206 // they are in two parts, first the les than n ones 1207 rates.clear(); 1208 size_t k; 1209 for (k = 0; k < RP.size(); k++){ 1203 if (TaoPlus <= 0.) TaoPlus = 1e-30; 1204 1205 // first set the taos, one simply need to add to the parent ones 1206 taos.clear(); 1207 taos = TP; 1208 taos.push_back(TaoPlus); 1209 // now calculate the coefficiencies 1210 // 1211 // they are in two parts, first the less than n ones 1212 // Eq 4.24 of the TN 1213 rates.clear(); 1214 size_t k; 1215 for (k = 0; k < RP.size(); k++){ 1216 if ((TP[k]-TaoPlus) == 0.) { 1217 theRate = 1e30; 1218 } else { 1210 1219 theRate = TP[k]/(TP[k]-TaoPlus) * theBR * RP[k]; 1211 rates.push_back(theRate);1212 1220 } 1213 // 1214 // the sencond part: the n:n coefficiency 1215 theRate = 0.; 1216 for (k = 0; k < RP.size(); k++){ 1217 theRate -=TaoPlus/(TP[k]-TaoPlus) * theBR * RP[k]; 1221 rates.push_back(theRate); 1222 } 1223 // 1224 // the sencond part: the n:n coefficiency 1225 // Eq 4.25 of the TN. Note Yn+1 is zero apart from Y1 which is -1 as treated at line 1013 1226 // 1227 theRate = 0.; 1228 G4double aRate; 1229 for (k = 0; k < RP.size(); k++){ 1230 if ((TP[k]-TaoPlus) == 0.) { 1231 aRate = 1e30; 1232 } else { 1233 aRate = TaoPlus/(TP[k]-TaoPlus) * theBR * RP[k]; 1218 1234 } 1219 rates.push_back(theRate); 1220 SetDecayRate (Z,A,E,nGeneration,rates,taos); 1221 theDecayRateVector.push_back(theDecayRate); 1222 nEntry++; 1223 } 1235 theRate -= aRate; 1236 } 1237 rates.push_back(theRate); 1238 SetDecayRate (Z,A,E,nGeneration,rates,taos); 1239 theDecayRateVector.push_back(theDecayRate); 1240 nEntry++; 1224 1241 } 1225 1242 } … … 1233 1250 if (nS == nT) stable = true; 1234 1251 } 1235 1252 1236 1253 //end of while loop 1237 1254 // the calculation completed here 1238 1239 1255 1256 1240 1257 // fill the first part of the decay rate table 1241 1258 // which is the name of the original particle (isotope) … … 1246 1263 // now fill the decay table with the newly completed decay rate vector 1247 1264 // 1248 1265 1249 1266 theDecayRateTable.SetItsRates(theDecayRateVector); 1250 1267 1251 1268 // 1252 1269 // finally add the decayratetable to the tablevector … … 1254 1271 theDecayRateTableVector.push_back(theDecayRateTable); 1255 1272 } 1256 1273 1257 1274 //////////////////////////////////////////////////////////////////////////////// 1258 1275 // … … 1267 1284 std::ifstream infile ( filename, std::ios::in ); 1268 1285 if ( !infile ) G4Exception(__FILE__, G4inttostring(__LINE__), FatalException, "Unable to open source data file" ); 1269 1270 floatbin, flux;1286 1287 G4double bin, flux; 1271 1288 NSourceBin = -1; 1272 1289 while (infile >> bin >> flux ) { … … 1277 1294 } 1278 1295 SetAnalogueMonteCarlo(0); 1296 infile.close(); 1297 1279 1298 #ifdef G4VERBOSE 1280 1299 if (GetVerboseLevel()>1) … … 1294 1313 std::ifstream infile ( filename, std::ios::in); 1295 1314 if ( !infile ) G4Exception(__FILE__, G4inttostring(__LINE__), FatalException, "Unable to open bias data file" ); 1296 1297 float bin, flux; 1315 1316 G4double bin, flux; 1317 G4int dWindows = 0; 1318 G4int i ; 1319 1320 theRadioactivityTables.clear(); 1321 // for (i = 0; i<100; i++) decayWindows[i] = -1; 1322 1298 1323 NDecayBin = -1; 1299 1324 while (infile >> bin >> flux ) { … … 1302 1327 DBin[NDecayBin] = bin * s; 1303 1328 DProfile[NDecayBin] = flux; 1329 if (flux > 0.) { 1330 decayWindows[NDecayBin] = dWindows; 1331 dWindows++; 1332 G4RadioactivityTable *rTable = new G4RadioactivityTable() ; 1333 theRadioactivityTables.push_back(rTable); 1334 } 1304 1335 } 1305 G4int i ;1306 1336 for ( i = 1; i<= NDecayBin; i++) DProfile[i] += DProfile[i-1]; 1307 1337 for ( i = 0; i<= NDecayBin; i++) DProfile[i] /= DProfile[NDecayBin]; 1338 // converted to accumulated probabilities 1339 // 1308 1340 SetAnalogueMonteCarlo(0); 1341 infile.close(); 1342 1309 1343 #ifdef G4VERBOSE 1310 1344 if (GetVerboseLevel()>1) … … 1315 1349 //////////////////////////////////////////////////////////////////////////////// 1316 1350 // 1317 //1318 1351 // DecayIt 1319 1352 // 1320 G4VParticleChange* G4RadioactiveDecay::DecayIt(const G4Track& theTrack, const G4Step& )1321 { 1322 // 1353 G4VParticleChange* 1354 G4RadioactiveDecay::DecayIt(const G4Track& theTrack, const G4Step&) 1355 { 1323 1356 // Initialize the G4ParticleChange object. Get the particle details and the 1324 1357 // decay table. 1325 // 1358 1326 1359 fParticleChangeForRadDecay.Initialize(theTrack); 1327 1360 const G4DynamicParticle* theParticle = theTrack.GetDynamicParticle(); … … 1329 1362 1330 1363 // First check whether RDM applies to the current logical volume 1331 // 1332 if(!std::binary_search(ValidVolumes.begin(), 1333 ValidVolumes.end(), 1334 theTrack.GetVolume()->GetLogicalVolume()->GetName())) 1335 { 1336 #ifdef G4VERBOSE 1337 if (GetVerboseLevel()>0) 1338 { 1339 G4cout <<"G4RadioactiveDecay::DecayIt : " 1340 << theTrack.GetVolume()->GetLogicalVolume()->GetName() 1341 << " is not selected for the RDM"<< G4endl; 1342 G4cout << " There are " << ValidVolumes.size() << " volumes" << G4endl; 1343 G4cout << " The Valid volumes are " << G4endl; 1344 for (size_t i = 0; i< ValidVolumes.size(); i++) 1345 G4cout << ValidVolumes[i] << G4endl; 1346 } 1347 #endif 1348 fParticleChangeForRadDecay.SetNumberOfSecondaries(0); 1349 // 1350 // 1351 // Kill the parent particle. 1352 // 1353 fParticleChangeForRadDecay.ProposeTrackStatus( fStopAndKill ) ; 1354 fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0); 1355 ClearNumberOfInteractionLengthLeft(); 1356 return &fParticleChangeForRadDecay; 1364 1365 if (!std::binary_search(ValidVolumes.begin(), ValidVolumes.end(), 1366 theTrack.GetVolume()->GetLogicalVolume()->GetName())) { 1367 #ifdef G4VERBOSE 1368 if (GetVerboseLevel()>0) { 1369 G4cout <<"G4RadioactiveDecay::DecayIt : " 1370 << theTrack.GetVolume()->GetLogicalVolume()->GetName() 1371 << " is not selected for the RDM"<< G4endl; 1372 G4cout << " There are " << ValidVolumes.size() << " volumes" << G4endl; 1373 G4cout << " The Valid volumes are " << G4endl; 1374 for (size_t i = 0; i< ValidVolumes.size(); i++) G4cout << ValidVolumes[i] << G4endl; 1357 1375 } 1358 1376 #endif 1377 fParticleChangeForRadDecay.SetNumberOfSecondaries(0); 1378 1379 // Kill the parent particle. 1380 1381 fParticleChangeForRadDecay.ProposeTrackStatus( fStopAndKill ) ; 1382 fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0); 1383 ClearNumberOfInteractionLengthLeft(); 1384 return &fParticleChangeForRadDecay; 1385 } 1386 1359 1387 // now check is the particle is valid for RDM 1360 // 1361 if (!(IsApplicable(*theParticleDef))) 1362 { 1363 // 1364 // The particle is not a Ion or outside the nucleuslimits for decay 1365 // 1366 #ifdef G4VERBOSE 1367 if (GetVerboseLevel()>0) 1368 { 1369 G4cerr <<"G4RadioactiveDecay::DecayIt : " 1370 <<theParticleDef->GetParticleName() 1371 << " is not a valid nucleus for the RDM"<< G4endl; 1372 } 1373 #endif 1374 fParticleChangeForRadDecay.SetNumberOfSecondaries(0); 1375 // 1376 // 1377 // Kill the parent particle. 1378 // 1379 fParticleChangeForRadDecay.ProposeTrackStatus( fStopAndKill ) ; 1380 fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0); 1381 ClearNumberOfInteractionLengthLeft(); 1382 return &fParticleChangeForRadDecay; 1388 1389 if (!(IsApplicable(*theParticleDef))) { 1390 // 1391 // The particle is not a Ion or outside the nucleuslimits for decay 1392 // 1393 #ifdef G4VERBOSE 1394 if (GetVerboseLevel()>0) { 1395 G4cerr <<"G4RadioactiveDecay::DecayIt : " 1396 <<theParticleDef->GetParticleName() 1397 << " is not a valid nucleus for the RDM"<< G4endl; 1383 1398 } 1384 1399 #endif 1400 fParticleChangeForRadDecay.SetNumberOfSecondaries(0); 1401 1402 // 1403 // Kill the parent particle. 1404 // 1405 fParticleChangeForRadDecay.ProposeTrackStatus( fStopAndKill ) ; 1406 fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0); 1407 ClearNumberOfInteractionLengthLeft(); 1408 return &fParticleChangeForRadDecay; 1409 } 1410 1385 1411 if (!IsLoaded(*theParticleDef)) 1386 1412 { … … 1388 1414 } 1389 1415 G4DecayTable *theDecayTable = theParticleDef->GetDecayTable(); 1390 1416 1391 1417 if (theDecayTable == 0 || theDecayTable->entries() == 0 ) 1392 1418 { … … 1423 1449 G4ThreeVector currentPosition; 1424 1450 currentPosition = theTrack.GetPosition(); 1425 1451 1426 1452 // check whether use Analogue or VR implementation 1427 1453 // … … 1454 1480 G4double ParentEnergy = theParticle->GetTotalEnergy(); 1455 1481 G4ThreeVector ParentDirection(theParticle->GetMomentumDirection()); 1456 1482 1457 1483 if (theTrack.GetTrackStatus() == fStopButAlive ) 1458 1484 { … … 1501 1527 (products->PopProducts(), finalGlobalTime, currentPosition); 1502 1528 secondary->SetGoodForTrackingFlag(); 1503 secondary->SetTouchableHandle(theTrack.GetTouchableHandle());1529 secondary->SetTouchableHandle(theTrack.GetTouchableHandle()); 1504 1530 fParticleChangeForRadDecay.AddSecondary(secondary); 1505 1531 } … … 1521 1547 if (!IsRateTableReady(*theParticleDef)) { 1522 1548 // if the decayrates are not ready, calculate them and 1523 // add to the rate table vector1549 // add to the rate table vector 1524 1550 AddDecayRateTable(*theParticleDef); 1525 1551 } … … 1538 1564 G4double taotime; 1539 1565 G4double decayRate; 1540 1566 1541 1567 size_t i; 1542 1568 size_t j; … … 1557 1583 for (G4int n = 0; n < NSplit; n++) 1558 1584 { 1559 /*1560 //1561 1585 // Get the decay time following the decay probability function 1562 1586 // suppllied by user 1563 //1587 1564 1588 G4double theDecayTime = GetDecayTime(); 1565 1566 1589 G4int nbin = GetDecayTimeBin(theDecayTime); 1567 1590 1568 // c laculate the first part of the weight function1591 // calculate the first part of the weight function 1569 1592 1570 G4double weight1 =1./DProfile[nbin-1] 1571 *(DBin[nbin]-DBin[nbin-1]) 1572 /NSplit; 1573 if (nbin > 1) { 1574 weight1 = 1./(DProfile[nbin]-DProfile[nbin-2]) 1575 *(DBin[nbin]-DBin[nbin-1]) 1576 /NSplit;} 1593 G4double weight1 = 1.; 1594 if (nbin == 1) { 1595 weight1 = 1./DProfile[nbin-1] 1596 *(DBin[nbin]-DBin[nbin-1])/NSplit; 1597 } else if (nbin > 1) { 1598 weight1 = 1./(DProfile[nbin]-DProfile[nbin-2]) 1599 *(DBin[nbin]-DBin[nbin-1])/NSplit; 1600 } 1601 1577 1602 // it should be calculated in seconds 1578 1603 weight1 /= s ; 1579 */ 1580 // 1604 1581 1605 // loop over all the possible secondaries of the nucleus 1582 1606 // the first one is itself. 1583 // 1584 for ( i = 0; i<theDecayRateVector.size(); i++){1607 1608 for (i = 0; i<theDecayRateVector.size(); i++){ 1585 1609 PZ = theDecayRateVector[i].GetZ(); 1586 1610 PA = theDecayRateVector[i].GetA(); … … 1589 1613 PR = theDecayRateVector[i].GetDecayRateC(); 1590 1614 1591 //1592 // Get the decay time following the decay probability function1593 // suppllied by user1594 //1595 G4double theDecayTime = GetDecayTime();1596 1597 G4int nbin = GetDecayTimeBin(theDecayTime);1598 1599 // claculate the first part of the weight function1600 1601 G4double weight1 =1./DProfile[nbin-1]1602 *(DBin[nbin]-DBin[nbin-1])1603 /NSplit;1604 if (nbin > 1) {1605 weight1 = 1./(DProfile[nbin]-DProfile[nbin-2])1606 *(DBin[nbin]-DBin[nbin-1])1607 /NSplit;}1608 // it should be calculated in seconds1609 weight1 /= s ;1610 1611 1615 // a temprary products buffer and its contents is transfered to 1612 1616 // the products at the end of the loop 1613 // 1617 1614 1618 G4DecayProducts *tempprods = 0; 1615 1619 1616 1620 // calculate the decay rate of the isotope 1617 // one need to fold the the source bias function with the decaytime 1618 // 1621 // decayRate is the radioactivity of isotope (PZ,PA,PE) at the 1622 // time 'theDecayTime' 1623 // it will be used to calculate the statistical weight of the 1624 // decay products of this isotope 1625 1626 // G4cout <<"PA= "<< PA << " PZ= " << PZ << " PE= "<< PE <<G4endl; 1619 1627 decayRate = 0.; 1620 1628 for ( j = 0; j < PT.size(); j++){ 1621 1629 taotime = GetTaoTime(theDecayTime,PT[j]); 1622 1630 decayRate -= PR[j] * taotime; 1631 // Eq.4.23 of of the TN 1632 // note the negative here is required as the rate in the eqation is defined to be negative, 1633 // i.e. decay away, but we need pasitive value here. 1634 1635 // G4cout << j << "\t"<< PT[j]/s <<"\t"<<PR[j]<< "\t" << decayRate << G4endl ; 1623 1636 } 1624 1625 // decayRatehe radioactivity of isotope (PZ,PA,PE) at the 1626 // time 'theDecayTime' 1627 // it will be used to calculate the statistical weight of the 1628 // decay products of this isotope 1629 1630 1631 // 1637 1632 1638 // now calculate the statistical weight 1633 // 1634 1635 G4double weight = weight1*decayRate; 1639 1640 // one need to fold the the source bias function with the decaytime 1641 // also need to include the track weight! (F.Lei, 28/10/10) 1642 G4double weight = weight1*decayRate*theTrack.GetWeight(); 1643 1644 // add the isotope to the radioactivity tables 1645 // G4cout <<theDecayTime/s <<"\t"<<nbin<<G4endl; 1646 //G4cout << theTrack.GetWeight() <<"\t"<<weight1<<"\t"<<decayRate<< G4endl; 1647 theRadioactivityTables[decayWindows[nbin-1]]->AddIsotope(PZ,PA,PE,weight); 1648 1636 1649 // decay the isotope 1637 1650 theIonTable = (G4IonTable *)(G4ParticleTable::GetParticleTable()->GetIonTable()); 1638 1651 parentNucleus = theIonTable->GetIon(PZ,PA,PE); 1639 1652 1640 1653 // decide whther to apply branching ratio bias or not 1641 1654 // … … 1644 1657 ndecaych = G4int(theDecayTable->entries()*G4UniformRand()); 1645 1658 G4VDecayChannel *theDecayChannel = theDecayTable->GetDecayChannel(ndecaych); 1646 if (theDecayChannel == 0) 1647 { 1648 // Decay channel not found. 1649 #ifdef G4VERBOSE 1650 if (GetVerboseLevel()>0) 1651 { 1652 G4cerr <<"G4RadioactiveDecay::DoIt : can not determine decay channel"; 1653 G4cerr <<G4endl; 1654 theDecayTable ->DumpInfo(); 1655 } 1656 #endif 1659 if (theDecayChannel == 0) { 1660 // Decay channel not found. 1661 #ifdef G4VERBOSE 1662 if (GetVerboseLevel()>0) { 1663 G4cerr <<"G4RadioactiveDecay::DoIt : can not determine decay channel"; 1664 G4cerr <<G4endl; 1665 theDecayTable ->DumpInfo(); 1657 1666 } 1658 else 1659 { 1660 // A decay channel has been identified, so execute the DecayIt. 1661 G4double tempmass = parentNucleus->GetPDGMass(); 1662 tempprods = theDecayChannel->DecayIt(tempmass); 1663 weight *= (theDecayChannel->GetBR())*(theDecayTable->entries()); 1664 } 1665 } 1666 else { 1667 #endif 1668 } else { 1669 // A decay channel has been identified, so execute the DecayIt. 1670 G4double tempmass = parentNucleus->GetPDGMass(); 1671 tempprods = theDecayChannel->DecayIt(tempmass); 1672 weight *= (theDecayChannel->GetBR())*(theDecayTable->entries()); 1673 } 1674 } else { 1667 1675 tempprods = DoDecay(*parentNucleus); 1668 1676 } 1669 // 1677 1670 1678 // save the secondaries for buffers 1671 // 1679 1672 1680 numberOfSecondaries = tempprods->entries(); 1673 1681 currentTime = finalGlobalTime + theDecayTime; 1674 for (index=0; index < numberOfSecondaries; index++) 1675 { 1676 asecondaryparticle = tempprods->PopProducts(); 1677 if (asecondaryparticle->GetDefinition()->GetBaryonNumber() < 5){ 1678 pw.push_back(weight); 1679 ptime.push_back(currentTime); 1680 secondaryparticles.push_back(asecondaryparticle); 1681 } 1682 for (index=0; index < numberOfSecondaries; index++) { 1683 asecondaryparticle = tempprods->PopProducts(); 1684 if (asecondaryparticle->GetDefinition()->GetBaryonNumber() < 5){ 1685 pw.push_back(weight); 1686 ptime.push_back(currentTime); 1687 secondaryparticles.push_back(asecondaryparticle); 1682 1688 } 1683 // 1689 } 1690 1684 1691 delete tempprods; 1685 1692 1686 1693 //end of i loop 1687 1694 } 1688 1695 1689 1696 // end of n loop 1690 } 1697 } 1698 1691 1699 // now deal with the secondaries in the two stl containers 1692 1700 // and submmit them back to the tracking manager … … 1699 1707 secondaryparticles[index], ptime[index], currentPosition); 1700 1708 secondary->SetGoodForTrackingFlag(); 1701 secondary->SetTouchableHandle(theTrack.GetTouchableHandle());1709 secondary->SetTouchableHandle(theTrack.GetTouchableHandle()); 1702 1710 secondary->SetWeight(pw[index]); 1703 fParticleChangeForRadDecay.AddSecondary(secondary);1711 fParticleChangeForRadDecay.AddSecondary(secondary); 1704 1712 } 1705 1713 // … … 1708 1716 //theTrack.SetTrackStatus(fStopButAlive); 1709 1717 //energyDeposit += theParticle->GetKineticEnergy(); 1710 1718 1711 1719 } 1712 1720 1713 1721 // 1714 1722 // Kill the parent particle. … … 1722 1730 // 1723 1731 ClearNumberOfInteractionLengthLeft(); 1724 1732 1725 1733 return &fParticleChangeForRadDecay ; 1726 1734 } 1727 1735 } 1728 1736 1729 //////////////////////////////////////////////////////////////////////////////// 1730 // 1737 /////////////////////////////////////////////////////////////////// 1731 1738 // 1732 1739 // DoDecay 1733 1740 // 1734 G4DecayProducts* G4RadioactiveDecay::DoDecay( G4ParticleDefinition& theParticleDef )1735 { 1736 G4DecayProducts *products = 0; 1737 //1738 // 1741 G4DecayProducts* 1742 G4RadioactiveDecay::DoDecay( G4ParticleDefinition& theParticleDef ) 1743 { 1744 G4DecayProducts* products = 0; 1745 1739 1746 // follow the decaytable and generate the secondaries... 1740 // 1741 // 1742 #ifdef G4VERBOSE 1743 if (GetVerboseLevel()>0) 1744 { 1745 G4cout<<"Begin of DoDecay..."<<G4endl; 1747 1748 #ifdef G4VERBOSE 1749 if (GetVerboseLevel()>0) G4cout<<"Begin of DoDecay..."<<G4endl; 1750 #endif 1751 1752 G4DecayTable* theDecayTable = theParticleDef.GetDecayTable(); 1753 1754 // Choose a decay channel. 1755 1756 #ifdef G4VERBOSE 1757 if (GetVerboseLevel()>0) G4cout <<"Selecte a channel..."<<G4endl; 1758 #endif 1759 1760 G4VDecayChannel* theDecayChannel = theDecayTable->SelectADecayChannel(); 1761 if (theDecayChannel == 0) { 1762 // Decay channel not found. 1763 1764 G4cerr <<"G4RadioactiveDecay::DoIt : can not determine decay channel"; 1765 G4cerr <<G4endl; 1766 theDecayTable ->DumpInfo(); 1767 } else { 1768 1769 // A decay channel has been identified, so execute the DecayIt. 1770 1771 #ifdef G4VERBOSE 1772 if (GetVerboseLevel()>1) { 1773 G4cerr <<"G4RadioactiveDecay::DoIt : selected decay channel addr:"; 1774 G4cerr <<theDecayChannel <<G4endl; 1746 1775 } 1747 1776 #endif 1748 G4DecayTable *theDecayTable = theParticleDef.GetDecayTable(); 1749 // 1750 // Choose a decay channel. 1751 // 1752 #ifdef G4VERBOSE 1753 if (GetVerboseLevel()>0) 1754 { 1755 G4cout <<"Selecte a channel..."<<G4endl; 1756 } 1757 #endif 1758 G4VDecayChannel *theDecayChannel = theDecayTable->SelectADecayChannel(); 1759 if (theDecayChannel == 0) 1760 { 1761 // Decay channel not found. 1762 // 1763 G4cerr <<"G4RadioactiveDecay::DoIt : can not determine decay channel"; 1764 G4cerr <<G4endl; 1765 theDecayTable ->DumpInfo(); 1766 } 1767 else 1768 { 1769 // 1770 // A decay channel has been identified, so execute the DecayIt. 1771 // 1772 #ifdef G4VERBOSE 1773 if (GetVerboseLevel()>1) 1774 { 1775 G4cerr <<"G4RadioactiveDecay::DoIt : selected decay channel addr:"; 1776 G4cerr <<theDecayChannel <<G4endl; 1777 } 1778 #endif 1779 1780 G4double tempmass = theParticleDef.GetPDGMass(); 1781 // 1782 1783 products = theDecayChannel->DecayIt(tempmass); 1784 1785 } 1777 1778 G4double tempmass = theParticleDef.GetPDGMass(); 1779 products = theDecayChannel->DecayIt(tempmass); 1780 } 1781 1786 1782 return products; 1787 1788 } 1789 1790 1791 1792 1793 1794 1795 1796 1797 1783 } -
trunk/source/processes/hadronic/models/radioactive_decay/src/G4RadioactiveDecaymessenger.cc
r1340 r1347 123 123 icmCmd->SetParameterName("applyICM",true); 124 124 icmCmd->SetDefaultValue(true); 125 icmCmd->AvailableForStates(G4State_PreInit);125 //icmCmd->AvailableForStates(G4State_PreInit); 126 126 // 127 127 // Command contols whether ARM will be applied or not … … 131 131 armCmd->SetParameterName("applyARM",true); 132 132 armCmd->SetDefaultValue(true); 133 armCmd->AvailableForStates(G4State_PreInit);133 //armCmd->AvailableForStates(G4State_PreInit); 134 134 // 135 135 // Command to set the h-l thresold for isomer production … … 140 140 // hlthCmd->SetRange("hlThreshold>0."); 141 141 hlthCmd->SetUnitCategory("Time"); 142 hlthCmd->AvailableForStates(G4State_PreInit);142 // hlthCmd->AvailableForStates(G4State_PreInit); 143 143 // 144 144 // Command to define the incident particle source time profile. … … 209 209 SetNucleusLimits(nucleuslimitsCmd->GetNewNucleusLimitsValue(newValues));} 210 210 else if (command==analoguemcCmd) { 211 G4int vl; 212 const char* t = newValues; 213 std::istringstream is(t); 214 is >> vl; 215 theRadioactiveDecayContainer->SetAnalogueMonteCarlo(vl!=0);} 211 theRadioactiveDecayContainer->SetAnalogueMonteCarlo(analoguemcCmd->GetNewBoolValue(newValues));} 216 212 else if (command==fbetaCmd) { 217 G4int vl; 218 const char* t = newValues; 219 std::istringstream is(t); 220 is >> vl; 221 theRadioactiveDecayContainer->SetFBeta(vl!=0);} 213 theRadioactiveDecayContainer->SetFBeta(fbetaCmd->GetNewBoolValue(newValues));} 222 214 else if (command==avolumeCmd) {theRadioactiveDecayContainer-> 223 215 SelectAVolume(newValues);} … … 229 221 DeselectAllVolumes();} 230 222 else if (command==brbiasCmd) { 231 G4int vl; 232 const char* t = newValues; 233 std::istringstream is(t); 234 is >> vl; 235 theRadioactiveDecayContainer->SetBRBias(vl!=0);} 223 theRadioactiveDecayContainer->SetBRBias(brbiasCmd->GetNewBoolValue(newValues));} 236 224 else if (command==sourcetimeprofileCmd) {theRadioactiveDecayContainer-> 237 225 SetSourceTimeProfile(newValues);} -
trunk/source/processes/hadronic/models/rpg/History
r1228 r1347 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 21 Nov 2010 - Dennis Wright (hadr-rpg-V09-03-00) 18 ------------------------------------------------ 19 G4RPGFragmentation.cc: initialize dndl in ctor as per CoVerity 16 20 17 21 20 Nov 2009 - Dennis Wright (hadr-rpg-V09-02-01) -
trunk/source/processes/hadronic/models/util/History
r1340 r1347 1 $Id: History,v 1.4 0 2010/09/28 17:03:26 vnivanchExp $1 $Id: History,v 1.45 2010/11/03 17:37:57 gunter Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 18 3 Nov 2010 Gunter Folger hadr-mod-util-V09-03-07 19 - G4Nuclear...Density: migrate to integer A&Z 20 21 3 Nov 2010 Gunter Folger hadr-mod-util-V09-03-06 22 - G4KineticTrack: fix coverity warnings of memory leak 23 24 02 Nov 2010 Vladimir Ivanchenko hadr-mod-util-V09-03-05 25 - G4Fragment - improved printout of negative excitation energy 26 - G4DecayStrongResonances - constructor and destructor moved to source, 27 fixed Coverity warning 17 28 18 29 27 Sep 2010 Vladimir Ivanchenko hadr-mod-util-V09-03-04 -
trunk/source/processes/hadronic/models/util/include/G4DecayStrongResonances.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DecayStrongResonances.hh,v 1.9 2010/11/02 17:57:38 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class file 32 // 33 // File name: G4DecayStrongResonances 34 // 35 // Modified: 36 // 02.11.2010 V.Ivanchenko moved constructor and destructor to source; 37 // removed unused variable 26 38 27 39 #ifndef G4DecayStrongResonances_h … … 36 48 { 37 49 public: 38 G4DecayStrongResonances(){}39 ~G4DecayStrongResonances(){}50 G4DecayStrongResonances(); 51 ~G4DecayStrongResonances(); 40 52 41 53 private: 42 54 G4int operator==(G4DecayStrongResonances& right) {return (this == &right);} 43 55 G4int operator!=(G4DecayStrongResonances& right) {return (this != &right);} 44 45 G4double theEnergy;46 56 47 57 public: -
trunk/source/processes/hadronic/models/util/include/G4NuclearFermiDensity.hh
r1228 r1347 40 40 41 41 public: 42 G4NuclearFermiDensity(G4 double anA, G4doubleaZ);42 G4NuclearFermiDensity(G4int anA, G4int aZ); 43 43 ~G4NuclearFermiDensity(); 44 44 -
trunk/source/processes/hadronic/models/util/include/G4NuclearShellModelDensity.hh
r819 r1347 40 40 41 41 public: 42 G4NuclearShellModelDensity(G4 double anA, G4doubleaZ);42 G4NuclearShellModelDensity(G4int anA, G4int aZ); 43 43 ~G4NuclearShellModelDensity(); 44 44 -
trunk/source/processes/hadronic/models/util/src/G4KineticTrack.cc
r1196 r1347 493 493 G4cout << "DECAY Actual Mass " << theActualMass << G4endl; 494 494 */ 495 G4ParticleDefinition* thisDefinition = this->GetDefinition(); 496 if(!thisDefinition) 497 { 498 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 499 G4cerr << " track has no particle definition associated."<<G4endl; 500 return 0; 501 } 502 G4DecayTable* theDecayTable = thisDefinition->GetDecayTable(); 503 if(!theDecayTable) 504 { 505 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 506 G4cerr << " particle definiton has no decay table associated."<<G4endl; 507 G4cerr << " particle was "<<thisDefinition->GetParticleName()<<G4endl; 508 return 0; 509 } 495 510 496 511 G4int chargeBalance = G4lrint(theDefinition->GetPDGCharge() ); … … 512 527 // cout << "DECAY Total Width " << theTotalActualWidth << G4endl; 513 528 G4double r = theTotalActualWidth * G4UniformRand(); 514 G4ParticleDefinition* thisDefinition = this->GetDefinition(); 515 if(!thisDefinition) 516 { 517 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 518 G4cerr << " track has no particle definition associated."<<G4endl; 519 return 0; 520 } 521 G4DecayTable* theDecayTable = thisDefinition->GetDecayTable(); 522 if(!theDecayTable) 523 { 524 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 525 G4cerr << " particle definiton has no decay table associated."<<G4endl; 526 G4cerr << " particle was "<<thisDefinition->GetParticleName()<<G4endl; 527 return 0; 528 } 529 G4VDecayChannel* theDecayChannel=NULL; 529 G4VDecayChannel* theDecayChannel(0); 530 530 for (index = nChannels - 1; index >= 0; index--) 531 531 { … … 538 538 } 539 539 } 540 540 541 delete [] theCumActualWidth; 542 541 543 if(!theDecayChannel) 542 544 { … … 669 671 } 670 672 delete theDecayProducts; 671 delete [] theCumActualWidth;672 673 if(getenv("DecayEnergyBalanceCheck")) 673 674 std::cout << "DEBUGGING energy balance in cms and lab, charge baryon balance : " -
trunk/source/processes/hadronic/models/util/src/G4NuclearFermiDensity.cc
r819 r1347 29 29 #include "G4NuclearFermiDensity.hh" 30 30 31 G4NuclearFermiDensity::G4NuclearFermiDensity(G4 double anA, G4doubleaZ)32 : a(0.545 * fermi)31 G4NuclearFermiDensity::G4NuclearFermiDensity(G4int anA, G4int aZ) 32 : theA(anA), theZ(aZ), a(0.545 * fermi) 33 33 { 34 34 // const G4double r0=1.14*fermi; 35 const G4double r0=1.16 * ( 1. - 1.16 * std::pow(anA, -2./3.)) * fermi; 36 theA = G4int(anA); 37 theZ = G4int(aZ); 35 const G4double r0=1.16 * ( 1. - 1.16 * std::pow(G4double(anA), -2./3.)) * fermi; 38 36 theR= r0 * std::pow(anA, 1./3. ); 39 37 Setrho0(3./ (4. * pi * std::pow(r0,3.) * theA * ( 1. + sqr(a/theR)*pi2 ))); -
trunk/source/processes/hadronic/models/util/src/G4NuclearShellModelDensity.cc
r819 r1347 29 29 #include "G4NuclearShellModelDensity.hh" 30 30 31 G4NuclearShellModelDensity::G4NuclearShellModelDensity(G4double anA, G4double aZ) 31 G4NuclearShellModelDensity::G4NuclearShellModelDensity(G4int anA, G4int aZ) 32 : theA(anA), theZ(aZ) 32 33 { 33 34 const G4double r0sq=0.8133*fermi*fermi; 34 theA = G4int(anA);35 theZ = G4int(aZ);36 35 theRsquare= r0sq * std::pow(G4double(theA), 2./3. ); 37 36 Setrho0(std::pow(1./(pi*theRsquare),3./2.));
Note:
See TracChangeset
for help on using the changeset viewer.
