Changeset 1055 for trunk/source/processes/hadronic/models
- Timestamp:
- May 28, 2009, 4:26:57 PM (17 years ago)
- Location:
- trunk/source/processes/hadronic/models
- Files:
-
- 243 edited
-
cascade/History (modified) (1 diff)
-
cascade/cascade/src/G4CascadSpecialFunctions.cc (modified) (1 diff)
-
chiral_inv_phase_space/body/History (modified) (1 diff)
-
chiral_inv_phase_space/body/include/G4QBesIKJY.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QCHIPSWorld.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QCandidate.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QCandidateVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QChipolino.hh (modified) (4 diffs)
-
chiral_inv_phase_space/body/include/G4QContent.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QDecayChan.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QDecayChanVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QEnvironment.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QException.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QFragmentation.hh (modified) (5 diffs)
-
chiral_inv_phase_space/body/include/G4QHadron.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QHadronBuilder.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QHadronVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QInteraction.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QInteractionVector.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QIsotope.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QNucleus.hh (modified) (1 diff)
-
chiral_inv_phase_space/body/include/G4QPDGCode.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QPDGCodeVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QPDGToG4Particle.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QParentCluster.hh (modified) (5 diffs)
-
chiral_inv_phase_space/body/include/G4QParentClusterVector.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QParticle.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QParticleVector.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QParton.hh (modified) (6 diffs)
-
chiral_inv_phase_space/body/include/G4QPartonPair.hh (modified) (5 diffs)
-
chiral_inv_phase_space/body/include/G4QPartonPairVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QPartonVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4QPomeron.hh (modified) (4 diffs)
-
chiral_inv_phase_space/body/include/G4QSplitter.hh (modified) (3 diffs)
-
chiral_inv_phase_space/body/include/G4QString.hh (modified) (4 diffs)
-
chiral_inv_phase_space/body/include/G4QStringVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/include/G4Quasmon.hh (modified) (4 diffs)
-
chiral_inv_phase_space/body/include/G4QuasmonString.hh (modified) (1 diff)
-
chiral_inv_phase_space/body/include/G4QuasmonVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/body/src/G4QBesIKJY.cc (modified) (25 diffs)
-
chiral_inv_phase_space/body/src/G4QCHIPSWorld.cc (modified) (3 diffs)
-
chiral_inv_phase_space/body/src/G4QCandidate.cc (modified) (1 diff)
-
chiral_inv_phase_space/body/src/G4QChipolino.cc (modified) (9 diffs)
-
chiral_inv_phase_space/body/src/G4QContent.cc (modified) (60 diffs)
-
chiral_inv_phase_space/body/src/G4QDecayChan.cc (modified) (2 diffs)
-
chiral_inv_phase_space/body/src/G4QEnvironment.cc (modified) (479 diffs)
-
chiral_inv_phase_space/body/src/G4QException.cc (modified) (1 diff)
-
chiral_inv_phase_space/body/src/G4QFragmentation.cc (modified) (21 diffs)
-
chiral_inv_phase_space/body/src/G4QHadron.cc (modified) (35 diffs)
-
chiral_inv_phase_space/body/src/G4QHadronBuilder.cc (modified) (7 diffs)
-
chiral_inv_phase_space/body/src/G4QInteraction.cc (modified) (2 diffs)
-
chiral_inv_phase_space/body/src/G4QIsotope.cc (modified) (53 diffs)
-
chiral_inv_phase_space/body/src/G4QNucleus.cc (modified) (265 diffs)
-
chiral_inv_phase_space/body/src/G4QPDGCode.cc (modified) (80 diffs)
-
chiral_inv_phase_space/body/src/G4QPDGToG4Particle.cc (modified) (14 diffs)
-
chiral_inv_phase_space/body/src/G4QParentCluster.cc (modified) (2 diffs)
-
chiral_inv_phase_space/body/src/G4QParticle.cc (modified) (41 diffs)
-
chiral_inv_phase_space/body/src/G4QParton.cc (modified) (4 diffs)
-
chiral_inv_phase_space/body/src/G4QPartonPair.cc (modified) (2 diffs)
-
chiral_inv_phase_space/body/src/G4QPomeron.cc (modified) (7 diffs)
-
chiral_inv_phase_space/body/src/G4QSplitter.cc (modified) (53 diffs)
-
chiral_inv_phase_space/body/src/G4QString.cc (modified) (25 diffs)
-
chiral_inv_phase_space/body/src/G4Quasmon.cc (modified) (266 diffs)
-
chiral_inv_phase_space/body/src/G4QuasmonString.cc (modified) (55 diffs)
-
chiral_inv_phase_space/interface/History (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4ChiralInvariantPhaseSpace.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4ElectroNuclearReaction.hh (modified) (11 diffs)
-
chiral_inv_phase_space/interface/include/G4GammaNuclearReaction.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4PionMinusNuclearAtRestChips.hh (modified) (5 diffs)
-
chiral_inv_phase_space/interface/include/G4PionMinusNuclearReaction.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4ProtonAntiProtonAtRestChips.hh (modified) (6 diffs)
-
chiral_inv_phase_space/interface/include/G4ProtonAntiProtonReaction.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4QANuANuNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QANuENuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QANuMuNuclearCrossSection.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4QAtomicElectronScattering.hh (modified) (4 diffs)
-
chiral_inv_phase_space/interface/include/G4QCaptureAtRest.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QCoherentChargeExchange.hh (modified) (6 diffs)
-
chiral_inv_phase_space/interface/include/G4QCollision.hh (modified) (7 diffs)
-
chiral_inv_phase_space/interface/include/G4QDiffraction.hh (modified) (6 diffs)
-
chiral_inv_phase_space/interface/include/G4QDiffractionRatio.hh (modified) (3 diffs)
-
chiral_inv_phase_space/interface/include/G4QDiscProcessMixer.hh (modified) (4 diffs)
-
chiral_inv_phase_space/interface/include/G4QDiscreteProcessVector.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QElastic.hh (modified) (6 diffs)
-
chiral_inv_phase_space/interface/include/G4QElasticCrossSection.hh (modified) (4 diffs)
-
chiral_inv_phase_space/interface/include/G4QElectronNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QGluonString.hh (modified) (5 diffs)
-
chiral_inv_phase_space/interface/include/G4QIonIonCrossSection.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4QIonIonElastic.hh (modified) (5 diffs)
-
chiral_inv_phase_space/interface/include/G4QLowEnergy.hh (modified) (6 diffs)
-
chiral_inv_phase_space/interface/include/G4QMuonNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QNeutronNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QNuENuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QNuMuNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QNuNuNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QPhotonNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QProtonNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QStringChipsParticleLevelInterface.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4QTauNuclearCrossSection.hh (modified) (2 diffs)
-
chiral_inv_phase_space/interface/include/G4QuasiFreeRatios.hh (modified) (4 diffs)
-
chiral_inv_phase_space/interface/include/G4StringChipsInterface.hh (modified) (1 diff)
-
chiral_inv_phase_space/interface/include/G4StringChipsParticleLevelInterface.hh (modified) (4 diffs)
-
chiral_inv_phase_space/interface/include/G4VQCrossSection.hh (modified) (3 diffs)
-
chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc (modified) (2 diffs)
-
chiral_inv_phase_space/interface/src/G4GammaNuclearReaction.cc (modified) (1 diff)
-
chiral_inv_phase_space/interface/src/G4QANuANuNuclearCrossSection.cc (modified) (17 diffs)
-
chiral_inv_phase_space/interface/src/G4QANuENuclearCrossSection.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QANuMuNuclearCrossSection.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QAtomicElectronScattering.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QCaptureAtRest.cc (modified) (45 diffs)
-
chiral_inv_phase_space/interface/src/G4QCoherentChargeExchange.cc (modified) (15 diffs)
-
chiral_inv_phase_space/interface/src/G4QCollision.cc (modified) (60 diffs)
-
chiral_inv_phase_space/interface/src/G4QDiffraction.cc (modified) (16 diffs)
-
chiral_inv_phase_space/interface/src/G4QDiffractionRatio.cc (modified) (50 diffs)
-
chiral_inv_phase_space/interface/src/G4QDiscProcessMixer.cc (modified) (4 diffs)
-
chiral_inv_phase_space/interface/src/G4QElastic.cc (modified) (13 diffs)
-
chiral_inv_phase_space/interface/src/G4QElasticCrossSection.cc (modified) (56 diffs)
-
chiral_inv_phase_space/interface/src/G4QElectronNuclearCrossSection.cc (modified) (25 diffs)
-
chiral_inv_phase_space/interface/src/G4QGluonString.cc (modified) (16 diffs)
-
chiral_inv_phase_space/interface/src/G4QIonIonCrossSection.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QIonIonElastic.cc (modified) (13 diffs)
-
chiral_inv_phase_space/interface/src/G4QLowEnergy.cc (modified) (17 diffs)
-
chiral_inv_phase_space/interface/src/G4QMuonNuclearCrossSection.cc (modified) (25 diffs)
-
chiral_inv_phase_space/interface/src/G4QNeutronNuclearCrossSection.cc (modified) (13 diffs)
-
chiral_inv_phase_space/interface/src/G4QNuENuclearCrossSection.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QNuMuNuclearCrossSection.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QNuNuNuclearCrossSection.cc (modified) (18 diffs)
-
chiral_inv_phase_space/interface/src/G4QPhotonNuclearCrossSection.cc (modified) (20 diffs)
-
chiral_inv_phase_space/interface/src/G4QProtonNuclearCrossSection.cc (modified) (15 diffs)
-
chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc (modified) (19 diffs)
-
chiral_inv_phase_space/interface/src/G4QTauNuclearCrossSection.cc (modified) (23 diffs)
-
chiral_inv_phase_space/interface/src/G4QuasiFreeRatios.cc (modified) (52 diffs)
-
chiral_inv_phase_space/interface/src/G4StringChipsInterface.cc (modified) (1 diff)
-
chiral_inv_phase_space/interface/src/G4StringChipsParticleLevelInterface.cc (modified) (31 diffs)
-
chiral_inv_phase_space/interface/src/G4VQCrossSection.cc (modified) (4 diffs)
-
coherent_elastic/History (modified) (1 diff)
-
coherent_elastic/include/G4DiffuseElastic.hh (modified) (5 diffs)
-
coherent_elastic/src/G4ChargeExchange.cc (modified) (2 diffs)
-
coherent_elastic/src/G4DiffuseElastic.cc (modified) (24 diffs)
-
de_excitation/History (modified) (1 diff)
-
de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc (modified) (4 diffs)
-
de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc (modified) (3 diffs)
-
de_excitation/evaporation/src/G4EvaporationProbability.cc (modified) (3 diffs)
-
de_excitation/evaporation/src/G4He3EvaporationProbability.cc (modified) (4 diffs)
-
de_excitation/evaporation/src/G4TritonEvaporationProbability.cc (modified) (4 diffs)
-
de_excitation/fission/src/G4CompetitiveFission.cc (modified) (8 diffs)
-
de_excitation/fission/src/G4FissionProbability.cc (modified) (2 diffs)
-
de_excitation/gem_evaporation/src/G4GEMChannel.cc (modified) (4 diffs)
-
de_excitation/gem_evaporation/src/G4GEMProbability.cc (modified) (1 diff)
-
de_excitation/util/include/G4CameronGilbertPairingCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4CameronGilbertShellCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4CameronShellPlusPairingCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4CameronTruranHilfPairingCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4CameronTruranHilfShellCorrections.hh (modified) (2 diffs)
-
de_excitation/util/include/G4ConstantLevelDensityParameter.hh (modified) (2 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) (2 diffs)
-
de_excitation/util/include/G4DeuteronCoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4EvaporationLevelDensityParameter.hh (modified) (2 diffs)
-
de_excitation/util/include/G4He3CoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4NeutronCoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4PairingCorrection.hh (modified) (2 diffs)
-
de_excitation/util/include/G4ProtonCoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4ShellCorrection.hh (modified) (2 diffs)
-
de_excitation/util/include/G4TritonCoulombBarrier.hh (modified) (3 diffs)
-
de_excitation/util/include/G4VCoulombBarrier.hh (modified) (2 diffs)
-
de_excitation/util/include/G4VEmissionProbability.hh (modified) (2 diffs)
-
de_excitation/util/include/G4VLevelDensityParameter.hh (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/G4EvaporationLevelDensityParameter.cc (modified) (2 diffs)
-
de_excitation/util/src/G4PairingCorrection.cc (modified) (2 diffs)
-
de_excitation/util/src/G4ShellCorrection.cc (modified) (2 diffs)
-
de_excitation/util/src/G4VCoulombBarrier.cc (modified) (3 diffs)
-
de_excitation/util/src/G4VEmissionProbability.cc (modified) (2 diffs)
-
de_excitation/util/src/G4VLevelDensityParameter.cc (modified) (3 diffs)
-
management/History (modified) (1 diff)
-
management/include/G4HadronicInteraction.hh (modified) (3 diffs)
-
management/include/G4HadronicInteractionRegistry.hh (modified) (2 diffs)
-
management/include/G4InelasticInteraction.hh (modified) (3 diffs)
-
management/src/G4HadronicInteraction.cc (modified) (4 diffs)
-
management/src/G4HadronicInteractionRegistry.cc (modified) (3 diffs)
-
management/src/G4InelasticInteraction.cc (modified) (7 diffs)
-
neutron_hp/History (modified) (1 diff)
-
neutron_hp/src/G4NeutronHPInelasticCompFS.cc (modified) (4 diffs)
-
neutron_hp/src/G4NeutronHPPhotonDist.cc (modified) (9 diffs)
-
parton_string/hadronization/History (modified) (2 diffs)
-
parton_string/hadronization/include/G4HadronBuilder.hh (modified) (1 diff)
-
parton_string/hadronization/include/G4VLongitudinalStringDecay.hh (modified) (2 diffs)
-
parton_string/hadronization/src/G4ExcitedStringDecay.cc (modified) (2 diffs)
-
parton_string/hadronization/src/G4HadronBuilder.cc (modified) (2 diffs)
-
parton_string/hadronization/src/G4LundStringFragmentation.cc (modified) (3 diffs)
-
parton_string/hadronization/src/G4VLongitudinalStringDecay.cc (modified) (2 diffs)
-
parton_string/qgsm/History (modified) (2 diffs)
-
parton_string/qgsm/include/G4QGSParticipants.hh (modified) (1 diff)
-
parton_string/qgsm/src/G4GammaParticipants.cc (modified) (1 diff)
-
parton_string/qgsm/src/G4QGSParticipants.cc (modified) (3 diffs)
-
parton_string/qgsm/src/G4SPBaryon.cc (modified) (1 diff)
-
photolepton_hadron/muon_nuclear/History (modified) (3 diffs)
-
photolepton_hadron/muon_nuclear/include/G4MuNuclearInteraction.icc (modified) (1 diff)
-
photolepton_hadron/muon_nuclear/src/G4MuNuclearInteraction.cc (modified) (3 diffs)
-
pre_equilibrium/History (modified) (1 diff)
-
pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc (modified) (2 diffs)
-
pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh (modified) (2 diffs)
-
pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc (modified) (1 diff)
-
pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh (modified) (2 diffs)
-
pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc (modified) (1 diff)
-
pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc (modified) (8 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc (modified) (7 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc (modified) (3 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc (modified) (1 diff)
-
pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc (modified) (1 diff)
-
pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc (modified) (6 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc (modified) (5 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc (modified) (6 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc (modified) (6 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc (modified) (7 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc (modified) (4 diffs)
-
pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc (modified) (5 diffs)
-
pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc (modified) (1 diff)
-
qmd/GNUmakefile (modified) (2 diffs)
-
qmd/History (modified) (1 diff)
-
qmd/include/G4QMDReaction.hh (modified) (4 diffs)
-
qmd/src/G4QMDCollision.cc (modified) (5 diffs)
-
qmd/src/G4QMDReaction.cc (modified) (5 diffs)
-
rpg/History (modified) (1 diff)
-
rpg/include/G4RPGInelastic.hh (modified) (3 diffs)
-
rpg/include/G4RPGNucleonInelastic.hh (modified) (2 diffs)
-
rpg/include/G4RPGPionInelastic.hh (modified) (2 diffs)
-
rpg/src/G4RPGInelastic.cc (modified) (3 diffs)
-
rpg/src/G4RPGNucleonInelastic.cc (modified) (2 diffs)
-
rpg/src/G4RPGPionInelastic.cc (modified) (2 diffs)
-
theo_high_energy/History (modified) (1 diff)
-
theo_high_energy/src/G4QuasiElasticChannel.cc (modified) (4 diffs)
-
theo_high_energy/src/G4TheoFSGenerator.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/cascade/History
r1007 r1055 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 15 Apr 2009 Dennis Wright (hadr-casc-V09-02-02) 18 ----------------------------------------------- 19 - previous tag no longer used. Bring hadr-casc-V09-02-00 back to 20 HEAD and re-tag 21 22 21 Feb 2009 Dennis Wright (hadr-casc-V09-02-01) 23 ----------------------------------------------- 24 - add printCrossSection method to G4CascadSpecialFunctions 25 - in GeElementaryParticleCollider, add high energy flag to distinguish 26 "string-like" behavior 27 - G4IntraNucleiCascader.cc - allow secondaries from HE interaction to 28 leave nucleus without interacting 29 - G4NucleiModel - get high_energy_interaction flag value from G4ElementaryParticleCollider 30 31 11 Feb 2009 V.Ivanchenko (hadr-casc-V09-02-00) 32 ----------------------------------------------- 33 - set absorption coefficient 1.0 instead of 0.2 inside 34 G4CascadSpecialFunctions (D.Wright) 16 35 17 36 25 Nov 2008 Dennis Wright (hadr-casc-V09-01-10) -
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadSpecialFunctions.cc
r1007 r1055 113 113 } 114 114 115 const G4double corr_fac = 0.2; 115 // was 0.2 since the beginning 116 const G4double corr_fac = 1.0; 116 117 G4double csec = 0.0; 117 118 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/History
r962 r1055 4 4 ========================================================== 5 5 6 History file for hadronic/models/chiral_inv_phase_space/interface 6 History file for hadronic/models/chiral_inv_phase_space/body directory. 7 7 8 This file should be used to summarize modifications introduced in the 9 code and to keep track of all tags. 8 Summarize all code modifications & keep track of all tags in this file. 10 9 11 --------------------------------------------------------------- 12 * Please list in reverse chronological order (last date on top) 13 --------------------------------------------------------------- 10 **************************************************************************** 11 *** Geant4 developers can not make changes in this directory or make the *** 12 *** History records without permision of M.Kosov: Mikhail.Kossov@cern.ch *** 13 **************************************************************************** 14 14 15 31-Mar-2008 Dennis Wright (hadr-chips-body-V09-01-04) 16 ------------------------------------------------------------------- 17 - add more parentheses around && within || to satisfy gcc-4.3 compiler 18 files affected: 19 G4QChipolino.cc 20 G4QEnvironment.cc 21 G4QNucleus.cc 22 G4Quasmon.cc 15 ----------------------------------------------------------------- 16 * Please list in reverse chronological order (last date on top) * 17 ----------------------------------------------------------------- 23 18 24 19-Mar-2008 Dennis Wright (hadr-chips-body-V09-01-03)25 -------------------------------------------------------------------26 - add parentheses around && within || to satisfy gcc-4.3 compiler27 files affected:28 G4QChipolino.cc29 G4QContent.cc30 G4QEnvironment.cc31 G4QNucleus.cc32 G4QPDGCode.cc33 G4Quasmon.cc34 19 35 - add braces and ; for empty while blocks to satisfy gcc-4.3 36 files affected: 37 G4QHadron.cc 20 26-May-2009 M.Kosov (hadr-chips-body-V09-02-06) 21 ---------------------------------------------------------------------------- 22 Safety check of nDelta in the hadronization probability calculations (G4Quasmon) 23 to avoid /zero 38 24 39 18-Mar-2008 Vladimir Ivanchenko (hadr-chips-body-V09-01-02) 40 - G4QNucleus - fixed compillation warnings at Windows for constructors 25 26-May-2009 M.Kosov (hadr-chips-body-V09-02-05) 26 ---------------------------------------------------------------------------- 27 In low energy nHe and pHe reactions, when only elastic scattering is possible, 28 the inelastic application makes a complain, while it is making the elastic 29 scattering (with very low cross-section). *** The complain is closed *** 30 31 15-May-2009 M.Kosov (hadr-chips-body-V09-02-04) 32 ---------------------------------------------------------------------------- 33 For rare cases of the output hadron mass below the GS mass instead of Exception 34 in the G4QEnvironment class a fill As Is for the hadron is used with appropriate 35 warning. If this case can be reproduced, it should be debugged in future. 36 37 29-Apr-2009 M.Kosov (hadr-chips-body-V09-02-03) 38 ---------------------------------------------------------------------------- 39 The rare situation was Found by Alberto. It is improved in G4QEnvironment. 40 When the Hypernucleus can not decay in the residual nucleus and pion, then 41 now it is decayed in the residual nucleus and gamma. -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QBesIKJY.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QBesIKJY.hh,v 1. 2 2006/06/29 20:05:55 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QBesIKJY.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QBesIKJY ---------------- … … 32 32 // class header for Bessel I0/I1 and K0/K1 functions in CHIPS Model 33 33 // -------------------------------------------------------------------- 34 34 // Short description: CHIPS bessel functions for mass and scattering 35 // integrals. 36 // -------------------------------------------------------------------- 35 37 #ifndef G4QBesIKJY_h 36 38 #define G4QBesIKJY_h 1 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCHIPSWorld.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QCHIPSWorld.hh,v 1.2 5 2006/06/29 20:05:57 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QCHIPSWorld.hh,v 1.26 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCHIPSWorld ---------------- … … 32 32 // class header for CHIPS World of particles in CHIPS Model 33 33 // ------------------------------------------------------------ 34 // Short description: The CHIPS World is a world of elementary particles 35 // and nuclear fragments. This class is a singletone, but without fixed 36 // limits. E.g. the nuclear fragments as possible G4Candidates can be 37 // initialized in the CHIPS World only up to Be8 od C12 or other bigger 38 // nuclear fragment. If one need the heavy fragment production then the 39 // the CHIPS World must be initialized up to these fragments (see the 40 // CHIPS Manual), but the price in performans will be big, because in 41 // each act of the fragmentation competition these numerous candidates 42 // take place in the competition and the hadronization probability is 43 // calculated each time for each of them, so the Be8 limit (Be8->alpha+ 44 // alpha decays very fast and contribute to the alpha-spectrum) is the 45 // most optimal. 46 // ------------------------------------------------------------------- 34 47 35 48 #ifndef G4QCHIPSWorld_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidate.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QCandidate.hh,v 1.2 8 2006/06/29 20:05:59 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QCandidate.hh,v 1.29 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidate ---------------- … … 32 32 // class header for Quasmon initiated Candidates used by the CHIPS Model 33 33 // ---------------------------------------------------------------------- 34 // Short description: A candidate for hadronization. The candidates 35 // (hadrons or nuclear fragments) are competative, each quark of a 36 // Quasmon select which candidate to use for hadronization 37 // ------------------------------------------------------------------ 34 38 35 39 #ifndef G4QCandidate_h … … 81 85 void SetNBMass(G4double newMass); // Set mass bounded to Total Nucleus 82 86 83 // Body 87 // Body 84 88 private: 85 89 G4bool possible; // permission/forbiding preFlag to be a hadron/fragment -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCandidateVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QCandidateVector.hh,v 1.2 1 2006/06/29 20:06:01 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QCandidateVector.hh,v 1.22 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for Quasmon initiated Candidates used by CHIPS model 33 33 // ----------------------------------------------------------------- 34 // Short description: A candidate for hadronization. The candidates 35 // (hadrons or nuclear fragments) are competative, each quark of a 36 // Quasmon select which candidate to use for hadronization 37 // ------------------------------------------------------------------ 34 38 35 39 #ifndef G4QCandidateVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QChipolino.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QChipolino.hh,v 1.2 3 2006/06/29 20:06:03 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QChipolino.hh,v 1.24 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QChipolino ---------------- … … 32 32 // class header for Chipolino (Double Hadron) in CHIPS Model 33 33 // ---------------------------------------------------------- 34 // Short description: In the CHIPS model not only hadrons are considered, 35 // but the di-hadrons, which can not be convereged to the quark content 36 // of only one hadron (e.g. pi+pi+, K+p, Delta++p etc). This kind of 37 // hadronic states, which can be easily decayed in two hadrons, is called 38 // Chipolino-particle in the model. 39 // ---------------------------------------------------------------------- 34 40 35 41 #ifndef G4QChipolino_h … … 56 62 57 63 // Selectors 58 G4double GetMass(); // Get mass of the Chipolino(MinDoubleHadronMass)64 G4double GetMass(); // Get ChipolinoMass (MinDoubleHadronMass) 59 65 G4double GetMass2(); // Get mass^2 of the Chipolino 60 66 G4QPDGCode GetQPDG1(); // Get 1-st QPDG of the Chipolino … … 66 72 // Modifiers 67 73 void SetHadronQPDG(const G4QPDGCode& QPDG); // Set QPDG of 1-st Hadron of the Chipolino 68 void SetHadronPDGCode(const G4int& PDGCode);// Set PDGCode of 1 -st Hadron of the Chipolino69 void SetHadronQCont(const G4QContent& QC); // Set QContent of 1 -st Hadron of theChipolino74 void SetHadronPDGCode(const G4int& PDGCode);// Set PDGCode of 1st Hadron of the Chipolino 75 void SetHadronQCont(const G4QContent& QC); // Set QContent of 1st Hadron of theChipolino 70 76 71 77 private: 72 78 G4QPDGCode theQPDG1; // QPDG of the 1-st Hadron of the Chipolino 73 79 G4QPDGCode theQPDG2; // QPDG of the 2-nd Hadron of the Chipolino 74 G4QContent theQCont; // Quark Content of the whole Chipolino75 G4QContent theQCont1; // Quark Content of the 1-st Hadron of Chipolino80 G4QContent theQCont; // QuarkContent of the whole Chipolino 81 G4QContent theQCont1; // QuarkCont. of the 1st Hadron of Chipolino 76 82 G4double minM; // Minimal Mass of Chipolino 77 83 }; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QContent.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QContent.hh,v 1.2 8 2006/06/29 20:06:05 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QContent.hh,v 1.29 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QContent ---------------- … … 32 32 // class header for Quasmon initiated Contents used by the CHIPS Model 33 33 // ---------------------------------------------------------------------- 34 // Short description: This is the basic class of the CHIPS model. It 35 // describes the quark content of the Quasmon, which is a generalized 36 // hadronic state. All Quasmons are bags, characterized by the quark 37 // Content (QContent), but the spin is not fixed and only light (u,d,s) 38 // quarks are considered (SU(3)). The hadrons are the ground states for 39 // the corresponding quasmons. The Chipolino (G4QChipolino) or nuclear 40 // cluster are examples for another Quark Content. 41 // -------------------------------------------------------------------- 42 // @@ In future total spin & c,b,t of the Hadron can be added @@ M.K.@@ 43 // -------------------------------------------------------------------- 34 44 35 45 #ifndef G4QContent_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChan.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QDecayChan.hh,v 1.2 3 2006/06/29 20:06:07 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QDecayChan.hh,v 1.24 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QDecayChan ---------------- … … 32 32 // class header for Decay Channel definition in CHIPS Model 33 33 // ------------------------------------------------------------ 34 // Short description: In the CHIPS World the particles (G4QParticle) 35 // are defined. For unstable particles there is a G4QDecayChannelVector 36 // which describes different channels of decay for the particular 37 // particle. So the G4QDecayChannel class is the class for the description 38 // of such a decay channel in two or three particles (the secondaries can 39 // be unstable too and have firther decay). 40 // ------------------------------------------------------------------- 34 41 35 42 #ifndef G4QDecayChan_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QDecayChanVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QDecayChanVector.hh,v 1. 19 2006/06/29 20:06:09 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QDecayChanVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for Decay Channel Vector in CHIPS model 33 33 // -------------------------------------------------------------- 34 // Short description: In the CHIPS World the particles (G4QParticle) 35 // are defined. For unstable particles there is a G4QDecayChannelVector 36 // which describes different channels of decay for the particular 37 // particle. So the G4QDecayChannel class is the class for the description 38 // of such a decay channel in two or three particles (the secondaries can 39 // be unstable too and have firther decay). 40 // ------------------------------------------------------------------- 34 41 35 42 #ifndef G4QDecayChanVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QEnvironment.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QEnvironment.hh,v 1.3 2 2007/10/07 13:31:41mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QEnvironment.hh,v 1.33 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QEnvironment ---------------- … … 32 32 // header for Multy Quasmon Environment in the CHIPS Model 33 33 // ------------------------------------------------------------ 34 // Short description: The G4QEnvironment class corresponds to the nuclear 35 // environment, containing excited nucleons or nuclear clusters 36 // (G4Quasmons). In the constructer the nucleus (G4QNucleus) is clusterized 37 // and then the projectile hadron (or hadrons) can create one (or a few) 38 // Quasmons, which are fragmented by the Fragment member function. As a 39 // result a vector of G4QHadrons is created, which can include the residual 40 // nucleus in the ground state. 41 //--------------------------------------------------------------------- 34 42 35 43 #ifndef G4QEnvironment_h … … 82 90 void EvaporateResidual(G4QHadron* h);// Final Evaporation of a nucl. fragment 83 91 void DecayBaryon(G4QHadron* dB); // Decay baryon (gamma+N or Delta->N+Pi) 92 void DecayAntistrange(G4QHadron* aS);// Decay Antistrange nucleus 84 93 G4bool CheckGroundState(G4Quasmon* quasm,G4bool corFlag=false);//as G4Q for QHV 85 94 G4bool DecayInEnvQ(G4Quasmon* quasm); // Use befor evaporation in PANIC case -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QException.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QException.hh,v 1.1 0 2006/06/29 20:06:13 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QException.hh,v 1.11 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QException ---------------- … … 32 32 // header of the class for an Exception used by the CHIPS Model 33 33 // --------------------------------------------------------------- 34 // Short description: Just an internal CHIPS Exception Messenger 35 // ------------------------------------------------------------- 34 36 35 37 #ifndef G4QException_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QFragmentation.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QFragmentation.hh,v 1. 2 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QFragmentation.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 38 38 // G4QGSModels 39 39 // G4ExcitedStringDecay 40 // ----------------------------------------------------------------------------- 41 // Short description: CHIPS string fragmentation class 40 42 // ----------------------------------------------------------------------------- 41 43 // … … 70 72 void Init(G4double theZ, G4double theA) 71 73 { 72 if(!theNucleus) theNucleus = new G4QNucleus(G4int(theZ),G4int(theA-theZ+.0001));73 theNucleus->InitByPDG(90000000+G4int(theZ)*1000+G4int(theA-theZ+.0001));74 if(!theNucleus) theNucleus = new G4QNucleus(G4int(theZ),G4int(theA-theZ+.0001)); 75 theNucleus->InitByPDG(90000000+G4int(theZ)*1000+G4int(theA-theZ+.0001)); 74 76 } 75 77 … … 116 118 static G4double theNucleonRadius; 117 119 // Parameters of diffractional fragmentation 118 static G4double widthOfPtSquare;// width^2 of pt for string excitation119 static G4double minExtraMass;// minimum excitation mass120 static G4double minmass;// mean pion transverse mass; used for Xmin120 static G4double widthOfPtSquare; // width^2 of pt for string excitation 121 static G4double minExtraMass; // minimum excitation mass 122 static G4double minmass; // mean pion transverse mass; used for Xmin 121 123 122 // Body124 // Body 123 125 G4QInteractionVector theInteractions; 124 126 G4QHadronVector theTargets; … … 134 136 135 137 #endif 136 137 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadron.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QHadron.hh,v 1.3 6 2008/01/09 09:37:24 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QHadron.hh,v 1.37 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QHadron ---------------- … … 32 32 // class header for Hadrons generated by the CHIPS Model 33 33 // ------------------------------------------------------ 34 // Short description: In CHIPS all particles are G4QHadrons, while they 35 // can be leptons, gammas or nuclei. The G4QPDGCode makes the difference. 36 // In addition the 4-momentum is a basic value, so the mass can be 37 // different from the GS mass (e.g. for the virtual gamma). 38 // ------------------------------------------------------------------- 34 39 35 40 #ifndef G4QHadron_h … … 205 210 } 206 211 #endif 207 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronBuilder.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QHadronBuilder.hh,v 1. 2 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QHadronBuilder.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 36 36 // For comparison mirror member functions are taken from G4 class: 37 37 // G4HadronBuilder 38 // ----------------------------------------------------------------------------- 39 // Short description: A CHIPS class for the builder of the G4QHadron, which is a 40 // resulting object for the string fragmentation. the G4QHadron has specific 41 // parameters, which are not included in the G4QParticle from the CHIPS World, 42 // but necessary for the string fragmentation. When the G4QHadron is created 43 // (builded), it is converted to the CHIPS particle. 38 44 // ----------------------------------------------------------------------------- 39 45 // … … 58 64 G4QHadron* Meson(G4QParton* black, G4QParton* white, Spin spin); 59 65 G4QHadron* Baryon(G4QParton* black,G4QParton* white, Spin spin); 60 // Body66 // Body 61 67 G4double mesonSpinMix; 62 68 G4double baryonSpinMix; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QHadronVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QHadronVector.hh,v 1.2 2 2006/11/16 11:36:09mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QHadronVector.hh,v 1.23 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for a Vector of Hadrons - output of CHIPS model 33 33 // --------------------------------------------------------------- 34 // Short description: In CHIPS all particles are G4QHadrons, while they 35 // can be leptons, gammas or nuclei. The G4QPDGCode makes the difference. 36 // In addition the 4-momentum is a basic value, so the mass can be 37 // different from the GS mass (e.g. for the virtual gamma). This class 38 // is made for the output list of hadrons. 39 // ------------------------------------------------------------------- 34 40 35 41 #ifndef G4QHadronVector_h 36 42 #define G4QHadronVector_h 1 37 43 // 38 // $Id: G4QHadronVector.hh,v 1.2 2 2006/11/16 11:36:09mkossov Exp $39 // GEANT4 tag $Name: geant4-09-0 2$44 // $Id: G4QHadronVector.hh,v 1.23 2009/02/23 09:49:24 mkossov Exp $ 45 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 40 46 // 41 47 // ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteraction.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QInteraction.hh,v 1. 2 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QInteraction.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 … … 41 41 // G4InteractionContent 42 42 // ------------------------------------------------------------------- 43 // Short description: Classify the interaction in soft/hard/diffractive 44 // parts for firther treatment by the QGS algorithm. 45 // --------------------------------------------------------------------- 43 46 44 47 #include "globals.hh" -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QInteractionVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QInteractionVector.hh,v 1. 1 2006/10/30 10:40:34 mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QInteractionVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 37 37 38 38 // 39 // $Id: G4QInteractionVector.hh,v 1. 1 2006/10/30 10:40:34 mkossov Exp $40 // GEANT4 tag $Name: geant4-09-0 2$39 // $Id: G4QInteractionVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 40 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 41 41 // 42 42 // ------------------------------------------------------------------ … … 47 47 // class for a storing colliding particles in PartonString Models 48 48 // ------------------------------------------------------------------- 49 // Short description: Classify the interaction in soft/hard/diffractive 50 // parts for firther treatment by the QGS algorithm. 51 // --------------------------------------------------------------------- 49 52 50 53 #include "G4QInteraction.hh" -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QIsotope.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QIsotope.hh,v 1. 5 2006/06/29 20:06:19 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QIsotope.hh,v 1.6 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // Header of the G4QIsotope class of the CHIPS Simulation Branch in GEANT4 34 34 // ---------------------------------------------------------------------------- 35 // It contains information about natural abundances of stable and long living36 // isotopes and a NEW "Element" can be initialised for any isotope set.37 // Randomization of isotopes of the Natural Elements is hardwired and fast38 // Randomization of isotopes of the user defined Elements is a bit slower35 // Short descriptionIt contains information about natural abundances of stable 36 // and long living isotopes and a NEW "Element" can be initialised for any 37 // isotope set. Randomization of isotopes of the Natural Elements is hardwired and 38 // fast randomization of isotopes of the user defined Elements is a bit slower 39 39 // CrossSectionWeighted randomisation of isotopes is slow (same for Nat and New) 40 40 // ------------------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QNucleus.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNucleus.hh,v 1.3 3 2007/10/31 13:23:07mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNucleus.hh,v 1.34 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QNucleus ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 // class header for Quasmon initiated Candidates used by the CHIPS Model 33 // ---------------------------------------------------------------------- 32 // class header for the nuclei and nuclear environment of the CHIPS Model 33 // ----------------------------------------------------------------------- 34 // Short description: a class describing properties of nuclei, which 35 // are necessary for the CHIPS Model. 36 // ----------------------------------------------------------------------- 34 37 35 38 #ifndef G4QNucleus_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCode.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QPDGCode.hh,v 1.2 6 2006/06/29 20:06:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QPDGCode.hh,v 1.27 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QPDGCode ---------------- … … 32 32 // class header for Hadron definition in CHIPS Model 33 33 // ------------------------------------------------------------ 34 // Short description: The PDG Code is made on the basis of the Quark 35 // Content (G4QuarkContent) of the hadronic state (including nuclear 36 // fragments). The PDG code of the ground state (e.g. pi, N, etc.) is 37 // calculated. It includes a complicated algortithm of the G.S. mass 38 // calculation for nuclear fragments (now it is synchronised with the 39 // G4 nuclear massess). 40 // ------------------------------------------------------------------- 34 41 35 42 #ifndef G4QPDGCode_h … … 265 272 266 273 #endif 267 268 269 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGCodeVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QPDGCodeVector.hh,v 1. 19 2006/06/29 20:06:25 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QPDGCodeVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for Hadron definition in CHIPS model 33 33 // --------------------------------------------------------------- 34 // Short description: The PDG Code is made on the basis of the Quark 35 // Content (G4QuarkContent) of the hadronic state (including nuclear 36 // fragments). The PDG code of the ground state (e.g. pi, N, etc.) is 37 // calculated. It includes a complicated algortithm of the G.S. mass 38 // calculation for nuclear fragments (now it is synchronised with the 39 // G4 nuclear massess). 40 // ------------------------------------------------------------------- 34 41 35 42 #ifndef G4QPDGCodeVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPDGToG4Particle.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QPDGToG4Particle.hh,v 1. 4 2006/06/29 20:06:27 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QPDGToG4Particle.hh,v 1.5 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QPDGToG4Particle header ---------------- … … 35 35 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 36 36 // **************************************************************************************** 37 // Short description: This is a helper class, which converts the PDG-defined 38 // G4QHadrons of the CHIPS model to the G4 particles, defined by the singetones. 39 // ----------------------------------------------------------------------------- 37 40 38 41 #ifndef G4QPDGToG4Particle_hh -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentCluster.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParentCluster.hh,v 1.2 3 2006/06/29 20:06:29 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParentCluster.hh,v 1.24 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QParentCluster ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class header for a Parent nuclear cluster in the CHIPS Model 33 // ------------------------------------------------------------- 33 // ------------------------------------------------------------------- 34 // Short description: The parent cluster is the cluster, which can be 35 // used for the nuclear fragment production. Different clusters csn be 36 // used as the parent cluser for the particular G4QCandidate (nuclear 37 // fragment), e.g. t and He3 for the t-fragment production. So the 38 // G4QParentClusterVector is needed. 39 // ------------------------------------------------------------------- 34 40 35 41 #ifndef G4QParentCluster_h … … 57 63 58 64 // Selectors 59 G4int GetPDGCode() const;// Get PDG code of the Parent Cluster60 G4double GetProbability() const;// Get a probability of hadronization on it61 G4int GetNQPart2() const;// Get n-2 for the fragment62 G4QContent GetTransQC() const;// Get QuarkCont of a Pseudo Exchange Meson63 G4double GetLow() const;// Get a low limit for randomization64 G4double GetHigh() const;// Get a high limit for randomization65 G4double GetEBMass() const;// Get a Nuclear Bounded mass of the parent cluster66 G4double GetEBind() const; // Get Environment Binding energy for the parent cluster67 G4double GetNBMass() const; // Get an Environmental bounded mass of the parent cluster68 G4double GetNBind() const; // Get Total Nucleus Binding energy for the parent cluster65 G4int GetPDGCode() const; // Get PDG code of the Parent Cluster 66 G4double GetProbability() const; // Get a probability of hadronization on it 67 G4int GetNQPart2() const; // Get n-2 for the fragment 68 G4QContent GetTransQC() const; // Get QuarkCont of a Pseudo Exchange Meson 69 G4double GetLow() const; // Get a low limit for randomization 70 G4double GetHigh() const; // Get a high limit for randomization 71 G4double GetEBMass() const; // Get a Nuclear Bounded mass of the parent cluster 72 G4double GetEBind() const; // Get Environment BindingEnergy for the parentCluster 73 G4double GetNBMass() const; // Get Environmental BoundedMass of the parent Cluster 74 G4double GetNBind() const; // Get TotalNucleusBindingEnergy for the parentCluster 69 75 70 76 // Modifiers 71 void SetPDGCode(G4int newPDGCode); // Set PDG code of the Parent Cluster72 void SetProbability(G4double probab); // Set probab. to hadronize on this cluster73 void SetNQPart2(G4int nm2); // Get n-2 for the fragment74 void SetTransQC(G4QContent newTrans); // Set QuarkCont of a Pseudo Exchange Meson75 void SetLow(G4double loLim); // Set a low limit for hadronization76 void SetHigh(G4double hiLim); // Set a high limit for hadronization77 void SetEBMass(G4double bMass); // Set a bounded mass of the parent cluster in E78 void SetEBind(G4double bEn); // Set binding energy of the parent cluster in E79 void SetNBMass(G4double bMass); // Set a bounded mass of the parent cluster in N80 void SetNBind(G4double bEn); // Set binding energy of the parent cluster in N77 void SetPDGCode(G4int newPDGCode); // Set PDG code of the Parent Cluster 78 void SetProbability(G4double probab); // Set probab. to hadronize on this cluster 79 void SetNQPart2(G4int nm2); // Get n-2 for the fragment 80 void SetTransQC(G4QContent newTrans); // Set QuarkCont of a Pseudo Exchange Meson 81 void SetLow(G4double loLim); // Set a low limit for hadronization 82 void SetHigh(G4double hiLim); // Set a high limit for hadronization 83 void SetEBMass(G4double bMass); // Set a bounded mass of the parent cluster in E 84 void SetEBind(G4double bEn); // Set binding energy of the parent cluster in E 85 void SetNBMass(G4double bMass); // Set a bounded mass of the parent cluster in N 86 void SetNBind(G4double bEn); // Set binding energy of the parent cluster in N 81 87 82 88 // General … … 91 97 // Secondary 92 98 G4int nQPart2; 93 G4QContent transQC; // Quark Content ofpseudo exchange meson99 G4QContent transQC; // Quark Content of the pseudo exchange meson 94 100 G4double lowLimit; 95 101 G4double highLimit; … … 104 110 std::ostream& operator<<(std::ostream& lhs, const G4QParentCluster& rhs); 105 111 106 inline G4bool G4QParentCluster::operator==(const G4QParentCluster& rhs) const {return this==&rhs;} 107 inline G4bool G4QParentCluster::operator!=(const G4QParentCluster& rhs) const {return this!=&rhs;} 112 inline G4bool G4QParentCluster::operator==(const G4QParentCluster& rhs) const 113 {return this==&rhs;} 114 inline G4bool G4QParentCluster::operator!=(const G4QParentCluster& rhs) const 115 {return this!=&rhs;} 108 116 109 117 inline G4int G4QParentCluster::GetPDGCode() const {return thePDGCode;} … … 118 126 inline G4double G4QParentCluster::GetNBind() const {return theNucBindingEnergy;} 119 127 120 inline void G4QParentCluster::SetPDGCode(G4int newPDGCode) {thePDGCode = newPDGCode;}121 inline void G4QParentCluster::SetProbability(G4double prob) {theProbability = prob;}122 inline void G4QParentCluster::SetNQPart2(G4int nm2) {nQPart2 = nm2;}123 inline void G4QParentCluster::SetTransQC(G4QContent newTrans) {transQC =newTrans;}124 inline void G4QParentCluster::SetHigh(G4double hiLim) {highLimit = hiLim;}125 inline void G4QParentCluster::SetLow(G4double loLim) {lowLimit = loLim;}126 inline void G4QParentCluster::SetEBMass(G4double bMass) {theEnvBoundedMass = bMass;}127 inline void G4QParentCluster::SetNBMass(G4double bMass) {theNucBoundedMass = bMass;}128 inline void G4QParentCluster::SetPDGCode(G4int newPDGCode) {thePDGCode = newPDGCode;} 129 inline void G4QParentCluster::SetProbability(G4double prob) {theProbability = prob;} 130 inline void G4QParentCluster::SetNQPart2(G4int nm2) {nQPart2 = nm2;} 131 inline void G4QParentCluster::SetTransQC(G4QContent newTrans) {transQC = newTrans;} 132 inline void G4QParentCluster::SetHigh(G4double hiLim) {highLimit = hiLim;} 133 inline void G4QParentCluster::SetLow(G4double loLim) {lowLimit = loLim;} 134 inline void G4QParentCluster::SetEBMass(G4double bMass) {theEnvBoundedMass = bMass;} 135 inline void G4QParentCluster::SetNBMass(G4double bMass) {theNucBoundedMass = bMass;} 128 136 inline void G4QParentCluster::SetEBind(G4double bEn) {theEnvBindingEnergy= bEn;} 129 137 inline void G4QParentCluster::SetNBind(G4double bEn) {theNucBindingEnergy= bEn;} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParentClusterVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParentClusterVector.hh,v 1.1 8 2006/06/29 20:06:31 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParentClusterVector.hh,v 1.19 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition of Parent nuclear cluster Vector in CHIPS model 33 33 // --------------------------------------------------------------- 34 // Short description: The parent cluster is the cluster, which can be 35 // used for the nuclear fragment production. Different clusters csn be 36 // used as the parent cluser for the particular G4QCandidate (nuclear 37 // fragment), e.g. t and He3 for the t-fragment production. So the 38 // G4QParentClusterVector is needed. 39 // ------------------------------------------------------------------- 34 40 35 41 #ifndef G4QParentClusterVector_h … … 43 49 44 50 #endif 45 46 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticle.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParticle.hh,v 1.2 4 2006/06/29 20:06:33 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParticle.hh,v 1.25 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QParticle ---------------- … … 32 32 // class header for Particles in the CHIPS Model 33 33 // --------------------------------------------------- 34 // Short description: The G4QParticle is a part of the CHIPS World. It is 35 // characterized by the quark content, spin, mass, width and a vector of 36 // the decay channels (G4QDecayCannelVector). 37 // ----------------------------------------------------------------------- 34 38 35 39 #ifndef G4QParticle_h … … 117 121 min=aDecay[0]->GetMinMass(); 118 122 if(nCh>1) for(G4int j=1; j<nCh; j++) 119 {123 { 120 124 G4double next=aDecay[j]->GetMinMass(); 121 125 if(next<min) min=next; 122 }126 } 123 127 } 124 128 G4double w=GetWidth(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticleVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParticleVector.hh,v 1. 19 2006/06/29 20:06:35 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParticleVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for Decay Channel Vector in CHIPS model 33 33 // --------------------------------------------------------------- 34 // Short description: The G4QParticle is a part of the CHIPS World. It is 35 // characterized by the quark content, spin, mass, width and a vector of 36 // the decay channels (G4QDecayCannelVector). 37 // ----------------------------------------------------------------------- 34 38 35 39 #ifndef G4QParticleVector_h … … 61 65 { 62 66 std::for_each(begin(),end(),DeleteQParticle()); 63 clear();67 clear(); 64 68 } 65 69 }; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParton.hh
r1007 r1055 28 28 #define G4QParton_h 1 29 29 30 // $Id: G4QParton.hh,v 1. 2 2006/12/12 11:02:22mkossov Exp $31 // GEANT4 tag $Name: geant4-09-0 2$30 // $Id: G4QParton.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 31 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 32 32 // 33 33 // ------------------------------------------------------------ … … 40 40 // G4Parton 41 41 // ----------------------------------------------------------------- 42 // Short description: The Quark-Gluon String consists of the partons, which 43 // are quarks and some times gluons. 44 // ------------------------------------------------------------------------ 42 45 43 46 #include "globals.hh" … … 57 60 // Random Flavor/Colour/Spin definition for default constructor (with .3 s-suppresion) 58 61 PDGencoding=(G4int)(2.3*G4UniformRand())+1; //@@ What about antiquarks? (M.K.) 59 theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);60 // random colour (1,2,3)=(R,G,B) for quarks and (-1,-2,-3)=(aR,aG,aB) for anti-quarks62 theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding); 63 // random colour (1,2,3)=(R,G,B) for quarks and (-1,-2,-3)=(aR,aG,aB) for anti-quarks 61 64 theColour = (G4int)(3*G4UniformRand())+1; 62 65 if(theColour>3) theColour = 3; … … 64 67 theSpinZ = (G4int)(2*G4UniformRand()) - 0.5; 65 68 } 66 G4QParton(G4int PDGencoding); // Collor/Spin are still random69 G4QParton(G4int PDGencoding); // Collor/Spin are still random 67 70 G4QParton(const G4QParton &right); 68 71 G4QParton(const G4QParton* right); … … 73 76 // Operators 74 77 const G4QParton& operator=(const G4QParton &right); 75 G4int operator==(const G4QParton &right) const {return this==&right;} 76 G4int operator!=(const G4QParton &right) const {return this!=&right;} 78 G4int operator==(const G4QParton &right) const {return this==&right;} 79 G4int operator!=(const G4QParton &right) const {return this!=&right;} 77 80 78 81 // Modifiers … … 97 100 G4String GetParticleSubType() {return theDefinition->GetParticleSubType();} 98 101 private: 99 // Body102 // Body 100 103 G4int PDGencoding; 101 104 G4ParticleDefinition* theDefinition; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPair.hh
r1007 r1055 27 27 #define G4QPartonPair_h 1 28 28 // 29 // $Id: G4QPartonPair.hh,v 1. 1 2006/10/30 10:40:34 mkossov Exp $30 // GEANT4 tag $Name: geant4-09-0 2$29 // $Id: G4QPartonPair.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 30 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 31 31 // 32 32 // ------------------------------------------------------------ … … 37 37 // class for PartonPair (hadron) used by Parton String Models 38 38 // ------------------------------------------------------------ 39 // Short description: Each Quasmon String has a pair of partons 40 // (quark/diquark-partons) on its ends. During the hadronization 41 // procedure the rapidity gap between partons shrinks, but the 42 // parton pair still exists, while it is converted to the final 43 // meson (quaek-antiquark) or baryon (quark-diquark). 44 // -------------------------------------------------------------- 39 45 // 40 46 #include "globals.hh" … … 53 59 G4int operator==(const G4QPartonPair &right) const 54 60 { 55 return (CollisionType == right.CollisionType && *Parton1 == *right.Parton1 &&56 *Parton2 == *right.Parton2) ? 1: 0;61 return (CollisionType == right.CollisionType && 62 *Parton1 == *right.Parton1 && *Parton2 == *right.Parton2) ? 1: 0; 57 63 } 58 64 G4int operator!=(const G4QPartonPair &right) const 59 65 { 60 return (CollisionType == right.CollisionType && *Parton1 == *right.Parton1 &&61 *Parton2 == *right.Parton2) ? 0: 1;66 return (CollisionType == right.CollisionType && 67 *Parton1 == *right.Parton1 && *Parton2 == *right.Parton2) ? 0: 1; 62 68 } 63 69 // Modifiers … … 65 71 void SetCollisionType(G4int Type) {CollisionType = Type;} 66 72 // Selectors 67 G4int GetCollisionType(){return CollisionType;}73 G4int GetCollisionType() {return CollisionType;} 68 74 G4QParton* GetParton1() {return Parton1;} 69 75 G4QParton* GetParton2() {return Parton2;} … … 74 80 G4QParton* Parton1; 75 81 G4QParton* Parton2; 76 G4int CollisionType;77 G4int Direction;82 G4int CollisionType; 83 G4int Direction; 78 84 }; 79 85 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonPairVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QPartonPairVector.hh,v 1. 1 2006/11/16 11:36:09mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QPartonPairVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for a Vector of PartonPairs of CHIPS model 33 33 // --------------------------------------------------------------- 34 // Short description: Each Quasmon String has a pair of partons 35 // (quark/diquark-partons) on its ends. During the hadronization 36 // procedure the rapidity gap between partons shrinks, but the 37 // parton pair still exists, while it is converted to the final 38 // meson (quaek-antiquark) or baryon (quark-diquark). 39 // -------------------------------------------------------------- 34 40 35 41 #ifndef G4QPartonPairVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPartonVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QPartonVector.hh,v 1. 1 2006/10/30 10:40:34 mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QPartonVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidateVector ---------------- … … 32 32 // Type defenition for a Vector of Partons - output of CHIPS model 33 33 // --------------------------------------------------------------- 34 // Short description: The Quark-Gluon String consists of the partons, which 35 // are quarks and some times gluons. 36 // ------------------------------------------------------------------------ 34 37 35 38 #ifndef G4QPartonVector_h 36 39 #define G4QPartonVector_h 1 37 40 // 38 // $Id: G4QPartonVector.hh,v 1. 1 2006/10/30 10:40:34 mkossov Exp $39 // GEANT4 tag $Name: geant4-09-0 2$41 // $Id: G4QPartonVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 42 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 40 43 // 41 44 // ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QPomeron.hh
r1007 r1055 27 27 #define G4QPomeron_h 1 28 28 // 29 // $Id: G4QPomeron.hh,v 1. 2 2006/12/12 11:02:22mkossov Exp $30 // GEANT4 tag $Name: geant4-09-0 2$29 // $Id: G4QPomeron.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 30 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 31 31 // 32 32 // ------------------------------------------------------------ … … 39 39 // G4PomeronCrossSection 40 40 // ------------------------------------------------------------ 41 // Short description: Pomeron is one of the possible vacuum pole (the 42 // second is Oderon, but they are identical in the present model), by 43 // which particle exchang in the ellastic scattering process. Strings, 44 // which appear as a cut of the Pomeron (optic theorem connects the 45 // amplitude of scattering at zero angle with the total inelastic 46 // cross-section), describe most of the processes at high energies. 47 // ------------------------------------------------------------------ 41 48 42 49 #include "globals.hh" … … 64 71 G4double GetTotalProbability(const G4double s, const G4double imp2) 65 72 {return 2*(1-std::exp(-Eikonal(s,imp2)))/pomeron_C*(1-std::exp(-Eikonal(s,imp2)));} 66 G4double GetDiffractiveProbability(const G4double s, const G4double imp2)73 G4double GetDiffractiveProbability(const G4double s, const G4double imp2) 67 74 {return (pomeron_C-1.)/pomeron_C*(GetTotalProbability(s,imp2) - 68 75 GetNondiffractiveProbability(s,imp2));} 69 G4double GetNondiffractiveProbability(const G4double s, const G4double imp2)76 G4double GetNondiffractiveProbability(const G4double s, const G4double imp2) 70 77 {return (1.-std::exp(-2*Eikonal(s,imp2)))/pomeron_C;} 71 78 G4double GetElasticProbability(const G4double s, const G4double imp2) … … 94 101 void InitForKaon(); 95 102 void InitForGamma(); 96 103 97 104 G4double Expand(G4double z); 98 105 G4double Z(const G4double Scms) {return 2*pomeron_C*Power(s)/Lambda(Scms);} 99 106 G4double SigP(const G4double Scms) {return 8*pi*hbarc_squared*Power(Scms);} 100 107 G4double Power(const G4double Scms) 101 {return pomeron_Gamma*std::pow(Scms/pomeron_S,pomeron_Alpha-1);}108 {return pomeron_Gamma*std::pow(Scms/pomeron_S,pomeron_Alpha-1);} 102 109 G4double Lambda(const G4double s) 103 110 {return pomeron_Rsquare+pomeron_Alphaprime*std::log(s/pomeron_S);} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QSplitter.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QSplitter.hh,v 1. 2 2006/06/29 20:06:37 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QSplitter.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QSplitter ---------------- … … 32 32 // header for Hadron-Hadron Splitter in parton pairs of the CHIPS Model 33 33 // -------------------------------------------------------------------- 34 // Short description: the hadron befor the interaction must be splitted 35 // in partons: quark-antiquark (mesons) or quark-diquark (baryon) parts 36 // (some time in more than two parts, e.g. baryon in three quarks or a 37 // few quark-antiquark pairs can be added for the splitting). Then each 38 // projectile parton can create a parton pair (G4QPartonPair) with the 39 // target parton. This pair with the big rapidity difference on the ends 40 // creates a planar Quark-Gluon String (a pole). A pair of the projectile 41 // partons with a pair of the target partons can create a cylindrical 42 // string (doubled string in the algorithm - a cut). 43 // -------------------------------------------------===------------------ 34 44 35 45 #ifndef G4QSplitter_h … … 47 57 // projectile Hadron (probably as a part of proj Nucleus) colliding with nuclear Cluster 48 58 G4QSplitter(G4QHadron projHadron, const G4bool projEnvFlag, const G4int targPDG, 49 const G4bool targEnvFlag); // Cluster can have target nuclear environment59 const G4bool targEnvFlag); // Cluster can have target nuclear environment 50 60 // projectile Cluster (probably as a part of proj Nucleus) colliding with nuclear target 51 61 //G4QSplitter(G4QNucleus projCluster, const G4bool projEnvFlag, const G4int targPDG); 52 62 // projectile Cluster (probably as a part of proj Nucleus) colliding with nuclear Cluster 53 63 //G4QSplitter(G4QNucleus projCluster, const G4bool projEnvFlag, const G4int targPDG, 54 //const G4bool targEnvFlag); // Cluster can have target nuclear environment64 // const G4bool targEnvFlag); // Cluster can have target nuclear environment 55 65 G4QSplitter(const G4QSplitter& right); // Copy the splitted system by value 56 66 G4QSplitter(G4QSplitter* right); // Copy the splitted system by pointer -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QString.hh
r1007 r1055 26 26 // 27 27 // 28 // $Id: G4QString.hh,v 1. 2 2006/12/12 11:02:22mkossov Exp $29 // GEANT4 tag $Name: geant4-09-0 2$28 // $Id: G4QString.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 30 30 31 31 #ifndef G4QString_h … … 43 43 // 44 44 // ------------------------------------------------------------ 45 // Short description: If partons from the G4QPartonPair are close in 46 // rapidity, they create Quasmons, but if they are far in the rapidity 47 // space, they can not interact directly. Say the bottom parton (quark) 48 // has rapidity 0, and the top parton (antiquark) has rapidity 8, then 49 // the top quark splits in two by radiating gluon, and each part has 50 // rapidity 4, then the gluon splits in quark-antiquark pair (rapidity 51 // 2 each), and then the quark gadiates anothe gluon and reachs rapidity 52 // 1. Now it can interact with the bottom antiquark, creating a Quasmon 53 // or a hadron. The intermediate partons is the string ladder. 54 // --------------------------------------------------------------------- 45 55 46 56 #include "G4ios.hh" … … 59 69 public: 60 70 61 enum {PROJECTILE = 1, TARGET = -1}; // The same as in quark-pair (@@ ? M.K.)71 enum {PROJECTILE = 1, TARGET = -1}; // The same as in quark-pair (@@ ? M.K.) 62 72 63 73 G4QString(); // formal creation of the string with future excitation … … 154 164 static G4double SmoothParam; // QGS model parameter 155 165 static G4double StrangeSuppress; // Strangeness suppression parameter 156 static G4double widthOfPtSquare;// width^2 of pt for string excitation166 static G4double widthOfPtSquare; // width^2 of pt for string excitation 157 167 static G4int StringLoopInterrupt; // String fragmentation LOOP limit 158 168 static G4int ClusterLoopInterrupt; // Cluster fragmentation LOOP limit 159 169 160 170 // Body 161 G4int theDirection; // must be 1 or -1 (PROJECTILE or TARGET)162 G4ThreeVector thePosition; // Defined by the first quark position163 G4QPartonVector thePartons; // would like initial capacity for 3 Partons (? M.K.)164 G4QHadronBuilder* hadronizer; // Hadronizer of hodrons out of partons165 G4ThreeVector Ptleft,Ptright; // Pt (px,py) for partons (pz ignored!)166 G4double Pplus, Pminus; // p-, p+ of string, Plus is assigned to Left!167 G4QParton* theStableParton; // Parton on the stable side of the string168 G4QParton* theDecayParton; // Parton on the decaying part of the string169 enum DecaySide {None, Left, Right}; // @@ To have two @@ Leav : 1=Left170 DecaySide decaying; // @@ it's too much @@ only : 0=Unknown171 G4int SideOfDecay; // @@ of a good thing @@ one! : -1=Right171 G4int theDirection; // must be 1 or -1 (PROJECTILE or TARGET) 172 G4ThreeVector thePosition; // Defined by the first quark position 173 G4QPartonVector thePartons; // would like initial capacity for 3 Partons (? M.K.) 174 G4QHadronBuilder* hadronizer; // Hadronizer of hodrons out of partons 175 G4ThreeVector Ptleft,Ptright; // Pt (px,py) for partons (pz ignored!) 176 G4double Pplus, Pminus; // p-, p+ of string, Plus is assigned to Left! 177 G4QParton* theStableParton; // Parton on the stable side of the string 178 G4QParton* theDecayParton; // Parton on the decaying part of the string 179 enum DecaySide {None, Left, Right};// @@ To have two @@ Leav : 1=Left 180 DecaySide decaying; // @@ it's too much @@ only : 0=Unknown 181 G4int SideOfDecay; // @@ of a good thing @@ one! : -1=Right 172 182 }; 173 183 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QStringVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QStringVector.hh,v 1. 1 2006/10/30 10:40:35mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QStringVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QStringVector ---------------- … … 32 32 // Type definition for a Vector of QStrings - output of CHIPS model 33 33 // ---------------------------------------------------------------- 34 // Short description: If partons from the G4QPartonPair are close in 35 // rapidity, they create Quasmons, but if they are far in the rapidity 36 // space, they can not interact directly. Say the bottom parton (quark) 37 // has rapidity 0, and the top parton (antiquark) has rapidity 8, then 38 // the top quark splits in two by radiating gluon, and each part has 39 // rapidity 4, then the gluon splits in quark-antiquark pair (rapidity 40 // 2 each), and then the quark gadiates anothe gluon and reachs rapidity 41 // 1. Now it can interact with the bottom antiquark, creating a Quasmon 42 // or a hadron. The intermediate partons is the string ladder. 43 // --------------------------------------------------------------------- 34 44 35 45 #ifndef G4QStringVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4Quasmon.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4Quasmon.hh,v 1. 39 2007/08/09 13:07:47mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4Quasmon.hh,v 1.41 2009/03/23 14:14:35 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4Quasmon ---------------- … … 32 32 // class for a Quasmon used by the CHIPS Model 33 33 // ------------------------------------------------------------ 34 // Short description: If partons from the G4QPartonPair are close in 35 // rapidity, they create Quasmons, but if they are far in the rapidity 36 // space, they can not interact directly. Say the bottom parton (quark) 37 // has rapidity 0, and the top parton (antiquark) has rapidity 8, then 38 // the top quark splits in two by radiating gluon, and each part has 39 // rapidity 4, then the gluon splits in quark-antiquark pair (rapidity 40 // 2 each), and then the quark gadiates anothe gluon and reachs rapidity 41 // 1. Now it can interact with the bottom antiquark, creating a Quasmon 42 // or a hadron. The intermediate partons is the string ladder. 43 // --------------------------------------------------------------------- 34 44 35 45 #ifndef G4Quasmon_h … … 92 102 void InitQuasmon(const G4QContent& qQCont, const G4LorentzVector& q4M); 93 103 void IncreaseBy(const G4Quasmon* pQuasm); // as operator+= but by pointer 104 void IncreaseBy(G4QContent& qQCont, const G4LorentzVector& q4M); 94 105 void ClearQuasmon(); // Clear Quasmon (status=0) 95 106 void KillQuasmon(); // Kill Quasmon (status=0) … … 170 181 status= 3; 171 182 } 183 inline void G4Quasmon::IncreaseBy(G4QContent& qQCont, const G4LorentzVector& q4M) 184 { 185 valQ += qQCont; 186 q4Mom += q4M; 187 status= 3; 188 } 172 189 173 190 inline void G4Quasmon::InitQuasmon(const G4QContent& qQCont, const G4LorentzVector& q4M) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonString.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QuasmonString.hh,v 1. 4 2006/06/29 20:06:41 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QuasmonString.hh,v 1.5 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QuasmonString ---------------- 31 31 // by Mikhail Kossov, October 2004. 32 32 // header for Hadron-Hadron String Interaction in the CHIPS Model 33 // ------------------------------------------------------------------- 34 // Short description: The Quark-Gluon String can fragment in hadrons 35 // (QGS), small hadronic clusters (HERWIG) or in unlimited in mass 36 // Quasmons, defined by the G4QPartonPair. This class is made to 37 // simulate the string fragmentation in Quasmons, which hadronize in 38 // vacuuum or in nuclear environment. 33 39 // ------------------------------------------------------------------- 34 40 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QuasmonVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QuasmonVector.hh,v 1. 19 2006/06/29 20:06:43 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QuasmonVector.hh,v 1.20 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QuasmonVector ---------------- … … 32 32 // Type definition for a Vector of Quasmons - output of CHIPS model 33 33 // ---------------------------------------------------------------- 34 // Short description: If partons from the G4QPartonPair are close in 35 // rapidity, they create Quasmons, but if they are far in the rapidity 36 // space, they can not interact directly. Say the bottom parton (quark) 37 // has rapidity 0, and the top parton (antiquark) has rapidity 8, then 38 // the top quark splits in two by radiating gluon, and each part has 39 // rapidity 4, then the gluon splits in quark-antiquark pair (rapidity 40 // 2 each), and then the quark gadiates anothe gluon and reachs rapidity 41 // 1. Now it can interact with the bottom antiquark, creating a Quasmon 42 // or a hadron. The intermediate partons is the string ladder. 43 // --------------------------------------------------------------------- 34 44 35 45 #ifndef G4QuasmonVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QBesIKJY.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QBesIKJY.cc,v 1. 2 2006/06/29 20:06:45 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QBesIKJY.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QBesIKJY ---------------- … … 32 32 // class for Bessel I0/I1 and K0/K1 functions in CHIPS Model 33 33 // ------------------------------------------------------------------- 34 34 // Short description: Bessel functions class (can be substituted) 35 // ------------------------------------------------------------------- 35 36 //#define debug 36 37 //#define pdebug … … 43 44 ex=false; 44 45 switch (type) 45 {46 case BessI0:46 { 47 case BessI0: 47 48 nu=0; 48 49 ik=true; 49 50 ij=true; 50 break;51 case BessI1:51 break; 52 case BessI1: 52 53 nu=1; 53 54 ik=true; 54 55 ij=true; 55 break;56 case EBessI0:56 break; 57 case EBessI0: 57 58 nu=0; 58 59 ex=true; 59 60 ik=true; 60 61 ij=true; 61 break;62 case EBessI1:62 break; 63 case EBessI1: 63 64 nu=1; 64 65 ex=true; 65 66 ik=true; 66 67 ij=true; 67 break;68 case BessJ0:68 break; 69 case BessJ0: 69 70 nu=0; 70 71 ik=true; 71 72 ij=false; 72 break;73 case BessJ1:73 break; 74 case BessJ1: 74 75 nu=1; 75 76 ik=true; 76 77 ij=false; 77 break;78 case BessK0:78 break; 79 case BessK0: 79 80 nu=0; 80 81 ik=false; 81 82 ij=true; 82 break;83 case BessK1:83 break; 84 case BessK1: 84 85 nu=1; 85 86 ik=false; 86 87 ij=true; 87 break;88 case EBessK0:88 break; 89 case EBessK0: 89 90 nu=0; 90 91 ex=true; 91 92 ik=false; 92 93 ij=true; 93 break;94 case EBessK1:94 break; 95 case EBessK1: 95 96 nu=1; 96 97 ex=true; 97 98 ik=false; 98 99 ij=true; 99 break;100 case BessY0:100 break; 101 case BessY0: 101 102 nu=0; 102 103 ik=false; 103 104 ij=false; 104 break;105 case BessY1:105 break; 106 case BessY1: 106 107 nu=1; 107 108 ik=false; 108 109 ij=false; 109 break;110 break; 110 111 } 111 112 } … … 126 127 static const G4double EPS = 1.E-15; 127 128 static const G4double Z1 = 1.; 128 static const G4double HF = Z1/2;129 static const G4double R8 = HF/4;130 static const G4double R32 = R8/4;129 static const G4double HF = Z1/2; 130 static const G4double R8 = HF/4; 131 static const G4double R32 = R8/4; 131 132 static const G4double PI = 3.14159265358979324; 132 133 static const G4double CE = 0.57721566490153286; … … 139 140 static const G4double CI0[npi]={+1.00829205458740032E0, 140 141 +.00845122624920943E0,+.00012700630777567E0,+.00007247591099959E0, 141 +.00000513587726878E0,+.00000056816965808E0,+.00000008513091223E0,142 +.00000001238425364E0,+.00000000029801672E0,-.00000000078956698E0,143 -.00000000033127128E0,-.00000000004497339E0,+.00000000001799790E0,144 +.00000000000965748E0,+.00000000000038604E0,-.00000000000104039E0,145 -.00000000000023950E0,+.00000000000009554E0,+.00000000000004443E0,146 -.00000000000000859E0,-.00000000000000709E0,+.00000000000000087E0,147 +.00000000000000112E0,-.00000000000000012E0,-.00000000000000018E0};142 +.00000513587726878E0,+.00000056816965808E0,+.00000008513091223E0, 143 +.00000001238425364E0,+.00000000029801672E0,-.00000000078956698E0, 144 -.00000000033127128E0,-.00000000004497339E0,+.00000000001799790E0, 145 +.00000000000965748E0,+.00000000000038604E0,-.00000000000104039E0, 146 -.00000000000023950E0,+.00000000000009554E0,+.00000000000004443E0, 147 -.00000000000000859E0,-.00000000000000709E0,+.00000000000000087E0, 148 +.00000000000000112E0,-.00000000000000012E0,-.00000000000000018E0}; 148 149 149 150 static const G4double CI1[npi]={+.975800602326285926E0, … … 215 216 216 217 static const G4double EE[npk]={-.040172946544414076E0,-.444447147630558063E0, 217 -.022719244428417736E0,+.206644541017490520E0,-.086671697056948524E0,218 +.017636703003163134E0,-.002235619294485095E0,+.000197062302701541E0,219 -.000012885853299241E0,+.000000652847952359E0,-.000000026450737175E0,220 +.000000000878030117E0,-.000000000024343279E0,+.000000000000572612E0,221 -.000000000000011578E0,+.000000000000000203E0,-.000000000000000003E0};218 -.022719244428417736E0,+.206644541017490520E0,-.086671697056948524E0, 219 +.017636703003163134E0,-.002235619294485095E0,+.000197062302701541E0, 220 -.000012885853299241E0,+.000000652847952359E0,-.000000026450737175E0, 221 +.000000000878030117E0,-.000000000024343279E0,+.000000000000572612E0, 222 -.000000000000011578E0,+.000000000000000203E0,-.000000000000000003E0}; 222 223 223 224 static const G4complex CF[npj]={ … … 244 245 // ------------------------------------------------------------------------------------- 245 246 G4double H=0.; // Prototype of the result 246 if (ij) // I/K Bessel functions247 if (ij) // I/K Bessel functions 247 248 { 248 249 if (ik) // I0/I1/EI0/EI1 Bessel functions (symmetric) … … 263 264 G4double A1=1.+DY/(XLI*V3); 264 265 G4double A2=1.+Y*(4.+(DY+Y)/(XLD*XL))/(W1*V3); 265 G4double B0=1.;266 G4doubleB1=1.-Y/XLI;266 G4double B0=1.; 267 G4double B1=1.-Y/XLI; 267 268 G4double B2=1.-Y*(1.-Y/(XLD+XLD))/W1; 268 269 G4int V1=3-XL; 269 270 G4double V2=V3+V3; 270 271 G4double C=0.; 271 for (G4int N=3; N<=30; N++)272 for (G4int N=3; N<=30; N++) 272 273 { 273 274 G4double C0=C; … … 279 280 G4int W5=W4-1; 280 281 G4int W6=W5-1; 281 V1=V1+1;282 V1=V1+1; 282 283 V2=V2+1; 283 284 V3=V3+1; 284 G4double U1=FN*W4;285 G4double U1=FN*W4; 285 286 G4double E=V3/(U1*W3); 286 G4double U2=E*Y;287 G4double U2=E*Y; 287 288 G4double F1=1.+Y*V1/(U1*W1); 288 289 G4double F2=(1.+Y*V2/(V3*W2*W5))*U2; … … 290 291 G4double A=F1*A2+F2*A1+F3*A0; 291 292 G4double B=F1*B2+F2*B1+F3*B0; 292 C=A/B;293 if (std::abs(C0-C) < EPS*std::abs(C)) break;294 A0=A1; A1=A2; A2=A; B0=B1; B1=B2; B2=B;293 C=A/B; 294 if (std::abs(C0-C) < EPS*std::abs(C)) break; 295 A0=A1; A1=A2; A2=A; B0=B1; B1=B2; B2=B; 295 296 } 296 297 H=C; … … 301 302 { 302 303 G4double P=16./V-1.; 303 G4double ALFA=P+P;304 G4double B1=0.;304 G4double ALFA=P+P; 305 G4double B1=0.; 305 306 G4double B2=0.; 306 for (G4int I=npil; I>=0; I--)307 for (G4int I=npil; I>=0; I--) 307 308 { 308 309 if (!nu) CJ=CI0[I]; 309 310 else CJ=CI1[I]; 310 G4double B0=CJ+ALFA*B1-B2;311 B2=B1;312 B1=B0;313 } 314 H=std::sqrt(RPI2/V)*(B1-P*B2);315 if (nu && X < 0.) H=-H;316 if (!ex) H*=std::exp(V);317 }311 G4double B0=CJ+ALFA*B1-B2; 312 B2=B1; 313 B1=B0; 314 } 315 H=std::sqrt(RPI2/V)*(B1-P*B2); 316 if (nu && X < 0.) H=-H; 317 if (!ex) H*=std::exp(V); 318 } 318 319 } 319 320 else // K0/K1/EK0/EK1 Bessel functions 320 {321 { 321 322 #ifdef debug 322 323 G4cout<<"G4BesIKJY: >>>>>>>>>>>>>> K is called, X="<<X<<",n="<<nu<<",E="<<ex<<G4endl; … … 339 340 G4double Q=HF; 340 341 G4double C=1.; 341 G4double D=B*B;342 G4double D=B*B; 342 343 G4double BK1=P; 343 344 for (G4int N=1; N<=nat1; N++) // @@ "nat" can be increased … … 349 350 C*=D/FN; 350 351 G4double G=C*(P-FN*F); 351 G4double R=C*F;352 G4double R=C*F; 352 353 BK=BK+R; 353 354 BK1=BK1+G; 354 if (BK1*R+std::abs(G)*BK < EPS*BK*BK1) break;355 if (BK1*R+std::abs(G)*BK < EPS*BK*BK1) break; 355 356 } 356 357 if (nu==1) H=BK1/B; … … 358 359 if (ex) H*=std::exp(X); 359 360 } 360 else if (X < 5.)361 else if (X < 5.) 361 362 { 362 363 #ifdef debug … … 368 369 G4double XN=DNUS+DNUS; 369 370 G4double A=9.-XN; 370 G4double B=25.-XN;371 G4double B=25.-XN; 371 372 G4double C=768*X*X; 372 G4double HX=16*X;373 G4double C0=HX+HX+HX;;373 G4double HX=16*X; 374 G4double C0=HX+HX+HX;; 374 375 G4double A0=1.; 375 376 G4double A1=(HX+7.+XN)/A; … … 378 379 G4double B1=(HX+9.-XN)/A; 379 380 G4double B2=(C+C0*B)/(A*B)+1.; 380 C=0.;381 for (G4int N=3; N<=nat2; N++)381 C=0.; 382 for (G4int N=3; N<=nat2; N++) 382 383 { 383 384 C0=C; … … 389 390 G4double FN3=FN1/(FN2-3.); 390 391 G4double FN4=12*FN*FN-(1.-XN); 391 G4double FN5=16*FN1*X;392 G4double FN5=16*FN1*X; 392 393 G4double RAN=1./(FNP*FNP-XN); 393 G4double F1=FN3*(FN4-20*FN)+FN5;394 G4double F1=FN3*(FN4-20*FN)+FN5; 394 395 G4double F2=28*FN-FN4-8.+FN5; 395 396 G4double F3=FN3*(FNM*FNM-XN); 396 A=(F1*A2+F2*A1+F3*A0)*RAN;397 A=(F1*A2+F2*A1+F3*A0)*RAN; 397 398 B=(F1*B2+F2*B1+F3*B0)*RAN; 398 399 C=A/B; 399 if (std::abs(C0-C) < EPS*std::abs(C)) break;400 A0=A1; A1=A2; A2=A; B0=B1; B1=B2;B2=B;401 } 402 H=C/std::sqrt(RPIH*X);400 if (std::abs(C0-C) < EPS*std::abs(C)) break; 401 A0=A1; A1=A2; A2=A; B0=B1; B1=B2; B2=B; 402 } 403 H=C/std::sqrt(RPIH*X); 403 404 if (!ex) H*=std::exp(-X); 404 }405 } 405 406 else 406 407 { … … 410 411 G4double P=10./X-1.; 411 412 G4double ALFA=P+P; 412 G4double B1=0.;413 G4double B2=0.;413 G4double B1=0.; 414 G4double B2=0.; 414 415 #ifdef debug 415 416 G4cout<<"G4BesIKJY: >>> [ X >= 5 ] is called, X="<<X<<",n="<<nu<<",E="<<ex<<G4endl; 416 417 #endif 417 for (G4int I=npkl; I>=0; I--)418 for (G4int I=npkl; I>=0; I--) 418 419 { 419 420 if (!nu) CK=CK0[I]; … … 422 423 B2=B1; 423 424 B1=B0; 424 }425 } 425 426 H=std::sqrt(PIH/X)*(B1-P*B2); 426 427 if (!ex) H*=std::exp(-X); 427 428 } 428 }429 } 429 430 } 430 431 else 431 {432 { 432 433 if (!ik && X < 0.) 433 434 { … … 455 456 B1=0.; 456 457 B2=0.; 457 for (G4int JT=npkl; JT>=0; JT--)458 for (G4int JT=npkl; JT>=0; JT--) 458 459 { 459 460 G4double B0=CB[JT]+ALFA*B1-B2; … … 463 464 H=RPIH*(CE+std::log(HF*X))*H+B1-P*B2; 464 465 } 465 }466 } 466 467 else 467 {468 G4double P=10./V-1.;469 G4double ALFA=P+P;470 G4complex CB1(0.,0.);471 G4complex CB2(0.,0.);472 for (G4int IT=npjl; IT>=0; IT--)468 { 469 G4double P=10./V-1.; 470 G4double ALFA=P+P; 471 G4complex CB1(0.,0.); 472 G4complex CB2(0.,0.); 473 for (G4int IT=npjl; IT>=0; IT--) 473 474 { 474 475 G4complex CB0=CC[IT]+ALFA*CB1-CB2; 475 476 CB2=CB1; 476 477 CB1=CB0; 477 }478 } 478 479 CB1=std::sqrt(RPIH/V)*std::exp(CI*(V-PI4))*(CB1-P*CB2); 479 if (ik) H=real(CB1);480 if (ik) H=real(CB1); 480 481 else H=real(-CI*CB1); 481 }482 } 482 483 } 483 484 else // J1/Y1 Bessel functions … … 494 495 { 495 496 G4double B0=CD[IT]+ALFA*B1-B2; 496 B2=B1;497 B2=B1; 497 498 B1=B0; 498 499 } … … 510 511 H=RPIH*((CE+std::log(HF*X))*H-1./X)+Y*(B1-B2); 511 512 } 512 }513 } 513 514 else 514 {515 { 515 516 G4double P=10./V-1.; 516 517 G4double ALFA=P+P; … … 520 521 { 521 522 G4complex CB0=CF[IT]+ALFA*CB1-CB2; 522 CB2=CB1;523 CB2=CB1; 523 524 CB1=CB0; 524 525 } … … 526 527 if (ik) H=real(CB1); 527 528 else H=real(-CI*CB1); 528 }529 } 529 530 if (X < 0.) H=-H; 530 531 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCHIPSWorld.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QCHIPSWorld.cc,v 1.3 2 2006/06/29 20:06:47 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QCHIPSWorld.cc,v 1.33 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCHIPSWorld ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for the CHIPS World definition in CHIPS Model 33 // ------------------------------------------------------------------- 34 // Short description: The CHIPS World is a world of elementary particles 35 // and nuclear fragments. This class is a singletone, but without fixed 36 // limits. E.g. the nuclear fragments as possible G4Candidates can be 37 // initialized in the CHIPS World only up to Be8 od C12 or other bigger 38 // nuclear fragment. If one need the heavy fragment production then the 39 // the CHIPS World must be initialized up to these fragments (see the 40 // CHIPS Manual), but the price in performans will be big, because in 41 // each act of the fragmentation competition these numerous candidates 42 // take place in the competition and the hadronization probability is 43 // calculated each time for each of them, so the Be8 limit (Be8->alpha+ 44 // alpha decays very fast and contribute to the alpha-spectrum) is the 45 // most optimal. 33 46 // ------------------------------------------------------------------- 34 47 … … 114 127 { 115 128 #ifdef debug 116 G4cout<<"G4QCHIPSWorld::GetParticles: Create particle QCode="<<i<<G4endl;129 G4cout<<"G4QCHIPSWorld::GetParticles: Create particle QCode="<<i<<G4endl; 117 130 #endif 118 131 G4QParticle* curPart = new G4QParticle(cf,i); // Created with QCode=i 119 132 #ifdef debug 120 G4cout<<"G4QCHIPSWorld::GetParticles: Particle QCode="<<i<<" is created."<<G4endl;133 G4cout<<"G4QCHIPSWorld::GetParticles: Particle QCode="<<i<<" is created."<<G4endl; 121 134 #endif 122 135 //curPart->InitQParticle(i); // … … 135 148 return &GetQWorld(); 136 149 } 137 138 139 140 141 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QCandidate.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QCandidate.cc,v 1.3 4 2006/11/27 10:44:53mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QCandidate.cc,v 1.35 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QCandidate ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for Quasmon initiated Candidates used by CHIPS Model 33 // ------------------------------------------------------------------ 34 // Short description: A candidate for hadronization. The candidates 35 // (hadrons or nuclear fragments) are competative, each quark of a 36 // Quasmon select which candidate to use for hadronization 33 37 // ------------------------------------------------------------------ 34 38 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QChipolino.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QChipolino.cc,v 1.3 4 2008/03/31 20:29:33 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QChipolino.cc,v 1.35 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QChipolino ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for Quasmon initiated Chipolinos generated by CHIPS Model 33 // ------------------------------------------------------------------ 33 // -------------------------------------------------------------------- 34 // Short description: In the CHIPS model not only hadrons are considered, 35 // but the di-hadrons, which can not be convereged to the quark content 36 // of only one hadron (e.g. pi+pi+, K+p, Delta++p etc). This kind of 37 // hadronic states, which can be easily decayed in two hadrons, is called 38 // Chipolino-particle in the model. 39 // ---------------------------------------------------------------------- 34 40 35 41 //#define debug … … 53 59 QCont.IncQAQ(1,0.); // Add quark-pair 54 60 55 G4QContent rQC=QCont; // Copy for possible reduction ("annihilation" of q- qbarpairs)61 G4QContent rQC=QCont; // Copy for possible reduction ("annihilation" of q-aq pairs) 56 62 tot=rQC.GetTot(); // New total number of quarks in QC (temporary) 57 63 if (tot%2)rQC.DecQAQ(-tban-2); // Reduce pairs, keep only 5 quarks (baryon case) … … 92 98 G4QContent oQC=rQC-cQC; 93 99 #ifdef debug 94 cout<<"G4QChipolino: aQC="<<aQC<<", cQC="<<cQC<<", oQC="<<oQC<<G4endl;100 cout<<"G4QChipolino: aQC="<<aQC<<", cQC="<<cQC<<", oQC="<<oQC<<G4endl; 95 101 #endif 96 102 G4QPDGCode oQPDG(oQC); … … 99 105 G4double m=M1+M2; 100 106 #ifdef debug 101 cout<<"G4QChipolino: c="<<cQPDG<<",cM="<<M1<<",o="<<oQPDG<<",oM="<<M2107 cout<<"G4QChipolino: c="<<cQPDG<<",cM="<<M1<<",o="<<oQPDG<<",oM="<<M2 102 108 <<",cM+0M="<<m<<", curMinM="<<minM<<G4endl; 103 109 #endif … … 117 123 G4bool fl=nA>nQ; // Flag of antibaryon case 118 124 #ifdef pdebug 119 cout<<"G4QChipolino: Baryon case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC125 cout<<"G4QChipolino: Baryon case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC 120 126 <<",fl="<<fl<<G4endl; 121 127 #endif … … 145 151 } 146 152 #ifdef pdebug 147 cout<<"G4QChipolino: Baryon case minM="<<minM<<", M="<<theQCont1<<theQPDG1153 cout<<"G4QChipolino: Baryon case minM="<<minM<<", M="<<theQCont1<<theQPDG1 148 154 <<", B="<<theQPDG2<<G4endl; 149 155 #endif … … 152 158 { 153 159 if(ban) 154 {160 { 155 161 G4int nQ=rQC.GetQ(); 156 162 G4int nA=rQC.GetAQ(); 157 163 G4bool fl=nA>nQ; // Flag of anti-dibaryon case 158 164 #ifdef debug 159 cout<<"G4QChipolino: Di-Baryoncase nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC<<",fl="<<fl<<G4endl;165 cout<<"G4QChipolino: Di-Bar. case nQ="<<nQ<<",nA="<<nA<<",QC="<<rQC<<",fl="<<fl<<G4endl; 160 166 #endif 161 167 for (int i=0; i<4; i++) … … 189 195 theQPDG2 = oQPDG; 190 196 } 191 }192 }197 } 198 } 193 199 } 194 200 } 195 201 else // Baryon-AntiBaryon 196 {202 { 197 203 theQCont1 = rQC.IndQ(0)+rQC.IndQ(1)+rQC.IndQ(2); 198 204 theQPDG1.InitByQCont(theQCont1); 199 205 theQPDG2.InitByQCont(rQC.IndAQ(0)+rQC.IndAQ(1)+rQC.IndAQ(2)); 200 }206 } 201 207 } 202 208 else if(((rQC.GetU() )>(rQC.GetS() -4) && (rQC.GetD() )>(rQC.GetS() -4)) || … … 213 219 G4bool fl=nA>nQ; // Flag of anti-fragment case 214 220 #ifdef debug 215 cout<<"G4QChipolino: NucFragment case nQ="<<nQ<<",nAQ="<<nA<<", QC="<<rQC<<",fl="<<fl<<G4endl; 216 #endif 217 if((fl&&kS>1)||(!fl&&mS>1)) 221 G4cout<<"G4QChipolino: NucFragment case nQ="<<nQ<<",nAQ="<<nA<<", QC="<<rQC<<",fl="<<fl 222 <<G4endl; 223 #endif 224 if((fl&&kS>1)||(!fl&&mS>1)) 218 225 { 219 226 G4cerr<<"***G4QChipolino: ***Overfowed by strange quarks*** rQC="<<rQC<<G4endl; 220 //throw G4QException("G4QChipolino: NuclearFragment is overflowed by the strange quarks");227 //throw G4QException("G4QChipolino: NuclearFragment is overflowed by strangeQuarks"); 221 228 } 222 229 else if(fl) // ===> Anti-fragment 223 {230 { 224 231 //G4cerr<<"***G4QChipolino: ***Anti-nuclear fragments*** rQC="<<rQC<<G4endl; 225 //throw G4QException("G4QChipolino: Antinuclear fragments are not yet supported");226 if(!mS) // No strange quarks227 {228 G4int nI=mU-mD; // Isotopic shift232 //throw G4QException("G4QChipolino: Antinuclear fragments are not yet supported"); 233 if(!mS) // No strange quarks 234 { 235 G4int nI=mU-mD; // Isotopic shift 229 236 G4int nN=(mU+mD-nI*3)/6; 230 if(!kS) // No kaons231 {232 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary233 { 234 if(nI>0) // Excess of antiprotons235 { 236 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN)); // A Fragment-AProton237 theQPDG2 = G4QPDGCode(-2212); // An Anti-Proton238 } 239 else // Excess of a-neutrons240 { 241 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI)+nN-1)); // A Fragment-ANeutron242 theQPDG2 = G4QPDGCode(-2112); // An Anti-Neutron243 } 244 }245 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part246 {247 if(nI>0) // Excess of au-quarks248 { 249 theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI-2)+nN+1)); // A Fragment-AProton250 theQPDG2=G4QPDGCode(-2224); // An Anti-Delta++251 } 252 else // Excess of ad-quarks253 { 254 theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN-2)); // A Fragment-ANeutron255 theQPDG2=G4QPDGCode(-1114); // An Anti-Delta-256 } 257 }237 if(!kS) // No kaons 238 { 239 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary 240 { 241 if(nI>0) // Excess of antiprotons 242 { 243 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN));// A Fragment-AProton 244 theQPDG2 = G4QPDGCode(-2212); // An Anti-Proton 245 } 246 else // Excess of a-neutrons 247 { 248 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI)+nN-1));// A Fragment-ANeutron 249 theQPDG2 = G4QPDGCode(-2112); // An Anti-Neutron 250 } 251 } 252 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part 253 { 254 if(nI>0) // Excess of au-quarks 255 { 256 theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI-2)+nN+1));// A Fragment-AProton 257 theQPDG2=G4QPDGCode(-2224); // An Anti-Delta++ 258 } 259 else // Excess of ad-quarks 260 { 261 theQPDG1=G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN-2));// A Fragment-ANeutron 262 theQPDG2=G4QPDGCode(-1114); // An Anti-Delta- 263 } 264 } 258 265 else 259 {260 G4cerr<<"***G4QChipolino: **A**Isotopic asymmetry (without S)***rQC="<<rQC<<G4endl;261 //throw G4QException("G4QChipolino: IsotopicAsymmety of AntiMultyBaryonQuasmon");262 }263 } 264 else if(kS<2) // NucFrag+K is possible265 {266 { 267 G4cerr<<"***G4QChipolino:**A**IsotopicAsymmetry (without S),rQC="<<rQC<<G4endl; 268 //throw G4QException("G4QChipolino: IsotopicAsymmety of AntiMultyBar Quasmon"); 269 } 270 } 271 else if(kS<2) // NucFrag+K is possible 272 { 266 273 G4int nN =(mU+mD-4-nI*3)/6; 267 if(nI>0) // Excess of au-quarks274 if(nI>0) // Excess of au-quarks 268 275 { 269 276 nN+=1; 270 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN)); // An Anti-Fragment271 theQPDG2 = G4QPDGCode(-321); // A K- meson272 }277 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI-1)+nN)); // An Anti-Fragment 278 theQPDG2 = G4QPDGCode(-321); // A K- meson 279 } 273 280 else 274 {275 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN)); // An AntiFragment276 theQPDG2 = G4QPDGCode(-311); // An Anti-K0 meson277 } 278 }281 { 282 theQPDG1 = G4QPDGCode(-(90000000+1000*(nN+nI+1)+nN)); // An AntiFragment 283 theQPDG2 = G4QPDGCode(-311); // An Anti-K0 meson 284 } 285 } 279 286 else 280 {287 { 281 288 G4cerr<<"***G4QChipolino: ***Too many kaons are needed*** rQC="<<rQC<<G4endl; 282 //throw G4QException("G4QChipolino: Too many Kaons are needed for theAntiNucFragm");283 }284 }289 //throw G4QException("G4QChipolino: Too Many Kaons are needed for AntiNucFragm"); 290 } 291 } 285 292 else // Fragment with strangeness 286 {293 { 287 294 if(mS<=mU&&mS<=mD) // Fragment consisting of Neutrons, Protons & Lambrdas only 288 {289 G4int nI=mU-mD; // Isotopic shift295 { 296 G4int nI=mU-mD; // Isotopic shift 290 297 G4int nN=(mU+mD-mS-mS-nI*3)/6; 291 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary292 { 293 if(nI>0) // Excess of protons294 { 295 theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-1)+nN));// A Fragment-AProton296 theQPDG2 = G4QPDGCode(-2212); // An Anti-Proton297 } 298 else // Excess of neutrons299 { 300 theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI)+nN-1));// A Fragment-ANeutron301 theQPDG2 = G4QPDGCode(-2112); // An Anti-Neutron302 } 303 }304 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part305 {306 if(nI>0) // Excess of au-quarks307 { 308 theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-2)+nN+1));// A Fragment-AProton309 theQPDG2=G4QPDGCode(-2224); // An Anti-Delta++310 } 311 else // Excess of ad-quarks312 { 313 theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI+1)+nN-2));// A Fragment-ANeutron314 theQPDG2=G4QPDGCode(-1114); // An Anti-Delta-315 } 316 }298 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary 299 { 300 if(nI>0) // Excess of protons 301 { 302 theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-1)+nN));// Fragm-AProton 303 theQPDG2 = G4QPDGCode(-2212); // An Anti-Proton 304 } 305 else // Excess of neutrons 306 { 307 theQPDG1 = G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI)+nN-1));//Fragm-ANeutron 308 theQPDG2 = G4QPDGCode(-2112); // An Anti-Neutron 309 } 310 } 311 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part 312 { 313 if(nI>0) // Excess of au-quarks 314 { 315 theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI-2)+nN+1));//Fragm-AProton 316 theQPDG2=G4QPDGCode(-2224); // An Anti-Delta++ 317 } 318 else // Excess of ad-quarks 319 { 320 theQPDG1=G4QPDGCode(-(90000000+1000*(kS*1000+nN+nI+1)+nN-2));//Fragm-ANeutron 321 theQPDG2=G4QPDGCode(-1114); // An Anti-Delta- 322 } 323 } 317 324 else 318 {319 G4cerr<<"***G4QChipolino: **A**Isotopic assimetry (with S)*** rQC="<<rQC<<G4endl;320 //throw G4QException("G4QChipolino: Isotopics of Strange AntiMultyBaryonQuasmon");321 }322 }323 else // Excess of s-quarks324 {325 G4int lam=mU; // A#of Anti-Lambdas325 { 326 G4cerr<<"***G4QChipolino:**A**IsotopicAssimetry (with S)*** rQC="<<rQC<<G4endl; 327 //throw G4QException("G4QChipolino: Isotopics of Strange AntiMultyBarQuasmon"); 328 } 329 } 330 else // Excess of s-quarks 331 { 332 G4int lam=mU; // A#of Anti-Lambdas 326 333 if (lam>mD) lam=mD; 327 G4int lD=mD-lam; // Residual ad-quarks328 G4int lU=mU-lam; // Residual au-quarks329 G4int lS=mS-lam; // Residual as-quarks334 G4int lD=mD-lam; // Residual ad-quarks 335 G4int lU=mU-lam; // Residual au-quarks 336 G4int lS=mS-lam; // Residual as-quarks 330 337 if(lD+lU+lS!=3||lD<0||lU<0||lS<0) 331 { 332 G4cerr<<"***G4QChipolino:*AntiFragm* rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d"<<lD<<G4endl; 333 //throw G4QException("G4QChipolino: Exotic superstrange AntiMultyBaryon"); 334 } 335 if ( !lD && lU==2) theQPDG2=G4QPDGCode(-3222); // Anti-Sigma+ 336 else if( !lU && lD==2) theQPDG2=G4QPDGCode(-3112); // Anti-Sigma- 337 else if( !lD && lU==1) theQPDG2=G4QPDGCode(-3322); // Anti-Ksi0 338 else if( !lU && lD==1) theQPDG2=G4QPDGCode(-3312); // Anti-Ksi- 339 else theQPDG2=G4QPDGCode(-3334); // Anti-Omega- 340 theQPDG1=G4QPDGCode(-(90+lam)*1000000); // Anti Strange Matter 341 } 342 theQCont1 = rQC-theQPDG2.GetQuarkContent(); // QCont of Fragment-H 343 theQCont = rQC; // QCont of Chipolino 344 } 345 } 346 else // ===> Nuclear Fragment 347 { 348 if(!kS) // No strange quarks 349 { 350 G4int nI=kU-kD; // Isotopic shift 338 { 339 G4cerr<<"***G4QChipolino:*AntiFragment* rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d" 340 <<lD<<G4endl; 341 //throw G4QException("G4QChipolino: Exotic superstrange AntiMultyBaryon"); 342 } 343 if ( !lD && lU==2) theQPDG2=G4QPDGCode(-3222); // Anti-Sigma+ 344 else if( !lU && lD==2) theQPDG2=G4QPDGCode(-3112); // Anti-Sigma- 345 else if( !lD && lU==1) theQPDG2=G4QPDGCode(-3322); // Anti-Ksi0 346 else if( !lU && lD==1) theQPDG2=G4QPDGCode(-3312); // Anti-Ksi- 347 else theQPDG2=G4QPDGCode(-3334); // Anti-Omega- 348 theQPDG1=G4QPDGCode(-(90+lam)*1000000); // Anti Strange Matter 349 } 350 theQCont1 = rQC-theQPDG2.GetQuarkContent(); // QCont of Fragment-H 351 theQCont = rQC; // QCont of Chipolino 352 } 353 } 354 else // ===> Nuclear Fragment 355 { 356 if(!kS) // No strange quarks 357 { 358 G4int nI=kU-kD; // Isotopic shift 351 359 G4int nN=(kU+kD-nI*3)/6; 352 if(!mS) // No kaons353 {354 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary355 { 356 if(nI>0) // Excess of protons357 { 358 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN); // A Fragment-Proton359 theQPDG2 = G4QPDGCode(2212); // A Proton360 } 361 else // Excess of neutrons362 { 363 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI)+nN-1); // A Fragment-Neutron364 theQPDG2 = G4QPDGCode(2112); // A Neutron365 } 366 }367 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part368 {369 if(nI>0) // Excess of u-quarks370 { 371 theQPDG1=G4QPDGCode(90000000+1000*(nN+nI-2)+nN+1); // A Fragment-Proton372 theQPDG2=G4QPDGCode(2224); // A Delta++373 } 374 else // Excess of d-quarks375 { 376 theQPDG1=G4QPDGCode(90000000+1000*(nN+nI+1)+nN-2); // A Fragment-Neutron377 theQPDG2=G4QPDGCode(1114); // A Delta-378 } 379 }360 if(!mS) // No kaons 361 { 362 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary 363 { 364 if(nI>0) // Excess of protons 365 { 366 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN); // A Fragment-Proton 367 theQPDG2 = G4QPDGCode(2212); // A Proton 368 } 369 else // Excess of neutrons 370 { 371 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI)+nN-1); // A Fragment-Neutron 372 theQPDG2 = G4QPDGCode(2112); // A Neutron 373 } 374 } 375 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part 376 { 377 if(nI>0) // Excess of u-quarks 378 { 379 theQPDG1=G4QPDGCode(90000000+1000*(nN+nI-2)+nN+1); // A Fragment-Proton 380 theQPDG2=G4QPDGCode(2224); // A Delta++ 381 } 382 else // Excess of d-quarks 383 { 384 theQPDG1=G4QPDGCode(90000000+1000*(nN+nI+1)+nN-2); // A Fragment-Neutron 385 theQPDG2=G4QPDGCode(1114); // A Delta- 386 } 387 } 380 388 else 381 {382 G4cerr<<"***G4QChipolino: ***Isotopic assimetry (without S)***rQC="<<rQC<<G4endl;383 //throw G4QException("G4QChipolino: Exotic Isotopic assimety of MultyBaryonQuasmon");384 }385 } 386 else if(mS<2) // NucFrag+K is possible387 {389 { 390 G4cerr<<"***G4QChipolino:***Isotopic assimetry (without S), rQC="<<rQC<<G4endl; 391 //throw G4QException("G4QChipolino:ExoticIsotopicAssimety of MultyBarQuasmon"); 392 } 393 } 394 else if(mS<2) // NucFrag+K is possible 395 { 388 396 G4int nN =(kU+kD-4-nI*3)/6; 389 if(nI>0) // Excess of u-quarks397 if(nI>0) // Excess of u-quarks 390 398 { 391 399 nN+=1; 392 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN); // A Fragment393 theQPDG2 = G4QPDGCode(321); // A K+ meson394 }400 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI-1)+nN); // A Fragment 401 theQPDG2 = G4QPDGCode(321); // A K+ meson 402 } 395 403 else 396 {397 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI+1)+nN); // A Fragment398 theQPDG2 = G4QPDGCode(311); // A K0 meson399 } 400 }404 { 405 theQPDG1 = G4QPDGCode(90000000+1000*(nN+nI+1)+nN); // A Fragment 406 theQPDG2 = G4QPDGCode(311); // A K0 meson 407 } 408 } 401 409 else 402 {410 { 403 411 G4cerr<<"***G4QChipolino: ***Too many kaons are needed*** rQC="<<rQC<<G4endl; 404 //throw G4QException("G4QChipolino: More than one Kaon is needed for theNuclFragm");405 }406 }412 //throw G4QException("G4QChipolino: More than one Kaon is needed for NuclFragm"); 413 } 414 } 407 415 else // Fragment with strangeness 408 {416 { 409 417 if(kS<=kU&&kS<=kD) // Fragment consisting of Neutrons, Protons & Lambrdas only 410 {411 G4int nI=kU-kD; // Isotopic shift418 { 419 G4int nI=kU-kD; // Isotopic shift 412 420 G4int nN=(kU+kD-kS-kS-nI*3)/6; 413 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary414 { 415 if(nI>0) // Excess of protons416 { 417 theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI-1)+nN);// AFragment-Proton418 theQPDG2 = G4QPDGCode(2212); // A Proton419 } 420 else // Excess of neutrons421 { 422 theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI)+nN-1);// AFragment-Neutron423 theQPDG2 = G4QPDGCode(2112); // A Neutron424 } 425 }426 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part427 {428 if(nI>0) // Excess of u-quarks429 { 430 theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI-2)+nN+1);// AFragment-Proton431 theQPDG2=G4QPDGCode(2224); // A Delta++432 } 433 else // Excess of d-quarks434 { 435 theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI+1)+nN-2);// AFragment-Neutron436 theQPDG2=G4QPDGCode(1114); // A Delta-437 } 438 }421 if((nI>=0&&nN>=0)||(nI<0&&nN>=-nI)) // Delta isn't necessary 422 { 423 if(nI>0) // Excess of protons 424 { 425 theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI-1)+nN);// Fragment-Proton 426 theQPDG2 = G4QPDGCode(2212); // A Proton 427 } 428 else // Excess of neutrons 429 { 430 theQPDG1 = G4QPDGCode(90000000+1000*(kS*1000+nN+nI)+nN-1);// Fragment-Neutron 431 theQPDG2 = G4QPDGCode(2112); // A Neutron 432 } 433 } 434 else if((nI>=0&&nN>-2)||(nI<0&&nN>-nI-2)) // Delta can be a part 435 { 436 if(nI>0) // Excess of u-quarks 437 { 438 theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI-2)+nN+1);// Fragment-Proton 439 theQPDG2=G4QPDGCode(2224); // A Delta++ 440 } 441 else // Excess of d-quarks 442 { 443 theQPDG1=G4QPDGCode(90000000+1000*(kS*1000+nN+nI+1)+nN-2);// Fragment-Neutron 444 theQPDG2=G4QPDGCode(1114); // A Delta- 445 } 446 } 439 447 else 440 {448 { 441 449 G4cerr<<"***G4QChipolino: ***Isotopic assimetry (with S)*** rQC="<<rQC<<G4endl; 442 //throw G4QException("G4QChipolino: IsotopicAssimety of StrangeMultyBaryon Quasmon");443 }444 }445 else // Excess of s-quarks446 {447 G4int lam=kU; // A#of Lambda450 //throw G4QException("G4QChipolino:IsotopicAssimety of StrangeMultyBar Quasm"); 451 } 452 } 453 else // Excess of s-quarks 454 { 455 G4int lam=kU; // A#of Lambda 448 456 if (lam>kD) lam=kD; 449 G4int lD=kD-lam; // Residual d-quarks450 G4int lU=kU-lam; // Residual u-quarks451 G4int lS=kS-lam; // Residual s-quarks457 G4int lD=kD-lam; // Residual d-quarks 458 G4int lU=kU-lam; // Residual u-quarks 459 G4int lS=kS-lam; // Residual s-quarks 452 460 if(lD+lU+lS!=3||lD<0||lU<0||lS<0) 453 { 454 G4cerr<<"***G4QChipolino:*Fragment*rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d"<<lD<<G4endl; 455 //throw G4QException("G4QChipolino: Exotic superstrange Multy Baryon"); 456 } 457 if ( !lD && lU==2) theQPDG2=G4QPDGCode(3222); // Sigma+ 458 else if( !lU && lD==2) theQPDG2=G4QPDGCode(3112); // Sigma- 459 else if( !lD && lU==1) theQPDG2=G4QPDGCode(3322); // Ksi0 460 else if( !lU && lD==1) theQPDG2=G4QPDGCode(3312); // Ksi- 461 else theQPDG2=G4QPDGCode(3334); // Omega- 462 theQPDG1=G4QPDGCode((90+lam)*1000000); // A Strange Matter 463 } 464 theQCont1 = rQC-theQPDG2.GetQuarkContent(); // QCont of Fragment-H 465 theQCont = rQC; // QCont of Chipolino 466 } 467 } 461 { 462 G4cerr<<"***G4QChipolino:*Fragment*rQC="<<rQC<<",s="<<lS<<",u="<<lU<<",d" 463 <<lD<<G4endl; 464 //throw G4QException("G4QChipolino: Exotic superstrange Multy Baryon"); 465 } 466 if ( !lD && lU==2) theQPDG2=G4QPDGCode(3222); // Sigma+ 467 else if( !lU && lD==2) theQPDG2=G4QPDGCode(3112); // Sigma- 468 else if( !lD && lU==1) theQPDG2=G4QPDGCode(3322); // Ksi0 469 else if( !lU && lD==1) theQPDG2=G4QPDGCode(3312); // Ksi- 470 else theQPDG2=G4QPDGCode(3334); // Omega- 471 theQPDG1=G4QPDGCode((90+lam)*1000000); // Strange Matter 472 } 473 theQCont1 = rQC-theQPDG2.GetQuarkContent(); // QCont of Fragment-H 474 theQCont = rQC; // QCont of Chipolino 475 } 476 } 468 477 } 469 478 else 470 479 { 471 480 G4cerr<<"***G4QChipolino: ***Exotics*** rQC="<<rQC<<G4endl; 472 //throw G4QException("G4QChipolino: can not be constructed for theexotic baryon or meson");481 //throw G4QException("G4QChipolino: can't be constructed for exotic baryon or meson"); 473 482 } 474 483 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QContent.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QContent.cc,v 1.4 4 2008/03/20 20:11:37 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QContent.cc,v 1.45 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QContent ---------------- … … 32 32 // class for Quasmon initiated Contents used by CHIPS Model 33 33 // -------------------------------------------------------------------- 34 // Short description: This is the basic class of the CHIPS model. It 35 // describes the quark content of the Quasmon, which is a generalized 36 // hadronic state. All Quasmons are bags, characterized by the quark 37 // Content (QContent), but the spin is not fixed and only light (u,d,s) 38 // quarks are considered (SU(3)). The hadrons are the ground states for 39 // the corresponding quasmons. The Chipolino (G4QChipolino) or nuclear 40 // cluster are examples for another Quark Content. 41 // -------------------------------------------------------------------- 34 42 // @@ In future total spin & c,b,t of the Hadron can be added @@ M.K.@@ 43 // -------------------------------------------------------------------- 35 44 36 45 //#define debug … … 93 102 nAD = right.nAD; 94 103 nAS = right.nAS; 95 }104 } 96 105 return *this; 97 106 } … … 135 144 G4int dAU=rAU-nAU; 136 145 if(dU>0||dAU>0) 137 {146 { 138 147 G4int kU=dU; 139 148 if(kU<dAU) kU=dAU; // Get biggest difference … … 141 150 if(rAU<mU) mU=rAU; // Get a#of possible SS pairs 142 151 if(kU<=mU) // Total compensation 143 {152 { 144 153 rU-=kU; 145 154 rAU-=kU; … … 158 167 G4int dAD=rAD-nAD; 159 168 if(dD>0||dAD>0) 160 {169 { 161 170 G4int kD=dD; 162 171 if(kD<dAD) kD=dAD; // Get biggest difference … … 164 173 if(rAD<mD) mD=rAD; // Get a#of possible SS pairs 165 174 if(kD<=mD) // Total compensation 166 {175 { 167 176 rD-=kD; 168 177 rAD-=kD; … … 190 199 rU +=1; 191 200 rAU+=1; 192 }201 } 193 202 else 194 203 { 195 204 rD +=1; 196 205 rAD+=1; 197 }206 } 198 207 } 199 208 nD -= rD; … … 258 267 G4int dAU=rAU-nAU; 259 268 if(dU>0||dAU>0) 260 {269 { 261 270 G4int kU=dU; 262 271 if(kU<dAU) kU=dAU; // Get biggest difference … … 264 273 if(rAU<mU) mU=rAU; // Get a#of possible SS pairs 265 274 if(kU<=mU) // Total compensation 266 {275 { 267 276 rU-=kU; 268 277 rAU-=kU; … … 281 290 G4int dAD=rAD-nAD; 282 291 if(dD>0||dAD>0) 283 {292 { 284 293 G4int kD=dD; 285 294 if(kD<dAD) kD=dAD; // Get biggest difference … … 287 296 if(rAD<mD) mD=rAD; // Get a#of possible SS pairs 288 297 if(kD<=mD) // Total compensation 289 {298 { 290 299 rD-=kD; 291 300 rAD-=kD; … … 310 319 rU +=1; 311 320 rAU+=1; 312 }321 } 313 322 else 314 323 { 315 324 rD +=1; 316 325 rAD+=1; 317 }326 } 318 327 } 319 328 nD -= rD; … … 507 516 if((tot!=4||q!=2) && (tot!=5||(q!=1&&aq!=1)) && (tot!=6||abs(b)!=2)) 508 517 { 509 //#ifdef erdebug518 //#ifdef erdebug 510 519 G4cerr<<"***G4QCont::SplitChipo: QC="<<GetThis()<<G4endl; 511 //#endif520 //#endif 512 521 } 513 522 else if(tot==4) // Mesonic (eight possibilities) … … 519 528 else 520 529 { 521 //#ifdef debug530 //#ifdef debug 522 531 G4cerr<<"***G4QCont::SplitChipo:MesTot="<<tot<<",b="<<b<<",q="<<q<<",a="<<aq<<G4endl; 523 //#endif532 //#endif 524 533 } 525 534 } … … 527 536 { 528 537 if(nU==3) 529 {538 { 530 539 r.SetU(1); 531 540 r+=IndAQ(); 532 541 } 533 542 else if(nD==3) 534 {543 { 535 544 r.SetD(1); 536 545 r+=IndAQ(); 537 546 } 538 547 else if(nS==3) 539 {548 { 540 549 r.SetS(1); 541 550 r+=IndAQ(); 542 551 } 543 552 else if(nAU==3) 544 {553 { 545 554 r.SetAU(1); 546 555 r+=IndQ(); 547 556 } 548 557 else if(nAD==3) 549 {558 { 550 559 r.SetAD(1); 551 560 r+=IndQ(); 552 561 } 553 562 else if(nAS==3) 554 {563 { 555 564 r.SetAS(1); 556 565 r+=IndQ(); 557 566 } 558 567 else if(q==1&&nU) 559 {568 { 560 569 r.SetU(1); 561 570 if(nAU) r.SetAU(1); … … 563 572 } 564 573 else if(q==1&&nD) 565 {574 { 566 575 r.SetD(1); 567 576 if(nAD) r.SetAD(1); … … 569 578 } 570 579 else if(q==1&&nS) 571 {580 { 572 581 r.SetS(1); 573 582 if(nAS) r.SetAS(1); … … 575 584 } 576 585 else if(aq==1&&nAU) 577 {586 { 578 587 r.SetAU(1); 579 588 if(nU) r.SetU(1); … … 581 590 } 582 591 else if(aq==1&&nAD) 583 {592 { 584 593 r.SetAD(1); 585 594 if(nD) r.SetD(1); … … 587 596 } 588 597 else if(aq==1&&nAS) 589 {598 { 590 599 r.SetAS(1); 591 600 if(nS) r.SetS(1); … … 594 603 else 595 604 { 596 //#ifdef erdebug605 //#ifdef erdebug 597 606 G4cerr<<"***G4QCont::SplitChipo: Baryonic tot=5,b=1,qCont="<<GetThis()<<G4endl; 598 607 //#endif … … 603 612 r=GetThis(); 604 613 if (bn>0) // baryonium 605 {614 { 606 615 G4QContent la(1,1,1,0,0,0); 607 616 G4QContent nt(2,1,0,0,0,0); … … 621 630 else 622 631 { 623 //#ifdef erdebug632 //#ifdef erdebug 624 633 G4cerr<<"***G4QCont::SplitChipo:Dibar (1) tot=6, b=2, qCont="<<GetThis()<<G4endl; 625 634 //#endif … … 635 644 else 636 645 { 637 //#ifdef erdebug646 //#ifdef erdebug 638 647 G4cerr<<"***G4QContent::SplitChipo:Dib(2) tot=6, b=2, qCont="<<GetThis()<<G4endl; 639 648 //#endif … … 649 658 else 650 659 { 651 //#ifdef erdebug660 //#ifdef erdebug 652 661 G4cerr<<"***G4QContent::SplitChipo:Dib(3) tot=6, b=2, qCont="<<GetThis()<<G4endl; 653 662 //#endif 654 663 } 655 664 } 656 }665 } 657 666 else // Anti-baryonium 658 {667 { 659 668 G4QContent la(0,0,0,1,1,1); 660 669 G4QContent pr(0,0,0,1,2,0); … … 674 683 else 675 684 { 676 //#ifdef erdebug685 //#ifdef erdebug 677 686 G4cerr<<"***G4QContent::SplitChipo:ADib(1) tot=6,b=2, qCont="<<GetThis()<<G4endl; 678 687 //#endif … … 688 697 else 689 698 { 690 //#ifdef erdebug699 //#ifdef erdebug 691 700 G4cerr<<"***G4QContent::SplitChipo:ADib(2) tot=6,b=2, qCont="<<GetThis()<<G4endl; 692 701 //#endif … … 702 711 else 703 712 { 704 //#ifdef erdebug713 //#ifdef erdebug 705 714 G4cerr<<"***G4QContent::SplitChipo:ADib(3) tot=6,b=2, qCont="<<GetThis()<<G4endl; 706 715 //#endif 707 716 } 708 717 } 709 }718 } 710 719 } 711 720 else // More than Dibaryon (@@ can use the same algorithm as for dibaryon) … … 779 788 G4int res=tot+nQAQ; 780 789 #ifdef pdebug 781 G4cout<<"G4QC::DecQC: tot="<<tot<<", nTP="<<nTotP<<", res="<<res<<G4endl;790 G4cout<<"G4QC::DecQC: tot="<<tot<<", nTP="<<nTotP<<", res="<<res<<G4endl; 782 791 #endif 783 792 if(res<0) … … 810 819 G4int j = static_cast<int>(base*G4UniformRand()); // Random integer "SortOfQuark" 811 820 if (nUP && j<nUP && (nRet>2 || nUP>1 || (nD<2 && nS<2)))// --- U-Ubar pair 812 {821 { 813 822 #ifdef pdebug 814 823 G4cout<<"G4QC::DecQC: decrementing UAU pair UP="<<nUP<<", QC="<<GetThis()<<G4endl; … … 819 828 nLP--; 820 829 nTotP--; 821 }830 } 822 831 else if (nDP && j<nLP && (nRet>2 || nDP>1 || (nU<2 && nS<2)))// --- D-Ubar pair 823 {832 { 824 833 #ifdef pdebug 825 834 G4cout<<"G4QC::DecQC: decrementing DAD pair DP="<<nDP<<", QC="<<GetThis()<<G4endl; … … 830 839 nLP--; 831 840 nTotP--; 832 }841 } 833 842 else if (nSP&& (nRet>2 || nSP>1 || (nU<2 && nD<2))) // --- S-Sbar pair 834 {843 { 835 844 #ifdef pdebug 836 845 G4cout<<"G4QC::DecQC: decrementing SAS pair SP="<<nSP<<", QC="<<GetThis()<<G4endl; … … 840 849 nSP--; 841 850 nTotP--; 842 }851 } 843 852 else if (nUP) // --- U-Ubar pair cancelation (final) 844 {853 { 845 854 #ifdef pdebug 846 855 G4cout<<"G4QC::DecQC:Decrement UAU pair (final) UP="<<nUP<<",QC="<<GetThis()<<G4endl; … … 851 860 nLP--; 852 861 nTotP--; 853 }862 } 854 863 else if (nDP) // --- D-Ubar pair cancelation (final) 855 {864 { 856 865 #ifdef pdebug 857 866 G4cout<<"G4QC::DecQC:Decrement DAD pair (final) DP="<<nDP<<",QC="<<GetThis()<<G4endl; … … 862 871 nLP--; 863 872 nTotP--; 864 }873 } 865 874 else if (nSP) // --- S-Sbar pair cancelation (final) 866 {875 { 867 876 #ifdef pdebug 868 877 G4cout<<"G4QC::DecQC: decrementing SAS pair SP="<<nSP<<", QC="<<GetThis()<<G4endl; … … 872 881 nSP--; 873 882 nTotP--; 874 }883 } 875 884 else G4cout<<"***G4QC::DecQC:i="<<i<<",j="<<j<<",D="<<nDP<<",U="<<nUP<<",S="<<nSP 876 885 <<",T="<<nTotP<<",nRet="<<nRet<<", QC="<<GetThis()<<G4endl; … … 894 903 #endif 895 904 //if (!j) 896 if ( !j && (nU<=nD || nU<=nS))905 if ( !j && (nU<=nD || nU<=nS)) 897 906 { 898 907 nU++; 899 908 nAU++; 900 909 tot+=2; 901 }910 } 902 911 //else if (j==1) 903 else if (j==1 && (nD<=nU || nD<=nS))904 {912 else if (j==1 && (nD<=nU || nD<=nS)) 913 { 905 914 nD++; 906 915 nAD++; 907 916 tot+=2; 908 }917 } 909 918 //else 910 else if (j>1&& (nS<=nU || nS<=nD))919 else if (j>1&& (nS<=nU || nS<=nD)) 911 920 { 912 921 nS++; 913 922 nAS++; 914 923 tot+=2; 915 }924 } 916 925 else if (!j) 917 {926 { 918 927 nD++; 919 928 nAD++; 920 929 tot+=2; 921 }930 } 922 931 else if (j==1) 923 {932 { 924 933 nU++; 925 934 nAU++; … … 931 940 nAS++; 932 941 tot+=2; 933 }942 } 934 943 //else if (nD<=nU) 935 //{944 //{ 936 945 // nD++; 937 946 // nAD++; 938 947 // tot+=2; 939 //}948 //} 940 949 //else 941 //{950 //{ 942 951 // nU++; 943 952 // nAU++; … … 1086 1095 G4int dD=nD+nD; 1087 1096 if(n>dD) 1088 {1097 { 1089 1098 mD=0; 1090 1099 n-=dD; 1091 }1100 } 1092 1101 else if (n==dD) 1093 {1102 { 1094 1103 mD=2; 1095 1104 n=2; 1096 }1105 } 1097 1106 else 1098 1107 { … … 1107 1116 G4int dU=nU+nU; 1108 1117 if(n>dU) 1109 {1118 { 1110 1119 mU=0; 1111 1120 n-=dU; 1112 }1121 } 1113 1122 else if (n==dU) 1114 {1123 { 1115 1124 mU=2; 1116 1125 n=2; 1117 }1126 } 1118 1127 else 1119 1128 { … … 1128 1137 G4int dS=nS+nS; 1129 1138 if(n>dS) 1130 {1139 { 1131 1140 mS=0; 1132 1141 n-=dS; 1133 }1142 } 1134 1143 else if (n==dS) 1135 {1144 { 1136 1145 mS=2; 1137 1146 n=2; 1138 }1147 } 1139 1148 else 1140 1149 { … … 1156 1165 G4int ab=abs(b); 1157 1166 if(ab>=2 && n>=6) // Multi-Baryonium (NuclearFragment) 1158 {1167 { 1159 1168 G4int mI=nU-nAU-nD+nAD; 1160 1169 //if (abs(mI)>3||mS>3||(b>0&&s<-1)||(b<0&&s>1)) return 0; … … 1165 1174 || (b < 0 && s > 0)) return GetZNSPDGCode(); 1166 1175 else if(mU>=mS&&mD>=mS&&mU+mD+mS==3*b) // Possible Unary Nuclear Cluster 1167 {1176 { 1168 1177 G4int mZ=(mU+mD-mS-mS+3*mI)/6; 1169 1178 p = 90000000+1000*(1000*mS+mZ)+mZ-mI; 1170 1179 if(b>0) return p; 1171 1180 else return -p; 1172 }1181 } 1173 1182 else return 10; 1174 }1183 } 1175 1184 // Normal One Baryon States: Heavy quark should come first 1176 1185 if(n>5) return GetZNSPDGCode(); //B+M+M Tripolino etc 1177 1186 if(n==5) return 10; //B+M Chipolino 1178 1187 if(mS>0) // Strange Baryons 1179 {1188 { 1180 1189 p=3002; 1181 1190 if (mS==3) p+=332; // Decuplet … … 1185 1194 else if (mU==0 && mD==1) p+=310; 1186 1195 else 1187 {1196 { 1188 1197 #ifdef debug 1189 1198 G4cout<<"**G4QC::SPDG:ExoticBSS,U="<<mU<<",D="<<mD<<",S="<<mS<<GetThis()<<G4endl; … … 1191 1200 return GetZNSPDGCode(); 1192 1201 } 1193 }1202 } 1194 1203 else if (mS==1) 1195 1204 { … … 1204 1213 return GetZNSPDGCode(); 1205 1214 } 1206 }1215 } 1207 1216 else // Superstrange case 1208 1217 { … … 1212 1221 return GetZNSPDGCode(); 1213 1222 } 1214 }1223 } 1215 1224 else if (mU>0) // Not Strange Baryons 1216 {1225 { 1217 1226 p=2002; 1218 1227 if (mU==3 && mD==0) p+=222; // Decuplet … … 1226 1235 return GetZNSPDGCode(); 1227 1236 } 1228 }1237 } 1229 1238 else if (mD==3) p=1114; // Decuplet 1230 1239 else … … 1234 1243 #endif 1235 1244 return GetZNSPDGCode(); 1236 }1245 } 1237 1246 if (b<0) p=-p; 1238 1247 } … … 1248 1257 #endif 1249 1258 return 0; 1250 }1259 } 1251 1260 if(n==4) return 10; // M+M Chipolino 1252 1261 if(abs(s)>1) 1253 {1262 { 1254 1263 #ifdef debug 1255 1264 G4cout<<"**G4QC::SPDG:Stran="<<s<<",QC="<<GetThis()<<" - Superstrange Meson"<<G4endl; 1256 1265 #endif 1257 1266 return 0; 1258 }1267 } 1259 1268 // Heavy quark should come first 1260 1269 if(mS>0) // Strange Mesons 1261 {1270 { 1262 1271 p=301; 1263 1272 if (mS==2) … … 1276 1285 return 0; 1277 1286 } 1278 }1287 } 1279 1288 else if (mU>0) // Isotopic Mesons 1280 {1289 { 1281 1290 p=201; 1282 1291 //if (mU==2 && mD==0) p=221; // Performance problems … … 1284 1293 else if (mU==1 && mD==1) p+=10; 1285 1294 else 1286 {1295 { 1287 1296 #ifdef debug 1288 1297 G4cout<<"*G4QC::SPDG:ExMU U="<<mU<<",D="<<mD<<",S="<<mS<<",QC="<<GetThis()<<G4endl; … … 1290 1299 return 0; 1291 1300 } 1292 }1301 } 1293 1302 else if (mD==2) p=111; 1294 1303 else … … 1330 1339 if (j<=0) return 0; 1331 1340 if(mD>1||j>1) for (int i=1; i<=mD; i++) 1332 {1341 { 1333 1342 if(!j) return 0; 1334 1343 c*=j/i; 1335 1344 j--; 1336 1345 } 1337 } ;1346 } 1338 1347 if(mU>0) 1339 1348 { … … 1341 1350 if (j<=0) return 0; 1342 1351 if(mU>1||j>1) for (int i=1; i<=mU; i++) 1343 {1352 { 1344 1353 if(!j) return 0; 1345 1354 c*=j/i; 1346 1355 j--; 1347 1356 } 1348 } ;1357 } 1349 1358 if(mS>0) 1350 1359 { … … 1352 1361 if (j<=0) return 0; 1353 1362 if(mS>1||j>1) for (int i=1; i<=mS; i++) 1354 {1363 { 1355 1364 if(!j) return 0; 1356 1365 c*=j/i; 1357 1366 j--; 1358 1367 } 1359 } ;1368 } 1360 1369 if(mAD>0) 1361 1370 { … … 1363 1372 if (j<=0) return 0; 1364 1373 if(mAD>1||j>1) for (int i=1; i<=mAD; i++) 1365 {1374 { 1366 1375 if(!j) return 0; 1367 1376 c*=j/i; 1368 1377 j--; 1369 1378 } 1370 } ;1379 } 1371 1380 if(mAU>0) 1372 1381 { … … 1374 1383 if (j<=0) return 0; 1375 1384 if(mAU>1||j>1) for (int i=1; i<=mAU; i++) 1376 {1385 { 1377 1386 if(!j) return 0; 1378 1387 c*=j/i; 1379 1388 j--; 1380 1389 } 1381 } ;1390 } 1382 1391 if(mAS>0) 1383 1392 { … … 1385 1394 if (j<=0) return 0; 1386 1395 if(mAS>1||j>1) for (int i=1; i<=mAS; i++) 1387 {1396 { 1388 1397 if(!j) return 0; 1389 1398 c*=j/i; 1390 1399 j--; 1391 1400 } 1392 }; 1393 1401 } 1394 1402 return c; 1395 1403 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QDecayChan.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QDecayChan.cc,v 1.2 7 2006/11/27 10:44:54 mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QDecayChan.cc,v 1.28 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QDecayChan ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for Decay Channels of Hadrons in CHIPS Model 33 // ------------------------------------------------------------------- 34 // Short description: In the CHIPS World the particles (G4QParticle) 35 // are defined. For unstable particles there is a G4QDecayChannelVector 36 // which describes different channels of decay for the particular 37 // particle. So the G4QDecayChannel class is the class for the description 38 // of such a decay channel in two or three particles (the secondaries can 39 // be unstable too and have firther decay). 33 40 // ------------------------------------------------------------------- 34 41 … … 58 65 } 59 66 #ifdef debug 60 cout<<"G4QDecayChan is defined with pL="<<pLev<<",1="<<PDG1<<",2="<<PDG2<<",3="<<PDG361 <<",m1="<<firstPDG->GetMass()<<",m2="<<secondPDG->GetMass()<<",minM="<<theMinMass<< endl;67 G4cout<<"G4QDecayChan is defined with pL="<<pLev<<",1="<<PDG1<<",2="<<PDG2<<",3="<<PDG3 68 <<",m1="<<firstPDG->GetMass()<<",m2="<<secondPDG->GetMass()<<",minM="<<theMinMass<<G4endl; 62 69 #endif 63 70 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QEnvironment.cc
r1007 r1055 28 28 // 29 29 // 30 // $Id: G4QEnvironment.cc,v 1.1 37 2008/03/31 20:30:00 dennisExp $31 // GEANT4 tag $Name: geant4-09-0 2$30 // $Id: G4QEnvironment.cc,v 1.144 2009/05/26 14:40:20 mkossov Exp $ 31 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 32 32 // 33 33 // ---------------- G4QEnvironment ---------------- … … 35 35 // class for Multy Quasmon Environment used by the CHIPS Model 36 36 // ------------------------------------------------------------ 37 // Short description: The G4QEnvironment class corresponds to the nuclear 38 // environment, containing excited nucleons or nuclear clusters 39 // (G4Quasmons). In the constructer the nucleus (G4QNucleus) is clusterized 40 // and then the projectile hadron (or hadrons) can create one (or a few) 41 // Quasmons, which are fragmented by the Fragment member function. As a 42 // result a vector of G4QHadrons is created, which can include the residual 43 // nucleus in the ground state. 44 //--------------------------------------------------------------------- 37 45 38 46 //#define debug … … 66 74 tot4Mom=G4LorentzVector(0.,0.,0.,envM); 67 75 #ifdef debug 68 G4cout<<"G4QEnviron::Const: t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;76 G4cout<<"G4QEnviron::Const: t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl; 69 77 #endif 70 78 } … … 88 96 //throw G4QException("***G4QEnvironment: There is no one projectile or vacuum target"); 89 97 if(nHadrons) // The projectiles are copied to the output 90 {98 { 91 99 for(G4int ih=0; ih<nHadrons; ih++) 92 100 { … … 99 107 theProjectiles.push_back(curQH); // Remenber it for the error message 100 108 } 101 }109 } 102 110 else if(targPDG!=90000000) // No projHadrons,fill targetNucleus to output 103 111 { … … 165 173 #endif 166 174 if(nHadrons==1) 167 {175 { 168 176 G4QHadron* opHad=projHadrons[0]; 169 177 G4int opPDG=opHad->GetPDGCode(); … … 172 180 #endif 173 181 if(opPDG==22) // *** Check photon's NuclearSplitThreshold 174 {182 { 175 183 G4double exMass=tot4Mom.m(); 176 184 #ifdef pdebug … … 178 186 #endif 179 187 if(exMass<targM+135.977) // Nucleus is below the pion production threshold 180 {188 { 181 189 G4QNucleus exEnviron(tot4Mom,targPDG); 182 190 // @@ One can put here the pbpt= (M.K.) @@ What about d,t,alpha splitting? 183 191 if(targM>999.&&!exEnviron.SplitBaryon())//Nucleus is below SplitFragmentThreshold 184 {192 { 185 193 #ifdef pdebug 186 194 G4cout<<"G4QEnv::Const:Photon's added to Output, Env="<<theEnvironment<<G4endl; … … 192 200 theQHadrons.push_back(photon); // (delete equivalent) 193 201 return; 194 }202 } 195 203 else if(targM<=999.) // Target is a nucleon 196 {204 { 197 205 G4LorentzVector prot4m(0.,0.,0.,targM); // Prototype of secondary proton 4mom 198 206 G4LorentzVector gam4m(0.,0.,0.,0.); // Prototype for secondary gamma 4mom … … 222 230 } 223 231 else if(opPDG==13 || opPDG==15) 224 {232 { 225 233 G4int nuPDG=14; 226 234 if(opPDG==15) nuPDG=16; 227 G4LorentzVector mu4m=opHad->Get4Momentum();235 G4LorentzVector mu4m=opHad->Get4Momentum(); 228 236 //G4double qpen=-180.*log(G4UniformRand()); // Energy of target-quark-parton(T=180) 229 237 G4double qpen=465.*sqrt(sqrt(G4UniformRand())); // UniformDistr for 3-q nucleon … … 268 276 G4cout<<"--G4QEnv::Const:M="<<tm<<",GSM=="<<fnm<<G4endl; 269 277 #endif 270 }271 fnN.Set4Momentum(fn4m);278 } 279 fnN.Set4Momentum(fn4m); 272 280 // (mu,q->nu,q) reaction succeded and Neutrino can be pushed to Output 273 281 G4QHadron* neutrino = 0; // NeutrinoPrototype to be filled to Output … … 276 284 #endif 277 285 if(tm<fnm) // Final Nucleus is below the GS threshold 278 {286 { 279 287 qf4m=G4LorentzVector(0.,0.,0.,fnm); // Final nucleus 4M for the final decay 280 288 qt4m=tg4m+mu4m; … … 303 311 theQHadrons.push_back(neutrino); // (delete equivalent) 304 312 if(tm<fnm+135.98) // FinalNucleus is below thePionThreshold(HE) 305 {313 { 306 314 if(!fnN.SplitBaryon()) // Final Nucleus is below the splittingFragmentThreshold 307 {315 { 308 316 #ifdef mudebug 309 317 G4cout<<"G4QEnv::Const: impossible to split nucleon after mu->nu"<<G4endl; … … 331 339 theEnvironment.InitByPDG(90000000);// Create nuclear environment 332 340 return; 333 }334 }341 } 342 } 335 343 // At this poin it is possible to convert mu- to pi- 336 344 fn4m=qf4m-qi4m; … … 351 359 #endif 352 360 if(!hNFrag&&ch4M.e()>0.) // => "Final hadron" case 353 {361 { 354 362 G4int envPDG=theEnvironment.GetPDG(); 355 363 if(envPDG==90000000||(theEnvironment.Get4Momentum().m2())<1.) // ==>"Vacuum" … … 367 375 G4int hQ = curHadr->GetQCode(); // One more check for valid of the QHadron 368 376 if(hQ<0) 369 {377 { 370 378 //G4cerr<<"--Warning--G4QEnv::Constructor:Q<0, PDG=("<<ih<<")"<<hPDG<<G4endl; 371 379 //throw G4QException("***G4QEnvironment::Constructor:theInputHadron is bad"); 372 }380 } 373 381 else 374 382 { … … 393 401 } 394 402 else // Nuclear Environment still exists 395 {403 { 396 404 G4QContent hQC = curHadr->GetQC(); 397 405 #ifdef pdebug … … 400 408 #endif 401 409 CreateQuasmon(hQC, ch4M,fake); 402 } // End of Existing Nuclear Environment case403 } // End of final hadron case410 } // End of Existing Nuclear Environment case 411 } // End of final hadron case 404 412 } // End of the LOOP over input hadrons 405 413 } // End of nuclear target case (including neutron=90000001 & proton=90001000) … … 419 427 G4int hQ = curHadr->GetQCode(); // One more check for valid of the QHadron 420 428 if(hQ<0) 421 {429 { 422 430 G4cout<<"---Warning---G4QEnviron::Constructor:Vacuum,Q<0, 1st HPDG="<<hPDG<<G4endl; 423 431 //throw G4QException("***G4QEnvironment::Constructor:theFirstInputHadron's wrong"); 424 }432 } 425 433 else // Now we can get 4Mom & QC of incedent particle 426 434 { … … 431 439 G4int tQ = tQPDG.GetQCode(); 432 440 if(tQ<0||targPDG==10) 433 {441 { 434 442 G4cout<<"---Warning---G4QEnv::Constructor:TrgQC<0, Chipo?,PDG="<<targPDG<<G4endl; 435 443 //throw G4QException("***G4QEnvironment::Constructor: Target is wrong"); 436 }444 } 437 445 else // Now we can create a unique Quasmon 438 {446 { 439 447 h4Mom+=G4LorentzVector(0.,0.,0.,tQPDG.GetMass()); //Projectile + TargetHadron 440 448 hQC+=tQPDG.GetQuarkContent(); … … 444 452 G4Quasmon* curQuasmon = new G4Quasmon(hQC, h4Mom); 445 453 theQuasmons.push_back(curQuasmon); // Insert Quasmon or hadron/gamma (del. eq.) 446 }454 } 447 455 } // End of Q-Code check 448 456 } // End of proper PDG for i-th Hadron 449 457 if(nHadrons>1) for(G4int ih=0; ih<nHadrons; ih++) // fill other Hadrons to Output 450 {458 { 451 459 G4QHadron* newHadr = new G4QHadron(curHadr); 452 460 #ifdef pdebug … … 454 462 #endif 455 463 theQHadrons.push_back(newHadr); // Fill existing hadron (delete equivalent) 456 }464 } 457 465 } // End of Unique Hadron target treatment 458 466 #ifdef chdebug … … 684 692 {//======================================================================================= 685 693 static const G4double third=1./3.; 686 //static const G4double mNeut= G4QPDGCode(2112).GetMass(); 687 //static const G4double mProt= G4QPDGCode(2212).GetMass(); 694 static const G4double mNeut= G4QPDGCode(2112).GetMass(); 695 static const G4double mNeu2 = mNeut*mNeut; 696 static const G4double mProt= G4QPDGCode(2212).GetMass(); 697 static const G4double mPro2 = mProt*mProt; 688 698 //static const G4double mLamb= G4QPDGCode(3122).GetMass(); 689 699 static const G4double mPi = G4QPDGCode(211).GetMass(); … … 704 714 G4LorentzVector proj4M=pro4M; // Fake equivalence to avoid & const 705 715 G4double projE=proj4M.e(); // energy of the projectile 706 G4int projPDG=projQC.GetSPDGCode(); // Minimum hadron for the projectile QC716 G4int projPDG=projQC.GetSPDGCode(); // Minimum hadron for the projectile QC 707 717 if(projE<0.) 708 718 { … … 712 722 } 713 723 G4double projM2=proj4M.m2(); // projectile's squared mass (print & v.gamma) 724 G4bool Pr1 = theProjectiles.size() == 1; // A#ofHadronsInTheInputVector = 1 condition 725 if(Pr1 && std::fabs(G4QPDGCode(projPDG).GetMass2()-projM2) > .1 ) Pr1=false; // MassShell 714 726 G4int targPDG=theEnvironment.GetPDG();// PDG Code of the target nucleus 715 727 if(targPDG>80000000&&targPDG!=90000000&&(theEnvironment.Get4Momentum().m2())>1.)//Nucleus … … 730 742 else if(nCl<9) nBarClust=2; 731 743 else 732 {744 { 733 745 G4int v=nCl-9; 734 746 G4int d=v/15; … … 738 750 } 739 751 #ifdef pdebug 740 G4cout<<"G4QE::CrQ:TNuc:Z="<<envZ<<",N="<<envN<<",nC="<<nBarClust<<",tC="752 G4cout<<"G4QE::CrQ:TNuc:Z="<<envZ<<",N="<<envN<<",nC="<<nBarClust<<",tC=" 741 753 <<totCharge<<", tB="<<totBaryoN<<G4endl; 742 754 #endif … … 751 763 nBarClust=theEnvironment.UpdateClusters(din); // Cluster Probabilities upto maxClust 752 764 #ifdef pdebug 753 G4cout<<"G4QEnv::CreateQ: Nucleus("<<targPDG<<") is created ("<<nBarClust<<" clast's)";765 G4cout<<"G4QEnv::CreateQ: Nucleus("<<targPDG<<") is created ("<<nBarClust<<" clast's)"; 754 766 for(G4int ic=0;ic<nBarClust;ic++) 755 767 G4cout<<" #"<<ic<<"("<<theEnvironment.GetProbability(ic)<<")"; … … 759 771 G4QNucleus memEnviron=theEnvironment; 760 772 #ifdef pdebug 761 G4cout<<"G4QE::CrQ:ClusterProbabCalculation tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;773 G4cout<<"G4QE::CrQ:ClusterProbabCalculation tC="<<totCharge<<",tB="<<totBaryoN<<G4endl; 762 774 #endif 763 775 G4bool efFlag=false; // EnergyFlowFlag=FALSE (@@=DEFOLT=@@ make par) … … 767 779 G4LorentzVector ef4Mom(0.,0.,0.,0.); // Summed 4-momentum of Energy Flux 768 780 G4double proj3M=proj4M.rho(); 769 // --- Pbar --- Nbar ------- LAMBDAbar ---- SIGMA-bar --- SIGMA0bar781 // --- P-antibar --- N-antibar -- LAMBDA-antibar - SIGMA-antibar - SIGMA0-antibar 770 782 if((projPDG==-2212||projPDG==-2112||projPDG==-3122||projPDG==-3112||projPDG==-3212|| 771 783 projPDG==-3222) && envBN>1 && proj3M<10.) // OnlyForAtRestReactions(@@to Interface) 772 // ^^^^^ SIGMA+bar773 {784 // ^ SIGMA+ antibar 785 { 774 786 // @@ Annihilation on one baryon is implemented (no annihilation on clusters! @@?) @@ 775 787 #ifdef pdebug … … 787 799 targNPDG = 90000001; 788 800 targQC = neutQC; 789 }801 } 790 802 else 791 // if(rnd<=zpn) // Proton is a Periferal Target803 // if(rnd<=zpn) // Proton is a Periferal Target 792 804 { 793 805 targNPDG = 90001000; 794 806 targQC = protQC; 795 }807 } 796 808 //else // Deuteron as a Periferal Target 797 809 //{ 798 810 // targNPDG = 90001001; 799 811 // targQC = deutQC; 800 //}812 //} 801 813 //else // Lambda is a Periferal Target (?) 802 814 //{ 803 815 // targNPDG = 91000000; 804 816 // targQC = lambQC; 805 //}817 //} 806 818 theEnvironment.Reduce(targNPDG); // Subtract periferal baryon from Nucleus 807 819 #ifdef pdebug … … 832 844 G4Quasmon::OpenElectromagneticDecays(); // Parameter for multihadronFragmentatation^ 833 845 #ifdef pdebug 834 G4cout<<"G4QE::CrQ:>>AnnihilationIsDone,C="<<totCharge<<",B="<<totBaryoN<<G4endl;// ^846 G4cout<<"G4QE::CrQ:>>AnnihilationIsDone,C="<<totCharge<<",B="<<totBaryoN<<G4endl;// ^ 835 847 #endif 836 848 delete pan; // The N-NbarQuasmon is deleted A.S.A.P. ^ … … 842 854 G4double ra=std::pow(G4double(totBaryoN),third); // ^ ^ 843 855 #ifdef pdebug 844 G4cout<<"G4QE::CQ:N="<<tNH<<",T="<<totCharge<<","<<totBaryoN<<",A="<<ra<<G4endl;//^ ^856 G4cout<<"G4QE::CQ:N="<<tNH<<",T="<<totCharge<<","<<totBaryoN<<",A="<<ra<<G4endl;//^ ^ 845 857 #endif 846 858 for (G4int ind=0; ind<tNH; ind++) // Loop over annihilation QHadrons ^ ^ … … 855 867 G4double shMOM= sh4m.rho(); // Momentum of the projectile ^ ^ 856 868 #ifdef pdebug 857 G4cout<<"G4QE::CrQ:"<<ind<<","<<shDFL<<",PDG="<<shPDG<<",4M="<<sh4m<<G4endl; // ^ ^869 G4cout<<"G4QE::CrQ:"<<ind<<","<<shDFL<<",PDG="<<shPDG<<",4M="<<sh4m<<G4endl; // ^ ^ 858 870 #endif 859 871 G4double solAnCut=SolidAngle; // Proto ChargeDependantSolAngle^ ^ … … 867 879 //G4double solAnCut=SolidAngle+20*shCHG*sqrt(1.*envZ)/shMOM;//ChargeDepSolAngle ^ ^ 868 880 #ifdef pdebug 869 G4cout<<"G4QE::CrQ: PDG="<<shPDG<<", p="<<shMOM<<", r="<<ra<<G4endl; // ^ ^881 G4cout<<"G4QE::CrQ: PDG="<<shPDG<<", p="<<shMOM<<", r="<<ra<<G4endl; // ^ ^ 870 882 #endif 871 883 if(!shDFL) // Final(notDecayed) hadrons ^ ^ 872 {873 #ifdef pdebug 874 G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<G4endl; // ^ ^875 #endif 876 //if((dir.dot(shDIR)>solAnCut||shMOM<120.) && abs(shPDG)>99) // Absorb mesons ^ ^877 if(dir.dot(shDIR)>solAnCut && abs(shPDG)>99) // Absorb mesons ^ ^878 {879 #ifdef pdebug 880 G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<", P="// ^ ^881 <<shMOM<<" < 120"<<G4endl; // ^ ^884 { 885 #ifdef pdebug 886 G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<G4endl; // ^ ^ 887 #endif 888 //if((dir.dot(shDIR)>solAnCut||shMOM<120.) && abs(shPDG)>99) // Absorb mesons ^ ^ 889 if(dir.dot(shDIR)>solAnCut && abs(shPDG)>99) // Absorb mesons ^ ^ 890 { 891 #ifdef pdebug 892 G4cout<<"G4QE::CQ:>H="<<shPDG<<":"<<dir.dot(shDIR)<<">"<<solAnCut<<", P="// ^ ^ 893 <<shMOM<<" < 120"<<G4endl; // ^ ^ 882 894 #endif 883 895 if(efFlag) // => Case of "Energy Flux approach" ^ ^ 884 {896 { 885 897 G4QContent shQC = curHadr->GetQC();// QuarkContent of the Current Hadron ^ ^ 886 898 ef4Mom+=sh4m; … … 890 902 G4int hPDG=curHadr->GetPDGCode(); // Only for gebug printing ^ ^ 891 903 G4LorentzVector h4M = curHadr->Get4Momentum(); // Only for gebug printing^ ^ 892 G4cout<<"G4QE::CrQ:#"<<efCounter<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^893 #endif 894 }895 else //=>"MultyQuasFragmentation"(!efFlag)^ ^896 {904 G4cout<<"G4QE::CrQ:#"<<efCounter<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^ 905 #endif 906 } 907 else //=>"MultyQuasFragmentation"(!efFlag)^ ^ 908 { 897 909 G4QHadron* mqHadron = new G4QHadron(curHadr); 898 910 input.push_back(mqHadron); // Fill hadron-copy (del equiv) <...^ ^ … … 900 912 G4int hPDG=curHadr->GetPDGCode(); // Only for debug printing ^ ^ 901 913 G4LorentzVector h4M = curHadr->Get4Momentum(); // Only for gebug printing ^ ^ 902 G4cout<<"G4QE::CrQ:Absorb#"<<ind<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^903 #endif 904 } // ^ ^905 } // ^ ^906 else // DirectFilling of the output vector^ ^907 { // ^ ^914 G4cout<<"G4QE::CrQ:Absorb#"<<ind<<", PDG="<<hPDG<<", h4M="<<h4M<<G4endl;//^ ^ 915 #endif 916 } // ^ ^ 917 } // ^ ^ 918 else // DirectFilling of the output vector^ ^ 919 { // ^ ^ 908 920 #ifdef pdebug 909 921 G4int hPDG=curHadr->GetPDGCode(); // Only for gebug printing ^ ^ 910 922 G4LorentzVector h4M = curHadr->Get4Momentum(); // Only for gebug printing ^ ^ 911 G4cout<<"G4QE::CrQ: Fill OUT #"<<ind<<",PDG="<<hPDG<<",h4M="<<h4M<<G4endl;//^ ^923 G4cout<<"G4QE::CrQ: Fill OUT #"<<ind<<",PDG="<<hPDG<<",h4M="<<h4M<<G4endl;//^ ^ 912 924 #endif 913 925 // Just fill a hadron to the output stack (One should make EM decays elsewhere) … … 915 927 theQHadrons.push_back(curHadron); // TheQHadrs are filled as new Hadrs ^ ^ 916 928 } 917 } // End of the IF over projectiles ^ ^918 } // End of LOOP over "output" of annihilation ^ ^929 } // End of the IF over projectiles ^ ^ 930 } // End of LOOP over "output" of annihilation ^ ^ 919 931 for_each(output->begin(), output->end(), DeleteQHadron()); //DESTRUCT output>-^-^ 920 932 output->clear(); // ^ ^ 921 933 delete output; // ==================================^=^ 922 934 if(!efFlag) // =>NotEnergyFlux=MultyQuasmon Case ^ 923 {935 { 924 936 G4int noh = theQHadrons.size(); // a#oh hadrons in Output UpToNow ^ 925 937 if(noh) for(G4int kh=0; kh<noh; kh++) // One can escape it but... ^ 926 { // ^938 { // ^ 927 939 #ifdef pdebug 928 940 G4cout<<"G4QE::CreateQ:H#"<<kh<<", QC="<<theQHadrons[kh]->GetQC() // ^ … … 935 947 tmpQHadVec->clear(); // ^ ^ 936 948 delete tmpQHadVec; // who calls DecayQHadron must clear & delete ^ ^ 937 } // ^ ^949 } // ^ ^ 938 950 theQHadrons.clear(); // deletedWhenDecayed // Now theQHadrons is EmptyVector->^ ^ 939 951 #ifdef pdebug 940 952 G4int nInH=intQHadrons.size(); // Resulting #of hadrons after decay ^ 941 G4cout<<"G4QE::CrQ:nH="<<nInH<<",C="<<totCharge<<",B="<<totBaryoN<<G4endl;// ^953 G4cout<<"G4QE::CrQ:nH="<<nInH<<",C="<<totCharge<<",B="<<totBaryoN<<G4endl;// ^ 942 954 #endif 943 955 if(!(input.size())) // *RETURN* Without Quasmon creation-^ 944 { // ^945 #ifdef pdebug 946 G4cout<<"*G4QEnv::CrQ:AnnihStack tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^947 #endif 948 return; // Do not clear and delete objects --^956 { // ^ 957 #ifdef pdebug 958 G4cout<<"*G4QEnv::CrQ:AnnihStack tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^ 959 #endif 960 return; // Do not clear and delete objects --^ 949 961 } // ^ 950 962 #ifdef pdebug 951 G4cout<<"G4QE::CrQ:fakeQ, restPars tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^963 G4cout<<"G4QE::CrQ:fakeQ, restPars tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;//^ 952 964 #endif 953 965 G4Quasmon::SetParameters(QTemper,QSOverU,QEtaSup);//RecoverQParam's after anihil^ … … 956 968 G4QEnvironment* muq = new G4QEnvironment(input,theEnvironment.GetPDG());//<--+ ^ 957 969 #ifdef pdebug 958 G4cout<<"G4QE::CrQ:befCl&Dest tC="<<totCharge<<", tB="<<totBaryoN<<G4endl; //^ ^970 G4cout<<"G4QE::CrQ:befCl&Dest tC="<<totCharge<<", tB="<<totBaryoN<<G4endl; //^ ^ 959 971 #endif 960 972 for_each(input.begin(), input.end(), DeleteQHadron()); //DESTROING inp >-^--^ … … 969 981 #endif 970 982 if(noh) for(G4int nh=0; nh<noh; nh++) // One can escape it but... ^ ^ 971 { // ^ ^983 { // ^ ^ 972 984 #ifdef pdebug 973 985 G4cout<<"G4QE::CreateQ: NotIntQH#"<<nh<<", QC="<<(*outH)[nh]->GetQC() // ^ ^ … … 980 992 tmpQHadVec->clear(); // ^ ^ ^ 981 993 delete tmpQHadVec; // who calls DecayQHadron must clear & delete->+ ^ ^ 982 } // ^ ^994 } // ^ ^ 983 995 outH->clear(); // ^ ^ 984 996 delete outH; // >---->---->---->---->---->---->---^-+ 985 G4int nMQ = outQ->size(); // A#ofQuasmons in MultyQuasmonOutput^997 G4int nMQ = outQ->size(); // A#ofQuasmons in MultyQuasmonOutput^ 986 998 #ifdef pdebug 987 999 G4LorentzVector eLorV=theEnvironment.Get4Momentum(); // ^ 988 G4cout<<"G4QE::CrQ:nMQ="<<nMQ<<",tC="<<totCharge<<", tB="<<totBaryoN<<G4endl;// ^989 G4cout<<"G4QE::CrQ:Env4M="<<eLorV<<G4endl; // ^1000 G4cout<<"G4QE::CrQ:nMQ="<<nMQ<<",tC="<<totCharge<<", tB="<<totBaryoN<<G4endl;// ^ 1001 G4cout<<"G4QE::CrQ:Env4M="<<eLorV<<G4endl; // ^ 990 1002 G4LorentzVector contr4M=eLorV; // ^ 991 1003 #endif 992 1004 if(nMQ) for(G4int mh=0; mh<nMQ; mh++) // Can escape CreationDistruct but...^ 993 { // ^1005 { // ^ 994 1006 G4Quasmon* curQ = new G4Quasmon((*outQ)[mh]);// Copy to destroy TMP(?) ^ 995 1007 #ifdef pdebug 996 1008 G4LorentzVector qLorV=curQ->Get4Momentum(); // ^ 997 G4cout<<"G4QE::CrQ:Q#"<<mh<<",4M="<<qLorV<<curQ->GetQC()<<G4endl; // ^1009 G4cout<<"G4QE::CrQ:Q#"<<mh<<",4M="<<qLorV<<curQ->GetQC()<<G4endl; // ^ 998 1010 contr4M+=qLorV; // ^ 999 1011 #endif 1000 1012 theQuasmons.push_back(curQ); // Fill QuasmonCopies in theQuasmons ^ 1001 } // ^1013 } // ^ 1002 1014 for_each(outQ->begin(), outQ->end(), DeleteQuasmon()); // >---------------------^ 1003 1015 outQ->clear(); // ^ … … 1005 1017 #ifdef pdebug 1006 1018 G4int nsHadr = theQHadrons.size(); // Update the value of OUTPUT entries 1007 G4cout<<"G4QEnvironment::CreateQ: before return nH="<<nsHadr<<G4endl;1019 G4cout<<"G4QEnvironment::CreateQ: before return nH="<<nsHadr<<G4endl; 1008 1020 if(nsHadr) for(G4int jso=0; jso<nsHadr; jso++)// LOOP over output hadrons 1009 1021 { 1010 1022 G4int hsNF = theQHadrons[jso]->GetNFragments(); // A#of secondary fragments 1011 1023 if(!hsNF) // Add only final hadrons 1012 {1024 { 1013 1025 G4LorentzVector hLorV=theQHadrons[jso]->Get4Momentum(); 1014 1026 G4int hPDGC=theQHadrons[jso]->GetPDGCode(); 1015 G4cout<<"G4QE::CrQ: H#"<<jso<<",4M="<<hLorV<<hPDGC<<G4endl;1027 G4cout<<"G4QE::CrQ: H#"<<jso<<",4M="<<hLorV<<hPDGC<<G4endl; 1016 1028 contr4M+=hLorV; 1017 1029 } … … 1019 1031 G4cout<<"G4Q::CrQ:"<<jso<<"NF=0,4M="<<theQHadrons[jso]->Get4Momentum()<<G4endl; 1020 1032 } 1021 G4cout<<"G4QEnvironment::CreateQ: before return tot4M="<<contr4M<<G4endl;1033 G4cout<<"G4QEnvironment::CreateQ: before return tot4M="<<contr4M<<G4endl; 1022 1034 #endif 1023 1035 return; // *** RETURN *** 1024 1036 } 1025 1037 else // ==> Energy Flux case 1026 {1038 { 1027 1039 if (!efCounter) return; // ***RETURN*** Without Quasmon creation 1028 }1029 } // End of Hyperon annihilation case1040 } 1041 } // End of Hyperon annihilation case 1030 1042 else EnFlQC=projQC; // For notAntiBar, don't use EnergyFlux 1031 1043 G4double EnFlP=ef4Mom.rho(); // Mom. of EnergyFlow forClusterCreation … … 1033 1045 G4int nCandid = theQCandidates.size(); 1034 1046 #ifdef pdebug 1035 G4cout<<"G4QEnvironment::CrQ: InteractionProbabilities are done, nC="<<nCandid<<G4endl;1047 G4cout<<"G4QEnvironment::CrQ: InteractionProbabilities are done, nC="<<nCandid<<G4endl; 1036 1048 #endif 1037 1049 G4double maxP = theQCandidates[nCandid-1]->GetIntegProbability(); … … 1039 1051 G4QContent curQC; // Quark Content of the selected cluster 1040 1052 if(nCandid<=0) 1041 {1042 G4cout<<"---Warning---G4QEnv::CreaQ:nC="<<nCandid<<",maxP="<<maxP<<",E="1053 { 1054 G4cout<<"---Warning---G4QEnv::CreaQ:nC="<<nCandid<<",maxP="<<maxP<<",E=" 1043 1055 <<theEnvironment<<G4endl; 1044 1056 //throw G4QException("G4QEnvironment::CreateQ: Can not select a cluster"); 1045 }1057 } 1046 1058 if(nCandid==1||maxP==0.) 1047 {1048 #ifdef pdebug 1049 G4cout<<"***G4QEnv::CrQ:MaxP=0||nCand=1: Use all Env., Env="<<theEnvironment<<G4endl;1059 { 1060 #ifdef pdebug 1061 G4cout<<"***G4QEnv::CrQ:MaxP=0||nCand=1: Use all Env., Env="<<theEnvironment<<G4endl; 1050 1062 #endif 1051 1063 curQC=theEnvironment.GetQCZNS(); … … 1056 1068 G4double totP = maxP * G4UniformRand(); 1057 1069 #ifdef pdebug 1058 G4cout<<"G4QEnvironment::CrQ:nC="<<nCandid<<", maxP="<<maxP<<", totP="<<totP<<G4endl;1070 G4cout<<"G4QEnvironment::CrQ:nC="<<nCandid<<", maxP="<<maxP<<", totP="<<totP<<G4endl; 1059 1071 #endif 1060 1072 while(theQCandidates[i]->GetIntegProbability()<totP) i++; … … 1064 1076 G4double clMass=targClust.GetGSMass(); // Mass of residual nuclear environment 1065 1077 #ifdef cldebug 1066 G4cout<<"G4QEnv::CrQ:Cl#"<<i<<"(of "<<nCandid<<"),QC="<<curQC<<",M="<<clMass<<G4endl;1078 G4cout<<"G4QEnv::CrQ:Cl#"<<i<<"(of "<<nCandid<<"),QC="<<curQC<<",M="<<clMass<<G4endl; 1067 1079 #endif 1068 1080 G4LorentzVector pq4M=proj4M+G4LorentzVector(0.,0.,0.,clMass); 1069 1081 if(pq4M.m()>=clMass) 1070 {1071 #ifdef pdebug 1072 G4cout<<"G4QEnv::CQ:#"<<i<<"("<<targClust<<curQC<<") Env="<<theEnvironment<<G4endl;1082 { 1083 #ifdef pdebug 1084 G4cout<<"G4QEnv::CQ:#"<<i<<"("<<targClust<<curQC<<") Env="<<theEnvironment<<G4endl; 1073 1085 #endif 1074 1086 theEnvironment.Reduce(targClust.GetPDG());// Subtract selected cluster from Nucleus 1075 }1087 } 1076 1088 else 1077 {1089 { 1078 1090 G4double teMass=theEnvironment.GetGSMass(); //Mass of theResidualNuclearEnvironment 1079 1091 G4LorentzVector te4M=proj4M+G4LorentzVector(0.,0.,0.,teMass); 1080 1092 if(te4M.m()>=teMass) 1081 {1082 #ifdef pdebug 1083 G4cout<<"***G4QEnv::CrQ: Deep virtual, use all Env,Env="<<theEnvironment<<G4endl;1093 { 1094 #ifdef pdebug 1095 G4cout<<"***G4QEnv::CrQ: Deep virtual, use all Env,Env="<<theEnvironment<<G4endl; 1084 1096 #endif 1085 1097 curQC=theEnvironment.GetQCZNS(); … … 1087 1099 } 1088 1100 else 1089 {1101 { 1090 1102 G4QHadron* projH = new G4QHadron(projQC,proj4M); 1091 1103 theQHadrons.push_back(projH); 1092 G4cout<<"---Warning---G4QE::CrQ:Fill Proj asItIs QC/4m="<<projQC<<proj4M<<G4endl;1104 G4cout<<"---Warning---G4QE::CrQ:Fill Proj asItIs QC/4m="<<projQC<<proj4M<<G4endl; 1093 1105 return; 1094 1106 } 1095 }1096 }1107 } 1108 } 1097 1109 G4double envMass=theEnvironment.GetGSMass(); // Mass of residual nuclear environment 1098 if(projPDG==22&&projE<PiPrThresh+(M2ShiftVir+projM2)/DiNuclMass) // Gam+quark Interact 1110 // @@ Pr1 condition (individual particle) can be taken out of brackets for all if's 1111 if(Pr1&&projPDG==22&&projE<PiPrThresh+(M2ShiftVir+projM2)/DiNuclMass) // ==> Gamma+q 1099 1112 //if(2>3) //@@ TMP:PhotoAbsorbtion by q is closed 1100 {1113 { 1101 1114 q4Mom=G4LorentzVector(0.,0.,0.,tgMass-envMass);// PhotoInteracts with BoundedCluster 1102 1115 valQ=curQC; … … 1106 1119 G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom, proj4M);//Interaction gam+q inside 1107 1120 theQuasmons.push_back(curQuasmon); // Insert Quasmon without incid. gamma (del.eq.) 1108 }1109 else if( (projM2-mPi2<.00001&&projE-mPi<0.1)&&projPDG==-211&&!fake)1121 } 1122 else if(Pr1&&(std::fabs(projM2-mPi2)<.00001 && projE-mPi<0.1) && projPDG==-211 &&!fake) 1110 1123 //if(2>3) //@@ ***TMP*** PionAbsorbAtRest by q is closed 1111 {1124 { 1112 1125 q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass);// PION + BoundCluster 1113 1126 valQ=EnFlQC+curQC; … … 1118 1131 G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom, -proj4M);//Interact gam+q inside 1119 1132 theQuasmons.push_back(curQuasmon); // Insert Quasmon without incid. gamma (del.eq.) 1120 }1121 else if(projPDG==2212 && G4UniformRand()>.5) // Bad for ions! Only for baryons !1122 //else if(2>3) // free flying protonis closed1123 {1124 q4Mom=proj4M; // 4M: QUASMON=Projectile1125 valQ=EnFlQC; // qc: QUASMON=Projectile1133 } 1134 //else if(Pr1&&projPDG==2212&&G4UniformRand()<.6+.4*std::exp(-envMass/8192))// keepProj 1135 else if(2>3) // free flying projectile is closed 1136 { 1137 q4Mom=proj4M; // 4M: QUASMON=Projectile 1138 valQ=EnFlQC; // qc: QUASMON=Projectile 1126 1139 theEnvironment=memEnviron; 1140 #ifdef pdebug 1141 G4cout<<"G4QEnv::CreQAll: Q="<<q4Mom<<valQ<<", QEnv="<<theEnvironment<<G4endl; 1142 #endif 1143 G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom); 1144 theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.) 1145 } 1146 else if(Pr1&&projPDG==2212&&G4UniformRand()>15./(proj4M.e()-mProt))//ExcitatedCluster 1147 //else if(2>3) // No excitation of a cluster by projScattering 1148 { 1149 G4double prM=mProt; // mass of the projectile (M) (for future gener.) 1150 G4double prM2=mPro2; // squared mass of the projectile (M^2) 1151 G4double scM=mProt; // mass of the scattered projectile (M') 1152 G4double scM2=mPro2; // squared mass of the scatteredProjectile (M'^2) 1153 G4QContent scQC=projQC; // QC of the scattered projectile 1154 G4QContent chQC(0,0,0,0,0,0); // Change of the Quasmon QC 1155 if(G4UniformRand()<.5*envN/envBN) // (u->u,d, d->d)? in future make it universal 1156 { 1157 scM=mNeut; // Charge exchange reaction 1158 scM2=mNeu2; 1159 scQC=neutQC; 1160 chQC=projQC-scQC; // Charge of the created Quasmon must be changed 1161 } 1162 G4double tnM=tgMass-envMass; // minimal mass of the target cluster (m) 1163 G4double tnM2=tnM*tnM; // squared mass of the target cluster (m^2) 1164 G4double dtnM=tnM+tnM; // doubled mass of the target cluster (2*m) 1165 G4double prE=proj4M.e(); // enrgy of the projectile (E) 1166 G4double mu2=tnM2+dtnM*(prE-scM); // max squared mass of the excited cluster (mu^2) 1167 //G4double mu=std::sqrt(mu2); // max mass of the excited cluster (mu) 1168 G4double B=.00001; // (parameter) slope of the diffraction cone 1169 G4double rmu2=0.; // Chosen sqMass of excitedClust (Prototype) 1170 G4double tmax=0.; // max -t for scattering (Prototype) 1171 G4double rt=0.; // Chosen -t (Prototype) 1172 G4double om=0.; // Energy of the excited cluster (Prototype) 1173 G4double ep=0.; // Energy of the scattered projectile (eps Proto) 1174 if (prE<prM)G4cout<<"-Warn-G4QEnv::CreQAll:(scat w ex)E="<<prE<<" < M="<<prM<<G4endl; 1175 G4double Pi=std::sqrt(prE*prE-prM2); // Proj momentum (P) 1176 G4double po=0.; // Scat momentum (p) (Prototype) 1177 G4double cost=2.; // cos(theta) for the scattered proj (Prototype) 1178 G4int cct=0; // Counter of cost attempts (@@ can be limited) 1179 while ( std::fabs(cost) > 1. ) 1180 { 1181 cct++; 1182 #ifdef debug 1183 G4cout<<"-Warning-G4QEnv::CreQAll: c="<<cct<<" (scat w ex) cost="<<cost<<G4endl; 1184 #endif 1185 rmu2=tnM2*pow(mu2/tnM2,G4UniformRand()); // Chosen SqMass of excitedClust (MMA) 1186 tmax=mu2-rmu2; // max -t for scattering 1187 rt=-std::log(1.-G4UniformRand()*(1.-std::exp(-B*tmax)))/B; // Chosem -t 1188 om=(tnM2+rmu2+rt)/dtnM; // Energy of the excited cluster 1189 ep=prE+tnM-om; // Energy of the scattered projectile (epsilon) 1190 #ifdef pdebug 1191 G4cout<<"G4QEnv::CreQAll: m2="<<tnM2<<" < mu2="<<rmu2<<" < "<<mu2<<"=Max2"<<G4endl; 1192 G4cout<<"G4QEnv::CreQAll: -t="<<rt<<" < "<<tmax<<"=tmax"<<G4endl; 1193 G4cout<<"G4QEnv::CreQAl: om="<<om<<" > m="<<tnM<<", ep="<<ep<<" > M="<<prM<<G4endl; 1194 #endif 1195 if(ep<scM)G4cout<<"+Warn-G4QEnv::CreQAl:(scat w ex)Eo="<<prE<<" < M="<<prM<<G4endl; 1196 po=std::sqrt(ep*ep-scM2); // Scat momentum (p) 1197 cost=(prE*ep-0.5*(rt+prM2+scM2))/Pi/po; // cos(theta) for the scattered 1198 } 1199 G4double om2=om*om; 1200 if(om2<rmu2)G4cout<<"-Warn-G4QEnv::CreQA:(scat w ex)e2="<<om<<" < mu2="<<tnM<<G4endl; 1201 #ifdef pdebug 1202 G4cout<<"G4QEnv::CreQAll: ct="<<cost<<",pio="<<Pi*po<<",()="<<cost*Pi*po<<G4endl; 1203 G4double ps=std::sqrt(om2-rmu2); // Momentum of the excited cluster (p) 1204 #endif 1205 G4double pfc=po*cost; // Longitudinal projection of the scattered proj 1206 G4double pfs=po*std::sqrt(1.-cost*cost); // Transversal projection of scattered proj 1207 // ---- @@ From here can be a MF for QF nucleon extraction (if used by others) 1208 G4ThreeVector vdir = proj4M.vect(); // 3-Vector in the projectile direction 1209 G4ThreeVector vx(0.,0.,1.); // ProtoOrt in the direction of the projectile 1210 G4ThreeVector vy(0.,1.,0.); // First ProtoOrt orthogonal to the direction 1211 G4ThreeVector vz(1.,0.,0.); // Second ProtoOrt orthoganal to the direction 1212 if(vdir.mag2() > 0.) // the projectile isn't at rest 1213 { 1214 vx = vdir.unit(); // Ort in the direction of the projectile 1215 G4ThreeVector vv= vx.orthogonal();// Not normed orthogonal vector (!) 1216 vy = vv.unit(); // First ort orthogonal to the proj. direction 1217 vz = vx.cross(vy); // Second ort orthoganal to the proj. direction 1218 } 1219 // ---- @@ End of possible MF (Similar is in G4QCollision) 1220 G4double phi=twopi*G4UniformRand(); // Phi of the Fermi-Mom 1221 G4ThreeVector fp=pfc*vx+pfs*(std::sin(phi)*vy+std::cos(phi)*vz); 1222 G4LorentzVector s4M(fp,ep); 1223 #ifdef pdebug 1224 G4cout<<"G4QEnv::CreQA:ps="<<po<<"="<<fp.mag()<<",sM="<<prM<<"="<<s4M.m()<<G4endl; 1225 G4cout<<"G4QEnv::CreQA:Ee="<<prE*ep<<" =? "<<(prM2+rt/2-Pi*po*cost)<<G4endl; 1226 #endif 1227 if(std::fabs(s4M.m()-scM)>.001)G4cout<<"-W-G4QE::CQA:M="<<prM<<"#"<<s4M.m()<<G4endl; 1228 G4LorentzVector c4M=proj4M+G4LorentzVector(0.,0.,0.,tnM)-s4M; 1229 #ifdef pdebug 1230 G4cout<<"G4QEnv::CreQA: ec="<<om<<" = "<<c4M.e()<<", pc="<<ps<<" = " 1231 <<c4M.rho()<<", mc2="<<rmu2<<" = "<<c4M.m2()<<G4endl; 1232 G4cout<<"G4QEnv::CQA:ht="<<(tnM2+rmu2)/2-tnM*om<<"="<<prM2-prE*ep+Pi*po*cost<<G4endl; 1233 #endif 1234 if(std::fabs(c4M.m2()-rmu2)>.1) 1235 G4cout<<"-W-G4QE::CrQ:m2="<<rmu2<<"#"<<c4M.m2()<<",P="<<proj4M<<",M="<<tnM<<G4endl; 1236 G4QHadron* projH = new G4QHadron(scQC,s4M); // Create scattered Projectile Hadron 1237 theQHadrons.push_back(projH); // Fill it to the output vector 1238 G4Quasmon* curQuasmon = new G4Quasmon(curQC+chQC, c4M); // Q=ExcitedCluster 1239 theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.) 1240 } 1241 else 1242 { 1243 q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass); // Projectile + BoundCluster 1244 valQ=EnFlQC+curQC; 1127 1245 #ifdef pdebug 1128 1246 G4cout<<"G4QEnv::CreQAll: Q="<<q4Mom<<valQ<<", QEnv="<<theEnvironment<<G4endl; … … 1130 1248 G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom); 1131 1249 theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.) 1132 } 1133 else 1134 { 1135 q4Mom=proj4M+G4LorentzVector(0.,0.,0.,tgMass-envMass);//Projectile + BoundCluster 1136 valQ=EnFlQC+curQC; 1137 #ifdef pdebug 1138 G4cout<<"G4QEnv::CreQAll: Q="<<q4Mom<<valQ<<", QEnv="<<theEnvironment<<G4endl; 1139 #endif 1140 G4Quasmon* curQuasmon = new G4Quasmon(valQ, q4Mom); 1141 theQuasmons.push_back(curQuasmon); // Insert Quasmon (even hadron/gamma) (del.eq.) 1142 } 1250 } 1143 1251 } 1144 1252 else … … 1167 1275 G4int cCH = curCand->GetCharge(); // Charge of the candidate 1168 1276 #ifdef sdebug 1169 G4cout<<"G4QE::PIP:=====> #"<<index<<", cPDG="<<cPDG<<",S="<<cST<<G4endl;1277 G4cout<<"G4QE::PIP:=====> #"<<index<<", cPDG="<<cPDG<<",S="<<cST<<G4endl; 1170 1278 #endif 1171 1279 if(cPDG>80000000&&cPDG!=90000000&&!cST&&cCH>0&&cBN>0&&cCH<=cBN) // ===> Nuclear cluster 1172 {1280 { 1173 1281 G4int zc = cCH; // "Z" of the cluster 1174 1282 G4int nc = cBN-cCH; // "N" of the cluster … … 1176 1284 G4double dOfCl=curCand->GetDenseProbability();// A number of clusters in dense region 1177 1285 #ifdef sdebug 1178 G4cout<<"G4QE::PIP:Z="<<zc<<",N="<<nc<<",nC="<<nOfCl<<",dC="<<dOfCl<<G4endl;1286 G4cout<<"G4QE::PIP:Z="<<zc<<",N="<<nc<<",nC="<<nOfCl<<",dC="<<dOfCl<<G4endl; 1179 1287 #endif 1180 1288 if(cPDG==91000000||cPDG==90001000||cPDG==90000001) 1181 {1289 { 1182 1290 allB+=nOfCl; 1183 1291 denseB+=dOfCl; 1184 }1292 } 1185 1293 G4QContent pQC=curCand->GetQC(); // Quark Content of the candidate 1186 1294 ////////////G4int pC = projQC.GetCharge(); // Charge of the projectile … … 1220 1328 G4double charge= qQC.GetCharge(); 1221 1329 G4double dq= abs(baryn-charge-charge); 1222 G4cout<<"G4QE::PIP:P="<<probab<<",ac="<<cBN<<",dq="<<dq<<",f="<<fact<<",qC="1330 G4cout<<"G4QE::PIP:P="<<probab<<",ac="<<cBN<<",dq="<<dq<<",f="<<fact<<",qC=" 1223 1331 <<qC<<",rPDG="<<rPDG<<",pPDG="<<pPDG<<",nCP="<<nOfCl<<",dCP="<<dOfCl<<G4endl; 1224 1332 #endif 1225 }1333 } 1226 1334 else probab=0.; 1227 1335 sum+=probab; … … 1243 1351 G4int clustQCode = i+90; // Q-code of the cluster in the CHIPS World "IsoNuclei" 1244 1352 #ifdef sdebug 1245 G4cout<<"G4QEnvironment::InitClustersVector: Before Init Q ="<<clustQCode<<G4endl;1353 G4cout<<"G4QEnvironment::InitClustersVector: Before Init Q ="<<clustQCode<<G4endl; 1246 1354 #endif 1247 1355 G4QPDGCode clustQPDG(true,clustQCode); … … 1250 1358 G4int clustB=clustQPDG.GetBaryNum(); 1251 1359 #ifdef sdebug 1252 G4cout<<"G4QEnvironment::InitClustersVector: Before insert ="<<clusterPDG<<G4endl;1253 #endif 1254 //theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (delete equivalent)1255 if(clustB<=maxA) theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (del.eq.)1360 G4cout<<"G4QEnvironment::InitClustersVector: Before insert ="<<clusterPDG<<G4endl; 1361 #endif 1362 //theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (delete equivalent) 1363 if(clustB<=maxA) theQCandidates.push_back(new G4QCandidate(clusterPDG)); // (del.eq.) 1256 1364 #ifdef sdebug 1257 1365 G4cout<<"G4QEnvironment::InitClustersVector: Cluster # "<<i<<" with code = " … … 1272 1380 static const G4QContent SiPQC(0,2,1,0,0,0); 1273 1381 static const G4QContent SiMQC(2,0,1,0,0,0); 1382 static const G4QContent protQC(1,2,0,0,0,0); 1383 static const G4QContent neutQC(2,1,0,0,0,0); 1274 1384 //static const G4QContent alQC(6,6,0,0,0,0); 1275 1385 static const G4QPDGCode nQPDG(2112); … … 1328 1438 G4int nPDG = theEnvironment.GetPDG(); // PDG code of the residual Nucl.Environ. 1329 1439 #ifdef pdebug 1330 G4cout<<"G4QE::HQE:***NO QUASMONS***Env="<<nPDG<<theEnvironment.Get4Momentum()<<G4endl;1440 G4cout<<"G4QE::HQE:***NO QUASMONS***Env="<<nPDG<<theEnvironment.Get4Momentum()<<G4endl; 1331 1441 #endif 1332 1442 if(nPDG==90000000) return theQHadrons; 1333 1443 if(nPDG>80000000) 1334 {1444 { 1335 1445 G4QHadron* rNucleus = new G4QHadron(theEnvironment); // Create HadronEnvironment 1336 1446 theQHadrons.push_back(rNucleus); // Fill GS - no further decay (del. equiv.) 1337 1447 #ifdef fdebug 1338 G4cout<<"G4QEnv::HadrQE: >>>> Fill Environment="<<theEnvironment<<G4endl;1339 #endif 1340 }1448 G4cout<<"G4QEnv::HadrQE: >>>> Fill Environment="<<theEnvironment<<G4endl; 1449 #endif 1450 } 1341 1451 return theQHadrons; 1342 1452 } … … 1347 1457 G4int totInC=0; 1348 1458 G4LorentzVector totIn4M(0.,0.,0.,0.); 1349 for (G4int is=0; is<nQuasmons; is++) // Sum4mom's of Quasmons for the comparison1350 {1351 G4Quasmon* pQ = theQuasmons[is];1459 for (G4int is=0; is<nQuasmons; is++) // Sum4mom's of Quasmons for the comparison 1460 { 1461 G4Quasmon* pQ = theQuasmons[is]; 1352 1462 G4LorentzVector Q4M= pQ->Get4Momentum(); 1353 1463 totIn4M += Q4M; 1354 1464 totInC += pQ->GetQC().GetCharge(); 1355 } // End of TotInitial4Momentum summation LOOP over Quasmons1465 } // End of TotInitial4Momentum summation LOOP over Quasmons 1356 1466 G4int nsHadr = theQHadrons.size(); // Update the value of OUTPUT entries 1357 1467 if(nsHadr) for(G4int jso=0; jso<nsHadr; jso++)// LOOP over output hadrons … … 1368 1478 G4QNucleus vE(90000000); 1369 1479 G4int nlq = 0; // Prototype of a#of Living Quasmons 1370 if(nQuasmons) for(G4int lq=0; lq<nQuasmons; lq++)if(theQuasmons[lq]->GetStatus())nlq++;1371 if(nQuasmons) for(G4int iq=0; iq<nQuasmons; iq++)1372 {1480 if(nQuasmons) for(G4int lq=0; lq<nQuasmons; lq++)if(theQuasmons[lq]->GetStatus())nlq++; 1481 if(nQuasmons) for(G4int iq=0; iq<nQuasmons; iq++) 1482 { 1373 1483 #ifdef chdebug 1374 1484 G4int f1Charge=theEnvironment.GetCharge(); … … 1404 1514 G4int ist=theQuasmons[iq]->GetStatus();// Status of the Quasmon before fragmentation 1405 1515 if(ist) 1406 {1516 { 1407 1517 G4QHadronVector* output=theQuasmons[iq]->Fragment(vE,1);//!!!DESTROY!!! <---------+ 1408 1518 G4int ast=theQuasmons[iq]->GetStatus(); // Quasmon's Status after fragmentation ^ … … 1413 1523 #endif 1414 1524 if(nHadrons>0) // Copy QHadrons-Quasmon to Output ^ 1415 {1416 for (G4int ih=0; ih<nHadrons; ih++) // LOOP over QHadrons of the Quasmon ^1525 { 1526 for (G4int ih=0; ih<nHadrons; ih++) // LOOP over QHadrons of the Quasmon ^ 1417 1527 { 1418 1528 //G4QHadron* curH=new G4QHadron(output->operator[](ih));// (Del 7 lines below)^ … … 1424 1534 theQHadrons.push_back(curH); // Fill hadron-copy (delete equivalent) ^ 1425 1535 } 1426 } // ^1536 } // ^ 1427 1537 else // => "Quasmon can't decay" case ^ 1428 { // ^1538 { // ^ 1429 1539 G4QContent totQC=theQuasmons[iq]->GetQC();// ^ 1430 1540 G4int tQBN=totQC.GetBaryonNumber();// Baryon Number of not decayed Quasmon ^ … … 1434 1544 G4double totQM=tot4M.m(); // Real Mass of Quasmon ^ 1435 1545 if(tQBN>0&&totQM>gsM) // => "Try Quasmon evaporation" case ^ 1436 { // ^1546 { // ^ 1437 1547 G4QHadron* nuclQ = new G4QHadron(totQC,tot4M); // ^ 1438 1548 #ifdef fdebug … … 1442 1552 theQuasmons[iq]->KillQuasmon(); // Kill evaporated Quasmon ^ 1443 1553 nlq--; // ^ 1444 }1554 } 1445 1555 else if(iq+1<nQuasmons&&nlq>1) // => "Try to merge with next" case ^ 1446 {1556 { 1447 1557 G4int s=theQuasmons[iq+1]->GetStatus();//Status of the next Quasmon ^ 1448 1558 theQuasmons[iq+1]->IncreaseBy(theQuasmons[iq]);// Merge with the next Quasmon ^ 1449 1559 theQuasmons[iq]->KillQuasmon(); // Kill the week Quasmon ^ 1450 1560 if(s) nlq--; // Reduce a number of "living Quasmons" ^ 1451 }1561 } 1452 1562 else if(iq+1==nQuasmons&&iq&&nlq>1) // => "Quasmon stack is exhosted" case ^ 1453 {1563 { 1454 1564 G4int s=theQuasmons[0]->GetStatus(); // Status of the first Quasmon ^ 1455 1565 theQuasmons[0]->IncreaseBy(theQuasmons[iq]);// Merge with the first Quasmon ^ 1456 1566 theQuasmons[iq]->KillQuasmon(); // Kill the week Quasmon ^ 1457 1567 if(s) nlq--; // Reduce a number of "living Quasmons" ^ 1458 }1459 else // "Have a chance to recover" case ^1460 { // ^1461 #ifdef pdebug 1462 G4cout<<"***G4QE::HQE:"<<iq<<",n="<<nHadrons<<",Tot="<<totQC<<totQM<<G4endl;//^1463 for (G4int kq=0; kq<nQuasmons; kq++) // LOOP over Quasmons for DEBUG PRINTING ^1464 G4cout<<kq<<",St/QC="<<theQuasmons[kq]->GetStatus()<<theQuasmons[kq] // ^1568 } 1569 else // "Have a chance to recover" case ^ 1570 { // ^ 1571 #ifdef pdebug 1572 G4cout<<"***G4QE::HQE:"<<iq<<",n="<<nHadrons<<",Tot="<<totQC<<totQM<<G4endl;//^ 1573 for (G4int kq=0; kq<nQuasmons; kq++) // LOOP over Quasmons for DEBUG PRINTING ^ 1574 G4cout<<kq<<",St/QC="<<theQuasmons[kq]->GetStatus()<<theQuasmons[kq] // ^ 1465 1575 ->GetQC()<<",M="<<theQuasmons[kq]->Get4Momentum().m()<<G4endl; // ^ 1466 1576 #endif … … 1469 1579 G4bool corrf = true; // False when corrected & needs to quit ^ 1470 1580 while(nOfOUT && corrf) // LOOP over all existing QHadrons ^ 1471 { // ^1581 { // ^ 1472 1582 G4QHadron* theLast = theQHadrons[nOfOUT-1]; // Remember ^ 1473 1583 G4LorentzVector last4M = theLast->Get4Momentum(); // all ^ … … 1477 1587 G4int nFr = theLast->GetNFragments(); // Last // if() ^ 1478 1588 G4int gam = theLast->GetPDGCode(); // // ^ 1479 if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1)//=> Skip K,gam & decayed ^1589 if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1)//=> Skip K,gam & decayed ^ 1480 1590 { // ^ 1481 1591 G4QHadron* thePrev = theQHadrons[nOfOUT-2];// Kill Prev & make Last->Prev ^ … … 1487 1597 last4M = theLast->Get4Momentum();// 4Mom of the previouse Quasmon ^ 1488 1598 lastQC = theLast->GetQC(); // Quark Content of the previouse Quasmon^ 1489 } // ^1599 } // ^ 1490 1600 else // Just Clear and destroy theLast ^ 1491 { // ^1601 { // ^ 1492 1602 theQHadrons.pop_back(); // theLastQHadron is excluded from OUTPUT^ 1493 1603 delete theLast; // theLastQHadron is deleated as instance^ 1494 } // ^1604 } // ^ 1495 1605 totQC+=lastQC; // Update (increase) the total QC ^ 1496 1606 tot4M+=last4M; // Update (increase) the total 4-momentum^ … … 1500 1610 dM = totQM-gsM; // Escitation energy for the Quasmon ^ 1501 1611 if(dM>0) // "Mass of Q is big enough" case ^ 1502 { // ^1612 { // ^ 1503 1613 theQuasmons[iq]->InitQuasmon(totQC,tot4M);// Update the week Quasmon ^ 1504 1614 G4QHadronVector* curout=theQuasmons[iq]->Fragment(vE,1);//!DESTROY! <---+ ^ … … 1510 1620 #endif 1511 1621 if(nHadrons>0) // => "QHadrons from Quasmon to Output"^ ^ 1512 { // ^ ^1513 for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Hadrons of theQuasmon^ ^1514 { // ^ ^1622 { // ^ ^ 1623 for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Hadrons of theQuasmon^ ^ 1624 { // ^ ^ 1515 1625 //G4QHadron* curH = new G4QHadron(curout->operator[](ih)); // ^ ^ 1516 1626 G4QHadron* curH = new G4QHadron((*curout)[ih]); // ^ ^ … … 1520 1630 #endif 1521 1631 totQC-=curH->GetQC(); // totQC recalculation ^ ^ 1522 tot4M-=curH->Get4Momentum(); // tot4M recalculation ^ ^1632 tot4M-=curH->Get4Momentum(); // tot4M recalculation ^ ^ 1523 1633 theQHadrons.push_back(curH); // Fill hadron-copy (delete equivalent)^ ^ 1524 1634 //delete curout->operator[](ih);//>-Necessary to delete instances*>-^ ^ … … 1529 1639 corrf = false; // Corrected: go out of the while loop ^ ^ 1530 1640 //break; // @@ ?? ^ ^ 1531 } // End of check for existing output Hadrons in the Quasmon ^ ^1641 } // End of check for existing output Hadrons in the Quasmon ^ ^ 1532 1642 else // ^ ^ 1533 { // ^ ^1643 { // ^ ^ 1534 1644 for_each(curout->begin(), curout->end(), DeleteQHadron()); // >-------^ ^ 1535 1645 curout->clear(); // ^ ^ 1536 1646 delete curout; //>*Necessary to delete VectPointers>--^ ^ 1537 } // ^1538 } // ^1647 } // ^ 1648 } // ^ 1539 1649 nOfOUT = theQHadrons.size(); // Update the value of OUTPUT entries ^ 1540 1650 #ifdef rdebug 1541 1651 G4int tC=totInC; // Vacuum: No ResidualEnvironCharge ^ 1542 1652 G4LorentzVector t4M=totIn4M; // Vacuum: No ResidualEnvironment 4-Mom ^ 1543 for (G4int js=0; js<nQuasmons; js++) // Subtract 4mom's of Quasmons from dif^1544 { // ^1545 G4Quasmon* pQ = theQuasmons[js]; // ^1653 for (G4int js=0; js<nQuasmons; js++) // Subtract 4mom's of Quasmons from dif^ 1654 { // ^ 1655 G4Quasmon* pQ = theQuasmons[js]; // ^ 1546 1656 if(pQ->GetStatus()) // Subtract only if Quasmon is alive ^ 1547 { // ^1657 { // ^ 1548 1658 G4LorentzVector Q4M= pQ->Get4Momentum(); // ^ 1549 1659 t4M -= Q4M; // ^ … … 1551 1661 } // ^ 1552 1662 else G4cout<<"G4QE::HQ:SUM-4-Mom s("<<js<<")="<<pQ->GetStatus()<<G4endl;//^ 1553 } // End of Quasmons4Momentum subtractions ^1663 } // End of Quasmons4Momentum subtractions ^ 1554 1664 if(nOfOUT) for(G4int jpo=0; jpo<nOfOUT; jpo++)// LOOP over output hadrons ^ 1555 { // ^1665 { // ^ 1556 1666 G4int hsNF = theQHadrons[jpo]->GetNFragments();//A#of secondary fragments^ 1557 1667 if(!hsNF) // Subtract only final hadrons^ … … 1564 1674 G4cout<<"G4QE::HQ:|||Vacuum|||4-MomCHECK|||d4M="<<t4M<<",dC="<<tC<<G4endl;//^ 1565 1675 #endif 1566 } // End of the WHILE LOOP ^1567 //if(!nOfOUT&&nQuasmons==1) // TRY TO EVAPORATE THE TOTAL SYSTEM ^1568 if((!nOfOUT&&nQuasmons==1)||theEnvironment.GetPDGCode()==NUCPDG)//EvaporTotal ^1569 { // ^1676 } // End of the WHILE LOOP ^ 1677 //if(!nOfOUT&&nQuasmons==1) // TRY TO EVAPORATE THE TOTAL SYSTEM ^ 1678 if((!nOfOUT&&nQuasmons==1)||theEnvironment.GetPDGCode()==NUCPDG)//EvaporTotal ^ 1679 { // ^ 1570 1680 G4int totS=totQC.GetStrangeness(); // Total Strangeness ^ 1571 1681 //G4int totBN=totQC.GetBaryonNumber();// Total Baryon Number ^ … … 1573 1683 if(totS) totPDG-=totS*999999; // @@ ?? ^ 1574 1684 #ifdef fdebug 1575 G4cout<<"G4QE::HQE: totPDG="<<totPDG<<",totM="<<totQM<<G4endl; // ^1685 G4cout<<"G4QE::HQE: totPDG="<<totPDG<<",totM="<<totQM<<G4endl; // ^ 1576 1686 #endif 1577 1687 G4QHadron* evH = new G4QHadron(totQC,tot4M); // Create a Hadron-ResidualNucl^ … … 1583 1693 return theQHadrons; // ^ 1584 1694 } // ^ 1585 else if(!nOfOUT) // Still remain not used Quasmons ^1586 { // ^1587 G4cerr<<"***G4QE::HQ:T="<<tot4M<<totQC<<",M="<<totQM<<"< gsM=" // ^1695 else if(!nOfOUT) // Still remain not used Quasmons ^ 1696 { // ^ 1697 G4cerr<<"***G4QE::HQ:T="<<tot4M<<totQC<<",M="<<totQM<<"< gsM=" // ^ 1588 1698 <<gsM<<",d="<<dM<<",Env="<<theEnvironment<<G4endl; // ^ 1589 1699 throw G4QException("G4QEnvironment::HadronizeQEnv: Can't decay Quasmon");// ^ 1590 } // ^1591 } // End of PANIC treatment ^1592 } // End of trouble handling with Quasmon decay in Vacuum ^1700 } // ^ 1701 } // End of PANIC treatment ^ 1702 } // End of trouble handling with Quasmon decay in Vacuum ^ 1593 1703 for_each(output->begin(), output->end(), DeleteQHadron()); // >------------------^ 1594 1704 output->clear(); // ^ 1595 1705 delete output; // >=====================================^ 1596 } // End of check for the already decayed Quasmon1597 } // End of the LOOP over Quasmons1706 } // End of check for the already decayed Quasmon 1707 } // End of the LOOP over Quasmons 1598 1708 } 1599 1709 else // ==> "Nuclear environment" case … … 1603 1713 G4int totInC=theEnvironment.GetZ(); 1604 1714 G4LorentzVector totIn4M=theEnvironment.Get4Momentum(); 1605 for (G4int is=0; is<nQuasmons; is++) // Sum 4mom's of Quasmons for comparison1606 {1607 G4Quasmon* pQ = theQuasmons[is];1715 for (G4int is=0; is<nQuasmons; is++) // Sum 4mom's of Quasmons for comparison 1716 { 1717 G4Quasmon* pQ = theQuasmons[is]; 1608 1718 G4LorentzVector Q4M= pQ->Get4Momentum(); 1609 1719 totIn4M += Q4M; 1610 1720 totInC += pQ->GetQC().GetCharge(); 1611 } // End of TotInitial4Momentum summation LOOP over Quasmons1721 } // End of TotInitial4Momentum summation LOOP over Quasmons 1612 1722 G4int nsHadr = theQHadrons.size(); // Update the value of OUTPUT entries 1613 1723 if(nsHadr) for(G4int jso=0; jso<nsHadr; jso++)// LOOP over output hadrons … … 1649 1759 //G4int nCnMax = 9; // MaxCounterOfHadrFolts for shortCutSolutions 1650 1760 G4bool first=true; // Flag of the first interaction (only NucMedia) 1761 G4int cAN=0; // Counter of the nucleon absorptions 1762 G4int mcAN=3; // Max for the counter of nucleon absorptions 1651 1763 while (sumstat||totC<totCM) // ===***=== The MAIN "FOREVER" LOOP ===***=== 1652 {1764 { 1653 1765 #ifdef chdebug 1654 1766 G4int f2Charge=0; … … 1688 1800 #endif 1689 1801 totC++; 1690 if( nQuasmons==1&&sumstat==3) cbR++;1802 if( nQuasmons==1 && sumstat==3 ) cbR++; // Counter of dead solutions for nQ=1 1691 1803 else cbR=0; 1692 1804 G4QContent envQC=theEnvironment.GetQCZNS();// QuarkCont of current NuclearEnvironment … … 1699 1811 G4int nCount=0; // Counter of notsuccessful fragmentations 1700 1812 G4int fCount=0; // Counter of successful(notFinal) fragm's 1701 G4int eCount=0; // Counter of not yet decayed Quasmons1702 for (G4int iq=0; iq<nQuasmons; iq++) // Sum up Quasmons for making a decision1703 {1704 G4Quasmon* pQ = theQuasmons[iq];1813 G4int eCount=0; // Counter of not yet decayed Quasmons 1814 for (G4int iq=0; iq<nQuasmons; iq++) // Sum up Quasmons for making a decision 1815 { 1816 G4Quasmon* pQ = theQuasmons[iq]; 1705 1817 G4QContent QQC= pQ->GetQC(); 1706 1818 totQC += QQC; … … 1712 1824 sumstat += Qst; 1713 1825 #ifdef pdebug 1714 G4cout<<"G4QEnv::HadrQE:#"<<iq<<", Qst="<<Qst<<", Q="<<Q4M<<Q4M.m()<<QQC<<", Env="1826 G4cout<<"G4QEnv::HadrQE:#"<<iq<<", Qst="<<Qst<<", Q="<<Q4M<<Q4M.m()<<QQC<<", Env=" 1715 1827 <<theEnvironment<<G4endl; 1716 1828 #endif … … 1721 1833 } 1722 1834 if(Qst>0) eCount++; // Incr. counter of existing Quasmons 1723 } // End of summation LOOP over Quasmons1835 } // End of summation LOOP over Quasmons 1724 1836 G4int totS =totQC.GetStrangeness(); // Total Strangeness of the Total System 1725 1837 G4int totBN =totQC.GetBaryonNumber(); // Total Baryon Number of the Total System 1726 1838 G4int totPDG=0; // Total PDG Code for the Current compound 1727 1839 G4double totM =0.; // min(GroundSt)Mass of theResidualSystem 1728 if(totBN <2)1729 {1840 if(totBN < 2) // Solution for the light nucleus 1841 { 1730 1842 totPDG=totQC.GetSPDGCode(); // Min totPDGCode for theCurrentCompound 1731 1843 if(totPDG) totM=G4QPDGCode(totPDG).GetMass(); // min Mass of the Residual System … … 1733 1845 } 1734 1846 else 1735 {1847 { 1736 1848 G4QNucleus totN(totQC,tot4M); // Excited nucleus for theResidualSystem 1737 1849 totM=totN.GetMZNS(); // min(GroundSt)Mass of theResidualSystem 1738 1850 totPDG=totN.GetPDG(); // Total PDG Code for the Current compound 1739 }1851 } 1740 1852 #ifdef fdebug 1741 G4cout<<"G4QEnv::HadrQE:totC="<<totC<<"<totCM="<<totCM<<",ss="<<sumstat<<G4endl;1742 #endif 1743 if (totC>=totCM||cbR>cbRM)1853 G4cout<<"G4QEnv::HadrQE:totC="<<totC<<"<totCM="<<totCM<<",ss="<<sumstat<<G4endl; 1854 #endif 1855 if ( totC >= totCM || cbR > cbRM) 1744 1856 { 1745 1857 CleanUp(); … … 1747 1859 EvaporateResidual(evH); // Try to evaporate residual (del. equiv.) 1748 1860 return theQHadrons; 1749 }1861 } 1750 1862 // === Now we should be prepared for evaporation === 1751 1863 G4int totChg=totQC.GetCharge(); // Total Electric Charge of the Total System 1752 1864 #ifdef pdebug 1753 1865 if(totPDG==90999999||totPDG==90999000||totPDG==90000999||totPDG==89999001) 1754 G4cout<<"***G4QEnv::HadrQEnv: Meson (1) PDG="<<totPDG<<", M="<<tot4M.m()<<G4endl;1866 G4cout<<"***G4QEnv::HadrQEnv: Meson (1) PDG="<<totPDG<<", M="<<tot4M.m()<<G4endl; 1755 1867 G4int nOH=theQHadrons.size(); // A#of output hadrons 1756 1868 G4LorentzVector s4M=tot4M; // Total 4-momentum (@@ only for checking) 1757 1869 if(nOH) for(G4int ih=0; ih<nOH; ih++) s4M+=theQHadrons[ih]->Get4Momentum(); 1758 G4cout<<"G4QEnv::HadrQE:tBN="<<totBN<<",s="<<sumstat<<",fC="<<fCount<<",eC="<<eCount1870 G4cout<<"G4QEnv::HadrQE:tBN="<<totBN<<",s="<<sumstat<<",fC="<<fCount<<",eC="<<eCount 1759 1871 <<",En="<<theEnvironment<<",nH="<<nOH<<",tLV="<<s4M<<totQC<<nCount<<G4endl; 1760 1872 #endif … … 1767 1879 else if(totPDG==2224) totM=mProt+mPi; 1768 1880 else if(totPDG==10) 1769 {1881 { 1770 1882 G4QChipolino totChip(totQC); // define the residual as a Chipolino 1771 1883 totM =totChip.GetQPDG1().GetMass()+totChip.GetQPDG2().GetMass(); 1772 }1884 } 1773 1885 else 1774 {1886 { 1775 1887 G4cerr<<"***G4QEnv::HadrQE:totPDG="<<totPDG<<", totQC="<<totQC<<G4endl; 1776 1888 throw G4QException("G4QEnvironment::HadronizeQEnvir: ImpossibleHadron in CHIPS"); 1777 }1778 }1889 } 1890 } 1779 1891 G4double totMass = tot4M.m(); // Total effective Mass 1780 G4bool Premium = eCount &&premC&&envM; // Premium condition1781 G4int count3 = 0;1782 if(sumstat &&(fCount||Premium)&&!force&&count3<c3Max)//=>"Still try to decay Quasmons"1783 {1892 G4bool Premium = eCount && premC && envM; // Premium condition 1893 G4int count3 = 0; 1894 if(sumstat && (fCount||Premium) && !force && count3<c3Max)//=>"Force Quasmons decay" 1895 { 1784 1896 if(!fCount) premC--; // Reduce premium efforts counter 1785 if(nQuasmons) for (G4int jq=0; jq<nQuasmons; jq++)//FragmentationLOOP over Quasmons1786 {1787 G4Quasmon* pQ = theQuasmons[jq];// Pointer to the CurrentQuasmon <--<--<--+1897 if(nQuasmons) for (G4int jq=0; jq<nQuasmons; jq++)//FragmentationLOOP over Quasmons 1898 { 1899 G4Quasmon* pQ = theQuasmons[jq];// Pointer to the CurrentQuasmon <--<--<--+ 1788 1900 G4int status = pQ->GetStatus();// Old status of the Quasmon ^ 1789 1901 #ifdef pdebug 1790 G4cout<<"G4QE::HQE:Status of Q#"<<jq<<" (before Fragment)="<<status<<G4endl;//^1902 G4cout<<"G4QE::HQE:Status of Q#"<<jq<<" (before Fragment)="<<status<<G4endl;//^ 1791 1903 #endif 1792 1904 if(status) // Skip dead Quasmons ^ … … 1794 1906 G4int nQuas=eCount; 1795 1907 if(nQuas==1&&first) nQuas=-nQuas; 1796 G4QHadronVector* output=pQ->Fragment(theEnvironment,nQuas);//<DESTRUCT<--<--^-+1797 #ifdef pdebug 1798 G4cout<<"G4QE::HQE:Q#"<<jq<<",*afterFragm* Env="<<theEnvironment<<G4endl;// ^ ^1908 G4QHadronVector* output=pQ->Fragment(theEnvironment,nQuas);//<DESTRUCT<--<--^-+ 1909 #ifdef pdebug 1910 G4cout<<"G4QE::HQE:Q#"<<jq<<",*afterFragm* Env="<<theEnvironment<<G4endl;// ^ ^ 1799 1911 #endif 1800 1912 envM =theEnvironment.GetMass(); // new mass of Nuclear Environment ^ ^ … … 1803 1915 G4int nHadrons = output->size(); // ^ ^ 1804 1916 #ifdef rdebug 1805 G4cout<<"G4QE::HQE:**AfterFragmAttempt**#"<<jq<<",stat="<<status<<", Q4M="//^ ^1917 G4cout<<"G4QE::HQE:**AfterFragmAttempt**#"<<jq<<",stat="<<status<<", Q4M="//^ ^ 1806 1918 <<pQ->Get4Momentum()<<", Env="<<theEnvironment<<",nH="<<nHadrons // ^ ^ 1807 1919 <<",c3="<<count3<<" < "<<c3Max<<",eC="<<eCount<<G4endl; // ^ ^ 1808 1920 G4int tC=totInC-theEnvironment.GetZ(); // Subtract theResidualEnvironCharge ^ ^ 1809 1921 G4LorentzVector t4M=totIn4M; // Compare with the total ^ ^ 1810 G4LorentzVector theEnv4m=theEnvironment.Get4Momentum(); // Environment 4Mom ^ ^1811 t4M-=theEnv4m; // Subtract the Environment 4-momentum ^ ^1922 G4LorentzVector theEnv4m=theEnvironment.Get4Momentum(); // Environment 4Mom ^ ^ 1923 t4M-=theEnv4m; // Subtract the Environment 4-momentum ^ ^ 1812 1924 G4cout<<"G4QEnv::HadrQE:SUM-4Mom e4M="<<theEnv4m<<theEnvironment<<G4endl;// ^ ^ 1813 for (G4int js=0; js<nQuasmons; js++)// Subtract 4mom's of Quasmons (compare)^ ^1925 for (G4int js=0; js<nQuasmons; js++)// Subtract 4mom's of Quasmons (compare)^ ^ 1814 1926 { // ^ ^ 1815 G4Quasmon* prQ = theQuasmons[js];// ^ ^1927 G4Quasmon* prQ = theQuasmons[js];// ^ ^ 1816 1928 if(prQ->GetStatus()) // Subtract only if Quasmon is alive ^ ^ 1817 1929 { // ^ ^ … … 1821 1933 t4M -= Q4M; // ^ ^ 1822 1934 tC -= prQ->GetQC().GetCharge(); // ^ ^ 1823 } // ^ ^1935 } // ^ ^ 1824 1936 else G4cout<<"G4QE::HQE:SUM-4M,st("<<js<<")="<<prQ->GetStatus()<<G4endl;//^ ^ 1825 } // End of Quasmons4Momentum subtractions ^ ^1937 } // End of Quasmons4Momentum subtractions ^ ^ 1826 1938 G4int nsbHadr=theQHadrons.size(); // Update the value of OUTPUT entries ^ ^ 1827 1939 if(nsbHadr) for(G4int jpo=0; jpo<nsbHadr; jpo++)// LOOP over output hadrons ^ ^ 1828 { // ^ ^1940 { // ^ ^ 1829 1941 G4int hsNF = theQHadrons[jpo]->GetNFragments();// A#of out fragments ^ ^ 1830 1942 if(!hsNF) // Subtract only final hadrons ^ ^ … … 1835 1947 t4M -= hs4Mom; // ^ ^ 1836 1948 tC -= theQHadrons[jpo]->GetCharge(); // ^ ^ 1837 } // End of the "FinalHadron" IF ^ ^1949 } // End of the "FinalHadron" IF ^ ^ 1838 1950 } // End of the LOOP over output hadrons ^ ^ 1839 1951 if(nHadrons) for(G4int kpo=0; kpo<nHadrons; kpo++)//LOOP over out QHadrons ^ ^ 1840 1952 { // ^ ^ 1841 //G4QHadron* insH =output->operator[](kpo);// Pointer to theOutputQHadron ^ ^1842 G4QHadron* insH = (*output)[kpo];// Pointer to the Output QHadron ^ ^1953 //G4QHadron* insH =output->operator[](kpo);// Pointer to theOutputQHadron ^ ^ 1954 G4QHadron* insH = (*output)[kpo];// Pointer to the Output QHadron ^ ^ 1843 1955 G4int qhsNF = insH->GetNFragments(); // A#of secondary fragments ^ ^ 1844 1956 if(!qhsNF) // Subtract only final hadrons ^ ^ 1845 { // ^ ^1957 { // ^ ^ 1846 1958 G4LorentzVector qhs4Mom = insH->Get4Momentum();// 4M of theOutputQHadron^ ^ 1847 1959 G4int hPDG = insH->GetPDGCode(); // PDG Code of the Q-output Hadron ^ ^ … … 1849 1961 t4M -= qhs4Mom; // ^ ^ 1850 1962 tC -= insH->GetCharge(); // ^ ^ 1851 } // ^ ^1963 } // ^ ^ 1852 1964 } // End of the LOOP over output QHadrons ^ ^ 1853 1965 G4cout<<"G4QEnv::HadrQE:|||||4-MomCHECK||||d4M="<<t4M<<",dC="<<tC<<G4endl;//^ ^ … … 1858 1970 if(nHadrons>0) // Transfer QHadrons from Quasm to Output ^ ^ 1859 1971 { // ^ ^ 1860 for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Q-output QHadrons ^ ^1972 for (G4int ih=0; ih<nHadrons; ih++) // LOOP over Q-output QHadrons ^ ^ 1861 1973 { // ^ ^ 1862 //G4QHadron* inpH = output->operator[](ih); // ^ ^1863 G4QHadron* inpH = (*output)[ih]; // ^ ^1974 //G4QHadron* inpH = output->operator[](ih); // ^ ^ 1975 G4QHadron* inpH = (*output)[ih]; // ^ ^ 1864 1976 G4int hC=inpH->GetCharge(); // Charge of the Hadron ^ ^ 1865 1977 G4int hF=inpH->GetNFragments();// Number of fragments ^ ^ … … 1877 1989 hCB=theEnvironment.CoulombBarrier(hC,hB); // ^ ^ 1878 1990 hKE=hLV.e()-hLV.m(); // ^ ^ 1879 } // ^ ^1880 if(can&&hKE<hCB) // => "Suck Hadron in Quasm or Env" case^ ^1881 { // ^ ^1882 if(status) // => "Suck in the existing Quasmon" case^ ^1991 } // ^ ^ 1992 if(can&&hKE<hCB) // => "Suck Hadron into Quas or Env" case ^ ^ 1993 { // ^ ^ 1994 if(status) // => "Suck into existing Quasmon" case ^ ^ 1883 1995 { // ^ ^ 1884 1996 G4QContent tQC=inpH->GetQC()+pQ->GetQC(); // ^ ^ … … 1886 1998 pQ->InitQuasmon(tQC,tLV); // Reinitialize the current Quasmon ^ ^ 1887 1999 #ifdef pdebug 1888 G4cout<<"G4QE::HQE:Medium, H#"<<ih<<", QPDG="<<inpH->GetQPDG() // ^ ^2000 G4cout<<"G4QE::HQE:Medium, H#"<<ih<<", QPDG="<<inpH->GetQPDG() // ^ ^ 1889 2001 <<",4M="<<inpH->Get4Momentum()<<" is suckedInQ"<<G4endl; // ^ ^ 1890 2002 #endif 1891 } // ^ ^2003 } // ^ ^ 1892 2004 else // => "Suck in the existing Quasmon" case ^ ^ 1893 2005 { // ^ ^ … … 1896 2008 theEnvironment=G4QNucleus(tQC,tLV); // Reinit currentEnvironment ^ ^ 1897 2009 #ifdef pdebug 1898 G4cout<<"G4QE::HQE:Med,H#"<<ih<<",PDG="<<inpH->GetQPDG()<<",4M="//^ ^2010 G4cout<<"G4QE::HQE:Med,H#"<<ih<<",PDG="<<inpH->GetQPDG()<<",4M="//^ ^ 1899 2011 <<inpH->Get4Momentum()<<" is suckedInEnvironment"<<G4endl;//^ ^ 1900 2012 #endif 1901 } // End of the STATUS IF ^ ^1902 } // End of the E/Q suck Hdron IF ^ ^2013 } // End of the STATUS IF ^ ^ 2014 } // End of the E/Q suck Hdron IF ^ ^ 1903 2015 else if(!hF) // => "Hadron can go out" case ^ ^ 1904 2016 { // ^ ^ … … 1910 2022 G4double phZ=ph4M.z(); // p_x of the hadron ^ ^ 1911 2023 G4double phCost=phZ/sqrt(phX*phX+phY*phY+phZ*phZ);// Hadr cos(theta)^ ^ 1912 G4cout<<"G4QEnv::HadrQE:Medium, H#"<<ih<<",QPDG="<<curH->GetQPDG()//^ ^2024 G4cout<<"G4QEnv::HadrQE:Medium, H#"<<ih<<",QPDG="<<curH->GetQPDG()//^ ^ 1913 2025 <<", 4M="<<ph4M<<", ct="<<phCost<<G4endl; // ^ ^ 1914 2026 #endif … … 1916 2028 totQC-=curH->GetQC(); // ^ ^ 1917 2029 tot4M-=curH->Get4Momentum(); // ^ ^ 1918 } // ^ ^1919 } // ==> End of the LOOP over outQHadrons ^ ^2030 } // ^ ^ 2031 } // ==> End of the LOOP over outQHadrons ^ ^ 1920 2032 pQ->ClearOutput(); // Hadrons are filled, Clear Frag-out <-<-^ ^ 1921 2033 count3=0; // Reset counter of empty hadronizations ^ 1922 2034 //c3Max=1; // Reduce repetition Max to accelerate ^ 1923 2035 first=false; // First hadronization is for sure is over ^ 1924 } // ^2036 } // ^ 1925 2037 else count3++; // Increment counter of empty hadronizations^ 1926 } // ^2038 } // ^ 1927 2039 else if(status<0||status==2) // => "PANIC or NOTHING was done" case ^ 1928 2040 { // ^ 1929 2041 #ifdef pdebug 1930 G4cout<<"G4QE::HQE:***PANIC***,status="<<status<<",nC="<<nCount<<G4endl; // ^1931 #endif 1932 nCount++; // ^2042 G4cout<<"G4QE::HQE:***PANIC***,status="<<status<<",nC="<<nCount<<G4endl; // ^ 2043 #endif 2044 nCount++; // ^ 1933 2045 if(eCount==1 && status<0 && CheckGroundState(pQ,true))// Correct & Finish ^ 1934 2046 { // ^ … … 1943 2055 else if(status<0&&nHadrons) // This is just a confusion in the status...^ 1944 2056 { // ^ 1945 G4cerr<<"***G4QEnv::HadrQE: nH="<<nHadrons<<"< status="<<status<<G4endl;//^2057 G4cerr<<"***G4QEnv::HadrQE: nH="<<nHadrons<<"< status="<<status<<G4endl;//^ 1946 2058 for_each(output->begin(), output->end(), DeleteQHadron()); // -->-->-->---^ 1947 2059 output->clear(); // ^ 1948 2060 delete output; // >========================================^ 1949 2061 throw G4QException("G4QEnvironment::HadronizeQEnvironment:DoNothingEr");//^ 1950 } // ^ 2062 } // ^ 2063 else if(status==2 && eCount==1 && cAN<mcAN && envM>500.)// Add N from E to Q^ 2064 { // ^ 2065 #ifdef pdebug 2066 G4cout<<"G4QE::HQE:E="<<theEnvironment<<",M="<<envM<<",c="<<cAN<<G4endl;//^ 2067 #endif 2068 cAN++; // Increment the counter of absorptions ^ 2069 G4int envPDG = theEnvironment.GetPDG(); // PDGCode of the NuclQEnvironment^ 2070 G4LorentzVector env4M=theEnvironment.Get4Momentum(); // 4mom of the NucEnv^ 2071 G4int envN=theEnvironment.GetN(); // N of Env ^ 2072 G4int envZ=theEnvironment.GetZ(); // Z of Env ^ 2073 G4int resPDG=envPDG-1; // Residual for the neutron (prototype) ^ 2074 G4QContent nucQC=neutQC; // Nucleon Quark Content ^ 2075 if ( envN && (envN+envZ)*G4UniformRand() > envZ ) // Change to a proton ^ 2076 { // ^ 2077 resPDG=envPDG-1000; // new PDG for the Environment ^ 2078 nucQC=protQC; // proton QContent ^ 2079 } // ^ 2080 #ifdef pdebug 2081 G4cout<<"G4QE::HQE:P,eZ="<<envZ<<",eN="<<envN<<",rPDG="<<resPDG<<G4endl;//^ 2082 #endif 2083 G4QNucleus resNuc(resPDG); // Create the residual nucleus (future Env) ^ 2084 G4double resM=resNuc.GetGSMass(); // Mass of the residual nucleus ^ 2085 G4double eM=theEnvironment.GetGSMass(); // Mass of the current environment^ 2086 G4double nucM=eM-resM; // Effective mass of theNucleon ^ 2087 G4LorentzVector res4M(0.,0.,0.,resM); // Prototype of newEnv4M (at rest)^ 2088 G4LorentzVector nuc4M(0.,0.,0.,nucM); // Prototype of newEnv4M (at rest)^ 2089 if(std::fabs(env4M.e()-eM) > 0.001) // the Environment is not at rest ^ 2090 { // ^ 2091 res4M=(resM/eM)*env4M; // Proportional 4M for residEnv ^ 2092 nuc4M=(nucM/eM)*env4M; // Proportional 4M for effNucleon ^ 2093 } // ^ 2094 theEnvironment=G4QNucleus(res4M,resPDG);// Update the Environment ^ 2095 theQuasmons[0]->IncreaseBy(nucQC,nuc4M);// Update the Only Quasmon ^ 2096 #ifdef pdebug 2097 G4cout<<"G4QE::HQE:P,Q="<<nucQC<<nuc4M<<",env="<<theEnvironment<<G4endl;//^ 2098 #endif 2099 } // ^ 1951 2100 else if(status==2&&nCount>nCnMax)// Treat PANIC for stat=2 (NothingWasDone) ^ 1952 2101 { // ^ 2102 #ifdef pdebug 2103 G4cout<<"G4QE::HQE:PANIC,nC="<<nCount<<">"<<nCnMax<<G4endl; // ^ 2104 #endif 1953 2105 G4QContent qQC=pQ->GetQC(); // QuarkContent of the Quasmon ^ 1954 2106 G4int pqC=qQC.GetCharge(); // Charge (nP) of the Current Quasmon ^ … … 1959 2111 G4double fqMass=G4QPDGCode(22).GetNuclMass(pqC,pqB-pqC-pqS,pqS);//CQ FreeM^ 1960 2112 #ifdef edebug 1961 G4cout<<"G4QEnv::HQE:M="<<cqMass<<">fM="<<fqMass<<",S="<<pqS<<",C="<<pqC//^2113 G4cout<<"G4QEnv::HQE:M="<<cqMass<<">fM="<<fqMass<<",S="<<pqS<<",C="<<pqC//^ 1962 2114 <<",ePDG="<<theEnvironment.GetPDG()<<",qQC="<<qQC<<",eC="<<eCount //^ 1963 2115 <<G4endl; // ^ 1964 2116 #endif 1965 2117 if(pqB>0&&pqS<0&&cqMass>fqMass)// "AntiStrangeNucleus-Chipolino" case ^ 1966 { // ^2118 { // ^ 1967 2119 G4QHadron* nuclQ = new G4QHadron(qQC,cq4M);// Hadron for AntiStrangeNuc.^ 1968 2120 theEnvironment.DecayAntiStrange(nuclQ,&theQHadrons);// AntiStrange(D.E.)^ 1969 2121 pQ->KillQuasmon(); // If BackFusion succeeded, kill theQuasmon ^ 1970 2122 #ifdef edebug 1971 G4cout<<"G4QEnv::HQE:Status after kill (#"<<jq<<")="<<pQ->GetStatus()// ^2123 G4cout<<"G4QEnv::HQE:Status after kill (#"<<jq<<")="<<pQ->GetStatus()// ^ 1972 2124 <<", nH="<<theQHadrons.size()<<G4endl; // ^ 1973 2125 #endif … … 1977 2129 } // ^ 1978 2130 else if(theEnvironment.GetPDG()!=NUCPDG) // ==> "NuclearEnvironment" case ^ 1979 { // ^2131 { // ^ 1980 2132 if(eCount>1) // ^ 1981 { // ^2133 { // ^ 1982 2134 #ifdef fdebug 1983 G4cout<<"G4QE::HQE:TOTEVAP tPDG="<<totPDG<<",t4M="<<tot4M<<G4endl; // ^2135 G4cout<<"G4QE::HQE:TOTEVAP tPDG="<<totPDG<<",t4M="<<tot4M<<G4endl; // ^ 1984 2136 #endif 1985 2137 G4QHadron* evH = new G4QHadron(totQC,tot4M); // Create Hadron-ResidNuc^ … … 1998 2150 G4double curM=curE.GetGSMass();// min mass of the Total System ^ 1999 2151 #ifdef edebug 2000 G4cout<<"G4QEnv::HQE:Q#"<<jq<<",tM="<<tM<<">gsM="<<curM<<curE<<G4endl;//^2152 G4cout<<"G4QEnv::HQE:Q#"<<jq<<",tM="<<tM<<">gsM="<<curM<<curE<<G4endl;//^ 2001 2153 #endif 2002 2154 if(tM<curM) // ^ … … 2005 2157 G4double qMass=G4QPDGCode(qPDG).GetMass(); // GroundStM of theQuasmon ^ 2006 2158 #ifdef edebug 2007 G4cout<<"G4QE::HQE:nQ="<<nQuasmons<<",eC="<<eCount<<",qPDG="<<qPDG // ^2159 G4cout<<"G4QE::HQE:nQ="<<nQuasmons<<",eC="<<eCount<<",qPDG="<<qPDG // ^ 2008 2160 <<",qM="<<qMass<<",eM="<<envM<<",tM="<<tM<<",Q+E="<<qMass+envM//^ 2009 2161 <<G4endl; // ^ 2010 2162 #endif 2011 2163 if(eCount==1&&qPDG&&qMass&&tM>qMass+envM)//==> Q+E decay for one Quasm^ 2012 //if(nQuasmons==1 && qPDG && qMass && tM>qMass+envM) // ==> Q+E decay ^2164 //if(nQuasmons==1 && qPDG && qMass && tM>qMass+envM) // ==> Q+E decay ^ 2013 2165 { // ^ 2014 2166 G4int envPDG = theEnvironment.GetPDG(); // PDGCode of the NuclQEnv. ^ 2015 2167 #ifdef edebug 2016 G4cout<<"G4QEnv::HadrQEnv: Q+E decay, nQ=1, qPDG=="<<qPDG<<G4endl;//^2168 G4cout<<"G4QEnv::HadrQEnv: Q+E decay, nQ=1, qPDG=="<<qPDG<<G4endl;//^ 2017 2169 #endif 2018 2170 // => "Quasmon-Chipolino or Environment-Dibaryon" case ^ 2019 2171 if(qPDG==10 || qPDG==92000000 || qPDG==90002000 || qPDG==90000002)//^ 2020 { // ^2172 { // ^ 2021 2173 G4QPDGCode h1QPDG=nQPDG; // QPDG of the first hadron ^ 2022 2174 G4double h1M =mNeut; // Mass of the first hadron ^ … … 2024 2176 G4double h2M =mNeut; // Mass of the second hadron ^ 2025 2177 if(qPDG==10) // CHIPOLINO decay case ^ 2026 { // ^2178 { // ^ 2027 2179 G4QChipolino QChip(qQC);// define the Quasmon as a Chipolino ^ 2028 2180 h1QPDG=QChip.GetQPDG1();// QPDG of the first hadron ^ … … 2030 2182 h2QPDG=QChip.GetQPDG2();// QPDG of the second hadron ^ 2031 2183 h2M =h2QPDG.GetMass();// Mass of the second hadron ^ 2032 } // ^2033 else if(qPDG==90002000) // DiProton decay case ^2184 } // ^ 2185 else if(qPDG==90002000) // DiProton decay case ^ 2034 2186 { // ^ 2035 2187 h1QPDG=pQPDG; // QPDG of the first hadron ^ … … 2037 2189 h2QPDG=h1QPDG; // QPDG of the second hadron ^ 2038 2190 h2M =mProt; // Mass of the second hadron ^ 2039 } // ^2040 else if(qPDG==92000000) // Two lambdas case ^2191 } // ^ 2192 else if(qPDG==92000000) // Two lambdas case ^ 2041 2193 { // ^ 2042 2194 h1QPDG=lQPDG; // QPDG of the first hadron ^ … … 2046 2198 G4double ddMass=totMass-envM; // Free CM energy ^ 2047 2199 if(ddMass>mSigZ+mSigZ) // Sigma0+Sigma0 is possible ^ 2048 { // @@ Only two particles PS is used ^2200 { // @@ Only two particles PS is used ^ 2049 2201 G4double dd2=ddMass*ddMass; // Squared free energy ^ 2050 2202 G4double sma=mLamb+mLamb; // Lambda+Lambda sum ^ … … 2054 2206 G4double smi=mSigZ-mLamb; // Sigma0-Lambda difference ^ 2055 2207 G4double pr2=pr1; // Prototype of +L+S0 PS ^ 2056 if(ddMass>sma&&ddMass>smi) // ^2057 pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); // ^2208 if(ddMass>sma&&ddMass>smi) // ^ 2209 pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); // ^ 2058 2210 sma=mSigZ+mSigZ; // Sigma0+Sigma0 sum ^ 2059 2211 G4double pr3=pr2; // Prototype of +Sigma0+Sigma0 PS ^ … … 2074 2226 } // ^ 2075 2227 else if(ddMass>mSigZ+mLamb) // Lambda+Sigma0 is possible ^ 2076 { // @@ Only two particles PS is used ^2228 { // @@ Only two particles PS is used ^ 2077 2229 G4double dd2=ddMass*ddMass; // Squared free energy ^ 2078 2230 G4double sma=mLamb+mLamb; // Lambda+Lambda sum ^ … … 2083 2235 G4double pr2=pr1; //+L+S0 PS ^ 2084 2236 if(ddMass>sma && ddMass>smi) // ^ 2085 pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); // ^2237 pr2+=sqrt((dd2-sma*sma)*(dd2-smi*smi)); // ^ 2086 2238 if(pr2*G4UniformRand()>pr1) // --> "ENnv+Sigma0+Lambda" case ^ 2087 2239 { // ^ … … 2090 2242 } // ^ 2091 2243 } // ^ 2092 } // ^2244 } // ^ 2093 2245 if(h1M+h2M+envM<totMass) // => "Three parts decay" case ^ 2094 2246 { // ^ … … 2098 2250 if(!G4QHadron(tot4M).DecayIn3(h14M,h24M,e4M)) // ^ 2099 2251 { // ^ 2100 G4cerr<<"***G4QE::HQE:(0)tM="<<tot4M.m()<<"->h1="<<h1QPDG // ^2252 G4cerr<<"***G4QE::HQE:(0)tM="<<tot4M.m()<<"->h1="<<h1QPDG // ^ 2101 2253 <<"("<<h1M<<")+h2="<<h1QPDG<<"("<<h2M<<")+envM="<<envM//^ 2102 2254 <<"=="<<h1M+h2M+envM<<G4endl; // ^ 2103 throw G4QException("**G4QE::HadrQEnv:QChip+E DecIn3 error");//^2104 } // ^2255 throw G4QException("**G4QE::HadrQEnv:QChip+E DecIn3 error");//^ 2256 } // ^ 2105 2257 G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M); // ^ 2106 2258 theQHadrons.push_back(h1H); // (delete equivalent) ^ 2107 2259 #ifdef pdebug 2108 G4cout<<"G4QE::HQE:(1) H1="<<h1QPDG<<h14M<<G4endl; // ^2260 G4cout<<"G4QE::HQE:(1) H1="<<h1QPDG<<h14M<<G4endl; // ^ 2109 2261 #endif 2110 2262 G4QHadron* h2H = new G4QHadron(h2QPDG.GetPDGCode(),h24M); // ^ … … 2118 2270 G4cout<<"G4QE::HQE:(1) QEnv="<<envPDG<<e4M<<G4endl; // ^ 2119 2271 #endif 2120 } // ^2121 else // Try to recover ^2272 } // ^ 2273 else // Try to recover ^ 2122 2274 { // ^ 2123 2275 //if(eCount==1&&CheckGroundState(pQ,true)) // @@ BackFusion ^ 2124 2276 if(eCount==1&&CheckGroundState(pQ))// BackFusion attempt ^ 2125 { // ^2277 { // ^ 2126 2278 pQ->KillQuasmon();// ?? ^ 2127 2279 eCount--; // Reduce a#of theLivingQuasmons ^ … … 2138 2290 <<"(M="<<h1M<<")+h2="<<h1QPDG<<"(M="<<h2M<<")+EM="<<envM//^ 2139 2291 <<"="<<h1M+h2M+envM<<G4endl; // ^ 2140 //throw G4QException("G4QEnv::HQE:(0)Chi+Env mass > totMass");//^2292 //throw G4QException("G4QEnv::HQE:(0)Chi+Env mass > totMass");//^ 2141 2293 #endif 2142 2294 CleanUp(); // ^ … … 2144 2296 EvaporateResidual(evH); // Evaporate residual (del. equiv.) ^ 2145 2297 return theQHadrons; // ^ 2146 } // ^2147 } // ^2298 } // ^ 2299 } // ^ 2148 2300 else // => "Two particles decay" case ^ 2149 2301 { // ^ … … 2157 2309 output->clear(); // -->-->-->-->-->-->-->-->-->-->-->-->-->--^ 2158 2310 delete output; // >========================================^ 2159 throw G4QException("***G4QEnv::HadrQEnv: Q+Env DecIn2 error");//^2160 } // ^2311 throw G4QException("***G4QEnv::HadrQEnv: Q+Env DecIn2 error");//^ 2312 } // ^ 2161 2313 G4QHadron* qH = new G4QHadron(qPDG,fq4M);// the out going Quasmon ^ 2162 2314 theQHadrons.push_back(qH); // (delete equivalent) ^ 2163 2315 #ifdef pdebug 2164 G4cout<<"G4QE::HQE:QuasmH="<<qPDG<<fq4M<<G4endl; // ^2316 G4cout<<"G4QE::HQE:QuasmH="<<qPDG<<fq4M<<G4endl; // ^ 2165 2317 #endif 2166 2318 G4QHadron* qeH = new G4QHadron(envPDG,qe4M);//theRecoilEnvironment^ 2167 2319 #ifdef pdebug 2168 G4cout<<"G4QE::HQE:EnvironH="<<envPDG<<qe4M<<G4endl; // ^2320 G4cout<<"G4QE::HQE:EnvironH="<<envPDG<<qe4M<<G4endl; // ^ 2169 2321 #endif 2170 2322 if(envPDG==92000000||envPDG==90002000||envPDG==90000002) // ^ 2171 2323 theEnvironment.DecayDibaryon(qeH,&theQHadrons); // ^ 2172 2324 else theQHadrons.push_back(qeH);// (del.equiv.) *** this too *** ^ 2173 } // ^2325 } // ^ 2174 2326 for_each(output->begin(),output->end(),DeleteQHadron());//-->-->-->-^ 2175 2327 output->clear(); // ^ … … 2181 2333 } // ^ 2182 2334 else if(eCount>1&&(nCount>nCnMax||theEnvironment.GetA()<2))// 2Quasmons ^ 2183 { // ^2335 { // ^ 2184 2336 theEnvironment.InitByPDG(NUCPDG);// KillEnvironment(@@ Q's? CleanUp)) ^ 2185 2337 #ifdef fdebug 2186 G4cout<<"G4QEnv::HQE:Evaporate Env+Quasm Env="<<curE<<G4endl;// ^2338 G4cout<<"G4QEnv::HQE:Evaporate Env+Quasm Env="<<curE<<G4endl;// ^ 2187 2339 #endif 2188 2340 G4QHadron* nucQE = new G4QHadron(curQC,t4M);// Hadron for Quasm+Envir.^ … … 2190 2342 pQ->KillQuasmon(); // If BackFusion succeeded, kill theQuasmon ^ 2191 2343 #ifdef edebug 2192 G4cout<<"G4QEnv::HQE:StatusAfterKill (#"<<jq<<")="<<pQ->GetStatus()// ^2344 G4cout<<"G4QEnv::HQE:StatusAfterKill (#"<<jq<<")="<<pQ->GetStatus()// ^ 2193 2345 <<", nH="<<theQHadrons.size()<<G4endl; // ^ 2194 2346 #endif … … 2199 2351 if(eCount==1 && tM>=curM) //==>for one Quasmon evaporate ResTotN ^ 2200 2352 { // ^ 2201 theEnvironment.InitByPDG(NUCPDG); // Cancele the Environment^2353 theEnvironment.InitByPDG(NUCPDG);// Cancele the Environment ^ 2202 2354 G4int ttPDG=totQC.GetSPDGCode(); // Total PDG Code (10 - Chipolino) ^ 2203 2355 #ifdef pcdebug … … 2210 2362 G4int ttBN=totQC.GetBaryonNumber(); // ^ 2211 2363 if(ttPDG==10&&ttBN<2) // Chipolino case ^ 2212 { // ^2364 { // ^ 2213 2365 G4QChipolino QCh(totQC);// define the TotalResidual as a Chipolino ^ 2214 2366 G4QPDGCode h1QPDG=QCh.GetQPDG1(); // QPDG of the first hadron ^ … … 2223 2375 if(!G4QHadron(tot4M).DecayIn2(h14M,h24M)) // ^ 2224 2376 { // ^ 2225 G4cerr<<"***G4QE::HQE:tM="<<ttM<<"->h1="<<h1QPDG<<"("<<h1M // ^2377 G4cerr<<"***G4QE::HQE:tM="<<ttM<<"->h1="<<h1QPDG<<"("<<h1M // ^ 2226 2378 <<")+h2="<<h1QPDG<<"("<<h2M<<"="<<h1M+h2M<<G4endl; // ^ 2227 throw G4QException("**G4QE::HadrQEnv:QChip (1) DecIn2 error");//^2228 } // ^2379 throw G4QException("**G4QE::HadrQEnv:QChip (1) DecIn2 error");//^ 2380 } // ^ 2229 2381 G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M); // ^ 2230 2382 theQHadrons.push_back(h1H); // (delete equivalent) ^ 2231 2383 #ifdef pdebug 2232 G4cout<<"G4QE::HQE: QCip-> H1="<<h1QPDG<<h14M<<G4endl; // ^2384 G4cout<<"G4QE::HQE: QCip-> H1="<<h1QPDG<<h14M<<G4endl; // ^ 2233 2385 #endif 2234 2386 G4QHadron* h2H = new G4QHadron(h2QPDG.GetPDGCode(),h24M); // ^ … … 2240 2392 else // ^ 2241 2393 { // ^ 2242 G4cerr<<"***G4QE::HQE:tM="<<ttM<<totQC<<"->h1="<<h1QPDG<<"(" // ^2394 G4cerr<<"***G4QE::HQE:tM="<<ttM<<totQC<<"->h1="<<h1QPDG<<"(" // ^ 2243 2395 <<h1M<<")+h2="<<h1QPDG<<"("<<h2M<<"="<<h1M+h2M<<G4endl;// ^ 2244 throw G4QException("***G4QE::HadrQEnv:QChip (2) DecIn2 error");// ^2245 } // ^2396 throw G4QException("***G4QE::HadrQEnv:QChip (2) DecIn2 error");// ^ 2397 } // ^ 2246 2398 } // ^ 2247 2399 else // ^ 2248 { // ^2400 { // ^ 2249 2401 #ifdef edebug 2250 2402 if(ttPDG<80000000&&ttBN<1) // ^ … … 2272 2424 G4int PDGQ=QPDGQ.GetPDGCode(); // PDG Code of the QUASMON ^ 2273 2425 #ifdef edebug 2274 G4cout<<"G4QEnv::HadrQEnv: vacuum PDGQ="<<PDGQ<<G4endl; // ^2426 G4cout<<"G4QEnv::HadrQEnv: vacuum PDGQ="<<PDGQ<<G4endl; // ^ 2275 2427 #endif 2276 2428 if(!PDGQ) status=-1; // Unknown Quasmon in Vaquum - PANIC ^ … … 2279 2431 { // ^ 2280 2432 #ifdef edebug 2281 G4cout<<"G4QEnv::HadrQEnv:Sigma Mass="<<cqMass<<G4endl; // ^2433 G4cout<<"G4QEnv::HadrQEnv:Sigma Mass="<<cqMass<<G4endl; // ^ 2282 2434 #endif 2283 2435 G4double hyM=mNeut; // Prototype of the hyperon mass ^ … … 2286 2438 G4int pigPDG=-211; // Prototype of the gamma/pion PDG Code ^ 2287 2439 if(PDGQ==3112||PDGQ==90999001) // --> "Sigma-" case ^ 2288 { // ^2440 { // ^ 2289 2441 if(cqMass>mPi+mLamb) // "Lambda + Pi- is possible" case ^ 2290 { // ^2442 { // ^ 2291 2443 hyM = mLamb; // Lambda mass ^ 2292 2444 hyPDG = 3122; // Lambda PDG Code ^ 2293 } // ^2445 } // ^ 2294 2446 else if(cqMass>mSigM) // "Sigma- gamma decay" case ^ 2295 { // ^2447 { // ^ 2296 2448 hyM=mSigM; // Sigma- mass ^ 2297 2449 hyPDG=3112; // Sigma- PDG Code ^ 2298 2450 pigM=0.; // Gamma mass ^ 2299 2451 pigPDG=22; // Gamma PDG Code ^ 2300 } // ^2452 } // ^ 2301 2453 } // ^ 2302 2454 else if(PDGQ==3222||PDGQ==91000999) // --> "Sigma+" case ^ 2303 { // ^2455 { // ^ 2304 2456 pigPDG= 211; // Pi+ PDG Code ^ 2305 2457 if(cqMass>mPi+mLamb) // --- "Lambda + Pi+ is possible" case ^ 2306 { // ^2458 { // ^ 2307 2459 hyM = mLamb; // Lambda mass ^ 2308 2460 hyPDG = 3122; // Lambda PDG Code ^ … … 2311 2463 } // ^ 2312 2464 else if(cqMass>mSigP) // "Sigma- gamma decay" case ^ 2313 { // ^2465 { // ^ 2314 2466 hyM=mSigP; // Sigma+ mass ^ 2315 2467 hyPDG=3222; // Sigma+ PDG Code ^ 2316 2468 pigM=0.; // Gamma mass ^ 2317 2469 pigPDG=22; // Gamma PDG Code ^ 2318 } // ^2470 } // ^ 2319 2471 else if(cqMass>mPi0+mProt&&G4UniformRand()>.5) // "P + Pi0" case ^ 2320 { // ^2472 { // ^ 2321 2473 hyM = mProt; // Proton mass ^ 2322 2474 hyPDG = 2212; // Proton PDG Code ^ 2323 2475 pigM = mPi0; // Pi0 mass ^ 2324 2476 pigPDG= 111; // Pi0 PDG Code ^ 2325 } // ^2477 } // ^ 2326 2478 else if(cqMass<mPi+mNeut)// "P+gamma" case as "N+Pi+" is impossible ^ 2327 { // ^2479 { // ^ 2328 2480 hyM = mProt; // Proton mass ^ 2329 2481 hyPDG = 2212; // Proton PDG Code ^ 2330 2482 pigM=0.; // Gamma mass ^ 2331 2483 pigPDG=22; // Gamma PDG Code ^ 2332 } // ^2484 } // ^ 2333 2485 // othing should be done for "N + P+" case ^ 2334 2486 } // ^ … … 2336 2488 G4LorentzVector m4Mom(0.,0.,0.,pigM);// pion/gamma mass ^ 2337 2489 if(!G4QHadron(cq4M).DecayIn2(b4Mom, m4Mom)) // "DecayIn2 failed" case ^ 2338 { // ^2490 { // ^ 2339 2491 G4cout<<"---Warning---G4QE::HQE:H="<<hyPDG<<"(m="<<hyM<<")+G/Pi=" //^ 2340 <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^2492 <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^ 2341 2493 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC ^ 2342 2494 CleanUp(); // ^ 2343 if(!CheckGroundState(quasH,true)) // Last posibility to correct ^2344 { // ^2495 if(!CheckGroundState(quasH,true)) // Last posibility to correct ^ 2496 { // ^ 2345 2497 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // ^ 2346 2498 theQHadrons.push_back(hadr); // Cor or fill as It Is ^ … … 2348 2500 G4cout<<"-Warn-G4QE::HQE:Sig,QC="<<totQC<<",4M="<<tot4M<<G4endl;//^ 2349 2501 #endif 2350 //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^2502 //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^ 2351 2503 } // ^ 2352 2504 delete quasH; // Delete the temporary fake Quasmon ^ … … 2354 2506 } // ^ 2355 2507 #ifdef pdebug 2356 G4cout<<"G4QEnv::HadronizeQEnv: Sigma="<<PDGQ<<cq4M<<" -> Hyperon="// ^2508 G4cout<<"G4QEnv::HadronizeQEnv: Sigma="<<PDGQ<<cq4M<<" -> Hyperon="// ^ 2357 2509 <<hyPDG<<b4Mom<<" + Gamma/Pi="<<pigPDG<<m4Mom<<G4endl; // ^ 2358 2510 #endif … … 2365 2517 totQC-=qQC; // Update total residual QC of HadrPr. ^ 2366 2518 eCount--; // Reduce a#of the living Quasmons ^ 2367 } // ^2519 } // ^ 2368 2520 else if(PDGQ==90999002||PDGQ==91001999) // pS+/nS- ^ 2369 2521 { // ^ 2370 2522 #ifdef edebug 2371 G4cout<<"G4QEnv::HadrQEnv: Nucleon+Sigma Mass="<<cqMass<<G4endl; // ^2523 G4cout<<"G4QEnv::HadrQEnv: Nucleon+Sigma Mass="<<cqMass<<G4endl; // ^ 2372 2524 #endif 2373 2525 G4bool dinFlag = false; // Di-nucleon flag ^ … … 2377 2529 G4int pigPDG=2112; // Prototype of the nucleon PDG Code ^ 2378 2530 if (PDGQ==90999002) // --> "n+Sigma-" case ^ 2379 { // ^2531 { // ^ 2380 2532 if(cqMass<mNeut+mSigM) // ----> "DiNeutron+Pi-" case ^ 2381 { // ^2533 { // ^ 2382 2534 dinFlag = true; // For the final decay ^ 2383 2535 hyM=mNeut+mNeut; // Di-neutron ^ … … 2385 2537 pigM=mPi; // Pi- mass ^ 2386 2538 pigPDG=-211; // Pi- PDG Code ^ 2387 } // ^2539 } // ^ 2388 2540 } // ^ 2389 2541 else if(PDGQ==91001999) // --> "p+Sigma+" case ^ 2390 { // ^2542 { // ^ 2391 2543 hyM=mSigP; // Sigma+ ^ 2392 2544 hyPDG=3222; // PDG Code of Sigma+ ^ … … 2394 2546 pigPDG=2212; // PDG Code of proton ^ 2395 2547 if(cqMass<mProt+mSigP) // ----> "Proton+Proton" case ^ 2396 { // ^2548 { // ^ 2397 2549 hyM=mProt; // Proton mass ^ 2398 2550 hyPDG=2212; // Proton PDG Code ^ 2399 2551 pigM=mProt; // Proton mass ^ 2400 2552 pigPDG=2212; // Proton PDG Code ^ 2401 } // ^2553 } // ^ 2402 2554 } // ^ 2403 2555 G4LorentzVector b4Mom(0.,0.,0.,hyM); // Hyperon (di-nucleon) mass ^ 2404 2556 G4LorentzVector m4Mom(0.,0.,0.,pigM);// Nucleon (pion) mass ^ 2405 2557 if(!G4QHadron(cq4M).DecayIn2(b4Mom, m4Mom)) // "DecayIn2 failed" case ^ 2406 { // ^2558 { // ^ 2407 2559 G4cout<<"--Warning--G4QE::HQE:S/D="<<hyPDG<<"(m="<<hyM<<")+N/Pi=" //^ 2408 <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^2560 <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^ 2409 2561 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC ^ 2410 2562 CleanUp(); // ^ 2411 if(!CheckGroundState(quasH,true)) // Last posibility to correct ^2412 { // ^2563 if(!CheckGroundState(quasH,true)) // Last posibility to correct ^ 2564 { // ^ 2413 2565 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // ^ 2414 2566 theQHadrons.push_back(hadr); // Cor or fill as It Is ^ … … 2416 2568 G4cout<<"-Warn-G4QE::HQE:Sig,QC="<<totQC<<",4M="<<tot4M<<G4endl;//^ 2417 2569 #endif 2418 //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^2570 //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^ 2419 2571 } // ^ 2420 2572 delete quasH; // Delete the temporary fake Quasmon ^ … … 2422 2574 } // ^ 2423 2575 #ifdef pdebug 2424 G4cout<<"G4QEnv::HadronizeQEnv: NSigma="<<PDGQ<<cq4M<<"-> Sigma/dN="//^2576 G4cout<<"G4QEnv::HadronizeQEnv: NSigma="<<PDGQ<<cq4M<<"-> Sigma/dN="//^ 2425 2577 <<hyPDG<<b4Mom<<" + N/Pi="<<pigPDG<<m4Mom<<G4endl; // ^ 2426 2578 #endif … … 2429 2581 theQHadrons.push_back(curBar); // Fill the Hyperon (delete equivalent)^ 2430 2582 if(dinFlag) // ^ 2431 { // ^2583 { // ^ 2432 2584 G4QHadron* secBar = new G4QHadron(hyPDG,b4Mom);// Cre. 2-nd nucleon ^ 2433 2585 theQHadrons.push_back(secBar);// Fill 2-nd nucleon (delete equiv.) ^ … … 2439 2591 totQC-=qQC; // Update total residual QC of HadrPr. ^ 2440 2592 eCount--; // Reduce a#of the living Quasmons ^ 2441 } // ^2593 } // ^ 2442 2594 else if(PDGQ==90999003||PDGQ==91002999) // ppS+/nnS- ^ 2443 2595 { // ^ 2444 2596 #ifdef edebug 2445 G4cout<<"G4QEnv::HadrQEnv: DiNucleon+Sigma Mass="<<cqMass<<G4endl; // ^2597 G4cout<<"G4QEnv::HadrQEnv: DiNucleon+Sigma Mass="<<cqMass<<G4endl; // ^ 2446 2598 #endif 2447 2599 G4bool dinFlag = false; // Di-nucleon flag ^ … … 2451 2603 G4int pigPDG=2112; // Prototype of the nucleon PDG Code ^ 2452 2604 if (PDGQ==90999003) // --> "n+Sigma-" case ^ 2453 { // ^2605 { // ^ 2454 2606 if(cqMass<pigM+mSigM) // ----> "DiNeutron+Pi-" case ^ 2455 { // ^2607 { // ^ 2456 2608 dinFlag = true; // For the final decay ^ 2457 2609 pigM=mNeut+mNeut+mNeut;// Tri-neutron ^ … … 2459 2611 hyM=mPi; // Pi- mass ^ 2460 2612 hyPDG=-211; // Pi- PDG Code ^ 2461 } // ^2613 } // ^ 2462 2614 } // ^ 2463 2615 else if(PDGQ==91002999) // --> "p+Sigma+" case ^ 2464 { // ^2616 { // ^ 2465 2617 hyM=mSigP; // Sigma+ ^ 2466 2618 hyPDG=3222; // PDG Code of Sigma+ ^ … … 2468 2620 pigPDG=2212; // PDG Code of proton ^ 2469 2621 if(cqMass<pigM+mSigP) // ----> "DiProton+Pi+" case ^ 2470 { // ^2622 { // ^ 2471 2623 dinFlag = true; // For the final decay ^ 2472 2624 pigM=mProt+mProt+mProt;// Tri-proton ^ … … 2474 2626 hyM=mPi; // Pi+ mass ^ 2475 2627 hyPDG=211; // Pi+ PDG Code ^ 2476 } // ^2628 } // ^ 2477 2629 } // ^ 2478 2630 G4LorentzVector b4Mom(0.,0.,0.,hyM); // Hyperon (di-nucleon) mass ^ 2479 2631 G4LorentzVector m4Mom(0.,0.,0.,pigM);// Nucleon (pion) mass ^ 2480 2632 if(!G4QHadron(cq4M).DecayIn2(b4Mom, m4Mom)) // "DecayIn2 failed" case ^ 2481 { // ^2633 { // ^ 2482 2634 G4cout<<"--Warning--G4QE::HQE:S/Pi="<<hyPDG<<"(m="<<hyM<<")+D/T=" //^ 2483 <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^2635 <<pigPDG<<"(m="<<pigM<<")="<<hyM+pigM<<">"<<cqMass<<G4endl; //^ 2484 2636 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC ^ 2485 2637 CleanUp(); // ^ 2486 if(!CheckGroundState(quasH,true)) // Last posibility to correct ^2487 { // ^2638 if(!CheckGroundState(quasH,true)) // Last posibility to correct ^ 2639 { // ^ 2488 2640 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // ^ 2489 2641 theQHadrons.push_back(hadr); // Cor or fill as It Is ^ … … 2491 2643 G4cout<<"-Warn-G4QE::HQE:Sig,QC="<<totQC<<",4M="<<tot4M<<G4endl;//^ 2492 2644 #endif 2493 //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^2645 //throw G4QException("G4QEnvironment::HadronizeQEnv:Sig error");//^ 2494 2646 } // ^ 2495 2647 delete quasH; // Delete the temporary fake Quasmon ^ … … 2497 2649 } // ^ 2498 2650 #ifdef pdebug 2499 G4cout<<"G4QEnv::HadronizeQEnv:2NSigma="<<PDGQ<<cq4M<<"-> Sigma/Pi="//^2651 G4cout<<"G4QEnv::HadronizeQEnv:2NSigma="<<PDGQ<<cq4M<<"-> Sigma/Pi="//^ 2500 2652 <<hyPDG<<b4Mom<<" + 2N/3N="<<pigPDG<<m4Mom<<dinFlag<<G4endl; // ^ 2501 2653 #endif … … 2509 2661 theQHadrons.push_back(secBar); // Fill the gam/pi (delete equivalent) ^ 2510 2662 if(dinFlag) // ^ 2511 { // ^2663 { // ^ 2512 2664 G4QHadron* triBar = new G4QHadron(pigPDG,m4Mom);// Cre. 3-d nucleon ^ 2513 2665 theQHadrons.push_back(triBar);// Fill 3-d nucleon (delete equival.) ^ … … 2517 2669 totQC-=qQC; // Update total residual QC of HadrPr. ^ 2518 2670 eCount--; // Reduce a#of the living Quasmons ^ 2519 } // ^2671 } // ^ 2520 2672 else if (PDGQ!=10) // @@ Chipolino can wait @@ ^ 2521 2673 { // ^ … … 2523 2675 G4double gsM=QPDGQ.GetMass(); // GSmass of the Quasmon ^ 2524 2676 #ifdef edebug 2525 G4cout<<"G4QEnv::HadrQEnv:#"<<jq<<",qM="<<qM<<">gsM="<<gsM<<G4endl;// ^2526 #endif 2527 if(fabs(qM-gsM)<0.0001)// "Fill & Kill" Case ^2677 G4cout<<"G4QEnv::HadrQEnv:#"<<jq<<",qM="<<qM<<">gsM="<<gsM<<G4endl;// ^ 2678 #endif 2679 if(fabs(qM-gsM)<0.0001) // "Fill & Kill" Case ^ 2528 2680 { // ^ 2529 2681 G4QHadron* resQ = new G4QHadron(PDGQ,cq4M); // GSM hadron for CurQ ^ 2530 2682 #ifdef pdebug 2531 G4cout<<"G4QEnv::HadrQEnv:ResQ="<<PDGQ<<cq4M<<G4endl; // ^2683 G4cout<<"G4QEnv::HadrQEnv:ResQ="<<PDGQ<<cq4M<<G4endl; // ^ 2532 2684 #endif 2533 2685 theQHadrons.push_back(resQ); // @@ Check Dibarions @@ (del.equiv.) ^ … … 2536 2688 totQC-=qQC; // Update total residual QC of HadrPr. ^ 2537 2689 eCount--; // Reduce a#of the living Quasmons ^ 2538 } // ^2539 else if(eCount==1 && qM<gsM && CheckGroundState(pQ,true))// Cor.& Fin.^2690 } // ^ 2691 else if(eCount==1 && qM<gsM && CheckGroundState(pQ,true))// Cor.& Fin.^ 2540 2692 { // ^ 2541 2693 #ifdef edebug 2542 G4cout<<"G4QEnv::HadrQEnv:**>>** CGS Correction **>>**"<<G4endl; // ^2694 G4cout<<"G4QEnv::HadrQEnv:**>>** CGS Correction **>>**"<<G4endl; // ^ 2543 2695 #endif 2544 2696 for_each(output->begin(), output->end(), DeleteQHadron()); //-->-->-^ … … 2549 2701 return theQHadrons; // ^ 2550 2702 } // ^ 2551 else if(qM<gsM&&(pQ->GetQC().GetSPDGCode()==1114 // ^2552 || pQ->GetQC().GetSPDGCode()==2224) // ^2703 else if(qM<gsM&&(pQ->GetQC().GetSPDGCode()==1114 // ^ 2704 || pQ->GetQC().GetSPDGCode()==2224) // ^ 2553 2705 &&qM>theWorld->GetQParticle(QPDGQ)->MinMassOfFragm())//Del&Kill ^ 2554 2706 { // ^ 2555 2707 #ifdef edebug 2556 G4cout<<"G4QEnv::HadrQEnv:**||** Copy&Decay **||**"<<G4endl; // ^2708 G4cout<<"G4QEnv::HadrQEnv:**||** Copy&Decay **||**"<<G4endl; // ^ 2557 2709 #endif 2558 2710 G4QHadronVector* decHV=pQ->DecayQuasmon();//Dec.Quasm & fill decHV=*^ … … 2562 2714 pQ->KillQuasmon(); // Make done the current Quasmon ^ 2563 2715 eCount--; // Reduce a#of the living Quasmons ^ 2564 } // ^2565 } // ^2566 } // End of the Medium/Vacuum IF ^2567 } // End of the status ELSE IF ^2716 } // ^ 2717 } // ^ 2718 } // End of the Medium/Vacuum IF ^ 2719 } // End of the status ELSE IF ^ 2568 2720 else if(status==3) count3++; // ^ 2569 2721 if(status<0) // Panic: Quasmon is below theMassShell ^ … … 2581 2733 G4int nRQ=0; // Prot. of a#of additionalRealQuasmons ^ 2582 2734 #ifdef edebug 2583 G4cout<<"G4QEnv::HadrQEnv: ***PANIC*** for jq="<<jq<<G4endl; // ^2735 G4cout<<"G4QEnv::HadrQEnv: ***PANIC*** for jq="<<jq<<G4endl; // ^ 2584 2736 #endif 2585 2737 G4ThreeVector vp= pQ->Get4Momentum().vect(); // PANICQuasmon momentum ^ 2586 2738 G4double dpm=1.e+30; // Big number (dot product of momenta) ^ 2587 if(nQuasmons>1) for(G4int ir=0; ir<nQuasmons; ir++)// Search for partner ^2739 if(nQuasmons>1) for(G4int ir=0; ir<nQuasmons; ir++)// Search for partner ^ 2588 2740 { // ^ 2589 2741 if(ir!=jq) // Skip the current (PANIC) Quasmon itself^ 2590 2742 { // ^ 2591 G4Quasmon* rQ = theQuasmons[ir]; // ^2743 G4Quasmon* rQ = theQuasmons[ir]; // ^ 2592 2744 G4int Qst = rQ->GetStatus();// Status of a Quasmon ^ 2593 2745 #ifdef edebug 2594 G4cout<<"G4QEnv::HadrQEnv: ir="<<ir<<",Qstatus="<<Qst<<G4endl; // ^2746 G4cout<<"G4QEnv::HadrQEnv: ir="<<ir<<",Qstatus="<<Qst<<G4endl; // ^ 2595 2747 #endif 2596 2748 if(Qst>0) // Skip the dead Quasmon ^ 2597 {2598 nRQ++; // Increment real-Quasmon-counter ^2749 { 2750 nRQ++; // Increment real-Quasmon-counter ^ 2599 2751 G4double dp=vp.dot(rQ->Get4Momentum().vect()); // ^ 2600 2752 if(dp<dpm) // Search for the "moving in thesameDir" ^ … … 2602 2754 ppm=ir; // Remember the index of MinProj Quasmon ^ 2603 2755 dpm=dp; // Remember the value of theMinProjection ^ 2604 } // ^2605 } // ^2606 } // End of the Quasmon LOOP2756 } // ^ 2757 } // ^ 2758 } // End of the Quasmon LOOP 2607 2759 } // End of the partner-search-for-the-PANIC-Quasmon LOOP ^ 2608 2760 if(nRQ) // Merge with theBestPartnerQuasmonCandid ^ 2609 2761 { // ^ 2610 G4Quasmon* rQ = theQuasmons[ppm]; // ^2762 G4Quasmon* rQ = theQuasmons[ppm]; // ^ 2611 2763 G4QContent rQC= rQ->GetQC(); // ^ 2612 2764 G4LorentzVector r4M= rQ->Get4Momentum(); // ^ … … 2615 2767 rQ->InitQuasmon(rQC, r4M); // Make new Quasmon ^ 2616 2768 #ifdef edebug 2617 G4cout<<"G4QE::HQE:"<<pQ->GetQC()<<"+"<<rQ->GetQC()<<"="<<rQC<<G4endl;//^2769 G4cout<<"G4QE::HQE:"<<pQ->GetQC()<<"+"<<rQ->GetQC()<<"="<<rQC<<G4endl;//^ 2618 2770 #endif 2619 2771 pQ->KillQuasmon(); // Delete old Quasmon ^ 2620 2772 eCount--; // Decrement counter of living Quasmons ^ 2621 } // ^2773 } // ^ 2622 2774 else // No candidate to resolve PANIC was found ^ 2623 2775 { // ^ 2624 2776 #ifdef edebug 2625 G4cout<<"G4QEnv::HQE: No Q-cand. nRQ="<<nRQ<<",eC="<<eCount<<G4endl; // ^2777 G4cout<<"G4QEnv::HQE: No Q-cand. nRQ="<<nRQ<<",eC="<<eCount<<G4endl; // ^ 2626 2778 #endif 2627 2779 //if(eCount==1 && CheckGroundState(pQ,true)) // BackFusion attempt ^ … … 2633 2785 pQ->KillQuasmon(); // ^ 2634 2786 eCount--; // Reduce a#of the living Quasmons ^ 2635 return theQHadrons; // ^2787 return theQHadrons; // ^ 2636 2788 } // ^ 2637 2789 #ifdef fdebug 2638 G4cout<<"G4QEnv::HadrQEnv:NO PANICsolution,t="<<tot4M<<totQC<<G4endl;// ^2790 G4cout<<"G4QEnv::HadrQEnv:NO PANICsolution,t="<<tot4M<<totQC<<G4endl;// ^ 2639 2791 #endif 2640 2792 totQC=theEnvironment.GetQC(); // ^ 2641 2793 tot4M=theEnvironment.Get4Momentum(); // ^ 2642 if(nQuasmons) for(G4int jr=0; jr<nQuasmons; jr++) // Search for partner ^2794 if(nQuasmons) for(G4int jr=0; jr<nQuasmons; jr++) // Search for partner ^ 2643 2795 { // ^ 2644 G4Quasmon* rQ = theQuasmons[jr]; // Pointer to the Quasmon ^2796 G4Quasmon* rQ = theQuasmons[jr]; // Pointer to the Quasmon ^ 2645 2797 G4int Qst = rQ->GetStatus();// Status of a Quasmon ^ 2646 2798 if(jr==jq) // ^ 2647 { // ^2799 { // ^ 2648 2800 totQC+=rQ->GetQC(); // QuarkContent of the Quasmon ^ 2649 2801 tot4M+=rQ->Get4Momentum();// QuarkContent of the Quasmon ^ … … 2653 2805 totQC+=rQ->GetQC(); // QuarkContent of the Quasmon ^ 2654 2806 tot4M+=rQ->Get4Momentum();// QuarkContent of the Quasmon ^ 2655 } // ^2807 } // ^ 2656 2808 } // End of the "No candidate to resolve PANIC" ELSE ^ 2657 2809 pQ->KillQuasmon(); // Kill the only Quasmon ^ … … 2665 2817 force=true; // Make the force decision ^ 2666 2818 break; // Out of the fragmentation loop >->+ ^ 2667 } // | ^2668 } // | ^2669 } // | ^2819 } // | ^ 2820 } // | ^ 2821 } // | ^ 2670 2822 for_each(output->begin(), output->end(), DeleteQHadron()); // ->-->-->--|-----^ 2671 2823 output->clear(); // | ^ 2672 2824 delete output; // >================================|=====^ 2673 } // End of skip of the dead Quasmons | 2674 #ifdef pdebug 2675 G4cout<<"G4QE::HQE:QStat("<<jq<<"="<<status<<pQ->Get4Momentum()<<G4endl;//| 2676 #endif 2677 } // End of fragmentation LOOP over Quasmons (jq) <--------<----------<-----+ 2825 } // End of skip of the dead Quasmons | 2826 #ifdef pdebug 2827 G4cout<<"G4QE::HQE:QStat("<<jq<<"="<<status<<pQ->Get4Momentum()<<G4endl;//| 2828 #endif 2829 } // End of fragmentation LOOP over Quasmons (jq) <--------<----------<-----+ 2830 cAN=0; 2678 2831 } 2679 2832 else if(totMass>totM+.001) // ==> "Try Evaporate or decay" case 2680 {2833 { 2681 2834 #ifdef edebug 2682 G4cout<<"G4QEnv::HadrQE: NQ="<<nQuasmons<<",tM="<<totMass<<",tPDG="<<totPDG<<",tB="2835 G4cout<<"G4QEnv::HadrQE: NQ="<<nQuasmons<<",tM="<<totMass<<",tPDG="<<totPDG<<",tB=" 2683 2836 <<totBN<<",GSM="<<totM<<",dM="<<totMass-totM<<",totQC="<<totQC<<G4endl; 2684 2837 #endif 2685 //if(nQuasmons==1)2838 //if(nQuasmons==1) 2686 2839 if(2>3) // ** closed, because doesn't make a diff 2687 {2840 { 2688 2841 G4QContent quasQC=totQC-envQC; // Total QuarkContent of the Only Quasmon 2689 2842 G4int resQPDG=quasQC.GetSPDGCode(); // GS mass for the Only Quasmon-hadron … … 2696 2849 G4double de=totMass-envM-resQM-qCB; 2697 2850 #ifdef debug 2698 G4cout<<"G4QEnv::HadrQE:NQ==1,tM="<<totMass<<",qM="<<resQM<<",eM="<<envM<<",CB="2851 G4cout<<"G4QEnv::HadrQE:NQ==1,tM="<<totMass<<",qM="<<resQM<<",eM="<<envM<<",CB=" 2699 2852 <<qCB<<",dE="<<totMass-envM-resQM-qCB<<G4endl; 2700 2853 #endif … … 2704 2857 G4LorentzVector fe4M=env4M; // Prototype for outEnvironment 2705 2858 G4LorentzVector dir4M=tot4M-env4M; // Internall quasmon 4-momentum 2706 if(!G4QHadron(tot4M).RelDecayIn2(fe4M,fq4M,dir4M,1.,1.))2859 if(!G4QHadron(tot4M).RelDecayIn2(fe4M,fq4M,dir4M,1.,1.)) 2707 2860 { 2708 2861 G4cerr<<"***G4QEnv::HadrQE: Can't decay Q+E, t4M="<<tot4M<<",d="<<de<<G4endl; … … 2715 2868 theQHadrons.push_back(hEnv); // Fill the hadron-environ (delete equiv.) 2716 2869 #ifdef debug 2717 G4cout<<"G4QEnv::HadrQEnv:fQ="<<resQPDG<<fq4M<<", fE="<<envPDG<<fe4M<<G4endl;2870 G4cout<<"G4QEnv::HadrQEnv:fQ="<<resQPDG<<fq4M<<", fE="<<envPDG<<fe4M<<G4endl; 2718 2871 #endif 2719 2872 return theQHadrons; … … 2721 2874 } 2722 2875 #ifdef debug 2723 G4cout<<"G4QEnv::HadrQE: M="<<totMass<<",PDG="<<totPDG<<",B="<<totBN<<",GSM="<<totM2876 G4cout<<"G4QEnv::HadrQE: M="<<totMass<<",PDG="<<totPDG<<",B="<<totBN<<",GSM="<<totM 2724 2877 <<",dM="<<totMass-totM<<",totQC="<<totQC<<G4endl; 2725 2878 #endif 2726 2879 if(totBN<2) // ==> "Baryon/Meson residual Quasmon" case 2727 {2880 { 2728 2881 if(totPDG==90999999||totPDG==90999000||totPDG==90000999||totPDG==89999001)//"M"ca 2729 {2730 G4cout<<"---Warning---G4QE::HQE:Meson(2) PDG="<<totPDG<<",M="<<totMass<<G4endl;2731 }2882 { 2883 G4cout<<"---Warning---G4QE::HQE:Meson(2) PDG="<<totPDG<<",M="<<totMass<<G4endl; 2884 } 2732 2885 else if(totPDG==1114||totPDG==2224) //==> "DELTA- or DELTA++" case (?antiDELTA) 2733 {2886 { 2734 2887 G4double mBar=mProt; 2735 G4int bPDG=2212;2888 G4int bPDG=2212; 2736 2889 G4double mMes=mPi; 2737 G4int mPDG=211;2890 G4int mPDG=211; 2738 2891 if(totPDG==1114) // "DELTA-" case 2739 {2892 { 2740 2893 mBar=mNeut; 2741 2894 bPDG=2112; 2742 2895 mPDG=-211; 2743 }2896 } 2744 2897 if(totMass<mBar+mMes) 2745 {2746 G4cout<<"--Warning--G4QE::HQE:tM="<<totMass<<"<GSM+mPi0="<<totM+mPi0<<G4endl;2898 { 2899 G4cout<<"--Warning--G4QE::HQE:tM="<<totMass<<"<GSM+mPi0="<<totM+mPi0<<G4endl; 2747 2900 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 2748 2901 CleanUp(); 2749 if(!CheckGroundState(quasH,true))2902 if(!CheckGroundState(quasH,true)) 2750 2903 { 2751 2904 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 2758 2911 delete quasH; 2759 2912 return theQHadrons; 2760 }2913 } 2761 2914 else 2762 {2915 { 2763 2916 //G4QHadron* delta = new G4QHadron(totQC,tot4M); 2764 2917 //delta->SetNFragments(2); // Put a#of Fragments=2 … … 2772 2925 { 2773 2926 G4cout<<"---Warning---G4QEnv::HadronizeQE:B="<<bPDG<<"(m="<<mBar<<") + M=" 2774 <<mPDG<<"(m="<<mMes<<")="<<mBar+mMes<<" > mDel="<<totMass<<G4endl;2927 <<mPDG<<"(m="<<mMes<<")="<<mBar+mMes<<" > mDel="<<totMass<<G4endl; 2775 2928 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 2776 2929 CleanUp(); 2777 if(!CheckGroundState(quasH,true))2930 if(!CheckGroundState(quasH,true)) 2778 2931 { 2779 2932 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 2782 2935 G4cout<<"***G4QE::HQE:FillAsIs(-3),QC="<<totQC<<",4M="<<tot4M<<G4endl; 2783 2936 #endif 2784 //throw G4QException("G4QEnvironment::HadronizeQEnv:Del->Bar+Mes error");2937 //throw G4QException("G4QEnvironment::HadronizeQEnv:Del->Bar+Mes error"); 2785 2938 } 2786 2939 delete quasH; … … 2788 2941 } 2789 2942 #ifdef pdebug 2790 G4cout<<"G4QEnv::HadronizeQEnv: DELTA="<<totPDG<<tot4M<<" -> Bar="2943 G4cout<<"G4QEnv::HadronizeQEnv: DELTA="<<totPDG<<tot4M<<" -> Bar=" 2791 2944 <<bPDG<<b4Mom<<" + Mes="<<mPDG<<m4Mom<<G4endl; 2792 2945 #endif … … 2794 2947 theQHadrons.push_back(curBar); // Fill the baryon (delete equivalent) 2795 2948 #ifdef edebug 2796 G4cout<<"G4QEnv::HadrQEnv:BaryonH="<<bPDG<<b4Mom<<G4endl;2949 G4cout<<"G4QEnv::HadrQEnv:BaryonH="<<bPDG<<b4Mom<<G4endl; 2797 2950 #endif 2798 2951 G4QHadron* curMes = new G4QHadron(mPDG,m4Mom); 2799 2952 theQHadrons.push_back(curMes); // Fill the meson (delete equivalent) 2800 2953 #ifdef edebug 2801 G4cout<<"G4QEnv::HadrQEnv:MesonH="<<mPDG<<m4Mom<<G4endl;2954 G4cout<<"G4QEnv::HadrQEnv:MesonH="<<mPDG<<m4Mom<<G4endl; 2802 2955 #endif 2803 2956 return theQHadrons; 2804 }2805 }2957 } 2958 } 2806 2959 else if(totPDG==10) // ==> "Chipolino" case 2807 {2960 { 2808 2961 G4QChipolino resChip(totQC); // define Residual as Chipolino 2809 2962 G4QPDGCode h1QPDG=resChip.GetQPDG1();// QPDG of the first hadron … … 2818 2971 { 2819 2972 G4cout<<"---Warning---G4QEnv::HadronizeQE:h1="<<h1PDG<<"(m="<<h1M<<") + h2=" 2820 <<h2PDG<<"(m="<<h2M<<")="<<h1M+h2M<<" > mChipo="<<totMass<<G4endl;2973 <<h2PDG<<"(m="<<h2M<<")="<<h1M+h2M<<" > mChipo="<<totMass<<G4endl; 2821 2974 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 2822 2975 CleanUp(); 2823 if(!CheckGroundState(quasH,true))2976 if(!CheckGroundState(quasH,true)) 2824 2977 { 2825 2978 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 2828 2981 G4cout<<"***G4QE::HQE:FillAsIs(-2),QC="<<totQC<<",4M="<<tot4M<<G4endl; 2829 2982 #endif 2830 //throw G4QException("G4QEnvironment::HadrQEnv: Chipo->1+2 decay failed");2983 //throw G4QException("G4QEnvironment::HadrQEnv: Chipo->1+2 decay failed"); 2831 2984 } 2832 2985 delete quasH; … … 2834 2987 } 2835 2988 #ifdef pdebug 2836 G4cout<<"G4QEnv::HadronizeQEnv: Chipo="<<tot4M<<" -> h1="2989 G4cout<<"G4QEnv::HadronizeQEnv: Chipo="<<tot4M<<" -> h1=" 2837 2990 <<h1PDG<<h14Mom<<" + Mes="<<h2PDG<<h24Mom<<G4endl; 2838 2991 #endif … … 2840 2993 theQHadrons.push_back(curH1); // Fill the curH1 (delete equivalent) 2841 2994 #ifdef edebug 2842 G4cout<<"G4QEnv::HadrQEnv:HadronH="<<h1PDG<<h14Mom<<G4endl;2995 G4cout<<"G4QEnv::HadrQEnv:HadronH="<<h1PDG<<h14Mom<<G4endl; 2843 2996 #endif 2844 2997 G4QHadron* curH2 = new G4QHadron(h2PDG,h24Mom); 2845 2998 theQHadrons.push_back(curH2); // Fill the curH2 (delete equivalent) 2846 2999 #ifdef edebug 2847 G4cout<<"G4QEnv::HadrQEnv:MesAsHadrPartnerH="<<h2PDG<<h24Mom<<G4endl;3000 G4cout<<"G4QEnv::HadrQEnv:MesAsHadrPartnerH="<<h2PDG<<h24Mom<<G4endl; 2848 3001 #endif 2849 3002 return theQHadrons; 2850 }3003 } 2851 3004 else if(totBN<2&&totPDG&&totMass<totM+mPi0+.001)// ==> "Meson/Baryon+gamma" case 2852 {3005 { 2853 3006 G4LorentzVector h4Mom(0.,0.,0.,totM); 2854 3007 G4LorentzVector g4Mom(0.,0.,0.,0.); … … 2859 3012 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 2860 3013 CleanUp(); 2861 if(!CheckGroundState(quasH,true))3014 if(!CheckGroundState(quasH,true)) 2862 3015 { 2863 3016 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 2866 3019 G4cout<<"***G4QE::HQE:FillAsIs(-1),QC="<<totQC<<",4M="<<tot4M<<G4endl; 2867 3020 #endif 2868 //throw G4QException("G4QEnvironment::HadronizeQEnv:Gamma Decay failed");3021 //throw G4QException("G4QEnvironment::HadronizeQEnv:Gamma Decay failed"); 2869 3022 } 2870 3023 delete quasH; … … 2872 3025 } 2873 3026 #ifdef pdebug 2874 G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<totPDG<<h4Mom<<" + gamma="<<g4Mom<<G4endl;3027 G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<totPDG<<h4Mom<<" + gamma="<<g4Mom<<G4endl; 2875 3028 #endif 2876 3029 G4QHadron* curG = new G4QHadron(22,g4Mom); 2877 3030 theQHadrons.push_back(curG); // Fill the gamma (delete equivalent) 2878 3031 #ifdef edebug 2879 G4cout<<"G4QEnv::HadrQEnv:PhotonH="<<g4Mom<<G4endl;3032 G4cout<<"G4QEnv::HadrQEnv:PhotonH="<<g4Mom<<G4endl; 2880 3033 #endif 2881 3034 G4QHadron* curH = new G4QHadron(totPDG,h4Mom); 2882 3035 #ifdef edebug 2883 G4cout<<"G4QEnv::HadrQEnv:GamPartnerH="<<totPDG<<h4Mom<<G4endl;3036 G4cout<<"G4QEnv::HadrQEnv:GamPartnerH="<<totPDG<<h4Mom<<G4endl; 2884 3037 #endif 2885 3038 if(totPDG==92000000||totPDG==90002000||totPDG==90000002) … … 2887 3040 else theQHadrons.push_back(curH); // Fill the baryon (delete equivalent) 2888 3041 return theQHadrons; 2889 }3042 } 2890 3043 else if(totBN<2&&totPDG) // ==> "Meson/Baryon+pi" case 2891 {3044 { 2892 3045 G4int piPDG=111; 2893 3046 G4double mpi=mPi0; … … 2895 3048 G4double mbm=totM; 2896 3049 if(totPDG==1114) 2897 {2898 piPDG=-211;3050 { 3051 piPDG=-211; 2899 3052 mpi=mPi; 2900 3053 mbPDG=2112; … … 2902 3055 } 2903 3056 else if(totPDG==2224) 2904 {2905 piPDG=211;3057 { 3058 piPDG=211; 2906 3059 mpi=mPi; 2907 3060 mbPDG=2212; … … 2909 3062 } 2910 3063 else if(totPDG==113) 2911 {2912 piPDG=-211;3064 { 3065 piPDG=-211; 2913 3066 mpi=mPi; 2914 3067 mbPDG=211; … … 2923 3076 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 2924 3077 CleanUp(); 2925 if(!CheckGroundState(quasH,true))3078 if(!CheckGroundState(quasH,true)) 2926 3079 { 2927 3080 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 2930 3083 G4cout<<"***G4QE::HQE:FillAsIs(0),QC="<<totQC<<",4M="<<tot4M<<G4endl; 2931 3084 #endif 2932 //throw G4QException("G4QEnvironment::HadronizeQE: DecIn2 mB+nPi failed");3085 //throw G4QException("G4QEnvironment::HadronizeQE: DecIn2 mB+nPi failed"); 2933 3086 } 2934 3087 delete quasH; … … 2936 3089 } 2937 3090 #ifdef pdebug 2938 G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<mbPDG<<h4Mom<<"+p="<<piPDG<<g4Mom<<G4endl;3091 G4cout<<"G4QE::HQE:"<<tot4M<<"->h="<<mbPDG<<h4Mom<<"+p="<<piPDG<<g4Mom<<G4endl; 2939 3092 #endif 2940 3093 G4QHadron* curH = new G4QHadron(mbPDG,h4Mom); … … 2944 3097 G4QHadron* curG = new G4QHadron(piPDG,g4Mom); 2945 3098 #ifdef edebug 2946 G4cout<<"G4QEnv::HadrQEnv:Gamma/Pi0H="<<piPDG<<g4Mom<<G4endl;3099 G4cout<<"G4QEnv::HadrQEnv:Gamma/Pi0H="<<piPDG<<g4Mom<<G4endl; 2947 3100 #endif 2948 3101 theQHadrons.push_back(curG); // Fill the pi0 (delete equivalent) 2949 3102 return theQHadrons; 2950 }3103 } 2951 3104 else // ==> "|B|<2 new Quasmon" case 2952 {3105 { 2953 3106 G4Quasmon* resid = new G4Quasmon(totQC,tot4M); // delete is 3 lines below <-+ 2954 3107 G4QNucleus vacuum(90000000); // ^ 2955 G4QHadronVector* curout=resid->Fragment(vacuum,1);//**!!DESTROY!!** <-<-+ ^3108 G4QHadronVector* curout=resid->Fragment(vacuum,1);//**!!DESTROY!!** <-<-+ ^ 2956 3109 G4int rest = resid->GetStatus(); // New status after fragm attempt ^ ^ 2957 3110 if(!rest) eCount--; // Dec ExistingQuasmonsCounter ^ ^ … … 2959 3112 G4int nHadrons = curout->size(); // a#of Hadrons in the outHV ^ 2960 3113 if(nHadrons>0) // Transfer QHadrons to Output ^ 2961 {2962 for (G4int ih=0; ih<nHadrons; ih++)// LOOP over output QHadrons ^2963 { // ^2964 #ifdef pdebug 2965 G4cout<<"G4QEnv::HadrQE:NewB<2, H#"<<ih // ^3114 { 3115 for (G4int ih=0; ih<nHadrons; ih++)// LOOP over output QHadrons ^ 3116 { // ^ 3117 #ifdef pdebug 3118 G4cout<<"G4QEnv::HadrQE:NewB<2, H#"<<ih // ^ 2966 3119 <<", QPDG="<<(*curout)[ih]->GetQPDG() // ^ 2967 3120 <<", 4M="<<(*curout)[ih]->Get4Momentum()<<G4endl; // ^ … … 2969 3122 //theQHadrons.push_back(curout->operator[](ih));//(delete equ.) <-<-^ 2970 3123 theQHadrons.push_back((*curout)[ih]); // (delete equ.) <-<-^ 2971 } // ^2972 } // ^2973 else // ^2974 { // ^3124 } // ^ 3125 } // ^ 3126 else // ^ 3127 { // ^ 2975 3128 G4cerr<<"***G4QEnv::HadrQEnv:MQ="<<tot4M.m()<<",QC="<<totQC<<G4endl;//^ 2976 throw G4QException("G4QEnvironment::HadronizeQEnv: Quasmon decay?");//^2977 } // *** Do not destroy instances ***^3129 throw G4QException("G4QEnvironment::HadronizeQEnv: Quasmon decay?");//^ 3130 } // *** Do not destroy instances ***^ 2978 3131 curout->clear(); // The instances are filled above ^ 2979 3132 delete curout; // >===============================^ 2980 3133 return theQHadrons; 2981 }2982 }3134 } 3135 } 2983 3136 else 2984 {3137 { 2985 3138 G4QContent tQC =totQC; // Not subtracted copy for error prints 2986 3139 G4int NSi =0; // a#of additional Sigma … … 2994 3147 G4double MPi =0.; // Total Mass of additional pions 2995 3148 if (totBN>0&&totS<0&&totChg+totChg>=totBN)// => "additional K+" case 2996 {3149 { 2997 3150 aKPDG=321; 2998 3151 NaK=-totS; … … 3001 3154 totChg+=totS; // Charge reduction (totS<0!) 3002 3155 totS=0; // Anti-strangness goes to anti-Kaons 3003 }3156 } 3004 3157 else if (totBN>0&&totS<0) // => "additional aK0" case 3005 {3158 { 3006 3159 aKPDG=311; 3007 3160 NaK=-totS; … … 3009 3162 tQC+=totS*K0QC; 3010 3163 totS=0; // Anti-strangness goes to anti-Kaons 3011 }3164 } 3012 3165 else if (totBN>1&&totS>0&&(totChg<0||totChg>totBN-totS))//=>"additional Sigma" 3013 {3166 { 3014 3167 NSi=totS; // Prototype of a#of Sigmas 3015 3168 if(totChg<0) // Negative Sigmas 3016 {3169 { 3017 3170 SiPDG=3112; 3018 3171 if(-totChg<NSi) NSi=-totChg; // A#of Sigma- is restricted by charge … … 3022 3175 } 3023 3176 else 3024 {3177 { 3025 3178 SiPDG=3222; // Positive Sigmas 3026 3179 G4int exChg=totChg-totBN+totS; // Excesive positive charge … … 3032 3185 totS-=NSi; // Reduce the TotalResidualStrangeness 3033 3186 totBN-=NSi; // A#of excessive pions is added below 3034 }3187 } 3035 3188 else if (totBN>0&&totS>totBN&&totBN<totS+totChg)// => "additional K0" case 3036 {// @@ Here Ksi0 check should be added totS=2>totBN=1&&totBN=1<totS=2+totChg=03189 {// @@ Here Ksi0 check should be added totS=2>totBN=1&&totBN=1<totS=2+totChg=0 3037 3190 aKPDG=-311; 3038 3191 NaK=totS-totBN; … … 3040 3193 tQC+=NaK*K0QC; 3041 3194 totS-=NaK; // Reduce residualstrangeness 3042 }3195 } 3043 3196 else if (totBN>0&&totS>totBN&&totChg<0)// => "additional K-" case 3044 {// @@ Here Ksi- check should be added totS=2>totBN=1&&totChg=-1<03197 {// @@ Here Ksi- check should be added totS=2>totBN=1&&totChg=-1<0 3045 3198 aKPDG=-321; 3046 3199 NaK=totS-totBN; … … 3049 3202 totChg+=NaK; // Increase residual charge 3050 3203 totS-=NaK; // Reduce residual strangeness 3051 }3204 } 3052 3205 // === Now residual DELTAS should be subtracted === 3053 3206 if (totBN>0&&totChg>totBN-totS) // => "additional PI+" case 3054 {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=13207 {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=1 3055 3208 PiPDG=211; 3056 3209 NPi=totChg-totBN+totS; … … 3058 3211 tQC-=NPi*PiQC; 3059 3212 totChg-=NPi; 3060 }3213 } 3061 3214 else if (totBN>0&&totChg<0) // => "additional PI-" case 3062 {// @@ Here Sigma- check should be added totChg<03215 {// @@ Here Sigma- check should be added totChg<0 3063 3216 PiPDG=-211; 3064 3217 NPi=-totChg; … … 3066 3219 tQC+=NPi*PiQC; // Now anti-Pions must be subtracted 3067 3220 totChg+=NPi; 3068 }3221 } 3069 3222 else if (!totBN&&totChg>1-totS) // => "additional PI+" case 3070 {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=13223 {// @@ Here Sigma+ check should be added totChg=1>totBn=1-totS=1 3071 3224 PiPDG=211; 3072 3225 NPi=totChg+totS-1; … … 3074 3227 tQC-=NPi*PiQC; 3075 3228 totChg-=NPi; 3076 }3229 } 3077 3230 else if (!totBN&&totChg<-1-totS) // => "additional PI-" case 3078 {// @@ Here Sigma- check should be added totChg<03231 {// @@ Here Sigma- check should be added totChg<0 3079 3232 PiPDG=-211; 3080 3233 NPi-=totChg+totS+1; … … 3082 3235 tQC+=NPi*PiQC; // Now anti-Pions must be subtracted 3083 3236 totChg+=NPi; 3084 }3237 } 3085 3238 G4double totRM=0.; // min (GS) Mass of the Residual System 3086 3239 if(totBN<2) // Calculate totPDG & totRM 3087 {3240 { 3088 3241 totPDG=tQC.GetSPDGCode(); // MinPDGCode for the Residual compound 3089 3242 if(totPDG==10&&tQC.GetBaryonNumber()>0) totPDG=tQC.GetZNSPDGCode(); … … 3096 3249 } 3097 3250 else 3098 {3251 { 3099 3252 G4QNucleus totN(tQC,tot4M); // Excited nucleus for the Residual System 3100 3253 totRM=totN.GetMZNS(); // min (GS) Mass of the Residual System 3101 3254 totPDG=totN.GetPDG(); // Total PDG Code for the Current compound 3102 }3255 } 3103 3256 if(NaK) // ==> "Decay in K0 or K+ + NPi" case 3104 {//@@ Can (must) be moved to EvaporateResidual ??3257 {//@@ Can (must) be moved to EvaporateResidual ?? 3105 3258 if(!NPi) // ==> "Only anti-strange K" case 3106 {3259 { 3107 3260 G4LorentzVector m4Mom(0.,0.,0.,MaK); 3108 3261 G4LorentzVector n4Mom(0.,0.,0.,totRM); 3109 3262 G4double sum=MaK+totRM; 3110 3263 if(fabs(totMass-sum)<eps) 3111 {3264 { 3112 3265 m4Mom=tot4M*(MaK/sum); 3113 3266 n4Mom=tot4M*(totRM/sum); … … 3121 3274 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3122 3275 CleanUp(); 3123 if(!CheckGroundState(quasH,true))3276 if(!CheckGroundState(quasH,true)) 3124 3277 { 3125 3278 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3134 3287 } 3135 3288 #ifdef pdebug 3136 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="3289 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M=" 3137 3290 <<aKPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<totQC<<G4endl; 3138 3291 #endif … … 3140 3293 if(NaK>1) oneK = m4Mom/NaK; // 4-mom of one kaon 3141 3294 for (G4int jp=0; jp<NaK; jp++) 3142 {3295 { 3143 3296 G4QHadron* curK = new G4QHadron(aKPDG,oneK); 3144 3297 theQHadrons.push_back(curK); // Fill the curK (delete equivalent) … … 3146 3299 G4QHadron* curN = new G4QHadron(totPDG,n4Mom); // @@ Use DecayDib then Evap 3147 3300 EvaporateResidual(curN); // Try to evaporate residual (del.eq.) 3148 }3301 } 3149 3302 else // ==> "Anti-strange K's + DELTA's" case 3150 {3303 { 3151 3304 G4LorentzVector m4Mom(0.,0.,0.,MPi); 3152 3305 G4LorentzVector k4Mom(0.,0.,0.,MaK); … … 3158 3311 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3159 3312 CleanUp(); 3160 if(!CheckGroundState(quasH,true))3313 if(!CheckGroundState(quasH,true)) 3161 3314 { 3162 3315 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3165 3318 G4cout<<"***G4QEnv::HQE:FillAsItIs(2),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3166 3319 #endif 3167 //throw G4QException("G4QEnvironment::HadronizeQE:2AntiS-Nucl(1) error");3320 //throw G4QException("G4QEnvironment::HadronizeQE:2AntiS-Nucl(1) error"); 3168 3321 } 3169 3322 delete quasH; … … 3171 3324 } 3172 3325 #ifdef fdebug 3173 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nK="<<aKPDG<<k4Mom3326 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nK="<<aKPDG<<k4Mom 3174 3327 <<" + nPi="<<PiPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<G4endl; 3175 3328 #endif … … 3177 3330 if(NPi>1) onePi = m4Mom/NPi; // 4-mom of one pion 3178 3331 for (G4int ip=0; ip<NPi; ip++) 3179 {3332 { 3180 3333 G4QHadron* curP = new G4QHadron(PiPDG,onePi); 3181 3334 #ifdef pdebug 3182 G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl;3335 G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl; 3183 3336 #endif 3184 3337 theQHadrons.push_back(curP); // Fill the curM (delete equivalent) 3185 }3338 } 3186 3339 G4LorentzVector oneK=k4Mom; // 4-mom of one kaon 3187 3340 if(NaK>1) oneK = k4Mom/NaK; // 4-mom of one kaon 3188 3341 for (G4int jp=0; jp<NaK; jp++) 3189 {3342 { 3190 3343 G4QHadron* curP = new G4QHadron(aKPDG,oneK); 3191 3344 #ifdef pdebug 3192 G4cout<<"G4QEnv::HadrQEnv:Kaon#"<<jp<<",H="<<aKPDG<<oneK<<G4endl;3345 G4cout<<"G4QEnv::HadrQEnv:Kaon#"<<jp<<",H="<<aKPDG<<oneK<<G4endl; 3193 3346 #endif 3194 3347 theQHadrons.push_back(curP); // Fill the curM (delete equivalent) 3195 }3348 } 3196 3349 G4QHadron* curN = new G4QHadron(totPDG,n4Mom); 3197 3350 EvaporateResidual(curN); // Try to evaporate residual (del.equiv.) 3198 }3351 } 3199 3352 return theQHadrons; 3200 3353 } 3201 3354 else if(NSi) // ==> "Decay in Sig+ or Sig- + NPi" case 3202 {//@@ Can (must) be moved to EvaporateResidual ??3355 {//@@ Can (must) be moved to EvaporateResidual ?? 3203 3356 if(!NPi) // ==> "Only Sigma's" case 3204 {3357 { 3205 3358 G4LorentzVector m4Mom(0.,0.,0.,MSi); 3206 3359 G4LorentzVector n4Mom(0.,0.,0.,totRM); 3207 3360 G4double sum=MSi+totRM; 3208 3361 if(fabs(totMass-sum)<eps) 3209 {3362 { 3210 3363 m4Mom=tot4M*(MSi/sum); 3211 3364 n4Mom=tot4M*(totRM/sum); … … 3219 3372 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3220 3373 CleanUp(); 3221 if(!CheckGroundState(quasH,true))3374 if(!CheckGroundState(quasH,true)) 3222 3375 { 3223 3376 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3232 3385 } 3233 3386 #ifdef pdebug 3234 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> Sig="3387 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> Sig=" 3235 3388 <<SiPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<totQC<<G4endl; 3236 3389 #endif … … 3238 3391 if(NSi>1) oneS = m4Mom/NSi; // 4-mom of one sigma 3239 3392 for (G4int jp=0; jp<NSi; jp++) 3240 {3393 { 3241 3394 G4QHadron* curS = new G4QHadron(SiPDG,oneS); 3242 3395 theQHadrons.push_back(curS); // Fill the curS (delete equivalent) … … 3244 3397 G4QHadron* curN = new G4QHadron(totPDG,n4Mom); // @@ Use DecayDib then Evap 3245 3398 EvaporateResidual(curN); // Try to evaporate residual (del.eq.) 3246 }3399 } 3247 3400 else // ==> "Sigma's + DELTA's" case 3248 {3401 { 3249 3402 G4LorentzVector m4Mom(0.,0.,0.,MPi); 3250 3403 G4LorentzVector k4Mom(0.,0.,0.,MSi); … … 3256 3409 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3257 3410 CleanUp(); 3258 if(!CheckGroundState(quasH,true))3411 if(!CheckGroundState(quasH,true)) 3259 3412 { 3260 3413 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3263 3416 G4cout<<"***G4QEnv::HQE:FillAsItIs(3),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3264 3417 #endif 3265 //throw G4QException("G4QEnvironment::HadronizeQE:2Sigma-Nucl(1) error");3418 //throw G4QException("G4QEnvironment::HadronizeQE:2Sigma-Nucl(1) error"); 3266 3419 } 3267 3420 delete quasH; … … 3269 3422 } 3270 3423 #ifdef fdebug 3271 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nS="<<SiPDG<<k4Mom3424 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> nS="<<SiPDG<<k4Mom 3272 3425 <<" + nPi="<<PiPDG<<m4Mom<<" + N="<<totPDG<<n4Mom<<G4endl; 3273 3426 #endif … … 3275 3428 if(NPi>1) onePi = m4Mom/NPi; // 4-mom of one pion 3276 3429 for (G4int ip=0; ip<NPi; ip++) 3277 {3430 { 3278 3431 G4QHadron* curP = new G4QHadron(PiPDG,onePi); 3279 3432 #ifdef pdebug 3280 G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl;3433 G4cout<<"G4QEnv::HadrQEnv:SPion#"<<ip<<",H="<<PiPDG<<onePi<<G4endl; 3281 3434 #endif 3282 3435 theQHadrons.push_back(curP); // Fill the curM (delete equivalent) 3283 }3436 } 3284 3437 G4LorentzVector oneS=k4Mom; // 4-mom of the only kaon 3285 3438 if(NSi>1) oneS = k4Mom/NSi; // 4-mom of one kaon 3286 3439 for (G4int jp=0; jp<NSi; jp++) 3287 {3440 { 3288 3441 G4QHadron* curP = new G4QHadron(SiPDG,oneS); 3289 3442 #ifdef pdebug 3290 G4cout<<"G4QEnv::HadrQEnv:Sigma#"<<jp<<",H="<<SiPDG<<oneS<<G4endl;3443 G4cout<<"G4QEnv::HadrQEnv:Sigma#"<<jp<<",H="<<SiPDG<<oneS<<G4endl; 3291 3444 #endif 3292 3445 theQHadrons.push_back(curP); // Fill the curM (delete equivalent) 3293 }3446 } 3294 3447 G4QHadron* curN = new G4QHadron(totPDG,n4Mom); 3295 3448 EvaporateResidual(curN); // Try to evaporate residual (del.equiv.) 3296 }3449 } 3297 3450 return theQHadrons; 3298 }3451 } 3299 3452 else if(NPi) // ==> "Decay in Pi+ or Pi-" case 3300 {3453 { 3301 3454 if(NPi==1) // ==> "One isobar" case 3302 {3455 { 3303 3456 G4LorentzVector m4Mom(0.,0.,0.,MPi); 3304 3457 G4LorentzVector n4Mom(0.,0.,0.,totRM); … … 3306 3459 { 3307 3460 G4cout<<"---Warning---G4QEnv::HadronizeQEnv:M="<<PiPDG<<"(m="<<MPi<<")+N=" 3308 <<totPDG<<"(m="<<totRM<<")="<<MPi+totRM<<" > mSN="<<totMass<<G4endl;3461 <<totPDG<<"(m="<<totRM<<")="<<MPi+totRM<<" > mSN="<<totMass<<G4endl; 3309 3462 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3310 3463 CleanUp(); 3311 if(!CheckGroundState(quasH,true))3464 if(!CheckGroundState(quasH,true)) 3312 3465 { 3313 3466 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3316 3469 G4cout<<"***G4QEnv::HQE:FillAsItIs(5),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3317 3470 #endif 3318 //throw G4QException("G4QEnvironment::HadronizeQEnv:Iso-Nucleus error");3471 //throw G4QException("G4QEnvironment::HadronizeQEnv:Iso-Nucleus error"); 3319 3472 } 3320 3473 delete quasH; … … 3322 3475 } 3323 3476 #ifdef pdebug 3324 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="<<PiPDG<<m4Mom<<" + N="3477 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> M="<<PiPDG<<m4Mom<<" + N=" 3325 3478 <<totPDG<<n4Mom<<totQC<<G4endl; 3326 3479 #endif … … 3329 3482 G4QHadron* curN = new G4QHadron(totPDG,n4Mom); 3330 3483 EvaporateResidual(curN); // Evaporate residual (delete equivalent) 3331 }3332 else // ==> "Many Isobars" case3333 {3484 } 3485 else // ==> "Many Isobars" case 3486 { 3334 3487 G4int N1Pi = NPi/2; // First pion cluster 3335 3488 G4int N2Pi = NPi-N1Pi; // Second pion cluster … … 3346 3499 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3347 3500 CleanUp(); 3348 if(!CheckGroundState(quasH,true))3501 if(!CheckGroundState(quasH,true)) 3349 3502 { 3350 3503 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3353 3506 G4cout<<"***G4QEnv::HQE:FillAsItIs(5),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3354 3507 #endif 3355 //throw G4QException("G4QEnvironment::HadronizeQE:ManyIsoNucleus error");3508 //throw G4QException("G4QEnvironment::HadronizeQE:ManyIsoNucleus error"); 3356 3509 } 3357 3510 delete quasH; … … 3359 3512 } 3360 3513 #ifdef pdebug 3361 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> N*PI="<<PiPDG3514 G4cout<<"G4QEnv::HadronizeQEnv: SN="<<tot4M<<" -> N*PI="<<PiPDG 3362 3515 <<" (4M1="<<m4Mom<<" + 4M2="<<k4Mom<<") + N="<<totPDG<<n4Mom<<G4endl; 3363 3516 #endif … … 3365 3518 if(N1Pi>1) one1=m4Mom/N1Pi; // 4-mom of the 1st cluster one pion 3366 3519 for (G4int ip=0; ip<N1Pi; ip++) 3367 {3520 { 3368 3521 G4QHadron* curP = new G4QHadron(PiPDG,one1); 3369 3522 theQHadrons.push_back(curP); // Fill the curP (delete equivalent) 3370 }3523 } 3371 3524 G4LorentzVector one2=k4Mom; // 4-mom of the 2nd cluster only pion 3372 3525 if(N2Pi>1) one2=k4Mom/N2Pi; // 4-mom of the 2nd cluster one pion 3373 3526 for (G4int jp=0; jp<N2Pi; jp++) 3374 {3527 { 3375 3528 G4QHadron* curP = new G4QHadron(PiPDG,one2); 3376 3529 theQHadrons.push_back(curP); // Fill the curP (delete equivalent) 3377 }3530 } 3378 3531 G4QHadron* curN = new G4QHadron(totPDG,n4Mom); 3379 3532 EvaporateResidual(curN); // Try to evaporate residual (del.equiv.) 3380 }3533 } 3381 3534 return theQHadrons; 3382 }3383 }3535 } 3536 } 3384 3537 #ifdef fdebug 3385 G4cout<<"G4QE::HadrQEnv: Try FinalEvaporation t4M="<<tot4M<<",tQC="<<totQC<<G4endl;3538 G4cout<<"G4QE::HadrQEnv: Try FinalEvaporation t4M="<<tot4M<<",tQC="<<totQC<<G4endl; 3386 3539 #endif 3387 3540 CleanUp(); … … 3389 3542 EvaporateResidual(evH); // Try to evaporate residual (del.equiv.) 3390 3543 return theQHadrons; 3391 }3544 } 3392 3545 else // ==> "Only GSEnvironment exists" case 3393 3546 { 3394 3547 if(totPDG==90000000 || fabs(totMass)<0.000001) 3395 {3548 { 3396 3549 CleanUp(); 3397 3550 return theQHadrons; 3398 }3551 } 3399 3552 G4double dM=totMass-totM; 3400 3553 #ifdef pdebug 3401 G4cout<<"G4QEnv::HadrQEnv:GroundState tM-GSM="<<dM<<",GSM="<<totM<<",tPDG="<<totPDG3554 G4cout<<"G4QEnv::HadrQEnv:GroundState tM-GSM="<<dM<<",GSM="<<totM<<",tPDG="<<totPDG 3402 3555 <<",nQ="<<nQuasmons<<G4endl; 3403 3556 #endif 3404 G4Quasmon* pQ = theQuasmons[0]; // Pointer to the first Quasmon3557 G4Quasmon* pQ = theQuasmons[0]; // Pointer to the first Quasmon 3405 3558 G4QPDGCode QQPDG = pQ->GetQPDG(); // QPDG of the Quasmon 3406 3559 G4int QPDG = QQPDG.GetPDGCode(); … … 3408 3561 G4int spbRN=totRN.SplitBaryon();// PossibilityToSplit baryon from Residual 3409 3562 if(dM>-0.001) 3410 {3563 { 3411 3564 #ifdef fdebug 3412 G4cout<<"G4QE::HadrQE:ExcitedNucleus, dM="<<dM<<">0,tBN="<<totBN<<",nQ="<<G4endl;3565 G4cout<<"G4QE::HadrQE:ExcitedNucleus, dM="<<dM<<">0,tBN="<<totBN<<",nQ="<<G4endl; 3413 3566 #endif 3414 3567 CleanUp(); 3415 3568 G4QHadron* evH = new G4QHadron(totQC,tot4M);// Create a Hadron for ResidualNucl 3416 3569 EvaporateResidual(evH); // Try to evaporate residual (del. equiv.) 3417 }3570 } 3418 3571 else if(nQuasmons==1&&QPDG!=22&&QPDG!=111)// => "Decay Quasmon or Q+Environ" case 3419 {3572 { 3420 3573 G4int envPDG = theEnvironment.GetPDG();// PDGCode of the NuclQEnvironment 3421 3574 #ifdef pdebug 3422 G4cout<<"G4QEnv::HadrQEnv: nQ=1, QPDG=="<<QPDG<<G4endl;3575 G4cout<<"G4QEnv::HadrQEnv: nQ=1, QPDG=="<<QPDG<<G4endl; 3423 3576 #endif 3424 3577 if(!QPDG) 3425 {3426 G4cerr<<"***G4QEnv::HadrQE: Quasmon is an unknown QHadron: PDG="<<QPDG<<G4endl;3427 throw G4QException("G4QEnvironment::HadronizeQEnvironment:(2)Cann'tDecayQEnv");3428 }3578 { 3579 G4cerr<<"***G4QEnv::HadrQE: Quasmon is an unknown QHadron: PDG="<<QPDG<<G4endl; 3580 throw G4QException("G4QEnvironment::HadronizeQEnvironment:(2)Cann'tDecayQEnv"); 3581 } 3429 3582 // => "Quasmon-Chipolino or Environment-Dibaryon" case 3430 3583 else if(QPDG==10||QPDG==92000000||QPDG==90002000||QPDG==90000002) 3431 {3584 { 3432 3585 G4QContent QQC = pQ->GetQC(); // Quark Content of the Quasmon 3433 3586 G4QPDGCode h1QPDG=nQPDG; // QPDG of the first hadron … … 3442 3595 h2QPDG=QChip.GetQPDG2(); // QPDG of the second hadron 3443 3596 h2M =h2QPDG.GetMass(); // Mass of the second hadron 3444 }3445 else if(QPDG==90002000)3446 {3597 } 3598 else if(QPDG==90002000) 3599 { 3447 3600 h1QPDG=pQPDG; // QPDG of the first hadron 3448 3601 h1M =mProt; // Mass of the first hadron 3449 3602 h2QPDG=h1QPDG; // QPDG of the second hadron 3450 3603 h2M =mProt; // Mass of the second hadron 3451 }3452 else if(QPDG==92000000)3453 {3604 } 3605 else if(QPDG==92000000) 3606 { 3454 3607 h1QPDG=lQPDG; // QPDG of the first hadron 3455 3608 h1M =mLamb; // Mass of the first hadron … … 3458 3611 G4double ddMass=totMass-envM; // Free CM energy 3459 3612 if(ddMass>mSigZ+mSigZ) // Sigma0+Sigma0 is possible 3460 { // @@ Only two particles PS is used3613 { // @@ Only two particles PS is used 3461 3614 G4double dd2=ddMass*ddMass; // Squared free energy 3462 3615 G4double sma=mLamb+mLamb; // Lambda+Lambda sum … … 3485 3638 } // 3486 3639 else if(ddMass>mSigZ+mLamb) // Lambda+Sigma0 is possible 3487 { // @@ Only two particles PS is used3640 { // @@ Only two particles PS is used 3488 3641 G4double dd2=ddMass*ddMass; // Squared free energy 3489 3642 G4double sma=mLamb+mLamb; // Lambda+Lambda sum … … 3500 3653 } // 3501 3654 } // 3502 } //3655 } // 3503 3656 if(h1M+h2M+envM<totMass) // => "Three parts decay" case 3504 {3657 { 3505 3658 G4LorentzVector h14M(0.,0.,0.,h1M); 3506 3659 G4LorentzVector h24M(0.,0.,0.,h2M); 3507 3660 G4LorentzVector e4M(0.,0.,0.,envM); 3508 3661 if(!G4QHadron(tot4M).DecayIn3(h14M,h24M,e4M)) 3509 {3510 G4cout<<"Warning->G4QE::HQE:M="<<tot4M.m()<<","<<totMass<<"->"<<h1QPDG<<"("3511 <<h1M<<")+"<<h1QPDG<<"("<<h2M<<")+"<<envM<<"="<<h1M+h2M+envM<<G4endl;3662 { 3663 G4cout<<"Warning->G4QE::HQE:M="<<tot4M.m()<<","<<totMass<<"->"<<h1QPDG<<"(" 3664 <<h1M<<")+"<<h1QPDG<<"("<<h2M<<")+"<<envM<<"="<<h1M+h2M+envM<<G4endl; 3512 3665 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3513 3666 CleanUp(); 3514 if(!CheckGroundState(quasH,true))3667 if(!CheckGroundState(quasH,true)) 3515 3668 { 3516 3669 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3519 3672 G4cout<<"***G4QEnv::HQE:FillAsItIs(6),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3520 3673 #endif 3521 //throw G4QException("G4QEnv::HadrQEnv:QChipo+Environment DecIn3 Error");3674 //throw G4QException("G4QEnv::HadrQEnv:QChipo+Environment DecIn3 Error"); 3522 3675 } 3523 3676 delete quasH; 3524 3677 return theQHadrons; 3525 3678 3526 }3679 } 3527 3680 G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M); 3528 3681 theQHadrons.push_back(h1H); // (delete equivalent) 3529 3682 #ifdef pdebug 3530 G4cout<<"G4QE::HQE:(2) H1="<<h1QPDG<<h14M<<G4endl;3683 G4cout<<"G4QE::HQE:(2) H1="<<h1QPDG<<h14M<<G4endl; 3531 3684 #endif 3532 3685 G4QHadron* h2H = new G4QHadron(h2QPDG.GetPDGCode(),h24M); … … 3540 3693 G4cout<<"G4QE::HQE:(2) QEenv="<<envPDG<<e4M<<G4endl; 3541 3694 #endif 3542 }3695 } 3543 3696 #ifdef fdebug 3544 3697 G4cout<<"***G4QEnv::HadQEnv:tM="<<tot4M.m()<<totQC<<"< h1="<<h1QPDG<<"(M="<<h1M 3545 3698 <<")+h2="<<h1QPDG<<"(M="<<h2M<<")+eM="<<envM<<"="<<h1M+h2M+envM<<G4endl; 3546 //throw G4QException("G4QEnv::HadrQEnv:QChipo+Env mass > than decaying mass");3699 //throw G4QException("G4QEnv::HadrQEnv:QChipo+Env mass > than decaying mass"); 3547 3700 #endif 3548 3701 CleanUp(); … … 3550 3703 EvaporateResidual(evH); // Try to evaporate residual (del. equiv.) 3551 3704 return theQHadrons; 3552 }3705 } 3553 3706 } 3554 3707 else if(spbRN)// => "Join all quasmons to the residual compound and evaporate" case 3555 {3708 { 3556 3709 #ifdef fdebug 3557 3710 G4cout<<"***G4QEnv::HadQEnv: Evaporate the total residual tRN="<<totRN<<G4endl; … … 3561 3714 EvaporateResidual(evH); // Try to evaporate residual (del.equiv.) 3562 3715 return theQHadrons; 3563 }3716 } 3564 3717 //else if(nQuasmons<3||theQHadrons.size()<12)//"Try to correct" case (change cond) 3565 3718 else if(2>3) // "Try to correct" case (change condition) 3566 {3567 #ifdef pdebug 3568 G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl;3719 { 3720 #ifdef pdebug 3721 G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl; 3569 3722 #endif 3570 3723 G4int nOfOUT = theQHadrons.size(); … … 3578 3731 G4int nFr = theLast->GetNFragments(); 3579 3732 G4int gam = theLast->GetPDGCode(); 3580 if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1) // => "Skip K,gam & decayed"3581 {3733 if(gam!=22&&!nFr&&lastS<0&&lastS+totS<0&&nOfOUT>1) // => "Skip K,gam & decayed" 3734 { 3582 3735 G4QHadron* thePrev = theQHadrons[nOfOUT-2]; 3583 3736 theQHadrons.pop_back(); // the last QHadron is excluded from OUTPUT … … 3588 3741 last4M = theLast->Get4Momentum(); 3589 3742 lastQC = theLast->GetQC(); 3590 }3743 } 3591 3744 else 3592 3745 { … … 3601 3754 if(totPDG==10&&totQC.GetBaryonNumber()>0) totPDG=totQC.GetZNSPDGCode(); 3602 3755 if(bn>1) 3603 {3756 { 3604 3757 totS =totQC.GetStrangeness(); // Total Strangeness of this System 3605 3758 if(totS>=0) // => "This is a normal nucleus" case 3606 {3759 { 3607 3760 G4QNucleus newN(totQC,tot4M); 3608 3761 totPDG=newN.GetPDG(); 3609 3762 totM =newN.GetMZNS(); // Calculate new minimum (GS) mass 3610 }3763 } 3611 3764 else if(totS==-1) // => "Try to decay in K+/aK0 and finish" 3612 {3765 { 3613 3766 G4double m1=mK; 3614 3767 G4int PDG1=321; … … 3619 3772 G4double m3=newN0.GetMZNS(); 3620 3773 if (m3+mK0<m2+mK) // => "aK0+ResA is better" case 3621 {3774 { 3622 3775 m1 =mK0; 3623 3776 PDG1=311; 3624 3777 m2 =m3; 3625 3778 PDG2=newN0.GetPDG(); 3626 }3779 } 3627 3780 if(totMass>m1+m2) // => "can decay" case 3628 3781 { … … 3630 3783 G4LorentzVector qe4M(0.,0.,0.,m2); 3631 3784 if(!G4QHadron(tot4M).DecayIn2(fq4M,qe4M)) 3632 {3785 { 3633 3786 G4cout<<"---Warning---G4QE::HadQE:tM="<<tot4M.m()<<"->aK="<<PDG1<<"(M=" 3634 3787 <<m1<<")+ResA="<<PDG2<<"(M="<<m2<<")="<<m1+m2<<G4endl; 3635 3788 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3636 3789 CleanUp(); 3637 if(!CheckGroundState(quasH,true))3790 if(!CheckGroundState(quasH,true)) 3638 3791 { 3639 3792 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3642 3795 G4cout<<"***G4QE::HQE:FillAsIs(7),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3643 3796 #endif 3644 //throw G4QException("G4QEnv::HadrQEnv: aK+ResA DecayIn2 error");3797 //throw G4QException("G4QEnv::HadrQEnv: aK+ResA DecayIn2 error"); 3645 3798 } 3646 3799 delete quasH; 3647 3800 return theQHadrons; 3648 }3801 } 3649 3802 G4QHadron* H1 = new G4QHadron(PDG1,fq4M); 3650 3803 #ifdef pdebug … … 3658 3811 theQHadrons.push_back(H2); // (delete equivalent) 3659 3812 break; 3660 }3813 } 3661 3814 else totM=250000.; // => "Continue reversion" case 3662 }3815 } 3663 3816 else if(totS==-2) //=>"Try to decay in 2(K+/aK0) and finish" 3664 {3817 { 3665 3818 G4double m1=mK; 3666 3819 G4int PDG1=321; … … 3675 3828 G4double m5=newNpp.GetMZNS(); // M-2*K^+ 3676 3829 if (m4+mK0+mK0<m3+mK+mK0 && m4+mK0+mK0<=m5+mK+mK) //=>"2K0+ResA is theBest" 3677 {3830 { 3678 3831 m1 =mK0; 3679 3832 PDG1=311; 3680 3833 m3 =m4; 3681 3834 PDG3=newN00.GetPDG(); 3682 }3835 } 3683 3836 else if(m5+mK+mK<m3+mK+mK0 && m5+mK+mK<=m4+mK0+mK0)//=>"2Kp+ResA isTheBest" 3684 {3837 { 3685 3838 m2 =mK; 3686 3839 PDG1=321; 3687 3840 m3 =m5; 3688 3841 PDG3=newNpp.GetPDG(); 3689 }3842 } 3690 3843 if(totMass>m1+m2+m3) // => "can decay" case 3691 3844 { … … 3694 3847 G4LorentzVector ra4M(0.,0.,0.,m3); 3695 3848 if(!G4QHadron(tot4M).DecayIn3(k14M,k24M,ra4M)) 3696 {3849 { 3697 3850 G4cout<<"--Warning--G4QE::HQE:tM="<<tot4M.m()<<"->aK="<<PDG1<<"(M="<<m1 3698 3851 <<")+K2="<<PDG2<<"(M="<<m2<<")+A="<<PDG3<<"(M="<<m3<<")"<<G4endl; 3699 3852 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3700 3853 CleanUp(); 3701 if(!CheckGroundState(quasH,true))3854 if(!CheckGroundState(quasH,true)) 3702 3855 { 3703 3856 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3706 3859 G4cout<<"***G4QE::HQE:FillAsIs(8),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3707 3860 #endif 3708 //throw G4QException("G4QEnv::HadrQE:2K+ResidNucleus DecIn3 Error");3861 //throw G4QException("G4QEnv::HadrQE:2K+ResidNucleus DecIn3 Error"); 3709 3862 } 3710 3863 delete quasH; 3711 3864 return theQHadrons; 3712 }3865 } 3713 3866 G4QHadron* H1 = new G4QHadron(PDG1,k14M); 3714 3867 theQHadrons.push_back(H1); // (delete equivalent) … … 3727 3880 #endif 3728 3881 break; 3729 }3882 } 3730 3883 else totM=270000.; // => "Continue reversion" case 3731 }3884 } 3732 3885 else totM=300000.; // => "Continue reversion" case 3733 }3886 } 3734 3887 else 3735 {3888 { 3736 3889 if (totPDG==1114||totPDG==2224||totPDG==10) // Decay right now and finish 3737 {3890 { 3738 3891 G4double m1=mNeut; 3739 3892 G4int PDG1=2112; 3740 3893 G4double m2=mPi; 3741 3894 G4int PDG2=-211; 3742 if(totPDG==2224)3743 {3895 if(totPDG==2224) 3896 { 3744 3897 m1=mProt; 3745 3898 PDG1=2212; 3746 3899 m2=mPi; 3747 3900 PDG2=211; 3748 }3901 } 3749 3902 else if(totPDG==10) // "Chipolino" case 3750 {3903 { 3751 3904 G4QChipolino resChip(totQC); // define the residual as a Chipolino 3752 3905 G4QPDGCode h1=resChip.GetQPDG1(); … … 3756 3909 PDG2=h2.GetPDGCode(); // PDG code of the second hadron 3757 3910 m2 =h2.GetMass(); // Mass of the second hadron 3758 }3911 } 3759 3912 if(totMass>m1+m2) 3760 {3913 { 3761 3914 G4LorentzVector fq4M(0.,0.,0.,m1); 3762 3915 G4LorentzVector qe4M(0.,0.,0.,m2); 3763 3916 if(!G4QHadron(tot4M).DecayIn2(fq4M,qe4M)) 3764 {3917 { 3765 3918 G4cout<<"---Warning---G4QE::HaQE:tM="<<tot4M.m()<<"-> h1="<<PDG1<<"(M=" 3766 <<m1<<") + h2="<<PDG2<<"(M="<<m2<<")="<<m1+m2<<G4endl;3919 <<m1<<") + h2="<<PDG2<<"(M="<<m2<<")="<<m1+m2<<G4endl; 3767 3920 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); // totQC not tQC! 3768 3921 CleanUp(); 3769 if(!CheckGroundState(quasH,true))3922 if(!CheckGroundState(quasH,true)) 3770 3923 { 3771 3924 G4QHadron* hadr = new G4QHadron(totQC,tot4M); // totQC not tQC! … … 3774 3927 G4cout<<"***G4QE::HQE:FillAsIs(9),QC="<<totQC<<",4M="<<tot4M<<G4endl; 3775 3928 #endif 3776 //throw G4QException("G4QEnv::HadrQEnv: h1+h2 DecayIn2 Error");3929 //throw G4QException("G4QEnv::HadrQEnv: h1+h2 DecayIn2 Error"); 3777 3930 } 3778 3931 delete quasH; 3779 3932 return theQHadrons; 3780 }3933 } 3781 3934 G4QHadron* H1 = new G4QHadron(PDG1,fq4M); 3782 3935 theQHadrons.push_back(H1); // (delete equivalent) … … 3790 3943 theQHadrons.push_back(H2); // (delete equivalent) 3791 3944 break; 3792 }3945 } 3793 3946 else totM=350000.; 3794 }3795 else if(totPDG) totM=G4QPDGCode(totPDG).GetMass();3947 } 3948 else if(totPDG) totM=G4QPDGCode(totPDG).GetMass(); 3796 3949 else totM=400000.; 3797 }3950 } 3798 3951 totBN=totQC.GetBaryonNumber(); // The BaryNum after addition 3799 3952 totS=totQC.GetStrangeness(); // The Strangeness after addition 3800 3953 G4double dM=totMass-totM; 3801 3954 #ifdef fdebug 3802 G4cout<<"G4QEnv::HadrQE: Add H="<<last4M<<lastQC<<",tM="<<tot4M<<totM<<totQC3955 G4cout<<"G4QEnv::HadrQE: Add H="<<last4M<<lastQC<<",tM="<<tot4M<<totM<<totQC 3803 3956 <<",dM="<<dM<<", tB="<<totBN<<", tS="<<totS<<G4endl; 3804 3957 #endif 3805 3958 if(dM>-0.001&&totPDG) 3806 {3959 { 3807 3960 CleanUp(); 3808 3961 G4QHadron* evH = new G4QHadron(totPDG,tot4M);//Create Hadron for ResidNucleus 3809 3962 EvaporateResidual(evH); // Evaporate ResNuc (del.equiv) 3810 3963 break; 3811 }3964 } 3812 3965 nOfOUT = theQHadrons.size(); // Update the value of OUTPUT entries 3813 } // End of WHILE(nOfOUT)3966 } // End of WHILE(nOfOUT) 3814 3967 nOfOUT = theQHadrons.size(); // Update the value of OUTPUT entries 3815 if(!nOfOUT)3816 {3817 G4cout<<"---Warning---G4QEnv::HadrQE:M="<<totMass<<"<gsM="<<totM<<",dM="<<dM3968 if(!nOfOUT) 3969 { 3970 G4cout<<"---Warning---G4QEnv::HadrQE:M="<<totMass<<"<gsM="<<totM<<",dM="<<dM 3818 3971 <<", tPDG="<<totPDG<<", t4M="<<tot4M<<G4endl; 3819 // throw G4QException("G4QEnvironment::HadronizeQEnv:Can't decayExhostedQEnv");3972 // throw G4QException("G4QEnvironment::HadronizeQEnv:Can't decayExhostedQEnv"); 3820 3973 CleanUp(); 3821 3974 G4QHadron* evH = new G4QHadron(totPDG,tot4M);// Create Hadron for ResidNucleus 3822 3975 EvaporateResidual(evH); // Evaporate ResidNucl (del.equiv) 3823 }3824 }3976 } 3977 } 3825 3978 else // "Last decay was fatal" case @@ buggy ?MK 3826 {3827 #ifdef pdebug 3828 G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl;3979 { 3980 #ifdef pdebug 3981 G4cout<<"***G4QEnv::HadrQE: M="<<totMass<<",dM="<<dM<<",nQ="<<nQuasmons<<G4endl; 3829 3982 #endif 3830 3983 G4Quasmon* quasH = new G4Quasmon(totQC,tot4M); 3831 3984 CleanUp(); 3832 if(!CheckGroundState(quasH,true))3985 if(!CheckGroundState(quasH,true)) 3833 3986 { 3834 3987 G4QHadron* hadr = new G4QHadron(totQC,tot4M); … … 3841 3994 } 3842 3995 CleanUp(); 3843 }3844 } // End of "infinit" WHILE LOOP3996 } 3997 } // End of "infinit" WHILE LOOP 3845 3998 } // End of the "Nuclear Environment" case 3846 3999 return theQHadrons; … … 3872 4025 G4int thePDG = qH->GetPDGCode(); // Get PDG code of the Residual Nucleus 3873 4026 G4int theBN = qH->GetBaryonNumber(); // A (Baryon number of the nucleus) 4027 G4QContent theQC = qH->GetQC(); // Quark Content of the hadron 4028 G4int theS=theQC.GetStrangeness(); // S (Strangeness of the nucleus) 3874 4029 #ifdef pdebug 3875 4030 G4cout<<"G4QE::EvaporateRes:Called for PDG="<<thePDG<<",4M="<<qH->Get4Momentum()<<G4endl; 3876 4031 #endif 3877 if(theBN==1) 4032 if(theS<0) // Antistrange nucleus 4033 { 4034 #ifdef pdebug 4035 G4cout<<"G4QE::EvaporateRes: AntistrangeNucleus="<<thePDG<<qH->Get4Momentum()<<G4endl; 4036 #endif 4037 DecayAntistrange(qH); // (delete equivalent) 4038 return; 4039 } 4040 else if(theBN==1) 3878 4041 { 3879 4042 #ifdef pdebug 3880 4043 G4cout<<"G4QE::EvaporateRes: Baryon="<<thePDG<<qH->Get4Momentum()<<G4endl; 3881 4044 #endif 3882 DecayBaryon(qH); // (delete equivalent) 3883 #ifdef qdebug 3884 qH=0; 3885 #endif 4045 DecayBaryon(qH); // (delete equivalent) 3886 4046 return; 3887 4047 } … … 3895 4055 //DecayMeson(qH); // @@ 3896 4056 theQHadrons.push_back(qH); 3897 #ifdef qdebug3898 qH=0;3899 #endif3900 4057 return; 3901 4058 } 3902 G4QContent theQC = qH->GetQC(); // Quark Content of the hadron3903 4059 G4int theC=theQC.GetCharge(); // P 3904 G4int theS=theQC.GetStrangeness(); // S3905 4060 if(!thePDG) thePDG = theQC.GetSPDGCode(); // If there is no PDG code, get it from QC 3906 4061 if(thePDG==10&&theQC.GetBaryonNumber()>0) thePDG=theQC.GetZNSPDGCode(); … … 3925 4080 { 3926 4081 theQHadrons.push_back(qH); // fill As It Is 3927 #ifdef qdebug3928 qH=0;3929 #endif3930 4082 } 3931 4083 else if(totMass>totGSM) … … 3972 4124 } // End of EvaporateResidual 3973 4125 3974 // The public Hadronisation function with the Exception treatment (del respons. of User!)4126 //Public Hadronisation function with Exception treatment (del is responsibility of User!) 3975 4127 G4QHadronVector* G4QEnvironment::Fragment() 3976 4128 {// ========================== … … 4039 4191 { 4040 4192 RepFlag=false; // If OK - go out of the while 4041 theFragments = FSInteraction(); // InterClass creation. User must delet QHadrons.4193 theFragments = FSInteraction(); // InterClass creation. User must delet QHadrons. 4042 4194 } 4043 4195 catch (G4QException& error) … … 4055 4207 G4QHadron* cH = theQHadrons[ph]; 4056 4208 dif-=cH->Get4Momentum(); 4057 G4cout<<"***G4QEnvir::Fr:H"<<ph<<"="<<cH->Get4Momentum()<<cH->GetPDGCode()<<G4endl;4209 G4cout<<"***G4QEnvir::Fr:H"<<ph<<"="<<cH->Get4Momentum()<<cH->GetPDGCode()<<G4endl; 4058 4210 } 4059 4211 for(G4int pq=0; pq<nQp; pq++) … … 4110 4262 G4int nProj=theProjectiles.size(); 4111 4263 if(nProj) for(G4int ipr=0; ipr<nProj; ipr++) 4112 {4264 { 4113 4265 G4QHadron* prH = theProjectiles[ipr]; 4114 4266 G4cerr<<"G4QE::F:#"<<ipr<<",PDG/4M="<<prH->GetPDGCode()<<prH->Get4Momentum()<<G4endl; 4115 4267 } 4116 throw G4QException("G4QEnvironment::Fragment:This reaction caused the CHIPSException");4268 throw G4QException("G4QEnvironment::Fragment:This reaction caused the CHIPSException"); 4117 4269 //G4Exception("G4QEnvironment::Fragment","027",FatalException,"GeneralCHIPSException"); 4118 4270 } … … 4121 4273 if(tmpS) 4122 4274 { 4123 tmpS=theFragments->size(); 4124 intQHadrons.resize(tmpS+intQHadrons.size()); // Resize intQHadrons 4125 copy(theFragments->begin(), theFragments->end(), intQHadrons.end()-tmpS); 4126 tmpS=intQHadrons.size(); 4127 theFragments->resize(tmpS); // Resize theFragments 4128 copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin()); 4275 //tmpS=theFragments->size(); 4276 //intQHadrons.resize(tmpS+intQHadrons.size()); 4277 //copy(theFragments->begin(), theFragments->end(), intQHadrons.end()-tmpS); 4278 //tmpS=intQHadrons.size(); 4279 //theFragments->resize(tmpS); // Resize theFragments 4280 //copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin()); 4281 // Can be like this, but by performance it is closer to FNAL (but better than it) 4282 //copy(theFragments->begin(), theFragments->end(), back_inserter(intQHadrons)); 4283 //theFragments->resize(intQHadrons.size()); // Resize theFragments 4284 //copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin()); 4285 // The following (istead of all above) has worse performance ! 4286 theFragments->insert(theFragments->begin(), intQHadrons.begin(), intQHadrons.end() ); 4129 4287 intQHadrons.clear(); 4130 4288 } … … 4200 4358 for (G4int is=0; is<nQuasmons; is++) // Sum 4mom's of Quasmons for comparison 4201 4359 { 4202 G4Quasmon* pQ = theQuasmons[is];4360 G4Quasmon* pQ = theQuasmons[is]; 4203 4361 G4LorentzVector Q4M= pQ->Get4Momentum(); 4204 4362 G4cout<<"G4QE::FSI: Quasmon ("<<is<<") is added, 4M="<<Q4M<<G4endl; … … 4262 4420 for (G4int js=0; js<nQuasmons; js++) // Subtract 4mom's of Quasmons (compare) 4263 4421 { // 4264 G4Quasmon* prQ = theQuasmons[js];//4422 G4Quasmon* prQ = theQuasmons[js];// 4265 4423 if(prQ->GetStatus()) // Subtract only if Quasmon is alive 4266 4424 { // … … 4270 4428 t4M -= Q4M; // Subtract 4-momentum of the Quasmon 4271 4429 tC -= prQ->GetQC().GetCharge(); // 4272 } //4430 } // 4273 4431 else G4cout<<"G4QE::FSI:Dead Quasmon("<<js<<")="<<prQ->GetStatus()<<G4endl; 4274 4432 } // End of Quasmons4Momentum subtractions … … 4284 4442 t4M -= hs4Mom; // 4285 4443 tC -= theQHadrons[jpo]->GetCharge(); // Subtract charge of the OutHadron 4286 } // End of the "FinalHadron" IF4444 } // End of the "FinalHadron" IF 4287 4445 } // End of the LOOP over output hadrons 4288 4446 G4cout<<"G4QEnv::FSI:|||||4-MomCHECK||||d4M="<<t4M<<",dCharge="<<tC<<G4endl; … … 4292 4450 { 4293 4451 G4cout<<"---Warning---G4QEnvironment::FSInteraction: nHadrons="<<nHadr<<G4endl; 4294 //throw G4QException("G4QEnvironment::FSInteraction: No hadrons in the output");4452 //throw G4QException("G4QEnvironment::FSInteraction: No hadrons in the output"); 4295 4453 return theFragments; 4296 4454 } … … 4327 4485 if(!CheckGroundState(quasH,true))// Try to correct with other hadrons 4328 4486 { 4487 #ifdef pdebug 4488 // M.K. Fake complain in the low energy nHe/pHe reactions, while everything is OK 4329 4489 G4cout<<"---Warning---G4QEnv::FSI:Correction error LeaveAsItIs h4m="<<lh4M<<G4endl; 4490 #endif 4330 4491 theQHadrons.push_back(curHadr);// Fill theResidualNucleus asItIs(delete equivalent) 4331 //throw G4QException("G4QEnv::FSI: STOP at Correction Error");4492 //throw G4QException("G4QEnv::FSI: STOP at Correction Error"); 4332 4493 } 4333 4494 else … … 4386 4547 #endif 4387 4548 if(hBN>lHadr) // Current Hadron is the Biggest fragment -> Swap with theLast Hadron 4388 {4549 { 4389 4550 G4QHadron* theLast = theCurr; // Prototype of the pointer to the Last Hadron 4390 4551 G4QHadron* curHadr = new G4QHadron(theCurr);// Remember CurrentHadron for evaporation … … 4406 4567 sBN = theCurr->GetStrangeness(); 4407 4568 hPDG = theCurr->GetPDGCode(); 4408 }4569 } 4409 4570 if(hPDG==89002000||hPDG==89001001||hPDG==89000002)// 2pt dec. of anti-strange (3pt dec) 4410 4571 { … … 4421 4582 G4double tM = 0.; 4422 4583 if(hPDG==89002000) // Use the prototypes above 4423 {4584 { 4424 4585 if(hMi<mKmP) 4425 {4586 { 4426 4587 if(hMi>mProt+mPi+mPi0) 4427 {4588 { 4428 4589 sPDG=211; 4429 4590 sM =mPi; … … 4432 4593 } 4433 4594 else if(hMi>mProt+mPi) // @@ Does not conserve strangeness (Week decay) 4434 {4595 { 4435 4596 #ifdef pdebug 4436 4597 G4cout<<"**G4QE::FSI:ANTISTRANGE*++*STRANGENESS,PDG="<<hPDG<<",M="<<hM<<G4endl; … … 4442 4603 } 4443 4604 } 4444 else if(hPDG==89001001)4445 {4605 else if(hPDG==89001001) 4606 { 4446 4607 fQPDG= nQPDG; 4447 4608 fM = mNeut; … … 4455 4616 sM = mK0; 4456 4617 } 4457 else if(hMi<mKmN)4458 {4618 else if(hMi<mKmN) 4619 { 4459 4620 if(hMi>mProt+mPi0+mPi0) 4460 {4621 { 4461 4622 fQPDG= pQPDG; 4462 4623 fM = mProt; … … 4466 4627 tM = mPi0; 4467 4628 if(hMi>mNeut+mPi+mPi0&&G4UniformRand()>.67) 4468 {4629 { 4469 4630 fQPDG= nQPDG; 4470 4631 fM = mNeut; … … 4473 4634 } 4474 4635 if(hMi>mProt+mPi+mPi&&G4UniformRand()>.5) 4475 {4636 { 4476 4637 sPDG = 211; 4477 4638 sM = mPi; … … 4481 4642 } 4482 4643 else if(hMi>mProt+mPi0) // @@ Does not conserve strangeness (Week decay) 4483 {4644 { 4484 4645 #ifdef pdebug 4485 4646 G4cout<<"**G4QE::FSI:*ANTISTRANGE*+*STRANGENESS*PDG="<<hPDG<<",M="<<hM<<G4endl; … … 4493 4654 } 4494 4655 } 4495 else if(hPDG==89000002)4496 {4656 else if(hPDG==89000002) 4657 { 4497 4658 fQPDG= nQPDG; 4498 4659 fM = mNeut; … … 4500 4661 sM = mK0; 4501 4662 if(hMi<mK0mN) 4502 {4663 { 4503 4664 if(hMi>mNeut+mPi+mPi) 4504 {4665 { 4505 4666 sPDG = 211; 4506 4667 sM = mPi; … … 4509 4670 } 4510 4671 if(hMi>mProt+mPi+mPi0) 4511 {4672 { 4512 4673 fQPDG= pQPDG; 4513 4674 fM = mProt; … … 4518 4679 } 4519 4680 else if(hMi>mProt+mPi) // @@ Does not conserve strangeness (Week decay) 4520 {4681 { 4521 4682 #ifdef pdebug 4522 4683 G4cout<<"**G4QE::FSI:**ANTISTRANGE*0*STRANGENE**PDG="<<hPDG<<",M="<<hM<<G4endl; … … 4529 4690 else sPDG=0; // @@ Still can try to decay in gamma+neutron (electromagnetic) 4530 4691 } 4531 }4692 } 4532 4693 if(!sPDG) 4533 {4694 { 4534 4695 #ifdef pdebug 4535 4696 G4cout<<"***G4QE::FSI:***ANTISTRANGE***CANN'T DECAY,PDG="<<hPDG<<",M="<<hM<<G4endl; … … 4543 4704 G4double sum=fM+sM; 4544 4705 if(fabs(hM-sum)<=eps) 4545 {4706 { 4546 4707 f4M=h4Mom*(fM/sum); 4547 4708 s4M=h4Mom*(sM/sum); 4548 }4709 } 4549 4710 else if(hM<sum || !G4QHadron(h4Mom).DecayIn2(f4M,s4M)) 4550 {4711 { 4551 4712 G4cout<<"---Warning---G4QE::FSI: Still try(2),M="<<hM<<"->"<<fM<<"("<<fQPDG<<")+" 4552 4713 <<sM<<"("<<sPDG<<")="<<sum<<G4endl; … … 4588 4749 // 7. Forbid the decay 4589 4750 fOK=false; 4590 }4751 } 4591 4752 else 4592 4753 { 4593 4754 G4cerr<<"***G4QEnv::FSI: No recovery (1) Env="<<theEnvironment<<G4endl; 4594 throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn2 did not succeed");4755 throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn2 did not succeed"); 4595 4756 } 4596 }4757 } 4597 4758 if(fOK) 4598 4759 { … … 4602 4763 theQHadrons.push_back(sH); // (delete equivalent) 4603 4764 } 4604 }4765 } 4605 4766 else 4606 4767 { … … 4611 4772 G4double sum=fM+sM+tM; 4612 4773 if(fabs(hM-sum)<=eps) 4613 {4774 { 4614 4775 f4M=h4Mom*(fM/sum); 4615 4776 s4M=h4Mom*(sM/sum); 4616 4777 t4M=h4Mom*(tM/sum); 4617 }4778 } 4618 4779 else if(hM<sum || !G4QHadron(h4Mom).DecayIn3(f4M,s4M,t4M)) 4619 {4780 { 4620 4781 G4cout<<"---Warning---G4QE::FSI: Still try(3), M"<<hM<<"->"<<fM<<"("<<fQPDG<<")+" 4621 4782 <<sM<<"("<<sPDG<<")+"<<tM<<"("<<tPDG<<")="<<sum<<G4endl; … … 4649 4810 delete quasH; 4650 4811 fOK=false; 4651 }4812 } 4652 4813 else 4653 4814 { 4654 4815 G4cout<<"***G4QEnv::FSI: No recovery (2) Env="<<theEnvironment<<G4endl; 4655 throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn3 did not succeed");4816 throw G4QException("G4QEnv::FSI:ANTISTRANGE DecayIn3 did not succeed"); 4656 4817 } 4657 }4818 } 4658 4819 if(fOK) 4659 4820 { … … 4665 4826 theQHadrons.push_back(tH); // (delete equivalent) 4666 4827 } 4667 }4828 } 4668 4829 nHadr=theQHadrons.size(); 4669 }4830 } 4670 4831 else if(hPDG==89999003||hPDG==90002999||hPDG==90000003||hPDG==90003000|| 4671 4832 hPDG==90999002||hPDG==91001999) // "3-particles decays of dibaryons and 3N" … … 4682 4843 G4double tM = mPi; 4683 4844 if(hPDG==90002999) // p,p,pi+ 4684 {4845 { 4685 4846 nuQPDG = pQPDG; // Substitute p for the first n 4686 4847 nucM = mProt; … … 4688 4849 barM = mProt; 4689 4850 tPDG = 211; // Substitute pi+ for the first pi- 4690 }4851 } 4691 4852 else if(hPDG==90003000) // 3p 4692 {4853 { 4693 4854 nuQPDG = pQPDG; // Substitute p for the first n 4694 4855 nucM = mProt; … … 4697 4858 tPDG = 2212; // Substitute p for pi- 4698 4859 tM = mProt; 4699 }4860 } 4700 4861 else if(hPDG==90999002) // n,Lambda,pi-/n,Sigma0,pi-/n,Sigma-,gamma(@@) 4701 {4862 { 4702 4863 if(hM>mSigZ+mNeut+mPi) 4703 {4864 { 4704 4865 G4double ddMass=hM-mPi; // Free CM energy 4705 4866 G4double dd2=ddMass*ddMass; // Squared free energy … … 4720 4881 barPDG = 3122; // Substitute Lambda for the second n 4721 4882 barM = mLamb; 4722 }4883 } 4723 4884 } 4724 4885 else if(hM>mLamb+mNeut+mPi) … … 4734 4895 tM = 0; 4735 4896 } 4736 }4897 } 4737 4898 else if(hPDG==91001999) // p,Lambda,pi+/p,Sigma0,pi+/p,Sigma+,gamma(@@) 4738 {4899 { 4739 4900 nuQPDG = pQPDG; // Substitute p for the first n 4740 4901 nucM = mProt; 4741 4902 tPDG = 211; // Substitute pi+ for the first pi- 4742 4903 if(hM>mSigZ+mProt+mPi) 4743 {4904 { 4744 4905 G4double ddMass=hM-mPi; // Free CM energy 4745 4906 G4double dd2=ddMass*ddMass; // Squared free energy … … 4760 4921 barPDG = 3122; // Substitute Lambda for the second n 4761 4922 barM = mLamb; 4762 }4923 } 4763 4924 } 4764 4925 if(hM>mLamb+mProt+mPi) … … 4774 4935 tM = 0; 4775 4936 } 4776 }4937 } 4777 4938 else if(hPDG==90000003) // 3n 4778 {4939 { 4779 4940 tPDG = 2112; // Substitute n for pi- 4780 4941 tM = mNeut; 4781 }4942 } 4782 4943 G4bool fOK=true; 4783 4944 G4LorentzVector nu4M(0.,0.,0.,nucM); … … 4786 4947 G4double sum=nucM+barM+tM; 4787 4948 if(fabs(hM-sum)<=eps) 4788 {4949 { 4789 4950 nu4M=h4Mom*(nucM/sum); 4790 4951 ba4M=h4Mom*(barM/sum); 4791 4952 pi4M=h4Mom*(tM/sum); 4792 }4953 } 4793 4954 if(hM<sum || !G4QHadron(h4Mom).DecayIn3(nu4M,ba4M,pi4M)) 4794 {4955 { 4795 4956 #ifdef pdebug 4796 4957 G4int eA=theEnvironment.GetA(); … … 4814 4975 else theCurr->SetQC(theLast->GetQC());// CurHadrPDG instead of LastHadrPDG 4815 4976 #ifdef pdebug 4816 G4cout<<"---Warning---G4QE::FSI:l#"<<nhd1<<",4M="<<l4M<<",PDG="<<lQP<<G4endl;4977 G4cout<<"---Warning---G4QE::FSI:l#"<<nhd1<<",4M="<<l4M<<",PDG="<<lQP<<G4endl; 4817 4978 #endif 4818 4979 theCurr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution … … 4838 4999 delete quasH; 4839 5000 fOK=false; 4840 //}4841 //else4842 //{5001 //} 5002 //else 5003 //{ 4843 5004 // G4cerr<<"***G4QEnv::FSI:NoRec(3)E="<<theEnvironment<<eA<<",PDG="<<hPDG<<G4endl; 4844 // throw G4QException("G4QEnv::FSI:ISO-dibaryon or 3n/3p DecayIn3 error");4845 //}4846 }5005 // throw G4QException("G4QEnv::FSI:ISO-dibaryon or 3n/3p DecayIn3 error"); 5006 //} 5007 } 4847 5008 if(fOK) 4848 5009 { … … 4855 5016 nHadr=theQHadrons.size(); 4856 5017 } 4857 }5018 } 4858 5019 else if(hBN>1 && !sBN && (cBN<0 || cBN>hBN)) // "nN+mD- or nP+mD++ decay" 4859 5020 { … … 4871 5032 G4int nPi = -cBN; // a#of Pi-'s 4872 5033 if( cBN>hBN) // reinitialization for the "(n+m)*P,m*pi+" case 4873 {5034 { 4874 5035 nuQPDG = pQPDG; // Substitute p for the first n 4875 5036 nucM = mProt; … … 4887 5048 G4double sum=nucM+barM+tM; 4888 5049 if(fabs(hM-sum)<=eps) 4889 {5050 { 4890 5051 nu4M=h4Mom*(nucM/sum); 4891 5052 ba4M=h4Mom*(barM/sum); 4892 5053 pi4M=h4Mom*(tM/sum); 4893 }5054 } 4894 5055 if(hM<sum || !G4QHadron(h4Mom).DecayIn3(nu4M,ba4M,pi4M)) 4895 {5056 { 4896 5057 #ifdef pdebug 4897 5058 G4cout<<"***G4QEnv::FSI:IsN M="<<hM<<","<<hPDG<<"->N="<<nuQPDG<<"(M="<<nucM<<")+" … … 4930 5091 delete quasH; 4931 5092 fOK=false; 4932 }5093 } 4933 5094 else 4934 5095 { 4935 5096 G4cout<<"***G4QEnv::FSI:IN,NoRec(4) Env="<<theEnvironment<<",PDG="<<hPDG<<G4endl; 4936 throw G4QException("G4QEnv::FSI:IN Multy ISO-dibaryon DecayIn3 did not succeed");4937 } 4938 }5097 throw G4QException("G4QEnv::FSI:IN Multy ISO-dibaryon DecayIn3 did not succeed"); 5098 } 5099 } 4939 5100 if(fOK) 4940 5101 { … … 5027 5188 G4double tM =mPi; 5028 5189 if(hPDG==90002999) 5029 {5190 { 5030 5191 fQPDG=pQPDG; 5031 5192 fM =mProt; … … 5040 5201 G4double sum=fM+sM+tM; 5041 5202 if(fabs(hM-sum)<=eps) 5042 {5203 { 5043 5204 f4M=h4Mom*(fM/sum); 5044 5205 s4M=h4Mom*(sM/sum); 5045 5206 t4M=h4Mom*(tM/sum); 5046 }5207 } 5047 5208 else if(hM<sum || !G4QHadron(h4Mom).DecayIn3(f4M,s4M,t4M)) 5048 {5209 { 5049 5210 G4cout<<"---WARNING---G4QE::FSI: Still trying, NDM="<<hM<<"->"<<fM<<"("<<fQPDG 5050 5211 <<")+"<<sM<<"("<<sPDG<<")+"<<tM<<"("<<tPDG<<")="<<sum<<G4endl; … … 5076 5237 delete quasH; 5077 5238 fOK=false; 5078 }5239 } 5079 5240 else 5080 5241 { 5081 5242 G4cout<<"***G4QEnv::FSI: No ND recovery Env="<<theEnvironment<<G4endl; 5082 throw G4QException("G4QEnv::FSI:ND DecayIn3 did not succeed");5243 throw G4QException("G4QEnv::FSI:ND DecayIn3 did not succeed"); 5083 5244 } 5084 }5245 } 5085 5246 if(fOK) 5086 5247 { … … 5095 5256 hQPDG= G4QPDGCode(hPDG); 5096 5257 hGSM = hQPDG.GetMass(); // Change GroundStateMass of theFirstFragm 5097 }5258 } 5098 5259 nHadr=theQHadrons.size(); 5099 5260 if(hPDG==89001001||hPDG==89002000||hPDG==89000002) … … 5107 5268 G4double sM =mK0; 5108 5269 if(hPDG==89000002) 5109 {5270 { 5110 5271 fQPDG=pQPDG; 5111 5272 fM =mProt; … … 5114 5275 } 5115 5276 if(hPDG==89001001) 5116 {5277 { 5117 5278 if(hM<mK0+mProt || G4UniformRand()>.5) 5118 5279 { … … 5131 5292 G4double sum=fM+sM; 5132 5293 if(fabs(hM-sum)<=eps) 5133 {5294 { 5134 5295 f4M=h4Mom*(fM/sum); 5135 5296 s4M=h4Mom*(sM/sum); 5136 }5297 } 5137 5298 else if(hM<sum || !G4QHadron(h4Mom).DecayIn2(f4M,s4M)) 5138 {5299 { 5139 5300 G4cout<<"---WARNING---G4QE::FSI: Still trying (2),NDM="<<hM<<"->"<<fM<<"("<<fQPDG 5140 5301 <<")+"<<sM<<"("<<sPDG<<")="<<sum<<G4endl; … … 5166 5327 delete quasH; 5167 5328 fOK=false; 5168 }5329 } 5169 5330 else 5170 5331 { 5171 5332 G4cerr<<"***G4QEnv::FSI: No KN recovery Env="<<theEnvironment<<G4endl; 5172 throw G4QException("G4QEnv::FSI:KN DecayIn2 did not succeed");5333 throw G4QException("G4QEnv::FSI:KN DecayIn2 did not succeed"); 5173 5334 } 5174 }5335 } 5175 5336 if(fOK) 5176 5337 { … … 5183 5344 hQPDG= G4QPDGCode(hPDG); 5184 5345 hGSM = hQPDG.GetMass(); // Change GroundStateMass of theFirstFragm 5185 }5346 } 5186 5347 nHadr=theQHadrons.size(); 5187 5348 G4int hS = curHadr->GetStrangeness(); … … 5199 5360 G4cout<<"G4QE::FSI:h="<<hPDG<<",S="<<hS<<",B="<<hB<<",#"<<hadron<<"<"<<nHadr<<G4endl; 5200 5361 #endif 5201 //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>3||hB<2)) // ThermoBackFus (VIMP for gamA TotCS)5202 //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>2||hB<4)) // ThermoBackFus (VIMP for gamA TotCS)5203 if(hadron&&!hF&&hB>0&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS)5204 //if(hadron&&!hF&&hB>0&&hB<4&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS)5205 //if(hadron&&!hF&&hB>0&&!hS&&nHadr>2)//ThermoBackFusion MAX condition (VIMP for gamA)5206 //if(2>3) // Close the ThermoBackFusion (VIMP for gamA TotCS)5362 //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>3||hB<2)) // ThermoBackFus (VIMP for gamA TotCS) 5363 //if(hadron&&!hF&&hB>0&&!hS&&(nHadr>2||hB<4)) // ThermoBackFus (VIMP for gamA TotCS) 5364 if(hadron&&!hF&&hB>0&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS) 5365 //if(hadron&&!hF&&hB>0&&hB<4&&!hS) // ThermoBackFusion cond. (VIMP for gamA TotCS) 5366 //if(hadron&&!hF&&hB>0&&!hS&&nHadr>2)//ThermoBackFusion MAX condition (VIMP for gamA) 5367 //if(2>3) // Close the ThermoBackFusion (VIMP for gamA TotCS) 5207 5368 { 5208 5369 #ifdef pdebug … … 5212 5373 G4QContent hQC = curHadr->GetQC(); 5213 5374 if(hadron&&!hF&&hB>0) for(unsigned pt=0; pt<hadron; pt++) 5214 {5375 { 5215 5376 G4QHadron* backH = theQHadrons[pt]; // Get pointer to one of thePreviousHadrons 5216 5377 G4int bF = backH->GetNFragments(); … … 5238 5399 #ifdef pdebug 5239 5400 //if(nHadr==3) 5240 G4cout<<"G4QE::FSI:"<<pt<<",B="<<bB<<",S="<<bS<<",p="<<pCM2<<"<"<<p2cut<<",hB="5401 G4cout<<"G4QE::FSI:"<<pt<<",B="<<bB<<",S="<<bS<<",p="<<pCM2<<"<"<<p2cut<<",hB=" 5241 5402 <<hB<<",bM+hM="<<bM+hM<<">tM="<<tM<<",tQC="<<sQC<<G4endl; 5242 5403 #endif 5243 5404 //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&pCM2<p2cut) // Only baryons == pcut 5244 //if(!bF&&!bS&&(bB==1&&hB>0||hB==1&&bB>0)&&bM+hM>tM+.000015405 //if(!bF&&!bS&&(bB==1&&hB>0||hB==1&&bB>0)&&bM+hM>tM+.00001 5245 5406 // && (pCM2<p2cut&&nHadr>3||pCM2<p2cut2&&nHadr==3)) 5246 //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&(pCM2<p2cut&&nHadr>3 ||5247 // pCM2<p2cut2&&nHadr==3&&bPDG>90000000))5407 //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&(pCM2<p2cut&&nHadr>3 || 5408 // pCM2<p2cut2&&nHadr==3&&bPDG>90000000)) 5248 5409 //if(!bF&&bB<4&&bM+hM>tM+.001&&pCM2<p2cut) 5249 5410 if(!bF&&!bS&&bB>0&&bM+hM>tM+.001&&pCM2<p2cut) 5250 5411 //if(!bF&&bB<4&&bM+hM>tM+.001&&(pCM2<p2cut || bB+hB==4&&pCM2<p2cut2)) 5251 //if(!bF&&(bB==1||hB==1)&&(nHadr>3||bPDG>90000000)&&bM+hM>tM+.001&&pCM2<p2cut)5252 //if(!bF&&(bB==1&&!bC||hB==1&&!hC)&&bM+hM>tM+.001&&pCM2<p2cut)// Only n == pcut5253 //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&sM-bM-hM<cut) // Only baryons == ecut5254 //if(!bF&&bB&&bB<fL&&bM+hM>tM+.001&&sM-bM-hM<cut) // Light fragments == ecut5255 {5412 //if(!bF&&(bB==1||hB==1)&&(nHadr>3||bPDG>90000000)&&bM+hM>tM+.001&&pCM2<p2cut) 5413 //if(!bF&&(bB==1&&!bC||hB==1&&!hC)&&bM+hM>tM+.001&&pCM2<p2cut)// Only n == pcut 5414 //if(!bF&&(bB==1||hB==1)&&bM+hM>tM+.001&&sM-bM-hM<cut) // Only baryons == ecut 5415 //if(!bF&&bB&&bB<fL&&bM+hM>tM+.001&&sM-bM-hM<cut) // Light fragments == ecut 5416 { 5256 5417 #ifdef fdebug 5257 5418 G4int bPDG = backH->GetPDGCode(); 5258 if(sPDG==89999003||sPDG==90002999||sPDG==89999002||sPDG==90001999)5419 if(sPDG==89999003||sPDG==90002999||sPDG==89999002||sPDG==90001999) 5259 5420 G4cout<<"G4QE::FSI:**nD-/pD++**,h="<<hPDG<<",hB="<<hB<<",b="<<bPDG<<",bB=" 5260 5421 <<bB<<G4endl; 5261 5422 //if(nHadr==3) 5262 G4cout<<"G4QE::FSI:*FUSION*#"<<hadron<<"["<<hPDG<<"]"<<hM<<"+#"<<pt<<"["<<bPDG5423 G4cout<<"G4QE::FSI:*FUSION*#"<<hadron<<"["<<hPDG<<"]"<<hM<<"+#"<<pt<<"["<<bPDG 5263 5424 <<"]"<<bM<<"="<<bM+hM<<", sM="<<sM<<">["<<sPDG<<"]"<<tM<<",p2="<<pCM2 5264 5425 <<"<"<<p2cut<<G4endl; … … 5274 5435 G4LorentzVector t4Mom(0.,0.,0.,0.); 5275 5436 if(sPDG==89999002) // A=1 5276 {5437 { 5277 5438 fQPDG=nQPDG; 5278 5439 rQPDG=pimQPDG; 5279 5440 f4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5280 5441 g4Mom=G4LorentzVector(0.,0.,0.,mPi); 5281 }5442 } 5282 5443 else if(sPDG==90001999) 5283 {5444 { 5284 5445 fQPDG=pQPDG; 5285 5446 rQPDG=pipQPDG; 5286 5447 f4Mom=G4LorentzVector(0.,0.,0.,mProt); 5287 5448 g4Mom=G4LorentzVector(0.,0.,0.,mPi); 5288 }5449 } 5289 5450 else if(sPDG==90000002) // A=2 5290 {5451 { 5291 5452 fQPDG=nQPDG; 5292 5453 rQPDG=nQPDG; 5293 5454 f4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5294 5455 g4Mom=f4Mom; 5295 }5456 } 5296 5457 else if(sPDG==90002000) 5297 {5458 { 5298 5459 fQPDG=pQPDG; 5299 5460 rQPDG=pQPDG; 5300 5461 f4Mom=G4LorentzVector(0.,0.,0.,mProt); 5301 5462 g4Mom=f4Mom; 5302 }5463 } 5303 5464 else if(sPDG==92000000) 5304 {5465 { 5305 5466 fQPDG=lQPDG; 5306 5467 rQPDG=lQPDG; … … 5308 5469 g4Mom=f4Mom; 5309 5470 if(sM>mSigZ+mSigZ) // Sigma0+Sigma0 is possible 5310 { // @@ Only two particles PS is used5471 { // @@ Only two particles PS is used 5311 5472 G4double sma=mLamb+mLamb; // Lambda+Lambda sum 5312 5473 G4double pr1=0.; // Prototype to avoid sqrt(-) … … 5334 5495 } 5335 5496 else if(sM>mSigZ+mLamb) // Lambda+Sigma0 is possible 5336 { // @@ Only two particles PS is used5497 { // @@ Only two particles PS is used 5337 5498 G4double sma=mLamb+mLamb; // Lambda+Lambda sum 5338 5499 G4double pr1=0.; // Prototype to avoid sqrt(-) … … 5348 5509 } // 5349 5510 } // 5350 }5511 } 5351 5512 else if(sPDG==89999003) // A=2 5352 {5513 { 5353 5514 hQPDG=nQPDG; 5354 5515 rQPDG=nQPDG; … … 5358 5519 f4Mom=G4LorentzVector(0.,0.,0.,mPi); 5359 5520 three=true; 5360 }5521 } 5361 5522 else if(sPDG==90002999) 5362 {5523 { 5363 5524 hQPDG=pQPDG; 5364 5525 rQPDG=pQPDG; … … 5368 5529 f4Mom=G4LorentzVector(0.,0.,0.,mPi); 5369 5530 three=true; 5370 }5531 } 5371 5532 else if(sPDG==90000003) // A=3 5372 {5533 { 5373 5534 hQPDG=nQPDG; 5374 5535 rQPDG=nQPDG; … … 5378 5539 f4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5379 5540 three=true; 5380 }5541 } 5381 5542 else if(sPDG==90003000) 5382 {5543 { 5383 5544 hQPDG=pQPDG; 5384 5545 rQPDG=pQPDG; … … 5388 5549 f4Mom=G4LorentzVector(0.,0.,0.,mProt); 5389 5550 three=true; 5390 }5551 } 5391 5552 else if(sPDG==90001003) // A=4 5392 {5553 { 5393 5554 rQPDG=nQPDG; 5394 5555 fQPDG=tQPDG; 5395 5556 g4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5396 5557 f4Mom=G4LorentzVector(0.,0.,0.,mTrit); 5397 }5558 } 5398 5559 else if(sPDG==90003001) 5399 {5560 { 5400 5561 rQPDG=pQPDG; 5401 5562 fQPDG=he3QPDG; 5402 5563 g4Mom=G4LorentzVector(0.,0.,0.,mProt); 5403 5564 f4Mom=G4LorentzVector(0.,0.,0.,mHe3); 5404 }5565 } 5405 5566 else if(sPDG==90002003) // A=5 5406 {5567 { 5407 5568 rQPDG=nQPDG; 5408 5569 fQPDG=aQPDG; 5409 5570 g4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5410 5571 f4Mom=G4LorentzVector(0.,0.,0.,mAlph); 5411 }5572 } 5412 5573 else if(sPDG==90003002) 5413 {5574 { 5414 5575 rQPDG=pQPDG; 5415 5576 fQPDG=aQPDG; 5416 5577 g4Mom=G4LorentzVector(0.,0.,0.,mProt); 5417 5578 f4Mom=G4LorentzVector(0.,0.,0.,mAlph); 5418 }5579 } 5419 5580 else if(sPDG==90004002) // A=6 5420 {5581 { 5421 5582 hQPDG=pQPDG; 5422 5583 rQPDG=pQPDG; … … 5426 5587 f4Mom=G4LorentzVector(0.,0.,0.,mAlph); 5427 5588 three=true; 5428 }5589 } 5429 5590 else if(sPDG==90002005) // A=7 5430 {5591 { 5431 5592 rQPDG=nQPDG; 5432 5593 fQPDG=a6QPDG; 5433 5594 g4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5434 5595 f4Mom=G4LorentzVector(0.,0.,0.,mHe6); 5435 }5596 } 5436 5597 else if(sPDG==90005002) 5437 {5598 { 5438 5599 rQPDG=pQPDG; 5439 5600 fQPDG=be6QPDG; 5440 5601 g4Mom=G4LorentzVector(0.,0.,0.,mProt); 5441 5602 f4Mom=G4LorentzVector(0.,0.,0.,mBe6); 5442 }5603 } 5443 5604 else if(sPDG==90004004) // A=8 5444 {5605 { 5445 5606 fQPDG=aQPDG; 5446 5607 rQPDG=aQPDG; 5447 5608 f4Mom=G4LorentzVector(0.,0.,0.,mAlph); 5448 5609 g4Mom=f4Mom; 5449 }5610 } 5450 5611 //else if(sPDG==90006002) 5451 //{5612 //{ 5452 5613 // hQPDG=pQPDG; 5453 5614 // rQPDG=pQPDG; … … 5457 5618 // f4Mom=G4LorentzVector(0.,0.,0.,mBe6); 5458 5619 // three=true; 5459 //}5620 //} 5460 5621 //else if(sPDG==90002006) 5461 //{5622 //{ 5462 5623 // hQPDG=nQPDG; 5463 5624 // rQPDG=nQPDG; … … 5467 5628 // f4Mom=G4LorentzVector(0.,0.,0.,mHe6); 5468 5629 // three=true; 5469 //}5630 //} 5470 5631 else if(sPDG==90002007) // A=9 5471 {5632 { 5472 5633 rQPDG=nQPDG; 5473 5634 fQPDG=a8QPDG; 5474 5635 g4Mom=G4LorentzVector(0.,0.,0.,mNeut); 5475 5636 f4Mom=G4LorentzVector(0.,0.,0.,mHe8); 5476 }5637 } 5477 5638 else if(sPDG==90005004) // A=9 5478 {5639 { 5479 5640 rQPDG=pQPDG; 5480 5641 fQPDG=aQPDG; … … 5484 5645 t4Mom=G4LorentzVector(0.,0.,0.,mAlph); 5485 5646 three=true; 5486 }5647 } 5487 5648 else if(sPDG==90007002) // A=9 5488 {5649 { 5489 5650 rQPDG=pQPDG; 5490 5651 fQPDG=c8QPDG; 5491 5652 g4Mom=G4LorentzVector(0.,0.,0.,mProt); 5492 5653 f4Mom=G4LorentzVector(0.,0.,0.,mC8); 5493 }5654 } 5494 5655 else if(sPDG==90008004) // A=12 5495 {5656 { 5496 5657 hQPDG=pQPDG; 5497 5658 rQPDG=pQPDG; … … 5501 5662 f4Mom=G4LorentzVector(0.,0.,0.,mC10); 5502 5663 three=true; 5503 }5664 } 5504 5665 else if(sPDG==90009006) // A=15 5505 {5666 { 5506 5667 rQPDG=pQPDG; 5507 5668 fQPDG=o14QPDG; 5508 5669 g4Mom=G4LorentzVector(0.,0.,0.,mProt); 5509 5670 f4Mom=G4LorentzVector(0.,0.,0.,mO14); 5510 }5671 } 5511 5672 else if(sPDG==90009007) // A=16 5512 {5673 { 5513 5674 rQPDG=pQPDG; 5514 5675 fQPDG=o15QPDG; 5515 5676 g4Mom=G4LorentzVector(0.,0.,0.,mProt); 5516 5677 f4Mom=G4LorentzVector(0.,0.,0.,mO15); 5517 }5678 } 5518 5679 else if(sPDG==90010006) // A=16 5519 {5680 { 5520 5681 hQPDG=pQPDG; 5521 5682 rQPDG=pQPDG; … … 5525 5686 f4Mom=G4LorentzVector(0.,0.,0.,mO14); 5526 5687 three=true; 5527 }5688 } 5528 5689 #ifdef pdebug 5529 5690 G4cout<<"G4QE::FSI: "<<three<<",r="<<rQPDG<<",f="<<fQPDG<<",t="<<hQPDG<<G4endl; … … 5538 5699 } 5539 5700 else 5540 {5701 { 5541 5702 #ifdef pdebug 5542 5703 G4cout<<"G4QE::FSI:*FUSION IS DONE*,fPDG="<<sPDG<<",PDG1="<<hPDG<<",PDG2=" … … 5552 5713 #endif 5553 5714 } 5554 }5715 } 5555 5716 else 5556 5717 { … … 5562 5723 } 5563 5724 else 5564 {5725 { 5565 5726 #ifdef pdebug 5566 5727 G4cout<<"G4QE::FSI:DONE,n="<<nHadr<<",PDG="<<sPDG<<",1="<<hPDG<<",2="<<bPDG … … 5582 5743 #endif 5583 5744 } 5584 }5745 } 5585 5746 tot4Mom+=b4m; // Instead of the fused hadron 5586 5747 tot4Mom-=g4Mom; // subtract from the total the new hadron … … 5593 5754 hB=hQC.GetBaryonNumber(); 5594 5755 hGSM = hQPDG.GetMass(); 5595 h4m=f4Mom;5756 h4m=f4Mom; 5596 5757 hM=h4m.m(); 5597 5758 // End of Instead ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ … … 5599 5760 G4cout<<"G4QE::FSI:cH4M="<<curHadr->Get4Momentum()<<G4endl; 5600 5761 #endif 5601 } // End of the fusion check5602 } // End of the LOOP over previous hadrons5603 } // End of the FUSION check5762 } // End of the fusion check 5763 } // End of the LOOP over previous hadrons 5764 } // End of the FUSION check 5604 5765 #ifdef chdebug 5605 5766 // *** (2) Charge Control Sum Calculation for the Charge Conservation Check *** … … 5628 5789 tot4Mom-=cH4Mom; // Reduce theTotal 4mom by theCurrent 4mom 5629 5790 if(hadron+1==nHadr) // The Last Hadron in the set 5630 {5791 { 5631 5792 G4double re =tot4Mom.e(); 5632 5793 G4double rpx=tot4Mom.px(); … … 5638 5799 G4cout<<"G4QE::FSI: Is Energy&Mom conserved? t4M="<<tot4Mom<<",d2="<<dem<<G4endl; 5639 5800 #endif 5640 //if(2>3) //@@En/Mom conservation check is closed5801 //if(2>3) //@@En/Mom conservation check is closed 5641 5802 if(dem>0.0001) // Energy or momentum is not conserved 5642 {5803 { 5643 5804 #ifdef pdebug 5644 5805 if(dem>.1) … … 5647 5808 G4LorentzVector cor4M(0.,0.,0.,mNeut); // Prototype for the neutron 5648 5809 if(dmo<0.0001 && re>900.) // MomentumIsConserved - recoverMissing 5649 {5810 { 5650 5811 if(fabs(re-mNeut)<.01) 5651 {5812 { 5652 5813 G4cout<<"...G4QE::FSI:E/M conservation is corrected by neutron"<<G4endl; 5653 5814 //cor4M=G4LorentzVector(0.,0.,0.,mNeut); // Made as a prototype … … 5655 5816 theQHadrons.push_back(theH); // (delete equivalent for the proton) 5656 5817 } 5657 else if(fabs(re-mProt)<.01)5658 {5818 else if(fabs(re-mProt)<.01) 5819 { 5659 5820 G4cout<<"...G4QE::FSI:E/M conservation is corrected by proton"<<G4endl; 5660 5821 cor4M=G4LorentzVector(0.,0.,0.,mProt); … … 5662 5823 theQHadrons.push_back(theH); // (delete equivalent for the proton) 5663 5824 } 5664 else if(fabs(re-mDeut)<.01)5665 {5825 else if(fabs(re-mDeut)<.01) 5826 { 5666 5827 G4cout<<"...G4QE::FSI:E/M conservation is corrected by deuteron"<<G4endl; 5667 5828 cor4M=G4LorentzVector(0.,0.,0.,mDeut); … … 5669 5830 theQHadrons.push_back(theH); // (delete equivalent for the proton) 5670 5831 } 5671 else if(fabs(re-mTrit)<.01)5672 {5832 else if(fabs(re-mTrit)<.01) 5833 { 5673 5834 G4cout<<"...G4QE::FSI:E/M conservation is corrected by tritium"<<G4endl; 5674 5835 cor4M=G4LorentzVector(0.,0.,0.,mTrit); … … 5676 5837 theQHadrons.push_back(theH); // (delete equivalent for the proton) 5677 5838 } 5678 else if(fabs(re-mHe3)<.01)5679 {5839 else if(fabs(re-mHe3)<.01) 5840 { 5680 5841 G4cout<<"...G4QE::FSI:E/M conservation is corrected by He3"<<G4endl; 5681 5842 cor4M=G4LorentzVector(0.,0.,0.,mHe3); … … 5683 5844 theQHadrons.push_back(theH); // (delete equivalent for the proton) 5684 5845 } 5685 else if(fabs(re-mAlph)<.01)5686 {5846 else if(fabs(re-mAlph)<.01) 5847 { 5687 5848 G4cout<<"...G4QE::FSI:E/M conservation is corrected by alpha"<<G4endl; 5688 5849 cor4M=G4LorentzVector(0.,0.,0.,mAlph); … … 5690 5851 theQHadrons.push_back(theH); // (delete equivalent for the proton) 5691 5852 } 5692 else if(fabs(re-mNeut-mNeut)<.01)5693 {5853 else if(fabs(re-mNeut-mNeut)<.01) 5854 { 5694 5855 cor4M=G4LorentzVector(0.,0.,0.,mNeut+mNeut); 5695 5856 G4cout<<"...G4QE::FSI:E/M conservation is corrected by 2 neutrons"<<G4endl; … … 5699 5860 theQHadrons.push_back(theH2); // (delete equivalent for the proton) 5700 5861 } 5701 else if(fabs(re-mProt-mProt)<.01)5702 {5862 else if(fabs(re-mProt-mProt)<.01) 5863 { 5703 5864 G4cout<<"...G4QE::FSI:E/M conservation is corrected by 2 protons"<<G4endl; 5704 5865 cor4M=G4LorentzVector(0.,0.,0.,mProt+mProt); … … 5708 5869 theQHadrons.push_back(theH2); // (delete equivalent for the proton) 5709 5870 } 5710 else throw G4QException("***G4QEnv::FSInteract: Increase theCorrectionEps");5711 }5871 else throw G4QException("***G4QEnv::FSInteract: Increase theCorrectionEps"); 5872 } 5712 5873 else 5713 5874 { … … 5735 5896 G4double totRM=tot4Mom.m(); 5736 5897 if(cHM+pHM<=totRM) // *** Make the final correction *** 5737 {5898 { 5738 5899 if(!G4QHadron(tot4Mom).DecayIn2(pH4Mom,cH4Mom)) 5739 5900 { … … 5801 5962 G4cout<<"G4QE::FSI:===Before Gamma Compression===, nH="<<nHadr<<",frag="<<frag<<G4endl; 5802 5963 #endif 5803 if(nHadr>2 && frag) for(G4int h=nHadr-1; h>=0; h--)//Collect gammas & kill DecayedHadrs5964 if(nHadr>2 && frag) for(G4int h=nHadr-1; h>=0; h--)//Collect gammas & kill DecayedHadrs 5804 5965 { 5805 5966 G4QHadron* curHadr = theQHadrons[h]; // Get a pointer to the current Hadron … … 5809 5970 G4cout<<"---Warning---G4QEnv::FSI:nD-/pD++(1)="<<hPDG<<G4endl; 5810 5971 #ifdef pdebug 5811 G4cout<<"G4QE::FSI: h#"<<h<<", hPDG="<<hPDG<<", hNFrag="<<hF<<G4endl;5812 #endif 5813 if(hF||hPDG==22) // It should be compressed5814 {5972 G4cout<<"G4QE::FSI: h#"<<h<<", hPDG="<<hPDG<<", hNFrag="<<hF<<G4endl; 5973 #endif 5974 if(hF||hPDG==22) // It should be compressed 5975 { 5815 5976 G4QHadron* theLast = theQHadrons[theQHadrons.size()-1];//Get Ptr to the Last Hadron 5816 5977 if(hPDG==22) … … 5820 5981 } 5821 5982 if(h<static_cast<G4int>(theQHadrons.size())-1) // Need swap with the Last 5822 {5983 { 5823 5984 curHadr->SetNFragments(0); 5824 5985 curHadr->Set4Momentum(theLast->Get4Momentum()); … … 5827 5988 else curHadr->SetQC(theLast->GetQC());// CurHadrPDG instead of LastHadrPDG 5828 5989 #ifdef pdebug 5829 G4cout<<"G4QE::FSI: Exchange with the last is done"<<G4endl;5830 #endif 5831 }5990 G4cout<<"G4QE::FSI: Exchange with the last is done"<<G4endl; 5991 #endif 5992 } 5832 5993 theQHadrons.pop_back(); // theLastQHadron is excluded from QHadrons 5833 5994 delete theLast;//!!When kill,DON'T forget to delete theLastQHadron as an instance!! 5834 5995 nHadr--; 5835 5996 #ifdef pdebug 5836 G4cout<<"G4QE::FSI: The last is compessed"<<G4endl;5997 G4cout<<"G4QE::FSI: The last is compessed"<<G4endl; 5837 5998 #endif 5838 5999 } … … 5849 6010 ccContSum+=theQHadrons[ic4]->GetCharge(); 5850 6011 cbContSum+=theQHadrons[ic4]->GetBaryonNumber(); 5851 }6012 } 5852 6013 if(ccContSum-chContSum || cbContSum-bnContSum) 5853 6014 { … … 5872 6033 #endif 5873 6034 if(lB<hB) // Must be swapped 5874 {6035 { 5875 6036 G4QPDGCode hQPDG = curHadr->GetQPDG(); 5876 6037 G4LorentzVector h4m= curHadr->Get4Momentum(); … … 5881 6042 theLast->Set4Momentum(h4m); 5882 6043 theLast->SetQPDG(hQPDG); 5883 }6044 } 5884 6045 } 5885 6046 nHadr=theQHadrons.size(); … … 5922 6083 //G4double mGamEva=2700.; // @@Threshold for the evaporation 5923 6084 G4double mGamEva=1700.; // @@Threshold for the evaporation 5924 if(exResidN.SplitBaryon())5925 //if(2>3) //CloseTheFirstPriorityResN+gamSumEvaporation5926 {6085 if(exResidN.SplitBaryon()) 6086 //if(2>3) //CloseTheFirstPriorityResN+gamSumEvaporation 6087 { 5927 6088 theNew->Set4Momentum(exRes4M); // Icrease 4Mom of theLast by "sum" to Evapor 5928 6089 #ifdef ffdebug … … 5932 6093 } 5933 6094 else if(theNew->GetPDGCode()==90002002&&exRes4M.m()>mHe3+mNeut&&G4UniformRand()>.5) 5934 {6095 { 5935 6096 theNew->Set4Momentum(exRes4M); // Icrease 4Mom of theLast by "sum" to Evapor 5936 6097 G4LorentzVector n4M(0.,0.,0.,mNeut); … … 5950 6111 theQHadrons.push_back(theHe3); // (delete equivalent for the proton) 5951 6112 } 5952 else if(nHadr) // Get LastHadrBefResNuc, absorb gam & decay5953 //else if(2>3) // Close the pair absorbtion of gamma5954 {6113 else if(nHadr) // Get LastHadrBefResNuc, absorb gam & decay 6114 //else if(2>3) // Close the pair absorbtion of gamma 6115 { 5955 6116 if(nHadr>1)for(unsigned sh=0; sh<theQHadrons.size()-1; sh++)//Ord:MinE is TheLast 5956 6117 { … … 5970 6131 #endif 5971 6132 if(hM>mGamEva&&lT>hT) // Must be swapped as the current is smaller 5972 {6133 { 5973 6134 G4QPDGCode hQPDG = curHadr->GetQPDG(); 5974 6135 curHadr->Set4Momentum(l4M); … … 5978 6139 thePrev->Set4Momentum(h4M); 5979 6140 thePrev->SetQPDG(hQPDG); 5980 }6141 } 5981 6142 } 5982 6143 nHadr=theQHadrons.size(); … … 5996 6157 G4double dhM=dh4M.m(); // M of LH+PH+sum(gammas) for theDecay 5997 6158 if(theHad->GetPDGCode()==90001001&&dhM>n4M.m()+mProt+mNeut&&G4UniformRand()>.5) 5998 //if(2>3) // Close Possibility toSplitDeuteron6159 //if(2>3) // Close Possibility toSplitDeuteron 5999 6160 { 6000 6161 G4double nuM=n4M.m(); … … 6039 6200 EvaporateResidual(theNew); // Try to evaporate theResNuc (del.eq.) 6040 6201 } 6041 }6202 } 6042 6203 else 6043 {6204 { 6044 6205 theNew->Set4Momentum(exRes4M); // Icrease 4MomOfTheLast by "sum" for Evapor 6045 6206 #ifdef ffdebug … … 6049 6210 } 6050 6211 } 6051 else // Absorb gammas to theResidNucleus and evaporateIt6052 {6212 else // Absorb gammas to theResidNucleus and evaporateIt 6213 { 6053 6214 theNew->Set4Momentum(exRes4M);// Icrease 4Mom of the Last by the "sum" for Evap 6054 6215 EvaporateResidual(theNew); // Try to evaporate the Nucl.(@@DecDib)(delete eq.) … … 6058 6219 G4cout<<"G4QE::FSI:AfterEvaporation: nNew="<<nHN<<G4endl; 6059 6220 if(nHN>nHadr)for(unsigned idp=nHadr; idp<nHN; idp++) 6060 G4cout<<"G4QE::FSI: h#"<<idp<<", PDG="<<theQHadrons[idp]->GetPDGCode()<<G4endl;6221 G4cout<<"G4QE::FSI: h#"<<idp<<", PDG="<<theQHadrons[idp]->GetPDGCode()<<G4endl; 6061 6222 #endif 6062 6223 } … … 6108 6269 maxB=ipo; 6109 6270 } // the current biggest nuclear fragment 6110 }6271 } 6111 6272 } 6112 6273 #ifdef pdebug … … 6157 6318 #endif 6158 6319 if(hPDG==22) // Photon is foun on the "gp" position 6159 {6320 { 6160 6321 gamSum=gamSum+theCurr->Get4Momentum(); // Accumulate the 4Momenta of the photon 6161 6322 unsigned nLast=nHadr-1; // position of theLastHadron (gp<nHadr-1) 6162 6323 G4QHadron* theLast = theQHadrons[nLast]; // Pointer to the Last Hadron 6163 6324 while(nLast>gp && theLast->GetPDGCode()==22) // "TheLast is a photon too" LOOP 6164 {6325 { 6165 6326 gamSum=gamSum+theLast->Get4Momentum(); // Accumulate 4-momentum of theLastPhoton 6166 6327 theQHadrons.pop_back(); // Pnt to theLastHadr.is excluded from HV … … 6183 6344 #endif 6184 6345 } 6185 }6346 } 6186 6347 } 6187 6348 // @@ Now it is necessary to try to emit alpha or evaporate the residual nucleus 6188 6349 G4QHadron* theLast = theQHadrons[nHadr-1]; // Pointer to the Last Hadron 6189 6350 if(theLast->GetPDGCode()==22) 6190 {6351 { 6191 6352 gamSum=gamSum+theLast->Get4Momentum(); // Accumulate 4-momentum of the LastPhoton 6192 6353 theQHadrons.pop_back(); // Pnt to theLastHadr.is excluded from HV … … 6197 6358 #endif 6198 6359 theLast = theQHadrons[nHadr-1]; 6199 }6360 } 6200 6361 G4int nEx=nHadr-2; // position to be exchanged with theLast 6201 6362 while(theLast->GetBaryonNumber()<1 && nEx>=0)// theLastHadron must be a nucleus (A>0) 6202 {6363 { 6203 6364 G4QHadron* theEx=theQHadrons[nEx]; // A hadron to be exchanged with theLast 6204 6365 G4LorentzVector ex4Mom=theEx->Get4Momentum(); … … 6221 6382 G4double tRM=tR4M.m(); // TotMass of theResidualNucleus to decay 6222 6383 if(theLB>4) 6223 {6224 G4QContent lrQC=curHadr->GetQC()-G4QContent(6,6,0,0,0,0);6384 { 6385 G4QContent lrQC=curHadr->GetQC()-G4QContent(6,6,0,0,0,0); 6225 6386 G4QNucleus lrN(lrQC); 6226 6387 G4double lrM=lrN.GetMZNS(); 6227 6388 if(tRM>lrM+mAlph) 6228 {6389 { 6229 6390 G4LorentzVector lr4M(0.,0.,0.,lrM); 6230 6391 G4LorentzVector al4M(0.,0.,0.,mAlph); … … 6236 6397 G4cout<<"G4QE::FSI: After Evap (1) nH="<<theQHadrons.size()<<G4endl; 6237 6398 #endif 6238 }6399 } 6239 6400 else 6240 6401 { 6241 delete curHadr;6402 delete curHadr; 6242 6403 G4int APDG=lrN.GetPDG(); 6243 6404 #ifdef pdebug … … 6257 6418 G4cout<<"G4QE::FSI: After Evap (2) nH="<<theQHadrons.size()<<G4endl; 6258 6419 #endif 6259 }6420 } 6260 6421 } 6261 6422 else … … 6266 6427 G4cout<<"G4QE::FSI: After Evap (5) nH="<<theQHadrons.size()<<G4endl; 6267 6428 #endif 6268 }6429 } 6269 6430 } 6270 6431 //Now just fill the output theFravment vector (User is responsible to ClearAndDestroy it) … … 6342 6503 G4double sum=mNucl+mPion+mSi; 6343 6504 if(hPDG==90998003&&reM<sum) // Default -- values 6344 {6505 { 6345 6506 PDGsi=2112; 6346 6507 mSi=mNeut; … … 6350 6511 } 6351 6512 if(hPDG==91002998) // Change -- default values to +++ values 6352 {6513 { 6353 6514 mNucl=mProt; 6354 6515 PDGnu=2212; … … 6358 6519 sum=mNucl+mPion+mSi; 6359 6520 if(reM<sum) 6360 {6521 { 6361 6522 PDGsi=2212; 6362 6523 mSi=mProt; … … 6368 6529 G4LorentzVector k4M(0.,0.,0.,mSi); 6369 6530 if(fabs(reM-sum)<eps) 6370 {6531 { 6371 6532 //G4cout<<"G4QE::FSI:*TMP* PiDelta split PDG="<<hPDG<<G4endl;//To find out why? 6372 6533 n4M=r4M*(mNucl/sum); … … 6387 6548 G4QPDGCode lQP=theLast->GetQPDG(); // The QPDG of the last 6388 6549 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr 6389 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG6550 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG 6390 6551 curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution 6391 6552 } … … 6407 6568 G4int hpPDG=cpHadr->GetPDGCode(); 6408 6569 G4LorentzVector hpLV=cpHadr->Get4Momentum(); 6409 G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl;6570 G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl; 6410 6571 } 6411 6572 #endif … … 6415 6576 delete quasH; 6416 6577 fOK=false; 6417 }6578 } 6418 6579 else 6419 6580 { … … 6434 6595 curHadr->SetQPDG(G4QPDGCode(PDGnu));// At least one nucleun always exists 6435 6596 if(dub) 6436 {6597 { 6437 6598 p4M/=2.; 6438 6599 G4QHadron* Pid = new G4QHadron(PDGpi,p4M); // Create a Hadron for the pion … … 6449 6610 } 6450 6611 else if(hPDG==89998003||hPDG==90002998) // Isonucleus (pi- + DEL- or pi+ + DEL++) 6451 { // @@ can be converted here to B>16612 { // @@ can be converted here to B>1 6452 6613 //G4cout<<"G4QE::FSI:*TMP* PiDelta decay PDG="<<hPDG<<G4endl;//To find out why? 6453 6614 G4double mNucl=mNeut; … … 6455 6616 G4int PDGpi=-211; 6456 6617 if(hPDG==90002998) // Change DEL- default values to DEL++ values 6457 {6618 { 6458 6619 mNucl=mProt; 6459 6620 PDGnu=2212; … … 6468 6629 G4double sum=mNucl+mPi+mPi; 6469 6630 if(fabs(reM-sum)<eps) 6470 {6631 { 6471 6632 //G4cout<<"G4QE::FSI:*TMP* PiDelta split PDG="<<hPDG<<G4endl;//To find out why? 6472 6633 n4M=r4M*(mNucl/sum); … … 6487 6648 G4QPDGCode lQP=theLast->GetQPDG(); // The QPDG of the last 6488 6649 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr 6489 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG6650 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG 6490 6651 curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution 6491 6652 } … … 6506 6667 delete quasH; 6507 6668 fOK=false; 6508 }6669 } 6509 6670 else 6510 6671 { … … 6534 6695 } 6535 6696 else if(hBN>0 && !hST && (hCG<0||hCG>hBN)) // Isonucleus (n*N+k*DEL- or n*P+k*DEL++) 6536 {6697 { 6537 6698 G4double mNucl=mNeut; 6538 6699 G4int PDGnu=2112; … … 6540 6701 G4int nPi=-hCG; // Prototype of the minimum number of pions 6541 6702 if(hCG>0) // Change DEL- default values to DEL++ values 6542 {6703 { 6543 6704 mNucl=mProt; 6544 6705 PDGnu=2212; … … 6554 6715 G4double sum=nucM+pioM; 6555 6716 if(fabs(reM-sum)<eps) 6556 {6717 { 6557 6718 n4M=r4M*(nucM/sum); 6558 6719 k4M=r4M*(pioM/sum); … … 6575 6736 G4QPDGCode lQP=theLast->GetQPDG(); // The QPDG of the last 6576 6737 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr 6577 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG6738 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG 6578 6739 curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution 6579 6740 } … … 6596 6757 G4int hpPDG=cpHadr->GetPDGCode(); 6597 6758 G4LorentzVector hpLV=cpHadr->Get4Momentum(); 6598 G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl;6759 G4cout<<"G4QE::FSI:h#"<<hp<<": hPDG="<<hpPDG<<", h4M="<<hpLV<<G4endl; 6599 6760 } 6600 6761 #endif … … 6604 6765 delete quasH; // TemporaryQuasmon is used for recovery 6605 6766 fOK=false; 6606 }6767 } 6607 6768 else 6608 6769 { … … 6619 6780 G4cout<<"G4QE::FSI:IsoN==>"<<r4M<<"->N="<<PDGnu<<n4M<<"+Pi="<<PDGpi<<k4M<<G4endl; 6620 6781 #endif 6621 if(hBN>1) n4M/=hBN; // Calculate the 4mom per one nucleon6782 if(hBN>1) n4M/=hBN; // Calculate the 4mom per one nucleon 6622 6783 curHadr->Set4Momentum(n4M); 6623 6784 curHadr->SetQPDG(G4QPDGCode(PDGnu)); // At least one nucleun always exists … … 6666 6827 } 6667 6828 else if(hST<0 && hBN>0) // AntistrangeNucleus (@@ see above, already done) 6668 {6829 { 6669 6830 G4LorentzVector r4M=curHadr->Get4Momentum(); // Real 4-mom of theAntiStrangeNucleus 6670 6831 G4double reM=r4M.m(); // Real mass of the antiStrange nucleus … … 6686 6847 G4double sum=mR+mKaon; 6687 6848 if(sum>reM) // for GEANT4 (Can not decay in kaon and residual) 6688 {6849 { 6689 6850 if(kPDG==321) // *** Very seldom *** "K+->pi+ conversion" 6690 {6851 { 6691 6852 kPDG=211; 6692 6853 mKaon=mPi; 6693 }6854 } 6694 6855 else // *** Very seldom *** "K0(S=-1)->pi- conversion" 6695 {6856 { 6696 6857 kPDG=111; 6697 6858 mKaon=mPi0; 6698 }6859 } 6699 6860 sum=mR+mKaon; 6700 6861 } … … 6702 6863 G4LorentzVector k4M(0.,0.,0.,mKaon); 6703 6864 if(fabs(reM-sum)<eps) 6704 {6865 { 6705 6866 n4M=r4M*(mR/sum); 6706 6867 k4M=r4M*(mKaon/sum); … … 6719 6880 G4QPDGCode lQP=theLast->GetQPDG(); // The QPDG of the last 6720 6881 if(lQP.GetPDGCode()!=10) curHadr->SetQPDG(lQP); //CurHadr instead of PrevHadr 6721 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG6882 else curHadr->SetQC(theLast->GetQC()); // CurHadrPDG instead of LastHadrPDG 6722 6883 curHadr->Set4Momentum(theLast->Get4Momentum()); // ... 4Momentum substitution 6723 6884 } … … 6738 6899 delete quasH; 6739 6900 fOK=false; 6740 }6901 } 6741 6902 else 6742 6903 { … … 6757 6918 } 6758 6919 else if(hPDG>90500000&&hPDG!=91000000&&hPDG!=91000999&&hPDG!=90999001) // Only for G4 6759 // @@ Xi & Omega- can be added here ^^^, if show up below6760 {6920 // @@ Xi & Omega- can be added here ^^^, if show up below 6921 { 6761 6922 #ifdef pdebug 6762 6923 G4cout<<"***G4QEnvironment::FSI:*G4* Hypernucleus PDG="<<hPDG<<" must decay"<<G4endl; … … 6768 6929 G4int nSP=0; // A#0f unavoidable Sigma+ 6769 6930 if(nC<0) // Negative hypernucleus 6770 {6931 { 6771 6932 if(-nC<=nL) 6772 {6933 { 6773 6934 nSM=-nC; // Can be compensated by Sigma- 6774 6935 nL+=nC; // Reduce the residual strangeness 6775 6936 } 6776 6937 else 6777 {6938 { 6778 6939 nSM=nL; // The maximum number of Sigma- 6779 6940 nL=0; // Kill the residual strangeness … … 6781 6942 } 6782 6943 else if(nC>nB-nL) // Extra positive hypernucleus 6783 {6944 { 6784 6945 if(nC<=nB) 6785 {6946 { 6786 6947 G4int dH=nB-nC; 6787 6948 nSP=nL-dH; // Can be compensated by Sigma+ … … 6789 6950 } 6790 6951 else 6791 {6952 { 6792 6953 nSP=nL; // The maximum number of Sigma+ 6793 6954 nL=0; // Kill the residual strangeness … … 6803 6964 #endif 6804 6965 if(nSP||nSM) 6805 {6966 { 6806 6967 if(nL) 6807 6968 { … … 6813 6974 } 6814 6975 if(nSP) 6815 {6976 { 6816 6977 nL=nSP; 6817 6978 sPDG=3222; … … 6819 6980 } 6820 6981 else 6821 {6982 { 6822 6983 nL=nSM; 6823 6984 sPDG=3112; … … 6831 6992 G4double rlM=G4QNucleus(rlPDG).GetMZNS();// Mass of the new residualNonstrangeNucleus 6832 6993 if(!nSP&&!nSM&&nL==1&&reM>rlM+mSigZ&&G4UniformRand()>.5) // Sigma0 @@ AddToHadroniz.? 6833 {6994 { 6834 6995 sPDG=3212; 6835 6996 MLa=mSigZ; … … 6840 7001 // @@ Take into account that there can be Iso-Hypernucleus (Add PI+,R & Pi-,R decays) 6841 7002 if(rlPDG==90000000) // Multy Hyperon (HyperNuc of only hyperons) 6842 {7003 { 6843 7004 if(nL>1) r4M=r4M/nL; // split the 4-mom for the MultyLambda 6844 7005 for(G4int il=0; il<nL; il++) // loop over Lambdas … … 6848 7009 } 6849 7010 } 6850 else if(reM>rlM+MLa-eps) // Lambda(or Sigma) can be split6851 {7011 else if(reM>rlM+MLa-eps) // Lambda(or Sigma) can be split 7012 { 6852 7013 G4LorentzVector n4M(0.,0.,0.,rlM); 6853 7014 G4LorentzVector h4M(0.,0.,0.,MLa); 6854 7015 G4double sum=rlM+MLa; 6855 7016 if(fabs(reM-sum)<eps) 6856 {7017 { 6857 7018 n4M=r4M*(rlM/sum); 6858 7019 h4M=r4M*(MLa/sum); … … 6869 7030 curHadr->SetQPDG(G4QPDGCode(rlPDG)); // converted hypernucleus 6870 7031 if(rlPDG==90000002) // Additional action with curHadr change 6871 {7032 { 6872 7033 G4LorentzVector newLV=n4M/2.; 6873 7034 curHadr->Set4Momentum(newLV); … … 6877 7038 } 6878 7039 else if(rlPDG==90002000) // Additional action with curHadr change 6879 {7040 { 6880 7041 G4LorentzVector newLV=n4M/2.; 6881 7042 curHadr->Set4Momentum(newLV); … … 6895 7056 } 6896 7057 } 6897 else if(reM>rnM+mPi0-eps&&!nSP&&!nSM) // Lambda->N only if Sigmas are absent6898 {7058 else if(reM>rnM+mPi0-eps&&!nSP&&!nSM) // Lambda->N only if Sigmas are absent 7059 { 6899 7060 G4int nPi=static_cast<G4int>((reM-rnM)/mPi0); 6900 7061 if (nPi>nL) nPi=nL; … … 6904 7065 G4double sum=rnM+npiM; 6905 7066 if(fabs(reM-sum)<eps) 6906 {7067 { 6907 7068 n4M=r4M*(rnM/sum); 6908 7069 h4M=r4M*(npiM/sum); … … 6926 7087 } 6927 7088 if(rnPDG==90000002) // Additional action with curHadr change 6928 {7089 { 6929 7090 G4LorentzVector newLV=n4M/2.; 6930 7091 curHadr->Set4Momentum(newLV); … … 6935 7096 } 6936 7097 else if(rnPDG==90002000) // Additional action with curHadr change 6937 {7098 { 6938 7099 G4LorentzVector newLV=n4M/2.; 6939 7100 curHadr->Set4Momentum(newLV); … … 6945 7106 // @@ Add multybaryon decays if necessary 6946 7107 } 6947 else // If this Excepton shows up (lowProbable appearance) => include gamma decay 6948 { 7108 else if(reM>rnM-eps) // Decay in nonstange and gamma 7109 { 7110 G4LorentzVector n4M(0.,0.,0.,rnM); 7111 G4LorentzVector h4M(0.,0.,0.,0.); 7112 G4double sum=rnM; 7113 if(fabs(reM-sum)<eps) n4M=r4M; 7114 else if(reM<sum || !G4QHadron(r4M).DecayIn2(n4M,h4M)) 7115 { 7116 G4cerr<<"***G4QE::FSI:Hypern, M="<<reM<<"<A+n*Pi0="<<sum<<",d="<<sum-reM<<G4endl; 7117 throw G4QException("***G4QEnvironment::FSInter: Hypernuclear gamma decay error"); 7118 } 7119 curHadr->Set4Momentum(n4M); 7120 curHadr->SetQPDG(G4QPDGCode(rnPDG)); // converted hypernucleus 7121 #ifdef fdebug 7122 G4cout<<"*G4QE::FSI:HypNg "<<r4M<<"->A="<<rnPDG<<n4M<<",gamma="<<h4M<<G4endl; 7123 #endif 7124 G4QHadron* theGamma = new G4QHadron(22,h4M);// Make a New Hadr for the gamma 7125 theQHadrons.push_back(theGamma); // (del.eq.- user is responsible for del) 7126 if(rnPDG==90000002) // Additional action with curHadr change 7127 { 7128 G4LorentzVector newLV=n4M/2.; 7129 curHadr->Set4Momentum(newLV); 7130 curHadr->SetQPDG(G4QPDGCode(90000001)); 7131 G4QHadron* secHadr = new G4QHadron(curHadr); 7132 theQHadrons.push_back(secHadr); // (del.eq.- user is responsible for del) 7133 //theFragments->push_back(secHadr); // (del.eq.- user is responsible for del) 7134 } 7135 else if(rnPDG==90002000) // Additional action with curHadr change 7136 { 7137 G4LorentzVector newLV=n4M/2.; 7138 curHadr->Set4Momentum(newLV); 7139 curHadr->SetQPDG(G4QPDGCode(90001000)); 7140 G4QHadron* secHadr = new G4QHadron(curHadr); 7141 theQHadrons.push_back(secHadr); // (del.eq.- user is responsible for del) 7142 //theFragments->push_back(secHadr); // (del.eq.- user is responsible for del) 7143 } 7144 // @@ Add multybaryon decays if necessary 7145 } 7146 else // If this Error shows up (lowProbable appearance) => now it is left as is 7147 { 6949 7148 G4double d=rlM+MLa-reM; 6950 G4cerr<<"G4QE::FSI:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl;7149 G4cerr<<"G4QE::FSI:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl; 6951 7150 d=rnM+mPi0-reM; 6952 G4cerr<<"***G4QE::FSI: HypN="<<hPDG<<", M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl;6953 throw G4QException("G4QEnvironment::FSInteract: Hypernuclear conversion");7151 G4cerr<<"***G4QE::FSI: HypN="<<hPDG<<", M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl; 7152 //throw G4QException("G4QEnvironment::FSInteract: Hypernuclear conversion"); 6954 7153 } 6955 7154 } 6956 7155 //unsigned nHd=theQHadrons.size()-1; 6957 7156 //if(hd==nHd && !fOK) 6958 //{7157 //{ 6959 7158 // G4cout<<"---Warning---G4QE::FSI: The Last #"<<hd<<" hadron must be filled"<<G4endl; 6960 // fOK=true;7159 // fOK=true; 6961 7160 // curHadr = new G4QHadron(theQHadrons[hd]); 6962 7161 //} … … 6997 7196 curHadr->SetQPDG(G4QPDGCode(bPDG)); // Substitute Multibaryon by a baryon 6998 7197 for (G4int ib=1; ib<brn; ib++) 6999 {7198 { 7000 7199 G4QHadron* bH = new G4QHadron(bPDG, sp4m); 7001 7200 theFragments->push_back(bH); //(del eq. - user is responsible for deleting) … … 7163 7362 { 7164 7363 if(!theLC) // Neutron like: n+gam, n+Pi0, p+Pi- are possible 7165 {7364 { 7166 7365 if(qM<mNPi0) // Only n+gamma decay is possible 7167 {7366 { 7168 7367 if(fabs(qM-mNeut)<eps) 7169 {7368 { 7170 7369 #ifdef pdebug 7171 7370 G4cout<<"G4QEnv::DecayBaryon: Fill Neutron AsIs"<<G4endl; … … 7180 7379 } 7181 7380 else if(qM>mPPi) // Both n+pi0 (p=2/3) & p+Pi- (p=1/3) are possible 7182 {7381 { 7183 7382 if(G4UniformRand()>.333333333) // Clebsh value for the Isobar decay 7184 7383 { … … 7192 7391 } 7193 7392 } 7194 else // Only n+Pi0 decay is possible7393 else // Only n+Pi0 decay is possible 7195 7394 { 7196 7395 fQPDG=nQPDG; // Baryon is neutron … … 7199 7398 } 7200 7399 else if(theLC==1) // Proton like: p+gam, p+Pi0, n+Pi+ are possible 7201 {7400 { 7202 7401 if(qM<mPPi0) // Only p+gamma decay is possible 7203 {7402 { 7204 7403 if(fabs(qM-mProt)<eps) 7205 {7404 { 7206 7405 #ifdef pdebug 7207 7406 G4cout<<"G4QEnv::DecayBaryon: Fill Proton AsIs"<<G4endl; … … 7214 7413 } 7215 7414 else if(qM>mNPi) // Both p+pi0 (p=2/3) & n+Pi+ (p=1/3) are possible 7216 {7415 { 7217 7416 if(G4UniformRand()<.333333333) // Clebsh value for the Isobar decay 7218 7417 { … … 7227 7426 } 7228 7427 else if(theLC==2) // Delta++ like: only p+PiP is possible 7229 {7428 { 7230 7429 if(qM>mPPi) // Only p+gamma decay is possible 7231 {7430 { 7232 7431 sQPDG=pipQPDG; // Meson is Pi+ (baryon is proton) 7233 7432 sMass=mPi; 7234 7433 } 7235 7434 else // @@ Can be aReason to search for anError in Fragmentation 7236 {7435 { 7237 7436 #ifdef pdebug 7238 7437 G4cout<<"-Warning-G4QE::DecBary:*AsIs* DEL++ M="<<qM<<"<"<<mPPi<<G4endl; … … 7243 7442 } 7244 7443 else if(theLC==-1) // Delta- like: only n+PiM is possible 7245 {7444 { 7246 7445 if(qM+eps>mNPi) // Only p+gamma decay is possible 7247 {7446 { 7248 7447 fQPDG=nQPDG; // Baryon is neutron 7249 7448 fMass=mNeut; … … 7252 7451 } 7253 7452 else // @@ Can be aReason to search for anError in Fragmentation 7254 {7453 { 7255 7454 #ifdef pdebug 7256 7455 G4cout<<"-Warning-G4QE::DecBary:*AsIs* DEL++ M="<<qM<<"<"<<mNPi<<G4endl; … … 7272 7471 { 7273 7472 if(!theLC) // -->> Lambda/Sz: L+g,L+Pi0,Sz+Pi0,Sm+Pip,Sp+Pim,p+Km,n+Kz 7274 {7473 { 7275 7474 if(qM<mLPi0) // Only Lambda+gamma decay is possible 7276 {7475 { 7277 7476 if(fabs(qM-mLamb)<eps) 7278 {7477 { 7279 7478 #ifdef pdebug 7280 7479 G4cout<<"G4QEnv::DecayBaryon: Fill Lambda AsIs"<<G4endl; … … 7289 7488 } 7290 7489 else if(qM<mSzPi0) // Only Lambda+Pi0 is possible 7291 {7490 { 7292 7491 fQPDG=lQPDG; // Baryon is Lambda 7293 7492 fMass=mLamb; 7294 7493 } 7295 7494 else if(qM<mSpPi) // Both Lambda+Pi0 & Sigma0+Pi0 are possible 7296 {7495 { 7297 7496 if(G4UniformRand()>.6) // @@ Relative probability (take into account Phase Space) 7298 7497 { … … 7307 7506 } 7308 7507 else if(qM<mSmPi) // Lambda+Pi0, Sigma0+Pi0, & SigmaP+PiM are possible 7309 {7508 { 7310 7509 G4double ra=G4UniformRand(); 7311 7510 if(ra<.4) // @@ Rel. probab. (take into account Phase Space) … … 7328 7527 } 7329 7528 else if(qM<mPK) // Lambda+Pi0, Sig0+Pi0, SigP+PiM, SigM+PiP are possible 7330 {7529 { 7331 7530 G4double ra=G4UniformRand(); 7332 7531 if(ra<.35) // @@ Rel. probab. (take into account Phase Space) … … 7356 7555 } 7357 7556 else if(qM<mNKZ) // Lambda+Pi0, Sig0+Pi0, SigP+PiM, SigM+PiP are possible 7358 {7557 { 7359 7558 G4double ra=G4UniformRand(); 7360 7559 if(ra<.3) // @@ Rel. probab. (take into account Phase Space) … … 7390 7589 } 7391 7590 } 7392 else // Only n+Pi0 decay is possible7591 else // Only n+Pi0 decay is possible 7393 7592 { 7394 7593 G4double ra=G4UniformRand(); … … 7434 7633 } 7435 7634 else if(theLC==1) // SigmaP: SigP+gam,SigP+Pi0,Sp+PiP,L+Pi0,p+K0 are possible 7436 {7635 { 7437 7636 if(qM<mLPi) // Only SigmaPlus+gamma decay is possible 7438 {7637 { 7439 7638 if(fabs(qM-mSigP)<eps) 7440 {7639 { 7441 7640 #ifdef pdebug 7442 7641 G4cout<<"G4QEnv::DecayBaryon: Fill SigmaPlus AsIs"<<G4endl; … … 7451 7650 } 7452 7651 else if(qM<mSpPi0) // Only Lambda+PiP is possible 7453 {7652 { 7454 7653 fQPDG=lQPDG; // Baryon is Lambda 7455 7654 fMass=mLamb; … … 7458 7657 } 7459 7658 else if(qM<mSzPi) // Both Lambda+PiP & Sigma0+Pi0 are possible 7460 {7659 { 7461 7660 if(G4UniformRand()<.6) // @@ Relative probability (take into account Phase Space) 7462 7661 { … … 7473 7672 } 7474 7673 else if(qM<mPKZ) // Lambda+PiP, SigmaP+Pi0, & Sigma0+PiP are possible 7475 {7674 { 7476 7675 G4double ra=G4UniformRand(); 7477 7676 if(ra<.4) // @@ Rel. probab. (take into account Phase Space) … … 7496 7695 } 7497 7696 else // Lambda+PiP, SigmaP+Pi0, Sigma0+PiP, p+K0 are possible 7498 {7697 { 7499 7698 G4double ra=G4UniformRand(); 7500 7699 if(ra<.35) // @@ Rel. probab. (take into account Phase Space) … … 7527 7726 } 7528 7727 else if(theLC==-1) // SigmaM: SigM+gam,SigM+Pi0,S0+PiM,L+Pi-,n+KM are possible 7529 {7728 { 7530 7729 if(qM<mLPi) // Only SigmaMinus + gamma decay is possible 7531 {7730 { 7532 7731 if(fabs(qM-mSigM)<eps) 7533 {7732 { 7534 7733 #ifdef pdebug 7535 7734 G4cout<<"G4QEnv::DecayBaryon: Fill SigmaMinus AsIs"<<G4endl; … … 7544 7743 } 7545 7744 else if(qM<mSzPi) // Only Lambda+PiM is possible 7546 {7745 { 7547 7746 fQPDG=lQPDG; // Baryon is Lambda 7548 7747 fMass=mLamb; … … 7551 7750 } 7552 7751 else if(qM<mSzPi) // Both Lambda+PiM & Sigma0+PiM are possible 7553 {7752 { 7554 7753 if(G4UniformRand()<.6) // @@ Relative probability (take into account Phase Space) 7555 7754 { … … 7568 7767 } 7569 7768 else if(qM<mPKZ) // Lambda+PiM, Sigma0+PiM, & SigmaM+Pi0 are possible 7570 {7769 { 7571 7770 G4double ra=G4UniformRand(); 7572 7771 if(ra<.4) // @@ Rel. probab. (take into account Phase Space) … … 7591 7790 } 7592 7791 else // Lambda+PiM, Sig0+PiM, SigM+Pi0, n+KM are possible 7593 {7792 { 7594 7793 G4double ra=G4UniformRand(); 7595 7794 if(ra<.35) // @@ Rel. probab. (take into account Phase Space) … … 7634 7833 { 7635 7834 #ifdef pdebug 7636 G4cout<<"---Warning---G4QE::DecBary:*AsIso* UnknBaryon(AntiS)QC="<<qH->GetQC()<<G4endl;7835 G4cout<<"---Warning---G4QE::DecBary:*AsIso*UnknBaryon(AntiS),QC="<<qH->GetQC()<<G4endl; 7637 7836 #endif 7638 7837 theQHadrons.push_back(qH); // Fill AsIs (delete equivalent) … … 7643 7842 G4double sum=fMass+sMass; 7644 7843 if(fabs(qM-sum)<eps) 7645 {7844 { 7646 7845 f4Mom=q4M*(fMass/sum); 7647 7846 s4Mom=q4M*(sMass/sum); … … 7656 7855 { 7657 7856 G4Quasmon* quasH = new G4Quasmon(qH->GetQC(),qH->Get4Momentum()); 7658 if(!CheckGroundState(quasH,true)) theQHadrons.push_back(qH); // Cor or fill asItIs7857 if(!CheckGroundState(quasH,true)) theQHadrons.push_back(qH); // Cor or fill asItIs 7659 7858 else delete qH; 7660 7859 delete quasH; … … 7679 7878 theQHadrons.push_back(H2); // Fill "H2" (delete equivalent) 7680 7879 } // End of DecayBaryon 7880 7881 //Decay of the Antistrange Nucleus in nucleus & K+/antiK0 (at present only S=-1) 7882 void G4QEnvironment::DecayAntistrange(G4QHadron* qH) 7883 {// =============================================== 7884 static const G4QPDGCode kpQPDG(321); // QPDG for Antistrange positive kaon 7885 static const G4QPDGCode kzQPDG(311); // QPDG for Antistrange neutral anti-kaon 7886 static const G4double mK =G4QPDGCode(321).GetMass(); // Mass of antistrange positive Kaon 7887 static const G4double mK0=G4QPDGCode(311).GetMass(); // Mass of antistrange neutral aK0 7888 static const G4double eps=0.003; 7889 //static const G4QNucleus vacuum(90000000); 7890 G4int theLS= qH->GetStrangeness(); // Strangness of the Nucleus 7891 if(theLS>=0) 7892 { 7893 G4cerr<<"***G4QEnvironment::DecayAntistrange: S="<<theLS<<", but must be <0"<<G4endl; 7894 //#ifdef ppdebug 7895 throw G4QException("G4QEnv::DecayAntistrange: Not Antistrange nucleus"); 7896 //#endif 7897 //theQHadrons.push_back(qH); // Fill AsIs (delete equivalent) 7898 return; 7899 } 7900 else if(theLS<-1) 7901 { 7902 G4cout<<"*Warning*G4QEnvironment::DecayAntistrange: S="<<theLS<<",AsIsImprove"<<G4endl; 7903 theQHadrons.push_back(qH); // Fill AsIs (delete equivalent) 7904 return; 7905 } 7906 G4int theLB= qH->GetBaryonNumber(); // Baryon number of the Nucleus 7907 G4int theLC= qH->GetCharge(); // Chsrge of the Nucleus 7908 G4int qPDG = qH->GetPDGCode(); // PDG Code of the decaying Nucleus 7909 G4int K0PDG= qPDG+999999; // Residual nonStrange nucleus for antiK0 7910 G4QPDGCode K0QPDG(K0PDG); // QPDG of the nuclear residual for antiK0 7911 G4double rK0M=K0QPDG.GetMass(); // Mass of the nuclear residual for antiK0 7912 G4int KpPDG= qPDG+999000; // Residual nonStrange nucleus for K+ 7913 G4QPDGCode KpQPDG(KpPDG); // QPDG of the nuclear residual for K+ 7914 G4double rKpM=KpQPDG.GetMass(); // Mass of the nuclear residual for K+ 7915 G4LorentzVector q4M = qH->Get4Momentum(); // Get 4-momentum of the Nucleus 7916 G4double qM = q4M.m(); // Mass of the Nucleus 7917 #ifdef pdebug 7918 G4cout<<"G4QE::DecayAntistrang:S="<<theLS<<",C="<<theLC<<",B="<<theLB<<",M="<<qM<<G4endl; 7919 #endif 7920 // Select a chanel of the decay 7921 G4QPDGCode fQPDG = kzQPDG; // Prototype for Kaon (anti-K0) 7922 G4double fMass= mK0; 7923 G4QPDGCode sQPDG = K0QPDG; // Prototype for residual nucleus to Kaon 7924 G4double sMass= rK0M; 7925 if(mK0+rK0M>qM) // Can not be K0 7926 { 7927 if(mK+rKpM>qM) // Can not be K+ too 7928 { 7929 G4cout<<"*Warning*G4QEnvironment::DecayAntistrange: Too low mass, keep AsIs"<<G4endl; 7930 theQHadrons.push_back(qH); // Fill AsIs (delete equivalent) 7931 return; 7932 } 7933 else // Switch to K+ 7934 { 7935 fQPDG = kpQPDG; // Positive Kaon 7936 fMass= mK; 7937 sQPDG = KpQPDG; // Residual nucleus to K+ 7938 sMass= rKpM; 7939 } 7940 } 7941 else if(mK+rKpM<qM && theLC>theLB-theLC) // Switch to K+ if Z>N 7942 { 7943 fQPDG = kpQPDG; // Positive Kaon 7944 fMass= mK; 7945 sQPDG = KpQPDG; // Residual nucleus to K+ 7946 sMass= rKpM; 7947 } 7948 G4LorentzVector f4Mom(0.,0.,0.,fMass); 7949 G4LorentzVector s4Mom(0.,0.,0.,sMass); 7950 G4double sum=fMass+sMass; 7951 if(fabs(qM-sum)<eps) 7952 { 7953 f4Mom=q4M*(fMass/sum); 7954 s4Mom=q4M*(sMass/sum); 7955 } 7956 else if(qM<sum || !G4QHadron(q4M).DecayIn2(f4Mom, s4Mom)) 7957 { 7958 #ifdef pdebug 7959 G4cout<<"--Warning--G4QE::DecAntistrange: fPDG="<<fQPDG<<"(M="<<fMass<<")+sPDG="<<sQPDG 7960 <<"(M="<<sMass<<") > TotM="<<q4M.m()<<G4endl; 7961 #endif 7962 G4cerr<<"***G4QEnv::DecayAntistrange: M="<<qM<<", sum="<<sum<<G4endl; 7963 throw G4QException("G4QEnv::DecayAntistrange: Nucleus DecayIn2 error"); 7964 } 7965 #ifdef pdebug 7966 G4cout<<"G4QEnv::DecayAntistrange: *Done* f4M="<<f4Mom<<",fPDG="<<fQPDG<<", s4M="<<s4Mom 7967 <<",sPDG="<<sQPDG<<G4endl; 7968 #endif 7969 delete qH; 7970 // 7971 G4QHadron* H1 = new G4QHadron(fQPDG,f4Mom); // Create a Hadron for the 1-st baryon 7972 theQHadrons.push_back(H1); // Fill "H1" (delete equivalent) 7973 G4QHadron* H2 = new G4QHadron(sQPDG,s4Mom); // Create a Hadron for the 2-nd baryon 7974 theQHadrons.push_back(H2); // Fill "H2" (delete equivalent) 7975 } // End of DecayAntistrange 7681 7976 7682 7977 // Check that it's possible to decay the TotalResidualNucleus in Quasmon+Environ & correct … … 7714 8009 7715 8010 if ( resB > 1 && 7716 ( (!resS && ((resC == resB && reTM > resC*mProt) || (!resC && reTM > resB*mNeut) ) ) || 7717 (resS == resB && reTM > resS*mLamb) ) ) // Immediate Split(@@Decay) MultiBaryon 8011 ( ( !resS && 8012 ( (resC == resB && reTM > resC*mProt) || (!resC && reTM > resB*mNeut) ) 8013 ) || 8014 (resS == resB && reTM > resS*mLamb) 8015 ) 8016 ) // Immediate Split(@@Decay) MultiBaryon 7718 8017 { 7719 8018 #ifdef chdebug … … 7728 8027 reTLV=G4LorentzVector(0.,0.,0.,resQMa); // GSM of the Quasmon 7729 8028 if(G4QHadron(toLV).DecayIn2(reTLV,enva4M)) 7730 {8029 { 7731 8030 #ifdef pdebug 7732 8031 G4cout<<"G4QE::CGS: fill EnvPDG="<<envPDG<<",4M="<<enva4M<<" and continue"<<G4endl; … … 7756 8055 resEMa=theEnvironment.GetMZNS(); // GSMass of the Residual Environment 7757 8056 #ifdef cdebug 7758 G4cout<<"G4QE::CGS:EnvironmentExists,gsM="<<resEMa<<",4M="<<enva4M<<enva4M.m()<<G4endl;8057 G4cout<<"G4QE::CGS:EnvironmentExists,gsM="<<resEMa<<",4M="<<enva4M<<enva4M.m()<<G4endl; 7759 8058 #endif 7760 8059 reTQC+=theEnvironment.GetQCZNS(); // Quark content of the Residual Nucleus … … 7768 8067 G4int baryn=valQ.GetBaryonNumber(); // Baryon Number of the Residual vacQuasmon 7769 8068 if(baryn>1) // => "Can split baryon?" 7770 {8069 { 7771 8070 if(valQ.GetN()) // ===> "Can split neutron?" 7772 {8071 { 7773 8072 G4QContent resQC=valQ-neutQC; // QC of Residual for the Neutron 7774 8073 G4int resPDG=resQC.GetSPDGCode(); // PDG of Residual for the Neutron … … 7776 8075 G4double resMas=G4QPDGCode(resPDG).GetMass(); // GS Mass of the Residual 7777 8076 if(resMas+mNeut<resQM) bsCond=true; 7778 }8077 } 7779 8078 else if(valQ.GetP()) // ===> "Can split proton?" 7780 {8079 { 7781 8080 G4QContent resQC=valQ-protQC; // QC of Residual for the Proton 7782 8081 G4int resPDG=resQC.GetSPDGCode(); // PDG of Residual for the Proton … … 7784 8083 G4double resMas=G4QPDGCode(resPDG).GetMass(); // GS Mass of the Residual 7785 8084 if(resMas+mProt<resQM) bsCond=true; 7786 }8085 } 7787 8086 else if(valQ.GetL()) // ===> "Can split Lambda?" 7788 {8087 { 7789 8088 G4QContent resQC=valQ-lambQC; // QC of Residual for the Lambda 7790 8089 G4int resPDG=resQC.GetSPDGCode(); // PDG of Residual for the Lambda … … 7792 8091 G4double resMas=G4QPDGCode(resPDG).GetMass(); // GS Mass of the Residual 7793 8092 if(resMas+mLamb<resQM) bsCond=true; 7794 }7795 }8093 } 8094 } 7796 8095 } 7797 8096 G4double resTMa=reTLV.m(); // CM Mass of the ResidualNucleus (Q+Env) … … 7805 8104 <<" then the correction must be done for PDG="<<reTPDG<<G4endl; 7806 8105 #endif 7807 if ( (resTMa < resSMa || (!resEMa && !bsCond) ) && nOfOUT > 0 && corFlag) // *** CORRECTION ***8106 if ( (resTMa < resSMa || (!resEMa && !bsCond) ) && nOfOUT > 0 && corFlag)//**CORRECTION** 7808 8107 { 7809 8108 G4QHadron* theLast = theQHadrons[nOfOUT-1]; … … 7811 8110 G4int crPDG=theLast->GetPDGCode(); 7812 8111 #ifdef cdebug 7813 G4cout<<"G4QE::CGS: **Correction** lNF="<<cNf<<",lPDG="<<crPDG<<",Q4M="<<reTLV<<G4endl;8112 G4cout<<"G4QE::CGS: **Correction** lNF="<<cNf<<",lPDG="<<crPDG<<",Q4M="<<reTLV<<G4endl; 7814 8113 #endif 7815 8114 G4LorentzVector hadr4M = theLast->Get4Momentum(); … … 7817 8116 G4LorentzVector tmpTLV=reTLV+hadr4M; // Tot (ResidNucl+LastHadron) 4-Mom 7818 8117 #ifdef cdebug 7819 G4cout<<"G4QE::CGS:YES, s4M/M="<<tmpTLV<<tmpTLV.m()<<">rSM+hM="<<resSMa+hadrMa<<G4endl;8118 G4cout<<"G4QE::CGS:YES, s4M/M="<<tmpTLV<<tmpTLV.m()<<">rSM+hM="<<resSMa+hadrMa<<G4endl; 7820 8119 #endif 7821 8120 G4double tmpTM=tmpTLV.m(); … … 7848 8147 // Kill environment as it is already included in the decay 7849 8148 theEnvironment=G4QNucleus(G4QContent(0,0,0,0,0,0), G4LorentzVector(0.,0.,0.,0.)); 7850 }8149 } 7851 8150 else 7852 8151 { … … 7856 8155 return false; 7857 8156 } 7858 }8157 } 7859 8158 else // => "Environ is vacuum" case (DecayIn2) 7860 8159 { … … 7873 8172 #endif 7874 8173 EvaporateResidual(quasH); // Try to evaporate residual (del.eq.) 7875 }8174 } 7876 8175 else 7877 8176 { … … 7882 8181 return false; 7883 8182 } 7884 }8183 } 7885 8184 } 7886 8185 else // *** Try Last+Previous CORRECTION *** 7887 8186 { 7888 8187 #ifdef cdebug 7889 G4cout<<"G4QEnv::CheckGS: the Last did not help, nH="<<nOfOUT<<G4endl;8188 G4cout<<"G4QEnv::CheckGS: the Last did not help, nH="<<nOfOUT<<G4endl; 7890 8189 #endif 7891 8190 if(nOfOUT>1) // Cor with Last&Previous can be tryed 7892 {8191 { 7893 8192 G4QHadron* thePrev = theQHadrons[nOfOUT-2]; // Get pointer to Prev before Last 7894 8193 if(thePrev->GetNFragments()||thePrev->GetNFragments()) return false;// Dec H/g … … 7900 8199 G4double tQMa=G4QPDGCode(totPDG).GetMass(); // GS Mass of the Residual Nucleus 7901 8200 #ifdef cdebug 7902 G4cout<<"G4QE::CGS:T3="<<tmpTLV<<tmpTLV.m()<<">t+h+p="<<tQMa+hadrMa+prevMa<<G4endl;8201 G4cout<<"G4QE::CGS:T3="<<tmpTLV<<tmpTLV.m()<<">t+h+p="<<tQMa+hadrMa+prevMa<<G4endl; 7903 8202 #endif 7904 8203 if(tmpTLV.m()>tQMa+hadrMa+prevMa) … … 7918 8217 nucH->Set4Momentum(nuc4M); 7919 8218 #ifdef cdebug 7920 G4cout<<"G4QE::CGS:*SUCCESS**>CHECK, D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl;8219 G4cout<<"G4QE::CGS:*SUCCESS**>CHECK, D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl; 7921 8220 #endif 7922 8221 #ifdef pdebug … … 7924 8223 #endif 7925 8224 EvaporateResidual(nucH); // Try to evaporate residual (del.eq.) 7926 }7927 }8225 } 8226 } 7928 8227 else // ===> Try to use any hadron from the output 7929 8228 { 7930 8229 #ifdef cdebug 7931 G4cout<<"G4QE::CGS:Prev&Last didn't help,nH="<<nOfOUT<<">2, MQ="<<resQMa<<G4endl;7932 #endif 7933 G4int nphot=-1; // #of photons8230 G4cout<<"G4QE::CGS:Prev&Last didn't help,nH="<<nOfOUT<<">2, MQ="<<resQMa<<G4endl; 8231 #endif 8232 G4int nphot=-1; // #of photons 7934 8233 G4int npip=-1; // #of Pi+ 7935 8234 G4int npiz=-1; // #of Pi0 … … 7937 8236 G4double emaz=0.; // The maximum energy for pi0 (to sel high E) 7938 8237 for(G4int id=nOfOUT-1; id>=0; id--) // Search for photons and pi+, and pi- 7939 {8238 { 7940 8239 G4QHadron* curHadr = theQHadrons[id]; 7941 8240 G4int hPDG=curHadr->GetPDGCode(); … … 7944 8243 else if(hPDG==111) 7945 8244 { 7946 G4double piE=curHadr->Get4Momentum().e();8245 G4double piE=curHadr->Get4Momentum().e(); 7947 8246 #ifdef chdebug 7948 8247 G4cout<<"G4QE::CheckGroundState:"<<id<<",Epi0="<<piE<<">"<<emaz<<G4endl; … … 7957 8256 } 7958 8257 if(nphot>=0) // Photon is found, try to use it to resolve PANIC 7959 {8258 { 7960 8259 G4QHadron* curHadr = theQHadrons[nphot]; // Pointer to the photon 7961 8260 G4LorentzVector ch4M=curHadr->Get4Momentum(); // 4-Mom of the Photon … … 7963 8262 G4double ttM=tt4M.m(); // Mass of the Phot+ResidQm compaund system 7964 8263 if(resQMa<ttM) // PANIC can be resolved with this Photon 7965 {8264 { 7966 8265 G4LorentzVector quas4M = G4LorentzVector(0.,0.,0.,resSMa);//GSMass of Quasm 7967 8266 G4QHadron* rqH = new G4QHadron(reTQC,quas4M); // Prototype of outputResidQ … … 7987 8286 G4LorentzVector(0.,0.,0.,0.)); 7988 8287 return true; 7989 }8288 } 7990 8289 } // End of the KINEMATIC CHECK FOR THE PHOTON if 7991 8290 } // End of nphot IF … … 7997 8296 if (envPDG == 90000000 && !resS && resB > 1 && 7998 8297 ((npip >= 0 && resC == -2) || (npim >= 0 && resC-resB == 2)) ) 7999 {8298 { 8000 8299 G4int npi=npip; // (Delta-)+(Delta-)+k*n+(pi+)->(k+2)*n+(pi-) 8001 8300 G4int piPD=-211; … … 8023 8322 #endif 8024 8323 if(suM<ttM) // PANIC can be resolved with this Pion 8025 {8324 { 8026 8325 G4LorentzVector fn4M = G4LorentzVector(0.,0.,0.,suB);//First nucleon(s) 8027 8326 G4LorentzVector sn4M = G4LorentzVector(0.,0.,0.,nuM);//Second nucleon … … 8057 8356 #endif 8058 8357 return true; 8059 }8358 } 8060 8359 } // End of the KINEMATIC CHECK FOR THE PI+/PI- if 8061 8360 } // End of npip/pin Isonucleus IF 8062 8361 if(envPDG==90000000&&!resS&&resB>1&&npiz>=0&&(resC<-1||resC-resB>1)) 8063 {8362 { 8064 8363 #ifdef chdebug 8065 8364 G4cout<<"***G4QE::CGS:Pi0, rPDG="<<resQPDG<<",rC="<<resC<<",rB="<<resB<<G4endl; … … 8089 8388 #endif 8090 8389 if(sum<ttM) // PANIC can be resolved with this Pi0 8091 {8390 { 8092 8391 G4LorentzVector fn4M = G4LorentzVector(0.,0.,0.,suB); // Nucleon(s) 8093 8392 G4LorentzVector pi4M = G4LorentzVector(0.,0.,0.,suM); // Pion(s) … … 8115 8414 } 8116 8415 #ifdef chdebug 8117 G4cout<<"G4QE::CGS: nucl="<<nuPD<<fn4M<<resB<<", pion="<<pi4M<<npi<<G4endl;8416 G4cout<<"G4QE::CGS: nucl="<<nuPD<<fn4M<<resB<<", pion="<<pi4M<<npi<<G4endl; 8118 8417 #endif 8119 8418 8120 8419 return true; 8121 }8420 } 8122 8421 #ifdef chdebug 8123 8422 else G4cout<<"***G4QEnv::CheckGS:DecayIn3:*Pi0* tM="<<ttM<<","<<sum<<G4endl; 8124 8423 #endif 8125 8424 } // End of the KINEMATIC CHECK FOR THE PI0 if 8126 } // End of npiz Isonucleus IF8425 } // End of npiz Isonucleus IF 8127 8426 #ifdef cdebug 8128 G4cout<<"G4QE::CGS: Photons can't help nP="<<nphot<<". TryChangeCharge."<<G4endl;8427 G4cout<<"G4QE::CGS: Photons can't help nP="<<nphot<<". TryChangeCharge."<<G4endl; 8129 8428 #endif 8130 8429 // > Photons did not help, try to find an appropriate partner to join and decay … … 8139 8438 if((!nnPDG||nnPDG==10)&&nnQC.GetBaryonNumber()>0) nnPDG=nnQC.GetZNSPDGCode(); 8140 8439 #ifdef cdebug 8141 G4cout<<"G4QE::CGS: nnPDR="<<nnPDG<<". TryChangeCharge nOUT="<<nOfOUT<<",Iso="8440 G4cout<<"G4QE::CGS: nnPDR="<<nnPDG<<". TryChangeCharge nOUT="<<nOfOUT<<",Iso=" 8142 8441 <<isoN<<",Nor="<<norN<<",C="<<reTCH<<",B="<<reTBN<<G4endl; 8143 8442 #endif 8144 8443 if(isoN) // Calculations for the Isonuclear Residual 8145 {8444 { 8146 8445 if(reTCH<0) // "at least one Delta-" isostate (chngPort) 8147 8446 { … … 8150 8449 nnPDG=nnQC.GetSPDGCode(); // Change PDGCode of theResidNormalNucleus 8151 8450 if(nnPDG==10&&nnQC.GetBaryonNumber()>0) nnPDG=nnQC.GetZNSPDGCode(); 8152 }8451 } 8153 8452 G4QPDGCode nnQPDG(nnPDG); // Now can even have Q-code ! 8154 8453 if(nnPDG<80000000) nnM=nnQPDG.GetMass(); // Mass for the Fundamental Hadron … … 8161 8460 if(force) chx2g=false; 8162 8461 for(G4int hd=nOfOUT-1; hd>=0; hd--)// Try to use any hadron to resolve PANIC 8163 {8462 { 8164 8463 G4QHadron* curHadr = theQHadrons[hd]; 8165 8464 G4int chNF=curHadr->GetNFragments(); … … 8169 8468 G4LorentzVector ch4M=curHadr->Get4Momentum(); // 4Mom of the Current Hadron 8170 8469 #ifdef cdebug 8171 G4cout<<"G4QE::CGS:#"<<hd<<",ch="<<chCH<<",b="<<chBN<<",4M="<<ch4M<<G4endl;8470 G4cout<<"G4QE::CGS:#"<<hd<<",ch="<<chCH<<",b="<<chBN<<",4M="<<ch4M<<G4endl; 8172 8471 #endif 8173 8472 if(!chNF) … … 8177 8476 G4double ttM=tt4M.m(); // TotalMass of CurHadr+Residual compaund 8178 8477 if(isoN) // "1 Delta Isonucleus" case 8179 {8478 { 8180 8479 if(nnM+mPi+chM<ttM) // PANIC can be resolved with thisCurHadron 8181 {8480 { 8182 8481 #ifdef cdebug 8183 8482 G4cout<<"G4QE::CGS:CurH+ResQ+Pion t="<<tt4M<<ttM<<",cM="<<chM<<",rM=" … … 8209 8508 ,G4LorentzVector(0.,0.,0.,0.)); 8210 8509 return true; 8211 }8510 } 8212 8511 #ifdef cdebug 8213 else G4cout<<"***G4QE::CGS:DecIn3 CurH+ResQ+Pion dM="<<ttM-chM<<G4endl;8512 else G4cout<<"***G4QE::CGS:DecIn3 CurH+ResQ+Pion dM="<<ttM-chM<<G4endl; 8214 8513 #endif 8215 8514 } 8216 if ( (reTCH < 0 && chCH > 0) || (reTCH > reTBN && chCH < chBN) ) // Isoexchange can help8217 {8515 if ( (reTCH < 0 && chCH > 0) || (reTCH > reTBN && chCH < chBN) ) //IsoEx? 8516 { 8218 8517 G4QContent chQC=curHadr->GetQC(); // QuarkCont of the CurrentHadron 8219 8518 if(reTCH<0)chQC+=pimQC; // Add the negativPion QC to CurHadr … … 8247 8546 { 8248 8547 if(chCH+reTCH-chQC.GetCharge()-nnQC.GetCharge()) 8249 G4cout<<"**G4QE::CGS:ChEx CH+2G i="<<reTCH<<"+h="<<chCH<<", f="8548 G4cout<<"**G4QE::CGS:ChEx CH+2G i="<<reTCH<<"+h="<<chCH<<", f=" 8250 8549 <<nnQC.GetCharge()<<"+o="<<chQC.GetCharge()<<G4endl; 8251 8550 curHadr->Set4Momentum(ch4M);// Change 4M of the Current Hadron … … 8268 8567 G4QNucleus(G4QContent(0,0,0,0,0,0),G4LorentzVector(0.,0.,0.,0.)); 8269 8568 return true; 8270 }8569 } 8271 8570 } // End of "the Normal decay without 2 gammas" 8272 8571 else // Normal decay (without "Pi0"->2 gammas) … … 8282 8581 { 8283 8582 if(chCH+reTCH-chQC.GetCharge()-nnQC.GetCharge()) 8284 G4cout<<"**G4QE::CGS:ChEx CH+RQ i="<<reTCH<<"+h="<<chCH<<", f="8583 G4cout<<"**G4QE::CGS:ChEx CH+RQ i="<<reTCH<<"+h="<<chCH<<", f=" 8285 8584 <<nnQC.GetCharge()<<"+o="<<chQC.GetCharge()<<G4endl; 8286 8585 curHadr->Set4Momentum(ch4M);// Change 4M of the Current Hadron … … 8297 8596 G4QNucleus(G4QContent(0,0,0,0,0,0),G4LorentzVector(0.,0.,0.,0.)); 8298 8597 return true; 8299 }8598 } 8300 8599 } // End of "the Normal decay without 2 gammas" 8301 8600 } 8302 8601 else 8303 {8602 { 8304 8603 #ifdef cdebug 8305 8604 G4cout<<"**G4QE::CGS:rM+hB="<<nnM+chM<<">"<<ttM<<",B="<<chBN<<G4endl; … … 8314 8613 G4int tcC=tcQC.GetCharge(); // Total Charge 8315 8614 G4int tcBN=tcQC.GetBaryonNumber(); // Total Baryon Number 8316 if ( tcBN == 2 || (!tcS && !tcC) || tcS == tcBN || tcC == tcBN ) //dec DiBar or MulBar 8615 //Try to decay in DiBaryon or MultyBaryon 8616 if ( tcBN == 2 || (!tcS && !tcC) || tcS == tcBN || tcC == tcBN ) 8317 8617 { 8318 8618 if(tcBN==2) theEnvironment.DecayDibaryon(tcH,&theQHadrons); // DB … … 8327 8627 } 8328 8628 else if(tcM<ttM)// @@ Can't evaporate here, can only radiate gamma 8329 {8629 { 8330 8630 G4LorentzVector tc4M=G4LorentzVector(0.,0.,0.,tcM);//4M of TotCom 8331 8631 G4LorentzVector gc4M=G4LorentzVector(0.,0.,0.,0.); //4M of gamma … … 8351 8651 #endif 8352 8652 EvaporateResidual(tcH); // Try to evaporate(d.e.) 8353 }8653 } 8354 8654 } 8355 else // @@ Fill the TotalCompound instead of the CurrentHadron @@8356 {8655 else // @@ Fill the TotalCompound instead of the CurrentHadron @@ 8656 { 8357 8657 #ifdef cdebug 8358 8658 G4cout<<"G4QE::CGS:**CEF,M="<<tcM<<">"<<ttM<<",B="<<chBN<<G4endl; … … 8368 8668 } // End of the IF: KINEMATIC CHECK FOR THE CURRENT HADRON(Isonuclear Case) 8369 8669 else if(norN) 8370 {8670 { 8371 8671 if(resSMa+chM<ttM) // PANIC can be resolved with this CurHadron 8372 {8672 { 8373 8673 G4LorentzVector quas4M = G4LorentzVector(0.,0.,0.,resSMa);// GSMass ofQ 8374 8674 G4QHadron* rqH = new G4QHadron(reTQC,quas4M);// Prototype OutputResidQ … … 8395 8695 ,G4LorentzVector(0.,0.,0.,0.)); 8396 8696 return true; 8397 }8697 } 8398 8698 } // End of the KINEMATIC CHECK FOR THE CURRENT HADRON if (NormNuclCase) 8399 8699 } // End of IsoNucleus/NormalNucleus choice 8400 8700 } // End of the NumberOfFragments=0 (NOT DECAYED PARTICLE) if 8401 } // End of the LOOP over hadrons and all attempts to resolve PANIC8701 } // End of the LOOP over hadrons and all attempts to resolve PANIC 8402 8702 #ifdef cdebug 8403 8703 G4cout<<"G4QEnv::CheckGS:***Any hadron from the OUTPUT did not help"<<G4endl; … … 8410 8710 if(npiz>-1) hind=npiz; 8411 8711 else 8412 {8712 { 8413 8713 if(resC+resC>resB && npim>-1) hind=npim; 8414 8714 else hind=npip; 8415 8715 } 8416 8716 if(hind>-1) 8417 {8717 { 8418 8718 G4QHadron* curHadr = theQHadrons[hind]; 8419 8719 G4int chNF=curHadr->GetNFragments(); … … 8446 8746 if(!G4QHadron(tt4M).DecayIn3(quas4M,fgam4M,sgam4M))G4cout<<"*3*"<<G4endl; 8447 8747 else 8448 {8748 { 8449 8749 curHadr->Set4Momentum(fgam4M); // Change 4M of the Pion to Gamma 8450 8750 curHadr->SetQPDG(gamQPDG); // Change QPDG of the Pion to Gamma … … 8462 8762 return false; 8463 8763 } // End of the KINEMATIC LIMIT FOR THE L&P CORRECTION if/else (try any hadron) 8464 } // End of the POSSIBILITY OF PREV+LAST (OR MORE) CORRECTION if8764 } // End of the POSSIBILITY OF PREV+LAST (OR MORE) CORRECTION if 8465 8765 else return false; 8466 8766 } // End of the CORRECTION WITH THE LAST if/else … … 8484 8784 { 8485 8785 #ifdef pdebug 8486 G4cout<<"G4QEnv::Copy&DeleteHV:#"<<ih<<", hPDG="<<inH->GetPDGCode()<<G4endl;8786 G4cout<<"G4QEnv::Copy&DeleteHV:#"<<ih<<", hPDG="<<inH->GetPDGCode()<<G4endl; 8487 8787 #endif 8488 8788 G4QHadron* curH = new G4QHadron(inH); // will be deleted with allQHadronVector … … 8517 8817 resSMa+=resEMa; // Minimal Split Mass of Residual Nucleus 8518 8818 G4double resTMa=reTLV.m(); // CM Mass of theResidNucleus (Quasm+Env) 8519 //#ifdef pdebug8819 //#ifdef pdebug 8520 8820 G4cout<<"G4QEnv::DecayInEnvQ: totM="<<reTLV<<resTMa<<" > rQM+rEM="<<resSMa<<G4endl; 8521 //#endif8821 //#endif 8522 8822 if(resTMa>resSMa) 8523 8823 { … … 8538 8838 envaH->Set4Momentum(enva4M); 8539 8839 EvaporateResidual(envaH); // Try to evaporate residual (del. equiv.) 8540 }8840 } 8541 8841 } 8542 8842 else return false; … … 8554 8854 tot4Mom +=Q->Get4Momentum(); 8555 8855 #ifdef debug 8556 G4cout<<"G4QEnv::AddQuasmon:t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl;8856 G4cout<<"G4QEnv::AddQuasmon:t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl; 8557 8857 #endif 8558 8858 } … … 8574 8874 if(quad>0.875) return G4ThreeVector(-x/r,-y/r,-z/r); 8575 8875 else return G4ThreeVector(-x/r,-y/r, z/r); 8576 }8876 } 8577 8877 else 8578 8878 { 8579 8879 if(quad>0.625) return G4ThreeVector(-x/r, y/r,-z/r); 8580 8880 else return G4ThreeVector(-x/r, y/r, z/r); 8581 }8881 } 8582 8882 } 8583 8883 else … … 8587 8887 if(quad>0.375) return G4ThreeVector( x/r,-y/r,-z/r); 8588 8888 else return G4ThreeVector( x/r,-y/r, z/r); 8589 }8889 } 8590 8890 else if(quad>0.125) return G4ThreeVector( x/r, y/r,-z/r); 8591 8891 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QException.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QException.cc,v 1. 9 2006/06/29 20:06:59 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QException.cc,v 1.10 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QException ---------------- 31 31 // by Mikhail Kossov, November 2003. 32 32 // class for an Exception used by the CHIPS Model 33 // ------------------------------------------------------------ 33 // ------------------------------------------------------------- 34 // Short description: Just an internal CHIPS Exception Messenger 35 // ------------------------------------------------------------- 34 36 35 37 #include "G4QException.hh" -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QFragmentation.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QFragmentation.cc,v 1. 3 2007/05/02 14:59:55 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QFragmentation.cc,v 1.5 2009/04/29 07:53:18 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 39 39 // G4ExcitedStringDecay 40 40 // ----------------------------------------------------------------------------- 41 // 41 // Short description: CHIPS string fragmentation class 42 // ----------------------------------------------------------------------------- 42 43 43 44 //#define debug … … 60 61 G4double G4QFragmentation::widthOfPtSquare=-0.72*GeV*GeV; // pt -width2 forStringExcitation 61 62 G4double G4QFragmentation::minExtraMass=250.*MeV;// minimum excitation mass 62 G4double G4QFragmentation::minmass=250.*MeV; // mean pion transverse mass for Xmin63 G4double G4QFragmentation::minmass=250.*MeV; // mean pion transverse mass for Xmin 63 64 64 65 G4QFragmentation::G4QFragmentation() : theNucleus(0) 65 66 { 66 67 // Construct Shortlived particles (needed after the 2006 Particles revolution) 67 G4ShortLivedConstructor ShortLived;68 ShortLived.ConstructParticle();68 G4ShortLivedConstructor ShortLived; 69 ShortLived.ConstructParticle(); 69 70 } 70 71 … … 88 89 while(!strings) 89 90 { 90 if (attempts++ > maxAttempts )91 {92 G4cerr<<"***G4QFragmentation::Scatter: "<<attempts<<" to create a string ( > max="91 if (attempts++ > maxAttempts ) 92 { 93 G4cerr<<"***G4QFragmentation::Scatter: "<<attempts<<" to create a string ( > max=" 93 94 <<maxAttempts<<") --> try to increase maxAttempts"<<G4endl; 94 95 G4Exception("G4QFragmentation::Scatter:","72",FatalException,"StringCreation"); 95 }96 InitModel(aNucleus,thePrimary);97 strings = GetStrings();96 } 97 InitModel(aNucleus,thePrimary); 98 strings = GetStrings(); 98 99 } 99 100 … … 119 120 void G4QFragmentation::InitModel(const G4QNucleus& aNucleus,const G4QHadron& aProjectile) 120 121 { 121 static const G4double mProt = G4Proton::Proton()->GetPDGMass(); // Mass of proton122 static const G4double mProt = G4Proton::Proton()->GetPDGMass(); // Mass of proton 122 123 Init(aNucleus.GetN(),aNucleus.GetZ()); 123 124 theCurrentVelocity.setX(0); … … 133 134 //e_per_projectile += proj4M.vect()*proj4M.vect(); 134 135 //e_per_projectile /=nCons*nCons; 135 //e_per_projectile = std::sqrt(e_per_projectile);136 //e_per_projectile += G4Proton::Proton()->GetPDGMass();//@@Add mass of TargetProtonAtRest136 //e_per_projectile = std::sqrt(e_per_projectile); 137 //e_per_projectile += G4Proton::Proton()->GetPDGMass();//@@Add mass of TargetProtonAtRest 137 138 G4double vz = pz_per_projectile/e_per_projectile; 138 139 #ifdef debug 139 G4cout<<"G4QFragmentation::Init: Projectile4M="<<proj4M<<", vz="<<vz<<G4endl;140 G4cout<<"G4QFragmentation::Init: Projectile4M="<<proj4M<<", vz="<<vz<<G4endl; 140 141 #endif 141 142 theCurrentVelocity.setZ(vz); … … 278 279 G4QHadron* aTarget = new G4QHadron(*pNucleon); 279 280 //G4QFragmentation_NPart ++; // ? M.K. 280 theTargets.push_back(aTarget);281 pNucleon=aTarget;281 theTargets.push_back(aTarget); 282 pNucleon=aTarget; 282 283 if((theProbability.GetDiffractiveProbability(s,Distance2)/Probability > 283 284 G4UniformRand() && (ModelMode==SOFT)) || ModelMode==DIFFRACTIVE) 284 {285 // diffractive interaction occurs286 if(IsSingleDiffractive()) ExciteSingDiffParticipants(aProjectile, aTarget);287 else ExciteDiffParticipants(aProjectile, aTarget);285 { 286 // diffractive interaction occurs 287 if(IsSingleDiffractive()) ExciteSingDiffParticipants(aProjectile, aTarget); 288 else ExciteDiffParticipants(aProjectile, aTarget); 288 289 G4QInteraction* aInteraction = new G4QInteraction(aProjectile); 289 290 aInteraction->SetTarget(aTarget); 290 291 theInteractions.push_back(aInteraction); 291 aInteraction->SetNumberOfDiffractiveCollisions(1);292 aInteraction->SetNumberOfDiffractiveCollisions(1); 292 293 totalCuts += 1; 293 }294 else295 {296 // nondiffractive soft interaction occurs297 // sample nCut+1 (cut Pomerons) pairs of strings can be produced294 } 295 else 296 { 297 // nondiffractive soft interaction occurs 298 // sample nCut+1 (cut Pomerons) pairs of strings can be produced 298 299 G4int nCut; 299 300 G4double* running = new G4double[nCutMax]; … … 301 302 for(nCut = 0; nCut < nCutMax; nCut++) 302 303 { 303 running[nCut] = theProbability.GetCutPomeronProbability(s, Distance2, nCut+1);304 running[nCut] = theProbability.GetCutPomeronProbability(s, Distance2, nCut+1); 304 305 if(nCut!=0) running[nCut] += running[nCut-1]; 305 306 } 306 G4double random = running[nCutMax-1]*G4UniformRand();307 G4double random = running[nCutMax-1]*G4UniformRand(); 307 308 for(nCut = 0; nCut < nCutMax; nCut++) {if(running[nCut] > random) break;} 308 309 delete [] running; … … 416 417 else 417 418 { 418 //generatedHadrons = new G4QHadronVector;419 //generatedHadrons->push_back((*theStrings)[astring]->GetAsQHadron()); //@@ NotImplem419 //generatedHadrons = new G4QHadronVector; 420 //generatedHadrons->push_back((*theStrings)[astring]->GetAsQHadron()); //@@ NotImplem 420 421 } 421 if (!generatedHadrons)422 {423 G4cerr<<"G4QFragmentation::FragmentStrings: No Hadrons produced" << G4endl;424 continue;425 }422 if (!generatedHadrons) 423 { 424 G4cerr<<"G4QFragmentation::FragmentStrings: No Hadrons produced" << G4endl; 425 continue; 426 } 426 427 G4LorentzVector KTsum1(0.,0.,0.,0.); 427 428 for(unsigned aTrack=0; aTrack<generatedHadrons->size(); aTrack++) 428 {429 theResult->push_back((*generatedHadrons)[aTrack]);430 KTsum1+= (*generatedHadrons)[aTrack]->Get4Momentum();431 }432 433 if(std::abs((KTsum1.e()-(*theStrings)[astring]->Get4Momentum().e())/KTsum1.e())429 { 430 theResult->push_back((*generatedHadrons)[aTrack]); 431 KTsum1+= (*generatedHadrons)[aTrack]->Get4Momentum(); 432 } 433 434 if(std::abs((KTsum1.e()-(*theStrings)[astring]->Get4Momentum().e())/KTsum1.e()) 434 435 > perMillion) NeedEnergyCorrector=true; 435 436 // clean up 436 delete generatedHadrons;437 delete generatedHadrons; 437 438 } 438 439 #ifdef debug … … 472 473 G4cerr<<"***G4QFragmentation::EnergyAndMomentumCorrector: SumMass="<<SumMass<<G4endl; 473 474 G4Exception("G4QFragmentation::EnergyAndMomentumCor:","72",FatalException,"NANMass"); 474 }475 } 475 476 } 476 477 // Cannot correct a single particle … … 508 509 break; 509 510 } 510 #ifdef debug 511 #ifdef debug 511 512 G4cout<<"G4QFragmentation::EnergyAndMomentumCorrector: Scale-1="<<Scale-1<<", TotM=" 512 513 <<TotalCollisionMass<<", Sum="<<Sum<<G4endl; 513 #endif 514 } 514 #endif 515 } 516 #ifdef debug 515 517 if(!success) 516 518 { 517 519 G4cout<<"***G4QFragmentation::EnergyAndMomentumCorrector: Scale #1 at end of loop M=" 518 520 <<TotalCollisionMass<<", S"<<Sum<<", Sc="<<Scale 519 <<" Increase number of attempts or increase ERRLIMIT"<<G4endl; 520 G4Exception("G4QFragmentation::SelectInteractions:","72",FatalException,"NotCorrect"); 521 } 521 <<" Increase number of attempts or increase the ErrLimit parameter"<<G4endl; 522 //G4Exception("G4QFragmentation::EnergyAndMomCor:","72",FatalException,"NoCorrection"); 523 } 524 #endif 522 525 // Compute c.m.s. interaction velocity and KTV back boost 523 526 Beta = TotalCollisionMom.boostVector(); … … 531 534 G4QHadron* target) const 532 535 { 533 G4LorentzVector Pprojectile=projectile->Get4Momentum();534 G4double Mprojectile=projectile->GetMass() + minExtraMass;535 G4double Mprojectile2=Mprojectile*Mprojectile;536 G4LorentzVector Pprojectile=projectile->Get4Momentum(); 537 G4double Mprojectile=projectile->GetMass() + minExtraMass; 538 G4double Mprojectile2=Mprojectile*Mprojectile; 536 539 G4LorentzVector Ptarget=target->Get4Momentum(); 537 540 G4double Mtarget=target->GetMass() + minExtraMass; 538 541 G4double Mtarget2=Mtarget*Mtarget; 539 542 #ifdef debug 540 G4cout<<"G4QFragm::ExciteDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl;543 G4cout<<"G4QFragm::ExciteDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl; 541 544 #endif 542 545 // Transform momenta to cms and then rotate parallel to z axis; 543 G4LorentzVector Psum=Pprojectile+Ptarget;544 G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS545 G4LorentzVector Ptmp=toCms*Pprojectile;546 if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K.547 {548 #ifdef debug 549 G4cout<<"G4QFragmentation::ExciteDiffParticipants: *1* abort Collision!! *1*"<<G4endl;550 #endif 551 return false;552 }553 toCms.rotateZ(-Ptmp.phi());554 toCms.rotateY(-Ptmp.theta());546 G4LorentzVector Psum=Pprojectile+Ptarget; 547 G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS 548 G4LorentzVector Ptmp=toCms*Pprojectile; 549 if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K. 550 { 551 #ifdef debug 552 G4cout<<"G4QFragmentation::ExciteDiffParticipants: *1* abort Collision!! *1*"<<G4endl; 553 #endif 554 return false; 555 } 556 toCms.rotateZ(-Ptmp.phi()); 557 toCms.rotateY(-Ptmp.theta()); 555 558 #ifdef debug 556 559 G4cout<<"G4QFragment::ExciteDiffParticipantts: Be4Boost Pproj="<<Pprojectile<<", Ptarg=" 557 560 <<Ptarget<<G4endl; 558 561 #endif 559 G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS)560 Pprojectile.transform(toCms);561 Ptarget.transform(toCms);562 #ifdef debug 563 G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg="562 G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS) 563 Pprojectile.transform(toCms); 564 Ptarget.transform(toCms); 565 #ifdef debug 566 G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg=" 564 567 <<Ptarget<<", cms4M="<<Pprojectile+Ptarget<<G4endl; 565 G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-="568 G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-=" 566 569 <<Pprojectile.minus()<<", TargX+="<< Ptarget.plus()<<", TargX-="<<Ptarget.minus() 567 570 <<G4endl; 568 571 #endif 569 G4LorentzVector Qmomentum(0.,0.,0.,0.);570 G4int whilecount=0;571 do572 { 573 // Generate pt 574 G4double maxPtSquare=sqr(Ptarget.pz());575 if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits576 #ifdef debug 577 G4cout<<"G4QFragmentation::ExciteDiffParticipantts: can loop, loopCount="<<whilecount572 G4LorentzVector Qmomentum(0.,0.,0.,0.); 573 G4int whilecount=0; 574 do 575 { 576 // Generate pt 577 G4double maxPtSquare=sqr(Ptarget.pz()); 578 if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits 579 #ifdef debug 580 G4cout<<"G4QFragmentation::ExciteDiffParticipantts: can loop, loopCount="<<whilecount 578 581 <<", maxPtSquare="<<maxPtSquare<<G4endl; 579 582 #endif … … 583 586 G4cout<<"G4QFragmentation::ExciteDiffParticipants: *2* abort Loop!! *2*"<<G4endl; 584 587 #endif 585 return false;// Ignore this interaction586 } 587 Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);588 return false; // Ignore this interaction 589 } 590 Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0); 588 591 #ifdef debug 589 592 G4cout<<"G4QFragment::ExciteDiffParticipants: generated Pt="<<Qmomentum<<", ProjPt=" … … 591 594 #endif 592 595 // Momentum transfer 593 G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e());594 G4double Xmax=1.;595 G4double Xplus =ChooseX(Xmin,Xmax);596 G4double Xminus=ChooseX(Xmin,Xmax);597 #ifdef debug 598 G4cout<<"G4QFragment::ExciteDiffParticip: X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl;599 #endif 600 G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();601 G4double Qplus =-pt2/Xminus/Ptarget.minus();602 G4double Qminus= pt2/Xplus /Pprojectile.plus();603 Qmomentum.setPz((Qplus-Qminus)/2);604 Qmomentum.setE( (Qplus+Qminus)/2);605 #ifdef debug 606 G4cout<<"G4QFragment::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2="596 G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e()); 597 G4double Xmax=1.; 598 G4double Xplus =ChooseX(Xmin,Xmax); 599 G4double Xminus=ChooseX(Xmin,Xmax); 600 #ifdef debug 601 G4cout<<"G4QFragment::ExciteDiffParticip: X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl; 602 #endif 603 G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 604 G4double Qplus =-pt2/Xminus/Ptarget.minus(); 605 G4double Qminus= pt2/Xplus /Pprojectile.plus(); 606 Qmomentum.setPz((Qplus-Qminus)/2); 607 Qmomentum.setE( (Qplus+Qminus)/2); 608 #ifdef debug 609 G4cout<<"G4QFragment::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2=" 607 610 <<pt2<<", Qmomentum="<<Qmomentum<<", ProjM="<<(Pprojectile+Qmomentum).mag() 608 611 <<", TargM="<<(Ptarget-Qmomentum).mag()<<G4endl; 609 612 #endif 610 } while((Pprojectile+Qmomentum).mag2()<=Mprojectile2 ||613 } while((Pprojectile+Qmomentum).mag2()<=Mprojectile2 || 611 614 (Ptarget-Qmomentum).mag2()<=Mtarget2); 612 Pprojectile += Qmomentum;613 Ptarget -= Qmomentum;614 #ifdef debug 615 G4cout<<"G4QFragment::ExciteDiffParticipan: Proj(Q)="<<Pprojectile<<", Targ(Q)="<<Ptarget616 <<", Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl;615 Pprojectile += Qmomentum; 616 Ptarget -= Qmomentum; 617 #ifdef debug 618 G4cout<<"G4QFragment::ExciteDiffParticipan: Proj(Q)="<<Pprojectile<<", Targ(Q)="<<Ptarget 619 <<", Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl; 617 620 #endif 618 621 // Transform back and update SplitableHadron Participant. 619 Pprojectile.transform(toLab);620 Ptarget.transform(toLab);621 #ifdef debug 622 G4cout<< "G4QFragmentation::ExciteDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl;623 #endif 624 target->Set4Momentum(Ptarget); 625 #ifdef debug 626 G4cout<<"G4QFragment::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl;627 #endif 628 projectile->Set4Momentum(Pprojectile);629 return true;622 Pprojectile.transform(toLab); 623 Ptarget.transform(toLab); 624 #ifdef debug 625 G4cout<< "G4QFragmentation::ExciteDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl; 626 #endif 627 target->Set4Momentum(Ptarget); 628 #ifdef debug 629 G4cout<<"G4QFragment::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl; 630 #endif 631 projectile->Set4Momentum(Pprojectile); 632 return true; 630 633 } // End of ExciteDiffParticipants 631 634 … … 635 638 G4QHadron* target) const 636 639 { 637 G4LorentzVector Pprojectile=projectile->Get4Momentum();638 G4double Mprojectile=projectile->GetMass() + minExtraMass;639 G4double Mprojectile2=Mprojectile*Mprojectile;640 G4LorentzVector Pprojectile=projectile->Get4Momentum(); 641 G4double Mprojectile=projectile->GetMass() + minExtraMass; 642 G4double Mprojectile2=Mprojectile*Mprojectile; 640 643 G4LorentzVector Ptarget=target->Get4Momentum(); 641 644 G4double Mtarget=target->GetMass() + minExtraMass; 642 645 G4double Mtarget2=Mtarget*Mtarget; 643 646 #ifdef debug 644 G4cout<<"G4QFragm::ExSingDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl;645 #endif 646 G4bool KeepProjectile= G4UniformRand() > 0.5;647 G4cout<<"G4QFragm::ExSingDiffPartici:Ep="<<Pprojectile.e()<<",Et="<<Ptarget.e()<<G4endl; 648 #endif 649 G4bool KeepProjectile= G4UniformRand() > 0.5; 647 650 // Reset minMass of the non diffractive particle to its value, (minus for rounding...) 648 if(KeepProjectile )649 {651 if(KeepProjectile ) 652 { 650 653 #ifdef debug 651 654 G4cout<<"--1/2--G4QFragmentation::ExSingDiffParticipants: Projectile is fixed"<<G4endl; 652 655 #endif 653 Mprojectile2 = projectile->GetMass2()*(1.-perCent); // Isn't it too big reduction? M.K.654 }656 Mprojectile2 = projectile->GetMass2()*(1.-perCent); // Isn't it too big reduction? M.K. 657 } 655 658 else 656 659 { … … 658 661 G4cout<<"---1/2---G4QFragmentation::ExSingDiffParticipants: Target is fixed"<<G4endl; 659 662 #endif 660 Mtarget2 = target->GetMass2()*(1.-perCent); // @@ Isn't it too big reduction? M.K.661 }663 Mtarget2 = target->GetMass2()*(1.-perCent); // @@ Isn't it too big reduction? M.K. 664 } 662 665 // @@ From this point it repeats the Diffractional excitation (? Use flag ?) 663 666 // Transform momenta to cms and then rotate parallel to z axis; 664 G4LorentzVector Psum=Pprojectile+Ptarget;665 G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS666 G4LorentzVector Ptmp=toCms*Pprojectile;667 if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K.668 {669 #ifdef debug 670 G4cout<<"G4QFragment::ExciteSingDiffParticipants: *1* abort Collision!! *1*"<<G4endl;671 #endif 672 return false;673 }674 toCms.rotateZ(-Ptmp.phi());675 toCms.rotateY(-Ptmp.theta());667 G4LorentzVector Psum=Pprojectile+Ptarget; 668 G4LorentzRotation toCms(-Psum.boostVector()); // Boost Rotation to CMS 669 G4LorentzVector Ptmp=toCms*Pprojectile; 670 if(Ptmp.pz()<=0.) // "String" moving backwards in CMS, abort collision !! ? M.K. 671 { 672 #ifdef debug 673 G4cout<<"G4QFragment::ExciteSingDiffParticipants: *1* abort Collision!! *1*"<<G4endl; 674 #endif 675 return false; 676 } 677 toCms.rotateZ(-Ptmp.phi()); 678 toCms.rotateY(-Ptmp.theta()); 676 679 #ifdef debug 677 680 G4cout<<"G4QFragm::ExciteSingDiffParticipantts: Be4Boost Pproj="<<Pprojectile<<",Ptarg=" 678 681 <<Ptarget<<G4endl; 679 682 #endif 680 G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS)681 Pprojectile.transform(toCms);682 Ptarget.transform(toCms);683 #ifdef debug 684 G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg="683 G4LorentzRotation toLab(toCms.inverse()); // Boost Rotation to LabSys (LS) 684 Pprojectile.transform(toCms); 685 Ptarget.transform(toCms); 686 #ifdef debug 687 G4cout<< "G4QFragment::ExciteDiffParticipantts: AfterBoost Pproj="<<Pprojectile<<"Ptarg=" 685 688 <<Ptarget<<", cms4M="<<Pprojectile+Ptarget<<G4endl; 686 689 687 G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-="690 G4cout<<"G4QFragment::ExciteDiffParticipantts: ProjX+="<<Pprojectile.plus()<<", ProjX-=" 688 691 <<Pprojectile.minus()<<", TargX+="<< Ptarget.plus()<<", TargX-="<<Ptarget.minus() 689 692 <<G4endl; 690 693 #endif 691 G4LorentzVector Qmomentum(0.,0.,0.,0.);692 G4int whilecount=0;693 do694 { 695 // Generate pt 696 G4double maxPtSquare=sqr(Ptarget.pz());697 if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits698 #ifdef debug 699 G4cout<<"G4QFragment::ExciteSingDiffParticipantts: can loop, loopCount="<<whilecount694 G4LorentzVector Qmomentum(0.,0.,0.,0.); 695 G4int whilecount=0; 696 do 697 { 698 // Generate pt 699 G4double maxPtSquare=sqr(Ptarget.pz()); 700 if(whilecount++>=500 && whilecount%100==0) // @@ M.K. Hardwired limits 701 #ifdef debug 702 G4cout<<"G4QFragment::ExciteSingDiffParticipantts: can loop, loopCount="<<whilecount 700 703 <<", maxPtSquare="<<maxPtSquare<<G4endl; 701 704 #endif … … 705 708 G4cout<<"G4QFragmentation::ExciteSingDiffParticipants: *2* abort Loop!! *2*"<<G4endl; 706 709 #endif 707 return false;// Ignore this interaction708 } 709 Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);710 return false; // Ignore this interaction 711 } 712 Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0); 710 713 #ifdef debug 711 714 G4cout<<"G4QFragm::ExciteSingDiffParticipants: generated Pt="<<Qmomentum<<", ProjPt=" … … 713 716 #endif 714 717 // Momentum transfer 715 G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e());716 G4double Xmax=1.;717 G4double Xplus =ChooseX(Xmin,Xmax);718 G4double Xminus=ChooseX(Xmin,Xmax);719 #ifdef debug 720 G4cout<<"G4QFragm::ExciteSingDiffPartici:X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl;721 #endif 722 G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();723 G4double Qplus =-pt2/Xminus/Ptarget.minus();724 G4double Qminus= pt2/Xplus /Pprojectile.plus();725 if (KeepProjectile)726 Qminus=(projectile->GetMass2()+pt2)/(Pprojectile.plus()+Qplus) - Pprojectile.minus();727 else Qplus=Ptarget.plus() - (target->GetMass2()+pt2)/(Ptarget.minus()-Qminus); 728 Qmomentum.setPz((Qplus-Qminus)/2);729 Qmomentum.setE( (Qplus+Qminus)/2);730 #ifdef debug 731 G4cout<<"G4QFragm::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2="718 G4double Xmin = minmass/(Pprojectile.e() + Ptarget.e()); 719 G4double Xmax=1.; 720 G4double Xplus =ChooseX(Xmin,Xmax); 721 G4double Xminus=ChooseX(Xmin,Xmax); 722 #ifdef debug 723 G4cout<<"G4QFragm::ExciteSingDiffPartici:X-plus="<<Xplus<<",X-minus="<<Xminus<<G4endl; 724 #endif 725 G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 726 G4double Qplus =-pt2/Xminus/Ptarget.minus(); 727 G4double Qminus= pt2/Xplus /Pprojectile.plus(); 728 if (KeepProjectile) 729 Qminus=(projectile->GetMass2()+pt2)/(Pprojectile.plus()+Qplus) - Pprojectile.minus(); 730 else Qplus=Ptarget.plus() - (target->GetMass2()+pt2)/(Ptarget.minus()-Qminus); 731 Qmomentum.setPz((Qplus-Qminus)/2); 732 Qmomentum.setE( (Qplus+Qminus)/2); 733 #ifdef debug 734 G4cout<<"G4QFragm::ExciteDiffParticip: Qplus="<<Qplus<<", Qminus="<<Qminus<<", pt2=" 732 735 <<pt2<<", Qmomentum="<<Qmomentum<<", ProjM="<<(Pprojectile+Qmomentum).mag() 733 736 <<", TargM="<<(Ptarget-Qmomentum).mag()<<G4endl; 734 737 #endif 735 738 // while is different from the Double Diffractive Excitation (@@ !) 736 //} while((Pprojectile+Qmomentum).mag2()<= Mprojectile2 ||739 //} while((Pprojectile+Qmomentum).mag2()<= Mprojectile2 || 737 740 // (Ptarget-Qmomentum).mag2()<=Mtarget2); 738 } while((Ptarget-Qmomentum).mag2()<=Mtarget2 ||741 } while((Ptarget-Qmomentum).mag2()<=Mtarget2 || 739 742 (Pprojectile+Qmomentum).mag2()<=Mprojectile2 || 740 743 (Ptarget-Qmomentum).e() < 0. || (Pprojectile+Qmomentum).e() < 0.); 741 Pprojectile += Qmomentum;742 Ptarget -= Qmomentum;743 #ifdef debug 744 G4cout<<"G4QFragmentation::ExciteSingDiffParticipan: Proj(Q)="<<Pprojectile<<"(E="744 Pprojectile += Qmomentum; 745 Ptarget -= Qmomentum; 746 #ifdef debug 747 G4cout<<"G4QFragmentation::ExciteSingDiffParticipan: Proj(Q)="<<Pprojectile<<"(E=" 745 748 <<Pprojectile.e()<<"), Targ(Q)="<<Ptarget<<"(E="<<Ptarget.e() 746 <<"), Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl;749 <<"), Proj(back)="<<toLab*Pprojectile<<", Targ(bac)="<< toLab*Ptarget << G4endl; 747 750 #endif 748 751 // Transform back and update SplitableHadron Participant. 749 Pprojectile.transform(toLab);750 Ptarget.transform(toLab);751 #ifdef debug 752 G4cout<< "G4QFragm::ExciteSingDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl;753 #endif 754 target->Set4Momentum(Ptarget); 755 #ifdef debug 756 G4cout<<"G4QFragm::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl;757 #endif 758 projectile->Set4Momentum(Pprojectile);759 return true;752 Pprojectile.transform(toLab); 753 Ptarget.transform(toLab); 754 #ifdef debug 755 G4cout<< "G4QFragm::ExciteSingDiffParticipants: TargetMass="<<Ptarget.mag()<<G4endl; 756 #endif 757 target->Set4Momentum(Ptarget); 758 #ifdef debug 759 G4cout<<"G4QFragm::ExciteDiffParticipants:ProjectileMass="<<Pprojectile.mag()<<G4endl; 760 #endif 761 projectile->Set4Momentum(Pprojectile); 762 return true; 760 763 } // End of ExciteSingleDiffParticipants 761 764 … … 767 770 QGSMThershold = QGSMth; // QGSM threshold 768 771 theNucleonRadius = radNuc; // effective radius of the nucleon inside Nucleus 769 widthOfPtSquare = -2*SigPt*SigPt;// width^2 of pt for string excitation770 minExtraMass = extraM;// minimum excitation mass771 minmass = minM;// mean pion transverse mass; used for Xmin772 widthOfPtSquare = -2*SigPt*SigPt; // width^2 of pt for string excitation 773 minExtraMass = extraM; // minimum excitation mass 774 minmass = minM; // mean pion transverse mass; used for Xmin 772 775 } 773 776 … … 776 779 // choose an x between Xmin and Xmax with P(x) ~ 1/x 777 780 // to be improved... 778 G4double range=Xmax-Xmin;779 if( Xmin<= 0. || range <=0.)780 {781 G4cerr<<"***G4QFragmentation::ChooseX: Xmin="<<Xmin<<", Xmax="<<Xmax<< G4endl;781 G4double range=Xmax-Xmin; 782 if( Xmin<= 0. || range <=0.) 783 { 784 G4cerr<<"***G4QFragmentation::ChooseX: Xmin="<<Xmin<<", Xmax="<<Xmax<< G4endl; 782 785 G4Exception("G4QFragmentation::ChooseX:","72",FatalException,"BadXRange"); 783 }784 G4double x;785 do {x=Xmin+G4UniformRand()*range;} while ( Xmin/x < G4UniformRand() );786 } 787 G4double x; 788 do {x=Xmin+G4UniformRand()*range;} while ( Xmin/x < G4UniformRand() ); 786 789 #ifdef debug 787 790 G4cout<<"G4QFragmentation::ChooseX: DiffractiveX="<<x<<G4endl; 788 791 #endif 789 return x;792 return x; 790 793 } // End of ChooseX 791 794 … … 793 796 G4ThreeVector G4QFragmentation::GaussianPt(G4double widthSq, G4double maxPtSquare) const 794 797 { 795 G4double pt2; do{pt2=widthSq*std::log(G4UniformRand());} while (pt2>maxPtSquare);796 pt2=std::sqrt(pt2);797 G4double phi=G4UniformRand()*twopi;798 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);798 G4double pt2; do{pt2=widthSq*std::log(G4UniformRand());} while (pt2>maxPtSquare); 799 pt2=std::sqrt(pt2); 800 G4double phi=G4UniformRand()*twopi; 801 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.); 799 802 } // End of GaussianPt -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadron.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QHadron.cc,v 1.5 3 2008/03/20 20:11:38 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QHadron.cc,v 1.54 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QHadron ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for Quasmon initiated Hadrons generated by CHIPS Model 33 // ------------------------------------------------------------------ 33 // ------------------------------------------------------------------- 34 // Short description: In CHIPS all particles are G4QHadrons, while they 35 // can be leptons, gammas or nuclei. The G4QPDGCode makes the difference. 36 // In addition the 4-momentum is a basic value, so the mass can be 37 // different from the GS mass (e.g. for the virtual gamma). 38 // ------------------------------------------------------------------- 34 39 // 35 40 //#define debug … … 92 97 G4int cPDG=theQPDG.GetPDGCode(); 93 98 if(cPDG>80000000) DefineQC(cPDG); 94 else G4cerr<<"***G4QHadr:(QP) PDG="<<cPDG<<" use other constructor"<<G4endl;99 else G4cerr<<"***G4QHadr:(QP) PDG="<<cPDG<<" use other constructor"<<G4endl; 95 100 } 96 101 } … … 99 104 G4QHadron::G4QHadron(G4QContent QC, G4LorentzVector p): theQPDG(0),theMomentum(p),valQ(QC), 100 105 nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true), 101 Color(),AntiColor(),bindE(0.),formTime(0.)106 Color(),AntiColor(),bindE(0.),formTime(0.) 102 107 { 103 108 G4int curPDG=valQ.GetSPDGCode(); … … 156 161 Direction = right.Direction; 157 162 bindE = right.bindE; 158 formTime = right.formTime;163 formTime = right.formTime; 159 164 } 160 165 … … 170 175 Direction = right->Direction; 171 176 bindE = right->bindE; 172 formTime = right->formTime;177 formTime = right->formTime; 173 178 } 174 179 … … 184 189 Direction = right->Direction; 185 190 bindE = right->bindE; 186 formTime = right->formTime;191 formTime = right->formTime; 187 192 } 188 193 … … 306 311 G4double emodif=std::fabs(dE-vP); 307 312 //if(emodif<accuracy) 308 //{313 //{ 309 314 G4cerr<<"G4QHadron::RelDecIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl; 310 315 theMomentum.setE(vP+emodif+.01*accuracy); 311 //}316 //} 312 317 } 313 318 G4ThreeVector ltb = theMomentum.boostVector();// Boost vector for backward Lorentz Trans. … … 429 434 cosp=-cosp; 430 435 neg=true; 431 }436 } 432 437 if(dE<vP) 433 438 { … … 436 441 G4double emodif=std::fabs(dE-vP); 437 442 //if(emodif<accuracy) 438 //{443 //{ 439 444 G4cerr<<"G4QHadron::CopDecIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl; 440 445 theMomentum.setE(vP+emodif+.01*accuracy); 441 //}446 //} 442 447 } 443 448 G4ThreeVector ltb = theMomentum.boostVector();// Boost vector for backward Lorentz Trans. … … 594 599 if(theMomentum.e()<theMomentum.rho()) 595 600 { 596 G4cerr<<"*G4QH::DecIn2:*Boost* 4M="<<theMomentum<<",e-p="601 G4cerr<<"*G4QH::DecIn2:*Boost* 4M="<<theMomentum<<",e-p=" 597 602 <<theMomentum.e()-theMomentum.rho()<<G4endl; 598 //throw G4QException("G4QHadron::DecayIn2: Decay of particle with zero mass")603 //throw G4QException("G4QHadron::DecayIn2: Decay of particle with zero mass") 599 604 theMomentum.setE(1.0000001*theMomentum.rho()); 600 605 } … … 607 612 G4double emodif=std::fabs(dE-vP); 608 613 if(emodif<accuracy) 609 {614 { 610 615 G4cerr<<"G4QHadron::DecayIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl; 611 616 theMomentum.setE(vP+emodif+.01*accuracy); … … 822 827 G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2); 823 828 if(dif<0.) 824 {829 { 825 830 #ifdef debug 826 831 if(dif<-.01) G4cerr<<"*G4QHadron::DecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM=" … … 841 846 { 842 847 G4cerr<<"***G4QHadron::DecayIn3: Exception1"<<G4endl; 843 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");848 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed"); 844 849 return false; 845 850 } … … 850 855 { 851 856 G4cerr<<"***G4QHadron::DecayIn3: Error in DecayIn2 -> Exception2"<<G4endl; 852 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");857 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed"); 853 858 return false; 854 859 } … … 907 912 G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2); 908 913 if(dif<0.) 909 {914 { 910 915 #ifdef debug 911 916 if(dif<-.01) G4cerr<<"G4QHadron::RelDecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM=" … … 926 931 { 927 932 G4cerr<<"***G4QHadron::RelDecayIn3: Exception1"<<G4endl; 928 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");933 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed"); 929 934 return false; 930 935 } … … 935 940 { 936 941 G4cerr<<"***G4QHadron::RelDecayIn3: Error in DecayIn2 -> Exception2"<<G4endl; 937 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");942 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed"); 938 943 return false; 939 944 } … … 991 996 G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2); 992 997 if(dif<0.) 993 {998 { 994 999 #ifdef debug 995 1000 if(dif<-.01) G4cerr<<"G4QHadron::CopDecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM=" … … 1010 1015 { 1011 1016 G4cerr<<"***G4QHadron::CopDecayIn3: Exception1"<<G4endl; 1012 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");1017 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed"); 1013 1018 return false; 1014 1019 } … … 1019 1024 { 1020 1025 G4cerr<<"***G4QHadron::CopDecayIn3: Error in DecayIn2 -> Exception2"<<G4endl; 1021 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");1026 //throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed"); 1022 1027 return false; 1023 1028 } … … 1045 1050 { 1046 1051 #ifdef debug 1047 if(meanM>maxM) G4cerr<<"***G4QHadron::RandM:Stable m="<<meanM<<">maxM="<<maxM<<G4endl;1052 if(meanM>maxM) G4cerr<<"***G4QHadron::RandM:Stable m="<<meanM<<">maxM="<<maxM<<G4endl; 1048 1053 #endif 1049 1054 return meanM; … … 1052 1057 else if(width<0.) 1053 1058 { 1054 G4cerr<<"***G4QHadron::RandM: width="<<width<<"<0,PDGC="<<theQPDG.GetPDGCode()<<G4endl;1055 throw G4QException("G4QHadron::RandomizeMass: with the width of the Hadron < 0.");1059 G4cerr<<"***G4QHadron::RandM: width="<<width<<"<0,PDGC="<<theQPDG.GetPDGCode()<<G4endl; 1060 throw G4QException("G4QHadron::RandomizeMass: with the width of the Hadron < 0."); 1056 1061 } 1057 1062 G4double minM = pPart->MinMassOfFragm(); … … 1059 1064 { 1060 1065 #ifdef debug 1061 G4cout<<"***G4QHadron::RandomizeMass:for PDG="<<theQPDG.GetPDGCode()<<" minM="<<minM1066 G4cout<<"***G4QHadron::RandomizeMass:for PDG="<<theQPDG.GetPDGCode()<<" minM="<<minM 1062 1067 <<" > maxM="<<maxM<<G4endl; 1063 1068 #endif … … 1107 1112 //G4cout<<"DSU 2: Right4M="<<RightMom<<", Left4M= "<<LeftMom<<G4endl; 1108 1113 1109 G4double Local1 = HadronMom.minus() + (RightMom.perp2() - LeftMom.perp2())/HadronMom.plus(); 1110 G4double Local2 = std::sqrt(std::max(0., sqr(Local1) - 4.*RightMom.perp2()*HadronMom.minus()/HadronMom.plus())); 1114 G4double Local1 = HadronMom.minus() + 1115 (RightMom.perp2() - LeftMom.perp2()) / HadronMom.plus(); 1116 G4double Local2 = std::sqrt(std::max(0., Local1*Local1 - 1117 4*RightMom.perp2()*HadronMom.minus() / HadronMom.plus())); 1111 1118 //G4cout<<"DSU 3: L1="<< Local1 <<", L2="<<Local2<<G4endl; 1112 1119 … … 1140 1147 // here the condition,to ensure viability of splitting, also in cases 1141 1148 // where difractive excitation occured together with soft scattering. 1142 // G4double LightConeMomentum = (Direction)? Get4Momentum().plus() :Get4Momentum().minus();1143 // G4double Xmin = theMinPz/LightConeMomentum;1149 //G4double LightConeMomentum=(Direction)? Get4Momentum().plus():Get4Momentum().minus(); 1150 //G4double Xmin = theMinPz/LightConeMomentum; 1144 1151 G4double Xmin = theMinPz/( Get4Momentum().e() - GetMass() ); 1145 1152 while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95; … … 1155 1162 G4QParton* aParton = BuildSeaQuark(false, aPDGCode); 1156 1163 1157 // G4cout << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl;1158 1159 // G4cout << "Parton 1: "1160 // << " PDGcode: " << aPDGCode1161 // << " - Name: " << aParton->GetDefinition()->GetParticleName()1162 // << " - Type: " << aParton->GetDefinition()->GetParticleType()1163 // << " - Spin-3: " << aParton->GetSpinZ()1164 // << " - Colour: " << aParton->GetColour() << G4endl;1164 // G4cout << "G4QGSMSplitableHadron::SoftSplitUp()" << G4endl; 1165 1166 // G4cout << "Parton 1: " 1167 // << " PDGcode: " << aPDGCode 1168 // << " - Name: " << aParton->GetDefinition()->GetParticleName() 1169 // << " - Type: " << aParton->GetDefinition()->GetParticleType() 1170 // << " - Spin-3: " << aParton->GetSpinZ() 1171 // << " - Colour: " << aParton->GetColour() << G4endl; 1165 1172 1166 1173 // save colour a spin-3 for anti-quark … … 1177 1184 aParton->SetColour(-firstPartonColour); 1178 1185 1179 // G4cout << "Parton 2: "1180 // << " PDGcode: " << -aPDGCode1181 // << " - Name: " << aParton->GetDefinition()->GetParticleName()1182 // << " - Type: " << aParton->GetDefinition()->GetParticleType()1183 // << " - Spin-3: " << aParton->GetSpinZ()1184 // << " - Colour: " << aParton->GetColour() << G4endl;1185 // G4cerr << "------------" << G4endl;1186 // G4cout << "Parton 2: " 1187 // << " PDGcode: " << -aPDGCode 1188 // << " - Name: " << aParton->GetDefinition()->GetParticleName() 1189 // << " - Type: " << aParton->GetDefinition()->GetParticleType() 1190 // << " - Spin-3: " << aParton->GetSpinZ() 1191 // << " - Colour: " << aParton->GetColour() << G4endl; 1192 // G4cerr << "------------" << G4endl; 1186 1193 1187 1194 SumPx += aParton->Get4Momentum().px(); … … 1239 1246 ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta); 1240 1247 HPWtest = ColorX; 1241 while (ColorX < Xmin || ColorX > 1.|| 1. - ColorX <= Xmin) {1242 ; // Possible dead loop? Don't know why this loop is here - DHW1243 }1244 Color.back()->SetX(SumX = ColorX); // this is the valenz quark.1248 //while (ColorX < Xmin || ColorX > 1. || 1. - ColorX <= Xmin) 1249 //{ 1250 //} 1251 Color.back()->SetX(SumX = ColorX); // this is the valenz quark. 1245 1252 1246 1253 std::list<G4QParton*>::iterator icolor = Color.begin(); … … 1263 1270 AntiColor.back()->SetX(1.0 - SumX); // the di-quark takes the rest, then go to momentum 1264 1271 // and here is the bug ;-) @@@@@@@@@@@@@ 1265 if(getenv("debug_QGSMSplitableHadron") )G4cout << "particle energy at split = "<<Get4Momentum().t()<<G4endl; 1272 if(getenv("debug_QGSMSplitableHadron")) 1273 G4cout<<"particle energy at split = "<<Get4Momentum().t()<<G4endl; 1266 1274 G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus()); 1267 1275 // lightCone -= 0.5*Get4Momentum().m(); … … 1320 1328 if(anXmin > xMax) 1321 1329 { 1322 G4cerr<<"***G4QHadron::SampleX: anXmin="<<anXmin<<" > xMax="<<xMax<<", nSea="<<nSea1330 G4cerr<<"***G4QHadron::SampleX: anXmin="<<anXmin<<" > xMax="<<xMax<<", nSea="<<nSea 1323 1331 <<", totSea="<<totalSea<<G4endl; 1324 1332 G4Exception("G4QHadron::SampleX:","72",FatalException,"TooBigXValue"); … … 1349 1357 Parton1->SetPosition(GetPosition()); 1350 1358 1351 // G4cerr << "G4QGSMSplitableHadron::GetValenceQuarkFlavors()" << G4endl;1352 // G4cerr << "Parton 1: "1353 // << " PDGcode: " << aEnd1354 // << " - Name: " << Parton1->GetDefinition()->GetParticleName()1355 // << " - Type: " << Parton1->GetDefinition()->GetParticleType()1356 // << " - Spin-3: " << Parton1->GetSpinZ()1357 // << " - Colour: " << Parton1->GetColour() << G4endl;1359 // G4cerr << "G4QGSMSplitableHadron::GetValenceQuarkFlavors()" << G4endl; 1360 // G4cerr << "Parton 1: " 1361 // << " PDGcode: " << aEnd 1362 // << " - Name: " << Parton1->GetDefinition()->GetParticleName() 1363 // << " - Type: " << Parton1->GetDefinition()->GetParticleType() 1364 // << " - Spin-3: " << Parton1->GetSpinZ() 1365 // << " - Colour: " << Parton1->GetColour() << G4endl; 1358 1366 1359 1367 Parton2 = new G4QParton(bEnd); 1360 1368 Parton2->SetPosition(GetPosition()); 1361 1369 1362 // G4cerr << "Parton 2: "1363 // << " PDGcode: " << bEnd1364 // << " - Name: " << Parton2->GetDefinition()->GetParticleName()1365 // << " - Type: " << Parton2->GetDefinition()->GetParticleType()1366 // << " - Spin-3: " << Parton2->GetSpinZ()1367 // << " - Colour: " << Parton2->GetColour() << G4endl;1368 // G4cerr << "... now checking for color and spin conservation - yielding: " << G4endl;1370 // G4cerr << "Parton 2: " 1371 // << " PDGcode: " << bEnd 1372 // << " - Name: " << Parton2->GetDefinition()->GetParticleName() 1373 // << " - Type: " << Parton2->GetDefinition()->GetParticleType() 1374 // << " - Spin-3: " << Parton2->GetSpinZ() 1375 // << " - Colour: " << Parton2->GetColour() << G4endl; 1376 // G4cerr << "... now checking for color and spin conservation - yielding: " << G4endl; 1369 1377 1370 1378 // colour of parton 1 choosen at random by G4QParton(aEnd) … … 1373 1381 Parton2->SetColour(-(Parton1->GetColour())); 1374 1382 1375 // isospin-3 of both partons is handled by G4Parton(PDGCode)1376 1377 // spin-3 of parton 1 and 2 choosen at random by G4QParton(aEnd)1378 // spin-3 of parton 2 may be constrained by spin of original particle:1383 // isospin-3 of both partons is handled by G4Parton(PDGCode) 1384 1385 // spin-3 of parton 1 and 2 choosen at random by G4QParton(aEnd) 1386 // spin-3 of parton 2 may be constrained by spin of original particle: 1379 1387 1380 1388 if ( std::abs(Parton1->GetSpinZ() + Parton2->GetSpinZ()) > GetSpin()) 1381 { 1382 Parton2->SetSpinZ(-(Parton2->GetSpinZ())); 1383 } 1384 1385 // G4cerr << "Parton 2: " 1386 // << " PDGcode: " << bEnd 1387 // << " - Name: " << Parton2->GetDefinition()->GetParticleName() 1388 // << " - Type: " << Parton2->GetDefinition()->GetParticleType() 1389 // << " - Spin-3: " << Parton2->GetSpinZ() 1390 // << " - Colour: " << Parton2->GetColour() << G4endl; 1391 // G4cerr << "------------" << G4endl; 1389 Parton2->SetSpinZ(-(Parton2->GetSpinZ())); 1390 1391 // G4cerr << "Parton 2: " 1392 // << " PDGcode: " << bEnd 1393 // << " - Name: " << Parton2->GetDefinition()->GetParticleName() 1394 // << " - Type: " << Parton2->GetDefinition()->GetParticleType() 1395 // << " - Spin-3: " << Parton2->GetSpinZ() 1396 // << " - Colour: " << Parton2->GetColour() << G4endl; 1397 // G4cerr << "------------" << G4endl; 1392 1398 1393 1399 } // End of GetValenceQuarkFlavors … … 1429 1435 static const G4double r12=1./12.; 1430 1436 // 1431 std::pair<G4int,G4int> qdq[5];1437 std::pair<G4int,G4int> qdq[5]; 1432 1438 G4double prb[5]; 1433 1439 G4int nc=0; … … 1447 1453 qdq[2]=make_pair(1103, 2); prb[2]=r3; // dd_1, u 1448 1454 } 1449 else if(aPDGcode%10<3) // ==> Spin 1/2 Hyperons1450 {1455 else if(aPDGcode%10<3) // ==> Spin 1/2 Hyperons 1456 { 1451 1457 if(aPDGcode==3122) 1452 1458 { … … 1585 1591 { 1586 1592 G4double R=0.; 1587 while ((R = -widthSquare*std::log(G4UniformRand())) > maxPtSquare) { 1588 ; 1589 } 1593 while ((R = -widthSquare*std::log(G4UniformRand())) > maxPtSquare){} 1590 1594 R = std::sqrt(R); 1591 1595 G4double phi = twopi*G4UniformRand(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QHadronBuilder.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QHadronBuilder.cc,v 1. 2 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QHadronBuilder.cc,v 1.4 2009/04/29 07:53:18 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 36 36 // G4HadronBuilder 37 37 // ----------------------------------------------------------------------------- 38 // Short description: A CHIPS class for the builder of the G4QHadron, which is a 39 // resulting object for the string fragmentation. the G4QHadron has specific 40 // parameters, which are not included in the G4QParticle from the CHIPS World, 41 // but necessary for the string fragmentation. When the G4QHadron is created 42 // (builded), it is converted to the CHIPS particle. 43 // ----------------------------------------------------------------------------- 44 38 45 39 46 //#define debug … … 45 52 G4QHadronBuilder::G4QHadronBuilder() 46 53 { 47 mesonSpinMix = 0.5;// probability to create vector meson48 baryonSpinMix= 0.5; // probability to create 3/2 baryon54 mesonSpinMix = 0.5; // probability to create vector meson 55 baryonSpinMix= 0.5; // probability to create 3/2 baryon 49 56 scalarMesonMixings.resize(6); 50 57 scalarMesonMixings[0] = 0.5; … … 65 72 G4QHadron* G4QHadronBuilder::Build(G4QParton* black, G4QParton* white) 66 73 { 67 if(black->GetParticleSubType()=="di_quark" || white->GetParticleSubType()=="di_quark")74 if(black->GetParticleSubType()=="di_quark" || white->GetParticleSubType()=="di_quark") 68 75 { 69 76 // Baryon consists of quark and at least one di-quark 70 Spin spin = (G4UniformRand() < baryonSpinMix) ? SpinHalf : SpinThreeHalf;71 return Baryon(black,white,spin);72 }77 Spin spin = (G4UniformRand() < baryonSpinMix) ? SpinHalf : SpinThreeHalf; 78 return Baryon(black,white,spin); 79 } 73 80 else 74 { 81 { 75 82 // Meson consists of quark and abnti-quark 76 Spin spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne;77 return Meson(black,white,spin);78 }83 Spin spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne; 84 return Meson(black,white,spin); 85 } 79 86 } 80 87 81 88 G4QHadron* G4QHadronBuilder::BuildLowSpin(G4QParton* black, G4QParton* white) 82 89 { 83 if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark")84 return Meson(black,white, SpinZero);85 // returns a SpinThreeHalf Baryon if all quarks are the same86 elsereturn Baryon(black,white, SpinHalf);90 if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark") 91 return Meson(black,white, SpinZero); 92 // returns a SpinThreeHalf Baryon if all quarks are the same 93 else return Baryon(black,white, SpinHalf); 87 94 } 88 95 89 96 G4QHadron* G4QHadronBuilder::BuildHighSpin(G4QParton* black, G4QParton* white) 90 97 { 91 if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark")92 return Meson(black,white, SpinOne);93 else return Baryon(black,white,SpinThreeHalf);98 if(black->GetParticleSubType() == "quark" && white->GetParticleSubType() == "quark") 99 return Meson(black,white, SpinOne); 100 else return Baryon(black,white,SpinThreeHalf); 94 101 } 95 102 … … 98 105 #ifdef debug 99 106 // Verify Input Charge 100 G4double charge = black->GetPDGCharge() + white->GetPDGCharge(); 107 G4double charge = black->GetPDGCharge() + white->GetPDGCharge(); 101 108 if (std::abs(charge)>2 || std::abs(3*(charge-G4int(charge*1.001))) > perCent) 102 G4cerr<<"-Warning-G4QHadronBuilder::Meson: invalid TotalCharge="<<charge<<", PDG_q1="109 G4cerr<<"-Warning-G4QHadronBuilder::Meson: invalid TotalCharge="<<charge<<", PDG_q1=" 103 110 <<black->GetPDGEncoding()<< ", PDG_q2="<<white->GetPDGEncoding()<<G4endl; 104 #endif 105 106 G4int id1= black->GetPDGCode();107 G4int id2= white->GetPDGCode();108 if (std::abs(id1) < std::abs(id2)) // exchange black and white109 {110 G4int xchg = id1;111 id1 = id2;112 id2 = xchg;113 }114 if(std::abs(id1)>3)115 {116 G4cerr<<"***G4QHadronBuilder::Meson: q1="<<id1<<", q2="<<id2111 #endif 112 113 G4int id1= black->GetPDGCode(); 114 G4int id2= white->GetPDGCode(); 115 if (std::abs(id1) < std::abs(id2)) // exchange black and white 116 { 117 G4int xchg = id1; 118 id1 = id2; 119 id2 = xchg; 120 } 121 if(std::abs(id1)>3) 122 { 123 G4cerr<<"***G4QHadronBuilder::Meson: q1="<<id1<<", q2="<<id2 117 124 <<" while CHIPS is only SU(3)"<<G4endl; 118 125 G4Exception("G4QHadronBuilder::Meson:","72",FatalException,"HeavyQuarkFound"); 119 } 126 } 120 127 G4int PDGEncoding=0; 121 if(!(id1+id2)) // annihilation case (neutral)128 if(!(id1+id2)) // annihilation case (neutral) 122 129 { 123 G4double rmix = G4UniformRand();124 G4int imix = 2*std::abs(id1) - 1;125 if(theSpin == SpinZero)126 PDGEncoding = 110*(1 + G4int(rmix + scalarMesonMixings[imix - 1])127 + G4int(rmix + scalarMesonMixings[imix] ) ) + theSpin;128 else129 PDGEncoding = 110*(1 + G4int(rmix + vectorMesonMixings[imix - 1])130 + G4int(rmix + vectorMesonMixings[imix] ) ) + theSpin;131 }130 G4double rmix = G4UniformRand(); 131 G4int imix = 2*std::abs(id1) - 1; 132 if(theSpin == SpinZero) 133 PDGEncoding = 110*(1 + G4int(rmix + scalarMesonMixings[imix - 1]) 134 + G4int(rmix + scalarMesonMixings[imix] ) ) + theSpin; 135 else 136 PDGEncoding = 110*(1 + G4int(rmix + vectorMesonMixings[imix - 1]) 137 + G4int(rmix + vectorMesonMixings[imix] ) ) + theSpin; 138 } 132 139 else 133 140 { 134 PDGEncoding = 100 * std::abs(id1) + 10 * std::abs(id2) + theSpin; 135 G4bool IsUp = (std::abs(id1)&1) == 0; // quark 1 is up type quark (u or c?) 136 G4bool IsAnti = id1 < 0; // quark 1 is an antiquark? 137 if( (IsUp && IsAnti) || (!IsUp && !IsAnti) ) PDGEncoding = - PDGEncoding; 138 } 139 G4QHadron* Meson= new G4QHadron(PDGEncoding); 140 #ifdef debug 141 if(std::abs(black->GetPDGCharge() + white->GetPDGCharge() - Meson->GetCharge()) > .001) 142 G4cout<<"-Warning-G4QHadronBuilder::Meson:wrongCharge, q1="<<black->GetPDGCharge()<<"(" 141 PDGEncoding = 100 * std::abs(id1) + 10 * std::abs(id2) + theSpin; 142 G4bool IsUp = (std::abs(id1)&1) == 0; // quark 1 is up type quark (u or c?) 143 G4bool IsAnti = id1 < 0; // quark 1 is an antiquark? 144 if( (IsUp && IsAnti) || (!IsUp && !IsAnti) ) PDGEncoding = - PDGEncoding; 145 // Correction for the true neutral mesons 146 if( PDGEncoding == -111 || PDGEncoding == -113 || PDGEncoding == -223 || 147 PDGEncoding == -221 || PDGEncoding == -331 || PDGEncoding == -333 ) 148 PDGEncoding = - PDGEncoding; 149 } 150 G4QHadron* Meson= new G4QHadron(PDGEncoding); 151 #ifdef debug 152 if(std::abs(black->GetPDGCharge() + white->GetPDGCharge() - Meson->GetCharge()) > .001) 153 G4cout<<"-Warning-G4QHadronBuilder::Meson:wrongCharge, q1="<<black->GetPDGCharge()<<"(" 143 154 <<black->->GetParticleName()<<"), q2="<<white->GetPDGCharge()<<"(" 144 155 <<white->->GetParticleName()<<"), qM="<<Meson->GetCharge()<<"/"<<PDGEncoding 145 156 <<G4endl; 146 157 #endif 147 return Meson;158 return Meson; 148 159 } 149 160 … … 152 163 #ifdef debug 153 164 // Verify Input Charge 154 G4double charge = black->GetPDGCharge() + white->GetPDGCharge(); 165 G4double charge = black->GetPDGCharge() + white->GetPDGCharge(); 155 166 if(std::abs(charge) > 2 || std::abs(3*(charge - G4int(charge*1.001))) > perCent ) 156 G4cerr<<"-Warning-G4QHadronBuilder::Baryon: invalid TotalCharge="<<charge<<", PDG_q1="167 G4cerr<<"-Warning-G4QHadronBuilder::Baryon: invalid TotalCharge="<<charge<<", PDG_q1=" 157 168 <<black->GetPDGEncoding()<< ", PDG_q2="<<white->GetPDGEncoding()<<G4endl; 158 #endif 159 G4int id1= black->GetPDGCode();160 G4int id2= white->GetPDGCode();161 if(std::abs(id1) < std::abs(id2))162 {163 G4int xchg = id1;164 id1 = id2;165 id2 = xchg;166 }167 if(std::abs(id1)<1000 || std::abs(id2)> 3)168 {169 G4cerr<<"***G4QHadronBuilder::Baryon: q1="<<id1<<", q2="<<id2169 #endif 170 G4int id1= black->GetPDGCode(); 171 G4int id2= white->GetPDGCode(); 172 if(std::abs(id1) < std::abs(id2)) 173 { 174 G4int xchg = id1; 175 id1 = id2; 176 id2 = xchg; 177 } 178 if(std::abs(id1)<1000 || std::abs(id2)> 3) 179 { 180 G4cerr<<"***G4QHadronBuilder::Baryon: q1="<<id1<<", q2="<<id2 170 181 <<" can't create a Baryon"<<G4endl; 171 182 G4Exception("G4QHadronBuilder::Baryon:","72",FatalException,"WrongQdQSequence"); 172 183 } 173 G4int ifl1= std::abs(id1)/1000;174 G4int ifl2 = (std::abs(id1) - ifl1 * 1000)/100;175 G4int diquarkSpin = std::abs(id1)%10;176 G4int ifl3 = id2;177 if (id1 < 0) {ifl1 = - ifl1; ifl2 = - ifl2;}178 //... Construct baryon, distinguish Lambda and Sigma baryons.179 G4int kfla = std::abs(ifl1);180 G4int kflb = std::abs(ifl2);181 G4int kflc = std::abs(ifl3);182 G4int kfld = std::max(kfla,kflb);183 kfld = std::max(kfld,kflc);184 G4int kflf = std::min(kfla,kflb);185 kflf = std::min(kflf,kflc);186 G4int kfle = kfla + kflb + kflc - kfld - kflf;187 //... baryon with content uuu or ddd or sss has always spin = 3/2188 if(kfla==kflb && kflb==kflc) theSpin=SpinThreeHalf;189 190 G4int kfll = 0;191 if(theSpin == SpinHalf && kfld > kfle && kfle > kflf)184 G4int ifl1= std::abs(id1)/1000; 185 G4int ifl2 = (std::abs(id1) - ifl1 * 1000)/100; 186 G4int diquarkSpin = std::abs(id1)%10; 187 G4int ifl3 = id2; 188 if (id1 < 0) {ifl1 = - ifl1; ifl2 = - ifl2;} 189 //... Construct baryon, distinguish Lambda and Sigma baryons. 190 G4int kfla = std::abs(ifl1); 191 G4int kflb = std::abs(ifl2); 192 G4int kflc = std::abs(ifl3); 193 G4int kfld = std::max(kfla,kflb); 194 kfld = std::max(kfld,kflc); 195 G4int kflf = std::min(kfla,kflb); 196 kflf = std::min(kflf,kflc); 197 G4int kfle = kfla + kflb + kflc - kfld - kflf; 198 //... baryon with content uuu or ddd or sss has always spin = 3/2 199 if(kfla==kflb && kflb==kflc) theSpin=SpinThreeHalf; 200 201 G4int kfll = 0; 202 if(theSpin == SpinHalf && kfld > kfle && kfle > kflf) 192 203 { 193 204 // Spin J=1/2 and all three quarks different … … 195 206 // - lambda: s(ud)0 s : 3122; ie. reverse the two lighter quarks 196 207 // - sigma0: s(ud)1 s : 3212 197 if(diquarkSpin == 1 )208 if(diquarkSpin == 1 ) 198 209 { 199 if ( kfla == kfld) kfll = 1; // heaviest quark in diquark200 else kfll = G4int(0.25 + G4UniformRand());201 }202 if(diquarkSpin==3 && kfla!=kfld) kfll = G4int(0.75+G4UniformRand());203 }204 G4int PDGEncoding=0;205 if (kfll == 1) PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin;206 else PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin;207 if (id1 < 0) PDGEncoding = -PDGEncoding;208 G4QHadron* Baryon= new G4QHadron(PDGEncoding);209 #ifdef debug 210 if(std::abs(black->GetPDGCharge() + white->GetPDGCharge()- Baryon->GetCharge()) > .001)211 G4cout<<"-Warning-G4QHadronBuilder::Baryon:wrongCharge,dq="<<black->GetPDGCharge()<<"("210 if ( kfla == kfld) kfll = 1; // heaviest quark in diquark 211 else kfll = G4int(0.25 + G4UniformRand()); 212 } 213 if(diquarkSpin==3 && kfla!=kfld) kfll = G4int(0.75+G4UniformRand()); 214 } 215 G4int PDGEncoding=0; 216 if (kfll == 1) PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin; 217 else PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin; 218 if (id1 < 0) PDGEncoding = -PDGEncoding; 219 G4QHadron* Baryon= new G4QHadron(PDGEncoding); 220 #ifdef debug 221 if(std::abs(black->GetPDGCharge() + white->GetPDGCharge()- Baryon->GetCharge()) > .001) 222 G4cout<<"-Warning-G4QHadronBuilder::Baryon:wrongCharge,dq="<<black->GetPDGCharge()<<"(" 212 223 <<black->->GetParticleName()<<"), q="<<white->GetPDGCharge()<<"(" 213 224 <<white->->GetParticleName()<<"), qB="<<Baryon->GetCharge()<<"/"<<PDGEncoding 214 225 <<G4endl; 215 226 #endif 216 return Baryon;217 } 227 return Baryon; 228 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QInteraction.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QInteraction.cc,v 1. 2 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QInteraction.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------ … … 33 33 // ---------------- G4QInteraction---------------- 34 34 // Created by Mikhail Kossov Oct, 2006 35 // class for a storing colliding particles in PartonString Models35 // class for colliding particles (hadrons) in Parton String Models 36 36 // For comparison mirror member functions are taken from G4 class: 37 37 // G4InteractionContent 38 // ------------------------------------------------------------------- 38 // --------------------------------------------------------------------- 39 // Short description: Classify the interaction in soft/hard/diffractive 40 // parts for firther treatment by the QGS algorithm. 41 // --------------------------------------------------------------------- 39 42 40 43 #include "G4QInteraction.hh" -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QIsotope.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QIsotope.cc,v 1.1 0 2007/11/28 14:14:36mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QIsotope.cc,v 1.11 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QIsotope class ---------------- … … 39 39 // 1 2 3 4 5 6 7 8 9 40 40 //34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 41 // ------------------------------------------------------------------------------ 42 // Short description: containes the natural abundance DB for isotops and permits 43 // new artificial materials with unnatural abundance (e.g. enreached Deuterium). 44 // Uses isotope cross-sections for calculation of the mean cross-sections for the 45 // Element (fixed Z). 46 // ------------------------------------------------------------------------------ 47 41 48 42 49 //#define debug … … 636 643 s->push_back(sP); 637 644 #ifdef cdebug 638 G4cout<<"G4QIsotope::Constructor:Element# "<<i<<", Pair # "<<j<<" is filled"<<G4endl;645 G4cout<<"G4QIsotope::Constructor:Element# "<<i<<", Pair # "<<j<<" is filled"<<G4endl; 639 646 #endif 640 647 } … … 650 657 c->push_back(cP); 651 658 #ifdef cdebug 652 G4cout<<"G4QIsotope::Constructor:CrosSecPair i="<<i<<", j="<<j<<" is filled"<<G4endl;659 G4cout<<"G4QIsotope::Constructor:CrosSecPair i="<<i<<", j="<<j<<" is filled"<<G4endl; 653 660 #endif 654 661 } … … 877 884 } 878 885 else return 3; 879 }886 } 880 887 else return 2; 881 }888 } 882 889 else return 1; 883 890 } … … 894 901 { 895 902 // n Be F Al P 896 1, -1, -1, -1, 5, -1, -1, -1, -1, 10, -1, 12, -1, 14, -1, 16, -1, -1, -1, -1,903 1, -1, -1, -1, 5, -1, -1, -1, -1, 10, -1, 12, -1, 14, -1, 16, -1, -1, -1, -1, 897 904 // Sc Mn Co As Y 898 -1, 24, -1, -1, -1, 30, -1, 32, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, 50,899 // Nb Tc Rh I Cs Pr905 -1, 24, -1, -1, -1, 30, -1, 32, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, 50, 906 // Nb Tc Rh I Cs Pr 900 907 -1, 52, -1, 55, -1, 58, -1, -1, -1, -1, -1, -1, -1, 74, -1, 78, -1, -1, -1, 82, 901 // Pm Tb Ho Tm Au908 // Pm Tb Ho Tm Au 902 909 -1,-85, -1, -1, -1, 94, -1, 98, -1,100, -1, -1, -1, -1, -1, -1, -1, -1, -1,118, 903 // Po At Rn Fr Ra Ac904 -1, -1, -1, 126,-125,-136,-136,-138,-138,-142,905 // Th Pa U Np Pu Am Cm Bk Cf Es910 // Po At Rn Fr Ra Ac 911 -1, -1, -1, 126,-125,-136,-136,-138,-138,-142, 912 // Th Pa U Np Pu Am Cm Bk Cf Es 906 913 142,-140, -1,-144,-150,-148,-151,-150,-153,-153 907 // Fm Md No Lr Rf Db Sg Bh Hs Mt908 -157,-157,-157,-157,-157,-157,-157,-155,-157,-157914 // Fm Md No Lr Rf Db Sg Bh Hs Mt 915 -157,-157,-157,-157,-157,-157,-157,-155,-157,-157 909 916 }; 910 917 #ifdef debug … … 915 922 { 916 923 G4double rnd=G4UniformRand(); 917 if (i<44) // ====== H - Mo918 {924 if (i<44) // ====== H - Mo 925 { 919 926 if (i<23) // ------ H - Ti 920 {927 { 921 928 if (i<12) // ______ H - Ne 922 {929 { 923 930 if (i<6) // ...... H - B 924 {931 { 925 932 if (i<3) 926 {933 { 927 934 if(i==1) // H 928 {935 { 929 936 if(rnd>.00015) N=0; 930 937 else N=1; 931 }938 } 932 939 else // He (2) 933 {940 { 934 941 if(rnd>1.37e-6) N=2; 935 942 else N=1; 936 }937 }943 } 944 } 938 945 else 939 {946 { 940 947 if(i==3) // Li 941 {948 { 942 949 if(rnd>.075) N=4; 943 950 else N=3; 944 }951 } 945 952 else // B (5) 946 {953 { 947 954 if(rnd>.199) N=6; 948 955 else N=5; 949 }956 } 950 957 } 951 958 } … … 953 960 { 954 961 if (i<8) 955 {962 { 956 963 if(i==6) // C 957 {964 { 958 965 if(rnd>.011) N=6; 959 966 else N=7; 960 }967 } 961 968 else // N (7) 962 {969 { 963 970 if(rnd>.0037) N=7; 964 971 else N=8; 965 }966 }972 } 973 } 967 974 else 968 {975 { 969 976 if(i==8) // O 970 {977 { 971 978 if (rnd<.9976) N=8; 972 979 else if(rnd<.9996) N=10; 973 980 else N=9; 974 }981 } 975 982 else // Ne (10) 976 {983 { 977 984 if (rnd<.9948) N=10; 978 985 else if(rnd<.9975) N=11; 979 986 else N=12; 980 }987 } 981 988 } 982 989 } … … 985 992 { 986 993 if (i<18) // ...... Mg - Cl 987 {994 { 988 995 if (i<16) 989 {996 { 990 997 if(i==12) // Mg 991 {998 { 992 999 if (rnd<.7899) N=12; 993 1000 else if(rnd<.8899) N=13; 994 1001 else N=14; 995 }1002 } 996 1003 else // Si (14) 997 {1004 { 998 1005 if (rnd<.9223) N=14; 999 1006 else if(rnd<.969) N=15; 1000 1007 else N=16; 1001 }1002 }1008 } 1009 } 1003 1010 else 1004 {1011 { 1005 1012 if(i==16) // S 1006 {1013 { 1007 1014 if (rnd<.9502) N=16; 1008 1015 else if(rnd<.9923) N=18; 1009 1016 else if(rnd<.9998) N=17; 1010 1017 else N=20; 1011 }1018 } 1012 1019 else // Cl (17) 1013 {1020 { 1014 1021 if (rnd>.7577) N=18; 1015 1022 else N=20; 1016 }1023 } 1017 1024 } 1018 1025 } … … 1020 1027 { 1021 1028 if (i<20) 1022 {1029 { 1023 1030 if(i==18) // Ar 1024 {1031 { 1025 1032 if (rnd<.996) N=22; 1026 1033 else if(rnd<.99937) N=18; 1027 1034 else N=20; 1028 }1035 } 1029 1036 else // K (19) 1030 {1037 { 1031 1038 if (rnd<.932581) N=20; 1032 1039 else if(rnd<.999883) N=22; 1033 1040 else N=21; 1034 }1035 }1041 } 1042 } 1036 1043 else 1037 {1044 { 1038 1045 if(i==20) // Ca 1039 {1046 { 1040 1047 if (rnd<.96941) N=20; 1041 1048 else if(rnd<.99027) N=24; … … 1044 1051 else if(rnd<.99996) N=23; 1045 1052 else N=26; 1046 }1053 } 1047 1054 else // Ti (22) 1048 {1055 { 1049 1056 if (rnd<.738) N=26; 1050 1057 else if(rnd<.818) N=24; … … 1052 1059 else if(rnd<.946) N=27; 1053 1060 else N=28; 1054 }1061 } 1055 1062 } 1056 1063 } 1057 }1058 }1059 else // ------ V - Mo1060 {1064 } 1065 } 1066 else // ------ V - Mo 1067 { 1061 1068 if (i<32) // ______ V - Ga 1062 {1069 { 1063 1070 if (i<28) // ...... H - Fe 1064 {1071 { 1065 1072 if (i<26) 1066 {1073 { 1067 1074 if(i==23) // V 1068 {1075 { 1069 1076 if (rnd<.9975) N=28; 1070 1077 else N=27; 1071 }1078 } 1072 1079 else // Cr (24) 1073 {1080 { 1074 1081 if (rnd<.8379) N=28; 1075 1082 else if(rnd<.9329) N=29; 1076 1083 else if(rnd<.97635) N=26; 1077 1084 else N=30; 1078 }1079 }1085 } 1086 } 1080 1087 else // Fe (26) 1081 {1088 { 1082 1089 if (rnd<.9172) N=30; 1083 1090 else if(rnd<.9762) N=28; … … 1089 1096 { 1090 1097 if (i<30) 1091 {1098 { 1092 1099 if(i==28) // Ni 1093 {1100 { 1094 1101 if (rnd<.68077) N=30; 1095 1102 else if(rnd<.943) N=32; … … 1097 1104 else if(rnd<.99074) N=33; 1098 1105 else N=36; 1099 }1106 } 1100 1107 else // Cu (29) 1101 {1108 { 1102 1109 if (rnd<.6917) N=34; 1103 1110 else N=36; 1104 }1105 }1111 } 1112 } 1106 1113 else 1107 {1114 { 1108 1115 if(i==30) // Zn 1109 {1116 { 1110 1117 if (rnd<.486) N=34; 1111 1118 else if(rnd<.765) N=36; … … 1113 1120 else if(rnd<.994) N=37; 1114 1121 else N=40; 1115 }1122 } 1116 1123 else // Ga (31) 1117 {1124 { 1118 1125 if (rnd<.60108) N=38; 1119 1126 else N=40; 1120 }1127 } 1121 1128 } 1122 1129 } … … 1125 1132 { 1126 1133 if (i<37) // ...... H - B 1127 {1134 { 1128 1135 if (i<35) 1129 {1136 { 1130 1137 if(i==32) // Ge 1131 {1138 { 1132 1139 if (rnd<.3594) N=42; 1133 1140 else if(rnd<.6360) N=40; … … 1135 1142 else if(rnd<.9256) N=41; 1136 1143 else N=44; 1137 }1144 } 1138 1145 else // Se (34) 1139 {1146 { 1140 1147 if (rnd>.4961) N=46; 1141 1148 else if(rnd<.7378) N=44; … … 1144 1151 else if(rnd<.9911) N=43; 1145 1152 else N=40; 1146 }1147 }1153 } 1154 } 1148 1155 else 1149 {1156 { 1150 1157 if(i==35) // Br 1151 {1158 { 1152 1159 if (rnd<.5069) N=44; 1153 1160 else N=46; 1154 }1161 } 1155 1162 else // Kr (36) 1156 {1163 { 1157 1164 if (rnd<.57) N=48; 1158 1165 else if(rnd<.743) N=50; … … 1161 1168 else if(rnd<.9965) N=44; 1162 1169 else N=42; 1163 }1170 } 1164 1171 } 1165 1172 } … … 1167 1174 { 1168 1175 if (i<40) 1169 {1176 { 1170 1177 if(i==37) // Rb 1171 {1178 { 1172 1179 if (rnd<.7217) N=48; 1173 1180 else N=50; 1174 }1181 } 1175 1182 else // SR (38) 1176 {1183 { 1177 1184 if (rnd<.8258) N=50; 1178 1185 else if(rnd<.9244) N=48; 1179 1186 else if(rnd<.9944) N=49; 1180 1187 else N=46; 1181 }1182 }1188 } 1189 } 1183 1190 else 1184 {1191 { 1185 1192 if(i==40) // Zr 1186 {1193 { 1187 1194 if (rnd<.5145) N=50; 1188 1195 else if(rnd<.6883) N=54; … … 1190 1197 else if(rnd<.972) N=51; 1191 1198 else N=56; 1192 }1199 } 1193 1200 else // Mo (42) 1194 {1201 { 1195 1202 if (rnd<.2413) N=56; 1196 1203 else if(rnd<.4081) N=54; … … 1200 1207 else if(rnd<.9075) N=55; 1201 1208 else N=52; 1202 }1209 } 1203 1210 } 1204 1211 } 1205 1212 } 1206 }1213 } 1207 1214 } 1208 else // ====== Ru - U1209 {1215 else // ====== Ru - U 1216 { 1210 1217 if (i<66) // ------ Ru - Gd 1211 {1218 { 1212 1219 if (i<54) // ______ Ru - Te 1213 {1220 { 1214 1221 if (i<49) // ...... Ru - Cd 1215 {1222 { 1216 1223 if (i<47) 1217 {1224 { 1218 1225 if(i==44) // Ru 1219 {1226 { 1220 1227 if (rnd<.316) N=58; 1221 1228 else if(rnd<.502) N=60; … … 1225 1232 else if(rnd<.9814) N=52; 1226 1233 else N=54; 1227 }1234 } 1228 1235 else // Pd (46) 1229 {1236 { 1230 1237 if (rnd<.2733) N=60; 1231 1238 else if(rnd<.5379) N=62; … … 1234 1241 else if(rnd<.9898) N=58; 1235 1242 else N=56; 1236 }1237 }1243 } 1244 } 1238 1245 else 1239 {1246 { 1240 1247 if(i==47) // Ag 1241 {1248 { 1242 1249 if(rnd<.51839) N=60; 1243 1250 else N=62; 1244 }1251 } 1245 1252 else // Cd (48) 1246 {1253 { 1247 1254 if (rnd<.2873) N=66; 1248 1255 else if(rnd<.5286) N=64; … … 1253 1260 else if(rnd<.9911) N=58; 1254 1261 else N=60; 1255 }1262 } 1256 1263 } 1257 1264 } … … 1259 1266 { 1260 1267 if (i<51) 1261 {1268 { 1262 1269 if(i==49) // In 1263 {1270 { 1264 1271 if (rnd<.9577) N=66; 1265 1272 else N=64; 1266 }1273 } 1267 1274 else // Sn (50) 1268 {1275 { 1269 1276 if (rnd<.3259) N=70; 1270 1277 else if(rnd<.5681) N=68; … … 1278 1285 //else if(rnd<.9964) N=64; 1279 1286 //else N=65; 1280 }1281 }1287 } 1288 } 1282 1289 else 1283 {1290 { 1284 1291 if(i==51) // Sb 1285 {1292 { 1286 1293 if (rnd<.5736) N=70; 1287 1294 else N=72; 1288 }1295 } 1289 1296 else // Te (52) 1290 {1297 { 1291 1298 if (rnd<.3387) N=78; 1292 1299 else if(rnd<.6557) N=76; … … 1297 1304 else if(rnd<.99905) N=71; 1298 1305 else N=68; 1299 }1306 } 1300 1307 } 1301 1308 } … … 1304 1311 { 1305 1312 if (i<60) // ...... Xe - B 1306 {1313 { 1307 1314 if (i<57) 1308 {1315 { 1309 1316 if(i==54) // Xe 1310 {1317 { 1311 1318 if (rnd<.269) N=78; 1312 1319 else if(rnd<.533) N=75; … … 1318 1325 else if(rnd<.9991) N=70; 1319 1326 else N=72; 1320 }1327 } 1321 1328 else // Ba (56) 1322 {1329 { 1323 1330 if (rnd<.717) N=82; 1324 1331 else if(rnd<.8293) N=81; … … 1328 1335 else if(rnd<.99899) N=74; 1329 1336 else N=76; 1330 }1331 }1337 } 1338 } 1332 1339 else 1333 {1340 { 1334 1341 if(i==57) // La 1335 {1342 { 1336 1343 if (rnd<.999098)N=82; 1337 1344 else N=81; 1338 }1345 } 1339 1346 else // Ce (58) 1340 {1347 { 1341 1348 if (rnd<.8843) N=82; 1342 1349 else if(rnd<.9956) N=84; 1343 1350 else if(rnd<.9981) N=80; 1344 1351 else N=78; 1345 }1352 } 1346 1353 } 1347 1354 } … … 1349 1356 { 1350 1357 if (i<63) 1351 {1358 { 1352 1359 if(i==60) // Nd 1353 {1360 { 1354 1361 if (rnd<.2713) N=82; 1355 1362 else if(rnd<.5093) N=84; … … 1359 1366 else if(rnd<.9436) N=88; 1360 1367 else N=90; 1361 }1368 } 1362 1369 else // Sm (62) 1363 {1370 { 1364 1371 if (rnd<.267) N=90; 1365 1372 else if(rnd<.494) N=92; … … 1369 1376 else if(rnd<.969) N=88; 1370 1377 else N=82; 1371 }1372 }1378 } 1379 } 1373 1380 else 1374 {1381 { 1375 1382 if(i==63) // Eu 1376 {1383 { 1377 1384 if (rnd<.522) N=90; 1378 1385 else N=89; 1379 }1386 } 1380 1387 else // Gd (64) 1381 {1388 { 1382 1389 if (rnd<.2484) N=94; 1383 1390 else if(rnd<.4670) N=96; … … 1387 1394 else if(rnd<.9980) N=90; 1388 1395 else N=88; 1389 }1396 } 1390 1397 } 1391 1398 } 1392 1399 } 1393 }1394 else // ------ Dy - U1395 {1400 } 1401 else // ------ Dy - U 1402 { 1396 1403 if (i<76) // ______ Dy - Re 1397 {1404 { 1398 1405 if (i<72) // ...... Dy - Lu 1399 {1406 { 1400 1407 if (i<70) 1401 {1408 { 1402 1409 if(i==66) // Dy 1403 {1410 { 1404 1411 if (rnd<.282) N=98; 1405 1412 else if(rnd<.537) N=96; … … 1409 1416 else if(rnd<.9994) N=92; 1410 1417 else N=90; 1411 }1418 } 1412 1419 else // Er (68) 1413 {1420 { 1414 1421 if (rnd<.3360) N= 98; 1415 1422 else if(rnd<.6040) N=100; … … 1418 1425 else if(rnd<.9986) N= 96; 1419 1426 else N= 94; 1420 }1421 }1427 } 1428 } 1422 1429 else 1423 {1430 { 1424 1431 if(i==70) // Yb 1425 {1432 { 1426 1433 if (rnd<.3180) N=104; 1427 1434 else if(rnd<.5370) N=102; … … 1431 1438 else if(rnd<.9987) N=100; 1432 1439 else N= 98; 1433 }1440 } 1434 1441 else // Lu (71) 1435 {1442 { 1436 1443 if (rnd<.9741) N=104; 1437 1444 else N=105; 1438 }1445 } 1439 1446 } 1440 1447 } … … 1442 1449 { 1443 1450 if (i<74) 1444 {1451 { 1445 1452 if(i==72) // Hf 1446 {1453 { 1447 1454 if (rnd<.35100) N=108; 1448 1455 else if(rnd<.62397) N=106; … … 1451 1458 else if(rnd<.99838) N=104; 1452 1459 else N=102; 1453 }1460 } 1454 1461 else // Ta (73) 1455 {1462 { 1456 1463 if(rnd<.99988) N=108; 1457 1464 else N=107; 1458 }1459 }1465 } 1466 } 1460 1467 else 1461 {1468 { 1462 1469 if(i==74) // W 1463 {1470 { 1464 1471 if (rnd<.307) N=110; 1465 1472 else if(rnd<.593) N=112; … … 1467 1474 else if(rnd<.9988) N=109; 1468 1475 else N=106; 1469 }1476 } 1470 1477 else // Re (75) 1471 {1478 { 1472 1479 if (rnd<.626) N=112; 1473 1480 else N=110; 1474 }1481 } 1475 1482 } 1476 1483 } … … 1479 1486 { 1480 1487 if (i<81) // ...... Os - Hg 1481 {1488 { 1482 1489 if (i<78) 1483 {1490 { 1484 1491 if(i==76) // Os 1485 {1492 { 1486 1493 if (rnd<.410) N=116; 1487 1494 else if(rnd<.674) N=114; … … 1491 1498 else if(rnd<.9998) N=110; 1492 1499 else N=108; 1493 }1500 } 1494 1501 else // Ir (77) 1495 {1502 { 1496 1503 if (rnd<.627) N=116; 1497 1504 else N=114; 1498 }1499 }1505 } 1506 } 1500 1507 else 1501 {1508 { 1502 1509 if(i==78) // Pt 1503 {1510 { 1504 1511 if (rnd<.338) N=117; 1505 1512 else if(rnd<.667) N=116; … … 1508 1515 else if(rnd<.9999) N=114; 1509 1516 else N=112; 1510 }1517 } 1511 1518 else // Hg (80) 1512 {1519 { 1513 1520 if (rnd<.2986) N=122; 1514 1521 else if(rnd<.5296) N=120; … … 1518 1525 else if(rnd<.9985) N=124; 1519 1526 else N=116; 1520 }1527 } 1521 1528 } 1522 1529 } … … 1524 1531 { 1525 1532 if (i<92) 1526 {1533 { 1527 1534 if (i==81) // Tl 1528 {1535 { 1529 1536 if (rnd<.70476) N=124; 1530 1537 else N=122; 1531 }1538 } 1532 1539 else // Pb (82) 1533 {1540 { 1534 1541 if (rnd<.524) N=126; 1535 1542 else if(rnd<.765) N=124; 1536 1543 else if(rnd<.986) N=125; 1537 1544 else N=122; 1538 }1539 }1545 } 1546 } 1540 1547 else // U (92) 1541 {1548 { 1542 1549 if (rnd<.992745)N=146; 1543 1550 else if(rnd<.999945)N=143; 1544 1551 else N=142; 1545 }1552 } 1546 1553 } 1547 1554 } 1548 }1555 } 1549 1556 } 1550 1557 } … … 1597 1604 if(j==I-1.) 1598 1605 { 1599 if(fabs(sumAbu-1.)>.00001)1606 if(fabs(sumAbu-1.)>.00001) 1600 1607 { 1601 1608 G4cerr<<"--Worning--G4QIsotope::InitEl:maxSum="<<sumAbu<<" is fixed to 1."<<G4endl; … … 1604 1611 } 1605 1612 else if(sumAbu-abu>1.) 1606 {1613 { 1607 1614 G4cerr<<"--Worning--G4QIsotope::InitEl:(-2)WrongAbund,Z="<<Z<<",i="<<index<<G4endl; 1608 1615 for(G4int k=0; k<I-1; k++) … … 1632 1639 } 1633 1640 pair<G4int,vector<pair<G4int,G4double>*>*>* newAP= 1634 new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,A);1641 new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,A); 1635 1642 newElems.push_back(newAP); 1636 1643 pair<G4int,vector<pair<G4int,G4double>*>*>* newSA= 1637 new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,S);1644 new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,S); 1638 1645 newSumAb.push_back(newSA); 1639 1646 pair<G4int,vector<pair<G4int,G4double>*>*>* newCP= 1640 new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,C);1647 new pair<G4int,vector<pair<G4int,G4double>*>*>(ZInd,C); 1641 1648 newIsoCS.push_back(newCP); 1642 1649 #ifdef debug … … 1869 1876 { 1870 1877 #ifdef ppdebug 1871 G4cout<<"G4QIsotope::GetMeanCrossSection: Nat Abundance, Z="<<Z<<G4endl;1878 G4cout<<"G4QIsotope::GetMeanCrossSection: Nat Abundance, Z="<<Z<<G4endl; 1872 1879 #endif 1873 1880 ab=natElements[Z]; … … 1877 1884 { 1878 1885 #ifdef ppdebug 1879 G4cout<<"G4QIsotope::GetMeanCrossSection: Art Abund, Z="<<Z<<",ind="<<index<<G4endl;1886 G4cout<<"G4QIsotope::GetMeanCrossSection: Art Abund, Z="<<Z<<",ind="<<index<<G4endl; 1880 1887 #endif 1881 1888 // For the positive index tries to find the newUserDefinedElement … … 1913 1920 G4double sum=0.; 1914 1921 for(G4int j=0; j<nis; j++) 1915 {1922 { 1916 1923 G4double cur=(*ab)[j]->second; 1917 1924 //G4double abunda=cur-last; 1918 1925 //last=cur; 1919 1926 #ifdef ppdebug 1920 G4cout<<"G4QIsot::GetMeanCS:j="<<j<<",ab="<<cur<<",CS="<<(*cs)[j]->second<<G4endl;1927 G4cout<<"G4QIsot::GetMeanCS:j="<<j<<",ab="<<cur<<",CS="<<(*cs)[j]->second<<G4endl; 1921 1928 #endif 1922 1929 //sum+=abunda * (*cs)[j]->second; … … 1983 1990 vector<G4double> scs(nis); 1984 1991 for(G4int j=0; j<nis; j++) 1985 {1992 { 1986 1993 G4double cur=(*ab)[j]->second; 1987 1994 G4double abunda=cur-last; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QNucleus.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNucleus.cc,v 1.9 5 2008/03/31 20:30:17 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNucleus.cc,v 1.96 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QNucleus ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for Nuclei/Nuclear Environment used by CHIPS Model 33 // ------------------------------------------------------------------ 33 // --------------------------------------------------------------------- 34 // Short description: a class describing properties of nuclei, which 35 // are necessary for the CHIPS Model. 36 // --------------------------------------------------------------------- 37 34 38 35 39 //#define debug … … 56 60 57 61 G4QNucleus::G4QNucleus(): G4QHadron(),Z(0),N(0),S(0),dZ(0),dN(0),dS(0),maxClust(0), 58 currentNucleon(-1),rho0(0),radius(0)59 //probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()62 currentNucleon(-1),rho0(0),radius(0) 63 //probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb() 60 64 { 61 65 //Tb = new std::vector<G4double>; … … 115 119 G4QNucleus::G4QNucleus(G4LorentzVector p, G4int nucPDG): G4QHadron(nucPDG,p),maxClust(0), 116 120 currentNucleon(-1),rho0(0),radius(0) 117 // probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()121 //probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb() 118 122 { 119 123 //Tb = new std::vector<G4double>; … … 324 328 clustProb=c; 325 329 mediRatio=d; 326 nucleonDistance=e;330 nucleonDistance=e; 327 331 } 328 332 … … 353 357 probVect[0]=mediRatio; // init Vacuum/Medium probability 354 358 for(G4int i=1; i<256; i++) {probVect[i] = 0.;} 359 //std::uninitialized_fill( probVect+1, probVect+256, 0.0 ); // Worse in performance! 355 360 if(nucPDG<80000000) nucPDG=HadrToNucPDG(nucPDG); // Convert HadrPDGCode to NucPDGCode 356 361 G4int s=0; … … 375 380 SetNFragments(0); 376 381 #ifdef debug 377 G4cout<<"G4QNucleus::InitByPDG:->QPDG="<<nPDG<<": 4M="<<p<<G4endl;382 G4cout<<"G4QNucleus::InitByPDG:->QPDG="<<nPDG<<": 4M="<<p<<G4endl; 378 383 #endif 379 384 } … … 426 431 if (din && dA<2 && a>2) 427 432 { 428 dA=2;433 dA=2; 429 434 sA=a-2; 430 435 } … … 480 485 sum =prb; 481 486 #ifdef pdebug 482 G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[1]=s="<<sum<<",dA="<<dA<<",uA="<<uA<<G4endl;487 G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[1]=s="<<sum<<",dA="<<dA<<",uA="<<uA<<G4endl; 483 488 #endif 484 489 //probVect[1]= prb/comb; // a#of quasi-free nucleons (correct) … … 494 499 sum+=prb+prb; 495 500 #ifdef pdebug 496 G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[2]="<<prb<<",s="<<sum<<",pA="<<pA<<G4endl;501 G4cout<<"G4QNucl::UpdateCl:sud="<<sud<<",v[2]="<<prb<<",s="<<sum<<",pA="<<pA<<G4endl; 497 502 #endif 498 503 //probVect[2]= prb/comb; // a#of quasi-free "dibaryons" (correct) … … 504 509 maxi=3; 505 510 #ifdef debug 506 G4cout<<"G4QNucleus::UpdateClusters:p1="<<probVect[1]<<", p2="<<probVect[2]<<",sA="<<sA511 G4cout<<"G4QNucleus::UpdateClusters:p1="<<probVect[1]<<", p2="<<probVect[2]<<",sA="<<sA 507 512 <<",uA="<<uA<<",pA="<<pA<<",wrd="<<wrd<<",sud="<<sud<<G4endl; 508 513 #endif … … 518 523 sum+=rd*i; 519 524 #ifdef pdebug 520 G4cout<<"G4QNucleus::UpdateCl:sud="<<sud<<", v["<<i<<"]="<<rd<<", s="<<sum<<G4endl;525 G4cout<<"G4QNucleus::UpdateCl:sud="<<sud<<", v["<<i<<"]="<<rd<<", s="<<sum<<G4endl; 521 526 #endif 522 527 //comb*=(itA-i)/i; … … 529 534 #endif 530 535 } 531 }536 } 532 537 dS = S; // @@ Lambdas are always in the dense region 533 538 dZ = static_cast<int>(static_cast<double>((dA-dS)*Z)/(Z+N) + 0.5); … … 555 560 // <<G4endl; 556 561 //#endif 557 // G4int m=RandomizeBinom(prob,jmax); // A#of clusters of this type562 // G4int m=RandomizeBinom(prob,jmax); // A#of clusters of this type 558 563 // if(m) 559 564 // { … … 595 600 { 596 601 //if(abs(newPDG)<NUCPDG) 597 //{602 //{ 598 603 // G4cerr<<"***G4QNucleus::Reduce:iPDG="<<curPDG<<"=newPDG="<<newPDG<<"+cPDG="<<cPDG 599 604 // <<G4endl; 600 605 // throw G4QException("*E*:::G4QNucleus::Reduce: Abnormal Nuclear Reduction"); 601 //}606 //} 602 607 InitByPDG(newPDG); // Reinit the Nucleus 603 }608 } 604 609 } 605 610 else if(cPDG!=NUCPDG) G4cerr<<"***G4QN::Reduce:Subtract not nuclear PDGC="<<cPDG<<G4endl; … … 946 951 { 947 952 G4cerr<<"***G4QNucl::EvapBary: tM="<<totMass<<"-> 2N="<<nucPDG<<"(M=" 948 <<nucM<<") + pi="<<piPDG<<"(M="<<mPi<<")"<<G4endl;953 <<nucM<<") + pi="<<piPDG<<"(M="<<mPi<<")"<<G4endl; 949 954 //throw G4QException("G4QNucl::EvapBary:ISO-dibaryon DecayIn3 did not succeed"); 950 955 return false; … … 1131 1136 pp2m=(tM2-mpls*mpls)*(tM2-mmin*mmin)/qtM2; 1132 1137 if(pp2m>=0.000001) 1133 {1138 { 1134 1139 pFlag=true; 1135 1140 pBnd=mProt-GSMass+GSResNp; // Binding energy for proton 1136 1141 G4double eMax=sqrt(mP2+pp2m); 1137 1142 #ifdef pdebug 1138 G4cout<<"G4QNuc::EvapBaryon:pm="<<eMax+sqrt(pp2m+GSResNp*GSResNp)<<" = M="<<totMass1143 G4cout<<"G4QNuc::EvapBaryon:pm="<<eMax+sqrt(pp2m+GSResNp*GSResNp)<<" = M="<<totMass 1139 1144 <<", sm="<<GSResNp+mProt+PBarr<<",pp2="<<pp2m<<",pB="<<pBnd<<G4endl; 1140 1145 #endif 1141 1146 pExcess=eMax-mProt+pBnd; // Max Kin Energy from bottom 1142 }1147 } 1143 1148 else pExcess=pBnd; 1144 1149 if(Z>1) 1145 {1150 { 1146 1151 ppQPDG=G4QPDGCode(90000000+1000*(1000*S+Z-2)+N); 1147 1152 GSResPP=ppQPDG.GetMass(); 1148 1153 #ifdef pdebug 1149 1154 G4double sm=GSResPP+mProt+mProt+SPPBarr; 1150 G4cout<<"G4QNucl::EvapBaryon: ppM="<<GSResPP<<",T="<<sm-GSMass<<",E="<<totMass-sm1155 G4cout<<"G4QNucl::EvapBaryon: ppM="<<GSResPP<<",T="<<sm-GSMass<<",E="<<totMass-sm 1151 1156 <<",C="<<PBarr<<G4endl; 1152 1157 #endif … … 1162 1167 #ifdef pdebug 1163 1168 G4double s=GSResPA+mAlph+mProt+SAPBarr; 1164 G4cout<<"G4QN::EB:paM="<<GSResPA<<",T="<<s-GSMass<<",E="<<totMass-s<<G4endl;1169 G4cout<<"G4QN::EB:paM="<<GSResPA<<",T="<<s-GSMass<<",E="<<totMass-s<<G4endl; 1165 1170 #endif 1166 1171 if(GSResPA+mProt+SAPBarr+mAlph<totMass) paFlag=true; 1167 }1172 } 1168 1173 } 1169 1174 if(N>0&&a>3) … … 1171 1176 GSReNPP=G4QPDGCode().GetNuclMass(Z-2,N-1,S); 1172 1177 if(GSReNPP+mProt+mProt+SPPBarr+mNeut<totMass) nppF=true; 1173 }1178 } 1174 1179 if(S>0&&a>3) 1175 1180 { 1176 1181 GSRePPL=G4QPDGCode().GetNuclMass(Z-2,N,S-1); 1177 1182 if(GSRePPL+mProt+mProt+SPPBarr+mLamb<totMass) pplF=true; 1178 }1183 } 1179 1184 if(N>1&&a>4) 1180 1185 { … … 1185 1190 GSReLLA=G4QPDGCode().GetNuclMass(Z-2,N-2,S-2); 1186 1191 if(GSReLLA+mAlph+ABarr+mLamb+mLamb<totMass) llaF=true; 1187 }1192 } 1188 1193 if(N>2&&S>0) 1189 1194 { 1190 1195 GSReNLA=G4QPDGCode().GetNuclMass(Z-2,N-3,S-1); 1191 1196 if(GSReNLA+mAlph+ABarr+mNeut+mLamb<totMass) nlaF=true; 1192 }1197 } 1193 1198 if(Z>2&&S>0) 1194 1199 { 1195 1200 GSRePLA=G4QPDGCode().GetNuclMass(Z-3,N-2,S-1); 1196 1201 if(GSRePLA+mAlph+SAPBarr+mProt+mLamb<totMass) plaF=true; 1197 }1202 } 1198 1203 if(N>3) 1199 1204 { 1200 1205 GSReNNA=G4QPDGCode().GetNuclMass(Z-2,N-4,S); 1201 1206 if(GSReNNA+mAlph+ABarr+mNeut+mNeut<totMass) nnaF=true; 1202 }1207 } 1203 1208 if(Z>2&&N>2) 1204 1209 { 1205 1210 GSReNPA=G4QPDGCode().GetNuclMass(Z-3,N-3,S); 1206 1211 if(GSReNPA+mAlph+SAPBarr+mProt+mNeut<totMass) npaF=true; 1207 }1212 } 1208 1213 if(N>3) 1209 1214 { 1210 1215 GSRePPA=G4QPDGCode().GetNuclMass(Z-4,N-2,S); 1211 1216 if(GSRePPA+mAlph+SPPABarr+mProt+mProt<totMass) ppaF=true; 1212 }1217 } 1213 1218 if(a>9) 1214 1219 { … … 1233 1238 if(GSReAAA+mAlph+mAlph+mAlph+SAAABarr<totMass) aaaF=true; 1234 1239 } 1235 }1236 }1240 } 1241 } 1237 1242 if(N>3&&Z>3&&a>8) 1238 1243 { … … 1241 1246 #ifdef pdebug 1242 1247 G4double s=GSResAA+mAlph+mAlph+SAABarr; 1243 G4cout<<"G4QNucl::EvapBaryon: a="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s1248 G4cout<<"G4QNucl::EvapBaryon: a="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s 1244 1249 <<",A="<<SAABarr<<G4endl; 1245 1250 #endif 1246 1251 if(GSResAA+mAlph+mAlph+SAABarr<totMass) aaFlag=true; 1247 }1252 } 1248 1253 if(N>2&&a>5) 1249 1254 { … … 1252 1257 #ifdef pdebug 1253 1258 G4double s=GSResNA+mAlph+mNeut; 1254 G4cout<<"G4QNucl::EvapBary: M="<<GSResNA<<",T="<<s-GSMass<<",E="<<totMass-s1259 G4cout<<"G4QNucl::EvapBary: M="<<GSResNA<<",T="<<s-GSMass<<",E="<<totMass-s 1255 1260 <<",C="<<ABarr<<G4endl; 1256 1261 #endif 1257 1262 if(GSResNA+mNeut+mAlph+ABarr<totMass) naFlag=true; 1258 }1263 } 1259 1264 if(S>0&&a>5) 1260 1265 { … … 1262 1267 GSResLA=laQPDG.GetMass(); 1263 1268 if(GSResLA+mLamb+mAlph+ABarr<totMass) laFlag=true; 1264 }1269 } 1265 1270 AQPDG =G4QPDGCode(90000000+1000*(1000*S+Z-2)+N-2); 1266 1271 GSResNa=AQPDG.GetMass(); … … 1269 1274 ap2m=(tM2-mpls*mpls)*(tM2-mmin*mmin)/qtM2; 1270 1275 if(ap2m>=0.000001) 1271 {1276 { 1272 1277 aFlag=true; 1273 1278 aBnd=mAlph-GSMass+GSResNa; // Binding energy for ALPHA 1274 1279 G4double eMax=sqrt(mA2+ap2m); 1275 1280 #ifdef pdebug 1276 G4cout<<"G4QNuc::EvapBar:m="<<eMax+sqrt(ap2m+GSResNa*GSResNa)<<" = M="<<totMass1281 G4cout<<"G4QNuc::EvapBar:m="<<eMax+sqrt(ap2m+GSResNa*GSResNa)<<" = M="<<totMass 1277 1282 <<", sm="<<GSResNp+mProt+PBarr<<",pp2="<<pp2m<<",pB="<<pBnd<<G4endl; 1278 1283 #endif 1279 1284 aExcess=eMax-mAlph+aBnd; // Max Kin Energy from bottom 1280 }1285 } 1281 1286 else aExcess=pBnd; 1282 }1283 }1287 } 1288 } 1284 1289 if(N>0) 1285 {1290 { 1286 1291 if(Z>0) 1287 1292 { … … 1290 1295 #ifdef pdebug 1291 1296 G4double s=GSResNP+mNeut+mProt; 1292 G4cout<<"G4QNucl::EvapBaryon: npM="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s1297 G4cout<<"G4QNucl::EvapBaryon: npM="<<GSResNP<<",T="<<s-GSMass<<",E="<<totMass-s 1293 1298 <<",C="<<PBarr<<G4endl; 1294 1299 #endif 1295 1300 if(GSResNP+mNeut+mProt+PBarr<totMass) npFlag=true; 1296 }1301 } 1297 1302 if(N>1) 1298 1303 { 1299 1304 GSReNNP=G4QPDGCode().GetNuclMass(Z-1,N-2,S); 1300 1305 if(GSReNNP+mProt+PBarr+mNeut+mNeut<totMass) nnpF=true; 1301 }1306 } 1302 1307 if(S>0) 1303 1308 { 1304 1309 GSReNPL=G4QPDGCode().GetNuclMass(Z-1,N-1,S-1); 1305 1310 if(GSReNPL+mProt+PBarr+mNeut+mLamb<totMass) nplF=true; 1306 }1307 }1311 } 1312 } 1308 1313 if(S>0) 1309 {1314 { 1310 1315 if(Z>0) 1311 1316 { … … 1313 1318 GSResPL=plQPDG.GetMass(); 1314 1319 if(GSResPL+mProt+PBarr+mLamb<totMass) plFlag=true; 1315 }1320 } 1316 1321 if(S>1) 1317 1322 { 1318 1323 GSRePLL=G4QPDGCode().GetNuclMass(Z-1,N,S-2); 1319 1324 if(GSRePLL+mProt+PBarr+mLamb+mLamb<totMass) pllF=true; 1320 }1321 }1322 }1325 } 1326 } 1327 } 1323 1328 G4double GSResNn= GSMass; // Prototype of Residual Nuclear Mass for neutron 1324 1329 G4double nExcess= 0.; // Prototype of excess energy for neutron … … 1330 1335 GSResNn=NQPDG.GetMass(); 1331 1336 #ifdef pdebug 1332 G4cout<<"G4QNucleus::EvapBaryon: M(A-N)="<<GSResNn<<",Z="<<Z1337 G4cout<<"G4QNucleus::EvapBaryon: M(A-N)="<<GSResNn<<",Z="<<Z 1333 1338 <<",N="<<N<<",S="<<S<<G4endl; 1334 1339 #endif … … 1346 1351 #endif 1347 1352 nExcess=eMax-mNeut+nBnd; 1348 }1353 } 1349 1354 else nExcess=nBnd; 1350 1355 if(N>1) 1351 {1356 { 1352 1357 nnQPDG=G4QPDGCode(90000000+1000*(1000*S+Z)+N-2); 1353 1358 GSResNN=nnQPDG.GetMass(); … … 1357 1362 GSReNNN=G4QPDGCode().GetNuclMass(Z,N-3,S); 1358 1363 if(GSReNNN+mNeut*3<totMass) nnnF=true; 1359 }1364 } 1360 1365 if(S>0) 1361 1366 { 1362 1367 GSReNNL=G4QPDGCode().GetNuclMass(Z,N-2,S-1); 1363 1368 if(GSReNNL+mNeut+mNeut+mLamb<totMass) nnlF=true; 1364 }1365 }1369 } 1370 } 1366 1371 if(S>0) 1367 {1372 { 1368 1373 nlQPDG=G4QPDGCode(90000000+1000*(1000*(S-1)+Z)+N-1); 1369 1374 GSResNL=nlQPDG.GetMass(); … … 1373 1378 GSReNLL=G4QPDGCode().GetNuclMass(Z,N-1,S-2); 1374 1379 if(GSReNLL+mNeut+mLamb+mLamb<totMass) nllF=true; 1375 }1376 }1377 }1380 } 1381 } 1382 } 1378 1383 G4double GSResNl= GSMass; // Prototype of Residual Nuclear Mass for Lambda 1379 1384 G4double lExcess= 0.; // Prototype of excess energy for Lambda … … 1397 1402 #endif 1398 1403 lExcess=eMax-mLamb+lBnd; 1399 }1404 } 1400 1405 else lExcess=lBnd; 1401 1406 if(S>1) 1402 {1407 { 1403 1408 llQPDG=G4QPDGCode(90000000+1000*(1000*(S-2)+Z)+N); 1404 1409 GSResLL=llQPDG.GetMass(); … … 1408 1413 GSReLLL=G4QPDGCode().GetNuclMass(Z,N,S-3); 1409 1414 if(GSReLLL+mLamb*3<totMass) lllF=true; 1410 }1411 }1412 }1415 } 1416 } 1417 } 1413 1418 G4bool nSecF = nnFlag||npFlag||nlFlag||naFlag; // Pos of second radiation after neutron 1414 1419 G4bool pSecF = npFlag||ppFlag||plFlag||paFlag; // Pos of second radiation after proton … … 1422 1427 //G4bool thdB = nTrF||pTrF||lTrF||aTrF||naaF||paaF||laaF||aaaF;// Pos to radiate three 1423 1428 #ifdef pdebug 1424 G4cout<<"G4QNucl::EvapBary:n="<<nSecF<<",p="<<pSecF<<",l="<<lSecF<<",a="<<aSecF<<",nn="1429 G4cout<<"G4QNucl::EvapBary:n="<<nSecF<<",p="<<pSecF<<",l="<<lSecF<<",a="<<aSecF<<",nn=" 1425 1430 <<nnFlag<<", np="<<npFlag<<",pp="<<ppFlag<<",pa="<<paFlag<<",na="<<naFlag<<",aa=" 1426 1431 <<aaFlag<<G4endl; … … 1428 1433 G4QPDGCode bQPDG; 1429 1434 G4QPDGCode rQPDG; 1430 if(secB) // Decay in two baryons is possible1431 //if(thdB) //@@CHECK@@ Decay in three baryons is possible1435 if(secB) // Decay in two baryons is possible 1436 //if(thdB) //@@CHECK@@ Decay in three baryons is possible 1432 1437 { 1433 1438 if(!nSecF) nFlag=false; … … 1436 1441 if(!aSecF) aFlag=false; 1437 1442 #ifdef pdebug 1438 G4cout<<"G4QNuc::EB:nF="<<nFlag<<",pF="<<pFlag<<",lF="<<lFlag<<",aF="<<aFlag<<G4endl;1443 G4cout<<"G4QNuc::EB:nF="<<nFlag<<",pF="<<pFlag<<",lF="<<lFlag<<",aF="<<aFlag<<G4endl; 1439 1444 #endif 1440 1445 G4double maxE=0.; // Prototype for maximum energy … … 1475 1480 G4double ma=uWell*a+maxE; // Total Kinetic Energy of baryons (@@alphas?) 1476 1481 if(mi<0.) 1477 {1482 { 1478 1483 uW-=mi; 1479 1484 mm-=mi; 1480 1485 mi=0.; 1481 }1486 } 1482 1487 G4bool good=true; 1483 1488 if(ma<mm) … … 1487 1492 } 1488 1493 #ifdef pdebug 1489 G4cout<<"G4QNuc::EvapBary:iE="<<minE<<",aE="<<maxE<<",mi="<<mi<<",mm="<<mm<<",ma="1494 G4cout<<"G4QNuc::EvapBary:iE="<<minE<<",aE="<<maxE<<",mi="<<mi<<",mm="<<mm<<",ma=" 1490 1495 <<ma<<G4endl; 1491 1496 #endif … … 1500 1505 if(xMi>xMa) 1501 1506 { 1502 G4cerr<<"***G4QNucleus::EvapBaryon: M="<<mm/ma<<",xi="<<xMi<<",xa="<<xMa<<G4endl;1507 G4cerr<<"***G4QNucleus::EvapBaryon: M="<<mm/ma<<",xi="<<xMi<<",xa="<<xMa<<G4endl; 1503 1508 return false; 1504 1509 } … … 1506 1511 xMa=sqrt(xMa); // @@ ? 1507 1512 #ifdef pdebug 1508 G4cout<<"G4QNuc:EvapBaryon:mi="<<mi<<",ma="<<ma<<", xi="<<xMi<<",xa="<<xMa<<G4endl;1513 G4cout<<"G4QNuc:EvapBaryon:mi="<<mi<<",ma="<<ma<<", xi="<<xMi<<",xa="<<xMa<<G4endl; 1509 1514 #endif 1510 1515 G4double powr=1.5*a1; // Power for low & up limits … … 1528 1533 G4double x = sqrt(x2); 1529 1534 if(x<xMi||x>xMa) 1530 {1535 { 1531 1536 #ifdef pdebug 1532 1537 G4cerr<<"**G4QNucl::EvapB:R="<<R<<",xi="<<xMi<<" < "<<x<<" < xa="<<xMa<<G4endl; … … 1535 1540 else x=xMa; 1536 1541 x2 = x*x; 1537 }1542 } 1538 1543 G4double rn=G4UniformRand(); 1539 1544 //if(rn<x/xMa||!good) … … 1544 1549 G4double zCBPP=0.; // Probabylity for a proton 1545 1550 #ifdef pdebug 1546 G4cout<<"G4QNuc::EvapB:t="<<tk<<",pM="<<pMin<<",pB="<<pBnd<<",n="<<nMin<<",a="1551 G4cout<<"G4QNuc::EvapB:t="<<tk<<",pM="<<pMin<<",pB="<<pBnd<<",n="<<nMin<<",a=" 1547 1552 <<aMin<<G4endl; 1548 1553 #endif … … 1552 1557 //if(barf) kin-=PBarr; //@@ This is a mistake 1553 1558 #ifdef pdebug 1554 G4cout<<"G4QN::EB:Proton="<<kin<<",CB="<<PBarr<<",B="<<pBnd<<",M="<<pMin1559 G4cout<<"G4QN::EB:Proton="<<kin<<",CB="<<PBarr<<",B="<<pBnd<<",M="<<pMin 1555 1560 <<",p="<<CoulBarPenProb(PBarr,kin,1,1)<<G4endl; 1556 1561 #endif 1557 1562 zCBPP=Z*CoulBarPenProb(PBarr,kin,1,1)*sqrt(kin); 1558 }1563 } 1559 1564 psum+=zCBPP; 1560 1565 G4double nCBPP=0.; // Probability for a neutron (=> p+n) … … 1563 1568 G4double kin=tk-nBnd; 1564 1569 #ifdef pdebug 1565 G4cout<<"G4QN::EB:Neutron="<<kin<<",p="<<CoulBarPenProb(0.,kin,0,1)<<G4endl;1570 G4cout<<"G4QN::EB:Neutron="<<kin<<",p="<<CoulBarPenProb(0.,kin,0,1)<<G4endl; 1566 1571 #endif 1567 1572 nCBPP=N*CoulBarPenProb(0.,kin,0,1)*sqrt(kin); … … 1574 1579 G4double kin=tk-lBnd; 1575 1580 #ifdef pdebug 1576 G4cout<<"G4QN::EB:Lambda="<<kin<<",p="<<CoulBarPenProb(0,kin,0,1)<<G4endl;1581 G4cout<<"G4QN::EB:Lambda="<<kin<<",p="<<CoulBarPenProb(0,kin,0,1)<<G4endl; 1577 1582 #endif 1578 1583 lCBPP=S*CoulBarPenProb(0.,kin,0,1)*sqrt(kin); 1579 }1584 } 1580 1585 psum+=lCBPP; 1581 1586 lCBPP+=nCBPP; 1582 if(evalph&&aFlag&&tk>aMin)1587 if(evalph&&aFlag&&tk>aMin) 1583 1588 { 1584 1589 G4double kin=tk-aBnd; 1585 1590 //if(barf) kin-=ABarr; //@@ This is a mistake 1586 1591 #ifdef pdebug 1587 G4cout<<"G4QN::EB:Alpha="<<kin<<",CB="<<ABarr<<",p="1592 G4cout<<"G4QN::EB:Alpha="<<kin<<",CB="<<ABarr<<",p=" 1588 1593 <<CoulBarPenProb(ABarr,kin,2,4)<<G4endl; 1589 1594 #endif 1590 1595 psum+=CoulBarPenProb(ABarr,kin,2,4)*sqrt(kin)*evalph*Z*(Z-1)*N*(N-1) 1591 1596 *6/a1/(a-2)/(a-3); 1592 }1597 } 1593 1598 G4double r = psum*G4UniformRand(); 1594 1599 #ifdef pdebug 1595 G4cout<<"G4QNuc::EvapB:"<<r<<",p="<<zCBPP<<",pn="<<nCBPP<<",pnl="<<lCBPP<<",t="1600 G4cout<<"G4QNuc::EvapB:"<<r<<",p="<<zCBPP<<",pn="<<nCBPP<<",pnl="<<lCBPP<<",t=" 1596 1601 <<psum<<G4endl; 1597 1602 #endif 1598 1603 cond = false; 1599 1604 if (r&&r>lCBPP) 1600 {1601 #ifdef pdebug 1602 G4cout<<"G4QNuc::EvaB:ALPHA is selected for evap, r="<<r<<">"<<lCBPP<<G4endl;1605 { 1606 #ifdef pdebug 1607 G4cout<<"G4QNuc::EvaB:ALPHA is selected for evap, r="<<r<<">"<<lCBPP<<G4endl; 1603 1608 #endif 1604 1609 PDG=aPDG; 1605 }1610 } 1606 1611 else if(r&&r>nCBPP&&r<=lCBPP) 1607 1612 { 1608 1613 #ifdef pdebug 1609 G4cout<<"G4QNuc::EvaB:LAMBDA is selected for evap,r="<<r<<"<"<<lCBPP<<G4endl;1614 G4cout<<"G4QNuc::EvaB:LAMBDA is selected for evap,r="<<r<<"<"<<lCBPP<<G4endl; 1610 1615 #endif 1611 1616 PDG=lPDG; 1612 }1617 } 1613 1618 else if(r&&r>zCBPP&&r<=nCBPP) 1614 1619 { 1615 1620 #ifdef pdebug 1616 G4cout<<"G4QNuc::EvaBar: N is selected for evapor,r="<<r<<"<"<<nCBPP<<G4endl;1621 G4cout<<"G4QNuc::EvaBar: N is selected for evapor,r="<<r<<"<"<<nCBPP<<G4endl; 1617 1622 #endif 1618 1623 PDG=nPDG; 1619 }1624 } 1620 1625 else if(r&&r<=zCBPP) 1621 1626 { 1622 1627 #ifdef pdebug 1623 G4cout<<"G4QNuc::EvaBar: P is selected for evapor,r="<<r<<"<"<<zCBPP<<G4endl;1628 G4cout<<"G4QNuc::EvaBar: P is selected for evapor,r="<<r<<"<"<<zCBPP<<G4endl; 1624 1629 #endif 1625 1630 PDG=pPDG; 1626 }1631 } 1627 1632 else cond=true; 1628 }1633 } 1629 1634 #ifdef pdebug 1630 1635 G4cout<<"G4QNuc::EvapBar:c="<<cond<<",x="<<x<<",cnt="<<cntr<<",R="<<R<<",ma="<<ma … … 1632 1637 #endif 1633 1638 cntr++; 1634 }1639 } 1635 1640 if(cntr<cntm) // => Succeeded to find the evaporation channel 1636 {1641 { 1637 1642 G4double p2=0.; 1638 1643 if (PDG==aPDG) … … 1644 1649 p2=ap2m; 1645 1650 tk=sqrt(p2+mA2); 1646 }1651 } 1647 1652 eMass=mAlph; 1648 1653 bQPDG=aQPDG; 1649 1654 rQPDG=AQPDG; 1650 }1655 } 1651 1656 else if(PDG==pPDG) 1652 1657 { … … 1657 1662 p2=pp2m; 1658 1663 tk=sqrt(p2+mP2); 1659 }1664 } 1660 1665 eMass=mProt; 1661 1666 bQPDG=pQPDG; 1662 1667 rQPDG=PQPDG; 1663 }1668 } 1664 1669 else if(PDG==nPDG) 1665 1670 { … … 1673 1678 p2=np2m; 1674 1679 tk=sqrt(p2+mN2); 1675 }1680 } 1676 1681 eMass=mNeut; 1677 1682 bQPDG=nQPDG; 1678 1683 rQPDG=NQPDG; 1679 }1684 } 1680 1685 else if(PDG==lPDG) 1681 1686 { … … 1686 1691 p2=lp2m; 1687 1692 tk=sqrt(p2+mL2); 1688 }1693 } 1689 1694 eMass=mLamb; 1690 1695 bQPDG=lQPDG; 1691 1696 rQPDG=LQPDG; 1692 }1697 } 1693 1698 else G4cerr<<"***G4QNucleus::EvaporateBaryon: PDG="<<PDG<<G4endl; 1694 1699 G4double rEn=totMass-tk; … … 1721 1726 if(barf) aaCond = !aaFlag || (aaFlag && GSResAA+mAlph+SAABarr > rMass); 1722 1727 #ifdef pdebug 1723 G4cout<<"G4QNucl::EvaB:"<<PDG<<", E="<<tk<<", rM="<<rMass<<", ";1728 G4cout<<"G4QNucl::EvaB:"<<PDG<<", E="<<tk<<", rM="<<rMass<<", "; 1724 1729 if(PDG==pPDG) G4cout<<"PN="<<GSResNP+mNeut<<"("<<pnCond<<"),PP=" 1725 1730 <<GSResPP+mProt+PPBarr<<"("<<ppCond<<"),PL=" … … 1743 1748 //if(3>2)three=false; // @@@@@@@@@@@@@@@@@@ 1744 1749 //else if(PDG==pPDG&&(pnCond&&ppCond&&plCond&&paCond)) // @@@@@@@@@@@@@@@@@@@ 1745 if(PDG==pPDG&&(pnCond&&ppCond&&plCond&&paCond))//p+RN decay, p+b+RN dec is closed1746 {1747 #ifdef pdebug 1748 G4cout<<"G4QN::EB:*p*: n="<<pnCond<<",p="<<ppCond<<",l="<<plCond<<",a="<<paCond1750 if(PDG==pPDG&&(pnCond&&ppCond&&plCond&&paCond))//p+RN decay, p+b+RN dec is closed 1751 { 1752 #ifdef pdebug 1753 G4cout<<"G4QN::EB:*p*: n="<<pnCond<<",p="<<ppCond<<",l="<<plCond<<",a="<<paCond 1749 1754 <<G4endl; 1750 1755 #endif … … 1753 1758 G4double nLim=0.; 1754 1759 if(N&&GSResNP!=GSMass&&fMass+PBarr+mNeut+GSResNP<totMass) 1755 {1756 if(barf) nLim+=(N+N)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);1760 { 1761 if(barf) nLim+=(N+N)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2); 1757 1762 else nLim+=(N+N)*pow(totMass-mNeut-mProt-GSResNP,2); 1758 }1763 } 1759 1764 G4double zLim=nLim; 1760 1765 if(Z>1&&GSResPP!=GSMass&&fMass+mProt+SPPBarr+GSResPP<totMass) 1761 {1762 if(barf) zLim+=(Z-1)*pow(totMass-mProt-mProt-SPPBarr-GSResPP,2);1766 { 1767 if(barf) zLim+=(Z-1)*pow(totMass-mProt-mProt-SPPBarr-GSResPP,2); 1763 1768 else zLim+=(Z-1)*pow(totMass-mProt-mProt-GSResPP,2); 1764 }1769 } 1765 1770 G4double sLim=zLim; 1766 1771 if(S&&GSResPL!=GSMass&&fMass+PBarr+mLamb+GSResPL<totMass) 1767 {1768 if(barf) sLim+=(S+S)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);1772 { 1773 if(barf) sLim+=(S+S)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2); 1769 1774 else sLim+=(S+S)*pow(totMass-mProt-mLamb-GSResPL,2); 1770 }1775 } 1771 1776 G4double aLim=sLim; 1772 1777 if(evalph&&Z>2&&N>1&&a>4&&GSResPL!=GSMass&&fMass+SAPBarr+mAlph+GSResPA<totMass) 1773 {1774 if(barf) aLim+=pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2)*evalph*1778 { 1779 if(barf) aLim+=pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2)*evalph* 1775 1780 (Z-1)*(Z-2)*N*(N-1)*12/(a-2)/(a-3)/(a-4); 1776 1781 else aLim+=pow(totMass-mProt-mAlph-GSResPA,2)*evalph*(Z-1)*(Z-2)*N*(N-1) 1777 1782 *12/(a-2)/(a-3)/(a-4); 1778 }1783 } 1779 1784 G4double r = aLim*G4UniformRand(); 1780 1785 #ifdef pdebug 1781 G4cout<<"G4QNuc::EvaB:p, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="1786 G4cout<<"G4QNuc::EvaB:p, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a=" 1782 1787 <<aLim<<G4endl; 1783 1788 #endif … … 1785 1790 if(!aLim) three=false; 1786 1791 else if(r>sLim) 1787 {1792 { 1788 1793 eMass = mAlph; 1789 1794 dbQPDG= PAQPDG; … … 1791 1796 rQPDG = paQPDG; 1792 1797 #ifdef pdebug 1793 G4cout<<"G4QNucleus::EvaporateBary: P+A"<<G4endl;1794 #endif 1795 }1798 G4cout<<"G4QNucleus::EvaporateBary: P+A"<<G4endl; 1799 #endif 1800 } 1796 1801 else if(zLim<sLim&&r>zLim&&r<=sLim) 1797 {1802 { 1798 1803 eMass = mLamb; 1799 1804 dbQPDG= PLQPDG; … … 1801 1806 rQPDG = plQPDG; 1802 1807 #ifdef pdebug 1803 G4cout<<"G4QNucleus::EvaporateBary: P+L"<<G4endl;1804 #endif 1805 }1808 G4cout<<"G4QNucleus::EvaporateBary: P+L"<<G4endl; 1809 #endif 1810 } 1806 1811 else if(nLim<zLim&&r>nLim&&r<=zLim) 1807 {1812 { 1808 1813 eMass = mProt; 1809 1814 dbQPDG= PPQPDG; … … 1811 1816 rQPDG = ppQPDG; 1812 1817 #ifdef pdebug 1813 G4cout<<"G4QNucleus::EvaporateBary: P+P"<<G4endl;1814 #endif 1815 }1818 G4cout<<"G4QNucleus::EvaporateBary: P+P"<<G4endl; 1819 #endif 1820 } 1816 1821 else if(r<=nLim) 1817 {1822 { 1818 1823 eMass = mNeut; 1819 1824 dbQPDG= NPQPDG; … … 1821 1826 rQPDG = npQPDG; 1822 1827 #ifdef pdebug 1823 G4cout<<"G4QNucleus::EvaporateBary: P+N"<<G4endl;1824 #endif 1825 }1828 G4cout<<"G4QNucleus::EvaporateBary: P+N"<<G4endl; 1829 #endif 1830 } 1826 1831 else three=false; 1827 }1832 } 1828 1833 else if(PDG==nPDG&&(nnCond&&npCond&&nlCond&&naCond)) // n+b+RN decay can't happen 1829 { //@@ Take into account Coulomb Barier Penetration Probability1830 #ifdef pdebug 1831 G4cout<<"G4QN::EB:*n*: n="<<nnCond<<",p="<<npCond<<",l="<<nlCond<<",a="<<naCond1834 { //@@ Take into account Coulomb Barier Penetration Probability 1835 #ifdef pdebug 1836 G4cout<<"G4QN::EB:*n*: n="<<nnCond<<",p="<<npCond<<",l="<<nlCond<<",a="<<naCond 1832 1837 <<G4endl; 1833 1838 #endif … … 1839 1844 G4double zLim=nLim; 1840 1845 if(Z&&GSResNP!=GSMass&&fMass+mProt+PBarr+GSResNP<totMass) 1841 {1842 if(barf) zLim+=(Z+Z)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2);1846 { 1847 if(barf) zLim+=(Z+Z)*pow(totMass-mNeut-mProt-PBarr-GSResNP,2); 1843 1848 else zLim+=(Z+Z)*pow(totMass-mNeut-mProt-GSResNP,2); 1844 }1849 } 1845 1850 G4double sLim=zLim; 1846 1851 if(S&&GSResNL!=GSMass&&fMass+mLamb+GSResNL<totMass) … … 1848 1853 G4double aLim=sLim; 1849 1854 if(evalph&&Z>1&&N>2&&a>4&&GSResNA!=GSMass&&fMass+mAlph+ABarr+GSResNA<totMass) 1850 {1851 if(barf) aLim+=pow(totMass-mNeut-mAlph-ABarr-GSResNA,2)*1855 { 1856 if(barf) aLim+=pow(totMass-mNeut-mAlph-ABarr-GSResNA,2)* 1852 1857 evalph*Z*(Z-1)*(N-1)*(N-2)*12/(a-2)/(a-3)/(a-4); 1853 1858 else aLim+=pow(totMass-mNeut-mAlph-GSResNA,2)* 1854 1859 evalph*Z*(Z-1)*(N-1)*(N-2)*12/(a-2)/(a-3)/(a-4); 1855 }1860 } 1856 1861 G4double r = aLim*G4UniformRand(); 1857 1862 #ifdef pdebug 1858 G4cout<<"G4QN::EB:n, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim1863 G4cout<<"G4QN::EB:n, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim 1859 1864 <<G4endl; 1860 1865 #endif … … 1862 1867 if(!aLim) three=false; 1863 1868 else if(r>sLim) 1864 {1869 { 1865 1870 eMass = mAlph; 1866 1871 dbQPDG= NAQPDG; … … 1868 1873 rQPDG = naQPDG; 1869 1874 #ifdef pdebug 1870 G4cout<<"G4QNucleus::EvaporateBary: N+A"<<G4endl;1871 #endif 1872 }1875 G4cout<<"G4QNucleus::EvaporateBary: N+A"<<G4endl; 1876 #endif 1877 } 1873 1878 else if(zLim<sLim&&r>zLim&&r<=sLim) 1874 {1879 { 1875 1880 eMass = mLamb; 1876 1881 dbQPDG= NLQPDG; … … 1878 1883 rQPDG = nlQPDG; 1879 1884 #ifdef pdebug 1880 G4cout<<"G4QNucleus::EvaporateBary: N+L"<<G4endl;1881 #endif 1882 }1885 G4cout<<"G4QNucleus::EvaporateBary: N+L"<<G4endl; 1886 #endif 1887 } 1883 1888 else if(nLim<zLim&&r>nLim&&r<=zLim) 1884 {1889 { 1885 1890 eMass = mProt; 1886 1891 dbQPDG= NPQPDG; … … 1888 1893 rQPDG = npQPDG; 1889 1894 #ifdef pdebug 1890 G4cout<<"G4QNucleus::EvaporateBary: N+P"<<G4endl;1891 #endif 1892 }1895 G4cout<<"G4QNucleus::EvaporateBary: N+P"<<G4endl; 1896 #endif 1897 } 1893 1898 else if(r<=nLim) 1894 {1899 { 1895 1900 eMass = mNeut; 1896 1901 dbQPDG= NNQPDG; … … 1898 1903 rQPDG = nnQPDG; 1899 1904 #ifdef pdebug 1900 G4cout<<"G4QNucleus::EvaporateBary: N+N"<<G4endl;1901 #endif 1902 }1905 G4cout<<"G4QNucleus::EvaporateBary: N+N"<<G4endl; 1906 #endif 1907 } 1903 1908 else three=false; 1904 }1909 } 1905 1910 else if(PDG==lPDG&&(lnCond&&lpCond&&llCond&&laCond)) // l+b+RN decay can't happen 1906 { //@@ Take into account Coulomb Barier Penetration Probability1911 { //@@ Take into account Coulomb Barier Penetration Probability 1907 1912 #ifdef ppdebug 1908 G4cout<<"G4QN::EB:*l*: n="<<lnCond<<",p="<<lpCond<<",l="<<llCond<<",a="<<laCond1913 G4cout<<"G4QN::EB:*l*: n="<<lnCond<<",p="<<lpCond<<",l="<<llCond<<",a="<<laCond 1909 1914 <<G4endl; 1910 1915 #endif … … 1916 1921 G4double zLim=nLim; 1917 1922 if(Z&&GSResPL!=GSMass&&fMass+mProt+PBarr+GSResPL<totMass) 1918 {1919 if(barf) zLim+=(Z+Z)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2);1923 { 1924 if(barf) zLim+=(Z+Z)*pow(totMass-mProt-mLamb-PBarr-GSResPL,2); 1920 1925 else zLim+=(Z+Z)*pow(totMass-mProt-mLamb-GSResPL,2); 1921 }1926 } 1922 1927 G4double sLim=zLim; 1923 1928 if(S>1&&GSResLL!=GSMass&&fMass+mLamb+GSResLL<totMass) … … 1925 1930 G4double aLim=sLim; 1926 1931 if(evalph&&Z>1&&N>1&&a>4&&GSResLA!=GSMass&&fMass+mAlph+ABarr+GSResLA<totMass) 1927 {1928 if(barf) aLim+=pow(totMass-mLamb-mAlph-ABarr-GSResLA,2)*1932 { 1933 if(barf) aLim+=pow(totMass-mLamb-mAlph-ABarr-GSResLA,2)* 1929 1934 evalph*Z*(Z-1)*N*(N-1)*12/(a-2)/(a-3)/(a-4); 1930 1935 else aLim+=pow(totMass-mLamb-mAlph-GSResLA,2)* 1931 1936 evalph*Z*(Z-1)*N*(N-1)*12/(a-2)/(a-3)/(a-4); 1932 }1937 } 1933 1938 G4double r = aLim*G4UniformRand(); 1934 1939 #ifdef pdebug 1935 G4cout<<"G4QN::EB:l, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim1940 G4cout<<"G4QN::EB:l, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim 1936 1941 <<G4endl; 1937 1942 #endif … … 1939 1944 if(!aLim) three=false; 1940 1945 else if(r>sLim) 1941 {1946 { 1942 1947 eMass = mAlph; 1943 1948 dbQPDG= LAQPDG; … … 1945 1950 rQPDG = laQPDG; 1946 1951 #ifdef pdebug 1947 G4cout<<"G4QNucleus::EvaporateBary: L+A"<<G4endl;1948 #endif 1949 }1952 G4cout<<"G4QNucleus::EvaporateBary: L+A"<<G4endl; 1953 #endif 1954 } 1950 1955 else if(zLim<sLim&&r>zLim&&r<=sLim) 1951 {1956 { 1952 1957 eMass = mLamb; 1953 1958 dbQPDG= LLQPDG; … … 1955 1960 rQPDG = llQPDG; 1956 1961 #ifdef pdebug 1957 G4cout<<"G4QNucleus::EvaporateBary: L+L"<<G4endl;1958 #endif 1959 }1962 G4cout<<"G4QNucleus::EvaporateBary: L+L"<<G4endl; 1963 #endif 1964 } 1960 1965 else if(nLim<zLim&&r>nLim&&r<=zLim) 1961 {1966 { 1962 1967 eMass = mProt; 1963 1968 dbQPDG= PLQPDG; … … 1965 1970 rQPDG = plQPDG; 1966 1971 #ifdef pdebug 1967 G4cout<<"G4QNucleus::EvaporateBary: L+P"<<G4endl;1968 #endif 1969 }1972 G4cout<<"G4QNucleus::EvaporateBary: L+P"<<G4endl; 1973 #endif 1974 } 1970 1975 else if(r<=nLim) 1971 {1976 { 1972 1977 eMass = mNeut; 1973 1978 dbQPDG= NLQPDG; … … 1975 1980 rQPDG = nlQPDG; 1976 1981 #ifdef pdebug 1977 G4cout<<"G4QNucleus::EvaporateBary: L+N"<<G4endl;1978 #endif 1979 }1982 G4cout<<"G4QNucleus::EvaporateBary: L+N"<<G4endl; 1983 #endif 1984 } 1980 1985 else three=false; 1981 }1986 } 1982 1987 else if(PDG==aPDG&&(anCond&&apCond&&alCond&&aaCond)) // a+b+RN decay can't happen 1983 { //@@ Take into account Coulomb Barier Penetration Probability1984 #ifdef pdebug 1985 G4cout<<"G4QN::EB:*a*: n="<<anCond<<",p="<<apCond<<",l="<<alCond<<",a="<<aaCond1988 { //@@ Take into account Coulomb Barier Penetration Probability 1989 #ifdef pdebug 1990 G4cout<<"G4QN::EB:*a*: n="<<anCond<<",p="<<apCond<<",l="<<alCond<<",a="<<aaCond 1986 1991 <<G4endl; 1987 1992 #endif … … 1990 1995 G4double nLim=0.; 1991 1996 if(N>2&&GSResNA!=GSMass&&fMass+mNeut+ABarr+GSResNA<totMass) 1992 {1993 if(barf) nLim+=(N-2)*pow(totMass-mNeut-mAlph-ABarr-GSResNA,2);1997 { 1998 if(barf) nLim+=(N-2)*pow(totMass-mNeut-mAlph-ABarr-GSResNA,2); 1994 1999 else nLim+=(N-2)*pow(totMass-mNeut-mAlph-GSResNA,2); 1995 }2000 } 1996 2001 G4double zLim=nLim; 1997 2002 if(Z>2&&GSResPA!=GSMass&&fMass+mProt+SAPBarr+GSResPA<totMass) 1998 {1999 if(barf) zLim+=(Z-2)*pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2);2003 { 2004 if(barf) zLim+=(Z-2)*pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2); 2000 2005 else zLim+=(Z-2)*pow(totMass-mProt-mAlph-GSResPA,2); 2001 }2006 } 2002 2007 G4double sLim=zLim; 2003 2008 if(S&&GSResLA!=GSMass&&fMass+mLamb+ABarr+GSResLA<totMass) 2004 {2005 if(barf) sLim+=S*pow(totMass-mLamb-mAlph-ABarr-GSResLA,2);2009 { 2010 if(barf) sLim+=S*pow(totMass-mLamb-mAlph-ABarr-GSResLA,2); 2006 2011 else sLim+=S*pow(totMass-mLamb-mAlph-GSResLA,2); 2007 }2012 } 2008 2013 G4double aLim=sLim; 2009 2014 if(evalph&&Z>3&&N>3&&a>7&&GSResAA!=GSMass&&fMass+mAlph+SAABarr+GSResAA<totMass) 2010 {2011 if(barf) aLim+=pow(totMass-mAlph-mAlph-SAABarr-GSResAA,2)*2015 { 2016 if(barf) aLim+=pow(totMass-mAlph-mAlph-SAABarr-GSResAA,2)* 2012 2017 evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*12/(a-5)/(a-6)/(a-7); 2013 2018 else aLim+=pow(totMass-mAlph-mAlph-GSResAA,2)* 2014 2019 evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*12/(a-5)/(a-6)/(a-7); 2015 }2020 } 2016 2021 G4double r = aLim*G4UniformRand(); 2017 2022 #ifdef pdebug 2018 G4cout<<"G4QN::EB:a, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim2023 G4cout<<"G4QN::EB:a, r="<<r<<",n="<<nLim<<",z="<<zLim<<",s="<<sLim<<",a="<<aLim 2019 2024 <<G4endl; 2020 2025 #endif … … 2022 2027 if(!aLim) three=false; 2023 2028 else if(r>sLim) 2024 {2029 { 2025 2030 eMass = mAlph; 2026 2031 dbQPDG= AAQPDG; … … 2028 2033 rQPDG = aaQPDG; 2029 2034 #ifdef pdebug 2030 G4cout<<"G4QNucleus::EvaporateBary: A+A"<<G4endl;2031 #endif 2032 }2035 G4cout<<"G4QNucleus::EvaporateBary: A+A"<<G4endl; 2036 #endif 2037 } 2033 2038 else if(zLim<sLim&&r>zLim&&r<=sLim) 2034 {2039 { 2035 2040 eMass = mLamb; 2036 2041 dbQPDG= LAQPDG; … … 2038 2043 rQPDG = laQPDG; 2039 2044 #ifdef pdebug 2040 G4cout<<"G4QNucleus::EvaporateBary: A+L"<<G4endl;2041 #endif 2042 }2045 G4cout<<"G4QNucleus::EvaporateBary: A+L"<<G4endl; 2046 #endif 2047 } 2043 2048 else if(nLim<zLim&&r>nLim&&r<=zLim) 2044 {2049 { 2045 2050 eMass = mProt; 2046 2051 dbQPDG= PAQPDG; … … 2048 2053 rQPDG = paQPDG; 2049 2054 #ifdef pdebug 2050 G4cout<<"G4QNucleus::EvaporateBary: A+P"<<G4endl;2051 #endif 2052 }2055 G4cout<<"G4QNucleus::EvaporateBary: A+P"<<G4endl; 2056 #endif 2057 } 2053 2058 else if(r<=nLim) 2054 {2059 { 2055 2060 eMass = mNeut; 2056 2061 dbQPDG= NAQPDG; … … 2058 2063 rQPDG = naQPDG; 2059 2064 #ifdef pdebug 2060 G4cout<<"G4QNucleus::EvaporateBary: A+N"<<G4endl;2061 #endif 2062 }2065 G4cout<<"G4QNucleus::EvaporateBary: A+N"<<G4endl; 2066 #endif 2067 } 2063 2068 else three=false; 2064 }2069 } 2065 2070 else three=false; 2066 2071 if(rMass<1600.) 2067 {2072 { 2068 2073 if (rQPDG==pQPDG)rMass=mProt; 2069 2074 else if(rQPDG==nQPDG)rMass=mNeut; 2070 2075 else if(rQPDG==lQPDG)rMass=mLamb; 2071 }2076 } 2072 2077 #ifdef pdebug 2073 2078 G4cout<<"G4QNucleus::EvaporateBary:evaBar="<<eMass<<bQPDG<<",resN="<<rMass<<rQPDG 2074 2079 <<",secB="<<fMass<<",three="<<three<<G4endl; 2075 2080 #endif 2076 }2077 }2081 } 2082 } 2078 2083 else // ==============> Just decay in a baryon and a residual (to avoid gamma-decay) 2079 { //@@ Take into account Coulomb Barier Penetration Probability (?? - Emergency)2084 { //@@ Take into account Coulomb Barier Penetration Probability (?? - Emergency) 2080 2085 G4double nLim=0.; 2081 2086 if(nFlag&&mNeut+GSResNn<totMass) … … 2083 2088 G4double ken=totMass-mNeut-GSResNn; 2084 2089 nLim+=N*CoulBarPenProb(0.,ken,0,1)*sqrt(ken); 2085 }2090 } 2086 2091 G4double zLim=nLim; 2087 2092 if(pFlag&&mProt+PBarr+GSResNp<totMass) … … 2090 2095 if(barf) ken-=PBarr; 2091 2096 zLim+=Z*CoulBarPenProb(PBarr,ken,1,1)*sqrt(ken); 2092 }2097 } 2093 2098 G4double sLim=zLim; 2094 2099 if(lFlag&&mLamb+GSResNl<totMass) … … 2096 2101 G4double ken=totMass-mLamb-GSResNl; 2097 2102 sLim+=S*CoulBarPenProb(0.,ken,0,1)*sqrt(ken); 2098 }2103 } 2099 2104 G4double aLim=sLim; 2100 2105 if(evalph&&aFlag&&mAlph+GSResNa<totMass) … … 2104 2109 aLim+=CoulBarPenProb(ABarr,ken,2,4)*sqrt(ken)*evalph*Z*(Z-1)*N*(N-1) 2105 2110 *6/a1/(a-2)/(a-3); 2106 }2111 } 2107 2112 G4double r = aLim*G4UniformRand(); 2108 2113 #ifdef pdebug … … 2111 2116 #endif 2112 2117 if (aFlag&&r>sLim) 2113 {2118 { 2114 2119 bQPDG=aQPDG; 2115 2120 eMass=mAlph; 2116 2121 rQPDG=AQPDG; 2117 2122 rMass=GSResNa; 2118 }2123 } 2119 2124 else if(lFlag&&r>=zLim&&r<=sLim&&zLim<sLim) 2120 {2125 { 2121 2126 bQPDG=lQPDG; 2122 2127 eMass=mLamb; 2123 2128 rQPDG=LQPDG; 2124 2129 rMass=GSResNl; 2125 }2130 } 2126 2131 else if(nFlag&&r>=nLim&&r<=zLim&&nLim<zLim) 2127 {2132 { 2128 2133 bQPDG=pQPDG; 2129 2134 eMass=mProt; 2130 2135 rQPDG=PQPDG; 2131 2136 rMass=GSResNp; 2132 }2137 } 2133 2138 else if(pFlag&&r<nLim) 2134 {2139 { 2135 2140 bQPDG=nQPDG; 2136 2141 eMass=mNeut; 2137 2142 rQPDG=NQPDG; 2138 2143 rMass=GSResNn; 2139 }2144 } 2140 2145 else 2141 {2146 { 2142 2147 #ifdef pdebug 2143 2148 G4cout<<"G4QNucleus::EvaporateBaryon: Photon #2-B#, dM="<<totMass-GSMass<<G4endl; … … 2147 2152 eMass=0.; 2148 2153 rMass=GSMass; 2149 }2154 } 2150 2155 #ifdef pdebug 2151 2156 G4cout<<"G4QNucl::EvaporateBaryon: b="<<eMass<<bQPDG<<",r="<<rMass<<rQPDG<<G4endl; … … 2153 2158 } 2154 2159 if(three) // Decay in two baryons + Residual Nucleus 2155 {2160 { 2156 2161 #ifdef pdebug 2157 2162 G4cout<<"G4QNucl::EvaporateBaryon:Decay in 3 particles"<<G4endl; … … 2160 2165 h2mom=G4LorentzVector(0.,0.,0.,rMass); 2161 2166 h3mom=G4LorentzVector(0.,0.,0.,fMass); 2162 if(!DecayIn3(h1mom,h2mom,h3mom))2167 if(!DecayIn3(h1mom,h2mom,h3mom)) 2163 2168 { 2164 2169 #ifdef ppdebug 2165 2170 G4cout<<"*G4QNucl::EvaporateBaryon:Decay M="<<totMass<<",b="<<eMass<<bQPDG 2166 <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl;2171 <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl; 2167 2172 #endif 2168 2173 return false; 2169 }2174 } 2170 2175 h1mom+=h3mom; 2171 2176 bQPDG=dbQPDG; 2172 }2177 } 2173 2178 else 2174 {2179 { 2175 2180 if(eMass+rMass<totMass&&cntr<cntm) 2176 2181 { … … 2180 2185 #endif 2181 2186 if(rMass<1600.) 2182 {2187 { 2183 2188 if (rQPDG==pQPDG)rMass=mProt; 2184 2189 else if(rQPDG==nQPDG)rMass=mNeut; 2185 2190 else if(rQPDG==lQPDG)rMass=mLamb; 2186 }2191 } 2187 2192 h1mom=G4LorentzVector(0.,0.,0.,eMass); 2188 2193 h2mom=G4LorentzVector(0.,0.,0.,rMass); 2189 2194 } 2190 2195 else if(totMass>mNeut+GSResNn) // Neutron if 2-Decay failed 2191 {2192 #ifdef pdebug 2193 G4cout<<"G4QNucl::EvaporateBaryon: Neutron , dM="<<totMass-GSResNn-mNeut<<G4endl;2196 { 2197 #ifdef pdebug 2198 G4cout<<"G4QNucl::EvaporateBaryon: Neutron , dM="<<totMass-GSResNn-mNeut<<G4endl; 2194 2199 #endif 2195 2200 bQPDG=nQPDG; … … 2197 2202 h1mom=G4LorentzVector(0.,0.,0.,mNeut); 2198 2203 h2mom=G4LorentzVector(0.,0.,0.,GSResNn); 2199 }2204 } 2200 2205 else if(totMass>mProt+PBarr+GSResNp) // Proton if 2-Decay failed 2201 {2202 #ifdef pdebug 2203 G4cout<<"G4QNucl::EvaporateBaryon: Proton , dM="<<totMass-GSResNp-mProt<<G4endl;2206 { 2207 #ifdef pdebug 2208 G4cout<<"G4QNucl::EvaporateBaryon: Proton , dM="<<totMass-GSResNp-mProt<<G4endl; 2204 2209 #endif 2205 2210 bQPDG=pQPDG; … … 2207 2212 h1mom=G4LorentzVector(0.,0.,0.,mProt); 2208 2213 h2mom=G4LorentzVector(0.,0.,0.,GSResNp); 2209 }2214 } 2210 2215 else if(totMass>mAlph+ABarr+GSResNa) // Alpha if 2-Decay failed 2211 {2212 #ifdef pdebug 2213 G4cout<<"G4QNucl::EvaporateBaryon: Alpha , dM="<<totMass-GSResNa-mAlph<<G4endl;2216 { 2217 #ifdef pdebug 2218 G4cout<<"G4QNucl::EvaporateBaryon: Alpha , dM="<<totMass-GSResNa-mAlph<<G4endl; 2214 2219 #endif 2215 2220 bQPDG=aQPDG; … … 2217 2222 h1mom=G4LorentzVector(0.,0.,0.,mAlph); 2218 2223 h2mom=G4LorentzVector(0.,0.,0.,GSResNa); 2219 }2224 } 2220 2225 else if(totMass>GSMass) // Photon if 2-Decay failed 2221 {2222 #ifdef pdebug 2223 G4cout<<"G4QNucl::EvaporateBaryon:Photon ### 2 ###, dM="<<totMass-GSMass<<G4endl;2226 { 2227 #ifdef pdebug 2228 G4cout<<"G4QNucl::EvaporateBaryon:Photon ### 2 ###, dM="<<totMass-GSMass<<G4endl; 2224 2229 #endif 2225 2230 bQPDG=gQPDG; … … 2227 2232 h1mom=G4LorentzVector(0.,0.,0.,0.); 2228 2233 h2mom=G4LorentzVector(0.,0.,0.,GSMass); 2229 }2234 } 2230 2235 else 2231 2236 { 2232 G4cerr<<"***G4QNucl::EvaporateBaryon: Cann't evaporate even gamma (1)"<<G4endl;2237 G4cerr<<"***G4QNucl::EvaporateBaryon: Cann't evaporate even gamma (1)"<<G4endl; 2233 2238 return false; 2234 2239 } 2235 2240 } 2236 }2241 } 2237 2242 else // ==> Decay in 3 Baryons + Residual is impossible at this point 2238 {2239 if(secB) // Decay in 2Baryons(2a,a+bary)+ResidN is possible2240 //if(2>3)2241 {2243 { 2244 if(secB) // Decay in 2Baryons(2a,a+bary)+ResidN is possible 2245 //if(2>3) 2246 { 2242 2247 #ifdef pdebug 2243 2248 G4cout<<"G4QNucleus::EvaporateBaryon: Decay in 2 baryons"<<G4endl; … … 2246 2251 //@@ Coulomb Barrier penetration can be added 2247 2252 G4double alp=0.; 2248 if(aSecF)alp=evalph*Z*(Z-1)*N*(N-1)*10/(a-2)/(a-3)/(a-4);2253 if(aSecF)alp=evalph*Z*(Z-1)*N*(N-1)*10/(a-2)/(a-3)/(a-4); 2249 2254 G4double nnLim=0.; 2250 2255 if(nnFlag&&totMass>mNeut+mNeut+GSResNN) … … 2252 2257 G4double nzLim=nnLim; 2253 2258 if(npFlag&&totMass>mNeut+mProt+PBarr+GSResNP) 2254 {2259 { 2255 2260 if(barf) nzLim+=2*N*Z*pow(totMass-mNeut-mProt-PBarr-GSResNP,2); 2256 2261 else nzLim+=2*N*Z*pow(totMass-mNeut-mProt-GSResNP,2); 2257 }2262 } 2258 2263 G4double zzLim=nzLim; 2259 2264 if(ppFlag&&totMass>mProt+mProt+SPPBarr+GSResPP) 2260 {2265 { 2261 2266 if(barf) zzLim+=Z*(Z-1)*pow(totMass-mProt-mProt-SPPBarr-GSResPP,2); 2262 2267 else zzLim+=Z*(Z-1)*pow(totMass-mProt-mProt-GSResPP,2); 2263 }2268 } 2264 2269 G4double nlLim=zzLim; 2265 2270 if(nlFlag&&totMass>mNeut+mLamb+GSResNL) … … 2267 2272 G4double zlLim=nlLim; 2268 2273 if(plFlag&&totMass>mProt+PBarr+mLamb+GSResPL) 2269 {2274 { 2270 2275 if(barf) zlLim+=2*Z*S*pow(totMass-mProt-mLamb-PBarr-GSResPL,2); 2271 2276 else zlLim+=2*Z*S*pow(totMass-mProt-mLamb-GSResPL,2); 2272 }2277 } 2273 2278 G4double llLim=zlLim; 2274 2279 if(llFlag&&totMass>mLamb+mLamb+GSResLL) … … 2276 2281 G4double naLim=llLim; 2277 2282 if(naFlag&&totMass>mNeut+mAlph+ABarr+GSResNA) 2278 {2283 { 2279 2284 if(barf) naLim+=(N-3)*alp*pow(totMass-mNeut-mAlph-ABarr-GSResNA,2); 2280 2285 else naLim+=(N-3)*alp*pow(totMass-mNeut-mAlph-GSResNA,2); 2281 }2286 } 2282 2287 G4double zaLim=naLim; 2283 2288 if(paFlag&&totMass>mProt+SAPBarr+mAlph+GSResPA) 2284 {2289 { 2285 2290 if(barf) zaLim+=(Z-3)*alp*pow(totMass-mProt-mAlph-SAPBarr-GSResPA,2); 2286 2291 else zaLim+=(Z-3)*alp*pow(totMass-mProt-mAlph-GSResPA,2); 2287 }2292 } 2288 2293 G4double laLim=zaLim; 2289 2294 if(laFlag&&totMass>mLamb+mAlph+ABarr+GSResLA) 2290 {2295 { 2291 2296 if(barf) laLim+=S*alp*pow(totMass-mLamb-mAlph-ABarr-GSResLA,2); 2292 2297 else laLim+=S*alp*pow(totMass-mLamb-mAlph-GSResLA,2); 2293 }2298 } 2294 2299 G4double aaLim=laLim; 2295 2300 if(evalph&&aaFlag&&totMass>mAlph+mAlph+SAABarr+GSResAA) 2296 {2301 { 2297 2302 if(barf) aaLim+=alp*pow(totMass-mAlph-mAlph-SAABarr-GSResAA,2)* 2298 2303 evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*7/(a-5)/(a-6)/(a-7); 2299 2304 else aaLim+=alp*pow(totMass-mAlph-mAlph-GSResAA,2)* 2300 2305 evalph*(Z-2)*(Z-3)*(N-2)*(N-3)*7/(a-5)/(a-6)/(a-7); 2301 }2306 } 2302 2307 G4double r = aaLim*G4UniformRand(); 2303 2308 if (aaLim&&laLim<r) 2304 {2309 { 2305 2310 dbQPDG= AAQPDG; 2306 2311 eMass=mAlph; … … 2309 2314 rMass=GSResAA; 2310 2315 #ifdef pdebug 2311 G4cout<<"G4QNuc::EvapBaryon: A+A, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2312 #endif 2313 }2316 G4cout<<"G4QNuc::EvapBaryon: A+A, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2317 #endif 2318 } 2314 2319 else if(aaLim&&zaLim<r&&r<laLim) 2315 {2320 { 2316 2321 dbQPDG= LAQPDG; 2317 2322 eMass=mAlph; … … 2320 2325 rMass=GSResLA; 2321 2326 #ifdef pdebug 2322 G4cout<<"G4QNuc::EvapBaryon: A+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2323 #endif 2324 }2327 G4cout<<"G4QNuc::EvapBaryon: A+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2328 #endif 2329 } 2325 2330 else if(aaLim&&naLim<r&&r<zaLim) 2326 {2331 { 2327 2332 dbQPDG= PAQPDG; 2328 2333 eMass=mAlph; … … 2331 2336 rMass=GSResPA; 2332 2337 #ifdef pdebug 2333 G4cout<<"G4QNuc::EvapBaryon: A+P, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2334 #endif 2335 }2338 G4cout<<"G4QNuc::EvapBaryon: A+P, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2339 #endif 2340 } 2336 2341 else if(aaLim&&llLim<r&&r<naLim) 2337 {2342 { 2338 2343 dbQPDG= NAQPDG; 2339 2344 eMass=mAlph; … … 2342 2347 rMass=GSResNA; 2343 2348 #ifdef pdebug 2344 G4cout<<"G4QNuc::EvapBaryon: A+N, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2345 #endif 2346 }2349 G4cout<<"G4QNuc::EvapBaryon: A+N, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2350 #endif 2351 } 2347 2352 else if(aaLim&&zlLim<r&&r<llLim) 2348 {2353 { 2349 2354 dbQPDG= LLQPDG; 2350 2355 eMass=mLamb; … … 2353 2358 rMass=GSResLL; 2354 2359 #ifdef pdebug 2355 G4cout<<"G4QNuc::EvapBaryon: L+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2356 #endif 2357 }2360 G4cout<<"G4QNuc::EvapBaryon: L+L, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2361 #endif 2362 } 2358 2363 else if(aaLim&&nlLim<r&&r<zlLim) 2359 {2364 { 2360 2365 dbQPDG= PLQPDG; 2361 2366 eMass=mLamb; … … 2364 2369 rMass=GSResPL; 2365 2370 #ifdef pdebug 2366 G4cout<<"G4QNuc::EvapBaryon: L+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2367 #endif 2368 }2371 G4cout<<"G4QNuc::EvapBaryon: L+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2372 #endif 2373 } 2369 2374 else if(aaLim&&zzLim<r&&r<nlLim) 2370 {2375 { 2371 2376 dbQPDG= NLQPDG; 2372 2377 eMass=mLamb; … … 2375 2380 rMass=GSResNL; 2376 2381 #ifdef pdebug 2377 G4cout<<"G4QNuc::EvapBaryon: L+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2378 #endif 2379 2380 }2382 G4cout<<"G4QNuc::EvapBaryon: L+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2383 #endif 2384 2385 } 2381 2386 else if(aaLim&&nzLim<r&&r<zzLim) 2382 {2387 { 2383 2388 dbQPDG= PPQPDG; 2384 2389 eMass=mProt; … … 2387 2392 rMass=GSResPP; 2388 2393 #ifdef pdebug 2389 G4cout<<"G4QNuc::EvapBaryon: p+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2390 #endif 2391 }2394 G4cout<<"G4QNuc::EvapBaryon: p+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2395 #endif 2396 } 2392 2397 else if(aaLim&&nnLim<r&&r<nzLim) 2393 {2398 { 2394 2399 dbQPDG= NPQPDG; 2395 2400 eMass=mNeut; … … 2398 2403 rMass=GSResNP; 2399 2404 #ifdef pdebug 2400 G4cout<<"G4QNuc::EvapBaryon: n+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2401 #endif 2402 }2405 G4cout<<"G4QNuc::EvapBaryon: n+p, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2406 #endif 2407 } 2403 2408 else if(aaLim&&r<nnLim) 2404 {2409 { 2405 2410 dbQPDG= NNQPDG; 2406 2411 eMass=mNeut; … … 2409 2414 rMass=GSResNN; 2410 2415 #ifdef pdebug 2411 G4cout<<"G4QNuc::EvapBaryon: n+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl;2412 #endif 2413 }2416 G4cout<<"G4QNuc::EvapBaryon: n+n, e="<<eMass<<",f="<<fMass<<",r="<<rMass<<G4endl; 2417 #endif 2418 } 2414 2419 //Two particle decay only possible (not frequent event!) 2415 2420 else if(nFlag) 2416 {2421 { 2417 2422 #ifdef pdebug 2418 2423 G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in neutron ###"<<G4endl; … … 2423 2428 eMass=mNeut; 2424 2429 rMass=GSResNn; 2425 }2430 } 2426 2431 else if(pFlag) 2427 {2432 { 2428 2433 #ifdef pdebug 2429 2434 G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in proton ###"<<G4endl; … … 2434 2439 eMass=mProt; 2435 2440 rMass=GSResNp; 2436 }2441 } 2437 2442 else if(aFlag) 2438 {2443 { 2439 2444 #ifdef pdebug 2440 2445 G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in alpha ###"<<G4endl; … … 2445 2450 eMass=mAlph; 2446 2451 rMass=GSResNa; 2447 }2452 } 2448 2453 else if(lFlag) 2449 {2454 { 2450 2455 #ifdef pdebug 2451 2456 G4cout<<"G4QNucleus::EvaporateBaryon:Photon ### Decay in Lambda ###"<<G4endl; … … 2456 2461 eMass=mLamb; 2457 2462 rMass=GSResNl; 2458 }2463 } 2459 2464 else 2460 {2465 { 2461 2466 #ifdef pdebug 2462 2467 G4cout<<"G4QNuc::EvaporBaryon: Photon ### 3-Big ###,dM="<<totMass-GSMass<<G4endl; … … 2467 2472 eMass=0.; 2468 2473 rMass=GSMass; 2469 }2474 } 2470 2475 if(tpd) 2471 2476 { … … 2473 2478 h2mom=G4LorentzVector(0.,0.,0.,rMass); 2474 2479 h3mom=G4LorentzVector(0.,0.,0.,fMass); 2475 if(!DecayIn3(h1mom,h2mom,h3mom))2480 if(!DecayIn3(h1mom,h2mom,h3mom)) 2476 2481 { 2477 2482 #ifdef pdebug 2478 2483 G4cout<<"*G4QNucl::EvaporateBaryon:Decay M="<<totMass<<",b="<<eMass<<bQPDG 2479 <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl;2484 <<",f="<<fMass<<fQPDG<<",r="<<rMass<<rQPDG<<G4endl; 2480 2485 #endif 2481 2486 return false; 2482 }2487 } 2483 2488 h1mom+=h3mom; 2484 2489 bQPDG=dbQPDG; … … 2486 2491 G4double sma=h1mom.m(); 2487 2492 G4double dma=sma-eMass-fMass; 2488 G4cout<<"G4QNuc::EvapBar:s="<<sma<<",e="<<eMass<<",f="<<fMass<<",d="<<dma<<",rM="2493 G4cout<<"G4QNuc::EvapBar:s="<<sma<<",e="<<eMass<<",f="<<fMass<<",d="<<dma<<",rM=" 2489 2494 <<rMass<<G4endl; 2490 2495 #endif 2491 }2496 } 2492 2497 else 2493 {2498 { 2494 2499 if(rMass<1600.) 2495 {2500 { 2496 2501 if (rQPDG==pQPDG)rMass=mProt; 2497 2502 else if(rQPDG==nQPDG)rMass=mNeut; 2498 2503 else if(rQPDG==lQPDG)rMass=mLamb; 2499 }2504 } 2500 2505 h1mom=G4LorentzVector(0.,0.,0.,eMass); 2501 2506 h2mom=G4LorentzVector(0.,0.,0.,rMass); 2502 if(!DecayIn2(h1mom,h2mom))2507 if(!DecayIn2(h1mom,h2mom)) 2503 2508 { 2504 2509 #ifdef pdebug … … 2507 2512 #endif 2508 2513 return false; 2509 }2514 } 2510 2515 h1->SetQPDG(bQPDG); 2511 2516 h2->SetQPDG(rQPDG); … … 2514 2519 #ifdef pdebug 2515 2520 G4cout<<"G4QNuc::EvapBaryon: Emergency decay is done for b="<<bQPDG<<h1->GetQC() 2516 <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl;2521 <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl; 2517 2522 #endif 2518 2523 return true; 2519 }2520 }2524 } 2525 } 2521 2526 else // Only decay in Baryon+Residual is possible 2522 2527 { … … 2530 2535 G4double ken=totMass-mNeut-GSResNn; 2531 2536 nLim+=N*CoulBarPenProb(0.,ken,0,1)*sqrt(ken); 2532 }2537 } 2533 2538 G4double zLim=nLim; 2534 2539 if(pFlag&&mProt+PBarr+GSResNp<totMass) … … 2537 2542 if(barf) ken-=PBarr; 2538 2543 zLim+=Z*CoulBarPenProb(PBarr,ken,1,1)*sqrt(ken); 2539 }2544 } 2540 2545 G4double sLim=zLim; 2541 2546 if(lFlag&&mLamb+GSResNl<totMass) … … 2543 2548 G4double ken=totMass-mLamb-GSResNl; 2544 2549 sLim+=S*CoulBarPenProb(0.,ken,0,1)*sqrt(ken); 2545 }2550 } 2546 2551 G4double aLim=sLim; 2547 if(aFlag&&mAlph+GSResNa+ABarr<totMass)2552 if(aFlag&&mAlph+GSResNa+ABarr<totMass) 2548 2553 { 2549 2554 G4double ken=totMass-mAlph-GSResNa; … … 2555 2560 <<CoulBarPenProb(ABarr,ken,2,4)<<G4endl; 2556 2561 #endif 2557 }2562 } 2558 2563 G4double r = aLim*G4UniformRand(); 2559 2564 #ifdef pdebug … … 2562 2567 #endif 2563 2568 if (aFlag&&r>sLim) 2564 {2569 { 2565 2570 bQPDG=aQPDG; 2566 2571 eMass=mAlph; … … 2570 2575 G4cout<<"G4QNucleus::EvaporateBaryon: Decay in A + rA="<<GSResNa+mAlph<<G4endl; 2571 2576 #endif 2572 }2577 } 2573 2578 else if(lFlag&&r>zLim&&r<sLim) 2574 {2579 { 2575 2580 bQPDG=lQPDG; 2576 2581 eMass=mLamb; … … 2580 2585 G4cout<<"G4QNucleus::EvaporateBaryon: Decay in L + rA="<<GSResNl+mLamb<<G4endl; 2581 2586 #endif 2582 }2587 } 2583 2588 else if(pFlag&&r>nLim&&r<zLim) 2584 {2589 { 2585 2590 bQPDG=pQPDG; 2586 2591 eMass=mProt; … … 2590 2595 G4cout<<"G4QNucleus::EvaporateBaryon: Decay in P + rA="<<GSResNp+mProt<<G4endl; 2591 2596 #endif 2592 }2597 } 2593 2598 else if(nFlag&&r<nLim) 2594 {2599 { 2595 2600 bQPDG=nQPDG; 2596 2601 eMass=mNeut; … … 2600 2605 G4cout<<"G4QNucleus::EvaporateBaryon: Decay in N + rA="<<GSResNn+mNeut<<G4endl; 2601 2606 #endif 2602 }2607 } 2603 2608 else if(mProt+GSResNp<totMass) 2604 {2609 { 2605 2610 #ifdef pdebug 2606 2611 G4cout<<"G4QNucl::EvapBar: Emergency Proton, dM="<<totMass-GSResNp-mProt<<G4endl; … … 2610 2615 eMass=mProt; 2611 2616 rMass=GSResNp; 2612 }2617 } 2613 2618 else if(mAlph+GSResNa<totMass) 2614 {2619 { 2615 2620 #ifdef pdebug 2616 2621 G4cout<<"G4QNucl::EvapBar: Emergency Alpha, dM="<<totMass-GSResNa-mAlph<<G4endl; … … 2620 2625 eMass=mAlph; 2621 2626 rMass=GSResNa; 2622 }2627 } 2623 2628 else 2624 {2629 { 2625 2630 #ifdef pdebug 2626 2631 G4cout<<"G4QNuc::EvapBaryon: Photon ### 4-Big ###, dM="<<totMass-GSMass<<G4endl; … … 2630 2635 eMass=0.; 2631 2636 rMass=GSMass; 2632 }2637 } 2633 2638 if(rMass<1600.) 2634 {2639 { 2635 2640 if (rQPDG==pQPDG)rMass=mProt; 2636 2641 else if(rQPDG==nQPDG)rMass=mNeut; 2637 2642 else if(rQPDG==lQPDG)rMass=mLamb; 2638 }2643 } 2639 2644 h1mom=G4LorentzVector(0.,0.,0.,eMass); 2640 2645 h2mom=G4LorentzVector(0.,0.,0.,rMass); 2641 2646 } 2642 }2643 if(!DecayIn2(h1mom,h2mom))2647 } 2648 if(!DecayIn2(h1mom,h2mom)) 2644 2649 { 2645 2650 #ifdef pdebug 2646 2651 G4cout<<"*G4QNucleus::EvaporateBaryon: Decay M="<<totMass<<",b="<<bQPDG<<h1->GetQC() 2647 <<eMass<<",r="<<rQPDG<<h2->GetQC()<<rMass<<G4endl;2652 <<eMass<<",r="<<rQPDG<<h2->GetQC()<<rMass<<G4endl; 2648 2653 #endif 2649 2654 return false; 2650 }2651 #ifdef pdebug 2652 G4cout<<"G4QN::EvaB: **RESULT** b="<<bQPDG<<h1mom<<", r="<<rQPDG<<h2mom<<G4endl;2655 } 2656 #ifdef pdebug 2657 G4cout<<"G4QN::EvaB: **RESULT** b="<<bQPDG<<h1mom<<", r="<<rQPDG<<h2mom<<G4endl; 2653 2658 #endif 2654 2659 h1->SetQPDG(bQPDG); … … 2658 2663 #ifdef pdebug 2659 2664 G4cout<<"G4QNucleus::EvaporateBaryon: Evaporation is done for b="<<bQPDG<<h1->GetQC() 2660 <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl;2661 #endif 2662 return true;2665 <<h1mom<<h1mom.m()<<", r="<<rQPDG<<h2->GetQC()<<h2mom<<h2mom.m()<<G4endl; 2666 #endif 2667 return true; 2663 2668 } 2664 2669 else if(a==1) … … 2707 2712 { 2708 2713 j--; 2709 i++;2710 v*=j*f/i;2714 i++; 2715 v*=j*f/i; 2711 2716 s+=v; 2712 2717 } … … 2724 2729 static G4int mesonPDG[nOfMesons] = {221,111,211,-211,311,321,-311,-321,331, // 0- 8 2725 2730 // Vector resonances (1): omega,Rh0,Rh+,Rho-,K0*,K+*,AK0*,AK-*,Phi 2726 223,113,213,-213,313,323,-313,-323,333, // 9-182731 223,113,213,-213,313,323,-313,-323,333, // 9-18 2727 2732 // Tensor D-resonances (2): f2 ,a20,a2+, a2-,K20,K2+,AK20,AK2-,f2' 2728 225,115,215,-215,315,325,-315,-325,335, // 19-272733 225,115,215,-215,315,325,-315,-325,335, // 19-27 2729 2734 // Tensor F-resonances (3): om3,ro3,r3+,rh3-,K30,K3+,AK30,AK3-,Phi3 2730 2735 227,117,217,-217,317,327,-317,-327,337, // 28-35 2731 2736 // Tensor G-resonances (4): f4 ,a40,a4+, a4-,K40,K4+,AK40,AK4-,f4' 2732 229,119,219,-219,319,329,-319,-329,339}; // 36-442737 229,119,219,-219,319,329,-319,-329,339}; // 36-44 2733 2738 // Baryon octet (1/2): n , an , p , ap ,lamb,alamb, sig-,asig- 2734 2739 static G4int baryonPDG[nOfBaryons]={2112,-2112,2212,-2212,3122,-3122,3112,-3112, // 45-52 2735 // Hyperon octet (1/2): sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi02736 3212,-3212,3222,-3222,3312,-3312,3322,-3322, // 53-602740 // Hyperon octet (1/2): sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi0 2741 3212,-3212,3222,-3222,3312,-3312,3322,-3322, // 53-60 2737 2742 // Baryon decuplet (3/2): del-,adel-,del0,adel0,del+,adel+,dl++,adl++,sis-,asis- 2738 1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//702739 // sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg2740 3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//802743 1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//70 2744 // sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg 2745 3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//80 2741 2746 // Baryon octet (5/2): n5/2,an5/2,p5/2,ap5/2,l5/2,al5/2,si5-,asi5- 2742 2116,-2116,2216,-2216,3126,-3126,3116,-3116, // 81-882743 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks502747 2116,-2116,2216,-2216,3126,-3126,3116,-3116, // 81-88 2748 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50 2744 2749 3216,-3216,3226,-3226,3316,-3316,3326,-3326, // 89-96 2745 2750 // Baryon decuplet (7/2): dl5-,adl5-,dl50,adl50,dl5+,adl5+,d5++,ad5++,si5-,asi5- 2746 1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //1062747 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome52748 3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//1162751 1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //106 2752 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome5 2753 3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//116 2749 2754 G4int i=0; 2750 2755 #ifdef debug … … 2837 2842 //static G4int mesonPDG[45] = {221,111,211,-211,311,321,-311,-321,331, // 0- 8 2838 2843 // Vector resonances (1): omega,Rh0,Rh+,Rho-,K0*,K+*,AK0*,AK-*,Phi 2839 //223,113,213,-213,313,323,-313,-323,333, // 9-182844 // 223,113,213,-213,313,323,-313,-323,333, // 9-18 2840 2845 // Tensor D-resonances (2): f2 ,a20,a2+, a2-,K20,K2+,AK20,AK2-,f2' 2841 //225,115,215,-215,315,325,-315,-325,335, // 19-272846 // 225,115,215,-215,315,325,-315,-325,335, // 19-27 2842 2847 // Tensor F-resonances (3): om3,ro3,r3+,rh3-,K30,K3+,AK30,AK3-,Phi3 2843 2848 // 227,117,217,-217,317,327,-317,-327,337, // 28-35 2844 2849 // Tensor G-resonances (4): f4 ,a40,a4+, a4-,K40,K4+,AK40,AK4-,f4' 2845 //229,119,219,-219,319,329,-319,-329,339}; // 36-442850 // 229,119,219,-219,319,329,-319,-329,339}; // 36-44 2846 2851 // Baryon octet (1/2): n , an , p , ap ,lamb,alamb, sig-,asig- 2847 2852 //static G4int baryonPDG[72]={2112,-2112,2212,-2212,3122,-3122,3112,-3112, // 45-52 2848 // Hyperon octet (1/2): sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi02849 //3212,-3212,3222,-3222,3312,-3312,3322,-3322, // 53-602853 // Hyperon octet (1/2): sig0,asig0,sig+,asig+,ksi-,aksi-,ksi0,aksi0 2854 // 3212,-3212,3222,-3222,3312,-3312,3322,-3322, // 53-60 2850 2855 // Baryon decuplet (3/2): del-,adel-,del0,adel0,del+,adel+,dl++,adl++,sis-,asis- 2851 //1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//702852 // sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg2853 //3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//802856 // 1114,-1114,2114,-2114,2214,-2214,2224,-2224,3114,-3114,//70 2857 // sis0,asis0,sis+,asis+,kss-,akss-,kss0,akss0,omeg,aomeg 2858 // 3214,-3214,3224,-3224,3314,-3314,3324,-3324,3334,-3334,//80 2854 2859 // Baryon octet (5/2): n5/2,an5/2,p5/2,ap5/2,l5/2,al5/2,si5-,asi5- 2855 //2116,-2116,2216,-2216,3126,-3126,3116,-3116, // 81-882856 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks502860 // 2116,-2116,2216,-2216,3126,-3126,3116,-3116, // 81-88 2861 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50 2857 2862 // 3216,-3216,3226,-3226,3316,-3316,3326,-3326, // 89-96 2858 2863 // Baryon decuplet (7/2): dl5-,adl5-,dl50,adl50,dl5+,adl5+,d5++,ad5++,si5-,asi5- 2859 //1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //1062860 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome52861 //3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//1162864 // 1118,-1118,2118,-2118,2218,-2218,2228,-2228,3118,-3118, //106 2865 // si50,asi50,si5+,asi5+,ks5-,aks5-,ks50,aks50,ome5,aome5 2866 // 3218,-3218,3228,-3228,3318,-3318,3328,-3328,3338,-3338};//116 2862 2867 // One should take into account, that #of mesons & baryons can be cut in G4Quas::HadrQE 2863 //G4int nP= theWorld->GetQPEntries(); // A#of initialized particles in CHIPS World2864 ////@@ Make special parametyer to cut high resonances for nuclear fragmentation !!2865 //G4int nMesons = 45;2866 //if (nP<34) nMesons = 9;2867 //else if(nP<51) nMesons = 18;2868 //else if(nP<65) nMesons = 27;2869 //else if(nP<82) nMesons = 36;2870 //G4int nBaryons = 72;2871 //if (nP<45) nBaryons = 16;2872 //else if(nP<59) nBaryons = 36;2873 //else if(nP<76) nBaryons = 52;2868 //G4int nP= theWorld->GetQPEntries(); // A#of initialized particles in CHIPS World 2869 ////@@ Make special parametyer to cut high resonances for nuclear fragmentation !! 2870 //G4int nMesons = 45; 2871 //if (nP<34) nMesons = 9; 2872 //else if(nP<51) nMesons = 18; 2873 //else if(nP<65) nMesons = 27; 2874 //else if(nP<82) nMesons = 36; 2875 //G4int nBaryons = 72; 2876 //if (nP<45) nBaryons = 16; 2877 //else if(nP<59) nBaryons = 36; 2878 //else if(nP<76) nBaryons = 52; 2874 2879 // ********************************************************************************** 2875 2880 //G4int cS = curCand->GetStrangeness(); 2876 //if(piF&&gaF&&cPDG!=90000001&&cPDG!=90001000) // Both flags, in case of pi-first-int2877 //if(piF&&gaF&&cBN!=1&&cBN!=3) // Both flags, which is in case of pi-first-int2878 if(piF&&gaF&&cBN!=1)// @@ Should be both, which is in case of pi-first-interaction @@ ?2879 //if(piF&&gaF&&cBN!=1&&cBN!=4) // Should be both, in case of pi-first-interaction2881 //if(piF&&gaF&&cPDG!=90000001&&cPDG!=90001000) // Both flags, in case of pi-first-int 2882 //if(piF&&gaF&&cBN!=1&&cBN!=3) // Both flags, which is in case of pi-first-int 2883 if(piF&&gaF&&cBN!=1)// @@ Should be both, which is in case of pi-first-interaction @@ ? 2884 //if(piF&&gaF&&cBN!=1&&cBN!=4) // Should be both, in case of pi-first-interaction 2880 2885 { 2881 2886 curCand->SetPreProbability(0.); 2882 2887 curCand->SetDenseProbability(0.); 2883 curCand->SetPossibility(false);2888 curCand->SetPossibility(false); 2884 2889 #ifdef cldebug 2885 2890 if(cPDG==90001001) G4cout<<"G4QNuc::PrepCand: piF/gaF fragments are blocked"<<G4endl; … … 2887 2892 } 2888 2893 // @@ in case of the Ksi or Omega- capture it can disturb the simulation 2889 else if(cPDG<80000000&&(abs(cPDG)%10>4||cST>2))// @@ PreClosed HighSpin/Strange hadrons2894 else if(cPDG<80000000&&(abs(cPDG)%10>4||cST>2))// @@ PreClosed HighSpin/Strange hadrons 2890 2895 { 2891 2896 curCand->SetPreProbability(0.); 2892 2897 curCand->SetDenseProbability(0.); 2893 curCand->SetPossibility(false);2898 curCand->SetPossibility(false); 2894 2899 } 2895 2900 else 2896 {2901 { 2897 2902 G4double tnM=GetQPDG().GetMass(); // Total mass of this nucleus 2898 2903 if(cPDG>80000000&&cPDG!=90000000) // ===> Cluster case 2899 {2904 { 2900 2905 G4int sc = cST; // "S" of the cluster 2901 2906 G4int zc = curCand->GetCharge(); // "Z" of the cluster … … 2906 2911 pos = probVect[ac]; // Cluster Probability NormalizationFactor 2907 2912 if(ac<=maxClust&&pos>0.&&(pLV==zeroLV||intLV.m()>.00001+cM)) 2908 {2913 { 2909 2914 2910 2915 #ifdef cldebug … … 2913 2918 G4int dac=ac+ac; 2914 2919 if(ac && (piF || gaF)) // zc>=0 2915 {2920 { 2916 2921 if (piF&&!gaF&&zc+ac) pos*=(zc+ac)/ac; // piF interaction (#of u-quarks) 2917 2922 else if(gaF&&!piF&&zc+dac) pos*=(zc+dac)/ac; // gaF interaction (sum of Q_q^2) … … 2921 2926 else if(ac==2&&pos>0.)dense=probVect[255]/pos; 2922 2927 #ifdef cldebug 2923 G4cout<<"G4QNucleus::PrepC: cPDG="<<cPDG<<",norm="<<pos<<",zc="<<zc<<",nc="<<nc2928 G4cout<<"G4QNucleus::PrepC: cPDG="<<cPDG<<",norm="<<pos<<",zc="<<zc<<",nc="<<nc 2924 2929 <<",sc="<<sc<<",ac="<<ac<<",ze1="<<ze1<<",ne1="<<ne1<<",se1="<<se1<<G4endl; 2925 2930 G4double mp=pos; 2926 2931 #endif 2927 2932 if (ac==1 && ae) // ae=0 protection (since here no /pos) 2928 {2933 { 2929 2934 if (zc) pos*=ze/ae; 2930 2935 else if(nc) pos*=ne/ae; … … 2936 2941 #ifdef cldebug 2937 2942 if(pos) 2938 G4cout<<"G4QN::PrC:mp="<<mp<<",pos="<<pos<<",ae="<<ae2943 G4cout<<"G4QN::PrC:mp="<<mp<<",pos="<<pos<<",ae="<<ae 2939 2944 <<",Z="<<zc<<",N="<<nc<<",mac="<<mac<<G4endl; 2940 2945 sZ+=pos*zc; … … 2943 2948 } 2944 2949 else if(ac==2) 2945 {2950 { 2946 2951 if(ze<zc||ne<nc||se<sc) pos=0.; 2947 2952 else if(aea) // Protection against aea=0. 2948 {2953 { 2949 2954 if (zc==2) pos*=ze*(ze-1)/aea; 2950 2955 else if(nc==2) pos*=ne*(ne-1)/aea; … … 2960 2965 //else if(sc==1&&nc==1) pos*=se*ne; 2961 2966 else G4cout<<"***G4QNucl::PrepCand: z="<<zc<<", n="<<nc<<", s="<<sc<<G4endl; 2962 // Normalization for only not strange matter2963 }2967 // Normalization for only not strange matter 2968 } 2964 2969 acm=2; 2965 2970 #ifdef cldebug 2966 2971 if(pos) 2967 G4cout<<"G4QN::PrC:mp="<<mp<<",p="<<pos<<",A=2,(Z="<<zc<<",N="<<nc<<"),m="2972 G4cout<<"G4QN::PrC:mp="<<mp<<",p="<<pos<<",A=2,(Z="<<zc<<",N="<<nc<<"),m=" 2968 2973 <<mac<<G4endl; 2969 2974 sZ+=pos*zc; … … 2972 2977 } 2973 2978 else // ac>2 2974 {2979 { 2975 2980 if(acm<ac) // first time that big cluster 2976 {2981 { 2977 2982 if(ac<ae1 && ac>0) comb*=(ae1-ac)/ac; 2978 2983 acm=ac; … … 2980 2985 cca=0; 2981 2986 if(ac%2) mac=7; // @@Change it if cluster set is changed 2982 else mac=8; // @@ It is not yet automatic2987 else mac=8; // @@ It is not yet automatic 2983 2988 #ifdef cldebug 2984 2989 G4cout<<"G4QNuc::PrepCl:c="<<comb<<",ac="<<ac<<"("<<index<<"),m="<<mac<<",a=" … … 2989 2994 if(ze1<=zc||ne1<=nc||se1<=sc) prod=0.; 2990 2995 else 2991 {2996 { 2992 2997 if(zc>0) for(int iz=1; iz<=zc; iz++) prod*=(ze1-iz)/iz; 2993 2998 if(nc>0) for(int in=1; in<=nc; in++) prod*=(ne1-in)/in; 2994 2999 if(sc>0) for(int is=1; is<=sc; is++) prod*=(se1-is)/is; 2995 }3000 } 2996 3001 s+=prod; 2997 3002 pos*=prod; 2998 3003 pos/=comb; 2999 3004 #ifdef cldebug 3000 if(pos) G4cout<<"G4QN::PreC:c="<<cPDG<<",p="<<pos<<",i="<<index<<",m="<<mac3005 if(pos) G4cout<<"G4QN::PreC:c="<<cPDG<<",p="<<pos<<",i="<<index<<",m="<<mac 3001 3006 <<",pr="<<prod<<",c="<<cca<<G4endl; 3002 3007 sZ+=pos*zc; … … 3004 3009 #endif 3005 3010 cca++; 3006 }3011 } 3007 3012 curCand->SetPreProbability(pos); 3008 3013 curCand->SetDenseProbability(pos*dense); 3009 3014 #ifdef cldebug 3010 G4cout<<"G4QN::PrepC: ClusterPDG="<<cPDG<<",preProb="<<pos<<",d="<<dense<<G4endl;3011 #endif 3012 } 3013 else // => "Cluster is too big" case3015 G4cout<<"G4QN::PrepC: ClusterPDG="<<cPDG<<",preProb="<<pos<<",d="<<dense<<G4endl; 3016 #endif 3017 } 3018 else // => "Cluster is too big" case 3014 3019 { 3015 3020 curCand->SetPreProbability(0.); 3016 3021 curCand->SetDenseProbability(0.); 3017 curCand->SetPossibility(false); // This candidate is not possible3018 } 3019 }3020 else3022 curCand->SetPossibility(false); // This candidate is not possible 3023 } 3024 } 3025 else 3021 3026 { 3022 3027 curCand->SetPreProbability(pos); // ===> Hadronic case in Vacuum 3023 3028 curCand->SetDenseProbability(0.); // ===> Hadronic case in Vacuum 3024 3029 } 3025 curCand->SetPossibility(true); // All candidates are possible at this point3030 curCand->SetPossibility(true); // All candidates are possible at this point 3026 3031 } 3027 3032 } // End of the LOOP over Candidates … … 3059 3064 // @@ --- Temporary "Lambda/Delta barrier for mesons" 3060 3065 //if(!cA) cb+=40.; 3061 // --- End of Temporary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^3066 // --- End of Temporary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3062 3067 return cb; 3063 3068 } // End of "CoulombBarier" … … 3148 3153 G4double GSM=GetGSMass(); 3149 3154 #ifdef debug 3150 G4cout<<"G4QNucl::CBPenProb:GSM="<<GSM<<",Z="<<Z<<",N="<<N<<",C="<<C<<",B="<<B<<G4endl;3155 G4cout<<"G4QNucl::CBPenProb:GSM="<<GSM<<",Z="<<Z<<",N="<<N<<",C="<<C<<",B="<<B<<G4endl; 3151 3156 #endif 3152 3157 if(2>3); 3153 3158 // @@ Temporary "Mass Barrier for mesons" @@ __________________ 3154 3159 //else if(!B) wD=40.; 3155 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^3160 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3156 3161 ////else if(nA<7&&B>0) wD=0.; // Only Coulomb Barrier can reflect !!! 3157 3162 ////else if((nA<12||nA>16)&&B>0) wD=0.;// Only CoulombB can reflect !!! O16 E-dep of gamA … … 3174 3179 wD=80.; // 40 MeV per each nucleon 3175 3180 //wD=wD/2; 3176 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^3181 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3177 3182 } 3178 3183 ////else if(B>2) wD=0.; … … 3190 3195 if(wD<0.) wD=0.; 3191 3196 #ifdef debug 3192 G4cout<<"G4QNucl::CBPenProb: wD="<<wD<<",E="<<E<<",CB="<<CB<<G4endl;3197 G4cout<<"G4QNucl::CBPenProb: wD="<<wD<<",E="<<E<<",CB="<<CB<<G4endl; 3193 3198 #endif 3194 3199 // @@ Temporary "Virial factor" @@ __________________ 3195 3200 wD=wD+wD; 3196 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^3201 // @@ End of Temporary^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3197 3202 G4double sR=0.; 3198 3203 G4double CBD=CB+wD; 3199 3204 G4double ED=E+wD; 3200 3205 if(CBD<0.) return 1.; 3201 if(ED< 0.) return 0.;3202 //if(nA<27) sR=sqrt(wD/ (E+wD));3203 //else sR=sqrt( (CB+wD)/(E+wD));3204 sR=sqrt( (CB+wD)/(E+wD));3205 //sR=sqrt(wD/ (E+wD));3206 if(ED<=0.) return 0.; 3207 //if(nA<27) sR=sqrt(wD/ED); 3208 //else sR=sqrt(CBD/ED); 3209 sR=sqrt(CBD/ED); 3210 //sR=sqrt(wD/ED); 3206 3211 #ifdef pdebug 3207 3212 G4cout<<"G4QN::CBPP:s="<<sR<<",E="<<E<<",w="<<wD<<",CB="<<CB<<",B="<<B<<",C="<<C<<G4endl; … … 3232 3237 void G4QNucleus::ChooseNucleons() 3233 3238 { 3234 G4int protons =0;3235 G4int nucleons=0;3239 G4int protons =0; 3240 G4int nucleons=0; 3236 3241 G4int myA=GetA(); 3237 while (nucleons < myA)3238 {3239 if(protons<Z && G4UniformRand() < G4double(Z-protons)/G4double(myA-nucleons) )3240 {3241 protons++;3242 while (nucleons < myA) 3243 { 3244 if(protons<Z && G4UniformRand() < G4double(Z-protons)/G4double(myA-nucleons) ) 3245 { 3246 protons++; 3242 3247 nucleons++; 3243 3248 G4QHadron* proton = new G4QHadron(2212); 3244 theNucleons.push_back(proton);3245 }3246 else if ( (nucleons-protons) < (myA-Z) )3247 {3249 theNucleons.push_back(proton); 3250 } 3251 else if ( (nucleons-protons) < (myA-Z) ) 3252 { 3248 3253 nucleons++; 3249 3254 G4QHadron* neutron = new G4QHadron(2112); 3250 theNucleons.push_back(neutron);3251 }3252 else G4cout<<"G4QNucleus::ChooseNucleons not efficient"<<G4endl;3253 }3254 return;3255 theNucleons.push_back(neutron); 3256 } 3257 else G4cout<<"G4QNucleus::ChooseNucleons not efficient"<<G4endl; 3258 } 3259 return; 3255 3260 } // End of ChooseNucleons 3256 3261 … … 3260 3265 static const G4double mProt= G4QPDGCode(2212).GetMass(); 3261 3266 static const G4double mProt2= mProt*mProt; 3262 G4int i=0; // general index3267 G4int i=0; // general index 3263 3268 G4int myA=GetA(); // cashed value of A 3264 G4ThreeVectoraPos; // Prototype of nucleon position3265 G4ThreeVectordelta; // Prototype of distance between nucleons3269 G4ThreeVector aPos; // Prototype of nucleon position 3270 G4ThreeVector delta; // Prototype of distance between nucleons 3266 3271 G4ThreeVector* places = new G4ThreeVector[myA]; // Vector of 3D positions 3267 3272 G4double* placeM = new G4double[myA]; // Vector of radii 3268 G4boolfreeplace; // flag of free space available3269 G4double nucDist2 = nucleonDistance*nucleonDistance; // @@ can be a common static3270 G4double maxR=GetRadius(0.01); // there are no nucleons at this density3271 while(i<myA) // LOOP over all nucleons3272 {3273 aPos = maxR*RandomUnitSphere(); // Get random position of nucleon iside maxR3274 G4double density=GetRelativeDensity(aPos);3275 if(G4UniformRand()<density) // Try this position with frequency ~Density3276 {3277 freeplace = true; // Imply that there is a free space3278 for(G4int j=0; j<i && freeplace; j++) // Check that there is no overlap with others3279 {3280 delta = places[j] - aPos; // Distance to nucleon j3273 G4bool freeplace; // flag of free space available 3274 G4double nucDist2 = nucleonDistance*nucleonDistance; // @@ can be a common static 3275 G4double maxR=GetRadius(0.01); // there are no nucleons at this density 3276 while(i<myA) // LOOP over all nucleons 3277 { 3278 aPos = maxR*RandomUnitSphere(); // Get random position of nucleon iside maxR 3279 G4double density=GetRelativeDensity(aPos); 3280 if(G4UniformRand()<density) // Try this position with frequency ~Density 3281 { 3282 freeplace = true; // Imply that there is a free space 3283 for(G4int j=0; j<i && freeplace; j++) // Check that there is no overlap with others 3284 { 3285 delta = places[j] - aPos; // Distance to nucleon j 3281 3286 freeplace= delta.mag2()>nucDist2; // If false break the LOOP (M.K.) 3282 3287 if(!freeplace) break; // M.K. acceleration 3283 }3284 // protons must at least have binding energy of CoulombBarrier (@@ ? M.K.), so3285 // assuming Fermi Energy corresponds to Potential, we must place protons such3286 // that the Fermi Energy > CoulombBarrier (?)3287 if(freeplace && theNucleons[i]->GetPDGCode() == 2212) // Free Space Protons3288 {3289 G4double pFermi=GetFermiMomentum(GetDensity(aPos));3290 G4double eFermi= sqrt(pFermi*pFermi+mProt2)-mProt; // Kinetic energy3291 if (eFermi <= CoulombBarrier()) freeplace=false;3292 }3293 if(freeplace)3294 {3295 places[i]=aPos;3296 ++i;3297 }3298 }3299 }3300 ReduceSum(places,placeM); // Reduce center of mass shift (equalWeight)3288 } 3289 // protons must at least have binding energy of CoulombBarrier (@@ ? M.K.), so 3290 // assuming Fermi Energy corresponds to Potential, we must place protons such 3291 // that the Fermi Energy > CoulombBarrier (?) 3292 if(freeplace && theNucleons[i]->GetPDGCode() == 2212) // Free Space Protons 3293 { 3294 G4double pFermi=GetFermiMomentum(GetDensity(aPos)); 3295 G4double eFermi= sqrt(pFermi*pFermi+mProt2)-mProt; // Kinetic energy 3296 if (eFermi <= CoulombBarrier()) freeplace=false; 3297 } 3298 if(freeplace) 3299 { 3300 places[i]=aPos; 3301 ++i; 3302 } 3303 } 3304 } 3305 ReduceSum(places,placeM); // Reduce center of mass shift (equalWeight) 3301 3306 for(i=0; i<myA; i++) theNucleons[i]->SetPosition(places[i]); 3302 3307 delete [] places; … … 3318 3323 G4double At2= At*At; 3319 3324 if(iA<17) // Gaussian density distribution 3320 {3325 { 3321 3326 radius = r0sq*At2; // Mean Squared Radius (fm^2) 3322 3327 rho0 = pow(pi*radius, -1.5); // Central Density 3323 3328 } 3324 3329 else // Wood-Saxon density distribution 3325 {3330 { 3326 3331 G4double r0=1.16*(1.-1.16/At2)*fermi; // Base for A-dependent radius 3327 3332 G4double rd=deld/r0; // Relative thickness of the surface … … 3384 3389 G4ThreeVector* momentum = new G4ThreeVector[myA]; 3385 3390 G4double* fermiM = new G4double[myA]; 3386 for(i=0; i<myA; i++) // momenta for all, including the last, in case we swap nucleons3387 {3388 density=GetDensity(theNucleons[i]->GetPosition());// density around nucleon i3389 G4double ferm = GetFermiMomentum(density); // module of momentun for nucleon i3390 fermiM[i] = ferm; // module of momentun for nucleon i3391 G4ThreeVector mom=ferm*RandomUnitSphere(); // 3-vector for nucleon mpomentum3392 if(theNucleons[i]->GetPDGCode() == 2212) // the nucleon is proton3393 {3394 G4double eMax = sqrt(ferm*ferm+mProt2)-CoulombBarrier();3395 if(eMax>mProt)3396 {3397 G4double pmax2= eMax*eMax - mProt2;3398 fermiM[i] = sqrt(pmax2); // modify proton momentum3399 while(mom.mag2() > pmax2) mom=Get3DFermiMomentum(density, fermiM[i]);3400 }3391 for(i=0; i<myA; i++) // momenta for all, including the last, in case we swap nucleons 3392 { 3393 density=GetDensity(theNucleons[i]->GetPosition());// density around nucleon i 3394 G4double ferm = GetFermiMomentum(density); // module of momentun for nucleon i 3395 fermiM[i] = ferm; // module of momentun for nucleon i 3396 G4ThreeVector mom=ferm*RandomUnitSphere(); // 3-vector for nucleon mpomentum 3397 if(theNucleons[i]->GetPDGCode() == 2212) // the nucleon is proton 3398 { 3399 G4double eMax = sqrt(ferm*ferm+mProt2)-CoulombBarrier(); 3400 if(eMax>mProt) 3401 { 3402 G4double pmax2= eMax*eMax - mProt2; 3403 fermiM[i] = sqrt(pmax2); // modify proton momentum 3404 while(mom.mag2() > pmax2) mom=Get3DFermiMomentum(density, fermiM[i]); 3405 } 3401 3406 else 3402 {3403 G4cerr<<"G4QNucleus: difficulty finding proton momentum -> mom=0"<<G4endl;3404 mom=0;3405 }3406 }3407 momentum[i]= mom;3408 }3409 ReduceSum(momentum,fermiM); // Reduse momentum nonconservation3407 { 3408 G4cerr<<"G4QNucleus: difficulty finding proton momentum -> mom=0"<<G4endl; 3409 mom=0; 3410 } 3411 } 3412 momentum[i]= mom; 3413 } 3414 ReduceSum(momentum,fermiM); // Reduse momentum nonconservation 3410 3415 for(i=0; i< myA ; i++ ) 3411 3416 { 3412 G4double mN=mNeut;3417 G4double mN=mNeut; 3413 3418 if(theNucleons[i]->GetPDGCode() == 2212) mN=mProt; 3414 3419 G4double energy = mN - BindingEnergy()/myA; … … 3430 3435 } 3431 3436 G4int i=0; // To avoid declaration in j-LOOP 3432 G4ThreeVector sum(0.,0.,0.); // The sum which must be reduced3437 G4ThreeVector sum(0.,0.,0.); // The sum which must be reduced 3433 3438 G4double minV=DBL_MAX; // Min value of Fermi Momentum 3434 3439 G4double maxV=0.; // Max value of Fermi Momentum 3435 3440 G4int maxI=-1; // Index of maximum Fermi Momentum 3436 for(i=0; i<myA; i++)3441 for(i=0; i<myA; i++) 3437 3442 { 3438 3443 sum+=momentum[i]; // Make sum of 3D Momenta … … 3453 3458 } 3454 3459 G4double* fm2 = new G4double[myA]; // collect temporary squared FermiMom 3455 for(i=0; i<myA; i++) fm2[i]=pFermiM[i]*pFermiM[i]; // calculate squared Fermi Momenta3460 for(i=0; i<myA; i++) fm2[i]=pFermiM[i]*pFermiM[i]; // calculate squared Fermi Momenta 3456 3461 G4int myA1=myA-1; // to avoid calculation in the j-LOOP 3457 3462 for(G4int j=0; j<myA; j++) // Not more than myA attempts … … 3459 3464 G4double minP=DBL_MAX; // Minimal progection value 3460 3465 G4int minI=-1; // Minimal projection index 3461 for(i=0; i<myA; i++) // Sirch for minimum projection3466 for(i=0; i<myA; i++) // Sirch for minimum projection 3462 3467 { 3463 3468 G4double proj=fabs(sum.dot(momentum[i])/fm2[i]);// abs value of |sum|*cos(theta) 3464 3469 if(proj<minP) 3465 {3470 { 3466 3471 minP=proj; 3467 3472 minI=i; … … 3484 3489 } 3485 3490 } 3486 return true;3491 return true; 3487 3492 } // End of ReduceSum 3488 3493 … … 3498 3503 G4cout<<"G4QNucleus::Init3D: A="<<myA<<", Z="<<Z<<G4endl; 3499 3504 #endif 3500 InitDensity();3505 InitDensity(); 3501 3506 ChooseNucleons(); 3502 3507 ChoosePositions(); … … 3504 3509 G4double Ebind= BindingEnergy()/myA; 3505 3510 for (G4int i=0; i<myA; i++) theNucleons[i]->SetBindingEnergy(Ebind); // @@ ? M.K. 3506 currentNucleon=0; // Automatically starts the LOOP3511 currentNucleon=0; // Automatically starts the LOOP 3507 3512 return; 3508 3513 } // End of Init3D … … 3511 3516 G4double G4QNucleus::GetOuterRadius() 3512 3517 { 3513 G4double maxradius2=0;3518 G4double maxradius2=0; 3514 3519 G4int myA=theNucleons.size(); 3515 if(myA) for(G4int i=0; i<myA; i++)3516 {3517 G4double nucr2=theNucleons[i]->GetPosition().mag2();3518 if(nucr2 > maxradius2) maxradius2=nucr2;3519 }3520 return sqrt(maxradius2)+nucleonDistance;3520 if(myA) for(G4int i=0; i<myA; i++) 3521 { 3522 G4double nucr2=theNucleons[i]->GetPosition().mag2(); 3523 if(nucr2 > maxradius2) maxradius2=nucr2; 3524 } 3525 return sqrt(maxradius2)+nucleonDistance; 3521 3526 } // End of GetOuterRadius 3522 3527 … … 3525 3530 { 3526 3531 G4int myA=theNucleons.size(); 3527 if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost);3532 if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost); 3528 3533 } // End of DoLorentzBoost(G4LorentzVector) 3529 3534 … … 3532 3537 { 3533 3538 G4int myA=theNucleons.size(); 3534 if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost);3539 if(myA) for(G4int i=0; i<myA; i++) theNucleons[i]->Boost(theBoost); 3535 3540 } // End of DoLorentzBoost(G4ThreeVector) 3536 3541 … … 3539 3544 { 3540 3545 G4double bet2=theBeta.mag2(); 3541 G4double factor=(1.-sqrt(1.-bet2))/bet2; // 1./(beta2*gamma2)3546 G4double factor=(1.-sqrt(1.-bet2))/bet2; // 1./(beta2*gamma2) 3542 3547 G4int myA=theNucleons.size(); 3543 if(myA) for (G4int i=0; i< myA; i++)3544 {3545 G4ThreeVector pos=theNucleons[i]->GetPosition();3546 pos -= factor*(theBeta*pos)*theBeta;3547 theNucleons[i]->SetPosition(pos);3548 }3548 if(myA) for (G4int i=0; i< myA; i++) 3549 { 3550 G4ThreeVector pos=theNucleons[i]->GetPosition(); 3551 pos -= factor*(theBeta*pos)*theBeta; 3552 theNucleons[i]->SetPosition(pos); 3553 } 3549 3554 } // End of DoLorentzContraction(G4ThreeVector) 3550 3555 … … 3553 3558 { 3554 3559 G4int myA=theNucleons.size(); 3555 if(myA)for(G4int i=0; i<myA; i++)3560 if(myA) for(G4int i=0; i<myA; i++) 3556 3561 theNucleons[i]->SetPosition(theNucleons[i]->GetPosition() + theShift); 3557 3562 } // End of DoTranslation … … 3562 3567 G4int myA=theNucleons.size(); 3563 3568 if(myA) currentNucleon=0; 3564 else G4cout<<"-Warning-G4QNucleus::StartLoop: LOOP starts for uninited nucleons"<<G4endl;3565 return myA;3569 else G4cout<<"-Warning-G4QNucleus::StartLoop: LOOP starts for uninited nucleons"<<G4endl; 3570 return myA; 3566 3571 } // End of StartLoop 3567 3572 … … 3580 3585 G4double mT= C*B/(1+B); // Max (b=0) b-thickness 3581 3586 G4double T = mT; // Current b-thickness 3582 mT/=1000.; // Min b-thickness (@@ make 1000 a parameter)3587 mT/=1000.; // Min b-thickness (@@ make 1000 a parameter) 3583 3588 G4double b = 0.; 3584 3589 while(T>mT) … … 3803 3808 G4double gsM=mNeut; 3804 3809 if(thePDG==90001000) gsM=mProt; 3805 else if(thePDG==91000000) gsM=mLamb;3810 else if(thePDG==91000000) gsM=mLamb; 3806 3811 if(fabs(totMass-gsM)<.001) 3807 3812 { 3808 3813 #ifdef pdebug 3809 G4cout<<"G4QNu::EvaporateNucl:GSM="<<gsM<<", H="<<thePDG<<qH->Get4Momentum()<<G4endl;3814 G4cout<<"G4QNu::EvaporateNucl:GSM="<<gsM<<", H="<<thePDG<<qH->Get4Momentum()<<G4endl; 3810 3815 #endif 3811 3816 evaHV->push_back(qH); // (delete equivalent) … … 3816 3821 } 3817 3822 else if(totMass<gsM) 3818 {3823 { 3819 3824 #ifdef qdebug 3820 3825 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (2) qH="<<G4endl; … … 3832 3837 G4double d=totMass-gsM; 3833 3838 #ifdef pdebug 3834 G4cout<<"G4QN::EvaporNucl: PDG="<<thePDG<<",M="<<totMass<<">"<<gsM<<",d="<<d<<G4endl;3839 G4cout<<"G4QN::EvaporNucl: PDG="<<thePDG<<",M="<<totMass<<">"<<gsM<<",d="<<d<<G4endl; 3835 3840 #endif 3836 3841 G4int decPDG=22; 3837 3842 G4double decM=0.; 3838 3843 if(d>142.) // @@ to avoid more precise calculations 3839 {3844 { 3840 3845 if(thePDG==90001000) // D+ -> n + pi+ 3841 {3846 { 3842 3847 gsM=mNeut; 3843 3848 thePDG=90000001; … … 3846 3851 } 3847 3852 else if(thePDG==90000001) // D+ -> n + pi+ 3848 {3853 { 3849 3854 gsM=mProt; 3850 3855 thePDG=90001000; … … 3853 3858 } 3854 3859 else 3855 {3860 { 3856 3861 decPDG=111; 3857 3862 decM=mPi0; … … 3874 3879 } 3875 3880 #ifdef pdebug 3876 G4cout<<"G4QNucl::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+g="<<g4Mom<<",n="3881 G4cout<<"G4QNucl::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+g="<<g4Mom<<",n=" 3877 3882 <<evaHV->size()<<G4endl; 3878 3883 #endif … … 3912 3917 { 3913 3918 #ifdef pdebug 3914 G4cout<<"G4QN::EvaporateNuc:(D)GSM="<<gsM<<",H="<<thePDG<<qH->Get4Momentum()<<G4endl;3919 G4cout<<"G4QN::EvaporateNuc:(D)GSM="<<gsM<<",H="<<thePDG<<qH->Get4Momentum()<<G4endl; 3915 3920 #endif 3916 3921 G4LorentzVector h4Mom=q4M*(gsM/totMass); // At rest in CM … … 3931 3936 } 3932 3937 else if(totMass<gsM+mPi) 3933 {3938 { 3934 3939 #ifdef qdebug 3935 3940 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (6) qH="<<G4endl; … … 3961 3966 } 3962 3967 #ifdef pdebug 3963 G4cout<<"G4QNuc::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+pi="<<g4Mom<<", nH="3968 G4cout<<"G4QNuc::EvaNuc:"<<totMass<<q4M<<"->"<<thePDG<<h4Mom<<"+pi="<<g4Mom<<", nH=" 3964 3969 <<evaHV->size()<<G4endl; 3965 3970 #endif … … 4012 4017 G4int piPDG = -211; 4013 4018 if(thePDG==90002999) 4014 {4019 { 4015 4020 nucPDG = 2212; 4016 4021 nucM = mProt; 4017 4022 piPDG = 211; 4018 }4023 } 4019 4024 if(totMass>mPi+nucM+nucM) 4020 {4025 { 4021 4026 G4LorentzVector n14M(0.,0.,0.,nucM); 4022 4027 G4LorentzVector n24M(0.,0.,0.,nucM); … … 4034 4039 G4cerr<<"***G4QNucleus::EvaporateNucleus: tM="<<totMass<<"-> 2N="<<nucPDG<<"(M=" 4035 4040 <<nucM<<") + pi="<<piPDG<<"(M="<<mPi<<")"<<G4endl; 4036 throw G4QException("G4QNucleus::EvaporateNucleus: ISO-Dibaryon DecayIn3 error");4041 throw G4QException("G4QNucleus::EvaporateNucleus: ISO-Dibaryon DecayIn3 error"); 4037 4042 } 4038 4043 #ifdef qdebug … … 4059 4064 #endif 4060 4065 evaHV->push_back(piH); // (delete equivalent) 4061 }4062 else4063 {4066 } 4067 else 4068 { 4064 4069 #ifdef qdebug 4065 4070 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (11) qH="<<G4endl; … … 4073 4078 <<" < M_2N+Pi, d="<<totMass-2*nucM-mPi<<G4endl; 4074 4079 throw G4QException("G4QNucleus::EvaporateNucleus:ISO-DiBaryon is under MassShell"); 4075 }4080 } 4076 4081 } 4077 4082 else if((thePDG==90000002||thePDG==90001001||thePDG==90002000)&&totMass>2020.) //=> IsoDB … … 4088 4093 { 4089 4094 if(G4UniformRand()>.5) 4090 {4095 { 4091 4096 n1PDG=2112; 4092 4097 n1M=mNeut; … … 4094 4099 } 4095 4100 else 4096 {4101 { 4097 4102 n2PDG=2212; 4098 4103 n2M=mProt; … … 4101 4106 } 4102 4107 if(totMass>mPi+n1M+n2M) 4103 {4108 { 4104 4109 G4LorentzVector n14M(0.,0.,0.,n1M); 4105 4110 G4LorentzVector n24M(0.,0.,0.,n2M); 4106 4111 G4LorentzVector pi4M(0.,0.,0.,mPi); 4107 4112 if(!G4QHadron(q4M).DecayIn3(n14M,n24M,pi4M)) 4108 {4113 { 4109 4114 G4cerr<<"***G4QNucl::EvapNucleus:IsoDN, tM="<<totMass<<"-> N1="<<n1PDG<<"(M="<<n1M 4110 4115 <<") + N2="<<n2PDG<<"(M="<<n2M<<") + pi="<<piPDG<<" (Mpi="<<mPi<<")"<<G4endl; 4111 throw G4QException("G4QNucl::EvaporateNucleus:ISO-dibaryon excit. DecayIn3 error");4112 }4116 throw G4QException("G4QNucl::EvaporateNucleus:ISO-dibaryon excit. DecayIn3 error"); 4117 } 4113 4118 #ifdef qdebug 4114 4119 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (12) qH="<<G4endl; … … 4134 4139 #endif 4135 4140 evaHV->push_back(piH); // (delete equivalent) 4136 }4137 else4138 {4141 } 4142 else 4143 { 4139 4144 #ifdef qdebug 4140 4145 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (13) qH="<<G4endl; … … 4148 4153 <<" < M1+M2+Pi, d="<<totMass-n1M-n2M-mPi<<G4endl; 4149 4154 throw G4QException("G4QNucleus::EvaporateNucleus:IsoDiBarState is under MassShell"); 4150 }4155 } 4151 4156 } 4152 4157 else if(fabs(totMass-totGSM)<.001) // Fill as it is or decay Be8, He5, Li5 (@@ add more) … … 4221 4226 G4LorentzVector k24M(0.,0.,0.,mK2); 4222 4227 if(!G4QHadron(q4M).DecayIn3(n4M,k14M,k24M)) 4223 {4228 { 4224 4229 #ifdef qdebug 4225 4230 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (14) qH="<<G4endl; … … 4232 4237 G4cout<<"***G4QNucleus::EvaNuc:tM="<<totMass<<"-> N="<<nucPDG<<"(M="<<nucM<<") + k1=" 4233 4238 <<k1PDG<<"(M="<<mK1<<") + k2="<<k2PDG<<"(M="<<mK2<<")"<<G4endl; 4234 throw G4QException("G4QNucleus::EvaporateNucleus: Nucleus+2antiK DecayIn3 error");4235 }4239 throw G4QException("G4QNucleus::EvaporateNucleus: Nucleus+2antiK DecayIn3 error"); 4240 } 4236 4241 #ifdef qdebug 4237 4242 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (15) qH="<<G4endl; … … 4260 4265 // **>>> From here the EVA code starts (baryons/hyperons can be excited) <<<** 4261 4266 else if ( (thePDG > 80000000 && thePDG != 90000000) || 4262 thePDG == 2112 || thePDG == 2212 || thePDG == 3122)4267 thePDG == 2112 || thePDG == 2212 || thePDG == 3122) 4263 4268 { // @@ Improve for Sigma+, Sigma-, Ksi0 & Ksi- content in the Total Np/Nn Nuclei 4264 4269 if(thePDG<80000000) // Switch from QHadronCode to QNuclearCode … … 4267 4272 else if(thePDG==2212) thePDG=90001000; // p 4268 4273 else if(thePDG==3122) thePDG=91000000; // lambda 4269 }4274 } 4270 4275 G4QNucleus qNuc(q4M,thePDG); // Make a Nucleus for theTotalResidNucleus 4271 4276 G4double GSMass =qNuc.GetGSMass(); // GSMass of the Total Residual Nucleus … … 4277 4282 #ifdef pdebug 4278 4283 if(bZ==2&&bN==5)G4cout<<"G4QNucleus::EvaNucl: (2,5) GSM="<<GSMass<<" > " 4279 <<G4QPDGCode(2112).GetNuclMass(2,4,0)+mNeut<<G4endl;4284 <<G4QPDGCode(2112).GetNuclMass(2,4,0)+mNeut<<G4endl; 4280 4285 if(bZ==1&&bN==3)G4cout<<"G4QNucl::EvaNucl: (1,3) GSM="<<GSMass<<" > " 4281 <<G4QPDGCode(2112).GetNuclMass(1,2,0)+mNeut<<G4endl;4286 <<G4QPDGCode(2112).GetNuclMass(1,2,0)+mNeut<<G4endl; 4282 4287 G4double dM=totMass-GSMass; 4283 G4cout<<"G4QNucl::EvaNuc:"<<qNuc<<",PDG="<<thePDG<<",M="<<totMass<<",dM="<<dM<<G4endl;4288 G4cout<<"G4QNucl::EvaNuc:"<<qNuc<<",PDG="<<thePDG<<",M="<<totMass<<",dM="<<dM<<G4endl; 4284 4289 ////////if(dM>7.) throw G4QException("G4QNucleus::EvaporateNucleus: Big Excitation"); 4285 4290 #endif … … 4287 4292 G4bool dbsCond=qNuc.Split2Baryons(); // (Two Baryons)SeparCond for TotResidNucl 4288 4293 #ifdef pdebug 4289 G4cout<<"G4QNucleus::EvaporateNuc: bs="<<bsCond<<", dbs="<<dbsCond<<", A="<<bA<<G4endl;4294 G4cout<<"G4QNucleus::EvaporateNuc: bs="<<bsCond<<", dbs="<<dbsCond<<", A="<<bA<<G4endl; 4290 4295 #endif 4291 4296 if(fabs(totMass-GSMass)<.003&&!bsCond&&!dbsCond) // GS or can't split 1(2)B FillAsItIs … … 4300 4305 return; 4301 4306 } 4302 else if ( ( bA == 1 || (!bsCond && !dbsCond) ) && totMass > GSMass+.003 ) //==>Fuse&DecayTech(noGamDec)4303 //else if(2>3) // Close "Fuse&Decay Technology"***@@@***4304 { 4305 #ifdef pdebug 4306 G4cout<<"G4QN::EvaN:SplitBar, s="<<bsCond<<",M="<<totMass<<" > GSM="<<GSMass<<G4endl;4307 else if ( ( bA == 1 || (!bsCond && !dbsCond) ) && totMass > GSMass+.003 )//=>Fuse&Decay 4308 //else if(2>3) // Close "Fuse&Decay Technology"***@@@*** 4309 { 4310 #ifdef pdebug 4311 G4cout<<"G4QN::EvaN:SplitBar, s="<<bsCond<<",M="<<totMass<<" > GSM="<<GSMass<<G4endl; 4307 4312 #endif 4308 4313 G4int nOfOUT = evaHV->size(); // Total#of QHadrons in Vector at this point 4309 4314 G4bool bnfound=true; // Cure "back fusion fragment not found" 4310 4315 while(nOfOUT) // Try BackFusionDecays till something is in 4311 {4316 { 4312 4317 G4QHadron* theLast = (*evaHV)[nOfOUT-1]; 4313 4318 G4int lastBN = theLast->GetBaryonNumber(); … … 4315 4320 //////////////////G4int gam = theLast->GetPDGCode(); 4316 4321 #ifdef pdebug 4317 G4cout<<"G4QN::EvaNuc:*BackFus*,BN="<<lastBN<<",nF="<<nFrag<<",n="<<nOfOUT<<G4endl;4318 #endif 4319 while(nFrag) // => "Delete Last Decayed Hadron" case4320 {4322 G4cout<<"G4QN::EvaNuc:*BackFus*,BN="<<lastBN<<",nF="<<nFrag<<",n="<<nOfOUT<<G4endl; 4323 #endif 4324 while(nFrag) // => "Delete Last Decayed Hadron" case 4325 { 4321 4326 G4QHadron* thePrev = (*evaHV)[nOfOUT-2]; 4322 4327 nFrag = thePrev->GetNFragments(); … … 4324 4329 #ifdef pdebug 4325 4330 G4int prevPDG = thePrev->GetPDGCode(); 4326 G4cout<<"G4QNucl::EvaNucl: DelTheLast, nFr="<<nFrag<<", pPDG="<<prevPDG<<G4endl;4331 G4cout<<"G4QNucl::EvaNucl: DelTheLast, nFr="<<nFrag<<", pPDG="<<prevPDG<<G4endl; 4327 4332 #endif 4328 4333 evaHV->pop_back(); // the prev QHadron is excluded from OUTPUT … … 4330 4335 theLast = thePrev; // Update theLastPntr(Prev instead of Last) 4331 4336 lastBN=prevBN; 4332 nOfOUT--; // Reduce the stack for the Last decayed hadron4333 }4337 nOfOUT--; // Reduce the stack for the Last decayed hadron 4338 } 4334 4339 if(nOfOUT) 4335 {4340 { 4336 4341 if(lastBN<1&&nOfOUT>1) // Try Once To Skip Mesons/Gammas & Antibaryons 4337 {4342 { 4338 4343 G4QHadron* thePrev = (*evaHV)[nOfOUT-2];//***Exchange between Last & Prev*** 4339 4344 evaHV->pop_back(); // the last QHadron is excluded from OUTPUT … … 4342 4347 evaHV->push_back(thePrev); // the Prev becomes the Last (2nd part of exch) 4343 4348 theLast = thePrev; // Update theLastPointer (Prev instead of Last) 4344 }4349 } 4345 4350 G4LorentzVector last4M = theLast->Get4Momentum(); // Selected the last 4-Mom 4346 4351 G4QContent lastQC = theLast->GetQC(); … … 4354 4359 G4double dM=totMass-GSMass-lastM; 4355 4360 #ifdef pdebug 4356 G4cout<<"G4QN::EvaNuc: tM="<<totMass<<"-LM="<<lastM<<lastQC<<"-GSM="<<GSMass<<"="4361 G4cout<<"G4QN::EvaNuc: tM="<<totMass<<"-LM="<<lastM<<lastQC<<"-GSM="<<GSMass<<"=" 4357 4362 <<dM<<G4endl; 4358 4363 #endif 4359 4364 if(dM>-0.001) // Decay in the qH and the last is impossible 4360 {4365 { 4361 4366 G4QHadron* evH = new G4QHadron(totPDG,q4M); // Create QHadron for CompResidNuc 4362 4367 if(dM<=0.) … … 4377 4382 if(totBN==2)DecayDibaryon(evH,evaHV); // Fill dibaryon (with decay products) 4378 4383 else evaHV->push_back(evH);// Fill TRN to HVect asIs (delete equivalent) 4379 }4384 } 4380 4385 else // Decay TotalResidualNucleus in GSM+Last 4381 {4386 { 4382 4387 G4LorentzVector r4Mom(0.,0.,0.,GSMass); 4383 4388 if(!G4QHadron(q4M).DecayIn2(last4M,r4Mom)) // Decay failed … … 4400 4405 G4cout<<"***G4QN::EvaN:DecayIn L"<<lastQC<<"+RN"<<totQC<<" failed"<<G4endl; 4401 4406 #endif 4402 }4407 } 4403 4408 else // Decay in GSM+theLast succeeded 4404 4409 { … … 4422 4427 else evaHV->push_back(nucH);// Fill the Residual Nucleus (del.eq.) 4423 4428 } 4424 }4429 } 4425 4430 bnfound=false; 4426 4431 break; 4427 }4432 } 4428 4433 thePDG=totPDG; // Make ResidualNucleus outOf theTotResidualNucl 4429 GSMass=G4QPDGCode(thePDG).GetMass();// Update the Total Residual Nucleus mass4434 GSMass=G4QPDGCode(thePDG).GetMass();// Update the Total Residual Nucleus mass 4430 4435 evaHV->pop_back(); // the last QHadron is excluded from OUTPUT 4431 4436 delete theLast;//!!When kill,DON'T forget to delete theLastQHadron asAnInstance!! 4432 4437 nOfOUT--; // Update the value of OUTPUT entries 4433 }4434 }4438 } 4439 } 4435 4440 if(bnfound) 4436 4441 { … … 4451 4456 } 4452 4457 #ifdef pdebug 4453 G4cout<<"G4QNuc::EvaNuc: "<<q4M<<"->totResN="<<thePDG<<h4Mom<<"+g="<<g4Mom<<G4endl;4458 G4cout<<"G4QNuc::EvaNuc: "<<q4M<<"->totResN="<<thePDG<<h4Mom<<"+g="<<g4Mom<<G4endl; 4454 4459 #endif 4455 4460 G4QHadron* curH = new G4QHadron(thePDG,h4Mom); … … 4473 4478 #endif 4474 4479 } 4475 }4480 } 4476 4481 else if(bA==2) 4477 4482 { … … 4491 4496 { 4492 4497 #ifdef pdebug 4493 G4cout<<"G4QN::EvN:2B="<<dbsCond<<",B="<<bsCond<<",M="<<totMass<<"<"<<GSMass<<G4endl;4498 G4cout<<"G4QN::EvN:2B="<<dbsCond<<",B="<<bsCond<<",M="<<totMass<<"<"<<GSMass<<G4endl; 4494 4499 #endif 4495 4500 G4double gResM =1000000.; // Prototype of mass of residual for a gamma 4496 4501 G4int gResPDG=0; // Prototype of residualPDGCode for a gamma 4497 4502 if(bN==4&&bZ==2&&!bS) // It's He6 nucleus 4498 {4503 { 4499 4504 gResPDG= thePDG; // PDG of the Residual Nucleus 4500 4505 gResM = mHel6; // min mass of the Residual Nucleus 4501 }4506 } 4502 4507 G4double nResM =1000000.; // Prototype of mass of residual for a neutron 4503 4508 G4int nResPDG=0; // Prototype of ResidualPDGCode for a neutron 4504 4509 if(bsCond==2112&&bN>0&&bA>1) // There's aNeutr in theNucl, which can be split 4505 {4510 { 4506 4511 G4QContent resQC=totQC-neutQC; 4507 4512 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4511 4516 else if(nResPDG==91000000) nResM=mLamb; 4512 4517 else nResM=resN.GetMZNS(); // min mass of the Residual Nucleus 4513 }4518 } 4514 4519 G4double pResM =1000000.; // Prototype of mass of residual for a proton 4515 4520 G4int pResPDG=0; // Prototype of PDGCode of residual for a proton 4516 4521 if(bsCond==2212&&bZ>0&&bA>1) // There's aProton in Nucl, which can be split 4517 {4522 { 4518 4523 G4QContent resQC=totQC-protQC; 4519 4524 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4523 4528 else if(pResPDG==91000000) pResM=mLamb; 4524 4529 else pResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4525 }4530 } 4526 4531 G4double lResM =1000000.; // Prototype of mass of residual for a Lambda 4527 4532 G4int lResPDG=0; // Prototype of PDGCode of residual for a Lambda 4528 4533 if(bsCond==3122&&bS>0&&bA>1) // There's aLambd in theNucl, which can be split 4529 {4534 { 4530 4535 G4QContent resQC=totQC-lambQC; 4531 4536 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4535 4540 else if(lResPDG==91000000) lResM=mLamb; 4536 4541 else lResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4537 }4542 } 4538 4543 G4double dResM =1000000.; // Prototype of mass of residual for a Alpha 4539 4544 G4int dResPDG=0; // Prototype of PDGCode of residual for a Alpha 4540 4545 if(bsCond==90001001&&bN>0&&bZ>0&&bA>2)// There's aDeuter in Nucl, which canBeRadiated 4541 {4546 { 4542 4547 G4QContent resQC=totQC-deutQC; 4543 4548 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4547 4552 else if(dResPDG==91000000) dResM=mLamb; 4548 4553 else dResM =resN.GetMZNS(); // minMass of the Residual Nucleus 4549 }4554 } 4550 4555 G4double aResM =1000000.; // Prototype of mass of residual for a Alpha 4551 4556 G4int aResPDG=0; // Prototype of PDGCode of residual for a Alpha 4552 4557 if(bsCond==90002002&&bN>1&&bZ>1&&bA>4)// There's Alpha in theNucl, which can be split 4553 {4558 { 4554 4559 G4QContent resQC=totQC-alphQC; 4555 4560 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4559 4564 else if(aResPDG==91000000) aResM=mLamb; 4560 4565 else aResM =resN.GetMZNS(); // minMass of the Residual Nucleus 4561 }4566 } 4562 4567 G4double nnResM =1000000.; // Prototype of mass of residual for a dineutron 4563 4568 G4int nnResPDG=0; // Prototype of ResidualPDGCode for a dineutron 4564 4569 if(dbsCond&&bN>1&&bA>2) // It's nucleus and there is a dineutron 4565 {4570 { 4566 4571 G4QContent resQC=totQC-neutQC-neutQC; 4567 4572 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4571 4576 else if(nnResPDG==91000000) nnResM=mLamb; 4572 4577 else nnResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4573 }4578 } 4574 4579 G4double ppResM =1000000.; // Prototype of mass of residual for a diproton 4575 4580 G4int ppResPDG=0; // Prototype of ResidualPDGCode for a diproton 4576 4581 if(dbsCond&&bZ>1&&bA>2) // It's nucleus and there is a diproton 4577 {4582 { 4578 4583 G4QContent resQC=totQC-protQC-protQC; 4579 4584 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4583 4588 else if(ppResPDG==91000000) ppResM=mLamb; 4584 4589 else ppResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4585 }4590 } 4586 4591 G4double npResM =1000000.; // Prototype of ResidualMass for proton+neutron 4587 4592 G4int npResPDG=0; // Prototype of ResidualPDGCode for a prot+neut 4588 4593 if(dbsCond&&bN>0&&bZ>0&&bA>2) // It's nucleus and there is aProton & aNeutron 4589 {4594 { 4590 4595 G4QContent resQC=totQC-neutQC-protQC; 4591 4596 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4595 4600 else if(npResPDG==91000000) npResM=mLamb; 4596 4601 else npResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4597 }4602 } 4598 4603 G4double lnResM =1000000.; // Prototype of residualMass for lambda+neutron 4599 4604 G4int lnResPDG=0; // Prototype of ResidualPDGCode for aLambda+Neut 4600 4605 if(dbsCond&&bN>0&&bS>0&&bA>2) // It's nucleus and there is aLambda & aNeutron 4601 {4606 { 4602 4607 G4QContent resQC=totQC-lambQC-protQC; 4603 4608 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4607 4612 else if(lnResPDG==91000000) lnResM=mLamb; 4608 4613 else lnResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4609 }4614 } 4610 4615 G4double lpResM =1000000.; // Prototype of residualMass for a proton+lambda 4611 4616 G4int lpResPDG=0; // Prototype of ResidualPDGCode for theProt+lamb 4612 4617 if(dbsCond&&bS>0&&bZ>0&&bA>2) // It's nucleus and there is aProton and aLambda 4613 {4618 { 4614 4619 G4QContent resQC=totQC-neutQC-protQC; 4615 4620 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4619 4624 else if(lpResPDG==91000000) lpResM=mLamb; 4620 4625 else lpResM =resN.GetMZNS(); // minMass of the Residual Nucleus 4621 }4626 } 4622 4627 G4double llResM =1000000.; // Prototype of mass of residual for a di-lambda 4623 4628 G4int llResPDG=0; // Prototype of ResidPDGCode for the di-lambda 4624 4629 if(dbsCond&&bS>1&&bA>2) // It's nucleus and there is a di-lambda 4625 {4630 { 4626 4631 G4QContent resQC=totQC-neutQC-protQC; 4627 4632 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 4631 4636 else if(llResPDG==91000000) llResM=mLamb; 4632 4637 else llResM =resN.GetMZNS(); // min mass of the Residual Nucleus 4633 }4638 } 4634 4639 #ifdef pdebug 4635 4640 G4cout<<"G4QNucleus::EvaNucl: rP="<<pResPDG<<",rN="<<nResPDG<<",rL="<<lResPDG<<",N=" … … 4642 4647 (thePDG == 90002004 && totMass > mHel6+.003) || 4643 4648 4644 (bA > 4 && bsCond && bN > 1 && bZ > 1 && totMass > aResM+mAlph) ||4649 (bA > 4 && bsCond && bN > 1 && bZ > 1 && totMass > aResM+mAlph) || 4645 4650 4646 4651 (bA > 1 && bsCond && ( (bN > 0 && totMass > nResM+mNeut) || 4647 4652 (bZ > 0 && totMass > pResM+mProt) || 4648 (bS > 0 && totMass > lResM+mLamb) ) ) ||4653 (bS > 0 && totMass > lResM+mLamb) ) ) || 4649 4654 (bA > 2 && 4650 ( ( bN > 0 && bZ > 0 && 4651 ((bsCond && totMass > dResM+mDeut) || (dbsCond && totMass > dResM+mDeut) ) ) || 4652 4653 ( dbsCond && ( (bN > 1 && totMass > nnResM+mNeut+mNeut) || 4654 (bZ > 1 && totMass > ppResM+mProt+mProt) || 4655 (bS > 1 && totMass > llResM+mLamb+mLamb) || 4656 (bN && bS && totMass > lnResM+mLamb+mNeut) || 4657 (bZ && bS && totMass > lpResM+mLamb+mProt) ) ) ) ) ) 4655 (( bN > 0 && bZ > 0 && 4656 ( (bsCond && totMass > dResM+mDeut) || (dbsCond && totMass > dResM+mDeut) ) 4657 ) || ( dbsCond && ( (bN > 1 && totMass > nnResM+mNeut+mNeut) || 4658 (bZ > 1 && totMass > ppResM+mProt+mProt) || 4659 (bS > 1 && totMass > llResM+mLamb+mLamb) || 4660 (bN && bS && totMass > lnResM+mLamb+mNeut) || 4661 (bZ && bS && totMass > lpResM+mLamb+mProt) 4662 ) 4663 ) 4664 ) 4665 ) 4666 ) 4658 4667 { 4659 4668 G4int barPDG = 90002002; // Just for the default case of Be8->alpha+alpha … … 4664 4673 G4double thdM= mNeut; // This default value is used in the IF 4665 4674 G4double tMC=totMass+.0002; 4666 if(gResPDG&&tMC>mHel6+.003) // Can make radiative decay of He6 (priority 0)4667 {4675 if(gResPDG&&tMC>mHel6+.003) // Can make radiative decay of He6 (priority 0) 4676 { 4668 4677 barPDG=90002004; 4669 4678 resPDG=22; 4670 4679 barM =mHel6; 4671 4680 resM =0.; 4672 }4673 else if(nResPDG&&tMC>nResM+mNeut) // Can radiate a neutron (priority 1)4674 {4681 } 4682 else if(nResPDG&&tMC>nResM+mNeut) // Can radiate a neutron (priority 1) 4683 { 4675 4684 barPDG=90000001; 4676 4685 resPDG=nResPDG; 4677 4686 barM =mNeut; 4678 4687 resM =nResM; 4679 }4680 else if(pResPDG&&totMass+.001>pResM+mProt) // Can radiate a proton (priority 2)4681 {4688 } 4689 else if(pResPDG&&totMass+.001>pResM+mProt) // Can radiate a proton (priority 2) 4690 { 4682 4691 barPDG=90001000; 4683 4692 resPDG=pResPDG; 4684 4693 barM =mProt; 4685 4694 resM =pResM; 4686 }4687 else if(lResPDG&&tMC>lResM+mLamb) // Can radiate a Lambda (priority 3) @@ Sigma04688 {4695 } 4696 else if(lResPDG&&tMC>lResM+mLamb) // Can radiate a Lambda (priority 3) @@ Sigma0 4697 { 4689 4698 barPDG=91000000; 4690 4699 resPDG=lResPDG; 4691 4700 barM =mLamb; 4692 4701 resM =lResM; 4693 }4702 } 4694 4703 else if(thePDG!=90004004&&bN>1&&bZ>1&&bA>4&&tMC>aResM+mAlph)// Decay in alpha (p4) 4695 {4704 { 4696 4705 barPDG=90002002; 4697 4706 resPDG=aResPDG; 4698 4707 barM =mAlph; 4699 4708 resM =aResM; 4700 }4701 else if(dResPDG&&tMC>dResM+mDeut) // Can radiate a Deuteron (priority 5)4702 {4709 } 4710 else if(dResPDG&&tMC>dResM+mDeut) // Can radiate a Deuteron (priority 5) 4711 { 4703 4712 barPDG=90001001; 4704 4713 resPDG=dResPDG; 4705 4714 barM =mDeut; 4706 4715 resM =dResM; 4707 }4708 else if(ppResPDG&&tMC>ppResM+mProt+mProt)// Can radiate a DiProton (priority 6)4709 {4716 } 4717 else if(ppResPDG&&tMC>ppResM+mProt+mProt)// Can radiate a DiProton (priority 6) 4718 { 4710 4719 barPDG=90001000; 4711 4720 resPDG=ppResPDG; … … 4714 4723 resM =ppResM; 4715 4724 thdM =mProt; 4716 }4717 else if(nnResPDG&&tMC>nnResM+mNeut+mNeut)// Can radiate a DiNeutron (priority 7)4718 {4725 } 4726 else if(nnResPDG&&tMC>nnResM+mNeut+mNeut)// Can radiate a DiNeutron (priority 7) 4727 { 4719 4728 barPDG=90000001; 4720 4729 resPDG=nnResPDG; … … 4722 4731 barM =mNeut; 4723 4732 resM =nnResM; 4724 }4725 else if(npResPDG&&tMC>npResM+mProt+mNeut)// Can radiate a neutron+proton (prior 8)4726 {4733 } 4734 else if(npResPDG&&tMC>npResM+mProt+mNeut)// Can radiate a neutron+proton (prior 8) 4735 { 4727 4736 barPDG=90001000; 4728 4737 resPDG=npResPDG; … … 4730 4739 barM =mProt; 4731 4740 resM =npResM; 4732 }4733 else if(lnResPDG&&tMC>lnResM+mLamb+mNeut)// Can radiate a Lambda+neutron (prior 9)4734 {4741 } 4742 else if(lnResPDG&&tMC>lnResM+mLamb+mNeut)// Can radiate a Lambda+neutron (prior 9) 4743 { 4735 4744 barPDG=91000000; // @@ Sigma0 4736 4745 resPDG=lnResPDG; … … 4738 4747 barM =mLamb; 4739 4748 resM =lnResM; 4740 }4741 else if(lpResPDG&&tMC>lpResM+mLamb+mProt)// Can radiate a Lambda+proton (prior 10)4742 {4749 } 4750 else if(lpResPDG&&tMC>lpResM+mLamb+mProt)// Can radiate a Lambda+proton (prior 10) 4751 { 4743 4752 barPDG=91000000; // @@ Sigma0 4744 4753 resPDG=lpResPDG; … … 4747 4756 resM =lpResM; 4748 4757 thdM =mProt; 4749 }4750 else if(llResPDG&&tMC>llResM+mLamb+mLamb)// Can radiate a DiLambda (priority 11)4751 {4758 } 4759 else if(llResPDG&&tMC>llResM+mLamb+mLamb)// Can radiate a DiLambda (priority 11) 4760 { 4752 4761 barPDG=91000000; // @@ Sigma0 4753 4762 resPDG=llResPDG; … … 4756 4765 resM =llResM; 4757 4766 thdM =mLamb; 4758 }4767 } 4759 4768 else if(thePDG!=90004004&&tMC>GSMass)// If it's not Be8 decay in gamma & GSM 4760 {4769 { 4761 4770 barPDG=thePDG; 4762 4771 resPDG=22; 4763 4772 barM =GSMass; 4764 4773 resM =0.; 4765 }4774 } 4766 4775 else if(thePDG!=90004004) 4767 {4776 { 4768 4777 G4cerr<<"***G4QNuc::EvaN:PDG="<<thePDG<<",M="<<totMass<<"< GSM="<<GSMass<<G4endl; 4769 4778 throw G4QException("G4QNucleus::EvaporateNucleus: M<GSM & can't decayInPNL"); 4770 }4779 } 4771 4780 G4LorentzVector a4Mom(0.,0.,0.,barM); 4772 4781 G4LorentzVector b4Mom(0.,0.,0.,resM); … … 4785 4794 G4cout<<"---Warning---G4QN::EvN:DecIn2Error b="<<barPDG<<",r="<<resPDG<<G4endl; 4786 4795 return; 4787 }4796 } 4788 4797 else 4789 4798 { … … 4825 4834 G4cout<<"---Warning---G4QN::EvN:DecIn2Error,b="<<barPDG<<",r="<<resPDG<<G4endl; 4826 4835 return; 4827 }4836 } 4828 4837 else 4829 4838 { … … 4855 4864 } 4856 4865 } 4857 }4866 } 4858 4867 else if (fabs(totMass-GSMass)<.003) // @@ Looks like a duplication of the prev. check 4859 4868 { … … 4868 4877 } 4869 4878 else // "System is below mass shell and can't decay" case 4870 {4879 { 4871 4880 #ifdef pdebug 4872 4881 G4cout<<"***G4QNucl::EvaNuc: tM="<<totMass<<"("<<thePDG<<") < GSM="<<GSMass<<", d=" … … 4881 4890 } 4882 4891 else // ===> Evaporation of excited system 4883 {4892 { 4884 4893 #ifdef pdebug 4885 4894 G4cout<<"G4QN::EvaNuc:***EVA***tPDG="<<thePDG<<",M="<<totMass<<">GSM="<<GSMass<<",d=" … … 4906 4915 evcn++; 4907 4916 if(!qNuc.EvaporateBaryon(bHadron,rHadron)) // Evaporation did not succeed 4908 {4917 { 4909 4918 #ifdef pdebug 4910 4919 G4cout<<"***G4QNuc::EvaNuc:***EVA Failed***PDG="<<thePDG<<",M="<<totMass<<G4endl; … … 4920 4929 #endif 4921 4930 return; 4922 }4931 } 4923 4932 evC=false; 4924 4933 b4M=bHadron->Get4Momentum(); … … 4939 4948 #endif 4940 4949 //if(b4M.e()-b4M.m()<bCB&&evcn<evcm) evC=true; 4941 } // End of while4950 } // End of while 4942 4951 #ifdef pdebug 4943 4952 G4cout<<"G4QNucl::EvaNuc:*** EVA IS DONE *** F="<<bPDG<<b4M<<",bB="<<bB<<", ResNuc=" … … 4959 4968 else if(bPDG==90004004) DecayAlphaAlpha(bHadron,evaHV);// Alph+Alph Decay (del.eq.) 4960 4969 else 4961 {4970 { 4962 4971 delete bHadron; 4963 4972 G4cerr<<"***G4QNuc::EvaNuc:bB="<<bB<<">2 - unexpected evaporated fragment"<<G4endl; 4964 4973 throw G4QException("G4QNucleus::EvaporateNucleus: Wrong evaporation act"); 4965 }4974 } 4966 4975 if(rB>2) EvaporateNucleus(rHadron,evaHV); // Continue evaporation (@@ Self-call) 4967 4976 else if(rB==2) // => "Dibaryon" case needs decay @@ DecayDibaryon 4968 {4977 { 4969 4978 G4double rGSM = rHadron->GetQPDG().GetMass(); // Ground State mass of the dibaryon 4970 4979 #ifdef pdebug 4971 G4cout<<"G4QNuc::EvaNuc:ResidDibM="<<rM<<",GSM="<<rGSM<<",M-GSM="<<rM-rGSM<<G4endl;4980 G4cout<<"G4QNuc::EvaNuc:ResidDibM="<<rM<<",GSM="<<rGSM<<",M-GSM="<<rM-rGSM<<G4endl; 4972 4981 #endif 4973 4982 if(rM<=rGSM-0.01) 4974 {4983 { 4975 4984 delete rHadron; 4976 4985 G4cerr<<"***G4QNucleus::EvaporNucl: <residual> M="<<rM<<" < GSM="<<rGSM<<G4endl; 4977 4986 throw G4QException("G4QNucleus::EvaporateNucleus: Evaporation below MassShell"); 4978 }4987 } 4979 4988 else if(fabs(rM-rGSM)<0.01&&rPDG==90001001) evaHV->push_back(rHadron); // (DE) 4980 4989 else DecayDibaryon(rHadron,evaHV); // => "Dibaryon Decay" case (del.equivalent) 4981 }4990 } 4982 4991 else if(rB==5) DecayAlphaBar(rHadron,evaHV);// "Alpha+Baryon Decay" case (del.equiv.) 4983 4992 else if(rPDG==90004002) DecayAlphaDiN(rHadron,evaHV);//alph+2p (alph+2n is stable) 4984 4993 else if(rPDG==90004004) DecayAlphaAlpha(rHadron,evaHV);//Alpha+Alpha Decay (delEq) 4985 else evaHV->push_back(rHadron); // Fill ResidNucl=Baryon to OutputHadronVector4986 } // End of Evaporation of excited system4994 else evaHV->push_back(rHadron); // Fill ResidNucl=Baryon to OutputHadronVector 4995 } // End of Evaporation of excited system 4987 4996 #ifdef pdebug 4988 4997 G4cout<<"G4QNucleus::EvaporateNucleus: === End of the evaporation attempt"<<G4endl; … … 4997 5006 { 4998 5007 if(thePDG==10) // "Chipolino decay" case 4999 {5008 { 5000 5009 G4QContent totQC = qH->GetQC(); // Quark content of the hadron 5001 5010 G4QChipolino resChip(totQC); // define the Residual as a Chipolino … … 5017 5026 G4LorentzVector qe4M(0.,0.,0.,m2); 5018 5027 if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M)) 5019 {5028 { 5020 5029 G4cerr<<"***G4QNuc::EvaNuc:tM="<<totMass<<"-> h1M="<<m1<<" + h2M="<<m2<<G4endl; 5021 throw G4QException("G4QNucleus::EvaporateNucleus: Chipol->h1+h2 DecIn2 error");5022 }5030 throw G4QException("G4QNucleus::EvaporateNucleus: Chipol->h1+h2 DecIn2 error"); 5031 } 5023 5032 G4QHadron* H2 = new G4QHadron(h2.GetPDGCode(),qe4M); 5024 5033 #ifdef pdebug … … 5031 5040 #endif 5032 5041 evaHV->push_back(H1); // (delete equivalent) 5033 }5042 } 5034 5043 else 5035 {5044 { 5036 5045 #ifdef qdebug 5037 5046 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (25) qH="<<G4endl; … … 5044 5053 G4cerr<<"**G4QN::EN:M="<<totMass<<"<"<<m1<<"+"<<m2<<",d="<<m1+m2-totMass<<G4endl; 5045 5054 throw G4QException("G4QNucleus::EvaporateNucleus: Chipolino is under MassShell"); 5046 }5047 }5055 } 5056 } 5048 5057 else // "Hadron" case 5049 {5058 { 5050 5059 G4double totM=G4QPDGCode(thePDG).GetMass(); 5051 5060 if(fabs(totMass-totM)<0.001||abs(thePDG)-10*(abs(thePDG)/10)>2) 5052 {5061 { 5053 5062 #ifdef pdebug 5054 5063 G4cout<<"**G4QNuc::EvaNuc:EmerFill(2) "<<qH->GetQC()<<qH->Get4Momentum()<<G4endl; … … 5060 5069 } 5061 5070 else if ((thePDG==221||thePDG==331)&&totMass>mPi+mPi) // "Decay in pipi" case 5062 {5071 { 5063 5072 #ifdef qdebug 5064 5073 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (26) qH="<<G4endl; … … 5072 5081 G4LorentzVector qe4M(0.,0.,0.,mPi); 5073 5082 if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M)) 5074 {5083 { 5075 5084 G4cerr<<"***G4QNucleus::EvaporateNucleus:tM="<<totMass<<"-> pi+ + pi-"<<G4endl; 5076 throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error");5077 }5085 throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error"); 5086 } 5078 5087 G4QHadron* H1 = new G4QHadron(211,fq4M); 5079 5088 #ifdef pdebug … … 5086 5095 #endif 5087 5096 evaHV->push_back(H2); // (delete equivalent) 5088 }5097 } 5089 5098 else if ((thePDG==221||thePDG==331)&&totMass>mPi0+mPi0) // "Decay in 2pi0" case 5090 {5099 { 5091 5100 #ifdef qdebug 5092 5101 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (27) qH="<<G4endl; … … 5100 5109 G4LorentzVector qe4M(0.,0.,0.,mPi0); 5101 5110 if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M)) 5102 {5111 { 5103 5112 G4cerr<<"***G4QNucleus::EvaporateNucleus:tM="<<totMass<<"-> pi0 + pi0"<<G4endl; 5104 throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error");5105 }5113 throw G4QException("G4QNucleus::EvaporateNucleus: H->Pi+Pi DecayIn2 error"); 5114 } 5106 5115 G4QHadron* H1 = new G4QHadron(111,fq4M); 5107 5116 #ifdef pdebug … … 5114 5123 #endif 5115 5124 evaHV->push_back(H2); // (delete equivalent) 5116 }5125 } 5117 5126 else if (totMass>totM) // "Radiative Hadron decay" case 5118 {5127 { 5119 5128 #ifdef qdebug 5120 5129 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (28) qH="<<G4endl; … … 5128 5137 G4LorentzVector qe4M(0.,0.,0.,totM); 5129 5138 if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M)) 5130 {5139 { 5131 5140 G4cerr<<"***G4QNuc::EvaporateNuc:tM="<<totMass<<"->h1M="<<totM<<"+gam"<<G4endl; 5132 throw G4QException("G4QNucleus::EvaporateNucleus: H*->H+gamma DecIn2 error");5133 }5141 throw G4QException("G4QNucleus::EvaporateNucleus: H*->H+gamma DecIn2 error"); 5142 } 5134 5143 G4QHadron* H2 = new G4QHadron(thePDG,qe4M); 5135 5144 #ifdef pdebug … … 5142 5151 #endif 5143 5152 evaHV->push_back(H1); // (delete equivalent) 5144 }5153 } 5145 5154 else if (thePDG==111||thePDG==221||thePDG==331) // "Gamma+Gamma decay" case 5146 {5155 { 5147 5156 #ifdef qdebug 5148 5157 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (29) qH="<<G4endl; … … 5156 5165 G4LorentzVector qe4M(0.,0.,0.,0.); 5157 5166 if(!G4QHadron(q4M).DecayIn2(fq4M,qe4M)) 5158 {5167 { 5159 5168 G4cerr<<"***G4QNucl::EvaporateNucleus:tM="<<totMass<<"->gamma + gamma"<<G4endl; 5160 throw G4QException("G4QNucleus::EvaporateNucleus: pi/eta->g+g DecIn2 error");5161 }5169 throw G4QException("G4QNucleus::EvaporateNucleus: pi/eta->g+g DecIn2 error"); 5170 } 5162 5171 G4QHadron* H2 = new G4QHadron(22,qe4M); 5163 5172 #ifdef pdebug … … 5170 5179 #endif 5171 5180 evaHV->push_back(H1); // (delete equivalent) 5172 }5181 } 5173 5182 else 5174 {5183 { 5175 5184 #ifdef qdebug 5176 5185 if(!qH) G4cout<<"G4QNucleus::EvaporateNucleus: (30) qH="<<G4endl; … … 5184 5193 <<" < GSM="<<totM<<", 2Pi="<<mPi+mPi<<", 2Pi0="<<mPi0+mPi0<<G4endl; 5185 5194 throw G4QException("G4QNucleus::EvaporateNucleus: Hadron is under MassShell"); 5186 }5187 }5188 }5195 } 5196 } 5197 } 5189 5198 else 5190 5199 { … … 5261 5270 { 5262 5271 if(fabs(qM-mSigM)<eps) 5263 {5272 { 5264 5273 evaHV->push_back(qH); // Fill Sigma- as it is 5265 5274 return; … … 5339 5348 } 5340 5349 else //(2) n*N+m*(Pi-) (qS=0) 5341 {5350 { 5342 5351 sPDG = -211; 5343 5352 qPN = -qC; … … 5389 5398 qBN = qC; 5390 5399 fMass= mProt; 5391 }5400 } 5392 5401 else if(qS && qC<qBN-qS) //(3)n*L+m*P+k*N ***Should not be here*** 5393 5402 { … … 5404 5413 { 5405 5414 if(fabs(qM-mSigP)<eps) // Fill Sigma+ as it is 5406 {5415 { 5407 5416 evaHV->push_back(qH); 5408 5417 return; … … 5659 5668 { 5660 5669 if(fabs(qM-mDeut)<eps) 5661 {5670 { 5662 5671 evaHV->push_back(qH); // Fill as it is (delete equivalent) 5663 5672 return; 5664 }5673 } 5665 5674 else if(mProt+mNeut<rM) 5666 5675 { … … 5775 5784 G4double sum=fMass+sMass; 5776 5785 if(fabs(qM-sum)<eps) 5777 {5786 { 5778 5787 f4Mom=q4M*(fMass/sum); 5779 5788 s4Mom=q4M*(sMass/sum); … … 5810 5819 G4double sum=fMass+sMass; 5811 5820 if(fabs(qM-sum)<eps) 5812 {5821 { 5813 5822 f4Mom=q4M*(fMass/sum); 5814 5823 s4Mom=q4M*(sMass/sum); … … 5836 5845 // Now the second pair mus be decayed 5837 5846 if(fabs(qM-sum)<eps) 5838 {5847 { 5839 5848 f4Mom=q4M*(fMass/sum); 5840 5849 s4Mom=q4M*(sMass/sum); … … 5868 5877 G4double sum=fMass+sMass+tMass; 5869 5878 if(fabs(qM-sum)<eps) 5870 {5879 { 5871 5880 f4Mom=q4M*(fMass/sum); 5872 5881 s4Mom=q4M*(sMass/sum); … … 6050 6059 { 6051 6060 if(!n1) // No K0's only K+'s 6052 {6061 { 6053 6062 if(n2==1 && mK+nucM>qM+.0001) // Mass limit: switch to K0 6054 {6063 { 6055 6064 k1M=mK0; 6056 6065 n1=1; … … 6063 6072 k1PDG=321; // Only K+'s (default K0's) 6064 6073 n1=n2; // only n1 is used 6065 }6066 }6074 } 6075 } 6067 6076 else // No K+'s only K0's 6068 6077 { 6069 6078 if(n1==1 && mK0+nucM>qM+.0001) // Mass limit: switch to K+ 6070 {6079 { 6071 6080 k1M=mK; 6072 6081 k1PDG=321; // K+ instead of K0 … … 6119 6128 } 6120 6129 if(fabs(qM-sum)<eps) 6121 {6130 { 6122 6131 f4Mom=q4M*(n1M/sum); 6123 6132 s4Mom=q4M*(nucM/sum); … … 6145 6154 G4QHadron* H1 = new G4QHadron(k1PDG,f4Mom); // Create a Hadron for the Kaon 6146 6155 evaHV->push_back(H1); // Fill "H1" (delete equivalent) 6147 }6156 } 6148 6157 G4QHadron* H2 = new G4QHadron(qPDG,s4Mom); // Create a Hadron for the Nucleus 6149 6158 //evaHV->push_back(H2); // Fill "H2" (delete equivalent) … … 6162 6171 G4double sum=nucM+n1M+n2M; 6163 6172 if(fabs(qM-sum)<eps) 6164 {6173 { 6165 6174 f4Mom=q4M*(n1M/sum); 6166 6175 s4Mom=q4M*(n2M/sum); … … 6188 6197 G4QHadron* H1 = new G4QHadron(k1PDG,f4Mom); // Create a Hadron for the K0 6189 6198 evaHV->push_back(H1); // Fill "H1" (delete equivalent) 6190 }6199 } 6191 6200 s4Mom/=n2; 6192 6201 for(G4int i2=0; i2<n2; i2++) … … 6194 6203 G4QHadron* H2 = new G4QHadron(k2PDG,s4Mom); // Create a Hadron for the K+ 6195 6204 evaHV->push_back(H2); // Fill "H2" (delete equivalent) 6196 }6205 } 6197 6206 G4QHadron* H3 = new G4QHadron(qPDG,t4Mom); // Create a Hadron for the nucleus 6198 6207 //evaHV->push_back(H3); // Fill "H3" (delete equivalent) … … 6269 6278 G4double sum=fMass+fMass; 6270 6279 if(fabs(qM-sum)<eps) 6271 {6280 { 6272 6281 f4Mom=q4M/2.; 6273 6282 s4Mom=f4Mom; … … 6301 6310 G4double sum=fMass+fMass+fMass; 6302 6311 if(fabs(qM-sum)<eps) 6303 {6312 { 6304 6313 f4Mom=q4M/3.; 6305 6314 s4Mom=f4Mom; … … 6348 6357 G4QHadron* H1 = new G4QHadron(fPDG,f4Mom); // Create a Hadron for the baryon 6349 6358 evaHV->push_back(H1); // Fill "H1" (delete equivalent) 6350 }6359 } 6351 6360 } 6352 6361 #ifdef qdebug … … 6381 6390 { 6382 6391 if(fabs(qM-mHel6)<eps) 6383 {6392 { 6384 6393 evaHV->push_back(qH); // Fill as it is (delete equivalent) 6385 6394 return; 6386 }6395 } 6387 6396 else if(mNeut+mNeut+mAlph<qM) 6388 6397 { 6389 6398 fPDG = 2112; 6390 6399 fMass= mNeut; 6391 }6400 } 6392 6401 else 6393 6402 { … … 6499 6508 G4double sum=tfM+tsM; 6500 6509 if(fabs(qM-sum)<eps) 6501 {6510 { 6502 6511 f4Mom=q4M*(tfM/sum); 6503 6512 s4Mom=q4M*(tsM/sum); … … 6550 6559 G4double sum=fMass+sMass+sMass; 6551 6560 if(fabs(qM-sum)<eps) 6552 {6561 { 6553 6562 f4Mom=q4M*(fMass/sum); 6554 6563 s4Mom=q4M*(sMass/sum); … … 6610 6619 G4double sum=fMass+fMass+sMass; 6611 6620 if(fabs(qM-sum)<eps) 6612 {6621 { 6613 6622 f4Mom=q4M*((fMass+fMass)/sum); 6614 6623 s4Mom=q4M*(sMass/sum); … … 6682 6691 G4double sum=fMass+sMass; 6683 6692 if(fabs(qM-sum)<eps) 6684 {6693 { 6685 6694 f4Mom=q4M*(fMass/sum); 6686 6695 s4Mom=q4M*(sMass/sum); … … 6753 6762 G4double sum=fMass+sMass; 6754 6763 if(fabs(qM-sum)<eps) 6755 {6764 { 6756 6765 f4Mom=q4M*(fMass/sum); 6757 6766 s4Mom=q4M*(sMass/sum); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGCode.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QPDGCode.cc,v 1.5 6 2008/03/20 20:11:38 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QPDGCode.cc,v 1.57 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QPDGCode ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class for Hadron definitions in CHIPS Model 33 // ------------------------------------------------------------------- 34 // Short description: The PDG Code is made on the basis of the Quark 35 // Content (G4QuarkContent) of the hadronic state (including nuclear 36 // fragments). The PDG code of the ground state (e.g. pi, N, etc.) is 37 // calculated. It includes a complicated algortithm of the G.S. mass 38 // calculation for nuclear fragments (now it is synchronised with the 39 // G4 nuclear massess). 33 40 // ------------------------------------------------------------------- 34 41 … … 222 229 static G4int qC[modi] = { 11, 12, 13, 14, 15, 16, 22, 23, 24, 25, // 10 223 230 37, 110, 220, 330, 111, 211, 221, 311, 321, 331, // 20 224 2112, 2212, 3122, 3112, 3212, 3222, 3312, 3322, 113, 213, // 30225 223, 313, 323, 333, 1114, 2114, 2214, 2224, 3124, 3114, // 40231 2112, 2212, 3122, 3112, 3212, 3222, 3312, 3322, 113, 213, // 30 232 223, 313, 323, 333, 1114, 2114, 2214, 2224, 3124, 3114, // 40 226 233 3214, 3224, 3314, 3324, 3334, 115, 215, 225, 315, 325, // 50 227 234 335, 2116, 2216, 3126, 3116, 3216, 3226, 3316, 3326, 117, // 60 … … 235 242 91001999 , 90001002 , 90002001 , 91000002 , 91001001 , //110 236 243 91002000 , 92000001 , 92001000 , 90999003 , 90001003 , 237 90002002 , 90003001 , 91001002 , 91002001 , 92000002 , //120244 90002002 , 90003001 , 91001002 , 91002001 , 92000002 , //120 238 245 92001001 , 92002000}; 239 246 static G4int aC[15] = {1,1000,999001,1000000,1000999,1999000,1999999, // sum 1 … … 269 276 , 1691., 1667., 1776., 1776., 1854., 1950., 1950., 1950., 1950., 2100. 270 277 , 2030., 2030., 2030., 2127., 2127., 2252., 2020., 2020., 2044., 2045. 271 , 2045., 2297., 2170.272, 2171.565, 2464., 2464., 3108.544, 3111.13,3402.272,3403.565};278 , 2045., 2297., 2170.272, 2171.565, 2464., 2464., 3108.544, 3111.13,3402.272,3403.565}; 272 279 if(iniFlag) // Initialization of the Geant4 hadronic masses 273 {274 m[ 0]= G4Electron::Electron()->GetPDGMass();275 m[ 1]= G4NeutrinoE::NeutrinoE()->GetPDGMass();276 m[ 2]= G4MuonMinus::MuonMinus()->GetPDGMass();277 m[ 3]= G4NeutrinoMu::NeutrinoMu()->GetPDGMass();278 m[ 4]= G4TauMinus::TauMinus()->GetPDGMass();279 m[ 5]=G4NeutrinoTau::NeutrinoTau()->GetPDGMass();280 m[14]= G4PionZero::PionZero()->GetPDGMass();281 m[15]= G4PionMinus::PionMinus()->GetPDGMass();282 m[16]= G4Eta::Eta()->GetPDGMass();283 m[17]= G4KaonZero::KaonZero()->GetPDGMass();284 m[18]= G4KaonMinus::KaonMinus()->GetPDGMass();285 m[19]= G4EtaPrime::EtaPrime()->GetPDGMass();286 m[20]= G4Neutron::Neutron()->GetPDGMass();287 m[21]= G4Proton::Proton()->GetPDGMass();288 m[22]= G4Lambda::Lambda()->GetPDGMass();289 m[23]= G4SigmaMinus::SigmaMinus()->GetPDGMass();290 m[24]= G4SigmaZero::SigmaZero()->GetPDGMass();291 m[25]= G4SigmaPlus::SigmaPlus()->GetPDGMass();292 m[26]= G4XiMinus::XiMinus()->GetPDGMass();293 m[27]= G4XiZero::XiZero()->GetPDGMass();294 m[44]= G4OmegaMinus::OmegaMinus()->GetPDGMass();280 { 281 m[ 0]= G4Electron::Electron()->GetPDGMass(); 282 m[ 1]= G4NeutrinoE::NeutrinoE()->GetPDGMass(); 283 m[ 2]= G4MuonMinus::MuonMinus()->GetPDGMass(); 284 m[ 3]= G4NeutrinoMu::NeutrinoMu()->GetPDGMass(); 285 m[ 4]= G4TauMinus::TauMinus()->GetPDGMass(); 286 m[ 5]=G4NeutrinoTau::NeutrinoTau()->GetPDGMass(); 287 m[14]= G4PionZero::PionZero()->GetPDGMass(); 288 m[15]= G4PionMinus::PionMinus()->GetPDGMass(); 289 m[16]= G4Eta::Eta()->GetPDGMass(); 290 m[17]= G4KaonZero::KaonZero()->GetPDGMass(); 291 m[18]= G4KaonMinus::KaonMinus()->GetPDGMass(); 292 m[19]= G4EtaPrime::EtaPrime()->GetPDGMass(); 293 m[20]= G4Neutron::Neutron()->GetPDGMass(); 294 m[21]= G4Proton::Proton()->GetPDGMass(); 295 m[22]= G4Lambda::Lambda()->GetPDGMass(); 296 m[23]= G4SigmaMinus::SigmaMinus()->GetPDGMass(); 297 m[24]= G4SigmaZero::SigmaZero()->GetPDGMass(); 298 m[25]= G4SigmaPlus::SigmaPlus()->GetPDGMass(); 299 m[26]= G4XiMinus::XiMinus()->GetPDGMass(); 300 m[27]= G4XiZero::XiZero()->GetPDGMass(); 301 m[44]= G4OmegaMinus::OmegaMinus()->GetPDGMass(); 295 302 iniFlag=false; 296 303 } 297 304 if(nQ<0 || nQ>=nQHM) 298 {305 { 299 306 G4cout<<"***G4QPDGCode::QHaM: negative Q-code or Q="<<nQ<<" >= nQmax = "<<nQHM<<G4endl; 300 307 return 0.; … … 327 334 #endif 328 335 if(b<0) // ---> Baryons & Fragments 329 {330 b=-b;336 { 337 b=-b; 331 338 n=-n; 332 339 z=-z; … … 335 342 } 336 343 else if(!b) // --> Mesons 337 {344 { 338 345 //G4bool anti=false; // For the PDG conversion 339 346 if(z<0) // --> Mesons conversion 340 {347 { 341 348 n=-n; 342 349 z=-z; … … 345 352 } 346 353 if(!z) 347 {354 { 348 355 if(s>0) 349 {356 { 350 357 n=-n; 351 358 s=-s; … … 357 364 } 358 365 else // --> z>0 359 {366 { 360 367 if(z==1) 361 368 { … … 368 375 } // End of meson case 369 376 if(b>0) // --> Baryon case 370 {377 { 371 378 if(b==1) 372 {379 { 373 380 if(!s) // --> Baryons 374 {381 { 375 382 if(z==-1) return 34; // Delta- 376 383 else if(!z) return 91; // neutron … … 381 388 } 382 389 else if(s==1) // --> Hyperons 383 {390 { 384 391 if(z==-1) return 93; // Sigma- 385 392 else if(!z) return 92; // Lambda (@@ 24->Sigma0) … … 389 396 } 390 397 else if(s==2) // --> Xi Hyperons 391 {398 { 392 399 if(z==-1) return 95; // Xi- 393 400 else if(!z) return 96; // Xi0 … … 396 403 } 397 404 else if(s==3) // --> Xi Hyperons 398 {405 { 399 406 if(z==-1) return 97; // Omega- 400 407 else if(!z||z==-2) return -1; // Omega+pi Chipolino … … 403 410 } 404 411 else 405 {412 { 406 413 if(b==2) 407 414 { … … 457 464 G4int p=PDGC/10; // Quark Content 458 465 if(r%2) // (2s+1 is odd) Mesons are all the same 459 {466 { 460 467 if (p==11) return Q+=1; 461 468 else if(p==21) return Q+=2; … … 471 478 return -2; 472 479 } 473 }480 } 474 481 else // (2s+1 is even) Baryons 475 {482 { 476 483 G4int s=r/2; 477 484 if(s%2) // ((2s+1)/2 is odd) N Family 478 {485 { 479 486 if (p==211) return Q+=1; 480 487 else if(p==221) return Q+=2; … … 492 499 return -2; 493 500 } 494 }495 else // ((2s+1)/2 is odd) Delta Family496 {501 } 502 else // ((2s+1)/2 is odd) Delta Family 503 { 497 504 if (p==111) return Q+= 1; 498 505 else if(p==211) return Q+= 2; … … 513 520 return -2; 514 521 } 515 }516 }522 } 523 } 517 524 } 518 525 else // Nuclear Fragments … … 527 534 #endif 528 535 return -2; 529 }536 } 530 537 else 531 {538 { 532 539 G4int b=t/3; // baryon number 533 540 if(b==1) // baryons … … 604 611 } 605 612 else 606 {613 { 607 614 if (s==0&&u==-1&&d== 1) return Q+=1; 608 615 else if(s==0&&u== 0&&d== 0) return Q+=2; … … 620 627 return -2; 621 628 } 622 }623 }629 } 630 } 624 631 } 625 632 #ifdef pdebug … … 634 641 G4int ab=theQCode; 635 642 #ifdef debug 636 G4cout<<"G4QPDGCode::GetMass: Mass for Q="<<ab<<",PDG="<<thePDGCode<<",N="<<nQHM<<G4endl;643 G4cout<<"G4QPDGCode::GetMass: Mass for Q="<<ab<<",PDG="<<thePDGCode<<",N="<<nQHM<<G4endl; 637 644 #endif 638 645 if ( (ab < 0 && thePDGCode < 80000000) || !thePDGCode) { … … 664 671 G4double m=GetNuclMass(z,n,s); 665 672 #ifdef debug 666 G4cout<<"G4QPDG::GetM:PDG="<<thePDGCode<<"=>Z="<<z<<",N="<<n<<",S="<<s<<",M="<<m<<G4endl;673 G4cout<<"G4QPDG::GetM:PDG="<<thePDGCode<<"=>Z="<<z<<",N="<<n<<",S="<<s<<",M="<<m<<G4endl; 667 674 #endif 668 675 return m; … … 684 691 , 160., 168., 159., 159., 87., 300., 300., 300., 300., 200. 685 692 , 180., 180., 180., 99., 99., 55., 387., 387., 208., 198. 686 , 198., 149., 120., 120., 170., 170., 120., 120., 170., 170.};693 , 198., 149., 120., 120., 170., 170., 120., 120., 170., 170.}; 687 694 G4int ab=abs(theQCode); 688 695 if(ab<nW) return width[ab]; … … 730 737 static const G4int iNF[nEl]={0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 14 731 738 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 29 732 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44733 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59739 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44 740 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59 734 741 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, // 74 735 742 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, // 89 … … 738 745 static G4int iNmin[nEl]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 14 739 746 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 29 740 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44741 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59747 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, // 44 748 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55, // 59 742 749 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, // 74 743 750 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, // 89 … … 746 753 static G4int iNran[nEl]={19,20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, // 14 747 754 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52, // 29 748 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44749 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59755 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44 756 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59 750 757 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76, // 74 751 758 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69, // 89 … … 754 761 static const G4int iNL[nEl]={19,20,21,22,23,24, 25, 26, 27, 28, 29, 30, 31, 32, 33, // 14 755 762 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52, // 29 756 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44757 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59763 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, // 44 764 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, // 59 758 765 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76, // 74 759 766 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69, // 89 760 767 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};//104 761 768 // ********* S=-4 vectors ************* 762 static G4bool iNin6[nEl]={false,false,false,false,false,false,false,763 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 764 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 765 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 766 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 767 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 768 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 769 false,false,false,false,false,false,false,false,false,false,false,false,false,false};769 static G4bool iNin6[nEl]={false,false,false,false,false,false,false, 770 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 771 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 772 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 773 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 774 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 775 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 776 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 770 777 static G4double VZ6[nEl][iNR]; 771 778 //********* S=-3 vectors ************* 772 static G4bool iNin7[nEl]={false,false,false,false,false,false,false,773 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 774 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 775 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 776 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 777 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 778 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 779 false,false,false,false,false,false,false,false,false,false,false,false,false,false};779 static G4bool iNin7[nEl]={false,false,false,false,false,false,false, 780 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 781 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 782 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 783 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 784 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 785 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 786 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 780 787 static G4double VZ7[nEl][iNR]; 781 788 // ********* S=-2 vectors ************* 782 static G4bool iNin8[nEl]={false,false,false,false,false,false,false,783 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 784 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 785 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 786 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 787 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 788 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 789 false,false,false,false,false,false,false,false,false,false,false,false,false,false};789 static G4bool iNin8[nEl]={false,false,false,false,false,false,false, 790 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 791 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 792 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 793 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 794 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 795 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 796 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 790 797 static G4double VZ8[nEl][iNR]; 791 798 // ********* S=-1 vectors ************* 792 static G4bool iNin9[nEl]={false,false,false,false,false,false,false,793 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 794 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 795 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 796 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 797 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 798 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 799 false,false,false,false,false,false,false,false,false,false,false,false,false,false};799 static G4bool iNin9[nEl]={false,false,false,false,false,false,false, 800 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 801 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 802 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 803 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 804 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 805 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 806 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 800 807 static G4double VZ9[nEl][iNR]; 801 808 // ********* S=0 vectors ************* 802 static G4bool iNin0[nEl]={false,false,false,false,false,false,false,803 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 804 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 805 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 806 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 807 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 808 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 809 false,false,false,false,false,false,false,false,false,false,false,false,false,false};809 static G4bool iNin0[nEl]={false,false,false,false,false,false,false, 810 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 811 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 812 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 813 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 814 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 815 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 816 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 810 817 static G4double VZ0[nEl][iNR]; 811 818 // ********* S=1 vectors ************* 812 static G4bool iNin1[nEl]={false,false,false,false,false,false,false,813 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 814 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 815 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 816 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 817 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 818 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 819 false,false,false,false,false,false,false,false,false,false,false,false,false,false};819 static G4bool iNin1[nEl]={false,false,false,false,false,false,false, 820 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 821 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 822 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 823 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 824 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 825 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 826 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 820 827 static G4double VZ1[nEl][iNR]; 821 828 // ********* S=2 vectors ************* 822 static G4bool iNin2[nEl]={false,false,false,false,false,false,false,823 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 824 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 825 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 826 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 827 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 828 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 829 false,false,false,false,false,false,false,false,false,false,false,false,false,false};829 static G4bool iNin2[nEl]={false,false,false,false,false,false,false, 830 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 831 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 832 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 833 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 834 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 835 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 836 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 830 837 static G4double VZ2[nEl][iNR]; 831 838 // ********* S=3 vectors ************* 832 static G4bool iNin3[nEl]={false,false,false,false,false,false,false,833 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 834 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 835 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 836 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 837 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 838 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 839 false,false,false,false,false,false,false,false,false,false,false,false,false,false};839 static G4bool iNin3[nEl]={false,false,false,false,false,false,false, 840 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 841 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 842 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 843 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 844 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 845 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 846 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 840 847 static G4double VZ3[nEl][iNR]; 841 848 // ********* S=2 vectors ************* 842 static G4bool iNin4[nEl]={false,false,false,false,false,false,false,843 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 844 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 845 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 846 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 847 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 848 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 849 false,false,false,false,false,false,false,false,false,false,false,false,false,false};849 static G4bool iNin4[nEl]={false,false,false,false,false,false,false, 850 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 851 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 852 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 853 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 854 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 855 false,false,false,false,false,false,false,false,false,false,false,false,false,false, 856 false,false,false,false,false,false,false,false,false,false,false,false,false,false}; 850 857 static G4double VZ4[nEl][iNR]; 851 858 // … … 863 870 G4int zns=nz+s; 864 871 if(nz+s<0) 865 {872 { 866 873 z=-z; 867 874 n=-n; … … 871 878 } 872 879 if(z<0) 873 {880 { 874 881 if(z==-1) 875 {882 { 876 883 if(!s) 877 {884 { 878 885 if(n==1) return mPiC; // pi- 879 886 else return mPiC+(n-1)*mNeut; // Delta- + (N-1)*n 880 887 } 881 888 else if(s==1) // Strange negative hadron 882 {889 { 883 890 if(!n) return mKM; // K- 884 891 else if(n==1) return mSiM; // Sigma- … … 888 895 } 889 896 else if(s==2) // --> Double-strange negative hadrons 890 {897 { 891 898 if(!n) return mKsM; // Ksi- 892 899 else if(n==1) return mKsiM+mNeut; // Ksi- + n … … 986 993 } 987 994 else if(n<0) 988 {995 { 989 996 if(n==-1) 990 {997 { 991 998 if(!s) 992 {999 { 993 1000 if(z==1) return mPiC; // pi+ 994 1001 else return mPiC+(z-1)*mProt; // Delta++ + (Z-1)*p 995 }1002 } 996 1003 else if(s==1) // --> Strange neutral hadrons 997 {1004 { 998 1005 if(!z) return mKZ; // K0 999 1006 else if(z==1) return mSiP; // Sigma+ … … 1003 1010 } 1004 1011 else if(s==2) // --> Double-strange negative hadrons 1005 {1012 { 1006 1013 if(!z) return mKsZ; // Ksi0 1007 1014 else if(z==1) return mKsiZ+mProt; // Ksi- + p … … 1095 1102 //return CalculateNuclMass(z,n,s); // @@ This is just to compare the calculation time @@ 1096 1103 if(!s) // **************> S=0 nucleus 1097 {1104 { 1098 1105 if(nz==256) return 256000.; 1099 1106 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1100 1107 if(!iNin0[z]) // ====> This element is already initialized 1101 {1108 { 1102 1109 #ifdef idebug 1103 1110 G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=0 is initialized. F="<<iNin0[z]<<G4endl; … … 1110 1117 G4int dNn=n-Nmin; 1111 1118 if(dNn<0) // --> The minimum N must be reduced 1112 {1119 { 1113 1120 #ifdef qdebug 1114 1121 if(n<iNmin[z]) … … 1122 1129 else if(dNn<iNL[z]) return VZ0[z][dNn]; // Found in DAM 1123 1130 else // --> The maximum N must be increased 1124 {1131 { 1125 1132 #ifdef qdebug 1126 1133 if(dNn>iNmax) … … 1139 1146 } 1140 1147 else if(s==1) // ******************> S=1 nucleus 1141 {1148 { 1142 1149 1143 1150 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1144 1151 if(!iNin1[z]) // ====> This element is already initialized 1145 {1152 { 1146 1153 #ifdef idebug 1147 1154 G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=1 is initialized. F="<<iNin1[z]<<G4endl; … … 1154 1161 G4int dNn=n-Nmin; 1155 1162 if(dNn<0) // --> The minimum N must be reduced 1156 {1163 { 1157 1164 #ifdef qdebug 1158 1165 if(n<iNmin[z]) … … 1166 1173 else if(dNn<iNL[z]) return VZ1[z][dNn]; // Found in DAM 1167 1174 else // --> The maximum N must be increased 1168 {1175 { 1169 1176 #ifdef qdebug 1170 1177 if(dNn>iNmax) … … 1183 1190 } 1184 1191 else if(s==-1) // ******************> S=-1 nucleus 1185 {1192 { 1186 1193 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1187 1194 if(!iNin9[z]) // ====> This element is already initialized 1188 {1195 { 1189 1196 #ifdef idebug 1190 1197 G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-1 is initialized. F="<<iNin9[z]<<G4endl; … … 1197 1204 G4int dNn=n-Nmin; 1198 1205 if(dNn<0) // --> The minimum N must be reduced 1199 {1206 { 1200 1207 #ifdef qdebug 1201 1208 if(n<iNmin[z]) … … 1209 1216 else if(dNn<iNL[z]) return VZ9[z][dNn]; // Found in DAM 1210 1217 else // --> The maximum N must be increased 1211 {1218 { 1212 1219 #ifdef qdebug 1213 1220 if(dNn>iNmax) … … 1226 1233 } 1227 1234 else if(s==2) // ******************> S=2 nucleus 1228 {1235 { 1229 1236 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1230 1237 if(!iNin2[z]) // ====> This element is already initialized 1231 {1238 { 1232 1239 #ifdef idebug 1233 1240 G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=2 is initialized. F="<<iNin2[z]<<G4endl; … … 1240 1247 G4int dNn=n-Nmin; 1241 1248 if(dNn<0) // --> The minimum N must be reduced 1242 {1249 { 1243 1250 #ifdef qdebug 1244 1251 if(n<iNmin[z]) … … 1252 1259 else if(dNn<iNL[z]) return VZ2[z][dNn]; // Found in DAM 1253 1260 else // --> The maximum N must be increased 1254 {1261 { 1255 1262 #ifdef qdebug 1256 1263 if(dNn>iNmax) … … 1269 1276 } 1270 1277 else if(s==-2) // ******************> S=-2 nucleus 1271 {1278 { 1272 1279 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1273 1280 if(!iNin8[z]) // ====> This element is already initialized 1274 {1281 { 1275 1282 #ifdef idebug 1276 1283 G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-2 is initialized. F="<<iNin8[z]<<G4endl; … … 1283 1290 G4int dNn=n-Nmin; 1284 1291 if(dNn<0) // --> The minimum N must be reduced 1285 {1292 { 1286 1293 #ifdef qdebug 1287 1294 if(n<iNmin[z]) … … 1295 1302 else if(dNn<iNL[z]) return VZ8[z][dNn]; // Found in DAM 1296 1303 else // --> The maximum N must be increased 1297 {1304 { 1298 1305 #ifdef qdebug 1299 1306 if(dNn>iNmax) … … 1312 1319 } 1313 1320 else if(s==-3) // ******************> S=-3 nucleus 1314 {1321 { 1315 1322 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1316 1323 if(!iNin7[z]) // ====> This element is already initialized 1317 {1324 { 1318 1325 #ifdef idebug 1319 1326 G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-3 is initialized. F="<<iNin7[z]<<G4endl; … … 1326 1333 G4int dNn=n-Nmin; 1327 1334 if(dNn<0) // --> The minimum N must be reduced 1328 {1335 { 1329 1336 #ifdef qdebug 1330 1337 if(n<iNmin[z]) … … 1338 1345 else if(dNn<iNL[z]) return VZ7[z][dNn]; // Found in DAM 1339 1346 else // --> The maximum N must be increased 1340 {1347 { 1341 1348 #ifdef qdebug 1342 1349 if(dNn>iNmax) … … 1355 1362 } 1356 1363 else if(s==3) // ******************> S=3 nucleus 1357 {1364 { 1358 1365 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1359 1366 if(!iNin3[z]) // ====> This element is already initialized 1360 {1367 { 1361 1368 #ifdef idebug 1362 1369 G4cout<<"**>G4QPDGCode::GetMass:Z="<<z<<", S=3 is initialized. F="<<iNin3[z]<<G4endl; … … 1369 1376 G4int dNn=n-Nmin; 1370 1377 if(dNn<0) // --> The minimum N must be reduced 1371 {1378 { 1372 1379 #ifdef qdebug 1373 1380 if(n<iNmin[z]) … … 1381 1388 else if(dNn<iNL[z]) return VZ3[z][dNn]; // Found in DAM 1382 1389 else // --> The maximum N must be increased 1383 {1390 { 1384 1391 #ifdef qdebug 1385 1392 if(dNn>iNmax) … … 1398 1405 } 1399 1406 else if(s==-4) // ******************> S=-4 nucleus 1400 {1407 { 1401 1408 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1402 1409 if(!iNin6[z]) // ====> This element is already initialized 1403 {1410 { 1404 1411 #ifdef idebug 1405 1412 G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=-4 is initialized. F="<<iNin6[z]<<G4endl; … … 1412 1419 G4int dNn=n-Nmin; 1413 1420 if(dNn<0) // --> The minimum N must be reduced 1414 {1421 { 1415 1422 #ifdef qdebug 1416 1423 if(n<iNmin[z]) … … 1424 1431 else if(dNn<iNL[z]) return VZ6[z][dNn]; // Found in DAM 1425 1432 else // --> The maximum N must be increased 1426 {1433 { 1427 1434 #ifdef qdebug 1428 1435 if(dNn>iNmax) … … 1441 1448 } 1442 1449 else if(s==4) // ******************> S=4 nucleus 1443 {1450 { 1444 1451 G4int Nmin=iNF[z]; // Minimun N(Z) for the Dynamic Associative Memory (DAM) 1445 1452 if(!iNin4[z]) // ====> This element is already initialized 1446 {1453 { 1447 1454 #ifdef idebug 1448 1455 G4cout<<"*>G4QPDGCode::GetMass:Z="<<z<<", S=4 is initialized. F="<<iNin4[z]<<G4endl; … … 1455 1462 G4int dNn=n-Nmin; 1456 1463 if(dNn<0) // --> The minimum N must be reduced 1457 {1464 { 1458 1465 #ifdef qdebug 1459 1466 if(n<iNmin[z]) … … 1467 1474 else if(dNn<iNL[z]) return VZ4[z][dNn]; // Found in DAM 1468 1475 else // --> The maximum N must be increased 1469 {1476 { 1470 1477 #ifdef qdebug 1471 1478 if(dNn>iNmax) … … 1484 1491 } 1485 1492 else 1486 {1493 { 1487 1494 #ifdef qdebug 1488 1495 if(s<Smin || s>Smax) 1489 {1496 { 1490 1497 if(s<Smin) Smin=s; 1491 1498 if(s>Smax) Smax=s; … … 1587 1594 //static G4double c[9][9]={// z=1 =2 =3 =4 =5 =6 =7 =8 =9 1588 1595 // {13.136,14.931,25.320,38.000,45.000,55.000,65.000,75.000,85.000},//n=1 1589 //{14.950, 2.425,11.680,18.374,27.870,35.094,48.000,60.000,72.000}, //n=21590 //{25.930,11.390,14.086,15.770,22.921,28.914,39.700,49.000,60.000}, //n=31591 //{36.830,17.594,14.908, 4.942,12.416,15.699,24.960,32.048,45.000}, //n=41592 //{41.860,26.110,20.946,11.348,12.051,10.650,17.338,23.111,33.610}, //n=51593 //{45.000,31.598,24.954,12.607, 8.668, 0.000, 5.345, 8.006,16.780}, //n=61594 //{50.000,40.820,33.050,20.174,13.369, 3.125, 2.863, 2.855,10.680}, //n=71595 //{55.000,48.810,40.796,25.076,16.562, 3.020, 0.101,-4.737,1.9520}, //n=81596 //{60.000,55.000,50.100,33.660,23.664, 9.873, 5.683,-0.809,0.8730}}; //n=91596 // {14.950, 2.425,11.680,18.374,27.870,35.094,48.000,60.000,72.000}, //n=2 1597 // {25.930,11.390,14.086,15.770,22.921,28.914,39.700,49.000,60.000}, //n=3 1598 // {36.830,17.594,14.908, 4.942,12.416,15.699,24.960,32.048,45.000}, //n=4 1599 // {41.860,26.110,20.946,11.348,12.051,10.650,17.338,23.111,33.610}, //n=5 1600 // {45.000,31.598,24.954,12.607, 8.668, 0.000, 5.345, 8.006,16.780}, //n=6 1601 // {50.000,40.820,33.050,20.174,13.369, 3.125, 2.863, 2.855,10.680}, //n=7 1602 // {55.000,48.810,40.796,25.076,16.562, 3.020, 0.101,-4.737,1.9520}, //n=8 1603 // {60.000,55.000,50.100,33.660,23.664, 9.873, 5.683,-0.809,0.8730}}; //n=9 1597 1604 if(z>107) 1598 {1605 { 1599 1606 #ifdef debug 1600 1607 G4cout<<"***G4QPDGCode::CalcNuclMass: Z="<<z<<">107, N="<<n<<", S="<<s<<G4endl; … … 1641 1648 return mK; // Simple decision 1642 1649 else if(S>0) // General decision 1643 {1650 { 1644 1651 if (-Z>S) return S*mK-(S+Z)*mPi+eps; 1645 1652 else if(Z>=0) return S*mK0+Z*mPi+eps; … … 1647 1654 } 1648 1655 else if(S<0) // General decision 1649 {1656 { 1650 1657 if (Z>-S) return -S*mK+(S+Z)*mPi+eps; 1651 1658 else if(Z<=0) return -S*mK0-Z*mPi+eps; … … 1666 1673 else if(!S&&N<0) return mP-mPi*N+eps; // Positive Isonuclei 1667 1674 else if(S==1) // --> General decision 1668 {1675 { 1669 1676 if (N>1) return mSm+(N-1)*mPi+eps; // (Sigma-)+(n*PI-) 1670 1677 else if(Z>1) return mSp+(Z-1)*mPi+eps; // (Sigma+)+(n*PI+) 1671 1678 } 1672 1679 else if(S==2) // --> General decision 1673 {1680 { 1674 1681 if (N>0) return mXm+N*mPi+eps; // (Xi-)+(n*PI-) 1675 1682 else if(Z>0) return mXz+Z*mPi+eps; // (Xi0)+(n*PI+) 1676 1683 } 1677 1684 else if(S==3) // --> General decision 1678 {1685 { 1679 1686 if (N>-1) return mOm+(N+1)*mPi+eps; // (Omega-)+(n*PI-) 1680 1687 else if(Z>-1) return mOm+(Z+1)*mPi+eps; // (Omega-)+(n*PI+) 1681 1688 } 1682 1689 else if(S>3) // --> General Omega- decision 1683 {1690 { 1684 1691 if (-Z>S-2) return mOm+(S-3)*mK +(2-Z-S)*mPi+eps; 1685 1692 else if(Z>-1) return mOm+(S-3)*mK0+(Z+1)+mPi+eps; … … 1705 1712 else if(!S&&N<0) return dmP-mPi*N+eps; // Positive Isonuclei 1706 1713 else if(S==1) // --> General decision 1707 {1714 { 1708 1715 if (N>2) return dSP+(N-2)*mPi+eps; // (nSigma-)+(n*PI-) 1709 1716 else if(Z>2) return dSN+(Z-1)*mPi+eps; // (pSigma+)+(n*PI+) 1710 1717 } 1711 1718 else if(S==2) // --> General decision 1712 {1719 { 1713 1720 if (N>1) return dXN+(N-1)*mPi+eps; // (nXi-)+(n*PI-) 1714 1721 else if(Z>1) return dXP+(Z-1)*mPi+eps; // (pXi0)+(n*PI+) 1715 1722 } 1716 1723 else if(S==3) // --> General decision 1717 {1724 { 1718 1725 if (N>0) return dON+N*mPi+eps; // (nOmega-)+(n*PI-) 1719 1726 else if(Z>0) return dOP+Z*mPi+eps; // (pOmega-)+(n*PI+) 1720 1727 } 1721 1728 else if(S>3) // --> General Omega- decision 1722 {1729 { 1723 1730 if (-Z>S-2) return dON+(S-3)*mK +(2-Z-S)*mPi+eps; 1724 1731 else if(Z>0) return dOP+(S-3)*mK0+Z+mPi+eps; … … 1727 1734 //else if(S>0) // @@ Implement General Decision 1728 1735 //{ 1729 // //#ifdef debug1730 // G4cout<<"***G4QPDGCode::GetNuclMass:B=2, Z="<<Z<<",N="<<N<<",S="<<S<<G4endl;1731 // //#endif1736 // //#ifdef debug 1737 // G4cout<<"***G4QPDGCode::GetNuclMass:B=2, Z="<<Z<<",N="<<N<<",S="<<S<<G4endl; 1738 // //#endif 1732 1739 // return bigM; // Exotic dibaryons (?) 1733 1740 //} … … 1760 1767 { 1761 1768 if(Zm>=-S) // Enough charge for K+'s 1762 {1769 { 1763 1770 km=-S*mK; // Anti-Lambdas are compensated by protons 1764 Zm+=S;1771 Zm+=S; 1765 1772 } 1766 1773 else if(Zm>0) 1767 {1774 { 1768 1775 km=Zm*mK-(S+Zm)*mK0; // Anti-Lambdas are partially compensated by neutrons 1769 1776 Zm=0; … … 1779 1786 G4int bH=-S-sH; // BigHalhS || as in G4QE::DecayAntiStrange 1780 1787 if(Z>0 && Z>N) 1781 {1788 { 1782 1789 if(Z>=bH) // => "Enough protons in nucleus" case 1783 {1790 { 1784 1791 if(N>=sH) 1785 1792 { … … 1823 1830 } 1824 1831 } 1825 }1832 } 1826 1833 else // Must not be here 1827 {1834 { 1828 1835 #ifdef debug 1829 1836 G4cout<<"***G4QPDGC::CalcNuclMass:Antimatter? Z="<<Z<<",N="<<N<<",S="<<S<<G4endl; 1830 1837 #endif 1831 1838 return 0.; // @@ Antiparticles aren't implemented @@ 1832 }1833 }1839 } 1840 } 1834 1841 else if(N>=bH) 1835 {1842 { 1836 1843 if(Z>=sH) 1837 1844 { … … 1875 1882 } 1876 1883 } 1877 }1884 } 1878 1885 else // Must not be here 1879 {1886 { 1880 1887 return 0.; // @@ Antiparticles aren't implemented @@ 1881 1888 #ifdef debug 1882 1889 G4cout<<"***G4QPDGC::CalcNuclMass:Antimatter? N="<<N<<",Z="<<Z<<",S="<<S<<G4endl; 1883 1890 #endif 1884 }1891 } 1885 1892 S=0; 1886 1893 } … … 1923 1930 //else if(A==256 && Z==128) m=256000.; 1924 1931 //else 1925 //m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass();1926 //m+=-sh[Z]-sh[N]+b1*D*D*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*D)))+Z*Z*(b5*pow(fA,b9)+b6/fA);1932 // m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass(); 1933 //m+=-sh[Z]-sh[N]+b1*D*D*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*D)))+Z*Z*(b5*pow(fA,b9)+b6/fA); 1927 1934 } 1928 1935 //@@//G4double maxM= k+Z*mP+N*mN+S*mL+eps; // @@ eps -- Wings of the Mass parabola … … 1950 1957 { // @@ Can be generalized to anti-nuclei 1951 1958 #ifdef debug 1952 G4cerr<<"* *G4QPDGCode::CalcNucM:A="<<Am<<"<1 || Z="<<Zm<<"<0 || N="<<Nm<<"<0"<<G4endl;1959 G4cerr<<"*G4QPDGCode::CalcNucM:A="<<Am<<"<1 || Z="<<Zm<<"<0 || N="<<Nm<<"<0"<<G4endl; 1953 1960 #endif 1954 1961 } … … 1965 1972 // mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm); 1966 1973 //else 1967 // mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass();1968 // //mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm)))1974 // mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass(); 1975 // //mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm))) 1969 1976 // // +Zm*Zm*(b5*pow(fA,b9)+b6/Am); 1970 1977 } … … 2020 2027 if (ab==22) G4cout<<"-W-G4QPDGC::GetQuarkCont: For the Photon? - Return 0"<<G4endl; 2021 2028 else if(ab==10) G4cout<<"-W-G4QPDGC::GetQuarkCont: For Chipolino? - Return 0"<<G4endl; 2022 else G4cout<<"-W-G4QPDGCode::GetQuarkCont: For PDG="<<thePDGCode<<" Return 0"<<G4endl;2029 else G4cout<<"-W-G4QPDGCode::GetQuarkCont: For PDG="<<thePDGCode<<" Return 0"<<G4endl; 2023 2030 #endif 2024 2031 return G4QContent(0,0,0,0,0,0); // Photon, bosons, leptons … … 2031 2038 G4int t=0; // (3)prototype of highest quark (B) 2032 2039 #ifdef sdebug 2033 G4cout<<"G4QPDGCode::GetQuarkContent: a="<<ab<<", c="<<c<<", f="<<f<<", v="<<v<<G4endl;2040 G4cout<<"G4QPDGCode::GetQuarkContent: a="<<ab<<", c="<<c<<", f="<<f<<", v="<<v<<G4endl; 2034 2041 #endif 2035 2042 if(v>10) // Baryons 2036 {2043 { 2037 2044 t=v/10; // (3) highest quark 2038 2045 v%=10; // (2) high quark 2039 2046 if (f==1) 2040 {2047 { 2041 2048 if(a) ad++; 2042 2049 else d++; 2043 }2050 } 2044 2051 else if(f==2) 2045 {2052 { 2046 2053 if(a) au++; 2047 2054 else u++; 2048 }2055 } 2049 2056 else if(f==3) 2050 {2057 { 2051 2058 if(a) as++; 2052 2059 else s++; 2053 }2054 else G4cerr<<"* **G4QPDGCode::GetQContent:1 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;2060 } 2061 else G4cerr<<"*G4QPDGC::GetQCont:1 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl; 2055 2062 if (v==1) 2056 {2063 { 2057 2064 if(a) ad++; 2058 2065 else d++; 2059 }2066 } 2060 2067 else if(v==2) 2061 {2068 { 2062 2069 if(a) au++; 2063 2070 else u++; 2064 }2071 } 2065 2072 else if(v==3) 2066 {2073 { 2067 2074 if(a) as++; 2068 2075 else s++; 2069 }2070 else G4cerr<<"* **G4QPDGCode::GetQContent:2 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;2076 } 2077 else G4cerr<<"*G4QPDGC::GetQCont:2 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl; 2071 2078 if (t==1) 2072 {2079 { 2073 2080 if(a) ad++; 2074 2081 else d++; 2075 }2082 } 2076 2083 else if(t==2) 2077 {2084 { 2078 2085 if(a) au++; 2079 2086 else u++; 2080 }2087 } 2081 2088 else if(t==3) 2082 {2089 { 2083 2090 if(a) as++; 2084 2091 else s++; 2085 }2086 else G4cerr<<"* **G4QPDGCode::GetQCont:3 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;2092 } 2093 else G4cerr<<"*G4QPDGC::GetQCont:3 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl; 2087 2094 return G4QContent(d,u,s,ad,au,as); 2088 }2095 } 2089 2096 else // Mesons 2090 {2097 { 2091 2098 if(f==v) 2092 {2099 { 2093 2100 if (f==1) return G4QContent(1,0,0,1,0,0); 2094 2101 else if(f==2) return G4QContent(0,1,0,0,1,0); 2095 2102 else if(f==3) return G4QContent(0,0,1,0,0,1); 2096 else G4cerr<<"* **G4QPDGCode::GetQCont:4 PDG="<<thePDGCode<<",i="<<f<<","<<v<<","<<t<<G4endl;2097 }2103 else G4cerr<<"*G4QPDGC::GetQC:4 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl; 2104 } 2098 2105 else 2099 {2106 { 2100 2107 if (f==1 && v==2) 2101 2108 { … … 2113 2120 else return G4QContent(0,1,0,0,0,1); 2114 2121 } 2115 else G4cerr<<"* **G4QPDGCode::GetQCont:5 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl;2116 }2117 }2122 else G4cerr<<"*G4QPDGC::GetQC:5 PDG="<<thePDGCode<<","<<f<<","<<v<<","<<t<<G4endl; 2123 } 2124 } 2118 2125 } 2119 2126 else … … 2214 2221 if(theQCode<fragmStart) return 7; 2215 2222 G4int sub=theQCode-fragmStart; 2216 if ( (sub > 1 && sub < 8) || sub == 15) return 7; //@@Why they are in clusters?-Residuals(?)2223 if ( (sub > 1 && sub < 8) || sub == 15) return 7;//Why they are in clusters?-Residuals(?) 2217 2224 G4int rel=sub; // case of nuclear baryons and isonuclei 2218 2225 if (sub>31)rel =(sub-32)%15; // case of heavy fragments (BaryNum>3) … … 2278 2285 { 2279 2286 G4int shiftQ=GetRelCrossIndex(i, o); 2280 G4int sQCode=theQCode; // QCode of the parent cluster2281 if (shiftQ==7) return 0; // A parent cluster doesn't exist2282 else if(!shiftQ) sQCode+=shiftQ; // Shift QCode of son to QCode of his parent2283 G4QPDGCode parent; // Create a temporary (fake) parent cluster2284 parent.InitByQCode(sQCode); // Initialize it by Q-Code2285 G4QContent parentQC=parent.GetQuarkContent(); // Quark Content of the parent cluster2287 G4int sQCode=theQCode; // QCode of the parent cluster 2288 if (shiftQ==7) return 0; // A parent cluster doesn't exist 2289 else if(!shiftQ) sQCode+=shiftQ; // Shift QCode of son to QCode of his parent 2290 G4QPDGCode parent; // Create a temporary (fake) parent cluster 2291 parent.InitByQCode(sQCode); // Initialize it by Q-Code 2292 G4QContent parentQC=parent.GetQuarkContent();// Quark Content of the parent cluster 2286 2293 if (!o) return parentQC.GetD(); 2287 2294 else if(o==1) return parentQC.GetU(); … … 2324 2331 { 2325 2332 if(cz>500000) cz-=1000000; // AntiProtons 2326 z=cz/1000; // Number of protons2333 z=cz/1000; // Number of protons 2327 2334 r-=cz; // Subtract them from the residual 2328 2335 if(r==90000000) return; … … 2332 2339 { 2333 2340 if(cs>5000000) cs-=10000000; // AntiLambda 2334 s=cs/1000000; // Number of Lambdas2341 s=cs/1000000; // Number of Lambdas 2335 2342 } 2336 2343 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPDGToG4Particle.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QPDGToG4Particle.cc,v 1. 5 2006/06/29 20:07:09 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QPDGToG4Particle.cc,v 1.6 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QG4ToG4Particle singletone class ------------------ … … 35 35 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 36 36 // **************************************************************************************** 37 // Short description: This is a helper class, which converts the PDG-defined 38 // G4QHadrons of the CHIPS model to the G4 particles, defined by the singetones. 39 // ----------------------------------------------------------------------------- 40 37 41 38 42 //#define pdebug … … 61 65 if(!PDG) return 0; 62 66 else if(PDG>0) // Positive PDG Code 63 {67 { 64 68 if(PDG<100) 65 69 { … … 73 77 } 74 78 else 75 {79 { 76 80 if(PDG<15) 77 81 { … … 89 93 } // End of the Lepton definition 90 94 else if(PDG<1000) 91 {95 { 92 96 if(PDG<420) 93 97 { … … 111 115 } 112 116 else 113 {117 { 114 118 if(PDG<500) 115 119 { … … 129 133 } // Emd of the Meson definition 130 134 else 131 {135 { 132 136 if(PDG<3333) 133 137 { … … 137 141 { 138 142 if(PDG==2112) return G4Neutron::Neutron(); 139 else if(PDG==2212) return G4Proton::Proton();143 else if(PDG==2212) return G4Proton::Proton(); 140 144 else return 0; // @@ Warning can be added 141 145 } … … 199 203 } 200 204 else // Negative PDG Code 201 {202 G4int aPDG=-PDG;205 { 206 G4int aPDG=-PDG; 203 207 #ifdef pdebug 204 208 G4cout<<"G4QPDGToG4Particle:Antiparticle PDG="<<PDG<<G4endl; … … 214 218 } 215 219 else 216 {220 { 217 221 if(aPDG<15) 218 222 { … … 230 234 } // End of the Anti-Lepton definition 231 235 else if(aPDG<1000) 232 {236 { 233 237 #ifdef pdebug 234 238 G4cout<<"G4QPDGToG4Particle:AntiMesons aPDG="<<aPDG<<G4endl; … … 282 286 } // Emd of the Anti-Meson definition 283 287 else 284 {288 { 285 289 if(aPDG<3333) 286 290 { … … 290 294 { 291 295 if(aPDG==2112) return G4AntiNeutron::AntiNeutron(); 292 else if(aPDG==2212) return G4AntiProton::AntiProton();296 else if(aPDG==2212) return G4AntiProton::AntiProton(); 293 297 else return 0; // @@ Warning can be added 294 298 } … … 357 361 // ========================================== 358 362 { 359 //======== LEPTONS =========363 //======== LEPTONS ========= 360 364 G4Gamma::GammaDefinition(); 361 365 G4MuonPlus::MuonPlusDefinition(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParentCluster.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParentCluster.cc,v 1.2 5 2006/11/27 10:44:55mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParentCluster.cc,v 1.26 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QParentCluster ---------------- 31 31 // by Mikhail Kossov, Sept 1999. 32 32 // class fora Parent nuclear cluster in the CHIPS Model 33 // ---------------------------------------------------------- 34 33 // ------------------------------------------------------------------- 34 // Short description: The parent cluster is the cluster, which can be 35 // used for the nuclear fragment production. Different clusters csn be 36 // used as the parent cluser for the particular G4QCandidate (nuclear 37 // fragment), e.g. t and He3 for the t-fragment production. So the 38 // G4QParentClusterVector is needed. 39 // ------------------------------------------------------------------- 35 40 //#define debug 36 41 //#define pdebug … … 38 43 #include "G4QParentClusterVector.hh" 39 44 40 G4QParentCluster::G4QParentCluster(G4int PDGCode): thePDGCode(PDGCode), theProbability(0.){}45 G4QParentCluster::G4QParentCluster(G4int PDGCode): thePDGCode(PDGCode),theProbability(0.){} 41 46 42 47 G4QParentCluster::G4QParentCluster(G4int PDGCode, G4double prob): -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParticle.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParticle.cc,v 1.3 3 2006/11/27 10:44:55mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParticle.cc,v 1.34 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QParticle ---------------- … … 34 34 // 1 2 3 4 5 6 7 8 9 35 35 //34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 36 36 // ----------------------------------------------------------------------- 37 // Short description: The G4QParticle is a part of the CHIPS World. It is 38 // characterized by the quark content, spin, mass, width and a vector of 39 // the decay channels (G4QDecayCannelVector). 40 // ----------------------------------------------------------------------- 37 41 //#define debug 38 42 //#define pdebug … … 143 147 else lhs << ","; 144 148 lhs << PCV[j]->GetPDGCode() ; 145 }149 } 146 150 } 147 151 return lhs; … … 170 174 //if(limit<= 6 && nQ>= 6)DecayDB[ 6] = 0; // gamma (22) 171 175 if(limit<= 7 && nQ>= 7) // Z0 (23) 172 {176 { 173 177 DecayDB[ 7].push_back(new G4QDecayChan(.036, 11, -11)); 174 178 DecayDB[ 7].push_back(new G4QDecayChan(.073, 13, -13)); … … 184 188 DecayDB[ 7].push_back(new G4QDecayChan(.990,2112,-2212, 211)); 185 189 DecayDB[ 7].push_back(new G4QDecayChan(1.00,2112,-3122, 111)); 186 }190 } 187 191 if(limit<= 8 && nQ>= 8) // W- (24) @@ Update HadronicDecays 188 {192 { 189 193 DecayDB[ 8].push_back(new G4QDecayChan(.107, 11, -12)); 190 194 DecayDB[ 8].push_back(new G4QDecayChan(.214, 13, -14)); … … 197 201 DecayDB[ 8].push_back(new G4QDecayChan(.921,3122,-2212, 111)); 198 202 DecayDB[ 8].push_back(new G4QDecayChan(1.00,2112,-3122,-211)); 199 }203 } 200 204 //if(limit<= 9 && nQ>= 9)DecayDB[ 9] = 0; // H0 (25) 201 205 //if(limit<= 10 && nQ>= 10)DecayDB[ 10] = 0; // H- (37) 202 206 if(limit<= 11 && nQ>= 11) // Low sigma=pi,pi S-wave : f_0 (800) 203 {207 { 204 208 DecayDB[ 11].push_back(new G4QDecayChan(.333,211,-211)); 205 209 DecayDB[ 11].push_back(new G4QDecayChan(1.00,111, 111)); 206 }210 } 207 211 if(limit<= 12 && nQ>= 12) // Midle Regeon-Pomeron : f_0 (980) 208 {212 { 209 213 DecayDB[ 12].push_back(new G4QDecayChan(.333,211,-211)); 210 214 DecayDB[ 12].push_back(new G4QDecayChan(1.00,111, 111)); 211 }215 } 212 216 if(limit<= 13 && nQ>= 13) // High Regeon-Pomeron : f_0 (1500) 213 {217 { 214 218 DecayDB[ 13].push_back(new G4QDecayChan(.019,221, 331)); 215 219 DecayDB[ 13].push_back(new G4QDecayChan(.070,221, 221)); … … 218 222 DecayDB[ 13].push_back(new G4QDecayChan(.578,211,-211)); //@@ include 4pi decays 219 223 DecayDB[ 13].push_back(new G4QDecayChan(1.00,111, 111)); 220 }224 } 221 225 //if(limit<= 14 && nQ>= 14)DecayDB[ 14].push_back(new G4QDecayChan(1.00,22,22));//Pi0 222 226 //if(limit<= 15 && nQ>= 15)DecayDB[ 15] = 0; // Pi + 223 227 if(limit<= 16 && nQ>= 16) // eta 224 {228 { 225 229 DecayDB[ 16].push_back(new G4QDecayChan(.226,211,-211,111)); 226 230 DecayDB[ 16].push_back(new G4QDecayChan(.551,111, 111,111)); … … 228 232 DecayDB[ 16].push_back(new G4QDecayChan(.606, 11, -11, 22)); //@@ .002 (pi+)(pi-)2gam 229 233 DecayDB[ 16].push_back(new G4QDecayChan(1.00, 22, 22)); 230 }234 } 231 235 //if(limit<= 17 && nQ>= 17) // K 0 (K_short - probab 1/2) @@@@@@@@@@@@ 232 //{236 //{ 233 237 // DecayDB[ 17].push_back(new G4QDecayChan(.6861,211,-211)); 234 238 // DecayDB[ 17].push_back(new G4QDecayChan(1.00, 111, 111)); 235 //}239 //} 236 240 //if(limit<= 18 && nQ>= 18)DecayDB[ 8] = 0; // K + 237 241 if(limit<= 19 && nQ>= 19) // eta' 238 {242 { 239 243 DecayDB[ 19].push_back(new G4QDecayChan(.443,211,-211,221)); 240 244 DecayDB[ 19].push_back(new G4QDecayChan(.652,111, 111,221)); … … 243 247 DecayDB[ 19].push_back(new G4QDecayChan(.979, 22, 113)); 244 248 DecayDB[ 19].push_back(new G4QDecayChan(1.00, 22, 22)); 245 }249 } 246 250 //if(limit<= 20 && nQ>= 20)DecayDB[ 20] = 0; // n 247 251 //if(limit<= 21 && nQ>= 21)DecayDB[ 21] = 0; // p 248 252 //if(limit<= 22 && nQ>= 22) // Lambda ===>>> all week decays are closed at this time 249 //{253 //{ 250 254 // DecayDB[ 22].push_back(new G4QDecayChan(.640,2212,-211)); 251 255 // DecayDB[ 22].push_back(new G4QDecayChan(1.00,2112, 111)); 252 //}256 //} 253 257 //if(limit<= 23 &&nQ>=23)DecayDB[23].push_back(new G4QDecayChan(1.,2112,-211));//Sigma- 254 258 if(limit<= 24 &&nQ>=24)DecayDB[24].push_back(new G4QDecayChan(1.,3122,22));//Sigma0(EM) 255 259 //if(limit<= 25 && nQ>= 25) // Sigma + 256 //{260 //{ 257 261 // DecayDB[ 25].push_back(new G4QDecayChan(.484,2112, 211)); 258 262 // DecayDB[ 25].push_back(new G4QDecayChan(1.00,2212, 111)); 259 //}263 //} 260 264 //if(limit<= 26 && nQ>=26)DecayDB[26].push_back(new G4QDecayChan(1.,3122,-211));// Ksi- 261 265 //if(limit<= 27 && nQ>=27)DecayDB[27].push_back(new G4QDecayChan(1.,3122, 111));// Ksi0 … … 263 267 if(limit<= 29 && nQ>= 29)DecayDB[ 29].push_back(new G4QDecayChan(1., 211, 111));// rho+ 264 268 if(limit<= 30 && nQ>= 30) // omega 265 {269 { 266 270 DecayDB[ 30].push_back(new G4QDecayChan(.891, 211,-211,111)); 267 271 DecayDB[ 30].push_back(new G4QDecayChan(.908, 211,-211)); … … 270 274 DecayDB[ 30].push_back(new G4QDecayChan(.998, 13, -13, 111)); 271 275 DecayDB[ 30].push_back(new G4QDecayChan(1.00, 22, 221)); 272 }276 } 273 277 if(limit<= 31 && nQ>= 31) // K* 0 274 {278 { 275 279 DecayDB[ 31].push_back(new G4QDecayChan(.667,-211, 321)); 276 280 DecayDB[ 31].push_back(new G4QDecayChan(1.00, 111, 311)); 277 }281 } 278 282 if(limit<= 32 && nQ>= 32) // K* + 279 {283 { 280 284 DecayDB[ 32].push_back(new G4QDecayChan(.667, 211, 311)); 281 285 DecayDB[ 32].push_back(new G4QDecayChan(1.00, 111, 321)); 282 }286 } 283 287 if(limit<= 33 && nQ>= 33) // phi 284 {288 { 285 289 DecayDB[ 33].push_back(new G4QDecayChan(.491, 311,-311)); 286 290 DecayDB[ 33].push_back(new G4QDecayChan(.831, 321,-321)); … … 290 294 DecayDB[ 33].push_back(new G4QDecayChan(.948,-211, 213)); 291 295 DecayDB[ 33].push_back(new G4QDecayChan(1.00, 111, 113)); 292 }296 } 293 297 if(limit<= 34 && nQ>= 34)DecayDB[34].push_back(new G4QDecayChan(1.,2112,-211));//Delta- 294 298 if(limit<= 35 && nQ>= 35) // Delta 0 295 {299 { 296 300 DecayDB[ 35].push_back(new G4QDecayChan(.333,2212,-211)); 297 301 DecayDB[ 35].push_back(new G4QDecayChan(1.00,2112, 111)); 298 }302 } 299 303 if(limit<= 36 && nQ>= 36) // Delta + 300 {304 { 301 305 DecayDB[ 36].push_back(new G4QDecayChan(.333,2112, 211)); 302 306 DecayDB[ 36].push_back(new G4QDecayChan(1.00,2212, 111)); 303 }307 } 304 308 if(limit<= 37 && nQ>= 37)DecayDB[37].push_back(new G4QDecayChan(1.,2212,211));//Delta++ 305 309 if(limit<= 38 && nQ>= 38) // Lambda* (1520) 306 {310 { 307 311 DecayDB[ 38].push_back(new G4QDecayChan(.225,3112,-311)); 308 312 DecayDB[ 38].push_back(new G4QDecayChan(.450,3222,-321)); … … 317 321 DecayDB[ 38].push_back(new G4QDecayChan(.982,3112, 211)); 318 322 DecayDB[ 38].push_back(new G4QDecayChan(1.00,3122, 22)); 319 }323 } 320 324 if(limit<= 39 && nQ>= 39) // Sigma* - 321 {325 { 322 326 DecayDB[ 39].push_back(new G4QDecayChan(.060,3112, 111)); 323 327 DecayDB[ 39].push_back(new G4QDecayChan(.120,3212,-211)); 324 328 DecayDB[ 39].push_back(new G4QDecayChan(1.00,3122,-211)); 325 }329 } 326 330 if(limit<= 40 && nQ>= 40) // Sigma* 0 327 {331 { 328 332 DecayDB[ 40].push_back(new G4QDecayChan(.040,3112, 211)); 329 333 DecayDB[ 40].push_back(new G4QDecayChan(.080,3222,-211)); 330 334 DecayDB[ 40].push_back(new G4QDecayChan(.120,3212, 111)); 331 335 DecayDB[ 40].push_back(new G4QDecayChan(1.00,3122, 111)); 332 }336 } 333 337 if(limit<= 41 && nQ>= 41) // Sigma* + 334 {338 { 335 339 DecayDB[ 41].push_back(new G4QDecayChan(.060,3212, 211)); 336 340 DecayDB[ 41].push_back(new G4QDecayChan(.120,3222, 111)); 337 341 DecayDB[ 41].push_back(new G4QDecayChan(1.00,3122, 211)); 338 }342 } 339 343 if(limit<= 42 && nQ>= 42) // Ksi* - 340 {344 { 341 345 DecayDB[ 42].push_back(new G4QDecayChan(.667,3322,-211)); 342 346 DecayDB[ 42].push_back(new G4QDecayChan(1.00,3312, 111)); 343 }347 } 344 348 if(limit<= 43 && nQ>= 43) // Ksi* 0 345 {349 { 346 350 DecayDB[ 43].push_back(new G4QDecayChan(.667,3312, 211)); 347 351 DecayDB[ 43].push_back(new G4QDecayChan(1.00,3322, 111)); 348 }352 } 349 353 //if(limit<= 44 && nQ>= 44) // OMEGA - (Weak) 350 //{354 //{ 351 355 // DecayDB[ 44].push_back(new G4QDecayChan(.678,3122, 321)); 352 356 // DecayDB[ 44].push_back(new G4QDecayChan(.914,3322,-211)); 353 357 // DecayDB[ 44].push_back(new G4QDecayChan(1.00,3312, 111)); 354 //}358 //} 355 359 if(limit<= 45 && nQ>= 45) // a_2 0 356 {360 { 357 361 DecayDB[ 45].push_back(new G4QDecayChan(.070, 211,-211,223)); 358 362 DecayDB[ 45].push_back(new G4QDecayChan(.106, 111, 111,223)); … … 363 367 DecayDB[ 45].push_back(new G4QDecayChan(.767, 211,-213)); 364 368 DecayDB[ 45].push_back(new G4QDecayChan(1.00, 111, 113)); 365 }369 } 366 370 if(limit<= 46 && nQ>= 46) // a_2 + 367 {371 { 368 372 DecayDB[ 46].push_back(new G4QDecayChan(.106,111,211,223)); 369 373 DecayDB[ 46].push_back(new G4QDecayChan(.156, 321,-311)); … … 371 375 DecayDB[ 46].push_back(new G4QDecayChan(.651, 211, 113)); 372 376 DecayDB[ 46].push_back(new G4QDecayChan(1.00, 111, 213)); 373 }377 } 374 378 if(limit<= 47 && nQ>= 47) // f_2 0 375 {379 { 376 380 DecayDB[ 47].push_back(new G4QDecayChan(.005, 221, 221)); 377 381 DecayDB[ 47].push_back(new G4QDecayChan(.028, 311,-311)); … … 382 386 DecayDB[ 47].push_back(new G4QDecayChan(.717, 211,-211)); 383 387 DecayDB[ 47].push_back(new G4QDecayChan(1.00, 111, 111)); 384 }388 } 385 389 if(limit<= 48 && nQ>= 48) // K_2 0 386 {390 { 387 391 DecayDB[ 48].push_back(new G4QDecayChan(.028, 311, 223)); 388 392 DecayDB[ 48].push_back(new G4QDecayChan(.074, 211,-211,313)); … … 395 399 DecayDB[ 48].push_back(new G4QDecayChan(.750,-211, 321)); 396 400 DecayDB[ 48].push_back(new G4QDecayChan(1.00, 111, 311)); 397 }401 } 398 402 if(limit<= 49 && nQ>= 49) // K_2 + 399 {403 { 400 404 DecayDB[ 49].push_back(new G4QDecayChan(.028, 321, 223)); 401 405 DecayDB[ 49].push_back(new G4QDecayChan(.074,211,-211,323)); … … 408 412 DecayDB[ 49].push_back(new G4QDecayChan(.750, 211, 311)); 409 413 DecayDB[ 49].push_back(new G4QDecayChan(1.00, 111, 321)); 410 }414 } 411 415 if(limit<= 50 && nQ>= 50) // f_2' 0 412 {416 { 413 417 DecayDB[ 50].push_back(new G4QDecayChan(.103, 221, 221)); 414 418 DecayDB[ 50].push_back(new G4QDecayChan(.547, 311,-311)); … … 416 420 DecayDB[ 50].push_back(new G4QDecayChan(.997, 211,-211)); 417 421 DecayDB[ 50].push_back(new G4QDecayChan(1.00, 111, 111)); 418 }422 } 419 423 if(limit<= 51 && nQ>= 51) // N_5/2 0 420 {424 { 421 425 DecayDB[ 51].push_back(new G4QDecayChan(.040, 211, 1114)); 422 426 DecayDB[ 51].push_back(new G4QDecayChan(.080, 111, 2114)); … … 427 431 DecayDB[ 51].push_back(new G4QDecayChan(.780, 2212,-211)); 428 432 DecayDB[ 51].push_back(new G4QDecayChan(1.00, 2112, 111)); 429 }433 } 430 434 if(limit<= 52 && nQ>= 52) // N_5/2 + 431 {435 { 432 436 DecayDB[ 52].push_back(new G4QDecayChan(.040,-211, 2224)); 433 437 DecayDB[ 52].push_back(new G4QDecayChan(.080, 211, 2114)); … … 438 442 DecayDB[ 52].push_back(new G4QDecayChan(.780, 2112, 211)); 439 443 DecayDB[ 52].push_back(new G4QDecayChan(1.00, 2212, 111)); 440 }444 } 441 445 if(limit<= 53 && nQ>= 53) // LAMBDA_5/2 442 {446 { 443 447 DecayDB[ 53].push_back(new G4QDecayChan(.350, 2112,-311)); 444 448 DecayDB[ 53].push_back(new G4QDecayChan(.700, 2212,-321)); … … 449 453 DecayDB[ 53].push_back(new G4QDecayChan(.940, 3222,-211)); 450 454 DecayDB[ 53].push_back(new G4QDecayChan(1.00, 3212, 111)); 451 }455 } 452 456 if(limit<= 54 && nQ>= 54) // SIGMA_5/2 - 453 {457 { 454 458 DecayDB[ 54].push_back(new G4QDecayChan(.600, 2112,-321)); 455 459 DecayDB[ 54].push_back(new G4QDecayChan(.660,-211, 3214)); … … 458 462 DecayDB[ 54].push_back(new G4QDecayChan(.900, 3112, 111)); 459 463 DecayDB[ 54].push_back(new G4QDecayChan(1.00, 3122,-211)); 460 }464 } 461 465 if(limit<= 55 && nQ>= 55) // SIGMA_5/2 0 462 {466 { 463 467 DecayDB[ 55].push_back(new G4QDecayChan(.300, 2112,-311)); 464 468 DecayDB[ 55].push_back(new G4QDecayChan(.600, 2212,-321)); … … 470 474 DecayDB[ 55].push_back(new G4QDecayChan(.900, 3212, 111)); 471 475 DecayDB[ 55].push_back(new G4QDecayChan(1.00, 3122, 111)); 472 }476 } 473 477 if(limit<= 56 && nQ>= 56) // SIGMA_5/2 + 474 {478 { 475 479 DecayDB[ 56].push_back(new G4QDecayChan(.600, 2212,-311)); 476 480 DecayDB[ 56].push_back(new G4QDecayChan(.660, 211, 3214)); … … 479 483 DecayDB[ 56].push_back(new G4QDecayChan(.900, 3222, 111)); 480 484 DecayDB[ 56].push_back(new G4QDecayChan(1.00, 3122, 211)); 481 }485 } 482 486 if(limit<= 57 && nQ>= 57) // KSI_5/2 - 483 {487 { 484 488 DecayDB[ 57].push_back(new G4QDecayChan(.400, 3112,-311)); 485 489 DecayDB[ 57].push_back(new G4QDecayChan(.800, 3212,-321)); 486 490 DecayDB[ 57].push_back(new G4QDecayChan(1.00, 3122,-321)); 487 }491 } 488 492 if(limit<= 58 && nQ>= 58) // KSI_5/2 0 489 {493 { 490 494 DecayDB[ 58].push_back(new G4QDecayChan(.400, 3212,-311)); 491 495 DecayDB[ 58].push_back(new G4QDecayChan(.800, 3222,-321)); 492 496 DecayDB[ 58].push_back(new G4QDecayChan(1.00, 3122,-311)); 493 }497 } 494 498 if(limit<= 59 && nQ>= 59) // rho_3 0 495 {499 { 496 500 DecayDB[ 59].push_back(new G4QDecayChan(.019,311,-313)); 497 501 DecayDB[ 59].push_back(new G4QDecayChan(.038,321,-323)); … … 503 507 DecayDB[ 59].push_back(new G4QDecayChan(.764,111, 111,113)); 504 508 DecayDB[ 59].push_back(new G4QDecayChan(1.00,211,-211)); 505 }509 } 506 510 if(limit<= 60 && nQ>= 60) // rho_3 + 507 {511 { 508 512 DecayDB[ 60].push_back(new G4QDecayChan(.019, 321,-313)); 509 513 DecayDB[ 60].push_back(new G4QDecayChan(.038,-311, 323)); … … 514 518 DecayDB[ 60].push_back(new G4QDecayChan(.764,211,111,113)); 515 519 DecayDB[ 60].push_back(new G4QDecayChan(1.00, 211, 111)); 516 }520 } 517 521 if(limit<= 61 && nQ>= 61) // omega_3 518 {522 { 519 523 DecayDB[ 61].push_back(new G4QDecayChan(.020,211,-211,223)); 520 524 DecayDB[ 61].push_back(new G4QDecayChan(.040,111, 111,223)); … … 522 526 DecayDB[ 61].push_back(new G4QDecayChan(.080,-211, 213)); 523 527 DecayDB[ 61].push_back(new G4QDecayChan(1.00, 111, 113)); 524 }528 } 525 529 if(limit<= 62 && nQ>= 62) // K_3 0 526 {530 { 527 531 DecayDB[ 62].push_back(new G4QDecayChan(.030, 111, 315)); 528 532 DecayDB[ 62].push_back(new G4QDecayChan(.060,-211, 325)); … … 534 538 DecayDB[ 62].push_back(new G4QDecayChan(.940,-211, 321)); 535 539 DecayDB[ 62].push_back(new G4QDecayChan(1.00, 111, 311)); 536 }540 } 537 541 if(limit<= 63 && nQ>= 63) // K_3 + 538 {542 { 539 543 DecayDB[ 63].push_back(new G4QDecayChan(.030, 211, 315)); 540 544 DecayDB[ 63].push_back(new G4QDecayChan(.060, 111, 325)); … … 546 550 DecayDB[ 63].push_back(new G4QDecayChan(.940, 211, 311)); 547 551 DecayDB[ 63].push_back(new G4QDecayChan(1.00, 111, 321)); 548 }552 } 549 553 if(limit<= 64 && nQ>= 64) // phi_3 550 {554 { 551 555 DecayDB[ 64].push_back(new G4QDecayChan(.250, 321,-321)); 552 556 DecayDB[ 64].push_back(new G4QDecayChan(.500, 311,-311)); … … 555 559 DecayDB[ 64].push_back(new G4QDecayChan(.875, 311,-313)); 556 560 DecayDB[ 64].push_back(new G4QDecayChan(1.00,-311, 313)); 557 }561 } 558 562 if(limit<= 65 && nQ>= 65) // DELTA_7/2 - 559 {563 { 560 564 DecayDB[ 65].push_back(new G4QDecayChan(.200, 2112,-213 )); 561 565 DecayDB[ 65].push_back(new G4QDecayChan(.320,-211 , 2114)); 562 566 DecayDB[ 65].push_back(new G4QDecayChan(.500, 111 , 1114)); 563 567 DecayDB[ 65].push_back(new G4QDecayChan(1.00, 2112,-211 )); 564 }568 } 565 569 if(limit<= 66 && nQ>= 66) // DELTA_7/2 0 566 {570 { 567 571 DecayDB[ 66].push_back(new G4QDecayChan(.133, 2112, 113 )); 568 572 DecayDB[ 66].push_back(new G4QDecayChan(.200, 2212,-213 )); … … 572 576 DecayDB[ 66].push_back(new G4QDecayChan(.666, 2212,-211 )); 573 577 DecayDB[ 66].push_back(new G4QDecayChan(1.00, 2112, 111 )); 574 }578 } 575 579 if(limit<= 67 && nQ>= 67) // DELTA_7/2 + 576 {580 { 577 581 DecayDB[ 67].push_back(new G4QDecayChan(.133, 2112, 213 )); 578 582 DecayDB[ 67].push_back(new G4QDecayChan(.200, 2212, 113 )); … … 582 586 DecayDB[ 67].push_back(new G4QDecayChan(.666, 2112, 211 )); 583 587 DecayDB[ 67].push_back(new G4QDecayChan(1.00, 2212, 111 )); 584 }588 } 585 589 if(limit<= 68 && nQ>= 68) // DELTA_7/2 ++ 586 {590 { 587 591 DecayDB[ 68].push_back(new G4QDecayChan(.200, 2212, 213 )); 588 592 DecayDB[ 68].push_back(new G4QDecayChan(.320, 211 , 2214)); 589 593 DecayDB[ 68].push_back(new G4QDecayChan(.500, 111 , 2224)); 590 594 DecayDB[ 68].push_back(new G4QDecayChan(1.00, 2212, 211 )); 591 }595 } 592 596 if(limit<= 69 && nQ>= 69) // LAMBDA_7/2 593 {597 { 594 598 DecayDB[ 69].push_back(new G4QDecayChan(.160, 3122, 223 )); 595 599 DecayDB[ 69].push_back(new G4QDecayChan(.260, 2112,-313 )); … … 603 607 DecayDB[ 69].push_back(new G4QDecayChan(.800, 3222,-211 )); 604 608 DecayDB[ 69].push_back(new G4QDecayChan(1.00, 3212, 111 )); 605 }609 } 606 610 if(limit<= 70 && nQ>= 70) // SIGMA_7/2 - 607 {611 { 608 612 DecayDB[ 70].push_back(new G4QDecayChan(.030, 2112,-323 )); 609 613 DecayDB[ 70].push_back(new G4QDecayChan(.165,-311 , 1114)); … … 617 621 DecayDB[ 70].push_back(new G4QDecayChan(.780,-321 , 2112)); 618 622 DecayDB[ 70].push_back(new G4QDecayChan(1.00,-211 , 3122)); 619 }623 } 620 624 if(limit<= 71 && nQ>= 71) // SIGMA_7/2 0 621 {625 { 622 626 DecayDB[ 71].push_back(new G4QDecayChan(.015, 2112,-313 )); 623 627 DecayDB[ 71].push_back(new G4QDecayChan(.030, 2212,-321 )); … … 634 638 DecayDB[ 71].push_back(new G4QDecayChan(.780,-321 , 2212)); 635 639 DecayDB[ 71].push_back(new G4QDecayChan(1.00, 111 , 3122)); 636 }640 } 637 641 if(limit<= 72 && nQ>= 72) // SIGMA_7/2 + 638 {642 { 639 643 DecayDB[ 72].push_back(new G4QDecayChan(.030, 2212,-313 )); 640 644 DecayDB[ 72].push_back(new G4QDecayChan(.165,-321 , 2224)); … … 648 652 DecayDB[ 72].push_back(new G4QDecayChan(.780,-311 , 2212)); 649 653 DecayDB[ 72].push_back(new G4QDecayChan(1.00, 211 , 3122)); 650 }654 } 651 655 if(limit<= 73 && nQ>= 73) // KSI_7/2 - 652 {656 { 653 657 DecayDB[ 73].push_back(new G4QDecayChan(.400, 3112,-311)); 654 658 DecayDB[ 73].push_back(new G4QDecayChan(.800, 3212,-321)); 655 659 DecayDB[ 73].push_back(new G4QDecayChan(1.00, 3122,-321)); 656 }660 } 657 661 if(limit<= 74 && nQ>= 74) // KSI_7/2 0 658 {662 { 659 663 DecayDB[ 74].push_back(new G4QDecayChan(.400, 3212,-311)); 660 664 DecayDB[ 74].push_back(new G4QDecayChan(.800, 3222,-321)); 661 665 DecayDB[ 74].push_back(new G4QDecayChan(1.00, 3122,-311)); 662 }666 } 663 667 if(limit<= 75 && nQ>= 75) // OMEGA_7/2 - 664 {668 { 665 669 DecayDB[ 75].push_back(new G4QDecayChan(.250,-311 , 3314)); 666 670 DecayDB[ 75].push_back(new G4QDecayChan(.500,-321 , 3324)); 667 671 DecayDB[ 75].push_back(new G4QDecayChan(.750, 3312,-313 )); 668 672 DecayDB[ 75].push_back(new G4QDecayChan(1.00, 3322,-323 )); 669 }673 } 670 674 if(limit<= 76 && nQ>= 76) // a_4 0 671 {675 { 672 676 DecayDB[ 76].push_back(new G4QDecayChan(.200, 311,-311)); 673 677 DecayDB[ 76].push_back(new G4QDecayChan(.400, 321,-321)); 674 678 DecayDB[ 76].push_back(new G4QDecayChan(.600, 111, 221)); 675 679 DecayDB[ 76].push_back(new G4QDecayChan(1.00, 111, 211,-211)); 676 }680 } 677 681 if(limit<= 77 && nQ>= 77) // a_4 + 678 {682 { 679 683 DecayDB[ 77].push_back(new G4QDecayChan(.400, 321,-311)); 680 684 DecayDB[ 77].push_back(new G4QDecayChan(.600, 211, 221)); 681 685 DecayDB[ 77].push_back(new G4QDecayChan(.800, 211, 211,-211)); 682 686 DecayDB[ 77].push_back(new G4QDecayChan(1.00, 211, 111, 111)); 683 }687 } 684 688 if(limit<= 78 && nQ>= 78) // f_4 0 685 {689 { 686 690 DecayDB[ 78].push_back(new G4QDecayChan(.020, 333, 333)); 687 691 DecayDB[ 78].push_back(new G4QDecayChan(.340, 223, 223)); … … 693 697 DecayDB[ 78].push_back(new G4QDecayChan(.940, 211,-211)); 694 698 DecayDB[ 78].push_back(new G4QDecayChan(1.00, 111, 111)); 695 }699 } 696 700 if(limit<= 79 && nQ>= 79) // K_4 0 697 {701 { 698 702 DecayDB[ 79].push_back(new G4QDecayChan(.060, 333, 313)); 699 703 DecayDB[ 79].push_back(new G4QDecayChan(.260, 223, 313)); … … 707 711 DecayDB[ 79].push_back(new G4QDecayChan(.900, 311, 111)); 708 712 DecayDB[ 79].push_back(new G4QDecayChan(1.00, 321,-211)); 709 }713 } 710 714 if(limit<= 80 && nQ>= 80) // K_4 + 711 {715 { 712 716 DecayDB[ 80].push_back(new G4QDecayChan(.060, 333, 323)); 713 717 DecayDB[ 80].push_back(new G4QDecayChan(.260, 223, 323)); … … 721 725 DecayDB[ 80].push_back(new G4QDecayChan(.900, 311, 211)); 722 726 DecayDB[ 80].push_back(new G4QDecayChan(1.00, 321, 111)); 723 }727 } 724 728 if(limit<=81&&nQ>=81)DecayDB[81].push_back(new G4QDecayChan(1., 333,333));//phi_4(2300) 725 729 if(limit<=82&&nQ>=82)DecayDB[82].push_back(new G4QDecayChan(1.,2212, 2224));//pDelta++ … … 762 766 // ------- Nuclear fragments 763 767 //if(limit<=114 && nQ>=114) 764 //{768 //{ 765 769 // if(limit<114) limit=101; 766 770 // for (int i=limit; i<nQ; i++) DecayDB[i] = 0; 767 771 //} 768 //Update the limit772 //Update the limit 769 773 limit=nQ+1; 770 774 #ifdef debug 771 G4cout<<"G4QParticle::InitDecayVector: limit is set to "<<limit<<G4endl;775 G4cout<<"G4QParticle::InitDecayVector: limit is set to "<<limit<<G4endl; 772 776 #endif 773 777 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QParton.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QParton.cc,v 1. 3 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QParton.cc,v 1.4 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ … … 36 36 // For comparison mirror member functions are taken from G4 class: 37 37 // G4Parton 38 // ------------------------------------------------------------ 39 38 // ------------------------------------------------------------------------ 39 // Short description: The Quark-Gluon String consists of the partons, which 40 // are quarks and some times gluons. 41 // ------------------------------------------------------------------------ 40 42 #include "G4QParton.hh" 41 43 42 44 G4QParton::G4QParton(G4int PDGcode) 43 45 { 44 PDGencoding=PDGcode;45 theX = 0;46 theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);47 G4int aPDG=std::abs(PDGcode);48 //___________quarks__ 2 possible codes for gluons _ Condition for di-quarks49 if(!aPDG || (aPDG>3 && PDGcode!=9 && PDGcode!=21 && (aPDG>3303||aPDG<1103||aPDG%100>3)) 50 || theDefinition==0)51 {52 G4cerr<<"***G4QParton::Constructor: wrong quark/diquark PDG="<<PDGcode<<G4endl;53 G4Exception("G4QParton::Constructor:","72",FatalException,"WrongPartonPDG");54 }55 //56 // colour by random in (1,2,3)=(R,G,B) for quarks and57 // in (-1,-2,-3)=(Rbar,Gbar,Bbar) for anti-quarks:58 G4int RGB=(G4int)(3*G4UniformRand())+1;59 G4String name=theDefinition->GetParticleType();60 if(name == "quarks")61 {62 if(PDGcode>0) theColour = RGB;46 PDGencoding=PDGcode; 47 theX = 0; 48 theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding); 49 G4int aPDG=std::abs(PDGcode); 50 //___________quarks__ 2 possible codes for gluons _ Condition for di-quarks 51 if(!aPDG || (aPDG>3 && PDGcode!=9 && PDGcode!=21 && 52 (aPDG>3303||aPDG<1103||aPDG%100>3)) || theDefinition==0) 53 { 54 G4cerr<<"***G4QParton::Constructor: wrong quark/diquark PDG="<<PDGcode<<G4endl; 55 G4Exception("G4QParton::Constructor:","72",FatalException,"WrongPartonPDG"); 56 } 57 // 58 // colour by random in (1,2,3)=(R,G,B) for quarks and 59 // in (-1,-2,-3)=(Rbar,Gbar,Bbar) for anti-quarks: 60 G4int RGB=(G4int)(3*G4UniformRand())+1; 61 G4String name=theDefinition->GetParticleType(); 62 if(name == "quarks") 63 { 64 if(PDGcode>0) theColour = RGB; 63 65 else theColour =-RGB; 64 66 } 65 // colour by random in (-1,-2,-3)=(Rbar,Gbar,Bbar)=(GB,RB,RG) for di-quarks and66 // in (1,2,3)=(R,G,B)=(GB,RB,RG) for anti-di-quarks:67 else if(name == "diquarks")67 // colour by random in (-1,-2,-3)=(Rbar,Gbar,Bbar)=(GB,RB,RG) for di-quarks and 68 // in (1,2,3)=(R,G,B)=(GB,RB,RG) for anti-di-quarks: 69 else if(name == "diquarks") 68 70 { 69 if(PDGcode>0) theColour =-RGB;71 if(PDGcode>0) theColour =-RGB; 70 72 else theColour = RGB; 71 }72 // colour by random in(-11,-12,-13,-21,...,-33)=(RRbar,RGbar,RBbar,...,BBbar) for gluons73 else if(name == "gluons") theColour = -(RGB*10 + (G4int)(3*G4UniformRand())+1);74 else73 } 74 // ColourByRandom (-11,-12,-13,-21,...,-33)=(RRbar,RGbar,RBbar,...,BBbar) for gluons 75 else if(name == "gluons") theColour = -(RGB*10 + (G4int)(3*G4UniformRand())+1); 76 else 75 77 { 76 G4cerr<<"***G4QParton::Constructor: not quark/diquark/gluon = "78 G4cerr<<"***G4QParton::Constructor: not quark/diquark/gluon = " 77 79 <<theDefinition->GetParticleType()<<G4endl; 78 80 G4Exception("G4QParton::Constructor:","72",FatalException,"WrongParton"); 79 }80 // isospin-z from PDG-encoded isospin-z for81 // quarks, anti-quarks, di-quarks, and anti-di-quarks:82 if (name == "quarks" || name == "diquarks")theIsoSpinZ = theDefinition->GetPDGIsospin3();83 // isospin-z choosen at random from PDG-encoded isospin for gluons (should be zero):84 else81 } 82 // isospin-z from PDG-encoded isospin-z for 83 // quarks, anti-quarks, di-quarks, and anti-di-quarks: 84 if(name == "quarks" || name == "diquarks") theIsoSpinZ = theDefinition->GetPDGIsospin3(); 85 // isospin-z choosen at random from PDG-encoded isospin for gluons (should be zero): 86 else 85 87 { 86 G4int thisPDGiIsospin=theDefinition->GetPDGiIsospin();87 if (thisPDGiIsospin == 0) theIsoSpinZ = 0;88 //@@ ? M.K.89 else theIsoSpinZ = ((G4int)((thisPDGiIsospin+1)*G4UniformRand()))-thisPDGiIsospin*0.5;90 }91 //92 // spin-z choosen at random from PDG-encoded spin:93 //94 G4int thisPDGiSpin=theDefinition->GetPDGiSpin();95 if(thisPDGiSpin == 0)theSpinZ = 0;96 elsetheSpinZ = (G4int)((thisPDGiSpin+1)*G4UniformRand())-thisPDGiSpin*0.5;;88 G4int thisPDGiIsospin=theDefinition->GetPDGiIsospin(); 89 if (thisPDGiIsospin == 0) theIsoSpinZ = 0; 90 //@@ ? M.K. 91 else theIsoSpinZ=((G4int)((thisPDGiIsospin+1)*G4UniformRand())) - thisPDGiIsospin*0.5; 92 } 93 // 94 // spin-z choosen at random from PDG-encoded spin: 95 // 96 G4int thisPDGiSpin=theDefinition->GetPDGiSpin(); 97 if(thisPDGiSpin == 0) theSpinZ = 0; 98 else theSpinZ = (G4int)((thisPDGiSpin+1)*G4UniformRand())-thisPDGiSpin*0.5;; 97 99 } 98 100 … … 132 134 theColour = right.theColour; 133 135 theIsoSpinZ = right.theIsoSpinZ; 134 theSpinZ = right.theSpinZ; 136 theSpinZ = right.theSpinZ; 135 137 } 136 138 return *this; … … 139 141 G4QParton::~G4QParton() 140 142 { 141 // cout << "G4QParton::~G4QParton(): this = "<<this <<endl;142 // cout << "break here"<<this <<endl;143 //G4cout << "G4QParton::~G4QParton(): this = "<<this <<G4endl; 144 //G4cout << "break here"<<this <<G4endl; 143 145 } 144 146 145 147 void G4QParton::DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection) 146 148 { 147 G4double Mass = GetMass(); 148 G4LorentzVector a4Momentum = Get4Momentum(); 149 aLightConeMomentum*=theX; 150 G4double TransverseMass2 = sqr(a4Momentum.px()) + sqr(a4Momentum.py()) + sqr(Mass); 151 a4Momentum.setPz(0.5*(aLightConeMomentum - TransverseMass2/aLightConeMomentum)*(aDirection? 1: -1)); 152 a4Momentum.setE( 0.5*(aLightConeMomentum + TransverseMass2/aLightConeMomentum)); 153 Set4Momentum(a4Momentum); 149 G4double Mass = GetMass(); 150 G4LorentzVector a4Momentum = Get4Momentum(); 151 aLightConeMomentum*=theX; 152 G4double TransverseMass2 = sqr(a4Momentum.px()) + sqr(a4Momentum.py()) + sqr(Mass); 153 a4Momentum.setPz(0.5*(aLightConeMomentum - TransverseMass2/aLightConeMomentum) * 154 (aDirection? 1: -1)); 155 a4Momentum.setE( 0.5*(aLightConeMomentum + TransverseMass2/aLightConeMomentum)); 156 Set4Momentum(a4Momentum); 154 157 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPartonPair.cc
r1007 r1055 26 26 #include "G4QPartonPair.hh" 27 27 // 28 // $Id: G4QPartonPair.cc,v 1. 1 2006/10/30 10:40:36mkossov Exp $29 // GEANT4 tag $Name: geant4-09-0 2$28 // $Id: G4QPartonPair.cc,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 30 30 // 31 31 // ------------------------------------------------------------ … … 34 34 // ---------------- G4QParton ---------------- 35 35 // by Mikhail Kossov, Oct 2006. 36 // class for PartonPair (hadron) used by Parton String Models 37 // ------------------------------------------------------------ 36 // class for PartonPair (hadron) used by QGS Models 37 // -------------------------------------------------------------- 38 // Short description: Each Quasmon String has a pair of partons 39 // (quark/diquark-partons) on its ends. During the hadronization 40 // procedure the rapidity gap between partons shrinks, but the 41 // parton pair still exists, while it is converted to the final 42 // meson (quaek-antiquark) or baryon (quark-diquark). 43 // -------------------------------------------------------------- 38 44 39 45 G4QPartonPair::G4QPartonPair(G4QParton* P1, G4QParton* P2, G4int Type, G4int aDirection) 40 : Parton1(P1), Parton2(P2), CollisionType(Type), Direction(aDirection) {}46 : Parton1(P1), Parton2(P2), CollisionType(Type), Direction(aDirection) {} 41 47 42 48 G4QPartonPair::~G4QPartonPair() {} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QPomeron.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QPomeron.cc,v 1. 2 2006/12/12 11:02:22mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QPomeron.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ … … 36 36 // For comparison mirror member functions are taken from G4 class: 37 37 // G4PomeronCrossSection 38 // ----------------------------------------------------------------- 38 // ------------------------------------------------------------------ 39 // Short description: Pomeron is one of the possible vacuum pole (the 40 // second is Oderon, but they are identical in the present model), by 41 // which particle exchang in the ellastic scattering process. Strings, 42 // which appear as a cut of the Pomeron (optic theorem connects the 43 // amplitude of scattering at zero angle with the total inelastic 44 // cross-section), describe most of the processes at high energies. 45 // ------------------------------------------------------------------ 39 46 40 47 #include "G4QPomeron.hh" … … 42 49 G4QPomeron::G4QPomeron(G4int PDG) 43 50 { 44 pomeron_Alpha=1.0808;45 pomeron_Alphaprime =0.25/GeV/GeV;51 pomeron_Alpha= 1.0808; 52 pomeron_Alphaprime = 0.25/GeV/GeV; 46 53 pomeron_Gamma_Hard = 0.0002/GeV/GeV; 47 54 pomeron_Alpha_Hard = 1.47; … … 54 61 InitForNucleon(); 55 62 else 56 {63 { 57 64 G4cout<<"-Warning-G4QPomeron is initialised for PDGCode="<<PDG<<" as a pion"<<G4endl; 58 65 InitForPion(); … … 63 70 const G4int nPom) 64 71 { 65 G4double f=1; if(nPom>1) for(G4int i=2; i<= nPom; i++) f*=i; // Calculate factorial72 G4double f=1; if(nPom>1) for(G4int i=2; i<= nPom; i++) f*=i; // Calculate factorial 66 73 G4double e=Eikonal(s,imp2); e+=e; // Doubled Eikonal 67 return std::exp(-e)*std::pow(e,nPom)/pomeron_C/f;74 return std::exp(-e)*std::pow(e,nPom)/pomeron_C/f; 68 75 } 69 76 70 77 void G4QPomeron::InitForNucleon() 71 78 { 72 // pomeron_S= 3.0*GeV*GeV;73 pomeron_S=2.7*GeV*GeV;74 // pomeron_Gamma=2.16/GeV/GeV; // ? M.K.75 // pomeron_Gamma=3.96/GeV/GeV; // ? M.K.76 pomeron_Gamma =(2.6+3.96)/GeV/GeV; // ? M.K.77 pomeron_C =1.4;78 pomeron_Rsquare =3.56/GeV/GeV;79 /////pomeron_Alpha=0.9808; // This is very strange M.K. (was in GHAD QGSM)79 // pomeron_S= 3.0*GeV*GeV; 80 pomeron_S= 2.7*GeV*GeV; 81 // pomeron_Gamma= 2.16/GeV/GeV; // ? M.K. 82 // pomeron_Gamma= 3.96/GeV/GeV; // ? M.K. 83 pomeron_Gamma = (2.6+3.96)/GeV/GeV; // ? M.K. 84 pomeron_C = 1.4; 85 pomeron_Rsquare = 3.56/GeV/GeV; 86 /////pomeron_Alpha= 0.9808; // This is very strange M.K. (was in GHAD QGSM) 80 87 // If pomeron_Gamma_Hard!=0 to fit total pp XS use pomeron_Gamma_Soft=2.35/GeV/GeV ? M.K. 81 88 } … … 83 90 void G4QPomeron::InitForPion() 84 91 { 85 pomeron_S =1.5*GeV*GeV;86 //pomeron_Gamma = 1.46/GeV/GeV; // ? M.K.87 pomeron_Gamma =2.17/GeV/GeV; // ? M.K.88 pomeron_C =1.6;89 pomeron_Rsquare =2.36/GeV/GeV;92 pomeron_S = 1.5*GeV*GeV; 93 //pomeron_Gamma = 1.46/GeV/GeV; // ? M.K. 94 pomeron_Gamma = 2.17/GeV/GeV; // ? M.K. 95 pomeron_C = 1.6; 96 pomeron_Rsquare = 2.36/GeV/GeV; 90 97 } 91 98 92 99 void G4QPomeron::InitForKaon() 93 100 { 94 pomeron_S =2.3*GeV*GeV;95 //pomeron_Gamma = 1.31/GeV/GeV; // ? M.K.96 pomeron_Gamma = 1.92/GeV/GeV; // ? M.K.97 pomeron_C =1.8;98 pomeron_Rsquare =1.96/GeV/GeV;101 pomeron_S = 2.3*GeV*GeV; 102 //pomeron_Gamma = 1.31/GeV/GeV; // ? M.K. 103 pomeron_Gamma = 1.92/GeV/GeV; // ? M.K. 104 pomeron_C = 1.8; 105 pomeron_Rsquare = 1.96/GeV/GeV; 99 106 } 100 107 101 108 void G4QPomeron::InitForGamma() 102 109 { 103 pomeron_S =1.7*GeV*GeV;104 //pomeron_Gamma = 1.42/GeV/GeV; // ? M.K.105 pomeron_Gamma =2.07/GeV/GeV; // ? M.K.106 pomeron_C =1.7;107 pomeron_Rsquare =2.16/GeV/GeV;110 pomeron_S = 1.7*GeV*GeV; 111 //pomeron_Gamma = 1.42/GeV/GeV; // ? M.K. 112 pomeron_Gamma = 2.07/GeV/GeV; // ? M.K. 113 pomeron_C = 1.7; 114 pomeron_Rsquare = 2.16/GeV/GeV; 108 115 } 109 116 … … 111 118 { 112 119 113 G4double sum=1.;114 G4double current=1.;115 for(G4int j=2; j<21; j++)116 {117 current *= -z*(j-1)/j/j;118 sum+=current;119 }120 return sum;120 G4double sum=1.; 121 G4double current=1.; 122 for(G4int j=2; j<21; j++) 123 { 124 current *= -z*(j-1)/j/j; 125 sum+=current; 126 } 127 return sum; 121 128 } 122 129 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QSplitter.cc
r1007 r1055 28 28 // 29 29 // 30 // $Id: G4QSplitter.cc,v 1. 6 2006/11/27 10:44:55mkossov Exp $31 // GEANT4 tag $Name: geant4-09-0 2$30 // $Id: G4QSplitter.cc,v 1.7 2009/02/23 09:49:24 mkossov Exp $ 31 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 32 32 // 33 33 // ---------------- G4QSplitter ---------------- 34 34 // by Mikhail Kossov, August 2005. 35 35 // class for Hadron-Hadron String Interaction used by the CHIPS Model 36 // ------------------------------------------------------------------- 37 36 // ----------------------------------------------------==--------------- 37 // Short description: the hadron befor the interaction must be splitted 38 // in partons: quark-antiquark (mesons) or quark-diquark (baryon) parts 39 // (some time in more than two parts, e.g. baryon in three quarks or a 40 // few quark-antiquark pairs can be added for the splitting). Then each 41 // projectile parton can create a parton pair (G4QPartonPair) with the 42 // target parton. This pair with the big rapidity difference on the ends 43 // creates a planar Quark-Gluon String (a pole). A pair of the projectile 44 // partons with a pair of the target partons can create a cylindrical 45 // string (doubled string in the algorithm - a cut). 46 // -------------------------------------------------===------------------ 47 38 48 //#define chdebug 39 49 //#define debug … … 63 73 theWorld= G4QCHIPSWorld::Get(); // Get a pointer to the CHIPS World 64 74 #ifdef debug 65 G4cout<<" -->G4QString::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;75 G4cout<<">G4QSplitter::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl; 66 76 #endif 67 77 // Target initialization … … 76 86 // Projectile initialization 77 87 theProj4Mom = projHadron.Get4Momentum(); 78 G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS88 G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS 79 89 G4ThreeVector projRBoost= -projBoost; // Projevtile Boost vector to projectile CMS 80 90 G4QPDGCode projQPDG(projHadron.GetPDGCode()); … … 89 99 G4double tM2 = tM*tM; 90 100 G4double dM2 = fabs(pM2-projM2); 91 if(dM2>1.) G4cout<<"-Warn-G4QS::Constr:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;101 if(dM2>1.)G4cout<<"-Warn-G4QSplit::Con:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl; 92 102 G4double pM=sqrt(pM2); // @@ do we need pM ? @@ (in print) 93 103 94 104 // === Print out of the input information at Creation time & tot 4-mom Calculation ====== 95 105 #ifdef pdebug 96 G4cout<<"G4QS ::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<97 theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;98 G4cout<<"G4QSpl ::Constr: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;106 G4cout<<"G4QSplitter::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<< 107 theProj4Mom.m2()<<theProj4Mom.m()<<G4endl; 108 G4cout<<"G4QSplit::Cons: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl; 99 109 #endif 100 110 //G4int nP=theWorld->GetQPEntries(); // A#of init'ed particles in CHIPS World (@@?) 101 111 //G4int nCl=nP-90; // A#of init'ed clusters in CHIPS World (@@?) 102 //#ifdef pdebug112 //#ifdef pdebug 103 113 //G4cout<<"G4QS:Const:Before QEX:n="<<nP<<G4endl; 104 //#endif114 //#endif 105 115 // @@@@@@ ===> Here the Quark Exchange Quasmon Creation must be added <=== @@@@@@ 106 116 // @@ --- old --- … … 129 139 G4double interc=1.; // @@ A parameter ?! 130 140 #ifdef pdebug 131 G4cout<<"G4QSpl ::Constr: nP="<<nQProj<<", nT="<<nQTarg<<", intercept="<<interc<<G4endl;141 G4cout<<"G4QSplit::Constr: nP="<<nQProj<<", nT="<<nQTarg<<", intercept="<<interc<<G4endl; 132 142 #endif 133 143 // @@ Now projectile can be only meson or baryon @@ -- @@ Improve for clusters @@ -- … … 136 146 G4bool FreeFraF=false; // Prototype of the free exchange Flag 137 147 //if(G4UniformRand()<0.) FreeFraF=true; // @@@@@@@@ Confirm the free exchange 138 if(nQProj<2) G4cout<<"***G4QSpl ::Constr: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl;139 else if(nQProj>2) // ---> Baryon case (clusters are not implem.)140 {148 if(nQProj<2) G4cout<<"***G4QSplitter::C: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl; 149 else if(nQProj>2) // ---> Baryon case (clusters are not implem.) 150 { 141 151 //if(nQProj>3)G4cout<<"-Wor-G4QS::Const:nQProj="<<nQProj<<">3 is not implem'd"<<G4endl; 142 152 G4double xP=0.; … … 146 156 xP=RandomizeMomFractionString(nQProj); 147 157 theWeight*=pow(xP,interc); 148 G4cout<<"************G4QS ::C: string xP="<<xP<<G4endl;158 G4cout<<"************G4QSplitter::C: string xP="<<xP<<G4endl; 149 159 } 150 160 rPMass = sqrt(pM2*(1.-xP)); // Residual Projectile mass 151 161 #ifdef pdebug 152 G4cout<<"G4QS ::C: nQProj="<<nQProj<<", xProj="<<xP<<", rPMass="<<rPMass<<G4endl;162 G4cout<<"G4QSplitter::C: nQProj="<<nQProj<<", xProj="<<xP<<", rPMass="<<rPMass<<G4endl; 153 163 #endif 154 164 } … … 161 171 else G4cout<<"*Warning*G4QSplitter::Constr:ProjDecIn2 rpM="<<rPMass<<", pM="<<pM<<G4endl; 162 172 #ifdef pdebug 163 G4cout<<"G4QSpl ::Con:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;173 G4cout<<"G4QSplit::C:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl; 164 174 #endif 165 175 G4LorentzVector tq4Mom(0.,0.,0.,0.); // Prototype of LV of quark of the target … … 172 182 xT=RandomizeMomFractionString(nQTarg); 173 183 theWeight*=pow(xT,interc); 174 G4cout<<"************G4QS ::C: string xT="<<xT<<G4endl;184 G4cout<<"************G4QSplitter::Constr: string xT="<<xT<<G4endl; 175 185 } 176 186 G4double rTMass = sqrt(tM2*(1.-xT)); // Residual Target mass … … 180 190 G4LorentzVector tr4Mom(0.,0.,0.,rTMass); // Prototype of LV of the residual projectile 181 191 if(targHadron.DecayIn2(tq4Mom,tr4Mom)) targFl=true; // Targ decay is OK 182 else G4cout<<"**W orning**G4QStr::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;183 #ifdef pdebug 184 G4cout<<"G4QS tr::Con:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;192 else G4cout<<"**Warning**G4QSplit::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl; 193 #ifdef pdebug 194 G4cout<<"G4QSplit::C:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl; 185 195 #endif 186 196 G4bool elasFl=false; // ByDefault avoid the elastic scattering … … 201 211 // @@ Just to try ---- End 202 212 #ifdef pdebug 203 G4cout<<"G4QS ::Cons:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;213 G4cout<<"G4QSplit::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl; 204 214 #endif 205 215 if(npM<pM+mPi0) // The projectile is under min mass (@@ In Future put other cut @@) 206 216 { 207 217 G4double valk=tq4Mom.e(); // Momentum of the target quark 208 //#ifdef pdebug218 //#ifdef pdebug 209 219 G4double dvalk=valk-tq4Mom.rho(); 210 if(fabs(dvalk)>.00001) G4cout<<"** *kp***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;211 //#endif220 if(fabs(dvalk)>.00001) G4cout<<"**kp**G4QSplit::C:vk="<<valk<<",dvk="<<dvalk<<G4endl; 221 //#endif 212 222 G4double dmas=pM2-pr4Mom.m2(); // Difference of squared masses 213 223 G4double vale=pr4Mom.e(); … … 219 229 { 220 230 #ifdef pdebug 221 G4cout<<"***p***>>>G4QS ::C: cost="<<cost<<G4endl;231 G4cout<<"***p***>>>G4QSplitter::Constr: cost="<<cost<<G4endl; 222 232 #endif 223 233 // Get max value of |cos(theta)| and change tq value to get the pM on mass shell … … 231 241 } 232 242 else // --->>> cost<0. 233 {243 { 234 244 G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM) 235 245 if(hvalk>tM) // Momentum can not be increased to this value 236 246 { 237 247 #ifdef pdebug 238 G4cout<<"**p-Cor**>G4QS ::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas<<", e="239 << vale<<", p="<<valp<<", ct="<<cost<<G4endl;248 G4cout<<"**p-Cor**>G4QSplitter::Constr: hvalk="<<hvalk<<" > tM="<<tM<<", dm=" 249 <<dmas<<", e="<<vale<<", p="<<valp<<", ct="<<cost<<G4endl; 240 250 #endif 241 251 // Put the scatteredProjectile on the massShell, and rescatter the target quark … … 248 258 } 249 259 else 250 {260 { 251 261 #ifdef pdebug 252 262 G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < tM="<<tM<<G4endl; … … 284 294 } 285 295 #ifdef pdebug 286 G4cout<<"G4QS tr::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;296 G4cout<<"G4QSplit::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl; 287 297 #endif 288 298 pcorFl=true; // Projectile is on the GS mass shell … … 296 306 //ntM=sqrt(nTM2); 297 307 #ifdef pdebug 298 G4cout<<"G4QS tr::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;308 G4cout<<"G4QSplit::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl; 299 309 #endif 300 310 if(ntM<tM+mPi0 && !pcorFl) // The target is under min mass (@@ InFut put another cut@@) … … 304 314 pqc4M.boost(projRBoost); // projectileQuark => projCM system <step2> 305 315 G4double valk=pqc4M.e(); // Momentum of the target quark in projCM 306 //#ifdef pdebug316 //#ifdef pdebug 307 317 G4double dvalk=valk-pqc4M.rho(); 308 318 if(fabs(dvalk)>.00001) G4cout<<"***kt***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl; 309 //#endif319 //#endif 310 320 G4double dmas=tM2-tr4Mom.m2(); // Difference of squared masses (targ - targRes) 311 321 G4LorentzVector trc4M=tr4Mom; // targetResidual => projCM system <step1> … … 314 324 G4ThreeVector tr=trc4M.v(); // 3-mom of the targetResidual in projCM 315 325 G4double valp=tr.mag(); // momentum of the targetResidual in projCM 316 if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QS ::C: trM2="<<tr4Mom.m2()<<"="326 if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QSplit::C: trM2="<<tr4Mom.m2()<<"=" 317 327 <<trc4M.m2()<<","<<vale*vale-valp*valp<<G4endl; 318 328 G4ThreeVector utr=tr/valp; // Unit vector in the tr direction in projCM … … 321 331 { 322 332 #ifdef pdebug 323 G4cout<<"***t***>>>G4QS ::C: cost="<<cost<<G4endl;333 G4cout<<"***t***>>>G4QSplitter::Constr: cost="<<cost<<G4endl; 324 334 #endif 325 335 // Get max value of |cos(theta)| and change pq value to get the tM on mass shell … … 337 347 } 338 348 else // --->>> cost<-1 => cost=-1 339 {349 { 340 350 G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM) 341 351 if(hvalk>pM) // Momentum can not be increased to this value … … 354 364 } 355 365 else 356 {357 #ifdef pdebug 358 G4cout<<"***---***>G4QS ::C: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;366 { 367 #ifdef pdebug 368 G4cout<<"***---***>G4QSplitter::Constr: hvalk="<<hvalk<<" < pM="<<pM<<G4endl; 359 369 #endif 360 370 valk=hvalk/2; // Momentum is too small (mustBeIncreased) … … 377 387 G4double smo=nTc4M.rho(); 378 388 G4cout<<"G4QS::C:qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<< 379 vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;389 vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl; 380 390 #endif 381 391 G4LorentzVector prc4M(pM-valk,-pqf); // Fill new 4-mom for projectResid in CM … … 386 396 } 387 397 if(fabs(newTarg4M.m()-tM)>.0001) 388 G4cout<<"*************** ***************G4QS::C:"<<newTarg4M.m()<<"="<<pM<<G4endl;398 G4cout<<"***************G4QSplitter::Constr: M="<<newTarg4M.m()<<"#"<<pM<<G4endl; 389 399 } 390 400 else // -1<cos(theta)<1 - only rotate the projQ … … 392 402 // Turn the projectile quark-parton to the target residual in CMS of the Projectile 393 403 #ifdef pdebug 394 G4cout<<"---t--->>>G4QS ::C: cost="<<cost<<G4endl;404 G4cout<<"---t--->>>G4QSplitter::Constr: cost="<<cost<<G4endl; 395 405 #endif 396 406 G4LorentzVector prc4M=pr4Mom; // projectileQuark => projCM system <step1> … … 421 431 } 422 432 #ifdef pdebug 423 G4cout<<"G4QS tr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;433 G4cout<<"G4QSplit::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl; 424 434 #endif 425 435 tcorFl=true; // Target is on the GS mass shell … … 428 438 npM=sqrt(nPM2); 429 439 #ifdef pdebug 430 G4cout<<"G4QS tr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;440 G4cout<<"G4QSpl::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl; 431 441 #endif 432 442 if(npM<pM+mPi0) elasFl=true; // Force elastic scattering (@@InFut putAnotherCut@@) … … 437 447 // **** Put the hadrons on the mass shell conserving the CMS scattering angle **** 438 448 G4LorentzVector theTot4M=theProj4Mom+theTarg4Mom;// 4-momentum of CMS of "targ+proj" 439 G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"449 G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS" 440 450 G4ThreeVector cmsRBoost= -cmsBoost; // CMS Boost Vector "LS to CMS" 441 451 G4LorentzVector cmsProj4M=theProj4Mom; // LS projectile => CMS <step1> … … 447 457 if(fabs(cmsTarg4M.rho()-pcm) > 0.0001) 448 458 G4cout<<"-Worning-G4QSplitter::Constr: P="<<cmsTarg4M.rho()<<"#"<<pcm<<G4endl; 449 //#endif459 //#endif 450 460 G4LorentzVector cmsNewPr4M=newProj4M; // LS finalProj => CMS <step1> 451 461 cmsNewPr4M.boost(cmsRBoost); // LS finalProj => CMS <step2> … … 456 466 G4ThreeVector tuV=cmsNewTg4M.v()/cmsNewTg4M.rho(); // Direction of the projectile 457 467 if(1.+puV.dot(tuV) > 0.001) 458 G4cout<<"-W orning-G4QSplitter::Constr: ct="<<puV.dot(tuV)<<G4endl;459 //#endif468 G4cout<<"-Warning-G4QSplitter::Constr: ct="<<puV.dot(tuV)<<G4endl; 469 //#endif 460 470 cmsProj4M.setV(puV*pcm); 461 471 newProj4M=cmsProj4M; … … 494 504 theQHadrons.push_back(targH); // Fill the Target Hadron (delete equivalent) 495 505 } 496 else // Both are excited (two Quasmons only)506 else // Both are excited (two Quasmons only) 497 507 { 498 508 G4Quasmon* projQ = new G4Quasmon(projHadron.GetQC(),newProj4M); … … 503 513 } 504 514 } 505 else G4cout<<"-W or-G4QSplitter::Constr:T="<<targFl<<" or P="<<projFl<<" err"<<G4endl;515 else G4cout<<"-Warning-G4QSplitter::Constr:T="<<targFl<<" or P="<<projFl<<" err"<<G4endl; 506 516 #ifdef pdebug 507 517 G4cout<<"G4QSplitter::Constructor: *** End of Constructor ***, elF="<<elasFl<<G4endl; … … 523 533 finBaryoN+=theQuasmons[iq]->GetBaryonNumber(); 524 534 } 525 G4cout<<"G4QS tr::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;535 G4cout<<"G4QSpl::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl; 526 536 if(finCharge!=totCharge || finBaryoN!=totBaryNum) 527 537 { 528 G4cerr<<"***G4QS tr::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum538 G4cerr<<"***G4QSptitter::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum 529 539 <<",B="<<finBaryoN<<G4endl; 530 540 if(nHad) for(G4int h=0; h<nHad; h++) 531 541 { 532 542 G4QHadron* cH = theQHadrons[h]; 533 G4cerr<<" ::G4QS::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;543 G4cerr<<"G4QSplit::C: h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl; 534 544 } 535 545 if(nQuas) for(G4int q=0; q<nQuas; q++) 536 546 { 537 547 G4Quasmon* cQ = theQuasmons[q]; 538 G4cerr<<" ::G4QS::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QuarkCon="<<cQ->GetQC()<<G4endl;548 G4cerr<<"G4QSplit::C: q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl; 539 549 } 540 550 } … … 550 560 G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]); 551 561 #ifdef fdebug 552 G4cout<<"G4QS ::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;562 G4cout<<"G4QSplit::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl; 553 563 #endif 554 564 theQuasmons.push_back(curQ); // (delete equivalent) … … 563 573 564 574 theWorld = right.theWorld; 565 tot4Mom =right.tot4Mom;566 totCharge =right.totCharge;567 totBaryNum =right.totBaryNum;575 tot4Mom = right.tot4Mom; 576 totCharge = right.totCharge; 577 totBaryNum = right.totBaryNum; 568 578 } 569 579 … … 581 591 G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]); 582 592 #ifdef fdebug 583 G4cout<<"G4QS ::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;593 G4cout<<"G4QSpl::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl; 584 594 #endif 585 595 theQuasmons.push_back(curQ); // (delete equivalent) … … 594 604 595 605 theWorld = right.theWorld; 596 tot4Mom =right.tot4Mom;597 totCharge =right.totCharge;598 totBaryNum =right.totBaryNum;606 tot4Mom = right.tot4Mom; 607 totCharge = right.totCharge; 608 totBaryNum = right.totBaryNum; 599 609 } 600 610 return *this; … … 609 619 G4Quasmon* curQ = new G4Quasmon(right->theQuasmons[iq]); 610 620 #ifdef fdebug 611 G4cout<<"G4QS ::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;621 G4cout<<"G4QSpl::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl; 612 622 #endif 613 623 theQuasmons.push_back(curQ); // (delete equivalent) … … 622 632 623 633 theWorld = right->theWorld; 624 tot4Mom =right->tot4Mom;625 totCharge =right->totCharge;626 totBaryNum =right->totBaryNum;634 tot4Mom = right->tot4Mom; 635 totCharge = right->totCharge; 636 totBaryNum = right->totBaryNum; 627 637 } 628 638 … … 657 667 G4QHadronVector* G4QSplitter::Fragment() 658 668 {// ========================== -- @@ Must be changed @@ -- 659 // Make the final check before filling the output -- @@ Must be changed @@ --669 // Make the final check before filling the output -- @@ Must be changed @@ -- 660 670 #ifdef chdebug 661 671 G4int fCharge=0; … … 774 784 // @@ TMP --- Begin --- 775 785 if(2>1) 776 {786 { 777 787 if(nPart<2) 778 788 { … … 785 795 if(r==0.) return 0.; 786 796 if(r==1.) return 1.; 787 if (nPart==3) x=r; // GS baryon788 else if(nPart==4) x=1.-sqrt(r); // GS quaternion797 if (nPart==3) x=r; // GS baryon 798 else if(nPart==4) x=1.-sqrt(r); // GS quaternion 789 799 else x=1.-pow(r,1./(nPart-2.)); // nPart>4 790 800 return x; … … 802 812 if(r==0.) return 0.; 803 813 if(r==1.) return 1.; 804 if(nPart==3) x=sqrt(r); // GS baryon805 else if(nPart==4) // GS quaternion806 {814 if(nPart==3) x=sqrt(r); // GS baryon 815 else if(nPart==4) // GS quaternion 816 { 807 817 if (r==0.5) x=0.5; 808 818 else if(r<0.5) x=sqrt(r+r)*(.5+.1579*(r-.5)); … … 810 820 } 811 821 else 812 {822 { 813 823 G4int n1=nPart-2; 814 824 G4double r1=n1; … … 819 829 if (r==rr) x=p2; 820 830 else 821 {831 { 822 832 if(r<rr) 823 833 { 824 G4double pr=0.;825 G4double pra=0.;834 G4double pr=0.; 835 G4double pra=0.; 826 836 if(nPart>8) 827 {837 { 828 838 if(nPart>10) 829 {839 { 830 840 if(nPart>11) // >11 831 841 { … … 833 843 pra=.915/pow((nPart+6.7),1.75); 834 844 } 835 else // 11845 else // 11 836 846 { 837 847 pr=.09945; … … 840 850 } 841 851 else 842 {852 { 843 853 if(nPart>9) // 10 844 854 { … … 846 856 pra=.00741; 847 857 } 848 else // 9858 else // 9 849 859 { 850 860 pr=.11425; … … 854 864 } 855 865 else 856 {866 { 857 867 if(nPart>6) 858 {868 { 859 869 if(nPart>7) // 8 860 870 { … … 862 872 pra=.00926; 863 873 } 864 else // 7874 else // 7 865 875 { 866 876 pr=.13405; … … 869 879 } 870 880 else 871 {881 { 872 882 if(nPart>5) // 6 873 883 { … … 875 885 pra=.01112; 876 886 } 877 else // 5887 else // 5 878 888 { 879 889 pr=.15765; … … 886 896 else 887 897 { 888 G4double sr=0.;898 G4double sr=0.; 889 899 if(nPart>8) 890 {900 { 891 901 if(nPart>10) 892 {902 { 893 903 if(nPart>11) sr=.86/(nPart+1.05); // >11 894 else sr=.0774; // 11904 else sr=.0774; // 11 895 905 } 896 906 else 897 {907 { 898 908 if(nPart>9) sr=.0849; // 10 899 else sr=.0938; // 9909 else sr=.0938; // 9 900 910 } 901 911 } 902 912 else 903 {913 { 904 914 if(nPart>6) 905 {915 { 906 916 if(nPart>7) sr=.1047; // 8 907 else sr=.1179; // 7917 else sr=.1179; // 7 908 918 } 909 919 else 910 {920 { 911 921 if(nPart>5) sr=.1339; // 6 912 else sr=.15135; // 5922 else sr=.15135; // 5 913 923 } 914 924 } … … 933 943 if(r==0.) return 0.; 934 944 if(r==1.) return 1.; 935 if (nPart==3) x=r; // GS baryon936 else if(nPart==4) x=1.-sqrt(r); // GS quaternion945 if (nPart==3) x=r; // GS baryon 946 else if(nPart==4) x=1.-sqrt(r); // GS quaternion 937 947 else x=1.-pow(r,1./(nPart-2.)); // nPart>4 938 948 return x; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QString.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QString.cc,v 1. 4 2007/07/06 07:38:36mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QString.cc,v 1.5 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------ … … 37 37 // G4FragmentingString 38 38 // G4ExcitedStringDecay 39 // ------------------------------------------------------------ 39 // --------------------------------------------------------------------- 40 // Short description: If partons from the G4QPartonPair are close in 41 // rapidity, they create Quasmons, but if they are far in the rapidity 42 // space, they can not interact directly. Say the bottom parton (quark) 43 // has rapidity 0, and the top parton (antiquark) has rapidity 8, then 44 // the top quark splits in two by radiating gluon, and each part has 45 // rapidity 4, then the gluon splits in quark-antiquark pair (rapidity 46 // 2 each), and then the quark gadiates anothe gluon and reachs rapidity 47 // 1. Now it can interact with the bottom antiquark, creating a Quasmon 48 // or a hadron. The intermediate partons is the string ladder. 49 // --------------------------------------------------------------------- 40 50 41 51 //#define debug … … 65 75 66 76 G4QString::G4QString(G4QParton* QCol,G4QParton* Gluon,G4QParton* QAntiCol,G4int Direction): 67 theDirection(Direction),thePosition(QCol->GetPosition()),hadronizer(new G4QHadronBuilder)77 theDirection(Direction),thePosition(QCol->GetPosition()),hadronizer(new G4QHadronBuilder) 68 78 { 69 79 thePartons.push_back(QCol); … … 80 90 G4LorentzVector G4QString::Get4Momentum() const 81 91 { 82 G4LorentzVector momentum(0.,0.,0.,0.);83 for(unsigned i=0; i<thePartons.size(); i++) momentum += thePartons[i]->Get4Momentum();84 return momentum;92 G4LorentzVector momentum(0.,0.,0.,0.); 93 for(unsigned i=0; i<thePartons.size(); i++) momentum += thePartons[i]->Get4Momentum(); 94 return momentum; 85 95 } 86 96 87 97 void G4QString::LorentzRotate(const G4LorentzRotation & rotation) 88 98 { 89 for(unsigned i=0; i<thePartons.size(); i++)90 thePartons[i]->Set4Momentum(rotation*thePartons[i]->Get4Momentum());99 for(unsigned i=0; i<thePartons.size(); i++) 100 thePartons[i]->Set4Momentum(rotation*thePartons[i]->Get4Momentum()); 91 101 } 92 102 … … 94 104 { 95 105 G4QPartonVector::iterator insert_index; // Begin by default (? M.K.) 96 97 if(addafter != NULL)98 {99 insert_index=std::find(thePartons.begin(), thePartons.end(), addafter);100 if (insert_index == thePartons.end())// No object addafter in thePartons101 {102 G4cerr<<"***G4QString::InsertParton: Address Parton is not found"<<G4endl;106 107 if(addafter != NULL) 108 { 109 insert_index=std::find(thePartons.begin(), thePartons.end(), addafter); 110 if (insert_index == thePartons.end()) // No object addafter in thePartons 111 { 112 G4cerr<<"***G4QString::InsertParton: Address Parton is not found"<<G4endl; 103 113 G4Exception("G4QString::InsertParton:","72",FatalException,"NoAddressParton"); 104 }105 }106 thePartons.insert(insert_index+1, aParton);114 } 115 } 116 thePartons.insert(insert_index+1, aParton); 107 117 } 108 118 109 119 G4LorentzRotation G4QString::TransformToCenterOfMass() 110 120 { 111 G4LorentzRotation toCms(-1*Get4Momentum().boostVector());112 for(unsigned i=0; i<thePartons.size(); i++)113 thePartons[i]->Set4Momentum(toCms*thePartons[i]->Get4Momentum());114 return toCms;121 G4LorentzRotation toCms(-1*Get4Momentum().boostVector()); 122 for(unsigned i=0; i<thePartons.size(); i++) 123 thePartons[i]->Set4Momentum(toCms*thePartons[i]->Get4Momentum()); 124 return toCms; 115 125 } 116 126 117 127 G4LorentzRotation G4QString::TransformToAlignedCms() 118 128 { 119 G4LorentzVector momentum=Get4Momentum();120 G4LorentzRotation toAlignedCms(-1*momentum.boostVector());121 momentum= toAlignedCms* thePartons[0]->Get4Momentum();122 toAlignedCms.rotateZ(-1*momentum.phi());123 toAlignedCms.rotateY(-1*momentum.theta());124 for(unsigned index=0; index<thePartons.size(); index++)125 {126 momentum=toAlignedCms * thePartons[index]->Get4Momentum();127 thePartons[index]->Set4Momentum(momentum);128 }129 return toAlignedCms;129 G4LorentzVector momentum=Get4Momentum(); 130 G4LorentzRotation toAlignedCms(-1*momentum.boostVector()); 131 momentum= toAlignedCms* thePartons[0]->Get4Momentum(); 132 toAlignedCms.rotateZ(-1*momentum.phi()); 133 toAlignedCms.rotateY(-1*momentum.theta()); 134 for(unsigned index=0; index<thePartons.size(); index++) 135 { 136 momentum=toAlignedCms * thePartons[index]->Get4Momentum(); 137 thePartons[index]->Set4Momentum(momentum); 138 } 139 return toAlignedCms; 130 140 } 131 141 … … 169 179 SmoothParam = smPar; // QGS model parameter 170 180 StrangeSuppress = SSup; // Strangeness suppression parameter 171 widthOfPtSquare = -2*SigPt*SigPt;// width^2 of pt for string excitation181 widthOfPtSquare = -2*SigPt*SigPt; // width^2 of pt for string excitation 172 182 StringLoopInterrupt = SLmax; // String fragmentation LOOP limit 173 183 ClusterLoopInterrupt= CLmax; // Cluster fragmentation LOOP limit … … 177 187 G4ThreeVector G4QString::GaussianPt(G4double widthSquare, G4double maxPtSquare) const 178 188 { 179 G4double pt2; do{pt2=widthSquare*std::log(G4UniformRand());} while (pt2>maxPtSquare);180 pt2=std::sqrt(pt2);181 G4double phi=G4UniformRand()*twopi;182 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.);189 G4double pt2; do{pt2=widthSquare*std::log(G4UniformRand());} while (pt2>maxPtSquare); 190 pt2=std::sqrt(pt2); 191 G4double phi=G4UniformRand()*twopi; 192 return G4ThreeVector(pt2*std::cos(phi),pt2*std::sin(phi),0.); 183 193 } // End of GaussianPt 184 194 … … 186 196 void G4QString::DiffString(G4QHadron* hadron, G4bool isProjectile) 187 197 { 188 hadron->SplitUp();189 G4QParton* start = hadron->GetNextParton();190 if( start==NULL)191 {198 hadron->SplitUp(); 199 G4QParton* start = hadron->GetNextParton(); 200 if( start==NULL) 201 { 192 202 G4cerr<<"***G4QString::DiffString: No start parton found, nothing is done"<<G4endl; 193 return;194 }195 G4QParton* end = hadron->GetNextParton();196 if( end==NULL)197 {203 return; 204 } 205 G4QParton* end = hadron->GetNextParton(); 206 if( end==NULL) 207 { 198 208 G4cerr<<"***G4QString::DiffString: No end parton found, nothing is done"<<G4endl; 199 return;200 }201 if(isProjectile)ExciteString(end, start, 1); // 1 = Projectile202 elseExciteString(start, end,-1); // -1 = Target203 SetPosition(hadron->GetPosition());209 return; 210 } 211 if(isProjectile) ExciteString(end, start, 1); // 1 = Projectile 212 else ExciteString(start, end,-1); // -1 = Target 213 SetPosition(hadron->GetPosition()); 204 214 // momenta of string ends 205 G4double ptSquared= hadron->Get4Momentum().perp2();215 G4double ptSquared= hadron->Get4Momentum().perp2(); 206 216 G4double hmins=hadron->Get4Momentum().minus(); 207 217 G4double hplus=hadron->Get4Momentum().plus(); 208 G4double transMassSquared=hplus*hmins;209 G4double maxMomentum = std::sqrt(transMassSquared) - std::sqrt(ptSquared);210 G4double maxAvailMomentumSquared = maxMomentum * maxMomentum;211 G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);212 G4LorentzVector Pstart(G4LorentzVector(pt,0.));213 G4LorentzVector Pend(hadron->Get4Momentum().px(), hadron->Get4Momentum().py(), 0.);214 Pend-=Pstart;215 G4double tm1=hmins+(Pend.perp2()-Pstart.perp2())/hplus;216 G4double tm2=std::sqrt( std::max(0., tm1*tm1-4*Pend.perp2()*hmins/hplus ) );217 G4int Sign= isProjectile ? TARGET : PROJECTILE;218 G4double endMinus = 0.5 * (tm1 + Sign*tm2);219 G4double startMinus= hmins - endMinus;220 G4double startPlus = Pstart.perp2() / startMinus;221 G4double endPlus = hplus - startPlus;222 Pstart.setPz(0.5*(startPlus - startMinus));223 Pstart.setE (0.5*(startPlus + startMinus));224 Pend.setPz (0.5*(endPlus - endMinus));225 Pend.setE (0.5*(endPlus + endMinus));226 start->Set4Momentum(Pstart);227 end->Set4Momentum(Pend);218 G4double transMassSquared=hplus*hmins; 219 G4double maxMomentum = std::sqrt(transMassSquared) - std::sqrt(ptSquared); 220 G4double maxAvailMomentumSquared = maxMomentum * maxMomentum; 221 G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared); 222 G4LorentzVector Pstart(G4LorentzVector(pt,0.)); 223 G4LorentzVector Pend(hadron->Get4Momentum().px(), hadron->Get4Momentum().py(), 0.); 224 Pend-=Pstart; 225 G4double tm1=hmins+(Pend.perp2()-Pstart.perp2())/hplus; 226 G4double tm2=std::sqrt( std::max(0., tm1*tm1-4*Pend.perp2()*hmins/hplus ) ); 227 G4int Sign= isProjectile ? TARGET : PROJECTILE; 228 G4double endMinus = 0.5 * (tm1 + Sign*tm2); 229 G4double startMinus= hmins - endMinus; 230 G4double startPlus = Pstart.perp2() / startMinus; 231 G4double endPlus = hplus - startPlus; 232 Pstart.setPz(0.5*(startPlus - startMinus)); 233 Pstart.setE (0.5*(startPlus + startMinus)); 234 Pend.setPz (0.5*(endPlus - endMinus)); 235 Pend.setE (0.5*(endPlus + endMinus)); 236 start->Set4Momentum(Pstart); 237 end->Set4Momentum(Pend); 228 238 #ifdef debug 229 G4cout<<"G4QString::DiffString: StartQ="<<start->GetPDGCode()<<start->Get4Momentum()<<"("239 G4cout<<"G4QString::DiffString: StartQ="<<start->GetPDGCode()<<start->Get4Momentum()<<"(" 230 240 <<start->Get4Momentum().mag()<<"), EndQ="<<end->GetPDGCode()<<end ->Get4Momentum() 231 241 <<"("<<end->Get4Momentum().mag()<<"), sumOfEnds="<<Pstart+Pend<<", H4M(original)=" … … 237 247 void G4QString::ExciteString(G4QParton* Color, G4QParton* AntiColor, G4int Direction) 238 248 { 239 theDirection = Direction;249 theDirection = Direction; 240 250 thePosition = Color->GetPosition(); 241 251 thePartons.push_back(Color); … … 258 268 z = zmin + G4UniformRand()*(zmax-zmin); 259 269 // yf = std::pow(1. - z, blund)/z*std::exp(-alund*Mt2/z); 260 yf = (1-z)/z * std::exp(-alund*Mt2/z);270 yf = (1-z)/z * std::exp(-alund*Mt2/z); 261 271 } while (G4UniformRand()*maxYf>yf); 262 272 return z; … … 266 276 // QGSM Longitudinal fragmentation 267 277 G4double G4QString::GetQGSMLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, 268 G4QHadron* , G4double, G4double) // @@ M.K.278 G4QHadron* , G4double, G4double) // @@ M.K. 269 279 { 270 280 static const G4double arho=0.5; … … 287 297 G4Exception("G4QString::GetQGSMLightConeZ:","72",FatalException,"WrongQuark"); 288 298 } 289 do 299 do 290 300 { 291 301 z = zmin + G4UniformRand()*(zmax - zmin); … … 314 324 { 315 325 // Can no longer modify Parameters for Fragmentation. 316 // PastInitPhase=true; // Now static317 318 // check if string has enough mass to fragment...319 G4QHadronVector* LeftVector=LightFragmentationTest();320 if(LeftVector) return LeftVector;321 322 LeftVector = new G4QHadronVector;323 G4QHadronVector* RightVector = new G4QHadronVector;326 // PastInitPhase=true; // Now static 327 328 // check if string has enough mass to fragment... 329 G4QHadronVector* LeftVector=LightFragmentationTest(); 330 if(LeftVector) return LeftVector; 331 332 LeftVector = new G4QHadronVector; 333 G4QHadronVector* RightVector = new G4QHadronVector; 324 334 325 335 // this should work but it's only a semi deep copy. 326 // %GF G4ExcitedString theStringInCMS(theString);336 // %GF G4ExcitedString theStringInCMS(theString); 327 337 G4QString* theStringInCMS=CPExcited(); // must be deleted 328 G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();329 G4bool success=false;330 G4bool inner_sucess=true;331 G4int attempt=0;332 while (!success && attempt++<StringLoopInterrupt) //@@ It's Loop with break333 {334 G4QString* currentString = new G4QString(*theStringInCMS);335 if(LeftVector->size())338 G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms(); 339 G4bool success=false; 340 G4bool inner_sucess=true; 341 G4int attempt=0; 342 while (!success && attempt++<StringLoopInterrupt) //@@ It's Loop with break 343 { 344 G4QString* currentString = new G4QString(*theStringInCMS); 345 if(LeftVector->size()) 336 346 { 337 347 std::for_each(LeftVector->begin(), LeftVector->end(), DeleteQHadron()); 338 LeftVector->clear();348 LeftVector->clear(); 339 349 } 340 if(RightVector->size())341 {350 if(RightVector->size()) 351 { 342 352 std::for_each(RightVector->begin(), RightVector->end(), DeleteQHadron()); 343 RightVector->clear();344 }345 inner_sucess=true; // set false on failure..346 while (!StopFragmentation())347 { // Split current string into hadron + new string348 G4QString* newString=0; // used as output from SplitUp...349 G4QHadron* Hadron=Splitup(QL);350 if(Hadron && IsFragmentable())351 {352 if(currentString->GetDecayDirection()>0) LeftVector->push_back(Hadron);353 else RightVector->push_back(Hadron);354 delete currentString;355 currentString=newString;356 }353 RightVector->clear(); 354 } 355 inner_sucess=true; // set false on failure.. 356 while (!StopFragmentation()) 357 { // Split current string into hadron + new string 358 G4QString* newString=0; // used as output from SplitUp... 359 G4QHadron* Hadron=Splitup(QL); 360 if(Hadron && IsFragmentable()) 361 { 362 if(currentString->GetDecayDirection()>0) LeftVector->push_back(Hadron); 363 else RightVector->push_back(Hadron); 364 delete currentString; 365 currentString=newString; 366 } 357 367 else 358 368 { 359 // abandon ... start from the beginning360 if (newString) delete newString;361 if (Hadron) delete Hadron;362 inner_sucess=false;363 break;364 }365 }366 // Split current string into 2 final Hadrons367 if( inner_sucess && SplitLast(currentString, LeftVector, RightVector) )success=true;368 delete currentString;369 }370 delete theStringInCMS;371 if (!success)372 {373 if(RightVector->size())374 {369 // abandon ... start from the beginning 370 if (newString) delete newString; 371 if (Hadron) delete Hadron; 372 inner_sucess=false; 373 break; 374 } 375 } 376 // Split current string into 2 final Hadrons 377 if( inner_sucess && SplitLast(currentString, LeftVector, RightVector) ) success=true; 378 delete currentString; 379 } 380 delete theStringInCMS; 381 if (!success) 382 { 383 if(RightVector->size()) 384 { 375 385 std::for_each(RightVector->begin(), RightVector->end(), DeleteQHadron()); 376 RightVector->clear();377 }378 delete RightVector;379 if(LeftVector->size())386 RightVector->clear(); 387 } 388 delete RightVector; 389 if(LeftVector->size()) 380 390 { 381 391 std::for_each(LeftVector->begin(), LeftVector->end(), DeleteQHadron()); 382 LeftVector->clear();392 LeftVector->clear(); 383 393 } 384 return LeftVector;385 } 386 // Join Left and Right Vectors into LeftVector in correct order.387 while(!RightVector->empty())388 {389 LeftVector->push_back(RightVector->back());390 RightVector->erase(RightVector->end()-1);391 }392 delete RightVector;393 CalculateHadronTimePosition(Get4Momentum().mag(), LeftVector);394 G4LorentzRotation toObserverFrame(toCms.inverse());395 for(unsigned C1 = 0; C1 < LeftVector->size(); C1++)396 {397 G4QHadron* Hadron = (*LeftVector)[C1];398 G4LorentzVector Momentum = Hadron->Get4Momentum();399 Momentum = toObserverFrame*Momentum;400 Hadron->Set4Momentum(Momentum);401 G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());402 Momentum = toObserverFrame*Coordinate;403 Hadron->SetFormationTime(Momentum.e());404 Hadron->SetPosition(GetPosition()+Momentum.vect());405 }406 return LeftVector;394 return LeftVector; 395 } 396 // Join Left and Right Vectors into LeftVector in correct order. 397 while(!RightVector->empty()) 398 { 399 LeftVector->push_back(RightVector->back()); 400 RightVector->erase(RightVector->end()-1); 401 } 402 delete RightVector; 403 CalculateHadronTimePosition(Get4Momentum().mag(), LeftVector); 404 G4LorentzRotation toObserverFrame(toCms.inverse()); 405 for(unsigned C1 = 0; C1 < LeftVector->size(); C1++) 406 { 407 G4QHadron* Hadron = (*LeftVector)[C1]; 408 G4LorentzVector Momentum = Hadron->Get4Momentum(); 409 Momentum = toObserverFrame*Momentum; 410 Hadron->Set4Momentum(Momentum); 411 G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime()); 412 Momentum = toObserverFrame*Coordinate; 413 Hadron->SetFormationTime(Momentum.e()); 414 Hadron->SetPosition(GetPosition()+Momentum.vect()); 415 } 416 return LeftVector; 407 417 } // End of FragmentLundString 408 418 … … 410 420 G4QString* G4QString::CPExcited() 411 421 { 412 G4QParton* LeftParton = new G4QParton(GetLeftParton());413 G4QParton* RightParton= new G4QParton(GetRightParton());414 return new G4QString(LeftParton,RightParton,GetDirection());422 G4QParton* LeftParton = new G4QParton(GetLeftParton()); 423 G4QParton* RightParton= new G4QParton(GetRightParton()); 424 return new G4QString(LeftParton,RightParton,GetDirection()); 415 425 } // End of CPExcited 416 426 … … 419 429 { 420 430 // Check string decay threshold 421 422 G4QHadronVector* result=0; // return 0 when string exceeds the mass cut423 424 G4QHadronPair hadrons((G4QHadron*)0, (G4QHadron*)0); // pair of hadrons425 if(sqr(FragmentationMass(0,&hadrons)+MassCut)<Mass2()) return 0; //Par MassCut426 427 result = new G4QHadronVector;431 432 G4QHadronVector* result=0; // return 0 when string exceeds the mass cut 433 434 G4QHadronPair hadrons((G4QHadron*)0, (G4QHadron*)0); // pair of hadrons 435 if(sqr(FragmentationMass(0,&hadrons)+MassCut)<Mass2()) return 0; //Par MassCut 436 437 result = new G4QHadronVector; 428 438 429 if(hadrons.second==0) // Second hadron exists430 {431 // Substitute string by a light hadron, Note that Energy is not conserved here! @@432 G4ThreeVector Mom3 = Get4Momentum().vect();433 G4LorentzVector Mom(Mom3, std::sqrt(Mom3.mag2() + hadrons.first->GetMass2()) );439 if(hadrons.second==0) // Second hadron exists 440 { 441 // Substitute string by a light hadron, Note that Energy is not conserved here! @@ 442 G4ThreeVector Mom3 = Get4Momentum().vect(); 443 G4LorentzVector Mom(Mom3, std::sqrt(Mom3.mag2() + hadrons.first->GetMass2()) ); 434 444 result->push_back(new G4QHadron(hadrons.first, 0, GetPosition(), Mom)); 435 }445 } 436 446 else 437 {438 //... string was qq--qqbar type: Build two stable hadrons,439 G4LorentzVector Mom1, Mom2;440 Sample4Momentum(&Mom1, hadrons.first->GetMass(), &Mom2, hadrons.second->GetMass(),441 Get4Momentum().mag());442 result->push_back(new G4QHadron(hadrons.first, 0, GetPosition(), Mom1));443 result->push_back(new G4QHadron(hadrons.second,0, GetPosition(), Mom2));447 { 448 //... string was qq--qqbar type: Build two stable hadrons, 449 G4LorentzVector Mom1, Mom2; 450 Sample4Momentum(&Mom1, hadrons.first->GetMass(), &Mom2, hadrons.second->GetMass(), 451 Get4Momentum().mag()); 452 result->push_back(new G4QHadron(hadrons.first, 0, GetPosition(), Mom1)); 453 result->push_back(new G4QHadron(hadrons.second,0, GetPosition(), Mom2)); 444 454 G4ThreeVector Velocity = Get4Momentum().boostVector(); 445 455 G4int L=result->size(); if(L) for(G4int i=0; i<L; i++) (*result)[i]->Boost(Velocity); 446 }447 return result;456 } 457 return result; 448 458 } // End of LightFragmentationTest 449 459 450 460 // Calculate Fragmentation Mass (if pdefs # 0, returns two hadrons) 451 G4double G4QString::FragmentationMass(G4QHcreate build, G4QHadronPair* pdefs)461 G4double G4QString::FragmentationMass(G4QHcreate build, G4QHadronPair* pdefs) 452 462 { 453 463 G4double mass; 454 464 // Example how to use an interface to different member functions 455 if(build==0) build=&G4QHadronBuilder::BuildLowSpin; // @@ Build S Hadrons?465 if(build==0) build=&G4QHadronBuilder::BuildLowSpin; // @@ Build S Hadrons? 456 466 G4QHadron* Hadron1 = 0; // @@ Not initialized 457 467 G4QHadron* Hadron2 = 0; … … 465 475 { 466 476 // string is qq--qqbar: Build two stable hadrons, with extra uubar or ddbar quark pair 467 G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;468 if (GetLeftParton()->GetPDGCode() < 0) iflc = -iflc;469 //... theSpin = 4; spin 3/2 baryons will be built470 Hadron1 = (hadronizer->*build)(GetLeftParton(),CreateParton(iflc));471 Hadron2 = (hadronizer->*build)(GetRightParton(),CreateParton(-iflc));477 G4int iflc = (G4UniformRand() < 0.5)? 1 : 2; 478 if (GetLeftParton()->GetPDGCode() < 0) iflc = -iflc; 479 //... theSpin = 4; spin 3/2 baryons will be built 480 Hadron1 = (hadronizer->*build)(GetLeftParton(),CreateParton(iflc)); 481 Hadron2 = (hadronizer->*build)(GetRightParton(),CreateParton(-iflc)); 472 482 mass = Hadron1->GetMass() + Hadron2->GetMass(); 473 483 } 474 if(pdefs) // need to return hadrons as well....475 {476 pdefs->first = Hadron1;477 pdefs->second = Hadron2;478 }484 if(pdefs) // need to return hadrons as well.... 485 { 486 pdefs->first = Hadron1; 487 pdefs->second = Hadron2; 488 } 479 489 return mass; 480 490 } // End of FragmentationMass … … 527 537 G4int G4QString::GetDecayDirection() const 528 538 { 529 if (decaying == Left ) return +1;530 else if (decaying == Right) return -1;531 else532 {533 G4cerr<<"***G4QString::GetDecayDirection: wrong DecayDirection="<<decaying<<G4endl;539 if (decaying == Left ) return +1; 540 else if (decaying == Right) return -1; 541 else 542 { 543 G4cerr<<"***G4QString::GetDecayDirection: wrong DecayDirection="<<decaying<<G4endl; 534 544 G4Exception("G4QString::GetDecayDirection:","72",FatalException,"WrongDecayDirection"); 535 }536 return 0;545 } 546 return 0; 537 547 } 538 548 539 549 G4ThreeVector G4QString::StablePt() 540 550 { 541 if (decaying == Left ) return Ptright;542 else if (decaying == Right ) return Ptleft;543 else544 {545 G4cerr<<"***G4QString::StablePt: wrong DecayDirection="<<decaying<<G4endl;551 if (decaying == Left ) return Ptright; 552 else if (decaying == Right ) return Ptleft; 553 else 554 { 555 G4cerr<<"***G4QString::StablePt: wrong DecayDirection="<<decaying<<G4endl; 546 556 G4Exception("G4QString::StablePt:","72",FatalException,"WrongDecayDirection"); 547 }548 return G4ThreeVector();557 } 558 return G4ThreeVector(); 549 559 } 550 560 551 561 G4ThreeVector G4QString::DecayPt() 552 562 { 553 if (decaying == Left ) return Ptleft;554 else if (decaying == Right ) return Ptright;555 else556 {557 G4cerr<<"***G4QString::DecayPt: wrong DecayDirection="<<decaying<<G4endl;563 if (decaying == Left ) return Ptleft; 564 else if (decaying == Right ) return Ptright; 565 else 566 { 567 G4cerr<<"***G4QString::DecayPt: wrong DecayDirection="<<decaying<<G4endl; 558 568 G4Exception("G4QString::DecayPt:","72",FatalException,"WrongDecayDirection"); 559 }560 return G4ThreeVector();569 } 570 return G4ThreeVector(); 561 571 } 562 572 563 573 G4double G4QString::LightConeDecay() 564 574 { 565 if (decaying == Left ) return Pplus;566 else if (decaying == Right ) return Pminus;567 else568 {569 G4cerr<<"***G4QString::LightConeDecay: wrong DecayDirection="<<decaying<<G4endl;575 if (decaying == Left ) return Pplus; 576 else if (decaying == Right ) return Pminus; 577 else 578 { 579 G4cerr<<"***G4QString::LightConeDecay: wrong DecayDirection="<<decaying<<G4endl; 570 580 G4Exception("G4QString::LightConeDecay:","72",FatalException,"WrongDecayDirection"); 571 }572 return 0;581 } 582 return 0; 573 583 } 574 584 … … 576 586 { 577 587 G4LorentzVector momentum(Ptleft+Ptright,0.5*(Pplus+Pminus)); 578 momentum.setPz(0.5*(Pplus-Pminus));579 return momentum;588 momentum.setPz(0.5*(Pplus-Pminus)); 589 return momentum; 580 590 } 581 591 … … 594 604 if(HadronMomentum) 595 605 { 596 G4ThreeVector Pos(0.,0.,0.);597 Hadron->Set4Momentum(*HadronMomentum);598 UpdateString(newStringEnd, HadronMomentum);599 delete HadronMomentum;606 G4ThreeVector Pos(0.,0.,0.); 607 Hadron->Set4Momentum(*HadronMomentum); 608 UpdateString(newStringEnd, HadronMomentum); 609 delete HadronMomentum; 600 610 } 601 611 return Hadron; … … 604 614 void G4QString::UpdateString(G4QParton* decay, const G4LorentzVector* mom) 605 615 { 606 decaying=None;607 if(decaying == Left)608 {616 decaying=None; 617 if(decaying == Left) 618 { 609 619 G4QParton* theFirst = thePartons[0]; 610 delete theFirst;611 theFirst = decay;612 Ptleft -= mom->vect();613 Ptleft.setZ(0.);614 }620 delete theFirst; 621 theFirst = decay; 622 Ptleft -= mom->vect(); 623 Ptleft.setZ(0.); 624 } 615 625 else if (decaying == Right) 616 {626 { 617 627 G4QParton* theLast = thePartons[thePartons.size()-1]; 618 628 delete theLast; 619 theLast = decay;620 Ptright -= mom->vect();621 Ptright.setZ(0.);622 }629 theLast = decay; 630 Ptright -= mom->vect(); 631 Ptright.setZ(0.); 632 } 623 633 else 624 {625 G4cerr<<"***G4QString::UpdateString: wrong oldDecay="<<decaying<<G4endl;634 { 635 G4cerr<<"***G4QString::UpdateString: wrong oldDecay="<<decaying<<G4endl; 626 636 G4Exception("G4QString::UpdateString","72",FatalException,"WrongDecayDirection"); 627 }628 Pplus -= mom->e() + mom->pz();629 Pminus -= mom->e() - mom->pz();637 } 638 Pplus -= mom->e() + mom->pz(); 639 Pminus -= mom->e() - mom->pz(); 630 640 } // End of UpdateString 631 641 … … 641 651 G4double DecayQuarkMass2 = sqr(GetDecayParton()->GetMass()); // Mass of quark? M.K. 642 652 G4double HadronMass2T = HadronMass*HadronMass + HadronPt.mag2(); 643 if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*Mass2() ) return 0; // restart!653 if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*Mass2() ) return 0; // restart! 644 654 //... then compute allowed z region z_min <= z <= z_max 645 655 G4double zMin = HadronMass2T/Mass2(); 646 656 G4double zMax = 1. - DecayQuarkMass2/Mass2(); 647 if (zMin >= zMax) return 0; // have to start all over!657 if (zMin >= zMax) return 0; // have to start all over! 648 658 G4double z=0; 649 659 if(QL) z = GetQGSMLightConeZ(zMin, zMax, GetDecayParton()->GetPDGCode(), pHadron, … … 704 714 { 705 715 if(cClusterInterrupt++ >= ClusterLoopInterrupt) return false; 706 G4QParton* quark = 0;707 string->SetLeftPartonStable(); // to query quark contents..708 if(string->DecayIsQuark() && string->StableIsQuark()) // There're quarks on clusterEnds709 LeftHadron= QuarkSplitup(string->GetLeftParton(), quark);710 else711 { 712 //... there is a Diquark on cluster ends713 G4int IsParticle;714 if(string->StableIsQuark())IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?-1:1;715 else IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?1:-1;716 G4QParton* quark = 0; 717 string->SetLeftPartonStable(); // to query quark contents.. 718 if(string->DecayIsQuark() && string->StableIsQuark()) // There're quarks on clusterEnds 719 LeftHadron= QuarkSplitup(string->GetLeftParton(), quark); 720 else 721 { 722 //... there is a Diquark on cluster ends 723 G4int IsParticle; 724 if(string->StableIsQuark())IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?-1:1; 725 else IsParticle=(string->GetLeftParton()->GetPDGCode()>0)?1:-1; 716 726 G4QPartonPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 717 727 quark = QuarkPair.GetParton2(); 718 728 LeftHadron=hadronizer->Build(QuarkPair.GetParton1(), string->GetLeftParton()); 719 }729 } 720 730 RightHadron = hadronizer->Build(string->GetRightParton(), quark); 721 731 //... repeat procedure, if mass of cluster is too low to produce hadrons 722 732 //... ClusterMassCut = 0.15*GeV model parameter 723 if ( quark->GetParticleSubType()== "quark" ) ClusterMassCut = 0.;724 else ClusterMassCut = ClusterMass;733 if ( quark->GetParticleSubType()== "quark" ) ClusterMassCut = 0.; 734 else ClusterMassCut = ClusterMass; 725 735 } while(ResidualMass <= LeftHadron->GetMass() + RightHadron->GetMass() + ClusterMassCut); 726 736 //... compute hadron momenta and energies … … 737 747 } // End of SplitLast 738 748 739 G4QHadron* G4QString::QuarkSplitup(G4QParton*decay, G4QParton *&created)740 { 741 G4int IsParticle=(decay->GetPDGCode()>0) ? -1 : +1; // if we have a quark, we need antiquark (or diquark)749 G4QHadron* G4QString::QuarkSplitup(G4QParton* decay, G4QParton *&created) 750 { 751 G4int IsParticle=(decay->GetPDGCode()>0) ? -1 : +1; // a quark needs antiquark or diquark 742 752 G4QPartonPair QuarkPair = CreatePartonPair(IsParticle); 743 753 created = QuarkPair.GetParton2(); … … 761 771 } 762 772 G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1; 763 // if we have a quark, we need antiquark)773 // if we have a quark, we need antiquark) 764 774 G4QPartonPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 765 775 //... Build new Diquark … … 777 787 //... Diquark does not break 778 788 G4int IsParticle=(decay->GetPDGCode()>0) ? +1 : -1; 779 // if we have a diquark, we need quark)789 // if we have a diquark, we need quark) 780 790 G4QPartonPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 781 791 created = QuarkPair.GetParton2(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4Quasmon.cc
r1007 r1055 28 28 // 29 29 // 30 // $Id: G4Quasmon.cc,v 1.1 07 2008/03/31 20:30:35 dennisExp $31 // GEANT4 tag $Name: geant4-09-0 2$30 // $Id: G4Quasmon.cc,v 1.111 2009/05/27 08:53:15 mkossov Exp $ 31 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 32 32 // 33 33 // ---------------- G4Quasmon ---------------- 34 34 // by Mikhail Kossov, July 1999. 35 35 // class for an excited hadronic state used by the CHIPS Model 36 // ------------------------------------------------------------ 36 // --------------------------------------------------------------------------- 37 // Short description: The Quasmon is the main object of the CHIPS model, where 38 // hadronic states are defined by the quark content and the 4-momentum (mass). 39 // In this sense a Quasmon is a generalised hadron - hadrons are the low 40 // mass discrete states of quasmons. Here the hadron can be not only an 41 // elementary particle, consisting of 2 or 3 quarks, but a nucleonic 42 // cluster, consisting of 6, 9, ... , 3n, ... quarks. In the CHIPS model 43 // the nucleus is considered as a group of the nucleons and the nucleonic 44 // clusters. In hadronic reactions a Quasmon is constructed in vacuum as 45 // a result of the collision (G4QCollision process). In this case only 46 // the G4Quasmon class can be used for the reaction. In nuclear reactions 47 // one or a few Quasmons can be created as a result of the colision of 48 // the projectile hadrons with the nucleons and the nucleonic clusters 49 // of the nuclear target. In this case the Quasmons are created and 50 // fragmented in the nuclear environment (G4QNucleus) and the G4QEnvironment 51 // class must be used for the reaction. For nuclear-nuclear reactions 52 // two G4QEnvironments are used with the common (which can fragment in both 53 // nuclear environments - mostly at low energies), individual (which can 54 // fragment in only one of two G4QEnvironments) and vacuum (which can 55 // fragment in vacuum being too far by rapidity from both nuclei) Quasmons. 56 // -------------------------------------------------------------------------- 57 // 37 58 //#define debug 38 59 //#define pdebug … … 287 308 { 288 309 #ifdef debug 289 G4cout<<"G4Q::HQ: PionAtRest, addP="<<addPhoton<<", momP="<<momPhoton<<G4endl;310 G4cout<<"G4Q::HQ: PionAtRest, addP="<<addPhoton<<", momP="<<momPhoton<<G4endl; 290 311 #endif 291 312 addPhoton=0.; … … 330 351 #endif 331 352 if(addPhoton) 332 {333 G4cerr<<"***G4Quas::HQ:Q4M="<<q4Mom<<",status="<<status<<", phE="<<addPhoton<<G4endl;353 { 354 G4cerr<<"***G4Quas::HQ:Q4M="<<q4Mom<<",status="<<status<<", phE="<<addPhoton<<G4endl; 334 355 throw G4QException("G4Quasmon::HadronizeQuasmon: OverheadPhoton for theZeroQuasmon"); 335 }356 } 336 357 KillQuasmon(); // This Quasmon is done 337 358 qEnv=theEnvironment; // Update QEnvironment … … 386 407 if(nHd) for(int ih=0; ih<nHd; ih++) ccSum+=theQHadrons[ih]->GetCharge(); 387 408 if(ccSum!=cSum) 388 {409 { 389 410 G4cerr<<"*G4Q::HQ:C"<<cSum<<",c="<<ccSum<<",E="<<theEnvironment<<",Q="<<valQ<<G4endl; 390 411 G4cerr<<":G4Q::HQ:oldE="<<oldEnv<<"oldQ="<<oldCQC<<",oN="<<oldNH<<",N="<<nHd<<G4endl; … … 405 426 G4double tmpPq=q4Mom.rho(); // Momentum of Quasmon 406 427 if(fabs(qM2)<.0001 || tmpEq<=tmpPq) 407 {428 { 408 429 qM2=0.; 409 430 if(!valQ.GetCharge() && !valQ.GetBaryonNumber() && !valQ.GetStrangeness()) 410 431 { 411 432 if(fabs(qM2)<.001) 412 {433 { 413 434 q4Mom.setE(tmpPq); 414 435 #ifdef debug … … 420 441 qEnv=theEnvironment; // Update QEnvironment 421 442 return theQHadrons; // The last decay of the quasmon... 422 }443 } 423 444 else if(tmpPq<.001) // @@ Unprobable... 424 {445 { 425 446 #ifdef debug 426 447 G4cout<<"G4Q::HQ:Quasmon is nothing, Q4M="<<q4Mom<<",E="<<theEnvironment<<G4endl; … … 429 450 qEnv=theEnvironment; // Update QEnvironment 430 451 return theQHadrons; // The last act of the quasmon... 431 }452 } 432 453 } 433 454 else q4Mom.setE(tmpPq*1.00001); // @@ Can break E/p conservation … … 438 459 //////////G4double b2=qltb.mag2(); // beta^2 of Quasmon 439 460 #ifdef debug 440 G4cout<<"G4Q::HQ: Quasm="<<q4Mom<<",qM="<<quasM<<",qQC="<<valQ<<G4endl;461 G4cout<<"G4Q::HQ: Quasm="<<q4Mom<<",qM="<<quasM<<",qQC="<<valQ<<G4endl; 441 462 #endif 442 463 CalculateNumberOfQPartons(quasM); // Fills PrivateParameter nOfQ (a#OfQPartonsInQ) … … 449 470 //G4int maxActEnv=4; // n-Dod + p-Dod // maxEnv.(in d) to compensate the Q recoilMom 450 471 G4int maxActEnv=256; // n-Dod + p-Dod // maxEnv.(in d) to compensate the Q recoilMom 451 G4int dmaxActEnv=maxActEnv+maxActEnv; // 2 maxEnv.(in d) to compensate the Q recoilMom472 G4int dmaxActEnv=maxActEnv+maxActEnv; // 2*maxEnv.(in d) to compensate the Q recoilMom 452 473 //G4double fAE=static_cast<double>(maxActEnv); 453 if(envA>dmaxActEnv)454 //if(2>3) // Corresponds to envA>256455 {456 //G4int oEn=static_cast<int>(fAE/sqrt(static_cast<double>(envA)));474 if(envA>dmaxActEnv) 475 //if(2>3) // Corresponds to envA>256 476 { 477 //G4int oEn=static_cast<int>(fAE/sqrt(static_cast<double>(envA))); 457 478 G4int zEn=maxActEnv; // Charge of the LimitActiveNuclearEnvironment 458 479 G4int nEn=zEn; // Charge of the LimitActiveNuclearEnvironment … … 461 482 bEn4M=G4LorentzVector(0.,0.,0.,mbEn);// 4-momentum of the LimitActiveNuclearEnviron 462 483 bEnQC=G4QContent(bEn+nEn,bEn+zEn,0,0,0,0); // QuarkContent of the LimitActiveNuclEnv 463 }484 } 464 485 else // @@ Can be made STATIC CONSTANTS 465 {486 { 466 487 bEn = 256; // BaryoN of the LimitActiveNuclearEnvironment 467 488 mbEn = G4QPDGCode(2112).GetNuclMass(128,128,0); // Mass of the LimActNucEnvironment … … 472 493 G4QContent envQC=theEnvironment.GetQCZNS(); // QuarkContent of theCurrentNuclearEnviron 473 494 #ifdef debug 474 G4cout<<"G4Q::HQ: ePDG="<<envPDG<<",eM="<<envM<<",eQC="<<envQC<<G4endl;495 G4cout<<"G4Q::HQ: ePDG="<<envPDG<<",eM="<<envM<<",eQC="<<envQC<<G4endl; 475 496 #endif 476 497 G4QContent totQC=valQ+envQC; // Total Quark Content … … 483 504 G4double totM =totN.GetMZNS(); // Minimum Mass of the Total System 484 505 #ifdef debug 485 G4cout<<"G4Q::HQ: tN="<<totN<<",tGSM="<<totM<<",tQC="<<totQC<<G4endl;506 G4cout<<"G4Q::HQ: tN="<<totN<<",tGSM="<<totM<<",tQC="<<totQC<<G4endl; 486 507 #endif 487 508 /////////////////////G4double protCB=theEnvironment.CoulombBarrier(1.,1.); … … 489 510 G4double resNM =10000000.; // Prototype of residual mass after n separated 490 511 if(totNeut>0) 491 {512 { 492 513 G4QContent resNQC=totQC-G4QContent(2,1,0,0,0,0); 493 514 G4QNucleus resNN(resNQC); 494 515 resNM = resNN.GetMZNS(); 495 516 resNPDG= resNN.GetPDG(); 496 }517 } 497 518 G4LorentzVector env4M =G4LorentzVector(0.,0.,0.,envM); 498 519 G4LorentzVector tot4M =q4Mom+env4M; … … 500 521 G4int totPDG=totN.GetPDG(); // Total PDG Code for the Current compound 501 522 #ifdef debug 502 G4cout<<"G4Q::HQ: totPDG="<<totPDG<<",totM="<<totMass<<",rPDG="<<resNPDG<<G4endl;523 G4cout<<"G4Q::HQ: totPDG="<<totPDG<<",totM="<<totMass<<",rPDG="<<resNPDG<<G4endl; 503 524 #endif 504 525 G4double totEn=tot4M.e(); 505 G4double totMo=tot4M.rho();506 if(totEn<totMo)526 G4double totMo=tot4M.rho(); 527 if(totEn<totMo) 507 528 { 508 529 G4cerr<<"---Warning---G4Q::HQ: *Boost* tot4M="<<tot4M<<", E-p="<<totEn-totMo<<G4endl; … … 510 531 G4double emodif=fabs(totEn-totMo); 511 532 //if(emodif<accuracy) 512 //{533 //{ 513 534 G4cerr<<"G4Q::HQ: *Boost* E-p shift is corrected to "<<emodif<<G4endl; 514 535 tot4M.setE(totMo+emodif+.01*accuracy); 515 //}536 //} 516 537 } 517 538 G4ThreeVector totBoost = tot4M.boostVector(); // BoostVector for TotalSystem (backward) … … 524 545 G4int iniS =valQ.GetL(); 525 546 #ifdef debug 526 G4cout<<"G4Q::HQ: iniPDG="<<iniPDG<<", Z="<<iniP<<", N="<<iniN<<", S="<<iniS<<G4endl;547 G4cout<<"G4Q::HQ: iniPDG="<<iniPDG<<", Z="<<iniP<<", N="<<iniN<<", S="<<iniS<<G4endl; 527 548 #endif 528 549 G4QNucleus iniRN(iniP,iniN-1,iniS); … … 531 552 G4double iniQM =G4QPDGCode(iniPDG).GetMass(); // Minimum mass of Quasmon 532 553 #ifdef debug 533 G4cout<<"G4Q::HQ: iniRN="<<iniRN<<", iniRM="<<iniRM<<", iniQM="<<iniQM<<G4endl;554 G4cout<<"G4Q::HQ: iniRN="<<iniRN<<", iniRM="<<iniRM<<", iniQM="<<iniQM<<G4endl; 534 555 #endif 535 556 /////////////////G4double iniQM2= iniQM*iniQM; … … 558 579 //theEnvironment.PrepareCandidates(theQCandidates,false,false);//Calc.PrePreprob's of C 559 580 //G4bool fF=piF||gaF; 560 // piF,piF or gaF,gaF is correct. Made to avoid theSpecificInteractionTimeClusterChoice581 // piF,piF or gaF,gaF is correct. Made to avoid theSpecificInteractionTimeClusterChoice 561 582 theEnvironment.PrepareCandidates(theQCandidates,piF,piF);// Calc.PrePreprob of Candid's 562 583 ModifyInMatterCandidates(); // Calculate InMediaMasses of Cand. & Possibil. … … 596 617 kCountMax=pCountMax; 597 618 } 598 G4bool gintFlag=false; // Flag of gamma interaction with one quark599 while(kCount<kCountMax&&kCond)600 {619 G4bool gintFlag=false; // Flag of gamma interaction with one quark 620 while(kCount<kCountMax&&kCond) 621 { 601 622 kCond=true; 602 623 G4double miM2=0.; 603 624 if(envPDG==NUCPDG) 604 {625 { 605 626 if(excE>mPi0) miM2=mPi02; 606 627 else miM2=mP2; 607 }628 } 608 629 else // "Env. exists" case - find k_min & k_max 609 {630 { 610 631 minK=100000.; 611 632 // @@ ??? May be for the light nuclei ??? 612 633 //if(piF&&quasM>iniQM) maxK=mNeut/2.+(quasM-iniQM)*iniQM/(iniQM+mNeut); 613 634 //else if(quasM>iniQM) 614 //{635 //{ 615 636 // G4double limK=envM/2.+(quasM-iniQM)*iniQM/(iniQM+envM); 616 637 // if(limK<maxK) maxK=limK; 617 //}638 //} 618 639 //@@*acceleration*: check only for P,N,d,& alpfa, can be done for all clusters(?) 619 640 //if(iniN>0&&iniBN>1) // "Neutron-hadron" estimate … … 634 655 // G4double dkts=kts+kts; 635 656 // G4double fu=dkts*(dkts*quasM-sm2)+quasM*m2N; 636 // G4cout<<"G4Q::HQ:M="<<quasM<<",R="<<bnRQ<<",f("<<kts<<")="<<fu<<"<0"<<G4endl;657 // G4cout<<"G4Q::HQ:M="<<quasM<<",R="<<bnRQ<<",f("<<kts<<")="<<fu<<"<0"<<G4endl; 637 658 #endif 638 659 // if(quasM>=mNeut+bnRQ) … … 653 674 if(totN>0&&totBN>1) // "Neutron-cluster" estimate 654 675 { 655 G4QNucleus tmpNN(totZ,totN-1,0);676 G4QNucleus tmpNN(totZ,totN-1,0); 656 677 G4double delN=tmpNN.GetMZNS()+mNeut-totM; 657 678 if(envN>0&&envA>1) 658 679 { 659 G4QNucleus envNN(envZ,envN-1,0);680 G4QNucleus envNN(envZ,envN-1,0); 660 681 G4double delEN=envNN.GetMZNS()+mNeut-envM; 661 682 if(delEN>delN) delN=delEN; 662 }683 } 663 684 delN*=qurF; 664 685 if(delN<minK) minK=delN; … … 667 688 { 668 689 G4double proCB=theEnvironment.CoulombBarrier(1,1); 669 G4QNucleus tmpPN(totZ-1,totN,0);690 G4QNucleus tmpPN(totZ-1,totN,0); 670 691 G4double delP=tmpPN.GetMZNS()+mProt-totM+proCB; 671 692 if(envZ>0&&envA>1) 672 693 { 673 G4QNucleus envPN(envZ-1,envN,0);694 G4QNucleus envPN(envZ-1,envN,0); 674 695 G4double delEP=envPN.GetMZNS()+mProt-envM+proCB; 675 696 if(delEP>delP) delP=delEP; 676 }697 } 677 698 delP*=qurF; 678 699 if(delP<minK) minK=delP; … … 681 702 { 682 703 G4double proCB=theEnvironment.CoulombBarrier(1,2); 683 G4QNucleus tmpDN(totZ-1,totN-1,0);704 G4QNucleus tmpDN(totZ-1,totN-1,0); 684 705 G4double delD=tmpDN.GetMZNS()+mDeut-totM+proCB; 685 706 if(envN>0&&envZ>0&&envA>2) 686 707 { 687 G4QNucleus envDN(envZ-1,envN-1,0);708 G4QNucleus envDN(envZ-1,envN-1,0); 688 709 G4double delED=envDN.GetMZNS()+mDeut-envM+proCB; 689 710 if(delED>delD) delD=delED; 690 }711 } 691 712 delD*=qurF; 692 713 if(delD<minK) minK=delD; … … 695 716 { 696 717 G4double proCB=theEnvironment.CoulombBarrier(1,3); 697 G4QNucleus tmpTN(totZ-1,totN-2,0);718 G4QNucleus tmpTN(totZ-1,totN-2,0); 698 719 G4double delT=tmpTN.GetMZNS()+mTrit-totM+proCB; 699 720 if(envN>1&&envZ>0&&envA>3) 700 721 { 701 G4QNucleus envTN(envZ-1,envN-2,0);722 G4QNucleus envTN(envZ-1,envN-2,0); 702 723 G4double delET=envTN.GetMZNS()+mTrit-envM+proCB; 703 724 if(delET>delT) delT=delET; 704 }725 } 705 726 delT*=qurF; 706 727 if(delT<minK) minK=delT; … … 709 730 { 710 731 G4double proCB=theEnvironment.CoulombBarrier(2,3); 711 G4QNucleus tmpRN(totZ-2,totN-1,0);732 G4QNucleus tmpRN(totZ-2,totN-1,0); 712 733 G4double delR=tmpRN.GetMZNS()+mHel3-totM+proCB; 713 734 if(envN>0&&envZ>1&&envA>3) 714 735 { 715 G4QNucleus envRN(envZ-2,envN-1,0);736 G4QNucleus envRN(envZ-2,envN-1,0); 716 737 G4double delER=envRN.GetMZNS()+mHel3-envM+proCB; 717 738 if(delER>delR) delR=delER; 718 }739 } 719 740 delR*=qurF; 720 741 if(delR<minK) minK=delR; … … 723 744 { 724 745 G4double proCB=theEnvironment.CoulombBarrier(2,4); 725 G4QNucleus tmpAN(totZ-2,totN-2,0);746 G4QNucleus tmpAN(totZ-2,totN-2,0); 726 747 G4double delA=tmpAN.GetMZNS()+mAlph-totM+proCB; 727 748 if(envN>1&&envZ>1&&envA>4) 728 749 { 729 G4QNucleus envAN(envZ-2,envN-2,0);750 G4QNucleus envAN(envZ-2,envN-2,0); 730 751 G4double delEA=envAN.GetMZNS()+mAlph-envM+proCB; 731 752 if(delEA>delA) delA=delEA; 732 }753 } 733 754 delA*=qurF; 734 755 if(delA*qurF<minK) minK=delA*qurF; … … 738 759 //{ 739 760 // G4double proCB=theEnvironment.CoulombBarrier(3,6); 740 // G4QNucleus tmpLN(totZ-3,totN-3,0);761 // G4QNucleus tmpLN(totZ-3,totN-3,0); 741 762 // G4double delL=tmpLN.GetMZNS()+mLit6-totM+proCB; 742 763 // if(envN>2&&envZ>2&&envA>6) 743 764 // { 744 // G4QNucleus envLN(envZ-3,envN-3,0);765 // G4QNucleus envLN(envZ-3,envN-3,0); 745 766 // G4double delEL=envLN.GetMZNS()+mLit6-envM+proCB; 746 767 // if(delEL>delL) delL=delEL; 747 // }768 // } 748 769 // delL*=qurF; 749 770 // if(delL<minK) minK=delL; 750 771 //} 751 772 if(minK<0.||minK+minK>quasM) minK=0.; 752 }773 } 753 774 //if(addPhoton>0.&&quasM<1500.&&G4UniformRand()<f2all) 754 //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar)755 //if(addPhoton>0.&&(G4UniformRand()<.7||iniBN<2))//PhotoAbsorbDiagramContrib756 //if(addPhoton>0.&&(G4UniformRand()<.5||iniBN<2))//PhotonAbsorbDiagramContrib775 //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar) 776 //if(addPhoton>0.&&(G4UniformRand()<.7||iniBN<2))//PhotoAbsorbDiagramContrib 777 //if(addPhoton>0.&&(G4UniformRand()<.5||iniBN<2))//PhotonAbsorbDiagramContrib 757 778 //if(addPhoton>0.&&(G4UniformRand()<.27||iniBN<2))// PhotonAbsorbDiagramContrib 758 //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar)759 //if(addPhoton>0.&&iniBN>1)// PhotonAbsorbDiagramContrib(@@HiddenPar)760 //if(addPhoton>0.&&G4UniformRand()<0.5)// PhotonAbsorbDiagramContrib(@@HiddenPar)761 //if(addPhoton>0.&&G4UniformRand()<0.75)// PhotonAbsorbDiagramContrib(@@HiddenPar)762 ///if(addPhoton>0.&&G4UniformRand()<0.8)// PhotonAbsorbDiagramContrib(@@HiddenPar)763 //if(addPhoton>0.&&iniBN>1)//PhotonAbsorbDiagramContrib(Photon's captured by N quark)764 if(addPhoton>0.)// PhotonAbsorbDiagramContrib(Photon is always captured by quarks)765 //if(2>3) // Photon capture by quark is closed779 //if(addPhoton>0.&&iniBN<2)// PhotonAbsorbDiagramContrib(@@HiddenPar) 780 //if(addPhoton>0.&&iniBN>1)// PhotonAbsorbDiagramContrib(@@HiddenPar) 781 //if(addPhoton>0.&&G4UniformRand()<0.5)// PhotonAbsorbDiagramContrib(@@HiddenPar) 782 //if(addPhoton>0.&&G4UniformRand()<0.75)// PhotonAbsorbDiagramContrib(@@HiddenPar) 783 ///if(addPhoton>0.&&G4UniformRand()<0.8)// PhotonAbsorbDiagramContrib(@@HiddenPar) 784 //if(addPhoton>0.&&iniBN>1)//PhotonAbsorbDiagramContrib(Photon's captured by N quark) 785 if(addPhoton>0.)// PhotonAbsorbDiagramContrib(Photon is always captured by quarks) 786 //if(2>3) // Photon capture by quark is closed 766 787 { 767 788 //nOfQ=valQ.GetQ()-valQ.GetAQ(); // Recover nOfQ for the not excited cluster 768 789 // @@ 1/(p_g,p_q) interaction probability (? (p_g,p_q)=0 always) 769 gintFlag=true;790 gintFlag=true; 770 791 q4Mom-= phot4M; // recover Quasmon-Cluster without the Photon 771 792 qM2 = q4Mom.m2(); // Update the Current squared mass of Quasmon … … 779 800 //G4int cMax=27;//For m_gam=0:*[k/(k+p) factor 1/s{m<<k,s=m^2*(1+p/k)}]*[p/k(ct=0)] 780 801 //G4int pCount=0;//For m_gam=0 the suppression factor can be p*p/(p+k)/(p+k) @@ (?) 781 //while (frat && pCount<cMax)802 //while (frat && pCount<cMax) 782 803 //{ 783 // ____ Keep this when closing while______________________________784 G4double rn=G4UniformRand(); // k is changed by addPhoton804 // ____ Keep this when closing while______________________________ 805 G4double rn=G4UniformRand(); // k is changed by addPhoton 785 806 kMom=(1.-(1.-xmi)*pow(rn,1./kpow))*quasM/2; // 1/k from delta-funct integration 786 807 // ---------- … … 788 809 G4double dkM=kMom+kMom; 789 810 // p2+k2+2pkcost=(k+e)2 790 //cost=(addPhoton*addPhoton-momPhoton*momPhoton+addPhoton*dkM)/momPhoton/dkM;811 //cost=(addPhoton*addPhoton-momPhoton*momPhoton+addPhoton*dkM)/momPhoton/dkM; 791 812 G4double cor=200./dkM/addPhoton; 792 813 G4double bas=std::log(2+cor); 793 cost=1.-std::exp(bas-(bas-std::log(cor))*G4UniformRand());794 //cost=1.-2*G4UniformRand();795 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^796 // frat=G4UniformRand()>kMom/(addPhoton+kMom);797 // //frat=G4UniformRand()>kMom*kMom/(addPhoton+kMom)/(addPhoton+kMom);814 cost=1.-std::exp(bas-(bas-std::log(cor))*G4UniformRand()); 815 //cost=1.-2*G4UniformRand(); 816 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 817 // frat=G4UniformRand()>kMom/(addPhoton+kMom); 818 // //frat=G4UniformRand()>kMom*kMom/(addPhoton+kMom)/(addPhoton+kMom); 798 819 // //frat=G4UniformRand()>addPhoton/(addPhoton+kMom); 799 820 // //frat=G4UniformRand()>addPhoton*addPhoton/(addPhoton+kMom)/(addPhoton+kMom); 800 821 // pCount++; 801 //}822 //} 802 823 if(cost>1.) cost=1.; 803 824 if(cost<-1.) cost=-1.; 804 825 #ifdef debug 805 G4cout<<"G4Q::HQ:**PHOTON out of Q**k="<<kMom<<",ct="<<cost<<",QM="<<quasM<<G4endl;826 G4cout<<"G4Q::HQ:**PHOTON out of Q**k="<<kMom<<",ct="<<cost<<",QM="<<quasM<<G4endl; 806 827 #endif 807 828 // @@ (?) Pseudo Fermi-mom correction (use lib function for the 3d randomization -* … … 834 855 //cost-=dc; // for virtPhotons smear in both dir.| 835 856 // --- Quark mass correction ends here (?) ---------------------------------------* 836 }857 } 837 858 else 838 {839 gaF=false; // GammaFirstAct flag is only for the gamma-q840 gintFlag=false;859 { 860 gaF=false; // GammaFirstAct flag is only for the gamma-q 861 gintFlag=false; 841 862 // ==== Probabiliti proportional to k (without 1/k factor of hadronization) 842 863 if(!miM2) miM2=(minK+minK)*quasM; // Make minimum mass for randomization … … 846 867 //G4double kpow=static_cast<double>(nOfQ-2); 847 868 //G4double kst=0.; 848 //if(maxK+maxK<quasM+.1) kst=pow((1.-(maxK+maxK)/quasM),kpow);869 //if(maxK+maxK<quasM+.1) kst=pow((1.-(maxK+maxK)/quasM),kpow); 849 870 //if(maxK>minK) 850 871 //{ … … 856 877 G4double rnc=G4UniformRand(); 857 878 cost = 1.-rnc-rnc; 858 }879 } 859 880 G4double cQM2=qM2-(kMom+kMom)*quasM; 860 881 if(cQM2<0.) 861 {882 { 862 883 //if(cQM2<-.0001)G4cerr<<"--Warning--G4Q::HQ:(PhBack) cQM2="<<cQM2<<" < 0"<<G4endl; 863 884 cQM2=0.; 864 }885 } 865 886 G4double cQM=sqrt(cQM2); // Mass of the coloured residual Quasmom 866 887 k4Mom=zeroLV; 867 888 cr4Mom=G4LorentzVector(0.,0.,0.,cQM); 868 889 G4LorentzVector dir4M=q4Mom-G4LorentzVector(0.,0.,0.,q4Mom.e()*.01); 869 if(!G4QHadron(q4Mom).RelDecayIn2(k4Mom,cr4Mom,dir4M,cost,cost)) //Q->ColResQ+k_part890 if(!G4QHadron(q4Mom).RelDecayIn2(k4Mom,cr4Mom,dir4M,cost,cost)) //Q->ColResQ+k_part 870 891 { 871 892 #ifdef debug … … 884 905 } 885 906 gintFlag=false; 886 }907 } 887 908 } 888 909 else // ***> The decay succeeded … … 896 917 kMom=k4Mom.e(); // Update the k_parton momentum 897 918 gintFlag=false; 898 }899 #ifdef debug 900 G4cout<<"G4Q::HQ:(PhBack) k="<<kMom<<",k4M="<<k4Mom<<",ct="<<cost<<",gF="<<gintFlag919 } 920 #ifdef debug 921 G4cout<<"G4Q::HQ:(PhBack) k="<<kMom<<",k4M="<<k4Mom<<",ct="<<cost<<",gF="<<gintFlag 901 922 <<G4endl; 902 923 #endif … … 907 928 G4int totCand = theQCandidates.size(); // Total number of candidates 908 929 #ifdef sdebug 909 G4cout<<"G4Q::HQ: ***>>>K-ITERATION #"<<kCount<<", k="<<kMom<<k4Mom<<G4endl;930 G4cout<<"G4Q::HQ: ***>>>K-ITERATION #"<<kCount<<", k="<<kMom<<k4Mom<<G4endl; 910 931 #endif 911 932 for (G4int index=0; index<totCand; index++) … … 917 938 G4bool poss= curCand->GetPossibility(); 918 939 #ifdef debug 919 if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)920 G4cout<<"G4Q::HQ:pos="<<poss<<",cPDG="<<cPDG<<",iQC="<<iniQChg<<G4endl;921 #endif 922 if(poss)940 if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001) 941 G4cout<<"G4Q::HQ:pos="<<poss<<",cPDG="<<cPDG<<",iQC="<<iniQChg<<G4endl; 942 #endif 943 if(poss) 923 944 { 924 945 G4double cMs=curCand->GetEBMass(); // EnvBound mass of the ParentCluster(?) … … 931 952 //////////////////G4double pmk = rMo*cMs/kLS; 932 953 #ifdef debug 933 if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)934 G4cout<<"G4Q::HQ:cfM="<<cfM<<",cMs="<<cMs<<",ind="<<index<<G4endl;954 if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001) 955 G4cout<<"G4Q::HQ:cfM="<<cfM<<",cMs="<<cMs<<",ind="<<index<<G4endl; 935 956 #endif 936 957 G4double k = kMom; … … 946 967 //if (dR<0.) dR=0.; 947 968 G4double dR=0.; // @@ Temporary no q-acceleration cut is used 948 if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001)949 G4cout<<"G4Q::HQ:i="<<index<<",cPDG="<<cPDG<<",k="<<kMom<<","<<kLS<<">kMin="969 if(cPDG==90000001 || cPDG==90001000 || cPDG==90000002 || cPDG==90001001) 970 G4cout<<"G4Q::HQ:i="<<index<<",cPDG="<<cPDG<<",k="<<kMom<<","<<kLS<<">kMin=" 950 971 <<kMin<<",bM="<<bnM<<",rEP="<<rEP<<",dR="<<dR<<",kCo="<<kCond<<G4endl; 951 972 #endif 952 973 if(kLS>kMin) 953 {974 { 954 975 kCond=false; 955 976 break; 956 977 } 957 }958 }959 }960 }978 } 979 } 980 } 981 } 961 982 kCount++; 962 }983 } 963 984 // End of search for "k": *** Here we forget about the initial photon forever ***???*** 964 985 #ifdef debug 965 986 if(addPhoton) 966 G4cout<<"G4Q::HQ:***PHOTON OK***k="<<k4Mom<<",Q="<<q4Mom<<",PhE="<<addPhoton<<G4endl;987 G4cout<<"G4Q::HQ:***PHOTON OK***k="<<k4Mom<<",Q="<<q4Mom<<",PhE="<<addPhoton<<G4endl; 967 988 #endif 968 989 //if(gintFlag)kLS-=addPhoton; // @@ correct for the virtual (?) -* … … 990 1011 { 991 1012 #ifdef debug 992 if(status==4)throw G4QException("G4Q::HQ:*TMP EXCEPTION - NoChanalsOfFragmentation");1013 if(status==4)throw G4QException("G4Q::HQ:*TMP EXCEPTION - NoChanalsOfFragmentation"); 993 1014 #endif 994 1015 #ifdef debug … … 1007 1028 // @@ practically never is here 1008 1029 if(!first&&excE>qCB&&envM+iniQM<totMass&&nQuasms==1&&qenv&&G4UniformRand()<pCB) 1009 //if(2>3) // Decay in GSQuasmon+GSEnviron **Is closed**1010 {1030 //if(2>3) // Decay in GSQuasmon+GSEnviron **Is closed** 1031 { 1011 1032 G4QHadron* resNuc = new G4QHadron(valQ,q4Mom);// Createa Hadron for Quasmon 1012 1033 resNuc->CorMDecayIn2(iniQM,env4M); // Recalculate the fr4Mom for ResidualGSMass … … 1023 1044 FillHadronVector(envH); // Fill Moving Environment (delete equivalent) 1024 1045 qEnv = vacuum; 1025 }1046 } 1026 1047 #ifdef debug 1027 1048 G4double eM=env4M.m(); … … 1031 1052 ClearQuasmon(); // This Quasmon is done 1032 1053 return theQHadrons; // The last decay of the quasmon... 1033 }1054 } 1034 1055 else // May be evaporation is possible 1035 {1056 { 1036 1057 #ifdef debug 1037 1058 G4cout<<"G4Q::HQ:Q2E:E="<<theEnvironment<<",valQ="<<valQ<<",tot4M="<<tot4M<<G4endl; … … 1040 1061 if(CheckGroundState(true)) ClearQuasmon(); // This Quasmon is done 1041 1062 //if(CheckGroundState(true)) KillQuasmon(); // This Quasmon is done 1042 //else if(envPDG==NUCPDG && quasM>iniQM && iniBN>1) // Convert Quasmon to MovingEnv1043 //{1063 //else if(envPDG==NUCPDG && quasM>iniQM && iniBN>1) // Convert Quasmon to MovingEnv 1064 //{ 1044 1065 #ifdef debug 1045 1066 // G4cerr<<"***G4Q::HQ:Q2E="<<theEnvironment<<",QC="<<valQ<<",4M="<<tot4M<<G4endl; … … 1047 1068 // theEnvironment=G4QNucleus(valQ,tot4M); 1048 1069 // KillQuasmon(); 1049 //}1050 else if(envPDG==NUCPDG && quasM>iniQM) // Emergency decay in Gamma & GSQuasmon1051 {1070 //} 1071 else if(envPDG==NUCPDG && quasM>iniQM) // Emergency decay in Gamma & GSQuasmon 1072 { 1052 1073 #ifdef debug 1053 1074 G4cout<<"***G4Q::HQ: Emergency Decay in Gamma/Pi0 + Residual GSQuasmon"<<G4endl; … … 1057 1078 G4double gamM=0.; 1058 1079 if(quasM>mPi0+iniQM) 1059 {1080 { 1060 1081 gamPDG=111; 1061 1082 gamM=mPi0; 1062 }1083 } 1063 1084 G4LorentzVector r4Mom(0.,0.,0.,gamM); // mass of the photon/Pi0 1064 1085 G4LorentzVector s4Mom(0.,0.,0.,iniQM); // mass of the GSQuasmon 1065 1086 G4double sum=gamM+iniQM; 1066 1087 if(sum>0. && fabs(quasM-sum)<eps) 1067 {1088 { 1068 1089 r4Mom=q4Mom*(gamM/sum); 1069 1090 s4Mom=q4Mom*(iniQM/sum); … … 1072 1093 { 1073 1094 G4cerr<<"***G4Q::HQ:Q="<<q4Mom<<quasM<<"->g/pi0(M="<<gamM<<")+GSQ="<<iniPDG 1074 <<"(M="<<iniQM<<")="<<sum<<", d="<<sum-quasM<<G4endl;1075 throw G4QException("G4Quasmon::HadronizeQ:(E=0)G/Pi0+GSQ decay error");1076 } 1077 #ifdef debug 1078 G4cout<<"G4Q::HQ:=== 0 ===>HadrVec, Q="<<q4Mom<<quasM<<"->g/pi0("<<gamPDG<<")="1095 <<"(M="<<iniQM<<")="<<sum<<", d="<<sum-quasM<<G4endl; 1096 throw G4QException("G4Quasmon::HadronizeQ:(E=0)G/Pi0+GSQ decay error"); 1097 } 1098 #ifdef debug 1099 G4cout<<"G4Q::HQ:=== 0 ===>HadrVec, Q="<<q4Mom<<quasM<<"->g/pi0("<<gamPDG<<")=" 1079 1100 <<r4Mom<<gamM<<"+GSQ="<<iniPDG<<r4Mom<<iniQM<<G4endl; 1080 1101 #endif … … 1084 1105 FillHadronVector(curHadr1); // Fill "new curHadr1" (delete equivalent) 1085 1106 ClearQuasmon(); // This Quasmon is done 1086 }1087 #ifdef pdebug 1088 G4cout<<"***G4Q::HQ:dE="<<excE<<">minK="<<minK<<",Env="<<theEnvironment<<",k="<<kLS1107 } 1108 #ifdef pdebug 1109 G4cout<<"***G4Q::HQ:dE="<<excE<<">minK="<<minK<<",Env="<<theEnvironment<<",k="<<kLS 1089 1110 <<",Q="<<valQ<<quasM<<", nQ="<<nQuasms<<G4endl; 1090 1111 #endif 1091 1112 qEnv=theEnvironment; 1092 1113 return theQHadrons; 1093 }1114 } 1094 1115 } 1095 1116 G4bool nucflag=false; // NuclearBinding Flag (can't reduce Environ) … … 1145 1166 G4cerr<<"***G4Q::HQ: Cand#"<<i<<" >= Tot#"<<nCandid<<G4endl; 1146 1167 throw G4QException("G4Quasmon::HadronizeQuasmon: Too big number of the candidate"); 1147 }1168 } 1148 1169 curQ = valQ; // Temporary copy of valQ to estimate MinM2 1149 if (!fprob) // At present is closed // Prepare final decay (nothing was selected)1150 {1170 if (!fprob) // At present is closed // Prepare final decay (nothing was selected) 1171 { 1151 1172 memQ=curQ; // Remembe QC for the case of 2H decay 1152 1173 sPDG=curQ.GetSPDGCode(); // PDG of current Quasmon as S-hadron … … 1161 1182 } 1162 1183 else if(!sPDG) 1163 {1184 { 1164 1185 G4cerr<<"**G4Q::HQ:sPDG=0,E="<<theEnvironment<<",B="<<totBN<<",S="<<totS<<G4endl; 1165 1186 throw G4QException("G4Quasmon::HadronizeQuasmon:DecayPartSelection,Evaporation"); 1166 }1187 } 1167 1188 else if(sPDG==10) // ---> "Chipolino" case 1168 {1189 { 1169 1190 fchipo=true; 1170 1191 G4QChipolino chipQ(valQ); … … 1176 1197 rMass= QPDG2.GetMass(); 1177 1198 if(sMass+rMass>quasM) //@@ Evaporate but try 3Pt decay with Environ 1178 {1179 if(totBN>1&&totMass>totM&&totS>=0)1180 {1199 { 1200 if(totBN>1&&totMass>totM&&totS>=0) 1201 { 1181 1202 #ifdef ppdebug 1182 1203 G4cout<<"G4Q::HQ:NEED-EVAP-2:Q="<<q4Mom<<valQ<<",E="<<theEnvironment<<G4endl; … … 1185 1206 qEnv=theEnvironment; 1186 1207 return theQHadrons; 1187 }1208 } 1188 1209 else 1189 {1210 { 1190 1211 G4cerr<<"***G4Q::HQ:QM="<<quasM<<"<S="<<sMass<<"+R="<<rMass<<"="<<sMass+rMass 1191 1212 <<",tB="<<totBN<<",tS="<<totS<<",tM="<<totMass<<">minM="<<totM<<G4endl; 1192 1213 throw G4QException("G4Quasmon::HadronizeQuasmon:VirtChipo Can'tEvapNucleus"); 1193 }1194 }1214 } 1215 } 1195 1216 } 1196 1217 else if(nQuasms>1) … … 1208 1229 rPDG=envPDG; 1209 1230 if (rPDG>MINPDG&&rPDG!=NUCPDG) 1210 {1231 { 1211 1232 rMass=theEnvironment.GetMZNS(); 1212 1233 q4Mom+=G4LorentzVector(0.,0.,0.,rMass); … … 1215 1236 KillEnvironment(); 1216 1237 fred=true; // Flag of environment reduction 1217 }1238 } 1218 1239 else if(rPDG!=NUCPDG&&totBN>1&&totMass>totM&&totS>=0) // ===> "Evaporation" case 1219 {1240 { 1220 1241 #ifdef ppdebug 1221 1242 G4QContent nTotQC=totQC-neutQC; … … 1233 1254 qEnv=theEnvironment; 1234 1255 return theQHadrons; 1235 }1256 } 1236 1257 else if(rPDG==NUCPDG) 1237 1258 { … … 1243 1264 rMass=mPi0; // Safety decay in pi0 1244 1265 rPDG=111; 1245 }1266 } 1246 1267 else 1247 1268 { 1248 1269 rMass=0.; // Safety decay in gamma 1249 1270 rPDG=22; 1250 }1271 } 1251 1272 } 1252 1273 } … … 1255 1276 G4cout<<"G4Q::HQ:hsflagTRUE,s="<<sPDG<<","<<sMass<<",r="<<rPDG<<","<<rMass<<G4endl; 1256 1277 #endif 1257 }1278 } 1258 1279 else // ---> "Something was selected" case 1259 {1280 { 1260 1281 G4QCandidate* curCand = theQCandidates[i];// Pointer toSelectedCandidate:hadr/fragm 1261 1282 sPDG = curCand->GetPDGCode(); // PDG of the selected candidate … … 1266 1287 //@@ For clusters use another randomization & a loop over possible parent clusters 1267 1288 if(sPDG>MINPDG&&sPDG!=NUCPDG) // ===> "Fragment" case 1268 {1289 { 1269 1290 G4int ip=0; 1270 1291 G4int nParCandid = curCand->GetPClustEntries(); … … 1278 1299 G4cerr<<G4endl; 1279 1300 throw G4QException("G4Quasmon::HadronizeQuasmon:NoParentClust forTheFragment"); 1280 }1301 } 1281 1302 else // ---> "Parent cluster was found" case 1282 {1303 { 1283 1304 G4double totPP = sppm * G4UniformRand(); 1284 1305 while(curCand->TakeParClust(ip)->GetProbability() < totPP) ip++; … … 1286 1307 G4cout<<"G4Q::HQ:p#ip="<<ip<<",f#i="<<i<<",tP="<<totPP<<",sP="<<sppm<<G4endl; 1287 1308 #endif 1288 }1309 } 1289 1310 G4QParentCluster* parCluster=curCand->TakeParClust(ip); 1290 1311 pPDG = parCluster->GetPDGCode(); 1291 G4QPDGCode pQPDG(pPDG);1312 G4QPDGCode pQPDG(pPDG); 1292 1313 pQC = pQPDG.GetQuarkContent(); 1293 1314 pBaryn= pQC.GetBaryonNumber(); 1294 pMass = parCluster->GetEBMass(); // Environment Bounded Mass1295 pNMass = parCluster->GetNBMass(); // NuclBoundedMass @@Env.Reduce dosn't work1296 transQC = parCluster->GetTransQC();1297 delta = parCluster->GetEBind(); // Environmental Binding1298 deltaN = parCluster->GetNBind(); // Nuclear Binding1299 loli = parCluster->GetLow();1300 hili = parCluster->GetHigh();1315 pMass = parCluster->GetEBMass(); // Environment Bounded Mass 1316 pNMass = parCluster->GetNBMass(); // NuclBoundedMass @@Env.Reduce dosn't work 1317 transQC = parCluster->GetTransQC(); 1318 delta = parCluster->GetEBind(); // Environmental Binding 1319 deltaN = parCluster->GetNBind(); // Nuclear Binding 1320 loli = parCluster->GetLow(); 1321 hili = parCluster->GetHigh(); 1301 1322 //G4double dhil=.0001*(hili-loli); // Safety factor 1302 1323 //loli += dhil; 1303 1324 //hili -= dhil; 1304 npqp2 = parCluster->GetNQPart2();1325 npqp2 = parCluster->GetNQPart2(); 1305 1326 // @@ One can get otherUsefulParameters of the parent cluster for hadronization 1306 G4QPDGCode sQPDG(curCand->GetPDGCode());1327 G4QPDGCode sQPDG(curCand->GetPDGCode()); 1307 1328 sQC = sQPDG.GetQuarkContent(); 1308 1329 //if(sPDG==90001001 && G4UniformRand()>0.75) sMass=np; //@@ n-p pair … … 1315 1336 <<") = curQ="<<curQ<<",InvBinding="<<delta<<",pM="<<pMass<<pQC<<G4endl; 1316 1337 #endif 1317 }1338 } 1318 1339 else // ===> "Hadron" case 1319 1340 { … … 1327 1348 <<",C="<<theQCandidates[i]->GetPDGCode()<<",Q="<<curQ<<",M2="<<sM2<<G4endl; 1328 1349 #endif 1329 }1350 } 1330 1351 G4QContent resNQC=totQC-sQC; // Quark Content of the totNucleus-Fragment 1331 1352 G4QNucleus resTN(resNQC); … … 1345 1366 { 1346 1367 // *** LIM *** 1347 G4QContent RNQC=curQ+envQC;1368 G4QContent RNQC=curQ+envQC; 1348 1369 if(sPDG>MINPDG&&sPDG!=NUCPDG) RNQC-=pQC; // ==> "Nuclear Fragment Radiation" case 1349 1370 if(envA-pBaryn>bEn) RNQC=curQ+bEnQC; // Leave the minimum environment … … 1351 1372 if(RNPDG==10) minSqN=G4QChipolino(RNQC).GetMass2();// MinSqM of DiHadron of Chipo 1352 1373 else if(!RNPDG) // It never should happen as curQ is real and env/bEn QC is > 0 1353 {1354 //#ifdef debug1374 { 1375 //#ifdef debug 1355 1376 G4cout<<"**G4Q::HQ:*KinematicTotal*, PDG="<<RNPDG<<curQ<<", QC="<<RNQC<<G4endl; 1356 //#endif1377 //#endif 1357 1378 minSqN=1000000.; 1358 }1379 } 1359 1380 else 1360 {1381 { 1361 1382 G4double minN=G4QPDGCode(RNPDG).GetMass(); 1362 1383 minSqN=minN*minN; // SquaredGSMass of ResidQuasmon+ResidEnviron … … 1365 1386 #endif 1366 1387 } 1367 }1388 } 1368 1389 else 1369 {1390 { 1370 1391 #ifdef debug 1371 1392 G4cout<<"*G4Q::HQ:EnvironmentA="<<envA<<" < SecondaryFragmentA="<<pBaryn<<G4endl; … … 1400 1421 G4double qpeM=G4QNucleus(envZ+rqZ,envN+rqN,envS+rqS).GetGSMass(); 1401 1422 #ifdef debug 1402 G4cout<<"G4Q::HadQ:Z="<<rqZ<<",N="<<rqN<<",S="<<rqS<<",eZ="<<envZ<<",eN="<<envN1423 G4cout<<"G4Q::HadQ:Z="<<rqZ<<",N="<<rqN<<",S="<<rqS<<",eZ="<<envZ<<",eN="<<envN 1403 1424 <<",eS="<<envS<<",ePDG="<<envPDG<<",eM="<<envM<<",tM="<<qpeM<<G4endl; 1404 1425 #endif 1405 1426 minT=qpeM-envM; 1406 1427 } 1407 minSqT=minT*minT; // Squared minimum mass of residual quasmon1428 minSqT=minT*minT; // Squared minimum mass of residual quasmon 1408 1429 #ifdef debug 1409 1430 G4cout<<"G4Q::HQ:rPDG="<<rqPDG<<curQ<<",minT="<<minT<<",minSqT="<<minSqT 1410 1431 <<",hsfl="<<hsflag<<G4endl; 1411 1432 #endif 1412 G4double newT=0.; // Prototype of minimal TotBoundQuasmon mass1433 G4double newT=0.; // Prototype of minimal TotBoundQuasmon mass 1413 1434 // (Hadron with environment 1414 // (see above?) || QEX) && (Q==nucFrag || Q==n,p,Lambda)1435 // (see above?) || QEX) && (Q==nucFrag || Q==n,p,Lambda) 1415 1436 1416 1437 if ( ( (sPDG < MINPDG && envPDG > MINPDG && envPDG != NUCPDG) || 1417 (sPDG > MINPDG && sPDG != NUCPDG && envPDG > pPDG))1418 &&1419 ( (rqPDG > MINPDG && rqPDG != NUCPDG) || 1420 rqPDG==2112 ||1421 rqPDG==2212 ||1422 rqPDG==3122) ) 1423 {1424 if(sPDG<MINPDG) { // The radiatedBaryon is aVaquum(QF) particle1438 (sPDG > MINPDG && sPDG != NUCPDG && envPDG > pPDG) 1439 ) && ( (rqPDG > MINPDG && rqPDG != NUCPDG) || 1440 rqPDG==2112 || rqPDG==2212 || rqPDG==3122 1441 ) 1442 ) 1443 { 1444 if(sPDG<MINPDG) // The radiatedBaryon is aVaquum(QF) particle 1445 { 1425 1446 // *** LIM *** 1426 G4QContent rtQC=curQ; // Total Residual Quasmon Quark Content 1427 if (envA > bEn) { // Nucl Env > than A_max 1428 reM=mbEn; 1447 G4QContent rtQC=curQ; // Total Residual Quasmon Quark Content 1448 if (envA > bEn) // Nucl Env > than A_max 1449 { 1450 reM=mbEn; 1429 1451 rtQC+=bEnQC; 1430 } else { 1431 reM=envM; // MinMassOfResidEnviron = MassOfEnviron 1452 } 1453 else 1454 { 1455 reM=envM; // MinMassOfResidEnviron = MassOfEnviron 1432 1456 rtQC+=envQC; // Nucl Env is below A_max=bEn 1433 }1457 } 1434 1458 G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for E+Q 1435 1459 rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (+hadron) 1436 1460 newT=rtM-reM; // The effective mass 1437 1461 #ifdef debug 1438 G4cout<<"G4Q::HQ:***VacuumFragmentation** M="<<newT<<",rM="<<rtM<<rtQC1462 G4cout<<"G4Q::HQ:***VacuumFragmentation** M="<<newT<<",rM="<<rtM<<rtQC 1439 1463 <<",eM="<<envM<<",mM="<<minT<<G4endl; 1440 1464 #endif 1441 } else { // The RadiatedHadron is aQuarkExchange frag. 1442 1443 G4QContent reQC=envQC-pQC; // Total Residual Quark Content 1465 } 1466 else // The RadiatedHadron is aQuarkExchange frag. 1467 { 1468 1469 G4QContent reQC=envQC-pQC; // Total Residual Quark Content 1444 1470 if(envA-pBaryn>bEn) reQC=bEnQC; // Nucl Env - fragment > than A_max 1445 G4QNucleus reN(reQC); // Create a pseudoNucleus for ResidualNucleus1446 reM=reN.GetMZNS(); // Min Mass of the residual EnvironmentNucleus1471 G4QNucleus reN(reQC); // Create a pseudoNucleus for ResidualNucleus 1472 reM=reN.GetMZNS(); // Min Mass of the residual EnvironmentNucleus 1447 1473 // *** LIM *** 1448 G4QContent rtQC=curQ; // Total Quasmon Quark Content1449 #ifdef debug 1450 G4cout<<"G4Q::HQ:reQC="<<reQC<<",rtQC="<<rtQC<<",eA="<<envA<<",pB="<<pBaryn1451 <<",bE="<<bEn<<bEnQC<<G4endl;1452 #endif 1453 rtQC+=reQC; // Quasmon + (effective) nuclear environment1454 G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for residual ENE1455 rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (fragment)1474 G4QContent rtQC=curQ; // Total Quasmon Quark Content 1475 #ifdef debug 1476 G4cout<<"G4Q::HQ:reQC="<<reQC<<",rtQC="<<rtQC<<",eA="<<envA<<",pB="<<pBaryn 1477 <<",bE="<<bEn<<bEnQC<<G4endl; 1478 #endif 1479 rtQC+=reQC; // Quasmon + (effective) nuclear environment 1480 G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for residual ENE 1481 rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (fragment) 1456 1482 // *** LIM *** 1457 if (envA-pBaryn > bEn) { 1458 newT=rtM-mbEn; 1459 } else { 1460 newT=rtM-reM; 1461 } 1462 #ifdef debug 1463 G4cout<<"G4Q::HQ:NuclFrM="<<newT<<",r="<<rtM<<rtQC<<",e="<<envM<<envQC<<",p=" 1483 if (envA-pBaryn > bEn) newT=rtM-mbEn; 1484 else newT=rtM-reM; 1485 #ifdef debug 1486 G4cout<<"G4Q::HQ:NuclFrM="<<newT<<",r="<<rtM<<rtQC<<",e="<<envM<<envQC<<",p=" 1464 1487 <<pMass<<pQC<<",re="<<reM<<reQC<<",exEn="<<totMass-rtM-sMass<<G4endl; 1465 1488 #endif 1466 }1489 } 1467 1490 if(minT<newT) newT=minT; 1468 }1469 minSqB=newT*newT; // MinSquaredMass of BoundedResidualQuasmon1470 } 1471 #ifdef debug 1472 G4cout<<"G4Q::HQ:rq="<<rqPDG<<",miT="<<minSqT<<",miB="<<minSqB<<",M="<<rtM<<G4endl;1491 } 1492 minSqB=newT*newT; // MinSquaredMass of BoundedResidualQuasmon 1493 } 1494 #ifdef debug 1495 G4cout<<"G4Q::HQ:rq="<<rqPDG<<",miT="<<minSqT<<",miB="<<minSqB<<",M="<<rtM<<G4endl; 1473 1496 #endif 1474 1497 if(!minSqT) … … 1479 1502 G4double m2 = BIG2; //@@ justBigNumber// Prototype/Squared Mass of Residual Quasmon 1480 1503 G4double kp=0.; // 3-Mpm/Mass for the residual Quasmon 1481 if (sPDG > MINPDG && sPDG != NUCPDG) { // ==> NuclearFragmentCandidate hadronization1504 if (sPDG > MINPDG && sPDG != NUCPDG) {// ==> NuclearFragmentCandidate hadronization 1482 1505 #ifdef debug 1483 G4cout<<"G4Q::HQ: BoundM="<<pMass<<",FreeM="<<sMass<<",QM="<<quasM<<G4endl;1506 G4cout<<"G4Q::HQ: BoundM="<<pMass<<",FreeM="<<sMass<<",QM="<<quasM<<G4endl; 1484 1507 #endif 1485 1508 // = = = = P u r e k i n e m a t i c a l c a l c u l a t i o n s: = = = = = … … 1488 1511 G4LorentzVector tot4Mom=q4Mom+cl4Mom; // @@ Just for checking 1489 1512 #ifdef debug 1490 G4cout<<"G4Q::HQ:Q("<<quasM<<")->k("<<k4Mom<<")+CRQ("<<cr4Mom.m()<<")"<<G4endl;1513 G4cout<<"G4Q::HQ:Q("<<quasM<<")->k("<<k4Mom<<")+CRQ("<<cr4Mom.m()<<")"<<G4endl; 1491 1514 #endif 1492 1515 G4LorentzVector cc4Mom=k4Mom+cl4Mom;// 4-mom of ColoredFragment (before kappa) 1493 1516 G4double ccM2=cc4Mom.m2(); // SquaredMass of the ColoredFragment 1494 1517 G4double frM2=sMass*sMass; // MinSuaredMass of the OutgoingFragment 1495 if (ccM2 <= frM2) { // Decaying ColoredFragmM < FragmM 1496 #ifdef debug 1497 G4cout<<"***G4Q::HQ:FailedToFind FragmM:"<<ccM2<<"<"<<frM2<<",M="<<pMass<<"+k=" 1518 if (ccM2 <= frM2) // Decaying ColoredFragmM < FragmM 1519 { 1520 #ifdef debug 1521 G4cout<<"***G4Q::HQ:FailedToFind FragmM:"<<ccM2<<"<"<<frM2<<",M="<<pMass<<"+k=" 1498 1522 <<k4Mom<<"="<<sqrt(ccM2)<<cc4Mom<<" < fM="<<sMass<<",miK="<<minK<<G4endl; 1499 1523 #endif 1500 dMass=pMass-pNMass; // Remember the difference1524 dMass=pMass-pNMass; // Remember the difference 1501 1525 pMass=pNMass; 1502 1526 delta=deltaN; … … 1505 1529 cc4Mom=k4Mom+cl4Mom; // 4-mom of ColoredFragment (before kappa) 1506 1530 ccM2=cc4Mom.m2(); 1507 if (ccM2 <= frM2) { 1508 #ifdef debug 1509 G4cout<<"G4Q::HQ:hsflagTRUE*NuclBINDING,ccM2="<<ccM2<<"<frM2="<<frM2<<G4endl; 1531 if (ccM2 <= frM2) 1532 { 1533 #ifdef debug 1534 G4cout<<"G4Q::HQ:hsflagTRUE*NuclBINDING,ccM2="<<ccM2<<"<frM2="<<frM2<<G4endl; 1510 1535 #endif 1511 1536 hsflag=true; // Flag of decay in Q+S 1512 } else { 1513 #ifdef debug 1514 G4cout<<"G4Q::HQ:***NUCLEAR BINDING***ccM2="<<ccM2<<" > frM2="<<frM2<<G4endl; 1537 } 1538 else 1539 { 1540 #ifdef debug 1541 G4cout<<"G4Q::HQ:***NUCLEAR BINDING***ccM2="<<ccM2<<" > frM2="<<frM2<<G4endl; 1515 1542 #endif 1516 1543 nucflag=true; // Nuclear binding was used 1517 } 1518 } else { 1544 } 1545 } 1546 else 1547 { 1519 1548 #ifdef debug 1520 1549 G4double crMass2 = cr4Mom.m2(); // SquredMass of ColouredResidualQuasmon 1521 G4cout<<"G4Q::HQ:cM2="<<crMass2<<"="<<rEP*(rEP-rMo-rMo)<<",h="<<hili<<",l="1550 G4cout<<"G4Q::HQ:cM2="<<crMass2<<"="<<rEP*(rEP-rMo-rMo)<<",h="<<hili<<",l=" 1522 1551 <<loli<<G4endl; 1523 1552 #endif … … 1532 1561 G4double dM=0.; 1533 1562 if(sPDG==90001001) dM=2.25; // Binding energy of the deuteron ??? 1534 G4cout<<"G4Q::HQ:Is xE="<<excE<<" > sM="<<sMass<<"-pM="<<pMass<<"-dM="<<dM1563 G4cout<<"G4Q::HQ:Is xE="<<excE<<" > sM="<<sMass<<"-pM="<<pMass<<"-dM="<<dM 1535 1564 <<" = "<<sMass-pMass-dM<<G4endl; 1536 1565 #endif 1537 1566 #ifdef debug 1538 G4cout<<"G4Q::HQ: must totM="<<totMass<<" > rTM="<<resTNM<<"+sM="<<sMass<<" = "1567 G4cout<<"G4Q::HQ: must totM="<<totMass<<" > rTM="<<resTNM<<"+sM="<<sMass<<" = " 1539 1568 <<sMass+resTNM<<G4endl; 1540 1569 #endif 1541 if(resTNM && totMass<resTNM+sMass) { // Probably it never takes place 1570 if(resTNM && totMass<resTNM+sMass)// Probably it never takes place 1571 { 1542 1572 #ifdef ppdebug 1543 1573 G4cout<<"***G4Quasmon::HadronizeQuasmon:***PANIC#1***TotalDE="<<excE<<"< bE=" … … 1548 1578 qEnv=theEnvironment; // Update the QEnvironment ??? 1549 1579 return theQHadrons; 1550 } 1551 1552 G4double ex=kLS-delta; // EnvironmentExcess of parton energy in LS 1580 } 1581 G4double ex=kLS-delta; // EnvironmentExcess of parton energy in LS 1553 1582 G4double dex=ex+ex; 1554 1583 G4QContent tmpEQ=envQC-pQC; // Quark content for Residual Environment … … 1557 1586 G4double tmpNM=tmpN.GetMZNS(); // Mass of Residual Environment 1558 1587 #ifdef debug 1559 G4cout<<"G4Q::HQ:eQC="<<envQC<<",pQC="<<pQC<<",rEnvM="<<tmpNM<<",hsfl="<<hsflag1588 G4cout<<"G4Q::HQ:eQC="<<envQC<<",pQC="<<pQC<<",rEnvM="<<tmpNM<<",hsfl="<<hsflag 1560 1589 <<G4endl; 1561 1590 #endif … … 1613 1642 G4double ctkk=1.-(dex/(1.-z)-pMass)/kLS;// cos(theta_k,kappa) in LS 1614 1643 #ifdef ppdebug 1615 if(qCount) G4cout<<"G4Q::HQ:qC="<<qCount<<",ct="<<ctkk<<",M="<<pMass<<",z="1644 if(qCount) G4cout<<"G4Q::HQ:qC="<<qCount<<",ct="<<ctkk<<",M="<<pMass<<",z=" 1616 1645 <<z<<",zl="<<pow(loli,pw)<<",zh="<<pow(hili,pw)<<",dE=" 1617 1646 <<totMass-totM<<",bE="<<sMass-pMass<<G4endl; … … 1638 1667 if(ctc>1.) ctc=1.; 1639 1668 else if(ctc<-1.) ctc=-1.; 1640 }1669 } 1641 1670 kp4Mom=zeroLV; // 4-mom update for RecoilQuark (q) 1642 1671 fr4Mom=G4LorentzVector(0.,0.,0.,sMass); // 4-mom update for the fragment … … 1650 1679 //G4ThreeVector kp3v=kp4Mom.vect(); 1651 1680 //G4double ctr=cc3v.dot(kp3v)/cc3v.mag()/kp3v.mag(); 1652 //G4cout<<"G4Q::HQ:cost="<<ctc<<"="<<ctr<<", d="<<ctc-ctr<<G4endl;1681 //G4cout<<"G4Q::HQ:cost="<<ctc<<"="<<ctr<<", d="<<ctc-ctr<<G4endl; 1653 1682 #ifdef debug 1654 1683 G4double ccM=sqrt(ccM2); 1655 1684 G4double kappa=ex/(1.+kLS*(1.-ctkk)/pMass);// Energy of the RecoilQuark in LS 1656 G4cout<<"G4Q::HQ:>ColDec>>>CF("<<ccM<<")->F("<<sMass<<")+q"<<kp4Mom<<"="1685 G4cout<<"G4Q::HQ:>ColDec>>>CF("<<ccM<<")->F("<<sMass<<")+q"<<kp4Mom<<"=" 1657 1686 <<kappa<<",hsfl="<<hsflag<<G4endl; 1658 1687 #endif … … 1667 1696 // ***VBQ*** 1668 1697 //G4double rQM2=rQ4Mom.m2(); // TMP (Before the "kt" is defined) 1669 //if(rQM2>=minSqB && fr4Mom.e()>=sCBE) // minSqB = SqGSMass of BoundResidQ1698 //if(rQM2>=minSqB && fr4Mom.e()>=sCBE) // minSqB = SqGSMass of BoundResidQ 1670 1699 // ***VFQ*** 1671 1700 //G4double rQM2=rQ4Mom.m2(); // TMP (Before the "kt" is defined) 1672 //if(rQM2>=minSqT && fr4Mom.e()>=sCBE) // minSqB = SqGSMass of BoundResidQ1701 //if(rQM2>=minSqT && fr4Mom.e()>=sCBE) // minSqB = SqGSMass of BoundResidQ 1673 1702 // ***VQU*** 1674 1703 fQ4Mom=rQ4Mom+G4LorentzVector(0.,0.,0.,tmpBE); // Free Quasmon 4-mom 1675 1704 G4double fQM2=fQ4Mom.m2(); // TMP (Before the "kt" is defined) 1676 if(fQM2>=minSqT && reTNM2>=tmpTM2 && fr4Mom.e()>=sCBE) // minSqT = SqGSMass1705 if(fQM2>=minSqT && reTNM2>=tmpTM2 && fr4Mom.e()>=sCBE) // minSqT = SqGSMass 1677 1706 { 1678 qCond=false; // Ok, the appropriate q is found1707 qCond=false; // Ok, the appropriate q is found 1679 1708 //ffdc=false; 1680 1709 #ifdef debug 1681 1710 // ***VTN*** 1682 //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<reTNM2<<">"<<tmpTM21711 //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<reTNM2<<">"<<tmpTM2 1683 1712 // <<" & E="<<fr4Mom.e()<<" > CB+M="<<sCBE<<G4endl; 1684 1713 // ***VBQ*** 1685 //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<rQM2<<">"<<minSqB<<G4endl;1714 //G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<rQM2<<">"<<minSqB<<G4endl; 1686 1715 // ***VQU***+***VFQ*** 1687 G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<fQM2<<">"<<minSqT<<G4endl;1688 #endif 1689 }1690 else1716 G4cout<<"G4Q::HQ:Attemp#"<<qCount<<".Yes.M2="<<fQM2<<">"<<minSqT<<G4endl; 1717 #endif 1718 } 1719 else 1691 1720 { 1692 1721 #ifdef debug 1693 1722 // ***VTN*** 1694 //G4cout<<"G4Q::HQ:Attempt#"<<qCount<<",NO.M2="<<reTNM2<<"<"<<tmpTM21723 //G4cout<<"G4Q::HQ:Attempt#"<<qCount<<",NO.M2="<<reTNM2<<"<"<<tmpTM2 1695 1724 // <<" or E="<<fr4Mom.e()<<" < CB+M="<<sCBE<<G4endl; 1696 1725 // ***VBQ*** … … 1707 1736 // ***VTN*** 1708 1737 //if(reTNM2<tmpTM2 && reTNM2>MEMrQM2 && fr4Mom.e()>=sCBE) 1709 {1738 { 1710 1739 // ***VQU*** 1711 1740 MEMrQM2=fQM2; … … 1723 1752 else if(fr4Mom.e()<sCBE&&fr4Mom.e()>MEMsCBE&&reTNM2>=tmpTM2&&fQM2>MEMrQM2) 1724 1753 // ***VBQ***VFQ*** 1725 //else if(fr4Mom.e()<sCBE&&fr4Mom.e()>MEMsCBE&&reTNM2> =tmpTM2&&rQM2>MEMrQM2)1754 //else if(fr4Mom.e()<sCBE&&fr4Mom.e()>MEMsCBE&&reTNM2>tmpTM2&&rQM2>MEMrQM2) 1726 1755 // ***VTN*** 1727 1756 //else if(fr4Mom.e()<sCBE && fr4Mom.e()>MEMsCBE && reTNM2>=tmpTM2) 1728 {1757 { 1729 1758 MEMsCBE=fr4Mom.e(); // Remember the best choice 1730 1759 MEMkp4M=kp4Mom; … … 1734 1763 } 1735 1764 else if(!qCount) //@@ Should not be here 1736 {1765 { 1737 1766 // ***VQU*** 1738 1767 MEMrQM2=fQM2; … … 1749 1778 } 1750 1779 else 1751 {1780 { 1752 1781 // ***VQU*** 1753 1782 fQM2=MEMrQM2; … … 1761 1790 rQ4Mom=MEMrQ4M; 1762 1791 reTNM2=MEMreM2; 1763 }1764 }1792 } 1793 } 1765 1794 qCount++; 1766 } // End of the WHILE of the q-choice for the fixed parent1795 } // End of the WHILE of the q-choice for the fixed parent 1767 1796 // If q-choice is exhosted, then get the best, not the last 1768 1797 quexf=true; // Quark Exchange is successfully done 1769 1798 #ifdef debug 1770 G4cout<<"G4Q::HadQ:RQ("<<rQ4Mom.m()<<")=C("<<cr4Mom.m()<<")+q"<<kp4Mom<<G4endl;1799 G4cout<<"G4Q::HadQ:RQ("<<rQ4Mom.m()<<")=C("<<cr4Mom.m()<<")+q"<<kp4Mom<<G4endl; 1771 1800 #endif 1772 1801 kt=rQ4Mom.m2(); … … 1786 1815 tot4Mom-=rQ4Mom+fr4Mom; 1787 1816 #ifdef debug 1788 G4cout<<"G4Q::HQ:t4M="<<tot4Mom<<",hsfl="<<hsflag<<".Is kt="<<kt<<">"<<minSqB1817 G4cout<<"G4Q::HQ:t4M="<<tot4Mom<<",hsfl="<<hsflag<<".Is kt="<<kt<<">"<<minSqB 1789 1818 <<" or kn="<<kn<<">"<<minSqN<<"? m2="<<m2<<", sPDG="<<sPDG<<G4endl; 1790 1819 #endif 1791 1820 // Final check to accept or reject the quark-exchange 1792 1821 // ***VFQ*** 1793 //if(kn<minSqN && kt<minSqT)1822 //if(kn<minSqN && kt<minSqT) 1794 1823 // ***VQU*** 1795 if(kn<minSqN && ku<minSqT)1824 if(kn<minSqN && ku<minSqT) 1796 1825 // ***VBQ*** 1797 //if(kn<minSqN && kt<minSqB)1826 //if(kn<minSqN && kt<minSqB) 1798 1827 //if(kt<minSqT&&ffdc) 1799 //if(kt<minSqT)1828 //if(kt<minSqT) 1800 1829 // ***VTN*** (former default) 1801 //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kn<minSqN)1802 //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kt<minSqB)1803 //if(kn<minSqN)1830 //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kn<minSqN) 1831 //if(sPDG<MINPDG&&kt<minSqB||sPDG>MINPDG&&kt<minSqB) 1832 //if(kn<minSqN) 1804 1833 // ***VTN*** 1805 //if(kt<minSqT&&sPDG!=90000001||kn<minSqN&&sPDG==90000001)//Nucleus for Neutron1806 //if(kt<minSqT&&sMass>1200.||kn<minSqN&&sMass<1200.) //NuclEnreach for Nucleons1834 //if(kt<minSqT&&sPDG!=90000001||kn<minSqN&&sPDG==90000001)//Nucleus for Neutron 1835 //if(kt<minSqT&&sMass>1200.||kn<minSqN&&sMass<1200.) //NuclEnreach for Nucleons 1807 1836 // @@@@ Priveleged Nuteron !! ??? @@@@@ 1808 //if(kn<minSqN&&sPDG==90000001||kt<minSqB&&sPDG!=90000001)//BindEnOnlyForNuter.1837 //if(kn<minSqN&&sPDG==90000001||kt<minSqB&&sPDG!=90000001)//BindEnOnlyForNuter. 1809 1838 { 1810 1839 hsflag=true; // The quark exchange is REJECTED 1811 1840 #ifdef debug 1812 G4cout<<"G4Q::HQ:**hsflag=1** No, sPDG="<<sPDG<<", kt="<<kt<<"<"<<minSqB1841 G4cout<<"G4Q::HQ:**hsflag=1** No, sPDG="<<sPDG<<", kt="<<kt<<"<"<<minSqB 1813 1842 <<" or kn="<<kn<<"<"<<minSqN<<G4endl; 1814 1843 #endif 1815 }1816 #ifdef debug 1817 else G4cout<<"G4Q::HQ:YES,t="<<kt<<">"<<minSqB<<",n="<<kn<<">"<<minSqN<<G4endl;1818 #endif 1819 }1820 }1844 } 1845 #ifdef debug 1846 else G4cout<<"G4Q::HQ:YES,t="<<kt<<">"<<minSqB<<",n="<<kn<<">"<<minSqN<<G4endl; 1847 #endif 1848 } 1849 } 1821 1850 else // ==> "HadronicCandidate hadronization" case 1822 1851 { … … 1839 1868 else TCRN+=env4M; 1840 1869 kn=TCRN.m2(); // tot4M - fr4Mom 1841 }1870 } 1842 1871 else kn=kt; 1843 1872 } … … 1857 1886 // ***VBQ*** 1858 1887 if(kt>minSqB+.01 && tM>rtM && !hsflag) 1859 //if((kt>minSqB+.01&&sPDG<MINPDG || sPDG>MINPDG&&kt>minSqB+.01&&tM>rtM) && !hsflag)1888 //if((kt>minSqB+.01&&sPDG<MINPDG || sPDG>MINPDG&&kt>minSqB+.01&&tM>rtM) && !hsflag) 1860 1889 // ***VTN*** 1861 1890 //if((kt>minSqB+.01&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN+.01&&tM>rtM) && !hsflag) 1862 1891 //if(tM>rtM&&!hsflag) // Mass(RNucleus)>M_min 1863 1892 //if(tM>rtM&&kp<kpMax&&!hsflag) // Mass(RNucleus)>M_min 1864 //if(2>3) // *** Close k-correction ***1865 {1893 //if(2>3) // *** Close k-correction *** 1894 { 1866 1895 // ***VTN*** (?) 1867 //if(sPDG<MINPDG) // Hadronic candidate: finish calculations1896 //if(sPDG<MINPDG) // Hadronic candidate: finish calculations 1868 1897 // ***VBQ***VFQ***VQU*** 1869 //if(2>3) // Close crrection for hadrons @@?p-pbar?@@1870 //{1898 //if(2>3) // Close crrection for hadrons @@?p-pbar?@@ 1899 //{ 1871 1900 // G4double np = nOfQ - 3; // Power for an residual quasmon mass 1872 1901 // G4double cM = pow(minSqB/kt,np); // Cut for PossibleQuasmon residual mass … … 1878 1907 #endif 1879 1908 // m2 = kt*rn; // SquaredMass of ResidualQuasmon (hadr) 1880 //}1909 //} 1881 1910 //else 1882 1911 //{ … … 1887 1916 //} 1888 1917 } 1889 else1918 else 1890 1919 { 1891 1920 hsflag=true; // Decay in ThisHadron/Fragment+(SHadron) 1892 1921 #ifdef pdebug 1893 G4cout<<"G4Q::HQ:NO,hsfl=1,kt="<<kt<<"<"<<minSqB<<" or M="<<tM<<"<"<<rtM<<G4endl;1894 #endif 1895 }1896 #ifdef debug 1897 G4cout<<"G4Q::HQ:*****>>>rM="<<rMass<<",sqM2="<<sqrt(m2)<<",hsfl="<<hsflag<<G4endl;1922 G4cout<<"G4Q::HQ:NO,hsfl=1,kt="<<kt<<"<"<<minSqB<<" or M="<<tM<<"<"<<rtM<<G4endl; 1923 #endif 1924 } 1925 #ifdef debug 1926 G4cout<<"G4Q::HQ:*****>>>rM="<<rMass<<",sqM2="<<sqrt(m2)<<",hsfl="<<hsflag<<G4endl; 1898 1927 #endif 1899 1928 rMass=sqrt(m2); // if(hsflag)(TwoPartDecay) it's fake 0. … … 1907 1936 G4int aPDG = abs(rPDG); 1908 1937 G4int rb = abs(curQ.GetBaryonNumber()); // BaryNum of residual hadronic state 1909 G4double rcMass=-BIG; //@@ just BIG number // Prototype of minimal mass for residual1938 G4double rcMass=-BIG; //@@ just BIG number // Prototype of minimalMass for residual 1910 1939 if (!rPDG) 1911 1940 { … … 1924 1953 if(sPDG<MINPDG&&envPDG==NUCPDG)rFl=G4UniformRand()<bs*bs*bs/m3;//ProbFun:minM^3/m^3 1925 1954 #ifdef debug 1926 G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", hsflag="<<hsflag<<", rPDG="<<rPDG<<curQ<<",rM="1955 G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", hsflag="<<hsflag<<", rPDG="<<rPDG<<curQ<<",rM=" 1927 1956 <<rMass<<",rb="<<rb<<",F="<<rFl<<",v="<<m2<<","<<bs<<",r="<<bs*bs/m2<<G4endl; 1928 1957 #endif 1929 1958 if(!hsflag&&rFl&&rPDG&& rPDG!=10 && rb<2 && aPDG!=1114 && aPDG!=2224 && aPDG!=3334) 1930 { // ------------------------------->>>>>>>>>>>>>>> Hadron-Parton Duality decay1959 { // ------------------------------->>>>>>>>>>>>>>> Hadron-Parton Duality decay 1931 1960 G4int regPDG = 0; // PDG prototype for G-meson 1932 1961 G4int refPDG = 0; // PDG prototype for F-meson … … 1934 1963 G4int repPDG = 0; // PDG prototype for P-meson 1935 1964 if(rPDG && rPDG!=10) // Can the residual be a Hadron ? 1936 {1965 { 1937 1966 if (rPDG== 3122) rPDG= 3212; // LAMBDA* converted to SIGMA* 1938 1967 else if(rPDG==-3122) rPDG=-3212; … … 1947 1976 //if((rPDG==221||rPDG==331)&&sPDG==111) rPDG=111; // eta/eta'=>Pi0 1948 1977 #ifdef debug 1949 G4cout<<"G4Q::HQ:QuasM="<<quasM<<valQ<<")->H("<<sPDG<<")+R("<<rPDG<<")"<<",rp="1978 G4cout<<"G4Q::HQ:QuasM="<<quasM<<valQ<<")->H("<<sPDG<<")+R("<<rPDG<<")"<<",rp=" 1950 1979 <<repPDG<<",rd="<<redPDG<<",rf="<<refPDG<<",rg="<<regPDG<<G4endl; 1951 1980 #endif … … 1969 1998 if(((rM>0 && rMass<pB && rMass>sB) || (dM>0 && rMass>pB && rMass<dB) || 1970 1999 (fM>0 && rMass>dB && rMass<fB)) && theEnvironment.GetPDG()==NUCPDG) 1971 {// Final H+R decay of QUASMON in vacuum (should not exist if Environ exists)2000 {// Final H+R decay of QUASMON in vacuum (should not exist if Environ exists) 1972 2001 if (rMass>pB && rMass<dB && dM>0) // D-resonance case 1973 {2002 { 1974 2003 repPDG=redPDG; 1975 2004 rM=dM; 1976 }2005 } 1977 2006 else if(rMass>dB && rMass<fB && dM>0) // F-resonance case 1978 {2007 { 1979 2008 repPDG=refPDG; 1980 2009 rM=fM; 1981 } // If not changed - P-resonance2010 } // If not changed - P-resonance 1982 2011 #ifdef debug 1983 2012 G4cout<<"G4Q::HQ:s="<<sPDG<<",Q=>rM="<<rMass<<"(minQ="<<rPDG<<curQ<<")+sB=" … … 1985 2014 #endif 1986 2015 if(quasM<rM+sMass &&(sPDG==221||sPDG==331))// Change eta-Cand to pi-Cand 1987 {2016 { 1988 2017 sPDG=111; 1989 2018 sMass=mPi0; 1990 }2019 } 1991 2020 G4LorentzVector r4Mom(0.,0.,0.,rM); // P/D/F-resonance with a random Mass 1992 2021 G4LorentzVector s4Mom(0.,0.,0.,sMass); // Mass's random since ProbabilityTime 1993 2022 G4double sum=rM+sMass; 1994 2023 if(fabs(quasM-sum)<eps) 1995 {2024 { 1996 2025 r4Mom=q4Mom*(rM/sum); 1997 2026 s4Mom=q4Mom*(sMass/sum); … … 2001 2030 G4cerr<<"**G4Quasmon::HadronizeQuasmon:rPD="<<repPDG<<"(rM="<<rMass 2002 2031 <<")+sPD="<<sPDG<<"(sM="<<sMass<<"), Env="<<theEnvironment<<G4endl; 2003 throw G4QException("G4Quasmon::HadronizeQuasmon: H+Res Decay failed");2032 throw G4QException("G4Quasmon::HadronizeQuasmon: H+Res Decay failed"); 2004 2033 } 2005 2034 #ifdef debug 2006 G4cout<<"G4Q::HQ:=== 1 ===> HadronVec, Q="<<q4Mom<<" -> s4M="<<s4Mom<<"("2035 G4cout<<"G4Q::HQ:=== 1 ===> HadronVec, Q="<<q4Mom<<" -> s4M="<<s4Mom<<"(" 2007 2036 <<sPDG<<"), r4M="<<r4Mom<<"("<<repPDG<<")"<<G4endl; 2008 2037 #endif … … 2020 2049 qEnv=theEnvironment; // Update the QEnvironment 2021 2050 return theQHadrons; // The last decay of the quasmon... 2022 }2023 }2051 } 2052 } 2024 2053 } 2025 2054 curQ = memQ; // Recover original curQ=valQ-candQ … … 2028 2057 } 2029 2058 // ***VFQ*** 2030 //if(kn>minSqN && kt>minSqT)2059 //if(kn>minSqN && kt>minSqT) 2031 2060 // ***VQU*** 2032 2033 2061 if (kn > minSqN && ku > minSqT) 2034 2062 // ***VBQ*** 2035 //if(kn>minSqN && kt>minSqB)2063 //if(kn>minSqN && kt>minSqB) 2036 2064 // ***VTN*** 2037 //if(kt>minSqB&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN)2038 { 2039 pCond=false; // Ok, the appropriate parent cluster is found2065 //if(kt>minSqB&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN) 2066 { 2067 pCond=false; // Ok, the appropriate parent cluster is found 2040 2068 #ifdef debug 2041 2069 // ***VTN***VBQ*** 2042 //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"2070 //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">" 2043 2071 // <<minSqB<<" || kn="<<kn<<">"<<minSqN<<G4endl; 2044 2072 // ***VQU*** 2045 G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",ku="<<ku<<">"2073 G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",ku="<<ku<<">" 2046 2074 <<minSqT<<" || kn="<<kn<<">"<<minSqN<<G4endl; 2047 2075 // ***VFQ*** 2048 //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"2076 //G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">" 2049 2077 // <<minSqT<<" || kn="<<kn<<">"<<minSqN<<G4endl; 2050 2078 #endif 2051 } else { 2079 } 2080 else 2081 { 2052 2082 #ifdef debug 2053 2083 // ***VBQ***VTN*** … … 2062 2092 #endif 2063 2093 // ***VTN*** (former default) 2064 //if(kt>=minSqB || sPDG>MINPDG&&kn>minSqN)2094 //if(kt>=minSqB || sPDG>MINPDG&&kn>minSqN) 2065 2095 // ***VBQ*** 2066 //if(kn<minSqN && kt>=minSqB)2096 //if(kn<minSqN && kt>=minSqB) 2067 2097 // ***VFQ*** 2068 //if(kn<minSqN && kt>=minSqT)2098 //if(kn<minSqN && kt>=minSqT) 2069 2099 // ***VQU*** 2070 2071 if (kn < minSqN && ku < minSqT) { 2072 2100 if (kn < minSqN && ku < minSqT) 2101 { 2073 2102 // ***VTN*** (former default) 2074 //if(kt<minSqB&&sPDG<MINPDG && kt>PMEMktM2 || kn<minSqN&&sPDG>MINPDG&& kn>PMEMknM2) 2103 //if(kt<minSqB&&sPDG<MINPDG && kt>PMEMktM2 || 2104 // kn<minSqN&&sPDG>MINPDG && kn>PMEMknM2) 2075 2105 // ***VBQ*** 2076 2106 //if(kt<minSqB && kt>PMEMktM2) … … 2078 2108 //if(kt<minSqT && kt>PMEMktM2) 2079 2109 // ***VQU*** 2080 2081 if(ku<minSqT && ku>PMEMktM2){2110 if(ku < minSqT && ku > PMEMktM2) 2111 { 2082 2112 // ***VQU*** 2083 2113 PMEMktM2=ku; … … 2106 2136 PMEMnucf=nucflag; 2107 2137 #ifdef pdebug 2108 G4cout<<"G4Q::HQ:RememberBest rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl; 2109 #endif 2110 } else if(!pCount) { // @@ Should not be here 2111 2138 G4cout<<"G4Q::HQ:RemTheBest rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl; 2139 #endif 2140 } 2141 else if(!pCount) 2142 { // @@ Should not be here 2112 2143 // ***VQU*** 2113 2144 PMEMktM2=ku; … … 2136 2167 PMEMnucf=nucflag; 2137 2168 #ifdef pdebug 2138 G4cout<<"G4Q::HQ:RememberFirst rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl; 2139 #endif 2140 } else { 2169 G4cout<<"G4Q::HQ:RemTheFirst rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl; 2170 #endif 2171 } 2172 else 2173 { 2141 2174 fr4Mom=PMEMfr4M; // OK -> Recover the best found values 2142 2175 rQ4Mom=PMEMrQ4M; // OK … … 2164 2197 hsflag=PMEMhsfl; // OK 2165 2198 nucflag=PMEMnucf;// OK 2166 }2167 }2199 } 2200 } 2168 2201 } 2169 2202 pCount++; 2170 } // End of the WHILE of the parent choice2203 } // End of the WHILE of the parent choice 2171 2204 #ifdef pdebug 2172 2205 G4cout<<"G4Q::HQ:>rPDG="<<rPDG<<curQ<<",sPDG="<<sPDG<<",kt="<<kt<<",F="<<fprob … … 2193 2226 2194 2227 if ( ( ( (sPDG < MINPDG && envPDG > MINPDG && envPDG != NUCPDG) || 2195 (sPDG > MINPDG && sPDG!=NUCPDG && envPDG > pPDG) ) && iniBN > 0) || 2196 iniBN > 1 || 2197 rPDG == 10 ) aMass=0.; // No Pi0 cond.(eg in NucE) 2228 (sPDG > MINPDG && sPDG!=NUCPDG && envPDG > pPDG) 2229 ) && iniBN > 0 2230 ) || iniBN > 1 || rPDG == 10 2231 ) aMass=0.; // No Pi0 cond.(eg in NucE) 2198 2232 2199 2233 #ifdef pdebug … … 2205 2239 if ( hsflag || 2206 2240 (sPDG < MINPDG && rMass < reMass+aMass) || 2207 (sPDG > MINPDG && envPDG > pPDG && reTNM2 < tmpTM2) || 2208 fdul ) { 2209 // >>>>>> Decay Q->S+H or Q/C->H1+H2 or suck in or evaporate or slow down or decay etc. 2241 (sPDG > MINPDG && envPDG > pPDG && reTNM2 < tmpTM2) || 2242 fdul ) 2243 { 2244 // >>>> Decay Q->S+H or Q/C->H1+H2 or suck in or evaporate or slow down or decay etc. 2210 2245 // ========> Decide what to do, if fragmentation in this Candidate is impossible === 2211 2246 #ifdef debug … … 2216 2251 if(hsflag) rMass=rQPDG.GetMass(); // Get Nuclear Cluster mass 2217 2252 if(sPDG>MINPDG&&sPDG!=NUCPDG) // "Quark exchange hadronization" case 2218 {2253 { 2219 2254 G4QContent tmpEQ=envQC-pQC; // Quark content for Residual Environment 2220 2255 G4QNucleus tmpN(tmpEQ); // Pseudo nucleus for Residual Environment … … 2225 2260 G4LorentzVector ResEnv4Mom(0.,0.,0.,tmpNM);// 4-Mom for the Residual Environment 2226 2261 if(rQ4Mom==zeroLV) 2227 {2262 { 2228 2263 #ifdef ppdebug 2229 2264 G4cout<<"G4Q::HQ:NEEDS-EVAP-5,Q="<<q4Mom<<valQ<<",QEnv="<<theEnvironment<<G4endl; … … 2232 2267 qEnv=theEnvironment; 2233 2268 return theQHadrons; 2234 }2269 } 2235 2270 G4LorentzVector retN4Mom=rQ4Mom+ResEnv4Mom;// 4-Mom for the Total Residual Nucleus 2236 2271 G4double retNM2=retN4Mom.m2(); // SqMass of the Total Residual Nucleus @@ double … … 2265 2300 // <<"+rCB="<<rCB<<"+sCB="<<sCB<<"="<<tmpNM+rMass+sMass+rCB+sCB<<G4endl; 2266 2301 #endif 2267 //if(nQuasms==1&&tmpNM+rMass+rCB+sMass+sCB<totMass)// Decay in resEnv+resQ+Fragment2268 if(2>3) //*** Attempt GoOutDropExcNucl is closed ***2269 {2302 //if(nQuasms==1&&tmpNM+rMass+rCB+sMass+sCB<totMass)// Decay in resEnv+resQ+Fragment 2303 if(2>3) //*** Attempt GoOutDropExcNucl is closed *** 2304 { 2270 2305 G4LorentzVector fr4M = G4LorentzVector(0.,0.,0.,sMass);//GSM of Fragment 2271 2306 G4LorentzVector re4M = G4LorentzVector(0.,0.,0.,tmpNM);//GSM of ResidualEnviron … … 2278 2313 G4double sum=tmpNM+sMass+rMass; 2279 2314 if(fabs(totMass-sum)<eps) 2280 {2315 { 2281 2316 re4M=tot4M*(tmpNM/sum); 2282 2317 rq4M=tot4M*(rMass/sum); … … 2296 2331 FillHadronVector(envH); // Fill MovingEnvironment (del.equiv) 2297 2332 qEnv = vacuum; // Distruct Environment 2298 }2333 } 2299 2334 else 2300 2335 { … … 2308 2343 ClearQuasmon(); // This Quasmon is done 2309 2344 return theQHadrons; // The last decay of the quasmon... 2310 }2345 } 2311 2346 //else if(nQuasms==1&&tmpTM+sMass<totMass) //Lose p,go out,leave GSResNuc 2312 //else if(nQuasms==1&&tmpTM+sMass+sCB<totMass) //Lose p,goOut,leaveGSResNuc2347 //else if(nQuasms==1&&tmpTM+sMass+sCB<totMass) //Lose p,goOut,leaveGSResNuc 2313 2348 else if(2>3) // ********** Decay in Fragm + GSResidNucleus is Closed ************ 2314 {2349 { 2315 2350 G4LorentzVector dif1=tot4M-retN4Mom-fr4Mom; 2316 2351 qEnv = G4QNucleus(tmpTQ,retN4Mom); // Createa Nucleus for TotalResidNucl … … 2334 2369 ClearQuasmon(); // This Quasmon is done 2335 2370 return theQHadrons; // The last decay of the quasmon... 2336 }2371 } 2337 2372 else if(totBN>1&&totMass>totM&&totS>=0&&envPDG>MINPDG&&envPDG!=NUCPDG)//Evaporate 2338 //else if(2>3) // ********** Forced Evaporation is Closed ************2339 {2373 //else if(2>3) // ********** Forced Evaporation is Closed ************ 2374 { 2340 2375 #ifdef ppdebug 2341 2376 //@@ May be recalculate hadronization ?? … … 2353 2388 qEnv=theEnvironment; 2354 2389 return theQHadrons; 2355 }2390 } 2356 2391 else if(totBN==1&&nQuasms==1) // Decay of the baryonic Total Nucleus state 2357 {2392 { 2358 2393 #ifdef debug 2359 2394 G4cout<<"G4Q::HQ:tB=1,nQ=1,Z="<<totZ<<",S="<<totS<<totQC<<",M="<<totMass<<G4endl; … … 2366 2401 { 2367 2402 if(totS==1) // Decay of the strange hyperstate 2368 {2403 { 2369 2404 if(!totZ&&totMass>mLamb+mPi0) 2370 {2405 { 2371 2406 nucM = mLamb; 2372 2407 nucPDG= 3122; 2373 2408 piM = mPi0; 2374 2409 piPDG = 111; 2375 }2410 } 2376 2411 else if(abs(totZ)==1&&totMass>mLamb+mPi) 2377 {2412 { 2378 2413 nucM = mLamb; 2379 2414 nucPDG= 3122; … … 2381 2416 if(totZ>0) piPDG = 211; 2382 2417 else piPDG =-211; 2383 }2418 } 2384 2419 else 2385 {2420 { 2386 2421 G4cerr<<"***G4Q::HQ:Z="<<totZ<<",S="<<totS<<totQC<<",tM="<<totMass<<G4endl; 2387 throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Lambda decay error");2422 throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Lambda decay error"); 2388 2423 } 2389 }2390 else // Decay of the anti-strange hyperstate2391 {2424 } 2425 else // Decay of the anti-strange hyperstate 2426 { 2392 2427 if(!totZ&&totMass>mNeut+mK0) 2393 {2428 { 2394 2429 nucM = mNeut; 2395 2430 nucPDG= 2112; 2396 2431 piM = mK0; 2397 2432 piPDG = 311; 2398 }2433 } 2399 2434 else if(totZ==2&&totMass>mProt+mK) 2400 {2435 { 2401 2436 piM = mK; 2402 2437 piPDG = 321; 2403 }2438 } 2404 2439 else if(totZ==1&&totMass>mProt+mK0&&G4UniformRand()>0.5) 2405 {2440 { 2406 2441 piM = mK0; 2407 2442 piPDG = 311; 2408 }2443 } 2409 2444 else if(totZ==1&&totMass>=mNeut+mK) 2410 {2445 { 2411 2446 nucM = mNeut; 2412 2447 nucPDG= 2112; 2413 2448 piM = mK; 2414 2449 piPDG = 321; 2415 }2450 } 2416 2451 else 2417 {2452 { 2418 2453 G4cerr<<"***G4Q::HQ:Z="<<totZ<<",S="<<totS<<totQC<<",tM="<<totMass<<G4endl; 2419 throw G4QException("G4Quasmon::HadronizeQuasm: K + Nucleon decay error");2454 throw G4QException("G4Quasmon::HadronizeQuasm: K + Nucleon decay error"); 2420 2455 } 2421 }2422 }2456 } 2457 } 2423 2458 else if(totMass>PiNM&&!totS) // Decay in nucleon & pion 2424 2459 { 2425 2460 if(!totZ&&totMass>mProt+mPi&&G4UniformRand()<0.5) 2426 {2461 { 2427 2462 piM = mPi; 2428 2463 piPDG = -211; 2429 2464 } 2430 2465 else if(!totZ&&totMass>mNeut+mPi0) 2431 {2466 { 2432 2467 nucM = mNeut; 2433 2468 nucPDG= 2112; … … 2436 2471 } 2437 2472 else if(totZ==1&&totMass>mNeut+mPi&&G4UniformRand()<0.5) 2438 {2473 { 2439 2474 nucM = mNeut; 2440 2475 nucPDG= 2112; … … 2443 2478 } 2444 2479 else if(totZ==1&&totMass>mProt+mPi0) 2445 {2480 { 2446 2481 piM = mPi0; 2447 2482 piPDG = 111; 2448 2483 } 2449 2484 else if(totZ==-1) 2450 {2485 { 2451 2486 nucM = mNeut; 2452 2487 nucPDG= 2112; … … 2455 2490 } 2456 2491 else if(totZ==2) 2457 {2492 { 2458 2493 piM = mPi; 2459 2494 piPDG = 211; 2460 2495 } 2461 2496 else 2462 {2497 { 2463 2498 G4cerr<<"*G4Q::HQ:Z="<<totZ<<",B="<<totBN<<",E="<<envQC<<",Q="<<valQ<<G4endl; 2464 throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Nucleon decay error");2465 } 2466 }2499 throw G4QException("G4Quasmon::HadronizeQuasm: Pi + Nucleon decay error"); 2500 } 2501 } 2467 2502 else if(!totS) 2468 {2503 { 2469 2504 if(!totZ) 2470 {2505 { 2471 2506 nucM=mNeut; 2472 2507 nucPDG=2112; 2473 2508 } 2474 2509 else if(totZ<0||totZ>1) 2475 {2510 { 2476 2511 G4cerr<<"*G4Q::HQ:Z="<<totZ<<",B="<<totBN<<",E="<<envQC<<",Q="<<valQ<<G4endl; 2477 throw G4QException("G4Quasmon::HadronizeQuasm:Photon+Nucleon decay error");2512 throw G4QException("G4Quasmon::HadronizeQuasm:Photon+Nucleon decay error"); 2478 2513 } 2479 2514 } … … 2482 2517 G4double sum=piM+nucM; 2483 2518 if(fabs(totMass-sum)<eps) 2484 {2519 { 2485 2520 pi4M=tot4M*(piM/sum); 2486 2521 nuc4M=tot4M*(nucM/sum); … … 2490 2525 G4cerr<<"***G4Q::HQ:T="<<tot4M<<totMass<<"->gam/pi/K("<<piM<<")+N="<<nucPDG 2491 2526 <<"("<<nucM<<")="<<sum<<G4endl; 2492 throw G4QException("G4Quasmon::HadronizeQuasm:Gam/Pi/K+N decay error");2493 } 2494 #ifdef debug 2495 G4cout<<"G4Q::HQ:T="<<tot4M<<totMass<<"->GPK="<<piPDG<<pi4M<<"+B="<<nucPDG<<nuc4M2527 throw G4QException("G4Quasmon::HadronizeQuasm:Gam/Pi/K+N decay error"); 2528 } 2529 #ifdef debug 2530 G4cout<<"G4Q::HQ:T="<<tot4M<<totMass<<"->GPK="<<piPDG<<pi4M<<"+B="<<nucPDG<<nuc4M 2496 2531 <<G4endl; 2497 2532 #endif … … 2508 2543 <<", envPDG="<<envPDG<<G4endl; 2509 2544 #endif 2510 }2545 } 2511 2546 G4double dm=quasM-sMass; 2512 2547 #ifdef debug … … 2515 2550 #endif 2516 2551 if(abs(dm)<.000001) 2517 {2552 { 2518 2553 if(sPDG==iniPDG) 2519 {2554 { 2520 2555 G4QHadron* quasH = new G4QHadron(iniPDG,q4Mom);//Create Hadron for Quasmon-Hadron 2521 2556 FillHadronVector(quasH); // Fill "new quasH" (del. equivalent) … … 2523 2558 qEnv=theEnvironment; // Keep initial environment 2524 2559 return theQHadrons; // The last decay of the total nucleus 2525 }2560 } 2526 2561 else G4cerr<<"---Warning---G4Q::HQ:Q=H,q="<<iniPDG<<",s="<<sPDG<<",d="<<dm<<G4endl; 2527 }2562 } 2528 2563 G4double rWi=0.; 2529 2564 if(rPDG!=10) rWi=G4QPDGCode(rPDG).GetWidth(); 2530 2565 if(rPDG!=10&&rMass>dm&&!rWi) // Try to use the h-resonance width or reduce its spin 2531 {2566 { 2532 2567 G4double sWi=G4QPDGCode(sPDG).GetWidth(); 2533 2568 G4double sMM=G4QPDGCode(sPDG).GetMass(); 2534 2569 if(sWi) // Hadron is a resonance 2535 {2570 { 2536 2571 G4double mmm=theWorld->GetQParticle(G4QPDGCode(sPDG))->MinMassOfFragm(); 2537 2572 G4double ddm=quasM-rMass; // Minimum mass of the sHadron … … 2554 2589 <<sWi<<G4endl; 2555 2590 #endif 2556 }2591 } 2557 2592 //else if(G4int ds1=abs(sPDG)%10>2) // @@ Make it C-style ?: operator ? 2558 //{2593 //{ 2559 2594 // G4int oPDG=sPDG; 2560 2595 // if (sPDG>0&&sPDG%2==0) sPDG-=ds1-2; … … 2564 2599 // sMass=G4QPDGCode(sPDG).GetMass(); 2565 2600 // G4cout<<"**G4Q::HQ:sPDG="<<oPDG<<" changed to "<<sPDG<<",sM="<<sMass<<G4endl; 2566 //}2567 }2601 //} 2602 } 2568 2603 } 2569 2604 // First decay suppression for the final decay in 2 particles … … 2579 2614 //if(dm>958. && rnd>.5) rPDG=331; 2580 2615 if(dm>958.) rPDG=331; 2581 else rPDG=221;2616 else rPDG=221; 2582 2617 } 2583 2618 if(rPDG==221 && dm>958. && rnd>.5 ) rPDG=331; … … 2593 2628 rMass > 782. && dm > 782. && rnd < .5) rPDG = 223; //0->omega 2594 2629 2595 if ( rPDG == 331 && rMass > 1020. && dm > 1020. && rnd < .5) rPDG=333; // eta' -> phi02630 if ( rPDG == 331 && rMass > 1020. && dm > 1020. && rnd < .5) rPDG=333;// eta' -> phi0 2596 2631 2597 2632 if(rPDG== 211 && dm>544. && rnd>.5) rPDG= 213; // M-1.5*W conv. of pi+ to rho+ … … 2607 2642 #endif 2608 2643 if(reMass==0.) 2609 {2644 { 2610 2645 if(sPDG==221 || sPDG==331) // Change eta-Candidate to pi/gamma 2611 {2646 { 2612 2647 if (sPDG==221) dm+=mEta-mPi0; 2613 2648 else if(sPDG==331) dm+=mEtaP-mPi0; 2614 2649 if(dm<0) 2615 {2650 { 2616 2651 dm+=mPi0; 2617 2652 sPDG=22; 2618 2653 sMass=0.; 2619 }2654 } 2620 2655 else 2621 2656 { 2622 2657 sPDG=111; 2623 2658 sMass=mPi0; 2624 }2659 } 2625 2660 if(dm<mPi0-.00001&&rPDG==111) 2626 {2661 { 2627 2662 rPDG=22; 2628 2663 reMass=0.; 2629 }2664 } 2630 2665 else reMass=GetRandomMass(rPDG,dm);//Rerandomize mass of ResidQuasmon-Resonance 2631 2666 if(reMass==0.)G4cerr<<"-W-G4Q::HQ:2,M="<<quasM<<",r="<<rPDG<<",d="<<dm<<G4endl; 2632 }2667 } 2633 2668 else if(rPDG==111) // Make a photon out of the Resid Quasmon 2634 {2669 { 2635 2670 rPDG=22; 2636 2671 reMass=0.; 2637 }2672 } 2638 2673 else 2639 {2674 { 2640 2675 if(CheckGroundState()) ClearQuasmon();// This Quasmon is done 2641 2676 //if(CheckGroundState(true)) KillQuasmon();// This Quasmon is done … … 2646 2681 qEnv=theEnvironment; 2647 2682 return theQHadrons; 2648 }2649 } 2650 }2683 } 2684 } 2685 } 2651 2686 else if(rPDG==NUCPDG) 2652 {2687 { 2653 2688 if(dm>mPi0) 2654 2689 { 2655 rPDG=111;2690 rPDG=111; 2656 2691 reMass=mPi0; 2657 2692 } 2658 2693 else 2659 2694 { 2660 rPDG=22;2695 rPDG=22; 2661 2696 reMass=0.; 2662 2697 } 2663 }2698 } 2664 2699 G4double freeRQM=rQPDG.GetMass(); 2665 2700 G4int RQB = rQPDG.GetBaryNum(); … … 2671 2706 G4double sCB=theEnvironment.CoulombBarrier(sChg,sBaryn); 2672 2707 #ifdef debug 2673 G4cout<<"G4Q::HQ:h="<<sCB<<",C="<<sChg<<",B="<<sBaryn<<",E="<<theEnvironment<<G4endl;2708 G4cout<<"G4Q::HQ:h="<<sCB<<",C="<<sChg<<",B="<<sBaryn<<",E="<<theEnvironment<<G4endl; 2674 2709 #endif 2675 2710 G4int rChg=rQPDG.GetCharge(); … … 2681 2716 #endif 2682 2717 if ( totBN > 1 && totS >= 0 && envPDG > MINPDG && envPDG != NUCPDG && 2683 (reMass+sMass > quasM || sCB+rCB+reMass+sMass+envM > totMass || (!RQB && quasM < diPiM) ) ) 2684 //if(2>3) // This Evaporation channel is closed 2718 (reMass+sMass > quasM || sCB+rCB+reMass+sMass+envM > totMass || 2719 (!RQB && quasM < diPiM) 2720 ) 2721 ) 2722 //if(2>3) // This Evaporation channel is closed 2685 2723 { 2686 2724 #ifdef ppdebug … … 2692 2730 qEnv=theEnvironment; 2693 2731 return theQHadrons; 2694 }2732 } 2695 2733 if(rPDG==NUCPDG) 2696 2734 { … … 2699 2737 } 2700 2738 if(rPDG==2212&&sPDG==311&&reMass+sMass>quasM) 2701 {2739 { 2702 2740 if(mNeut+mK<=quasM+.001) 2703 {2741 { 2704 2742 reMass=mNeut; 2705 2743 rPDG =2112; … … 2709 2747 rCB=theEnvironment.CoulombBarrier(rChg,rBaryn); 2710 2748 #ifdef debug 2711 G4cout<<"G4Q::HQ:NCB="<<rCB<<",NC="<<rChg<<",sB="<<sBaryn<<",r="<<rQPDG<<G4endl;2749 G4cout<<"G4Q::HQ:NCB="<<rCB<<",NC="<<rChg<<",sB="<<sBaryn<<",r="<<rQPDG<<G4endl; 2712 2750 #endif 2713 2751 freeRQM=mNeut; … … 2722 2760 sCB=theEnvironment.CoulombBarrier(sChg,sBaryn); 2723 2761 #ifdef debug 2724 G4cout<<"G4Q::HQ:KCB="<<sCB<<",KC="<<sChg<<",frB="<<sBaryn<<",E="<<theEnvironment2762 G4cout<<"G4Q::HQ:KCB="<<sCB<<",KC="<<sChg<<",frB="<<sBaryn<<",E="<<theEnvironment 2725 2763 <<G4endl; 2726 2764 #endif … … 2751 2789 q4Mom+=G4LorentzVector(0.,0.,0.,pMass); 2752 2790 } 2753 G4double tmM=q4Mom.m()+.001;;2791 G4double tmM=q4Mom.m()+.001;; 2754 2792 G4double sum=reMass+sMass; 2755 2793 if(fabs(tmM-sum)<eps) … … 2773 2811 G4double nreM=nNuc.GetGSMass(); // Mass of the new isotope 2774 2812 if(tmM>mK+nreM) 2775 {2813 { 2776 2814 sMass=mK; 2777 2815 sPDG=321; … … 2795 2833 } 2796 2834 else 2797 {2835 { 2798 2836 G4cerr<<"***G4Q::HQ:(O) KCor M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass 2799 2837 <<")+sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl; … … 2807 2845 G4double nreM=nNuc.GetGSMass(); // Mass of the new isotope 2808 2846 if(tmM>mK0+nreM) 2809 {2847 { 2810 2848 sMass=mK0; 2811 2849 sPDG=311; … … 2829 2867 } 2830 2868 else 2831 {2869 { 2832 2870 G4cerr<<"***G4Q::HQ:(O) K0Cor M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass 2833 2871 <<")+sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl; … … 2841 2879 G4double nreM=nNuc.GetGSMass(); // Mass of the new isotope 2842 2880 if(tmM>mPi0+nreM) 2843 {2881 { 2844 2882 sMass=mPi0; 2845 2883 sPDG=111; … … 2863 2901 } 2864 2902 else if(tmM>nreM) 2865 {2903 { 2866 2904 sMass=0.; 2867 2905 sPDG=22; … … 2885 2923 } 2886 2924 else 2887 {2925 { 2888 2926 G4cerr<<"***G4Q::HQ:(O) Pi+/Pi0Cor M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass 2889 2927 <<")+sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl; … … 2897 2935 G4double nreM=nNuc.GetGSMass(); // Mass of the new isotope 2898 2936 if(tmM>mPi0+nreM) 2899 {2937 { 2900 2938 sMass=mPi0; 2901 2939 sPDG=111; … … 2919 2957 } 2920 2958 else if(tmM>nreM) 2921 {2959 { 2922 2960 sMass=0.; 2923 2961 sPDG=22; … … 2942 2980 } 2943 2981 else if((sPDG==221 || sPDG==331) && tmM>mPi0+reMass) 2944 {2982 { 2945 2983 sMass=mPi0; 2946 2984 sPDG=111; … … 2960 2998 } 2961 2999 else if((sPDG==111 || sPDG==221 || sPDG==331) && tmM>reMass) 2962 {3000 { 2963 3001 sMass=0.; 2964 3002 sPDG=22; … … 3055 3093 } 3056 3094 else 3057 {3095 { 3058 3096 G4cerr<<"***G4Q::HQ: LamToN M="<<tmM<<totQC<<"=>rM="<<nucM.GetPDG()<<"," 3059 3097 <<nucZ.GetPDG()<<"("<<nreM<<","<<nreZ<<")+PiM/PiZ="<<mPi+nreM<<"," … … 3063 3101 } 3064 3102 else if(tmM>iniQM) 3065 {3103 { 3066 3104 G4QContent tmpSQC=G4QPDGCode(sPDG).GetQuarkContent();//QuarkContent of the hadron 3067 3105 sMass=0.; … … 3086 3124 } 3087 3125 else if(totMass>resTNM+sMass) // Just decay in sPDG and total residual nucleus 3088 {3126 { 3089 3127 G4LorentzVector re4M = G4LorentzVector(0.,0.,0.,resTNM); //GSM of ResidTotEnvir 3090 3128 G4LorentzVector rs4M = G4LorentzVector(0.,0.,0.,sMass); //GSM of a Hadron … … 3095 3133 G4double sum=resTNM+sMass; 3096 3134 if(fabs(totMass-sum)<eps) 3097 {3135 { 3098 3136 re4M=tot4M*(resTNM/sum); 3099 3137 rs4M=tot4M*(sMass/sum); … … 3114 3152 resTN.Set4Momentum(re4M); 3115 3153 qEnv=resTN; // Create Nucleus for MovingResEnv 3116 }3154 } 3117 3155 else 3118 3156 { … … 3120 3158 FillHadronVector(envH); // Fill MovingEnvironment (del.equiv) 3121 3159 qEnv = vacuum; 3122 }3160 } 3123 3161 ClearQuasmon(); // This Quasmon is done 3124 3162 return theQHadrons; // The last decay of the quasmon... 3125 }3163 } 3126 3164 } 3127 3165 else if(totMass>totM) // Just decay in minimal total nucleus and gamma 3128 {3166 { 3129 3167 G4LorentzVector re4M = G4LorentzVector(0.,0.,0.,totM); // GSM of ResidTotEnvir 3130 3168 G4LorentzVector rs4M = G4LorentzVector(0.,0.,0.,0.); // GSM of a Photon … … 3146 3184 totN.Set4Momentum(re4M); 3147 3185 qEnv=totN;// Create Nucleus for MovingResEnv 3148 }3186 } 3149 3187 else 3150 3188 { … … 3152 3190 FillHadronVector(envH); // Fill MovingEnvironment (del.equiv) 3153 3191 qEnv = vacuum; 3154 }3192 } 3155 3193 ClearQuasmon(); // This Quasmon is done 3156 3194 return theQHadrons; // The last decay of the quasmon... 3157 }3195 } 3158 3196 } 3159 3197 else … … 3161 3199 G4cerr<<"***G4Q::HQ:M="<<tmM<<"=>rPDG="<<rPDG<<"(rM="<<reMass<<")+sPDG=" 3162 3200 <<sPDG<<"(sM="<<sMass<<")="<<sum<<",QM="<<iniQM<<G4endl; 3163 if(fabs(tmM-sum)<1.) // Just to avoid exception (Must be treated !)3164 //if(2>3) // ------> Catch the under mass shell event3201 if(fabs(tmM-sum)<1.) // Just to avoid exception (Must be treated !) 3202 //if(2>3) // ------> Catch the under mass shell event 3165 3203 { 3166 3204 r4Mom=q4Mom*(reMass/sum); 3167 3205 s4Mom=q4Mom*(sMass/sum); 3168 3206 } 3169 else throw G4QException("***G4Quasmon::HadronizeQuasmon:QHadr+SHadr DecayIn2");3207 else throw G4QException("***G4Quasmon::HadronizeQuasmon:QHadr+SHadr DecayIn2"); 3170 3208 } 3171 3209 } 3172 3210 G4double sKE=s4Mom.e()-sMass; 3173 3211 #ifdef rdebug 3174 G4cout<<"G4Q::HQ:=2.3=>QHVect s4M="<<s4Mom<<",sPDG="<<sPDG<<", r4M/M="<<r4Mom<<reMass3212 G4cout<<"G4Q::HQ:=2.3=>QHVect s4M="<<s4Mom<<",sPDG="<<sPDG<<", r4M/M="<<r4Mom<<reMass 3175 3213 <<",fR="<<freeRQM<<",fW="<<fRQW<<",PDG="<<rPDG<<",r="<<rCB<<",s="<<sCB<<G4endl; 3176 3214 #endif … … 3178 3216 //if(sKE<sCB||rKE<rCB) // => "KinEn is below CB, try once more" case 3179 3217 if(sKE<sCB) // => "KinEn is below CB, try once more" case 3180 {3218 { 3181 3219 #ifdef ppdebug 3182 3220 G4cout<<"****G4Q::HQ:E-9: sKE="<<sKE<<"<sCB="<<sCB<<G4endl; … … 3186 3224 qEnv=theEnvironment; 3187 3225 return theQHadrons; 3188 }3226 } 3189 3227 else if(abs(reMass-freeRQM)<fRQW||envPDG==NUCPDG)//=>"ResidQ is a GSHadron/Frag" case 3190 3228 { … … 3194 3232 FillHadronVector(curHadr2); // Fill "new curHadr2" (del. eq.) 3195 3233 #ifdef rdebug 3196 G4cout<<"G4Q::HQ:DecayQuasmon "<<q4Mom<<" in 4M="<<r4Mom+s4Mom<<" RQ="<<rPDG<<r4Mom3234 G4cout<<"G4Q::HQ:DecayQuasmon "<<q4Mom<<" in 4M="<<r4Mom+s4Mom<<" RQ="<<rPDG<<r4Mom 3197 3235 <<" + Fragment="<<sPDG<<s4Mom<<", Env="<<theEnvironment<<G4endl; 3198 3236 #endif … … 3201 3239 qEnv=theEnvironment; // Update the QEnvironment 3202 3240 return theQHadrons; // This is theLastDecay of the quasmon 3203 }3241 } 3204 3242 else // => "Virtual Residual Quasmon" case 3205 {3243 { 3206 3244 G4LorentzVector resTotN4Mom=r4Mom+G4LorentzVector(0.,0.,0.,envM); 3207 3245 G4QContent resTotNQC=envQC+curQ; // QCof possible residual nucleus … … 3210 3248 G4double resTotNM=resTotN.GetMZNS(); // Mass of the Total Residual Nucleus 3211 3249 if(resTotN4Mom.m()<resTotNM) // Needs total evaporation 3212 {3250 { 3213 3251 //if(totBN>1&&totMass>totM&&totS>=0) //@@ ?? 3214 3252 #ifdef ppdebug … … 3221 3259 } 3222 3260 else // Only theTotResidNucl can evaporate 3223 {3261 { 3224 3262 G4QHadron* curHadr2 = new G4QHadron(sPDG,s4Mom);// Create Hadron for theOutHadron 3225 3263 FillHadronVector(curHadr2); // Fill "new curHadr2" (del.equiv.) … … 3249 3287 } 3250 3288 } 3251 }3289 } 3252 3290 #ifdef rdebug 3253 else G4cout<<"G4Q::HQ:NO-OK,h="<<hsflag<<",d="<<fdul<<",M="<<rMass<<"<"<<reMass<<",M2="3291 else G4cout<<"G4Q::HQ:NO-OK,h="<<hsflag<<",d="<<fdul<<",M="<<rMass<<"<"<<reMass<<",M2=" 3254 3292 <<reTNM2<<"<I="<<tmpTM2<<",sP="<<sPDG<<",eP="<<envPDG<<",pP="<<pPDG<<G4endl; 3255 3293 #endif 3256 if(!fskip) // Continue search for fragmentation3257 {3294 if(!fskip) // Continue search for fragmentation 3295 { 3258 3296 // ==== From this point for nuclear fragments the procedure is just filling ===== 3259 3297 #ifdef debug 3260 G4int ePDG=theEnvironment.GetPDG();3298 G4int ePDG=theEnvironment.GetPDG(); 3261 3299 G4double frKin=fr4Mom.e()-sMass; 3262 G4cout<<"G4Q::HQ:>>"<<sPDG<<fr4Mom<<fr4Mom.m()<<"="<<sMass<<",T="<<frKin<<",E="<<ePDG3300 G4cout<<"G4Q::HQ:>>"<<sPDG<<fr4Mom<<fr4Mom.m()<<"="<<sMass<<",T="<<frKin<<",E="<<ePDG 3263 3301 <<G4endl; 3264 3302 #endif 3265 3303 //if(sPDG<MINPDG&&(ePDG==NUCPDG||nQuasms==1)) //==>>"Hadron candidate in Vacuum" case 3266 3304 //if(sPDG<MINPDG&&nQuasms==1) // ==>> "Hadron candidate with the only Quasmon" case 3267 if(sPDG<MINPDG) // Hadronic decay is always in vacuum @@??3305 if(sPDG<MINPDG) // Hadronic decay is always in vacuum @@?? 3268 3306 { 3269 3307 G4int SQ=totQC.GetStrangeness(); 3270 3308 #ifdef debug 3271 G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", sM="<<sMass<<", SQ="<<SQ<<G4endl;3309 G4cout<<"G4Q::HQ: sPDG="<<sPDG<<", sM="<<sMass<<", SQ="<<SQ<<G4endl; 3272 3310 #endif 3273 3311 if(!sPDG&&SQ<0&&nQuasms==1) // decay Of Tot(Q+Env) in K+/aK0 & residual 3274 //if(!sPDG&&SQ<0) // decay in K+/aK0 & residual3275 {3312 //if(!sPDG&&SQ<0) // decay in K+/aK0 & residual 3313 { 3276 3314 sPDG=321; 3277 3315 sMass=mK; … … 3289 3327 { 3290 3328 #ifdef ppdebug 3291 G4cout<<"G4Q::HQ:***PANIC#2***tM="<<totMass<<"<KM="<<mK<<","<<mK0<<",rM="<<rKPM3329 G4cout<<"G4Q::HQ:***PANIC#2***tM="<<totMass<<"<KM="<<mK<<","<<mK0<<",rM="<<rKPM 3292 3330 <<","<<rK0M<<",d="<<mK+rKPM-totMass<<","<<mK0+rK0M-totMass<<G4endl; 3293 3331 throw G4QException("G4Quasmon::HadronizeQuasmon: Why PANIC? (2)"); //@@ TMP … … 3296 3334 qEnv=theEnvironment; // Update the QEnvironment 3297 3335 return theQHadrons; 3298 }3336 } 3299 3337 if(rKPM + mK > rK0M + mK0) 3300 {3338 { 3301 3339 rPDG = rK0PDG; // PDG of the Residual System to K0 3302 3340 rMass = rK0M; 3303 3341 sPDG = 311; 3304 3342 sMass = mK0; 3305 }3343 } 3306 3344 else 3307 {3345 { 3308 3346 rPDG = rKPPDG; // PDG of the Residual System to K+ 3309 3347 rMass = rKPM; 3310 3348 sPDG = 321; 3311 3349 sMass = mK; 3312 }3350 } 3313 3351 G4double ctM=tot4M.m(); 3314 3352 G4LorentzVector r4Mom(0.,0.,0.,rMass); … … 3316 3354 G4double sum=rMass+sMass; 3317 3355 if(fabs(ctM-sum)<eps) 3318 {3356 { 3319 3357 r4Mom=tot4M*(rMass/sum); 3320 3358 s4Mom=tot4M*(sMass/sum); … … 3324 3362 G4cerr<<"***G4Q::HQ:tM="<<ctM<<totQC<<" => rPDG="<<rPDG<<"(rM="<<rMass 3325 3363 <<") + sPDG="<<sPDG<<"(sM="<<sMass<<")="<<sum<<G4endl; 3326 throw G4QException("***G4Quasmon::HadrQuasm:K+ResNuc DecayIn2 didn't succeed");3327 } 3328 #ifdef debug 3329 G4cout<<"G4Q::HQ:===2.4===>HadrVec s="<<sPDG<<s4Mom<<",r="<<rPDG<<r4Mom<<G4endl;3364 throw G4QException("***G4Quasmon::HadrQuasm:K+ResNuc DecayIn2 didn't succeed"); 3365 } 3366 #ifdef debug 3367 G4cout<<"G4Q::HQ:===2.4===>HadrVec s="<<sPDG<<s4Mom<<",r="<<rPDG<<r4Mom<<G4endl; 3330 3368 #endif 3331 3369 //@@CHECK CoulBar and may be evaporate instead … … 3337 3375 qEnv=vacuum; 3338 3376 return theQHadrons; // This is theLastDecay of the Quasmon 3339 }3377 } 3340 3378 G4bool ffin=false; // Flag of FinalDecayInGamma+Residual 3341 3379 if(quasM<rMass+sMass&&(sPDG==221||sPDG==331))// Change eta-Candidate or any to pi 3342 {3380 { 3343 3381 sPDG = 111; 3344 3382 sMass=mPi0; 3345 }3383 } 3346 3384 else if(!sPDG) 3347 {3385 { 3348 3386 if (iniS<0&&iniQChg+iniQChg>=iniBN) // Try to decay in K+ 3349 {3387 { 3350 3388 sPDG = 321; 3351 3389 sMass= mK; 3352 3390 G4QNucleus totQN(valQ+KpQC); // Nucleus Residual after Kp sub. 3353 3391 rPDG = totQN.GetPDG(); 3354 rMass= totQN.GetMZNS();3355 }3392 rMass= totQN.GetMZNS(); 3393 } 3356 3394 else if(iniS<0) // Try to decay in K0 3357 {3395 { 3358 3396 sPDG = 311; 3359 3397 sMass= mK0; 3360 3398 G4QNucleus totQN(valQ+K0QC); // Nucleus Residual after K0 sub. 3361 3399 rPDG = totQN.GetPDG(); 3362 rMass= totQN.GetMZNS();3363 }3400 rMass= totQN.GetMZNS(); 3401 } 3364 3402 else if(iniQChg>iniBN-iniS) // Try to decay in Pi+ 3365 {3403 { 3366 3404 sPDG = 211; 3367 3405 sMass= mPi; 3368 3406 G4QNucleus totQN(valQ-PiQC); // Nucleus Residual after Pi+ sub. 3369 3407 rPDG = totQN.GetPDG(); 3370 rMass= totQN.GetMZNS();3371 }3408 rMass= totQN.GetMZNS(); 3409 } 3372 3410 else if(iniQChg<0) // Try to decay in Pi- 3373 {3411 { 3374 3412 sPDG = -211; 3375 3413 sMass= mPi; 3376 3414 G4QNucleus totQN(valQ+PiQC); // Nucleus Residual after Pi- sub. 3377 3415 rPDG = totQN.GetPDG(); 3378 rMass= totQN.GetMZNS();3379 }3416 rMass= totQN.GetMZNS(); 3417 } 3380 3418 else if(quasM>iniQM+mPi0) // Try to decay in Pi0 3381 {3419 { 3382 3420 sPDG = 111; 3383 3421 sMass= mPi0; 3384 3422 rPDG = iniPDG; 3385 rMass= iniQM;3386 }3387 else // Decay in gamma as a final decision3388 {3423 rMass= iniQM; 3424 } 3425 else // Decay in gamma as a final decision 3426 { 3389 3427 sPDG = 22; 3390 3428 sMass= 0.; 3391 3429 rPDG = iniPDG; 3392 rMass= iniQM;3393 }3430 rMass= iniQM; 3431 } 3394 3432 ffin = true; 3395 }3396 #ifdef debug 3397 G4cout<<"G4Q::HQ:MQ="<<q4Mom.m()<<"->sPDG="<<sPDG<<"(M="<<sMass<<") + rPDG="<<rPDG3433 } 3434 #ifdef debug 3435 G4cout<<"G4Q::HQ:MQ="<<q4Mom.m()<<"->sPDG="<<sPDG<<"(M="<<sMass<<") + rPDG="<<rPDG 3398 3436 <<"(M="<<rMass<<")"<<",S="<<rMass+sMass<<G4endl; 3399 3437 #endif 3400 3438 if(q4Mom.m()+.003<rMass+sMass) 3401 {3402 #ifdef debug 3403 G4cerr<<"G4Q::HQ:***PANIC#3***tM="<<q4Mom.m()<<"<rM="<<rMass<<",sM="<<sMass3439 { 3440 #ifdef debug 3441 G4cerr<<"G4Q::HQ:***PANIC#3***tM="<<q4Mom.m()<<"<rM="<<rMass<<",sM="<<sMass 3404 3442 <<",d="<<rMass+sMass-q4Mom.m()<<G4endl; 3405 3443 #endif … … 3410 3448 qEnv=theEnvironment; // Update the QEnvironment 3411 3449 return theQHadrons; 3412 }3450 } 3413 3451 G4double cqM=q4Mom.m(); 3414 3452 G4LorentzVector resQ4Mom(0.,0.,0.,rMass); // 4-mom of residual Quasmon in CMS … … 3416 3454 G4double sum=rMass+sMass; 3417 3455 if(fabs(cqM-sum)<eps) 3418 {3456 { 3419 3457 resQ4Mom=q4Mom*(rMass/sum); 3420 3458 s4Mom=q4Mom*(sMass/sum); … … 3424 3462 G4cerr<<"***G4Quasmon::HadronizeQuasmon: MQ="<<cqM<<"-> rPDG="<<rPDG<<", (M=" 3425 3463 <<rMass<<") + sPDG="<<sPDG<<"(M="<<sMass<<")="<<sum<<G4endl; 3426 throw G4QException("G4Quasmon::HadronizeQuas:Quasm+Hadr DecayIn2 error");3427 } 3428 #ifdef debug 3429 G4cout<<"G4Q::HQ:Decay of Quasmon="<<q4Mom<<"->s="<<sPDG<<s4Mom<<"+R="<<resQ4Mom3464 throw G4QException("G4Quasmon::HadronizeQuas:Quasm+Hadr DecayIn2 error"); 3465 } 3466 #ifdef debug 3467 G4cout<<"G4Q::HQ:Decay of Quasmon="<<q4Mom<<"->s="<<sPDG<<s4Mom<<"+R="<<resQ4Mom 3430 3468 <<",f="<<ffin<<G4endl; 3431 3469 #endif 3432 3470 G4QHadron* candHadr = new G4QHadron(sPDG,s4Mom);// Creation Hadron for Candidate 3433 3471 if(ffin) 3434 {3472 { 3435 3473 //@@CHECK CoulBar and may be evaporate instead 3436 3474 theQHadrons.push_back(candHadr); // Fill the emergency PHOTON (del.eq.) 3437 3475 G4QHadron* candHRes = new G4QHadron(rPDG,resQ4Mom);// Creation Hadron for QResid 3438 3476 FillHadronVector(candHRes); // Fill "new candHRes" (del.equiv.) 3439 #ifdef debug3440 G4cerr<<"---Warning---G4Q::HQ:EmergencyHd="<<sPDG<<",E="<<theEnvironment<<G4endl;3441 #endif3442 3477 ClearQuasmon(); // This Quasmon is done 3443 3478 qEnv=theEnvironment; 3444 3479 return theQHadrons; 3445 }3480 } 3446 3481 else 3447 {3482 { 3448 3483 G4QContent outQC = G4QPDGCode(sPDG).GetQuarkContent(); 3449 3484 G4int outChg = outQC.GetCharge(); 3450 G4double outProb =1.;3485 G4double outProb = 1.; 3451 3486 if(theEnvironment.GetPDG()>NUCPDG) 3452 {3487 { 3453 3488 G4int outBar = outQC.GetBaryonNumber(); 3454 3489 G4double outCB = theEnvironment.CoulombBarrier(outChg,outBar);//ChrgIsNeglected … … 3478 3513 delete candHadr; // As a result DoNothing 3479 3514 } 3480 }3515 } 3481 3516 } 3482 3517 else // ===>"HadronInNuclMedia or NuclCand" 3483 {3518 { 3484 3519 // Now the CoulBar reflection should be taken into account 3485 3520 G4QContent outQC = G4QPDGCode(sPDG).GetQuarkContent(); … … 3523 3558 #ifdef debug 3524 3559 G4cout<<"G4Q::HQ:QuarkExchHadronizThroughCB Q="<<valQ<<",trQC="<<transQC<<G4endl; 3525 #endif 3560 #endif 3526 3561 sumL-=theEnvironment.Get4Momentum()+q4Mom+fr4Mom; 3527 3562 #ifdef debug 3528 3563 G4cout<<"G4Q::HQ:status=1,>>>>>>>>> NuclearMatter SUBCHECK >>>>>>"<<sumL<<G4endl; 3529 #endif 3564 #endif 3530 3565 status=1; // Something was successfuly done 3531 3566 phot4M=zeroLV; 3532 3567 piF=false; 3533 3568 gaF=false; 3534 }3569 } 3535 3570 else 3536 3571 { … … 3543 3578 status=3; 3544 3579 if(gaF) 3545 {3580 { 3546 3581 phot4M=zeroLV; 3547 3582 gaF=false; 3548 3583 } 3549 //}3550 }3551 } 3552 } // End of skip3584 //} 3585 } 3586 } 3587 } // End of skip 3553 3588 // === Check of boundary to escape not existing state of residual nucleus === 3554 3589 if(CheckGroundState()) 3555 //if(CheckGroundState(true))3556 {3590 //if(CheckGroundState(true)) 3591 { 3557 3592 ClearQuasmon(); // This Quasmon is done 3558 3593 qEnv=theEnvironment; 3559 3594 return theQHadrons; 3560 }3595 } 3561 3596 G4LorentzVector sumLor=theEnvironment.Get4Momentum()+q4Mom+check; 3562 3597 #ifdef debug … … 3664 3699 #endif 3665 3700 if(thePDG>80000000 && (thePDG<90000000 || thePDG%1000>500 || thePDG%1000000>500000) 3666 && thePDG!=90002999 && thePDG!=89999003 && thePDG!=90003998 && thePDG!=899980043667 && thePDG!=90003999 && thePDG!=89999004 && thePDG!=90004998 && thePDG!=89998005)3701 && thePDG!=90002999 && thePDG!=89999003 && thePDG!=90003998 && thePDG!=89998004 3702 && thePDG!=90003999 && thePDG!=89999004 && thePDG!=90004998 && thePDG!=89998005) 3668 3703 { // Translation from CHIPS encoding to PDG encoding @@ change to NuclToHadr 3669 3704 if (thePDG==90999999) thePDG=-311; // anti-K0 === Meson OCTET … … 3701 3736 G4int h2PDG = h2QC.GetSPDGCode(); // PDGCode of the First Hadron 3702 3737 if(!h1PDG || !h2PDG) 3703 {3738 { 3704 3739 G4cerr<<"***FillHV:h1QC="<<h1QC<<"(PDG="<<h1PDG<<"),h2QC="<<h2QC<<"(PDG="<<h2PDG<<")" 3705 3740 <<G4endl; 3706 throw G4QException("G4Quasmon::FillHadronVector: Cipolino cann't be defragmented");3707 }3741 throw G4QException("G4Quasmon::FillHadronVector: Cipolino cann't be defragmented"); 3742 } 3708 3743 G4QHadron* fHadr = new G4QHadron(h1PDG); // the First Hadron is created 3709 3744 G4QHadron* sHadr = new G4QHadron(h2PDG); // the Second Hadron is created … … 3716 3751 G4cerr<<"***G4Q::FillHadrV:ChipQC"<<chipQC<<":PDG1="<<h1PDG<<",PDG2="<<h2PDG<<G4endl; 3717 3752 theQHadrons.push_back(qH); // No decay (delete equivalent) 3718 }3753 } 3719 3754 else 3720 3755 { … … 3738 3773 G4int bA =qNuc.GetA(); // A#of baryons in the Nucleus 3739 3774 #ifdef pdebug 3740 G4cout<<"G4Quasm::FillHadrVect:Nucl="<<qNuc<<",nPDG="<<thePDG<<",GSM="<<GSMass<<G4endl;3775 G4cout<<"G4Quasm::FillHadrVect:Nucl="<<qNuc<<",nPDG="<<thePDG<<",GSM="<<GSMass<<G4endl; 3741 3776 #endif 3742 3777 if((nN<0||nZ<0||nS<0)&&bA>0) // => "Anti-strangeness or ISOBAR" case 3743 {3778 { 3744 3779 G4double m1=mPi; // Prototypes for the nZ<0 case 3745 3780 G4int PDG1=-211; … … 3765 3800 PDG2=newN0.GetPDG(); 3766 3801 } 3767 }3802 } 3768 3803 else if(nS>0&&nZ+nN>0) 3769 3804 { … … 3784 3819 m2 =newNp.GetMZNS(); 3785 3820 } 3786 }3821 } 3787 3822 else if(nN<0) 3788 {3823 { 3789 3824 PDG1 =211; 3790 3825 G4QNucleus newNpp(totQC-PiQC); 3791 3826 PDG2 =newNpp.GetPDG(); 3792 3827 m2 =newNpp.GetMZNS(); 3793 }3828 } 3794 3829 if(fragMas>m1+m2) // => "can decay" case 3795 3830 { … … 3797 3832 G4LorentzVector qe4M(0.,0.,0.,m2); 3798 3833 if(!qH->DecayIn2(fq4M,qe4M)) 3799 {3834 { 3800 3835 G4cerr<<"***G4Quasm::FillHadrV: QM="<<t.m()<<"-> Mes="<<PDG1<<"(M=" 3801 <<m1<<") + ResA="<<PDG2<<"(M="<<m2<<")"<<G4endl;3802 throw G4QException("G4Quasm::FillHadrV: Mes+ResA DecayIn2 did not succeed");3803 }3836 <<m1<<") + ResA="<<PDG2<<"(M="<<m2<<")"<<G4endl; 3837 throw G4QException("G4Quasm::FillHadrV: Mes+ResA DecayIn2 did not succeed"); 3838 } 3804 3839 delete qH; 3805 3840 G4QHadron* H1 = new G4QHadron(PDG1,fq4M); … … 3807 3842 G4QHadron* H2 = new G4QHadron(PDG2,qe4M); 3808 3843 FillHadronVector(H2); // (delete equivalent) 3809 }3844 } 3810 3845 else if(fabs(m1+m2-fragMas)<0.01) // Split the 4-momentum 3811 {3846 { 3812 3847 G4double r1=m1/fragMas; 3813 3848 G4double r2=1.-r1; … … 3821 3856 G4QHadron* H2 = new G4QHadron(PDG2,r2*t); 3822 3857 FillHadronVector(H2); // (delete equivalent) 3823 }3858 } 3824 3859 else 3825 {3860 { 3826 3861 #ifdef pdebug 3827 3862 G4cerr<<"-Warning-G4Q::FillHVec:PDG="<<thePDG<<"("<<t.m()<<","<<fragMas<<") < Mes=" 3828 3863 <<PDG1<<"("<<m1<<") + ResA="<<PDG2<<"("<<m2<<"), d="<<fragMas-m1-m2<<G4endl; 3829 //throw G4QException("G4Quasm::FillHadrVec: mass of decaying hadron is too small");3864 //throw G4QException("G4Quasm::FillHadrVec: mass of decaying hadron is too small"); 3830 3865 #endif 3831 3866 theQHadrons.push_back(qH); // FillAsIs to correct later in G4QEnvironment (Warning) 3832 }3833 }3867 } 3868 } 3834 3869 else if(abs(fragMas-GSMass)<.1) // the Nucleus is too close the Ground State 3835 3870 { 3836 3871 #ifdef pdebug 3837 G4cout<<"G4Quasm::FillHadrVect: Ground state"<<G4endl;3872 G4cout<<"G4Quasm::FillHadrVect: Ground state"<<G4endl; 3838 3873 #endif 3839 3874 G4double nResM =1000000.; // Prototype of residualMass for the neutron 3840 3875 G4int nResPDG=0; // Prototype of PDGCode for the neutron 3841 3876 if(nN>0&&bA>1) // It's nucleus and there is the neutron 3842 {3877 { 3843 3878 G4QContent resQC=totQC-neutQC; 3844 3879 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 3848 3883 else if(nResPDG==91000000) nResM=mLamb; 3849 3884 else nResM=resN.GetMZNS(); // min mass of the Residual Nucleus 3850 }3885 } 3851 3886 G4double pResM =1000000.; // Prototype of residualMass for the proton 3852 3887 G4int pResPDG=0; // Prototype of PDGCode of the proton 3853 3888 if(nZ>0&&bA>1) // It's nucleus and there is theroton 3854 {3889 { 3855 3890 G4QContent resQC=totQC-protQC; 3856 3891 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 3860 3895 else if(pResPDG==91000000) pResM=mLamb; 3861 3896 else pResM =resN.GetMZNS(); // min mass of the Residual Nucleus 3862 }3897 } 3863 3898 G4double lResM =1000000.; // Prototype of residualMass for the Lambda 3864 3899 G4int lResPDG=0; // Prototype of PDGCode of the Lambda 3865 3900 if(nS>0&&bA>1) // It's nucleus and there is the Lambda 3866 {3901 { 3867 3902 G4QContent resQC=totQC-lambQC; 3868 3903 G4QNucleus resN(resQC); // Pseudo nucleus for the Residual Nucleus … … 3872 3907 else if(lResPDG==91000000) lResM=mLamb; 3873 3908 else lResM =resN.GetMZNS(); // min mass of the Residual Nucleus 3874 }3909 } 3875 3910 #ifdef pdebug 3876 3911 G4cout<<"G4Quasm::FillHadrVec:rP="<<pResPDG<<",rN="<<nResPDG<<",rL="<<lResPDG<<",nN=" … … 3881 3916 (bA > 1 && ( (nN > 0 && fragMas > nResM+mNeut) || 3882 3917 (nZ > 0 && fragMas > pResM+mProt) || 3883 (nS > 0 && fragMas > lResM+mLamb) ) ) )3918 (nS > 0 && fragMas > lResM+mLamb) ) ) ) 3884 3919 { 3885 3920 G4int barPDG = 90002002; … … 3888 3923 G4double resM= mAlph; 3889 3924 3890 if (fragMas > nResM+mNeut) { // Can radiate a neutron (priority 1)3925 if (fragMas > nResM+mNeut) { // Can radiate a neutron (priority 1) 3891 3926 barPDG = 90000001; 3892 3927 resPDG = nResPDG; 3893 3928 barM= mNeut; 3894 3929 resM= nResM; 3895 }3896 else if(fragMas>pResM+mProt) // Can radiate a proton (priority 2)3897 {3930 } 3931 else if(fragMas>pResM+mProt) // Can radiate a proton (priority 2) 3932 { 3898 3933 barPDG=90001000; 3899 3934 resPDG=pResPDG; 3900 3935 barM =mProt; 3901 3936 resM =pResM; 3902 }3903 else if(fragMas>lResM+mLamb) // Can radiate a Lambda (priority 3)3904 {3937 } 3938 else if(fragMas>lResM+mLamb) // Can radiate a Lambda (priority 3) 3939 { 3905 3940 barPDG=91000000; 3906 3941 resPDG=lResPDG; 3907 3942 barM =mLamb; 3908 3943 resM =lResM; 3909 }3944 } 3910 3945 else if(thePDG!=90004004&&fragMas>GSMass)// If it's not Be8 decay in gamma 3911 {3946 { 3912 3947 barPDG=22; 3913 3948 resPDG=thePDG; 3914 3949 barM =0.; 3915 3950 resM =pResM; 3916 }3951 } 3917 3952 else if(thePDG!=90004004) 3918 {3953 { 3919 3954 G4cerr<<"***G4Q::FillHadV:PDG="<<thePDG<<",M="<<fragMas<<"<GSM="<<GSMass<<G4endl; 3920 3955 throw G4QException("***G4Quasmon::FillHadronVector: Below GSM but cann't decay"); 3921 }3956 } 3922 3957 3923 3958 G4LorentzVector a4Mom(0.,0.,0.,barM); … … 3927 3962 theQHadrons.push_back(qH); // No decay (delete equivalent) 3928 3963 G4cerr<<"---Warning---G4Q::FillHadronVector: Be8 decay did not succeed"<<G4endl; 3929 }3964 } 3930 3965 else 3931 3966 { … … 3940 3975 FillHadronVector(HadrR); // Fill 2nd Hadron (delete equivalent) 3941 3976 } 3942 }3977 } 3943 3978 else 3944 3979 { 3945 3980 #ifdef pdebug 3946 G4cout<<"G4Quasm::FillHadrVect: Leave as it is"<<G4endl;3981 G4cout<<"G4Quasm::FillHadrVect: Leave as it is"<<G4endl; 3947 3982 #endif 3948 3983 theQHadrons.push_back(qH); // No decay (delete equivalent) 3949 }3984 } 3950 3985 } 3951 3986 else if (fragMas<GSMass) 3952 {3987 { 3953 3988 G4cerr<<"***G4Q::FillHV:M="<<fragMas<<">GSM="<<GSMass<<",d="<<fragMas-GSMass<<G4endl; 3954 throw G4QException("***G4Quasmon::FillHadronVector:Mass is below theGroundStateVal"); 3955 } 3989 //throw G4QException("*G4Quasmon::FillHadronVector:Mass is below theGroundStateVal"); 3990 G4cout<<"***>>>G4Quasm::FillHadrVect: Leave as it is Instead of Exception"<<G4endl; 3991 theQHadrons.push_back(qH); // Fill As Is (delete equivalent) 3992 } 3956 3993 else if (bA==1&&fragMas>GSMass) 3957 {3994 { 3958 3995 G4int gamPDG=22; 3959 3996 G4double gamM=0.; 3960 3997 if(fragMas>mPi0+GSMass) 3961 {3998 { 3962 3999 gamPDG=111; 3963 4000 gamM=mPi0; 3964 }4001 } 3965 4002 G4LorentzVector a4Mom(0.,0.,0.,gamM); 3966 4003 G4LorentzVector b4Mom(0.,0.,0.,GSMass); … … 3969 4006 theQHadrons.push_back(qH); // No decay (delete equivalent) 3970 4007 G4cerr<<"---Warning---G4Q::FillHadrVect:N*->gamma/pi0+N decay error"<<G4endl; 3971 }4008 } 3972 4009 else 3973 4010 { … … 3979 4016 } 3980 4017 else // ===> Evaporation of excited system 3981 {4018 { 3982 4019 #ifdef pdebug 3983 4020 G4cout<<"G4Quasm::FillHadrVect:Evaporate "<<thePDG<<",tM="<<fragMas<<" > GS="<<GSMass … … 3987 4024 G4QHadron* rHadron = new G4QHadron; 3988 4025 if(!qNuc.EvaporateBaryon(bHadron,rHadron)) 3989 {4026 { 3990 4027 G4cerr<<"---Warning---G4Q::FillHV:Evaporate PDG="<<thePDG<<",M="<<fragMas<<G4endl; 3991 4028 delete bHadron; 3992 4029 delete rHadron; 3993 4030 theQHadrons.push_back(qH); // Fill hadron in the HadronVector as it is 3994 }4031 } 3995 4032 else 3996 {4033 { 3997 4034 #ifdef pdebug 3998 4035 G4cout<<"G4Q::FlHV:Done,b="<<bHadron->GetQPDG()<<",r="<<rHadron->GetQPDG()<<G4endl; … … 4002 4039 FillHadronVector(rHadron); // Fill Residual Nucl. (delete equivalent) 4003 4040 } 4004 }4041 } 4005 4042 } 4006 4043 else // Try to decay the QHadron (delete equivalent) … … 4059 4096 G4cerr<<"***G4Q::GetQPM: kMax="<<kMax<<", kMin="<<kMin<<", kLim="<<kLim<<", MQ="<<qMass 4060 4097 <<", n="<<nOfQ<<G4endl; 4061 throw G4QException("G4Quasmon::GetQPartonMomentum: Can not generate quark-parton");4098 throw G4QException("G4Quasmon::GetQPartonMomentum: Can not generate quark-parton"); 4062 4099 } 4063 4100 #ifdef pdebug … … 4076 4113 if (kMax>=kLim) vRndm = vRndm*pow((1.-xMin),n)*(1.+n*xMin); // "xMin - 1." Range 4077 4114 else 4078 {4115 { 4079 4116 G4double xMax=kMax/kLim; 4080 4117 G4double vRmin = pow((1.-xMin),n)*(1.+n*xMin); … … 4091 4128 if (vRndm<=0. || vRndm>1.) 4092 4129 { 4093 //G4cout<<"-Warning-G4Quasmon::GetQPM: R="<<vRndm<<",kMi="<<kMin<<",kMa="<<kMax <<",kLi="4094 // << kLim<<G4endl;4130 //G4cout<<"-Warning-G4Quasmon::GetQPM: R="<<vRndm<<",kMi="<<kMin<<",kMa="<<kMax 4131 // <<",kLi="<<kLim<<G4endl; 4095 4132 if(vRndm<=0.) vRndm=1.e-9; 4096 4133 else if(vRndm>1.) vRndm=1.; … … 4128 4165 G4double od = c - vRndm; // the old Residual Difference 4129 4166 #ifdef pdebug 4130 G4cout<<"G4Q::GetQPMom:>>>First x="<<x<<", n="<<n<<", f="<<f<<", d/R(first)="4167 G4cout<<"G4Q::GetQPMom:>>>First x="<<x<<", n="<<n<<", f="<<f<<", d/R(first)=" 4131 4168 <<od/vRndm<<G4endl; 4132 4169 #endif … … 4134 4171 if(nitMax>100)nitMax=100; // But it is limited by 100 4135 4172 while( abs(d/vRndm) > 0.001 && it <= nitMax) // Solve the equation by Newton method 4136 {4173 { 4137 4174 x = x + f*od/(r*nx*(fn+1.)); // Calculate the new x value 4138 4175 if(x<1.e-27) x=1.e-27; … … 4159 4196 } 4160 4197 else 4161 {4198 { 4162 4199 if (f>1.0001&&f<27.) f=1.+(f-1.)*2; // Make a regular correction of OptStepFactor 4163 4200 if (f<0.99999999999) f=1.+(1.-f)/2.; 4164 4201 if (f>=27.) f=27.; 4165 }4166 #ifdef pdebug 4167 G4cout<<"G4Q::GetQPMom: Iter#"<<it<<": (c="<<c<<" - R="<<vRndm<<")/R ="<<d/vRndm4202 } 4203 #ifdef pdebug 4204 G4cout<<"G4Q::GetQPMom: Iter#"<<it<<": (c="<<c<<" - R="<<vRndm<<")/R ="<<d/vRndm 4168 4205 <<", x="<<x<<", f="<<f<<G4endl; 4169 4206 #endif … … 4178 4215 ox = x; 4179 4216 it++; 4180 }4217 } 4181 4218 #ifdef pdebug 4182 4219 if(it>nitMax) G4cout<<"G4Q::GetQPMom: a#of iterations > nitMax="<<nitMax<<G4endl; … … 4197 4234 // if (kMax>=kLim) vRndm = vRndm*pow((1.-xMin),n); // Shrink to the "xMin - 1." Range 4198 4235 // else 4199 // {4236 // { 4200 4237 // G4double xMax=kMax/kLim; // Maximum value for "x" 4201 4238 // G4double vRmin = pow((1.-xMin),n); … … 4290 4327 if(asSea<sSea) sSea=asSea; 4291 4328 if(sSea>nMaxStrangeSea) // @@@@@@@ Too many strange sea ?????? 4292 {4329 { 4293 4330 #ifdef pdebug 4294 4331 G4cout<<"G4Q::Calc#ofQP:**Reduce** S="<<sSea<<",aS="<<asSea<<",maxS="<<nMaxStrangeSea … … 4299 4336 valQ.DecAS(sSea); 4300 4337 valQ.IncQAQ(sSea,0.); // Add notstrange sea ???????? 4301 }4338 } 4302 4339 } 4303 4340 // @@ Chocolate rule --- Temporary (?) … … 4338 4375 G4double frM=cQPDG.GetMass(); // Vacuum mass of the candidate 4339 4376 if(cPDG>80000000&&cPDG!=90000000) // Modify Fragments toTakeIntoAccount CurNuc 4340 {4377 { 4341 4378 if(totMass<tmpTM+frM) 4342 4379 { … … 4346 4383 #endif 4347 4384 curCand->SetPossibility(false); 4348 }4385 } 4349 4386 G4QNucleus cNuc(cPDG); // Fake nucleus for the Candidate 4350 4387 G4int cP = cNuc.GetZ(); // A#of protons in the Current Environment … … 4362 4399 if(cP==eP&&cN==eN&&cL==eL)clME=cQPDG.GetMass();// The only notBoundCluster of Envir 4363 4400 else // Bound Cluster in the Environment 4364 {4401 { 4365 4402 renvM = cQPDG.GetNuclMass(eP-cP,eN-cN,eL-cL); // Mass of residual for Environment 4366 4403 clME = envM-renvM; … … 4368 4405 if(cP==tP&&cN==tN&&cL==tL)clMN=cQPDG.GetMass(); // The only NotBoundCluster of TotN 4369 4406 else // Bound Cluster in Total Nucleus 4370 {4407 { 4371 4408 renvM = cQPDG.GetNuclMass(tP-cP,tN-cN,tL-cL); // TotalResidualNucleus Mass 4372 4409 clMN = totM-renvM; … … 4380 4417 <<renvM<<G4endl; 4381 4418 #endif 4382 }4419 } 4383 4420 else curCand->SetParPossibility(false); 4384 } // @@ Modification of hadron masses in nuclear matter are not implemented yet4421 } // @@ Modification of hadron masses in nuclear matter are not implemented yet 4385 4422 } 4386 4423 } // End of "ModifyInMatterCandidates" … … 4450 4487 G4double probability = 0.; 4451 4488 G4double secondProbab = 0.; 4452 if ( (aPDG > 80000000 && envA > 0) || aPDG < 80000000) { 4489 if ( (aPDG > 80000000 && envA > 0) || aPDG < 80000000) 4490 { 4453 4491 G4int resPDG=0; 4454 4492 G4double comb=0.; // Combinatorial factor for quark exchange … … 4471 4509 cPDG==90000002||cPDG==90001001||cPDG==90001002||cPDG==90002001||cPDG==90002002; 4472 4510 if(pPrint) G4cout<<"G4Q::CHP:==****==>>>c="<<cPDG<<",dUD="<<dUD<<",pos="<<pos<<",eA=" 4473 <<envA<<",tM="<<totMass<<" > tmpTM+frM="<<tmpTM+frM<<G4endl;4474 #endif 4475 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<1)))// 1 ** never try4476 if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<2)))//2 ***The best***4477 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<3))) // 3 *** good ***4478 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<4)))//4 almost the same4479 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000))) // no restrictions4480 {4511 <<envA<<",tM="<<totMass<<" > tmpTM+frM="<<tmpTM+frM<<G4endl; 4512 #endif 4513 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<1)))// 1 ** never try 4514 if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<2)))//2 ***The best*** 4515 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<3))) // 3 *** good *** 4516 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000&&dUD<4)))//4 almost the same 4517 //if(pos&&(cPDG<80000000||(cPDG>80000000&&cPDG!=90000000))) // no restrictions 4518 { 4481 4519 G4QContent curQ = valQ; // Make current copy of theQuasmonQuarkCont 4482 4520 G4int baryn= candQC.GetBaryonNumber(); // Baryon number of the Candidate … … 4505 4543 G4int oQmin=0; // Returning from cluster quarks: d=0,u=1 4506 4544 G4int oQmax=2; // 2 is bigger than u-quark (1, oq<2) @@ 3? 4507 if (dofU<=nofD) iQmax=1; // Too many Dquarks (in-Uquark is forbiden)4545 if (dofU<=nofD) iQmax=1; // Too many Dquarks (in-Uquark is forbiden) 4508 4546 else if(dofD<=nofU) iQmin=1; // Too many Uquarks (in-Dquark is forbiden) 4509 4547 // @@ This is how netrons are increased for the pion capture at rest case @@ 4510 4548 if(piF) // force Pi- transfer its charge to a quark 4511 {4549 { 4512 4550 iQmin=0; 4513 4551 iQmax=1; 4514 }4552 } 4515 4553 #ifdef pdebug 4516 4554 if(pPrint)G4cout<<"G4Q::CHP:***!!!***>>F="<<cPDG<<",mF="<<frM<<",iq:"<<iQmin<<"," … … 4518 4556 #endif 4519 4557 if(iQmax>iQmin) for(int iq=iQmin; iq<iQmax; iq++) // Entering (fromQuasmon) quark 4520 {4558 { 4521 4559 G4double qFact=1.; 4522 4560 //if(iq==1&&addPhoton>0.) qFact=4.; // @@ taftology … … 4527 4565 if(pPrint) G4cout<<"G4Q::CHP:photon cap(gaF) is enhanced for Uquark"<<G4endl; 4528 4566 #endif 4529 }4567 } 4530 4568 G4double nqInQ=0.; // A#of quarks of this sort in a Quasmon 4531 4569 if (!iq) nqInQ=valQ.GetD(); … … 4538 4576 #endif 4539 4577 if(oQmax>oQmin) for(int oq=oQmin; oq<oQmax; oq++) // Exiting (to Quasmon) quark 4540 {4578 { 4541 4579 G4int shift= cQPDG.GetRelCrossIndex(iq, oq); 4542 4580 G4QContent ioQC=cQPDG.GetExQContent(iq, oq); 4543 4581 G4QContent resQC=valQ+ioQC; // Quark Content of the residual Quasmon 4544 4582 #ifdef sdebug 4545 G4cout<<"G4Q::CHP:iq="<<iq<<",oq="<<oq<<",QC="<<ioQC<<",rQC="<<resQC<<G4endl;4583 G4cout<<"G4Q::CHP:iq="<<iq<<",oq="<<oq<<",QC="<<ioQC<<",rQC="<<resQC<<G4endl; 4546 4584 #endif 4547 4585 G4QPDGCode resQPDG(resQC); // QPDG of the residual Quasmon … … 4559 4597 (resU+resS>resD+resD||resD+resS>resU+resU); 4560 4598 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI)// The Residual Quasmon is possible 4561 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&!piF) // *** Never try this4562 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||cPDG==90000001))4599 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&!piF) // *** Never try this 4600 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||cPDG==90000001)) 4563 4601 //G4cout<<"G4Q::CHP:PiF="<<piF<<G4endl; 4564 4602 // The best: 4565 //if(resQ>-2 &&resPDG && resPDG!=10 && !rI && (!piF||piF && cPDG!=90001000 )) 4566 4567 if (resQ > -2 && resPDG && resPDG != 10 && !rI && 4568 (!piF || 4569 (piF && 4570 (cPDG != 90001000 || G4UniformRand() < .333333) && 4571 cPDG != 90002001 && 4572 cPDG != 90002002) ) ) 4573 4574 //cPDG!=90001000||G4UniformRand()<.333333)) 4575 //(cPDG!=90001000||G4UniformRand()<.5)&&cPDG!=90002001&&cPDG!=90002002)) 4576 //cPDG!=90001000&&cPDG!=90002001&&cPDG!=90002002)) 4577 //----------------------------------------------------------------- 4578 //if(resQ>-2 && resPDG && resPDG!=10 && !rI && (!piF||piF&&baryn>1)) 4579 //if(resQ>-2 && resPDG && resPDG!=10 && !rI) // baryons are too energetic 4580 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||baryn==1)) // bad 4581 { 4603 //if(resQ>-2 &&resPDG && resPDG!=10 && !rI && (!piF||piF && cPDG!=90001000 )) 4604 if (resQ > -2 && resPDG && resPDG != 10 && !rI && 4605 (!piF || ( piF && (cPDG != 90001000 || G4UniformRand() < .333333) && 4606 cPDG != 90002001 && cPDG != 90002002 4607 ) 4608 ) 4609 ) 4610 //cPDG!=90001000||G4UniformRand()<.333333)) 4611 //(cPDG!=90001000||G4UniformRand()<.5)&&cPDG!=90002001&&cPDG!=90002002)) 4612 //cPDG!=90001000&&cPDG!=90002001&&cPDG!=90002002)) 4613 //----------------------------------------------------------------- 4614 //if(resQ>-2 && resPDG && resPDG!=10 && !rI && (!piF||piF&&baryn>1)) 4615 //if(resQ>-2 && resPDG && resPDG!=10 && !rI) // baryons are too energetic 4616 //if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||baryn==1)) // bad 4617 { 4582 4618 G4int is=index+shift; 4583 4619 if(shift!=7&&is<maxC) // This quark exchange is possible 4584 {4620 { 4585 4621 G4QCandidate* parCand=theQCandidates[is];//Pointer to ParentClusterOfCand 4586 4622 G4QContent parQC = parCand->GetQC(); // QuarkCont of theParentCluster … … 4611 4647 //********* ISOTOPIC FOCUSING ******************* 4612 4648 // ==== Old (First Publication) Complicated rule ==== 4613 //if(4614 // //zZ<3 &&4649 //if( 4650 // //zZ<3 && 4615 4651 // //( 4616 // abs(dI)<1 ||4617 // (barot==1 && (4652 // abs(dI)<1 || 4653 // (barot==1 && ( 4618 4654 // abs(dI)<2&&abs(cC-charge)<2 || 4619 // (dI>=2&&cC<charge) || (dI<=-2&&cC>charge)4655 // (dI>=2&&cC<charge) || (dI<=-2&&cC>charge) 4620 4656 // //dI==2&&cC<=charge || dI==-2&&cC>=charge || 4621 4657 // //dI>2&&cC<charge || dI<-2&&cC>charge 4622 // )) ||4623 // (barot>1&&barot<34624 // && (4625 // abs(dI)<2&&abs(cC-charge)<2 ||4658 // )) || 4659 // (barot>1&&barot<3 4660 // && ( 4661 // abs(dI)<2&&abs(cC-charge)<2 || 4626 4662 // //dI>=2&&cC<charge || dI<=-2&&cC>charge 4627 // dI<=2&&cC<=charge || dI==-2&&cC>=charge ||4628 // dI>2&&cC<charge || dI<-2&&cC>charge4629 // )) ||4630 // (barot>2&&barot<44631 // && (4632 // abs(dI)<2&&abs(cC-charge)<2 ||4663 // dI<=2&&cC<=charge || dI==-2&&cC>=charge || 4664 // dI>2&&cC<charge || dI<-2&&cC>charge 4665 // )) || 4666 // (barot>2&&barot<4 4667 // && ( 4668 // abs(dI)<2&&abs(cC-charge)<2 || 4633 4669 // //dI>=2&&cC<charge || dI<=-2&&cC>charge 4634 // dI<=2&&cC<=charge || dI==-3&&cC>=charge ||4635 // dI>2&&cC<charge || dI<-3&&cC>charge4636 // )) ||4637 // (barot>34638 // && (4639 // abs(dI)<2&&abs(cC-charge)<2 ||4670 // dI<=2&&cC<=charge || dI==-3&&cC>=charge || 4671 // dI>2&&cC<charge || dI<-3&&cC>charge 4672 // )) || 4673 // (barot>3 4674 // && ( 4675 // abs(dI)<2&&abs(cC-charge)<2 || 4640 4676 // dI>=2&&cC<charge || dI<=-2&&cC>charge 4641 // //dI<=2&&cC<=charge || dI==-3&&cC>=charge ||4642 // //dI>2&&cC<charge || dI<-3&&cC>charge4643 // )4677 // //dI<=2&&cC<=charge || dI==-3&&cC>=charge || 4678 // //dI>2&&cC<charge || dI<-3&&cC>charge 4679 // ) 4644 4680 // ) 4645 // )4681 // ) 4646 4682 // ==== Just a coridor ======= 4647 //if(abs(dS)<3||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrForB=1(old) 4648 //if(abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrongFor1(<4) 4649 //if(baryn>1||abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//SIFF1 4650 //if(!piF&&abs(dS)<4 || piF&&abs(dS)<3) // UniversalIsoFocusing 4651 //if(!piF&&first&&abs(dS)<4 || (!piF&&!first||piF)&&abs(dS)<3)//ExpIsoF 4652 4653 if ( (!piF && first && baryn < 3) || 4654 (!piF && !first) || 4655 (piF && abs(dS) < 3) ) 4656 // ExpIsoFoc 4657 //if(!qIso&&!dC||qIso>0&&dC<0||qIso<0&&dC>0)//MediumIsoFocusingForAll 4658 //if(abs(dS)<3) // Universal IsotopeFocusing(<3) (Best for pi-capture) 4659 //if(abs(dS)<4) // Never try this (**) 4683 //if(abs(dS)<3||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrForB=1(old) 4684 //if(abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrongFor1(<4) 4685 //if(baryn>1||abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//SIFF1 4686 //if(!piF&&abs(dS)<4 || piF&&abs(dS)<3) // UniversalIsoFocusing 4687 //if(!piF&&first&&abs(dS)<4 || (!piF&&!first||piF)&&abs(dS)<3)//ExpIsoF 4688 // *** Recent correction (**** 4689 //if ( (!piF && first && baryn < 3) || 4690 // (!piF && !first) || 4691 if ( (!piF && first && baryn < 3) || 4692 (!piF && !first && baryn < 5 ) || 4693 (piF && abs(dS) < 3) ) // Isotopic focusing for AtRest Reactions 4694 //if(!qIso&&!dC||qIso>0&&dC<0||qIso<0&&dC>0)//MediumIsoFocusingForAll 4695 //if(abs(dS)<3) // Universal IsotopeFocusing(<3) (Best for pi-capture) 4696 //if(abs(dS)<4) // Never try this (**) 4660 4697 //if(3>2) //***>>> ***NO*** Isotope Focusing *** 4661 4698 { … … 4674 4711 else if(resPDG)minM=G4QPDGCode(resPDG).GetMass();//ResidQuasmonHadron 4675 4712 G4double bNM2=nucBM*nucBM; 4676 G4double nDelta=(frM2-bNM2)/(nucBM+nucBM); 4713 G4double nDelta=0.; 4714 if(nucBM)nDelta=(frM2-bNM2)/(nucBM+nucBM); // Safety check 4677 4715 #ifdef pdebug 4678 4716 G4int iniPDG =valQ.GetSPDGCode(); … … 4683 4721 <<kCut<<",E="<<E<<">"<<nDelta<<",p="<<parPDG<<G4endl; 4684 4722 #endif 4685 if(resPDG&&minM>0.) // Kinematical analysis of hadronization4723 if(resPDG&&minM>0.) // Kinematical analysis of hadronization 4686 4724 { 4687 4725 #ifdef pdebug … … 4738 4776 //if(envM>boundM) 4739 4777 if ( (envA-barot <= bEn && envM > boundM) || envA-barot > bEn) 4740 //if(2>3)4778 //if(2>3) // *** Recent correction *** 4741 4779 { 4742 4780 minBM=rtM; 4743 4781 // *** LIM *** 4744 if(envA-barot>bEn) minBM-=mbEn; 4745 else 4746 minBM-=envM-boundM; // MinResidualBoundedQuasmonMass 4747 } 4782 if(envA-barot > bEn) minBM-=mbEn; 4783 else minBM-=envM-boundM; // MinResidualBoundedQuasmonMass 4784 } 4748 4785 G4double minBM2=minBM*minBM+.1; 4749 4786 G4double minM2=minM*minM+.1; … … 4754 4791 <<(mintM2-rtQ2)/rtEP/2<<G4endl; 4755 4792 #endif 4756 G4double newh=1.;4793 G4double newh=1.; 4757 4794 // == (@@) Historical additional cuts for q_min === 4758 4795 //G4double nc=1.-(dkLS-E-E)/boundM; // q_min=k-E 4759 4796 G4double nc=1.-(dkLS-E-E+CB+CB)/boundM; // q_min=k-E+CB 4760 G4double newl=0.;4797 G4double newl=0.; 4761 4798 #ifdef pdebug 4762 4799 if(pPrint) G4cout<<"G4Q::CHP:qi_k-E="<<nc<<",k="<<kLS<<",E="<<E 4763 4800 <<",M="<<boundM<<G4endl; 4764 4801 #endif 4765 if(nc >0.&&nc<1.&&nc<ne)4802 if(nc > 0. && nc < 1. && nc < ne) 4766 4803 { 4767 4804 ne=nc; 4768 4805 newh=pow(nc,cNQ); 4769 if(newh <kf) kf=newh;4806 if(newh < kf) kf=newh; 4770 4807 } 4771 else if(nc <=0.)kf=0.;4808 else if(nc <= 0.) kf=0.; 4772 4809 4773 4810 //G4double nk=1.-(dkd-Em-Em)/boundM; // q_min=(k-delta)-E*(M-m)/M … … 4776 4813 // <<",M="<<totMass<<G4endl; 4777 4814 #endif 4778 //if(nk >0.&&nk<1.&&nk<ne)4815 //if(nk > 0. && nk < 1. && nk < ne) 4779 4816 //{ 4780 4817 // ne=nk; … … 4782 4819 // if(newh<kf) kf=newh; 4783 4820 //} 4784 //else if(nk <=0.)kf=0.;4821 //else if(nk <= 0.) kf=0.; 4785 4822 4786 4823 //G4double mex=frM+Em; … … 4791 4828 // <<",M="<<frM<<G4endl; 4792 4829 #endif 4793 //if(np >0.&&np<1.&&np<ne)4830 //if(np > 0. && np < 1. && np < ne) 4794 4831 //{ 4795 4832 // ne=np; … … 4797 4834 // if(newh<kf) kf=newh; 4798 4835 //} 4799 //else if(np <=0.)kf=0.;4836 //else if(np <= 0.) kf=0.; 4800 4837 4801 4838 //G4double mix=boundM+E; … … 4804 4841 ////G4double mix=nucBM+E-CB; 4805 4842 G4double st=0.; 4806 if(mix >frM) st=sqrt(mix*mix-frM2);4843 if(mix > frM) st=sqrt(mix*mix-frM2); 4807 4844 G4double nq=1.-(dkLS-st-st)/boundM;//qi=k-sq((m+E*(M-m)/M)^2-m^2) 4808 4845 #ifdef pdebug … … 4810 4847 <<mix<<",M="<<frM<<G4endl; 4811 4848 #endif 4812 if(nq >0.&&nq<1.&&nq<ne)4813 //if(2>3) // Does not make any difference4849 if(nq > 0. && nq < 1. && nq < ne) 4850 //if(2>3) // Does not make any difference 4814 4851 { 4815 4852 ne=nq; 4816 4853 newh=pow(nq,cNQ); 4817 if(newh <kf) kf=newh;4854 if(newh < kf) kf=newh; 4818 4855 } 4819 4856 else if(nq<=0.)kf=0.; … … 4825 4862 //G4bool atrest=(eQ-mQ)/mQ<.001; // Q at rest (only PiCap) 4826 4863 // ***VTN*** CHECK IsNecessety toRecover theColTotRes to MinMassTot 4827 if(mintM2>rtQ2) //==> Check of ResidualTotalNucleus ** Always **4828 //if(2>3) // Negligable difference difference4864 if(mintM2>rtQ2) //==> Check of ResidualTotalNucleus ** Always ** 4865 //if(2>3) // Negligable difference difference 4829 4866 { 4830 4867 G4double nz=0.; 4831 if(atrest) nz=1.-(mintM2-rtQ2+pmk*dked)/(boundM*(rtEP+pmk));4868 if(atrest) nz=1.-(mintM2-rtQ2+pmk*dked)/(boundM*(rtEP+pmk)); 4832 4869 else nz=1.-(mintM2-rtQ2)/(boundM*rtEP); 4833 //if(atrest) nz=1.-(mintM2-rtQ2+pmk*dkd)/(nucBM*(rtEP+pmk));4870 //if(atrest) nz=1.-(mintM2-rtQ2+pmk*dkd)/(nucBM*(rtEP+pmk)); 4834 4871 //else nz=1.-(mintM2-rtQ2)/(nucBM*rtEP); 4835 4872 #ifdef pdebug … … 4837 4874 <<mintM2<<">"<<rtQ2<<G4endl; 4838 4875 #endif 4839 if(nz >0.&&nz<1.&&nz<ne)4876 if(nz > 0. && nz < 1. && nz < ne) 4840 4877 { 4841 4878 ne=nz; 4842 4879 newh=pow(nz,cNQ); 4843 if(newh <kf) kf=newh;4880 if(newh < kf) kf=newh; 4844 4881 } 4845 else if(nz <=0.)kf=0.;4882 else if(nz <= 0.) kf=0.; 4846 4883 } 4847 4884 // *** VBQ *** CHECK Residual Quazmon (Never use: reduces PS) 4848 //if(minBM2>rQ2&&!piF&&!gaF&&baryn>3) // ==>Check ResidVirtualQuasm4849 //if(minBM2>rQ2&&!piF&&!gaF&&baryn>2) // ==>Check ResidVirtualQuasm4885 //if(minBM2>rQ2&&!piF&&!gaF&&baryn>3) // ==>Check ResidVirtualQuasm 4886 //if(minBM2>rQ2&&!piF&&!gaF&&baryn>2) // ==>Check ResidVirtualQuasm 4850 4887 //if(minBM2>rQ2&&!piF&&!gaF) // ==> Check of ResidualVirtualQuasmon 4851 //if(minBM2>rQ2&&baryn>2)//==>Check of ResidualVirtualQuasmon**OK**4852 //if(minBM2>rQ2&&baryn>1)//==>Check ResidualVirtualQuasm **Better**4853 //if(minBM2>rQ2&&piF&&(cPDG==90000001||cPDG==90002002))//CheckRVirQ4854 //if(minBM2>rQ2&&piF&&(cPDG==90000001||baryn>3))//CheckResidVirtQua4855 //if(minBM2>rQ2&&(piF&&cPDG==90000001||baryn>2))//CheckResidVirtQua4856 //if(minBM2>rQ2&&baryn>2) // ==> Check of Residual Virtual Quasmon4857 //if(minBM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//ResidVirtQuasmon4858 //if(minBM2>rQ2&&!piF&&baryn>2)//==>Check of ResidualVirtualQuasmon4859 //if(minBM2>rQ2&&!piF&&baryn>3)//==>Check of ResidualVirtualQuasmon4860 //if(minBM2>rQ2&&!piF&&baryn>1)//==>Check of ResidualVirtualQuasmon4861 //if(minBM2>rQ2&&!piF&&!gaF)// ==> Check of ResidualVirtualQuasmon4862 //if(minBM2>rQ2&&!piF)// ==> Check of ResidualVirtualQuasmon ALWAYS4863 //if(minBM2>rQ2&&piF&&baryn>3)//==>Check of ResidualVirtualQuasmon4864 //if(minBM2>rQ2&&piF&&(baryn==1||baryn>2))//==>Check ResidVirtQ4865 //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001||G4UniformRand()<.5)))4866 //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001)))4888 //if(minBM2>rQ2&&baryn>2)//==>Check of ResidualVirtualQuasmon**OK** 4889 //if(minBM2>rQ2&&baryn>1)//==>Check ResidualVirtualQuasm **Better** 4890 //if(minBM2>rQ2&&piF&&(cPDG==90000001||cPDG==90002002))//CheckRVirQ 4891 //if(minBM2>rQ2&&piF&&(cPDG==90000001||baryn>3))//CheckResidVirtQua 4892 //if(minBM2>rQ2&&(piF&&cPDG==90000001||baryn>2))//CheckResidVirtQua 4893 //if(minBM2>rQ2&&baryn>2) // ==> Check of Residual Virtual Quasmon 4894 //if(minBM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//ResidVirtQuasmon 4895 //if(minBM2>rQ2&&!piF&&baryn>2)//==>Check of ResidualVirtualQuasmon 4896 //if(minBM2>rQ2&&!piF&&baryn>3)//==>Check of ResidualVirtualQuasmon 4897 //if(minBM2>rQ2&&!piF&&baryn>1)//==>Check of ResidualVirtualQuasmon 4898 //if(minBM2>rQ2&&!piF&&!gaF)// ==> Check of ResidualVirtualQuasmon 4899 //if(minBM2>rQ2&&!piF)// ==> Check of ResidualVirtualQuasmon ALWAYS 4900 //if(minBM2>rQ2&&piF&&baryn>3)//==>Check of ResidualVirtualQuasmon 4901 //if(minBM2>rQ2&&piF&&(baryn==1||baryn>2))//==>Check ResidVirtQ 4902 //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001||G4UniformRand()<.5))) 4903 //if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001))) 4867 4904 //if(minBM2>rQ2&&(!piF&&baryn>4 || piF && cPDG!=90000001 && 4868 if (minBM2 > rQ2 && 4869 (!piF || 4870 (piF && 4871 cPDG != 90000001 && 4872 cPDG != 90001001 && 4873 cPDG != 90001002) ) ) 4874 //if(minBM2>rQ2) // ==> Check of Residual (Virtual?) Quasmon 4875 //if(2>3) 4905 if (minBM2 > rQ2 && 4906 ( !piF || 4907 ( piF 4908 && cPDG != 90000001 4909 && cPDG != 90001001 4910 && cPDG != 90001002 4911 ) 4912 ) 4913 ) 4914 //if(minBM2>rQ2) // ==> Check of Residual (Virtual?) Quasmon 4915 //if(2>3) 4876 4916 { 4877 4917 G4double nz=0.; … … 4880 4920 //if(atrest) nz=1.-(minBM2-rQ2+pmk*dkd)/(nucBM*(rEP+pmk)); 4881 4921 //else nz=1.-(minBM2-rQ2)/(nucBM*rEP); 4882 #ifdef pdebug 4922 #ifdef pdebug 4883 4923 if(pPrint) G4cout<<"G4Q::CHP:q="<<nz<<",a="<<atrest<<",QM2=" 4884 4924 <<minM2<<">"<<rQ2<<G4endl; 4885 #endif 4925 #endif 4886 4926 if(nz>0.&&nz<1.&&nz<ne) 4887 4927 { … … 4893 4933 } 4894 4934 // *** VRQ *** CHECK Min Residual Quazmon (Never use: reduces PS) 4895 //if(minM2>rQ2&&baryn>3) // ==> Check of Residual Quasmon4896 //if(minM2>rQ2&&!piF&&!gaF&&baryn>3)// ==> Check of ResidualQuasmon4897 //if(minM2>rQ2&&!piF&&baryn>1) // ==> Check of ResidualQuasmon4898 //if(minM2>rQ2&&!piF&&baryn>2) // ==> Check of ResidualQuasmon4899 //if(minM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//=>CheckResidQuasmon4900 //if(minM2>rQ2&&!piF&&baryn>3) // ==> Check Residual Quasmon **OK**4901 //if(minM2>rQ2&&!piF&&!gaF) // ==> Check of Residual Quasmon4902 //if(minM2>rQ2&&!piF) // ==> Check of Residual Quasmon4903 //if(minM2>rQ2&&piF) // ==> Check of Residual Quasmon4904 //if(minM2>rQ2&&baryn>1) // ==> Check Residual Quasmon **Better**4905 //if(minM2>rQ2&&(baryn>1||!piF))//==>CheckResidualQuasmon**Better**4906 //if(minM2>rQ2&&baryn>1&&cPDG!=90002002) //==> CheckResidualQuasmon4907 //if(minM2>rQ2&&!piF) // ==> Check of Residual Quasmon4908 //if(minM2>rQ2&&baryn>3) //=>CheckResidQuasmon *** The Best ***4909 //if(minM2>rQ2 && (!piF || piF &&4935 //if(minM2>rQ2&&baryn>3) // ==> Check of Residual Quasmon 4936 //if(minM2>rQ2&&!piF&&!gaF&&baryn>3)// ==> Check of ResidualQuasmon 4937 //if(minM2>rQ2&&!piF&&baryn>1) // ==> Check of ResidualQuasmon 4938 //if(minM2>rQ2&&!piF&&baryn>2) // ==> Check of ResidualQuasmon 4939 //if(minM2>rQ2&&!piF&&baryn>2&&cPDG!=90001002)//=>CheckResidQuasmon 4940 //if(minM2>rQ2&&!piF&&baryn>3) // ==> Check Residual Quasmon **OK** 4941 //if(minM2>rQ2&&!piF&&!gaF) // ==> Check of Residual Quasmon 4942 //if(minM2>rQ2&&!piF) // ==> Check of Residual Quasmon 4943 //if(minM2>rQ2&&piF) // ==> Check of Residual Quasmon 4944 //if(minM2>rQ2&&baryn>1) // ==> Check Residual Quasmon **Better** 4945 //if(minM2>rQ2&&(baryn>1||!piF))//==>CheckResidualQuasmon**Better** 4946 //if(minM2>rQ2&&baryn>1&&cPDG!=90002002) //==> CheckResidualQuasmon 4947 //if(minM2>rQ2&&!piF) // ==> Check of Residual Quasmon 4948 //if(minM2>rQ2&&baryn>3) //=>CheckResidQuasmon *** The Best *** 4949 //if(minM2>rQ2 && (!piF || piF && 4910 4950 //if(minM2>rQ2 && (!piF&&baryn>3 || piF && 4911 4912 if (minM2 > rQ2 &&4913 ( (!piF && baryn > 4) ||4914 (piF &&4915 (cPDG != 90000001 || G4UniformRand() > .3333333) &&4916 cPDG != 90001001) ))4917 //cPDG!=90001001) )4918 //if(minM2>rQ2) // ==> Check of Residual Quasmon4919 //if(2>3)4951 if ( minM2 > rQ2 && 4952 ( (!piF && baryn > 4) || 4953 (piF && (cPDG != 90000001 || G4UniformRand() > .3333333) && 4954 cPDG != 90001001) 4955 ) 4956 ) 4957 //cPDG!=90001001) ) 4958 //if(minM2>rQ2) // ==> Check of Residual Quasmon 4959 //if(2>3) 4920 4960 { 4921 4961 G4double nz=0.; … … 5072 5112 curParC->SetNQPart2(cNQ); // Keep #of quark-partons in theFragment 5073 5113 #ifdef sdebug 5074 G4cout<<"G4Q::CalcHP: FillParentClaster="<<*curParC<<G4endl;5114 G4cout<<"G4Q::CalcHP: FillParentClaster="<<*curParC<<G4endl; 5075 5115 #endif 5076 5116 curCand->FillPClustVec(curParC);//FillParentClust to ParClVec(d.e.) 5077 5117 comb += probab; 5078 5118 #ifdef pdebug 5079 if(pPrint) G4cout<<"G4Q::CHP:in="<<index<<",cPDG="<<cPDG<<",pc"<<pc5119 if(pPrint) G4cout<<"G4Q::CHP:in="<<index<<",cPDG="<<cPDG<<",pc"<<pc 5080 5120 <<parQC<<",Env="<<theEnvironment<<",comb="<<comb 5081 5121 <<",posib="<<parCand->GetParPossibility()<<G4endl; 5082 5122 #endif 5083 5123 pc++; 5084 }5085 }5124 } 5125 } 5086 5126 #ifdef sdebug 5087 else G4cout<<"***G4Q::CHP:dI="<<dI<<",cC="<<cC<<G4endl;5088 #endif 5089 }5090 } // >>>> End of if of QuarkExchangePossibility5091 } // +++> End of if of existinr residual Q Code5127 else G4cout<<"***G4Q::CHP:dI="<<dI<<",cC="<<cC<<G4endl; 5128 #endif 5129 } 5130 } // >>>> End of if of QuarkExchangePossibility 5131 } // +++> End of if of existinr residual Q Code 5092 5132 probability+=comb; // Collect the probability for the fragment 5093 5133 #ifdef pdebug 5094 if(pPrint) G4cout<<"G4Q::CHPr: probab="<<probability<<"("<<comb<<"),iq="<<iq5134 if(pPrint) G4cout<<"G4Q::CHPr: probab="<<probability<<"("<<comb<<"),iq="<<iq 5095 5135 <<",oq="<<oq<<G4endl; 5096 5136 #endif 5097 } // ...> End of Quark Exchange "oq" Test LOOP5098 } // ...> End of Quark Exchange "iq" Test LOOP5099 } // ---> End of Nuclear Case of fragmentation5137 } // ...> End of Quark Exchange "oq" Test LOOP 5138 } // ...> End of Quark Exchange "iq" Test LOOP 5139 } // ---> End of Nuclear Case of fragmentation 5100 5140 else if(cPDG<80000000) // ===> Hadron case (QUark FUsion mechanism) 5101 5141 { … … 5111 5151 if (curhPDG== 211) npip++; 5112 5152 if (curhPDG==-211) npin++; 5113 }5114 // End of the hadron counting5153 } 5154 // End of the hadron counting 5115 5155 comb = valQ.NOfCombinations(candQC); 5116 5156 if(!comb) … … 5163 5203 if (comb && resPDG && totMass > frM-CB+resTM && 5164 5204 ((resPDG > 80000000 && resPDG != 90000000) || resPDG<10000) ) 5165 {5205 { 5166 5206 #ifdef pdebug 5167 5207 if(priCon) G4cout<<"G4Q::CHP:ind="<<index<<",qQC="<<valQ<<mQ<<",cPDG="<<cPDG … … 5196 5236 #endif 5197 5237 if(resM>0. && resQCode>-2) 5198 {5238 { 5199 5239 G4double limM=mQ-resM; 5200 5240 G4double rndM=GetRandomMass(cPDG,limM);// Candidate's Mass randomization … … 5202 5242 G4double cMass=G4QPDGCode(cPDG).GetMass(); 5203 5243 if(aPDG<10000&&aPDG%10<3) 5204 //if(aPDG<10000&&aPDG%10<5)5205 G4cout<<"G4Q::CHP:rndM="<<rndM<<",limM="<<limM<<" > cM="<<cMass<<" ,rM+fM="5244 //if(aPDG<10000&&aPDG%10<5) 5245 G4cout<<"G4Q::CHP:rndM="<<rndM<<",limM="<<limM<<" > cM="<<cMass<<" ,rM+fM=" 5206 5246 <<resM+rndM<<" < mQ="<<mQ<<G4endl; 5207 5247 #endif 5208 5248 // --- Kinematical Factors --- 5209 5249 if(rndM>0. && resM+rndM<mQ) 5210 {5250 { 5211 5251 curCand->SetEBMass(rndM); // Set RandomizedEnvBoundMass of the Candidate 5212 5252 curCand->SetNBMass(rndM); // Set RandomizedNotBoundMass of the Candidate … … 5219 5259 //zMin= mR2/mQ/(mQ-dk); // z_min for Quasmon-Baryon @@ ?? @@ 5220 5260 if(qBar) zMin= mR2/mQ/(mQ-dk); // z_min for Quasmon-Baryon @@ ?? @@ 5221 G4double possibility=zMax-zMin;5261 G4double possibility=zMax-zMin; 5222 5262 #ifdef pdebug 5223 5263 if(priCon) G4cout<<"G4Q::CHP:M="<<rndM<<",ps="<<possibility<<",zMax="<<zMax … … 5226 5266 #endif 5227 5267 if (resPDG==10) // Chipolino case - check minimum 5228 {5268 { 5229 5269 G4double rM2 = mQk*(mQ-rHk); 5230 5270 if(rM2<resM*resM) possibility = 0.; 5231 5271 } 5232 5272 if (possibility>0. && vap>0 && zMax>zMin) 5233 {5273 { 5234 5274 probability = vaf*(pow(zMax, vap)-pow(zMin, vap)); 5235 5275 #ifdef pdebug … … 5249 5289 { 5250 5290 if(cPDG==110||cPDG==220||cPDG==330) probability*=comb; // f0 has spin 0 5251 else probability*=comb*(abs(cPDG)%10); // Spin of resonance5252 }5253 }5291 else probability*=comb*(abs(cPDG)%10); // Spin of resonance 5292 } 5293 } 5254 5294 } 5255 5295 else 5256 {5296 { 5257 5297 #ifdef pdebug 5258 5298 if(priCon) G4cout<<"G4Q::CHP:cM=0[cPDG"<<cPDG<<"],mQ/QC="<<mQ<<valQ<<",rM=" … … 5260 5300 #endif 5261 5301 } 5262 }5302 } 5263 5303 else 5264 {5304 { 5265 5305 #ifdef pdebug 5266 5306 if(priCon) G4cout<<"***G4Q::CHP: M=0, #"<<index<<valQ<<",cPDH="<<cPDG<<"+rP=" 5267 5307 <<resPDG<<curQ<<G4endl; 5268 5308 #endif 5269 }5309 } 5270 5310 } 5271 5311 else 5272 {5312 { 5273 5313 probability=0.; 5274 5314 #ifdef pdebug … … 5277 5317 <<"+rTM="<<resTM<<"-CB="<<CB<< G4endl; 5278 5318 #endif 5279 }5319 } 5280 5320 //if(cPDG==111) secondProbab = 1.; 5281 5321 }// ---> End of Hadronic Case of fragmentation … … 5344 5384 #endif 5345 5385 if(bsCond) // Decay rignht away in Fragment & residual 5346 {5386 { 5347 5387 G4QContent fragmQC=protQC; 5348 G4double fragmM=mProt;5388 G4double fragmM=mProt; 5349 5389 if(bsCond==2112) 5350 {5390 { 5351 5391 fragmQC=neutQC; 5352 fragmM=mNeut;5353 }5392 fragmM=mNeut; 5393 } 5354 5394 else if(bsCond==3122) 5355 {5395 { 5356 5396 fragmQC=lambQC; 5357 fragmM=mLamb;5358 }5397 fragmM=mLamb; 5398 } 5359 5399 else if(bsCond==90001001) 5360 {5400 { 5361 5401 fragmQC=deutQC; 5362 fragmM=mDeut;5363 }5402 fragmM=mDeut; 5403 } 5364 5404 else if(bsCond==90002002) 5365 {5405 { 5366 5406 fragmQC=alphQC; 5367 fragmM=mAlph;5368 }5407 fragmM=mAlph; 5408 } 5369 5409 G4QContent rsQC=valQ-fragmQC; 5370 5410 G4QNucleus rsQN(rsQC); // TemporaryNucleus for the ResidualVacuumQuasmon … … 5381 5421 FillHadronVector(fragH); // Fill ResidQuasmHadron (delete equivalent) 5382 5422 return true; 5383 }5423 } 5384 5424 else 5385 {5425 { 5386 5426 delete quasH; 5387 5427 delete fragH; 5388 }5428 } 5389 5429 } 5390 5430 } … … 5402 5442 G4QHadron* theLast = theQHadrons[nOfOUT-1]; 5403 5443 if(!(theLast->GetNFragments()) && theLast->GetPDGCode()!=22)//NotDecayedHadron & NotGam 5404 {5444 { 5405 5445 G4LorentzVector hadr4M=theLast->Get4Momentum(); 5406 5446 G4double hadrMa=hadr4M.m(); // Mass of the Last hadron (==GSMass) 5407 5447 G4LorentzVector tmpTLV=reTLV+hadr4M;// Tot (ResidNucl+LastHadron) 4-Mom 5408 5448 #ifdef pdebug 5409 G4cout<<"G4Q::CheckGS:YES,T="<<tmpTLV<<tmpTLV.m()<<">rM+hM="<<resSMa+hadrMa<<G4endl;5449 G4cout<<"G4Q::CheckGS:YES,T="<<tmpTLV<<tmpTLV.m()<<">rM+hM="<<resSMa+hadrMa<<G4endl; 5410 5450 #endif 5411 5451 if(tmpTLV.m()>resSMa+hadrMa) // resMa contains 2 Hadrons: resQ and Environ … … 5430 5470 FillHadronVector(quasH); // Fill ResidQuasm Hadron (del.equiv.) 5431 5471 theLast->Set4Momentum(hadr4M); 5432 }5433 }5472 } 5473 } 5434 5474 else //=>"The Env is vacuum" case (DecayIn2) 5435 5475 { … … 5448 5488 quasH->Set4Momentum(quas4M); 5449 5489 FillHadronVector(quasH); // Fill ResidQuasmHadron (del.equivalent) 5450 }5451 }5490 } 5491 } 5452 5492 } 5453 5493 else // "CORRECTION" !!!! 5454 5494 { 5455 5495 if(nOfOUT>1 && corFlag) 5456 {5496 { 5457 5497 G4QHadron* thePrev = theQHadrons[nOfOUT-2];// Get pointer to prev-before-lastHad 5458 5498 if(thePrev->GetNFragments()||thePrev->GetPDGCode()==22)return false;//DecH or Gam … … 5465 5505 G4double totNMa=tmpTLV.m(); // RealMass of TotResidualNucleus 5466 5506 #ifdef pdebug 5467 G4cout<<"G4Q::CheckGS:NO, M="<<tmpTLV<<totNMa<<">"<<totQMa+hadrMa+prevMa<<G4endl;5507 G4cout<<"G4Q::CheckGS:NO, M="<<tmpTLV<<totNMa<<">"<<totQMa+hadrMa+prevMa<<G4endl; 5468 5508 #endif 5469 5509 if(totNMa>totQMa+hadrMa+prevMa) … … 5484 5524 thePrev->Set4Momentum(prev4M); 5485 5525 #ifdef pdebug 5486 G4cout<<"G4Q::CheckGS: Yes, Check D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl;5487 #endif 5488 }5489 }5526 G4cout<<"G4Q::CheckGS: Yes, Check D4M="<<tmpTLV-hadr4M-prev4M-nuc4M<<G4endl; 5527 #endif 5528 } 5529 } 5490 5530 else // Decay in one hadron, absorb other 5491 {5531 { 5492 5532 G4QContent tmpLNQ=totQC+thePrev->GetQC(); 5493 5533 G4int resLPDG =tmpLNQ.GetSPDGCode(); … … 5498 5538 //////G4bool which = true; // LastH is absorbed, PrevH is radiated 5499 5539 #ifdef pdebug 5500 G4cout<<"G4Quasm::CheckGS: NO, tM="<<totNMa<<" > rp+l="<<resLastM+hadrMa5540 G4cout<<"G4Quasm::CheckGS: NO, tM="<<totNMa<<" > rp+l="<<resLastM+hadrMa 5501 5541 <<" || > rl+p="<<resPrevM+prevMa<<G4endl; 5502 5542 #endif 5503 5543 if (totNMa>resLastM+hadrMa) // "Just exclude the Prev" case 5504 {5544 { 5505 5545 theQHadrons.pop_back(); // theLast* is excluded from OUTPUT HV 5506 5546 theQHadrons.pop_back(); // thePrev* is excluded from OUTPUT HV … … 5511 5551 resPrevM=resLastM; 5512 5552 prev4M = hadr4M; 5513 }5553 } 5514 5554 else if (totNMa>resPrevM+prevMa) // "Just exclude the Last" case 5515 {5555 { 5516 5556 theQHadrons.pop_back(); 5517 5557 delete theLast; 5518 }5558 } 5519 5559 else return false; 5520 5560 G4LorentzVector nuc4M = G4LorentzVector(0.,0.,0.,resPrevM);//ResNucl4m to PrevH … … 5532 5572 thePrev->Set4Momentum(prev4M); 5533 5573 #ifdef pdebug 5534 G4cout<<"G4Q::CheckGS:Yes, Check D4M="<<tmpTLV-prev4M-nuc4M<<G4endl;5535 #endif 5536 }5537 }5538 }5574 G4cout<<"G4Q::CheckGS:Yes, Check D4M="<<tmpTLV-prev4M-nuc4M<<G4endl; 5575 #endif 5576 } 5577 } 5578 } 5539 5579 else return false; 5540 5580 } 5541 }5581 } 5542 5582 else return false; 5543 5583 } … … 5566 5606 G4int i=0; 5567 5607 if(nChan>1) 5568 {5608 { 5569 5609 G4double rnd = G4UniformRand(); // Random value to select a Decay Channel 5570 5610 for(i=0; i<nChan; i++) 5571 {5611 { 5572 5612 G4QDecayChan* dC = decV[i]; // The i-th Decay Channel 5573 5613 #ifdef pdebug … … 5576 5616 #endif 5577 5617 if(rnd<dC->GetDecayChanLimit() && m>dC->GetMinMass()) break; 5578 }5618 } 5579 5619 if(i>nChan-1) i=nChan-1; 5580 }5620 } 5581 5621 G4QPDGCodeVector cV=decV[i]->GetVecOfSecHadrons();// PDGVector of theSelectedDecChannel 5582 5622 G4int nPart=cV.size(); // A#of particles to decay in 5583 5623 #ifdef pdebug 5584 G4cout<<"G4Quasmon::DecayQHadron: resi="<<i<<",nP="<<nPart<<":"<<cV[0]->GetPDGCode()5624 G4cout<<"G4Quasmon::DecayQHadron: resi="<<i<<",nP="<<nPart<<":"<<cV[0]->GetPDGCode() 5585 5625 <<","<<cV[1]->GetPDGCode(); 5586 5626 if(nPart>2) G4cout<<","<<cV[2]->GetPDGCode(); … … 5591 5631 G4cerr<<"---Warning---G4Q::DecayQHadr:n="<<nPart<<",ch#"<<i<<",PDG="<<thePDG<<G4endl; 5592 5632 return false; 5593 }5633 } 5594 5634 #ifdef pdebug 5595 5635 G4cout<<"G4Q::DecQH:Decay("<<ElMaDecays<<") PDG="<<thePDG<<t<<m<<",nP="<<nPart<<G4endl; 5596 5636 #endif 5597 5637 if(nPart==2) 5598 {5638 { 5599 5639 G4QHadron* fHadr; 5600 5640 G4QHadron* sHadr; … … 5607 5647 #endif 5608 5648 if(cV[0]->GetWidth()==0.) 5609 { // Randomize only the second Hardon or none5649 { // Randomize only the second Hardon or none 5610 5650 fHadr = new G4QHadron(cV[0]->GetPDGCode()); // the First Hadron is created *1* 5611 5651 if(cV[1]->GetWidth()==0.)sHadr = new G4QHadron(sPDG);//theSecondHadron is created 5612 5652 else 5613 {5653 { 5614 5654 G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for theSecondHadron 5615 5655 G4double sdm = m - fHadr->GetMass(); // MaxMassLimit for the 2-nd Hadron … … 5617 5657 if(sPDG<0) sHadr->MakeAntiHadron(); 5618 5658 } 5619 }5659 } 5620 5660 else // Randomize masses ofBothHadrons 5621 {5661 { 5622 5662 G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for theSecondHadron 5623 5663 G4double mim = sPart->MinMassOfFragm(); // MinMassLimit for theSecondHadr … … 5650 5690 delete sHadr; // Delete "new sHadr" 5651 5691 G4cerr<<"---Warning---G4Q::DecayQHadron:in2,PDGC="<<thePDG<<", ch#"<<i<<": 4M=" 5652 <<qH->Get4Momentum()<<"("<<qH->GetMass()<<")->"<<f4Mom<<"+"<<s4Mom<<G4endl;5692 <<qH->Get4Momentum()<<"("<<qH->GetMass()<<")->"<<f4Mom<<"+"<<s4Mom<<G4endl; 5653 5693 //throw G4QException("***Exception***G4Q::DecayQHadron: Failed to decay in 2"); 5654 5694 theFragments->push_back(qH); // Fill as it is (del.equiv.) 5655 5695 return theFragments; 5656 }5696 } 5657 5697 else 5658 5698 { … … 5669 5709 #endif 5670 5710 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay 5671 else for(G4int ip1=0; ip1<nProd; ip1++)5711 else for(G4int ip1=0; ip1<nProd; ip1++) 5672 5712 { 5673 5713 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]); … … 5694 5734 #endif 5695 5735 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay 5696 else for(G4int ip1=0; ip1<nProd; ip1++)5736 else for(G4int ip1=0; ip1<nProd; ip1++) 5697 5737 { 5698 5738 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]); … … 5716 5756 G4cout<<"G4Q::DecQHadr: DecayIn2 is made with nH="<<theFragments->size()<<G4endl; 5717 5757 #endif 5718 }5758 } 5719 5759 else 5720 5760 { … … 5723 5763 #endif 5724 5764 theFragments->push_back(qH); // Fill hadron as it is (del.equivalent) 5725 }5765 } 5726 5766 } 5727 5767 else if(nPart==3) 5728 {5768 { 5729 5769 G4QHadron* fHadr; 5730 5770 G4QHadron* sHadr; … … 5740 5780 #endif 5741 5781 if(cV[0]->GetWidth()==0.) // Don't randomize theFirstHardon 5742 {5782 { 5743 5783 fHadr = new G4QHadron(fPDG); // theFirst Hadron is created *1* 5744 5784 if(cV[1]->GetWidth()==0.) … … 5747 5787 if(cV[2]->GetWidth()==0.)tHadr = new G4QHadron(tPDG);//theThirdHadron isCreated 5748 5788 else 5749 {5789 { 5750 5790 G4QParticle* tPart=theWorld->GetQParticle(cV[2]);// Pt for the3-rdH 5751 5791 G4double tdm = m-fHadr->GetMass()-sHadr->GetMass();// MaxMass for the 2d Hadr 5752 5792 tHadr = new G4QHadron(tPart,tdm); //the3rdHadron is created 5753 5793 if(tPDG<0) tHadr->MakeAntiHadron(); 5754 }5794 } 5755 5795 } 5756 5796 else // Randomize 2nd & 3rd Hadrons 5757 {5797 { 5758 5798 m-=fHadr->GetMass(); // Reduce the residual MaxMass 5759 5799 G4QParticle* tPart=theWorld->GetQParticle(cV[2]);// Pt for the 3-rd Hadron … … 5767 5807 if(tPDG<0) tHadr->MakeAntiHadron(); 5768 5808 } 5769 }5809 } 5770 5810 else // Randomize masses of all three Hadrons 5771 {5811 { 5772 5812 G4QParticle* sPart=theWorld->GetQParticle(cV[1]);//Pt for theSecondHadr 5773 5813 G4double smim = sPart->MinMassOfFragm(); // MinMassLim for theSecondHadron … … 5807 5847 theFragments->push_back(qH); // Fill as it is (delete equivalent) 5808 5848 return false; 5809 }5849 } 5810 5850 else 5811 5851 { … … 5822 5862 #endif 5823 5863 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay 5824 else for(G4int ip1=0; ip1<nProd; ip1++)5864 else for(G4int ip1=0; ip1<nProd; ip1++) 5825 5865 { 5826 5866 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]); … … 5848 5888 #endif 5849 5889 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay 5850 else for(G4int ip1=0; ip1<nProd; ip1++)5890 else for(G4int ip1=0; ip1<nProd; ip1++) 5851 5891 { 5852 5892 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]); … … 5874 5914 #endif 5875 5915 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay 5876 else for(G4int ip1=0; ip1<nProd; ip1++)5916 else for(G4int ip1=0; ip1<nProd; ip1++) 5877 5917 { 5878 5918 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]); … … 5897 5937 G4cout<<"G4Q::DecQHadr: DecayIn3 is made with nH="<<theFragments->size()<<G4endl; 5898 5938 #endif 5899 }5939 } 5900 5940 else theFragments->push_back(qH); // Fill hadron as it is (del.equivalent) 5901 5941 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/src/G4QuasmonString.cc
r1007 r1055 28 28 // 29 29 // 30 // $Id: G4QuasmonString.cc,v 1. 7 2006/11/27 10:44:55mkossov Exp $31 // GEANT4 tag $Name: geant4-09-0 2$30 // $Id: G4QuasmonString.cc,v 1.8 2009/02/23 09:49:24 mkossov Exp $ 31 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 32 32 // 33 33 // ---------------- G4QuasmonString ---------------- 34 34 // by Mikhail Kossov, August 2000. 35 35 // class for Hadron-Hadron String Interaction used by the CHIPS Model 36 // ------------------------------------------------------------------- 37 // Short description: The Quark-Gluon String can fragment in hadrons 38 // (QGS), small hadronic clusters (HERWIG) or in unlimited in mass 39 // Quasmons, defined by the G4QPartonPair. This class is made to 40 // simulate the string fragmentation in Quasmons, which hadronize in 41 // vacuuum or in nuclear environment. 36 42 // ------------------------------------------------------------------- 37 43 … … 71 77 theWorld= G4QCHIPSWorld::Get(); // Get a pointer to the CHIPS World 72 78 #ifdef debug 73 G4cout<<"-->G4Q String::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;79 G4cout<<"-->G4QuasStr::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl; 74 80 #endif 75 81 // Target initialization … … 84 90 // Projectile initialization 85 91 theProj4Mom = projHadron.Get4Momentum(); 86 G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS92 G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS 87 93 G4ThreeVector projRBoost= -projBoost; // Projevtile Boost vector to projectile CMS 88 94 G4QPDGCode projQPDG(projHadron.GetPDGCode()); … … 97 103 G4double tM2 = tM*tM; 98 104 G4double dM2 = fabs(pM2-projM2); 99 if(dM2>1.) G4cout<<"-Wor-G4Q S::Constr:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;105 if(dM2>1.) G4cout<<"-Wor-G4QuStr::Cons:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl; 100 106 G4double pM=sqrt(pM2); // @@ do we need pM ? @@ (in print) 101 107 102 108 // === Print out of the input information at Creation time & tot 4-mom Calculation ====== 103 109 #ifdef pdebug 104 G4cout<<"G4Q S::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<105 theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;106 G4cout<<"G4Q Str::Constr: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;110 G4cout<<"G4QuaString::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<< 111 theProj4Mom.m2()<<theProj4Mom.m()<<G4endl; 112 G4cout<<"G4QuaString::C: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl; 107 113 #endif 108 114 //G4int nP=theWorld->GetQPEntries(); // A#of init'ed particles in CHIPS World (@@?) 109 115 //G4int nCl=nP-90; // A#of init'ed clusters in CHIPS World (@@?) 110 //#ifdef pdebug116 //#ifdef pdebug 111 117 //G4cout<<"G4QS:Const:Before QEX:n="<<nP<<G4endl; 112 //#endif118 //#endif 113 119 // @@@@@@ ===> Here the Quark Exchange Quasmon Creation must be added <=== @@@@@@ 114 120 // @@ --- old --- … … 136 142 // @@ --- end --- 137 143 #ifdef pdebug 138 G4cout<<"G4Q Str::Constr: nP="<<nQProj<<", nT="<<nQTarg<<G4endl;144 G4cout<<"G4QuasmonString::Constr: nP="<<nQProj<<", nT="<<nQTarg<<G4endl; 139 145 #endif 140 146 // @@ Now projectile can be only meson or baryon @@ -- @@ Improve for clusters @@ -- … … 143 149 G4bool FreeFraF=false; // Prototype of the free exchange Flag 144 150 if(G4UniformRand()<FreeFra) FreeFraF=true; // Confirm the free exchange 145 if(nQProj<2) G4cout<<"***G4Q St::Constr: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl;146 else if(nQProj>2) // ---> Baryon case (clusters are not implem.)147 {151 if(nQProj<2) G4cout<<"***G4QuaStr::Con: nQProj="<<nQProj<<"<2 ***FatalError***"<<G4endl; 152 else if(nQProj>2) // ---> Baryon case (clusters are not implem.) 153 { 148 154 //if(nQProj>3)G4cout<<"-Wor-G4QS::Const:nQProj="<<nQProj<<">3 is not implem'd"<<G4endl; 149 155 G4double xP=0.; … … 153 159 xP=RandomizeMomFractionString(nQProj); 154 160 theWeight*=pow(xP,interc); 155 G4cout<<"************G4Q S::C: string xP="<<xP<<G4endl;161 G4cout<<"************G4QuasmonString::Constr: string xP="<<xP<<G4endl; 156 162 } 157 163 rPMass = sqrt(pM2*(1.-xP)); // Residual Projectile mass … … 166 172 if(tmpBl) projFl=true; // Proj decay is OK 167 173 //if(projHadron.DecayIn2(pq4Mom,pr4Mom)) projFl=true; 168 else G4cout<<"**W orning**G4QuasmonString::Constr:ProjDecIn2 rpM="<<rPMass<<",pM="<<pM<<G4endl;169 #ifdef pdebug 170 G4cout<<"G4Q Str::Con:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;174 else G4cout<<"**Warning**G4QuasmonString::C:ProjDecIn2 rpM="<<rPMass<<",pM="<<pM<<G4endl; 175 #ifdef pdebug 176 G4cout<<"G4QuaStr::C:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl; 171 177 #endif 172 178 G4LorentzVector tq4Mom(0.,0.,0.,0.); // Prototype of LV of quark of the target … … 179 185 xT=RandomizeMomFractionString(nQTarg); 180 186 theWeight*=pow(xT,interc); 181 G4cout<<"************G4Q S::C: string xT="<<xT<<G4endl;187 G4cout<<"************G4QuaString::Constr: string xT="<<xT<<G4endl; 182 188 } 183 189 G4double rTMass = sqrt(tM2*(1.-xT)); // Residual Target mass 184 190 #ifdef pdebug 185 G4cout<<"G4Q S::C: nQTarg="<<nQTarg<<", xProj="<<xT<<", rTMass="<<rTMass<<G4endl;191 G4cout<<"G4QuaString::C: nQTarg="<<nQTarg<<", xProj="<<xT<<", rTMass="<<rTMass<<G4endl; 186 192 #endif 187 193 G4LorentzVector tr4Mom(0.,0.,0.,rTMass); // Prototype of LV of the residual projectile 188 194 if(targHadron.DecayIn2(tq4Mom,tr4Mom)) targFl=true; // Targ decay is OK 189 else G4cout<<"**Worning**G4Q Str::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;190 #ifdef pdebug 191 G4cout<<"G4Q Str::Con:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;195 else G4cout<<"**Worning**G4QuaStr::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl; 196 #ifdef pdebug 197 G4cout<<"G4QuaStr::C:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl; 192 198 #endif 193 199 G4bool elasFl=false; // ByDefault avoid the elastic scattering … … 208 214 // @@ Just to try ---- End 209 215 #ifdef pdebug 210 G4cout<<"G4Q S::Cons:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;216 G4cout<<"G4QuaStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl; 211 217 #endif 212 218 if(npM<pM+mPi0) // The projectile is under min mass (@@ In Future put other cut @@) 213 219 { 214 220 G4double valk=tq4Mom.e(); // Momentum of the target quark 215 //#ifdef pdebug221 //#ifdef pdebug 216 222 G4double dvalk=valk-tq4Mom.rho(); 217 if(fabs(dvalk)>.00001) G4cout<<"** *kp***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;218 //#endif223 if(fabs(dvalk)>.00001) G4cout<<"**kp**G4QuaStr::C:vk="<<valk<<",dvk="<<dvalk<<G4endl; 224 //#endif 219 225 G4double dmas=pM2-pr4Mom.m2(); // Difference of squared masses 220 226 G4double vale=pr4Mom.e(); … … 226 232 { 227 233 #ifdef pdebug 228 G4cout<<"***p***>>>G4Q S::C: cost="<<cost<<G4endl;234 G4cout<<"***p***>>>G4QuasmonString::Constr: cost="<<cost<<G4endl; 229 235 #endif 230 236 // Get max value of |cos(theta)| and change tq value to get the pM on mass shell … … 238 244 } 239 245 else // --->>> cost<0. 240 {246 { 241 247 G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM) 242 248 if(hvalk>tM) // Momentum can not be increased to this value 243 249 { 244 250 #ifdef pdebug 245 G4cout<<"**p-Cor**>G4Q S::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas<<", e="246 << vale<<", p="<<valp<<", ct="<<cost<<G4endl;251 G4cout<<"**p-Cor**>G4QuaStr::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas 252 <<", e="<<vale<<", p="<<valp<<", ct="<<cost<<G4endl; 247 253 #endif 248 254 // Put the scatteredProjectile on the massShell, and rescatter the target quark … … 252 258 pq4Mom=G4LorentzVector(0.,0.,0.,0.); // NewProjParton on lightMassShell 253 259 tmpBl=tmpHadron.DecayIn2(newProj4M,pq4Mom); // Decay the Compound in newProg+pQ 254 if(!tmpBl)G4cout<<"G4QS::C:DecIn2 err "<<sqrt(tmpProj4M.m2())<<"<"<<pM<<G4endl; 260 if(!tmpBl) 261 G4cout<<"G4QuaStr::Con: DecIn2 err "<<sqrt(tmpProj4M.m2())<<"<"<<pM<<G4endl; 255 262 } 256 263 else 257 {258 #ifdef pdebug 259 G4cout<<"***---***>G4Q S::C: hvalk="<<hvalk<<" < tM="<<tM<<G4endl;264 { 265 #ifdef pdebug 266 G4cout<<"***---***>G4QuasmonStr::Constr: hvalk="<<hvalk<<" < tM="<<tM<<G4endl; 260 267 #endif 261 268 valk=hvalk/2; // Momentum is too small (must be reduced) … … 266 273 } 267 274 } 268 if(fabs(newProj4M.m()-pM)>.0001)G4cout<<"G4QS::C:"<<newProj4M.m()<<","<<pM<<G4endl; 275 if(fabs(newProj4M.m()-pM)>.0001) 276 G4cout<<"*G4QuaString::Constr: Change of mass "<<newProj4M.m()<<"#"<<pM<<G4endl; 269 277 } 270 278 else … … 272 280 // Turn the target quark-parton to the projectile residual in LS = CMSofTheTarget 273 281 #ifdef pdebug 274 G4cout<<"---p--->>>G4Q S::C: cost="<<cost<<G4endl;282 G4cout<<"---p--->>>G4QuasmonString::Constr: cost="<<cost<<G4endl; 275 283 #endif 276 284 G4ThreeVector tq=tq4Mom.v(); // 3-mom of the targetQ (LS) … … 286 294 tq4Mom.setV(tqf); // Change the momentum direction of targetQ 287 295 tr4Mom.setV(-tqf); // Change the momentum direction of targetR 288 if(fabs(tqf.mag()-valk)>.0001)G4cout<<"*G4QS::C:||="<<tqf.mag()<<","<<valk<<G4endl; 296 if(fabs(tqf.mag()-valk)>.0001) 297 G4cout<<"*G4QuasmonString::Constr: |k|="<<tqf.mag()<<" # "<<valk<<G4endl; 289 298 newProj4M=tq4Mom+pr4Mom; 290 if(fabs(newProj4M.m()-pM)>.001)G4cout<<"*G4QS::C:"<<newProj4M.m()<<","<<pM<<G4endl; 299 if(fabs(newProj4M.m()-pM)>.001) 300 G4cout<<"*G4QuasmonString::Constr: M="<<newProj4M.m()<<" # "<<pM<<G4endl; 291 301 } 292 302 #ifdef pdebug 293 G4cout<<"G4Q Str::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;303 G4cout<<"G4QuaStr::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl; 294 304 #endif 295 305 pcorFl=true; // Projectile is on the GS mass shell … … 303 313 //ntM=sqrt(nTM2); 304 314 #ifdef pdebug 305 G4cout<<"G4Q Str::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;315 G4cout<<"G4QuaStr::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl; 306 316 #endif 307 317 if(ntM<tM+mPi0 && !pcorFl) // The target is under min mass (@@ InFut put another cut@@) … … 311 321 pqc4M.boost(projRBoost); // projectileQuark => projCM system <step2> 312 322 G4double valk=pqc4M.e(); // Momentum of the target quark in projCM 313 //#ifdef pdebug323 //#ifdef pdebug 314 324 G4double dvalk=valk-pqc4M.rho(); 315 if(fabs(dvalk)>.00001) G4cout<<"***kt***G4Q S::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;316 //#endif325 if(fabs(dvalk)>.00001) G4cout<<"***kt***G4QuaS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl; 326 //#endif 317 327 G4double dmas=tM2-tr4Mom.m2(); // Difference of squared masses (targ - targRes) 318 328 G4LorentzVector trc4M=tr4Mom; // targetResidual => projCM system <step1> … … 321 331 G4ThreeVector tr=trc4M.v(); // 3-mom of the targetResidual in projCM 322 332 G4double valp=tr.mag(); // momentum of the targetResidual in projCM 323 if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4Q S::C: trM2="<<tr4Mom.m2()<<"="333 if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QuaStr::C: trM2="<<tr4Mom.m2()<<"=" 324 334 <<trc4M.m2()<<","<<vale*vale-valp*valp<<G4endl; 325 335 G4ThreeVector utr=tr/valp; // Unit vector in the tr direction in projCM … … 328 338 { 329 339 #ifdef pdebug 330 G4cout<<"***t***>>>G4Q S::C: cost="<<cost<<G4endl;340 G4cout<<"***t***>>>G4QuasmonString::Constr: cost="<<cost<<G4endl; 331 341 #endif 332 342 // Get max value of |cos(theta)| and change pq value to get the tM on mass shell … … 344 354 } 345 355 else // --->>> cost<-1 => cost=-1 346 {356 { 347 357 G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM) 348 358 if(hvalk>pM) // Momentum can not be increased to this value 349 359 { 350 360 #ifdef pdebug 351 G4cout<<"**t-Cor**>G4Q S::C: hvalk="<<hvalk<<" > pM="<<pM<<", dm="<<dmas<<", e="352 << vale<<", p="<<valp<<", ct="<<cost<<G4endl;361 G4cout<<"**t-Cor**>G4QuasmonString::C: hvalk="<<hvalk<<" > pM="<<pM<<", dm=" 362 <<dmas<<", e="<<vale<<", p="<<valp<<", ct="<<cost<<G4endl; 353 363 #endif 354 364 // Put the scatteredProjectile on the massShell, rescatter the targetQuark (LS) … … 358 368 tq4Mom=G4LorentzVector(0.,0.,0.,0.); // NewTargParton on lightMassShell 359 369 tmpBl=tmpHadron.DecayIn2(newTarg4M,tq4Mom); // Decay the Compound in newTarg+tQ 360 if(!tmpBl)G4cout<<"G4QS::C:DecIn2-err "<<sqrt(tmpTarg4M.m2())<<"<"<<tM<<G4endl; 370 if(!tmpBl) 371 G4cout<<"G4QuaString::C: DecIn2-err "<<sqrt(tmpTarg4M.m2())<<"<"<<tM<<G4endl; 361 372 } 362 373 else 363 {364 #ifdef pdebug 365 G4cout<<"***---***>G4Q S::C: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;374 { 375 #ifdef pdebug 376 G4cout<<"***---***>G4QuaString::Constr: hvalk="<<hvalk<<" < pM="<<pM<<G4endl; 366 377 #endif 367 378 valk=hvalk/2; // Momentum is too small (mustBeIncreased) … … 372 383 G4LorentzVector nTc4M=pqc4M+trc4M; 373 384 #ifdef pdebug 374 G4cout<<"G4Q S::C:After Boost="<<projBoost<<G4endl;375 G4cout<<"G4Q S::C:Aft:q="<<pqc4M<<pqc4M.m2()<<",t="<<nTc4M<<nTc4M.m2()<<G4endl;376 G4cout<<"G4Q S::C:E="<<nTc4M.e()<<" = q="<<pqc4M.e()<<"="<<valk<<" + r="<<377 trc4M.e()<<"="<<vale<<" = "<<pqc4M.e()+trc4M.e()<<",c="<<pq4Mom<<G4endl;378 if(fabs(nTc4M.m()-tM)>.0001) G4cout<<"*G4Q S::C:"<<nTc4M.m()<<"!="<<tM<<G4endl;385 G4cout<<"G4QuasmonString::Constr:After Boost="<<projBoost<<G4endl; 386 G4cout<<"G4QuS::C:Aft:q="<<pqc4M<<pqc4M.m2()<<",t="<<nTc4M<<nTc4M.m2()<<G4endl; 387 G4cout<<"G4QuaStr::C:E="<<nTc4M.e()<<" = q="<<pqc4M.e()<<"="<<valk<<" + r="<< 388 trc4M.e()<<"="<<vale<<" = "<<pqc4M.e()+trc4M.e()<<",c="<<pq4Mom<<G4endl; 389 if(fabs(nTc4M.m()-tM)>.0001) G4cout<<"*G4QuS::C:"<<nTc4M.m()<<"!="<<tM<<G4endl; 379 390 G4double pp=pqf.dot(tr); // trc3M*pqc=-valk*valp 380 391 G4double ee=vale*valk; … … 383 394 G4double sen=nTc4M.e(); 384 395 G4double smo=nTc4M.rho(); 385 G4cout<<"G4Q S::C:qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<<386 vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;396 G4cout<<"G4QuaStr::C: qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<< 397 vale+valk<<", P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl; 387 398 #endif 388 399 G4LorentzVector prc4M(pM-valk,-pqf); // Fill new 4-mom for projectResid in CM … … 393 404 } 394 405 if(fabs(newTarg4M.m()-tM)>.0001) 395 G4cout<<"**************** **************G4QS::C:"<<newTarg4M.m()<<"="<<pM<<G4endl;406 G4cout<<"****************G4QuasmonString::C: M="<<newTarg4M.m()<<"="<<pM<<G4endl; 396 407 } 397 408 else // -1<cos(theta)<1 - only rotate the projQ … … 399 410 // Turn the projectile quark-parton to the target residual in CMS of the Projectile 400 411 #ifdef pdebug 401 G4cout<<"---t--->>>G4Q S::C: cost="<<cost<<G4endl;412 G4cout<<"---t--->>>G4QuasmonString::Constr: cost="<<cost<<G4endl; 402 413 #endif 403 414 G4LorentzVector prc4M=pr4Mom; // projectileQuark => projCM system <step1> … … 419 430 #ifdef pdebug 420 431 G4LorentzVector nT4M=pqc4M+trc4M; 421 if(fabs(nT4M.m()-tM)>.001)G4cout<<"** **t****G4QS::C:M="<<nT4M.m()<<"="<<tM<<G4endl;432 if(fabs(nT4M.m()-tM)>.001)G4cout<<"**t**G4QuaStr::C:M="<<nT4M.m()<<"="<<tM<<G4endl; 422 433 #endif 423 434 pr4Mom=prc4M; // <step1> // Fill new 4-mom for projResidual in LS 424 435 pr4Mom.boost(projBoost); // <step2> // Fill new 4-mom for projResidual in LS 425 if(fabs(pqf.mag()-valk)>.0001)G4cout<<"*G4QS::C:||="<<pqf.mag()<<"="<<valk<<G4endl; 436 if(fabs(pqf.mag()-valk)>.0001) 437 G4cout<<"*G4QuasmonString::Constr: |k|="<<pqf.mag()<<"="<<valk<<G4endl; 426 438 newTarg4M=pq4Mom+tr4Mom; 427 if(fabs(newTarg4M.m()-tM)>.001)G4cout<<"*G4QS::C:"<<newTarg4M.m()<<"="<<tM<<G4endl; 439 if(fabs(newTarg4M.m()-tM)>.001) 440 G4cout<<"*G4QuasmonString::Constr: M="<<newTarg4M.m()<<"="<<tM<<G4endl; 428 441 } 429 442 #ifdef pdebug 430 G4cout<<" G4QStr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;443 G4cout<<"*G4QuaStr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl; 431 444 #endif 432 445 tcorFl=true; // Target is on the GS mass shell … … 435 448 npM=sqrt(nPM2); 436 449 #ifdef pdebug 437 G4cout<<"G4Q Str::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" ="<<pM+mPi0<<G4endl;450 G4cout<<"G4QuaStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<"="<<pM+mPi0<<G4endl; 438 451 #endif 439 452 if(npM<pM+mPi0) elasFl=true; // Force elastic scattering (@@InFut putAnotherCut@@) … … 444 457 // **** Put the hadrons on the mass shell conserving the CMS scattering angle **** 445 458 G4LorentzVector theTot4M=theProj4Mom+theTarg4Mom;// 4-momentum of CMS of "targ+proj" 446 G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"459 G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS" 447 460 G4ThreeVector cmsRBoost= -cmsBoost; // CMS Boost Vector "LS to CMS" 448 461 G4LorentzVector cmsProj4M=theProj4Mom; // LS projectile => CMS <step1> … … 454 467 if(fabs(cmsTarg4M.rho()-pcm) > 0.0001) 455 468 G4cout<<"-Worning-G4QuasmonString::Constr: P="<<cmsTarg4M.rho()<<"#"<<pcm<<G4endl; 456 //#endif469 //#endif 457 470 G4LorentzVector cmsNewPr4M=newProj4M; // LS finalProj => CMS <step1> 458 471 cmsNewPr4M.boost(cmsRBoost); // LS finalProj => CMS <step2> … … 464 477 if(1.+puV.dot(tuV) > 0.001) 465 478 G4cout<<"-Worning-G4QuasmonString::Constr: ct="<<puV.dot(tuV)<<G4endl; 466 //#endif479 //#endif 467 480 cmsProj4M.setV(puV*pcm); 468 481 newProj4M=cmsProj4M; … … 501 514 theQHadrons.push_back(targH); // Fill the Target Hadron (delete equivalent) 502 515 } 503 else // Both are excited (two Quasmons only)516 else // Both are excited (two Quasmons only) 504 517 { 505 518 G4Quasmon* projQ = new G4Quasmon(projHadron.GetQC(),newProj4M); … … 530 543 finBaryoN+=theQuasmons[iq]->GetBaryonNumber(); 531 544 } 532 G4cout<<"G4Q Str::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;545 G4cout<<"G4QuaStr::C:n="<<nHad<<",N="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl; 533 546 if(finCharge!=totCharge || finBaryoN!=totBaryNum) 534 547 { 535 G4cerr<<"***G4Q Str::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum548 G4cerr<<"***G4QuasmonString::C: tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum 536 549 <<",B="<<finBaryoN<<G4endl; 537 550 if(nHad) for(G4int h=0; h<nHad; h++) 538 551 { 539 552 G4QHadron* cH = theQHadrons[h]; 540 G4cerr<<" ::G4QS::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;553 G4cerr<<">G4QuaStr::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl; 541 554 } 542 555 if(nQuas) for(G4int q=0; q<nQuas; q++) 543 556 { 544 557 G4Quasmon* cQ = theQuasmons[q]; 545 G4cerr<<" ::G4QS::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QuarkCon="<<cQ->GetQC()<<G4endl;558 G4cerr<<">G4QuaStr::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl; 546 559 } 547 560 } … … 557 570 G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]); 558 571 #ifdef fdebug 559 G4cout<<"G4Q S::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;572 G4cout<<"G4QuaStr::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl; 560 573 #endif 561 574 theQuasmons.push_back(curQ); // (delete equivalent) … … 570 583 571 584 theWorld = right.theWorld; 572 tot4Mom =right.tot4Mom;573 totCharge =right.totCharge;574 totBaryNum =right.totBaryNum;585 tot4Mom = right.tot4Mom; 586 totCharge = right.totCharge; 587 totBaryNum = right.totBaryNum; 575 588 } 576 589 … … 588 601 G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]); 589 602 #ifdef fdebug 590 G4cout<<"G4Q S::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;603 G4cout<<"G4QuaStr::CpByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl; 591 604 #endif 592 605 theQuasmons.push_back(curQ); // (delete equivalent) … … 601 614 602 615 theWorld = right.theWorld; 603 tot4Mom =right.tot4Mom;604 totCharge =right.totCharge;605 totBaryNum =right.totBaryNum;616 tot4Mom = right.tot4Mom; 617 totCharge = right.totCharge; 618 totBaryNum = right.totBaryNum; 606 619 } 607 620 return *this; … … 616 629 G4Quasmon* curQ = new G4Quasmon(right->theQuasmons[iq]); 617 630 #ifdef fdebug 618 G4cout<<"G4Q S::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;631 G4cout<<"G4QuaStr::CpByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl; 619 632 #endif 620 633 theQuasmons.push_back(curQ); // (delete equivalent) … … 629 642 630 643 theWorld = right->theWorld; 631 tot4Mom =right->tot4Mom;632 totCharge =right->totCharge;633 totBaryNum =right->totBaryNum;644 tot4Mom = right->tot4Mom; 645 totCharge = right->totCharge; 646 totBaryNum = right->totBaryNum; 634 647 } 635 648 … … 664 677 G4QHadronVector* G4QuasmonString::Fragment() 665 678 {// ========================== -- @@ Must be changed @@ -- 666 // Make the final check before filling the output -- @@ Must be changed @@ --679 // Make the final check before filling the output -- @@ Must be changed @@ -- 667 680 #ifdef chdebug 668 681 G4int fCharge=0; … … 682 695 if(fCharge!=totCharge || fBaryoN!=totBaryNum) 683 696 { 684 G4cerr<<"***G4Q S::Frag:tC="<<totCharge<<",C="<<fCharge<<",tB="<<totBaryNum685 << ",B="<<fBaryoN<<G4endl;697 G4cerr<<"***G4QuasmonString::Fragment: tC="<<totCharge<<", C="<<fCharge<<", tB=" 698 <<totBaryNum<<", B="<<fBaryoN<<G4endl; 686 699 if(nHad) for(G4int h=0; h<nHad; h++) 687 700 { 688 701 G4QHadron* cH = theQHadrons[h]; 689 G4cerr<<":G4Q S::HQ:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;702 G4cerr<<":G4QuaSt::HQ:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl; 690 703 } 691 704 if(nQuas) for(G4int q=0; q<nQuas; q++) 692 705 { 693 706 G4Quasmon* cQ = theQuasmons[q]; 694 G4cerr<<":G4Q S::HQ:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl;707 G4cerr<<":G4QuaSt::HQ:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl; 695 708 } 696 709 } … … 781 794 // @@ TMP --- Begin --- 782 795 if(2>1) 783 {796 { 784 797 if(nPart<2) 785 798 { … … 792 805 if(r==0.) return 0.; 793 806 if(r==1.) return 1.; 794 if (nPart==3) x=r; // GS baryon795 else if(nPart==4) x=1.-sqrt(r); // GS quaternion807 if (nPart==3) x=r; // GS baryon 808 else if(nPart==4) x=1.-sqrt(r); // GS quaternion 796 809 else x=1.-pow(r,1./(nPart-2.)); // nPart>4 797 810 return x; … … 809 822 if(r==0.) return 0.; 810 823 if(r==1.) return 1.; 811 if(nPart==3) x=sqrt(r); // GS baryon812 else if(nPart==4) // GS quaternion813 {824 if(nPart==3) x=sqrt(r); // GS baryon 825 else if(nPart==4) // GS quaternion 826 { 814 827 if (r==0.5) x=0.5; 815 828 else if(r<0.5) x=sqrt(r+r)*(.5+.1579*(r-.5)); … … 817 830 } 818 831 else 819 {832 { 820 833 G4int n1=nPart-2; 821 834 G4double r1=n1; … … 826 839 if (r==rr) x=p2; 827 840 else 828 {841 { 829 842 if(r<rr) 830 843 { 831 G4double pr=0.;832 G4double pra=0.;844 G4double pr=0.; 845 G4double pra=0.; 833 846 if(nPart>8) 834 {847 { 835 848 if(nPart>10) 836 {849 { 837 850 if(nPart>11) // >11 838 851 { … … 840 853 pra=.915/pow((nPart+6.7),1.75); 841 854 } 842 else // 11855 else // 11 843 856 { 844 857 pr=.09945; … … 847 860 } 848 861 else 849 {862 { 850 863 if(nPart>9) // 10 851 864 { … … 853 866 pra=.00741; 854 867 } 855 else // 9868 else // 9 856 869 { 857 870 pr=.11425; … … 861 874 } 862 875 else 863 {876 { 864 877 if(nPart>6) 865 {878 { 866 879 if(nPart>7) // 8 867 880 { … … 869 882 pra=.00926; 870 883 } 871 else // 7884 else // 7 872 885 { 873 886 pr=.13405; … … 876 889 } 877 890 else 878 {891 { 879 892 if(nPart>5) // 6 880 893 { … … 882 895 pra=.01112; 883 896 } 884 else // 5897 else // 5 885 898 { 886 899 pr=.15765; … … 893 906 else 894 907 { 895 G4double sr=0.;908 G4double sr=0.; 896 909 if(nPart>8) 897 {910 { 898 911 if(nPart>10) 899 {912 { 900 913 if(nPart>11) sr=.86/(nPart+1.05); // >11 901 else sr=.0774; // 11914 else sr=.0774; // 11 902 915 } 903 916 else 904 {917 { 905 918 if(nPart>9) sr=.0849; // 10 906 else sr=.0938; // 9919 else sr=.0938; // 9 907 920 } 908 921 } 909 922 else 910 {923 { 911 924 if(nPart>6) 912 {925 { 913 926 if(nPart>7) sr=.1047; // 8 914 else sr=.1179; // 7927 else sr=.1179; // 7 915 928 } 916 929 else 917 {930 { 918 931 if(nPart>5) sr=.1339; // 6 919 else sr=.15135; // 5932 else sr=.15135; // 5 920 933 } 921 934 } … … 940 953 if(r==0.) return 0.; 941 954 if(r==1.) return 1.; 942 if (nPart==3) x=r; // GS baryon943 else if(nPart==4) x=1.-sqrt(r); // GS quaternion955 if (nPart==3) x=r; // GS baryon 956 else if(nPart==4) x=1.-sqrt(r); // GS quaternion 944 957 else x=1.-pow(r,1./(nPart-2.)); // nPart>4 945 958 return x; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/History
r1007 r1055 12 12 * Please list in reverse chronological order (last date on top) 13 13 --------------------------------------------------------------- 14 15 16 23-Jan-2009 M.Kosov (hadr-chips-inter-V09-02-06) 17 ------------------------------------------------------ 18 - Change of GetNuclearMass(A-1.,Z-1.) (and similar) to GetNuclearMass(A-1,Z-1) 19 To be consistent with the new Hisaya's developments. The changes are made in 20 the G4Q(Photon,Electron,Muon,Tau)NuclearCrossSection classes 21 22 23-Jan-2009 V.Ivanchenko (hadr-chips-inter-V09-02-00) 23 ------------------------------------------------------ 24 - added deregistration in destructor of G4QCaptureAtRest 25 - added string decay destruction to G4ElectroNuclearReaction 14 26 15 27 24-Oct-2008 Dennis Wright (hadr-chips-inter-V09-01-09) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ChiralInvariantPhaseSpace.hh
r962 r1055 28 28 29 29 // 30 // Modified:31 // 16.01.08 V.Ivanchenko move inlined method to source30 // Created: H.-P. Wellicsh: GHAD model wrapper for the CHIPS model (1997) 31 // Modified: 16.01.08 V.Ivanchenko move inlined method to source 32 32 // 33 33 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ElectroNuclearReaction.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // 27 // 28 // $Id: G4ElectroNuclearReaction.hh,v 1.25 2008/09/01 19:04:54 vnivanch Exp $ 29 // GEANT4 tag $Name: geant4-09-02 $ 30 // 31 // 32 // GEANT4 physics class: G4ElectroNuclearReaction -- header file 33 // Created: J.P. Wellisch, 12/11/2001 26 // $Id: G4ElectroNuclearReaction.hh,v 1.27 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // GEANT4 physics class: G4ElectroNuclearReaction -- header file for CHIPS 30 // Created: J.P. Wellisch, following M. Kossov's algorithm. 12/11/2001 34 31 // The last update: J.P. Wellisch, 06-June-02 32 // 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process 35 33 // 36 34 #ifndef G4ElectroNuclearReaction_h … … 74 72 } 75 73 76 virtual ~G4ElectroNuclearReaction() { };74 virtual ~G4ElectroNuclearReaction() {delete theStringDecay;}; 77 75 78 76 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 79 G4Nucleus& aTargetNucleus);77 G4Nucleus& aTargetNucleus); 80 78 81 79 private: … … 94 92 inline 95 93 G4HadFinalState* G4ElectroNuclearReaction::ApplyYourself(const G4HadProjectile& aTrack, 96 G4Nucleus& aTargetNucleus)94 G4Nucleus& aTargetNucleus) 97 95 { 98 96 theResult.Clear(); 99 static const G4double dM=G4Proton::Proton()->GetPDGMass()+ G4Neutron::Neutron()->GetPDGMass(); // Mean double nucleon mass = m_n+m_p (@@ no binding)100 static const G4double me=G4Electron::Electron()->GetPDGMass(); // electron mass101 static const G4double me 2=me*me; // squaredelectron mass102 static const G4double dpi=twopi; // 2*pi97 static const G4double dM=G4Proton::Proton()->GetPDGMass()+ 98 G4Neutron::Neutron()->GetPDGMass(); // MeanDoubleNucleon Mass = m_n+m_p (@@ no binding) 99 static const G4double me=G4Electron::Electron()->GetPDGMass(); // electron mass 100 static const G4double me2=me*me; // squared electron mass 103 101 G4DynamicParticle theTempEl(const_cast<G4ParticleDefinition *>(aTrack.GetDefinition()), 104 102 aTrack.Get4Momentum().vect()); … … 106 104 const G4ParticleDefinition* aD = theElectron->GetDefinition(); 107 105 if((aD != G4Electron::ElectronDefinition()) && (aD != G4Positron::PositronDefinition())) 108 throw G4HadronicException(__FILE__, __LINE__, "G4ElectroNuclearReaction::ApplyYourself called for neither electron or positron");109 106 throw G4HadronicException(__FILE__, __LINE__, 107 "G4ElectroNuclearReaction::ApplyYourself called for neither electron or positron"); 110 108 const G4ElementTable* aTab = G4Element::GetElementTable(); 111 109 G4Element * anElement = 0; … … 121 119 if(0==anElement) 122 120 { 123 G4cerr<<"***G4ElectroNuclearReaction::ApplyYourself: element with Z=" <<aTargetNucleus.GetZ()<<124 " is not in the element table"<<G4endl; // @@ how to retrieve A or N for the isotop? 121 G4cerr<<"***G4ElectroNuclearReaction::ApplyYourself: element with Z=" 122 <<aTargetNucleus.GetZ()<<" is not in the element table"<<G4endl; 125 123 throw G4HadronicException(__FILE__, __LINE__, "Anomalous element error."); 126 124 } 127 125 128 126 // Note: high energy gamma nuclear now implemented. 129 130 G4double xSec = theElectronData.GetCrossSection(theElectron, anElement); // Check cross section 127 G4double xSec = theElectronData.GetCrossSection(theElectron, anElement);// Check XSection 131 128 if(xSec<=0.) 132 129 { 133 130 theResult.SetStatusChange(isAlive); 134 131 theResult.SetEnergyChange(theElectron->GetKineticEnergy()); 135 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron 132 // new direction for the electron 133 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); 136 134 return &theResult; // DO-NOTHING condition 137 135 } … … 140 138 if( theElectronKinEnergy < photonEnergy ) 141 139 { 142 G4cout << "G4ElectroNuclearReaction::ApplyYourself: photonEnergy is very high"<<G4endl; 143 G4cout << "If this condition appears frequently, please contact Hans-Peter.Wellisch@cern.ch"<<G4endl; 144 theResult.SetStatusChange(isAlive); 145 theResult.SetEnergyChange(theElectron->GetKineticEnergy()); 146 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron 140 G4cout<<"G4ElectroNuclearReaction::ApplyYourself: photonEnergy is very high"<<G4endl; 141 G4cout<<">>> If this condition persists, please contact Geant4 group"<<G4endl; 142 theResult.SetStatusChange(isAlive); 143 theResult.SetEnergyChange(theElectron->GetKineticEnergy()); 144 // new direction for the electron 145 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); 147 146 return &theResult; // DO-NOTHING condition 148 147 } 149 148 G4double photonQ2 = theElectronData.GetEquivalentPhotonQ2(photonEnergy); 150 G4double W=photonEnergy-photonQ2/dM; // Hadronic energy flow (W-energy)from the virtual photon149 G4double W=photonEnergy-photonQ2/dM; // Hadronic energy flow from the virtual photon 151 150 if(getenv("debug_G4ElectroNuclearReaction") ) 152 151 { … … 157 156 theResult.SetStatusChange(isAlive); 158 157 theResult.SetEnergyChange(theElectron->GetKineticEnergy()); 159 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron 158 // new direction for the electron 159 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); 160 160 return &theResult; // DO-NOTHING condition 161 throw G4HadronicException(__FILE__, __LINE__, "G4ElectroNuclearReaction::ApplyYourself: negative equivalent energy"); 161 throw G4HadronicException(__FILE__, __LINE__, 162 "G4ElectroNuclearReaction::ApplyYourself: negative equivalent energy"); 162 163 } 163 164 G4DynamicParticle* theDynamicPhoton = new 164 165 G4DynamicParticle(G4Gamma::GammaDefinition(), 165 G4ParticleMomentum(1.,0.,0.), photonEnergy*MeV); //->-*166 G4ParticleMomentum(1.,0.,0.), photonEnergy*MeV); //----->-* 166 167 G4double sigNu=thePhotonData.GetCrossSection(theDynamicPhoton, anElement); // | 167 168 theDynamicPhoton->SetKineticEnergy(W); // Redefine photon with equivalent energy | … … 173 174 theResult.SetStatusChange(isAlive); 174 175 theResult.SetEnergyChange(theElectron->GetKineticEnergy()); 175 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); // new direction for the electron 176 // new direction for the electron 177 theResult.SetMomentumChange(theElectron->GetMomentumDirection()); 176 178 return &theResult; // DO-NOTHING condition 177 179 } … … 180 182 G4double iniE=theElectronKinEnergy+me; // Initial total energy of electron 181 183 G4double finE=iniE-photonEnergy; // Final total energy of electron 182 theResult.SetEnergyChange(std::max(0.,finE-me)); // Modifies the KINETIC ENERGY (Why not in the name?)184 theResult.SetEnergyChange(std::max(0.,finE-me)); // Modifies the KINETIC ENERGY 183 185 G4double EEm=iniE*finE-me2; // Just an intermediate value to avoid "2*" 184 G4double iniP=std::sqrt(iniE*iniE-me2); // Initial momentum of the electron185 G4double finP=std::sqrt(finE*finE-me2); // Final momentum of the electron186 G4double cost=(EEm+EEm-photonQ2)/iniP/finP; // std::cos(theta) for the electron scattering186 G4double iniP=std::sqrt(iniE*iniE-me2); // Initial momentum of the electron 187 G4double finP=std::sqrt(finE*finE-me2); // Final momentum of the electron 188 G4double cost=(EEm+EEm-photonQ2)/iniP/finP;// std::cos(theta) for the electron scattering 187 189 if(cost>1.) cost=1.; 188 190 if(cost<-1.) cost=-1.; … … 192 194 G4ThreeVector orty = dir.cross(ortx); // Second unit vector orthoganal to the direction 193 195 G4double sint=std::sqrt(1.-cost*cost); // Perpendicular component 194 G4double phi= dpi*G4UniformRand(); // phi of scattered electron196 G4double phi=twopi*G4UniformRand(); // phi of scattered electron 195 197 G4double sinx=sint*std::sin(phi); // x-component 196 198 G4double siny=sint*std::cos(phi); // y-component … … 199 201 G4ThreeVector photonMomentum=iniP*dir-finP*findir; 200 202 G4DynamicParticle localGamma(G4Gamma::GammaDefinition(), photonEnergy, photonMomentum); 201 //G4DynamicParticle localGamma(G4Gamma::GammaDefinition(), photonDirection, photonEnergy);203 //G4DynamicParticle localGamma(G4Gamma::GammaDefinition(),photonDirection, photonEnergy); 202 204 //G4DynamicParticle localGamma(G4Gamma::GammaDefinition(), photonLorentzVector); 203 205 G4ThreeVector position(0,0,0); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4GammaNuclearReaction.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4GammaNuclearReaction.hh,v 1.1 4 2008/09/01 17:30:42 vnivanchExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4GammaNuclearReaction.hh,v 1.15 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // GEANT4 physics class: G4GammaNuclearReaction - - header file32 // Created: J.P. Wellisch, 2000/08/1831 // GEANT4 physics class: G4GammaNuclearReaction - header file for CHIPS 32 // Created: J.P. Wellisch, following M.Kossov's algorithm. 2000/08/18 33 33 // The last update: J.P. Wellisch, Thu Jun 6 2002. 34 34 // 01.09.2008 V.Ivanchenko move inline to source and define interaction name 35 // 35 // 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process 36 36 37 37 #ifndef G4GammaNuclearReaction_h … … 51 51 52 52 virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, 53 G4Nucleus& aTargetNucleus);53 G4Nucleus& aTargetNucleus); 54 54 55 55 private: -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearAtRestChips.hh
r962 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process 25 26 // 26 27 #ifndef G4PionMinusNuclearAtRestChips_h … … 43 44 public: 44 45 45 G4PionMinusNuclearAtRestChips(const G4String& processName ="PionMinus AnnihilationAtRest")46 G4PionMinusNuclearAtRestChips(const G4String& processName ="PionMinusCaptureAtRest") 46 47 : G4VRestProcess (processName, fHadronic) 47 48 { … … 56 57 } 57 58 58 // null physics table59 // null physics table 59 60 void BuildPhysicsTable(const G4ParticleDefinition&){} 60 61 61 62 G4double AtRestGetPhysicalInteractionLength(const G4Track&track, 62 G4ForceCondition*condition);63 G4ForceCondition*condition); 63 64 64 // zero mean lifetime65 // zero mean lifetime 65 66 G4double GetMeanLifeTime(const G4Track& aTrack, 66 G4ForceCondition* condition) {return 0.0;}67 G4ForceCondition* condition) {return 0.0;} 67 68 68 69 G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); … … 79 80 if(aTrack.GetDynamicParticle()->GetDefinition() != G4PionMinus::PionMinus()) 80 81 { 81 throw G4HadronicException(__FILE__, __LINE__, "Calling G4PionMinusNuclearAtRestChips with particle other than pi-!!!"); 82 throw G4HadronicException(__FILE__, __LINE__, 83 "Calling G4PionMinusNuclearAtRestChips with particle other than pi-!!!"); 82 84 } 83 85 … … 91 93 92 94 G4double G4PionMinusNuclearAtRestChips:: 93 AtRestGetPhysicalInteractionLength(const G4Track&track, 94 G4ForceCondition*condition) 95 AtRestGetPhysicalInteractionLength(const G4Track&track, G4ForceCondition*condition) 95 96 { 96 97 ResetNumberOfInteractionLengthLeft(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4PionMinusNuclearReaction.hh
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 25 // (@@ Why only pi-, why not pi+? - Looks like a dummy CHIPS pocess - M.K.) 26 // 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process 27 26 28 #ifndef G4PionMinusNuclearReaction_h 27 29 #define G4PionMinusNuclearReaction_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonAtRestChips.hh
r962 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 25 // (Why only antiproton-proton, when the antiproton-nucleus is made? - M.K.) 26 // 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process 26 27 #ifndef G4ProtonAntiProtonAtRestChips_h 27 28 #define G4ProtonAntiProtonAtRestChips_h … … 50 51 public: 51 52 52 G4ProtonAntiProtonAtRestChips(const G4String& processName ="AntiProtonAnnihilationAtRest") 53 G4ProtonAntiProtonAtRestChips(const G4String& processName= 54 "AntiProtonAnnihilationAtRest") 53 55 : G4VRestProcess (processName, fHadronic) 54 56 { … … 56 58 } 57 59 58 ~G4ProtonAntiProtonAtRestChips() {}60 ~G4ProtonAntiProtonAtRestChips() {} 59 61 60 62 G4bool IsApplicable(const G4ParticleDefinition& aParticle) … … 67 69 68 70 G4double AtRestGetPhysicalInteractionLength(const G4Track&track, 69 G4ForceCondition*condition);71 G4ForceCondition*condition); 70 72 71 73 // zero mean lifetime 72 74 G4double GetMeanLifeTime(const G4Track& aTrack, 73 G4ForceCondition* condition) {return 0.0;}75 G4ForceCondition* condition) {return 0.0;} 74 76 75 77 G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); … … 92 94 if(aTrack.GetDynamicParticle()->GetDefinition() != G4AntiProton::AntiProton()) 93 95 { 94 throw G4HadronicException(__FILE__, __LINE__, "Calling G4ProtonAntiProtonAtRestChips with particle other than p-bar!!!"); 96 throw G4HadronicException(__FILE__, __LINE__, 97 "Calling G4ProtonAntiProtonAtRestChips with particle other than p-bar!!!"); 95 98 } 96 99 if(aTargetNucleus.GetZ() != 1) 97 100 { 98 throw G4HadronicException(__FILE__, __LINE__, "Calling G4ProtonAntiProtonAtRestChips for target other than Hydrogen!!!"); 101 throw G4HadronicException(__FILE__, __LINE__, 102 "Calling G4ProtonAntiProtonAtRestChips for target other than Hydrogen!!!"); 99 103 } 100 104 … … 105 109 G4double G4ProtonAntiProtonAtRestChips:: 106 110 AtRestGetPhysicalInteractionLength(const G4Track&track, 107 G4ForceCondition*condition)111 G4ForceCondition*condition) 108 112 { 109 113 ResetNumberOfInteractionLengthLeft(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ProtonAntiProtonReaction.hh
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 25 // (Why only antiproton-proton, when the antiproton-nucleus is made? - M.K.) 26 // 17.02.2009 M.Kossov, now it is recommended to use the G4QCollision process 26 27 #ifndef G4ProtonAntiProtonReaction_h 27 28 #define G4ProtonAntiProtonReaction_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuANuNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QANuANuNuclearCrossSection.hh,v 1. 1 2007/11/01 16:09:38mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QANuANuNuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005 34 34 // 35 // Short description: this G4 singletone class calculates ( nu_mu,mu) Nuclearcross section35 // Short description: this G4 singletone class calculates (an-nu,an-nu)A cross section 36 36 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A) 37 37 // **************************************************************************************** -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuENuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QANuENuclearCrossSection.hh,v 1. 1 2007/10/02 10:00:37mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QANuENuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-SEP-2007 34 34 // 35 // Short description: this G4 singletone class calculates ( nu_e,e) Nuclear cross section35 // Short description: this G4 singletone class calculates (anu_e,e+) Nuclear cross section 36 36 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A) 37 37 // **************************************************************************************** -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QANuMuNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QANuMuNuclearCrossSection.hh,v 1. 6 2006/12/01 10:57:46mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QANuMuNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // GEANT4 physics class: G4QANuMuNuclearCrossSection -- header file 31 // GEANT4 physics class: G4QANuMuNuclearCrossSection -- header file for (anu_mu,mu+)A XS 32 32 // M.V. Kossov, CERN-ITEP(Moscow), 20-DEC-2005 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QAtomicElectronScattering.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QAtomicElectronScattering.hh,v 1. 2 2006/12/13 15:45:16 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QAtomicElectronScattering.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QAtomicElectronScattering header ---------------- 30 30 // by Mikhail Kossov, December 2003. 31 // Header of G4QAtomicElectronScattering class (mu-,pi-,K-)of the CHIPS Simulation Branch in GEANT431 // Header of G4QAtomicElectronScattering class of the CHIPS Simulation Branch in GEANT4 32 32 // ------------------------------------------------------------------------------- 33 // This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses.33 // This is a unique CHIPS class for the Nuclear Interactions with Atomic electrons. 34 34 // ------------------------------------------------------------------------------- 35 // At present (Dec.04) only pi+/-, K+/- proton, neutron, antiproton and antineutron36 // collisions with protons are implemented, which are fundamental for the in matter37 // simulation of hadronic reactions. The interactions of the same particles with38 // nuclei are planned only. The collisions of nuclei with nuclei are possible...39 // The simulation is based on the G4QuasmonString class, which extends the CHIPS model40 // to the highest energyes, implementing the Quasmon string with the41 // String->Quasmons->Hadrons scenario of the quark-gluon string fragmentation42 // --> CHIPS is a SU(3) event generator, so it does not include reactions with the43 // heavy (c,b,t), which can be simulated only by the SU(6) QUIPS (QUark Invariant44 // Phase Space) model which is an expantion of the CHIPS.-December 2003.M.Kossov.-45 // -------------------------------------------------------------------------------46 // Algorithms: the interactions in CHIPS are described by the quark exchange (QE) process.47 // The first step is the low energy quark exchange. If as a result of the QE one or48 // both secondary hadrons are below the pi0 threshold (roughly) they are pushed to the49 // Ground State (GS) value(s). The excited (above the pi0 production threshold) hadronic50 // state is considered as a Quasmon, which is filled in the G4QuasmonVector of the51 // G4QuasmonString class. On the second step all G4Quasmons are decayed by the52 // G4Quasmon class and fiill the G4QHadronVector output. If the exchange quark is too far53 // in the rapidity space (a parameter of the G4QuasmonString class) from any of the quarks54 // of the other hadron it creates a string with the nearest in the rapidity space quark.55 // This string is converted into a Quasmon. This forces the coalescence of the residuals56 // in the another Quasmon, while the possibility exist to create more residual Quasmons57 // instead of one - one per each target-quark+projectile-antiquark(diquark) pair. This58 // possibility is tuned by the Drell-Yan pair production process. If the target (or59 // pojectile) are nuclei, then the Quasmons are created not only in vacuum, where they60 // can be fragmented by the G4Quasmon class, but in nuclear matter of the residual target61 // (or projectile). If the Quasmons are crated in nuclear matter, they are fragmented by62 // the G4QEnvironment class with the subsequent Quark Exchange nuclear fragmentation.63 // This is the planned scenario.- December 2004.Mikhail Kossov.-64 // --------------------------------------------------------------------------------65 35 // **************************************************************************************** 66 36 // ********* This HEADER is temporary moved from the photolepton_hadron directory ********* 67 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 68 38 // **************************************************************************************** 39 // Short description: CHIPS is re3sponsible for photo- and lepto-nuclear 40 // reactions. In particular for thr electron-nuclear reactions. At High 41 // Energies the nucleons (including neutrons) and nuclear fragments can 42 // interact with atomic electrons (reversed electro-nuclear reaction - 43 // antilab), while they are missing the nucler-nuclear (ion-ion) reac- 44 // tions. This nucleo-electron process comes "for-free" in CHIPS, as the 45 // cross-sections of the interaction is known from the electro-nuclear 46 // reactions. The only problem is to move the output from the antilab to 47 // lab system. This is what this process is aiming to do. It can be used 48 // for the ion transport in Geant4. 49 // --------------------------------------------------------------------- 69 50 70 51 #ifndef G4QAtomicElectronScattering_hh … … 116 97 // (energy, material) 117 98 // The previousStepSize and G4ForceCondition* are not used. 118 // This function overloads a virtual function of the base class. 99 // This function overloads a virtual function of the base class. 119 100 // It is invoked by the ProcessManager of the Particle. 120 101 … … 122 103 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 123 104 // It computes the final state of the process (at end of step), 124 // returned as a ParticleChange object. 105 // returned as a ParticleChange object. 125 106 // This function overloads a virtual function of the base class. 126 107 // It is invoked by the ProcessManager of the Particle. … … 147 128 G4QAtomicElectronScattering(const G4QAtomicElectronScattering&); 148 129 149 // BODY130 // BODY 150 131 // Static Parameters 151 132 static G4bool manualFlag; // If false then standard parameters are used -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCaptureAtRest.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QCaptureAtRest.hh,v 1. 6 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QCaptureAtRest.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QCaptureAtRest header ---------------- 30 30 // by Mikhail Kossov, December 2003. 31 // Header of G4QCaptureAtRest class (mu-,pi-,K-)of the CHIPS Simulation Branch in GEANT431 // Header of G4QCaptureAtRest class of the CHIPS Simulation Branch in GEANT4 32 32 // ------------------------------------------------------------------------------- 33 33 // This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses. … … 78 78 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 79 79 // **************************************************************************************** 80 // Short Description: This is a universal process for nuclear capture 81 // (including annihilation) of all negative particles (negative hadrons, 82 // negative leptons: mu- & tau-). It can be used for the cold neutron 83 // capture, but somebody should decide what is the probability (defined 84 // by the capture cross-section and atomic material properties) to switch 85 // the cold neutron to the at-rest neutron. - M.K.2009. 86 // ---------------------------------------------------------------------- 80 87 81 88 #ifndef G4QCaptureAtRest_hh -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCoherentChargeExchange.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QCoherentChargeExchange.hh,v 1. 5 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QCoherentChargeExchange.hh,v 1.6 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QCoherentChargeExchange header ---------------- … … 33 33 // This is a unique CHIPS class for the Hadron-Nuclear Elastic Scattering Prosesses 34 34 // ------------------------------------------------------------------------------- 35 // At present (Jan-06) only proton- proton scattering is implemented The interaction with36 // nuclei are planned only. The scattering ofnuclei on nuclei are possible...35 // At present (Jan-06) only proton-to-neutron & neutron-to-proton scattering on nuclei 36 // are implemented. The scattering of mesons and nuclei on nuclei are possible... 37 37 // The simulation is based on the CHIPS approximation of total elastic and differential 38 38 // elastic cross sections from E=0 to the highest energyes. 39 39 // ------------------------------------------------------------------------------- 40 // Short description: This class resolves an ambiguity in the definition of the 41 // "inelastic" cross section. As it was shown in Ph.D.Thesis (M.Kosov,ITEP,1979) 42 // it is more reasonable to subdivide the total cross-section in the coherent & 43 // incoherent parts, but the measuring method for the "inelastic" cross-sections 44 // consideres the lack of the projectile within the narrow forward solid angle 45 // with the consequent extrapolation of these partial cross-sections, corresponding 46 // to the particular solid angle, to the zero solid angle. The low angle region 47 // is shadowed by the elastic (coherent) scattering. BUT the coherent charge 48 // exchange (e.g. conversion p->n) is included by this procedure as a constant term 49 // in the extrapolation, so the "inelastic" cross-section differes from the 50 // incoherent cross-section by the value of the coherent charge exchange cross 51 // section. Fortunately, this cross-sectoion drops ruther fast with energy increasing. 52 // All Geant4 inelastic hadronic models (including CHIPS) simulate the incoherent 53 // reactions. So the incoherent (including quasielastic) cross-section must be used 54 // instead of the inelastic cross-section. For that the "inelastic" cross-section 55 // must be reduced by the value of the coherent charge-exchange cross-section, which 56 // is estimated (it must be tuned!) in this CHIPS class. The angular distribution 57 // is made (at present) identical to the corresponding coherent-elastic scattering 58 // ----------------------------------------------------------------------------------- 40 59 41 60 #ifndef G4QCoherentChargeExchange_hh … … 84 103 // (energy, material) 85 104 // The previousStepSize and G4ForceCondition* are not used. 86 // This function overloads a virtual function of the base class. 105 // This function overloads a virtual function of the base class. 87 106 // It is invoked by the ProcessManager of the Particle. 88 107 … … 90 109 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 91 110 // It computes the final state of the process (at end of step), 92 // returned as a ParticleChange object. 111 // returned as a ParticleChange object. 93 112 // This function overloads a virtual function of the base class. 94 113 // It is invoked by the ProcessManager of the Particle. … … 110 129 G4double CalculateXSt(G4bool oxs, G4bool xst, G4double p, G4int Z, G4int N, G4int pPDG); 111 130 112 // BODY131 // BODY 113 132 // Static Parameters -------------------------------------------------------------------- 114 133 static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.) … … 128 147 }; 129 148 #endif 130 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QCollision.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QCollision.hh,v 1.1 1 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QCollision.hh,v 1.13 2009/03/23 14:12:49 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QCollision header ---------------- … … 67 67 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 68 68 // **************************************************************************************** 69 // Short description: This is a universal class for the incoherent (inelastic) 70 // nuclear interactions in the CHIPS model. 71 // --------------------------------------------------------------------------- 69 72 70 73 #ifndef G4QCollision_hh … … 86 89 #include "G4LorentzVector.hh" 87 90 #include "G4HadronicProcessType.hh" 91 #include "G4RandomDirection.hh" 88 92 89 93 // CHIPS Headers … … 124 128 // (energy, material) 125 129 // The previousStepSize and G4ForceCondition* are not used. 126 // This function overloads a virtual function of the base class. 130 // This function overloads a virtual function of the base class. 127 131 // It is invoked by the ProcessManager of the Particle. 128 132 … … 130 134 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 131 135 // It computes the final state of the process (at end of step), 132 // returned as a ParticleChange object. 136 // returned as a ParticleChange object. 133 137 // This function overloads a virtual function of the base class. 134 138 // It is invoked by the ProcessManager of the Particle. … … 170 174 std::pair<G4double,G4double> Random2DDirection(); 171 175 172 // BODY176 // BODY 173 177 // Static Parameters -------------------------------------------------------------------- 174 178 static G4bool manualFlag; // If false then standard parameters are used … … 207 211 }; 208 212 #endif 209 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffraction.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QDiffraction.hh,v 1. 2 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QDiffraction.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QDiffraction header ---------------- … … 36 36 // The normalization is based on the temporary G4QProtonNuclearCrossSection class 37 37 // ------------------------------------------------------------------------------- 38 // Short description: This is a process, which describes the diffraction 39 // excitation of the projectile and the nucleus. On nuclei in addition there 40 // can be a coherent diffraction process for the projectile, but it is 41 // comparably small. The most important part of the diffraction is the 42 // progectile diffraction excitation, as in this interaction proton can lose 43 // only a small part of its energy and make the shower longer. This is because 44 // only 1-2 (n) pions are produce in the diffraction escitation, and the mean 45 // kept energy of the nucleon is (1-n/7)=80%. For kaons the kept energy is much 46 // smaller (1-n/3.5)=60%, and for pions it is less important (about 40%). 47 // ---------------------------------------------------------------------------- 38 48 39 49 #ifndef G4QDiffraction_hh … … 82 92 // (energy, material) 83 93 // The previousStepSize and G4ForceCondition* are not used. 84 // This function overloads a virtual function of the base class. 94 // This function overloads a virtual function of the base class. 85 95 // It is invoked by the ProcessManager of the Particle. 86 96 … … 88 98 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 89 99 // It computes the final state of the process (at end of step), 90 // returned as a ParticleChange object. 100 // returned as a ParticleChange object. 91 101 // This function overloads a virtual function of the base class. 92 102 // It is invoked by the ProcessManager of the Particle. … … 108 118 G4double CalculateXS(G4double p, G4int Z, G4int N, G4int pPDG); 109 119 110 // BODY120 // BODY 111 121 // Static Parameters -------------------------------------------------------------------- 112 122 static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.) … … 126 136 }; 127 137 #endif 128 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiffractionRatio.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 32 32 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006 33 33 // 34 //======================================================================= 35 // Short description: Difraction excitation is a part of the incoherent 36 // (inelastic) interaction. This part is calculated in the class. 37 // -------------------------------------------------------------------- 34 38 35 39 #ifndef G4QDiffractionRatio_h … … 88 92 // Body 89 93 private: 90 }; 94 }; 91 95 #endif -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscProcessMixer.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QDiscProcessMixer.hh,v 1. 3 2008/07/09 19:45:09 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QDiscProcessMixer.hh,v 1.6 2009/04/17 15:22:31 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QDiscProcessMixer header ---------------- 30 30 // by Mikhail Kossov, Aug 2007. 31 // Header of G4QDiscProcessMixer class (hadron+A) of the CHIPS Simulation Branch in GEANT4 32 // ------------------------------------------------------------------------------- 33 // This is a unique CHIPS class for the Hadron-Nuclear Diffractive Interaction Prosesses 34 // ------------------------------------------------------------------------------- 35 // At present (Aug-07) it is not tested. 36 // The normalization is based on the temporary G4QIonIonCrossSection class 37 // ------------------------------------------------------------------------------- 31 // Header of G4QDiscProcessMixer class of the CHIPS Simulation Branch in GEANT4 32 // ----------------------------------------------------------------------------- 33 // Short description: universal mixer of processes (NOT models as in GHAD!) 34 // depending on the application energy region (defined by users). 35 // ------------------------------------------------------------------------ 38 36 39 37 #ifndef G4QDiscProcessMixer_hh … … 68 66 const G4ParticleDefinition* proj = G4Gamma::Gamma(), 69 67 G4ProcessType pType = fHadronic ); 70 71 68 // Destructor 72 69 ~G4QDiscProcessMixer(); … … 76 73 G4double PostStepGetPhysicalInteractionLength(const G4Track& track, 77 74 G4double previousStepSize, 78 G4ForceCondition* condition); 75 G4ForceCondition* condition); 76 77 G4double GetMeanFreePath(const G4Track& aTrack, G4double previousStepSize, 78 G4ForceCondition* condition); 79 79 80 80 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 81 81 82 void AddDiscreteProcess(G4VDiscreteProcess* DP, G4double ME); 82 // DP is the name of the Discrete Process, MaxE is the maximum energy for this process 83 // The processes must be defined, starting from high energy processes (MaxE decreasing) 84 // The MaxE for the first (highest energy process) is always infinity (automatic) 85 // The MinE = MaxE of the lower energy process (MinE=0 for the lowest energy process) 86 87 void AddDiscreteProcess(G4VDiscreteProcess* DP, G4double MaxE); 83 88 84 89 //G4LorentzVector GetEnegryMomentumConservation(); … … 94 99 G4QDiscProcessMixer(const G4QDiscProcessMixer& DPM); 95 100 96 // BODY101 // BODY 97 102 const G4ParticleDefinition* DPParticle; // Particle for DiscreteProc mixture 98 103 G4QDiscreteProcessVector theDPVector; // Vector of Discrete Processes -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QDiscreteProcessVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QDiscreteProcessVector.hh,v 1. 1 2007/08/28 15:48:15mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QDiscreteProcessVector.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ---------------- G4QDiscreteProcessVector ---------------- … … 32 32 // Type defenition for Vectors of DiscreteProcesses (G4VDiscreteProcess) 33 33 // --------------------------------------------------------------------- 34 // Short description: universal mixer of processes (NOT models as in GHAD!) 35 // depending on the application energy region G4QDiscProcessMixer is using 36 // this vector of the Geant4 processes. 37 // ------------------------------------------------------------------------ 34 38 35 39 #ifndef G4QDiscreteProcessVector_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElastic.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QElastic.hh,v 1. 4 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QElastic.hh,v 1.5 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QElastic header ---------------- … … 38 38 // elastic cross sections from E=0 to the highest energyes. 39 39 // ------------------------------------------------------------------------------- 40 // Short description: At present this is a process for nucleon-nucleus 41 // elastic scattering. Mesons and hyperons exist only for the Hydrogen 42 // target (see G4QuasiFreeRatios). 43 // --------------------------------------------------------------- 40 44 41 45 #ifndef G4QElastic_hh … … 83 87 // (energy, material) 84 88 // The previousStepSize and G4ForceCondition* are not used. 85 // This function overloads a virtual function of the base class. 89 // This function overloads a virtual function of the base class. 86 90 // It is invoked by the ProcessManager of the Particle. 87 91 … … 89 93 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 90 94 // It computes the final state of the process (at end of step), 91 // returned as a ParticleChange object. 95 // returned as a ParticleChange object. 92 96 // This function overloads a virtual function of the base class. 93 97 // It is invoked by the ProcessManager of the Particle. … … 109 113 G4double CalculateXSt(G4bool oxs, G4bool xst, G4double p, G4int Z, G4int N, G4int pPDG); 110 114 111 // BODY115 // BODY 112 116 // Static Parameters -------------------------------------------------------------------- 113 117 static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.) … … 127 131 }; 128 132 #endif 129 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElasticCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 32 32 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006 33 33 // 34 //================================================================================ 35 // Short description: Interaction cross-sections for the G4QElastic process 36 // ------------------------------------------------------------------------------- 34 37 35 38 #ifndef G4QElasticCrossSection_h … … 121 124 static G4double* lastCST; // Last cross-section table 122 125 static G4double* lastPAR; // Last parameters for functional calculation 123 static G4double* lastSST; // E-dep of squared slope of the first difruction 124 static G4double* lastS1T; // E-dep of mantissa of the first difruction 126 static G4double* lastSST; // E-dep of squared slope of the first difruction 127 static G4double* lastS1T; // E-dep of mantissa of the first difruction 125 128 static G4double* lastB1T; // E-dep of the slope of the first difruction 126 129 static G4double* lastS2T; // E-dep of mantissa of the second difruction 127 130 static G4double* lastB2T; // E-dep of the slope of theSecond difruction 128 static G4double* lastS3T; // E-dep of mantissa of the third difruction 131 static G4double* lastS3T; // E-dep of mantissa of the third difruction 129 132 static G4double* lastB3T; // E-dep of the slope of the third difruction 130 static G4double* lastS4T; // E-dep of mantissa of the 4-th difruction 133 static G4double* lastS4T; // E-dep of mantissa of the 4-th difruction 131 134 static G4double* lastB4T; // E-dep of the slope of the 4-th difruction 132 135 … … 142 145 static std::vector <G4double*> S4T; // Vector of the 4-th mantissa (gloria) 143 146 static std::vector <G4double*> B4T; // Vector of the 4-th slope (gloria) 144 }; 147 }; 145 148 #endif -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QElectronNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 32 32 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 25-Sept-03 33 33 // 34 // -------------------------------------------------------------------------------- 35 // Short description: reaction cross-sections for electron-nuclear reactions, which 36 // are integrals over virtual equivalent photons photons. 37 // -------------------------------------------------------------------------------- 34 38 35 39 #ifndef G4QElectronNuclearCrossSection_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QGluonString.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QGluonString.hh,v 1. 2 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QGluonString.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QGluonString header ---------------- … … 44 44 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch ********** 45 45 // **************************************************************************************** 46 // Short description: CHIPS object for the Quark-Gluon String 47 // --------------------------------------------------------------- 46 48 47 49 #ifndef G4QGluonString_hh … … 89 91 // (energy, material) 90 92 // The previousStepSize and G4ForceCondition* are not used. 91 // This function overloads a virtual function of the base class. 93 // This function overloads a virtual function of the base class. 92 94 // It is invoked by the ProcessManager of the Particle. 93 95 94 96 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 95 97 // It computes the final state of the process (at end of step), 96 // returned as a ParticleChange object. 98 // returned as a ParticleChange object. 97 99 // This function overloads a virtual function of the base class. 98 100 // It is invoked by the ProcessManager of the Particle. … … 126 128 G4QGluonString(const G4QGluonString&); 127 129 128 // BODY130 // BODY 129 131 // Static Parameters -------------------------------------------------------------------- 130 132 static G4bool manualFlag; // If false then standard parameters are used … … 160 162 }; 161 163 #endif 162 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonCrossSection.hh
r1007 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // Short description: CHIPS cross-sectons for Ion-Ion interactions 26 // --------------------------------------------------------------- 25 27 // 26 28 // 27 // GEANT4 tag $Name: geant4-09-0 2$29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 30 // 29 31 // -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QIonIonElastic.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QIonIonElastic.hh,v 1. 2 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QIonIonElastic.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QIonIonElastic header ---------------- … … 35 35 // @@ This class is on the testing level @@ 36 36 // ------------------------------------------------------------------------------- 37 // ****************************************************************************************38 // ********** This CLASS is temporary moved from the photolepton_hadron directory *********39 // ****************************************************************************************37 // Short description: a simple process for the Ion-Ion elastic scattering. 38 // For heavy by heavy ions it can reach 50% of the total cross-section. 39 // ----------------------------------------------------------------------- 40 40 41 41 #ifndef G4QIonIonElastic_hh … … 84 84 // (energy, material) 85 85 // The previousStepSize and G4ForceCondition* are not used. 86 // This function overloads a virtual function of the base class. 86 // This function overloads a virtual function of the base class. 87 87 // It is invoked by the ProcessManager of the Particle. 88 88 … … 90 90 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 91 91 // It computes the final state of the process (at end of step), 92 // returned as a ParticleChange object. 92 // returned as a ParticleChange object. 93 93 // This function overloads a virtual function of the base class. 94 94 // It is invoked by the ProcessManager of the Particle. … … 107 107 G4QIonIonElastic(const G4QIonIonElastic&); 108 108 109 // BODY109 // BODY 110 110 // Static Parameters -------------------------------------------------------------------- 111 111 static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QLowEnergy.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QLowEnergy.hh,v 1. 4 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QLowEnergy.hh,v 1.6 2009/03/09 15:41:17 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QLowEnergy header ---------------- … … 31 31 // Header of G4QLowEnergy class (A+A) of the CHIPS Simulation Branch in GEANT4 32 32 // ------------------------------------------------------------------------------- 33 // This is a unique CHIPS class for the Ion-Ion Low Energy Inelastic Interaction Prosesses33 // This is a unique CHIPS class for the Ion-Ion Low Energy Inelastic Interactions 34 34 // ------------------------------------------------------------------------------- 35 35 // At present (Aug-07) it is not tested. 36 36 // The normalization is based on the temporary G4QIonIonCrossSection class 37 37 // ------------------------------------------------------------------------------- 38 // Short description: This is a fast low energy algorithm for the 39 // inelastic interactions of nucleons and nuclei (ions) with nuclei. 40 // This is a fase-space algorithm, but not quark level. Provides 41 // nuclear fragments upto alpha only. Never was tumed (but can be). 42 // --------------------------------------------------------------- 38 43 39 44 #ifndef G4QLowEnergy_hh … … 60 65 #include "G4QNucleus.hh" 61 66 #include "G4QIonIonCrossSection.hh" 67 #include "G4QProtonNuclearCrossSection.hh" 62 68 #include "G4QIsotope.hh" 63 69 #include "G4QPDGToG4Particle.hh" … … 83 89 // (energy, material) 84 90 // The previousStepSize and G4ForceCondition* are not used. 85 // This function overloads a virtual function of the base class. 91 // This function overloads a virtual function of the base class. 86 92 // It is invoked by the ProcessManager of the Particle. 87 93 … … 89 95 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep); 90 96 // It computes the final state of the process (at end of step), 91 // returned as a ParticleChange object. 97 // returned as a ParticleChange object. 92 98 // This function overloads a virtual function of the base class. 93 99 // It is invoked by the ProcessManager of the Particle. … … 112 118 G4double CalculateXS(G4double p, G4int Z, G4int N, G4int pPDG); 113 119 114 // BODY120 // BODY 115 121 // Static Parameters -------------------------------------------------------------------- 116 122 static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QMuonNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QMuonNuclearCrossSection.hh,v 1. 6 2008/10/24 19:23:25 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QMuonNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 39 39 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 40 40 // **************************************************************************************** 41 // Short description: reaction cross-sections for muon-nuclear reactions, which 42 // are integrals over virtual equivalent photons photons. The muon-nuclear GHAD 43 // model (not CHIPS) gives 2-3 times smaller scattering angle and deposited energy. 44 // -------------------------------------------------------------------------------- 41 45 42 46 #ifndef G4QMuonNuclearCrossSection_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNeutronNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 32 32 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-May-02 33 33 // 34 // **************************************************************************************** 35 // ********* This HEADER is temporary moved from the photolepton_hadron directory ********* 36 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 37 // **************************************************************************************** 34 // ------------------------------------------------------------------- 35 // Short description: neutron-nuclear cross-section for hadronic CHIPS 36 // ------------------------------------------------------------------- 38 37 39 38 #ifndef G4QNeutronNuclearCrossSection_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuENuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNuENuclearCrossSection.hh,v 1. 1 2007/10/02 10:00:37mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNuENuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-SEP-2007 34 34 // 35 // Short description: this G4 singletone class calculates (nu_e,e ) Nuclear cross section35 // Short description: this G4 singletone class calculates (nu_e,e-) Nuclear cross section 36 36 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A) 37 37 // **************************************************************************************** -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuMuNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNuMuNuclearCrossSection.hh,v 1. 6 2006/12/01 10:57:46mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNuMuNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005 34 34 // 35 // Short description: this G4 singletone class calculates (nu_mu,mu ) Nuclear cross section35 // Short description: this G4 singletone class calculates (nu_mu,mu-) Nuclear cross section 36 36 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A) 37 37 // **************************************************************************************** -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QNuNuNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNuNuNuclearCrossSection.hh,v 1. 1 2007/11/01 16:09:38mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNuNuNuclearCrossSection.hh,v 1.2 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005 34 34 // 35 // Short description: this G4 singletone class calculates (nu _mu,mu) Nuclear cross section35 // Short description: this G4 singletone class calculates (nu,nu) Nuclear cross section 36 36 // (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A) 37 37 // **************************************************************************************** -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QPhotonNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 36 36 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 37 37 // **************************************************************************************** 38 // Short description: This is an original CHIPS process for photo-nuclear 39 // interactions, which does not include "fast and dirty" corrections for 40 // reactions near threshold, with respect to the GHAD application of CHIPS. 41 // ------------------------------------------------------------------------ 38 42 39 43 #ifndef G4QPhotonNuclearCrossSection_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QProtonNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 36 36 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 37 37 // **************************************************************************************** 38 // Short description: CHIPS cross-sections for proton-nuclear interactions 39 // ----------------------------------------------------------------------- 38 40 39 41 #ifndef G4QProtonNuclearCrossSection_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QStringChipsParticleLevelInterface.hh
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // Short description: Interface of QGSC to CHIPS (Energy Flow of soft hadrons) 26 // --------------------------------------------------------------------------- 25 27 // 26 28 #ifndef G4QStringChipsParticleLevelInterface_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QTauNuclearCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QTauNuclearCrossSection.hh,v 1. 6 2008/10/24 19:23:48 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QTauNuclearCrossSection.hh,v 1.7 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 39 39 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 40 40 // **************************************************************************************** 41 // Short description: reaction cross-sections for tau-nuclear reactions, which 42 // are integrals over virtual equivalent photons photons. The tau-nuclear 43 // reactions do not exist in GHAD, so by the present physics lists it is not 44 // simulated at all. 45 // -------------------------------------------------------------------------------- 41 46 42 47 #ifndef G4QTauNuclearCrossSection_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QuasiFreeRatios.hh
r1007 r1055 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 31 31 // M.V. Kossov, ITEP(Moscow), 24-OCT-01 32 32 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006 33 // 33 // ---------------------------------------------------------------------- 34 // Short description: Provides percentage of quasi-free and quasi-elastic 35 // reactions in the inelastic reactions. 36 // ---------------------------------------------------------------------- 34 37 35 38 #ifndef G4QuasiFreeRatios_h … … 68 71 std::pair<G4double,G4double> GetChExFactor(G4double pIU, G4int pPDG, G4int Z, G4int N); 69 72 // scatter (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M) 70 // if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the pro gectile happened73 // if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the projectile happened 71 74 std::pair<G4LorentzVector,G4LorentzVector> Scatter(G4int NPDG, G4LorentzVector N4M, 72 75 G4int pPDG, G4LorentzVector p4M); … … 96 99 static std::vector<G4double*> vL; // Vector of pointers to LogTable 97 100 static std::vector<std::pair<G4double,G4double>*> vX; // Vector of ETPointers to LogTable 98 }; 101 }; 99 102 #endif -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsInterface.hh
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // !!! Was used in QBBC PL, NOW it is not. Must be absolete !!! 26 // ============================================================ 25 27 // 26 28 #ifndef G4StringChipsInterface_h -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4StringChipsParticleLevelInterface.hh
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // Short description: Interface of QGSC to CHIPS (all soft hadrons) 26 // ---------------------------------------------------------------- 25 27 // 26 28 #ifndef G4StringChipsParticleLevelInterface_h … … 59 61 60 62 #ifdef hdebug_SCPLI 61 //Static variables for histogramming63 //Static variables for histogramming 62 64 static const G4int nbh; 63 65 static G4double bhmax; … … 71 73 static G4int* ehis; 72 74 public: 73 //Static functions74 static void Reset()75 {75 //Static functions 76 static void Reset() 77 { 76 78 bhdb=bhmax/nbh; 77 79 ehde=bhmax/nbh; … … 85 87 } 86 88 } 87 static void SetMaxB(G4double mB) {bhmax=mB;}88 static void SetMaxE(G4double mE) {ehmax=mE;}89 static G4int GetB(G4int i){return bhis[i];}90 static G4int GetE(G4int i){return ehis[i];}91 static G4double GetTot() {return toth;}92 static G4int GetNbn() {return nbh;}93 static G4double GetDB() {return bhdb;}94 static G4double GetDE() {return ehde;}95 static G4int GetBov() {return bover;}96 static G4int GetEov() {return eover;}89 static void SetMaxB(G4double mB) {bhmax=mB;} 90 static void SetMaxE(G4double mE) {ehmax=mE;} 91 static G4int GetB(G4int i){return bhis[i];} 92 static G4int GetE(G4int i){return ehis[i];} 93 static G4double GetTot() {return toth;} 94 static G4int GetNbn() {return nbh;} 95 static G4double GetDB() {return bhdb;} 96 static G4double GetDE() {return ehde;} 97 static G4int GetBov() {return bover;} 98 static G4int GetEov() {return eover;} 97 99 #endif 98 100 }; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4VQCrossSection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VQCrossSection.hh,v 1. 9 2007/11/15 09:36:43mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VQCrossSection.hh,v 1.10 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 73 73 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 74 74 // **************************************************************************************** 75 // Short description: a basic class for all CHIPS reaction cross-sections. 76 // ----------------------------------------------------------------------- 75 77 76 78 #ifndef G4VQCrossSection_h … … 98 100 // At present momentum (pMom) must be in GeV (@@ Units) 99 101 virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0) 100 {return G4double(pPDG);}102 {return G4double(pPDG);} 101 103 102 104 virtual G4double ThresholdEnergy(G4int Z, G4int N, G4int PDG=0); // Gives 0 by default -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc
r819 r1055 24 24 // ******************************************************************** 25 25 // 26 27 26 // 28 // Created: 27 // Created: H.-P. Wellicsh: GHAD model wrapper for the CHIPS model (1997) 29 28 // 16.01.08 V.Ivanchenko use initialization similar to other CHIPS models 30 29 // … … 96 95 etaToEtaPrime); 97 96 // G4QEnvironment::SetParameters(solidAngle); 98 // G4cout << "Input info "<< projectilePDGCode << " "99 // << targetPDGCode <<" "100 // << 1./MeV*proj4Mom<<" "101 // << 1./MeV*targ4Mom << " "102 // << nop << G4endl;97 // G4cout << "Input info "<< projectilePDGCode << " " 98 // << targetPDGCode <<" " 99 // << 1./MeV*proj4Mom<<" " 100 // << 1./MeV*targ4Mom << " " 101 // << nop << G4endl; 103 102 G4QHadronVector projHV; 104 103 G4QHadron* iH = new G4QHadron(projectilePDGCode, 1./MeV*proj4Mom); 105 104 projHV.push_back(iH); 106 105 G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode); 107 //G4Quasmon* pan= new G4Quasmon(projectilePDGCode, targetPDGCode, 1./MeV*proj4Mom, 1./MeV*targ4Mom, nop); 106 //G4Quasmon* pan= new G4Quasmon(projectilePDGCode, targetPDGCode, 107 // 1./MeV*proj4Mom, 1./MeV*targ4Mom, nop); 108 108 G4QHadronVector* output=0; 109 109 try -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4GammaNuclearReaction.cc
r968 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // Short description: The CHIPS model provides the G4QHadronVector 26 // output, which is converted to the G4 particle-singletons 27 // -------------------------------------------------------------------- 25 28 // 26 27 // 28 // Created: 29 // Created: J.P. Wellisch, 2000/08/18 29 30 // 01.09.2008 V.Ivanchenko 30 31 // -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuANuNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QANuANuNuclearCrossSection.cc,v 1. 2 2007/11/02 15:57:16mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QANuANuNuclearCrossSection.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 37 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 38 38 // **************************************************************************************** 39 //=============================================================================================== 39 //========================================================================================= 40 // Short description: Provides the (anti-nu,anti-nu)A cross-section (Created by M. Kossov) 41 // ---------------------------------------------------------------------------------------- 40 42 41 43 //#define debug … … 90 92 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 93 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST94 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 95 #endif 94 96 if(pPDG!=-14) … … 111 113 j = 0; // A#0f records found in DB for this projectile 112 114 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB115 { // The nucleus with projPDG is found in AMDB 114 116 if(colN[i]==tgN && colZ[i]==tgZ) 115 {117 { 116 118 lastI=i; 117 119 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 163 165 #endif 164 166 j++; // Increment a#0f records found in DB for this pPDG 165 }166 if(!in) // This nucleus has not been calculated previously167 {167 } 168 if(!in) // This nucleus has not been calculated previously 169 { 168 170 #ifdef pdebug 169 171 G4cout<<"G4QAMNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lstI="<<lastI<<G4endl; … … 172 174 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 173 175 if(lastCS<=0.) 174 {176 { 175 177 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 176 178 #ifdef pdebug … … 184 186 lastTH=pEn; 185 187 } 186 }188 } 187 189 #ifdef pdebug 188 190 G4cout<<"G4QAMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 200 202 #endif 201 203 return lastCS*millibarn; 202 } // End of creation of the new set of parameters204 } // End of creation of the new set of parameters 203 205 else 204 {206 { 205 207 #ifdef pdebug 206 208 G4cout<<"G4QAMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 274 276 { 275 277 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 276 {278 { 277 279 lastTX =TX[I]; // Pointer to the prepared TX function (same isotope) 278 280 lastQE =QE[I]; // Pointer to the prepared QE function (same isotope) 279 }280 else // This isotope wasn't calculated previously => CREATE281 {281 } 282 else // This isotope wasn't calculated previously => CREATE 283 { 282 284 if(first) 283 285 { … … 295 297 TX.push_back(lastTX); 296 298 QE.push_back(lastQE); 297 } // End of creation of the new set of parameters299 } // End of creation of the new set of parameters 298 300 } // End of parameters udate 299 301 // ============================== NOW Calculate the Cross Section ===================== … … 310 312 G4int sep=ran; // as a result = an index of the left edge of the interval 311 313 while(ran>=2) 312 {314 { 313 315 G4int newran=ran/2; 314 316 if(lastE<=lastEN[sep]) sep-=newran; … … 357 359 static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !! 358 360 static const G4double nuEn[nE]={0., 359 1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5,360 1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5,361 3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5,362 7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926,363 .000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930,364 .002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900,365 .035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000,366 2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000};361 1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5, 362 1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5, 363 3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5, 364 7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926, 365 .000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930, 366 .002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900, 367 .035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000, 368 2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000}; 367 369 static const G4double TOTX[nE]={0., 368 3.63538e-5,3.81165e-5,4.00539e-5,4.21884e-5,4.45454e-5,4.71548e-5,5.00511e-5,5.32747e-5,369 5.68730e-5,6.09016e-5,6.54261e-5,7.05246e-5,7.62894e-5,8.28315e-5,9.02838e-5,9.88066e-5,370 .000108594,.000119884,.000132964,.000148191,.000166007,.000186959,.000211736,.000241202,371 .000276453,.000318890,.000370311,.000433042,.000510116,.000605516,.000724514,.000874144,372 .001063870,.001306520,.001619660,.002027520,.002563780,.003275710,.004230080,.005521890,373 .007286920,.009719890,.013099700,.018695100,.029208400,.042095000,.059253700,.082373900,374 .113071000,.151041000,.191803000,.224208000,.234187000,.217774000,.187139000,.157818000,375 .137494000,.125872000,.120462000,.119148000,.120418000,.123027000,.126408000,.129071000};370 3.63538e-5,3.81165e-5,4.00539e-5,4.21884e-5,4.45454e-5,4.71548e-5,5.00511e-5,5.32747e-5, 371 5.68730e-5,6.09016e-5,6.54261e-5,7.05246e-5,7.62894e-5,8.28315e-5,9.02838e-5,9.88066e-5, 372 .000108594,.000119884,.000132964,.000148191,.000166007,.000186959,.000211736,.000241202, 373 .000276453,.000318890,.000370311,.000433042,.000510116,.000605516,.000724514,.000874144, 374 .001063870,.001306520,.001619660,.002027520,.002563780,.003275710,.004230080,.005521890, 375 .007286920,.009719890,.013099700,.018695100,.029208400,.042095000,.059253700,.082373900, 376 .113071000,.151041000,.191803000,.224208000,.234187000,.217774000,.187139000,.157818000, 377 .137494000,.125872000,.120462000,.119148000,.120418000,.123027000,.126408000,.129071000}; 376 378 static const G4double QELX[nE]={0., 377 .365220e-9,.401502e-9,.443364e-9,.491885e-9,.548393e-9,.614536e-9,.692362e-9,.784441e-9,378 .894012e-9,1.02519e-9,1.18322e-9,1.37487e-9,1.60890e-9,1.89677e-9,2.25355e-9,2.69928e-9,379 3.26079e-9,3.97433e-9,4.88937e-9,6.07407e-9,7.62331e-9,9.67058e-9,1.24058e-8,1.61022e-8,380 2.11580e-8,2.81605e-8,3.79876e-8,5.19696e-8,7.21515e-8,1.01724e-7,1.45743e-7,2.12353e-7,381 3.14890e-7,4.75585e-7,7.32171e-7,1.14991e-6,1.84390e-6,3.02121e-6,5.06217e-6,8.68002e-6,382 1.52408e-5,2.74159e-5,5.05363e-5,.000100111,.000220489,.000455269,.000933841,.001925650,383 .003994300,.008221270,.016417600,.030830400,.052902400,.082519200,.115560000,.149598000,384 .184112000,.215102000,.238253000,.252949000,.261267000,.265626000,.267782000,.268791000};379 .365220e-9,.401502e-9,.443364e-9,.491885e-9,.548393e-9,.614536e-9,.692362e-9,.784441e-9, 380 .894012e-9,1.02519e-9,1.18322e-9,1.37487e-9,1.60890e-9,1.89677e-9,2.25355e-9,2.69928e-9, 381 3.26079e-9,3.97433e-9,4.88937e-9,6.07407e-9,7.62331e-9,9.67058e-9,1.24058e-8,1.61022e-8, 382 2.11580e-8,2.81605e-8,3.79876e-8,5.19696e-8,7.21515e-8,1.01724e-7,1.45743e-7,2.12353e-7, 383 3.14890e-7,4.75585e-7,7.32171e-7,1.14991e-6,1.84390e-6,3.02121e-6,5.06217e-6,8.68002e-6, 384 1.52408e-5,2.74159e-5,5.05363e-5,.000100111,.000220489,.000455269,.000933841,.001925650, 385 .003994300,.008221270,.016417600,.030830400,.052902400,.082519200,.115560000,.149598000, 386 .184112000,.215102000,.238253000,.252949000,.261267000,.265626000,.267782000,.268791000}; 385 387 // -------------------------------- 386 388 G4int first=0; 387 389 if(z<0.) 388 {390 { 389 391 first=1; 390 392 z=-z; … … 405 407 t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection 406 408 q[k]=QELX[k]*dz/a; // QuasiElasticCrossSection 407 }409 } 408 410 return first; 409 411 } … … 421 423 static const G4double Xl[nQ2]={5.20224e-16, 422 424 .006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898, 423 .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875,.180672,424 .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944,.279960,425 .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724,.380867,426 .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547,.482771,427 .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065,.585346,428 .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072,.688394,429 .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434,.791786,430 .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060,.895434,431 .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883,.999275};432 // Direct table425 .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672, 426 .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960, 427 .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867, 428 .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771, 429 .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346, 430 .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394, 431 .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786, 432 .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434, 433 .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275}; 434 // Direct table 433 435 static const G4double Xmax=Xl[lQ2]; 434 436 static const G4double Xmin=Xl[0]; 435 437 static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2) 436 438 static const G4double inl[nQ2]={0, 437 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809,11.6406,438 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353,21.9496,439 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798,31.9745,440 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718,41.8553,441 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718,51.6481,442 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109,61.3822,443 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071,71.0748,444 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721,80.7373,445 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140,90.3771,446 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384,100.000};439 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406, 440 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496, 441 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745, 442 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553, 443 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481, 444 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822, 445 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748, 446 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373, 447 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771, 448 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000}; 447 449 G4double Enu=lastE; // Get energy of the last calculated cross-section 448 450 G4double dEnu=Enu+Enu; // doubled energy of nu/anu … … 503 505 // Reversed table 504 506 static const G4double X0[nX]={5.21412e-05, 505 .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493,2.13937,506 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233,4.15131, 4.62182};507 .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937, 508 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182}; 507 509 static const G4double X1[nX]={.00102591, 508 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835,4.78561,509 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502,8.66246, 9.25086};510 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561, 511 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086}; 510 512 static const G4double X2[nX]={.0120304, 511 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217,11.5564,512 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006,18.9386, 19.7892};513 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564, 514 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892}; 513 515 static const G4double X3[nX]={.060124, 514 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342,23.0142,515 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589,34.8912, 36.1095};516 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142, 517 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095}; 516 518 static const G4double X4[nX]={.0992363, 517 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320,29.8615,518 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353,43.0485, 44.3354};519 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615, 520 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354}; 519 521 static const G4double X5[nX]={.0561127, 520 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211,24.5291,521 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656,34.2076, 35.1265};522 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291, 523 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265}; 522 524 static const G4double X6[nX]={.0145859, 523 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025,15.1608,524 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300,20.6566, 21.1706};525 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608, 526 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706}; 525 527 static const G4double X7[nX]={.00241155, 526 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858,8.61732,527 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550,11.5306, 11.7982};528 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732, 529 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982}; 528 530 static const G4double X8[nX]={.000316863, 529 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651,5.08666,530 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065,6.70149, 6.84742};531 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666, 532 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742}; 531 533 static const G4double X9[nX]={3.73544e-05, 532 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796,3.26949,533 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697,4.24713, 4.33413};534 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949, 535 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413}; 534 536 static const G4double XA[nX]={4.19131e-06, 535 .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770,2.30332,536 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437,2.95355, 3.01051};537 .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332, 538 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051}; 537 539 static const G4double XB[nX]={4.59981e-07, 538 .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011,1.76040,539 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878,2.23107, 2.27162};540 .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040, 541 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162}; 540 542 static const G4double XC[nX]={4.99861e-08, 541 .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269,1.43809,542 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128,1.80371, 1.83473};543 .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809, 544 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473}; 543 545 static const G4double XD[nX]={5.40832e-09, 544 .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172,1.23787,545 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197,1.53829, 1.56339};546 .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787, 547 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339}; 546 548 static const G4double XE[nX]={5.84029e-10, 547 .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930,1.10939,548 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462,1.36691, 1.38812};549 .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939, 550 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812}; 549 551 static const G4double XF[nX]={6.30137e-11, 550 .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915,1.02580,551 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358,1.25298, 1.27139};552 .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580, 553 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139}; 552 554 static const G4double XG[nX]={6.79627e-12, 553 .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963,.972639,554 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867,1.17572, 1.19183};555 .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639, 556 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183}; 555 557 static const G4double XH[nX]={7.32882e-13, 556 .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994,.942802,557 .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816,1.12286, 1.13667};558 .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802, 559 .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667}; 558 560 static const G4double XI[nX]={7.90251e-14, 559 .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576,.933269,560 .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489,1.08683, 1.09792};561 .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269, 562 .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792}; 561 563 static const G4double XJ[nX]={8.52083e-15, 562 .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626,.940597,563 .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383,1.06253, 1.07046};564 .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597, 565 .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046}; 564 566 // Direct table 565 567 static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0], … … 574 576 {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ}; 575 577 static const G4double I0[nX]={0, 576 .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998,10.9680,577 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752,20.0000};578 .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680, 579 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000}; 578 580 static const G4double I1[nX]={0, 579 .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989,9.57708,580 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245,20.0000};581 .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708, 582 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000}; 581 583 static const G4double I2[nX]={0, 582 .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474,8.03228,583 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356,20.0000};584 .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228, 585 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000}; 584 586 static const G4double I3[nX]={0, 585 .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867,6.80331,586 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239,20.0000};587 .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331, 588 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000}; 587 589 static const G4double I4[nX]={0, 588 .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433,5.92245,589 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924,20.0000};590 .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245, 591 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000}; 590 592 static const G4double I5[nX]={0, 591 .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283,5.28411,592 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115,20.0000};593 .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411, 594 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000}; 593 595 static const G4double I6[nX]={0, 594 .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177,4.81249,595 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630,20.0000};596 .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249, 597 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000}; 596 598 static const G4double I7[nX]={0, 597 .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065,4.44429,598 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313,20.0000};599 .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429, 600 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000}; 599 601 static const G4double I8[nX]={0, 600 .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517,4.13277,601 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033,20.0000};602 .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277, 603 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000}; 602 604 static const G4double I9[nX]={0, 603 .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376,3.85535,604 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719,20.0000};605 .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535, 606 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000}; 605 607 static const G4double IA[nX]={0, 606 .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034,3.60650,607 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362,20.0000};608 .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650, 609 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000}; 608 610 static const G4double IB[nX]={0, 609 .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459,3.38708,610 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990,20.0000};611 .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708, 612 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000}; 611 613 static const G4double IC[nX]={0, 612 .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555,3.19709,613 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638,20.0000};614 .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709, 615 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000}; 614 616 static const G4double ID[nX]={0, 615 .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912,3.03253,616 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320,20.0000};617 .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253, 618 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000}; 617 619 static const G4double IE[nX]={0, 618 .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735,2.88443,619 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993,20.0000};620 .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443, 621 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000}; 620 622 static const G4double IF[nX]={0, 621 .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754,2.73758,622 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522,20.0000};623 .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758, 624 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000}; 623 625 static const G4double IG[nX]={0, 624 .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931,2.56677,625 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577,20.0000};626 .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677, 627 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000}; 626 628 static const G4double IH[nX]={0, 627 .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283,2.33399,628 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417,20.0000};629 .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399, 630 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000}; 629 631 static const G4double II[nX]={0, 630 .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322,2.00554,631 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567,20.0000};632 .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554, 633 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000}; 632 634 static const G4double IJ[nX]={0, 633 .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208,1.60544,634 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885,20.0000};635 .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544, 636 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000}; 635 637 static const G4double* Il[nE]= 636 638 {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ}; 637 639 static const G4double lE[nE]={ 638 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499,1.68292,639 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426,5.76218};640 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292, 641 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218}; 640 642 static const G4double lEmi=lE[0]; 641 643 static const G4double lEma=lE[nE-1]; 642 644 static const G4double dlE=(lEma-lEmi)/bE; 643 //***************************************************************************************645 //*************************************************************************************** 644 646 G4double Enu=lastE; // Get energy of the last calculated cross-section 645 647 G4double lEn=std::log(Enu); // log(E) for interpolation … … 727 729 } 728 730 729 // This class can provide only virtual exchange pi+ (a substitute for W+boson)731 // This class can provide only virtual exchange by gamma (a substitute for Z0 boson) 730 732 G4int G4QANuANuNuclearCrossSection::GetExchangePDGCode() {return 22;} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuENuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QANuENuclearCrossSection.cc,v 1. 2 2007/11/01 16:09:38mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QANuENuclearCrossSection.cc,v 1.4 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // G4 Physics class: G4QANuENuclearCrossSection for (anti_n i_e,e+) cross sections31 // G4 Physics class: G4QANuENuclearCrossSection for (anti_nu_e,e+) cross sections 32 32 // Created: M.V. Kossov, CERN/ITEP(Moscow), 24-SEP-2007 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 24-SEP-2007 … … 37 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 38 38 // **************************************************************************************** 39 //========================================================================================= ======39 //========================================================================================= 40 40 41 41 //#define debug … … 90 90 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 91 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 93 #endif 94 94 if(pPDG!=-12) … … 111 111 j = 0; // A#0f records found in DB for this projectile 112 112 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB113 { // The nucleus with projPDG is found in AMDB 114 114 if(colN[i]==tgN && colZ[i]==tgZ) 115 {115 { 116 116 lastI=i; 117 117 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 163 163 #endif 164 164 j++; // Increment a#0f records found in DB for this pPDG 165 }166 if(!in) // This nucleus has not been calculated previously167 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 168 168 #ifdef pdebug 169 169 G4cout<<"G4QAENCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lstI="<<lastI<<G4endl; … … 172 172 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 173 173 if(lastCS<=0.) 174 {174 { 175 175 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 176 176 #ifdef pdebug … … 184 184 lastTH=pEn; 185 185 } 186 }186 } 187 187 #ifdef pdebug 188 188 G4cout<<"G4QAENCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 200 200 #endif 201 201 return lastCS*millibarn; 202 } // End of creation of the new set of parameters202 } // End of creation of the new set of parameters 203 203 else 204 {204 { 205 205 #ifdef pdebug 206 206 G4cout<<"G4QAENCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 245 245 G4double G4QANuENuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int) 246 246 { 247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1 .,0.)/GeV;248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1 .,1.)/GeV;249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2 .,1.)/GeV/2.;247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV; 248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV; 249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.; 250 250 static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV) 251 251 static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV) … … 294 294 { 295 295 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 296 {296 { 297 297 lastTX =TX[I]; // Pointer to the prepared TX function (same isotope) 298 298 lastQE =QE[I]; // Pointer to the prepared QE function (same isotope) 299 }300 else // This isotope wasn't calculated previously => CREATE301 {299 } 300 else // This isotope wasn't calculated previously => CREATE 301 { 302 302 if(first) 303 303 { … … 315 315 TX.push_back(lastTX); 316 316 QE.push_back(lastQE); 317 } // End of creation of the new set of parameters317 } // End of creation of the new set of parameters 318 318 } // End of parameters udate 319 319 // ============================== NOW Calculate the Cross Section ===================== … … 330 330 G4int sep=ran; // as a result = an index of the left edge of the interval 331 331 while(ran>=2) 332 {332 { 333 333 G4int newran=ran/2; 334 334 G4double oldL=lastEN[sep]; … … 386 386 static const G4int nE=65; // !! If change this, change it in CalculateCrossSection() !! 387 387 static const G4double nuEn[nE]={thresh, 388 .00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492,389 .00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646,390 .00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448,391 .00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806,392 .00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780,393 .04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200,394 .38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000,395 8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200};388 .00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492, 389 .00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646, 390 .00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448, 391 .00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806, 392 .00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780, 393 .04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200, 394 .38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000, 395 8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200}; 396 396 static const G4double TOTX[nE]={0., 397 .00046923,.00160693,.00229560,.00288772,.00344344,.00398831,.00453725,.00510087,398 .00568797,.00630663,.00696489,.00767121,.00843477,.00926586,.01017610,.01117910,399 .01229040,.01352820,.01491430,.01647420,.01823820,.02024280,.02253130,.02515600,400 .02818010,.03167950,.03574640,.04049260,.04605330,.05739330,.07028190,.08396290,401 .09969400,.11756200,.13812500,.16207000,.19099600,.22447700,.26434900,.31051900,402 .36357400,.42242900,.48500000,.54692800,.60140500,.63996800,.65519300,.64339200,403 .60784300,.55734400,.50212600,.45116800,.40962600,.37854800,.35702100,.34330900,404 .33576200,.33300100,.33387100,.33737700,.34235200,.34880100,.35507500,.35961200};397 .00046923,.00160693,.00229560,.00288772,.00344344,.00398831,.00453725,.00510087, 398 .00568797,.00630663,.00696489,.00767121,.00843477,.00926586,.01017610,.01117910, 399 .01229040,.01352820,.01491430,.01647420,.01823820,.02024280,.02253130,.02515600, 400 .02818010,.03167950,.03574640,.04049260,.04605330,.05739330,.07028190,.08396290, 401 .09969400,.11756200,.13812500,.16207000,.19099600,.22447700,.26434900,.31051900, 402 .36357400,.42242900,.48500000,.54692800,.60140500,.63996800,.65519300,.64339200, 403 .60784300,.55734400,.50212600,.45116800,.40962600,.37854800,.35702100,.34330900, 404 .33576200,.33300100,.33387100,.33737700,.34235200,.34880100,.35507500,.35961200}; 405 405 static const G4double QELX[nE]={0., 406 2.40856e-7,8.61338e-7,1.28732e-6,1.69747e-6,2.12608e-6,2.59201e-6,3.11071e-6,3.69770e-6,407 4.37028e-6,5.14877e-6,6.05773e-6,7.12746e-6,8.39567e-6,9.90987e-6,1.17304e-5,1.39343e-5,408 1.66209e-5,1.99191e-5,2.39974e-5,2.90775e-5,3.54536e-5,4.35191e-5,5.38039e-5,6.70278e-5,409 8.41765e-5,.000106611,.000136228,.000175689,.000228768,.000328317,.000465818,.000648870,410 .000904299,.001260330,.001762740,.002480740,.003534040,.005062210,.007327720,.010675000,411 .015645500,.022975800,.033679400,.049004300,.070294800,.098706100,.134951000,.179193000,412 .231297000,.287287000,.344760000,.404397000,.465915000,.527060000,.584085000,.632748000,413 .671346000,.699744000,.719355000,.732541000,.740996000,.746249000,.749265000,.751160000};406 2.40856e-7,8.61338e-7,1.28732e-6,1.69747e-6,2.12608e-6,2.59201e-6,3.11071e-6,3.69770e-6, 407 4.37028e-6,5.14877e-6,6.05773e-6,7.12746e-6,8.39567e-6,9.90987e-6,1.17304e-5,1.39343e-5, 408 1.66209e-5,1.99191e-5,2.39974e-5,2.90775e-5,3.54536e-5,4.35191e-5,5.38039e-5,6.70278e-5, 409 8.41765e-5,.000106611,.000136228,.000175689,.000228768,.000328317,.000465818,.000648870, 410 .000904299,.001260330,.001762740,.002480740,.003534040,.005062210,.007327720,.010675000, 411 .015645500,.022975800,.033679400,.049004300,.070294800,.098706100,.134951000,.179193000, 412 .231297000,.287287000,.344760000,.404397000,.465915000,.527060000,.584085000,.632748000, 413 .671346000,.699744000,.719355000,.732541000,.740996000,.746249000,.749265000,.751160000}; 414 414 // -------------------------------- 415 415 G4int first=0; 416 416 if(z<0.) 417 {417 { 418 418 first=1; 419 419 z=-z; … … 434 434 t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection 435 435 q[k]=QELX[k]*dz/a; // QuasiElasticCrossSection 436 }436 } 437 437 return first; 438 438 } … … 454 454 static const G4double Xl[nQ2]={5.20224e-16, 455 455 .006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898, 456 .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875,.180672,457 .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944,.279960,458 .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724,.380867,459 .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547,.482771,460 .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065,.585346,461 .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072,.688394,462 .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434,.791786,463 .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060,.895434,464 .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883,.999275};465 // Direct table456 .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672, 457 .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960, 458 .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867, 459 .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771, 460 .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346, 461 .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394, 462 .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786, 463 .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434, 464 .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275}; 465 // Direct table 466 466 static const G4double Xmax=Xl[lQ2]; 467 467 static const G4double Xmin=Xl[0]; 468 468 static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2) 469 469 static const G4double inl[nQ2]={0, 470 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809,11.6406,471 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353,21.9496,472 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798,31.9745,473 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718,41.8553,474 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718,51.6481,475 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109,61.3822,476 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071,71.0748,477 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721,80.7373,478 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140,90.3771,479 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384,100.000};470 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406, 471 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496, 472 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745, 473 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553, 474 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481, 475 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822, 476 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748, 477 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373, 478 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771, 479 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000}; 480 480 G4double Enu=lastE; // Get energy of the last calculated cross-section 481 481 G4double dEnu=Enu+Enu; // doubled energy of nu/anu … … 544 544 // Reversed table 545 545 static const G4double X0[nX]={5.21412e-05, 546 .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493,2.13937,547 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233,4.15131, 4.62182};546 .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937, 547 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182}; 548 548 static const G4double X1[nX]={.00102591, 549 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835,4.78561,550 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502,8.66246, 9.25086};549 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561, 550 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086}; 551 551 static const G4double X2[nX]={.0120304, 552 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217,11.5564,553 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006,18.9386, 19.7892};552 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564, 553 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892}; 554 554 static const G4double X3[nX]={.060124, 555 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342,23.0142,556 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589,34.8912, 36.1095};555 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142, 556 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095}; 557 557 static const G4double X4[nX]={.0992363, 558 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320,29.8615,559 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353,43.0485, 44.3354};558 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615, 559 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354}; 560 560 static const G4double X5[nX]={.0561127, 561 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211,24.5291,562 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656,34.2076, 35.1265};561 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291, 562 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265}; 563 563 static const G4double X6[nX]={.0145859, 564 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025,15.1608,565 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300,20.6566, 21.1706};564 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608, 565 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706}; 566 566 static const G4double X7[nX]={.00241155, 567 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858,8.61732,568 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550,11.5306, 11.7982};567 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732, 568 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982}; 569 569 static const G4double X8[nX]={.000316863, 570 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651,5.08666,571 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065,6.70149, 6.84742};570 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666, 571 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742}; 572 572 static const G4double X9[nX]={3.73544e-05, 573 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796,3.26949,574 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697,4.24713, 4.33413};573 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949, 574 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413}; 575 575 static const G4double XA[nX]={4.19131e-06, 576 .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770,2.30332,577 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437,2.95355, 3.01051};576 .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332, 577 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051}; 578 578 static const G4double XB[nX]={4.59981e-07, 579 .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011,1.76040,580 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878,2.23107, 2.27162};579 .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040, 580 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162}; 581 581 static const G4double XC[nX]={4.99861e-08, 582 .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269,1.43809,583 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128,1.80371, 1.83473};582 .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809, 583 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473}; 584 584 static const G4double XD[nX]={5.40832e-09, 585 .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172,1.23787,586 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197,1.53829, 1.56339};585 .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787, 586 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339}; 587 587 static const G4double XE[nX]={5.84029e-10, 588 .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930,1.10939,589 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462,1.36691, 1.38812};588 .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939, 589 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812}; 590 590 static const G4double XF[nX]={6.30137e-11, 591 .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915,1.02580,592 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358,1.25298, 1.27139};591 .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580, 592 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139}; 593 593 static const G4double XG[nX]={6.79627e-12, 594 .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963,.972639,595 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867,1.17572, 1.19183};594 .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639, 595 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183}; 596 596 static const G4double XH[nX]={7.32882e-13, 597 .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994,.942802,598 .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816,1.12286, 1.13667};597 .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802, 598 .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667}; 599 599 static const G4double XI[nX]={7.90251e-14, 600 .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576,.933269,601 .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489,1.08683, 1.09792};600 .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269, 601 .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792}; 602 602 static const G4double XJ[nX]={8.52083e-15, 603 .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626,.940597,604 .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383,1.06253, 1.07046};603 .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597, 604 .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046}; 605 605 // Direct table 606 606 static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0], … … 615 615 {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ}; 616 616 static const G4double I0[nX]={0, 617 .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998,10.9680,618 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752,20.0000};617 .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680, 618 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000}; 619 619 static const G4double I1[nX]={0, 620 .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989,9.57708,621 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245,20.0000};620 .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708, 621 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000}; 622 622 static const G4double I2[nX]={0, 623 .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474,8.03228,624 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356,20.0000};623 .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228, 624 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000}; 625 625 static const G4double I3[nX]={0, 626 .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867,6.80331,627 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239,20.0000};626 .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331, 627 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000}; 628 628 static const G4double I4[nX]={0, 629 .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433,5.92245,630 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924,20.0000};629 .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245, 630 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000}; 631 631 static const G4double I5[nX]={0, 632 .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283,5.28411,633 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115,20.0000};632 .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411, 633 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000}; 634 634 static const G4double I6[nX]={0, 635 .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177,4.81249,636 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630,20.0000};635 .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249, 636 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000}; 637 637 static const G4double I7[nX]={0, 638 .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065,4.44429,639 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313,20.0000};638 .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429, 639 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000}; 640 640 static const G4double I8[nX]={0, 641 .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517,4.13277,642 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033,20.0000};641 .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277, 642 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000}; 643 643 static const G4double I9[nX]={0, 644 .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376,3.85535,645 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719,20.0000};644 .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535, 645 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000}; 646 646 static const G4double IA[nX]={0, 647 .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034,3.60650,648 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362,20.0000};647 .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650, 648 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000}; 649 649 static const G4double IB[nX]={0, 650 .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459,3.38708,651 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990,20.0000};650 .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708, 651 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000}; 652 652 static const G4double IC[nX]={0, 653 .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555,3.19709,654 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638,20.0000};653 .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709, 654 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000}; 655 655 static const G4double ID[nX]={0, 656 .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912,3.03253,657 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320,20.0000};656 .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253, 657 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000}; 658 658 static const G4double IE[nX]={0, 659 .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735,2.88443,660 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993,20.0000};659 .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443, 660 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000}; 661 661 static const G4double IF[nX]={0, 662 .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754,2.73758,663 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522,20.0000};662 .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758, 663 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000}; 664 664 static const G4double IG[nX]={0, 665 .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931,2.56677,666 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577,20.0000};665 .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677, 666 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000}; 667 667 static const G4double IH[nX]={0, 668 .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283,2.33399,669 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417,20.0000};668 .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399, 669 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000}; 670 670 static const G4double II[nX]={0, 671 .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322,2.00554,672 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567,20.0000};671 .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554, 672 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000}; 673 673 static const G4double IJ[nX]={0, 674 .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208,1.60544,675 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885,20.0000};674 .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544, 675 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000}; 676 676 static const G4double* Il[nE]= 677 677 {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ}; 678 678 static const G4double lE[nE]={ 679 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499,1.68292,680 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426,5.76218};679 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292, 680 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218}; 681 681 static const G4double lEmi=lE[0]; 682 682 static const G4double lEma=lE[nE-1]; 683 683 static const G4double dlE=(lEma-lEmi)/bE; 684 //***************************************************************************************684 //*************************************************************************************** 685 685 G4double Enu=lastE; // Get energy of the last calculated cross-section 686 686 G4double lEn=std::log(Enu); // log(E) for interpolation … … 772 772 } 773 773 774 // This class can provide only virtual exchange pi + (a substitute for W+boson)774 // This class can provide only virtual exchange pi- (a substitute for W- boson) 775 775 G4int G4QANuENuclearCrossSection::GetExchangePDGCode() {return -211;} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QANuMuNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QANuMuNuclearCrossSection.cc,v 1.1 1 2007/11/01 16:09:38mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QANuMuNuclearCrossSection.cc,v 1.13 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // G4 Physics class: G4QANuMuNuclearCrossSection for gamma+A cross sections31 // G4 Physics class: G4QANuMuNuclearCrossSection for (anu_mu,mu+)A cross sections 32 32 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03 … … 37 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 38 38 // **************************************************************************************** 39 //========================================================================================= ======39 //========================================================================================= 40 40 41 41 //#define debug … … 90 90 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 91 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 93 #endif 94 94 if(pPDG!=-14) … … 111 111 j = 0; // A#0f records found in DB for this projectile 112 112 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB113 { // The nucleus with projPDG is found in AMDB 114 114 if(colN[i]==tgN && colZ[i]==tgZ) 115 {115 { 116 116 lastI=i; 117 117 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 163 163 #endif 164 164 j++; // Increment a#0f records found in DB for this pPDG 165 }166 if(!in) // This nucleus has not been calculated previously167 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 168 168 #ifdef pdebug 169 169 G4cout<<"G4QAMNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lstI="<<lastI<<G4endl; … … 172 172 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 173 173 if(lastCS<=0.) 174 {174 { 175 175 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 176 176 #ifdef pdebug … … 184 184 lastTH=pEn; 185 185 } 186 }186 } 187 187 #ifdef pdebug 188 188 G4cout<<"G4QAMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 200 200 #endif 201 201 return lastCS*millibarn; 202 } // End of creation of the new set of parameters202 } // End of creation of the new set of parameters 203 203 else 204 {204 { 205 205 #ifdef pdebug 206 206 G4cout<<"G4QAMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 245 245 G4double G4QANuMuNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int) 246 246 { 247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1 .,0.)/GeV;248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1 .,1.)/GeV;249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2 .,1.)/GeV/2.;247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV; 248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV; 249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.; 250 250 static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV) 251 251 static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV) … … 294 294 { 295 295 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 296 {296 { 297 297 lastTX =TX[I]; // Pointer to the prepared TX function (same isotope) 298 298 lastQE =QE[I]; // Pointer to the prepared QE function (same isotope) 299 }300 else // This isotope wasn't calculated previously => CREATE301 {299 } 300 else // This isotope wasn't calculated previously => CREATE 301 { 302 302 if(first) 303 303 { … … 315 315 TX.push_back(lastTX); 316 316 QE.push_back(lastQE); 317 } // End of creation of the new set of parameters317 } // End of creation of the new set of parameters 318 318 } // End of parameters udate 319 319 // ============================== NOW Calculate the Cross Section ===================== … … 330 330 G4int sep=ran; // as a result = an index of the left edge of the interval 331 331 while(ran>=2) 332 {332 { 333 333 G4int newran=ran/2; 334 334 if(lastE<=lastEN[sep]) sep-=newran; … … 382 382 static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !! 383 383 static const G4double nuEn[nE]={thresh, 384 .112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838,385 .169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789,386 .306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893,387 .703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390,388 2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606,389 12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201,390 128.036,170.085,228.220,309.420};384 .112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838, 385 .169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789, 386 .306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893, 387 .703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390, 388 2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606, 389 12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201, 390 128.036,170.085,228.220,309.420}; 391 391 static const G4double TOTX[nE]={0., 392 .077498,.247583,.329691,.386384,.429087,.462699,.489899,.512316,.530996,.546614,393 .559616,.570292,.578840,.585395,.590053,.593083,.594197,.593614,.591396,.587611,394 .582335,.575653,.567667,.558490,.548417,.537270,.525352,.512825,.499857,.486620,395 .473283,.460014,.446970,.434294,.422116,.410656,.399782,.389665,.380349,.371860,396 .364207,.357387,.351388,.346192,.341778,.338122,.335198,.332980,.331439,.330544,397 .330263,.330558,.331391,.332718,.334494,.336667,.339182,.341697,.344470,.348125,398 .351322,.354481,.357507,.359239};392 .077498,.247583,.329691,.386384,.429087,.462699,.489899,.512316,.530996,.546614, 393 .559616,.570292,.578840,.585395,.590053,.593083,.594197,.593614,.591396,.587611, 394 .582335,.575653,.567667,.558490,.548417,.537270,.525352,.512825,.499857,.486620, 395 .473283,.460014,.446970,.434294,.422116,.410656,.399782,.389665,.380349,.371860, 396 .364207,.357387,.351388,.346192,.341778,.338122,.335198,.332980,.331439,.330544, 397 .330263,.330558,.331391,.332718,.334494,.336667,.339182,.341697,.344470,.348125, 398 .351322,.354481,.357507,.359239}; 399 399 static const G4double QELX[nE]={0., 400 .008683,.028739,.039700,.048327,.055820,.062693,.069235,.075631,.082010,.088463,401 .095059,.101851,.108883,.116192,.123814,.131826,.140185,.148962,.158197,.167933,402 .178221,.189119,.200700,.213045,.226326,.240454,.255277,.270612,.286388,.302608,403 .319318,.336582,.354468,.373031,.392427,.412445,.433146,.454448,.476222,.498289,404 .520430,.542558,.564130,.585003,.604928,.623680,.641266,.657255,.671704,.684586,405 .696111,.706028,.714553,.721951,.728085,.733182,.737348,.740958,.743716,.746059,406 .747806,.749129,.750331,.751100};400 .008683,.028739,.039700,.048327,.055820,.062693,.069235,.075631,.082010,.088463, 401 .095059,.101851,.108883,.116192,.123814,.131826,.140185,.148962,.158197,.167933, 402 .178221,.189119,.200700,.213045,.226326,.240454,.255277,.270612,.286388,.302608, 403 .319318,.336582,.354468,.373031,.392427,.412445,.433146,.454448,.476222,.498289, 404 .520430,.542558,.564130,.585003,.604928,.623680,.641266,.657255,.671704,.684586, 405 .696111,.706028,.714553,.721951,.728085,.733182,.737348,.740958,.743716,.746059, 406 .747806,.749129,.750331,.751100}; 407 407 408 408 // -------------------------------- 409 409 G4int first=0; 410 410 if(z<0.) 411 {411 { 412 412 first=1; 413 413 z=-z; … … 428 428 t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection 429 429 q[k]=QELX[k]*dz/a; // QuasiElasticCrossSection 430 }430 } 431 431 return first; 432 432 } … … 448 448 static const G4double Xl[nQ2]={5.20224e-16, 449 449 .006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898, 450 .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875,.180672,451 .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944,.279960,452 .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724,.380867,453 .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547,.482771,454 .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065,.585346,455 .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072,.688394,456 .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434,.791786,457 .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060,.895434,458 .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883,.999275};459 // Direct table450 .093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672, 451 .190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960, 452 .289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867, 453 .391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771, 454 .493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346, 455 .595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394, 456 .698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786, 457 .802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434, 458 .905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275}; 459 // Direct table 460 460 static const G4double Xmax=Xl[lQ2]; 461 461 static const G4double Xmin=Xl[0]; 462 462 static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2) 463 463 static const G4double inl[nQ2]={0, 464 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809,11.6406,465 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353,21.9496,466 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798,31.9745,467 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718,41.8553,468 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718,51.6481,469 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109,61.3822,470 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071,71.0748,471 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721,80.7373,472 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140,90.3771,473 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384,100.000};464 1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406, 465 12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496, 466 22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745, 467 32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553, 468 42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481, 469 52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822, 470 62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748, 471 72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373, 472 81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771, 473 91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000}; 474 474 G4double Enu=lastE; // Get energy of the last calculated cross-section 475 475 G4double dEnu=Enu+Enu; // doubled energy of nu/anu … … 538 538 // Reversed table 539 539 static const G4double X0[nX]={5.21412e-05, 540 .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493,2.13937,541 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233,4.15131, 4.62182};540 .437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937, 541 2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182}; 542 542 static const G4double X1[nX]={.00102591, 543 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835,4.78561,544 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502,8.66246, 9.25086};543 1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561, 544 5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086}; 545 545 static const G4double X2[nX]={.0120304, 546 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217,11.5564,547 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006,18.9386, 19.7892};546 2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564, 547 12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892}; 548 548 static const G4double X3[nX]={.060124, 549 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342,23.0142,550 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589,34.8912, 36.1095};549 5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142, 550 24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095}; 551 551 static const G4double X4[nX]={.0992363, 552 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320,29.8615,553 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353,43.0485, 44.3354};552 8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615, 553 31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354}; 554 554 static const G4double X5[nX]={.0561127, 555 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211,24.5291,556 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656,34.2076, 35.1265};555 7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291, 556 25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265}; 557 557 static const G4double X6[nX]={.0145859, 558 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025,15.1608,559 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300,20.6566, 21.1706};558 4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608, 559 15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706}; 560 560 static const G4double X7[nX]={.00241155, 561 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858,8.61732,562 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550,11.5306, 11.7982};561 2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732, 562 9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982}; 563 563 static const G4double X8[nX]={.000316863, 564 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651,5.08666,565 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065,6.70149, 6.84742};564 1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666, 565 5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742}; 566 566 static const G4double X9[nX]={3.73544e-05, 567 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796,3.26949,568 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697,4.24713, 4.33413};567 1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949, 568 3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413}; 569 569 static const G4double XA[nX]={4.19131e-06, 570 .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770,2.30332,571 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437,2.95355, 3.01051};570 .849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332, 571 2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051}; 572 572 static const G4double XB[nX]={4.59981e-07, 573 .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011,1.76040,574 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878,2.23107, 2.27162};573 .666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040, 574 1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162}; 575 575 static const G4double XC[nX]={4.99861e-08, 576 .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269,1.43809,577 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128,1.80371, 1.83473};576 .556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809, 577 1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473}; 578 578 static const G4double XD[nX]={5.40832e-09, 579 .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172,1.23787,580 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197,1.53829, 1.56339};579 .488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787, 580 1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339}; 581 581 static const G4double XE[nX]={5.84029e-10, 582 .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930,1.10939,583 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462,1.36691, 1.38812};582 .445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939, 583 1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812}; 584 584 static const G4double XF[nX]={6.30137e-11, 585 .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915,1.02580,586 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358,1.25298, 1.27139};585 .418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580, 586 1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139}; 587 587 static const G4double XG[nX]={6.79627e-12, 588 .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963,.972639,589 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867,1.17572, 1.19183};588 .405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639, 589 1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183}; 590 590 static const G4double XH[nX]={7.32882e-13, 591 .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994,.942802,592 .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816,1.12286, 1.13667};591 .404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802, 592 .969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667}; 593 593 static const G4double XI[nX]={7.90251e-14, 594 .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576,.933269,595 .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489,1.08683, 1.09792};594 .418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269, 595 .957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792}; 596 596 static const G4double XJ[nX]={8.52083e-15, 597 .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626,.940597,598 .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383,1.06253, 1.07046};597 .447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597, 598 .960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046}; 599 599 // Direct table 600 600 static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0], … … 609 609 {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ}; 610 610 static const G4double I0[nX]={0, 611 .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998,10.9680,612 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752,20.0000};611 .354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680, 612 12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000}; 613 613 static const G4double I1[nX]={0, 614 .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989,9.57708,615 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245,20.0000};614 .281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708, 615 10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000}; 616 616 static const G4double I2[nX]={0, 617 .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474,8.03228,618 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356,20.0000};617 .201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228, 618 9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000}; 619 619 static const G4double I3[nX]={0, 620 .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867,6.80331,621 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239,20.0000};620 .140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331, 621 7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000}; 622 622 static const G4double I4[nX]={0, 623 .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433,5.92245,624 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924,20.0000};623 .099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245, 624 7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000}; 625 625 static const G4double I5[nX]={0, 626 .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283,5.28411,627 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115,20.0000};626 .071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411, 627 6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000}; 628 628 static const G4double I6[nX]={0, 629 .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177,4.81249,630 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630,20.0000};629 .053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249, 630 5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000}; 631 631 static const G4double I7[nX]={0, 632 .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065,4.44429,633 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313,20.0000};632 .043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429, 633 5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000}; 634 634 static const G4double I8[nX]={0, 635 .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517,4.13277,636 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033,20.0000};635 .036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277, 636 5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000}; 637 637 static const G4double I9[nX]={0, 638 .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376,3.85535,639 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719,20.0000};638 .030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535, 639 4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000}; 640 640 static const G4double IA[nX]={0, 641 .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034,3.60650,642 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362,20.0000};641 .027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650, 642 4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000}; 643 643 static const G4double IB[nX]={0, 644 .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459,3.38708,645 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990,20.0000};644 .024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708, 645 4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000}; 646 646 static const G4double IC[nX]={0, 647 .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555,3.19709,648 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638,20.0000};647 .021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709, 648 4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000}; 649 649 static const G4double ID[nX]={0, 650 .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912,3.03253,651 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320,20.0000};650 .020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253, 651 3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000}; 652 652 static const G4double IE[nX]={0, 653 .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735,2.88443,654 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993,20.0000};653 .018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443, 654 3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000}; 655 655 static const G4double IF[nX]={0, 656 .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754,2.73758,657 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522,20.0000};656 .017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758, 657 3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000}; 658 658 static const G4double IG[nX]={0, 659 .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931,2.56677,660 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577,20.0000};659 .015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677, 660 3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000}; 661 661 static const G4double IH[nX]={0, 662 .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283,2.33399,663 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417,20.0000};662 .013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399, 663 2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000}; 664 664 static const G4double II[nX]={0, 665 .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322,2.00554,666 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567,20.0000};665 .011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554, 666 2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000}; 667 667 static const G4double IJ[nX]={0, 668 .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208,1.60544,669 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885,20.0000};668 .008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544, 669 2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000}; 670 670 static const G4double* Il[nE]= 671 671 {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ}; 672 672 static const G4double lE[nE]={ 673 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499,1.68292,674 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426,5.76218};673 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292, 674 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218}; 675 675 static const G4double lEmi=lE[0]; 676 676 static const G4double lEma=lE[nE-1]; 677 677 static const G4double dlE=(lEma-lEmi)/bE; 678 //***************************************************************************************678 //*************************************************************************************** 679 679 G4double Enu=lastE; // Get energy of the last calculated cross-section 680 680 G4double lEn=std::log(Enu); // log(E) for interpolation … … 766 766 } 767 767 768 // This class can provide only virtual exchange pi + (a substitute for W+boson)768 // This class can provide only virtual exchange pi- (a substitute for W- boson) 769 769 G4int G4QANuMuNuclearCrossSection::GetExchangePDGCode() {return -211;} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QAtomicElectronScattering.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QAtomicElectronScattering.cc,v 1. 4 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QAtomicElectronScattering.cc,v 1.5 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QAtomicElectronScattering class ----------------- … … 34 34 // ********** This CLASS is temporary moved from the photolepton_hadron directory ********* 35 35 // **************************************************************************************** 36 36 // Short description: CHIPS is re3sponsible for photo- and lepto-nuclear 37 // reactions. In particular for thr electron-nuclear reactions. At High 38 // Energies the nucleons (including neutrons) and nuclear fragments can 39 // interact with atomic electrons (reversed electro-nuclear reaction - 40 // antilab), while they are missing the nucler-nuclear (ion-ion) reac- 41 // tions. This nucleo-electron process comes "for-free" in CHIPS, as the 42 // cross-sections of the interaction is known from the electro-nuclear 43 // reactions. The only problem is to move the output from the antilab to 44 // lab system. This is what this process is aiming to do. It can be used 45 // for the ion transport in Geant4. 46 // --------------------------------------------------------------------- 47 37 48 //#define debug 38 49 //#define pdebug … … 74 85 75 86 // Fill the private parameters 76 void G4QAtomicElectronScattering::SetParameters(G4double temper, G4double ssin2g, G4double etaetap, 77 G4double fN, G4double fD, G4double cP, G4double mR, 78 G4int nParCW, G4double solAn, G4bool efFlag, 79 G4double piThresh, G4double mpisq, G4double dinum) 87 void G4QAtomicElectronScattering::SetParameters(G4double temper, G4double ssin2g, 88 G4double etaetap, G4double fN, G4double fD, 89 G4double cP, G4double mR, G4int nParCW, 90 G4double solAn, G4bool efFlag, 91 G4double piThresh, G4double mpisq, 92 G4double dinum) 80 93 {// ============================================================================= 81 94 Temperature=temper; … … 263 276 #ifdef debug 264 277 G4int prPDG=particle->GetPDGEncoding(); 265 G4cout<<"G4QAtomElScat::PostStepRestDoIt: projPDG="<<projPDG<<",stPDG="<<prPDG<<G4endl;278 G4cout<<"G4QAtomElScat::PostStepRestDoIt: projPDG="<<projPDG<<",stPDG="<<prPDG<<G4endl; 266 279 #endif 267 280 if(!projPDG) … … 274 287 for(i=0; i<nE; ++i) 275 288 { 276 G4double frac=material->GetFractionVector()[i];289 G4double frac=material->GetFractionVector()[i]; 277 290 sum+=frac; 278 291 sumfra.push_back(sum); // remember the summation steps … … 299 312 G4int curInd=G4QIsotope::Get()->GetLastIndex(Z); 300 313 if(!curInd) // The new artificial element must be defined 301 {314 { 302 315 std::vector<std::pair<G4int,G4double>*>* newAbund = 303 316 new std::vector<std::pair<G4int,G4double>*>; … … 307 320 N=pElement->GetIsotope(j)->GetN()-Z; 308 321 if(pElement->GetIsotope(j)->GetZ()!=Z) G4cerr<<"*G4QCaptureAtRest::AtRestDoIt: Z=" 309 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;322 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 310 323 G4double abund=abuVector[j]; 311 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);324 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 312 325 #ifdef debug 313 326 G4cout<<"G4QAtomElScat::PostStepDoIt:pair#="<<j<<", N="<<N<<",ab="<<abund<<G4endl; 314 327 #endif 315 328 newAbund->push_back(pr); 316 }329 } 317 330 #ifdef debug 318 331 G4cout<<"G4QAtomElectScat::PostStepDoIt:pairVectorLength="<<newAbund->size()<<G4endl; … … 333 346 if(dsr<dd)dsr=dd; 334 347 if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // ManualP 335 else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars348 else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars 336 349 else if(projPDG==-211) G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.);//Pi- ClustPars 337 350 #ifdef debug … … 343 356 return 0; 344 357 } 345 if(projPDG==11||projPDG==-11||projPDG==13||projPDG==-13||projPDG==15||projPDG==-15)346 { // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + neutrino & QE358 if(projPDG==11||projPDG==-11||projPDG==13||projPDG==-13||projPDG==15||projPDG==-15) 359 { // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + neutrino & QE 347 360 G4double kinEnergy= projHadron->GetKineticEnergy(); 348 361 G4ParticleMomentum dir = projHadron->GetMomentumDirection(); … … 443 456 G4cout<<"G4QAtomElScat::PostStepDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl; 444 457 #endif 445 G4QHadron* pH = new G4QHadron(projPDG,proj4M); // ---> DELETED -->-- -+458 G4QHadron* pH = new G4QHadron(projPDG,proj4M); // ---> DELETED -->------* 446 459 if(momentum<1000.) // Condition for using G4QEnvironment (not G4QuasmonString) | 447 { // |460 { // | 448 461 G4QHadronVector projHV; // | 449 projHV.push_back(pH); // DESTROYED over 2 lines - +|450 G4QEnvironment* pan= new G4QEnvironment(projHV,targPDG);// ---> DELETED --->----- +| |451 std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // <---<------<----+-+- +452 projHV.clear(); // <------------<---------------<-------------------<------------+- +.462 projHV.push_back(pH); // DESTROYED over 2 lines -* | 463 G4QEnvironment* pan= new G4QEnvironment(projHV,targPDG);// ---> DELETED --->-----* | | 464 std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // <---<------<----+-+-* 465 projHV.clear(); // <------------<---------------<-------------------<------------+-* . 453 466 #ifdef debug 454 467 G4cout<<"G4QAtomElectScat::PostStepDoIt: pPDG="<<projPDG<<", mp="<<mp<<G4endl;// | . 455 468 #endif 456 try // | .457 { // | .458 delete output; // | . 469 try // | ^ 470 { // | . 471 delete output; // | ^ 459 472 output = pan->Fragment();// DESTROYED in the end of the LOOP work space | . 460 } // | .473 } // | ^ 461 474 catch (G4QException& error)// | . 462 { // | . 463 //#ifdef pdebug475 { // | ^ 476 //#ifdef pdebug 464 477 G4cerr<<"**G4QAtomElectScat::PostStepDoIt:G4QE Exception is catched"<<G4endl;//| . 465 //#endif478 //#endif 466 479 G4Exception("G4QAtomElScat::PostStepDoIt:","27",FatalException,"CHIPScrash");//| . 467 } // | .468 delete pan; // Delete the Nuclear Environment <--<-- +.469 } // .480 } // | ^ 481 delete pan; // Delete the Nuclear Environment <--<--* . 482 } // ^ 470 483 else // Use G4QuasmonString . 471 { // ^472 G4QuasmonString* pan= new G4QuasmonString(pH,false,targPDG,false);//-> DELETED -- + |484 { // ^ 485 G4QuasmonString* pan= new G4QuasmonString(pH,false,targPDG,false);//-> DELETED --* . 473 486 delete pH; // --------<-------+---+ 474 487 #ifdef debug … … 478 491 //G4int tNH=0; // Prototype of the number of secondaries inOut| 479 492 try // | 480 { // |481 delete output; //|493 { // | 494 delete output; // | 482 495 output = pan->Fragment();// DESTROYED in the end of the LOOP work space | 483 496 // @@@@@@@@@@@@@@ Temporary for the testing purposes --- Begin | 484 497 //tNH=pan->GetNOfHadrons(); // For the test purposes of the String | 485 498 //if(tNH==2) // At least 2 hadrons are in the Constr.Output | 486 //{// |499 //{// | 487 500 // elF=true; // Just put a flag for the ellastic Scattering | 488 // delete output; // Delete a prototype of dummy G4QHadronVector |501 // delete output; // Delete a prototype of dummy G4QHadronVector | 489 502 // output = pan->GetHadrons(); // DESTROYED in the end of the LOOP work space | 490 503 //}// | … … 496 509 } // | 497 510 catch (G4QException& error)// | 498 { // |499 //#ifdef pdebug511 { // | 512 //#ifdef pdebug 500 513 G4cerr<<"**G4QAtomElectScat::PostStepDoIt: GEN Exception is catched"<<G4endl;//| 501 //#endif514 //#endif 502 515 G4Exception("G4QAtomElSct::AtRestDoIt:","27",FatalException,"QString Excep");//| 503 516 } // | 504 delete pan; // Delete the Nuclear Environment ---<-- +517 delete pan; // Delete the Nuclear Environment ---<--* 505 518 } 506 519 aParticleChange.Initialize(track); … … 534 547 { 535 548 #ifdef debug 536 G4cout<<"G4QAtomElScat::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;549 G4cout<<"G4QAtomElScat::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl; 537 550 #endif 538 551 delete hadr; … … 547 560 { 548 561 if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong(); // K_L 549 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S562 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S 550 563 } 551 564 else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus(); … … 554 567 else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero(); 555 568 else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus(); 556 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)569 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!) 557 570 { 558 571 G4int aZ = hadr->GetCharge(); 559 572 G4int aA = hadr->GetBaryonNumber(); 560 573 #ifdef pdebug 561 G4cout<<"G4QAtomicElectronScattering::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;574 G4cout<<"G4QAtomicElectronScattering::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl; 562 575 #endif 563 576 theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ); … … 567 580 { 568 581 #ifdef pdebug 569 G4cout<<"G4QAtomElectScat::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;582 G4cout<<"G4QAtomElectScat::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl; 570 583 #endif 571 584 theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode); 572 585 #ifdef pdebug 573 G4cout<<"G4QAtomElScat::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;586 G4cout<<"G4QAtomElScat::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl; 574 587 #endif 575 588 } … … 593 606 #endif 594 607 theSec->Set4Momentum(h4M); // ^ 595 delete hadr; // <-----<-----------<-------------<---------------------<---------<----- +608 delete hadr; // <-----<-----------<-------------<---------------------<---------<-----* 596 609 #ifdef debug 597 610 G4ThreeVector curD=theSec->GetMomentumDirection(); // ^ … … 607 620 #endif 608 621 } // | 609 delete output; // instances of the G4QHadrons from the output are already deleted above +622 delete output; // instances of the G4QHadrons from the output are already deleted above * 610 623 aParticleChange.ProposeTrackStatus(fStopAndKill); // Kill the absorbed particle 611 624 //return &aParticleChange; // This is not enough (ClearILL) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCaptureAtRest.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QCaptureAtRest.cc,v 1. 18 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QCaptureAtRest.cc,v 1.20 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QCaptureAtRest class ----------------- … … 35 35 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 36 36 // **************************************************************************************** 37 // Short Description: This is a universal process for nuclear capture 38 // (including annihilation) of all negative particles (negative hadrons, 39 // negative leptons: mu- & tau-). It can be used for the cold neutron 40 // capture, but somebody should decide what is the probability (defined 41 // by the capture cross-section and atomic material properties) to switch 42 // the cold neutron to the at-rest neutron. - M.K.2009. 43 // ---------------------------------------------------------------------- 44 37 45 38 46 //#define debug … … 105 113 106 114 G4QCaptureAtRest::~G4QCaptureAtRest() 107 {} 115 { 116 // deregister in the store 117 G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this); 118 } 108 119 109 120 G4LorentzVector G4QCaptureAtRest::GetEnegryMomentumConservation() … … 170 181 static G4bool CWinit = true; // CHIPS Warld needs to be initted 171 182 if(CWinit) 172 {183 { 173 184 CWinit=false; 174 185 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 219 230 for(i=0; i<nE; ++i) 220 231 { 221 G4double frac=material->GetFractionVector()[i];232 G4double frac=material->GetFractionVector()[i]; 222 233 if(projPDG==13||projPDG==15) 223 234 { … … 258 269 #endif 259 270 if(!Isotopes->IsDefined(Z,indEl)) // This index is not defined for this Z: define 260 {271 { 261 272 std::vector<std::pair<G4int,G4double>*>* newAbund = 262 273 new std::vector<std::pair<G4int,G4double>*>; … … 266 277 N=pElement->GetIsotope(j)->GetN()-Z; 267 278 if(pElement->GetIsotope(j)->GetZ()!=Z) G4cerr<<"*G4QCaptureAtRest::AtRestDoIt: Z=" 268 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;279 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 269 280 G4double abund=abuVector[j]; 270 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);281 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 271 282 #ifdef debug 272 283 G4cout<<"G4QCaptureAtRest::AtRestDoIt:pair#="<<j<<", N="<<N<<",ab="<<abund<<G4endl; 273 284 #endif 274 285 newAbund->push_back(pr); 275 }286 } 276 287 #ifdef debug 277 288 G4cout<<"G4QCaptureAtRest::AtRestDoIt: pairVectorLength="<<newAbund->size()<<G4endl; … … 292 303 if(dsr<dd)dsr=dd; 293 304 if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // ManualP 294 else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars305 else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars 295 306 else if(projPDG==-211) G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.);//Pi- ClustPars 296 307 #ifdef debug … … 330 341 #endif 331 342 localtime += Time; 332 std::vector<G4double>* cascE = new std::vector<G4double>;333 std::vector<G4Track*>* cascT = new std::vector<G4Track*>;343 std::vector<G4double>* cascE = new std::vector<G4double>; 344 std::vector<G4Track*>* cascT = new std::vector<G4Track*>; 334 345 G4bool neutronElastic = false; // Flag of elastic neutro-nucleeus Scattering 335 346 G4bool chargExElastic = false; // Flag of charge exchange Quasi-Elastic Scat. … … 361 372 if(eNeut<.0001) chargExElastic=true; // neutron is too soft -> charge Exchange 362 373 else 363 {374 { 364 375 G4double probP=std::sqrt(eProt*(dmProt+eProt)); 365 376 G4double probN=std::sqrt(eNeut*(dmNeut+eNeut)); … … 368 379 } 369 380 } 370 else if(mAR<=mAN||(mAR<=mAP+mProt&&mAR<=mAA+mAlph)) // Impossible to radiate n or Alpha381 else if(mAR<=mAN||(mAR<=mAP+mProt&&mAR<=mAA+mAlph)) // Impossible to radiate n or Alpha 371 382 { 372 383 #ifdef debug … … 383 394 if(projPDG==15) nuPDG=16; 384 395 #ifdef debug 385 G4int CV=0;396 G4int CV=0; 386 397 G4cout<<"G4QCaptureAtRest::AtRestDoIt:DecayIf is reached CV="<<CV<<G4endl; 387 398 #endif … … 431 442 #endif 432 443 } 433 else if(projPDG==-211 && targPDG==90001000)// Use Panofsky Ratio for (p+pi-) system decay444 else if(projPDG==-211 && targPDG==90001000)// Use Panofsky Ratio for (p+pi-) system decay 434 445 { // (p+pi-=>n+pi0)/p+pi-=>n+gamma) = 3/2 435 446 #ifdef debug … … 440 451 G4double pigamM=mPi0; 441 452 if(G4UniformRand()>0.6) 442 {453 { 443 454 pigamPDG=22; 444 455 pigamM=0.; … … 463 474 G4LorentzVector totLV(0.,0.,0.,mp+mt); // 4-momentum of the (A+pi-) compound system 464 475 if(Z==1 && N==1) // Quasi-Free process on Deuteron 465 {476 { 466 477 G4LorentzVector f4Mom(0.,0.,0.,mNeut); // First neutron 467 478 G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron … … 505 516 G4int nsec=cascE->size(); 506 517 G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange 507 for(G4int is=0; is<nsec; is++)508 {518 for(G4int is=0; is<nsec; is++) 519 { 509 520 G4double ener=cascE->operator[](is); 510 521 if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener); … … 517 528 } 518 529 #ifdef debug 519 G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;530 G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl; 520 531 #endif 521 532 G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus … … 524 535 G4double mmt=totLV.m(); // Total energy of the compound system 525 536 if(ee>=mbm*(mmt-mbm/2)/mmt) 526 {527 G4cout<<"-W-G4QCaptureAtRest::AtRestDoIt: Unrealistic E="<<ee<<", m="<<mMu<<G4endl;537 { 538 G4cout<<"-W-G4QCaptureAtRest::AtRestDoIt: Unrealistic E="<<ee<<", m="<<mMu<<G4endl; 528 539 G4LorentzVector f4Mom(0.,0.,0.,mEl); // Electron 529 540 G4LorentzVector s4Mom(0.,0.,0.,mt); // Quark-A … … 551 562 #ifdef debug 552 563 G4double fe=f4Mom.e(); 553 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Ei="<<ee<<",Ef="<<fe<<",de="<<fe-ee<<G4endl;564 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Ei="<<ee<<",Ef="<<fe<<",de="<<fe-ee<<G4endl; 554 565 #endif 555 566 G4QHadron* electron = new G4QHadron(11,f4Mom); // Create Electron … … 564 575 } 565 576 #ifdef debug 566 G4cout<<"G4QCaptureAtRest::AtRestDoIt: (A+2nu) Decay is successful - 2"<<G4endl;577 G4cout<<"G4QCaptureAtRest::AtRestDoIt: (A+2nu) Decay is successful - 2"<<G4endl; 567 578 #endif 568 579 G4QHadron* resnuc = new G4QHadron(targPDG,r4Mom); // Creation Hadron for ResidNucl 569 580 #ifdef debug 570 G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc 4M="<<mt<<r4Mom<<r4Mom.m()<<G4endl;581 G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc 4M="<<mt<<r4Mom<<r4Mom.m()<<G4endl; 571 582 #endif 572 583 output->push_back(resnuc); // Fill the Residual Nucleus to the output 573 584 #ifdef debug 574 G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc is filled nu="<<n4Mom<<nuPDG<<G4endl;585 G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc is filled nu="<<n4Mom<<nuPDG<<G4endl; 575 586 #endif 576 587 G4QHadron* numu = new G4QHadron(nuPDG,n4Mom); // Create Hadron for LeptonicNeutrino 577 588 output->push_back(numu); // Fill Muonic Neutrino to the output 578 589 #ifdef debug 579 G4cout<<"G4QCaptureAtRest::AtRestDoIt:Nu is filled,anu="<<a4Mom<<a4Mom.m()<<G4endl;590 G4cout<<"G4QCaptureAtRest::AtRestDoIt:Nu is filled,anu="<<a4Mom<<a4Mom.m()<<G4endl; 580 591 #endif 581 592 G4QHadron* anue = new G4QHadron(-12,a4Mom); // Create Hadron for the AntiE Neutrino 582 593 output->push_back(anue); // Fill the AntiENeutrino to the output 583 594 #ifdef debug 584 G4cout<<"G4QCaptureAtRest::AtRestDoIt: anu is filled == Success of Mu-cap"<<G4endl;595 G4cout<<"G4QCaptureAtRest::AtRestDoIt: anu is filled == Success of Mu-cap"<<G4endl; 585 596 #endif 586 597 } 587 598 } 588 599 else // @@Should be developed for tau-lepton 589 {590 G4int deL=11; // Prototype of decay lepton600 { 601 G4int deL=11; // Prototype of decay lepton 591 602 G4int deN=-12; // Prototype of decay neutrino 592 603 G4double mdl=mEl; // Prototype of the decay mass 593 604 if(G4UniformRand()>.55) // Use mu decay instead of e-decay 594 {605 { 595 606 deL=13; 596 607 deN=-14; … … 606 617 } 607 618 #ifdef debug 608 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Tau Decay is successful"<<G4endl;619 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Tau Decay is successful"<<G4endl; 609 620 #endif 610 621 G4QHadron* lept = new G4QHadron(deL,e4Mom); // Creation Hadron for the Electron 611 622 #ifdef debug 612 G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton 4M="<<e4Mom<<e4Mom.m()<<G4endl;623 G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton 4M="<<e4Mom<<e4Mom.m()<<G4endl; 613 624 #endif 614 625 output->push_back(lept); // Fill the Electron in the output 615 626 #ifdef debug 616 G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton is filled nu="<<n4Mom<<nuPDG<<G4endl;627 G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton is filled nu="<<n4Mom<<nuPDG<<G4endl; 617 628 #endif 618 629 G4QHadron* nuta = new G4QHadron(nuPDG,n4Mom); // Create Hadron for LeptonicNeutrino 619 630 #ifdef debug 620 G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;631 G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl; 621 632 #endif 622 633 output->push_back(nuta); // Fill Muonic Neutrino to the output 623 634 G4QHadron* anul = new G4QHadron(deN,a4Mom); // Create Hadron for the AntiE Neutrino 624 635 #ifdef debug 625 G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;636 G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl; 626 637 #endif 627 638 output->push_back(anul); // Fill the AntiENeutrino to the output … … 632 643 G4LorentzVector totLV(0.,0.,0.,mp+mProt-EnergyDeposition);// 4-mom of theCompoundSystem 633 644 #ifdef debug 634 G4cout<<"G4QCaptureAtRest::AtRestDoIt:CapOnProton decay 4M="<<totLV<<totLV.m()<<G4endl;645 G4cout<<"G4QCaptureAtRest::AtRestDoIt:CapOnProton decay 4M="<<totLV<<totLV.m()<<G4endl; 635 646 #endif 636 647 G4LorentzVector g4Mom(0.,0.,0.,0.); // mass of the muon neutrino … … 650 661 G4LorentzVector totLV(0.,0.,0.,mp+mDeut-EnergyDeposition);// 4-mom of theCompoundSystem 651 662 #ifdef debug 652 G4cout<<"G4QCaptureAtRest::AtRestDoIt: CapOnDeutr decay 4M="<<totLV<<totLV.m()<<G4endl;663 G4cout<<"G4QCaptureAtRest::AtRestDoIt: CapOnDeutr decay 4M="<<totLV<<totLV.m()<<G4endl; 653 664 #endif 654 665 G4LorentzVector g4Mom(0.,0.,0.,0.); // mass of the muon neutrino … … 673 684 G4LorentzVector totLV(0.,0.,0.,mp+mt-EnergyDeposition);// 4-mom of the(A+mu-) compound 674 685 #ifdef debug 675 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Quasi-Free decay 4M="<<totLV<<totLV.m()<<G4endl;686 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Quasi-Free decay 4M="<<totLV<<totLV.m()<<G4endl; 676 687 #endif 677 688 G4int rPDG=targPDG-1000; // Subtract one proton from the nucleus … … 693 704 } 694 705 else // *** THIS works for all particles ! *** 695 //else if(1>2)// !! Immediately change back - Very temporary to avoid nuclear capture !!706 //else if(1>2)// !! Immediately change back - Very temporary to avoid nuclear capture !! 696 707 { 697 708 G4QHadron* neutr = 0; // Create Neutrino 698 709 if(projPDG==13||projPDG==15) mp-=EnergyDeposition;//TheEnergyDeposit is only for LepCap 699 710 #ifdef debug 700 G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS M="<<mp<<",dE="<<EnergyDeposition<<G4endl;711 G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS M="<<mp<<",dE="<<EnergyDeposition<<G4endl; 701 712 #endif 702 713 G4LorentzVector projLV(0.,0.,0.,mp); … … 706 717 G4int nsec=cascE->size(); 707 718 G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange 708 for(G4int is=0; is<nsec; is++)709 {719 for(G4int is=0; is<nsec; is++) 720 { 710 721 G4double ener=cascE->operator[](is); 711 722 if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener); … … 737 748 G4double qp=std::pow((std::pow(1.+ga*std::pow(hmm,b1),G4UniformRand())-1.)/ga,rb); 738 749 G4double mqq=0.; 739 if(qp<hmm) mqq=std::sqrt(mmu2-dmm*qp);750 if(qp<hmm) mqq=std::sqrt(mmu2-dmm*qp); 740 751 G4LorentzVector f4Mom(0.,0.,0.,0.); // Muon neutrino 741 752 G4LorentzVector s4Mom(0.,0.,0.,mqq); // Quark-Antiquark … … 767 778 #endif 768 779 try // | 769 { // |770 delete output; // |780 { // | 781 delete output; // | 771 782 output = pan->Fragment();// DESTROYED in the end of the LOOP work space | 772 783 } // | 773 784 catch (G4QException& error)// | 774 { // |775 //#ifdef pdebug785 { // | 786 //#ifdef pdebug 776 787 G4cerr<<"***G4QCaptureAtRest::AtRestDoIt: Exception is catched"<<G4endl; // | 777 //#endif788 //#endif 778 789 G4Exception("G4QCaptureAtRest::AtRestDoIt:","27",FatalException,"Gen.CHIPS Except."); 779 790 } // | 780 791 delete pan; // Delete the Nuclear Environment <--<--+ 781 792 #ifdef debug 782 G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS fragmentation is done, CV="<<CV<<G4endl;793 G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS fragmentation is done, CV="<<CV<<G4endl; 783 794 #endif 784 795 // ----- Ericson mu to pi conversion ----- ????? ----- … … 790 801 G4int nsec=cascE->size(); 791 802 aParticleChange.SetNumberOfSecondaries(tNH+nsec); 792 for(G4int is=0; is<nsec; is++) aParticleChange.AddSecondary((*cascT)[is]);803 for(G4int is=0; is<nsec; is++) aParticleChange.AddSecondary((*cascT)[is]); 793 804 cascE->clear(); 794 805 delete cascE; … … 809 820 { 810 821 #ifdef debug 811 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Intermediate particle is found i="<<i<<G4endl;822 G4cout<<"G4QCaptureAtRest::AtRestDoIt: Intermediate particle is found i="<<i<<G4endl; 812 823 #endif 813 824 delete hadr; … … 826 837 { 827 838 if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong(); // K_L 828 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S839 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S 829 840 } 830 841 else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus(); … … 833 844 else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero(); 834 845 else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus(); 835 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)846 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!) 836 847 { 837 848 G4int aZ = hadr->GetCharge(); 838 849 G4int aA = hadr->GetBaryonNumber(); 839 850 #ifdef pdebug 840 G4cout<<"G4QCaptureAtRest::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;851 G4cout<<"G4QCaptureAtRest::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl; 841 852 #endif 842 853 //if (PDGCode==90001001) theDefinition = G4Deuteron::Deuteron(); … … 850 861 { 851 862 #ifdef pdebug 852 G4cout<<"G4QCaptureAtRest::AtRestDoIt:Define particle with PDG="<<PDGCode<<G4endl;863 G4cout<<"G4QCaptureAtRest::AtRestDoIt:Define particle with PDG="<<PDGCode<<G4endl; 853 864 #endif 854 865 theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode); 855 866 #ifdef pdebug 856 G4cout<<"G4QCaptureAtRest::AtRestDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;867 G4cout<<"G4QCaptureAtRest::AtRestDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl; 857 868 #endif 858 869 } … … 925 936 static const G4double rate[nAZ]={.00000045, .00000047, .00000215, .000000356, .00000468, 926 937 .00000226, .00000610, .00002750, .000023500, .00003790, 927 .00003500, .00006600, .00006200, .000102500, .00009500,938 .00003500, .00006600, .00006200, .000102500, .00009500, 928 939 .00008800, .00022900}; 929 940 #ifdef debug … … 944 955 else G4cout<<"--Warning--G4QCaptureAtRest::RandomizeMuDecayOrCapture: NEG Z="<<Z<<G4endl; 945 956 mZ=Z; mN=N; mH=Huff; mR=pC; // Remember the last calculated parameters 946 //G4double DLifeT=-std::log(G4UniformRand())/pD; // Time of the muon decay inside the atom947 //G4double CLifeT=-std::log(G4UniformRand())/pC; // Time of the muon capture by nucleus957 //G4double DLifeT=-std::log(G4UniformRand())/pD;// Time of the muon decay inside the atom 958 //G4double CLifeT=-std::log(G4UniformRand())/pC;// Time of the muon capture by nucleus 948 959 //if(DLifeT<CLifeT) 949 960 //{ … … 958 969 // Time=CLifeT; 959 970 #ifdef debug 960 // G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;961 #endif 962 // return true;971 // G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture:CaptureLifeTime="<<Time<<G4endl; 972 #endif 973 // return true; 963 974 //} 964 975 if((pD+pC)*G4UniformRand()>pD) // CAPTURE @@ Cash pD+pC 965 {976 { 966 977 Time=-std::log(G4UniformRand())/pC; 967 978 return true; 968 979 } 969 980 else 970 {981 { 971 982 Time=-std::log(G4UniformRand())/pD; 972 983 return false; … … 1035 1046 if((nAuger < Z) && ((pGamma + 10000.0) * G4UniformRand() < 10000.0) ) // 10000 (? M.K.) 1036 1047 { 1037 nAuger++; // Radiate one more Auger electron1048 nAuger++; // Radiate one more Auger electron 1038 1049 DeltaE = EnergyLevel[nLevel-1] - EnergyLevel[nLevel]; 1039 1050 nLevel--; 1040 1051 #ifdef debug 1041 G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: Auger_e E="<<DeltaE<<G4endl;1052 G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: Auger_e E="<<DeltaE<<G4endl; 1042 1053 #endif 1043 1054 dV->push_back(DeltaE); … … 1052 1063 nLevel = iLevel; 1053 1064 #ifdef debug 1054 G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: photon E="<<DeltaE<<G4endl;1065 G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: photon E="<<DeltaE<<G4endl; 1055 1066 #endif 1056 1067 dV->push_back(-DeltaE); … … 1072 1083 G4double Z227=Z27*Z27; 1073 1084 G4double Z427=Z227*Z227; 1074 G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*std::sqrt((G4double)Z)); // EffNuclearCharge1085 G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*std::sqrt((G4double)Z));// EffNuclCharge 1075 1086 G4double Ze2=Zeff*Zeff; // Squared effective charge of the Nucleus 1076 1087 G4double pD=3436.*(1.-Ze2*.00014658); //@@ 1./MeanLifeTime of Tau in atoms (in ns^-1) … … 1225 1236 49.5635,49.6993,49.8367,49.9760,50.1175,50.2617,50.4091,50.5605,50.7166,50.8785, 1226 1237 51.0475,51.2256,51.4151,51.6195,51.8439,52.0962,52.3897,52.7496,53.2325,54.0205}; 1227 //Na23(Z=11)1238 //Na23(Z=11) 1228 1239 static G4double P5[nE]={ 1229 1240 0.00000,7.00695,8.86633,10.1943,11.2667,12.1832,12.9928,13.7237,14.3938,15.0151, … … 1384 1395 static const G4int mZ=mZ1-1; // MaxPossibleZ 1385 1396 static G4double* P[mZ1]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1386 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1387 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};1397 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1398 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; 1388 1399 //--------------------------------------------------------------------------------------- 1389 1400 if(z<1 || z>mZ) 1390 {1391 G4cout<<"-W-G4QCapAtRest::RandomizeDecayElectron: <=0 or big(>"<<mZ<<") Z="<<z<<G4endl;1401 { 1402 G4cout<<"-W-G4QCapAtRest::RandomizeDecayElectron: <=0 or big(>"<<mZ<<") Z="<<z<<G4endl; 1392 1403 return 0.; 1393 1404 } … … 1395 1406 G4double* nP = 0; 1396 1407 if(!P[z]) // The table for this element must be created 1397 {1408 { 1398 1409 for(G4int i=0; i<nZ; i++) 1399 {1410 { 1400 1411 G4double fZ=tZ[i]; 1401 1412 if(Z<=fZ) // The extrapolation bin is found 1402 {1403 #ifdef debug 1404 G4cout<<"G4QCapAtRest::RandomizeDecayElectron: Z="<<Z<<", fZ="<<fZ<<G4endl;1413 { 1414 #ifdef debug 1415 G4cout<<"G4QCapAtRest::RandomizeDecayElectron: Z="<<Z<<", fZ="<<fZ<<G4endl; 1405 1416 #endif 1406 1417 nP = new G4double[nE]; … … 1408 1419 if(Z==fZ) for(G4int j=0; j<nE; j++) nP[j]=fP[j]; 1409 1420 else 1410 {1411 G4int i1=i-1; // i>2, asthe first tabilated Z are 1,2,4,... and min_i=31412 G4double iZ=tZ[i1];1421 { 1422 G4int i1=i-1; // i>2, asthe first tabilated Z are 1,2,4,... and min_i=3 1423 G4double iZ=tZ[i1]; 1413 1424 G4double* iP=PP[i1]; 1414 1425 G4double rZ=(Z-iZ)/(fZ-iZ); … … 1416 1427 } 1417 1428 #ifdef debug 1418 for(G4int k=0; k<nE; k++)G4cout<<"G4QCAR::RandDecEle:P["<<k<<"]="<<nP[k]<<G4endl;1429 for(G4int k=0; k<nE; k++)G4cout<<"G4QCAR::RandDecEle:P["<<k<<"]="<<nP[k]<<G4endl; 1419 1430 #endif 1420 1431 P[z]=nP; … … 1432 1443 G4double nPf=0.; 1433 1444 if(iR<nEl) nPf=nP[iR+1]; 1434 else nPf=nP[nEl]+(nP[nEl]-nP[nEb])/2; // An artificial tail1435 #ifdef debug 1436 G4cout<<"G4QCapAtR::RaDEl:R="<<R<<",Ei="<<nPi<<",E="<<MeV*(nPi+(R-iR)*(nPf-nPi))<<G4endl;1445 else nPf=nP[nEl]+(nP[nEl]-nP[nEb])/2; // An artificial tail 1446 #ifdef debug 1447 G4cout<<"G4QCapAtR::RaDEl:R="<<R<<",Ei="<<nPi<<",E="<<MeV*(nPi+(R-iR)*(nPf-nPi))<<G4endl; 1437 1448 #endif 1438 1449 return MeV*(nPi+(R-iR)*(nPf-nPi)); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCoherentChargeExchange.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QCoherentChargeExchange.cc,v 1. 7 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QCoherentChargeExchange.cc,v 1.8 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QCoherentChargeExchange class ----------------- … … 34 34 // ********** This CLASS is temporary moved from the photolepton_hadron directory ********* 35 35 // **************************************************************************************** 36 36 // Short description: This class resolves an ambiguity in the definition of the 37 // "inelastic" cross section. As it was shown in Ph.D.Thesis (M.Kosov,ITEP,1979) 38 // it is more reasonable to subdivide the total cross-section in the coherent & 39 // incoherent parts, but the measuring method for the "inelastic" cross-sections 40 // consideres the lack of the projectile within the narrow forward solid angle 41 // with the consequent extrapolation of these partial cross-sections, corresponding 42 // to the particular solid angle, to the zero solid angle. The low angle region 43 // is shadowed by the elastic (coherent) scattering. BUT the coherent charge 44 // exchange (e.g. conversion p->n) is included by this procedure as a constant term 45 // in the extrapolation, so the "inelastic" cross-section differes from the 46 // incoherent cross-section by the value of the coherent charge exchange cross 47 // section. Fortunately, this cross-sectoion drops ruther fast with energy increasing. 48 // All Geant4 inelastic hadronic models (including CHIPS) simulate the incoherent 49 // reactions. So the incoherent (including quasielastic) cross-section must be used 50 // instead of the inelastic cross-section. For that the "inelastic" cross-section 51 // must be reduced by the value of the coherent charge-exchange cross-section, which 52 // is estimated (it must be tuned!) in this CHIPS class. The angular distribution 53 // is made (at present) identical to the corresponding coherent-elastic scattering 54 // ----------------------------------------------------------------------------------- 37 55 //#define debug 38 56 //#define pdebug … … 146 164 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 147 165 G4double abund=abuVector[j]; 148 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);166 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 149 167 #ifdef debug 150 168 G4cout<<"G4QCohChEx::GetMeanFreePath:pair#="<<j<<",N="<<N<<",ab="<<abund<<G4endl; 151 169 #endif 152 170 newAbund->push_back(pr); 153 }171 } 154 172 #ifdef debug 155 173 G4cout<<"G4QCohChEx::GetMeanFreePath: pairVectorLength="<<newAbund->size()<<G4endl; … … 178 196 G4cout<<"G4QCCX::GMFP:true, P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl; 179 197 #endif 180 G4bool ccsf=true;198 G4bool ccsf=true; 181 199 if(Q==-27.) ccsf=false; 182 200 #ifdef debug … … 251 269 static G4bool CWinit = true; // CHIPS Warld needs to be initted 252 270 if(CWinit) 253 {271 { 254 272 CWinit=false; 255 273 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 323 341 #ifdef debug 324 342 G4int prPDG=particle->GetPDGEncoding(); 325 G4cout<<"G4QCohChrgExchange::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;343 G4cout<<"G4QCohChrgExchange::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 326 344 #endif 327 345 if(!projPDG) … … 340 358 } 341 359 G4double pM2=pM*pM; 342 // Element treatment360 // Element treatment 343 361 G4int EPIM=ElProbInMat.size(); 344 362 #ifdef debug 345 G4cout<<"G4QCohChEx::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;363 G4cout<<"G4QCohChEx::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 346 364 #endif 347 365 G4int i=0; … … 350 368 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 351 369 for(i=0; i<nE; ++i) 352 {353 #ifdef debug 354 G4cout<<"G4QCohChEx::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;370 { 371 #ifdef debug 372 G4cout<<"G4QCohChEx::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl; 355 373 #endif 356 374 if (rnd<ElProbInMat[i]) break; … … 361 379 Z=static_cast<G4int>(pElement->GetZ()); 362 380 #ifdef debug 363 G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;381 G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 364 382 #endif 365 383 if(Z<=0) … … 372 390 G4int nofIsot=SPI->size(); // #of isotopes in the element i 373 391 #ifdef debug 374 G4cout<<"G4QCohChargeExchange::PosStDoIt:nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;392 G4cout<<"G4QCohChargeExchange::PosStDoIt:nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl; 375 393 #endif 376 394 G4int j=0; … … 381 399 { 382 400 #ifdef debug 383 G4cout<<"G4QCohChargEx::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;401 G4cout<<"G4QCohChargEx::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl; 384 402 #endif 385 403 if(rndI < (*SPI)[j]) break; … … 389 407 G4int N =(*IsN)[j]; ; // Randomized number of neutrons 390 408 #ifdef debug 391 G4cout<<"G4QCohChargeEx::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;409 G4cout<<"G4QCohChargeEx::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl; 392 410 #endif 393 411 if(N<0) … … 505 523 aParticleChange.ProposeTrackStatus(fStopAndKill); 506 524 // Definition of the scattered nucleon 507 G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron525 G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 508 526 G4ParticleDefinition* theDefinition=G4Proton::Proton(); 509 527 if(projPDG==2212) theDefinition=G4Neutron::Neutron(); … … 516 534 aParticleChange.AddSecondary( aNewTrack ); 517 535 // Filling the recoil nucleus 518 theSec = new G4DynamicParticle; // A secondary for the recoil hadron536 theSec = new G4DynamicParticle; // A secondary for the recoil hadron 519 537 G4int aA = Z+N; 520 538 #ifdef pdebug 521 G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;539 G4cout<<"G4QCoherentChargeExchange::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl; 522 540 #endif 523 541 theDefinition=G4ParticleTable::GetParticleTable()->FindIon(Z,aA,0,Z); … … 577 595 { 578 596 if(oxs) res=CSmanager->GetHMaxT(); // Calculate the max_t value 579 else res=CSmanager->GetExchangeT(Z, N, pPDG); // fanctionally randomized -t in MeV^2597 else res=CSmanager->GetExchangeT(Z, N, pPDG); // fanctionally randomized -t in MeV^2 580 598 } 581 599 else G4cout<<"*Warning*G4QCohChrgExchange::CalculateXSt: NotInitiatedScattering"<<G4endl; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QCollision.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QCollision.cc,v 1. 28 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QCollision.cc,v 1.32 2009/04/17 15:22:31 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QCollision class ----------------- … … 34 34 // ********** This CLASS is temporary moved from the photolepton_hadron directory ********* 35 35 // **************************************************************************************** 36 36 // Short description: This is a universal class for the incoherent (inelastic) 37 // nuclear interactions in the CHIPS model. 38 // --------------------------------------------------------------------------- 37 39 //#define debug 38 40 //#define pdebug 41 //#define ldebug 39 42 //#define ppdebug 40 43 //#define qedebug … … 250 253 G4cout<<"G4QCollision::GetMeanFreePath: isovectorLength="<<isoSize<<G4endl; // Result 251 254 #endif 252 if(isoSize) // The Element has non-trivial abu mdance set255 if(isoSize) // The Element has non-trivial abundance set 253 256 { 254 257 indEl=pElement->GetIndex()+1; // Index of the non-trivial element … … 262 265 G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z ! 263 266 if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCollision::GetMeanFreePath" 264 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;267 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 265 268 G4double abund=abuVector[j]; 266 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);269 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 267 270 #ifdef debug 268 271 G4cout<<"G4QCollision::GetMeanFreePath: p#="<<j<<",N="<<N<<",ab="<<abund<<G4endl; 269 272 #endif 270 273 newAbund->push_back(pr); 271 }274 } 272 275 #ifdef debug 273 276 G4cout<<"G4QCollision::GetMeanFreePath: pairVectLength="<<newAbund->size()<<G4endl; … … 384 387 static const G4double mPi0s= mPi0*mPi0; 385 388 static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);// Mass of deuteron 389 //static const G4double mDeut2=mDeut*mDeut; // SquaredMassOfDeuteron 386 390 static const G4double mTrit= G4QPDGCode(2112).GetNuclMass(1,2,0);// Mass of tritium 387 391 static const G4double mHel3= G4QPDGCode(2112).GetNuclMass(2,1,0);// Mass of Helium3 … … 432 436 static G4bool CWinit = true; // CHIPS Warld needs to be initted 433 437 if(CWinit) 434 {438 { 435 439 CWinit=false; 436 440 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 457 461 #ifdef debug 458 462 G4double mp=proj4M.m(); 459 G4cout<<" G4QCollis::PostStepDoIt:called,P="<<Momentum<<"="<<momentum<<",m="<<mp<<G4endl;463 G4cout<<"-->G4QCollis::PostStDoIt:called,P="<<Momentum<<"="<<momentum<<",m="<<mp<<G4endl; 460 464 #endif 461 465 if (!IsApplicable(*particle)) // Check applicability … … 507 511 #ifdef debug 508 512 G4int prPDG=particle->GetPDGEncoding(); 509 G4cout<<"G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;513 G4cout<<"G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 510 514 #endif 511 515 if(!projPDG) … … 516 520 G4int EPIM=ElProbInMat.size(); 517 521 #ifdef debug 518 G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;522 G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 519 523 #endif 520 524 G4int i=0; … … 523 527 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 524 528 for(i=0; i<nE; ++i) 525 {526 #ifdef debug 527 G4cout<<"G4QCollision::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;529 { 530 #ifdef debug 531 G4cout<<"G4QCollision::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl; 528 532 #endif 529 533 if (rnd<ElProbInMat[i]) break; … … 534 538 Z=static_cast<G4int>(pElement->GetZ()); 535 539 #ifdef debug 536 G4cout<<"G4QCollision::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;540 G4cout<<"G4QCollision::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 537 541 #endif 538 542 if(Z<=0) … … 545 549 G4int nofIsot=SPI->size(); // #of isotopes in the element i 546 550 #ifdef debug 547 G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;551 G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl; 548 552 #endif 549 553 G4int j=0; … … 554 558 { 555 559 #ifdef debug 556 G4cout<<"G4QCollision::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;560 G4cout<<"G4QCollision::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl; 557 561 #endif 558 562 if(rndI < (*SPI)[j]) break; … … 562 566 G4int N =(*IsN)[j]; ; // Randomized number of neutrons 563 567 #ifdef debug 564 G4cout<<"G4QCollision::PostStepDoIt:j="<<i<<", N(isotope)="<<N<<G4endl;568 G4cout<<"G4QCollision::PostStepDoIt: Z="<<Z<<", j="<<i<<", N(isotope)="<<N<<G4endl; 565 569 #endif 566 570 if(N<0) … … 576 580 if(dsr<dd)dsr=dd; 577 581 if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // ManualP 578 else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars582 else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP ClustPars 579 583 else if(projPDG==-211) G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.);//Pi- ClustPars 580 584 #ifdef debug … … 607 611 // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + NC (?) 608 612 // 609 if (aProjPDG == 11 || aProjPDG == 13 || aProjPDG == 15) {610 613 if (aProjPDG == 11 || aProjPDG == 13 || aProjPDG == 15) 614 { 611 615 #ifdef debug 612 616 G4cout<<"G4QCollision::PostStDoIt:startSt="<<aParticleChange.GetTrackStatus()<<G4endl; … … 646 650 G4double photonEnergy = CSmanager->GetExchangeEnergy(); // Energy of EqivExchangePart 647 651 #ifdef debug 648 G4cout<<"G4QCol::PStDoIt: kE="<<kinEnergy<<",dir="<<dir<<",phE="<<photonEnergy<<G4endl;652 G4cout<<"G4QCol::PStDoIt: kE="<<kinEnergy<<",dir="<<dir<<",phE="<<photonEnergy<<G4endl; 649 653 #endif 650 654 if( kinEnergy < photonEnergy || photonEnergy < 0.) … … 708 712 G4double cost=(iniE*finE-ml2-photonQ2/2)/iniP/finP; // cos(scat_ang_of_lepton) 709 713 #ifdef pdebug 710 G4cout<<"G4QC::PSDoIt:Q2="<<photonQ2<<",ct="<<cost<<",Pi="<<iniP<<",Pf="<<finP<<G4endl;714 G4cout<<"G4QC::PSDoIt:Q2="<<photonQ2<<",ct="<<cost<<",Pi="<<iniP<<",Pf="<<finP<<G4endl; 711 715 #endif 712 716 if(cost>1.) cost=1.; // To avoid the accuracy of calculation problem … … 717 721 G4double absEn = std::pow(am,third)*GeV; // @@(b) Mean Energy Absorbed by a Nucleus 718 722 //if(am>1 && absEn < photonEnergy) // --> the absorption of energy can happen 719 if(absEn < photonEnergy) // --> the absorption of energy can happen723 if(absEn < photonEnergy) // --> the absorption of energy can happen 720 724 { 721 725 G4double abtEn = absEn+hdM; // @@(b) MeanEnergyAbsorbed by a nucleus (+M_N) … … 727 731 absMom = std::sqrt(abMo2); // Absorbed Momentum 728 732 if(absMom < phMo) // --> the absorption of momentum can happen 729 {733 { 730 734 G4double dEn = photonEnergy - absEn; // Leading energy 731 735 G4double dMo = phMo - absMom; // Leading momentum 732 736 G4double sF = dEn*dEn - dMo*dMo;// s of leading particle 733 737 #ifdef ppdebug 734 G4cout<<"-PhotoAbsorption-G4QCol::PStDoIt:sF="<<sF<<",phEn="<<photonEnergy<<G4endl;738 G4cout<<"-PhotoAbsorption-G4QCol::PStDoIt:sF="<<sF<<",phEn="<<photonEnergy<<G4endl; 735 739 #endif 736 740 if(sF > stmPi) // --> Leading fragmentation is possible 737 {741 { 738 742 photonEnergy = absEn; // New value of the photon energy 739 743 photonQ2=abMo2-absEn*absEn; // New value of the photon Q2 … … 757 761 aParticleChange.ProposeMomentumDirection(findir); // new direction for the lepton 758 762 #ifdef pdebug 759 G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()<<"="<<finE<<"-"763 G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()<<"="<<finE<<"-" 760 764 <<ml<<", d="<<*aParticleChange.GetMomentumDirection()<<","<<findir<<G4endl; 761 765 #endif … … 765 769 G4double ptm=photon3M.mag(); // 3M of the virtual photon 766 770 #ifdef ppdebug 767 G4cout<<"-Absorption-G4QCollision::PostStepDoIt: ph3M="<<photon3M<<", eIn3M="771 G4cout<<"-Absorption-G4QCollision::PostStepDoIt: ph3M="<<photon3M<<", eIn3M=" 768 772 <<iniP*dir<<", eFin3M="<<finP*findir<<", abs3M="<<absMom<<"<ptm="<<ptm<<G4endl; 769 773 #endif … … 772 776 proj4M=G4LorentzVector(lead3M,absEn); // 4-momentum of leading System 773 777 #ifdef ppdebug 774 G4cout<<"-->G4QC::PoStDoIt: new sF="<<proj4M.m2()<<", lead4M="<<proj4M<<G4endl;778 G4cout<<"-->G4QC::PoStDoIt: new sF="<<proj4M.m2()<<", lead4M="<<proj4M<<G4endl; 775 779 #endif 776 780 lead4M=proj4M; // Remember 4-mom for the total 4-momentum 777 781 G4Quasmon* pan= new G4Quasmon(G4QContent(1,1,0,1,1,0),proj4M);// ---> DELETED -->---+ 778 782 try // | 779 { // |780 delete leadhs; // |783 { // | 784 delete leadhs; // | 781 785 G4QNucleus vac(90000000); // | 782 786 leadhs=pan->Fragment(vac,1); // DELETED after it is copied to output vector | 783 787 } // | 784 788 catch (G4QException& error) // | 785 { // |789 { // | 786 790 G4cerr<<"***G4QCollision::PostStepDoIt: G4Quasmon Exception is catched"<<G4endl;//| 787 791 G4Exception("G4QCollision::PostStepDoIt:","72",FatalException,"QuasmonCrash"); //| … … 789 793 delete pan; // Delete the Nuclear Environment <----<---+ 790 794 #ifdef ppdebug 791 G4cout<<"G4QCol::PStDoIt: l4M="<<proj4M<<proj4M.m2()<<", N="<<leadhs->size()<<",pt="795 G4cout<<"G4QCol::PStDoIt: l4M="<<proj4M<<proj4M.m2()<<", N="<<leadhs->size()<<",pt=" 792 796 <<ptm<<",pa="<<absMom<<",El="<<absEn<<",Pl="<<ptm-absMom<<G4endl; 793 797 #endif … … 796 800 proj4M=G4LorentzVector(photon3M,photonEnergy); 797 801 #ifdef debug 798 G4cout<<"G4QCollision::PostStDoIt: St="<<aParticleChange.GetTrackStatus()<<", g4m="802 G4cout<<"G4QCollision::PostStDoIt: St="<<aParticleChange.GetTrackStatus()<<", g4m=" 799 803 <<proj4M<<", lE="<<finE<<", lP="<<finP*findir<<", d="<<findir.mag2()<<G4endl; 800 804 #endif … … 803 807 // neutrinoNuclear interactions (nu_e, nu_mu only) 804 808 // 805 } else if (aProjPDG == 12 || aProjPDG == 14) { 806 809 } 810 else if (aProjPDG == 12 || aProjPDG == 14) 811 { 807 812 G4double kinEnergy= projHadron->GetKineticEnergy()/MeV; // Total energy of the neutrino 808 813 G4double dKinE=kinEnergy+kinEnergy; // doubled energy for s calculation 809 814 #ifdef debug 810 G4cout<<"G4QCollision::PostStDoIt: 2*nuEnergy="<<dKinE<<"(MeV), PDG="<<projPDG<<G4endl;815 G4cout<<"G4QCollision::PostStDoIt: 2*nuEnergy="<<dKinE<<"(MeV), PDG="<<projPDG<<G4endl; 811 816 #endif 812 817 G4ParticleMomentum dir = projHadron->GetMomentumDirection(); // unit vector 813 818 G4double ml = mu; 814 G4double ml2 = mu2;815 //G4double mlN = muN;816 G4double mlN2= muN2;817 G4double fmlN= fmuN;818 G4double mlsN= musN;819 //G4double mlP = muP;820 G4double mlP2= muP2;821 G4double fmlP= fmuP;822 G4double mlsP= musP;823 G4double mldM= mudM;824 //G4double mlD = muD;825 G4double mlD2= muD2;819 G4double ml2 = mu2; 820 //G4double mlN = muN; 821 G4double mlN2= muN2; 822 G4double fmlN= fmuN; 823 G4double mlsN= musN; 824 //G4double mlP = muP; 825 G4double mlP2= muP2; 826 G4double fmlP= fmuP; 827 G4double mlsP= musP; 828 G4double mldM= mudM; 829 //G4double mlD = muD; 830 G4double mlD2= muD2; 826 831 if(aProjPDG==12) 827 832 { 828 833 ml = me; 829 ml2 = me2;830 //mlN = meN;831 mlN2= meN2;832 fmlN= fmeN;833 mlsN= mesN;834 //mlP = meP;835 mlP2= meP2;836 fmlP= fmeP;837 mlsP= mesP;838 mldM= medM;839 //mlD = meD;840 mlD2= meD2;834 ml2 = me2; 835 //mlN = meN; 836 mlN2= meN2; 837 fmlN= fmeN; 838 mlsN= mesN; 839 //mlP = meP; 840 mlP2= meP2; 841 fmlP= fmeP; 842 mlsP= mesP; 843 mldM= medM; 844 //mlD = meD; 845 mlD2= meD2; 841 846 } 842 847 G4VQCrossSection* CSmanager =G4QNuMuNuclearCrossSection::GetPointer(); // (nu,l) … … 881 886 G4bool secnu=false; 882 887 if(xSec*G4UniformRand()>xSec1) // recover neutrino/antineutrino 883 {888 { 884 889 if(scatPDG>0) scatPDG++; 885 890 else scatPDG--; … … 900 905 totCS1 = qelCS1; 901 906 totCS2 = qelCS2; 902 }907 } 903 908 // make different definitions for neutrino and antineutrino 904 909 G4double mIN=mProt; // Just a prototype (for anu, Z=1, N=0) … … 956 961 { 957 962 if(Z>1||N>0) // Calculate the splitted mass 958 {963 { 959 964 targPDG-=1000; // Anti-Neutrino -> subtract proton 960 965 G4QPDGCode targQPDG(targPDG); … … 973 978 G4double s=mIN*(mIN+dKinE); // s=(M_cm)^2=m2+2mE (m=targetMass,E=E_nu) 974 979 #ifdef debug 975 G4cout<<"G4QCollision::PostStDoIt: s="<<s<<" >? OT="<<OT<<", mlD2="<<mlD2<<G4endl;980 G4cout<<"G4QCollision::PostStDoIt: s="<<s<<" >? OT="<<OT<<", mlD2="<<mlD2<<G4endl; 976 981 #endif 977 982 if(s<=OT) // *** Do nothing solution *** … … 986 991 } 987 992 #ifdef debug 988 G4cout<<"G4QCollision::PostStDoIt: Stop and kill the projectile neutrino"<<G4endl;993 G4cout<<"G4QCollision::PostStDoIt: Stop and kill the projectile neutrino"<<G4endl; 989 994 #endif 990 995 aParticleChange.ProposeEnergy(0.); … … 998 1003 else Q2=CSmanager->GetQEL_ExchangeQ2(); 999 1004 #ifdef debug 1000 G4cout<<"G4QCollision::PostStDoIt:QuasiEl(nu="<<secnu<<"),s="<<s<<",Q2="<<Q2<<G4endl;1005 G4cout<<"G4QCollision::PostStDoIt:QuasiEl(nu="<<secnu<<"),s="<<s<<",Q2="<<Q2<<G4endl; 1001 1006 #endif 1002 1007 //G4double ds=s+s; // doubled s … … 1032 1037 else Q2=CSmanager2->GetNQE_ExchangeQ2(); 1033 1038 #ifdef debug 1034 G4cout<<"G4QColl::PStDoIt: MultiPeriferal s="<<s<<",Q2="<<Q2<<",T="<<targPDG<<G4endl;1039 G4cout<<"G4QColl::PStDoIt: MultiPeriferal s="<<s<<",Q2="<<Q2<<",T="<<targPDG<<G4endl; 1035 1040 #endif 1036 1041 if(secnu) projPDG=CSmanager2->GetExchangePDGCode();// PDG Code of the effective gamma … … 1055 1060 { 1056 1061 #ifdef debug 1057 G4cout<<"*G4QCollision::PostStDoIt: cost="<<cost<<", Q2="<<Q2<<", nu="<<we<<", mx="1062 G4cout<<"*G4QCollision::PostStDoIt: cost="<<cost<<", Q2="<<Q2<<", nu="<<we<<", mx=" 1058 1063 <<mx<<", pot="<<pot<<", 2KE="<<dKinE<<G4endl; 1059 1064 #endif … … 1077 1082 proj4M-=scat4M; // 4mom of the W/Z (effective pion/gamma) 1078 1083 #ifdef debug 1079 G4cout<<"G4QCollision::PostStDoIt: proj4M="<<proj4M<<", ml="<<ml<<G4endl;1084 G4cout<<"G4QCollision::PostStDoIt: proj4M="<<proj4M<<", ml="<<ml<<G4endl; 1080 1085 #endif 1081 1086 // Check that the en/mom transfer is possible, if not -> elastic … … 1162 1167 } 1163 1168 } 1164 1165 1169 // 1166 // quasi-elastic for p+A(Z,N)1170 // quasi-elastic (& pickup process) for p+A(Z,N) 1167 1171 // 1168 } else if (aProjPDG == 2212 && Z > 0 && N > 0) { 1169 //else if(2>3) 1170 1172 } 1173 else if (aProjPDG == 2212 && Z > 0 && N > 0) 1174 //else if(2>3) 1175 { 1171 1176 G4QuasiFreeRatios* qfMan=G4QuasiFreeRatios::GetPointer(); 1172 1177 std::pair<G4double,G4double> fief=qfMan->GetRatios(momentum, aProjPDG, Z, N); 1173 1178 G4double qepart=fief.first*fief.second; 1174 #ifdef qedebug 1175 G4cout<<"G4QCol::PSD:QE[p("<<proj4M<<")+(Z="<<Z<<",N="<<N<<",)="<<qepart<<G4endl; 1176 #endif 1177 if(G4UniformRand()<qepart) // Make a quasi free scattering (out:A-1,h,N) @@ KinLim 1178 { 1179 // First decay a nucleus in a nucleon and a residual (A-1) nucleus 1180 G4double dmom=91.; // Fermi momentum (proto default for a deuteron) 1181 if(Z>1||N>1) dmom=286.2*std::pow(-std::log(G4UniformRand()),third);// p_max=250 MeV/c 1182 1179 // Keep QE part for the quasi-free nucleons 1180 const G4int lCl=3; // The last clProb[lCl]==1. by definition, MUST be increasing 1181 G4double clProb[lCl]={.65,.85,.95};// N/P,D,t/He3,He4, integratedProb for .65,.2,.1,.05 1182 if(qepart>0.45) qepart=.45; // Quasielastic part is too large - shrink 1183 else qepart/=clProb[0]; // Add corresponding number of 2N, 3N, & 4N clusters 1184 G4double pickup=1.-qepart; // Estimate the rest of the cross-section 1185 G4double thresh=100.; 1186 if(momentum > thresh) pickup*=50./momentum/std::pow(Z+N,third); // 50. is a par(!) 1187 // pickup = 0.; // To exclude the pickup process 1188 if (N) pickup+=qepart; 1189 else pickup =qepart; 1190 G4double rnd=G4UniformRand(); 1191 #ifdef ldebug 1192 G4cout<<"-->G4QCol::PSD:QE[p("<<proj4M<<")+(Z="<<Z<<",N="<<N<<")]="<<qepart 1193 <<", pickup="<<pickup<<G4endl; 1194 #endif 1195 if(rnd<pickup) // Make a quasi free scattering (out:A-1,h,N) @@ KinLim,CoulBar,PauliBl 1196 { 1197 G4double dmom=91.; // Fermi momentum (proto default for a deuteron) 1198 G4double fmm=287.; // @@ Can be A-dependent 1199 if(Z>1||N>1) dmom=fmm*std::pow(-std::log(G4UniformRand()),third); 1200 // Values to be redefined for quasi-elastic 1201 G4LorentzVector r4M(0.,0.,0.,0.); // Prototype of 4mom of the residual nucleus 1202 G4LorentzVector n4M(0.,0.,0.,0.); // Prototype of 4mom of the quasi-cluster 1203 G4int nPDG=90000001; // Prototype for quasi-cluster mass calculation 1204 G4int restPDG=targPDG; // Prototype should be reduced by quasi-cluster 1205 G4int rA=Z+N-1; // Prototype for the residualNucl definition 1206 G4int rZ=Z; // residZ: OK for the quasi-free neutron 1207 G4int nA=1; // Prototype for the quasi-cluster definition 1208 G4int nZ=0; // nA=1,nZ=0: OK for the quasi-free neutron 1209 G4double qM=mNeut; // Free mass of the quasi-free cluster 1210 G4int A = Z + N; // Baryon number of the nucleus 1211 if(rnd<qepart) 1212 { 1213 // ===> First decay a nucleus in a nucleon and a residual (A-1) nucleus 1183 1214 // Calculate cluster probabilities (n,p,d,t,he3,he4 now only, can use UpdateClusters) 1184 const G4int lCl=3; // The last clProb[lCl]==1. by definition, MUST be increasing1185 G4double clProb[lCl]={0.6,0.7,0.8}; // N/P,D,t/He3,Alpha, integrated prob for .6,.1,.1,.21186 1215 G4double base=1.; // Base for randomization (can be reduced by totZ & totN) 1187 G4int max=lCl; // Number of boundaries (can be reduced by totZ & totN) 1188 1216 G4int max=lCl; // Number of boundaries (can be reduced by totZ & totN) 1189 1217 // Take into account that at least one nucleon must be left ! 1190 // Change max-- to --max - DHW 05/081191 G4int A = Z + N; // Baryon number of the nucleus1192 1218 if (Z<2 || N<2 || A<5) base = clProb[--max]; // Alpha cluster is impossible 1193 1219 if ( (Z > 1 && N < 2) || (Z < 2 && N > 1) ) 1194 1220 base=(clProb[max]+clProb[max-1])/2; // t or He3 is impossible 1195 1196 if ( (Z < 2 && N < 2) || A < 4) base=clProb[--max]; // Both He3 and t clusters are impossible 1197 1221 if ( (Z < 2 && N < 2) || A < 4) base=clProb[--max];// He3 & t clusters are impossible 1198 1222 if(A<3) base=clProb[--max]; // Deuteron cluster is impossible 1199 1223 G4int cln=0; // Cluster#0 (Default for the selected nucleon) … … 1207 1231 G4ParticleDefinition* theDefinition; // Prototype for qfNucleon 1208 1232 G4bool cp1 = cln+2==A; // A=ClusterBN+1 condition 1209 // Values to be defined in the following IF/ELSE1210 G4LorentzVector r4M(0.,0.,0.,0.); // Prototype of 4mom of the residual nucleus1211 G4LorentzVector n4M(0.,0.,0.,0.); // Prototype of 4mom of the quasi-cluster1212 G4int nPDG=90000001; // Prototype for quasi-cluster mass calculation1213 G4int restPDG=targPDG; // Prototype should be reduced by quasi-cluster1214 G4int rA=Z+N-1; // Prototype for the residualNucl definition1215 G4int rZ=Z; // residZ: OK for the quasi-free neutron1216 G4int nA=1; // Prototype for the quasi-cluster definition1217 G4int nZ=0; // nA=1,nZ=0: OK for the quasi-free neutron1218 G4double qM=mNeut; // Free mass of the quasi-free cluster1219 1233 if(!cln || cp1) // Split in nucleon + (A-1) with Fermi momentum 1220 1234 { … … 1239 1253 n4M=G4LorentzVector(0.,0.,0.,nM); // 4mom of the quasi-nucleon 1240 1254 #ifdef qedebug 1241 G4cout<<"G4QCollis::PStDoIt:QE,p="<<dmom<<",tM="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;1255 G4cout<<"G4QCollis::PStDoIt:QE,p="<<dmom<<",tM="<<tM<<",R="<<rM<<",N="<<nM<<G4endl; 1242 1256 #endif 1243 1257 if(!G4QHadron(t4M).DecayIn2(r4M, n4M)) … … 1247 1261 } 1248 1262 #ifdef qedebug 1249 G4cout<<"G4QCol::PStDoIt:QE-N,RA="<<r4M.rho()<<r4M<<",QN="<<n4M.rho()<<n4M<<G4endl;1263 G4cout<<"G4QCol::PStDoIt:QE-N,RA="<<r4M.rho()<<r4M<<",QN="<<n4M.rho()<<n4M<<G4endl; 1250 1264 #endif 1251 1265 if(cp1 && cln) // Quasi-cluster case: swap the output … … 1266 1280 } 1267 1281 } 1268 else // Split a cluster (wor w/o "Fermi motion" and "Fermi decay")1282 else // Split the cluster (with or w/o "Fermi motion" and "Fermi decay") 1269 1283 { 1270 1284 if(cln==1) … … 1275 1289 nZ=1; 1276 1290 restPDG-=1001; 1291 // Recalculate dmom 1292 G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) + 1293 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1294 dmom=sumv.mag(); 1277 1295 } 1278 1296 else if(cln==2) 1279 1297 { 1280 1298 nA=3; 1281 if(G4UniformRand()*(A-2)>(N-1)) // He31299 if(G4UniformRand()*(A-2)>(N-1)) // He3 1282 1300 { 1283 1301 nPDG=90002001; … … 1293 1311 restPDG-=1002; 1294 1312 } 1313 // Recalculate dmom 1314 G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) + 1315 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection()+ 1316 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1317 dmom=sumv.mag(); 1295 1318 } 1296 1319 else … … 1301 1324 nZ=2; 1302 1325 restPDG-=2002; 1326 G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) + 1327 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection()+ 1328 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection()+ 1329 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1330 dmom=sumv.mag(); 1303 1331 } 1304 1332 rA=A-nA; … … 1317 1345 n4M=G4LorentzVector(0.,0.,0.,nM); // 4mom of the quasi-nucleon 1318 1346 #ifdef qedebug 1319 G4cout<<"G4QCollis::PStDoIt:QEC,p="<<dmom<<",T="<<tM<<",R="<<rM<<",N="<<nM<<G4endl;1347 G4cout<<"G4QCollis::PStDoIt:QEC,p="<<dmom<<",T="<<tM<<",R="<<rM<<",N="<<nM<<G4endl; 1320 1348 #endif 1321 1349 if(!G4QHadron(t4M).DecayIn2(r4M, n4M)) … … 1326 1354 // --- End of the moving cluster implementation --- 1327 1355 #ifdef qedebug 1328 G4cout<<"G4QCol::PStDoIt:QEC,RN="<<r4M.rho()<<r4M<<",QCl="<<n4M.rho()<<n4M<<G4endl;1356 G4cout<<"G4QCol::PStDoIt:QEC,RN="<<r4M.rho()<<r4M<<",QCl="<<n4M.rho()<<n4M<<G4endl; 1329 1357 #endif 1330 1358 } 1331 1359 G4LorentzVector s4M=n4M+proj4M; // Tot 4-momentum for scattering 1332 G4double prjM2 = proj4M.m2(); 1360 G4double prjM2 = proj4M.m2(); // Squared mass of the projectile 1333 1361 G4double prjM = std::sqrt(prjM2); // @@ Get from pPDG (?) 1334 1362 G4double minM = prjM+qM; // Min mass sum for the final products … … 1337 1365 { 1338 1366 #ifdef qedebug 1339 G4cout<<"G4QCol::PStDoIt:***Enter***,cmM2="<<cmM2<<" > minM2="<<minM*minM<<G4endl;1367 G4cout<<"G4QCol::PStDoIt:***Enter***,cmM2="<<cmM2<<" > minM2="<<minM*minM<<G4endl; 1340 1368 #endif 1341 1369 // Estimate and randomize charge-exchange with quasi-free cluster 1342 1370 G4bool chex=false; // Flag of the charge exchange scattering 1343 1371 G4ParticleDefinition* projpt=G4Proton::Proton(); // Prototype, only for chex=true 1372 // This is reserved for the charge-exchange scattering (to help neutron spectras) 1344 1373 //if(cln&&!cp1 &&(projPDG==2212&&rA>rZ || projPDG==2112&&rZ>1))// @@ Use proj chex 1345 if(2>3)1374 if(2>3) 1346 1375 { 1347 1376 #ifdef qedebug 1348 G4cout<<"G4QCol::PStDoIt:-Enter,P="<<projPDG<<",cln="<<cln<<",cp1="<<cp1<<G4endl;1377 G4cout<<"G4QCol::PStDoIt:-Enter,P="<<projPDG<<",cln="<<cln<<",cp1="<<cp1<<G4endl; 1349 1378 #endif 1350 1379 G4double tprM=mProt; … … 1365 1394 G4double chl=qfMan->ChExElCoef(efP*MeV, nZ, nA-nZ, projPDG); // ChEx/Elast(pPDG!) 1366 1395 #ifdef qedebug 1367 G4cout<<"G4QCol::PStDoIt:chl="<<chl<<",P="<<efP<<",nZ="<<nZ<<",nA="<<nA<<G4endl;1396 G4cout<<"G4QCol::PStDoIt:chl="<<chl<<",P="<<efP<<",nZ="<<nZ<<",nA="<<nA<<G4endl; 1368 1397 #endif 1369 1398 if(chl>0.&&cmM2>minM*minM&&G4UniformRand()<chl/(1.+chl)) // minM is redefined … … 1381 1410 projPDG, proj4M); 1382 1411 #ifdef qedebug 1383 G4cout<<"G4QCollis::PStDoIt:QElS,proj="<<prjM<<sctout.second<<",qfCl="<<qM1412 G4cout<<"G4QCollis::PStDoIt:QElS,proj="<<prjM<<sctout.second<<",qfCl="<<qM 1384 1413 <<sctout.first<<",chex="<<chex<<",nA="<<nA<<",nZ="<<nZ<<G4endl; 1385 1414 #endif … … 1431 1460 else G4cout<<"G4QCol::PSD: OUT, M2="<<s4M.m2()<<"<"<<minM*minM<<", N="<<nPDG<<G4endl; 1432 1461 #endif 1433 } 1462 } // end of proton quasi-elastic (including QE on NF) 1463 else // @@ make cost-condition @@ Pickup process (pickup 1 or 2 n and make d or t) 1464 { 1465 restPDG--; // Res. nucleus PDG is one neutron less than targ. PDG 1466 G4double mPUF=mDeut; // Prototype of the mass of the created pickup fragment 1467 G4ParticleDefinition* theDefinition = G4Deuteron::Deuteron(); 1468 //theDefinition = G4ParticleTable::GetParticleTable()->FindIon(nZ,nA,0,nZ);//ion 1469 G4bool din=false; // Flag of picking up 2 neutrons to create t (tritium) 1470 //G4bool hin=false; // Flag of picking up 1 n + 1 p to create He3 (NOT IMPL) 1471 G4bool tin=false; // Flag of picking up 2 n + 1 p to create alpha (He4) 1472 G4double frn=G4UniformRand(); 1473 if(N>2 && frn > 0.95) // .95 is a parameter to pickup 2n (cteate t or +1p=alph) 1474 { 1475 theDefinition = G4Triton::Triton(); 1476 restPDG--; // Res. nucleus PDG is two neutrons less than target PDG 1477 rA--; // Reduce the baryon number of the residual nucleus 1478 mPUF=mTrit; // The mass of the created pickup fragment (triton) 1479 // Recalculate dmom 1480 G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) + 1481 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1482 dmom=sumv.mag(); 1483 din=true; 1484 if(Z>1 && frn > 0.99) // 0.99 is a parameter to pickup 2n + 1p and create alpha 1485 { 1486 theDefinition = G4Alpha::Alpha(); 1487 restPDG-=1000; // Res. nucleus PDG is (2 n + 1 p) less than target PDG 1488 rA--; // Reduce the baryon number of the residual nucleus 1489 rZ--; // Reduce the charge of the residual nucleus 1490 mPUF=mAlph; // The mass of the created pickup fragment (triton) 1491 // Recalculate dmom 1492 sumv += fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1493 dmom=sumv.mag(); 1494 tin=true; 1495 } 1496 } 1497 G4double mPUF2=mPUF*mPUF; 1498 G4LorentzVector t4M(0.,0.,0.,tM); // 4m of the target nucleus to be decayed 1499 G4double rM=G4QPDGCode(restPDG).GetMass();// Mass of the residual nucleus 1500 G4double rM2=rM*rM; // Squared mass of the residual nucleus 1501 G4double nM2=rM2+tM*tM-(tM+tM)*std::sqrt(rM2+dmom*dmom);// M2 of boundQF-nucleon(2N) 1502 if(nM2 < 0) nM2=0.; 1503 G4double nM=std::sqrt(nM2); // M of bQF-nucleon 1504 G4double den2=(dmom*dmom+nM2); // squared energy of bQF-nucleon 1505 G4double den=std::sqrt(den2); // energy of bQF-nucleon 1506 #ifdef qedebug 1507 G4cout<<"G4QCollis::PStDoIt:PiU,p="<<dmom<<",tM="<<tM<<",R="<<rM<<",N="<<nM<<G4endl; 1508 #endif 1509 G4double qp=momentum*dmom; 1510 G4double srm=proj4M.e()*den; 1511 G4double cost=(nM2+mProt2+srm+srm-mPUF2)/(qp+qp); 1512 G4int ict=0; 1513 while(std::fabs(cost)>1. && ict<3) 1514 { 1515 dmom=91.; // Fermi momentum (proto default for a deuteron) 1516 if(Z>1||N>1) dmom=fmm*std::pow(-std::log(G4UniformRand()),third); 1517 if(din) // Recalculate dmom for the final triton 1518 { 1519 G4ThreeVector sumv=G4ThreeVector(0.,0.,dmom) + 1520 fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1521 if(tin) sumv+=fmm*std::pow(-std::log(G4UniformRand()),third)*G4RandomDirection(); 1522 dmom=sumv.mag(); 1523 } 1524 nM2=rM2+tM*tM-(tM+tM)*std::sqrt(rM2+dmom*dmom); // M2 of bQF-nucleon 1525 if(nM2 < 0) nM2=0.; 1526 nM=std::sqrt(nM2); // M of bQF-nucleon 1527 den2=(dmom*dmom+nM2); // squared energy of bQF-nucleon 1528 den=std::sqrt(den2); // energy of bQF-nucleon 1529 qp=momentum*dmom; 1530 srm=proj4M.e()*den; 1531 cost=(nM2+mProt2+srm+srm-mPUF2)/(qp+qp); 1532 ict++; 1533 #ifdef ldebug 1534 if(ict>2)G4cout<<"G4QCollis::PStDoIt:i="<<ict<<",d="<<dmom<<",ct="<<cost<<G4endl; 1535 #endif 1536 } 1537 if(std::fabs(cost)<=1.) 1538 {// ---- @@ From here can be a MF for QF nucleon extraction (if used by others) 1539 G4ThreeVector vdir = proj4M.vect(); // 3-Vector in the projectile direction 1540 G4ThreeVector vx(0.,0.,1.); // ProtoOrt in theDirection of the projectile 1541 G4ThreeVector vy(0.,1.,0.); // First ProtoOrt orthogonal to the direction 1542 G4ThreeVector vz(1.,0.,0.); // SecondProtoOrt orthoganal to the direction 1543 if(vdir.mag2() > 0.) // the projectile isn't at rest 1544 { 1545 vx = vdir.unit(); // Ort in the direction of the projectile 1546 G4ThreeVector vv= vx.orthogonal(); // Not normed orthogonal vector (!) 1547 vy = vv.unit(); // First ort orthogonal to the proj direction 1548 vz = vx.cross(vy); // Second ort orthoganal to the projDirection 1549 } 1550 // ---- @@ End of possible MF (Similar is in G4QEnvironment) 1551 G4double tdom=dmom*std::sqrt(1-cost*cost);// Transversal component of the Fermi-Mom 1552 G4double phi=twopi*G4UniformRand(); // Phi of the Fermi-Mom 1553 G4ThreeVector vedm=vx*dmom*cost+vy*tdom*std::sin(phi)+vz*tdom*std::cos(phi);// bQFN 1554 G4LorentzVector bqf(vedm,den); // 4-mom of the bQF nucleon 1555 r4M=t4M-bqf; // 4mom of the residual nucleus 1556 if(std::fabs(r4M.m()-rM)>.001) G4cout<<"G4QCol::PSD:rM="<<rM<<"#"<<r4M.m()<<G4endl; 1557 G4LorentzVector f4M=proj4M+bqf; // Prototype of 4-mom of Deuteron 1558 if(std::fabs(f4M.m()-mPUF)>.001) 1559 G4cout<<"G4QCol::PSD:mDeut="<<mPUF<<" # "<<f4M.m()<<G4endl; 1560 aParticleChange.ProposeEnergy(0.); // @@ ?? 1561 aParticleChange.ProposeTrackStatus(fStopAndKill);// projectile nucleon is killed 1562 aParticleChange.SetNumberOfSecondaries(2); 1563 // Fill pickup hadron 1564 G4DynamicParticle* theQFN = new G4DynamicParticle(theDefinition,f4M); 1565 G4Track* scatQFN = new G4Track(theQFN, localtime, position ); // pickup 1566 scatQFN->SetWeight(weight); // weighted 1567 scatQFN->SetTouchableHandle(trTouchable); // nuclear 1568 aParticleChange.AddSecondary(scatQFN); // cluster 1569 // ---------------------------------------------------- 1570 // Fill residual nucleus 1571 if (restPDG==90000001) theDefinition = G4Neutron::Neutron(); 1572 else if(restPDG==90001000) theDefinition = G4Proton::Proton(); 1573 else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(rZ,rA,0,rZ);//ion 1574 G4DynamicParticle* theReN = new G4DynamicParticle(theDefinition,r4M); 1575 G4Track* scatReN = new G4Track(theReN, localtime, position ); // scattered 1576 scatReN->SetWeight(weight); // weighted 1577 scatReN->SetTouchableHandle(trTouchable); // residual 1578 aParticleChange.AddSecondary(scatReN); // nucleus 1579 return G4VDiscreteProcess::PostStepDoIt(track, step); 1580 } 1581 } 1582 } // end of decoupled processes for the proton projectile 1434 1583 } // end lepto-nuclear, neutrino-nuclear, proton quasi-elastic 1435 1436 1584 EnMomConservation=proj4M+G4LorentzVector(0.,0.,0.,tM); // Total 4-mom of the reaction 1437 1585 if(absMom) EnMomConservation+=lead4M; // Add E/M of leading System … … 1444 1592 //G4double eWei=1.; 1445 1593 // @@@@@@@@@@@@@@ Temporary for the testing purposes --- End 1446 #ifdef debug1447 G4cout<<" G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl;1448 #endif 1449 G4QHadron* pH = new G4QHadron(projPDG,proj4M); // ---> DELETED -->-- -+1594 #ifdef ldebug 1595 G4cout<<"^^G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl; 1596 #endif 1597 G4QHadron* pH = new G4QHadron(projPDG,proj4M); // ---> DELETED -->----+* 1450 1598 //if(momentum<1000.) // Condition for using G4QEnvironment (not G4QuasmonString) | 1451 1599 { // | … … 1465 1613 catch (G4QException& error)// | . 1466 1614 { // | . 1467 //#ifdef pdebug1615 //#ifdef pdebug 1468 1616 G4cerr<<"***G4QCollision::PostStepDoIt: G4QE Exception is catched"<<G4endl;// | . 1469 //#endif1617 //#endif 1470 1618 G4Exception("G4QCollision::PostStepDoIt:","27",FatalException,"CHIPSCrash");//| . 1471 1619 } // | . … … 1483 1631 // try // | 1484 1632 // { // | 1485 // delete output; // |1633 // delete output; // | 1486 1634 // output = pan->Fragment();// DESTROYED in the end of the LOOP work space | 1487 1635 // // @@@@@@@@@@@@@@ Temporary for the testing purposes --- Begin | 1488 1636 // //tNH=pan->GetNOfHadrons(); // For the test purposes of the String | 1489 1637 // //if(tNH==2) // At least 2 hadrons are in the Constr.Output | 1490 // //{// |1638 // //{// | 1491 1639 // // elF=true; // Just put a flag for the ellastic Scattering | 1492 1640 // // delete output; // Delete a prototype of dummy G4QHadronVector | … … 1503 1651 // //#ifdef pdebug 1504 1652 // G4cerr<<"***G4QCollision::PostStepDoIt: GEN Exception is catched"<<G4endl; // | 1505 // //#endif1653 // //#endif 1506 1654 // G4Exception("G4QCollision::PostStDoIt:","27",FatalException,"QString Excep");//| 1507 1655 // } // | … … 1524 1672 delete leadhs; 1525 1673 } 1526 1527 1528 1674 // ------------- From here the secondaries are filled ------------------------- 1529 1675 G4int tNH = output->size(); // A#of hadrons in the output … … 1565 1711 { 1566 1712 #ifdef debug 1567 G4cout<<"G4QCollision::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;1713 G4cout<<"G4QCollision::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl; 1568 1714 #endif 1569 1715 delete hadr; … … 1578 1724 { 1579 1725 if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong(); // K_L 1580 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S1726 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S 1581 1727 } 1582 1728 else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus(); … … 1585 1731 else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero(); 1586 1732 else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus(); 1587 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)1733 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!) 1588 1734 { 1589 1735 G4int aZ = hadr->GetCharge(); 1590 1736 G4int aA = hadr->GetBaryonNumber(); 1591 1737 #ifdef pdebug 1592 G4cout<<"G4QCollision::PostStepDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;1738 G4cout<<"G4QCollision::PostStepDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl; 1593 1739 #endif 1594 1740 theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ); … … 1598 1744 { 1599 1745 #ifdef pdebug 1600 G4cout<<"G4QCollision::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;1746 G4cout<<"G4QCollision::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl; 1601 1747 #endif 1602 1748 theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode); 1603 1749 #ifdef pdebug 1604 G4cout<<"G4QCollision::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;1750 G4cout<<"G4QCollision::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl; 1605 1751 #endif 1606 1752 } … … 1643 1789 delete output; // instances of the G4QHadrons from the output are already deleted above + 1644 1790 #ifdef debug 1645 G4cout<<"G4QCollision::PostStDoIt: after St="<<aParticleChange.GetTrackStatus()<<G4endl;1791 G4cout<<"G4QCollision::PostStDoIt: after St="<<aParticleChange.GetTrackStatus()<<G4endl; 1646 1792 #endif 1647 1793 if(aProjPDG!=11 && aProjPDG!=13 && aProjPDG!=15) … … 1649 1795 //return &aParticleChange; // This is not enough (ClearILL) 1650 1796 #ifdef pdebug 1651 G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()1797 G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy() 1652 1798 <<", d="<<*aParticleChange.GetMomentumDirection()<<G4endl; 1653 1799 #endif 1654 #ifdef debug1655 G4cout<<"G4QCollision::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG<<", St="1800 #ifdef ldebug 1801 G4cout<<"G4QCollision::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG<<", St=" 1656 1802 <<aParticleChange.GetTrackStatus()<<G4endl; 1657 1803 #endif -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffraction.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QDiffraction.cc,v 1. 5 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QDiffraction.cc,v 1.6 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QDiffraction class ----------------- … … 31 31 // G4QDiffraction class of the CHIPS Simulation Branch in GEANT4 32 32 // --------------------------------------------------------------- 33 // **************************************************************************************** 34 // ********** This CLASS is temporary moved from the "chips/interface" directory ********* 35 // **************************************************************************************** 33 // Short description: This is a process, which describes the diffraction 34 // excitation of the projectile and the nucleus. On nuclei in addition there 35 // can be a coherent diffraction process for the projectile, but it is 36 // comparably small. The most important part of the diffraction is the 37 // progectile diffraction excitation, as in this interaction proton can lose 38 // only a small part of its energy and make the shower longer. This is because 39 // only 1-2 (n) pions are produce in the diffraction escitation, and the mean 40 // kept energy of the nucleon is (1-n/7)=80%. For kaons the kept energy is much 41 // smaller (1-n/3.5)=60%, and for pions it is less important (about 40%). 42 // ---------------------------------------------------------------------------- 36 43 37 44 //#define debug … … 144 151 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 145 152 G4double abund=abuVector[j]; 146 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);153 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 147 154 #ifdef debug 148 155 G4cout<<"G4QDiffract::GetMeanFreePath:pair#"<<j<<",N="<<N<<",ab="<<abund<<G4endl; 149 156 #endif 150 157 newAbund->push_back(pr); 151 }158 } 152 159 #ifdef debug 153 160 G4cout<<"G4QDiffract::GetMeanFreePath:pairVectorLength="<<newAbund->size()<<G4endl; … … 176 183 G4cout<<"G4QDiff::GMFP:true,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl; 177 184 #endif 178 G4bool ccsf=true;185 G4bool ccsf=true; 179 186 if(Q==-27.) ccsf=false; 180 187 #ifdef debug … … 250 257 static G4bool CWinit = true; // CHIPS Warld needs to be initted 251 258 if(CWinit) 252 {259 { 253 260 CWinit=false; 254 261 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 323 330 #ifdef debug 324 331 G4int prPDG=particle->GetPDGEncoding(); 325 G4cout<<"G4QDiffraction::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;332 G4cout<<"G4QDiffraction::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 326 333 #endif 327 334 if(!projPDG) … … 339 346 fPDG=2212; 340 347 } 341 // Element treatment348 // Element treatment 342 349 G4int EPIM=ElProbInMat.size(); 343 350 #ifdef debug 344 G4cout<<"G4QDiffra::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;351 G4cout<<"G4QDiffra::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 345 352 #endif 346 353 G4int i=0; … … 349 356 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 350 357 for(i=0; i<nE; ++i) 351 {352 #ifdef debug 353 G4cout<<"G4QDiffra::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;358 { 359 #ifdef debug 360 G4cout<<"G4QDiffra::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl; 354 361 #endif 355 362 if (rnd<ElProbInMat[i]) break; … … 360 367 Z=static_cast<G4int>(pElement->GetZ()); 361 368 #ifdef debug 362 G4cout<<"G4QDiffraction::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;369 G4cout<<"G4QDiffraction::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 363 370 #endif 364 371 if(Z<=0) … … 371 378 G4int nofIsot=SPI->size(); // #of isotopes in the element i 372 379 #ifdef debug 373 G4cout<<"G4QDiffraction::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl;380 G4cout<<"G4QDiffraction::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl; 374 381 #endif 375 382 G4int j=0; … … 380 387 { 381 388 #ifdef debug 382 G4cout<<"G4QDiffraction::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;389 G4cout<<"G4QDiffraction::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl; 383 390 #endif 384 391 if(rndI < (*SPI)[j]) break; … … 388 395 G4int N =(*IsN)[j]; ; // Randomized number of neutrons 389 396 #ifdef debug 390 G4cout<<"G4QDiffraction::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;397 G4cout<<"G4QDiffraction::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl; 391 398 #endif 392 399 if(N<0) … … 470 477 G4QHadronVector* out=diffRatio->TargFragment(projPDG, proj4M, Z, N); 471 478 G4int nSec=out->size(); // #of secondaries in the diffraction reaction 472 G4DynamicParticle* theSec=0; // A prototype for secondary for the secondary479 G4DynamicParticle* theSec=0; // A prototype for secondary for the secondary 473 480 G4LorentzVector dif4M(0.,0.,0.,0.); // Prototype for the secondary 4-momentum 474 481 G4int difPDG=0; // PDG code of the secondary 475 482 G4QHadron* difQH=0; // Prototype for a Q-secondary 476 483 #ifdef pdebug 477 G4cout<<"G4QDiffraction::PostStepDoIt: =====found===== nSecondaries="<<nSec<<G4endl;484 G4cout<<"G4QDiffraction::PostStepDoIt: =====found===== nSecondaries="<<nSec<<G4endl; 478 485 #endif 479 486 for(G4int i=0; i<nSec; i++) … … 522 529 theDefinition = G4ParticleTable::GetParticleTable()->FindIon(Z,B,0,0); 523 530 #ifdef pdebug 524 G4cout<<"G4QDiffraction::PoStDoIt:Ion,Z="<<Z<<",A="<<B<<",D="<<theDefinition<<G4endl;531 G4cout<<"G4QDiffraction::PoStDoIt:Ion,Z="<<Z<<",A="<<B<<",D="<<theDefinition<<G4endl; 525 532 #endif 526 533 } 527 534 if(theDefinition) 528 535 { 529 theSec = new G4DynamicParticle; // A secondary for the recoil hadron536 theSec = new G4DynamicParticle; // A secondary for the recoil hadron 530 537 theSec->SetDefinition(theDefinition); 531 538 dif4M = difQH->Get4Momentum(); … … 537 544 aParticleChange.AddSecondary( aNewTrack ); 538 545 #ifdef pdebug 539 G4cout<<"G4QDiffraction::PostStepDoIt: Filled 4M="<<dif4M<<", PDG="<<difPDG<<G4endl;546 G4cout<<"G4QDiffraction::PostStepDoIt: Filled 4M="<<dif4M<<", PDG="<<difPDG<<G4endl; 540 547 #endif 541 548 } … … 568 575 G4double s=diffRatio->GetTargSingDiffXS(p, PDG, Z, N); // XS for target diffraction 569 576 #ifdef debug 570 G4cout<<"G4QDiff::CXS:p="<<p<<",Z="<<Z<<",N="<<N<<",C="<<PDG<<",XS="<<s<<G4endl;577 G4cout<<"G4QDiff::CXS:p="<<p<<",Z="<<Z<<",N="<<N<<",C="<<PDG<<",XS="<<s<<G4endl; 571 578 #endif 572 579 return s; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiffractionRatio.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QDiffractionRatio.cc,v 1. 9 2008/03/21 21:40:08 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QDiffractionRatio.cc,v 1.10 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // G4 Physics class: G4QDiffractionRatio for N+A elastic cross sections31 // G4 Physics class: G4QDiffractionRatio for N+A Diffraction Interactions 32 32 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-06 34 34 // 35 //================================================================================ 35 //======================================================================= 36 // Short description: Difraction excitation is a part of the incoherent 37 // (inelastic) interaction. This part is calculated in the class. 38 // -------------------------------------------------------------------- 36 39 37 40 //#define debug … … 114 117 G4bool found=false; 115 118 G4int i=-1; 116 if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB119 if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB 117 120 { 118 121 found=true; // The A value is found … … 120 123 } 121 124 if(!nDB || !found) // Create new line in the AMDB 122 {125 { 123 126 lastA = A; 124 127 lastT = new G4double[mps]; // Create the linear Table … … 152 155 { 153 156 lastL[j]=CalcDiff2Prod_Ratio(sv,A); 154 if(j!=lastK) sv*=edl;157 if(j!=lastK) sv*=edl; 155 158 } 156 159 } … … 171 174 } 172 175 else // The A value was found in AMDB 173 {176 { 174 177 lastA=vA[i]; 175 178 lastH=vH[i]; … … 199 202 } // End of LinTab update 200 203 if(lastN>=nextN) 201 {204 { 202 205 vH[i]=lastH; 203 206 vN[i]=lastN; … … 205 208 G4int nextK=lastK+1; 206 209 if(s>sma && lastK<nls) // LogTab must be updated 207 {210 { 208 211 G4double sv=std::exp(lastM+lsi); // Define starting poit (lastM will be changed) 209 212 G4double ls=std::log(s); … … 217 220 for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values 218 221 { 219 sv*=edl;222 sv*=edl; 220 223 lastL[j]=CalcDiff2Prod_Ratio(sv,A); 221 224 } 222 225 } // End of LogTab update 223 226 if(lastK>=nextK) 224 {227 { 225 228 vM[i]=lastM; 226 229 vK[i]=lastK; … … 230 233 // Now one can use tabeles to calculate the value 231 234 if(s<sma) // Use linear table 232 {235 { 233 236 G4int n=static_cast<int>(s/ds); // Low edge number of the bin 234 237 G4double d=s-n*ds; // Linear shift … … 236 239 lastR=v+d*(lastT[n+1]-v)/ds; // Result 237 240 } 238 else // Use log table239 {241 else // Use log table 242 { 240 243 G4double ls=std::log(s)-lsi; // ln(s)-l_min 241 244 G4int n=static_cast<int>(ls/dl); // Low edge number of the bin … … 263 266 if(s<=0. || A<=1) return 0.; 264 267 if(A!=mA && A!=1) 265 {268 { 266 269 mA=A; 267 270 G4double a=mA; … … 281 284 G4double q=std::pow(a,0.7); 282 285 p4=(.036/q+.0009*q)/(1.+6./a3+1.e-7*a3); 283 p5=1.3*std::pow(a,0.1168)/(1.+1.2e-8*a3);286 p5=1.3*std::pow(a,0.1168)/(1.+1.2e-8*a3); 284 287 p6=.00046*(a+11830./a2); 285 288 p7=1./(1.+6.17/a2+.00406*a); … … 297 300 G4double s2=s*s; 298 301 G4double s4=s2*s2; 299 G4double dl=std::log(s)-p5;302 G4double dl=std::log(s)-p5; 300 303 R=1./(1.+1./(p1+p2/s4+p4*dl*dl/(1.+p6*std::pow(s,p7)))); 301 return R;304 return R; 302 305 } // End of CalcQF2IN_Ratio 303 306 … … 350 353 G4double mT=mNeut; // Prototype of mass of QF nucleon 351 354 G4double mT2=mNeut2; // Squared mass of a free nucleon to be excited 352 G4double dmT=dmNeut; // Doubled mass 355 G4double dmT=dmNeut; // Doubled mass 353 356 G4int Z=0; // Prototype of the isotope Z 354 357 G4int N=1; // Prototype of the Isotope N … … 357 360 mT=mProt; // Prototype of mass of QF nucleon to be excited 358 361 mT2=mProt2; // Squared mass of the free nucleon 359 dmT=dmProt; // Doubled mass 360 Z=1; // Z of the isotope361 N=0; // N of the Isotope362 dmT=dmProt; // Doubled mass 363 Z=1; // Z of the isotope 364 N=0; // N of the Isotope 362 365 } 363 366 G4double mP2=pr4M.m2(); // Squared mass of the projectile … … 396 399 G4double ds=s-mP2-mDif2; 397 400 G4double e=ds/dmP; 398 G4double P=std::sqrt(e*e-mDif2); // Momentum in pseudo laboratory system401 G4double P=std::sqrt(e*e-mDif2); // Momentum in pseudo laboratory system 399 402 G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer(); 400 403 #ifdef debug … … 442 445 else if(cost<-1.) cost=-1.; 443 446 else 444 {447 { 445 448 G4cerr<<"G4QDiffRat::TargFragm: *NAN* cost="<<cost<<",t="<<t<<",tmax="<<maxt<<G4endl; 446 449 return ResHV; // Do Nothing Action … … 457 460 } 458 461 #ifdef debug 459 G4cout<<"G4QDifRat::TargFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl;462 G4cout<<"G4QDifRat::TargFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl; 460 463 #endif 461 464 // Now everything is ready for fragmentation and DoNothing projHadron must be wiped out … … 465 468 ResHV->push_back(hadron); // Fill the recoil nucleon 466 469 #ifdef debug 467 G4cout<<"G4QDiffractionRatio::TargFragm: *Filled* LeadingNuc="<<r4M<<pPDG<<G4endl;468 #endif 469 G4QHadronVector* leadhs=new G4QHadronVector;// Quasmon Output G4QHadronVectorum --->--- +470 G4cout<<"G4QDiffractionRatio::TargFragm: *Filled* LeadingNuc="<<r4M<<pPDG<<G4endl; 471 #endif 472 G4QHadronVector* leadhs=new G4QHadronVector;// Quasmon Output G4QHadronVectorum --->---* 470 473 G4QContent dQC=G4QPDGCode(rPDG).GetQuarkContent(); // QuarkContent of quasiFreeNucleon | 471 G4Quasmon* quasm = new G4Quasmon(dQC,d4M); // Quasmon=DiffractionExcitationQuasmon- +|474 G4Quasmon* quasm = new G4Quasmon(dQC,d4M); // Quasmon=DiffractionExcitationQuasmon-* | 472 475 #ifdef debug 473 G4cout<<"G4QDiffRatio::TgFrag:tPDG="<<tPDG<<",rPDG="<<rPDG<<",d4M="<<d4M<<G4endl;//| |474 #endif 475 G4QEnvironment* pan= new G4QEnvironment(G4QNucleus(tPDG));// --> DELETED --->--- +| |476 G4cout<<"G4QDiffRatio::TgFrag:tPDG="<<tPDG<<",rPDG="<<rPDG<<",d4M="<<d4M<<G4endl;//| | 477 #endif 478 G4QEnvironment* pan= new G4QEnvironment(G4QNucleus(tPDG));// --> DELETED --->---* | | 476 479 pan->AddQuasmon(quasm); // Add diffractiveQuasmon to Environ.| | | 477 480 #ifdef debug … … 479 482 #endif 480 483 try // | | | 481 { // | | |482 delete leadhs; // | | |484 { // | | | 485 delete leadhs; // | | | 483 486 leadhs = pan->Fragment();// DESTROYED in the end of the LOOP work space | | | 484 487 } // | | | 485 488 catch (G4QException& error)// | | | 486 { // | | |487 //#ifdef pdebug489 { // | | | 490 //#ifdef pdebug 488 491 G4cerr<<"***G4QCollision::PostStepDoIt: G4QE Exception is catched"<<G4endl;// | | | 489 //#endif492 //#endif 490 493 G4Exception("G4QCollision::PostStepDoIt:","27",FatalException,"CHIPSCrash");//| | | 491 494 } // | | | 492 delete pan; // Delete the Nuclear Environment <-<-- +--+|495 delete pan; // Delete the Nuclear Environment <-<--*--* | 493 496 G4int qNH=leadhs->size(); // A#of collected hadrons from diff.frag. | 494 497 if(qNH) for(G4int iq=0; iq<qNH; iq++) // Loop over hadrons to fill the result | … … 498 501 } // | 499 502 delete leadhs; // <----<----<----<----<----<----<----<----<----<----<----<----<----<---* 500 return ResHV; // Result503 return ResHV; // Result 501 504 } // End of TargFragment 502 505 … … 588 591 G4double ds=s-mT2-mDif2; 589 592 G4double e=ds/dmT; 590 G4double P=std::sqrt(e*e-mDif2); // Momentum in pseudo laboratory system593 G4double P=std::sqrt(e*e-mDif2); // Momentum in pseudo laboratory system 591 594 G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer(); 592 595 #ifdef debug … … 632 635 else if(cost<-1.) cost=-1.; 633 636 else 634 {637 { 635 638 G4cerr<<"G4QDiffRat::ProjFragm: *NAN* cost="<<cost<<",t="<<t<<",tmax="<<maxt<<G4endl; 636 639 return ResHV; // Do Nothing Action … … 647 650 } 648 651 #ifdef debug 649 G4cout<<"G4QDiffR::ProjFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl;652 G4cout<<"G4QDiffR::ProjFragm:d4M="<<d4M<<"+r4M="<<r4M<<"="<<d4M+r4M<<"="<<tot4M<<G4endl; 650 653 #endif 651 654 // Now everything is ready for fragmentation and DoNothing projHadron must be wiped out … … 655 658 ResHV->push_back(hadron); // Fill the recoil nucleus 656 659 #ifdef debug 657 G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleus="<<t4M<<tPDG<<G4endl;660 G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleus="<<t4M<<tPDG<<G4endl; 658 661 #endif 659 662 hadron = new G4QHadron(rPDG,r4M); // Hadron for the recoil nucleon 660 663 ResHV->push_back(hadron); // Fill the recoil nucleon 661 664 #ifdef debug 662 G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleon="<<r4M<<rPDG<<G4endl;665 G4cout<<"G4QDiffractionRatio::ProjFragment: *Filled* RecNucleon="<<r4M<<rPDG<<G4endl; 663 666 #endif 664 667 G4LorentzVector sum4M(0.,0.,0.,0.); … … 668 671 G4Quasmon* pan= new G4Quasmon(dQC,d4M); // --->---->---->----->-----> DELETED -->---* 669 672 try // | 670 { // |673 { // | 671 674 G4QNucleus vac(90000000); // | 672 675 leadhs=pan->Fragment(vac,1); // DELETED after it is copied to ResHV vector -->---+-* 673 676 } // | | 674 677 catch (G4QException& error) // | | 675 { // | |678 { // | | 676 679 G4cerr<<"***G4QDiffractionRatio::ProjFragment: G4Quasmon Exception"<<G4endl; //| | 677 680 G4Exception("G4QDiffractionRatio::ProjFragment","72",FatalException,"*Quasmon");//| | … … 789 792 } 790 793 else //(2) n*N+m*(Pi-) (nL=0) | 791 {794 { 792 795 sPDG = -211; 793 796 qPN = -nC; … … 839 842 nB = nC; 840 843 fMass= mProt; 841 }844 } 842 845 else if(nL && nC<nB-nL) //(3)n*L+m*P+k*N ***Should not be here*** | 843 846 { … … 1005 1008 #ifdef fdebug 1006 1009 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1007 G4cout<<"G4QDR::ProjFrag: *additional Nucleon*="<<f4Mom<<fPDG<<G4endl; // |1010 G4cout<<"G4QDR::ProjFrag: *additional Nucleon*="<<f4Mom<<fPDG<<G4endl; // | 1008 1011 #endif 1009 1012 } … … 1026 1029 #ifdef fdebug 1027 1030 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1028 G4cout<<"G4QDR::ProjFragm: *additional Pion*="<<f4Mom<<fPDG<<G4endl; // |1031 G4cout<<"G4QDR::ProjFragm: *additional Pion*="<<f4Mom<<fPDG<<G4endl; // | 1029 1032 #endif 1030 1033 } … … 1047 1050 #ifdef fdebug 1048 1051 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1049 G4cout<<"G4QDR::ProjFragm: *additional Hyperon*="<<f4Mom<<fPDG<<G4endl; // |1052 G4cout<<"G4QDR::ProjFragm: *additional Hyperon*="<<f4Mom<<fPDG<<G4endl; // | 1050 1053 #endif 1051 1054 } 1052 1055 } 1053 1056 } // --> End of decay | 1054 } // -> End of Iso-nuclear treatment |1057 } // -> End of Iso-nuclear treatment | 1055 1058 else if( (nL > 0 && nB > 1) || (nL < 0 && nB < -1) ) 1056 1059 { // Hypernucleus is found | … … 1067 1070 G4int nSP=0; // A#0f unavoidable Sigma+ | 1068 1071 if(nC<0) // Negative hypernucleus | 1069 {1072 { 1070 1073 if(-nC<=nL) // Partial compensation by Sigma- | 1071 {1074 { 1072 1075 nSM=-nC; // Can be compensated by Sigma- | 1073 1076 nL+=nC; // Reduce the residual strangeness | 1074 1077 } 1075 1078 else // All Charge is compensated by Sigma- | 1076 {1079 { 1077 1080 nSM=nL; // The maximum number of Sigma- | 1078 1081 nL=0; // Kill the residual strangeness | … … 1080 1083 } 1081 1084 else if(nC>nB-nL) // Extra positive hypernucleus | 1082 {1085 { 1083 1086 if(nC<=nB) // Partial compensation by Sigma+ | 1084 {1087 { 1085 1088 G4int dH=nB-nC; // Isotopic shift | 1086 1089 nSP=nL-dH; // Can be compensated by Sigma+ | … … 1088 1091 } 1089 1092 else // All Charge is compensated by Sigma+ | 1090 {1093 { 1091 1094 nSP=nL; // The maximum number of Sigma+ | 1092 1095 nL=0; // Kill the residual strangeness | … … 1105 1108 #endif 1106 1109 if(nSP||nSM) // Sigma+/- improvement | 1107 {1110 { 1108 1111 if(nL) // By mistake Lambda improvement is found | 1109 1112 { … … 1115 1118 } 1116 1119 if(nSP) // Sibma+ should be decayed | 1117 {1120 { 1118 1121 nL=nSP; // #of decaying hyperons | 1119 1122 sPDG=3222; // PDG code of decaying hyperons | … … 1121 1124 } 1122 1125 else // Sibma+ should be decayed | 1123 {1126 { 1124 1127 nL=nSM; // #of decaying hyperons | 1125 1128 sPDG=3112; // PDG code of decaying hyperons | … … 1133 1136 G4double rlM=G4QNucleus(rlPDG).GetMZNS();// Mass of the NonstrangeNucleus | 1134 1137 if(!nSP&&!nSM&&nL==1&&reM>rlM+mSigZ&&G4UniformRand()>.5) // Conv Lambda->Sigma0 | 1135 {1138 { 1136 1139 sPDG=3212; // PDG code of a decaying hyperon | 1137 1140 MLa=mSigZ; // Mass of the decaying hyperon | … … 1142 1145 // @@ In future take into account Iso-Hypernucleus (Add PI+,R & Pi-,R decays) | 1143 1146 if(rlPDG==90000000) // Multy Hyperon (HyperNuc of only hyperons) | 1144 {1147 { 1145 1148 if(nL>1) r4M=r4M/nL; // split the 4-mom for the MultyLambda | 1146 1149 for(G4int il=0; il<nL; il++) // loop over Lambdas | … … 1151 1154 #ifdef fdebug 1152 1155 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1153 G4cout<<"G4QDR::ProjFrag: *additional Lambda*="<<r4M<<sPDG<<G4endl; // |1154 #endif 1155 } 1156 } 1157 else if(reM>rlM+MLa-eps) // Lambda (or Sigma) can be split |1158 {1156 G4cout<<"G4QDR::ProjFrag: *additional Lambda*="<<r4M<<sPDG<<G4endl; // | 1157 #endif 1158 } 1159 } 1160 else if(reM>rlM+MLa-eps) // Lambda (or Sigma) can be split | 1161 { 1159 1162 G4LorentzVector n4M(0.,0.,0.,rlM); // 4-mom of the residual nucleus | 1160 1163 G4LorentzVector h4M(0.,0.,0.,MLa); // 4-mom of the Hyperon | 1161 1164 G4double sum=rlM+MLa; // Safety sum | 1162 if(std::fabs(reM-sum)<eps) // At rest in CMS |1163 {1165 if(std::fabs(reM-sum)<eps) // At rest in CMS | 1166 { 1164 1167 n4M=r4M*(rlM/sum); // Split tot 4-mom for resNuc | 1165 1168 h4M=r4M*(MLa/sum); // Split tot 4-mom for Hyperon | … … 1178 1181 loh->SetQPDG(G4QPDGCode(rlPDG)); // ConvertedHypernucleus to nonstrange(@anti)| 1179 1182 if(rlPDG==90000002) // Additional action with loH changed to 2n | 1180 {1183 { 1181 1184 G4LorentzVector newLV=n4M/2.; // Split 4-momentum | 1182 1185 loh->Set4Momentum(newLV); // Reupdate the hadron | … … 1187 1190 #ifdef fdebug 1188 1191 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1189 G4cout<<"G4QDR::ProgFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; // |1192 G4cout<<"G4QDR::ProgFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; // | 1190 1193 #endif 1191 1194 } 1192 1195 else if(rlPDG==90002000) // Additional action with loH change to 2p | 1193 {1196 { 1194 1197 G4LorentzVector newLV=n4M/2.; // Split 4-momentum | 1195 1198 loh->Set4Momentum(newLV); // Reupdate the hadron | … … 1200 1203 #ifdef fdebug 1201 1204 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1202 G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; // |1205 G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; // | 1203 1206 #endif 1204 1207 } … … 1215 1218 #ifdef fdebug 1216 1219 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1217 G4cout<<"G4QDR::ProjFrag: *additional Hyperon*="<<r4M<<sPDG<<G4endl; // |1218 #endif 1219 } 1220 } 1221 else if(reM>rnM+mPi0-eps&&!nSP&&!nSM)// Lambda->N only if Sigmas are absent |1222 {1220 G4cout<<"G4QDR::ProjFrag: *additional Hyperon*="<<r4M<<sPDG<<G4endl; // | 1221 #endif 1222 } 1223 } 1224 else if(reM>rnM+mPi0-eps&&!nSP&&!nSM)// Lambda->N only if Sigmas are absent | 1225 { 1223 1226 G4int nPi=static_cast<G4int>((reM-rnM)/mPi0); // Calc. pion multiplicity | 1224 1227 if (nPi>nL) nPi=nL; // Cut the pion multiplicity | … … 1227 1230 G4LorentzVector h4M(0.,0.,0.,npiM);// 4-momentum of pions | 1228 1231 G4double sum=rnM+npiM; // Safety sum | 1229 if(std::fabs(reM-sum)<eps) // At rest |1230 {1232 if(std::fabs(reM-sum)<eps) // At rest | 1233 { 1231 1234 n4M=r4M*(rnM/sum); // The residual nucleus part | 1232 1235 h4M=r4M*(npiM/sum); // The pion part | … … 1251 1254 #ifdef fdebug 1252 1255 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1253 G4cout<<"G4QDR::ProjFrag: *additional Pion*="<<r4M<<sPDG<<G4endl; // |1256 G4cout<<"G4QDR::ProjFrag: *additional Pion*="<<r4M<<sPDG<<G4endl; // | 1254 1257 #endif 1255 1258 } 1256 1259 if(rnPDG==90000002) // Additional action with loH change to 2n | 1257 {1260 { 1258 1261 G4LorentzVector newLV=n4M/2.; // Split 4-momentum | 1259 1262 loh->Set4Momentum(newLV); // Reupdate the hadron | … … 1264 1267 #ifdef fdebug 1265 1268 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1266 G4cout<<"G4QDR::ProjFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; // |1269 G4cout<<"G4QDR::ProjFrag: *additional Neutron*="<<r4M<<sPDG<<G4endl; // | 1267 1270 #endif 1268 1271 } 1269 1272 else if(rnPDG==90002000) // Additional action with loH change to 2p | 1270 {1273 { 1271 1274 G4LorentzVector newLV=n4M/2.; // Split 4-momentum | 1272 1275 loh->Set4Momentum(newLV); // Reupdate the hadron | … … 1277 1280 #ifdef fdebug 1278 1281 sum4M+=r4M; // Sum 4-momenta for the EnMom check | 1279 G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; // |1282 G4cout<<"G4QDR::ProjFrag: *additional Proton*="<<r4M<<sPDG<<G4endl; // | 1280 1283 #endif 1281 1284 } … … 1283 1286 } 1284 1287 else // If this Excepton shows up (lowProbable appearance) => include gamma decay | 1285 {1288 { 1286 1289 G4double d=rlM+MLa-reM; // Hyperon Excessive energy | 1287 G4cerr<<"G4QDR::PF:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl;1290 G4cerr<<"G4QDR::PF:R="<<rlM<<",S+="<<nSP<<",S-="<<nSM<<",L="<<nL<<",d="<<d<<G4endl; 1288 1291 d=rnM+mPi0-reM; // Pion Excessive energy | 1289 G4cerr<<"G4QDR::PF:"<<oPDG<<","<<hPDG<<",M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl;1292 G4cerr<<"G4QDR::PF:"<<oPDG<<","<<hPDG<<",M="<<reM<<"<"<<rnM+mPi0<<",d="<<d<<G4endl; 1290 1293 throw G4QException("G4QDiffractionRatio::ProjFragment: Hypernuclear conver");// | 1291 1294 } 1292 } // => End of G4 Hypernuclear decay |1295 } // => End of G4 Hypernuclear decay | 1293 1296 ResHV->push_back(loh); // Fill in the result | 1294 1297 #ifdef debug 1295 1298 sum4M+=loh->Get4Momentum(); // Sum 4-momenta for the EnMom check | 1296 G4cout<<"G4QDR::PrFra:#"<<iq<<","<<loh->Get4Momentum()<<loh->GetPDGCode()<<G4endl;//|1299 G4cout<<"G4QDR::PrFra:#"<<iq<<","<<loh->Get4Momentum()<<loh->GetPDGCode()<<G4endl;//| 1297 1300 #endif 1298 1301 } // | 1299 1302 delete leadhs; // <----<----<----<----<----<----<----<----<----<----<----<----<----<--* 1300 1303 #ifdef debug 1301 G4cout<<"G4QDiffractionRatio::ProjFragment: *End* Sum="<<sum4M<<" =?= d4M="<<d4M<<G4endl;1302 #endif 1303 return ResHV; // Result1304 G4cout<<"G4QDiffractionRatio::ProjFragment: *End* Sum="<<sum4M<<" =?= d4M="<<d4M<<G4endl; 1305 #endif 1306 return ResHV; // Result 1304 1307 } // End of ProjFragment 1305 1308 … … 1312 1315 <<pPDG<<G4endl; 1313 1316 G4double A=Z+N; // A of the target 1314 //return 4.5*std::pow(A,.364)*millibarn; // Result1317 //return 4.5*std::pow(A,.364)*millibarn; // Result 1315 1318 return 3.7*std::pow(A,.364)*millibarn; // Result after mpi0 correction 1316 1319 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QDiscProcessMixer.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QDiscProcessMixer.cc,v 1. 4 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QDiscProcessMixer.cc,v 1.8 2009/04/22 12:26:13 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 // ---------------- G4QDiscProcessMixer class ----------------- 29 // ---------------- G4QDiscProcessMixer class ------------------- 30 30 // by Mikhail Kossov, Aug 2007. 31 31 // G4QDiscProcessMixer class of the CHIPS Simulation Branch in GEANT4 32 // --------------------------------------------------------------- 33 // ****************************************************************************************34 // ********** This CLASS is temporary moved from the "chips/interface" directory *********35 // ****************************************************************************************32 // ------------------------------------------------------------------------ 33 // Short description: universal mixer of processes (NOT models as in GHAD!) 34 // depending on the application energy region (defined by users). 35 // ------------------------------------------------------------------------ 36 36 37 37 //#define debug … … 54 54 G4QDiscProcessMixer::~G4QDiscProcessMixer() 55 55 { 56 for_each(theDPVector.begin(), theDPVector.end(), DeleteDiscreteProcess()); 56 // Now the responsibility of deleting is deligated to the user, who created them 57 //for_each(theDPVector.begin(), theDPVector.end(), DeleteDiscreteProcess()); 57 58 } 58 59 59 60 void G4QDiscProcessMixer::AddDiscreteProcess(G4VDiscreteProcess* DP, G4double ME) 60 61 { 61 if(ME>theDPVector[theDPVector.size()-1]->second) 62 static const G4double maxEn = 1.E8*megaelectronvolt; // Conditional INF 63 if(!theDPVector.size()) // The first process in the DiscreteProcessVector (MaxE=INF) 62 64 { 63 65 std::pair<G4VDiscreteProcess*, G4double>* QDiscProc = 64 new std::pair<G4VDiscreteProcess*, G4double>(DP, ME);66 new std::pair<G4VDiscreteProcess*, G4double>(DP, maxEn); 65 67 theDPVector.push_back( QDiscProc ); 66 68 } 67 else // Wrong Max Energy Order for the new process in the sequence of processes69 else 68 70 { 69 G4cerr<<"G4QDiscProcessMixer::AddDiscreteProcess:LastMaxE("<<theDPVector.size()-1<<")=" 70 <<theDPVector[theDPVector.size()-1]->second<<" >= MaxE="<<ME<<G4endl; 71 G4Exception("G4QDiscProcessMixer::AddDiscreteProcess: Wrong Max Energy Order"); 71 if(ME<theDPVector[theDPVector.size()-1]->second) 72 { 73 std::pair<G4VDiscreteProcess*, G4double>* QDiscProc = 74 new std::pair<G4VDiscreteProcess*, G4double>(DP, ME); 75 theDPVector.push_back( QDiscProc ); 76 } 77 else // Wrong Max Energy Order for the new process in the sequence of processes 78 { 79 G4cerr<<"G4QDiscProcessMixer::AddDiscreteProcess:LastMaxE("<<theDPVector.size()-1 80 <<")="<<theDPVector[theDPVector.size()-1]->second<<" <= MaxE="<<ME<<G4endl; 81 G4Exception("G4QDiscProcessMixer::AddDiscreteProcess: Wrong Max Energy Order"); 82 } 72 83 } 73 84 } … … 80 91 81 92 G4double G4QDiscProcessMixer::PostStepGetPhysicalInteractionLength(const G4Track& Track, 82 G4doublePrevStSize,83 G4ForceCondition* F)93 G4double PrevStSize, 94 G4ForceCondition* F) 84 95 { 85 96 G4double kEn=Track.GetDynamicParticle()->GetKineticEnergy(); // Projectile kinetic energy 86 97 G4int maxDP=theDPVector.size(); 87 if(maxDP) for(G4int i= 0; i<maxDP; ++i) if(kEn < theDPVector[i]->second)98 if(maxDP) for(G4int i=maxDP-1; i>-1; i--) if(kEn < theDPVector[i]->second) 88 99 return theDPVector[i]->first->PostStepGetPhysicalInteractionLength(Track,PrevStSize,F); 100 return DBL_MAX; 101 } 102 103 // A fake class for compilation only 104 G4double G4QDiscProcessMixer::GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*) 105 { 89 106 return DBL_MAX; 90 107 } … … 95 112 G4double kEn=Track.GetDynamicParticle()->GetKineticEnergy(); // Projectile kinetic energy 96 113 G4int maxDP=theDPVector.size(); 97 if(maxDP) for(G4int i= 0; i<maxDP; ++i) if(kEn < theDPVector[i]->second)114 if(maxDP) for(G4int i=maxDP-1; i>-1; i--) if(kEn < theDPVector[i]->second) 98 115 { 99 116 //EnMomConservation= theDPVector[i]->first->GetEnegryMomentumConservation(); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElastic.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QElastic.cc,v 1.2 7 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QElastic.cc,v 1.28 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QElastic class ----------------- 30 30 // by Mikhail Kossov, December 2003. 31 31 // G4QElastic class of the CHIPS Simulation Branch in GEANT4 32 // --------------------------------------------------------------- 33 // **************************************************************************************** 34 // ********** This CLASS is temporary moved from the photolepton_hadron directory ********* 35 // **************************************************************************************** 32 // -------------------------------------------------------------------- 33 // Short description: At present this is a process for nucleon-nucleus 34 // elastic scattering. Mesons and hyperons exist only for the Hydrogen 35 // target (see G4QuasiFreeRatios). 36 // -------------------------------------------------------------------- 36 37 37 38 //#define debug … … 145 146 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 146 147 G4double abund=abuVector[j]; 147 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);148 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 148 149 #ifdef debug 149 150 G4cout<<"G4QElastic::GetMeanFreePath:pair#="<<j<<",N="<<N<<",ab="<<abund<<G4endl; 150 151 #endif 151 152 newAbund->push_back(pr); 152 }153 } 153 154 #ifdef debug 154 155 G4cout<<"G4QElastic::GetMeanFreePath: pairVectorLength="<<newAbund->size()<<G4endl; … … 177 178 G4cout<<"G4QEl::GMFP:*true*,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl; 178 179 #endif 179 G4bool ccsf=true;180 G4bool ccsf=true; 180 181 if(Q==-27.) ccsf=false; 181 182 #ifdef debug … … 244 245 G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step& step) 245 246 { 246 //static const G4double mProt=G4Proton::Proton()->GetPDGMass()*GeV; // proton mass (in GeV)247 //static const G4double mProt= G4QPDGCode(2212).GetMass()*.001; // CHIPSin GeV248 //static const G4double mP2=mProt*mProt; // squared proton mass247 //static const G4double mProt=G4Proton::Proton()->GetPDGMass()*GeV;// proton mass in GeV 248 //static const G4double mProt= G4QPDGCode(2212).GetMass()*.001; // CHIPS m_p in GeV 249 //static const G4double mP2=mProt*mProt; // squared proton mass 249 250 // 250 251 //------------------------------------------------------------------------------------- 251 252 static G4bool CWinit = true; // CHIPS Warld needs to be initted 252 253 if(CWinit) 253 {254 { 254 255 CWinit=false; 255 256 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 326 327 #ifdef debug 327 328 G4int prPDG=particle->GetPDGEncoding(); 328 G4cout<<"G4QElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;329 G4cout<<"G4QElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 329 330 #endif 330 331 if(!projPDG) … … 335 336 G4int EPIM=ElProbInMat.size(); 336 337 #ifdef debug 337 G4cout<<"G4QElastic::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;338 G4cout<<"G4QElastic::PostStDoIt:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 338 339 #endif 339 340 G4int i=0; … … 342 343 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 343 344 for(i=0; i<nE; ++i) 344 {345 #ifdef debug 346 G4cout<<"G4QElastic::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;345 { 346 #ifdef debug 347 G4cout<<"G4QElastic::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl; 347 348 #endif 348 349 if (rnd<ElProbInMat[i]) break; … … 353 354 Z=static_cast<G4int>(pElement->GetZ()); 354 355 #ifdef debug 355 G4cout<<"G4QElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;356 G4cout<<"G4QElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 356 357 #endif 357 358 if(Z<=0) … … 364 365 G4int nofIsot=SPI->size(); // #of isotopes in the element i 365 366 #ifdef debug 366 G4cout<<"G4QElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;367 G4cout<<"G4QElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl; 367 368 #endif 368 369 G4int j=0; … … 373 374 { 374 375 #ifdef debug 375 G4cout<<"G4QElastic::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;376 G4cout<<"G4QElastic::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl; 376 377 #endif 377 378 if(rndI < (*SPI)[j]) break; … … 381 382 G4int N =(*IsN)[j]; ; // Randomized number of neutrons 382 383 #ifdef debug 383 G4cout<<"G4QElastic::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl;384 G4cout<<"G4QElastic::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<", MeV="<<MeV<<G4endl; 384 385 #endif 385 386 if(N<0) … … 507 508 EnMomConservation-=scat4M; // It must be initialized by (pE+tM,pP) 508 509 // This is how in general the secondary should be identified 509 G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron510 G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 510 511 //G4int targPDG=2212; // PDG for the recoil proton @@only for p targ 511 512 //G4ParticleDefinition* theDefinition=G4Proton::Proton(); // @@ only for p target 512 513 G4int aA = Z+N; 513 514 #ifdef pdebug 514 G4cout<<"G4QElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;515 G4cout<<"G4QElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl; 515 516 #endif 516 517 G4ParticleDefinition* theDefinition=G4ParticleTable::GetParticleTable() … … 570 571 { 571 572 if(oxs) res=CSmanager->GetHMaxT(); // Calculate the max_t value 572 else res=CSmanager->GetExchangeT(Z, N, pPDG); // functionally randomized -t in MeV^2573 else res=CSmanager->GetExchangeT(Z, N, pPDG); // functionally randomized -t in MeV^2 573 574 } 574 575 else G4cout<<"*Warning*G4QElastic::CalculateXSt:*NotInitiatedScattering"<<G4endl; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElasticCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QElasticCrossSection.cc,v 1.3 6 2008/03/21 21:42:44 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QElasticCrossSection.cc,v 1.37 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 34 34 // 35 35 //================================================================================ 36 // Short description: Interaction cross-sections for the G4QElastic process 37 // ------------------------------------------------------------------------------- 36 38 37 39 //#define debug … … 50 52 G4double G4QElasticCrossSection::lPMax= 8.; // Max tabulated logarithmic Momentum (D) 51 53 G4double G4QElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;// Log step in the table (D) 52 G4bool G4QElasticCrossSection::onlyCS=true;// Flag to calculate only CS (not Si/Bi) (L)53 G4double G4QElasticCrossSection::lastSIG=0.; // Last calculated cross section (L)54 G4bool G4QElasticCrossSection::onlyCS=true;// Flag to calculate only CS (not Si/Bi) (L) 55 G4double G4QElasticCrossSection::lastSIG=0.; // Last calculated cross section (L) 54 56 G4double G4QElasticCrossSection::lastLP=-10.;// Last log(mom_of_the_incident_hadron) (L) 55 57 G4double G4QElasticCrossSection::lastTM=0.; // Last t_maximum (L) … … 63 65 G4double G4QElasticCrossSection::theS4=0.; // The Last mantissa of 4-th difruction (L) 64 66 G4double G4QElasticCrossSection::theB4=0.; // The Last slope of 4-th difruction (L) 65 G4int G4QElasticCrossSection::lastTZ=0; // Last atomic number of the target 67 G4int G4QElasticCrossSection::lastTZ=0; // Last atomic number of the target 66 68 G4int G4QElasticCrossSection::lastTN=0; // Last number of neutrons of the target 67 69 G4double G4QElasticCrossSection::lastPIN=0.; // Last initialized max momentum 68 G4double* G4QElasticCrossSection::lastCST=0; // Elastic cross-section table 69 G4double* G4QElasticCrossSection::lastPAR=0; // Parameters for functional calculation 70 G4double* G4QElasticCrossSection::lastSST=0; // E-dep of sq.slope of the first difruction 71 G4double* G4QElasticCrossSection::lastS1T=0; // E-dep of mantissa of the first difruction 70 G4double* G4QElasticCrossSection::lastCST=0; // Elastic cross-section table 71 G4double* G4QElasticCrossSection::lastPAR=0; // Parameters for functional calculation 72 G4double* G4QElasticCrossSection::lastSST=0; // E-dep of sq.slope of the first difruction 73 G4double* G4QElasticCrossSection::lastS1T=0; // E-dep of mantissa of the first difruction 72 74 G4double* G4QElasticCrossSection::lastB1T=0; // E-dep of the slope of the first difruction 73 75 G4double* G4QElasticCrossSection::lastS2T=0; // E-dep of mantissa of the second difruction 74 76 G4double* G4QElasticCrossSection::lastB2T=0; // E-dep of the slope of theSecond difruction 75 G4double* G4QElasticCrossSection::lastS3T=0; // E-dep of mantissa of the third difruction 77 G4double* G4QElasticCrossSection::lastS3T=0; // E-dep of mantissa of the third difruction 76 78 G4double* G4QElasticCrossSection::lastB3T=0; // E-dep of the slope of the third difruction 77 G4double* G4QElasticCrossSection::lastS4T=0; // E-dep of mantissa of the 4-th difruction 79 G4double* G4QElasticCrossSection::lastS4T=0; // E-dep of mantissa of the 4-th difruction 78 80 G4double* G4QElasticCrossSection::lastB4T=0; // E-dep of the slope of the 4-th difruction 79 81 G4int G4QElasticCrossSection::lastPDG=0; // The last PDG code of the projectile … … 159 161 // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---*** 160 162 if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic 161 {163 { 162 164 tgZ=1; 163 165 tgN=1; … … 171 173 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 172 174 <<colN.size()<<G4endl; 173 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST175 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 174 176 #endif 175 177 if(!pPDG) … … 183 185 G4bool in=false; // By default the isotope must be found in the AMDB 184 186 //GF the block will update parameters, needed for quasi-eleastic 185 //GF if(tgN!=lastN || tgZ!=lastZ || pPDG!=lastPDG)// The nucleus was not the last used isotope187 //GF if(tgN!=lastN || tgZ!=lastZ || pPDG!=lastPDG)// The nucleus isn't the LastUsedIsotope 186 188 { 187 189 in = false; // By default the isotope haven't be found in AMDB … … 192 194 lastI = colN.size(); // Size of the Associative Memory DB in the heap 193 195 if(lastI) for(G4int i=0; i<lastI; i++) // Loop over proj/tgZ/tgN lines of DB 194 { // The nucleus with projPDG is found in AMDB196 { // The nucleus with projPDG is found in AMDB 195 197 if(colPDG[i]==pPDG && colN[i]==tgN && colZ[i]==tgZ) 196 {198 { 197 199 lastI=i; 198 200 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 211 213 lastP =colP [i]; // Last Momentum (A-dependent) 212 214 lastCS =colCS[i]; // Last CrossSect (A-dependent) 213 //if(std::fabs(lastP/pMom-1.)<tolerance) //VI (do not use tolerance)215 // if(std::fabs(lastP/pMom-1.)<tolerance) //VI (do not use tolerance) 214 216 if(lastP == pMom) // V.Ivanchenko safe solution 215 217 { … … 244 246 //CalculateCrossSection(fCS,-27,i,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 245 247 #endif 246 }247 if(!in) // This nucleus has not been calculated previously248 {248 } 249 if(!in) // This nucleus has not been calculated previously 250 { 249 251 #ifdef pdebug 250 252 G4cout<<"G4QElCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 253 255 lastCS=CalculateCrossSection(fCS,0,lastI,lastPDG,lastZ,lastN,pMom);//calculate&create 254 256 if(lastCS<=0.) 255 {257 { 256 258 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 257 259 #ifdef pdebug … … 265 267 lastTH=pEn; 266 268 } 267 }269 } 268 270 #ifdef pdebug 269 271 G4cout<<"G4QElCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 281 283 #endif 282 284 return lastCS*millibarn; 283 } // End of creation of the new set of parameters285 } // End of creation of the new set of parameters 284 286 else 285 {287 { 286 288 #ifdef pdebug 287 289 G4cout<<"G4QElCS::GetCS: Update lastI="<<lastI<<G4endl; … … 293 295 } // End of parameters udate 294 296 295 // GF296 // else if(pEn<=lastTH)297 // {298 // #ifdef pdebug299 // G4cout<<"G4QElCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;300 // //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST301 // #endif302 // return 0.; // Momentum is below the Threshold Value -> CS=0303 // }304 // // else if(std::fabs(lastP/pMom-1.)<tolerance)305 // else if(lastP == pMom) // V.Ivanchenko safe solution306 // {307 // #ifdef pdebug308 // G4cout<<"G4QElCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<", CS="<<lastCS*millibarn<<G4endl;309 // //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST310 // G4cout<<"G4QElCS::GetCrSec:***SAME***, onlyCS="<<onlyCS<<G4endl;311 // #endif312 // return lastCS*millibarn; // Use theLastCS313 // }314 // else315 // {316 // #ifdef pdebug317 // G4cout<<"G4QElCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;318 // #endif319 // lastCS=CalculateCrossSection(fCS,1,lastI,lastPDG,lastZ,lastN,pMom); // Only UpdateDB320 // lastP=pMom;321 // }322 // GF297 //GF 298 // else if(pEn<=lastTH) 299 // { 300 //#ifdef pdebug 301 // G4cout<<"G4QElCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl; 302 // //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 303 //#endif 304 // return 0.; // Momentum is below the Threshold Value -> CS=0 305 // } 306 // // else if(std::fabs(lastP/pMom-1.)<tolerance) 307 // else if(lastP == pMom) // V.Ivanchenko safe solution 308 // { 309 //#ifdef pdebug 310 // G4cout<<"G4QElCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<", CS="<<lastCS*millibarn<<G4endl; 311 // //CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 312 // G4cout<<"G4QElCS::GetCrSec:***SAME***, onlyCS="<<onlyCS<<G4endl; 313 //#endif 314 // return lastCS*millibarn; // Use theLastCS 315 // } 316 // else 317 // { 318 //#ifdef pdebug 319 // G4cout<<"G4QElCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl; 320 //#endif 321 // lastCS=CalculateCrossSection(fCS,1,lastI,lastPDG,lastZ,lastN,pMom); // Only UpdateDB 322 // lastP=pMom; 323 // } 324 //GF 323 325 324 326 #ifdef pdebug … … 339 341 // *** End of Static Definitions (Associative Memory Data Base) *** 340 342 if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic 341 {343 { 342 344 tgZ=1; 343 345 tgN=1; … … 352 354 lastLP=std::log(pMom); // Make a logarithm of the momentum for calculation 353 355 if(F) // This isotope was found in AMDB =>RETRIEVE/UPDATE 354 {356 { 355 357 if(F<0) // the AMDB must be loded 356 358 { … … 378 380 lastPIN=GetPTables(lastLP,lastPIN,PDG,tgZ,tgN);// Can update upper logP-Limit in tabs 379 381 #ifdef pdebug 380 G4cout<<"G4QElCS::CalcCS:*updated(I)*,LP="<<lastLP<<"<IN["<<I<<"]="<<lastPIN<<G4endl;382 G4cout<<"G4QElCS::CalcCS:*updated(I)*,LP="<<lastLP<<"<IN["<<I<<"]="<<lastPIN<<G4endl; 381 383 #endif 382 384 PIN[I]=lastPIN; // Remember the new P-Limit of the tables 383 385 } 384 }385 else // This isotope wasn't initialized => CREATE386 {386 } 387 else // This isotope wasn't initialized => CREATE 388 { 387 389 lastPAR = new G4double[nPoints]; // Allocate memory for parameters of CS function 388 390 lastPAR[nLast]=0; // Initialization for VALGRIND 389 lastCST = new G4double[nPoints]; // Allocate memory for Tabulated CS function 390 lastSST = new G4double[nPoints]; // Allocate memory for Tabulated first sqaredSlope 391 lastS1T = new G4double[nPoints]; // Allocate memory for Tabulated first mantissa 392 lastB1T = new G4double[nPoints]; // Allocate memory for Tabulated first slope 391 lastCST = new G4double[nPoints]; // Allocate memory for Tabulated CS function 392 lastSST = new G4double[nPoints]; // Allocate memory for Tabulated first sqaredSlope 393 lastS1T = new G4double[nPoints]; // Allocate memory for Tabulated first mantissa 394 lastB1T = new G4double[nPoints]; // Allocate memory for Tabulated first slope 393 395 lastS2T = new G4double[nPoints]; // Allocate memory for Tabulated second mantissa 394 lastB2T = new G4double[nPoints]; // Allocate memory for Tabulated second slope 395 lastS3T = new G4double[nPoints]; // Allocate memory for Tabulated third mantissa 396 lastB2T = new G4double[nPoints]; // Allocate memory for Tabulated second slope 397 lastS3T = new G4double[nPoints]; // Allocate memory for Tabulated third mantissa 396 398 lastB3T = new G4double[nPoints]; // Allocate memory for Tabulated third slope 397 lastS4T = new G4double[nPoints]; // Allocate memory for Tabulated 4-th mantissa 399 lastS4T = new G4double[nPoints]; // Allocate memory for Tabulated 4-th mantissa 398 400 lastB4T = new G4double[nPoints]; // Allocate memory for Tabulated 4-th slope 399 401 #ifdef pdebug … … 406 408 PIN.push_back(lastPIN); // Fill parameters of CS function to AMDB 407 409 PAR.push_back(lastPAR); // Fill parameters of CS function to AMDB 408 CST.push_back(lastCST); // Fill Tabulated CS function to AMDB 409 SST.push_back(lastSST); // Fill Tabulated first sq.slope to AMDB 410 S1T.push_back(lastS1T); // Fill Tabulated first mantissa to AMDB 410 CST.push_back(lastCST); // Fill Tabulated CS function to AMDB 411 SST.push_back(lastSST); // Fill Tabulated first sq.slope to AMDB 412 S1T.push_back(lastS1T); // Fill Tabulated first mantissa to AMDB 411 413 B1T.push_back(lastB1T); // Fill Tabulated first slope to AMDB 412 S2T.push_back(lastS2T); // Fill Tabulated second mantissa to AMDB 414 S2T.push_back(lastS2T); // Fill Tabulated second mantissa to AMDB 413 415 B2T.push_back(lastB2T); // Fill Tabulated second slope to AMDB 414 S3T.push_back(lastS3T); // Fill Tabulated third mantissa to AMDB 416 S3T.push_back(lastS3T); // Fill Tabulated third mantissa to AMDB 415 417 B3T.push_back(lastB3T); // Fill Tabulated third slope to AMDB 416 S4T.push_back(lastS4T); // Fill Tabulated 4-th mantissa to AMDB 418 S4T.push_back(lastS4T); // Fill Tabulated 4-th mantissa to AMDB 417 419 B4T.push_back(lastB4T); // Fill Tabulated 4-th slope to AMDB 418 } // End of creation/update of the new set of parameters and tables420 } // End of creation/update of the new set of parameters and tables 419 421 // ============= NOW Update (if necessary) and Calculate the Cross Section =========== 420 422 #ifdef pdebug … … 459 461 G4cout<<"G4QElasticCrossSection::CalculateCS:(E) S1="<<theS1<<", B1="<<theB1<<G4endl; 460 462 #endif 461 }463 } 462 464 else 463 465 { … … 540 542 // -0- -1--2- -3- -4- -5- -6- -7- -8- -9- -10--11--12--13- 541 543 if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic 542 {544 { 543 545 tgZ=1; 544 546 tgN=1; … … 550 552 // --- Total np elastic cross section cs & s1/b1 (t), s2/b2 (u) --- NotTuned for highE 551 553 //p2=p*p;p3=p2*p;sp=sqrt(p);p2s=p2*sp;lp=log(p);dl1=lp-(5.=par(3));p4=p2*p2; p=|3-mom| 552 //CS=12./(p2s+.05*p+.0001/sqrt(sp))+.35/p+(6.75+.14*dl1*dl1+19./p)/(1.+.6/p4);554 //CS=12./(p2s+.05*p+.0001/sqrt(sp))+.35/p+(6.75+.14*dl1*dl1+19./p)/(1.+.6/p4); 553 555 // par(0) par(1) par(2) par(4) par(5) par(6) par(7) par(8) 554 556 //s1=(6.75+.14*dl2*dl2+13./p)/(1.+.14/p4)+.6/(p4+.00013), s2=(75.+.001/p4/p)/p3 … … 559 561 // -- Total pp elastic cross section cs & s1/b1 (main), s2/b2 (tail1), s3/b3 (tail2) -- 560 562 //p2=p*p;p3=p2*p;sp=sqrt(p);p2s=p2*sp;lp=log(p);dl1=lp-(3.=par(3));p4=p2*p2; p=|3-mom| 561 //CS=2.865/p2s/(1+.0022/p2s)+(18.9+.6461*dl1*dl1+9./p)/(1.+.425*lp)/(1.+.4276/p4);563 //CS=2.865/p2s/(1+.0022/p2s)+(18.9+.6461*dl1*dl1+9./p)/(1.+.425*lp)/(1.+.4276/p4); 562 564 // par(0) par(7) par(1) par(2) par(4) par(5) par(6) 563 565 //dl2=lp-5., s1=(74.+3.*dl2*dl2)/(1+3.4/p4/p)+(.2/p2+17.*p)/(p4+.001*sp), … … 602 604 G4double pa10=5.e-27*a10; 603 605 // Reaction cross-section parameters (pel=peh_fit.f) 604 lastPAR[0]=.28*a; // p1 605 lastPAR[1]=4.8*std::pow(a,1.14)/(1.+3.6/a3); // p2(p/n) 606 lastPAR[2]=3.3/a+.5*ssa/(1.+2.e7/a8); // p3 607 if(PDG==2112) 606 lastPAR[0]=a/3.; // p1(p/n) 607 //lastPAR[0]=.28*a; // p1(p/n) 608 lastPAR[1]=4.5*a*ssa/(1.+6./a3)/(1.+1.e-2*a); // p2(p/n) 609 //lastPAR[1]=4.8*std::pow(a,1.14)/(1.+3.6/a3); // p2(p/n) 610 if(PDG==2112) // Neutron projectile 608 611 { 612 lastPAR[2]=3.3/a+.5*ssa/(1.+2.e7/a8); // p3 (old) 609 613 if(a<6.5) 610 {611 lastPAR[3]=1./(1.+.00123*a4); // p4612 lastPAR[4]=1.5e-4/a2/(a+1.2e-6*a12)+1.5e-6; // p5613 lastPAR[5]=.0062/(a+5.e-11*a16); // p6614 lastPAR[6]=3.2e-14/a6/(1.+4.e-10*a17); // p7615 lastPAR[7]=.847/a4/(a+.0005*a8)+.00045; // p8616 lastPAR[8]=.413/a16+7.e-7; // p10617 }614 { 615 lastPAR[3]=1./(1.+.00123*a4); // p4 616 lastPAR[4]=1.5e-4/a2/(a+1.2e-6*a12)+1.5e-6; // p5 617 lastPAR[5]=.0062/(a+5.e-11*a16); // p6 618 lastPAR[6]=3.2e-14/a6/(1.+4.e-10*a17); // p7 619 lastPAR[7]=.847/a4/(a+.0005*a8)+.00045; // p8 620 lastPAR[8]=.413/a16+7.e-7; // p9 621 } 618 622 else 619 623 { 620 lastPAR[1]/=1.+4.e-3*a; // @@ reduction for n, can be for p too // p2(n) 621 lastPAR[3]=a*(.5+1.e-10*a4)/(1.+7.e5/a6); // p4 622 lastPAR[4]=a*3.e-5/(1.+2.e12/a12); // p5 623 lastPAR[5]=(.0006+1.e-14*a5)/(1.+4.e5/a3)/(1.+3.e23/a16/a8); // p6 624 lastPAR[6]=1.e-22*a4/(1.+5.e16*(1.+5e31/a32)/a16); // p7 625 lastPAR[7]=(8.+.00016*a2)/(1.+1.4e14/a16); // p8 626 lastPAR[8]=.0013; // p10 624 lastPAR[3]=a*(.5+1.e-10*a4)/(1.+7.e5/a6); // p4 625 lastPAR[4]=a*3.e-5/(1.+2.e12/a12); // p5 626 lastPAR[5]=(.0006+1.e-14*a5)/(1.+4.e5/a3)/(1.+3.e23/a16/a8); // p6 627 lastPAR[6]=1.e-22*a4/(1.+5.e16*(1.+5e31/a32)/a16); // p7 628 lastPAR[7]=(8.+.00016*a2)/(1.+1.4e14/a16); // p8 629 lastPAR[8]=.0013; // p9 627 630 } 628 }629 else 631 } 632 else // Proton projectile 630 633 { 631 lastPAR[2]=3.3/a+.7*ssa/(1.+2.e7/a8); // p3 632 lastPAR[3]=1./(1.+6.e-9*a12)+.6*a/(1.+1.6e15/a16); // p4 633 lastPAR[4]=6.e-4/(a4+3.e-6*a12)+.16/(a+9.e5/a3+r1a16*r1a16); // p5 634 lastPAR[5]=3.e-4/a2+(1.5e-3+3.e-14*a7)/(1.+r2a16*r2a16+3.e-12*a6); // p6 635 lastPAR[6]=4.e-30+(1.2e-28*a3+pa10*pa10)/(1.+r3a16*r3a16+4.e-26*a14); // p7 636 lastPAR[7]=.07/(1.+1.7e-8*a16)+.5/(1.+1.7e18/a16+4.5e-7*a4); // p8 637 lastPAR[8]=(1.5e-10+2.e-18*a8)/(1.+3.e-25*a16); // p10 634 lastPAR[2]=3.3/a+.8*ssa/(1.+2.e7/a8); // p3 635 //lastPAR[2]=3.3/a+.7*ssa/(1.+2.e7/a8); // p3(old) 636 lastPAR[3]=1./(1.+6.e-9*a12)+.6*a/(1.+1.6e15/a16); // p4 637 lastPAR[4]=6.e-4/(a4+3.e-6*a12)+.16/(a+9.e5/a3+r1a16*r1a16); // p5 638 lastPAR[5]=3.e-4/a2+(1.5e-3+3.e-14*a7)/(1.+r2a16*r2a16+3.e-12*a6); // p6 639 lastPAR[6]=4.e-30+(1.2e-28*a3+pa10*pa10)/(1.+r3a16*r3a16+4.e-26*a14);// p7 640 lastPAR[7]=.1/(1.+1.7e-8*a16)+1./(1.+1.7e18/a16+2.e-6*a4); // p8 641 //lastPAR[7]=.07/(1.+1.7e-8*a16)+.5/(1.+1.7e18/a16+4.5e-7*a4); // p8(old) 642 lastPAR[8]=(1.5e-10+2.e-18*a8)/(1.+3.e-25*a16); // p9 638 643 } 639 644 // @@ the differential cross-section is parameterized separately for A>6 & A<7 640 645 if(a<6.5) 641 { 642 // a11 643 // a13 646 { 644 647 G4double a28=a16*a12; 645 // a31646 // a40647 648 // The main pre-exponent (pel_sg) 648 649 lastPAR[ 9]=4000*a; // p1 … … 664 665 lastPAR[23]=3.5e-36*a32*a8/(1.+5.e-15*a32/a); // p4 665 666 // The 1st max pre-exponent (pel_qq) 666 lastPAR[24]=8.e4/(a8+2.5e12/a16); // p1 667 lastPAR[25]=8.e7/(a12+1.e-27*a28*a28); // p2 668 lastPAR[26]=.0011*a3; // p3 667 lastPAR[24]=1.e5/(a8+2.5e12/a16); // p1 668 //lastPAR[24]=8.e4/(a8+2.5e12/a16); // p1 (old) 669 lastPAR[25]=8.e7/(a12+1.e-27*a28*a28); // p2 670 lastPAR[26]=.0006*a3; // p3 671 //lastPAR[26]=.0011*a3; // p3 (old) 669 672 // The 1st max slope (pel_qs) 670 673 lastPAR[27]=10.+4.e-8*a12*a; // p1 … … 682 685 lastPAR[37]=64./a3; // p4 683 686 // The gloria pre-exponent (pel_us) 684 lastPAR[38]=1.05e8*std::exp(.32*asa); // p1 685 lastPAR[39]=19.5*std::exp(.45*asa); // p2 687 lastPAR[38]=1.e8*std::exp(.32*asa); // p1 688 //lastPAR[38]=1.05e8*std::exp(.32*asa); // p1 (old) 689 lastPAR[39]=20.*std::exp(.45*asa); // p2 690 //lastPAR[39]=19.5*std::exp(.45*asa); // p2 (old) 686 691 lastPAR[40]=7.e3+2.4e6/a5; // p3 687 692 lastPAR[41]=2.5e5*std::exp(.085*a3); // p4 … … 696 701 } 697 702 else 698 {703 { 699 704 G4double p1a10=2.2e-28*a10; 700 705 G4double r4a16=6.e14/a16; … … 779 784 #ifdef pdebug 780 785 G4cout<<"G4QElasticCrossSection::GetPTables:ip=0(init), lp="<<lp<<",S1="<<theS1 781 <<",B1="<<theB1<<",S2="<<theS2<<",B2="<<theB3<<",S3="<<theS3786 <<",B1="<<theB1<<",S2="<<theS2<<",B2="<<theB3<<",S3="<<theS3 782 787 <<",B3="<<theB3<<",S4="<<theS4<<",B4="<<theB4<<G4endl; 783 788 #endif 784 789 } 785 790 if(LP>ILP) 786 {791 { 787 792 G4int ini = static_cast<int>((ILP-lPMin+.000001)/dlnP)+1; // already inited till this 788 793 if(ini<0) ini=0; … … 795 800 G4double lp=0.; 796 801 for(G4int ip=ini; ip<=fin; ip++) // Calculate tabular CS,S1,B1,S2,B2,S3,B3 797 {802 { 798 803 lp=lPMin+ip*dlnP; // ln(momentum) 799 804 G4bool memCS=onlyCS; … … 848 853 static const G4double sevth=1./7.; 849 854 if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic 850 {855 { 851 856 tgZ=1; 852 857 tgN=1; … … 855 860 } 856 861 #ifdef tdebug 857 G4cout<<"G4QElasticCS::GetExc hangeT:F="<<onlyCS<<",Z="<<tgZ<<",N="<<tgN<<",PDG="<<PDG<<G4endl;858 #endif 859 if(onlyCS) G4cout<<"* Warning*G4QElasticCrossSection::GetExchangeQ2: onlyCS=true"<<G4endl;862 G4cout<<"G4QElasticCS::GetExcT:F="<<onlyCS<<",Z="<<tgZ<<",N="<<tgN<<",PDG="<<PDG<<G4endl; 863 #endif 864 if(onlyCS) G4cout<<"**Warning*G4QElasticCrossSection::GetExchangeT: onlyCS=true"<<G4endl; 860 865 if(lastLP<-4.3) return lastTM*GeVSQ*G4UniformRand();// S-wave for p<14 MeV/c (kinE<.1MeV) 861 866 G4double q2=0.; … … 867 872 #endif 868 873 G4double E1=lastTM*theB1; 869 G4double R1=(1.-std::exp(-E1));874 G4double R1=(1.-std::exp(-E1)); 870 875 #ifdef tdebug 871 876 G4double ts1=-std::log(1.-R1)/theB1; … … 876 881 #endif 877 882 G4double E2=lastTM*theB2; 878 G4double R2=(1.-std::exp(-E2));883 G4double R2=(1.-std::exp(-E2)); 879 884 #ifdef tdebug 880 885 G4double ts2=-std::log(1.-R2)/theB2; … … 885 890 #endif 886 891 //G4double E3=lastTM*theB3; 887 //G4double R3=(1.-std::exp(-E3));892 //G4double R3=(1.-std::exp(-E3)); 888 893 #ifdef tdebug 889 894 //G4double ts3=-std::log(1.-R3)/theB3; … … 891 896 //if(ds3>.01)G4cout<<"*Warn*G4QElCS::GetExT:3n "<<ts3<<"#"<<lastTM<<",d="<<ds3<<G4endl; 892 897 #endif 893 G4double I1=R1*theS1;894 G4double I2=R2*theS2/theB2;895 //G4double I3=R3*theS3/theB3;898 G4double I1=R1*theS1; 899 G4double I2=R2*theS2/theB2; 900 //G4double I3=R3*theS3/theB3; 896 901 G4double I12=I1+I2; 897 902 //G4double rand=(I12+I3)*G4UniformRand(); … … 903 908 q2=-std::log(1.-ran)/theB1; // t-chan 904 909 } 905 else910 else 906 911 { 907 912 G4double ran=R2*G4UniformRand(); … … 917 922 #endif 918 923 G4double E1=lastTM*theB1; 919 G4double R1=(1.-std::exp(-E1));924 G4double R1=(1.-std::exp(-E1)); 920 925 #ifdef tdebug 921 926 G4double ts1=-std::log(1.-R1)/theB1; … … 926 931 #endif 927 932 G4double E2=lastTM*theB2; 928 G4double R2=(1.-std::exp(-E2*E2*E2));933 G4double R2=(1.-std::exp(-E2*E2*E2)); 929 934 #ifdef tdebug 930 935 G4double ts2=std::pow(-std::log(1.-R2),.333333333)/theB2; … … 935 940 #endif 936 941 G4double E3=lastTM*theB3; 937 G4double R3=(1.-std::exp(-E3));942 G4double R3=(1.-std::exp(-E3)); 938 943 #ifdef tdebug 939 944 G4double ts3=-std::log(1.-R3)/theB3; … … 943 948 <<",R3="<<R1<<",E3="<<E3<<G4endl; 944 949 #endif 945 G4double I1=R1*theS1/theB1;946 G4double I2=R2*theS2;947 G4double I3=R3*theS3;950 G4double I1=R1*theS1/theB1; 951 G4double I2=R2*theS2; 952 G4double I3=R3*theS3; 948 953 G4double I12=I1+I2; 949 954 G4double rand=(I12+I3)*G4UniformRand(); … … 954 959 q2=-std::log(1.-ran)/theB1; 955 960 } 956 else if(rand<I12)961 else if(rand<I12) 957 962 { 958 963 G4double ran=R2*G4UniformRand(); … … 978 983 #endif 979 984 G4double E1=lastTM*(theB1+lastTM*theSS); 980 G4double R1=(1.-std::exp(-E1));985 G4double R1=(1.-std::exp(-E1)); 981 986 G4double tss=theSS+theSS; // for future solution of quadratic equation (imediate check) 982 987 #ifdef tdebug … … 991 996 G4double E2=lastTM*tm2*theB2; // power 3 for lowA, 5 for HighA (1st) 992 997 if(a>6.5)E2*=tm2; // for heavy nuclei 993 G4double R2=(1.-std::exp(-E2));998 G4double R2=(1.-std::exp(-E2)); 994 999 #ifdef tdebug 995 1000 G4double ts2=-std::log(1.-R2)/theB2; … … 1003 1008 G4double E3=lastTM*theB3; 1004 1009 if(a>6.5)E3*=tm2*tm2*tm2; // power 1 for lowA, 7 (2nd) for HighA 1005 G4double R3=(1.-std::exp(-E3));1010 G4double R3=(1.-std::exp(-E3)); 1006 1011 #ifdef tdebug 1007 1012 G4double ts3=-std::log(1.-R3)/theB3; … … 1013 1018 #endif 1014 1019 G4double E4=lastTM*theB4; 1015 G4double R4=(1.-std::exp(-E4));1020 G4double R4=(1.-std::exp(-E4)); 1016 1021 #ifdef tdebug 1017 1022 G4double ts4=-std::log(1.-R4)/theB4; … … 1021 1026 <<",R4="<<R4<<",E4="<<E4<<G4endl; 1022 1027 #endif 1023 G4double I1=R1*theS1;1024 G4double I2=R2*theS2;1025 G4double I3=R3*theS3;1026 G4double I4=R4*theS4;1028 G4double I1=R1*theS1; 1029 G4double I2=R2*theS2; 1030 G4double I3=R3*theS3; 1031 G4double I4=R4*theS4; 1027 1032 G4double I12=I1+I2; 1028 1033 G4double I13=I12+I3; … … 1041 1046 #endif 1042 1047 } 1043 else if(rand<I12)1048 else if(rand<I12) 1044 1049 { 1045 1050 G4double ran=R2*G4UniformRand(); … … 1124 1129 { 1125 1130 if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic 1126 {1131 { 1127 1132 tgZ=1; 1128 1133 tgN=1; … … 1137 1142 G4int iZ=tgZ-1; // Z index 1138 1143 if(iZ<0) 1139 {1144 { 1140 1145 iZ=0; // conversion of the neutron target to the proton target 1141 1146 tgZ=1; … … 1162 1167 G4double ssp=std::sqrt(sp); // sqrt(sqrt(p))=p^.25 1163 1168 G4double p2s=p2*sp; 1164 G4double dl1=lp-lastPAR[3];1169 G4double dl1=lp-lastPAR[3]; 1165 1170 theSS=lastPAR[21]; 1166 1171 theS1=(lastPAR[9]+lastPAR[10]*dl1*dl1+lastPAR[11]/p)/(1.+lastPAR[12]/p4) … … 1185 1190 1186 1191 G4double p2s=p2*sp; 1187 G4double dl1=lp-lastPAR[3];1188 G4double dl2=lp-lastPAR[8];1192 G4double dl1=lp-lastPAR[3]; 1193 G4double dl2=lp-lastPAR[8]; 1189 1194 theSS=lastPAR[31]; 1190 1195 theS1=(lastPAR[9]+lastPAR[10]*dl2*dl2)/(1.+lastPAR[11]/p4/p)+ … … 1214 1219 G4double p16=p8*p8; 1215 1220 //G4double p24=p16*p8; 1216 G4double dl=lp-5.;1221 G4double dl=lp-5.; 1217 1222 G4double a=tgZ+tgN; 1218 1223 G4double pah=std::pow(p,a/2); … … 1226 1231 theSS=lastPAR[20]/(1.+lastPAR[21]/p2)+lastPAR[22]/(p6/pa+lastPAR[23]/p16); 1227 1232 theS2=lastPAR[24]/(pa/p2+lastPAR[25]/p4)+lastPAR[26]; 1228 theB2=lastPAR[27]*std::pow(p,lastPAR[28])+lastPAR[29]/(p8+lastPAR[30]/p16);1229 theS3=lastPAR[31]/(pa*p+lastPAR[32]/pa)+lastPAR[33];1230 theB3=lastPAR[34]/(p3+lastPAR[35]/p6)+lastPAR[36]/(1.+lastPAR[37]/p2);1231 theS4=p2*(pah*lastPAR[38]*std::exp(-pah*lastPAR[39])+1233 theB2=lastPAR[27]*std::pow(p,lastPAR[28])+lastPAR[29]/(p8+lastPAR[30]/p16); 1234 theS3=lastPAR[31]/(pa*p+lastPAR[32]/pa)+lastPAR[33]; 1235 theB3=lastPAR[34]/(p3+lastPAR[35]/p6)+lastPAR[36]/(1.+lastPAR[37]/p2); 1236 theS4=p2*(pah*lastPAR[38]*std::exp(-pah*lastPAR[39])+ 1232 1237 lastPAR[40]/(1.+lastPAR[41]*std::pow(p,lastPAR[42]))); 1233 theB4=lastPAR[43]*pa/p2/(1.+pa*lastPAR[44]);1238 theB4=lastPAR[43]*pa/p2/(1.+pa*lastPAR[44]); 1234 1239 #ifdef tdebug 1235 1240 G4cout<<"G4QElCS::GetTabV: lA, p="<<p<<",S1="<<theS1<<",B1="<<theB1<<",SS="<<theSS … … 1246 1251 theSS=lastPAR[21]/(p4/std::pow(p,lastPAR[23])+lastPAR[22]/p4); 1247 1252 theS2=lastPAR[24]/p4/(std::pow(p,lastPAR[25])+lastPAR[26]/p12)+lastPAR[27]; 1248 theB2=lastPAR[28]/std::pow(p,lastPAR[29])+lastPAR[30]/std::pow(p,lastPAR[31]);1249 theS3=lastPAR[32]/std::pow(p,lastPAR[35])/(1.+lastPAR[36]/p12)+1253 theB2=lastPAR[28]/std::pow(p,lastPAR[29])+lastPAR[30]/std::pow(p,lastPAR[31]); 1254 theS3=lastPAR[32]/std::pow(p,lastPAR[35])/(1.+lastPAR[36]/p12)+ 1250 1255 lastPAR[33]/(1.+lastPAR[34]/p6); 1251 theB3=lastPAR[37]/p8+lastPAR[38]/p2+lastPAR[39]/(1.+lastPAR[40]/p8);1252 theS4=(lastPAR[41]/p4+lastPAR[46]/p)/(1.+lastPAR[42]/p10)+1256 theB3=lastPAR[37]/p8+lastPAR[38]/p2+lastPAR[39]/(1.+lastPAR[40]/p8); 1257 theS4=(lastPAR[41]/p4+lastPAR[46]/p)/(1.+lastPAR[42]/p10)+ 1253 1258 (lastPAR[43]+lastPAR[44]*dl*dl)/(1.+lastPAR[45]/p12); 1254 theB4=lastPAR[47]/(1.+lastPAR[48]/p)+lastPAR[49]*p4/(1.+lastPAR[50]*p5);1259 theB4=lastPAR[47]/(1.+lastPAR[48]/p)+lastPAR[49]*p4/(1.+lastPAR[50]*p5); 1255 1260 #ifdef tdebug 1256 1261 G4cout<<"G4QElCS::GetTabV: hA, p="<<p<<",S1="<<theS1<<",B1="<<theB1<<",SS="<<theSS … … 1276 1281 return (lastPAR[0]*dl*dl+lastPAR[1])/(1.+lastPAR[2]/p)+lastPAR[3]/(p4+lastPAR[4]/p2)+ 1277 1282 lastPAR[5]/(p8+lastPAR[6]/p8)+lastPAR[7]/(p2+lastPAR[8]); 1278 //else1283 //else 1279 1284 //{ 1280 1285 // G4int nI=nn[iZ]; … … 1286 1291 #endif 1287 1292 // if(kE<nT[iZ][i]) return 0.; // 0 below the threshold (in MeV) 1288 // if(p<2.) return nX[iZ][i]; // At very low momentum(<2MeV/c) -> only LECS1289 // return lastPAR[3]/(p4+lastPAR[4]/p2)+lastPAR[5]/(p5+rp16*rp16)+1293 // if(p<2.) return nX[iZ][i]; // At very low momentum(<2MeV/c) -> only LECS 1294 // return lastPAR[3]/(p4+lastPAR[4]/p2)+lastPAR[5]/(p5+rp16*rp16)+ 1290 1295 // lastPAR[7]/(p4+lastPAR[8]/p4)+nX[iZ][i]/(1.+lastPAR[51]*p16); 1291 1296 // } … … 1315 1320 //static const G4double mDeut2= mDeut*mDeut; 1316 1321 if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic 1317 {1322 { 1318 1323 tgZ=1; 1319 1324 tgN=1; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QElectronNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QElectronNuclearCrossSection.cc,v 1.1 3 2008/10/24 19:25:41 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QElectronNuclearCrossSection.cc,v 1.15 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03 34 34 // 35 //================================================================================ 35 //================================================================================= 36 // Short description: reaction cross-sections for electron-nuclear reactions, which 37 // are integrals over virtual equivalent photons photons. 38 // -------------------------------------------------------------------------------- 36 39 37 40 //#define debug … … 90 93 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 94 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST95 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 96 #endif 94 97 if(std::abs(pPDG)!=11) … … 111 114 j = 0; // A#0f records found in DB for this projectile 112 115 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB116 { // The nucleus with projPDG is found in AMDB 114 117 if(colN[i]==tgN && colZ[i]==tgZ) 115 {118 { 116 119 lastI=i; 117 120 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 130 133 lastP =colP [i]; // Last Momentum (A-dependent) 131 134 lastCS =colCS[i]; // Last CrossSect (A-dependent) 132 // if(std::fabs(lastP/pMom-1.)<tolerance) // VI (do not use tolerance)135 // if(std::fabs(lastP/pMom-1.)<tolerance) // VI (do not use tolerance) 133 136 if(lastP == pMom) 134 137 { … … 164 167 #endif 165 168 j++; // Increment a#0f records found in DB for this pPDG 166 }167 if(!in) // This nucleus has not been calculated previously168 {169 } 170 if(!in) // This nucleus has not been calculated previously 171 { 169 172 #ifdef pdebug 170 173 G4cout<<"G4QENCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 173 176 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 174 177 if(lastCS<=0.) 175 {178 { 176 179 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 177 180 #ifdef pdebug … … 185 188 lastTH=pEn; 186 189 } 187 }190 } 188 191 #ifdef pdebug 189 192 G4cout<<"G4QENCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 201 204 #endif 202 205 return lastCS*millibarn; 203 } // End of creation of the new set of parameters206 } // End of creation of the new set of parameters 204 207 else 205 {208 { 206 209 #ifdef pdebug 207 210 G4cout<<"G4QENCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 274 277 //if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0); 275 278 if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1)) 276 mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV;// ResNucMass for a proton279 mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV; // ResNucMass for a proton 277 280 G4double mN= infEn; 278 281 //if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0); 279 282 if(N&&G4NucleiProperties::IsInStableTable(A-1,Z)) 280 mN = G4NucleiProperties::GetNuclearMass(A-1.,Z-0.)/MeV;// ResNucMass for a neutron283 mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // ResNucMass for a neutron 281 284 282 285 G4double mA= infEn; 283 286 if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2)) 284 mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV;// ResNucMass for an alpha287 mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV;// ResNucMass for an alpha 285 288 286 289 G4double dP= mP +mProt - mT; … … 288 291 G4double dA= mA +mAlph - mT; 289 292 #ifdef pdebug 290 G4cout<<"G4QElectronNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="293 G4cout<<"G4QElectronNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA=" 291 294 <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl; 292 295 #endif … … 318 321 static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions 319 322 #ifdef pdebug 320 G4cout<<"G4QElectronNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();323 G4cout<<"G4QElectronNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size(); 321 324 if(J3.size()) G4cout<<", p="<<J3[0]; 322 325 G4cout<<G4endl; … … 330 333 lastE=TotEnergy-mel; // Kinetic energy of the electron 331 334 #ifdef pdebug 332 G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ;335 G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ; 333 336 if(J3.size()) G4cout<<", p="<<J3[0]; 334 337 G4cout<<", N="<<targN<<", onlyCS="<<CS<<",E="<<lastE<<",th="<<EMi<<G4endl; … … 338 341 { 339 342 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 340 { // ...........................................========343 { // ...........................................======== 341 344 if (lastE<=EMi) // Energy is below the minimum energy in the table 342 345 { … … 345 348 lastSig=0.; 346 349 #ifdef pdebug 347 G4cout<<"G4QElectronNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl;350 G4cout<<"G4QElectronNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl; 348 351 #endif 349 352 return 0.; … … 354 357 lastF =colF[I]; // Last ZeroPosition in the J-functions 355 358 lastH =colH[I]; // Last High Energy Coefficient (A-dependent) 356 }357 else // This isotope wasn't calculated previously => CREATE358 {359 } 360 else // This isotope wasn't calculated previously => CREATE 361 { 359 362 lastJ1 = new G4double[nE]; // Allocate memory for the new J1 function 360 363 lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function … … 375 378 colF.push_back(lastF); 376 379 colH.push_back(lastH); 377 } // End of creation of the new set of parameters380 } // End of creation of the new set of parameters 378 381 } // End of parameters udate 379 382 // ============================== NOW Calculate the Cross Section ===================== … … 384 387 lastSig=0.; 385 388 #ifdef pdebug 386 G4cout<<"G4QElectronNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;389 G4cout<<"G4QElectronNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl; 387 390 #endif 388 391 return 0.; … … 398 401 #ifdef pdebug 399 402 G4cout<<"-->G4QElectronNuclearCS::CalcCrossSect:LOGfit b="<<blast<<",max="<<mL<<",lJ1=" 400 <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<",lEmin="<<lEMi<<",d="<<dlnE<<G4endl;403 <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<",lEmin="<<lEMi<<",d="<<dlnE<<G4endl; 401 404 #endif 402 405 if(blast<0) blast=0; … … 2587 2590 <<y[k]<<",J3="<<z[k]<<G4endl; 2588 2591 #endif 2589 }2592 } 2590 2593 r=L[i]; // Low channel for the J-functions 2591 2594 } … … 2614 2617 r=L[k]; 2615 2618 if(L[k1]<r) r=L[k1]; 2616 }2619 } 2617 2620 } 2618 2621 return r; … … 2648 2651 if(ris<Y[lastL]) // Search in the table 2649 2652 { 2650 G4int j=lastF;2653 G4int j=lastF; 2651 2654 G4double Yj=Y[j]; // It mast be 0 (some times just very small) 2652 2655 while (ris>Yj && j<lastL) // Associative search 2653 {2656 { 2654 2657 j++; 2655 2658 Yj=Y[j]; // High value 2656 }2659 } 2657 2660 G4int j1=j-1; 2658 2661 G4double Yi=Y[j1]; // Low value 2659 2662 phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE; 2660 2663 #ifdef debug 2661 G4cout<<"G4QElectronNucCS::GetExchEn="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="2664 G4cout<<"G4QElectronNucCS::GetExchEn="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi=" 2662 2665 <<Yi<<",Y="<<Yj<<G4endl; 2663 2666 #endif … … 2668 2671 G4double f=(ris-Y[lastL])/lastH; // ScaledResidualValue of the CrossSection integral 2669 2672 #ifdef pdebug 2670 G4cout<<"G4QElNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;2673 G4cout<<"G4QElNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl; 2671 2674 #endif 2672 2675 phLE=SolveTheEquation(f); // Solve equation to find Log(phE) (compare with lastLE) 2673 2676 #ifdef pdebug 2674 G4cout<<"G4QElectronNuclearCS::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;2677 G4cout<<"G4QElectronNuclearCS::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl; 2675 2678 #endif 2676 2679 } … … 2718 2721 #endif 2719 2722 if(x>=lastLE) 2720 {2723 { 2721 2724 G4cerr<<"*G4QElNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE 2722 2725 <<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl; … … 2806 2809 return 0.; 2807 2810 } 2808 G4double lK=std::log(K); // ln(K)2809 G4double x=1.-K/nu; // This definitin saves one div.2810 G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor2811 G4double b=std::exp(bp*(lK-blK0)); // b-factor2812 G4double c=std::exp(cp*(lK-clK0)); // c-factor2813 G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2)2814 G4double ef=std::exp(r*(b-c*r*r)); // exponential factor2811 G4double lK=std::log(K); // ln(K) 2812 G4double x=1.-K/nu; // This definitin saves one div. 2813 G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor 2814 G4double b=std::exp(bp*(lK-blK0)); // b-factor 2815 G4double c=std::exp(cp*(lK-clK0)); // c-factor 2816 G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2) 2817 G4double ef=std::exp(r*(b-c*r*r)); // exponential factor 2815 2818 return (1.-x)*ef/GD/GD; 2816 2819 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QGluonString.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QGluonString.cc,v 1. 3 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QGluonString.cc,v 1.4 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QGluonString class ----------------- … … 31 31 // G4QGluonString class of the CHIPS Simulation Branch in GEANT4 32 32 // --------------------------------------------------------------- 33 // **************************************************************************************** 34 // ********** This CLASS is temporary moved from the photolepton_hadron directory ********* 35 // **************************************************************************************** 33 // Short description: CHIPS object for the Quark-Gluon String 34 // --------------------------------------------------------------- 36 35 37 36 //#define debug … … 206 205 G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z ! 207 206 if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCaptureAtRest::GetMeanFreePath" 208 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;207 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 209 208 G4double abund=abuVector[j]; 210 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);209 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 211 210 #ifdef debug 212 211 G4cout<<"G4QGluonString::GetMeanFreePath:p#"<<j<<",N="<<N<<",ab="<<abund<<G4endl; 213 212 #endif 214 213 newAbund->push_back(pr); 215 }214 } 216 215 #ifdef debug 217 216 G4cout<<"G4QGluonString::PostStepDoIt:pairVectorLength="<<newAbund->size()<<G4endl; … … 370 369 #ifdef debug 371 370 G4int prPDG=particle->GetPDGEncoding(); 372 G4cout<<"G4QGluonString::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;371 G4cout<<"G4QGluonString::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 373 372 #endif 374 373 if(!projPDG) … … 379 378 G4int EPIM=ElProbInMat.size(); 380 379 #ifdef debug 381 G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;380 G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 382 381 #endif 383 382 G4int i=0; … … 386 385 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 387 386 for(i=0; i<nE; ++i) 388 {389 #ifdef debug 390 G4cout<<"G4QGluonString::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;387 { 388 #ifdef debug 389 G4cout<<"G4QGluonString::PostStDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl; 391 390 #endif 392 391 if (rnd<ElProbInMat[i]) break; … … 397 396 Z=static_cast<G4int>(pElement->GetZ()); 398 397 #ifdef debug 399 G4cout<<"G4QGluonString::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;398 G4cout<<"G4QGluonString::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 400 399 #endif 401 400 if(Z<=0) … … 408 407 G4int nofIsot=SPI->size(); // #of isotopes in the element i 409 408 #ifdef debug 410 G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;409 G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl; 411 410 #endif 412 411 G4int j=0; … … 417 416 { 418 417 #ifdef debug 419 G4cout<<"G4QGluonString::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;418 G4cout<<"G4QGluonString::PostStepDoIt:SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl; 420 419 #endif 421 420 if(rndI < (*SPI)[j]) break; … … 425 424 G4int N =(*IsN)[j]; ; // Randomized number of neutrons 426 425 #ifdef debug 427 G4cout<<"G4QGluonString::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<G4endl;426 G4cout<<"G4QGluonString::PostStepDoIt: j="<<i<<", N(isotope)="<<N<<G4endl; 428 427 #endif 429 428 if(N<0) … … 439 438 if(dsr<dd)dsr=dd; 440 439 if(manualFlag) G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio);// ManualPa 441 //else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP CluPars440 //else if(projPDG==-2212) G4QNucleus::SetParameters(1.-dsr-dsr,dd+dd,5.,10.);//aP CluPars 442 441 //else if(projPDG==-211) G4QNucleus::SetParameters(.67-dsr,.32-dsr,5.,9.); //Pi- CluPars 443 442 #ifdef debug … … 517 516 { 518 517 #ifdef debug 519 G4cout<<"G4QGluonString::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl;518 G4cout<<"G4QGluonString::PostStepDoIt: Intermediate particle is found i="<<i<<G4endl; 520 519 #endif 521 520 delete hadr; … … 530 529 { 531 530 if(G4UniformRand()>.5) theDefinition = G4KaonZeroLong::KaonZeroLong(); // K_L 532 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S531 else theDefinition = G4KaonZeroShort::KaonZeroShort(); // K_S 533 532 } 534 533 else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus(); … … 537 536 else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero(); 538 537 else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus(); 539 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)538 else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!) 540 539 { 541 540 G4int aZ = hadr->GetCharge(); 542 541 G4int aA = hadr->GetBaryonNumber(); 543 542 #ifdef pdebug 544 G4cout<<"G4QGluonString::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;543 G4cout<<"G4QGluonString::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl; 545 544 #endif 546 545 theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ); … … 550 549 { 551 550 #ifdef pdebug 552 G4cout<<"G4QGluonString::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;551 G4cout<<"G4QGluonString::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl; 553 552 #endif 554 553 theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode); 555 554 #ifdef pdebug 556 G4cout<<"G4QGluonString::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;555 G4cout<<"G4QGluonString::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl; 557 556 #endif 558 557 } … … 594 593 delete output; // instances of the G4QHadrons from the output are already deleted above + 595 594 #ifdef debug 596 G4cout<<"G4QGluonString::PostStDoIt: afterSt="<<aParticleChange.GetTrackStatus()<<G4endl;595 G4cout<<"G4QGluonString::PostStDoIt: afterSt="<<aParticleChange.GetTrackStatus()<<G4endl; 597 596 #endif 598 597 aParticleChange.ProposeTrackStatus(fStopAndKill); // Kill the absorbed particle 599 598 #ifdef debug 600 G4cout<<"G4QGluonString::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG599 G4cout<<"G4QGluonString::PostStepDoIt:*** PostStepDoIt is done ***, P="<<aProjPDG 601 600 <<", St="<<aParticleChange.GetTrackStatus()<<G4endl; 602 601 #endif -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonCrossSection.cc
r1007 r1055 26 26 // 27 27 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 19-Aug-07 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 37 37 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch ********** 38 38 // **************************************************************************************** 39 // Short description: CHIPS cross-sectons for Ion-Ion interactions 40 // --------------------------------------------------------------- 39 41 // 40 42 //#define debug … … 85 87 <<"),PDG="<<pPDG<<"("<<lastPDG<<"), p="<<pMom<<"("<<lastTH<<")"<<",Sz=" 86 88 <<colN.size()<<G4endl; 87 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST89 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 88 90 #endif 89 91 if(!pPDG) … … 106 108 j = 0; // A#0f records found in DB for this projectile 107 109 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 108 { // The nucleus with projPDG is found in AMDB110 { // The nucleus with projPDG is found in AMDB 109 111 if(colN[i]==tN && colZ[i]==tZ) 110 {112 { 111 113 lastI=i; 112 114 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 129 131 { 130 132 #ifdef pdebug 131 G4cout<<"G4QIonIonCS::GetCS:P="<<pMom<<",InXS="<<lastICS*millibarn<<",ElXS=" <<lastECS*millibarn132 << G4endl;133 G4cout<<"G4QIonIonCS::GetCS:P="<<pMom<<",InXS="<<lastICS*millibarn<<",ElXS=" 134 <<lastECS*millibarn<<G4endl; 133 135 #endif 134 136 CalculateCrossSection(fCS,-1,j,lastPDG,lastZ,lastN,pMom); // Update param's only … … 161 163 #endif 162 164 j++; // Increment a#0f records found in DB for this pPDG 163 }164 if(!in) // This nucleus has not been calculated previously165 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 166 168 #ifdef pdebug 167 169 G4cout<<"G4QIICS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 171 173 lastECS=CalculateCrossSection(false,0,j,lastPDG,lastZ,lastN,pMom); //calculate&create 172 174 if(lastICS<=0. || lastECS<=0.) 173 {175 { 174 176 lastTH = ThresholdEnergy(tZ, tN); // The Threshold Energy which is now the last 175 177 #ifdef pdebug … … 183 185 lastTH=pMom; 184 186 } 185 }187 } 186 188 #ifdef pdebug 187 189 G4cout<<"G4QIICS::GetCS: *New* ICS="<<lastICS<<", ECS="<<lastICS<<",N="<<lastN<<",Z=" … … 201 203 if(fCS) return lastICS*millibarn; // Use theLastInelasticCS 202 204 return lastECS*millibarn; // Use theLastElasticCS 203 } // End of creation of the new set of parameters205 } // End of creation of the new set of parameters 204 206 else 205 {207 { 206 208 #ifdef pdebug 207 209 G4cout<<"G4QIICS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 286 288 { 287 289 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 288 {290 { 289 291 lastLENI=LENI[I]; // Pointer to Low Energy inelastic cross sections 290 292 lastHENI=HENI[I]; // Pointer to High Energy inelastic cross sections … … 292 294 lastHENE=HENE[I]; // Pointer to High Energy inelastic cross sections 293 295 } 294 else // This isotope wasn't calculated previously => CREATE295 {296 else // This isotope wasn't calculated previously => CREATE 297 { 296 298 lastLENI = new G4double[nL]; // Allocate memory for the new LEN cross sections 297 299 lastHENI = new G4double[nH]; // Allocate memory for the new HEN cross sections … … 299 301 lastHENE = new G4double[nH]; // Allocate memory for the new HEN cross sections 300 302 G4int er=GetFunctions(pZ,pN,tZ,tN,lastLENI,lastHENI,lastLENE,lastHENE); 301 if(er<1) G4cerr<<"*W*G4QIonIonCroSec::CalcCrossSection: pA="<<tA<<",tA="<<tA<<G4endl;303 if(er<1) G4cerr<<"*W*G4QIonIonCroSec::CalcCrossSection: pA="<<tA<<",tA="<<tA<<G4endl; 302 304 #ifdef debug 303 305 G4cout<<"G4QIonIonCrossSection::CalcCS: GetFunctions er="<<er<<",pA="<<pA<<",tA="<<tA … … 311 313 LENE.push_back(lastLENE); // added LEN Elastic 312 314 HENE.push_back(lastHENE); // added HEN Elastic 313 } // End of creation of the new set of parameters315 } // End of creation of the new set of parameters 314 316 } // End of parameters udate 315 317 // ============================== NOW the Magic Formula ================================= 316 318 if (Momentum<lastTH) return 0.; // It must be already checked in the interface class 317 else if (Momentum<Pmin) // LEN region (approximated in E, not in lnE)319 else if (Momentum<Pmin) // LEN region (approximated in E, not in lnE) 318 320 { 319 321 #ifdef debug 320 G4cout<<"G4QIICS::CalCS:p="<<pA<<",t="<<tA<<",n="<<nL<<",T="<<THmin<<",d="<<dP<<G4endl;322 G4cout<<"G4QIICS::CalCS:p="<<pA<<",t="<<tA<<",n="<<nL<<",T="<<THmin<<",d="<<dP<<G4endl; 321 323 #endif 322 324 if(tA<1. || pA<1.) 323 325 { 324 G4cout<<"-Warning-G4QIICS::CalcCS: pA="<<pA<<" or tA="<<tA<<" aren't nuclei"<<G4endl;326 G4cout<<"-Warning-G4QIICS::CalcCS: pA="<<pA<<" or tA="<<tA<<" aren't nuclei"<<G4endl; 325 327 sigma=0.; 326 328 } … … 331 333 } 332 334 #ifdef debugn 333 if(sigma<0.) G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<",tA="<<tA<<",XS="<<XS<<",P="335 if(sigma<0.) G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<",tA="<<tA<<",XS="<<XS<<",P=" 334 336 <<Momentum<<", Th="<<THmin<<", dP="<<dP<<G4endl; 335 337 #endif … … 343 345 if(tA<=1. || pA<=1.) 344 346 { 345 G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<"or tA="<<tA<<" aren't composit"<<G4endl;347 G4cout<<"-Warning-G4QIICS::CalcCS:pA="<<pA<<"or tA="<<tA<<" aren't composit"<<G4endl; 346 348 sigma=0.; 347 349 } … … 354 356 else // UltraHighE region (not frequent) 355 357 { 356 std::pair<G4double, G4double> inelel = CalculateXS(pZ, pN, tZ, tN, Momentum);358 std::pair<G4double, G4double> inelel = CalculateXS(pZ, pN, tZ, tN, Momentum); 357 359 if(XS) sigma=inelel.first; 358 360 else sigma=inelel.second; … … 423 425 G4double elCS=0.; 424 426 if(pA<1.1 || tA<1.1) // Ion-nucleon/nucleon-ion interaction use NA(in,el) 425 {427 { 426 428 if ( (pZ == 1 && !pN) || (tZ == 1 && !tN) ) // proton-nuclear 427 429 { … … 434 436 inCS=ElCSman->GetCrossSection(true, Mom, tZ, tN, 2112); 435 437 } 436 else G4cerr<<"-Warn-G4QIICS::CaCS:pZ="<<pZ<<",pN="<<pN<<",tZ="<<tZ<<",tN="<<tN<<G4endl;438 else G4cerr<<"-Warn-G4QIICS::CaCS:pZ="<<pZ<<",pN="<<pN<<",tZ="<<tZ<<",tN="<<tN<<G4endl; 437 439 } 438 440 else 439 {441 { 440 442 G4double P2=Mom*Mom; 441 443 G4double P4=P2*P2; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QIonIonElastic.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QIonIonElastic.cc,v 1. 3 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QIonIonElastic.cc,v 1.4 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QIonIonElastic class ----------------- … … 34 34 // ********** This CLASS is temporary moved from the photolepton_hadron directory ********* 35 35 // **************************************************************************************** 36 // Short description: a simple process for the Ion-Ion elastic scattering. 37 // For heavy by heavy ions it can reach 50% of the total cross-section. 38 // ----------------------------------------------------------------------- 36 39 37 40 //#define debug … … 153 156 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 154 157 G4double abund=abuVector[j]; 155 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);158 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 156 159 #ifdef debug 157 160 G4cout<<"G4QIonIonElastic::GetMeanFP:pair#="<<j<<",N="<<N<<",ab="<<abund<<G4endl; 158 161 #endif 159 162 newAbund->push_back(pr); 160 }163 } 161 164 #ifdef debug 162 165 G4cout<<"G4QIonIonElastic::GetMeanFP: pairVectorLength="<<newAbund->size()<<G4endl; … … 185 188 G4cout<<"G4QIIEl::GMFP:true,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl; 186 189 #endif 187 G4bool ccsf=false; // Extract elastic Ion-Ion cross-section190 G4bool ccsf=false; // Extract elastic Ion-Ion cross-section 188 191 #ifdef debug 189 192 G4cout<<"G4QIonIonElastic::GMFP: GetCS #1 j="<<j<<G4endl; … … 232 235 static G4bool CWinit = true; // CHIPS Warld needs to be initted 233 236 if(CWinit) 234 {237 { 235 238 CWinit=false; 236 239 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 292 295 #ifdef debug 293 296 G4int prPDG=particle->GetPDGEncoding(); 294 G4cout<<"G4QIonIonElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;297 G4cout<<"G4QIonIonElastic::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 295 298 #endif 296 299 if(!projPDG) … … 304 307 G4int EPIM=ElProbInMat.size(); 305 308 #ifdef debug 306 G4cout<<"G4QIonIonElastic::PSDI:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;309 G4cout<<"G4QIonIonElastic::PSDI:m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 307 310 #endif 308 311 G4int i=0; … … 311 314 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 312 315 for(i=0; i<nE; ++i) 313 {314 #ifdef debug 315 G4cout<<"G4QIonIonElastic::PSDI: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl;316 { 317 #ifdef debug 318 G4cout<<"G4QIonIonElastic::PSDI: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl; 316 319 #endif 317 320 if (rnd<ElProbInMat[i]) break; … … 322 325 Z=static_cast<G4int>(pElement->GetZ()); 323 326 #ifdef debug 324 G4cout<<"G4QIonIonElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;327 G4cout<<"G4QIonIonElastic::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 325 328 #endif 326 329 if(Z<=0) … … 333 336 G4int nofIsot=SPI->size(); // #of isotopes in the element i 334 337 #ifdef debug 335 G4cout<<"G4QIonIonElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl;338 G4cout<<"G4QIonIonElastic::PosStDoIt: nI="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl; 336 339 #endif 337 340 G4int j=0; … … 342 345 { 343 346 #ifdef debug 344 G4cout<<"G4QIonIonElastic::PostStDI: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl;347 G4cout<<"G4QIonIonElastic::PostStDI: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl; 345 348 #endif 346 349 if(rndI < (*SPI)[j]) break; … … 350 353 G4int N =(*IsN)[j]; ; // Randomized number of neutrons 351 354 #ifdef debug 352 G4cout<<"G4QIonIonElastic::PostStepDoIt:j="<<i<<",N(isotope)="<<N<<", MeV="<<MeV<<G4endl;355 G4cout<<"G4QIonIonElastic::PostStepDoIt:j="<<i<<",N(isotope)="<<N<<", MeV="<<MeV<<G4endl; 353 356 #endif 354 357 if(N<0) … … 492 495 EnMomConservation-=scat4M; // It must be initialized by (pE+tM,pP) 493 496 // This is how in general the secondary should be identified 494 G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron497 G4DynamicParticle* theSec = new G4DynamicParticle; // A secondary for the recoil hadron 495 498 G4int aA = Z+N; 496 499 #ifdef pdebug 497 G4cout<<"G4QIonIonElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl;500 G4cout<<"G4QIonIonElastic::PostStepDoIt: Ion Z="<<Z<<", A="<<aA<<G4endl; 498 501 #endif 499 502 G4ParticleDefinition* theDefinition=G4ParticleTable::GetParticleTable() -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QLowEnergy.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4QLowEnergy.cc,v 1. 7 2008/10/02 21:10:07 dennisExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4QLowEnergy.cc,v 1.9 2009/03/09 15:41:17 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ---------------- G4QLowEnergy class ----------------- … … 31 31 // G4QLowEnergy class of the CHIPS Simulation Branch in GEANT4 32 32 // --------------------------------------------------------------- 33 // **************************************************************************************** 34 // ********** This CLASS is temporary moved from the "chips/interface" directory ********* 35 // **************************************************************************************** 33 // Short description: This is a fast low energy algorithm for the 34 // inelastic interactions of nucleons and nuclei (ions) with nuclei. 35 // This is a fase-space algorithm, but not quark level. Provides 36 // nuclear fragments upto alpha only. Never was tumed (but can be). 37 // --------------------------------------------------------------- 36 38 37 39 //#define debug … … 93 95 G4cout<<"G4QLowEnergy::GetMeanFreePath:"<<nE<<" Elems"<<G4endl; 94 96 #endif 95 G4VQCrossSection* CSmanager=G4QIonIonCrossSection::GetPointer();96 97 G4int pPDG=0; 97 // @@ At present it is made only for n & p, but can be extended if inXS are available98 if( incidentParticleDefinition == G4Deuteron::Deuteron() ) pPDG = 100001002;98 if ( incidentParticleDefinition == G4Proton::Proton() ) pPDG = 2212; 99 else if ( incidentParticleDefinition == G4Deuteron::Deuteron() ) pPDG = 100001002; 99 100 else if ( incidentParticleDefinition == G4Alpha::Alpha() ) pPDG = 100002004; 100 101 else if ( incidentParticleDefinition == G4Triton::Triton() ) pPDG = 100001003; … … 110 111 #endif 111 112 } 112 else G4cout<<"-Warning-G4QLowEnergy::GetMeanFreePath: only AA are implemented"<<G4endl; 113 else G4cout<<"-Warning-G4QLowEnergy::GetMeanFreePath: only AA & pA implemented"<<G4endl; 114 G4VQCrossSection* CSmanager=G4QIonIonCrossSection::GetPointer(); 115 if(pPDG == 2212) CSmanager=G4QProtonNuclearCrossSection::GetPointer(); 113 116 Momentum/=incidentParticleDefinition->GetBaryonNumber(); // Divide Mom by projectile A 114 117 G4QIsotope* Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singleton … … 157 160 <<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 158 161 G4double abund=abuVector[j]; 159 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);162 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 160 163 #ifdef debug 161 164 G4cout<<"G4QLowEnergy::GetMeanFreePath:pair#"<<j<<",N="<<N<<",a="<<abund<<G4endl; 162 165 #endif 163 166 newAbund->push_back(pr); 164 }167 } 165 168 #ifdef debug 166 169 G4cout<<"G4QLowEnergy::GetMeanFreePath: pairVectLength="<<newAbund->size()<<G4endl; … … 189 192 G4cout<<"G4QLowE::GMFP:true,P="<<Momentum<<",Z="<<Z<<",N="<<N<<",PDG="<<pPDG<<G4endl; 190 193 #endif 191 G4bool ccsf=true; // Extract inelastic Ion-Ion cross-section194 G4bool ccsf=true; // Extract inelastic Ion-Ion cross-section 192 195 #ifdef debug 193 196 G4cout<<"G4QLowEnergy::GMFP: GetCS #1 j="<<j<<G4endl; … … 256 259 static G4bool CWinit = true; // CHIPS Warld needs to be initted 257 260 if(CWinit) 258 {261 { 259 262 CWinit=false; 260 263 G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max) … … 314 317 #ifdef debug 315 318 G4int prPDG=particle->GetPDGEncoding(); 316 G4cout<<"G4QLowEnergy::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;319 G4cout<<"G4QLowEnergy::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl; 317 320 #endif 318 321 if(!projPDG) … … 321 324 return 0; 322 325 } 323 // Element treatment326 // Element treatment 324 327 G4int EPIM=ElProbInMat.size(); 325 328 #ifdef debug 326 G4cout<<"G4QLowEn::PostStDoIt: m="<<EPIM<<", n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;329 G4cout<<"G4QLowEn::PostStDoIt: m="<<EPIM<<", n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 327 330 #endif 328 331 G4int i=0; … … 331 334 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 332 335 for(i=0; i<nE; ++i) 333 {334 #ifdef debug 335 G4cout<<"G4QLowEn::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl;336 { 337 #ifdef debug 338 G4cout<<"G4QLowEn::PostStepDoIt: EPM["<<i<<"]="<<ElProbInMat[i]<<", r="<<rnd<<G4endl; 336 339 #endif 337 340 if (rnd<ElProbInMat[i]) break; … … 342 345 G4int tZ=static_cast<G4int>(pElement->GetZ()); 343 346 #ifdef debug 344 G4cout<<"G4QLowEnergy::PostStepDoIt: i="<<i<<", Z(element)="<<tZ<<G4endl;347 G4cout<<"G4QLowEnergy::PostStepDoIt: i="<<i<<", Z(element)="<<tZ<<G4endl; 345 348 #endif 346 349 if(tZ<=0) … … 353 356 G4int nofIsot=SPI->size(); // #of isotopes in the element i 354 357 #ifdef debug 355 G4cout<<"G4QLowEnergy::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl;358 G4cout<<"G4QLowEnergy::PostStepDoIt: nI="<<nofIsot<<", T="<<(*SPI)[nofIsot-1]<<G4endl; 356 359 #endif 357 360 G4int j=0; … … 362 365 { 363 366 #ifdef debug 364 G4cout<<"G4QLowEnergy::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl;367 G4cout<<"G4QLowEnergy::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<",r="<<rndI<<G4endl; 365 368 #endif 366 369 if(rndI < (*SPI)[j]) break; … … 370 373 G4int tN =(*IsN)[j]; ; // Randomized number of neutrons 371 374 #ifdef debug 372 G4cout<<"G4QLowEnergy::PostStepDoIt: j="<<i<<", N(isotope)="<<tN<<", MeV="<<MeV<<G4endl;375 G4cout<<"G4QLowEnergy::PostStepDoIt: j="<<i<<", N(isotope)="<<tN<<", MeV="<<MeV<<G4endl; 373 376 #endif 374 377 if(tN<0) … … 451 454 // algorithm implementation --- STARTS HERE --- All calculations are in IU -------- 452 455 G4double totM=tot4M.m(); // total CMS mass of the reaction 453 G4int totN=tN+pN;456 G4int totN=tN+pN; 454 457 G4int totZ=tZ+pZ; 455 458 // @@ Here mass[i] can be calculated if mass=0 … … 980 983 if(!G4QHadron(tot4M).CopDecayIn3(fst4Mom,snd4Mom,res4Mom,dir4Mom,cosp)) 981 984 { // 982 G4cerr<<"**G4LowEnergy::PoStDoIt:i="<<index<<",tM="<<totM<<"->M1="<<res4Mom.m()<<"+M2="985 G4cerr<<"**G4LowEnergy::PoStDoIt:i="<<index<<",tM="<<totM<<"->M1="<<res4Mom.m()<<"+M2=" 983 986 <<fst4Mom.m()<<"+M3="<<snd4Mom.m()<<"=="<<res4Mom.m()+fst4Mom.m()+snd4Mom.m()<<G4endl; 984 987 throw G4QException("G4QLowEnergy::PostStepDoIt: Can't decay the Compound"); 985 } //988 } // 986 989 #ifdef debug 987 990 G4cout<<"G4QLowEn::PSDI:r4M="<<res4Mom<<",f4M="<<fst4Mom<<",s4M="<<snd4Mom<<G4endl; … … 1075 1078 { 1076 1079 CSmanager=G4QIonIonCrossSection::GetPointer(); 1080 if(PDG == 2212) CSmanager=G4QProtonNuclearCrossSection::GetPointer(); 1077 1081 first=false; 1078 1082 } 1079 1083 #ifdef debug 1080 G4cout<<"G4QLowE::CXS: *DONE* p="<<p<<",Z="<<Z<<",N="<<N<<",PDG="<<PDG<<G4endl;1084 G4cout<<"G4QLowE::CXS: *DONE* p="<<p<<",Z="<<Z<<",N="<<N<<",PDG="<<PDG<<G4endl; 1081 1085 #endif 1082 1086 return CSmanager->GetCrossSection(true, p, Z, N, PDG); -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QMuonNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QMuonNuclearCrossSection.cc,v 1.1 3 2008/10/24 19:24:59 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QMuonNuclearCrossSection.cc,v 1.15 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 38 38 // **************************************************************************************** 39 39 //========================================================================================= 40 // Short description: reaction cross-sections for muon-nuclear reactions, which 41 // are integrals over virtual equivalent photons photons. The muon-nuclear GHAD 42 // model (not CHIPS) gives 2-3 times smaller scattering angle and deposited energy. 43 // -------------------------------------------------------------------------------- 40 44 41 45 //#define debug … … 94 98 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 95 99 <<colN.size()<<G4endl; 96 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST100 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 97 101 #endif 98 102 if(std::abs(pPDG)!=13) … … 115 119 j = 0; // A#0f records found in DB for this projectile 116 120 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 117 { // The nucleus with projPDG is found in AMDB121 { // The nucleus with projPDG is found in AMDB 118 122 if(colN[i]==tgN && colZ[i]==tgZ) 119 {123 { 120 124 lastI=i; 121 125 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 134 138 lastP =colP [i]; // Last Momentum (A-dependent) 135 139 lastCS =colCS[i]; // Last CrossSect (A-dependent) 136 // if(std::fabs(lastP/pMom-1.)<tolerance)140 // if(std::fabs(lastP/pMom-1.)<tolerance) 137 141 if(lastP==pMom) // VI do not use tolerance 138 142 { … … 168 172 #endif 169 173 j++; // Increment a#0f records found in DB for this pPDG 170 }171 if(!in) // This nucleus has not been calculated previously172 {174 } 175 if(!in) // This nucleus has not been calculated previously 176 { 173 177 #ifdef pdebug 174 178 G4cout<<"G4QMNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 177 181 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 178 182 if(lastCS<=0.) 179 {183 { 180 184 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 181 185 #ifdef pdebug … … 189 193 lastTH=pEn; 190 194 } 191 }195 } 192 196 #ifdef pdebug 193 197 G4cout<<"G4QMNCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 205 209 #endif 206 210 return lastCS*millibarn; 207 } // End of creation of the new set of parameters211 } // End of creation of the new set of parameters 208 212 else 209 {213 { 210 214 #ifdef pdebug 211 215 G4cout<<"G4QMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 277 281 G4double mP= infEn; 278 282 if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1)) 279 mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV;// ResNucMass for a proton283 mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV;// ResNucMass for a proton 280 284 281 285 G4double mN= infEn; 282 286 if(N&&G4NucleiProperties::IsInStableTable(A-1,Z)) 283 mN = G4NucleiProperties::GetNuclearMass(A-1.,Z)/MeV; // ResNucMass for a neutron287 mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // ResNucMass for a neutron 284 288 285 289 G4double mA= infEn; 286 290 if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2)) 287 mA=G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV;// ResNucMass for an alpha291 mA=G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV; // ResNucMass for an alpha 288 292 289 293 G4double dP= mP +mProt - mT; … … 291 295 G4double dA= mA +mAlph - mT; 292 296 #ifdef pdebug 293 G4cout<<"G4QMuonNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="297 G4cout<<"G4QMuonNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA=" 294 298 <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl; 295 299 #endif … … 321 325 static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions 322 326 #ifdef pdebug 323 G4cout<<"G4QMuonNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();327 G4cout<<"G4QMuonNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size(); 324 328 if(J3.size()) G4cout<<", p="<<J3[0]; 325 329 G4cout<<G4endl; … … 333 337 lastE=TotEnergy-mmu; // Kinetic energy of the muon 334 338 #ifdef pdebug 335 G4cout<<"G4QMuonNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ339 G4cout<<"G4QMuonNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ 336 340 <<", N="<<targN<<", onlyCS="<<CS<<",E="<<lastE<<",th="<<EMi<<G4endl; 337 341 #endif … … 340 344 { 341 345 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 342 { // ...........................................========346 { // ...........................................======== 343 347 if (lastE<=EMi) // Energy is below the minimum energy in the table 344 348 { … … 347 351 lastSig=0.; 348 352 #ifdef pdebug 349 G4cout<<"--> G4QMuonNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl;353 G4cout<<"--> G4QMuonNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl; 350 354 #endif 351 355 return 0.; … … 356 360 lastF =colF[I]; // Last ZeroPosition in the J-functions 357 361 lastH =colH[I]; // Last High Energy Coefficient (A-dependent) 358 }359 else // This isotope wasn't calculated previously => CREATE360 { // ............................................=======362 } 363 else // This isotope wasn't calculated previously => CREATE 364 { // ............................................======= 361 365 lastJ1 = new G4double[nE]; // Allocate memory for the new J1 function 362 366 lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function … … 375 379 colF.push_back(lastF); 376 380 colH.push_back(lastH); 377 } // End of creation of the new set of parameters381 } // End of creation of the new set of parameters 378 382 } // End of parameters udate 379 383 // ============================== NOW Calculate the Cross Section ===================== … … 384 388 lastSig=0.; 385 389 #ifdef pdebug 386 G4cout<<"--> G4QMuonNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;390 G4cout<<"--> G4QMuonNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl; 387 391 #endif 388 392 return 0.; … … 398 402 #ifdef pdebug 399 403 G4cout<<"-->G4QMuonNuclearCS::CalcCrossSect:LOGfit b="<<blast<<",max="<<mL<<",lJ1=" 400 <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl;404 <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl; 401 405 #endif 402 406 if(blast<0) blast=0; … … 2572 2576 y[k]=P1[i][k]; // J1 2573 2577 z[k]=P2[i][k]; // J2 2574 }2578 } 2575 2579 r=L[i]; // Low channel for the J-functions 2576 2580 } … … 2595 2599 r=L[k]; 2596 2600 if(L[k1]<r) r=L[k1]; 2597 }2601 } 2598 2602 } 2599 2603 return r; … … 2629 2633 if(ris<Y[lastL]) // Search in the table 2630 2634 { 2631 G4int j=lastF;2635 G4int j=lastF; 2632 2636 G4double Yj=Y[j]; // It mast be 0 (some times just very small) 2633 2637 while (ris>Yj && j<lastL) // Associative search 2634 {2638 { 2635 2639 j++; 2636 2640 Yj=Y[j]; // High value 2637 }2641 } 2638 2642 G4int j1=j-1; 2639 2643 G4double Yi=Y[j1]; // Low value 2640 2644 phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE; 2641 2645 #ifdef debug 2642 G4cout<<"G4QMuNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi2646 G4cout<<"G4QMuNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi 2643 2647 <<",Y="<<Yj<<G4endl; 2644 2648 #endif … … 2650 2654 G4double f=(ris-Y[lastL])/lastH; // ScaledResidualValue of the cross-sec. integral 2651 2655 #ifdef pdebug 2652 G4cout<<"G4QMuNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;2656 G4cout<<"G4QMuNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl; 2653 2657 #endif 2654 2658 phLE=SolveTheEquation(f); // Solve equation to find theLog(phE) (comp lastLE) 2655 2659 #ifdef pdebug 2656 G4cout<<"G4QMuonNuclearCrossSection::GetExchangeEnergy:HighEnergy lphE="<<phLE<<G4endl;2660 G4cout<<"G4QMuonNuclearCrossSection::GetExchangeEnergy:HighEnergy lphE="<<phLE<<G4endl; 2657 2661 #endif 2658 2662 } … … 2701 2705 #endif 2702 2706 if(x>=lastLE) 2703 {2707 { 2704 2708 G4cerr<<"*G4QMuNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE 2705 2709 <<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl; … … 2789 2793 return 0.; 2790 2794 } 2791 G4double lK=std::log(K); // ln(K)2795 G4double lK=std::log(K); // ln(K) 2792 2796 G4double x=1.-K/nu; // This definitin saves one div. 2793 2797 G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor 2794 G4double b=std::exp(bp*(lK-blK0)); // b-factor2795 G4double c=std::exp(cp*(lK-clK0)); // c-factor2796 G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2)2797 G4double ef=std::exp(r*(b-c*r*r)); // exponential factor2798 G4double b=std::exp(bp*(lK-blK0)); // b-factor 2799 G4double c=std::exp(cp*(lK-clK0)); // c-factor 2800 G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2) 2801 G4double ef=std::exp(r*(b-c*r*r)); // exponential factor 2798 2802 return (1.-x)*ef/GD/GD; 2799 2803 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNeutronNuclearCrossSection.cc
r1007 r1055 26 26 // 27 27 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 34 34 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Feb-04 35 35 // -------------------------------------------------------------------------------- 36 // **************************************************************************************** 37 // ****** This CLASS is a property of the CHIPS hadronic package in Geant4 (M. Kosov) ***** 38 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch ********** 39 // **************************************************************************************** 36 // Short description: neutron-nuclear cross-section for hadronic CHIPS 37 // ------------------------------------------------------------------- 40 38 // 41 39 //#define debug … … 49 47 // Initialization of the 50 48 G4double* G4QNeutronNuclearCrossSection::lastLEN=0; // Pointer to the lastArray of LowEn CS 51 G4double* G4QNeutronNuclearCrossSection::lastHEN=0; // Pointer to the lastArray of HighE nCS49 G4double* G4QNeutronNuclearCrossSection::lastHEN=0; // Pointer to the lastArray of HighE CS 52 50 G4int G4QNeutronNuclearCrossSection::lastN=0; // The last N of calculated nucleus 53 51 G4int G4QNeutronNuclearCrossSection::lastZ=0; // The last Z of calculated nucleus … … 91 89 j = 0; // A#0f records found in DB for this projectile 92 90 if(lastI) for(G4int i=0; i<lastI; i++) // The partType is found 93 { // The nucleus with is found in AMDB91 { // The nucleus with is found in AMDB 94 92 if(colN[i]==tgN && colZ[i]==tgZ) 95 {93 { 96 94 lastI=i; 97 95 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 108 106 lastP =colP [i]; // Last Momentum (A-dependent) 109 107 lastCS =colCS[i]; // Last CrossSect (A-dependent) 110 // if(std::fabs(lastP/pMom-1.)<tolerance)108 // if(std::fabs(lastP/pMom-1.)<tolerance) 111 109 if(lastP==pMom) // VI do not use tolerance 112 110 { … … 140 138 #endif 141 139 j++; // Increment a#0f records found in DB 142 }143 if(!in) // This nucleus has not been calculated previously144 {140 } 141 if(!in) // This nucleus has not been calculated previously 142 { 145 143 #ifdef pdebug 146 144 G4cout<<"G4QNtCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 149 147 lastCS=CalculateCrossSection(fCS,0,j,2212,lastZ,lastN,pMom); //calculate & create 150 148 if(lastCS<=0.) 151 {149 { 152 150 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 153 151 #ifdef pdebug … … 161 159 lastTH=pEn; 162 160 } 163 }161 } 164 162 #ifdef pdebug 165 163 G4cout<<"G4QNtCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 174 172 #endif 175 173 return lastCS*millibarn; 176 } // End of creation of the new set of parameters174 } // End of creation of the new set of parameters 177 175 else 178 {176 { 179 177 #ifdef pdebug 180 178 G4cout<<"G4QNeutronNuclearCrossSect::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 228 226 static const G4double malP=std::log(Pmax);// High logarithm energy (each 2.75 percent) 229 227 static const G4double dlP=(malP-milP)/(nH-1); // Step in log energy in the HEN part 230 static const G4double milPG=std::log(.001*Pmin);// Low log arithm energy for the HEN part GeV/c228 static const G4double milPG=std::log(.001*Pmin);// Low logEnergy for the HEN part GeV/c 231 229 // 232 230 // Associative memory for acceleration … … 244 242 { 245 243 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 246 {244 { 247 245 lastLEN=LEN[I]; // Pointer to prepared LowEnergy cross sections 248 246 lastHEN=HEN[I]; // Pointer to prepared High Energy cross sections 249 247 } 250 else // This isotope wasn't calculated previously => CREATE251 {248 else // This isotope wasn't calculated previously => CREATE 249 { 252 250 lastLEN = new G4double[nL]; // Allocate memory for the new LEN cross sections 253 251 lastHEN = new G4double[nH]; // Allocate memory for the new HEN cross sections … … 271 269 LEN.push_back(lastLEN); // added LEN, found by AH 10/7/02 272 270 HEN.push_back(lastHEN); // added HEN, found by AH 10/7/02 273 } // End of creation of the new set of parameters271 } // End of creation of the new set of parameters 274 272 } // End of parameters udate 275 273 // ============================== NOW the Magic Formula ================================= … … 278 276 { 279 277 #ifdef debug 280 G4cout<<"G4QNeutCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl;278 G4cout<<"G4QNeutCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl; 281 279 #endif 282 280 if(A<=1.) sigma=0.; 283 281 else sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN); 284 282 #ifdef debugn 285 if(sigma<0.)283 if(sigma<0.) 286 284 G4cout<<"G4QNeutCS::CalcCS:A="<<A<<",E="<<Momentum<<",T="<<THmin<<",dP="<<dP<<G4endl; 287 285 #endif -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuENuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNuENuclearCrossSection.cc,v 1. 2 2007/11/01 16:09:38mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNuENuclearCrossSection.cc,v 1.4 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 37 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 38 38 // **************************************************************************************** 39 //========================================================================================= ======39 //========================================================================================= 40 40 41 41 //#define debug … … 90 90 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 91 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 93 #endif 94 94 if(pPDG!=12) … … 111 111 j = 0; // A#0f records found in DB for this projectile 112 112 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB113 { // The nucleus with projPDG is found in AMDB 114 114 if(colN[i]==tgN && colZ[i]==tgZ) 115 {115 { 116 116 lastI=i; 117 117 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 163 163 #endif 164 164 j++; // Increment a#0f records found in DB for this pPDG 165 }166 if(!in) // This nucleus has not been calculated previously167 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 168 168 #ifdef pdebug 169 169 G4cout<<"G4QNENCS::GetCrSec: CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 172 172 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 173 173 if(lastCS<=0.) 174 {174 { 175 175 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 176 176 #ifdef pdebug … … 184 184 lastTH=pEn; 185 185 } 186 }186 } 187 187 #ifdef pdebug 188 188 G4cout<<"G4QNENCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 200 200 #endif 201 201 return lastCS*millibarn; 202 } // End of creation of the new set of parameters202 } // End of creation of the new set of parameters 203 203 else 204 {204 { 205 205 #ifdef pdebug 206 206 G4cout<<"G4QNENCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 245 245 G4double G4QNuENuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int) 246 246 { 247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1 .,0.)/GeV;248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1 .,1.)/GeV;249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2 .,1.)/GeV/2.;247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV; 248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV; 249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.; 250 250 static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV) 251 251 static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV) … … 294 294 { 295 295 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 296 {296 { 297 297 lastTX =TX[I]; // Pointer to the prepared TX function (same isotope) 298 298 lastQE =QE[I]; // Pointer to the prepared QE function (same isotope) 299 }300 else // This isotope wasn't calculated previously => CREATE301 {299 } 300 else // This isotope wasn't calculated previously => CREATE 301 { 302 302 if(first) 303 303 { … … 315 315 TX.push_back(lastTX); 316 316 QE.push_back(lastQE); 317 } // End of creation of the new set of parameters317 } // End of creation of the new set of parameters 318 318 } // End of parameters udate 319 319 // ============================== NOW Calculate the Cross Section ===================== … … 330 330 G4int sep=ran; // as a result = an index of the left edge of the interval 331 331 while(ran>=2) 332 {332 { 333 333 G4int newran=ran/2; 334 334 if(lastE<=lastEN[sep]) sep-=newran; … … 382 382 static const G4int nE=65; // !! If change this, change it in CalculateCrossSection() !! 383 383 static const G4double nuEn[nE]={thresh, 384 .00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492,385 .00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646,386 .00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448,387 .00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806,388 .00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780,389 .04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200,390 .38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000,391 8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200};384 .00051331,.00053602,.00056078,.00058783,.00061743,.00064990,.00068559,.00072492, 385 .00076834,.00081641,.00086975,.00092912,.00099536,.00106950,.00115273,.00124646, 386 .00135235,.00147241,.00160901,.00176503,.00194392,.00214986,.00238797,.00266448, 387 .00298709,.00336531,.00381094,.00433879,.00496745,.00572047,.00662785,.00772806, 388 .00907075,.01072050,.01276190,.01530660,.01850330,.02255110,.02771990,.03437780, 389 .04303240,.05438970,.06944210,.08959920,.11688400,.15423600,.20597200,.27851200, 390 .38153100,.52979600,.74616300,1.0665200,1.5480900,2.2834800,3.4251100,5.2281000, 391 8.1270200,12.875900,20.808500,34.331200,57.877800,99.796200,176.16300,318.68200}; 392 392 static const G4double TOTX[nE]={0., 393 .00047551,.00162896,.00232785,.00292938,.00349456,.00404939,.00460908,.00518455,394 .00578488,.00641848,.00709376,.00781964,.00860585,.00946334,.01040460,.01144420,395 .01259910,.01388920,.01533830,.01697480,.01883260,.02095280,.02338500,.02618960,396 .02944060,.03322870,.03766580,.04289050,.04907540,.06123530,.07521120,.09034730,397 .10803800,.12856800,.15277600,.18174900,.21764300,.26083100,.31424900,.37935600,398 .45871900,.55375100,.66506600,.79039400,.92276600,1.0489000,1.1500300,1.2071700,399 1.2096800,1.1612200,1.0782900,.98251100,.89137400,.81472700,.75500100,.71061200,400 .67873900,.65619000,.64098400,.63085100,.62389900,.61664900,.61261000,.60635700};393 .00047551,.00162896,.00232785,.00292938,.00349456,.00404939,.00460908,.00518455, 394 .00578488,.00641848,.00709376,.00781964,.00860585,.00946334,.01040460,.01144420, 395 .01259910,.01388920,.01533830,.01697480,.01883260,.02095280,.02338500,.02618960, 396 .02944060,.03322870,.03766580,.04289050,.04907540,.06123530,.07521120,.09034730, 397 .10803800,.12856800,.15277600,.18174900,.21764300,.26083100,.31424900,.37935600, 398 .45871900,.55375100,.66506600,.79039400,.92276600,1.0489000,1.1500300,1.2071700, 399 1.2096800,1.1612200,1.0782900,.98251100,.89137400,.81472700,.75500100,.71061200, 400 .67873900,.65619000,.64098400,.63085100,.62389900,.61664900,.61261000,.60635700}; 401 401 static const G4double QELX[nE]={0., 402 2.44084e-7,8.73147e-7,1.30540e-6,1.72196e-6,2.15765e-6,2.63171e-6,3.15996e-6,3.75836e-6,403 4.44474e-6,5.24008e-6,6.16982e-6,7.26537e-6,8.56595e-6,1.01211e-5,1.19937e-5,1.42647e-5,404 1.70384e-5,2.04506e-5,2.46796e-5,2.99611e-5,3.66090e-5,4.50456e-5,5.58425e-5,6.97817e-5,405 8.79417e-5,.000111825,.000143542,.000186093,.000243780,.000350295,.000498489,.000698209,406 .000979989,.001378320,.001949710,.002781960,.004027110,.005882030,.008710940,.013041400,407 .019739800,.030118300,.046183600,.070818700,.107857000,.161778000,.236873000,.336212000,408 .455841000,.565128000,.647837000,.701208000,.729735000,.742062000,.746495000,.748182000,409 .749481000,.750637000,.751471000,.752237000,.752763000,.753103000,.753159000,.753315000};402 2.44084e-7,8.73147e-7,1.30540e-6,1.72196e-6,2.15765e-6,2.63171e-6,3.15996e-6,3.75836e-6, 403 4.44474e-6,5.24008e-6,6.16982e-6,7.26537e-6,8.56595e-6,1.01211e-5,1.19937e-5,1.42647e-5, 404 1.70384e-5,2.04506e-5,2.46796e-5,2.99611e-5,3.66090e-5,4.50456e-5,5.58425e-5,6.97817e-5, 405 8.79417e-5,.000111825,.000143542,.000186093,.000243780,.000350295,.000498489,.000698209, 406 .000979989,.001378320,.001949710,.002781960,.004027110,.005882030,.008710940,.013041400, 407 .019739800,.030118300,.046183600,.070818700,.107857000,.161778000,.236873000,.336212000, 408 .455841000,.565128000,.647837000,.701208000,.729735000,.742062000,.746495000,.748182000, 409 .749481000,.750637000,.751471000,.752237000,.752763000,.753103000,.753159000,.753315000}; 410 410 411 411 // -------------------------------- 412 412 G4int first=0; 413 413 if(z<0.) 414 {414 { 415 415 first=1; 416 416 z=-z; … … 431 431 t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection 432 432 q[k]=QELX[k]*dn/a; // QuasiElasticCrossSection 433 }433 } 434 434 return first; 435 435 } … … 450 450 // Reversed table 451 451 static const G4double Xl[nQ2]={1.87905e-10, 452 .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071,.062374,453 .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147,.145069,454 .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886,.239718,455 .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808,.341169,456 .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987,.446670,457 .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828,.554720,458 .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424,.664457,459 .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233,.775366,460 .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920,.887128,461 .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271,.999539};452 .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374, 453 .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069, 454 .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718, 455 .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169, 456 .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670, 457 .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720, 458 .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457, 459 .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366, 460 .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128, 461 .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539}; 462 462 // Direct table 463 463 static const G4double Xmax=Xl[lQ2]; … … 465 465 static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2) 466 466 static const G4double inl[nQ2]={0, 467 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583,14.7811,468 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538,25.9039,469 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058,35.9876,470 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484,45.5950,471 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120,54.9377,472 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040,64.1162,473 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822,73.1852,474 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804,82.1767,475 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194,91.1106,476 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128,100.000};467 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811, 468 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039, 469 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876, 470 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950, 471 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377, 472 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162, 473 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852, 474 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767, 475 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106, 476 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000}; 477 477 G4double Enu=lastE; // Get energy of the last calculated cross-section 478 478 G4double dEnu=Enu+Enu; // doubled energy of nu/anu … … 541 541 // Reversed table 542 542 static const G4double X0[nX]={6.14081e-05, 543 .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539,2.03244,544 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589,4.77419};543 .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244, 544 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419}; 545 545 static const G4double X1[nX]={.00125268, 546 .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308,4.23049,547 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299,9.77330};546 .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049, 547 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330}; 548 548 static const G4double X2[nX]={.015694, 549 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384,9.68728,550 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626,21.7276};549 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728, 550 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276}; 551 551 static const G4double X3[nX]={.0866877, 552 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351,19.6302,553 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590,41.9115};552 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302, 553 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115}; 554 554 static const G4double X4[nX]={.160483, 555 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318,27.4127,556 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732,54.4265};555 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127, 556 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265}; 557 557 static const G4double X5[nX]={.0999307, 558 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855,24.3398,559 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290,44.4649};558 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398, 559 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649}; 560 560 static const G4double X6[nX]={.0276367, 561 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257,15.6519,562 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765,26.7148};561 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519, 562 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148}; 563 563 static const G4double X7[nX]={.00472383, 564 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720,8.86473,565 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577,14.5057};564 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473, 565 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057}; 566 566 static const G4double X8[nX]={.000630783, 567 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725,5.08480,568 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232,8.13037};567 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480, 568 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037}; 569 569 static const G4double X9[nX]={7.49179e-05, 570 .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322,3.14823,571 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025,4.97028};570 .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823, 571 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028}; 572 572 static const G4double XA[nX]={8.43437e-06, 573 .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956,2.13704,574 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248,3.23607, 3.34823};573 .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704, 574 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823}; 575 575 static const G4double XB[nX]={9.27028e-07, 576 .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979,1.58059,577 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960,2.38206, 2.46341};576 .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059, 577 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341}; 578 578 static const G4double XC[nX]={1.00807e-07, 579 .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712,1.25668,580 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193,1.88650, 1.95014};579 .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668, 580 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014}; 581 581 static const G4double XD[nX]={1.09102e-08, 582 .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243,1.05878,583 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338,1.63617};582 .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878, 583 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617}; 584 584 static const G4double XE[nX]={1.17831e-09, 585 .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208,.933374,586 .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347,1.38996, 1.43571};585 .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374, 586 .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571}; 587 587 static const G4double XF[nX]={1.27141e-10, 588 .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494,.852046,589 .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246,1.30338};588 .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046, 589 .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338}; 590 590 static const G4double XG[nX]={1.3713e-11, 591 .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239,.798870,592 .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827,1.17637, 1.21379};591 .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870, 592 .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379}; 593 593 static const G4double XH[nX]={1.47877e-12, 594 .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647,.764421,595 .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182,1.11724, 1.15197};594 .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421, 595 .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197}; 596 596 static const G4double XI[nX]={1.59454e-13, 597 .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213,.742806,598 .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614,1.10872};597 .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806, 598 .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872}; 599 599 static const G4double XJ[nX]={1.71931e-14, 600 .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302,.730147,601 .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592,1.04737, 1.07813};600 .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147, 601 .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813}; 602 602 // Direct table 603 603 static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0], … … 612 612 {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ}; 613 613 static const G4double I0[nX]={0, 614 .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840,12.0555,615 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314,19.8501, 20.0000};614 .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555, 615 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000}; 616 616 static const G4double I1[nX]={0, 617 .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780,11.8365,618 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286,19.7946, 20.0000};617 .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365, 618 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000}; 619 619 static const G4double I2[nX]={0, 620 .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232,11.4586,621 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501,19.6982, 20.0000};620 .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586, 621 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000}; 622 622 static const G4double I3[nX]={0, 623 .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840,10.8461,624 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603,19.5417, 20.0000};623 .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461, 624 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000}; 625 625 static const G4double I4[nX]={0, 626 .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991,9.94515,627 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398,19.3148, 20.0000};626 .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515, 627 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000}; 628 628 static const G4double I5[nX]={0, 629 .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422,8.89040,630 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517,19.0515, 20.0000};629 .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040, 630 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000}; 631 631 static const G4double I6[nX]={0, 632 .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724,7.99243,633 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337,18.8258, 20.0000};632 .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243, 633 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000}; 634 634 static const G4double I7[nX]={0, 635 .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654,7.40717,636 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576,18.6767, 20.0000};635 .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717, 636 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000}; 637 637 static const G4double I8[nX]={0, 638 .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395,7.07415,639 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985,18.5906, 20.0000};638 .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415, 639 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000}; 640 640 static const G4double I9[nX]={0, 641 .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837,6.88672,642 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080,18.5415, 20.0000};641 .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672, 642 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000}; 643 643 static const G4double IA[nX]={0, 644 .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163,6.77265,645 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525,18.5115, 20.0000};644 .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265, 645 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000}; 646 646 static const G4double IB[nX]={0, 647 .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711,6.69298,648 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137,18.4905, 20.0000};647 .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298, 648 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000}; 649 649 static const G4double IC[nX]={0, 650 .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531,6.62696,651 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817,18.4731, 20.0000};650 .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696, 651 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000}; 652 652 static const G4double ID[nX]={0, 653 .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456,6.56212,654 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504,18.4562, 20.0000};653 .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212, 654 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000}; 655 655 static const G4double IE[nX]={0, 656 .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644,6.48949,657 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156,18.4374, 20.0000};656 .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949, 657 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000}; 658 658 static const G4double IF[nX]={0, 659 .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401,6.40164,660 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737,18.4146, 20.0000};659 .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164, 660 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000}; 661 661 static const G4double IG[nX]={0, 662 .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158,6.29249,663 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216,18.3865, 20.0000};662 .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249, 663 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000}; 664 664 static const G4double IH[nX]={0, 665 .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543,6.15804,666 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573,18.3517, 20.0000};665 .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804, 666 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000}; 667 667 static const G4double II[nX]={0, 668 .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467,5.99722,669 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099,20.0000};668 .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722, 669 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000}; 670 670 static const G4double IJ[nX]={0, 671 .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126,5.81196,672 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902,18.2612, 20.0000};671 .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196, 672 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000}; 673 673 static const G4double* Il[nE]= 674 674 {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ}; 675 675 static const G4double lE[nE]={ 676 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499,1.68292,677 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426,5.76218};676 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292, 677 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218}; 678 678 static const G4double lEmi=lE[0]; 679 679 static const G4double lEma=lE[nE-1]; 680 680 static const G4double dlE=(lEma-lEmi)/bE; 681 //***************************************************************************************681 //*************************************************************************************** 682 682 G4double Enu=lastE; // Get energy of the last calculated cross-section 683 683 G4double lEn=std::log(Enu); // log(E) for interpolation -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuMuNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNuMuNuclearCrossSection.cc,v 1.1 2 2007/11/01 16:09:38mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNuMuNuclearCrossSection.cc,v 1.14 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // G4 Physics class: G4QNuMuNuclearCrossSection for gamma+A cross sections31 // G4 Physics class: G4QNuMuNuclearCrossSection for (nu,mu-)A cross sections 32 32 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03 … … 37 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 38 38 // **************************************************************************************** 39 //========================================================================================= ======39 //========================================================================================= 40 40 41 41 //#define debug … … 90 90 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 91 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 93 #endif 94 94 if(pPDG!=14) … … 111 111 j = 0; // A#0f records found in DB for this projectile 112 112 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB113 { // The nucleus with projPDG is found in AMDB 114 114 if(colN[i]==tgN && colZ[i]==tgZ) 115 {115 { 116 116 lastI=i; 117 117 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 163 163 #endif 164 164 j++; // Increment a#0f records found in DB for this pPDG 165 }166 if(!in) // This nucleus has not been calculated previously167 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 168 168 #ifdef pdebug 169 169 G4cout<<"G4QNMNCS::GetCrSec: CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 172 172 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 173 173 if(lastCS<=0.) 174 {174 { 175 175 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 176 176 #ifdef pdebug … … 184 184 lastTH=pEn; 185 185 } 186 }186 } 187 187 #ifdef pdebug 188 188 G4cout<<"G4QNMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 200 200 #endif 201 201 return lastCS*millibarn; 202 } // End of creation of the new set of parameters202 } // End of creation of the new set of parameters 203 203 else 204 {204 { 205 205 #ifdef pdebug 206 206 G4cout<<"G4QNMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 245 245 G4double G4QNuMuNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N, G4int) 246 246 { 247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1 .,0.)/GeV;248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1 .,1.)/GeV;249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2 .,1.)/GeV/2.;247 //static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/GeV; 248 //static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/GeV; 249 //static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2,1)/GeV/2.; 250 250 static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV) 251 251 static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV) … … 294 294 { 295 295 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 296 {296 { 297 297 lastTX =TX[I]; // Pointer to the prepared TX function (same isotope) 298 298 lastQE =QE[I]; // Pointer to the prepared QE function (same isotope) 299 }300 else // This isotope wasn't calculated previously => CREATE301 {299 } 300 else // This isotope wasn't calculated previously => CREATE 301 { 302 302 if(first) 303 303 { … … 315 315 TX.push_back(lastTX); 316 316 QE.push_back(lastQE); 317 } // End of creation of the new set of parameters317 } // End of creation of the new set of parameters 318 318 } // End of parameters udate 319 319 // ============================== NOW Calculate the Cross Section ===================== … … 330 330 G4int sep=ran; // as a result = an index of the left edge of the interval 331 331 while(ran>=2) 332 {332 { 333 333 G4int newran=ran/2; 334 334 if(lastE<=lastEN[sep]) sep-=newran; … … 382 382 static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !! 383 383 static const G4double nuEn[nE]={thresh, 384 .112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838,385 .169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789,386 .306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893,387 .703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390,388 2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606,389 12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201,390 128.036,170.085,228.220,309.420};384 .112039,.116079,.120416,.125076,.130090,.135494,.141324,.147626,.154445,.161838, 385 .169864,.178594,.188105,.198485,.209836,.222272,.235923,.250941,.267497,.285789, 386 .306045,.328530,.353552,.381466,.412689,.447710,.487101,.531538,.581820,.638893, 387 .703886,.778147,.863293,.961275,1.07445,1.20567,1.35843,1.53701,1.74667,1.99390, 388 2.28679,2.63542,3.05245,3.55386,4.15990,4.89644,5.79665,6.90336,8.27224,9.97606, 389 12.1106,14.8029,18.2223,22.5968,28.2351,35.5587,45.1481,57.8086,74.6682,97.3201, 390 128.036,170.085,228.220,309.420}; 391 391 static const G4double TOTX[nE]={0., 392 .108618,.352160,.476083,.566575,.639014,.699871,.752634,.799407,.841524,.879844, 393 .914908,.947050,.976456,1.00321,1.02734,1.04881,1.06755,1.08349,1.09653,1.10657, 394 1.11355,1.11739,1.11806,1.11556,1.10992,1.10124,1.08964,1.07532,1.05851,1.03950, 395 1.01859,.996169,.972593,.948454,.923773,.899081,.874713,.850965,.828082,.806265, 396 .785659,.766367,.748450,.731936,.716824,.703098,.690723,.679652,.669829,.661187, 397 .653306,.646682,.640986,.636125,.631993,.628479,.625458,.622800,.620364,.616231, 398 .614986,.612563,.609807,.606511}; 399 392 .108618,.352160,.476083,.566575,.639014,.699871,.752634,.799407,.841524,.879844, 393 .914908,.947050,.976456,1.00321,1.02734,1.04881,1.06755,1.08349,1.09653,1.10657, 394 1.11355,1.11739,1.11806,1.11556,1.10992,1.10124,1.08964,1.07532,1.05851,1.03950, 395 1.01859,.996169,.972593,.948454,.923773,.899081,.874713,.850965,.828082,.806265, 396 .785659,.766367,.748450,.731936,.716824,.703098,.690723,.679652,.669829,.661187, 397 .653306,.646682,.640986,.636125,.631993,.628479,.625458,.622800,.620364,.616231, 398 .614986,.612563,.609807,.606511}; 400 399 static const G4double QELX[nE]={0., 401 .012170,.040879,.057328,.070865,.083129,.094828,.106366,.118013,.129970,.142392,402 .155410,.169138,.183676,.199123,.215573,.233120,.251860,.271891,.293317,.316246,403 .340796,.367096,.395292,.425547,.458036,.491832,.524989,.556457,.585692,.612377,404 .636544,.657790,.676260,.692007,.705323,.716105,.724694,.731347,.736340,.740172,405 .742783,.744584,.745804,.746829,.747479,.747995,.748436,.749047,.749497,.749925,406 .750486,.750902,.751268,.751566,.752026,.752266,.752428,.752761,.752873,.753094,407 .753161,.753164,.753340,.753321};400 .012170,.040879,.057328,.070865,.083129,.094828,.106366,.118013,.129970,.142392, 401 .155410,.169138,.183676,.199123,.215573,.233120,.251860,.271891,.293317,.316246, 402 .340796,.367096,.395292,.425547,.458036,.491832,.524989,.556457,.585692,.612377, 403 .636544,.657790,.676260,.692007,.705323,.716105,.724694,.731347,.736340,.740172, 404 .742783,.744584,.745804,.746829,.747479,.747995,.748436,.749047,.749497,.749925, 405 .750486,.750902,.751268,.751566,.752026,.752266,.752428,.752761,.752873,.753094, 406 .753161,.753164,.753340,.753321}; 408 407 // -------------------------------- 409 408 G4int first=0; 410 409 if(z<0.) 411 {410 { 412 411 first=1; 413 412 z=-z; … … 428 427 t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection 429 428 q[k]=QELX[k]*dn/a; // QuasiElasticCrossSection 430 }429 } 431 430 return first; 432 431 } … … 447 446 // Reversed table 448 447 static const G4double Xl[nQ2]={1.87905e-10, 449 .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071,.062374,450 .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147,.145069,451 .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886,.239718,452 .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808,.341169,453 .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987,.446670,454 .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828,.554720,455 .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424,.664457,456 .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233,.775366,457 .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920,.887128,458 .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271,.999539};448 .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374, 449 .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069, 450 .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718, 451 .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169, 452 .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670, 453 .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720, 454 .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457, 455 .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366, 456 .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128, 457 .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539}; 459 458 // Direct table 460 459 static const G4double Xmax=Xl[lQ2]; … … 462 461 static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2) 463 462 static const G4double inl[nQ2]={0, 464 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583,14.7811,465 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538,25.9039,466 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058,35.9876,467 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484,45.5950,468 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120,54.9377,469 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040,64.1162,470 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822,73.1852,471 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804,82.1767,472 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194,91.1106,473 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128,100.000};463 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811, 464 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039, 465 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876, 466 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950, 467 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377, 468 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162, 469 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852, 470 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767, 471 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106, 472 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000}; 474 473 G4double Enu=lastE; // Get energy of the last calculated cross-section 475 474 G4double dEnu=Enu+Enu; // doubled energy of nu/anu … … 538 537 // Reversed table 539 538 static const G4double X0[nX]={6.14081e-05, 540 .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539,2.03244,541 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589,4.77419};539 .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244, 540 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419}; 542 541 static const G4double X1[nX]={.00125268, 543 .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308,4.23049,544 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299,9.77330};542 .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049, 543 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330}; 545 544 static const G4double X2[nX]={.015694, 546 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384,9.68728,547 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626,21.7276};545 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728, 546 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276}; 548 547 static const G4double X3[nX]={.0866877, 549 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351,19.6302,550 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590,41.9115};548 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302, 549 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115}; 551 550 static const G4double X4[nX]={.160483, 552 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318,27.4127,553 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732,54.4265};551 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127, 552 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265}; 554 553 static const G4double X5[nX]={.0999307, 555 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855,24.3398,556 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290,44.4649};554 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398, 555 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649}; 557 556 static const G4double X6[nX]={.0276367, 558 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257,15.6519,559 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765,26.7148};557 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519, 558 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148}; 560 559 static const G4double X7[nX]={.00472383, 561 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720,8.86473,562 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577,14.5057};560 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473, 561 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057}; 563 562 static const G4double X8[nX]={.000630783, 564 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725,5.08480,565 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232,8.13037};563 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480, 564 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037}; 566 565 static const G4double X9[nX]={7.49179e-05, 567 .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322,3.14823,568 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025,4.97028};566 .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823, 567 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028}; 569 568 static const G4double XA[nX]={8.43437e-06, 570 .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956,2.13704,571 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248,3.23607, 3.34823};569 .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704, 570 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823}; 572 571 static const G4double XB[nX]={9.27028e-07, 573 .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979,1.58059,574 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960,2.38206, 2.46341};572 .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059, 573 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341}; 575 574 static const G4double XC[nX]={1.00807e-07, 576 .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712,1.25668,577 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193,1.88650, 1.95014};575 .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668, 576 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014}; 578 577 static const G4double XD[nX]={1.09102e-08, 579 .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243,1.05878,580 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338,1.63617};578 .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878, 579 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617}; 581 580 static const G4double XE[nX]={1.17831e-09, 582 .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208,.933374,583 .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347,1.38996, 1.43571};581 .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374, 582 .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571}; 584 583 static const G4double XF[nX]={1.27141e-10, 585 .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494,.852046,586 .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246,1.30338};584 .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046, 585 .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338}; 587 586 static const G4double XG[nX]={1.3713e-11, 588 .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239,.798870,589 .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827,1.17637, 1.21379};587 .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870, 588 .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379}; 590 589 static const G4double XH[nX]={1.47877e-12, 591 .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647,.764421,592 .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182,1.11724, 1.15197};590 .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421, 591 .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197}; 593 592 static const G4double XI[nX]={1.59454e-13, 594 .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213,.742806,595 .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614,1.10872};593 .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806, 594 .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872}; 596 595 static const G4double XJ[nX]={1.71931e-14, 597 .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302,.730147,598 .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592,1.04737, 1.07813};596 .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147, 597 .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813}; 599 598 // Direct table 600 599 static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0], … … 609 608 {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ}; 610 609 static const G4double I0[nX]={0, 611 .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840,12.0555,612 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314,19.8501, 20.0000};610 .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555, 611 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000}; 613 612 static const G4double I1[nX]={0, 614 .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780,11.8365,615 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286,19.7946, 20.0000};613 .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365, 614 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000}; 616 615 static const G4double I2[nX]={0, 617 .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232,11.4586,618 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501,19.6982, 20.0000};616 .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586, 617 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000}; 619 618 static const G4double I3[nX]={0, 620 .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840,10.8461,621 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603,19.5417, 20.0000};619 .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461, 620 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000}; 622 621 static const G4double I4[nX]={0, 623 .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991,9.94515,624 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398,19.3148, 20.0000};622 .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515, 623 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000}; 625 624 static const G4double I5[nX]={0, 626 .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422,8.89040,627 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517,19.0515, 20.0000};625 .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040, 626 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000}; 628 627 static const G4double I6[nX]={0, 629 .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724,7.99243,630 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337,18.8258, 20.0000};628 .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243, 629 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000}; 631 630 static const G4double I7[nX]={0, 632 .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654,7.40717,633 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576,18.6767, 20.0000};631 .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717, 632 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000}; 634 633 static const G4double I8[nX]={0, 635 .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395,7.07415,636 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985,18.5906, 20.0000};634 .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415, 635 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000}; 637 636 static const G4double I9[nX]={0, 638 .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837,6.88672,639 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080,18.5415, 20.0000};637 .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672, 638 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000}; 640 639 static const G4double IA[nX]={0, 641 .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163,6.77265,642 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525,18.5115, 20.0000};640 .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265, 641 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000}; 643 642 static const G4double IB[nX]={0, 644 .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711,6.69298,645 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137,18.4905, 20.0000};643 .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298, 644 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000}; 646 645 static const G4double IC[nX]={0, 647 .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531,6.62696,648 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817,18.4731, 20.0000};646 .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696, 647 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000}; 649 648 static const G4double ID[nX]={0, 650 .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456,6.56212,651 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504,18.4562, 20.0000};649 .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212, 650 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000}; 652 651 static const G4double IE[nX]={0, 653 .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644,6.48949,654 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156,18.4374, 20.0000};652 .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949, 653 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000}; 655 654 static const G4double IF[nX]={0, 656 .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401,6.40164,657 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737,18.4146, 20.0000};655 .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164, 656 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000}; 658 657 static const G4double IG[nX]={0, 659 .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158,6.29249,660 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216,18.3865, 20.0000};658 .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249, 659 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000}; 661 660 static const G4double IH[nX]={0, 662 .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543,6.15804,663 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573,18.3517, 20.0000};661 .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804, 662 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000}; 664 663 static const G4double II[nX]={0, 665 .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467,5.99722,666 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099,20.0000};664 .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722, 665 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000}; 667 666 static const G4double IJ[nX]={0, 668 .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126,5.81196,669 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902,18.2612, 20.0000};667 .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196, 668 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000}; 670 669 static const G4double* Il[nE]= 671 670 {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ}; 672 671 static const G4double lE[nE]={ 673 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499,1.68292,674 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426,5.76218};672 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292, 673 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218}; 675 674 static const G4double lEmi=lE[0]; 676 675 static const G4double lEma=lE[nE-1]; 677 676 static const G4double dlE=(lEma-lEmi)/bE; 678 //***************************************************************************************677 //*************************************************************************************** 679 678 G4double Enu=lastE; // Get energy of the last calculated cross-section 680 679 G4double lEn=std::log(Enu); // log(E) for interpolation -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QNuNuNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QNuNuNuclearCrossSection.cc,v 1. 2 2007/11/02 15:57:16mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QNuNuNuclearCrossSection.cc,v 1.3 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 // G4 Physics class: G4QNuNuNuclearCrossSection for gamma+A cross sections31 // G4 Physics class: G4QNuNuNuclearCrossSection for (nu,nu)A cross sections 32 32 // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03 … … 37 37 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 38 38 // **************************************************************************************** 39 //========================================================================================= ======39 //========================================================================================= 40 40 41 41 //#define debug … … 90 90 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 91 91 <<colN.size()<<G4endl; 92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST92 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 93 93 #endif 94 94 if(pPDG!=14) … … 111 111 j = 0; // A#0f records found in DB for this projectile 112 112 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 113 { // The nucleus with projPDG is found in AMDB113 { // The nucleus with projPDG is found in AMDB 114 114 if(colN[i]==tgN && colZ[i]==tgZ) 115 {115 { 116 116 lastI=i; 117 117 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 163 163 #endif 164 164 j++; // Increment a#0f records found in DB for this pPDG 165 }166 if(!in) // This nucleus has not been calculated previously167 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 168 168 #ifdef pdebug 169 169 G4cout<<"G4QNMNCS::GetCrSec: CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 172 172 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 173 173 if(lastCS<=0.) 174 {174 { 175 175 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 176 176 #ifdef pdebug … … 184 184 lastTH=pEn; 185 185 } 186 }186 } 187 187 #ifdef pdebug 188 188 G4cout<<"G4QNMNCS::GetCrosSec:New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 200 200 #endif 201 201 return lastCS*millibarn; 202 } // End of creation of the new set of parameters202 } // End of creation of the new set of parameters 203 203 else 204 {204 { 205 205 #ifdef pdebug 206 206 G4cout<<"G4QNMNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 274 274 { 275 275 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 276 {276 { 277 277 lastTX =TX[I]; // Pointer to the prepared TX function (same isotope) 278 278 lastQE =QE[I]; // Pointer to the prepared QE function (same isotope) 279 }280 else // This isotope wasn't calculated previously => CREATE281 {279 } 280 else // This isotope wasn't calculated previously => CREATE 281 { 282 282 if(first) 283 283 { … … 295 295 TX.push_back(lastTX); 296 296 QE.push_back(lastQE); 297 } // End of creation of the new set of parameters297 } // End of creation of the new set of parameters 298 298 } // End of parameters udate 299 299 // ============================== NOW Calculate the Cross Section ===================== … … 310 310 G4int sep=ran; // as a result = an index of the left edge of the interval 311 311 while(ran>=2) 312 {312 { 313 313 G4int newran=ran/2; 314 314 if(lastE<=lastEN[sep]) sep-=newran; … … 357 357 static const G4int nE=65; // !! If change this, change it in GetCrossSection() (*.cc) !! 358 358 static const G4double nuEn[nE]={0., 359 1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5,360 1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5,361 3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5,362 7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926,363 .000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930,364 .002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900,365 .035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000,366 2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000};359 1.00463e-5,1.05336e-5,1.10692e-5,1.16592e-5,1.23109e-5,1.30323e-5,1.38331e-5,1.47245e-5, 360 1.57194e-5,1.68335e-5,1.80848e-5,1.94948e-5,2.10894e-5,2.28991e-5,2.49608e-5,2.73189e-5, 361 3.00273e-5,3.31516e-5,3.67722e-5,4.09881e-5,4.59217e-5,5.17255e-5,5.85908e-5,6.67583e-5, 362 7.65338e-5,8.83078e-5,.000102583,.000120011,.000141441,.000167995,.000201160,.000242926, 363 .000295985,.000364008,.000452051,.000567152,.000719210,.000922307,.001196710,.001571930, 364 .002091530,.002820590,.003857810,.005354930,.007548840,.010815300,.015760100,.023376900, 365 .035325600,.054430800,.085595700,.137508000,.225898000,.379892000,.654712000,1.15767000, 366 2.10277000,3.92843000,7.55861000,14.9991000,30.7412000,65.1734000,143.155000,326.326000}; 367 367 static const G4double TOTX[nE]={0., 368 3.18319e-5,3.33759e-5,3.50729e-5,3.69425e-5,3.90071e-5,4.12928e-5,4.38300e-5,4.66541e-5,369 4.98065e-5,5.33360e-5,5.73004e-5,6.17678e-5,6.68196e-5,7.25529e-5,7.90845e-5,8.65551e-5,370 9.51355e-5,.000105033,.000116503,.000129858,.000145486,.000163871,.000185616,.000211484,371 .000242444,.000279730,.000324932,.000380110,.000447953,.000531999,.000636946,.000769076,372 .000936873,.001151900,.001430050,.001793410,.002272980,.002912690,.003775490,.004952530,373 .006577150,.008846400,.012054100,.017404800,.027443300,.040285600,.058251500,.084054600,374 .121309000,.173273000,.240200000,.312865000,.367478000,.379071000,.348461000,.301143000,375 .259802000,.231449000,.214007000,.203827000,.198265000,.195186000,.192821000,.190555000};368 3.18319e-5,3.33759e-5,3.50729e-5,3.69425e-5,3.90071e-5,4.12928e-5,4.38300e-5,4.66541e-5, 369 4.98065e-5,5.33360e-5,5.73004e-5,6.17678e-5,6.68196e-5,7.25529e-5,7.90845e-5,8.65551e-5, 370 9.51355e-5,.000105033,.000116503,.000129858,.000145486,.000163871,.000185616,.000211484, 371 .000242444,.000279730,.000324932,.000380110,.000447953,.000531999,.000636946,.000769076, 372 .000936873,.001151900,.001430050,.001793410,.002272980,.002912690,.003775490,.004952530, 373 .006577150,.008846400,.012054100,.017404800,.027443300,.040285600,.058251500,.084054600, 374 .121309000,.173273000,.240200000,.312865000,.367478000,.379071000,.348461000,.301143000, 375 .259802000,.231449000,.214007000,.203827000,.198265000,.195186000,.192821000,.190555000}; 376 376 static const G4double QELX[nE]={0., 377 .319793e-9,.351567e-9,.388228e-9,.430721e-9,.480212e-9,.538141e-9,.606306e-9,.686956e-9,378 .782930e-9,.897832e-9,1.03626e-9,1.20415e-9,1.40918e-9,1.66139e-9,1.97401e-9,2.36458e-9,379 2.85666e-9,3.48202e-9,4.28408e-9,5.32264e-9,6.68098e-9,8.47630e-9,1.08754e-8,1.41183e-8,380 1.85552e-8,2.47023e-8,3.33325e-8,4.56172e-8,6.33590e-8,8.93735e-8,1.28128e-7,1.86829e-7,381 2.77301e-7,4.19300e-7,6.46455e-7,1.01714e-6,1.63475e-6,2.68640e-6,4.51816e-6,7.78503e-6,382 1.37563e-5,2.49521e-5,4.65025e-5,9.32015e-5,.000207165,.000435700,.000918046,.001964940,383 .004285300,.009431390,.020560100,.043021600,.083012600,.142280000,.194239000,.222213000,384 .231903000,.234030000,.234691000,.235204000,.235575000,.235793000,.235902000,.235946000};377 .319793e-9,.351567e-9,.388228e-9,.430721e-9,.480212e-9,.538141e-9,.606306e-9,.686956e-9, 378 .782930e-9,.897832e-9,1.03626e-9,1.20415e-9,1.40918e-9,1.66139e-9,1.97401e-9,2.36458e-9, 379 2.85666e-9,3.48202e-9,4.28408e-9,5.32264e-9,6.68098e-9,8.47630e-9,1.08754e-8,1.41183e-8, 380 1.85552e-8,2.47023e-8,3.33325e-8,4.56172e-8,6.33590e-8,8.93735e-8,1.28128e-7,1.86829e-7, 381 2.77301e-7,4.19300e-7,6.46455e-7,1.01714e-6,1.63475e-6,2.68640e-6,4.51816e-6,7.78503e-6, 382 1.37563e-5,2.49521e-5,4.65025e-5,9.32015e-5,.000207165,.000435700,.000918046,.001964940, 383 .004285300,.009431390,.020560100,.043021600,.083012600,.142280000,.194239000,.222213000, 384 .231903000,.234030000,.234691000,.235204000,.235575000,.235793000,.235902000,.235946000}; 385 385 // -------------------------------- 386 386 G4int first=0; 387 387 if(z<0.) 388 {388 { 389 389 first=1; 390 390 z=-z; … … 405 405 t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection 406 406 q[k]=QELX[k]*dn/a; // QuasiElasticCrossSection 407 }407 } 408 408 return first; 409 409 } … … 420 420 // Reversed table 421 421 static const G4double Xl[nQ2]={1.87905e-10, 422 .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071,.062374,423 .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147,.145069,424 .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886,.239718,425 .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808,.341169,426 .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987,.446670,427 .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828,.554720,428 .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424,.664457,429 .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233,.775366,430 .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920,.887128,431 .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271,.999539};422 .005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374, 423 .069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069, 424 .154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718, 425 .249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169, 426 .351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670, 427 .457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720, 428 .565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457, 429 .675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366, 430 .786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128, 431 .898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539}; 432 432 // Direct table 433 433 static const G4double Xmax=Xl[lQ2]; … … 435 435 static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2) 436 436 static const G4double inl[nQ2]={0, 437 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583,14.7811,438 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538,25.9039,439 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058,35.9876,440 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484,45.5950,441 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120,54.9377,442 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040,64.1162,443 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822,73.1852,444 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804,82.1767,445 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194,91.1106,446 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128,100.000};437 1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811, 438 15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039, 439 26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876, 440 36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950, 441 46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377, 442 55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162, 443 65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852, 444 74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767, 445 83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106, 446 92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000}; 447 447 G4double Enu=lastE; // Get energy of the last calculated cross-section 448 448 G4double dEnu=Enu+Enu; // doubled energy of nu/anu … … 503 503 // Reversed table 504 504 static const G4double X0[nX]={6.14081e-05, 505 .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539,2.03244,506 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589,4.77419};505 .413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244, 506 2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419}; 507 507 static const G4double X1[nX]={.00125268, 508 .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308,4.23049,509 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299,9.77330};508 .861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049, 509 4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330}; 510 510 static const G4double X2[nX]={.015694, 511 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384,9.68728,512 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626,21.7276};511 1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728, 512 10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276}; 513 513 static const G4double X3[nX]={.0866877, 514 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351,19.6302,515 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590,41.9115};514 4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302, 515 21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115}; 516 516 static const G4double X4[nX]={.160483, 517 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318,27.4127,518 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732,54.4265};517 5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127, 518 29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265}; 519 519 static const G4double X5[nX]={.0999307, 520 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855,24.3398,521 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290,44.4649};520 5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398, 521 26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649}; 522 522 static const G4double X6[nX]={.0276367, 523 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257,15.6519,524 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765,26.7148};523 3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519, 524 16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148}; 525 525 static const G4double X7[nX]={.00472383, 526 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720,8.86473,527 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577,14.5057};526 2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473, 527 9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057}; 528 528 static const G4double X8[nX]={.000630783, 529 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725,5.08480,530 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232,8.13037};529 1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480, 530 5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037}; 531 531 static const G4double X9[nX]={7.49179e-05, 532 .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322,3.14823,533 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025,4.97028};532 .772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823, 533 3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028}; 534 534 static const G4double XA[nX]={8.43437e-06, 535 .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956,2.13704,536 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248,3.23607, 3.34823};535 .530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704, 536 2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823}; 537 537 static const G4double XB[nX]={9.27028e-07, 538 .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979,1.58059,539 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960,2.38206, 2.46341};538 .395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059, 539 1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341}; 540 540 static const G4double XC[nX]={1.00807e-07, 541 .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712,1.25668,542 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193,1.88650, 1.95014};541 .316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668, 542 1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014}; 543 543 static const G4double XD[nX]={1.09102e-08, 544 .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243,1.05878,545 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338,1.63617};544 .268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878, 545 1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617}; 546 546 static const G4double XE[nX]={1.17831e-09, 547 .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208,.933374,548 .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347,1.38996, 1.43571};547 .238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374, 548 .989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571}; 549 549 static const G4double XF[nX]={1.27141e-10, 550 .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494,.852046,551 .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246,1.30338};550 .219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046, 551 .902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338}; 552 552 static const G4double XG[nX]={1.3713e-11, 553 .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239,.798870,554 .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827,1.17637, 1.21379};553 .208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870, 554 .845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379}; 555 555 static const G4double XH[nX]={1.47877e-12, 556 .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647,.764421,557 .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182,1.11724, 1.15197};556 .203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421, 557 .808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197}; 558 558 static const G4double XI[nX]={1.59454e-13, 559 .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213,.742806,560 .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614,1.10872};559 .201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806, 560 .784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872}; 561 561 static const G4double XJ[nX]={1.71931e-14, 562 .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302,.730147,563 .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592,1.04737, 1.07813};562 .202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147, 563 .770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813}; 564 564 // Direct table 565 565 static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0], … … 574 574 {X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ}; 575 575 static const G4double I0[nX]={0, 576 .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840,12.0555,577 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314,19.8501, 20.0000};576 .411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555, 577 13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000}; 578 578 static const G4double I1[nX]={0, 579 .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780,11.8365,580 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286,19.7946, 20.0000};579 .401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365, 580 13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000}; 581 581 static const G4double I2[nX]={0, 582 .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232,11.4586,583 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501,19.6982, 20.0000};582 .387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586, 583 12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000}; 584 584 static const G4double I3[nX]={0, 585 .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840,10.8461,586 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603,19.5417, 20.0000};585 .366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461, 586 12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000}; 587 587 static const G4double I4[nX]={0, 588 .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991,9.94515,589 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398,19.3148, 20.0000};588 .321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515, 589 11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000}; 590 590 static const G4double I5[nX]={0, 591 .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422,8.89040,592 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517,19.0515, 20.0000};591 .257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040, 592 10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000}; 593 593 static const G4double I6[nX]={0, 594 .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724,7.99243,595 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337,18.8258, 20.0000};594 .201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243, 595 9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000}; 596 596 static const G4double I7[nX]={0, 597 .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654,7.40717,598 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576,18.6767, 20.0000};597 .168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717, 598 8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000}; 599 599 static const G4double I8[nX]={0, 600 .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395,7.07415,601 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985,18.5906, 20.0000};600 .150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415, 601 8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000}; 602 602 static const G4double I9[nX]={0, 603 .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837,6.88672,604 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080,18.5415, 20.0000};603 .141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672, 604 8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000}; 605 605 static const G4double IA[nX]={0, 606 .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163,6.77265,607 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525,18.5115, 20.0000};606 .136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265, 607 7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000}; 608 608 static const G4double IB[nX]={0, 609 .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711,6.69298,610 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137,18.4905, 20.0000};609 .132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298, 610 7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000}; 611 611 static const G4double IC[nX]={0, 612 .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531,6.62696,613 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817,18.4731, 20.0000};612 .129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696, 613 7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000}; 614 614 static const G4double ID[nX]={0, 615 .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456,6.56212,616 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504,18.4562, 20.0000};615 .126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212, 616 7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000}; 617 617 static const G4double IE[nX]={0, 618 .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644,6.48949,619 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156,18.4374, 20.0000};618 .122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949, 619 7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000}; 620 620 static const G4double IF[nX]={0, 621 .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401,6.40164,622 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737,18.4146, 20.0000};621 .118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164, 622 7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000}; 623 623 static const G4double IG[nX]={0, 624 .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158,6.29249,625 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216,18.3865, 20.0000};624 .112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249, 625 7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000}; 626 626 static const G4double IH[nX]={0, 627 .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543,6.15804,628 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573,18.3517, 20.0000};627 .106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804, 628 7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000}; 629 629 static const G4double II[nX]={0, 630 .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467,5.99722,631 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099,20.0000};630 .098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722, 631 7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000}; 632 632 static const G4double IJ[nX]={0, 633 .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126,5.81196,634 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902,18.2612, 20.0000};633 .089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196, 634 6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000}; 635 635 static const G4double* Il[nE]= 636 636 {I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ}; 637 637 static const G4double lE[nE]={ 638 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499,1.68292,639 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426,5.76218};638 -1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292, 639 2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218}; 640 640 static const G4double lEmi=lE[0]; 641 641 static const G4double lEma=lE[nE-1]; 642 642 static const G4double dlE=(lEma-lEmi)/bE; 643 //***************************************************************************************643 //*************************************************************************************** 644 644 G4double Enu=lastE; // Get energy of the last calculated cross-section 645 645 G4double lEn=std::log(Enu); // log(E) for interpolation … … 727 727 } 728 728 729 // This class can provide only virtual exchange pi+ (a substitute for W+boson)729 // This class can provide only virtual exchange gamma (a substitute for Z0 boson) 730 730 G4int G4QNuNuNuclearCrossSection::GetExchangePDGCode() {return 22;} -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QPhotonNuclearCrossSection.cc
r1007 r1055 26 26 // 27 27 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 36 36 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 37 37 // **************************************************************************************** 38 // 38 // Short description: This is an original CHIPS process for photo-nuclear 39 // interactions, which does not include "fast and dirty" corrections for 40 // reactions near threshold, with respect to the GHAD application of CHIPS. 41 // ------------------------------------------------------------------------ 42 39 43 //#define debug 40 44 //#define pdebug … … 85 89 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 86 90 <<colN.size()<<G4endl; 87 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST91 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 88 92 #endif 89 93 if(!pPDG) … … 106 110 j = 0; // A#0f records found in DB for this projectile 107 111 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 108 { // The nucleus with projPDG is found in AMDB112 { // The nucleus with projPDG is found in AMDB 109 113 if(colN[i]==tgN && colZ[i]==tgZ) 110 {114 { 111 115 lastI=i; 112 116 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 125 129 lastP =colP [i]; // Last Momentum (A-dependent) 126 130 lastCS =colCS[i]; // Last CrossSect (A-dependent) 127 // if(std::fabs(lastP/pMom-1.)<tolerance) // VI do not use tolerance131 // if(std::fabs(lastP/pMom-1.)<tolerance) // VI do not use tolerance 128 132 if(lastP == pMom) 129 133 { … … 159 163 #endif 160 164 j++; // Increment a#0f records found in DB for this pPDG 161 }162 if(!in) // This nucleus has not been calculated previously163 {165 } 166 if(!in) // This nucleus has not been calculated previously 167 { 164 168 #ifdef pdebug 165 169 G4cout<<"G4QPhCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 168 172 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 169 173 if(lastCS<=0.) 170 {174 { 171 175 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 172 176 #ifdef pdebug … … 180 184 lastTH=pEn; 181 185 } 182 }186 } 183 187 #ifdef pdebug 184 188 G4cout<<"G4QPhCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 196 200 #endif 197 201 return lastCS*millibarn; 198 } // End of creation of the new set of parameters202 } // End of creation of the new set of parameters 199 203 else 200 {204 { 201 205 #ifdef pdebug 202 206 G4cout<<"G4QPrCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 266 270 G4double mP= infEn; 267 271 if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1)) 268 mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV;// ResNucMass for a proton272 mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV;// ResNucMass for a proton 269 273 270 274 G4double mN= infEn; 271 275 if(N&&G4NucleiProperties::IsInStableTable(A-1,Z)) 272 mN = G4NucleiProperties::GetNuclearMass(A-1.,Z)/MeV; // ResNucMass for a neutron276 mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // ResNucMass for a neutron 273 277 274 278 G4double mA= infEn; 275 279 if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2)) 276 mA=G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV;// ResNucMass for an alpha280 mA=G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV; // ResNucMass for an alpha 277 281 278 282 G4double dP= mP +mProt - mT; … … 280 284 G4double dA= mA +mAlph - mT; 281 285 #ifdef pdebug 282 G4cout<<"G4QPhotoNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="286 G4cout<<"G4QPhotoNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA=" 283 287 <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl; 284 288 #endif … … 293 297 { 294 298 #ifdef pdebug 295 G4cout<<"G4QPhotonNucCrossSection::CalculateCrossSection: ***Called***"<<G4endl;299 G4cout<<"G4QPhotonNucCrossSection::CalculateCrossSection: ***Called***"<<G4endl; 296 300 #endif 297 301 static const G4double THmin=2.; // minimum Energy Threshold … … 320 324 onlyCS=CS; // Flag to calculate only CS (not Si/Bi) 321 325 #ifdef pdebug 322 G4cout<<"G4QPhotonNucCS::CalcCS: P="<<Energy<<", F="<<F<<", I="<<I<<", Z="<<targZ326 G4cout<<"G4QPhotonNucCS::CalcCS: P="<<Energy<<", F="<<F<<", I="<<I<<", Z="<<targZ 323 327 <<", N="<<targN<<", onlyCS="<<CS<<",E="<<Energy<<",th="<<THmin<<G4endl; 324 328 if(F==-27) return 0.; … … 329 333 lastSig=0.; 330 334 #ifdef pdebug 331 G4cout<<"---> G4QMuonNucCS::CalcCS: CS=0 as E="<<Energy<<" < "<<THmin<<G4endl;335 G4cout<<"---> G4QMuonNucCS::CalcCS: CS=0 as E="<<Energy<<" < "<<THmin<<G4endl; 332 336 #endif 333 337 return 0.; // @@ This can be dangerouse for the heaviest nuc.! … … 338 342 { 339 343 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 340 {344 { 341 345 lastGDR=GDR[I]; // Pointer to prepared GDR cross sections 342 346 lastHEN=HEN[I]; // Pointer to prepared High Energy cross sections 343 347 lastSP =spA[I]; // Shadowing coefficient for UHE 344 348 } 345 else // This isotope wasn't calculated previously => CREATE346 {349 else // This isotope wasn't calculated previously => CREATE 350 { 347 351 G4double lnA=std::log(A); // The nucleus is not found in DB. It is new. 348 352 if(A==1.) lastSP=1.; // The Reggeon shadowing (A=1) … … 357 361 lastHEN = new G4double[nH]; // Allocate memory for the new HEN cross sections 358 362 G4int er=GetFunctions(A,lastGDR,lastHEN);// set newZeroPosition and fill theFunctions 359 if(er<1) G4cerr<<"***G4QPhotNucCrosSec::CalcCrossSection: A="<<A<<" failed"<<G4endl;363 if(er<1) G4cerr<<"***G4QPhotNucCrosSec::CalcCrossSection: A="<<A<<" failed"<<G4endl; 360 364 #ifdef debug 361 365 G4cout<<"G4QPhotonNuclearCrossSec::CalcCS:**GDR/HEN're made** GetFunEr="<<er<<G4endl; … … 367 371 HEN.push_back(lastHEN); // added HEN, found by AH 10/7/02 368 372 spA.push_back(lastSP); // Pomeron Shadowing 369 } // End of creation of the new set of parameters373 } // End of creation of the new set of parameters 370 374 } // End of parameters udate 371 375 // ============================== NOW the Magic Formula ================================= … … 374 378 { 375 379 #ifdef debug 376 G4cout<<"G4QPhNCS::CalcCS:bGDR A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dE="<<dE<<G4endl;380 G4cout<<"G4QPhNCS::CalcCS:bGDR A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dE="<<dE<<G4endl; 377 381 #endif 378 382 if(A<=1.) sigma=0.; 379 383 else sigma=EquLinearFit(Energy,nL,THmin,dE,lastGDR); 380 384 #ifdef debugn 381 if(sigma<0.)385 if(sigma<0.) 382 386 G4cout<<"G4QPhoNucCS::CalcCS:A="<<A<<",E="<<Energy<<",T="<<THmin<<",dE="<<dE<<G4endl; 383 387 #endif … … 569 573 static const G4double SL9[nL]={ 570 574 3.243985e-4,1.122034e-3,3.000932e-3,6.850212e-3,1.414720e-2,2.751937e-2,5.204925e-2, 571 9.887958e-2,1.966468e-1,4.282973e-1,1.041076e+0,2.706630e+0,6.509565e+0,1.085114e+1,572 1.162472e+1,1.124054e+1,1.202416e+1,1.402207e+1,1.659634e+1,1.891975e+1,2.032292e+1,573 2.059083e+1,1.993672e+1,1.873926e+1,1.732572e+1,1.590211e+1,1.457097e+1,1.336993e+1,574 1.230272e+1,1.135820e+1,1.052046e+1,9.773672e+0,9.103884e+0,8.499562e+0,7.951408e+0,575 7.451996e+0,6.995366e+0,6.576679e+0,6.191930e+0,5.837748e+0,5.511235e+0,5.209864e+0,576 4.931401e+0,4.673850e+0,4.435420e+0,4.214488e+0,4.009588e+0,3.819384e+0,3.642664e+0,577 3.478323e+0,3.325356e+0,3.182848e+0,3.049964e+0,2.925943e+0,2.810093e+0,2.701782e+0,578 2.600432e+0,2.505518e+0,2.416558e+0,2.333114e+0,2.254783e+0,2.181197e+0,2.112021e+0,579 2.046943e+0,1.985682e+0,1.927976e+0,1.873586e+0,1.822292e+0,1.773891e+0,1.728195e+0,580 1.685032e+0,1.644242e+0,1.605677e+0,1.569201e+0,1.534686e+0,1.502017e+0,1.471082e+0,581 1.441781e+0,1.414020e+0,1.387711e+0,1.362772e+0,1.339127e+0,1.316705e+0,1.295438e+0,582 1.275266e+0,1.256130e+0,1.237976e+0,1.220753e+0,1.204413e+0,1.188912e+0,1.174209e+0,583 1.160265e+0,1.147042e+0,1.134507e+0,1.122628e+0,1.111376e+0,1.100721e+0,1.090639e+0,584 1.081106e+0,1.072098e+0,1.063597e+0,1.055582e+0,1.048036e+0,1.040943e+0,1.034290e+0};575 9.887958e-2,1.966468e-1,4.282973e-1,1.041076e+0,2.706630e+0,6.509565e+0,1.085114e+1, 576 1.162472e+1,1.124054e+1,1.202416e+1,1.402207e+1,1.659634e+1,1.891975e+1,2.032292e+1, 577 2.059083e+1,1.993672e+1,1.873926e+1,1.732572e+1,1.590211e+1,1.457097e+1,1.336993e+1, 578 1.230272e+1,1.135820e+1,1.052046e+1,9.773672e+0,9.103884e+0,8.499562e+0,7.951408e+0, 579 7.451996e+0,6.995366e+0,6.576679e+0,6.191930e+0,5.837748e+0,5.511235e+0,5.209864e+0, 580 4.931401e+0,4.673850e+0,4.435420e+0,4.214488e+0,4.009588e+0,3.819384e+0,3.642664e+0, 581 3.478323e+0,3.325356e+0,3.182848e+0,3.049964e+0,2.925943e+0,2.810093e+0,2.701782e+0, 582 2.600432e+0,2.505518e+0,2.416558e+0,2.333114e+0,2.254783e+0,2.181197e+0,2.112021e+0, 583 2.046943e+0,1.985682e+0,1.927976e+0,1.873586e+0,1.822292e+0,1.773891e+0,1.728195e+0, 584 1.685032e+0,1.644242e+0,1.605677e+0,1.569201e+0,1.534686e+0,1.502017e+0,1.471082e+0, 585 1.441781e+0,1.414020e+0,1.387711e+0,1.362772e+0,1.339127e+0,1.316705e+0,1.295438e+0, 586 1.275266e+0,1.256130e+0,1.237976e+0,1.220753e+0,1.204413e+0,1.188912e+0,1.174209e+0, 587 1.160265e+0,1.147042e+0,1.134507e+0,1.122628e+0,1.111376e+0,1.100721e+0,1.090639e+0, 588 1.081106e+0,1.072098e+0,1.063597e+0,1.055582e+0,1.048036e+0,1.040943e+0,1.034290e+0}; 585 589 static const G4double SL10[nL]={ 586 590 4.311217e-4,1.384716e-3,3.549518e-3,7.988549e-3,1.667330e-2,3.341344e-2,6.552895e-2, … … 713 717 static const G4double SL18[nL]={ 714 718 2.220534e-3,5.640053e-3,1.253572e-2,2.881392e-2,7.191580e-2,1.859408e-1,4.687157e-1, 715 1.115760e+0,2.485562e+0,5.183559e+0,1.013008e+1,1.847496e+1,3.103145e+1,4.701870e+1,716 6.345164e+1,7.777111e+1,8.950804e+1,9.321427e+1,8.410731e+1,6.975786e+1,5.670984e+1,717 4.641759e+1,3.856198e+1,3.257293e+1,2.796698e+1,2.438084e+1,2.154901e+1,1.927832e+1,718 1.742802e+1,1.589540e+1,1.460538e+1,1.350313e+1,1.254846e+1,1.171188e+1,1.097157e+1,719 1.031123e+1,9.718498e+0,9.183826e+0,8.699693e+0,8.260038e+0,7.859873e+0,7.495011e+0,720 7.161876e+0,6.857372e+0,6.578785e+0,6.323715e+0,6.090025e+0,5.875801e+0,5.679326e+0,721 5.499048e+0,5.333567e+0,5.181614e+0,5.042039e+0,4.913795e+0,4.795932e+0,4.687583e+0,722 4.587960e+0,4.496341e+0,4.412068e+0,4.334539e+0,4.263201e+0,4.197551e+0,4.137125e+0,723 4.081496e+0,4.030275e+0,3.983101e+0,3.939643e+0,3.899598e+0,3.862684e+0,3.828641e+0,724 3.797233e+0,3.768237e+0,3.741451e+0,3.716686e+0,3.693770e+0,3.672542e+0,3.652854e+0,725 3.634571e+0,3.617565e+0,3.601721e+0,3.586931e+0,3.573099e+0,3.560132e+0,3.547947e+0,726 3.536470e+0,3.525629e+0,3.515361e+0,3.505610e+0,3.496321e+0,3.487449e+0,3.478950e+0,727 3.470787e+0,3.462928e+0,3.455342e+0,3.448006e+0,3.440898e+0,3.434002e+0,3.427303e+0,728 3.420792e+0,3.414463e+0,3.408314e+0,3.402345e+0,3.396560e+0,3.390968e+0,3.385579e+0};719 1.115760e+0,2.485562e+0,5.183559e+0,1.013008e+1,1.847496e+1,3.103145e+1,4.701870e+1, 720 6.345164e+1,7.777111e+1,8.950804e+1,9.321427e+1,8.410731e+1,6.975786e+1,5.670984e+1, 721 4.641759e+1,3.856198e+1,3.257293e+1,2.796698e+1,2.438084e+1,2.154901e+1,1.927832e+1, 722 1.742802e+1,1.589540e+1,1.460538e+1,1.350313e+1,1.254846e+1,1.171188e+1,1.097157e+1, 723 1.031123e+1,9.718498e+0,9.183826e+0,8.699693e+0,8.260038e+0,7.859873e+0,7.495011e+0, 724 7.161876e+0,6.857372e+0,6.578785e+0,6.323715e+0,6.090025e+0,5.875801e+0,5.679326e+0, 725 5.499048e+0,5.333567e+0,5.181614e+0,5.042039e+0,4.913795e+0,4.795932e+0,4.687583e+0, 726 4.587960e+0,4.496341e+0,4.412068e+0,4.334539e+0,4.263201e+0,4.197551e+0,4.137125e+0, 727 4.081496e+0,4.030275e+0,3.983101e+0,3.939643e+0,3.899598e+0,3.862684e+0,3.828641e+0, 728 3.797233e+0,3.768237e+0,3.741451e+0,3.716686e+0,3.693770e+0,3.672542e+0,3.652854e+0, 729 3.634571e+0,3.617565e+0,3.601721e+0,3.586931e+0,3.573099e+0,3.560132e+0,3.547947e+0, 730 3.536470e+0,3.525629e+0,3.515361e+0,3.505610e+0,3.496321e+0,3.487449e+0,3.478950e+0, 731 3.470787e+0,3.462928e+0,3.455342e+0,3.448006e+0,3.440898e+0,3.434002e+0,3.427303e+0, 732 3.420792e+0,3.414463e+0,3.408314e+0,3.402345e+0,3.396560e+0,3.390968e+0,3.385579e+0}; 729 733 static const G4double SL19[nL]={ 730 734 2.305897e-3,5.842654e-3,1.297593e-2,2.991119e-2,7.506153e-2,1.950960e-1,4.938019e-1, -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QProtonNuclearCrossSection.cc
r1007 r1055 26 26 // 27 27 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 37 37 // *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch ********** 38 38 // **************************************************************************************** 39 // Short description: CHIPS cross-sections for proton-nuclear interactions 40 // ----------------------------------------------------------------------- 39 41 // 40 42 //#define debug … … 68 70 G4int tgZ, G4int tgN, G4int) 69 71 { 70 static G4int j; // A#0f records found in DB for this projectile 72 static G4double tolerance=0.001; // Tolerance (0.1%) to consider as "the same mom" 73 static G4int j; // A#0f Z/N-records already tested in AMDB 71 74 static std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops) 72 75 static std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops) … … 75 78 static std::vector <G4double> colCS; // Vector of last cross sections for the reaction 76 79 // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---*** 77 G4double pEn=pMom; 78 #ifdef pdebug 80 #ifdef debug 79 81 G4cout<<"G4QPrCS::GetCS:>>> f="<<fCS<<", p="<<pMom<<", Z="<<tgZ<<"("<<lastZ<<") ,N="<<tgN 80 <<"("<<lastN<<"),PDG=2212, P="<<pEn<<"("<<lastTH<<")"<<",Sz="<<colN.size()<<G4endl;82 <<"("<<lastN<<"),PDG=2212, thresh="<<lastTH<<",Sz="<<colN.size()<<G4endl; 81 83 #endif 82 84 G4bool in=false; // By default the isotope must be found in the AMDB … … 89 91 lastI = colN.size(); // Size of the Associative Memory DB in the heap 90 92 j = 0; // A#0f records found in DB for this projectile 91 if(lastI) for(G4int i=0; i<lastI; i++) // The partType is found 92 { // The nucleus with is found in AMDB 93 if(colN[i]==tgN && colZ[i]==tgZ) 94 { 95 lastI=i; 96 lastTH =colTH[i]; // Last THreshold (A-dependent) 97 #ifdef pdebug 93 #ifdef debug 94 G4cout<<"G4QPrCS::GetCS: the amount of records in the AMDB lastI="<<lastI<<G4endl; 95 #endif 96 if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope 97 { 98 if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB 99 { 100 lastI=i; // Remember the index for future fast/last use 101 lastTH =colTH[i]; // The last THreshold (A-dependent) 102 #ifdef debug 98 103 G4cout<<"G4QPrCS::GetCS:*Found* P="<<pMom<<",Threshold="<<lastTH<<",j="<<j<<G4endl; 99 104 #endif 100 if(p En<=lastTH)105 if(pMom<=lastTH) 101 106 { 102 #ifdef pdebug103 G4cout<<"G4QP rCS::GetCS:Found T="<<pEn<<" < Threshold="<<lastTH<<",CS=0"<<G4endl;104 #endif 105 return 0.; // Energy is below the Threshold value107 #ifdef debug 108 G4cout<<"G4QPCS::GetCS:Found,P="<<pMom<<" < Threshold="<<lastTH<<",CS=0"<<G4endl; 109 #endif 110 return 0.; // Energy is below the Threshold value 106 111 } 107 lastP =colP [i]; // Last Momentum (A-dependent)108 lastCS =colCS[i]; // Last CrossSect (A-dependent)109 // if(std::fabs(lastP/pMom-1.)<tolerance)110 if(lastP==pMom)// VI do not use tolerance112 lastP =colP [i]; // Last Momentum (A-dependent) 113 lastCS =colCS[i]; // Last CrossSect (A-dependent) 114 if(std::fabs(lastP-pMom)<tolerance*pMom) 115 //if(lastP==pMom) // VI do not use tolerance 111 116 { 112 #ifdef pdebug113 G4cout<<" G4QPrCS::GetCS:P="<<pMom<<",CS="<<lastCS*millibarn<<G4endl;114 #endif 115 CalculateCrossSection(fCS,-1,j,2212,lastZ,lastN,pMom); // Update param's only117 #ifdef debug 118 G4cout<<"..G4QPrCS::GetCS:.DoNothing.P="<<pMom<<",CS="<<lastCS*millibarn<<G4endl; 119 #endif 120 //CalculateCrossSection(fCS,-1,j,2212,lastZ,lastN,pMom); // Update param's only 116 121 return lastCS*millibarn; // Use theLastCS 117 122 } 118 in = true; // This is the case when the isotop is found in DB123 in = true; // This is the case when the isotop is found in DB 119 124 // Momentum pMom is in IU ! @@ Units 120 #ifdef pdebug125 #ifdef debug 121 126 G4cout<<"G4QPrCS::G:UpdatDB P="<<pMom<<",f="<<fCS<<",lI="<<lastI<<",j="<<j<<G4endl; 122 127 #endif 123 128 lastCS=CalculateCrossSection(fCS,-1,j,2212,lastZ,lastN,pMom); // read & update 124 #ifdef pdebug129 #ifdef debug 125 130 G4cout<<"G4QPrCS::GetCrosSec: *****> New (inDB) Calculated CS="<<lastCS<<G4endl; 126 131 #endif 127 if(lastCS<=0. && p En>lastTH) // Correct the threshold132 if(lastCS<=0. && pMom>lastTH) // Correct the threshold (@@ No intermediate Zeros) 128 133 { 129 #ifdef pdebug 130 G4cout<<"G4QPrCS::GetCS: New T="<<pEn<<"(CS=0) > Threshold="<<lastTH<<G4endl; 131 #endif 132 lastTH=pEn; 134 #ifdef debug 135 G4cout<<"G4QPrCS::GetCS: New P="<<pMom<<"(CS=0) > Threshold="<<lastTH<<G4endl; 136 #endif 137 lastCS=0.; 138 lastTH=pMom; 133 139 } 134 break; // Go out of the LOOP135 } 136 #ifdef pdebug140 break; // Go out of the LOOP 141 } 142 #ifdef debug 137 143 G4cout<<"-->G4QPrCrossSec::GetCrosSec: pPDG=2212, j="<<j<<", N="<<colN[i] 138 144 <<",Z["<<i<<"]="<<colZ[i]<<G4endl; 139 145 #endif 140 146 j++; // Increment a#0f records found in DB 141 } 142 if(!in) // This nucleus has not been calculated previously 143 { 144 #ifdef pdebug 145 G4cout<<"G4QPrCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; 147 } 148 #ifdef debug 149 G4cout<<"-?-G4QPrCS::GetCS:RC Z="<<tgZ<<",N="<<tgN<<",in="<<in<<",j="<<j<<" ?"<<G4endl; 150 #endif 151 if(!in) // This isotope has not been calculated previously 152 { 153 #ifdef debug 154 G4cout<<"^^^G4QPrCS::GetCS:CalcNew P="<<pMom<<", f="<<fCS<<", lastI="<<lastI<<G4endl; 146 155 #endif 147 156 //!!The slave functions must provide cross-sections in millibarns (mb) !! (not in IU) 148 157 lastCS=CalculateCrossSection(fCS,0,j,2212,lastZ,lastN,pMom); //calculate & create 149 if(lastCS<=0.) 150 { 158 if(lastCS>0.) // It means that the AMBD was initialized 159 { 160 151 161 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 152 #ifdef pdebug 153 G4cout<<"G4QPrCrossSection::GetCrossSect: NewThresh="<<lastTH<<",T="<<pEn<<G4endl; 154 #endif 155 if(pEn>lastTH) 156 { 157 #ifdef pdebug 158 G4cout<<"G4QPrCS::GetCS: First T="<<pEn<<"(CS=0) > Threshold="<<lastTH<<G4endl; 159 #endif 160 lastTH=pEn; 161 } 162 } 163 #ifdef pdebug 164 G4cout<<"G4QPrCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; 165 #endif 166 colN.push_back(tgN); 167 colZ.push_back(tgZ); 168 colP.push_back(pMom); 169 colTH.push_back(lastTH); 170 colCS.push_back(lastCS); 162 #ifdef debug 163 G4cout<<"G4QPrCrossSection::GetCrossSect: NewThresh="<<lastTH<<",P="<<pMom<<G4endl; 164 #endif 165 colN.push_back(tgN); 166 colZ.push_back(tgZ); 167 colP.push_back(pMom); 168 colTH.push_back(lastTH); 169 colCS.push_back(lastCS); 170 #ifdef debug 171 G4cout<<"G4QPrCS::GetCrosSec:recCS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; 172 #endif 173 } 171 174 #ifdef pdebug 172 175 G4cout<<"G4QPrCS::GetCS:1st,P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl; 173 176 #endif 174 177 return lastCS*millibarn; 175 } // End of creation of the new set of parameters178 } // End of creation of the new set of parameters 176 179 else 177 {178 #ifdef pdebug180 { 181 #ifdef debug 179 182 G4cout<<"G4QPrCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; 180 183 #endif … … 183 186 } 184 187 } // End of parameters udate 185 else if(p En<=lastTH)186 { 187 #ifdef pdebug188 G4cout<<"G4QPrCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;188 else if(pMom<=lastTH) 189 { 190 #ifdef debug 191 G4cout<<"G4QPrCS::GetCS: Current P="<<pMom<<" < Threshold="<<lastTH<<", CS=0"<<G4endl; 189 192 #endif 190 193 return 0.; // Momentum is below the Threshold Value -> CS=0 191 194 } 192 // else if(std::fabs(lastP/pMom-1.)<tolerance)193 else if(lastP==pMom)// VI do not use tolerance194 { 195 #ifdef pdebug196 G4cout<<" G4QPrCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<",CS="<<lastCS*millibarn<<G4endl;197 #endif 198 return lastCS*millibarn; // Use theLastCS199 } 200 else 201 { 202 #ifdef pdebug203 G4cout<<" G4QPrCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;204 #endif 205 lastCS=CalculateCrossSection(fCS,1,j,2212,lastZ,lastN,pMom); // Only UpdateDB195 else if(std::fabs(lastP-pMom)<tolerance*pMom) 196 //else if(lastP==pMom) // VI do not use tolerance 197 { 198 #ifdef debug 199 G4cout<<"..G4QPCS::GetCS:OldNZ&P="<<lastP<<"="<<pMom<<",CS="<<lastCS*millibarn<<G4endl; 200 #endif 201 return lastCS*millibarn; // Use theLastCS 202 } 203 else // It is the last used -> use the current tables 204 { 205 #ifdef debug 206 G4cout<<"-!-G4QPCS::GetCS:UseCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl; 207 #endif 208 lastCS=CalculateCrossSection(fCS,1,j,2212,lastZ,lastN,pMom); // Only read and UpdateDB 206 209 lastP=pMom; 207 210 } 208 #ifdef pdebug209 G4cout<<" G4QPrCS::GetCroSec:End,P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl;211 #ifdef debug 212 G4cout<<"==>G4QPrCS::GetCroSec: P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl; 210 213 #endif 211 214 return lastCS*millibarn; … … 216 219 G4int, G4int targZ, G4int targN, G4double Momentum) 217 220 { 218 static const G4double THmin=27.; // minimum Momentum (MeV/c) Threshold221 static const G4double THmin=27.; // default minimum Momentum (MeV/c) Threshold 219 222 static const G4double THmiG=THmin*.001; // minimum Momentum (GeV/c) Threshold 220 223 static const G4double dP=10.; // step for the LEN (Low ENergy) table MeV/c … … 227 230 static const G4double malP=std::log(Pmax);// High logarithm energy (each 2.75 percent) 228 231 static const G4double dlP=(malP-milP)/(nH-1); // Step in log energy in the HEN part 229 static const G4double milPG=std::log(.001*Pmin);// Low logarithm energy for theHEN part GeV/c232 static const G4double milPG=std::log(.001*Pmin);// Low logarithmEnergy for HEN part GeV/c 230 233 // 231 234 // Associative memory for acceleration … … 234 237 static std::vector <G4double*> HEN; // Vector of pointers to HighEnProtonCrossSection 235 238 #ifdef debug 236 G4cout<<"G4QProt onNuclearCS::CalcCS: N="<<targN<<",Z="<<targZ<<",P="<<Momentum<<G4endl;237 #endif 238 if (Momentum<THmin) return 0.; // @@ This can be dangerouse for the heaviest nuc. !239 G4cout<<"G4QProtNCS::CalCS:N="<<targN<<",Z="<<targZ<<",P="<<Momentum<<">"<<THmin<<G4endl; 240 #endif 241 if (Momentum<THmin) return 0.; // @@ This can be dangerouse for the heaviest nuc.?! 239 242 G4double sigma=0.; 240 243 if(F&&I) sigma=0.; // @@ *!* Fake line *!* to use F & I !!!Temporary!!! 241 244 G4double A=targN+targZ; // A of the target 242 if(F<=0) // This isotope was not the last used isotop 243 { 244 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 245 { 246 lastLEN=LEN[I]; // Pointer to prepared LowEnergy cross sections 247 lastHEN=HEN[I]; // Pointer to prepared High Energy cross sections 248 } 249 else // This isotope wasn't calculated previously => CREATE 250 { 251 lastLEN = new G4double[nL]; // Allocate memory for the new LEN cross sections 252 lastHEN = new G4double[nH]; // Allocate memory for the new HEN cross sections 245 #ifdef debug 246 G4cout<<"G4QProtNucCS::CalCS: A="<<A<<",F="<<F<<",I="<<I<<",nL="<<nL<<",nH="<<nH<<G4endl; 247 #endif 248 if(F<=0) // This isotope was not the last used isotop 249 { 250 if(F<0) // This isotope was found in DAMDB =======> RETRIEVE 251 { 252 G4int sync=LEN.size(); 253 if(sync<=I) G4cerr<<"*!*G4QProtonNuclCS::CalcCrossSect:Sync="<<sync<<"<="<<I<<G4endl; 254 lastLEN=LEN[I]; // Pointer to prepared LowEnergy cross sections 255 lastHEN=HEN[I]; // Pointer to prepared High Energy cross sections 256 } 257 else if(Momentum<ThresholdMomentum(targZ,targN)) return 0.; // BelowThreshold -> NotIni 258 else // This isotope wasn't calculated before => CREATE 259 { 260 lastLEN = new G4double[nL]; // Allocate memory for the new LEN cross sections 261 lastHEN = new G4double[nH]; // Allocate memory for the new HEN cross sections 253 262 // --- Instead of making a separate function --- 254 G4double P=THmiG; // Table threshold in GeV/c263 G4double P=THmiG; // Table threshold in GeV/c 255 264 for(G4int m=0; m<nL; m++) 256 265 { … … 264 273 lP+=dlP; 265 274 } 275 #ifdef debug 276 G4cout<<"-*->G4QPr0tNucCS::CalcCS:Tab for Z="<<targZ<<",N="<<targN<<",I="<<I<<G4endl; 277 #endif 266 278 // --- End of possible separate function 267 279 // *** The synchronization check *** 268 280 G4int sync=LEN.size(); 269 if(sync!=I) G4cerr<<"**G4QPhortonNuclCS::CalcCrossSect: Sync="<<sync<<"#"<<I<<G4endl; 270 LEN.push_back(lastLEN); // added LEN, found by AH 10/7/02 271 HEN.push_back(lastHEN); // added HEN, found by AH 10/7/02 272 } // End of creation of the new set of parameters 281 if(sync!=I) 282 { 283 G4cerr<<"***G4QProtonNuclCS::CalcCrossSect: Sinc="<<sync<<"#"<<I<<", Z=" <<targZ 284 <<", N="<<targN<<", F="<<F<<G4endl; 285 //G4Exception("G4ProtonNuclearCS::CalculateCS:","39",FatalException,"overflow DB"); 286 } 287 LEN.push_back(lastLEN); // remember the Low Energy Table 288 HEN.push_back(lastHEN); // remember the High Energy Table 289 } // End of creation of the new set of parameters 273 290 } // End of parameters udate 274 291 // ============================== NOW the Magic Formula ================================= 292 #ifdef debug 293 G4cout<<"G4QPrNCS::CalcCS:lTH="<<lastTH<<",Pmi="<<Pmin<<",dP="<<dP<<",dlP="<<dlP<<G4endl; 294 #endif 275 295 if (Momentum<lastTH) return 0.; // It must be already checked in the interface class 276 else if (Momentum<Pmin) // High Energy region277 { 278 #ifdef debug 279 G4cout<<"G4QPrNCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl;296 else if (Momentum<Pmin) // High Energy region 297 { 298 #ifdef debug 299 G4cout<<"G4QPrNCS::CalcCS:bLEN A="<<A<<", nL="<<nL<<",TH="<<THmin<<",dP="<<dP<<G4endl; 280 300 #endif 281 301 if(A<=1.) sigma=0.; 282 302 else sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN); 283 303 #ifdef debugn 284 if(sigma<0.)304 if(sigma<0.) 285 305 G4cout<<"G4QPrNuCS::CalcCS:A="<<A<<",E="<<Momentum<<",T="<<THmin<<",dP="<<dP<<G4endl; 286 306 #endif 287 307 } 288 else if (Momentum<Pmax) // High Energy region308 else if (Momentum<Pmax) // High Energy region 289 309 { 290 310 G4double lP=std::log(Momentum); … … 294 314 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN); 295 315 } 296 else // UHE region (calculation, not frequent)297 { 298 G4double P=0.001*Momentum; // Approximation formula is for P in GeV/c316 else // UHE region (calculation, not frequent) 317 { 318 G4double P=0.001*Momentum; // Approximation formula is for P in GeV/c 299 319 sigma=CrossSectionFormula(targZ, targN, P, std::log(P)); 300 320 } 301 321 #ifdef debug 302 G4cout<<"G4QProtonNuclearCrossSection::CalcCS: sigma="<<sigma<<G4endl;322 G4cout<<"G4QProtonNuclearCrossSection::CalcCS: CS="<<sigma<<G4endl; 303 323 #endif 304 324 if(sigma<0.) return 0.; … … 314 334 G4double tA=tZ+tN; 315 335 if(tZ<.99 || tN<0.) return 0.; 336 else if(tZ==1 && tN==0) return 800.; // A threshold on the free proton 316 337 //G4double dE=1.263*tZ/(1.+std::pow(tA,third)); 317 338 G4double dE=tZ/(1.+std::pow(tA,third)); // Safety for diffused edge of the nucleus (QE) … … 374 395 { 375 396 G4double dp=P-pos; 376 sigma+=pex*std::exp( dp*dp/wid);397 sigma+=pex*std::exp(-dp*dp/wid); 377 398 } 378 399 } … … 407 428 else if(tZ<93 && tN<146) // General solution 408 429 { 409 G4double lP=std::log(P);430 //G4double lP=std::log(P); // Already calculated 410 431 G4double d=lP-4.2; 411 432 G4double p2=P*P; … … 427 448 G4double h=(.01/a4+2.5e-6/a)*(1.+7.e-8*a4)/(1.+6.e7/a12/a2); 428 449 sigma=(c+d*d)/(1.+r/p4)+(g+e*std::exp(-s*P))/(1.+h/p4/p4); 450 #ifdef pdebug 451 G4cout<<"G4QProtNucCS::CSForm: A="<<a<<",P="<<P<<",CS="<<sigma<<",c="<<c<<",g="<<g<<",d=" 452 <<d<<",r="<<r<<",e="<<e<<",h="<<h<<G4endl; 453 #endif 429 454 } 430 455 else -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 25 // Short description: Interface of QGSC to CHIPS (Energy Flow of soft hadrons) 26 // ---------------------------------------------------------------------------- 26 27 27 28 //#define debug … … 143 144 } 144 145 G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ); // PDG of theResidualNucleus 145 G4double targetMass = theNucleus->GetMass(); // Its mass 146 targetMass -= hitMass; // subtract masses of knocked out nucleons (binding?! M.K.) E/M 146 G4double targetMass=mNeut; 147 if (!resZ) // Nucleus of only neutrons 148 { 149 if (resA>1) targetMass*=resA; 150 } 151 else targetMass=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ) 152 ->GetPDGMass(); 147 153 G4double targetEnergy = std::sqrt(hitMomentum.mag2()+targetMass*targetMass); 148 154 // !! @@ Target should be at rest: hitMomentum=(0,0,0) @@ !! M.K. (go to this system) … … 153 159 G4double impactX = theImpact.first; 154 160 G4double impactY = theImpact.second; 155 G4double i npactPar2 = impactX*impactX + impactY*impactY;161 G4double impactPar2 = impactX*impactX + impactY*impactY; 156 162 157 163 G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent); … … 160 166 #ifdef pdebug 161 167 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi 162 <<", b="<<std::sqrt(i npactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi163 <<", b/r="<<std::sqrt(i npactPar2/radius2)<<G4endl;164 #endif 165 if(radius2 - i npactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2);168 <<", b="<<std::sqrt(impactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi 169 <<", b/r="<<std::sqrt(impactPar2/radius2)<<G4endl; 170 #endif 171 if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2); 166 172 G4double theEnergyLostInFragmentation = theEnergyLossPerFermi*pathlength/fermi; 167 173 … … 176 182 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<" " 177 183 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<" " 178 << a4Mom <<G4endl;184 << a4Mom <<G4endl; 179 185 #endif 180 186 #ifdef pdebug … … 193 199 if((*current).first > toSort) // The current is smaller then existing 194 200 { 195 theSorted.insert(current, it); // It shifts the others up196 inserted = true;197 break;201 theSorted.insert(current, it); // It shifts the others up 202 inserted = true; 203 break; 198 204 } 199 205 } … … 234 240 <<theSorted.size()<<G4endl; 235 241 #endif 236 242 G4bool EscapeExists = false; 237 243 for(current = theSorted.begin(); current!=theSorted.end(); current++) 238 244 { 239 245 #ifdef pdebug 240 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq="246 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq=" 241 247 <<(*current).second->GetDefinition()->GetQuarkContent(3)<<", naq=" 242 248 <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<", PDG=" … … 306 312 307 313 #ifdef pdebug 308 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="314 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL=" 309 315 <<theEnergyLostInFragmentation<<G4endl; 310 316 #endif 311 312 if(runningEnergy > theEnergyLostInFragmentation) break; 313 317 if(runningEnergy > theEnergyLostInFragmentation) 318 { 319 EscapeExists = true; 320 break; 321 } 314 322 #ifdef CHIPSdebug 315 323 G4cout <<"G4QStringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles " 316 324 <<(*current).second->GetDefinition()->GetPDGCharge()<<" " 317 325 << (*current).second->GetDefinition()->GetPDGEncoding()<<" " 318 << (*current).second->Get4Momentum() <<G4endl;326 << (*current).second->Get4Momentum() <<G4endl; 319 327 #endif 320 328 #ifdef pdebug … … 322 330 <<current->second->GetDefinition()->GetPDGCharge()<<", PDG=" 323 331 <<current->second->GetDefinition()->GetPDGEncoding()<<", 4M=" 324 <<current->second->Get4Momentum()<<G4endl;332 <<current->second->Get4Momentum()<<G4endl; 325 333 #endif 326 334 … … 382 390 { 383 391 theFinalContents[hp] +=theContents[running]; 384 *(theFinalMomenta[hp])+=*(theMomenta[running]);385 running++;386 if(running == theContents.size()) break;392 *(theFinalMomenta[hp])+=*(theMomenta[running]); 393 running++; 394 if(running == theContents.size()) break; 387 395 } 388 396 } … … 402 410 G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons, 403 411 fractionOfPairedQuasiFreeNucleons, 404 clusteringCoefficient,405 fusionToExchange);412 clusteringCoefficient, 413 fusionToExchange); 406 414 G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime); 407 415 … … 424 432 G4QCHIPSWorld::Get()->GetParticles(nop); 425 433 G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode); 434 #ifdef pdebug 435 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA=" 436 <<resA<<", #AbsPt="<<particleCount<<G4endl; 437 #endif 426 438 try 427 439 { … … 438 450 { 439 451 G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: " 440 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;452 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl; 441 453 } 442 454 throw; … … 447 459 delete pan; 448 460 } 449 else output = new G4QHadronVector; 450 461 else 462 { 463 #ifdef pdebug 464 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA=" 465 <<resA<<", #AbsPt="<<particleCount<<G4endl; 466 #endif 467 output = new G4QHadronVector; 468 } 451 469 // Fill the result. 452 470 #ifdef CHIPSdebug 453 G4cout << "NEXT EVENT "<<endl;471 G4cout << "NEXT EVENT, EscapeExists="<<EscapeExists<<G4endl; 454 472 #endif 455 473 456 474 // first decay and add all escaping particles. 457 for(current = firstEscape; current!=theSorted.end(); current++)475 if (EscapeExists) for (current = firstEscape; current!=theSorted.end(); current++) 458 476 { 459 477 G4KineticTrack* aResult = (*current).second; … … 472 490 theSec->SetMomentum(current4Mom.vect()); 473 491 #ifdef pdebug 474 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="492 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG=" 475 493 <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 476 494 #endif … … 487 505 theSec->SetMomentum(current4Mom.vect()); 488 506 #ifdef pdebug 489 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="507 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG=" 490 508 <<secondaries->operator[](aSecondary)->GetDefinition()->GetPDGEncoding() 491 509 <<",4M="<<current4Mom<<G4endl; … … 561 579 theSec->SetMomentum(current4Mom.vect()); 562 580 #ifdef pdebug 563 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="581 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG=" 564 582 <<theDefinition->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 565 583 #endif … … 576 594 G4cout <<"CHIPS particles "<<theDefinition->GetPDGCharge()<<" " 577 595 << theDefinition->GetPDGEncoding()<<" " 578 << output->operator[](particle)->Get4Momentum() <<G4endl;596 << output->operator[](particle)->Get4Momentum() <<G4endl; 579 597 #endif 580 598 581 599 delete output->operator[](particle); 600 } 601 else 602 { 603 if(resA>0) 604 { 605 G4ParticleDefinition* theDefinition = G4Neutron::Neutron(); 606 if(resA==1) // The residual nucleus at rest must be added to conserve BaryN & Charge 607 { 608 if(resZ == 1) theDefinition = G4Proton::Proton(); 609 } 610 else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ); 611 theSec = new G4ReactionProduct(theDefinition); 612 theSec->SetTotalEnergy(theDefinition->GetPDGMass()); 613 theSec->SetMomentum(G4ThreeVector(0.,0.,0.)); 614 theResult->push_back(theSec); 615 if(!resZ && resA>0) for(G4int ni=1; ni<resA; ni++) 616 { 617 theSec = new G4ReactionProduct(theDefinition); 618 theSec->SetTotalEnergy(theDefinition->GetPDGMass()); 619 theSec->SetMomentum(G4ThreeVector(0.,0.,0.)); 620 theResult->push_back(theSec); 621 } 622 } 582 623 } 583 624 delete output; … … 588 629 G4cout << "QUASMON preparation info " 589 630 << 1./MeV*proj4Mom<<" " 590 << 1./MeV*targ4Mom<<" "591 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "592 << hitCount<<" "593 << particleCount<<" "594 << theLow<<" "595 << theHigh<<" "596 << G4endl;631 << 1./MeV*targ4Mom<<" " 632 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" " 633 << hitCount<<" " 634 << particleCount<<" " 635 << theLow<<" " 636 << theHigh<<" " 637 << G4endl; 597 638 #endif 598 639 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QTauNuclearCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QTauNuclearCrossSection.cc,v 1.1 1 2008/10/24 19:24:29 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QTauNuclearCrossSection.cc,v 1.13 2009/05/08 15:16:26 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 38 38 // **************************************************************************************** 39 39 //========================================================================================= 40 // Short description: reaction cross-sections for tau-nuclear reactions, which 41 // are integrals over virtual equivalent photons photons. The tau-nuclear 42 // reactions do not exist in GHAD, so by the present physics lists it is not 43 // simulated at all. 44 // -------------------------------------------------------------------------------- 40 45 41 46 ///#define debug … … 94 99 <<"("<<lastN<<"),PDG="<<pPDG<<"("<<lastPDG<<"), T="<<pEn<<"("<<lastTH<<")"<<",Sz=" 95 100 <<colN.size()<<G4endl; 96 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST101 //CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST 97 102 #endif 98 103 if(std::abs(pPDG)!=15) … … 115 120 j = 0; // A#0f records found in DB for this projectile 116 121 if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found 117 { // The nucleus with projPDG is found in AMDB122 { // The nucleus with projPDG is found in AMDB 118 123 if(colN[i]==tgN && colZ[i]==tgZ) 119 {124 { 120 125 lastI=i; 121 126 lastTH =colTH[i]; // Last THreshold (A-dependent) … … 167 172 #endif 168 173 j++; // Increment a#0f records found in DB for this pPDG 169 }170 if(!in) // This nucleus has not been calculated previously171 {174 } 175 if(!in) // This nucleus has not been calculated previously 176 { 172 177 #ifdef pdebug 173 178 G4cout<<"G4QTNCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl; … … 176 181 lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create 177 182 if(lastCS<=0.) 178 {183 { 179 184 lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 180 185 #ifdef pdebug … … 188 193 lastTH=pEn; 189 194 } 190 }195 } 191 196 #ifdef pdebug 192 197 G4cout<<"G4QTNCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl; … … 204 209 #endif 205 210 return lastCS*millibarn; 206 } // End of creation of the new set of parameters211 } // End of creation of the new set of parameters 207 212 else 208 {213 { 209 214 #ifdef pdebug 210 215 G4cout<<"G4QTNCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl; … … 275 280 G4double mP= infEn; 276 281 if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1)) 277 mP = G4NucleiProperties::GetNuclearMass(A-1.,Z-1.)/MeV; // ResNucMass for a proton282 mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV; // ResNucMass for a proton 278 283 279 284 G4double mN= infEn; 280 285 if(N&&G4NucleiProperties::IsInStableTable(A-1,Z)) 281 mN = G4NucleiProperties::GetNuclearMass(A-1.,Z)/MeV; // ResNucMass for a neutron286 mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // ResNucMass for a neutron 282 287 283 288 G4double mA= infEn; 284 289 if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2)) 285 mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV; // ResNucMass for an alpha290 mA = G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV; // ResNucMass for an alpha 286 291 287 292 G4double dP= mP +mProt - mT; … … 289 294 G4double dA= mA +mAlph - mT; 290 295 #ifdef pdebug 291 G4cout<<"G4TauNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA="296 G4cout<<"G4TauNucCS::ThreshEn: mP="<<mP<<",dP="<<dP<<",mN="<<mN<<",dN="<<dN<<",mA=" 292 297 <<mA<<",dA="<<dA<<",mT="<<mT<<",A="<<A<<",Z="<<Z<<G4endl; 293 298 #endif … … 319 324 static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions 320 325 #ifdef pdebug 321 G4cout<<"G4QTauNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size();326 G4cout<<"G4QTauNucCrossSection::CalculateCrossSection: ***Called*** "<<J3.size(); 322 327 if(J3.size()) G4cout<<", p="<<J3[0]; 323 328 G4cout<<G4endl; … … 331 336 lastE=TotEnergy-mtu; // Kinetic energy of the muon 332 337 #ifdef pdebug 333 G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ338 G4cout<<"G4QElectronNucCS::CalcCS: P="<<Momentum<<", F="<<F<<", I="<<I<<", Z="<<targZ 334 339 <<", N="<<targN<<", onlyCS="<<CS<<",E="<<lastE<<",th="<<EMi<<G4endl; 335 340 #endif … … 338 343 { 339 344 if(F<0) // This isotope was found in DAMDB =========> RETRIEVE 340 { // ...........................................========345 { // ...........................................======== 341 346 if (lastE<=EMi) // Energy is below the minimum energy in the table 342 347 { … … 345 350 lastSig=0.; 346 351 #ifdef pdebug 347 G4cout<<"---> G4QTauNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl;352 G4cout<<"---> G4QTauNucCS::CalcCS: Old CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl; 348 353 #endif 349 354 return 0.; … … 355 360 lastH =colH[I]; // Last High Energy Coefficient (A-dependent) 356 361 #ifdef pdebug 357 G4cout<<"---> G4QTauNucCS::CalcCS: CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl;358 #endif 359 }360 else // This isotope wasn't calculated previously => CREATE361 {362 G4cout<<"---> G4QTauNucCS::CalcCS: CS=0 as lastE="<<lastE<<" < "<<EMi<<G4endl; 363 #endif 364 } 365 else // This isotope wasn't calculated previously => CREATE 366 { 362 367 lastJ1 = new G4double[nE]; // Allocate memory for the new J1 function 363 368 lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function … … 376 381 colF.push_back(lastF); 377 382 colH.push_back(lastH); 378 } // End of creation of the new set of parameters383 } // End of creation of the new set of parameters 379 384 } // End of parameters udate 380 385 // ============================== NOW Calculate the Cross Section ===================== … … 385 390 lastSig=0.; 386 391 #ifdef pdebug 387 G4cout<<"---> G4QTauNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl;392 G4cout<<"---> G4QTauNucCS::CalcCS:CS=0 as T="<<lastE<<"<"<<EMi<<" || "<<lastTH<<G4endl; 388 393 #endif 389 394 return 0.; … … 399 404 #ifdef pdebug 400 405 G4cout<<"-->G4QTauNuclearCS::CalcCrossSect:LOGfit b="<<blast<<",max="<<mL<<",lJ1=" 401 <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl;406 <<lastJ1<<",lJ2="<<lastJ2<<",lJ3="<<lastJ3<<G4endl; 402 407 #endif 403 408 if(blast<0) blast=0; … … 2575 2580 y[k]=P1[i][k]; // J1 2576 2581 z[k]=P2[i][k]; // J2 2577 }2582 } 2578 2583 r=L[i]; // Low channel for the J-functions 2579 2584 } … … 2598 2603 r=L[k]; 2599 2604 if(L[k1]<r) r=L[k1]; 2600 }2605 } 2601 2606 } 2602 2607 return r; … … 2632 2637 if(ris<Y[lastL]) // Search in the table 2633 2638 { 2634 G4int j=lastF;2639 G4int j=lastF; 2635 2640 G4double Yj=Y[j]; // It mast be 0 (some times just very small) 2636 2641 while (ris>Yj && j<lastL) // Associative search 2637 {2642 { 2638 2643 j++; 2639 2644 Yj=Y[j]; // High value 2640 }2645 } 2641 2646 G4int j1=j-1; 2642 2647 G4double Yi=Y[j1]; // Low value 2643 2648 phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE; 2644 2649 #ifdef debug 2645 G4cout<<"G4QTauNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi2650 G4cout<<"G4QTauNuclearCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi 2646 2651 <<",Y="<<Yj<<G4endl; 2647 2652 #endif … … 2653 2658 G4double f=(ris-Y[lastL])/lastH; // ScaledResidualValue of the cross-sec. integral 2654 2659 #ifdef pdebug 2655 G4cout<<"G4QTauNucCS::GetExEn:HighEnergy f="<<f<<", ris="<<ris<<", lH="<<lastH<<G4endl;2660 G4cout<<"G4QTauNucCS::GetExEn:HighEnergy f="<<f<<", ris="<<ris<<", lH="<<lastH<<G4endl; 2656 2661 #endif 2657 2662 phLE=SolveTheEquation(f); // Solve equation to find theLog(phE) (comp lastLE) 2658 2663 #ifdef pdebug 2659 G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;2664 G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl; 2660 2665 #endif 2661 2666 } … … 2704 2709 #endif 2705 2710 if(x>=lastLE) 2706 {2711 { 2707 2712 G4cerr<<"*G4QTauNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE 2708 2713 <<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QuasiFreeRatios.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QuasiFreeRatios.cc,v 1. 19 2008/03/21 21:44:39 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QuasiFreeRatios.cc,v 1.21 2009/04/09 08:25:46 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-06 34 34 // 35 //================================================================================ 35 //======================================================================= 36 // Short description: Provides percentage of quasi-free and quasi-elastic 37 // reactions in the inelastic reactions. 38 // ---------------------------------------------------------------------- 36 39 37 40 //#define debug … … 50 53 { 51 54 #ifdef pdebug 52 G4cout<<"***^^^*** G4QuasiFreeRatios singletone is created ***^^^***"<<G4endl;55 G4cout<<"***^^^*** G4QuasiFreeRatios singletone is created ***^^^***"<<G4endl; 53 56 #endif 54 57 } … … 81 84 G4int tgZ, G4int tgN) 82 85 { 83 std::pair<G4double,G4double> ElTot=GetElTot(pIU, pPDG, tgZ, tgN); // mean hN El&Tot(IU) 86 #ifdef pdebug 87 G4cout<<">>>IN>>>G4QFRat::GetQF:P="<<pIU<<",pPDG="<<pPDG<<",Z="<<tgZ<<",N="<<tgN<<G4endl; 88 #endif 84 89 G4double R=0.; 85 G4double QF2In=1.; // Prototype of QuasiFree/Inelastic ratio for hN_tot 86 if(ElTot.second>0.) 87 { 88 R=ElTot.first/ElTot.second; // Elastic/Total ratio (does not depend on units 89 QF2In=GetQF2IN_Ratio(ElTot.second/millibarn, tgZ+tgN); // QuasiFree/Inelastic ratio 90 } 90 G4double QF2In=1.; // Prototype of QuasiFree/Inel ratio for hN_tot 91 G4int tgA=tgZ+tgN; 92 if(tgA<2) return std::make_pair(QF2In,R); // No quasi-elastic on the only nucleon 93 std::pair<G4double,G4double> ElTot=GetElTot(pIU, pPDG, tgZ, tgN); // mean hN El&Tot(IU) 94 //if( ( (pPDG>999 && pIU<227.) || pIU<27.) && tgA>1) R=1.; // @@ TMP to accelerate @lowE 95 if(pPDG>999 && pIU<227. && tgZ+tgN>1) R=1.; // To accelerate @lowE 96 else if(ElTot.second>0.) 97 { 98 R=ElTot.first/ElTot.second; // El/Total ratio (does not depend on units 99 QF2In=GetQF2IN_Ratio(ElTot.second/millibarn, tgZ+tgN); // QuasiFree/Inelastic ratio 100 } 101 #ifdef pdebug 102 G4cout<<">>>OUT>>>G4QuasiFreeRatio::GetQF2IN_Ratio: QF2In="<<QF2In<<", R="<<R<<G4endl; 103 #endif 91 104 return std::make_pair(QF2In,R); 92 105 } … … 125 138 static G4double* lastL=0; // theLast of pointer to LogTable in the C++ heap 126 139 // LogTable is created only if necessary. The ratio R(s>8100 mb) = 0 for any nuclei 140 #ifdef pdebug 141 G4cout<<"+++G4QuasiFreeRatio::GetQF2IN_Ratio:A="<<A<<", s="<<s<<G4endl; 142 #endif 127 143 if(s<toler || A<2) return 1.; 128 144 if(s>ms) return 0.; … … 137 153 G4bool found=false; 138 154 G4int i=-1; 139 if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB155 if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB 140 156 { 141 157 found=true; // The A value is found 142 158 break; 143 159 } 160 #ifdef pdebug 161 G4cout<<"+++G4QuasiFreeRatio::GetQF2IN_Ratio: nDB="<<nDB<<", found="<<found<<G4endl; 162 #endif 144 163 if(!nDB || !found) // Create new line in the AMDB 145 {164 { 146 165 lastA = A; 147 166 #ifdef pdebug 148 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewT, A="<<A<<", nDB="<<nDB<<G4endl;167 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewT, A="<<A<<", nDB="<<nDB<<G4endl; 149 168 #endif 150 169 lastT = new G4double[mps]; // Create the linear Table … … 163 182 lastT[j]=CalcQF2IN_Ratio(sv,A); 164 183 } 184 lastL=new G4double[mls]; // Create the logarithmic Table 165 185 if(s>sma) // Initialize the logarithmic Table 166 186 { 167 187 #ifdef pdebug 168 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewL, A="<<A<<", nDB="<<nDB<<G4endl; 169 #endif 170 lastL=new G4double[mls]; // Create the logarithmic Table 188 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: NewL, A="<<A<<", nDB="<<nDB<<G4endl; 189 #endif 171 190 G4double ls=std::log(s); 172 191 lastK = static_cast<int>((ls-lsi)/dl)+1; // MaxBin to be initialized in LogTaB … … 181 200 { 182 201 lastL[j]=CalcQF2IN_Ratio(sv,A); 183 if(j!=lastK) sv*=edl;202 if(j!=lastK) sv*=edl; 184 203 } 185 204 } 186 205 else // LogTab is not initialized 187 206 { 188 lastL = 0;189 207 lastK = 0; 190 208 lastM = 0.; … … 200 218 } 201 219 else // The A value was found in AMDB 202 {220 { 203 221 lastA=vA[i]; 204 222 lastH=vH[i]; … … 208 226 lastT=vT[i]; 209 227 lastL=vL[i]; 228 #ifdef pdebug 229 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: Found, s="<<s<<", lastM="<<lastM<<G4endl; 230 #endif 210 231 if(s>lastM) // At least LinTab must be updated 211 232 { 212 233 G4int nextN=lastN+1; // The next bin to be initialized 234 #ifdef pdebug 235 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: lastN="<<lastN<<" ?< nps="<<nps<<G4endl; 236 #endif 213 237 if(lastN<nps) 214 238 { … … 226 250 lastT[j]=CalcQF2IN_Ratio(sv,A); 227 251 } 252 #ifdef pdebug 253 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: End of LinTab update"<<G4endl; 254 #endif 228 255 } // End of LinTab update 256 #ifdef pdebug 257 G4cout<<"G4QFRatios::GetQF2IN_Ratio: lN="<<lastN<<", nN="<<nextN<<", i="<<i<<G4endl; 258 #endif 229 259 if(lastN>=nextN) 230 {260 { 231 261 vH[i]=lastH; 232 262 vN[i]=lastN; 233 263 } 234 264 G4int nextK=lastK+1; 265 if(!lastK) nextK=0; 266 #ifdef pdebug 267 G4cout<<"G4QFRat::GetQF2IN_Ratio: sma="<<sma<<", lastK="<<lastK<<" < "<<nls<<G4endl; 268 #endif 235 269 if(s>sma && lastK<nls) // LogTab must be updated 236 {270 { 237 271 G4double sv=std::exp(lastM+lsi); // Define starting poit (lastM will be changed) 238 272 G4double ls=std::log(s); … … 244 278 } 245 279 else lastM = lastK*dl; // Calculate max initialized ln(s)-lsi for LogTab 280 #ifdef pdebug 281 G4cout<<"G4QFRat::GetQF2IN_Ratio: nK="<<nextK<<", lK="<<lastK<<", sv="<<sv<<G4endl; 282 #endif 246 283 for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values 247 284 { 248 sv*=edl; 285 sv*=edl; 286 #ifdef pdebug 287 G4cout<<"G4QFRat::GetQF2IN_Ratio: j="<<j<<", sv="<<sv<<", A="<<A<<G4endl; 288 #endif 249 289 lastL[j]=CalcQF2IN_Ratio(sv,A); 250 290 } 291 #ifdef pdebug 292 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: End of LinTab update"<<G4endl; 293 #endif 251 294 } // End of LogTab update 295 #ifdef pdebug 296 G4cout<<"G4QFRatios::GetQF2IN_Ratio: lK="<<lastK<<", nK="<<nextK<<", i="<<i<<G4endl; 297 #endif 252 298 if(lastK>=nextK) 253 {299 { 254 300 vM[i]=lastM; 255 301 vK[i]=lastK; … … 257 303 } 258 304 } 305 #ifdef pdebug 306 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: BeforeTab s="<<s<<", sma="<<sma<<G4endl; 307 #endif 259 308 // Now one can use tabeles to calculate the value 260 309 if(s<sma) // Use linear table 261 {310 { 262 311 G4int n=static_cast<int>(s/ds); // Low edge number of the bin 263 312 G4double d=s-n*ds; // Linear shift … … 265 314 lastR=v+d*(lastT[n+1]-v)/ds; // Result 266 315 } 267 else // Use log table268 {316 else // Use log table 317 { 269 318 G4double ls=std::log(s)-lsi; // ln(s)-l_min 270 319 G4int n=static_cast<int>(ls/dl); // Low edge number of the bin … … 275 324 if(lastR<0.) lastR=0.; 276 325 if(lastR>1.) lastR=1.; 326 #ifdef pdebug 327 G4cout<<"G4QuasiFreeRatios::GetQF2IN_Ratio: BeforeRet lastR="<<lastR<<G4endl; 328 #endif 277 329 return lastR; 278 330 } // End of CalcQF2IN_Ratio … … 282 334 { 283 335 static const G4double C=1.246; 284 G4double s2=s*s;336 G4double s2=s*s; 285 337 G4double s4=s2*s2; 286 G4double ss=std::sqrt(std::sqrt(s));338 G4double ss=std::sqrt(std::sqrt(s)); 287 339 G4double P=7.48e-5*s2/(1.+8.77e12/s4/s4/s2); 288 340 G4double E=.2644+.016/(1.+std::exp((29.54-s)/2.49)); 289 341 G4double F=ss*.1526*std::exp(-s2*ss*.0000859); 290 return C*std::exp(-E*std::pow(G4double(A-1.),F))/std::pow(G4double(A),P);342 return C*std::exp(-E*std::pow(G4double(A-1.),F))/std::pow(G4double(A),P); 291 343 } // End of CalcQF2IN_Ratio 292 344 … … 309 361 } 310 362 if (!I) // pp/nn 311 {363 { 312 364 #ifdef debug 313 G4cout<<"G4QuasiFreeR::CalcElTot:I=0, p="<<p<<", pmi="<<pmi<<", pma="<<pma<<G4endl;365 G4cout<<"G4QuasiFreeR::CalcElTot:I=0, p="<<p<<", pmi="<<pmi<<", pma="<<pma<<G4endl; 314 366 #endif 315 367 if(p<pmi) … … 319 371 To=El; 320 372 #ifdef debug 321 G4cout<<"G4QuasiFreeR::CalcElTot:I=0i, El="<<El<<", To="<<To<<", p2="<<p2<<G4endl;373 G4cout<<"G4QuasiFreeR::CalcElTot:I=0i, El="<<El<<", To="<<To<<", p2="<<p2<<G4endl; 322 374 #endif 323 375 } … … 329 381 To=pbt*lp2+38.2; 330 382 #ifdef debug 331 G4cout<<"G4QuasiFreeR::CalcElTot:I=0a, El="<<El<<", To="<<To<<", lp2="<<lp2<<G4endl;383 G4cout<<"G4QuasiFreeR::CalcElTot:I=0a, El="<<El<<", To="<<To<<", lp2="<<lp2<<G4endl; 332 384 #endif 333 385 } … … 342 394 To=LE+(pbt*lp2+38.2+52.7*rp2)/(1.+2.72*rp2*rp2); 343 395 #ifdef debug 344 G4cout<<"G4QuasiFreeR::CalcElTot:0,E="<<El<<",T="<<To<<",s="<<p2<<",l="<<lp2<<G4endl;396 G4cout<<"G4QuasiFreeR::CalcElTot:0,E="<<El<<",T="<<To<<",s="<<p2<<",l="<<lp2<<G4endl; 345 397 #endif 346 398 } 347 399 } 348 400 else if(I==1) // np/pn 349 {401 { 350 402 if(p<pmi) 351 403 { … … 373 425 } 374 426 else if(I==2) // pimp/pipn 375 {427 { 376 428 G4double lp=std::log(p); 377 429 if(p<pmi) … … 407 459 } 408 460 else if(I==3) // pipp/pimn 409 {461 { 410 462 G4double lp=std::log(p); 411 463 if(p<pmi) … … 440 492 } 441 493 } 442 else if(I==4) // Kmp/Kmn/K0p/K0n443 {494 else if(I==4) // Kmp/Kmn/K0p/K0n 495 { 444 496 445 497 if(p<pmi) … … 473 525 } 474 526 else if(I==5) // Kpp/Kpn/aKp/aKn 475 {527 { 476 528 if(p<pmi) 477 529 { … … 505 557 } 506 558 else if(I==6) // hyperon-N 507 {559 { 508 560 if(p<pmi) 509 561 { … … 533 585 } 534 586 else if(I==7) // antibaryon-N 535 {587 { 536 588 if(p>pma) 537 589 { … … 571 623 static const G4double dl=(lpa-lpi)/nlp;// Step of the logarithmic Table 572 624 static const G4double edl=std::exp(dl);// Multiplication step of the logarithmic Table 573 // static const G4double toler=.001; // Relative tolarence defining "the same momentum"625 //static const G4double toler=.001; // Relative Tolarence defining "theSameMomentum" 574 626 static G4double lastP=0.; // The last momentum for which XS was calculated 575 627 static G4int lastH=0; // The last projPDG for which XS was calculated … … 590 642 G4cout<<"G4QuasiFreeR::FetchElTot:p="<<p<<",PDG="<<PDG<<",F="<<F<<",nDB="<<nDB<<G4endl; 591 643 #endif 592 if(nDB && lastH==PDG && lastF==F && p>0. && p==lastP) return lastR; // VI do not use toler644 if(nDB && lastH==PDG && lastF==F && p>0. && p==lastP) return lastR;// VI don't use toler. 593 645 // if(nDB && lastH==PDG && lastF==F && p>0. && std::fabs(p-lastP)/p<toler) return lastR; 594 646 lastH=PDG; … … 596 648 G4int ind=-1; // Prototipe of the index of the PDG/F combination 597 649 // i=0: pp(nn), i=1: np(pn), i=2: pimp(pipn), i=3: pipp(pimn), i=4: Kmp(Kmn,K0n,K0p), 598 // i=5: Kpp(Kpn,aK0n,aK0p), i=6: Hp(Hn), i=7: app(apn,ann,anp)650 // i=5: Kpp(Kpn,aK0n,aK0p), i=6: Hp(Hn), i=7: app(apn,ann,anp) 599 651 G4bool kfl=true; // Flag of K0/aK0 oscillation 600 652 G4bool kf=false; … … 630 682 G4bool found=false; 631 683 G4int i=-1; 632 if(nDB) for (i=0; i<nDB; i++) if(ind==vI[i]) // Sirch for this index in AMDB684 if(nDB) for (i=0; i<nDB; i++) if(ind==vI[i]) // Sirch for this index in AMDB 633 685 { 634 686 found=true; // The index is found … … 637 689 G4double lp=std::log(p); 638 690 #ifdef pdebug 639 G4cout<<"G4QuasiFreeR::FetchElTot:I="<<ind<<",i="<<i<<",fd="<<found<<",lp="<<lp<<G4endl;691 G4cout<<"G4QuasiFreeR::FetchElTot:I="<<ind<<",i="<<i<<",fd="<<found<<",lp="<<lp<<G4endl; 640 692 #endif 641 693 if(!nDB || !found) // Create new line in the AMDB 642 {643 #ifdef pdebug 644 G4cout<<"G4QuasiFreeRatios::FetchElTot: NewX, ind="<<ind<<", nDB="<<nDB<<G4endl;694 { 695 #ifdef pdebug 696 G4cout<<"G4QuasiFreeRatios::FetchElTot: NewX, ind="<<ind<<", nDB="<<nDB<<G4endl; 645 697 #endif 646 698 lastX = new std::pair<G4double,G4double>[mlp]; // Create logarithmic Table for ElTot … … 658 710 lastX[j]=CalcElTot(pv,ind); 659 711 #ifdef pdebug 660 G4cout<<"G4QuasiFreeR::FetchElTot:I,j="<<j<<",pv="<<pv<<",E="<<lastX[j].first<<",T="712 G4cout<<"G4QuasiFreeR::FetchElTot:I,j="<<j<<",pv="<<pv<<",E="<<lastX[j].first<<",T=" 661 713 <<lastX[j].second<<G4endl; 662 714 #endif … … 670 722 } 671 723 else // The A value was found in AMDB 672 {724 { 673 725 lastI=vI[i]; 674 726 lastM=vM[i]; … … 678 730 G4double lpM=lastM+lpi; 679 731 #ifdef pdebug 680 G4cout<<"G4QuasiFreeR::FetchElTo:M="<<lpM<<",l="<<lp<<",K="<<lastK<<",n="<<nlp<<G4endl;732 G4cout<<"G4QuasiFreeR::FetchElTo:M="<<lpM<<",l="<<lp<<",K="<<lastK<<",n="<<nlp<<G4endl; 681 733 #endif 682 734 if(lp>lpM && lastK<nlp) // LogTab must be updated 683 {735 { 684 736 lastK = static_cast<int>((lp-lpi)/dl)+1; // MaxBin to be initialized in LogTab 685 737 #ifdef pdebug 686 G4cout<<"G4QuasiFreeR::FetET:K="<<lastK<<",lp="<<lp<<",li="<<lpi<<",dl="<<dl<<G4endl;738 G4cout<<"G4QuasiFreeR::FetET:K="<<lastK<<",lp="<<lp<<",li="<<lpi<<",dl="<<dl<<G4endl; 687 739 #endif 688 740 if(lastK>nlp) … … 698 750 lastX[j]=CalcElTot(pv,ind); 699 751 #ifdef pdebug 700 G4cout<<"G4QuasiFreeR::FetchElTot:U:j="<<j<<",p="<<pv<<",E="<<lastX[j].first<<",T="752 G4cout<<"G4QuasiFreeR::FetchElTot:U:j="<<j<<",p="<<pv<<",E="<<lastX[j].first<<",T=" 701 753 <<lastX[j].second<<G4endl; 702 754 #endif … … 704 756 } // End of LogTab update 705 757 if(lastK>=nextK) // The AMDB was apdated 706 {758 { 707 759 vM[i]=lastM; 708 760 vK[i]=lastK; … … 719 771 lastR.second=t+d*(lastX[n+1].second-t)/dl; // T-Result 720 772 if(lastR.second<0.) lastR.second= 0.; 773 #ifdef pdebug 774 G4cout<<"=O=>G4QuasiFreeR::FetchElTot:1st="<<lastR.first<<", 2nd="<<lastR.second<<G4endl; 775 #endif 721 776 if(lastR.first>lastR.second) lastR.first = lastR.second; 722 777 return lastR; … … 728 783 { 729 784 G4double pGeV=pIU/gigaelectronvolt; 785 #ifdef pdebug 786 G4cout<<"-->G4QuasiFreeR::GetElTot: P="<<pIU<<",pPDG="<<hPDG<<",Z="<<Z<<",N="<<N<<G4endl; 787 #endif 730 788 if(Z<1 && N<1) 731 789 { … … 735 793 std::pair<G4double,G4double> hp=FetchElTot(pGeV, hPDG, true); 736 794 std::pair<G4double,G4double> hn=FetchElTot(pGeV, hPDG, false); 795 #ifdef pdebug 796 G4cout<<"-OUT->G4QFRat::GetElTot: hp("<<hp.first<<","<<hp.second<<"), hn("<<hn.first<<"," 797 <<hn.second<<")"<<G4endl; 798 #endif 737 799 G4double A=(Z+N)/millibarn; // To make the result in independent units(IU) 738 800 return std::make_pair((Z*hp.first+N*hn.first)/A,(Z*hp.second+N*hn.second)/A); … … 795 857 N4M/=megaelectronvolt; 796 858 G4LorentzVector tot4M=N4M+p4M; 859 #ifdef ppdebug 860 G4cerr<<"->G4QFR::Scat:p4M="<<pr4M<<",N4M="<<N4M<<",t4M="<<tot4M<<",NPDG="<<NPDG<<G4endl; 861 #endif 797 862 G4double mT=mNeut; 798 863 G4int Z=0; … … 843 908 if(E<0. || E2<mP2) 844 909 { 845 #ifdef p debug910 #ifdef ppdebug 846 911 G4cerr<<"-Warning-G4QFR::Scat:*Negative Energy*E="<<E<<",E2="<<E2<<"<M2="<<mP2<<G4endl; 847 912 #endif 848 913 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 849 914 } 850 G4double P=std::sqrt(E2-mP2); // Momentum in pseudo laboratory system915 G4double P=std::sqrt(E2-mP2); // Momentum in pseudo laboratory system 851 916 G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer(); 852 #ifdef debug917 #ifdef ppdebug 853 918 G4cout<<"G4QFR::Scatter: Before XS, P="<<P<<", Z="<<Z<<", N="<<N<<", PDG="<<pPDG<<G4endl; 854 919 #endif … … 859 924 G4double xSec=CSmanager->GetCrossSection(false, P, Z, N, PDG); // Rec.CrossSect *TMP* 860 925 //G4double xSec=CSmanager->GetCrossSection(false, P, Z, N, pPDG); // Rec.CrossSect 861 #ifdef debug926 #ifdef ppdebug 862 927 G4cout<<"G4QElast::Scatter:pPDG="<<pPDG<<",P="<<P<<",CS="<<xSec/millibarn<<G4endl; 863 928 #endif … … 869 934 if(xSec <= 0.) // The cross-section iz 0 -> Do Nothing 870 935 { 871 #ifdef p debug936 #ifdef ppdebug 872 937 G4cerr<<"-Warning-G4QFR::Scat:**Zero XS**PDG="<<pPDG<<",NPDG="<<NPDG<<",P="<<P<<G4endl; 873 938 #endif … … 878 943 G4double maxt=CSmanager->GetHMaxT(); // max possible -t 879 944 #ifdef ppdebug 880 G4cout<<"G4QFR::Scat:PDG="<<PDG<<",P="<<P<<",X="<<xSec<<",-t="<<mint<<"<"<<maxt<<", Z="<<Z<<",N="<<N<<G4endl; 945 G4cout<<"G4QFR::Scat:PDG="<<PDG<<",P="<<P<<",X="<<xSec<<",-t="<<mint<<"<"<<maxt<<", Z=" 946 <<Z<<",N="<<N<<G4endl; 881 947 #endif 882 948 #ifdef nandebug … … 893 959 else if(cost<-1.) cost=-1.; 894 960 else 895 {961 { 896 962 G4cerr<<"G4QFR::S:*NAN*c="<<cost<<",t="<<mint<<",tm="<<CSmanager->GetHMaxT()<<G4endl; 897 963 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action … … 907 973 } 908 974 #ifdef ppdebug 909 G4cout<<"G4QFR::Scat:p4M="<<pr4M<<"+r4M="<<reco4M<<",dr="<<dir4M<<",t4M="<<tot4M<<G4endl;910 #endif 911 return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result975 G4cout<<"G4QFR::Scat:p4M="<<pr4M<<"+r4M="<<reco4M<<",dr="<<dir4M<<",t4M="<<tot4M<<G4endl; 976 #endif 977 return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result 912 978 } // End of Scatter 913 979 … … 935 1001 N=0; 936 1002 RPDG=2112; // PDG of the recoil nucleon 937 if(pPDG==-211) sPDG=111; // pi+ -> pi0938 else if(pPDG==-321)1003 if(pPDG==-211) sPDG=111; // pi+ -> pi0 1004 else if(pPDG==-321) 939 1005 { 940 1006 sPDG=310; // K+ -> K0S … … 948 1014 else if(NPDG==2112) // Default 949 1015 { 950 if(pPDG==211) sPDG=111; // pi+ -> pi0951 else if(pPDG==321)1016 if(pPDG==211) sPDG=111; // pi+ -> pi0 1017 else if(pPDG==321) 952 1018 { 953 1019 sPDG=310; // K+ -> K0S … … 983 1049 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action 984 1050 } 985 G4double P=std::sqrt(E2-mS2); // Momentum in pseudo laboratory system1051 G4double P=std::sqrt(E2-mS2); // Momentum in pseudo laboratory system 986 1052 G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer(); 987 1053 #ifdef debug … … 1025 1091 else if(cost<-1.) cost=-1.; 1026 1092 else 1027 {1093 { 1028 1094 G4cerr<<"G4QFR::C:*NAN*c="<<cost<<",t="<<mint<<",tm="<<CSmanager->GetHMaxT()<<G4endl; 1029 1095 return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action … … 1040 1106 } 1041 1107 #ifdef debug 1042 G4cout<<"G4QFR::ChEx:p4M="<<p4M<<"+r4M="<<reco4M<<"="<<p4M+reco4M<<"="<<tot4M<<G4endl;1043 #endif 1044 return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result1108 G4cout<<"G4QFR::ChEx:p4M="<<p4M<<"+r4M="<<reco4M<<"="<<p4M+reco4M<<"="<<tot4M<<G4endl; 1109 #endif 1110 return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result 1045 1111 } // End of ChExer 1046 1112 … … 1060 1126 G4double p2=p*p; 1061 1127 G4double p4=p2*p2; 1062 G4double dl1=std::log(p)-5.;1128 G4double dl1=std::log(p)-5.; 1063 1129 G4double T=(6.75+.14*dl1*dl1+13./p)/(1.+.14/p4)+.6/(p4+.00013); 1064 1130 G4double U=(6.25+8.33e-5/p4/p)*(p*sp+.34)/p2/p; -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsInterface.cc
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 25 // !!! Was used in QBBC PL, NOW it is not. Must be absolete !!! 26 // ============================================================ 26 27 27 28 //#define debug -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4StringChipsParticleLevelInterface.cc
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // Short description: Interface of QGSC to CHIPS (all soft hadrons) 26 // ---------------------------------------------------------------- 25 27 // 26 28 … … 175 177 } 176 178 G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ); // PDG of theResidualNucleus 177 G4double targetMass = theNucleus->GetMass(); // Its mass 178 targetMass -= hitMass; // subtract masses of knocked out nucleons (binding?! M.K.) E/M 179 G4double targetMass=mNeut; 180 if (!resZ) // Nucleus of only neutrons 181 { 182 if (resA>1) targetMass*=resA; 183 } 184 else targetMass=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ) 185 ->GetPDGMass(); 179 186 G4double targetEnergy = std::sqrt(hitMomentum.mag2()+targetMass*targetMass); 180 187 // !! @@ Target should be at rest: hitMomentum=(0,0,0) @@ !! M.K. (go to this system) … … 185 192 G4double impactX = theImpact.first; 186 193 G4double impactY = theImpact.second; 187 G4double i npactPar2 = impactX*impactX + impactY*impactY;194 G4double impactPar2 = impactX*impactX + impactY*impactY; 188 195 G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent); 189 196 //G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent); … … 192 199 #ifdef ppdebug 193 200 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi 194 <<", b="<<std::sqrt(inpactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi 195 <<", b/r="<<std::sqrt(inpactPar2/radius2)<<G4endl; 196 #endif 197 if(radius2 - inpactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2); 201 <<", b="<<std::sqrt(impactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi 202 <<", b/r="<<std::sqrt(impactPar2/radius2)<<G4endl; 203 #endif 204 if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2); 205 //pathlength = 27.; // *** Only temporary *** Always CHIPS 198 206 #ifdef hdebug_SCPLI 199 207 toth+=1.; // increment total number of measurements 200 G4double bfm=std::sqrt(i npactPar2)/fermi; // impact parameter208 G4double bfm=std::sqrt(impactPar2)/fermi; // impact parameter 201 209 G4double efm=pathlength/fermi; // energy absorption length 202 210 G4int nbi=static_cast<G4int>(bfm/bhdb); … … 219 227 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<" " 220 228 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<" " 221 << a4Mom <<G4endl;229 << a4Mom <<G4endl; 222 230 #endif 223 231 #ifdef pdebug … … 236 244 if((*current).first > toSort) // The current is smaller then existing 237 245 { 238 theSorted.insert(current, it); // It shifts the others up239 inserted = true;240 break;246 theSorted.insert(current, it); // It shifts the others up 247 inserted = true; 248 break; 241 249 } 242 250 } 243 if(!inserted) theSorted.push_back(it); // It is bigger than any previous 251 if(!inserted) theSorted.push_back(it); // It is bigger than any previous (@@Check this) 244 252 } 245 253 … … 278 286 <<theSorted.size()<<G4endl; 279 287 #endif 280 288 G4bool EscapeExists = false; 281 289 for(current = theSorted.begin(); current!=theSorted.end(); current++) 282 290 { 283 291 #ifdef pdebug 284 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: nq="292 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: nq=" 285 293 <<(*current).second->GetDefinition()->GetQuarkContent(3)<<", naq=" 286 294 <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<", PDG=" … … 350 358 351 359 #ifdef pdebug 352 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="360 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL=" 353 361 <<theEnergyLostInFragmentation<<G4endl; 354 362 #endif 355 356 if(runningEnergy > theEnergyLostInFragmentation) break; 357 363 if(runningEnergy > theEnergyLostInFragmentation) 364 { 365 EscapeExists = true; 366 break; 367 } 358 368 #ifdef CHIPSdebug 359 369 G4cout <<"G4StringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles " 360 370 <<(*current).second->GetDefinition()->GetPDGCharge()<<" " 361 371 << (*current).second->GetDefinition()->GetPDGEncoding()<<" " 362 << (*current).second->Get4Momentum() <<G4endl;372 << (*current).second->Get4Momentum() <<G4endl; 363 373 #endif 364 374 #ifdef pdebug … … 366 376 <<current->second->GetDefinition()->GetPDGCharge()<<", PDG=" 367 377 <<current->second->GetDefinition()->GetPDGEncoding()<<", 4M=" 368 <<current->second->Get4Momentum()<<G4endl;378 <<current->second->Get4Momentum()<<G4endl; 369 379 #endif 370 380 … … 428 438 stras += stran; // Collected strangeness 429 439 chars += charg; // Collected charge 430 //empty = false;440 //empty = false; 431 441 } 432 442 if(barys>pcl) // Split in two or more parts (to survive!) … … 451 461 //@@ Convert it to a CHIPS function (Which class? G4QH::Conctruct?) 452 462 if(!strm) // --> The total strangness = 0 (n/p/pi-) 453 {454 if(chgm<0) // (n/pi-)455 {463 { 464 if(chgm<0) // (n/pi-) 465 { 456 466 prtM=(-chgm)*mPiCh+brnm*mNeut; 457 467 prtQC=(-chgm)*PiMiQC+brnm*NeutQC; 458 468 } 459 469 else // (n/p) 460 {470 { 461 471 prtM=chgm*mProt+(brnm-chgm)*mNeut; 462 472 prtQC=chgm*ProtQC+(brnm-chgm)*NeutQC; … … 464 474 } 465 475 else if(strm>=brnm) // ---> BigPositiveStrangeness(L/Pi+/K0/K-) 466 {476 { 467 477 G4int stmb=strm-brnm; 468 if(chgm<0) // (L/K-/K0)469 {478 if(chgm<0) // (L/K-/K0) 479 { 470 480 prtM=(-chgm)*mKChg+brnm*mLamb+std::abs(stmb+chgm)*mKZer; 471 481 prtQC=(-chgm)*KMinQC+brnm*LambQC; … … 473 483 else if(stmb<-chgm) prtQC+=(-stmb-chgm)*AKZrQC; 474 484 } 475 else // (L/K0/pi+)476 {485 else // (L/K0/pi+) 486 { 477 487 prtM=chgm*mPiCh+(strm-brnm)*mKZer+brnm*mLamb; 478 488 prtQC=chgm*PiPlQC+(strm-brnm)*KZerQC+brnm*LambQC; … … 480 490 } 481 491 else if(strm>0) // ---> PositiveStrangeness<B (L/n/p/Pi+-) 482 {492 { 483 493 G4int bmst=brnm-strm; 484 if(chgm<0) // (L/n/Pi-)485 {494 if(chgm<0) // (L/n/Pi-) 495 { 486 496 prtM=(-chgm)*mPiCh+strm*mLamb+bmst*mNeut; 487 497 prtQC=(-chgm)*PiMiQC+strm*LambQC+bmst*NeutQC; 488 498 } 489 else if(chgm>=bmst) // (L/p/Pi+)490 {499 else if(chgm>=bmst) // (L/p/Pi+) 500 { 491 501 prtM=(chgm-bmst)*mPiCh+strm*mLamb+bmst*mProt; 492 502 prtQC=(chgm-bmst)*PiPlQC+strm*LambQC+bmst*ProtQC; 493 503 } 494 else // ch<bmst (L/p/n)495 {504 else // ch<bmst (L/p/n) 505 { 496 506 prtM=chgm*mProt+strm*mLamb+(bmst-chgm)*mNeut; 497 507 prtQC=chgm*ProtQC+strm*LambQC+(bmst-chgm)*NeutQC; … … 499 509 } 500 510 else // ---> NegativeStrangeness (N/K+/aK0/Pi-) 501 {511 { 502 512 G4int bmst=brnm-strm; 503 if(chgm>=bmst) // (K+/p/Pi+)504 {513 if(chgm>=bmst) // (K+/p/Pi+) 514 { 505 515 prtM=(-strm)*mKChg+brnm*mProt+(chgm-bmst)*mPiCh; 506 516 prtQC=(-strm)*KPlsQC+brnm*ProtQC+(chgm-bmst)*PiPlQC; 507 517 } 508 else if(chgm>=-strm) // (K+/p/n)509 {518 else if(chgm>=-strm) // (K+/p/n) 519 { 510 520 prtM=(-strm)*mKChg+chgm*mProt+(brnm-chgm)*mNeut; 511 521 prtQC=(-strm)*KPlsQC+chgm*ProtQC+(brnm-chgm)*NeutQC; 512 522 } 513 else if(chgm>=0) // (K+/aK0/n)514 {523 else if(chgm>=0) // (K+/aK0/n) 524 { 515 525 prtM=chgm*mKChg+(-chgm-strm)*mKZer+brnm*mNeut; 516 526 prtQC=chgm*KPlsQC+(-chgm-strm)*AKZrQC+brnm*NeutQC; 517 527 } 518 else // ch<0 (aK0/n/Pi-)519 {528 else // ch<0 (aK0/n/Pi-) 529 { 520 530 prtM=(-strm)*mKChg+(-chgm)*mPiCh+brnm*mNeut; 521 531 prtQC=(-strm)*KPlsQC+(-chgm)*PiMiQC+brnm*NeutQC; … … 523 533 } 524 534 EnFlowQC-=prtQC; 525 chgm=chars-chgm; // Just to keep the same notation535 chgm=chars-chgm; // Just to keep the same notation 526 536 strm=stras-strm; 527 537 brnm=curb; 528 538 if(!strm) // --> The total strangness = 0 (n/p/pi-) 529 {530 if(chgm<0) resM=(-chgm)*mPiCh+brnm*mNeut;539 { 540 if(chgm<0) resM=(-chgm)*mPiCh+brnm*mNeut; 531 541 else resM=chgm*mProt+(brnm-chgm)*mNeut; 532 542 } 533 543 else if(strm>=brnm) // ---> BigPositiveStrangeness(L/Pi+/K0/K-) 534 {544 { 535 545 G4int stmb=strm-brnm; 536 if(chgm<0) resM=(-chgm)*mKChg+brnm*mLamb+std::abs(stmb+chgm)*mKZer;537 else resM=chgm*mPiCh+(strm-brnm)*mKZer+brnm*mLamb;546 if(chgm<0) resM=(-chgm)*mKChg+brnm*mLamb+std::abs(stmb+chgm)*mKZer; 547 else resM=chgm*mPiCh+(strm-brnm)*mKZer+brnm*mLamb; 538 548 } 539 549 else if(strm>0) // ---> PositiveStrangeness<B (L/n/p/Pi+-) 540 {550 { 541 551 G4int bmst=brnm-strm; 542 if (chgm<0) resM=(-chgm)*mPiCh+strm*mLamb+bmst*mNeut;543 else if(chgm>=bmst) resM=(chgm-bmst)*mPiCh+strm*mLamb+bmst*mProt;544 else resM=chgm*mProt+strm*mLamb+(bmst-chgm)*mNeut;552 if (chgm<0) resM=(-chgm)*mPiCh+strm*mLamb+bmst*mNeut; 553 else if(chgm>=bmst) resM=(chgm-bmst)*mPiCh+strm*mLamb+bmst*mProt; 554 else resM=chgm*mProt+strm*mLamb+(bmst-chgm)*mNeut; 545 555 } 546 556 else // ---> NegativeStrangeness (N/K+/aK0/Pi-) 547 {557 { 548 558 G4int bmst=brnm-strm; 549 if (chgm>=bmst) resM=(-strm)*mKChg+brnm*mProt+(chgm-bmst)*mPiCh;550 else if(chgm>=-strm) resM=(-strm)*mKChg+chgm*mProt+(brnm-chgm)*mNeut;551 else if(chgm>=0) resM=chgm*mKChg+(-chgm-strm)*mKZer+brnm*mNeut;552 else resM=(-strm)*mKChg+(-chgm)*mPiCh+brnm*mNeut;559 if (chgm>=bmst) resM=(-strm)*mKChg+brnm*mProt+(chgm-bmst)*mPiCh; 560 else if(chgm>=-strm) resM=(-strm)*mKChg+chgm*mProt+(brnm-chgm)*mNeut; 561 else if(chgm>=0) resM=chgm*mKChg+(-chgm-strm)*mKZer+brnm*mNeut; 562 else resM=(-strm)*mKChg+(-chgm)*mPiCh+brnm*mNeut; 553 563 } 554 564 G4LorentzVector prt4M=(prtM/(prtM+resM))*EnFlow4M; … … 584 594 // G4int baryn = curQC.GetBaryonNumber(); 585 595 // if(baryn>0 && barys>0 && !empty) // New baryon and b-positive collection -> fill 586 // {596 // { 587 597 // G4QHadron* aHadron = new G4QHadron(EnFlowQC, EnFlow4M); 588 598 // projHV.push_back(aHadron); … … 620 630 { 621 631 theFinalContents[hp] +=theContents[running]; 622 *(theFinalMomenta[hp])+=*(theMomenta[running]);623 running++;624 if(running == theContents.size()) break;632 *(theFinalMomenta[hp])+=*(theMomenta[running]); 633 running++; 634 if(running == theContents.size()) break; 625 635 } 626 636 } … … 640 650 G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons, 641 651 fractionOfPairedQuasiFreeNucleons, 642 clusteringCoefficient,643 fusionToExchange);652 clusteringCoefficient, 653 fusionToExchange); 644 654 G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime); 645 655 … … 662 672 G4QCHIPSWorld::Get()->GetParticles(nop); 663 673 G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode); 674 #ifdef pdebug 675 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA=" 676 <<resA<<", #AbsPt="<<particleCount<<G4endl; 677 #endif 664 678 try 665 679 { … … 676 690 { 677 691 G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: " 678 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;692 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl; 679 693 } 680 694 throw; … … 682 696 delete pan; 683 697 } 684 else output = new G4QHadronVector; 698 else 699 { 700 #ifdef pdebug 701 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA=" 702 <<resA<<", #AbsPt="<<particleCount<<G4endl; 703 #endif 704 output = new G4QHadronVector; 705 } 685 706 686 707 // clean up impinging particles … … 690 711 // Fill the result. 691 712 #ifdef CHIPSdebug 692 G4cout << "NEXT EVENT "<<endl;713 G4cout << "NEXT EVENT, EscapeExists="<<EscapeExists<<G4endl; 693 714 #endif 694 715 695 716 // first decay and add all escaping particles. 696 for(current = firstEscape; current!=theSorted.end(); current++)717 if (EscapeExists) for (current = firstEscape; current!=theSorted.end(); current++) 697 718 { 698 719 G4KineticTrack* aResult = (*current).second; … … 720 741 theSec->SetMomentum(cur4Mom.vect()); 721 742 #ifdef trapdebug 722 if(cdef->GetPDGEncoding()==113) G4cout743 if(cdef->GetPDGEncoding()==113) G4cout 723 744 <<"G4StringChipsParticleLevelInterface::Propagate: *Rho0* QGS dec2 PDG=" 724 745 <<cdef->GetPDGEncoding()<<",4M="<<cur4Mom<<", grandparPDG= " … … 726 747 #endif 727 748 #ifdef pdebug 728 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS dec2 PDG="749 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS dec2 PDG=" 729 750 <<sdef->GetPDGEncoding()<<",4M="<<cur4Mom<<G4endl; 730 751 #endif … … 742 763 theSec->SetMomentum(current4Mom.vect()); 743 764 #ifdef trapdebug 744 if(sdef->GetPDGEncoding()==113)765 if(sdef->GetPDGEncoding()==113) 745 766 G4cout<<"G4StringChipsParticleLevelInterface::Propagate:*Rho0* QGS decay PDG=" 746 767 <<sdef->GetPDGEncoding()<<",4M="<<current4Mom<<", parentPDG= " … … 750 771 #endif 751 772 #ifdef pdebug 752 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="773 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG=" 753 774 <<sdef->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 754 775 #endif … … 767 788 theSec->SetMomentum(current4Mom.vect()); 768 789 #ifdef trapdebug 769 if(aResult->GetDefinition()->GetPDGEncoding()==113)790 if(aResult->GetDefinition()->GetPDGEncoding()==113) 770 791 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG=" 771 792 <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 772 793 #endif 773 794 #ifdef pdebug 774 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="795 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG=" 775 796 <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 776 797 #endif … … 849 870 theSec->SetMomentum(current4Mom.vect()); 850 871 #ifdef pdebug 851 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="872 G4cout<<"G4StringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG=" 852 873 <<theDefinition->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 853 874 #endif … … 866 887 G4cout <<"CHIPS particles "<<theDefinition->GetPDGCharge()<<" " 867 888 << theDefinition->GetPDGEncoding()<<" " 868 << output->operator[](particle)->Get4Momentum() <<G4endl;889 << output->operator[](particle)->Get4Momentum() <<G4endl; 869 890 #endif 870 891 871 892 delete output->operator[](particle); 893 } 894 else 895 { 896 if(resA>0) 897 { 898 G4ParticleDefinition* theDefinition = G4Neutron::Neutron(); 899 if(resA==1) // The residual nucleus at rest must be added to conserve BaryN & Charge 900 { 901 if(resZ == 1) theDefinition = G4Proton::Proton(); 902 } 903 else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ); 904 theSec = new G4ReactionProduct(theDefinition); 905 theSec->SetTotalEnergy(theDefinition->GetPDGMass()); 906 theSec->SetMomentum(G4ThreeVector(0.,0.,0.)); 907 theResult->push_back(theSec); 908 if(!resZ && resA>0) for(G4int ni=1; ni<resA; ni++) 909 { 910 theSec = new G4ReactionProduct(theDefinition); 911 theSec->SetTotalEnergy(theDefinition->GetPDGMass()); 912 theSec->SetMomentum(G4ThreeVector(0.,0.,0.)); 913 theResult->push_back(theSec); 914 } 915 } 872 916 } 873 917 delete output; … … 878 922 G4cout << "QUASMON preparation info " 879 923 << 1./MeV*proj4Mom<<" " 880 << 1./MeV*targ4Mom<<" "881 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "882 << hitCount<<" "883 << particleCount<<" "884 << theLow<<" "885 << theHigh<<" "886 << G4endl;924 << 1./MeV*targ4Mom<<" " 925 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" " 926 << hitCount<<" " 927 << particleCount<<" " 928 << theLow<<" " 929 << theHigh<<" " 930 << G4endl; 887 931 #endif 888 932 -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4VQCrossSection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VQCrossSection.cc,v 1.1 4 2007/11/15 09:36:43mkossov Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VQCrossSection.cc,v 1.16 2009/03/09 15:41:17 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 38 38 // ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ****** 39 39 // **************************************************************************************** 40 // Short description: a basic class for all CHIPS reaction cross-sections. 41 // ----------------------------------------------------------------------- 40 42 41 43 //#define debug … … 96 98 { 97 99 #ifdef pdebug 98 G4cout<<"G4VQCrossSection::EquLinearFit: ***Called*** X="<<DX<<", N="<<N<<", X0="<<X0100 G4cout<<"G4VQCrossSection::EquLinearFit: ***Called*** X="<<X<<", N="<<N<<", X0="<<X0 99 101 <<", DX="<<DX<<G4endl; 100 G4cout<<"G4VQCrossSection::EquLinearFit: Y[0]="<<Y[0]<<", Y[N-1]="<<Y[N-1]<<G4endl; 102 G4cout<<"G4VQCrossSection::EquLinearFit: Y[0]="<<Y[0]<<", Y[N-1]="<<Y[N-1]<<G4endl; 103 //for(G4int i=1; i<N; i++)G4cout<<"-----G4VQCS::EquLinearFit: Y["<<i<<"]="<<Y[i]<<G4endl; 101 104 #endif 102 105 if(DX<=0. || N<2) … … 113 116 G4double yi=Y[j]; 114 117 G4double sigma=yi+(Y[j+1]-yi)*d; 118 #ifdef pdebug 119 G4cout<<"G4VQCrossSection::EquLinearFit: CS="<<sigma<<G4endl; 120 #endif 115 121 return sigma; 116 122 } -
trunk/source/processes/hadronic/models/coherent_elastic/History
r962 r1055 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 18 02 March 2009 - D. Wright for V.Grichine (hadr-cohe-V09-02-00) 19 -------------------------------------------------------------- 20 Model precise sampling and 'on the fly' table preparation in 21 G4DiffuseElastic.hh, .cc 16 22 17 23 27 November 2008 - V.Ivanchenko (hadr-cohe-V09-01-08) -
trunk/source/processes/hadronic/models/coherent_elastic/include/G4DiffuseElastic.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4DiffuseElastic.hh,v 1.1 3 2007/11/06 17:01:20grichine Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4DiffuseElastic.hh,v 1.15 2009/02/20 15:38:07 grichine Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 164 164 G4double tmass, G4double thetaLab); 165 165 166 166 void TestAngleTable(const G4ParticleDefinition* theParticle, G4double partMom, 167 G4double Z, G4double A); 167 168 168 169 … … 175 176 G4double GetDiffElasticProb(G4double theta); 176 177 G4double GetDiffElasticSumProb(G4double theta); 178 G4double GetDiffElasticSumProbA(G4double alpha); 177 179 G4double GetIntegrandFunction(G4double theta); 178 180 … … 443 445 G4double r0; 444 446 445 if( A < 50.)446 { 447 if( A > 10.) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;448 else r0 = 1.1*fermi;447 if( A < 50. ) 448 { 449 if( A > 10. ) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi; 450 else r0 = 1.1*fermi; 449 451 450 452 fNuclearRadius = r0*std::pow(A, 1./3.); … … 452 454 else 453 455 { 454 r0 = 1.7*fermi; 455 456 fNuclearRadius = r0*std::pow(A, 0.27); 456 r0 = 1.7*fermi; // 1.7*fermi; 457 458 fNuclearRadius = r0*std::pow(A, 0.27); // 0.27); 457 459 } 458 460 return fNuclearRadius; -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchange.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4ChargeExchange.cc,v 1.1 4 2008/12/18 13:01:48 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ChargeExchange.cc,v 1.13 2008/11/20 12:35:19 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 312 312 dd = 10.; 313 313 } 314 G4double x1 = (1.0 - std::exp(-tmax*bb))*aa/bb;315 G4double x2 = (1.0 - std::exp(-tmax*dd))*cc/dd;314 G4double x1 = (1.0 - exp(-tmax*bb))*aa/bb; 315 G4double x2 = (1.0 - exp(-tmax*dd))*cc/dd; 316 316 317 317 G4double t; -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4DiffuseElastic.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiffuseElastic.cc,v 1.2 0 2008/01/14 10:39:13 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4DiffuseElastic.cc,v 1.23 2009/03/02 09:17:43 grichine Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // … … 67 67 { 68 68 SetMinEnergy( 0.01*GeV ); 69 SetMaxEnergy( 1 00.*TeV );69 SetMaxEnergy( 1.*TeV ); 70 70 verboseLevel = 0; 71 71 lowEnergyRecoilLimit = 100.*keV; … … 83 83 84 84 fEnergyBin = 200; 85 fAngleBin = 100;86 87 fEnergyVector = 0;85 fAngleBin = 200; 86 87 fEnergyVector = new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin ); 88 88 fAngleTable = 0; 89 89 … … 107 107 { 108 108 SetMinEnergy( 0.01*GeV ); 109 SetMaxEnergy( 1 00.*TeV );109 SetMaxEnergy( 1.*TeV ); 110 110 verboseLevel = 0; 111 111 lowEnergyRecoilLimit = 100.*keV; … … 122 122 thePionMinus= G4PionMinus::PionMinus(); 123 123 124 fEnergyBin = 200; 125 fAngleBin =100;124 fEnergyBin = 200; // 200; // 100; 125 fAngleBin = 400; // 200; // 100; 126 126 127 127 // fEnergyVector = 0; … … 174 174 fAtomicWeight = (*theElementTable)[jEl]->GetN(); // number of nucleons 175 175 fNuclearRadius = CalculateNuclearRad(fAtomicWeight); 176 if(verboseLevel > 0) 176 177 if(verboseLevel > 0) 178 { 177 179 G4cout<<"G4DiffuseElastic::Initialise() the element: " 178 180 <<(*theElementTable)[jEl]->GetName()<<G4endl; 181 } 179 182 fElementNumberVector.push_back(fAtomicNumber); 180 183 fElementNameVector.push_back((*theElementTable)[jEl]->GetName()); … … 183 186 fAngleBank.push_back(fAngleTable); 184 187 } 185 return;186 }187 188 //////////////////////////////////////////////////////////////////////////////189 //190 // Initialisation for given particle on fly using new element number191 192 void G4DiffuseElastic::InitialiseOnFly(G4double Z, G4double A)193 {194 fAtomicNumber = Z; // atomic number195 fAtomicWeight = A; // number of nucleons196 fNuclearRadius = CalculateNuclearRad(fAtomicWeight);197 if(verboseLevel > 0)198 G4cout<<"G4DiffuseElastic::Initialise() the element with Z = "199 <<Z<<"; and A = "<<A<<G4endl;200 fElementNumberVector.push_back(fAtomicNumber);201 202 BuildAngleTable();203 fAngleBank.push_back(fAngleTable);204 return;205 }206 207 ///////////////////////////////////////////////////////////////////////////////208 //209 // Build for given particle and element table of momentum, angle probability.210 // For the moment in lab system.211 212 void G4DiffuseElastic::BuildAngleTable()213 {214 G4int i, j;215 G4double partMom, kinE, a=0., z = fParticle->GetPDGCharge(), m1 = fParticle->GetPDGMass();216 G4double theta1, theta2, thetaMax, thetaCoulomb, sum = 0.;217 218 G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;219 220 fAngleTable = new G4PhysicsTable(fEnergyBin);221 222 for(i = 0; i < fEnergyBin; i++)223 {224 kinE = fEnergyVector->GetLowEdgeEnergy(i);225 partMom = std::sqrt( kinE*(kinE + 2*m1) );226 fWaveVector = partMom/hbarc;227 228 thetaMax = 10.174/fWaveVector/fNuclearRadius;229 230 if (thetaMax > pi) thetaMax = pi;231 232 thetaCoulomb = 0.2*thetaMax;233 234 if(z)235 {236 a = partMom/m1;237 fBeta = a/std::sqrt(1+a*a);238 fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber);239 fAm = CalculateAm( partMom, fZommerfeld, fAtomicNumber);240 }241 G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin);242 243 G4PhysicsLogVector* angleBins = new G4PhysicsLogVector( 0.01*thetaMax, thetaMax, fAngleBin );244 245 for(j = 1; j < fAngleBin; j++)246 {247 theta1 = angleBins->GetLowEdgeEnergy(j-1);248 theta2 = angleBins->GetLowEdgeEnergy(j);249 250 if(theta2 > thetaCoulomb && z) fAddCoulomb = true;251 252 sum += integral.Legendre10(this,&G4DiffuseElastic::GetIntegrandFunction, theta1,theta2);253 254 angleVector->PutValue( j-1 , theta2, sum );255 // G4cout<<"j-1 = "<<j-1<<"; theta2 = "<<theta2<<"; sum = "<<sum<<G4endl;256 }257 fAddCoulomb = false;258 259 fAngleTable->insertAt(i,angleVector);260 261 // delete[] angleVector;262 // delete[] angleBins;263 }264 188 return; 265 189 } … … 525 449 fAtomicWeight = A; 526 450 fAtomicNumber = Z; 527 G4double z = particle->GetPDGCharge(); 528 if(z) 451 fNuclearRadius = CalculateNuclearRad(A); 452 fAddCoulomb = false; 453 454 G4double z = particle->GetPDGCharge(); 455 456 G4double kRt = fWaveVector*fNuclearRadius*theta; 457 G4double kRtC = 1.9; 458 459 if( z && (kRt > kRtC) ) 529 460 { 530 461 fAddCoulomb = true; 531 fBeta = CalculateParticleBeta( particle, momentum); 532 fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber); 533 fAm = CalculateAm( momentum, fZommerfeld, fAtomicNumber); 534 } 535 fNuclearRadius = CalculateNuclearRad(A); 536 462 fBeta = CalculateParticleBeta( particle, momentum); 463 fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber); 464 fAm = CalculateAm( momentum, fZommerfeld, fAtomicNumber); 465 } 537 466 G4double sigma = fNuclearRadius*fNuclearRadius*GetDiffElasticSumProb(theta); 538 467 … … 552 481 { 553 482 G4double m1 = particle->GetPDGMass(); 483 554 484 G4LorentzVector lv1(0.,0.,plab,std::sqrt(plab*plab+m1*m1)); 555 485 556 486 G4int iZ = static_cast<G4int>(Z+0.5); 557 487 G4int iA = static_cast<G4int>(A+0.5); 558 G4ParticleDefinition * theDef = 0; 488 489 G4ParticleDefinition* theDef = 0; 559 490 560 491 if (iZ == 1 && iA == 1) theDef = theProton; … … 575 506 G4ThreeVector p1 = lv1.vect(); 576 507 G4double ptot = p1.mag(); 577 G4double ptot2 = ptot*ptot;578 G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;508 G4double ptot2 = ptot*ptot; 509 G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2; 579 510 580 511 if( cost >= 1.0 ) cost = 1.0; … … 658 589 // G4double r0 = 1.08*fermi; 659 590 // G4double rad = r0*std::pow(A, 1./3.); 591 660 592 G4double kr = fWaveVector*fNuclearRadius; // wavek*rad; 661 593 G4double kr2 = kr*kr; … … 686 618 } 687 619 G4double lambda = 15.; // 15 ok 620 688 621 // G4double kg = fWaveVector*gamma; // wavek*delta; 622 689 623 G4double kg = lambda*(1.-std::exp(-fWaveVector*gamma/lambda)); // wavek*delta; 690 624 G4double kg2 = kg*kg; 625 691 626 // G4double dk2t = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta; 692 627 // G4double dk2t2 = dk2t*dk2t; 693 628 // G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta; 629 694 630 G4double pikdt = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda)); // wavek*delta; 695 631 … … 730 666 // G4double r0 = 1.08*fermi; 731 667 // G4double rad = r0*std::pow(A, 1./3.); 668 732 669 G4double kr = fWaveVector*fNuclearRadius; // wavek*rad; 733 670 G4double kr2 = kr*kr; … … 774 711 775 712 G4double kg2 = kg*kg; 713 776 714 // G4double dk2t = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta; 777 778 715 // G4cout<<"dk2t = "<<dk2t<<G4endl; 779 780 716 // G4double dk2t2 = dk2t*dk2t; 781 782 717 // G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta; 718 783 719 G4double pikdt = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda)); // wavek*delta; 784 720 … … 808 744 //////////////////////////////////////////////////////////////////////////// 809 745 // 746 // return differential elastic probability d(probability)/d(t) with 747 // Coulomb correction 748 749 G4double 750 G4DiffuseElastic::GetDiffElasticSumProbA( G4double alpha ) 751 { 752 G4double theta; 753 754 theta = std::sqrt(alpha); 755 756 // theta = std::acos( 1 - alpha/2. ); 757 758 G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2; 759 G4double delta, diffuse, gamma; 760 G4double e1, e2, bone, bone2; 761 762 // G4double wavek = momentum/hbarc; // wave vector 763 // G4double r0 = 1.08*fermi; 764 // G4double rad = r0*std::pow(A, 1./3.); 765 766 G4double kr = fWaveVector*fNuclearRadius; // wavek*rad; 767 G4double kr2 = kr*kr; 768 G4double krt = kr*theta; 769 770 bzero = BesselJzero(krt); 771 bzero2 = bzero*bzero; 772 bone = BesselJone(krt); 773 bone2 = bone*bone; 774 bonebyarg = BesselOneByArg(krt); 775 bonebyarg2 = bonebyarg*bonebyarg; 776 777 if (fParticle == theProton) 778 { 779 diffuse = 0.63*fermi; 780 // diffuse = 0.6*fermi; 781 gamma = 0.3*fermi; 782 delta = 0.1*fermi*fermi; 783 e1 = 0.3*fermi; 784 e2 = 0.35*fermi; 785 } 786 else // as proton, if were not defined 787 { 788 diffuse = 0.63*fermi; 789 gamma = 0.3*fermi; 790 delta = 0.1*fermi*fermi; 791 e1 = 0.3*fermi; 792 e2 = 0.35*fermi; 793 } 794 G4double lambda = 15.; // 15 ok 795 // G4double kg = fWaveVector*gamma; // wavek*delta; 796 G4double kg = lambda*(1.-std::exp(-fWaveVector*gamma/lambda)); // wavek*delta; 797 798 // G4cout<<"kg = "<<kg<<G4endl; 799 800 if(fAddCoulomb) // add Coulomb correction 801 { 802 G4double sinHalfTheta = theta*0.5; // std::sin(0.5*theta); 803 G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta; 804 805 kg += 0.5*fZommerfeld/kr/(sinHalfTheta2+fAm); // correction at J0() 806 // kg += 0.65*fZommerfeld/kr/(sinHalfTheta2+fAm); // correction at J0() 807 } 808 809 G4double kg2 = kg*kg; 810 811 // G4double dk2t = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta; 812 // G4cout<<"dk2t = "<<dk2t<<G4endl; 813 // G4double dk2t2 = dk2t*dk2t; 814 // G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta; 815 816 G4double pikdt = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda)); // wavek*delta; 817 818 // G4cout<<"pikdt = "<<pikdt<<G4endl; 819 820 damp = DampFactor(pikdt); 821 damp2 = damp*damp; 822 823 G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector; 824 G4double e2dk3t = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta; 825 826 sigma = kg2; 827 // sigma += dk2t2; 828 sigma *= bzero2; 829 sigma += mode2k2*bone2; 830 sigma += e2dk3t*bzero*bone; 831 832 // sigma += kr2*(1 + 8.*fZommerfeld*fZommerfeld/kr2)*bonebyarg2; // correction at J1()/() 833 sigma += kr2*bonebyarg2; // correction at J1()/() 834 835 sigma *= damp2; // *rad*rad; 836 837 return sigma; 838 } 839 840 841 //////////////////////////////////////////////////////////////////////////// 842 // 810 843 // return differential elastic probability 2*pi*sin(theta)*d(probability)/d(omega) 811 844 812 845 G4double 813 G4DiffuseElastic::GetIntegrandFunction( G4double theta )846 G4DiffuseElastic::GetIntegrandFunction( G4double alpha ) 814 847 { 815 848 G4double result; 816 849 817 result = 2*pi*std::sin(theta); 818 result *= GetDiffElasticSumProb(theta); 850 result = GetDiffElasticSumProbA(alpha); 851 852 // result *= 2*pi*std::sin(theta); 853 819 854 return result; 820 855 } … … 859 894 //////////////////////////////////////////////////////////////////////////// 860 895 // 861 // Return inv momentum transfer -t > 0 from initialisation table862 863 G4double G4DiffuseElastic::SampleTableT( const G4ParticleDefinition* aParticle, G4double p,864 G4double Z, G4double A)865 {866 G4double theta = SampleTableThetaCMS( aParticle, p, Z, A); // sample theta in cms867 G4double t = 2*p*p*( 1 - std::cos(theta) ); // -t !!!868 return t;869 }870 871 ////////////////////////////////////////////////////////////////////////////872 //873 896 // Return scattering angle sampled in cms 874 897 … … 922 945 } 923 946 924 //////////////////////////////////////////////////////////////////////////// 925 // 926 // Return scattering angle sampled in cms according to precalculated table. 947 ///////////////////////////////////////////////////////////////////////////// 948 ///////////////////// Table preparation and reading //////////////////////// 949 //////////////////////////////////////////////////////////////////////////// 950 // 951 // Return inv momentum transfer -t > 0 from initialisation table 952 953 G4double G4DiffuseElastic::SampleTableT( const G4ParticleDefinition* aParticle, G4double p, 954 G4double Z, G4double A) 955 { 956 G4double alpha = SampleTableThetaCMS( aParticle, p, Z, A); // sample theta2 in cms 957 // G4double t = 2*p*p*( 1 - std::cos(std::sqrt(alpha)) ); // -t !!! 958 G4double t = p*p*alpha; // -t !!! 959 return t; 960 } 961 962 //////////////////////////////////////////////////////////////////////////// 963 // 964 // Return scattering angle2 sampled in cms according to precalculated table. 927 965 928 966 … … 942 980 if ( iElement == fElementNumberVector.size() ) 943 981 { 944 InitialiseOnFly(Z,A); 982 InitialiseOnFly(Z,A); // table preparation, if needed 983 945 984 // iElement--; 946 985 … … 955 994 G4double kinE = std::sqrt(momentum*momentum + m1*m1) - m1; 956 995 957 for( iMomentum = 0; iMomentum < fEnergyBin; iMomentum++)996 for( iMomentum = 0; iMomentum < fEnergyBin; iMomentum++) 958 997 { 959 998 if( kinE < fEnergyVector->GetLowEdgeEnergy(iMomentum) ) break; 960 999 } 961 if ( iMomentum == fEnergyBin ) iMomentum--; // kinE is more then theMaxEnergy1000 if ( iMomentum >= fEnergyBin ) iMomentum = fEnergyBin-1; // kinE is more then theMaxEnergy 962 1001 if ( iMomentum < 0 ) iMomentum = 0; // against negative index, kinE < theMinEnergy 1002 963 1003 // G4cout<<"iMomentum = "<<iMomentum<<G4endl; 964 1004 965 if (iMomentum == fEnergyBin -1 || iMomentum == 0 ) // the table edges1005 if (iMomentum == fEnergyBin -1 || iMomentum == 0 ) // the table edges 966 1006 { 967 1007 position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand(); 1008 968 1009 // G4cout<<"position = "<<position<<G4endl; 969 1010 970 for(iAngle = 0; iAngle < fAngleBin ; iAngle++)1011 for(iAngle = 0; iAngle < fAngleBin-1; iAngle++) 971 1012 { 972 1013 if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break; 973 1014 } 974 if (iAngle == fAngleBin) iAngle--; 1015 if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2; 1016 975 1017 // G4cout<<"iAngle = "<<iAngle<<G4endl; 976 1018 977 1019 randAngle = GetScatteringAngle(iMomentum, iAngle, position); 1020 978 1021 // G4cout<<"randAngle = "<<randAngle<<G4endl; 979 1022 } 980 else 981 { 982 position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand(); 1023 else // kinE inside between energy table edges 1024 { 1025 // position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand(); 1026 position = (*(*fAngleTable)(iMomentum))(0)*G4UniformRand(); 1027 983 1028 // G4cout<<"position = "<<position<<G4endl; 984 1029 985 for(iAngle = 0; iAngle < fAngleBin ; iAngle++)1030 for(iAngle = 0; iAngle < fAngleBin-1; iAngle++) 986 1031 { 987 if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break; 1032 // if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break; 1033 if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) break; 988 1034 } 989 if (iAngle == fAngleBin) iAngle--; 1035 if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2; 1036 990 1037 // G4cout<<"iAngle = "<<iAngle<<G4endl; 991 1038 992 1039 theta2 = GetScatteringAngle(iMomentum, iAngle, position); 1040 993 1041 // G4cout<<"theta2 = "<<theta2<<G4endl; 994 1042 E2 = fEnergyVector->GetLowEdgeEnergy(iMomentum); 1043 995 1044 // G4cout<<"E2 = "<<E2<<G4endl; 996 1045 997 1046 iMomentum--; 998 999 position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand(); 1047 1048 // position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand(); 1049 1000 1050 // G4cout<<"position = "<<position<<G4endl; 1001 1051 1002 for(iAngle = 0; iAngle < fAngleBin ; iAngle++)1052 for(iAngle = 0; iAngle < fAngleBin-1; iAngle++) 1003 1053 { 1004 if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break; 1054 // if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break; 1055 if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) break; 1005 1056 } 1006 if (iAngle == fAngleBin) iAngle--;1007 1057 if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2; 1058 1008 1059 theta1 = GetScatteringAngle(iMomentum, iAngle, position); 1060 1009 1061 // G4cout<<"theta1 = "<<theta1<<G4endl; 1062 1010 1063 E1 = fEnergyVector->GetLowEdgeEnergy(iMomentum); 1064 1011 1065 // G4cout<<"E1 = "<<E1<<G4endl; 1012 1066 … … 1016 1070 1017 1071 randAngle = W1*theta1 + W2*theta2; 1072 1073 // randAngle = theta2; 1018 1074 // G4cout<<"randAngle = "<<randAngle<<G4endl; 1019 1075 } 1076 // G4double angle = randAngle; 1077 // if (randAngle > 0.) randAngle /= 2*pi*std::sin(angle); 1078 1020 1079 return randAngle; 1021 1080 } 1022 1081 1082 ////////////////////////////////////////////////////////////////////////////// 1083 // 1084 // Initialisation for given particle on fly using new element number 1085 1086 void G4DiffuseElastic::InitialiseOnFly(G4double Z, G4double A) 1087 { 1088 fAtomicNumber = Z; // atomic number 1089 fAtomicWeight = A; // number of nucleons 1090 1091 fNuclearRadius = CalculateNuclearRad(fAtomicWeight); 1092 1093 if( verboseLevel > 0 ) 1094 { 1095 G4cout<<"G4DiffuseElastic::Initialise() the element with Z = " 1096 <<Z<<"; and A = "<<A<<G4endl; 1097 } 1098 fElementNumberVector.push_back(fAtomicNumber); 1099 1100 BuildAngleTable(); 1101 1102 fAngleBank.push_back(fAngleTable); 1103 1104 return; 1105 } 1106 1107 /////////////////////////////////////////////////////////////////////////////// 1108 // 1109 // Build for given particle and element table of momentum, angle probability. 1110 // For the moment in lab system. 1111 1112 void G4DiffuseElastic::BuildAngleTable() 1113 { 1114 G4int i, j; 1115 G4double partMom, kinE, a = 0., z = fParticle->GetPDGCharge(), m1 = fParticle->GetPDGMass(); 1116 G4double alpha1, alpha2, alphaMax, alphaCoulomb, delta = 0., sum = 0.; 1117 1118 G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral; 1119 1120 fAngleTable = new G4PhysicsTable(fEnergyBin); 1121 1122 for( i = 0; i < fEnergyBin; i++) 1123 { 1124 kinE = fEnergyVector->GetLowEdgeEnergy(i); 1125 partMom = std::sqrt( kinE*(kinE + 2*m1) ); 1126 1127 fWaveVector = partMom/hbarc; 1128 1129 G4double kR = fWaveVector*fNuclearRadius; 1130 G4double kR2 = kR*kR; 1131 G4double kRmax = 18.6; // 10.6; 10.6, 18, 10.174; ~ 3 maxima of J1 or 15., 25. 1132 G4double kRcoul = 1.9; // 1.2; 1.4, 2.5; // on the first slope of J1 1133 // G4double kRlim = 1.2; 1134 // G4double kRlim2 = kRlim*kRlim/kR2; 1135 1136 alphaMax = kRmax*kRmax/kR2; 1137 1138 if (alphaMax > 4.) alphaMax = 4.; // vmg05-02-09: was pi2 1139 1140 alphaCoulomb = kRcoul*kRcoul/kR2; 1141 1142 if( z ) 1143 { 1144 a = partMom/m1; // beta*gamma for m1 1145 fBeta = a/std::sqrt(1+a*a); 1146 fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber); 1147 fAm = CalculateAm( partMom, fZommerfeld, fAtomicNumber); 1148 } 1149 G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin-1); 1150 1151 // G4PhysicsLogVector* angleBins = new G4PhysicsLogVector( 0.001*alphaMax, alphaMax, fAngleBin ); 1152 1153 G4double delth = alphaMax/fAngleBin; 1154 1155 sum = 0.; 1156 1157 // fAddCoulomb = false; 1158 fAddCoulomb = true; 1159 1160 // for(j = 1; j < fAngleBin; j++) 1161 for(j = fAngleBin-1; j >= 1; j--) 1162 { 1163 // alpha1 = angleBins->GetLowEdgeEnergy(j-1); 1164 // alpha2 = angleBins->GetLowEdgeEnergy(j); 1165 1166 // alpha1 = alphaMax*(j-1)/fAngleBin; 1167 // alpha2 = alphaMax*( j )/fAngleBin; 1168 1169 alpha1 = delth*(j-1); 1170 // if(alpha1 < kRlim2) alpha1 = kRlim2; 1171 alpha2 = alpha1 + delth; 1172 1173 // if( ( alpha2 > alphaCoulomb ) && z ) fAddCoulomb = true; 1174 if( ( alpha1 < alphaCoulomb ) && z ) fAddCoulomb = false; 1175 1176 delta = integral.Legendre10(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2); 1177 // delta = integral.Legendre96(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2); 1178 1179 sum += delta; 1180 1181 angleVector->PutValue( j-1 , alpha1, sum ); // alpha2 1182 // G4cout<<"j-1 = "<<j-1<<"; alpha2 = "<<alpha2<<"; sum = "<<sum<<G4endl; 1183 } 1184 fAngleTable->insertAt(i,angleVector); 1185 1186 // delete[] angleVector; 1187 // delete[] angleBins; 1188 } 1189 return; 1190 } 1191 1023 1192 ///////////////////////////////////////////////////////////////////////////////// 1024 1193 // … … 1026 1195 1027 1196 G4double 1028 G4DiffuseElastic:: GetScatteringAngle( G4int iMomentum, G4int iAngle, G4double position)1197 G4DiffuseElastic:: GetScatteringAngle( G4int iMomentum, G4int iAngle, G4double position ) 1029 1198 { 1030 1199 G4double x1, x2, y1, y2, randAngle; … … 1033 1202 { 1034 1203 randAngle = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle); 1204 // iAngle++; 1035 1205 } 1036 1206 else … … 1046 1216 x2 = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle); 1047 1217 1048 if ( x1 == x2 ) randAngle = x2;1218 if ( x1 == x2 ) randAngle = x2; 1049 1219 else 1050 1220 { 1051 if ( y1 == y2 ) randAngle = x1 + (x2 - x1)*G4UniformRand();1221 if ( y1 == y2 ) randAngle = x1 + ( x2 - x1 )*G4UniformRand(); 1052 1222 else 1053 1223 { 1054 randAngle = x1 + ( position - y1)*(x2 - x1)/(y2 - y1);1224 randAngle = x1 + ( position - y1 )*( x2 - x1 )/( y2 - y1 ); 1055 1225 } 1056 1226 } … … 1270 1440 } 1271 1441 1442 /////////////////////////////////////////////////////////////////////////////// 1443 // 1444 // Test for given particle and element table of momentum, angle probability. 1445 // For the moment in lab system. 1446 1447 void G4DiffuseElastic::TestAngleTable(const G4ParticleDefinition* theParticle, G4double partMom, 1448 G4double Z, G4double A) 1449 { 1450 fAtomicNumber = Z; // atomic number 1451 fAtomicWeight = A; // number of nucleons 1452 fNuclearRadius = CalculateNuclearRad(fAtomicWeight); 1453 1454 1455 1456 G4cout<<"G4DiffuseElastic::TestAngleTable() init the element with Z = " 1457 <<Z<<"; and A = "<<A<<G4endl; 1458 1459 fElementNumberVector.push_back(fAtomicNumber); 1460 1461 1462 1463 1464 G4int i=0, j; 1465 G4double a = 0., z = theParticle->GetPDGCharge(), m1 = fParticle->GetPDGMass(); 1466 G4double alpha1=0., alpha2=0., alphaMax=0., alphaCoulomb=0.; 1467 G4double deltaL10 = 0., deltaL96 = 0., deltaAG = 0.; 1468 G4double sumL10 = 0.,sumL96 = 0.,sumAG = 0.; 1469 G4double epsilon = 0.001; 1470 1471 G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral; 1472 1473 fAngleTable = new G4PhysicsTable(fEnergyBin); 1474 1475 fWaveVector = partMom/hbarc; 1476 1477 G4double kR = fWaveVector*fNuclearRadius; 1478 G4double kR2 = kR*kR; 1479 G4double kRmax = 10.6; // 10.6, 18, 10.174; ~ 3 maxima of J1 or 15., 25. 1480 G4double kRcoul = 1.2; // 1.4, 2.5; // on the first slope of J1 1481 1482 alphaMax = kRmax*kRmax/kR2; 1483 1484 if (alphaMax > 4.) alphaMax = 4.; // vmg05-02-09: was pi2 1485 1486 alphaCoulomb = kRcoul*kRcoul/kR2; 1487 1488 if( z ) 1489 { 1490 a = partMom/m1; // beta*gamma for m1 1491 fBeta = a/std::sqrt(1+a*a); 1492 fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber); 1493 fAm = CalculateAm( partMom, fZommerfeld, fAtomicNumber); 1494 } 1495 G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin-1); 1496 1497 // G4PhysicsLogVector* angleBins = new G4PhysicsLogVector( 0.001*alphaMax, alphaMax, fAngleBin ); 1498 1499 1500 fAddCoulomb = false; 1501 1502 for(j = 1; j < fAngleBin; j++) 1503 { 1504 // alpha1 = angleBins->GetLowEdgeEnergy(j-1); 1505 // alpha2 = angleBins->GetLowEdgeEnergy(j); 1506 1507 alpha1 = alphaMax*(j-1)/fAngleBin; 1508 alpha2 = alphaMax*( j )/fAngleBin; 1509 1510 if( ( alpha2 > alphaCoulomb ) && z ) fAddCoulomb = true; 1511 1512 deltaL10 = integral.Legendre10(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2); 1513 deltaL96 = integral.Legendre96(this, &G4DiffuseElastic::GetIntegrandFunction, alpha1, alpha2); 1514 deltaAG = integral.AdaptiveGauss(this, &G4DiffuseElastic::GetIntegrandFunction, 1515 alpha1, alpha2,epsilon); 1516 1517 // G4cout<<alpha1<<"\t"<<std::sqrt(alpha1)/degree<<"\t" 1518 // <<deltaL10<<"\t"<<deltaL96<<"\t"<<deltaAG<<G4endl; 1519 1520 sumL10 += deltaL10; 1521 sumL96 += deltaL96; 1522 sumAG += deltaAG; 1523 1524 G4cout<<alpha1<<"\t"<<std::sqrt(alpha1)/degree<<"\t" 1525 <<sumL10<<"\t"<<sumL96<<"\t"<<sumAG<<G4endl; 1526 1527 angleVector->PutValue( j-1 , alpha1, sumL10 ); // alpha2 1528 } 1529 fAngleTable->insertAt(i,angleVector); 1530 fAngleBank.push_back(fAngleTable); 1531 1532 /* 1533 // Integral over all angle range - Bad accuracy !!! 1534 1535 sumL10 = integral.Legendre10(this, &G4DiffuseElastic::GetIntegrandFunction, 0., alpha2); 1536 sumL96 = integral.Legendre96(this, &G4DiffuseElastic::GetIntegrandFunction, 0., alpha2); 1537 sumAG = integral.AdaptiveGauss(this, &G4DiffuseElastic::GetIntegrandFunction, 1538 0., alpha2,epsilon); 1539 G4cout<<G4endl; 1540 G4cout<<alpha2<<"\t"<<std::sqrt(alpha2)/degree<<"\t" 1541 <<sumL10<<"\t"<<sumL96<<"\t"<<sumAG<<G4endl; 1542 */ 1543 return; 1544 } 1545 1272 1546 // 1273 1547 // -
trunk/source/processes/hadronic/models/de_excitation/History
r1007 r1055 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 13 March 2009 Vladimir Ivanchenko (hadr-deex-V09-02-09) 18 --------------------------------------------------------- 19 - G4CompetitiveFission - fixed 4-momentum balance by using direct Lorentz 20 computations (JMQ); 21 - use G4 units (VI). 22 23 12 March 2009 Alexander Howard (hadr-deex-V09-02-08) 24 ---------------------------------------------------- 25 - Added Tatsumi's fixes ( G4GEMProbability.cc and G4GEMChannel.cc ) to GEM 26 on top of patch9-02 ("hadr-deex-V09-02-07" and "hadr-deex-util-V09-02-00") 27 28 04 March 2009 Gabriele Cosmo 29 ---------------------------- 30 - Fixed leaks in singleton classes in the 'util' module. Corrected wherever 31 needed inlining of constructors/destructors for base classes and usage of 32 virtual specification. Corresponds to tag "hadr-deex-util-V09-02-00". 33 34 15 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-07) 35 --------------------------------------------------------- 36 - G4EvaporationProbability - hbar_Plank substituted by hbarc (JMQ fix) 37 - G4FissionProbability - fixed forgotten parenthesis (JMQ fix) 38 39 13 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-06) 40 --------------------------------------------------------- 41 - Jose Manuel Quesada change the shape of probabilities (back to 9.2) 42 for d, t, He3, alpha near the Coulomb barrier 43 44 12 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-05) 45 --------------------------------------------------------- 46 - Jose Manuel Quesada change the shape of probabilities 47 for d, t, He3, alpha near the Coulomb barrier 48 49 11 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-04) 50 --------------------------------------------------------- 51 - Jose Manuel Quesada set default OPT=3 back for all particles 52 and add smearing of Coloumb barriers of d, t, he3, alpha 53 54 10 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-03) 55 --------------------------------------------------------- 56 - Exclude updated G4VGammaDeexcitation 57 58 10 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-02) 59 --------------------------------------------------------- 60 - Jose Manuel Quesada set default OPT=3 for evaporation of protons 61 and neutrons and OPT=1 for deuterons, tritons, alpha and He3 62 63 10 February 2009 Vladimir Ivanchenko (hadr-deex-V09-02-01) 64 --------------------------------------------------------- 65 - Miguel Cortes added extra protection to G4VGammaDeexcitation 66 67 27 January 2009 Vladimir Ivanchenko (hadr-deex-V09-02-00) 68 -------------------------------------------------------- 69 - Miguel Cortes fix of Lorentz transformation in G4VGammaDeexcitation, 70 which provides Doppler broading of gamma lines 16 71 17 72 09 December 2008 Alexander Howard (hadr-deex-V09-01-25) -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4AlphaEvaporationProbability.cc
r1007 r1055 104 104 //OPT=3,4 Kalbach's parameterization 105 105 // 106 G4double G4AlphaEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 106 G4double G4AlphaEvaporationProbability::CrossSection(const G4Fragment & fragment, 107 const G4double K) 107 108 { 108 109 theA=GetA(); … … 117 118 118 119 if (OPTxs==0) {std::ostringstream errOs; 119 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (Alpha's)!!" <<G4endl; 120 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (Alpha's)!!" 121 <<G4endl; 120 122 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 121 123 return 0.;} … … 203 205 G4double ra=1.20; 204 206 205 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 207 //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); 206 210 ecsq = ec * ec; 207 211 p = p0 + p1/ec + p2/ecsq; … … 226 230 227 231 if (elab <= ec) { //start for E<Ec 228 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 232 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 229 233 } //end for E<Ec 230 234 else { //start for E>Ec -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4DeuteronEvaporationProbability.cc
r1007 r1055 106 106 //OPT=3,4 Kalbach's parameterization 107 107 // 108 G4double G4DeuteronEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K)108 G4double G4DeuteronEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 109 109 { 110 110 theA=GetA(); … … 205 205 G4double ra=0.80; 206 206 207 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 207 //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); 208 210 ecsq = ec * ec; 209 211 p = p0 + p1/ec + p2/ecsq; … … 226 228 elab = K * FragmentA / ResidualA; 227 229 sig = 0.; 228 230 229 231 if (elab <= ec) { //start for E<Ec 230 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 232 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 231 233 } //end for E<Ec 232 234 else { //start for E>Ec -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationProbability.cc
r1007 r1055 33 33 // JMQ (06 September 2008) Also external choices have been added for 34 34 // superimposed Coulomb barrier (if useSICB is set true, by default is false) 35 35 // 36 // JMQ (14 february 2009) bug fixed in emission width: hbarc instead of hbar_Planck in the denominator 37 // 36 38 #include <iostream> 37 39 using namespace std; … … 138 140 139 141 140 // if Coulomb barrier cutoff is superimposed for all cross sections the limit is the Coulomb Barrier141 G4double LowerLimit= limit;142 143 // MaximalKineticEnergy: asimptotic value (already accounted for in G4EvaporationChannel)144 145 G4double UpperLimit = MaximalKineticEnergy;146 147 148 G4double Width = IntegrateEmissionProbability(fragment,LowerLimit,UpperLimit);149 150 return Width;142 // if Coulomb barrier cutoff is superimposed for all cross sections the limit is the Coulomb Barrier 143 G4double LowerLimit= limit; 144 145 // MaximalKineticEnergy: asimptotic value (already accounted for in G4EvaporationChannel) 146 147 G4double UpperLimit = MaximalKineticEnergy; 148 149 150 G4double Width = IntegrateEmissionProbability(fragment,LowerLimit,UpperLimit); 151 152 return Width; 151 153 } else{ 152 154 std::ostringstream errOs; … … 244 246 if (E1<0.) return 0.; 245 247 246 247 //Without 1/hbar_Panck remains as a width 248 249 G4double Prob=Gamma*ParticleMass/((pi*hbar_Planck)*(pi*hbar_Planck)*std::exp(2*std::sqrt(a0*E0)))*K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn; 250 251 return Prob; 252 253 } 254 255 248 //JMQ 14/02/09 BUG fixed: hbarc should be in the denominator instead of hbar_Planck 249 //Without 1/hbar_Panck remains as a width 250 // G4double Prob=Gamma*ParticleMass/((pi*hbar_Planck)*(pi*hbar_Planck)* 251 //std::exp(2*std::sqrt(a0*E0)))*K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn; 252 253 G4double Prob=Gamma*ParticleMass/((pi*hbarc)*(pi*hbarc)*std::exp(2*std::sqrt(a0*E0))) 254 *K*CrossSection(fragment,K)*std::exp(2*std::sqrt(a1*E1))*millibarn; 255 256 return Prob; 257 } 258 259 -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4He3EvaporationProbability.cc
r1007 r1055 104 104 //OPT=3,4 Kalbach's parameterization 105 105 // 106 G4double G4He3EvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K)106 G4double G4He3EvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 107 107 { 108 108 theA=GetA(); … … 117 117 118 118 if (OPTxs==0) {std::ostringstream errOs; 119 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (He3's)!!" <<G4endl; 119 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (He3's)!!" 120 <<G4endl; 120 121 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 121 122 return 0.;} … … 200 201 G4double ra=0.80; 201 202 202 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 203 //JMQ 13/02/09 increase of reduced radius to lower the barrier 204 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 205 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 203 206 ecsq = ec * ec; 204 207 p = p0 + p1/ec + p2/ecsq; … … 221 224 elab = K * FragmentA / ResidualA; 222 225 sig = 0.; 223 226 224 227 if (elab <= ec) { //start for E<Ec 225 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 228 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 226 229 } //end for E<Ec 227 230 else { //start for E>Ec -
trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4TritonEvaporationProbability.cc
r1007 r1055 100 100 //OPT=3,4 Kalbach's parameterization 101 101 // 102 G4double G4TritonEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K)102 G4double G4TritonEvaporationProbability::CrossSection(const G4Fragment & fragment, const G4double K) 103 103 { 104 104 theA=GetA(); … … 113 113 114 114 if (OPTxs==0) {std::ostringstream errOs; 115 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (tritons)!!" <<G4endl; 115 errOs << "We should'n be here (OPT =0) at evaporation cross section calculation (tritons)!!" 116 <<G4endl; 116 117 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 117 118 return 0.;} … … 198 199 G4double ra=0.80; 199 200 200 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 201 //JMQ 13/02/09 increase of reduced radius to lower the barrier 202 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 203 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 201 204 ecsq = ec * ec; 202 205 p = p0 + p1/ec + p2/ecsq; … … 219 222 elab = K * FragmentA / ResidualA; 220 223 sig = 0.; 221 224 222 225 if (elab <= ec) { //start for E<Ec 223 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 226 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 224 227 } //end for E<Ec 225 else { //start for E>Ec 228 else { //start for E>Ec 226 229 sig = (landa*elab+mu+nu/elab) * signor; 227 230 geom = 0.; -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4CompetitiveFission.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CompetitiveFission.cc,v 1. 9 2008/11/20 13:46:27 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CompetitiveFission.cc,v 1.11 2009/03/13 18:57:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Oct 1998) 32 // 33 // J. M. Quesada (March 2009). Bugs fixed: 34 // - Full relativistic calculation (Lorentz boosts) 35 // - Fission pairing energy is included in fragment excitation energies 36 // Now Energy and momentum are conserved in fission 32 37 33 38 #include "G4CompetitiveFission.hh" … … 127 132 } 128 133 134 129 135 // Atomic Mass of Nucleus (in MeV) 130 G4double M = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A)/MeV; 136 G4double M = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A); 137 131 138 // Nucleus Momentum 132 139 G4LorentzVector theNucleusMomentum = theNucleus.GetMomentum(); … … 147 154 G4double FragmentsExcitationEnergy = 0.0; 148 155 G4double FragmentsKineticEnergy = 0.0; 156 157 //JMQ 04/03/09 It will be used latter to fix the bug in energy conservation 158 G4double FissionPairingEnergy=G4PairingCorrection::GetInstance()->GetFissionPairingCorrection(A,Z); 149 159 150 160 G4int Trials = 0; … … 162 172 if (A2 < 1 || Z2 < 0) 163 173 throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakUp: Can't define second fragment! "); 164 M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2)/MeV; 174 175 M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2); 165 176 166 177 // Check that fragment masses are less or equal than total energy 167 // if (M1 + M2 > theNucleusMomentum.mag()/MeV) 168 if (M1 + M2 > theNucleusMomentum.e()/MeV) 178 if (M1 + M2 > theNucleusMomentum.e()) 169 179 throw G4HadronicException(__FILE__, __LINE__, "G4CompetitiveFission::BreakUp: Fragments Mass > Total Energy"); 170 180 171 181 // Maximal Kinetic Energy (available energy for fragments) 172 // G4double Tmax = theNucleusMomentum.mag()/MeV - M1 - M2;173 182 G4double Tmax = M + U - M1 - M2; 174 183 … … 180 189 181 190 // Excitation Energy 182 FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy; 191 // FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy; 192 // JMQ 04/03/09 BUG FIXED: in order to fulfill energy conservation the 193 // fragments carry the fission pairing energy in form of 194 //excitation energy 195 196 FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy+FissionPairingEnergy; 197 198 } while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100); 183 199 184 } while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100);185 186 200 187 201 … … 190 204 191 205 192 // while (FragmentsExcitationEnergy < 0 && Trials < 100);193 194 // Fragment 1206 // while (FragmentsExcitationEnergy < 0 && Trials < 100); 207 208 // Fragment 1 195 209 G4double U1 = FragmentsExcitationEnergy * (static_cast<G4double>(A1)/static_cast<G4double>(A)); 196 210 // Fragment 2 … … 198 212 199 213 200 G4double Pmax = std::sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) / 201 ( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy); 202 203 G4ParticleMomentum momentum1 = IsotropicVector( Pmax ); 204 G4ParticleMomentum momentum2( -momentum1 ); 214 //JMQ 04/03/09 Full relativistic calculation is performed 215 // 216 G4double Fragment1KineticEnergy=(FragmentsKineticEnergy*(FragmentsKineticEnergy+2*(M2+U2)))/(2*(M1+U1+M2+U2+FragmentsKineticEnergy)); 217 G4ParticleMomentum Momentum1(IsotropicVector(std::sqrt(Fragment1KineticEnergy*(Fragment1KineticEnergy+2*(M1+U1))))); 218 G4ParticleMomentum Momentum2(-Momentum1); 219 G4LorentzVector FourMomentum1(Momentum1,std::sqrt(Momentum1.mag2()+(M1+U1)*(M1+U1))); 220 G4LorentzVector FourMomentum2(Momentum2,std::sqrt(Momentum2.mag2()+(M2+U2)*(M2+U2))); 221 222 //JMQ 04/03/09 now we do Lorentz boosts (instead of Galileo boosts) 223 FourMomentum1.boost(theNucleusMomentum.boostVector()); 224 FourMomentum2.boost(theNucleusMomentum.boostVector()); 225 226 //////////JMQ 04/03: Old version calculation is commented 227 // There was vioation of energy momentum conservation 228 229 // G4double Pmax = std::sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) / 230 // ( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy); 231 232 //G4ParticleMomentum momentum1 = IsotropicVector( Pmax ); 233 // G4ParticleMomentum momentum2( -momentum1 ); 205 234 206 235 // Perform a Galileo boost for fragments 207 momentum1 += (theNucleusMomentum.boostVector() * (M1+U1));208 momentum2 += (theNucleusMomentum.boostVector() * (M2+U2));236 // momentum1 += (theNucleusMomentum.boostVector() * (M1+U1)); 237 // momentum2 += (theNucleusMomentum.boostVector() * (M2+U2)); 209 238 210 239 211 240 // Create 4-momentum for first fragment 212 241 // Warning!! Energy conservation is broken 213 G4LorentzVector FourMomentum1( momentum1 , std::sqrt(momentum1.mag2() + (M1+U1)*(M1+U1))); 242 //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 243 // G4LorentzVector FourMomentum1( momentum1 , std::sqrt(momentum1.mag2() + (M1+U1)*(M1+U1))); 214 244 215 245 // Create 4-momentum for second fragment 216 246 // Warning!! Energy conservation is broken 217 G4LorentzVector FourMomentum2( momentum2 , std::sqrt(momentum2.mag2() + (M2+U2)*(M2+U2))); 247 //JMQ 04/03/09 ...NOT ANY MORE!! BUGS FIXED: Energy and momentum are NOW conserved 248 // G4LorentzVector FourMomentum2( momentum2 , std::sqrt(momentum2.mag2() + (M2+U2)*(M2+U2))); 249 250 ////////// 218 251 219 252 // Create Fragments … … 227 260 Fragment2->SetCreatorModel(G4String("G4CompetitiveFission")); 228 261 #endif 229 // Create Fragment Vector262 // Create Fragment Vector 230 263 G4FragmentVector * theResult = new G4FragmentVector; 231 264 -
trunk/source/processes/hadronic/models/de_excitation/fission/src/G4FissionProbability.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4FissionProbability.cc,v 1. 8 2007/02/12 09:39:58 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4FissionProbability.cc,v 1.9 2009/02/15 17:03:25 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // by V. Lara (Oct 1998) 32 32 // 33 // 34 // J.M.Quesada (14 february 2009) bug fixed in fission width: missing parenthesis in the denominator 33 35 34 36 … … 95 97 G4double Exp1 = 0.0; 96 98 if (SystemEntropy <= 160.0) Exp1 = std::exp(-SystemEntropy); 97 // @@@@@@@@@@@@@@@@@ hpw changed max to min - cannot notify vicente now since cern mail gave up on me...99 // @@@@@@@@@@@@@@@@@ hpw changed max to min - cannot notify vicente now 98 100 G4double Exp2 = std::exp( std::min(700.0,Cf-SystemEntropy) ); 99 101 102 // JMQ 14/02/09 BUG fixed in fission probability (missing parenthesis at denominator) 100 103 //AH fix from Vincente: G4double probability = (Exp1 + (1.0-Cf)*Exp2) / 4.0*pi*afission; 101 G4double probability = (Exp1 + (Cf-1.0)*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 102 108 103 109 return probability; -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMChannel.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4GEMChannel.cc,v 1. 6 2008/11/18 18:26:30ahoward Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4GEMChannel.cc,v 1.7 2009/03/12 11:25:28 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 125 125 // G4double ExEnergy = fragment.GetExcitationEnergy() - 126 126 // G4PairingCorrection::GetInstance()->GetPairingCorrection(anA,aZ); 127 G4double ExEnergy = fragment.GetExcitationEnergy() - 128 G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual); 127 //090120 128 //G4double ExEnergy = fragment.GetExcitationEnergy() - 129 //G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual); 130 G4double ExEnergy = fragment.GetExcitationEnergy(); 131 if ( AResidual > 0 ) ExEnergy -= G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual); 132 //090120 129 133 130 134 // We only take into account channels which are physically allowed … … 260 264 G4double a = theLevelDensityPtr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()), 261 265 static_cast<G4int>(fragment.GetZ()),U); 262 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()), 263 static_cast<G4int>(fragment.GetZ())); 266 //090115 267 //G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()), 268 // static_cast<G4int>(fragment.GetZ())); 269 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(AResidual,ZResidual); 270 //090115 264 271 265 272 G4double Alpha = theEvaporationProbabilityPtr->CalcAlphaParam(fragment); … … 307 314 // std::cout << "\t\tEjectile (" << A << ',' << Z << ") V = " << CoulombBarrier 308 315 // << " Beta = " << Beta << " V+Beta = " << CoulombBarrier+Beta << '\n'; 316 317 //G4cout << AResidual << " " << ZResidual << " " << ConstantFactor << " " << Beta << " " << CoulombBarrier << " " << MaximalKineticEnergy << " " << CoulombBarrier + MaximalKineticEnergy + Beta << G4endl; 318 //090128 319 if ( CoulombBarrier + MaximalKineticEnergy + Beta <= 0 ) return 0; 309 320 310 321 do -
trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/src/G4GEMProbability.cc
r819 r1055 108 108 G4double a = theEvapLDPptr->LevelDensityParameter(static_cast<G4int>(fragment.GetA()), 109 109 static_cast<G4int>(fragment.GetZ()),U); 110 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()), 111 static_cast<G4int>(fragment.GetZ())); 110 //090115 111 //G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection(static_cast<G4int>(fragment.GetA()), 112 // static_cast<G4int>(fragment.GetZ())); 113 G4double ResidualZ = static_cast<G4double>(fragment.GetZ() - theZ); 114 G4double delta0 = G4PairingCorrection::GetInstance()->GetPairingCorrection( static_cast<G4int>( ResidualA ) , static_cast<G4int>( ResidualZ ) ); 115 //090115 112 116 113 117 G4double Alpha = CalcAlphaParam(fragment); -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertPairingCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronGilbertPairingCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronGilbertPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 52 52 static G4CameronGilbertPairingCorrections* GetInstance(); 53 53 54 ~G4CameronGilbertPairingCorrections() {};54 ~G4CameronGilbertPairingCorrections(); 55 55 56 56 G4double GetPairingCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronGilbertShellCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronGilbertShellCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronGilbertShellCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 51 51 static G4CameronGilbertShellCorrections* GetInstance(); 52 52 53 ~G4CameronGilbertShellCorrections() {};53 ~G4CameronGilbertShellCorrections(); 54 54 55 55 G4double GetShellCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronShellPlusPairingCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronShellPlusPairingCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronShellPlusPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 51 51 static G4CameronShellPlusPairingCorrections* GetInstance(); 52 52 53 ~G4CameronShellPlusPairingCorrections() {};53 ~G4CameronShellPlusPairingCorrections(); 54 54 55 55 G4double GetShellPlusPairingZ(const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfPairingCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronTruranHilfPairingCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronTruranHilfPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 50 50 static G4CameronTruranHilfPairingCorrections* GetInstance(); 51 51 52 ~G4CameronTruranHilfPairingCorrections() {};52 ~G4CameronTruranHilfPairingCorrections(); 53 53 54 54 G4double GetParingCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CameronTruranHilfShellCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronTruranHilfShellCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronTruranHilfShellCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 50 50 static G4CameronTruranHilfShellCorrections* GetInstance(); 51 51 52 ~G4CameronTruranHilfShellCorrections() {};52 ~G4CameronTruranHilfShellCorrections(); 53 53 54 54 G4double GetShellCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4ConstantLevelDensityParameter.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4ConstantLevelDensityParameter.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ConstantLevelDensityParameter.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations (photon evaporation) … … 41 41 public: 42 42 G4ConstantLevelDensityParameter() : EvapLevelDensityParameter(0.125*(1./MeV)) {}; 43 virtual ~G4ConstantLevelDensityParameter() {};43 virtual ~G4ConstantLevelDensityParameter(); 44 44 45 45 private: -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookPairingCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CookPairingCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CookPairingCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 50 50 static G4CookPairingCorrections* GetInstance(); 51 51 52 ~G4CookPairingCorrections() {};52 ~G4CookPairingCorrections(); 53 53 54 54 G4double GetParingCorrection(const G4int A, const G4int Z) const { -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CookShellCorrections.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CookShellCorrections.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CookShellCorrections.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 52 52 static G4CookShellCorrections* GetInstance(); 53 53 54 ~G4CookShellCorrections() {};54 ~G4CookShellCorrections(); 55 55 56 56 G4double GetShellCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4CoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CoulombBarrier.hh,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CoulombBarrier.hh,v 1.6 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 42 42 { 43 43 public: 44 G4CoulombBarrier() : G4VCoulombBarrier(1,0) {}; 45 G4CoulombBarrier(const G4int anA,const G4int aZ) : 46 G4VCoulombBarrier(anA,aZ) {}; 47 ~G4CoulombBarrier() {}; 44 G4CoulombBarrier(); 45 G4CoulombBarrier(const G4int anA,const G4int aZ); 46 virtual ~G4CoulombBarrier(); 48 47 49 48 private: -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4DeuteronCoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4DeuteronCoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4DeuteronCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4DeuteronCoulombBarrier() : G4CoulombBarrier(2,1) {} ;43 ~G4DeuteronCoulombBarrier() {} ;42 G4DeuteronCoulombBarrier() : G4CoulombBarrier(2,1) {} 43 ~G4DeuteronCoulombBarrier() {} 44 44 45 45 private: … … 52 52 private: 53 53 54 virtual G4double BarrierPenetrationFactor(const G4double aZ) const; 55 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 56 55 57 56 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4EvaporationLevelDensityParameter.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4EvaporationLevelDensityParameter.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4EvaporationLevelDensityParameter.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 45 45 public: 46 46 47 G4EvaporationLevelDensityParameter() {};47 G4EvaporationLevelDensityParameter(); 48 48 49 virtual ~G4EvaporationLevelDensityParameter() {};49 virtual ~G4EvaporationLevelDensityParameter(); 50 50 51 51 private: -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4He3CoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4He3CoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4He3CoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4He3CoulombBarrier() : G4CoulombBarrier(3,2) {} ;43 ~G4He3CoulombBarrier() {} ;42 G4He3CoulombBarrier() : G4CoulombBarrier(3,2) {} 43 ~G4He3CoulombBarrier() {} 44 44 45 45 private: … … 52 52 private: 53 53 54 virtual G4double BarrierPenetrationFactor(const G4double aZ) const; 55 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 56 55 57 56 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4NeutronCoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4NeutronCoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4NeutronCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4NeutronCoulombBarrier() : G4CoulombBarrier(1,0) {} ;43 ~G4NeutronCoulombBarrier() {} ;42 G4NeutronCoulombBarrier() : G4CoulombBarrier(1,0) {} 43 ~G4NeutronCoulombBarrier() {} 44 44 45 45 private: … … 52 52 private: 53 53 54 virtualG4double BarrierPenetrationFactor(const G4double ) const54 G4double BarrierPenetrationFactor(const G4double ) const 55 55 { return 1.0;} 56 57 56 58 57 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4PairingCorrection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4PairingCorrection.hh,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4PairingCorrection.hh,v 1.6 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 53 53 static G4PairingCorrection* GetInstance(); 54 54 55 ~G4PairingCorrection() {};55 ~G4PairingCorrection(); 56 56 57 57 G4double GetPairingCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4ProtonCoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4ProtonCoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ProtonCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4ProtonCoulombBarrier() : G4CoulombBarrier(1,1) {} ;43 ~G4ProtonCoulombBarrier() {} ;42 G4ProtonCoulombBarrier() : G4CoulombBarrier(1,1) {} 43 ~G4ProtonCoulombBarrier() {} 44 44 45 45 private: … … 52 52 private: 53 53 54 virtual G4double BarrierPenetrationFactor(const G4double aZ) const; 55 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 56 55 57 56 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4ShellCorrection.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4ShellCorrection.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ShellCorrection.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 51 51 public: 52 52 static G4ShellCorrection* GetInstance(); 53 ~G4ShellCorrection() {};53 ~G4ShellCorrection(); 54 54 55 55 G4double GetShellCorrection(const G4int A, const G4int Z) const -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4TritonCoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4TritonCoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4TritonCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 40 40 { 41 41 public: 42 G4TritonCoulombBarrier() : G4CoulombBarrier(3,1) {} ;43 ~G4TritonCoulombBarrier() {} ;42 G4TritonCoulombBarrier() : G4CoulombBarrier(3,1) {} 43 ~G4TritonCoulombBarrier() {} 44 44 45 45 private: … … 52 52 private: 53 53 54 virtual G4double BarrierPenetrationFactor(const G4double aZ) const; 55 54 G4double BarrierPenetrationFactor(const G4double aZ) const; 56 55 57 56 }; -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4VCoulombBarrier.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VCoulombBarrier.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VCoulombBarrier.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 41 41 public: 42 42 G4VCoulombBarrier(const G4int anA, const G4int aZ); 43 virtual ~G4VCoulombBarrier() {};43 virtual ~G4VCoulombBarrier(); 44 44 45 45 protected: 46 G4VCoulombBarrier() : theA(1),theZ(0) {};46 G4VCoulombBarrier(); 47 47 48 48 private: -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4VEmissionProbability.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VEmissionProbability.hh,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VEmissionProbability.hh,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 47 47 { 48 48 public: 49 G4VEmissionProbability() {};50 virtual ~G4VEmissionProbability() {};49 G4VEmissionProbability(); 50 virtual ~G4VEmissionProbability(); 51 51 52 52 private: -
trunk/source/processes/hadronic/models/de_excitation/util/include/G4VLevelDensityParameter.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VLevelDensityParameter.hh,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VLevelDensityParameter.hh,v 1.6 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 44 44 { 45 45 public: 46 G4VLevelDensityParameter() {};47 virtual ~G4VLevelDensityParameter() {};46 G4VLevelDensityParameter(); 47 virtual ~G4VLevelDensityParameter(); 48 48 49 49 private: -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertPairingCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronGilbertPairingCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronGilbertPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 74 74 {;} 75 75 76 G4CameronGilbertPairingCorrections::~G4CameronGilbertPairingCorrections() 77 { delete theInstance; } 76 78 77 79 G4CameronGilbertPairingCorrections* G4CameronGilbertPairingCorrections::GetInstance() -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronGilbertShellCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronGilbertShellCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronGilbertShellCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 74 74 {;} 75 75 76 G4CameronGilbertShellCorrections::~G4CameronGilbertShellCorrections() 77 { delete theInstance; } 78 76 79 G4CameronGilbertShellCorrections* G4CameronGilbertShellCorrections::GetInstance() 77 80 { -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronShellPlusPairingCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronShellPlusPairingCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronShellPlusPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 92 92 {;} 93 93 94 G4CameronShellPlusPairingCorrections::~G4CameronShellPlusPairingCorrections() 95 { delete theInstance; } 96 94 97 G4CameronShellPlusPairingCorrections* G4CameronShellPlusPairingCorrections::GetInstance() { 95 98 if (!theInstance) theInstance = new G4CameronShellPlusPairingCorrections(); -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfPairingCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronTruranHilfPairingCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronTruranHilfPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 79 79 {;} 80 80 81 G4CameronTruranHilfPairingCorrections::~G4CameronTruranHilfPairingCorrections() 82 { delete theInstance; } 83 81 84 G4CameronTruranHilfPairingCorrections* G4CameronTruranHilfPairingCorrections::GetInstance() { 82 85 if (!theInstance) theInstance = new G4CameronTruranHilfPairingCorrections(); -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CameronTruranHilfShellCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CameronTruranHilfShellCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CameronTruranHilfShellCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 81 81 {;} 82 82 83 G4CameronTruranHilfShellCorrections::~G4CameronTruranHilfShellCorrections() 84 { delete theInstance; } 85 83 86 G4CameronTruranHilfShellCorrections* G4CameronTruranHilfShellCorrections::GetInstance() { 84 87 if (!theInstance) theInstance = new G4CameronTruranHilfShellCorrections(); -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4ConstantLevelDensityParameter.cc
r819 r1055 42 42 } 43 43 44 G4ConstantLevelDensityParameter::~G4ConstantLevelDensityParameter() 45 { 46 } 44 47 45 48 const G4ConstantLevelDensityParameter & G4ConstantLevelDensityParameter:: -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookPairingCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CookPairingCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CookPairingCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 73 73 {;} 74 74 75 G4CookPairingCorrections::~G4CookPairingCorrections() 76 { delete theInstance; } 77 75 78 G4CookPairingCorrections* G4CookPairingCorrections::GetInstance() { 76 79 if (!theInstance) theInstance = new G4CookPairingCorrections(); -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CookShellCorrections.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CookShellCorrections.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CookShellCorrections.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 73 73 {;} 74 74 75 G4CookShellCorrections::~G4CookShellCorrections() 76 { delete theInstance; } 75 77 76 78 G4CookShellCorrections* G4CookShellCorrections::GetInstance() { -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4CoulombBarrier.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4CoulombBarrier.cc,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4CoulombBarrier.cc,v 1.9 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 35 35 #include "G4HadronicException.hh" 36 36 #include <sstream> 37 38 G4CoulombBarrier::G4CoulombBarrier() 39 : G4VCoulombBarrier(1,0) {} 40 41 G4CoulombBarrier::G4CoulombBarrier(const G4int anA,const G4int aZ) 42 : G4VCoulombBarrier(anA,aZ) {} 43 44 G4CoulombBarrier::~G4CoulombBarrier() {} 37 45 38 46 G4CoulombBarrier::G4CoulombBarrier(const G4CoulombBarrier & ) : G4VCoulombBarrier() -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4EvaporationLevelDensityParameter.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4EvaporationLevelDensityParameter.cc,v 1. 8 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4EvaporationLevelDensityParameter.cc,v 1.9 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 49 49 const G4double G4EvaporationLevelDensityParameter::Bs = 1.0; 50 50 51 G4EvaporationLevelDensityParameter::G4EvaporationLevelDensityParameter() {} 52 G4EvaporationLevelDensityParameter::~G4EvaporationLevelDensityParameter() {} 51 53 52 54 G4EvaporationLevelDensityParameter:: -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4PairingCorrection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4PairingCorrection.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4PairingCorrection.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 44 44 } 45 45 46 G4PairingCorrection::~G4PairingCorrection() 47 { delete theInstance; } 48 46 49 G4PairingCorrection* G4PairingCorrection::GetInstance() 47 50 { -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4ShellCorrection.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4ShellCorrection.cc,v 1. 4 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ShellCorrection.cc,v 1.5 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 44 44 } 45 45 46 G4ShellCorrection::~G4ShellCorrection() 47 { 48 delete theInstance; 49 } 46 50 47 51 G4ShellCorrection* G4ShellCorrection::GetInstance() -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4VCoulombBarrier.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VCoulombBarrier.cc,v 1. 6 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VCoulombBarrier.cc,v 1.7 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 35 35 #include "G4HadronicException.hh" 36 36 #include <sstream> 37 38 G4VCoulombBarrier::G4VCoulombBarrier() 39 : theA(1),theZ(0) 40 { 41 } 42 37 43 38 44 G4VCoulombBarrier::G4VCoulombBarrier(const G4int anA, const G4int aZ) … … 49 55 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 50 56 } 57 } 58 59 60 G4VCoulombBarrier::~G4VCoulombBarrier() 61 { 51 62 } 52 63 -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4VEmissionProbability.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VEmissionProbability.cc,v 1. 6 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VEmissionProbability.cc,v 1.7 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 36 36 #include "G4HadronicException.hh" 37 37 38 39 G4VEmissionProbability::G4VEmissionProbability() {} 40 G4VEmissionProbability::~G4VEmissionProbability() {} 41 42 38 43 G4VEmissionProbability::G4VEmissionProbability(const G4VEmissionProbability &) 39 44 { 40 45 throw G4HadronicException(__FILE__, __LINE__, "G4VEmissionProbability::copy_constructor meant to not be accessable"); 41 46 } 42 43 44 47 45 48 -
trunk/source/processes/hadronic/models/de_excitation/util/src/G4VLevelDensityParameter.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VLevelDensityParameter.cc,v 1. 5 2008/09/19 13:32:54 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VLevelDensityParameter.cc,v 1.6 2009/03/04 11:05:02 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations … … 36 36 37 37 38 G4VLevelDensityParameter::G4VLevelDensityParameter() {} 39 G4VLevelDensityParameter::~G4VLevelDensityParameter() {} 40 41 38 42 G4VLevelDensityParameter:: 39 43 G4VLevelDensityParameter(const G4VLevelDensityParameter &) … … 41 45 throw G4HadronicException(__FILE__, __LINE__, "G4VLevelDensityParameter::copy_constructor meant to not be accessable"); 42 46 } 43 44 45 47 46 48 -
trunk/source/processes/hadronic/models/management/History
r1007 r1055 15 15 --------------------------------------------------------------- 16 16 17 25 February 2009 - V.Ivanchenko (hadr-modman-V09-02-03) 18 ------------------------------------------------------ 19 - G4HadronicInteractionRegistry - added protection to the Clean method 20 21 14 February 2009 - V.Ivanchenko (hadr-modman-V09-02-02) 22 ------------------------------------------------------ 23 - G4HadronicInteractionRegistry - added Clean method 24 25 06 February 2009 - V.Ivanchenko (hadr-modman-V09-02-01) 26 ------------------------------------------------------ 27 28 23 January 2009 - V.Ivanchenko (hadr-modman-V09-02-00) 29 ------------------------------------------------------ 30 - G4HadronicInteractionRegistry - make it as real singleton 31 - G4HadronicInteraction, G4InelasticInteraction - move constructor, 32 destructor and some header files from header to source 33 17 34 19 June 2008 - G.Cosmo (hadr-modman-V09-01-03) 18 35 ----------------------------------------------- 19 36 - included change introduced in hadr-modman-V09-01-01 and 20 discarded by imstake in the last tag ...37 discarded by mistake in the last tag ... 21 38 22 39 19 June 2008 - V.Ivanchenko (hadr-modman-V09-01-02) -
trunk/source/processes/hadronic/models/management/include/G4HadronicInteraction.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4HadronicInteraction.hh,v 1. 8 2007/01/11 05:30:01 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4HadronicInteraction.hh,v 1.9 2009/01/24 11:56:27 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 // Hadronic Interaction abstract base class 31 // This class is the base class for the model classes. 32 // It sorts out the energy-range for the models and provides 33 // class utilities. 34 // original by H.P. Wellisch 35 // Modified by J.L.Chuma, TRIUMF, 21-Mar-1997 36 // Last modified: 3-Apr-1997 37 // Added units to energy initialization: J.L. Chuma 04-Apr-97 38 // Modified by J.L.Chuma, 05-May-97 to Initialize theBlockedCounter 39 // Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes 40 // Adding a registry for memory management of hadronic models, HPW 22-Mar-99 30 // Hadronic Interaction abstract base class 31 // This class is the base class for the model classes. 32 // It sorts out the energy-range for the models and provides 33 // class utilities. 34 // original by H.P. Wellisch 35 // Modified by J.L.Chuma, TRIUMF, 21-Mar-1997 36 // Last modified: 3-Apr-1997 37 // Added units to energy initialization: J.L. Chuma 04-Apr-97 38 // Modified by J.L.Chuma, 05-May-97 to Initialize theBlockedCounter 39 // Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes 40 // Adding a registry for memory management of hadronic models, HPW 22-Mar-99 41 // 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body 42 // and reorder methods in the header 41 43 42 44 // Class Description 43 45 // This is the base class for all hadronic interaction models in geant4. 44 // If you want to implement a new way of producing a final state, please inherit45 // from here.46 // If you want to implement a new way of producing a final state, please, 47 // inherit from here. 46 48 // Class Description - End 47 49 … … 50 52 51 53 #include "G4HadFinalState.hh" 52 #include "G4DynamicParticle.hh"53 54 #include "G4ReactionDynamics.hh" 54 55 #include "G4Material.hh" … … 56 57 #include "G4Track.hh" 57 58 #include "G4HadProjectile.hh" 58 #include "G4HadronicInteractionRegistry.hh"59 #include "G4HadronicException.hh"60 59 61 class G4HadronicInteraction 62 { 63 public: 60 class G4HadronicInteraction 61 { 62 public: // With description 63 64 64 65 G4HadronicInteraction(const G4String& modelName = "HadronicModel") : 66 verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV), 67 isBlocked(false), theModelName(modelName) 68 { 69 G4HadronicInteractionRegistry::RegisterMe(this); 70 } 65 G4HadronicInteraction(const G4String& modelName = "HadronicModel"); 71 66 72 virtual ~G4HadronicInteraction() 73 { 74 G4HadronicInteractionRegistry::RemoveMe(this); 75 } 67 virtual ~G4HadronicInteraction(); 76 68 77 private: 69 virtual G4HadFinalState *ApplyYourself(const G4HadProjectile &aTrack, 70 G4Nucleus & targetNucleus ) = 0; 71 // This is the interface to implement for final state production code. 72 73 virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/, 74 G4Nucleus & /*targetNucleus*/) 75 { return true;} 76 77 inline G4double GetMinEnergy() const 78 { return theMinEnergy; } 78 79 79 inline G4HadronicInteraction( 80 const G4HadronicInteraction &right ) 81 { *this = right; } 80 virtual G4double GetMinEnergy( const G4Material *aMaterial, 81 const G4Element *anElement ) const; 82 83 inline void SetMinEnergy( const G4double anEnergy ) 84 { theMinEnergy = anEnergy; } 82 85 83 inline const G4HadronicInteraction & operator=( 84 const G4HadronicInteraction &right ) 85 { 86 G4String text = "unintended use of G4HadronicInteraction::operator="; 87 throw G4HadronicException(__FILE__, __LINE__, text); 88 return right; 89 } 86 virtual void SetMinEnergy( G4double anEnergy, G4Element *anElement ); 90 87 91 public:88 virtual void SetMinEnergy( G4double anEnergy, G4Material *aMaterial ); 92 89 93 inline G4bool operator==( 94 const G4HadronicInteraction &right ) const 95 { return ( this == (G4HadronicInteraction *) &right ); } 90 inline G4double GetMaxEnergy() const 91 { return theMaxEnergy; } 96 92 97 inline G4bool operator!=( 98 const G4HadronicInteraction &right ) const 99 { return ( this != (G4HadronicInteraction *) &right ); } 93 virtual G4double GetMaxEnergy( const G4Material *aMaterial, 94 const G4Element *anElement ) const; 100 95 101 inline G4double GetMinEnergy() const102 { return theMinEnergy; }96 inline void SetMaxEnergy( const G4double anEnergy ) 97 { theMaxEnergy = anEnergy; } 103 98 104 virtual G4double GetMinEnergy( const G4Material *aMaterial, 105 const G4Element *anElement ) const; 99 virtual void SetMaxEnergy( G4double anEnergy, G4Element *anElement ); 106 100 107 inline void SetMinEnergy( const G4double anEnergy ) 108 { theMinEnergy = anEnergy; } 109 110 virtual void SetMinEnergy( G4double anEnergy, G4Element *anElement ); 111 112 virtual void SetMinEnergy( G4double anEnergy, G4Material *aMaterial ); 113 114 inline G4double GetMaxEnergy() const 115 { return theMaxEnergy; } 116 117 virtual G4double GetMaxEnergy( const G4Material *aMaterial, 118 const G4Element *anElement ) const; 119 120 inline void SetMaxEnergy( const G4double anEnergy ) 121 { theMaxEnergy = anEnergy; } 122 123 virtual void SetMaxEnergy( G4double anEnergy, G4Element *anElement ); 124 125 virtual void SetMaxEnergy( G4double anEnergy, G4Material *aMaterial ); 101 virtual void SetMaxEnergy( G4double anEnergy, G4Material *aMaterial ); 126 102 127 inline const G4HadronicInteraction *GetMyPointer() const128 { return this; }103 inline const G4HadronicInteraction *GetMyPointer() const 104 { return this; } 129 105 130 inline G4int GetVerboseLevel() const131 { return verboseLevel; }106 inline G4int GetVerboseLevel() const 107 { return verboseLevel; } 132 108 133 inline void SetVerboseLevel( G4int value )134 { verboseLevel = value; }109 inline void SetVerboseLevel( G4int value ) 110 { verboseLevel = value; } 135 111 136 inline const G4String& GetModelName() const 137 { return theModelName; } 138 139 public: // With description 140 // This is the interface to implement for final state production code. 141 142 virtual G4HadFinalState *ApplyYourself( 143 const G4HadProjectile &aTrack, G4Nucleus & targetNucleus ) = 0; 112 inline const G4String& GetModelName() const 113 { return theModelName; } 144 114 145 115 public: // Without description 146 116 147 virtual void DeActivateFor( G4Material *aMaterial );117 virtual void DeActivateFor( G4Material *aMaterial ); 148 118 149 virtual void ActivateFor( G4Material *aMaterial )150 {151 Block();152 SetMaxEnergy(GetMaxEnergy(), aMaterial);153 SetMinEnergy(GetMinEnergy(), aMaterial);154 }119 virtual void ActivateFor( G4Material *aMaterial ) 120 { 121 Block(); 122 SetMaxEnergy(GetMaxEnergy(), aMaterial); 123 SetMinEnergy(GetMinEnergy(), aMaterial); 124 } 155 125 156 virtual void DeActivateFor( G4Element *anElement );157 virtual void ActivateFor( G4Element *anElement )158 {159 Block();160 SetMaxEnergy(GetMaxEnergy(), anElement);161 SetMinEnergy(GetMinEnergy(), anElement);162 }126 virtual void DeActivateFor( G4Element *anElement ); 127 virtual void ActivateFor( G4Element *anElement ) 128 { 129 Block(); 130 SetMaxEnergy(GetMaxEnergy(), anElement); 131 SetMinEnergy(GetMinEnergy(), anElement); 132 } 163 133 164 virtual G4bool IsBlocked( const G4Material *aMaterial ) const;134 virtual G4bool IsBlocked( const G4Material *aMaterial ) const; 165 135 166 virtual G4bool IsBlocked( const G4Element *anElement) const; 136 virtual G4bool IsBlocked( const G4Element *anElement) const; 137 138 inline G4bool operator==(const G4HadronicInteraction &right ) const 139 { return ( this == (G4HadronicInteraction *) &right ); } 167 140 168 virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/, 169 G4Nucleus & /*targetNucleus*/){ return true;} 170 protected: 141 inline G4bool operator!=(const G4HadronicInteraction &right ) const 142 { return ( this != (G4HadronicInteraction *) &right ); } 171 143 172 G4HadFinalState theParticleChange; 173 // the G4HadFinalState object which is modified and returned 174 // by address by the ApplyYourself method, 175 // (instead of aParticleChange as found in G4VProcess) 144 private: 176 145 177 G4int verboseLevel; 178 // control flag for output messages 179 // 0: silent 180 // 1: warning messages 181 // 2: more 182 // (instead of verboseLevel as found in G4VProcess) 146 G4HadronicInteraction(const G4HadronicInteraction &right ); 183 147 184 G4ReactionDynamics theReactionDynamics; 148 const G4HadronicInteraction& operator=(const G4HadronicInteraction &right); 149 150 protected: 151 152 inline G4bool IsBlocked() const { return isBlocked;} 153 inline void Block() { isBlocked = true; } 185 154 186 // these two have global validity 187 // units are assumed to be MeV 155 G4HadFinalState theParticleChange; 156 // the G4HadFinalState object which is modified and returned 157 // by address by the ApplyYourself method, 158 // (instead of aParticleChange as found in G4VProcess) 188 159 189 G4double theMinEnergy; 190 G4double theMaxEnergy; 160 G4int verboseLevel; 161 // control flag for output messages 162 // 0: silent 163 // 1: warning messages 164 // 2: more 165 // (instead of verboseLevel as found in G4VProcess) 191 166 192 G4bool IsBlocked() const { return isBlocked;} 193 void Block() { isBlocked = true; } 194 G4bool isBlocked; 167 G4ReactionDynamics theReactionDynamics; 168 169 // these two have global validity 170 // units are assumed to be MeV 171 172 G4double theMinEnergy; 173 G4double theMaxEnergy; 174 175 G4bool isBlocked; 195 176 196 G4String theModelName;177 G4String theModelName; 197 178 198 private:179 private: 199 180 200 std::vector<std::pair<G4double, G4Material *> > theMinEnergyList;201 std::vector<std::pair<G4double, G4Material *> > theMaxEnergyList;202 std::vector<std::pair<G4double, G4Element *> > theMinEnergyListElements;203 std::vector<std::pair<G4double, G4Element *> > theMaxEnergyListElements;204 std::vector<G4Material *> theBlockedList;205 std::vector<G4Element *> theBlockedListElements;206 };181 std::vector<std::pair<G4double, G4Material *> > theMinEnergyList; 182 std::vector<std::pair<G4double, G4Material *> > theMaxEnergyList; 183 std::vector<std::pair<G4double, G4Element *> > theMinEnergyListElements; 184 std::vector<std::pair<G4double, G4Element *> > theMaxEnergyListElements; 185 std::vector<G4Material *> theBlockedList; 186 std::vector<G4Element *> theBlockedListElements; 187 }; 207 188 208 189 #endif -
trunk/source/processes/hadronic/models/management/include/G4HadronicInteractionRegistry.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronicInteractionRegistry.hh,v 1.4 2009/02/14 19:24:52 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // 23-Jan-2009 V.Ivanchenko make the class to be a singleton 30 31 // Class Description 32 // This is the a singleton class to store all hadronic interactions 33 // Class Description - End 34 26 35 #ifndef G4HadronicInteractionRegistry_h 27 36 #define G4HadronicInteractionRegistry_h 1 … … 29 38 #include <vector> 30 39 #include "globals.hh" 40 31 41 class G4HadronicInteraction; 32 42 33 43 class G4HadronicInteractionRegistry 34 44 { 35 public: 45 public: 46 47 static G4HadronicInteractionRegistry* Instance(); 48 // access 36 49 37 50 ~G4HadronicInteractionRegistry(); 51 52 void Clean(); 53 //delete models 38 54 39 static void RegisterMe(G4HadronicInteraction * aModel); 40 static void RemoveMe(G4HadronicInteraction * aModel); 55 void RegisterMe(G4HadronicInteraction * aModel); 56 //register new model 57 58 void RemoveMe(G4HadronicInteraction * aModel); 59 //deregister model 41 60 42 protected:61 private: 43 62 44 G4HadronicInteractionRegistry(G4String ); 45 static G4HadronicInteractionRegistry & theRegistry(); 63 G4HadronicInteractionRegistry(); 46 64 47 private: 48 49 // !!! can not use "copy constructor" nor "default constructor" !!!! 50 G4HadronicInteractionRegistry(const G4HadronicInteractionRegistry &right) 51 { nModels = right.nModels; } 52 G4HadronicInteractionRegistry() {nModels = 0;} 53 54 // !!! Assignment operation is forbidden !!! 55 const G4HadronicInteractionRegistry & operator=(const G4HadronicInteractionRegistry &) 56 { return *this;} 57 58 void AddModel(G4HadronicInteraction * aModel); 65 static G4HadronicInteractionRegistry* theInstance; 59 66 60 67 G4int nModels; -
trunk/source/processes/hadronic/models/management/include/G4InelasticInteraction.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4InelasticInteraction.hh,v 1. 5 2007/01/11 05:30:12 dennisExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4InelasticInteraction.hh,v 1.6 2009/01/24 11:56:27 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 // Hadronic Process: Inelastic Interaction 31 // This class is an abstract base class, since the pure virtual 32 // function ApplyYourself has not been defined yet. 33 // original by H.P. Wellisch 34 // Modified by J.L. Chuma, TRIUMF, 22-Nov-1996 35 // Modified by J.L. Chuma 27-Mar-1997 36 // Modified by J.L. Chuma 30-Apr-1997 37 // Modified by J.L. Chuma 05-Aug-1997 to pass the original incident particle to 38 // CalculateMomenta 39 // Modified by J.L. Chuma 05-Jun-1998 to include quasiElastic flag to allow for 40 // TwoBody to be called directly, bypassing 41 // TwoCluster, and allowing TwoCluster to be 42 // called with no secondaries 30 // Hadronic Process: Inelastic Interaction 31 // This class is an abstract base class, since the pure virtual 32 // function ApplyYourself has not been defined yet. 33 // original by H.P. Wellisch 34 // Modified by J.L. Chuma, TRIUMF, 22-Nov-1996 35 // Modified by J.L. Chuma 27-Mar-1997 36 // Modified by J.L. Chuma 30-Apr-1997 37 // Modified by J.L. Chuma 05-Aug-1997 to pass the original incident particle to 38 // CalculateMomenta 39 // Modified by J.L. Chuma 05-Jun-1998 to include quasiElastic flag to allow for 40 // TwoBody to be called directly, bypassing 41 // TwoCluster, and allowing TwoCluster to be 42 // called with no secondaries 43 // 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body 43 44 44 45 #ifndef G4InelasticInteraction_h … … 53 54 #include "G4ReactionDynamics.hh" 54 55 55 class G4InelasticInteraction : public G4HadronicInteraction56 {57 public:56 class G4InelasticInteraction : public G4HadronicInteraction 57 { 58 public: 58 59 59 G4InelasticInteraction(const G4String& modelName = "LEInelastic") 60 : G4HadronicInteraction(modelName) 61 { cache = 0.0;} 60 G4InelasticInteraction(const G4String& modelName = "LEInelastic"); 62 61 63 virtual ~G4InelasticInteraction() 64 { } 62 virtual ~G4InelasticInteraction(); 65 63 66 protected:64 protected: 67 65 68 66 G4double Pmltpc( G4int np, G4int nm, G4int nz, G4int n, … … 100 98 G4ReactionProduct &targetParticle, 101 99 G4bool &incidentHasChanged ); 102 private:100 private: 103 101 104 102 G4double cache; 105 103 G4ThreeVector what; 106 104 107 };105 }; 108 106 109 107 #endif -
trunk/source/processes/hadronic/models/management/src/G4HadronicInteraction.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronicInteraction.cc,v 1.4 2009/01/24 11:56:27 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 26 28 // 27 // Hadronic Interaction base class 28 // original by H.P. Wellisch 29 // modified by J.L. Chuma, TRIUMF, 21-Mar-1997 30 // Last modified: 04-Apr-1997 31 // reimplemented 1.11.2003 JPW. 32 29 // Hadronic Interaction base class 30 // original by H.P. Wellisch 31 // modified by J.L. Chuma, TRIUMF, 21-Mar-1997 32 // Last modified: 04-Apr-1997 33 // reimplemented 1.11.2003 JPW. 34 // 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body 35 33 36 #include "G4HadronicInteraction.hh" 34 35 G4double 36 G4HadronicInteraction::GetMinEnergy( 37 #include "G4HadronicInteractionRegistry.hh" 38 #include "G4HadronicException.hh" 39 40 G4HadronicInteraction::G4HadronicInteraction(const G4String& modelName) : 41 verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV), 42 isBlocked(false), theModelName(modelName) 43 { 44 G4HadronicInteractionRegistry::Instance()->RegisterMe(this); 45 } 46 47 G4HadronicInteraction::~G4HadronicInteraction() 48 { 49 G4HadronicInteractionRegistry::Instance()->RemoveMe(this); 50 } 51 52 G4double G4HadronicInteraction::GetMinEnergy( 37 53 const G4Material *aMaterial, const G4Element *anElement ) const 38 { 39 size_t i; 40 if( IsBlocked(aMaterial) )return 0.*GeV; 41 if( IsBlocked(anElement) )return 0.*GeV; 42 for( i=0; i<theMinEnergyListElements.size(); ++i ) 43 { 44 if( anElement == theMinEnergyListElements[i].second )return theMinEnergyListElements[i].first; 54 { 55 size_t i; 56 if( IsBlocked(aMaterial) )return 0.*GeV; 57 if( IsBlocked(anElement) )return 0.*GeV; 58 for( i=0; i<theMinEnergyListElements.size(); ++i ) 59 { 60 if( anElement == theMinEnergyListElements[i].second ) 61 return theMinEnergyListElements[i].first; 45 62 } 46 63 for( i=0; i<theMinEnergyList.size(); ++i ) 47 64 { 48 if( aMaterial == theMinEnergyList[i].second )return theMinEnergyList[i].first; 65 if( aMaterial == theMinEnergyList[i].second ) 66 return theMinEnergyList[i].first; 49 67 } 50 68 if(IsBlocked()) return 0.*GeV; … … 54 72 << " not found in min energy List" << G4endl; 55 73 return theMinEnergy; 56 } 57 58 void 59 G4HadronicInteraction::SetMinEnergy( 60 G4double anEnergy, 61 G4Element *anElement ) 62 { 63 if( IsBlocked(anElement) ) 64 G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl 74 } 75 76 void G4HadronicInteraction::SetMinEnergy(G4double anEnergy, 77 G4Element *anElement ) 78 { 79 if( IsBlocked(anElement) ) 80 G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl 65 81 << " The model is not active for the Element " 66 82 << anElement->GetName() << "." << G4endl; 67 83 68 for( size_t i=0; i<theMinEnergyListElements.size(); ++i )84 for( size_t i=0; i<theMinEnergyListElements.size(); ++i ) 69 85 { 70 86 if( anElement == theMinEnergyListElements[i].second ) … … 74 90 } 75 91 } 76 theMinEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement)); 77 } 78 79 void 80 G4HadronicInteraction::SetMinEnergy( 81 G4double anEnergy, 82 G4Material *aMaterial ) 83 { 84 if( IsBlocked(aMaterial) ) 85 G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl 92 theMinEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement)); 93 } 94 95 void G4HadronicInteraction::SetMinEnergy(G4double anEnergy, 96 G4Material *aMaterial ) 97 { 98 if( IsBlocked(aMaterial) ) 99 G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl 86 100 << " The model is not active for the Material " 87 101 << aMaterial->GetName() << "." << G4endl; 88 102 89 for( size_t i=0; i<theMinEnergyList.size(); ++i )103 for( size_t i=0; i<theMinEnergyList.size(); ++i ) 90 104 { 91 105 if( aMaterial == theMinEnergyList[i].second ) 92 {93 theMinEnergyList[i].first = anEnergy;94 return;95 }96 } 97 theMinEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));98 }99 100 G4double 101 G4HadronicInteraction::GetMaxEnergy( 102 const G4Material *aMaterial, const G4Element *anElement ) const 103 {104 size_t i;105 if( IsBlocked(aMaterial) )return 0.0*GeV;106 if( IsBlocked(anElement) )return 0.0*GeV;107 for( i=0; i<theMaxEnergyListElements.size(); ++i )108 {109 if( anElement == theMaxEnergyListElements[i].second )return theMaxEnergyListElements[i].first;106 { 107 theMinEnergyList[i].first = anEnergy; 108 return; 109 } 110 } 111 theMinEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial)); 112 } 113 114 G4double G4HadronicInteraction::GetMaxEnergy(const G4Material *aMaterial, 115 const G4Element *anElement ) const 116 { 117 size_t i; 118 if( IsBlocked(aMaterial) )return 0.0*GeV; 119 if( IsBlocked(anElement) )return 0.0*GeV; 120 for( i=0; i<theMaxEnergyListElements.size(); ++i ) 121 { 122 if( anElement == theMaxEnergyListElements[i].second ) 123 return theMaxEnergyListElements[i].first; 110 124 } 111 125 for( i=0; i<theMaxEnergyList.size(); ++i ) 112 126 { 113 if( aMaterial == theMaxEnergyList[i].second )return theMaxEnergyList[i].first; 127 if( aMaterial == theMaxEnergyList[i].second ) 128 return theMaxEnergyList[i].first; 114 129 } 115 130 if(IsBlocked()) return 0.*GeV; 116 131 if( verboseLevel > 0 ) 117 132 G4cout << "*** Warning from HadronicInteraction::GetMaxEnergy" << G4endl 118 << " material " << aMaterial->GetName()119 << " not found in min energy List" << G4endl;133 << " material " << aMaterial->GetName() 134 << " not found in min energy List" << G4endl; 120 135 121 136 return theMaxEnergy; 122 } 123 124 void 125 G4HadronicInteraction::SetMaxEnergy( 126 G4double anEnergy, 127 G4Element *anElement ) 128 { 129 if( IsBlocked(anElement) ) 130 G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl 137 } 138 139 void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy, 140 G4Element *anElement ) 141 { 142 if( IsBlocked(anElement) ) 143 G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl 131 144 << "Warning: The model is not active for the Element " 132 145 << anElement->GetName() << "." << G4endl; 133 146 134 for( size_t i=0; i<theMaxEnergyListElements.size(); ++i )147 for( size_t i=0; i<theMaxEnergyListElements.size(); ++i ) 135 148 { 136 149 if( anElement == theMaxEnergyListElements[i].second ) … … 140 153 } 141 154 } 142 theMaxEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement)); 143 } 144 145 void 146 G4HadronicInteraction::SetMaxEnergy( 147 G4double anEnergy, 148 G4Material *aMaterial ) 149 { 150 if( IsBlocked(aMaterial) ) 151 G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl 155 theMaxEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement)); 156 } 157 158 void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy, 159 G4Material *aMaterial ) 160 { 161 if( IsBlocked(aMaterial) ) 162 G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl 152 163 << "Warning: The model is not active for the Material " 153 164 << aMaterial->GetName() << "." << G4endl; 154 165 155 for( size_t i=0; i<theMaxEnergyList.size(); ++i )166 for( size_t i=0; i<theMaxEnergyList.size(); ++i ) 156 167 { 157 168 if( aMaterial == theMaxEnergyList[i].second ) 158 {169 { 159 170 theMaxEnergyList[i].first = anEnergy; 160 171 return; 161 } 162 } 163 theMaxEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial)); 164 } 165 166 void 167 G4HadronicInteraction::DeActivateFor( G4Material *aMaterial ) 168 { 169 theBlockedList.push_back(aMaterial); 170 } 171 172 void 173 G4HadronicInteraction::DeActivateFor( G4Element *anElement ) 174 { 175 theBlockedListElements.push_back(anElement); 176 } 177 178 G4bool 179 G4HadronicInteraction::IsBlocked( const G4Material *aMaterial ) const 180 { 181 for( size_t i=0; i<theBlockedList.size(); ++i ) 172 } 173 } 174 theMaxEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial)); 175 } 176 177 void G4HadronicInteraction::DeActivateFor( G4Material *aMaterial ) 178 { 179 theBlockedList.push_back(aMaterial); 180 } 181 182 void G4HadronicInteraction::DeActivateFor( G4Element *anElement ) 183 { 184 theBlockedListElements.push_back(anElement); 185 } 186 187 G4bool G4HadronicInteraction::IsBlocked( const G4Material *aMaterial ) const 188 { 189 for( size_t i=0; i<theBlockedList.size(); ++i ) 182 190 { 183 191 if( aMaterial == theBlockedList[i] ) 184 { 185 return true; 186 } 187 } 188 return false; 189 } 190 191 G4bool 192 G4HadronicInteraction::IsBlocked( const G4Element *anElement ) const 193 { 194 for( size_t i=0; i<theBlockedListElements.size(); ++i ) 192 { 193 return true; 194 } 195 } 196 return false; 197 } 198 199 G4bool G4HadronicInteraction::IsBlocked( const G4Element *anElement ) const 200 { 201 for( size_t i=0; i<theBlockedListElements.size(); ++i ) 195 202 { 196 203 if( anElement == theBlockedListElements[i] ) 197 { 198 return true; 199 } 200 } 201 return false; 202 } 203 204 /* end of file */ 205 204 { 205 return true; 206 } 207 } 208 return false; 209 } 210 211 G4HadronicInteraction::G4HadronicInteraction(const G4HadronicInteraction &right ) 212 { 213 *this = right; 214 } 215 216 const G4HadronicInteraction& 217 G4HadronicInteraction::operator=(const G4HadronicInteraction &right ) 218 { 219 G4String text = "unintended use of G4HadronicInteraction::operator="; 220 throw G4HadronicException(__FILE__, __LINE__, text); 221 return right; 222 } 223 224 /* end of file */ 225 -
trunk/source/processes/hadronic/models/management/src/G4HadronicInteractionRegistry.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronicInteractionRegistry.cc,v 1.7 2009/02/25 16:30:18 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // 23-Jan-2009 V.Ivanchenko make the class to be a singleton 30 26 31 #include "G4HadronicInteractionRegistry.hh" 27 32 #include "G4HadronicInteraction.hh" 28 33 29 G4HadronicInteractionRegistry & G4HadronicInteractionRegistry::theRegistry() 34 G4HadronicInteractionRegistry* G4HadronicInteractionRegistry::theInstance = 0; 35 36 G4HadronicInteractionRegistry* G4HadronicInteractionRegistry::Instance() 30 37 { 31 static G4HadronicInteractionRegistry theRegistryInstance; 32 return theRegistryInstance; 38 if(0 == theInstance) { 39 static G4HadronicInteractionRegistry manager; 40 theInstance = &manager; 41 } 42 return theInstance; 43 } 44 45 G4HadronicInteractionRegistry::G4HadronicInteractionRegistry() 46 { 47 nModels = 0; 48 } 49 50 G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry() 51 { 52 Clean(); 53 } 54 55 void G4HadronicInteractionRegistry::Clean() 56 { 57 //G4cout << "G4HadronicInteractionRegistry::Clean() start " << nModels << G4endl; 58 if(0 < nModels) { 59 for (G4int i=0; i<nModels; i++) { 60 if( allModels[i] ) { 61 //G4cout << "delete " << i << G4endl; 62 //G4cout << allModels[i]->GetModelName() << G4endl; 63 delete allModels[i]; 64 allModels[i] = 0; 65 } 66 } 67 } 68 //G4cout << "G4HadronicInteractionRegistry::Clean() is done " << G4endl; 69 nModels = 0; 33 70 } 34 71 … … 36 73 RegisterMe(G4HadronicInteraction * aModel) 37 74 { 38 theRegistry().AddModel(aModel); 75 if(nModels > 0) { 76 for (G4int i=0; i<nModels; i++) { 77 if( aModel == allModels[i] ) return; 78 } 79 } 80 //G4cout << "Register model <" << aModel->GetModelName() 81 //<< "> " << nModels << G4endl; 82 allModels.push_back(aModel); 83 nModels++; 39 84 } 40 85 … … 42 87 RemoveMe(G4HadronicInteraction * aModel) 43 88 { 44 theRegistry().allModels.erase(std::find(theRegistry().allModels.begin(), 45 theRegistry().allModels.end(), aModel)); 46 theRegistry().nModels = theRegistry().allModels.size(); 47 } 48 49 G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry() 50 { 51 /* 52 while(allModels.size()!=0) 53 { 54 delete allModels.front(); 55 } 56 */ 57 } 58 59 void G4HadronicInteractionRegistry:: 60 AddModel(G4HadronicInteraction * aModel) 61 { 62 G4bool alreadyThere = false; 63 for(G4int i=0; i<nModels; i++) 64 { 65 if(allModels[i]==aModel) 66 { 67 alreadyThere = true; 68 break; 89 if(nModels > 0) { 90 for (G4int i=0; i<nModels; i++) { 91 if( aModel == allModels[i] ) { 92 //G4cout << "DeRegister model <" << aModel->GetModelName() 93 //<< "> " << i << G4endl; 94 allModels[i] = 0; 95 return; 96 } 69 97 } 70 98 } 71 if(!alreadyThere)72 {73 nModels++;74 allModels.push_back(aModel);75 }76 99 } -
trunk/source/processes/hadronic/models/management/src/G4InelasticInteraction.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InelasticInteraction.cc,v 1.12 2009/01/24 11:56:27 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 26 28 // 27 // 28 // Hadronic Process: Inelastic Interaction 29 // original by H.P. Wellisch 30 // modified by J.L. Chuma, TRIUMF, 22-Nov-1996 31 // Last modified: 27-Mar-1997 32 // J.P. Wellisch: 23-Apr-97: throw G4HadronicException(__FILE__, __LINE__, removed 33 // J.P. Wellisch: 24-Apr-97: correction for SetUpPions 34 // Modified by J.L. Chuma, 30-Apr-97: added originalTarget to CalculateMomenta 35 // since TwoBody needed to reset the target particle 36 // J.L. Chuma, 20-Jun-97: Modified CalculateMomenta to correct the decision process 37 // for whether to use GenerateXandPt or TwoCluster 38 // J.L. Chuma, 06-Aug-97: added original incident particle, before Fermi motion and 39 // evaporation effects are included, needed for calculating 40 // self absorption and corrections for single particle spectra 41 // HPW removed misunderstanding of LocalEnergyDeposit, 11.04.98. 29 // Hadronic Process: Inelastic Interaction 30 // original by H.P. Wellisch 31 // modified by J.L. Chuma, TRIUMF, 22-Nov-1996 32 // Last modified: 27-Mar-1997 33 // J.P. Wellisch: 23-Apr-97: throw G4HadronicException(__FILE__, __LINE__, removed 34 // J.P. Wellisch: 24-Apr-97: correction for SetUpPions 35 // Modified by J.L. Chuma, 30-Apr-97: added originalTarget to CalculateMomenta 36 // since TwoBody needed to reset the target particle 37 // J.L. Chuma, 20-Jun-97: Modified CalculateMomenta to correct the decision process 38 // for whether to use GenerateXandPt or TwoCluster 39 // J.L. Chuma, 06-Aug-97: added original incident particle, before Fermi motion and 40 // evaporation effects are included, needed for calculating 41 // self absorption and corrections for single particle spectra 42 // HPW removed misunderstanding of LocalEnergyDeposit, 11.04.98. 43 // 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body 42 44 43 45 #include "G4InelasticInteraction.hh" 44 46 #include "Randomize.hh" 45 47 #include "G4HadReentrentException.hh" 46 47 G4double 48 49 G4InelasticInteraction::G4InelasticInteraction(const G4String& modelName) 50 : G4HadronicInteraction(modelName) 51 { cache = 0.0;} 52 53 G4InelasticInteraction::~G4InelasticInteraction() 54 {} 55 56 G4double 48 57 G4InelasticInteraction::Pmltpc( // used in Cascade functions 49 58 G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c ) … … 63 72 } 64 73 65 G4bool74 G4bool 66 75 G4InelasticInteraction::MarkLeadingStrangeParticle( 67 76 const G4ReactionProduct ¤tParticle, … … 92 101 } 93 102 94 void103 void 95 104 G4InelasticInteraction::SetUpPions( 96 105 const G4int np, … … 126 135 } 127 136 128 void137 void 129 138 G4InelasticInteraction::GetNormalizationConstant( 130 139 const G4double energy, // MeV, <0 means annihilation channels … … 170 179 } 171 180 172 void181 void 173 182 G4InelasticInteraction::CalculateMomenta( 174 183 G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec, … … 344 353 345 354 346 void G4InelasticInteraction::355 void G4InelasticInteraction:: 347 356 Rotate(G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec, G4int &vecLen) 348 357 { … … 358 367 } 359 368 360 void369 void 361 370 G4InelasticInteraction::SetUpChange( 362 371 G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec, -
trunk/source/processes/hadronic/models/neutron_hp/History
r962 r1055 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 14 May 2009 Tatsumi Koi (hadr-hpn-V09-02-00) 18 - Fix bug in IC electron emissions: Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu) 19 G4NeutronHPPhotonDist.cc 20 G4NeutronHPInelasticCompFS.cc 16 21 17 22 3 December 2008 Tatsumi Koi (hadr-hpn-V09-01-28) -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc
r962 r1055 36 36 // introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi 37 37 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 38 // 090514 Fix bug in IC electron emission case 39 // Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu) 38 40 // 39 41 #include "G4NeutronHPInelasticCompFS.hh" … … 69 71 void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType) 70 72 { 73 71 74 gammaPath = "/Inelastic/Gammas/"; 72 75 if(!getenv("G4NEUTRONHPDATA")) … … 460 463 461 464 aHadron.SetMomentum( Vector*p ); 462 465 463 466 } 464 467 … … 577 580 { 578 581 theSec = new G4DynamicParticle; 579 theSec->SetDefinition(G4Gamma::Gamma()); 582 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 583 //theSec->SetDefinition(G4Gamma::Gamma()); 584 theSec->SetDefinition( thePhotons->operator[](i)->GetDefinition() ); 585 //But never cause real effect at least with G4NDL3.13 TK 580 586 theSec->SetMomentum(thePhotons->operator[](i)->GetMomentum()); 581 587 theResult.AddSecondary(theSec); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc
r962 r1055 36 36 // 080801 Correcting data disorder which happened when both InitPartial 37 37 // and InitAnglurar methods was called in a same instance by T. Koi 38 // 090514 Fix bug in IC electron emission case 39 // Contribution from Chao Zhang (Chao.Zhang@usd.edu) and Dongming Mei(Dongming.Mei@usd.edu) 40 // But it looks like never cause real effect in G4NDL3.13 (at least Natural elements) TK 38 41 // 39 42 // there is a lot of unused (and undebugged) code in this file. Kept for the moment just in case. @@ … … 48 51 G4bool G4NeutronHPPhotonDist::InitMean(std::ifstream & aDataFile) 49 52 { 53 50 54 G4bool result = true; 51 55 if(aDataFile >> repFlag) 52 56 { 57 53 58 aDataFile >> targetMass; 54 59 if(repFlag==1) … … 73 78 theBaseEnergy*=eV; 74 79 aDataFile >> theInternalConversionFlag; 80 // theInternalConversionFlag == 1 No IC, theInternalConversionFlag == 2 with IC 75 81 aDataFile >> nGammaEnergies; 76 82 theLevelEnergies = new G4double[nGammaEnergies]; … … 118 124 if (isoFlag != 1) 119 125 { 126 if ( repFlag == 2 ) G4cout << "TKDB repFlag == 2 && isoFlag !=1 " << G4endl; 120 127 aDataFile >> tabulationType >> nDiscrete2 >> nIso; 121 128 //080731 … … 547 554 { 548 555 theOne->SetDefinition(G4Electron::Electron()); 556 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 557 //But never enter at least with G4NDL3.13 558 totalEnergy += G4Electron::Electron()->GetPDGMass(); //proposed correction: add this line for electron 549 559 } 550 560 theOne->SetTotalEnergy(totalEnergy); 551 if( isoFlag == 1 )561 if( isoFlag == 1 ) 552 562 { 553 563 G4double costheta = 2.*G4UniformRand()-1; … … 555 565 G4double phi = twopi*G4UniformRand(); 556 566 G4double sinth = std::sin(theta); 557 G4double en = theOne->GetTotalEnergy(); 567 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 568 //G4double en = theOne->GetTotalEnergy(); 569 G4double en = theOne->GetTotalMomentum(); 570 //But never cause real effect at least with G4NDL3.13 TK 558 571 G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) ); 559 572 theOne->SetMomentum( temp ) ; … … 569 582 if(ii<nIso) 570 583 { 584 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 571 585 // isotropic distribution 572 G4double theta = pi*G4UniformRand(); 586 //G4double theta = pi*G4UniformRand(); 587 G4double theta = std::acos(2.*G4UniformRand()-1.); 588 //But this is alos never cause real effect at least with G4NDL3.13 TK not repFlag == 2 AND isoFlag != 1 573 589 G4double phi = twopi*G4UniformRand(); 574 590 G4double sinth = std::sin(theta); 575 G4double en = theOne->GetTotalEnergy(); 591 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 592 //G4double en = theOne->GetTotalEnergy(); 593 G4double en = theOne->GetTotalMomentum(); 594 //But never cause real effect at least with G4NDL3.13 TK 576 595 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) ); 577 596 theOne->SetMomentum( tempVector ) ; … … 594 613 G4double phi = twopi*G4UniformRand(); 595 614 G4double sinth = std::sin(theta); 596 G4double en = theOne->GetTotalEnergy(); 615 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 616 //G4double en = theOne->GetTotalEnergy(); 617 G4double en = theOne->GetTotalMomentum(); 618 //But never cause real effect at least with G4NDL3.13 TK 597 619 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) ); 598 620 theOne->SetMomentum( tempVector ) ; … … 612 634 G4double phi = twopi*G4UniformRand(); 613 635 G4double sinth = std::sin(theta); 614 G4double en = theOne->GetTotalEnergy(); 636 //Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009 637 //G4double en = theOne->GetTotalEnergy(); 638 G4double en = theOne->GetTotalMomentum(); 639 //But never cause real effect at least with G4NDL3.13 TK 615 640 G4ThreeVector tmpVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*costh ); 616 641 theOne->SetMomentum( tmpVector ) ; -
trunk/source/processes/hadronic/models/parton_string/hadronization/History
r819 r1055 1 $Id: History,v 1. 5 2007/05/03 22:10:54gunter Exp $1 $Id: History,v 1.7 2009/05/22 16:36:52 gunter Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 16 16 --------------------------------------------------------------- 17 17 18 22-May-2009 Gunter Folger (had-hadronization-V09-02-01) 19 - remove temporary workaround - fix is now in QGS 20 - change pt sampling in G4LundStringFragmentation to avoid near endless 21 loop; this should improve overall performance slightly. 22 Affected G4VLongitudinalStringDecay, where SampleQuarkPt() is 23 implemented; affected .hh and .cc for new optional argument of max Pt 24 to SampleQuarkPt() 25 26 18-May-2009 Gunter Folger (had-hadronization-V09-02-00) 27 --------------------------------------------------------------------- 28 - reset formatting changes by MK with tags hadr-prtn-hadr-V09-02-xx 29 - temporary workaround for wrong PDG codes created on wrong input from QGS 30 when used for e.g. antiproton. 31 18 32 2-May 2007 Gunter Folger (had-hadronization-V08-02-03) 19 33 --------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4HadronBuilder.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4HadronBuilder.hh,v 1. 3 2006/06/29 20:54:46gunter Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4HadronBuilder.hh,v 1.5 2009/05/18 09:43:40 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4VLongitudinalStringDecay.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VLongitudinalStringDecay.hh,v 1. 6 2008/06/23 08:35:54 vuzhinskExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VLongitudinalStringDecay.hh,v 1.7 2009/05/22 16:35:47 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // Maxim Komogorov 30 30 // … … 116 116 // used by G4VKinkyStringDecy.. 117 117 G4int SampleQuarkFlavor(void); 118 G4ThreeVector SampleQuarkPt( );118 G4ThreeVector SampleQuarkPt(G4double ptMax=-1.); // -1. no limit on maxpt. 119 119 120 120 protected: -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4ExcitedStringDecay.cc
r819 r1055 134 134 } 135 135 } 136 136 #ifdef debug_G4ExcitedStringDecay 137 137 if(!success) 138 138 { … … 144 144 // throw G4HadronicException(__FILE__, __LINE__, "G4ExcitedStringDecay failed to correct..."); 145 145 } 146 146 #endif 147 147 // Compute c.m.s. interaction velocity and KTV back boost 148 148 Beta = TotalCollisionMom.boostVector(); -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4HadronBuilder.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4HadronBuilder.cc,v 1. 7 2008/04/25 14:20:14 vuzhinskExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4HadronBuilder.cc,v 1.10 2009/05/22 16:34:31 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 147 147 if( (IsUp && IsAnti ) || (!IsUp && !IsAnti ) ) 148 148 PDGEncoding = - PDGEncoding; 149 }149 } 150 150 151 151 -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4LundStringFragmentation.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4LundStringFragmentation.cc,v 1.1 3 2008/06/23 09:17:10 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 2$ 1.827 // $Id: G4LundStringFragmentation.cc,v 1.14 2009/05/22 16:36:46 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 1.8 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 508 508 { 509 509 do 510 { 511 Pt=SampleQuarkPt(); Pt.setZ(0); G4double Pt2=Pt.mag2(); 510 { 511 // GF 22-May-09, limit sampled pt to allowed range 512 513 G4double termD = InitialMass*InitialMass -Mass*Mass - AntiMass*AntiMass; 514 G4double termab = 4*sqr(Mass*AntiMass); 515 G4double termN = 2*termD + 4*Mass*Mass + 4*AntiMass*AntiMass; 516 G4double pt2max=(termD*termD - termab )/ termN ; 517 518 // G4cout << " termD, ab, N " << termD << " " << termab << " " << termN 519 // << " pt2max= " << pt2max ; 520 521 Pt=SampleQuarkPt(sqrt(pt2max)); Pt.setZ(0); G4double Pt2=Pt.mag2(); 522 523 524 // G4cout << " sampled Pt2 = " << Pt2 << " " << pt2max-Pt2 << G4endl; 525 // end.. GF 512 526 513 527 //G4cout<<"Sample4Momentum Pt x y "<<Pt.getX()<<" "<<Pt.getY()<<G4endl; … … 521 535 4.*MassMt2*AntiMassMt2; 522 536 } 523 while(AvailablePz2 < 0.); 537 while(AvailablePz2 < 0.); // GF will occur only for numerical precision problem with limit in sampled pt 524 538 525 539 AvailablePz2 /=(4.*InitialMass*InitialMass); -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4VLongitudinalStringDecay.cc,v 1.1 3 2008/06/23 08:35:55 vuzhinskExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4VLongitudinalStringDecay.cc,v 1.14 2009/05/22 16:35:47 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 485 485 // } 486 486 487 G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt( )487 G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt(G4double ptMax) 488 488 { 489 G4double Pt = -std::log(G4UniformRand()); 489 G4double Pt; 490 if ( ptMax < 0 ) { 491 // sample full gaussian 492 Pt = -std::log(G4UniformRand()); 493 } else { 494 // sample in limited range 495 Pt = -std::log(CLHEP::RandFlat::shoot(exp(-sqr(ptMax)/sqr(SigmaQT)), 1.)); 496 } 490 497 Pt = SigmaQT * std::sqrt(Pt); 491 498 G4double phi = 2.*pi*G4UniformRand(); -
trunk/source/processes/hadronic/models/parton_string/qgsm/History
r962 r1055 1 $Id: History,v 1. 6 2008/09/19 09:54:23gunter Exp $1 $Id: History,v 1.8 2009/05/19 12:48:42 gunter Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 16 16 --------------------------------------------------------------- 17 17 18 19 May 2009, G.Folger (hadr-qgsm-V09-02-02) 19 ----------------------------------------------------- 20 - fix in G4SPBaryon: for antibaryon, a diquark & quark was given instead of 21 anti-diquark & antiquark; note the reverse order, too. 22 Fixes problems with incident anti baryons, e.g. antiproton, manifesting 23 in problems with forming hadrons. 24 25 29 Apr 2009 m. Kosov (hadr-qgsm-V09-02-01) 26 ------------------------------------------------ 27 Very important bug fix in G4QGSParticipants.cc to let QGSC working from E=0 28 Added by GF (19-May-09): 29 - this very important "bug" fix modifies G4G4QGSParticipants.cc and 30 G4GammaParticipants.cc: 31 changing the value of Threshold from 0.45 GeV to 0.GeV, 32 and disables an Exception if s < sqr(total mass + Threshold) 18 33 19 34 15 Sep 2008 G.Folger (hadr-qgsm-V09-01-01) -
trunk/source/processes/hadronic/models/parton_string/qgsm/include/G4QGSParticipants.hh
r819 r1055 83 83 enum { SOFT, DIFFRACTIVE }; 84 84 const G4int nCutMax; 85 const G4double Th ersholdParameter;86 const G4double QGSMTh ershold;85 const G4double ThresholdParameter; 86 const G4double QGSMThreshold; 87 87 const G4double theNucleonRadius; 88 88 -
trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4GammaParticipants.cc
r819 r1055 50 50 G4double ThresholdMass = thePrimary.GetMass() + theTargetNuc[0]->GetDefinition()->GetPDGMass(); 51 51 ModelMode = SOFT; 52 if (sqr(ThresholdMass + Th ersholdParameter) > s)52 if (sqr(ThresholdMass + ThresholdParameter) > s) 53 53 { 54 throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses."); 54 ModelMode = DIFFRACTIVE; 55 //throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses."); 55 56 } 56 if (sqr(ThresholdMass + QGSMTh ershold) > s) // thus only diffractive in cascade!57 if (sqr(ThresholdMass + QGSMThreshold) > s) // thus only diffractive in cascade! 57 58 { 58 59 ModelMode = DIFFRACTIVE; -
trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4QGSParticipants.cc
r962 r1055 36 36 37 37 G4QGSParticipants::G4QGSParticipants() : theDiffExcitaton(), //0.7*GeV, 250*MeV, 250*MeV), 38 nCutMax(7),ThersholdParameter(0.45*GeV), 39 QGSMThershold(3*GeV),theNucleonRadius(1.5*fermi) 38 //nCutMax(7),ThresholdParameter(0.45*GeV), 39 nCutMax(7),ThresholdParameter(0.000*GeV), 40 QGSMThreshold(3*GeV),theNucleonRadius(1.5*fermi) 40 41 41 42 { … … 43 44 44 45 G4QGSParticipants::G4QGSParticipants(const G4QGSParticipants &right) 45 : G4VParticipants(), nCutMax(right.nCutMax),Th ersholdParameter(right.ThersholdParameter),46 QGSMTh ershold(right.QGSMThershold),theNucleonRadius(right.theNucleonRadius)46 : G4VParticipants(), nCutMax(right.nCutMax),ThresholdParameter(right.ThresholdParameter), 47 QGSMThreshold(right.QGSMThreshold),theNucleonRadius(right.theNucleonRadius) 47 48 { 48 49 } … … 91 92 G4double ThresholdMass = thePrimary.GetMass() + pNucleon->GetDefinition()->GetPDGMass(); 92 93 ModelMode = SOFT; 93 if (sqr(ThresholdMass + ThersholdParameter) > s) 94 { 95 throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses."); 96 } 97 if (sqr(ThresholdMass + QGSMThershold) > s) // thus only diffractive in cascade! 94 if (sqr(ThresholdMass + ThresholdParameter) > s) 95 { 96 ModelMode = DIFFRACTIVE; 97 //throw G4HadronicException(__FILE__, __LINE__, "Initial energy is too low. The 4-vectors of the input are inconsistant with the particle masses."); 98 } 99 if (sqr(ThresholdMass + QGSMThreshold) > s) // thus only diffractive in cascade! 98 100 { 99 101 ModelMode = DIFFRACTIVE; -
trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4SPBaryon.cc
r819 r1055 104 104 if (theDefinition->GetPDGEncoding() < 0) 105 105 { 106 quark = -(*i)->GetDiQuark();107 diQuark = -(*i)->GetQuark();106 quark = (*i)->GetDiQuark(); 107 diQuark = (*i)->GetQuark(); 108 108 } 109 109 else -
trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/History
r1007 r1055 1 $Id: History,v 1. 6 2008/10/02 21:05:09 dennisExp $1 $Id: History,v 1.8 2009/02/06 08:58:20 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 16 16 --------------------------------------------------------------- 17 17 18 06 Feb 2009 V.Ivantchenko (hadr-munuclear-V09-02-01) 19 ---------------------------------------------------- 20 21 24 Jan 2009 V.Ivantchenko (hadr-munuclear-V09-02-00) 22 ---------------------------------------------------- 23 - G4MuNuclearInteraction added deregistration of the process 24 18 25 4 Oct 2008 Dennis Wright (hadr-munuclear-V09-01-01) 19 26 ---------------------------------------------------- … … 21 28 12 to fHadronInelastic 22 29 23 2 Sep 2008 V.Ivan tchenko (hadr-munuclear-V09-01-00)24 --------------------------------------------------- --------------------30 2 Sep 2008 V.Ivanchenko (hadr-munuclear-V09-01-00) 31 --------------------------------------------------- 25 32 - G4MuNuclearInteraction added SubType and registration in the 26 33 G4HadronicProcessStore; added PreparePhysicsTable 27 34 method and cleanup for readability 28 35 29 4 Nov 2006 Dennis Wright for V. Ivantchenko (hadr-munuclear-V08-01-00)36 4 Nov 2006 Dennis Wright for V.Ivanchenko (hadr-munuclear-V08-01-00) 30 37 ----------------------------------------------------------------------- 31 38 - G4MuNuclearInteraction::ComputeMicroscopicCrossSection: prevent NaN -
trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuNuclearInteraction.icc
r962 r1055 26 26 // 27 27 // $Id: G4MuNuclearInteraction.icc,v 1.3 2006/06/29 20:57:22 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // $Id: -
trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuNuclearInteraction.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4MuNuclearInteraction.cc,v 1.11 2008/10/02 21:04:54 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-02 $ 26 // $Id: G4MuNuclearInteraction.cc,v 1.12 2009/01/24 11:59:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 28 // 30 29 // $Id: … … 38 37 // added simple model for hadronic vertex, J.P. Wellisch, November 1998 39 38 // -------------------------------------------------------------- 40 // 26/10/98: new corr.s from R.Kokoulin + cleanup , L.Urban 39 // 26/10/1998: new corr.s from R.Kokoulin + cleanup , L.Urban 40 // 23/01/2009 V.Ivanchenko Add deregistration 41 41 // 42 42 43 #include "G4MuNuclearInteraction.hh" 43 44 #include "G4UnitsTable.hh" … … 74 75 G4MuNuclearInteraction::~G4MuNuclearInteraction() 75 76 { 77 G4HadronicProcessStore::Instance()->DeRegisterExtraProcess(this); 78 76 79 if (theMeanFreePathTable) { 77 80 theMeanFreePathTable->clearAndDestroy(); -
trunk/source/processes/hadronic/models/pre_equilibrium/History
r1007 r1055 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 13-February 2009 V.Ivanchenko hadr-pre-V09-02-03 18 --------------------------------------------------- 19 G4PreCompoundXXX - changed the shape of probabilities (return back to 9.2) 20 for d, t, He3, alpha (JMQ) 21 22 12-February 2009 V.Ivanchenko hadr-pre-V09-02-02 23 --------------------------------------------------- 24 G4PreCompoundXXX - changed the shape of probabilities 25 for d, t, He3, alpha near the Coulomb barrier (JMQ) 26 27 11-February 2009 V.Ivanchenko hadr-pre-V09-02-01 28 --------------------------------------------------- 29 G4PreCompoundXXX - set default Opt3 back, add decrease Coulomb barrier 30 for d, t, a, he3 (JMQ) 31 32 10-February 2009 V.Ivanchenko hadr-pre-V09-02-00 33 --------------------------------------------------- 34 Some clean up of comments 35 G4PreCompoundIon - fixed probability of light ion emmision (JMQ) 36 G4PreCompoundXXX - by default Opt1 is used for d, t, a, he3, 37 Opt3 for n, p (JMQ) 16 38 17 39 09-December 2008 A.Howard hadr-pre-V09-01-15 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundEmission.icc,v 1.5 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // 30 // Author: V.Lara 31 // 32 // Modified: 26 33 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 27 34 // cross section option … … 34 41 return; 35 42 } 36 37 43 38 44 inline G4double G4PreCompoundEmission::GetTotalProbability(const G4Fragment & aFragment) -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4PreCompoundFragmentVector.hh,v 1. 4 2008/09/22 10:18:36 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4PreCompoundFragmentVector.hh,v 1.6 2009/02/10 16:01:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear Preequilibrium … … 39 39 #define G4PreCompoundFragmentVector_h 1 40 40 41 42 41 #include "G4VPreCompoundFragment.hh" 43 44 45 42 46 43 class G4PreCompoundFragmentVector -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc
r962 r1055 26 26 // 27 27 // $Id: G4PreCompoundFragmentVector.icc,v 1.4 2008/09/22 10:18:36 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // Hadronic Process: Nuclear Preequilibrium -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J. M. Quesada (August 2008). 27 //Based on previous work by V. Lara 26 // 27 // $Id: G4VPreCompoundFragment.hh,v 1.10 2009/02/10 16:01:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // J. M. Quesada (August 2008). 31 // Based on previous work by V. Lara 28 32 // 29 33 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse … … 31 35 // JMQ (06 September 2008) Also external choice has been added for: 32 36 // - superimposed Coulomb barrier (if useSICB=true) 33 34 37 35 38 #ifndef G4VPreCompoundFragment_h -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc
r962 r1055 26 26 // 27 27 // $Id: G4VPreCompoundFragment.icc,v 1.7 2008/09/22 10:18:36 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // by V. Lara -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J.M.Quesada (August 08). New source file 27 // 28 // Modif (21 August 2008) by J. M. Quesada for external choice of inverse 29 // cross section option 26 // 27 // $Id: G4PreCompoundAlpha.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundAlpha 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 21.08.2008 J. M. Quesada add choice of options 41 // 10.02.2009 J. M. Quesada set default opt1 42 // 30 43 31 44 #include "G4PreCompoundAlpha.hh" 32 45 33 G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const34 {35 G4ReactionProduct * theReactionProduct =36 new G4ReactionProduct(G4Alpha::AlphaDefinition());37 theReactionProduct->SetMomentum(GetMomentum().vect());38 theReactionProduct->SetTotalEnergy(GetMomentum().e());46 G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const 47 { 48 G4ReactionProduct * theReactionProduct = 49 new G4ReactionProduct(G4Alpha::AlphaDefinition()); 50 theReactionProduct->SetMomentum(GetMomentum().vect()); 51 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 39 52 #ifdef PRECOMPOUND_TEST 40 theReactionProduct->SetCreatorModel("G4PrecompoundModel");53 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 41 54 #endif 42 return theReactionProduct; 43 } 44 45 46 G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P) 47 { 48 return 55 return theReactionProduct; 56 } 57 58 G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P) 59 { 60 return 49 61 (N-4.0)*(P-3.0)*( 50 62 (((N-3.0)*(P-2.0))/2.0) *( … … 54 66 ) 55 67 ); 68 } 69 70 G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A) 71 { 72 return 4096.0/(A*A*A); 73 } 74 75 G4double G4PreCompoundAlpha::GetRj(const G4int NumberParticles, const G4int NumberCharged) 76 { 77 G4double rj = 0.0; 78 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3); 79 if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) { 80 rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)* 81 (NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 56 82 } 57 58 G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A) 59 { 60 return 4096.0/(A*A*A); 61 } 62 63 64 65 G4double G4PreCompoundAlpha::GetRj(const G4int NumberParticles, const G4int NumberCharged) 66 { 67 G4double rj = 0.0; 68 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3); 69 if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 70 return rj; 71 } 72 73 74 83 return rj; 84 } 75 85 76 86 //////////////////////////////////////////////////////////////////////////////////// … … 80 90 //OPT=3,4 Kalbach's parameterization 81 91 // 82 G4double G4PreCompoundAlpha::CrossSection(const G4double K)92 G4double G4PreCompoundAlpha::CrossSection(const G4double K) 83 93 { 84 94 … … 115 125 //---------------- 116 126 // 117 G4double G4PreCompoundAlpha::GetAlpha()118 {119 G4double C = 0.0;120 G4double aZ = GetZ() + GetRestZ();121 if (aZ <= 30)122 {123 C = 0.10;124 }125 else if (aZ <= 50)126 {127 C = 0.1 + -((aZ-50.)/20.)*0.02;128 }129 else if (aZ < 70)130 {131 C = 0.08 + -((aZ-70.)/20.)*0.02;132 }133 else134 {135 C = 0.06;136 }137 return 1.0+C;138 }127 G4double G4PreCompoundAlpha::GetAlpha() 128 { 129 G4double C = 0.0; 130 G4double aZ = GetZ() + GetRestZ(); 131 if (aZ <= 30) 132 { 133 C = 0.10; 134 } 135 else if (aZ <= 50) 136 { 137 C = 0.1 + -((aZ-50.)/20.)*0.02; 138 } 139 else if (aZ < 70) 140 { 141 C = 0.08 + -((aZ-70.)/20.)*0.02; 142 } 143 else 144 { 145 C = 0.06; 146 } 147 return 1.0+C; 148 } 139 149 // 140 150 //-------------------- 141 151 // 142 G4double G4PreCompoundAlpha::GetBeta()143 {144 return -GetCoulombBarrier();145 }152 G4double G4PreCompoundAlpha::GetBeta() 153 { 154 return -GetCoulombBarrier(); 155 } 146 156 // 147 157 //********************* OPT=1,2 : Chatterjee's cross section ************************ … … 153 163 G4double Kc=K; 154 164 155 // JMQ xsec is set consta t above limit of validity165 // JMQ xsec is set constant above limit of validity 156 166 if (K>50) Kc=50; 157 167 … … 213 223 G4double ra=1.20; 214 224 215 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 225 //JMQ 13/02/09 increase of reduced radius to lower the barrier 226 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 227 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 216 228 ecsq = ec * ec; 217 229 p = p0 + p1/ec + p2/ecsq; … … 236 248 237 249 if (elab <= ec) { //start for E<Ec 238 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 250 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 239 251 } //end for E<Ec 240 252 else { //start for E>Ec … … 252 264 253 265 // ************************** end of cross sections ******************************* 254 255 256 257 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J.M.Quesada (August 08). New source file 27 // 28 // Modif (21 August 2008) by J. M. Quesada for external choice of inverse 29 // cross section option 26 // $Id: G4PreCompoundDeuteron.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class file 32 // 33 // 34 // File name: G4PreCompoundDeuteron 35 // 36 // Author: V.Lara 37 // 38 // Modified: 39 // 21.08.2008 J. M. Quesada add choice of options 40 // 10.02.2009 J. M. Quesada set default opt1 41 // 30 42 31 43 #include "G4PreCompoundDeuteron.hh" 32 44 33 34 35 G4ReactionProduct * G4PreCompoundDeuteron::GetReactionProduct() const 36 { 37 G4ReactionProduct * theReactionProduct = 38 new G4ReactionProduct(G4Deuteron::DeuteronDefinition()); 39 theReactionProduct->SetMomentum(GetMomentum().vect()); 40 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 45 G4ReactionProduct * G4PreCompoundDeuteron::GetReactionProduct() const 46 { 47 G4ReactionProduct * theReactionProduct = 48 new G4ReactionProduct(G4Deuteron::DeuteronDefinition()); 49 theReactionProduct->SetMomentum(GetMomentum().vect()); 50 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 41 51 #ifdef PRECOMPOUND_TEST 42 theReactionProduct->SetCreatorModel("G4PrecompoundModel");52 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 43 53 #endif 44 return theReactionProduct; 45 } 46 47 48 G4double G4PreCompoundDeuteron::FactorialFactor(const G4double N, const G4double P) 49 { 50 return (N-1.0)*(N-2.0)*(P-1.0)*P/2.0; 54 return theReactionProduct; 55 } 56 57 58 G4double G4PreCompoundDeuteron::FactorialFactor(const G4double N, const G4double P) 59 { 60 return (N-1.0)*(N-2.0)*(P-1.0)*P/2.0; 61 } 62 63 G4double G4PreCompoundDeuteron::CoalescenceFactor(const G4double A) 64 { 65 return 16.0/A; 66 } 67 68 G4double G4PreCompoundDeuteron::GetRj(const G4int NumberParticles, const G4int NumberCharged) 69 { 70 G4double rj = 0.0; 71 G4double denominator = NumberParticles*(NumberParticles-1); 72 if(NumberCharged >=1 && (NumberParticles-NumberCharged) >=1) { 73 rj = 2.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)) 74 / static_cast<G4double>(denominator); 51 75 } 52 53 G4double G4PreCompoundDeuteron::CoalescenceFactor(const G4double A) 54 { 55 return 16.0/A; 56 } 57 58 G4double G4PreCompoundDeuteron::GetRj(const G4int NumberParticles, const G4int NumberCharged) 59 { 60 G4double rj = 0.0; 61 G4double denominator = NumberParticles*(NumberParticles-1); 62 if(NumberCharged >=1 && (NumberParticles-NumberCharged) >=1) rj = 2.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged))/static_cast<G4double>(denominator); 63 64 return rj; 65 } 76 return rj; 77 } 66 78 67 79 //////////////////////////////////////////////////////////////////////////////////// … … 71 83 //OPT=3,4 Kalbach's parameterization 72 84 // 73 G4double G4PreCompoundDeuteron::CrossSection(const G4double K)85 G4double G4PreCompoundDeuteron::CrossSection(const G4double K) 74 86 { 75 87 … … 106 118 //--------- 107 119 // 108 G4double G4PreCompoundDeuteron::GetAlpha()109 {110 G4double C = 0.0;111 G4double aZ = GetZ() + GetRestZ();112 if (aZ >= 70)113 {114 C = 0.10;115 }116 else117 {118 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;119 }120 return 1.0 + C/2.0;121 }120 G4double G4PreCompoundDeuteron::GetAlpha() 121 { 122 G4double C = 0.0; 123 G4double aZ = GetZ() + GetRestZ(); 124 if (aZ >= 70) 125 { 126 C = 0.10; 127 } 128 else 129 { 130 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 131 } 132 return 1.0 + C/2.0; 133 } 122 134 // 123 135 //--------- 124 136 // 125 G4double G4PreCompoundDeuteron::GetBeta()126 {127 return -GetCoulombBarrier();128 }137 G4double G4PreCompoundDeuteron::GetBeta() 138 { 139 return -GetCoulombBarrier(); 140 } 129 141 // 130 142 //********************* OPT=1,2 : Chatterjee's cross section ************************ … … 140 152 141 153 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 142 //G4double Eo(0),epsilon1(0),epsilon2(0),discri(0);154 //G4double Eo(0),epsilon1(0),epsilon2(0),discri(0); 143 155 144 156 … … 174 186 } 175 187 176 177 178 179 188 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 180 189 G4double G4PreCompoundDeuteron::GetOpt34(const G4double K) … … 205 214 G4double ra=0.80; 206 215 207 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 216 //JMQ 13/02/09 increase of reduced radius to lower the barrier 217 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 218 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 208 219 ecsq = ec * ec; 209 220 p = p0 + p1/ec + p2/ecsq; … … 226 237 elab = K * FragmentA / ResidualA; 227 238 sig = 0.; 228 239 229 240 if (elab <= ec) { //start for E<Ec 230 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 241 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 231 242 } //end for E<Ec 232 243 else { //start for E>Ec -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc
r1007 r1055 25 25 // 26 26 // 27 // Hadronic Process: Nuclear Preequilibrium 28 // by V. Lara 29 27 // $Id: G4PreCompoundEmission.cc,v 1.19 2009/02/10 16:01:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundEmission 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 30 41 31 42 #include "G4PreCompoundEmission.hh" … … 42 53 43 54 44 G4bool G4PreCompoundEmission::operator==(const G4PreCompoundEmission &) const55 G4bool G4PreCompoundEmission::operator==(const G4PreCompoundEmission &) const 45 56 { 46 57 return false; 47 58 } 48 59 49 G4bool G4PreCompoundEmission::operator!=(const G4PreCompoundEmission &) const60 G4bool G4PreCompoundEmission::operator!=(const G4PreCompoundEmission &) const 50 61 { 51 62 return true; … … 95 106 return; 96 107 } 97 98 99 108 100 109 G4ReactionProduct * G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment) -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J. M. Quesada (August 2008). 27 //Based on previous work by V. Lara 26 // $Id: G4PreCompoundFragment.cc,v 1.8 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // J. M. Quesada (August 2008). 30 // Based on previous work by V. Lara 28 31 // JMQ (06 September 2008) Also external choice has been added for: 29 32 // - superimposed Coulomb barrier (if useSICB=true) -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundFragmentVector.cc,v 1.7 2008/05/08 10:36:03 quesada Exp $ 28 // GEANT4 tag $Name: geant4-09-02 $ 26 // $Id: G4PreCompoundFragmentVector.cc,v 1.11 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 28 // 30 29 // Hadronic Process: Nuclear Preequilibrium -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J.M.Quesada (August 08). New source file 27 // 28 // Modif (21 August 2008) by J. M. Quesada for external choice of inverse 29 // cross section option 26 // 27 // $Id: G4PreCompoundHe3.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundHe3 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 21.08.2008 J. M. Quesada add choice of options 41 // 10.02.2009 J. M. Quesada set default opt1 42 // 30 43 31 44 #include "G4PreCompoundHe3.hh" 32 45 33 34 G4ReactionProduct * G4PreCompoundHe3::GetReactionProduct() const 35 { 36 G4ReactionProduct * theReactionProduct = 37 new G4ReactionProduct(G4He3::He3Definition()); 38 theReactionProduct->SetMomentum(GetMomentum().vect()); 39 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 46 G4ReactionProduct * G4PreCompoundHe3::GetReactionProduct() const 47 { 48 G4ReactionProduct * theReactionProduct = 49 new G4ReactionProduct(G4He3::He3Definition()); 50 theReactionProduct->SetMomentum(GetMomentum().vect()); 51 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 40 52 #ifdef PRECOMPOUND_TEST 41 theReactionProduct->SetCreatorModel("G4PrecompoundModel");53 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 42 54 #endif 43 return theReactionProduct; 44 } 45 46 47 G4double G4PreCompoundHe3::FactorialFactor(const G4double N, const G4double P) 48 { 49 return 55 return theReactionProduct; 56 } 57 58 G4double G4PreCompoundHe3::FactorialFactor(const G4double N, const G4double P) 59 { 60 return 50 61 (N-3.0)*(P-2.0)*( 51 62 (((N-2.0)*(P-1.0))/2.0) *( … … 53 64 ) 54 65 ); 66 } 67 68 G4double G4PreCompoundHe3::CoalescenceFactor(const G4double A) 69 { 70 return 243.0/(A*A); 71 } 72 73 G4double G4PreCompoundHe3::GetRj(const G4int NumberParticles, const G4int NumberCharged) 74 { 75 G4double rj = 0.0; 76 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2); 77 if(NumberCharged >=2 && (NumberParticles-NumberCharged) >= 1) { 78 rj = 3.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)) 79 / static_cast<G4double>(denominator); 55 80 } 56 57 G4double G4PreCompoundHe3::CoalescenceFactor(const G4double A) 58 { 59 return 243.0/(A*A); 60 } 61 62 63 64 G4double G4PreCompoundHe3::GetRj(const G4int NumberParticles, const G4int NumberCharged) 65 { 66 G4double rj = 0.0; 67 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2); 68 if(NumberCharged >=2 && (NumberParticles-NumberCharged) >= 1) rj = 3.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged))/static_cast<G4double>(denominator); 69 70 return rj; 71 } 72 73 74 81 return rj; 82 } 75 83 76 84 //////////////////////////////////////////////////////////////////////////////////// … … 80 88 //OPT=3,4 Kalbach's parameterization 81 89 // 82 G4double G4PreCompoundHe3::CrossSection(const G4double K)90 G4double G4PreCompoundHe3::CrossSection(const G4double K) 83 91 { 84 92 ResidualA=GetRestA(); … … 114 122 //---------------- 115 123 // 116 G4double G4PreCompoundHe3::GetAlpha()117 {118 G4double C = 0.0;119 G4double aZ = GetZ() + GetRestZ();120 if (aZ <= 30)121 {122 C = 0.10;123 }124 else if (aZ <= 50)125 {126 C = 0.1 + -((aZ-50.)/20.)*0.02;127 }128 else if (aZ < 70)129 {130 C = 0.08 + -((aZ-70.)/20.)*0.02;131 }132 else133 {134 C = 0.06;135 }136 return 1.0 + C*(4.0/3.0);137 }124 G4double G4PreCompoundHe3::GetAlpha() 125 { 126 G4double C = 0.0; 127 G4double aZ = GetZ() + GetRestZ(); 128 if (aZ <= 30) 129 { 130 C = 0.10; 131 } 132 else if (aZ <= 50) 133 { 134 C = 0.1 + -((aZ-50.)/20.)*0.02; 135 } 136 else if (aZ < 70) 137 { 138 C = 0.08 + -((aZ-70.)/20.)*0.02; 139 } 140 else 141 { 142 C = 0.06; 143 } 144 return 1.0 + C*(4.0/3.0); 145 } 138 146 // 139 147 //-------------------- 140 148 // 141 G4double G4PreCompoundHe3::GetBeta()142 {143 return -GetCoulombBarrier();144 }149 G4double G4PreCompoundHe3::GetBeta() 150 { 151 return -GetCoulombBarrier(); 152 } 145 153 // 146 154 //********************* OPT=1,2 : Chatterjee's cross section ************************ … … 214 222 G4double ra=0.80; 215 223 216 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 224 //JMQ 13/02/09 increase of reduced radius to lower the barrier 225 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 226 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 217 227 ecsq = ec * ec; 218 228 p = p0 + p1/ec + p2/ecsq; … … 237 247 238 248 if (elab <= ec) { //start for E<Ec 239 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 249 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 240 250 } //end for E<Ec 241 251 else { //start for E>Ec -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J. M. Quesada (August 2008). 27 //Based on previous work by V. Lara 26 // $Id: G4PreCompoundIon.cc,v 1.16 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class file 32 // 33 // 34 // File name: G4PreCompoundIon 35 // 36 // Author: V.Lara 37 // 38 // Modified: 39 // 10.02.2009 J. M. Quesada fixed bug in density level of light fragments 28 40 // 29 41 … … 31 43 #include "G4PreCompoundParameters.hh" 32 44 33 G4bool G4PreCompoundIon::IsItPossible(const G4Fragment& aFragment)34 {35 G4int pplus = aFragment.GetNumberOfCharged();36 G4int pneut = aFragment.GetNumberOfParticles()-pplus;37 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());38 }45 G4bool G4PreCompoundIon::IsItPossible(const G4Fragment& aFragment) 46 { 47 G4int pplus = aFragment.GetNumberOfCharged(); 48 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 49 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ()); 50 } 39 51 40 52 G4double G4PreCompoundIon:: … … 57 69 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 58 70 59 G4double gj = (6.0/pi2)*GetA() * 60 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 71 //JMQ 06/02/209 This is THE BUG that was killing cluster emission 72 // G4double gj = (6.0/pi2)*GetA() * 73 // G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 74 75 G4double gj = g1; 61 76 62 77 G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0; … … 74 89 G4double Ej = std::max(0.0,eKin + GetBindingEnergy() -Aj); 75 90 76 77 G4double pA = 1.e-25*(3.0/4.0) * std::sqrt(std::max(0.0, 2.0/(GetReducedMass()* 78 (eKin+GetBindingEnergy()))))/(pi * r0 * r0 * std::pow(GetRestA(),2.0/3.0) )* eKin*CrossSection(eKin) /(r0*std::pow(GetRestA(),1.0/3.0)) * CoalescenceFactor(aFragment.GetA()) * FactorialFactor(N,P)* GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) ; 91 // JMQ 10/02/09 reshaping of the formula (unnecessary std::pow elimitated) 92 G4double pA = (3.0/4.0) * std::sqrt(std::max(0.0, 2.0/(GetReducedMass()* 93 (eKin+GetBindingEnergy()))))/(pi * r0 * r0 *r0* GetRestA())* 94 eKin*CrossSection(eKin)*millibarn* 95 CoalescenceFactor(aFragment.GetA()) * FactorialFactor(N,P)* 96 GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()); 79 97 80 98 G4double pB = std::pow((g1*E1)/(g0*E0),N-GetA()-1.0)*(g1/g0); … … 82 100 G4double pC = std::pow((gj*Ej)/(g0*E0),GetA()-1.0)*(gj/g0)/E0; 83 101 84 85 102 G4double Probability = pA * pB * pC; 86 103 87 104 return Probability; 88 105 } 89 90 91 92 93 94 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J. M. Quesada (August 2008). New source file 27 // 28 // Modif (21 August 2008) by J. M. Quesada for external choice of inverse 29 // cross section option 26 // 27 // $Id: G4PreCompoundNeutron.cc,v 1.4 2009/02/11 18:06:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundNeutron 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 21.08.2008 J. M. Quesada add choice of options 41 // 10.02.2009 J. M. Quesada set default opt3 30 42 // 43 31 44 #include "G4PreCompoundNeutron.hh" 32 45 33 34 G4ReactionProduct * G4PreCompoundNeutron::GetReactionProduct() const 35 { 36 G4ReactionProduct * theReactionProduct = 37 new G4ReactionProduct(G4Neutron::NeutronDefinition()); 38 theReactionProduct->SetMomentum(GetMomentum().vect()); 39 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 46 G4ReactionProduct * G4PreCompoundNeutron::GetReactionProduct() const 47 { 48 G4ReactionProduct * theReactionProduct = 49 new G4ReactionProduct(G4Neutron::NeutronDefinition()); 50 theReactionProduct->SetMomentum(GetMomentum().vect()); 51 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 40 52 #ifdef PRECOMPOUND_TEST 41 theReactionProduct->SetCreatorModel("G4PrecompoundModel");53 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 42 54 #endif 43 return theReactionProduct;44 }45 46 47 G4double G4PreCompoundNeutron::GetRj(const G4int NumberParticles, const G4int NumberCharged) 48 {49 G4double rj = 0.0;50 if(NumberParticles > 0) rj = static_cast<G4double>(NumberParticles - NumberCharged)/static_cast<G4double>(NumberParticles);51 return rj;52 }55 return theReactionProduct; 56 } 57 58 G4double G4PreCompoundNeutron::GetRj(const G4int NumberParticles, const G4int NumberCharged) 59 { 60 G4double rj = 0.0; 61 if(NumberParticles > 0) rj = static_cast<G4double>(NumberParticles - NumberCharged)/ 62 static_cast<G4double>(NumberParticles); 63 return rj; 64 } 53 65 54 66 //////////////////////////////////////////////////////////////////////////////////// … … 58 70 //OPT=3,4 Kalbach's parameterization 59 71 // 60 G4double G4PreCompoundNeutron::CrossSection(const G4double K)72 G4double G4PreCompoundNeutron::CrossSection(const G4double K) 61 73 { 62 74 ResidualA=GetRestA(); … … 92 104 //------- 93 105 // 94 G4double G4PreCompoundNeutron::GetAlpha()95 {96 // return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);106 G4double G4PreCompoundNeutron::GetAlpha() 107 { 108 // return 0.76+2.2/std::pow(GetRestA(),1.0/3.0); 97 109 return 0.76+2.2/ResidualAthrd; 98 }110 } 99 111 // 100 112 //------------ 101 113 // 102 G4double G4PreCompoundNeutron::GetBeta() 103 { 104 // return (2.12/std::pow(GetRestA(),2.0/3.0)-0.05)*MeV/GetAlpha(); 105 return (2.12/(ResidualAthrd*ResidualAthrd)-0.05)*MeV/GetAlpha(); 106 } 107 // 108 109 110 114 G4double G4PreCompoundNeutron::GetBeta() 115 { 116 // return (2.12/std::pow(GetRestA(),2.0/3.0)-0.05)*MeV/GetAlpha(); 117 return (2.12/(ResidualAthrd*ResidualAthrd)-0.05)*MeV/GetAlpha(); 118 } 119 // 111 120 112 121 //********************* OPT=1,2 : Chatterjee's cross section ************************ … … 156 165 G4double b,ecut,cut,ecut2,geom,elab; 157 166 158 //safety initialization167 //safety initialization 159 168 landa0=0; 160 169 landa1=0; … … 172 181 spill= 1.0e+18; 173 182 174 175 176 // PRECO xs for neutrons is choosen 183 // PRECO xs for neutrons is choosen 177 184 178 185 p0 = -312.; … … 201 208 xnulam = 1.; 202 209 etest = 32.; 203 // ** etest is the energy above which the rxn cross section is 204 // ** compared with the geometrical limit and the max taken. 205 // ** xnulam here is a dummy value to be used later. 206 207 210 // ** etest is the energy above which the rxn cross section is 211 // ** compared with the geometrical limit and the max taken. 212 // ** xnulam here is a dummy value to be used later. 208 213 209 214 a = -2.*p*ec + landa - nu/ecsq; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J. M. Quesada (August 2008). 27 //Based on previous work by V. Lara 26 // 27 // $Id: G4PreCompoundNucleon.cc,v 1.13 2009/02/11 18:06:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundNucleon 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 10.02.2009 J. M. Quesada cleanup 28 41 // 29 42 … … 32 45 33 46 G4bool G4PreCompoundNucleon::IsItPossible(const G4Fragment& aFragment) 34 { 35 G4int pplus = aFragment.GetNumberOfCharged(); 36 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 37 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ()); 38 } 39 47 { 48 G4int pplus = aFragment.GetNumberOfCharged(); 49 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 50 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ()); 51 } 40 52 41 53 G4double G4PreCompoundNucleon:: … … 45 57 if ( !IsItPossible(aFragment) ) return 0.0; 46 58 47 48 59 G4double U = aFragment.GetExcitationEnergy(); 49 60 G4double P = aFragment.GetNumberOfParticles(); … … 51 62 G4double N = P + H; 52 63 53 54 55 64 G4double g0 = (6.0/pi2)*aFragment.GetA() * 56 65 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); … … 58 67 G4double g1 = (6.0/pi2)*GetRestA() * 59 68 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 60 61 62 69 63 70 G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0; … … 71 78 72 79 73 G4double Probability =1.e-25* 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass() 74 * GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) * eKin*CrossSection(eKin) * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0); 80 G4double Probability = 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass() 81 * GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 82 * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0); 75 83 76 77 if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0 || CrossSection(eKin) <0) 78 { std::ostringstream errOs; 79 G4cout<<"WARNING: NEGATIVE VALUES "<<G4endl; 80 errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<<G4endl; 81 errOs <<" xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl; 82 errOs <<" A="<<GetA()<<" Z="<<GetZ()<<G4endl; 83 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 84 } 84 if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0 85 || CrossSection(eKin) <0) { 86 std::ostringstream errOs; 87 G4cout<<"WARNING: NEGATIVE VALUES "<<G4endl; 88 errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 89 <<G4endl; 90 errOs <<" xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl; 91 errOs <<" A="<<GetA()<<" Z="<<GetZ()<<G4endl; 92 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 93 } 85 94 86 95 return Probability; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 //J.M.Quesada (August 08). New source file 27 // 28 // Modif (21 August 2008) by J. M. Quesada for external choice of inverse 29 // cross section option 30 // 31 // JMQ (06 September 2008) Also external choice has been added for: 32 // - superimposed Coulomb barrier (if useSICB=true) 26 // 27 // $Id: G4PreCompoundProton.cc,v 1.4 2009/02/11 18:06:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundProton 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 21.08.2008 J. M. Quesada added external choice of inverse cross section option 41 // 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb barrier 42 // (if useSICB=true) 43 // 33 44 34 45 #include "G4PreCompoundProton.hh" 35 46 36 G4ReactionProduct * G4PreCompoundProton::GetReactionProduct() const37 {38 G4ReactionProduct * theReactionProduct =39 new G4ReactionProduct(G4Proton::ProtonDefinition());40 theReactionProduct->SetMomentum(GetMomentum().vect());41 theReactionProduct->SetTotalEnergy(GetMomentum().e());47 G4ReactionProduct * G4PreCompoundProton::GetReactionProduct() const 48 { 49 G4ReactionProduct * theReactionProduct = 50 new G4ReactionProduct(G4Proton::ProtonDefinition()); 51 theReactionProduct->SetMomentum(GetMomentum().vect()); 52 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 42 53 #ifdef PRECOMPOUND_TEST 43 theReactionProduct->SetCreatorModel("G4PrecompoundModel");54 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 44 55 #endif 45 return theReactionProduct; 46 } 47 48 49 G4double G4PreCompoundProton::GetRj(const G4int NumberParticles, const G4int NumberCharged) 50 { 51 G4double rj = 0.0; 52 if(NumberParticles > 0) rj = static_cast<G4double>(NumberCharged)/static_cast<G4double>(NumberParticles); 53 return rj; 54 } 55 56 56 return theReactionProduct; 57 } 58 59 G4double G4PreCompoundProton::GetRj(const G4int NumberParticles, const G4int NumberCharged) 60 { 61 G4double rj = 0.0; 62 if(NumberParticles > 0) rj = static_cast<G4double>(NumberCharged)/static_cast<G4double>(NumberParticles); 63 return rj; 64 } 57 65 58 66 //////////////////////////////////////////////////////////////////////////////////// … … 63 71 //OPT=3 Kalbach's parameterization 64 72 // 65 G4double G4PreCompoundProton::CrossSection(const G4double K)73 G4double G4PreCompoundProton::CrossSection(const G4double K) 66 74 { 67 75 //G4cout<<" In G4PreCompoundProton OPTxs="<<OPTxs<<G4endl; … … 75 83 FragmentA=GetA()+GetRestA(); 76 84 FragmentAthrd=std::pow(FragmentA,0.33333); 77 78 79 85 80 86 if (OPTxs==0) return GetOpt0(K); … … 94 100 G4double G4PreCompoundProton::GetOpt0(const G4double K) 95 101 { 96 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();102 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0(); 97 103 // cross section is now given in mb (r0 is in mm) for the sake of consistency 98 104 //with the rest of the options 99 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);105 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K); 100 106 } 101 107 // 102 108 //------------ 103 109 // 104 G4double G4PreCompoundProton::GetAlpha()105 {106 G4double aZ = static_cast<G4double>(GetRestZ());107 G4double C = 0.0;108 if (aZ >= 70)109 {110 C = 0.10;111 }112 else113 {114 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;115 }116 return 1.0 + C;117 }110 G4double G4PreCompoundProton::GetAlpha() 111 { 112 G4double aZ = static_cast<G4double>(GetRestZ()); 113 G4double C = 0.0; 114 if (aZ >= 70) 115 { 116 C = 0.10; 117 } 118 else 119 { 120 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 121 } 122 return 1.0 + C; 123 } 118 124 // 119 125 //------------------- 120 126 // 121 G4double G4PreCompoundProton::GetBeta()122 {127 G4double G4PreCompoundProton::GetBeta() 128 { 123 129 return -GetCoulombBarrier(); 124 } 125 // 126 127 128 130 } 131 // 132 129 133 //********************* OPT=1 : Chatterjee's cross section ************************ 130 134 //(fitting to cross section from Bechetti & Greenles OM potential) … … 132 136 G4double G4PreCompoundProton::GetOpt1(const G4double K) 133 137 { 134 G4double Kc=K; 135 136 // JMQ xsec is set constat above limit of validity 137 if (K>50) Kc=50; 138 139 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs; 140 G4double p, p0, p1, p2,Ec,delta,q,r,ji; 141 142 p0 = 15.72; 143 p1 = 9.65; 144 p2 = -449.0; 145 landa0 = 0.00437; 146 landa1 = -16.58; 147 mu0 = 244.7; 148 mu1 = 0.503; 149 nu0 = 273.1; 150 nu1 = -182.4; 151 nu2 = -1.872; 152 delta=0.; 153 154 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 155 p = p0 + p1/Ec + p2/(Ec*Ec); 156 landa = landa0*ResidualA + landa1; 157 mu = mu0*std::pow(ResidualA,mu1); 158 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 159 q = landa - nu/(Ec*Ec) - 2*p*Ec; 160 r = mu + 2*nu/Ec + p*(Ec*Ec); 161 162 ji=std::max(Kc,Ec); 163 if(Kc < Ec) { xs = p*Kc*Kc + q*Kc + r;} 164 else {xs = p*(Kc - ji)*(Kc - ji) + landa*Kc + mu + nu*(2 - Kc/ji)/ji ;} 165 if (xs <0.0) {xs=0.0;} 166 167 return xs; 168 169 } 170 171 138 G4double Kc=K; 139 140 // JMQ xsec is set constat above limit of validity 141 if (K>50) Kc=50; 142 143 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs; 144 G4double p, p0, p1, p2,Ec,delta,q,r,ji; 145 146 p0 = 15.72; 147 p1 = 9.65; 148 p2 = -449.0; 149 landa0 = 0.00437; 150 landa1 = -16.58; 151 mu0 = 244.7; 152 mu1 = 0.503; 153 nu0 = 273.1; 154 nu1 = -182.4; 155 nu2 = -1.872; 156 delta=0.; 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 if (xs <0.0) {xs=0.0;} 170 171 return xs; 172 173 } 172 174 173 175 //************* OPT=2 : Welisch's proton reaction cross section ************************ … … 178 180 G4double rnpro,rnneu,eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0); 179 181 180 //This is redundant when the Coulomb barrier is overimposed to all cross sections181 //It should be kept when Coulomb barrier only imposed at OPTxs=2182 //This is redundant when the Coulomb barrier is overimposed to all cross sections 183 //It should be kept when Coulomb barrier only imposed at OPTxs=2 182 184 183 185 if(!useSICB && K<=theCoulombBarrier) return xine_th=0.0; … … 316 318 } //end for E>Ec 317 319 318 return sig;} 319 320 320 return sig; 321 } 321 322 322 323 // ************************** end of cross sections ******************************* -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // 27 //J. M. Quesada (Feb. 08). Base on previous work by V. Lara. 28 // New transition probabilities. Several bugs fixed. 29 // JMQ (06 September 2008) Also external choices have been added for: 26 // $Id: G4PreCompoundTransitions.cc,v 1.20 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class file 32 // 33 // 34 // File name: G4PreCompoundIon 35 // 36 // Author: V.Lara 37 // 38 // Modified: 39 // 16.02.2008 J. M. Quesada fixed bugs 40 // 06.09.2008 J. M. Quesada added external choices for: 30 41 // - "never go back" hipothesis (useNGB=true) 31 42 // - CEM transition probabilities (useCEMtr=true) 43 32 44 #include "G4PreCompoundTransitions.hh" 33 45 #include "G4HadronicException.hh" … … 184 196 // G4cout<<"N="<<N<<" P="<<P<<" H="<<H<<G4endl; 185 197 // G4cout<<"l+ ="<<TransitionProb1<<" l- ="<< TransitionProb2<<" l0 ="<< TransitionProb3<<G4endl; 186 return TransitionProb1 + TransitionProb2 + TransitionProb3;} 198 return TransitionProb1 + TransitionProb2 + TransitionProb3; 199 } 187 200 188 201 else { … … 215 228 return TransitionProb1 + TransitionProb2 + TransitionProb3; 216 229 } 217 218 219 230 } 220 231 … … 237 248 } 238 249 239 // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion to the number charges w.r.t. number of particles, PROVIDED that there are charged particles 240 if(deltaN < 0 && G4UniformRand() <= static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) && (result.GetNumberOfCharged() >= 1)) 250 // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion 251 // to the number charges w.r.t. number of particles, PROVIDED that there are charged particles 252 if(deltaN < 0 && G4UniformRand() <= 253 static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) 254 && (result.GetNumberOfCharged() >= 1)) { 241 255 result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); // deltaN is negative! 242 243 244 //JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on number of charged vs. number of particles fails 256 } 257 258 // JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on 259 // number of charged vs. number of particles fails 245 260 result.SetNumberOfParticles(result.GetNumberOfParticles()+deltaN/2); 246 261 result.SetNumberOfHoles(result.GetNumberOfHoles()+deltaN/2); 247 262 248 // With weight Z/A, number of charged particles is increased with +1263 // With weight Z/A, number of charged particles is increased with +1 249 264 if ( ( deltaN > 0 ) && 250 265 (G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/ 251 std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.)))266 std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.))) 252 267 { 253 268 result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc
r1007 r1055 25 25 // 26 26 // 27 //J.M.Quesada (August 08). New source file 28 // 29 // Modif (21 August 2008) by J. M. Quesada for external choice of inverse 30 // cross section option 27 // $Id: G4PreCompoundTriton.cc,v 1.5 2009/02/13 18:57:32 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 // 30 // ------------------------------------------------------------------- 31 // 32 // GEANT4 Class file 33 // 34 // 35 // File name: G4PreCompoundTriton 36 // 37 // Author: V.Lara 38 // 39 // Modified: 40 // 21.08.2008 J. M. Quesada add choice of options 41 // 10.02.2009 J. M. Quesada set default opt1 42 // 31 43 32 44 #include "G4PreCompoundTriton.hh" 33 45 34 46 35 G4ReactionProduct * G4PreCompoundTriton::GetReactionProduct() const36 {37 G4ReactionProduct * theReactionProduct =38 new G4ReactionProduct(G4Triton::TritonDefinition());39 theReactionProduct->SetMomentum(GetMomentum().vect());40 theReactionProduct->SetTotalEnergy(GetMomentum().e());47 G4ReactionProduct * G4PreCompoundTriton::GetReactionProduct() const 48 { 49 G4ReactionProduct * theReactionProduct = 50 new G4ReactionProduct(G4Triton::TritonDefinition()); 51 theReactionProduct->SetMomentum(GetMomentum().vect()); 52 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 41 53 #ifdef PRECOMPOUND_TEST 42 theReactionProduct->SetCreatorModel("G4PrecompoundModel");54 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 43 55 #endif 44 return theReactionProduct;45 }46 47 G4double G4PreCompoundTriton::FactorialFactor(const G4double N, const G4double P)48 {49 return56 return theReactionProduct; 57 } 58 59 G4double G4PreCompoundTriton::FactorialFactor(const G4double N, const G4double P) 60 { 61 return 50 62 (N-3.0)*(P-2.0)*( 51 63 (((N-2.0)*(P-1.0))/2.0) *( … … 53 65 ) 54 66 ); 67 } 68 69 G4double G4PreCompoundTriton::CoalescenceFactor(const G4double A) 70 { 71 return 243.0/(A*A); 72 } 73 74 G4double G4PreCompoundTriton::GetRj(const G4int NumberParticles, const G4int NumberCharged) 75 { 76 G4double rj = 0.0; 77 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2); 78 if(NumberCharged >= 1 && (NumberParticles-NumberCharged) >= 2) { 79 rj = 3.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1)) 80 /static_cast<G4double>(denominator); 55 81 } 56 57 G4double G4PreCompoundTriton::CoalescenceFactor(const G4double A) 58 { 59 return 243.0/(A*A); 60 } 61 62 63 G4double G4PreCompoundTriton::GetRj(const G4int NumberParticles, const G4int NumberCharged) 64 { 65 G4double rj = 0.0; 66 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2); 67 if(NumberCharged >= 1 && (NumberParticles-NumberCharged) >= 2) rj = 3.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 68 return rj; 69 } 70 71 72 82 return rj; 83 } 73 84 74 85 //////////////////////////////////////////////////////////////////////////////////// … … 78 89 //OPT=3,4 Kalbach's parameterization 79 90 // 80 G4double G4PreCompoundTriton::CrossSection(const G4double K)91 G4double G4PreCompoundTriton::CrossSection(const G4double K) 81 92 { 82 93 ResidualA=GetRestA(); … … 111 122 //--------- 112 123 // 113 G4double G4PreCompoundTriton::GetAlpha()114 {115 G4double C = 0.0;116 G4double aZ = GetZ() + GetRestZ();117 if (aZ >= 70)118 {119 C = 0.10;120 }121 else122 {123 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;124 }125 126 return 1.0 + C/3.0;127 }124 G4double G4PreCompoundTriton::GetAlpha() 125 { 126 G4double C = 0.0; 127 G4double aZ = GetZ() + GetRestZ(); 128 if (aZ >= 70) 129 { 130 C = 0.10; 131 } 132 else 133 { 134 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 135 } 136 137 return 1.0 + C/3.0; 138 } 128 139 // 129 140 //------------- 130 141 // 131 G4double G4PreCompoundTriton::GetBeta()132 {133 return -GetCoulombBarrier();134 }142 G4double G4PreCompoundTriton::GetBeta() 143 { 144 return -GetCoulombBarrier(); 145 } 135 146 // 136 147 //********************* OPT=1,2 : Chatterjee's cross section ************************ … … 183 194 184 195 G4double landa, mu, nu, p , signor(1.),sig; 185 G4double ec,ecsq,xnulam,etest(0.),a;186 G4double b,ecut,cut,ecut2,geom,elab;187 188 189 G4double flow = 1.e-18;190 G4double spill= 1.e+18;191 192 193 G4double p0 = -21.45;194 G4double p1 = 484.7;195 G4double p2 = -1608.;196 G4double landa0 = 0.0186;197 G4double landa1 = -8.90;198 G4double mu0 = 686.3;199 G4double mu1 = 0.325;200 G4double nu0 = 368.9;201 G4double nu1 = -522.2;202 G4double nu2 = -4.998;196 G4double ec,ecsq,xnulam,etest(0.),a; 197 G4double b,ecut,cut,ecut2,geom,elab; 198 199 200 G4double flow = 1.e-18; 201 G4double spill= 1.e+18; 202 203 204 G4double p0 = -21.45; 205 G4double p1 = 484.7; 206 G4double p2 = -1608.; 207 G4double landa0 = 0.0186; 208 G4double landa1 = -8.90; 209 G4double mu0 = 686.3; 210 G4double mu1 = 0.325; 211 G4double nu0 = 368.9; 212 G4double nu1 = -522.2; 213 G4double nu2 = -4.998; 203 214 204 G4double ra=0.80;215 G4double ra=0.80; 205 216 206 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 207 ecsq = ec * ec; 208 p = p0 + p1/ec + p2/ecsq; 209 landa = landa0*ResidualA + landa1; 210 a = std::pow(ResidualA,mu1); 211 mu = mu0 * a; 212 nu = a* (nu0+nu1*ec+nu2*ecsq); 213 xnulam = nu / landa; 214 if (xnulam > spill) xnulam=0.; 215 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam); 216 217 a = -2.*p*ec + landa - nu/ecsq; 218 b = p*ecsq + mu + 2.*nu/ec; 219 ecut = 0.; 220 cut = a*a - 4.*p*b; 221 if (cut > 0.) ecut = std::sqrt(cut); 222 ecut = (ecut-a) / (p+p); 223 ecut2 = ecut; 224 if (cut < 0.) ecut2 = ecut - 2.; 225 elab = K * FragmentA / ResidualA; 226 sig = 0.; 227 228 if (elab <= ec) { //start for E<Ec 229 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 230 } //end for E<Ec 231 else { //start for E>Ec 232 sig = (landa*elab+mu+nu/elab) * signor; 233 geom = 0.; 234 if (xnulam < flow || elab < etest) return sig; 235 geom = std::sqrt(theA*K); 236 geom = 1.23*ResidualAthrd + ra + 4.573/geom; 237 geom = 31.416 * geom * geom; 238 sig = std::max(geom,sig); 239 } //end for E>Ec 240 return sig; 217 //JMQ 13/02/09 increase of reduced radius to lower the barrier 218 // ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); 219 ec = 1.44 * theZ * ResidualZ / (1.7*ResidualAthrd+ra); 220 ecsq = ec * ec; 221 p = p0 + p1/ec + p2/ecsq; 222 landa = landa0*ResidualA + landa1; 223 a = std::pow(ResidualA,mu1); 224 mu = mu0 * a; 225 nu = a* (nu0+nu1*ec+nu2*ecsq); 226 xnulam = nu / landa; 227 if (xnulam > spill) xnulam=0.; 228 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam); 229 230 a = -2.*p*ec + landa - nu/ecsq; 231 b = p*ecsq + mu + 2.*nu/ec; 232 ecut = 0.; 233 cut = a*a - 4.*p*b; 234 if (cut > 0.) ecut = std::sqrt(cut); 235 ecut = (ecut-a) / (p+p); 236 ecut2 = ecut; 237 if (cut < 0.) ecut2 = ecut - 2.; 238 elab = K * FragmentA / ResidualA; 239 sig = 0.; 240 241 if (elab <= ec) { //start for E<Ec 242 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor; 243 } //end for E<Ec 244 else { //start for E>Ec 245 sig = (landa*elab+mu+nu/elab) * signor; 246 geom = 0.; 247 if (xnulam < flow || elab < etest) return sig; 248 geom = std::sqrt(theA*K); 249 geom = 1.23*ResidualAthrd + ra + 4.573/geom; 250 geom = 31.416 * geom * geom; 251 sig = std::max(geom,sig); 252 } //end for E>Ec 253 return sig; 241 254 242 255 } 243 256 244 257 // ************************** end of cross sections ******************************* 245 246 247 248 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VPreCompoundFragment.cc,v 1.12 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 26 28 // 27 // J. M. Quesada (August 2008).28 // Based on previous work by V. Lara29 // J. M. Quesada (August 2008). 30 // Based on previous work by V. Lara 29 31 // 30 32 -
trunk/source/processes/hadronic/models/qmd/GNUmakefile
r819 r1055 1 # $Id: GNUmakefile,v 1. 1 2007/11/17 16:27:35 dennisExp $1 # $Id: GNUmakefile,v 1.2 2008/11/22 06:30:46 tkoi Exp $ 2 2 # ----------------------------------------------------------- 3 3 # GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96. … … 27 27 -I$(G4BASE)/processes/hadronic/models/management/include \ 28 28 -I$(G4BASE)/processes/hadronic/models/util/include \ 29 -I$(G4BASE)/processes/hadronic/models/theo_high_energy/include \ 30 -I$(G4BASE)/processes/hadronic/models/binary_cascade/include \ 29 31 -I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \ 32 -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/include \ 33 -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include \ 34 -I$(G4BASE)/processes/hadronic/models/parton_string/qgsm/include \ 35 -I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \ 36 -I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \ 37 -I$(G4BASE)/processes/hadronic/models/parton_string/management/include \ 30 38 -I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \ 31 39 -I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \ -
trunk/source/processes/hadronic/models/qmd/History
r962 r1055 13 13 * Please list in reverse chronological order (last date on top) 14 14 --------------------------------------------------------------- 15 16 31-March-2009 Tatsumi Koi (hadr-qmd-V09-02-01) 17 - Fix bug in gamma(mass zero) partiticpants 18 src/G4QMDCollision.cc 19 - Chnage meber object to pointer 20 include/G4QMDReaction.hh 21 src/G4QMDReaction.cc 22 23 28-February-2009 Tatsumi Koi (hadr-qmd-V09-02-00) 24 - Fix bug in Absorption 25 src/G4QMDCollision.cc 26 - Add Be8 -> Alpha Alpha including opening angle by Q value 27 src/G4QMDReaction.cc 15 28 16 29 20-November-2008 Tatsumi Koi (hadr-qmd-V09-01-08) -
trunk/source/processes/hadronic/models/qmd/include/G4QMDReaction.hh
r962 r1055 28 28 // 29 29 // 30 // File name: G4QMDReaction.hh30 // File name: G4QMDReaction.hh 31 31 // 32 32 // Author: Koi, Tatsumi (tkoi@slac.stanford.edu) … … 37 37 // 081107 Add UnUseGEM (then use the default channel of G4Evaporation) 38 38 // UseFrag (chage criterion of a inelastic reaction) 39 // 090331 Change member shenXS and genspaXS object to pointer 39 40 // 40 41 … … 70 71 void UseFRAG(){ frag = true; }; 71 72 73 void EnableFermiG(){ heg = true; setHighEnergyModel(); }; 74 72 75 private: 73 76 74 77 void setEvaporationCh(); 78 void setHighEnergyModel(); 75 79 76 80 G4QMDMeanField* meanField; … … 107 111 G4double coulomb_collision_pz_targ; 108 112 109 G4IonsShenCrossSection shenXS; 110 G4IonsShenCrossSection genspaXS; 113 //090331 114 G4IonsShenCrossSection* shenXS; 115 G4GeneralSpaceNNCrossSection* genspaXS; 111 116 112 117 G4bool gem; 113 118 G4bool frag; 119 G4bool heg; 114 120 115 121 }; -
trunk/source/processes/hadronic/models/qmd/src/G4QMDCollision.cc
r962 r1055 28 28 // Add several required updating of Mean Filed 29 29 // Modified handling of absorption case by T. Koi 30 // 090126 Fix in absorption case by T. Koi 31 // 090331 Fix for gamma participant by T. Koi 30 32 // 31 33 #include "G4QMDCollision.hh" 32 #include "G4ParticleDefinition.hh"33 34 #include "G4Scatterer.hh" 34 35 #include "Randomize.hh" … … 260 261 G4double rmi = theSystem->GetParticipant( i )->GetMass(); 261 262 G4ParticleDefinition* pdi = theSystem->GetParticipant( i )->GetDefinition(); 263 //090331 gamma 264 if ( pdi->GetPDGMass() == 0.0 ) continue; 262 265 263 266 //std::cout << " p4i00 " << p4i << std::endl; … … 295 298 G4double rmj = theSystem->GetParticipant( j )->GetMass(); 296 299 G4ParticleDefinition* pdj = theSystem->GetParticipant( j )->GetDefinition(); 300 //090331 gamma 301 if ( pdj->GetPDGMass() == 0.0 ) continue; 297 302 298 303 G4double rr2 = theMeanField->GetRR2( i , j ); … … 332 337 G4double pidr = p4i.vect()*dr; 333 338 G4double pjdr = p4j.vect()*dr; 334 339 335 340 G4double aij = 1.0 - ( rmi*rmj /pij ) * ( rmi*rmj /pij ); 336 341 G4double bij = pidr / rmi - pjdr*rmi/pij; … … 660 665 else 661 666 { 662 if ( theMeanField->IsPauliBlocked ( i ) == false ) 667 //if ( theMeanField->IsPauliBlocked ( i ) == false ) 668 //090126 i-1 cause jth is erased 669 if ( theMeanField->IsPauliBlocked ( i-1 ) == false ) 663 670 { 664 671 //G4cout << "Absorption Happen " << theSystem->GetTotalNumberOfParticipant() << G4endl; -
trunk/source/processes/hadronic/models/qmd/src/G4QMDReaction.cc
r962 r1055 31 31 // UseFrag (chage criterion of a inelastic reaction) 32 32 // Fix bug in nucleon projectiles by T. Koi 33 // 090122 Be8 -> Alpha + Alpha 34 // 090331 Change member shenXS and genspaXS object to pointer 33 35 // 34 36 #include "G4QMDReaction.hh" … … 45 47 , frag ( false ) 46 48 { 49 50 //090331 51 shenXS = new G4IonsShenCrossSection(); 52 //genspaXS = new G4GeneralSpaceNNCrossSection(); 47 53 meanField = new G4QMDMeanField(); 48 54 collision = new G4QMDCollision(); … … 99 105 G4double aTemp = projectile.GetMaterial()->GetTemperature(); 100 106 101 //G4double xs_0 = shenXS.GetCrossSection ( proj_dp , targ_ele , aTemp ); 102 G4double xs_0 = genspaXS.GetCrossSection ( proj_dp , targ_ele , aTemp ); 107 //090331 108 G4double xs_0 = shenXS->GetCrossSection ( proj_dp , targ_ele , aTemp ); 109 //G4double xs_0 = genspaXS->GetCrossSection ( proj_dp , targ_ele , aTemp ); 103 110 G4double bmax_0 = std::sqrt( xs_0 / pi ); 104 111 //std::cout << "bmax_0 in fm (fermi) " << bmax_0/fermi << std::endl; … … 470 477 // Secondary from this nucleus (*it) 471 478 G4ParticleDefinition* pd = (*itt)->GetDefinition(); 479 472 480 G4LorentzVector p4 ( (*itt)->GetMomentum()/GeV , (*itt)->GetTotalEnergy()/GeV ); //in nucleus(*it) rest system 473 481 G4LorentzVector p4_CM = CLHEP::boostOf( p4 , -nucleus_p4CM.findBoostToCM() ); // Back to CM 474 482 G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB ); // Back to LAB 475 483 476 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV ); 477 theParticleChange.AddSecondary( dp ); 484 485 //090122 486 //theParticleChange.AddSecondary( dp ); 487 if ( !( pd->GetAtomicNumber() == 4 && pd->GetAtomicMass() == 8 ) ) 488 { 489 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV ); 490 theParticleChange.AddSecondary( dp ); 491 } 492 else 493 { 494 //Be8 -> Alpha + Alpha + Q 495 G4ThreeVector randomized_direction( G4UniformRand() , G4UniformRand() , G4UniformRand() ); 496 randomized_direction = randomized_direction.unit(); 497 G4double q_decay = (*itt)->GetMass() - 2*G4Alpha::Alpha()->GetPDGMass(); 498 G4double p_decay = std::sqrt ( std::pow(G4Alpha::Alpha()->GetPDGMass()+q_decay/2,2) - std::pow(G4Alpha::Alpha()->GetPDGMass() , 2 ) ); 499 G4LorentzVector p4_a1 ( p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 ); //in Be8 rest system 500 501 G4LorentzVector p4_a1_Be8 = CLHEP::boostOf ( p4_a1/GeV , -p4.findBoostToCM() ); 502 G4LorentzVector p4_a1_CM = CLHEP::boostOf ( p4_a1_Be8 , -nucleus_p4CM.findBoostToCM() ); 503 G4LorentzVector p4_a1_LAB = CLHEP::boostOf ( p4_a1_CM , boostBackToLAB ); 504 505 G4LorentzVector p4_a2 ( -p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 ); //in Be8 rest system 506 507 G4LorentzVector p4_a2_Be8 = CLHEP::boostOf ( p4_a2/GeV , -p4.findBoostToCM() ); 508 G4LorentzVector p4_a2_CM = CLHEP::boostOf ( p4_a2_Be8 , -nucleus_p4CM.findBoostToCM() ); 509 G4LorentzVector p4_a2_LAB = CLHEP::boostOf ( p4_a2_CM , boostBackToLAB ); 510 511 G4DynamicParticle* dp1 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a1_LAB*GeV ); 512 G4DynamicParticle* dp2 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a2_LAB*GeV ); 513 theParticleChange.AddSecondary( dp1 ); 514 theParticleChange.AddSecondary( dp2 ); 515 } 516 //090122 478 517 479 518 /* … … 698 737 699 738 } 700 -
trunk/source/processes/hadronic/models/rpg/History
r962 r1055 15 15 --------------------------------------------------------------- 16 16 17 25 May 2009 - Dennis Wright (hadr-rpg-V09-02-00) 18 ------------------------------------------------ 19 G4RPGInelastic: fix MAC complaint about initialization order: 20 remove static array of G4ParticleDefinition pointers and 21 replace with local array 22 17 23 9 June 2008 - Dennis Wright (hadr-rpg-V09-01-03) 18 24 ------------------------------------------------- -
trunk/source/processes/hadronic/models/rpg/include/G4RPGInelastic.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RPGInelastic.hh,v 1. 3 2008/02/22 22:17:25dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4RPGInelastic.hh,v 1.4 2009/05/25 19:06:59 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: D. H. Wright … … 55 55 public: // with description 56 56 57 G4RPGInelastic(const G4String& modelName = "RPGInelastic") 58 : G4HadronicInteraction(modelName) 59 { cache = 0.0;} 57 G4RPGInelastic(const G4String& modelName = "RPGInelastic"); 60 58 61 59 virtual ~G4RPGInelastic() … … 124 122 lam, sp, s0, sm, xi0, xim, om, ap, an}; 125 123 126 static G4ParticleDefinition* particleDef[18]; 124 protected: 125 126 G4ParticleDefinition* particleDef[18]; 127 127 128 128 private: -
trunk/source/processes/hadronic/models/rpg/include/G4RPGNucleonInelastic.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RPGNucleonInelastic.hh,v 1. 1 2008/01/04 23:27:45dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4RPGNucleonInelastic.hh,v 1.2 2009/05/25 19:05:19 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: D. H. Wright … … 48 48 49 49 ~G4RPGNucleonInelastic() { } 50 51 // void printCrossSections() const; 50 52 51 53 protected: -
trunk/source/processes/hadronic/models/rpg/include/G4RPGPionInelastic.hh
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RPGPionInelastic.hh,v 1. 1 2008/01/05 00:14:03dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4RPGPionInelastic.hh,v 1.2 2009/05/25 19:05:34 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // Author: D. H. Wright … … 48 48 49 49 ~G4RPGPionInelastic() { } 50 51 // void printCrossSections() const; 50 52 51 53 protected: -
trunk/source/processes/hadronic/models/rpg/src/G4RPGInelastic.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RPGInelastic.cc,v 1. 6 2008/03/22 00:03:24dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4RPGInelastic.cc,v 1.7 2009/05/25 19:07:15 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 … … 34 34 #include "G4RPGTwoBody.hh" 35 35 36 36 37 G4RPGInelastic::G4RPGInelastic(const G4String& modelName) 38 : G4HadronicInteraction(modelName) 39 { 40 cache = 0.0; 41 particleDef[0] = G4PionZero::PionZero(); 42 particleDef[1] = G4PionPlus::PionPlus(); 43 particleDef[2] = G4PionMinus::PionMinus(); 44 particleDef[3] = G4KaonPlus::KaonPlus(); 45 particleDef[4] = G4KaonMinus::KaonMinus(); 46 particleDef[5] = G4KaonZero::KaonZero(); 47 particleDef[6] = G4AntiKaonZero::AntiKaonZero(); 48 particleDef[7] = G4Proton::Proton(); 49 particleDef[8] = G4Neutron::Neutron(); 50 particleDef[9] = G4Lambda::Lambda(); 51 particleDef[10] = G4SigmaPlus::SigmaPlus(); 52 particleDef[11] = G4SigmaZero::SigmaZero(); 53 particleDef[12] = G4SigmaMinus::SigmaMinus(); 54 particleDef[13] = G4XiZero::XiZero(); 55 particleDef[14] = G4XiMinus::XiMinus(); 56 particleDef[15] = G4OmegaMinus::OmegaMinus(); 57 particleDef[16] = G4AntiProton::AntiProton(); 58 particleDef[17] = G4AntiNeutron::AntiNeutron(); 59 } 60 61 37 62 G4double G4RPGInelastic::Pmltpc(G4int np, G4int nm, G4int nz, 38 63 G4int n, G4double b, G4double c) … … 568 593 2.4, 3.2, 4.2, 5.6, 7.5, 10.0, 13.0, 18.0, 24.0, 32.0 }; 569 594 570 G4ParticleDefinition* p0 = G4PionZero::PionZero();571 G4ParticleDefinition* p1 = G4PionPlus::PionPlus();572 G4ParticleDefinition* p2 = G4PionMinus::PionMinus();573 G4ParticleDefinition* p3 = G4KaonPlus::KaonPlus();574 G4ParticleDefinition* p4 = G4KaonMinus::KaonMinus();575 G4ParticleDefinition* p5 = G4KaonZero::KaonZero();576 G4ParticleDefinition* p6 = G4AntiKaonZero::AntiKaonZero();577 G4ParticleDefinition* p7 = G4Proton::Proton();578 G4ParticleDefinition* p8 = G4Neutron::Neutron();579 G4ParticleDefinition* p9 = G4Lambda::Lambda();580 G4ParticleDefinition* p10 = G4SigmaPlus::SigmaPlus();581 G4ParticleDefinition* p11 = G4SigmaZero::SigmaZero();582 G4ParticleDefinition* p12 = G4SigmaMinus::SigmaMinus();583 G4ParticleDefinition* p13 = G4XiZero::XiZero();584 G4ParticleDefinition* p14 = G4XiMinus::XiMinus();585 G4ParticleDefinition* p15 = G4OmegaMinus::OmegaMinus();586 G4ParticleDefinition* p16 = G4AntiProton::AntiProton();587 G4ParticleDefinition* p17 = G4AntiNeutron::AntiNeutron();588 589 G4ParticleDefinition* G4RPGInelastic::particleDef[18] = {590 p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14,591 p15, p16, p17 };592 595 593 596 /* end of file */ -
trunk/source/processes/hadronic/models/rpg/src/G4RPGNucleonInelastic.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RPGNucleonInelastic.cc,v 1. 1 2008/01/04 23:28:10dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4RPGNucleonInelastic.cc,v 1.2 2009/05/25 19:06:03 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 … … 70 70 } 71 71 } 72 73 // printCrossSections(); 72 74 73 75 } 76 77 /* 78 void G4RPGNucleonInelastic::printCrossSections() const 79 { 80 G4cout << " pp total cross sections (mb) " << G4endl; 81 for (G4int i = 0; i < 5; i++) { 82 G4int istart = i*6; 83 G4int istop = istart + 6; 84 for (G4int t = istart; t < istop; t++) G4cout << pPtot[t] << " " ; 85 G4cout << G4endl; 86 } 87 G4cout << G4endl; 88 89 G4cout << " pn total cross sections (mb) " << G4endl; 90 for (G4int i = 0; i < 5; i++) { 91 G4int istart = i*6; 92 G4int istop = istart + 6; 93 for (G4int t = istart; t < istop; t++) G4cout << pNtot[t] << " " ; 94 G4cout << G4endl; 95 } 96 } 97 */ 74 98 75 99 -
trunk/source/processes/hadronic/models/rpg/src/G4RPGPionInelastic.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4RPGPionInelastic.cc,v 1. 1 2008/01/05 00:15:12dennis Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4RPGPionInelastic.cc,v 1.2 2009/05/25 19:05:47 dennis Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 … … 71 71 } 72 72 73 // printCrossSections(); 74 73 75 } 76 77 78 /* 79 void G4RPGPionInelastic::printCrossSections() const 80 { 81 G4cout << " pi+ p total cross sections (mb) " << G4endl; 82 for (G4int i = 0; i < 5; i++) { 83 G4int istart = i*6; 84 G4int istop = istart + 6; 85 for (G4int t = istart; t < istop; t++) G4cout << pipPtot[t] << " " ; 86 G4cout << G4endl; 87 } 88 G4cout << G4endl; 89 90 G4cout << " pi- p total cross sections (mb) " << G4endl; 91 for (G4int i = 0; i < 5; i++) { 92 G4int istart = i*6; 93 G4int istop = istart + 6; 94 for (G4int t = istart; t < istop; t++) G4cout << pimPtot[t] << " " ; 95 G4cout << G4endl; 96 } 97 } 98 */ 74 99 75 100 -
trunk/source/processes/hadronic/models/theo_high_energy/History
r962 r1055 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 29-Apr-2009 M.Kosov had-theo-HE-V09-02-02 18 - Quasi Elastic part is made more used in QGSC at low energies to improve 19 the performance of QGSC at low energies 16 20 17 21 8-Apr-2008 G.Folger had-theo-HE-V09-01-01 -
trunk/source/processes/hadronic/models/theo_high_energy/src/G4QuasiElasticChannel.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4QuasiElasticChannel.cc,v 1. 4 2008/04/24 13:26:19 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4QuasiElasticChannel.cc,v 1.7 2009/04/09 08:28:42 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 31 31 // Author : Gunter Folger March 2007 32 // Modified by Mikhail Kossov. Apr2009, E/M conservation: ResidualNucleus is added (ResNuc) 32 33 // Class Description 33 34 // Final state production model for theoretical models of hadron inelastic … … 42 43 43 44 44 #include "G4HadTmpUtil.hh" //lrint45 #include "G4HadTmpUtil.hh" //lrint 45 46 46 47 //#define debug_scatter … … 48 49 G4QuasiElasticChannel::G4QuasiElasticChannel() 49 50 { 50 theQuasiElastic=G4QuasiFreeRatios::GetPointer();51 theQuasiElastic=G4QuasiFreeRatios::GetPointer(); 51 52 } 52 53 … … 55 56 56 57 G4double G4QuasiElasticChannel::GetFraction(G4Nucleus &theNucleus, 57 const G4DynamicParticle & thePrimary)58 const G4DynamicParticle & thePrimary) 58 59 { 59 std::pair<G4double,G4double> ratios; 60 ratios=theQuasiElastic->GetRatios(thePrimary.GetTotalMomentum(), 61 thePrimary.GetDefinition()->GetPDGEncoding(), 62 G4lrint(theNucleus.GetZ()), 63 G4lrint(theNucleus.GetN()-theNucleus.GetZ())); 64 #ifdef debug_getFraction 65 G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <<ratios.second 66 << " = " << ratios.first*ratios.second << G4endl; 60 std::pair<G4double,G4double> ratios; 61 #ifdef debug_scatter 62 G4cout << "G4QuasiElasticChannel:: P=" << thePrimary.GetTotalMomentum() 63 << ", pPDG=" << thePrimary.GetDefinition()->GetPDGEncoding() 64 << ", Z = " << G4lrint(theNucleus.GetZ()) 65 << ", N = " << G4lrint(theNucleus.GetN()-theNucleus.GetZ()) << G4endl; 67 66 #endif 68 69 return ratios.first*ratios.second; 67 ratios=theQuasiElastic->GetRatios(thePrimary.GetTotalMomentum(), 68 thePrimary.GetDefinition()->GetPDGEncoding(), 69 G4lrint(theNucleus.GetZ()), 70 G4lrint(theNucleus.GetN()-theNucleus.GetZ())); 71 #ifdef debug_scatter 72 G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <<ratios.second 73 << " = " << ratios.first*ratios.second << G4endl; 74 #endif 75 76 return ratios.first*ratios.second; 77 //return 0.; // Switch off quasielastic (temporary) M.K. 78 //return 1.; // Only quasielastic (temporary) M.K. (DANGEROSE! Crashes at A=1!) 70 79 } 71 80 72 81 G4KineticTrackVector * G4QuasiElasticChannel::Scatter(G4Nucleus &theNucleus, 73 const G4DynamicParticle & thePrimary)82 const G4DynamicParticle & thePrimary) 74 83 { 75 76 77 G4int A=G4lrint(theNucleus.GetN()); 78 // G4int Z=G4lrint(theNucleus.GetZ()); 79 // build Nucleus and choose random nucleon to scatter with 80 the3DNucleus.Init(theNucleus.GetN(),theNucleus.GetZ()); 81 const std::vector<G4Nucleon *> nucleons=the3DNucleus.GetNucleons(); 82 83 G4int index; 84 do { 85 index=G4lrint((A-1)*G4UniformRand()); 86 87 } while (index < 0 || index >= static_cast<G4int>(nucleons.size())); 88 89 // G4double an=G4UniformRand()*A; 90 G4ParticleDefinition * pDef= nucleons[index]->GetDefinition(); 91 84 G4int A=G4lrint(theNucleus.GetN()); 85 G4int Z=G4lrint(theNucleus.GetZ()); // M.K. ResNuc 86 // build Nucleus and choose random nucleon to scatter with 87 the3DNucleus.Init(theNucleus.GetN(),theNucleus.GetZ()); 92 88 #ifdef debug_scatter 93 G4cout << " neutron - proton? A, Z, an, pdg" <<" " 94 << A <<" "<<G4lrint(theNucleus.GetZ()) 95 << " "<<an <<" " << pDef->GetParticleName()<< G4endl; 89 G4cout<<"G4QElC::Scat: Before GetNucleons " << G4endl; 96 90 #endif 97 // G4LorentzVector pNucleon(G4ThreeVector(0,0,0),pDef->GetPDGMass()); 98 G4LorentzVector pNucleon=nucleons[index]->Get4Momentum(); 99 100 std::pair<G4LorentzVector,G4LorentzVector> result; 101 102 result=theQuasiElastic->Scatter(pDef->GetPDGEncoding(),pNucleon, 103 thePrimary.GetDefinition()->GetPDGEncoding(), 104 thePrimary.Get4Momentum()); 105 106 if (result.first.e() == 0.) 107 { 108 G4cout << "Warning - G4QuasiElasticChannel::Scatter no scattering" << G4endl; 109 return 0; //no scatter 110 } 91 const std::vector<G4Nucleon *> nucleons=the3DNucleus.GetNucleons(); 92 G4double targetNucleusMass=the3DNucleus.GetMass(); // M.K. ResNuc 93 #ifdef debug_scatter 94 G4cout<<"G4QElC::Scat: targetMass = " << targetNucleusMass << G4endl; 95 #endif 96 G4LorentzVector targetNucleus4Mom(0.,0.,0.,targetNucleusMass); // M.K. ResNuc 97 G4int index; 98 do 99 { 100 index=G4lrint((A-1)*G4UniformRand()); 101 } while (index < 0 || index >= static_cast<G4int>(nucleons.size())); 102 #ifdef debug_scatter 103 G4cout<<"G4QElC::Scat: index = " << index << G4endl; 104 #endif 105 G4ParticleDefinition * pDef= nucleons[index]->GetDefinition(); 106 G4int resA=A-1; // M.K. ResNuc 107 G4int resZ=Z-static_cast<int>(pDef->GetPDGCharge()); // M.K. ResNuc 108 G4ParticleDefinition* resDef=G4Neutron::Neutron(); // Resolve t-p=nn problem M.K. ResNuc 109 G4double residualNucleusMass=resDef->GetPDGMass(); // M.K. ResNuc 110 if(resZ) 111 { 112 resDef=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ);// M.K. ResNuc 113 residualNucleusMass=resDef->GetPDGMass(); // M.K. ResNuc 114 } 115 else residualNucleusMass*=resA; // resA=resN M.K. ResNuc 116 #ifdef debug_scatter 117 G4cout<<"G4QElChan::Scatter: neutron - proton? A ="<<A<<", Z="<<Z<<", projName=" 118 <<pDef->GetParticleName()<<G4endl; 119 #endif 120 // G4LorentzVector pNucleon(G4ThreeVector(0,0,0),pDef->GetPDGMass()); 121 G4LorentzVector pNucleon=nucleons[index]->Get4Momentum(); 122 G4double residualNucleusEnergy=std::sqrt(residualNucleusMass*residualNucleusMass+ 123 pNucleon.vect().mag2()); // M.K. ResNuc 124 pNucleon.setE(targetNucleusMass-residualNucleusEnergy); // M.K. ResNuc 125 G4LorentzVector residualNucleus4Mom=targetNucleus4Mom-pNucleon; // M.K. ResNuc 126 127 std::pair<G4LorentzVector,G4LorentzVector> result; 128 129 result=theQuasiElastic->Scatter(pDef->GetPDGEncoding(),pNucleon, 130 thePrimary.GetDefinition()->GetPDGEncoding(), 131 thePrimary.Get4Momentum()); 132 G4LorentzVector scatteredHadron4Mom=result.second; // M.K. ResNuc 133 if (result.first.e() <= 0.) 134 { 135 //G4cout << "Warning - G4QuasiElasticChannel::Scatter no scattering" << G4endl; 136 //return 0; //no scatter 137 G4LorentzVector scatteredHadron4Mom=thePrimary.Get4Momentum(); // M.K. ResNuc 138 residualNucleus4Mom=G4LorentzVector(0.,0.,0.,targetNucleusMass); // M.K. ResNuc 139 resDef=G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z); // M.K. ResNuc 140 } 111 141 112 142 #ifdef debug_scatter 113 G4LorentzVector EpConservation=pNucleon+thePrimary.Get4Momentum()114 - result.first - result.second;115 if ( (EpConservation.vect().mag2() > 0.01*MeV*MeV )116 ||(std::abs(EpConservation.e()) > 0.1 * MeV ) )117 {118 G4cout << "Warning - G4QuasiElasticChannel::Scatter E-p non conservation : "119 << EpConservation << G4endl;120 }143 G4LorentzVector EpConservation=pNucleon+thePrimary.Get4Momentum() 144 - result.first - result.second; 145 if ( (EpConservation.vect().mag2() > .01*MeV*MeV ) 146 || (std::abs(EpConservation.e()) > 0.1 * MeV ) ) 147 { 148 G4cout << "Warning - G4QuasiElasticChannel::Scatter E-p non conservation : " 149 << EpConservation << G4endl; 150 } 121 151 #endif 122 152 123 G4KineticTrackVector * ktv; 124 ktv=new G4KineticTrackVector(); 125 G4KineticTrack * sPrim=new G4KineticTrack(thePrimary.GetDefinition(), 126 0.,G4ThreeVector(0), result.second); 127 ktv->push_back(sPrim); 128 G4KineticTrack * sNuc=new G4KineticTrack(pDef, 129 0.,G4ThreeVector(0), result.first); 130 ktv->push_back(sNuc); 131 153 G4KineticTrackVector * ktv; 154 ktv=new G4KineticTrackVector(); 155 G4KineticTrack * sPrim=new G4KineticTrack(thePrimary.GetDefinition(), 156 0.,G4ThreeVector(0), scatteredHadron4Mom); 157 ktv->push_back(sPrim); 158 if (result.first.e() > 0.) 159 { 160 G4KineticTrack * sNuc=new G4KineticTrack(pDef, 0.,G4ThreeVector(0), result.first); 161 ktv->push_back(sNuc); 162 } 163 if(resZ || resA==1) // For the only neutron or for tnuclei with Z>0 M.K. ResNuc 164 { 165 G4KineticTrack * rNuc=new G4KineticTrack(resDef, 166 0.,G4ThreeVector(0), residualNucleus4Mom); // M.K. ResNuc 167 ktv->push_back(rNuc); // M.K. ResNuc 168 } 169 else // The residual nucleus consists of only neutrons M.K. ResNuc 170 { 171 residualNucleus4Mom/=resA; // Split 4-mom of A*n system equally M.K. ResNuc 172 for(G4int in=0; in<resA; in++) // Loop over neutrons in A*n system. M.K. ResNuc 173 { 174 G4KineticTrack* rNuc=new G4KineticTrack(resDef, 175 0.,G4ThreeVector(0), residualNucleus4Mom); // M.K. ResNuc 176 ktv->push_back(rNuc); // M.K. ResNuc 177 } 178 } 132 179 #ifdef debug_scatter 133 G4cout << " scattered Nucleon : " << result.first << " mass "<<result.first.mag() << G4endl;134 G4cout << " scattered Project : " << result.second << " mass " <<result.second.mag()<< G4endl;180 G4cout<<"G4QElC::Scat: Nucleon: "<<result.first <<" mass "<<result.first.mag() << G4endl; 181 G4cout<<"G4QElC::Scat: Project: "<<result.second<<" mass "<<result.second.mag()<< G4endl; 135 182 #endif 136 return ktv; 183 return ktv; 137 184 } -
trunk/source/processes/hadronic/models/theo_high_energy/src/G4TheoFSGenerator.cc
r1007 r1055 25 25 // 26 26 // 27 // $Id: G4TheoFSGenerator.cc,v 1. 9 2007/11/13 16:01:36 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4TheoFSGenerator.cc,v 1.11 2009/04/09 08:28:42 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // G4TheoFSGenerator … … 91 91 if ( theQuasielastic->GetFraction(theNucleus, *aPart) > G4UniformRand() ) 92 92 { 93 G4KineticTrackVector *result= theQuasielastic->Scatter(theNucleus, *aPart); 93 //G4cout<<"___G4TheoFSGenerator: before Scatter (1) QE=" << theQuasielastic<<G4endl; 94 G4KineticTrackVector *result= theQuasielastic->Scatter(theNucleus, *aPart); 95 //G4cout << "^^G4TheoFSGenerator: after Scatter (1) " << G4endl; 96 if (result) 97 { 98 for(unsigned int i=0; i<result->size(); i++) 99 { 100 G4DynamicParticle * aNew = 101 new G4DynamicParticle(result->operator[](i)->GetDefinition(), 102 result->operator[](i)->Get4Momentum().e(), 103 result->operator[](i)->Get4Momentum().vect()); 104 theParticleChange->AddSecondary(aNew); 105 delete result->operator[](i); 106 } 107 delete result; 108 109 } else 110 { 111 theParticleChange->SetStatusChange(isAlive); 112 theParticleChange->SetEnergyChange(thePrimary.GetKineticEnergy()); 113 theParticleChange->SetMomentumChange(thePrimary.Get4Momentum().vect().unit()); 114 115 } 116 return theParticleChange; 117 } 118 } 119 if ( theProjectileDiffraction) { 120 121 if ( theProjectileDiffraction->GetFraction(theNucleus, *aPart) > G4UniformRand() ) 122 // strictly, this returns fraction on inelastic, so quasielastic should 123 // already be substracted, ie. quasielastic should always be used 124 // before diffractive 125 { 126 //G4cout << "____G4TheoFSGenerator: before Scatter (2) " << G4endl; 127 G4KineticTrackVector *result= theProjectileDiffraction->Scatter(theNucleus, *aPart); 128 //G4cout << "^^^^G4TheoFSGenerator: after Scatter (2) " << G4endl; 94 129 if (result) 95 130 { … … 115 150 } 116 151 } 117 if ( theProjectileDiffraction) { 118 119 if ( theProjectileDiffraction->GetFraction(theNucleus, *aPart) > G4UniformRand() ) 120 // strictly, this returns fraction on inelastic, so quasielastic should 121 // already be substracted, ie. quasielastic should always be used 122 // before diffractive 123 { 124 G4KineticTrackVector *result= theProjectileDiffraction->Scatter(theNucleus, *aPart); 125 if (result) 126 { 127 for(unsigned int i=0; i<result->size(); i++) 128 { 129 G4DynamicParticle * aNew = 130 new G4DynamicParticle(result->operator[](i)->GetDefinition(), 131 result->operator[](i)->Get4Momentum().e(), 132 result->operator[](i)->Get4Momentum().vect()); 133 theParticleChange->AddSecondary(aNew); 134 delete result->operator[](i); 135 } 136 delete result; 137 138 } else 139 { 140 theParticleChange->SetStatusChange(isAlive); 141 theParticleChange->SetEnergyChange(thePrimary.GetKineticEnergy()); 142 theParticleChange->SetMomentumChange(thePrimary.Get4Momentum().vect().unit()); 143 144 } 145 return theParticleChange; 146 } 147 } 148 152 //G4cout << "____G4TheoFSGenerator: before Scatter (3) " << G4endl; 149 153 G4KineticTrackVector * theInitialResult = 150 154 theHighEnergyGenerator->Scatter(theNucleus, *aPart); 151 155 //G4cout << "^^^^G4TheoFSGenerator: after Scatter (3) " << G4endl; 152 156 153 157 G4ReactionProductVector * theTransportResult = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
