Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -7,7 +7,7 @@
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt 76311 2013-11-08 13:56:12Z gcosmo $
# $Id: CMakeLists.txt 82626 2014-07-01 09:32:09Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -24,7 +24,7 @@ add_subdirectory(inclxx)
add_subdirectory(lend)
add_subdirectory(management)
add_subdirectory(neutron_hp)
#add_subdirectory(particle_hp)
add_subdirectory(particle_hp)
add_subdirectory(parton_string)
add_subdirectory(lepto_nuclear)
add_subdirectory(pre_equilibrium)
+2 -2
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile 76311 2013-11-08 13:56:12Z gcosmo $
# $Id: GNUmakefile 82626 2014-07-01 09:32:09Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for hadronic models library. G.Folger 10-Dec-97
# --------------------------------------------------------------
@@ -29,7 +29,7 @@ SUBDIRS += inclxx/interface
SUBDIRS += lend
SUBDIRS += management
SUBDIRS += neutron_hp
#SUBDIRS += particle_hp
SUBDIRS += particle_hp
SUBDIRS += lepto_nuclear
SUBDIRS += parton_string/diffraction
SUBDIRS += parton_string/hadronization
+13 -1
View File
@@ -3,7 +3,7 @@
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
$Id: History 76294 2013-11-08 13:13:27Z gcosmo $
$Id: History 85987 2014-11-06 15:37:25Z gcosmo $
---------------------------------------------------------------------
History file for the ABLA evaporation/fission model
@@ -16,6 +16,18 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
6 November 2014 - Davide Mancusi (hadr-abla-V10-00-02)
--------------------------------------------------
- Fix a Coverity warning.
22 May 2014 - Davide Mancusi (hadr-abla-V10-00-01)
--------------------------------------------------
- Fix some Coverity warnings.
16 April 2014 - Davide Mancusi (hadr-abla-V10-00-00)
--------------------------------------------------
- Add model-description methods to the interface.
6 November 2013 - Davide Mancusi (hadr-abla-V09-06-03)
--------------------------------------------------
- Fix segfault on the production of exotic fragments.
@@ -72,6 +72,12 @@ public:
*/
~G4Abla();
/// \brief Dummy copy constructor
G4Abla(G4Abla const &other);
/// \brief Dummy assignment operator
G4Abla &operator=(G4Abla const &other);
/**
* Set verbosity level.
*/
@@ -57,6 +57,9 @@ public:
return NULL;
}
virtual void ModelDescription(std::ostream& outFile) const;
virtual void DeExciteModelDescription(std::ostream& outFile) const;
private:
G4VarNtp *ablaResult;
G4Volant *volant;
@@ -3552,16 +3552,16 @@ G4double G4Abla::haz(G4int k)
// longer exactly the same!
x = G4AblaRandom::flat();
for(G4int iRandom = 0; iRandom < pSize; iRandom++) {
int nTries = 0;
do { // The CERNLIB random number generator in the fortran code
// returns random numbers between the open interval (0,1).
int nTries = 0;
p[iRandom] = G4AblaRandom::flat();
nTries++;
if(nTries > 100) break;
// returns random numbers between the open interval (0,1).
p[iRandom] = G4AblaRandom::flat();
nTries++;
if(nTries > 100) break;
} while(p[iRandom] <= 0.0 || p[iRandom] >= 1.0);
}
int nTries = 0;
do { // The CERNLIB random number generator in the fortran code
int nTries = 0;
// returns random numbers between the open interval (0,1).
a = G4AblaRandom::flat();
nTries++;
@@ -3573,8 +3573,8 @@ G4double G4Abla::haz(G4int k)
i = nint(100*a)+1;
fhaz = p[i];
int nTries = 0;
do { // The CERNLIB random number generator in the fortran code
int nTries = 0;
// returns random numbers between the open interval (0,1).
a = G4AblaRandom::flat();
nTries++;
@@ -140,4 +140,17 @@ G4ReactionProduct *G4AblaInterface::toG4Particle(G4int A, G4int Z,
return r;
}
void G4AblaInterface::ModelDescription(std::ostream& outFile) const {
outFile << "ABLA V3 does not provide an implementation of the ApplyYourself method!\n\n";
}
void G4AblaInterface::DeExciteModelDescription(std::ostream& outFile) const {
outFile << "ABLA V3 is a statistical model for nuclear de-excitation. It simulates\n"
<< "evaporation of neutrons, protons and alpha particles, as well as fission\n"
<< "where applicable. The code included in Geant4 is a C++ translation of the\n"
<< "original Fortran code. More details about the physics are available in the\n"
<< "the Geant4 Physics Reference Manual and in the reference articles.\n\n"
<< "References: A.R. Junghans et al., Nucl. Phys. A629 (1998) 635;\n"
<< " J. Benlliure et al., Nucl. Phys. A628 (1998) 458.\n\n"; }
#endif // ABLAXX_IN_GEANT4_MODE
@@ -13,6 +13,10 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
30-Oct-2014 Vladimir Ivanchenko (had-abrasion-V10-00-00)
----------------------------------------------------
- G4WilsonAbrasionModel - use GetZ_asInt() and GetA_asInt()
20-Sep-2012 Gabriele Cosmo (had-abrasion-V09-05-03)
----------------------------------------------------
- Explicitly use inclusion of headers for system of units and physical
@@ -637,7 +637,7 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
if (fragmentP !=NULL)
{
G4ReactionProductVector *products = NULL;
if (fragmentP->GetZ() != fragmentP->GetA())
if (fragmentP->GetZ_asInt() != fragmentP->GetA_asInt())
products = theExcitationHandler->BreakItUp(*fragmentP);
else
products = theExcitationHandlerx->BreakItUp(*fragmentP);
@@ -674,7 +674,7 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
if (fragmentT != NULL)
{
G4ReactionProductVector *products = NULL;
if (fragmentT->GetZ() != fragmentT->GetA())
if (fragmentT->GetZ_asInt() != fragmentT->GetA_asInt())
products = theExcitationHandler->BreakItUp(*fragmentT);
else
products = theExcitationHandlerx->BreakItUp(*fragmentT);
@@ -13,9 +13,62 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
11-November 2014 Gunter Folger had-binary-V10-00-11
- BinaryLightReaction: Momentum correction wrong in case of no Fragment, but
primary projectile nucleon(s) in final state.
Example: d + Pb -> X, where neutron or proton of deuteron did not interact.
4-November 2014 Gunter Folger had-binary-V10-00-10
- remove left over use of SetA/SetZ.
- Binary cascade: improve handling of destroyed nucleus solving issues with
light nuclei in BinaryLightIonReaction, like He in H.
final state in case target nucleus is destroyed made to conserve
energy and momentum, taking into account momentum transfered to nucleus,
and finally forcing conservation.
- BinaryLightIonreaction: handle currentA/Z consistant with list of spectators.
added optional debugging output.
2 June 2014 Gunter Folger had-binary-V10-00-09
- G4NeutronField, G4ProtonField: add static cast to correct
compilation warning.
30 May 2014 Gunter Folger had-binary-V10-00-08
- G4NeutronField, G4ProtonField: remove superfluous const_casts and use
unsigned int for index, removing need for check on negative index.
28 May 2014 Gunter Folger had-binary-V10-00-07
- G4BinaryCasacde: Improve calculation of mass, and of correction for outgoing
particles by always using GetIon() method. IN GetIonMass() return 0 when A==0
(Addresses crash for p+d seen in d+H in BLIC)
23 May 2014 Andrea Dotti had-binary-V10-00-06
- Adding protection to G4NeutronField that was missing
23 May 2014 Gunter Folger had-binary-V10-00-05
- G4NeutronField, G4ProtonField: add protection for position far outside
nucleus, resulting in negative index.
22 April 2014 Gunter Folger had-binary-V10-00-04
- move back to use GetDefinition() method, as this now returns const.
2 April 2014 Gunter Folger had-binary-V10-00-03
- extend ModelDescription to cover de-exciation model.
20 Feb 2014 Gunter Folger had-binary-V10-00-02
- make pointers to G4ParticleDefinition use const.
31 Jan 2014 Gunter Folger had-binary-V10-00-01
- G4BinaryLightIoncascade::FuseNucleiAndPrompound():
protect at low energy: available energy is not sufficient to create a
fragment.
16 Jan 2014 Gunter Folger had-binary-V10-00-00
- bring back corrected change for coverity, rejected previously in
tag had-binary-V09-06-07.
Add printout of particle name in check for valid type of projectile
in G4BinaryCasacde::ApplyYourself()
20 Sep 2013 Gunter Folger had-binary-V09-06-08
- revert change introduced for coverity fix, rev 72276, in tag
had-binary-V09-06-07. The tag was rejected, and in teh ways for
had-binary-V09-06-07. The tag was rejected, and in the way for
unrelated fixes.
Remove commented lines for G4Fragment.SetParticleDefinition()
@@ -27,7 +80,7 @@ code and to keep track of all tags.
10 Sep 2013 Gunter Folger
- G4BinaryCascade.cc: fix typo, bug report 1511.
12 Jul 2013 Gunter Folger had-binary-V09-06-07
12 Jul 2013 Gunter Folger had-binary-V09-06-07 (tag rejected)
- G4BinaryLightIonReaction: fix for coverity report on small leak
9 May 2013 John Apostolakis had-binary-V09-06-06 Retag
@@ -176,7 +176,8 @@ private:
G4KineticTrackVector * products);
void DebugApplyCollision(G4CollisionInitialState * collision,
G4KineticTrackVector *products);
G4bool DebugEpConservation(const G4HadProjectile & aTrack, G4ReactionProductVector* products);
G4bool DebugFinalEpConservation(const G4HadProjectile & aTrack, G4ReactionProductVector* products);
G4bool DebugEpConservation(const G4String where);
G4bool CheckChargeAndBaryonNumber(G4String where);
private:
@@ -211,7 +212,7 @@ private:
G4LorentzRotation precompoundLorentzboost;
G4double theOuterRadius;
G4bool thePrimaryEscape;
G4ParticleDefinition * thePrimaryType;
const G4ParticleDefinition * thePrimaryType;
G4ThreeVector theMomentumTransfer;
@@ -174,8 +174,8 @@ G4bool G4Absorber::FindAbsorbers(G4KineticTrack & kt,
G4bool G4Absorber::FindProducts(G4KineticTrack & kt)
{
// Choose the products type
G4ParticleDefinition * prod1;
G4ParticleDefinition * prod2;
const G4ParticleDefinition * prod1;
const G4ParticleDefinition * prod2;
G4KineticTrack * abs1 = (*theAbsorbers)[0];
G4KineticTrack * abs2 = (*theAbsorbers)[1];
@@ -64,7 +64,7 @@ G4double G4AntiProtonField::GetField(const G4ThreeVector & aPosition)
// Field is 0 out of the nucleus!
if(aPosition.mag() >= radius) return 0.0;
G4ParticleDefinition *anAntiProton = G4AntiProton::AntiProtonDefinition();
const G4ParticleDefinition *anAntiProton = G4AntiProton::AntiProtonDefinition();
G4double antiProtonMass = anAntiProton->GetPDGMass();
G4int A = theNucleus->GetMassNumber();
@@ -67,6 +67,7 @@
#include <typeinfo>
// turn on general debugging info, and consistency checks
//#define debug_G4BinaryCascade 1
// more detailed debugging -- deprecated
@@ -83,18 +84,30 @@
//#define debug_BIC_DoTimeStep 1
//#define debug_BIC_CorrectBarionsOnBoundary 1
//#define debug_BIC_GetExcitationEnergy 1
//#define debug_BIC_DeexcitationProducts 1
//#define debug_BIC_FinalNucleusMomentum 1
//#define debug_BIC_Final4Momentum 1
//#define debug_BIC_FillVoidnucleus 1
//#define debug_BIC_FindFragments 1
//#define debug_BIC_BuildTargetList 1
//#define debug_BIC_FindCollision 1
//#define debug_BIC_return 1
#if defined(debug_G4BinaryCascade)
//-------
//#if defined(debug_G4BinaryCascade)
#if 0
#define _CheckChargeAndBaryonNumber_(val) CheckChargeAndBaryonNumber(val)
//#define debugCheckChargeAndBaryonNumberverbose 1
#else
#define _CheckChargeAndBaryonNumber_(val)
#endif
//#if defined(debug_G4BinaryCascade)
#if 0
#define _DebugEpConservation(val) DebugEpConservation(val)
//#define debugCheckChargeAndBaryonNumberverbose 1
#else
#define _DebugEpConservation(val)
#endif
//
// C O N S T R U C T O R S A N D D E S T R U C T O R S
//
@@ -137,7 +150,7 @@ G4VIntraNuclearTransportModel("Binary Cascade", ptr)
thePrimaryEscape = true;
thePrimaryType = 0;
SetEnergyMomentumCheckLevels(1*perCent, 1*MeV);
SetEnergyMomentumCheckLevels(1.0*perCent, 1.0*MeV);
// init data members
currentA=currentZ=0;
@@ -178,7 +191,23 @@ void G4BinaryCascade::ModelDescription(std::ostream& outFile) const
<< "are then propagated through the nuclear potential along curved\n"
<< "trajectories until they re-interact or leave the nucleus.\n"
<< "This model is valid for incident pions up to 1.5 GeV and\n"
<< "nucleons up to 10 GeV.\n";
<< "nucleons up to 10 GeV.\n"
<< "The remaining excited nucleus is handed on to ";
if (theDeExcitation) // pre-compound
{
outFile << theDeExcitation->GetModelName() << " : \n ";
theDeExcitation->DeExciteModelDescription(outFile);
}
else if (theExcitationHandler) // de-excitation
{
outFile << "G4ExcitationHandler"; //theExcitationHandler->GetModelName();
theExcitationHandler->ModelDescription(outFile);
}
else
{
outFile << "void.\n";
}
outFile<< " \n";
}
void G4BinaryCascade::PropagateModelDescription(std::ostream& outFile) const
{
@@ -194,7 +223,23 @@ void G4BinaryCascade::PropagateModelDescription(std::ostream& outFile) const
<< "are in turn propagated through the nuclear potential along curved\n"
<< "trajectories until they re-interact or leave the nucleus.\n"
<< "This model is valid for pions up to 1.5 GeV and\n"
<< "nucleons up to about 3.5 GeV.\n";
<< "nucleons up to about 3.5 GeV.\n"
<< "The remaining excited nucleus is handed on to ";
if (theDeExcitation) // pre-compound
{
outFile << theDeExcitation->GetModelName() << " : \n ";
theDeExcitation->DeExciteModelDescription(outFile);
}
else if (theExcitationHandler) // de-excitation
{
outFile << "G4ExcitationHandler"; //theExcitationHandler->GetModelName();
theExcitationHandler->ModelDescription(outFile);
}
else
{
outFile << "void.\n";
}
outFile<< " \n";
}
//----------------------------------------------------------------------------
@@ -212,7 +257,7 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
if(getenv("BCDEBUG") ) G4cerr << " ######### Binary Cascade Reaction starts ######### "<< G4endl;
G4LorentzVector initial4Momentum = aTrack.Get4Momentum();
G4ParticleDefinition * definition = const_cast<G4ParticleDefinition *>(aTrack.GetDefinition());
const G4ParticleDefinition * definition = aTrack.GetDefinition();
if(initial4Momentum.e()-initial4Momentum.m()<theBCminP &&
( definition==G4Neutron::NeutronDefinition() || definition==G4Proton::ProtonDefinition() ) )
@@ -235,7 +280,8 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
definition!=G4PionPlus::PionPlusDefinition() &&
definition!=G4PionMinus::PionMinusDefinition() )
{
G4cerr << "You are using G4BinaryCascade for projectiles other than nucleons or pions."<<G4endl;
G4cerr << "You are trying to use G4BinaryCascade with " <<definition->GetParticleName()<<" as projectile."<<G4endl;
G4cerr << "G4BinaryCascade should not be used for projectiles other than nucleons or pions."<<G4endl;
G4cerr << "If you want to continue, please switch on the developer environment: "<<G4endl;
G4cerr << "setenv I_Am_G4BinaryCascade_Developer 1 "<<G4endl<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade - used for unvalid particle type - Fatal");
@@ -304,7 +350,7 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
theParticleChange.AddSecondary(aNew);
}
// DebugEpConservation(track, products);
//DebugFinalEpConservation(aTrack, products);
} else { // no interaction, return primary
@@ -339,6 +385,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
theOuterRadius = the3DNucleus->GetOuterRadius();
theCurrentTime=0;
theProjectile4Momentum=G4LorentzVector(0,0,0,0);
theMomentumTransfer=G4ThreeVector(0,0,0);
// build theSecondaryList, theProjectileList and theCapturedList
ClearAndDestroy(&theCapturedList);
ClearAndDestroy(&theSecondaryList);
@@ -377,6 +424,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
// check baryon and charge ...
_CheckChargeAndBaryonNumber_("lateparticles");
_DebugEpConservation(" be4 findcollisions");
// if called stand alone find first collisions
FindCollisions(&theSecondaryList);
@@ -398,17 +446,14 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
G4bool haveProducts = false;
G4int collisionCount=0;
theMomentumTransfer=G4ThreeVector(0,0,0);
while(theCollisionMgr->Entries() > 0 && currentZ)
{
if(Absorb()) { // absorb secondaries, pions only
if(Absorb()) { // absorb secondaries, pions only
haveProducts = true;
}
if(Capture()) { // capture secondaries, nucleons only
haveProducts = true;
}
_CheckChargeAndBaryonNumber_("absorbed");
if(Capture()) { // capture secondaries, nucleons only
haveProducts = true;
}
_CheckChargeAndBaryonNumber_("captured");
// propagate to the next collision if any (collisions could have been deleted
// by previous absorption or capture)
@@ -429,6 +474,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
nextCollision = 0;
}
}
//_DebugEpConservation("Stepped");
if( nextCollision )
{
@@ -437,7 +483,8 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
//G4cerr << "ApplyCollision success " << G4endl;
haveProducts = true;
collisionCount++;
_CheckChargeAndBaryonNumber_("ApplyCollision");
//_CheckChargeAndBaryonNumber_("ApplyCollision");
//_DebugEpConservation("ApplyCollision");
} else {
//G4cerr << "ApplyCollision failure " << G4endl;
@@ -449,9 +496,14 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
//--------- end of while on Collisions
//G4cout << "currentZ @ end loop " << currentZ << G4endl;
if ( ! currentZ ){
G4int nProtons(0);
for(iter = theTargetList.begin(); iter != theTargetList.end(); ++iter)
{
if ( (*iter)->GetDefinition() == G4Proton::Proton() ) ++nProtons;
}
if ( ! theTargetList.size() || ! nProtons ){
// nucleus completely destroyed, fill in ReactionProductVector
products = FillVoidNucleusProducts(products);
products = FillVoidNucleusProducts(products);
#ifdef debug_BIC_return
G4cout << "return @ Z=0 after collision loop "<< G4endl;
PrintKTVector(&theSecondaryList,std::string(" theSecondaryList"));
@@ -463,8 +515,10 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
G4cout << " Mom Transfered to nucleus : " << theMomentumTransfer << " " << theMomentumTransfer.mag() << G4endl;
PrintKTVector(&theFinalState,std::string(" FinalState uncorrected"));
G4cout << "returned products: " << products->size() << G4endl;
_CheckChargeAndBaryonNumber_("destroyed Nucleus");
_DebugEpConservation("destroyed Nucleus");
#endif
// @@GF FixMe cannot return here.
return products;
}
@@ -494,6 +548,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
#endif
StepParticlesOut();
_DebugEpConservation("stepped out");
if ( theSecondaryList.size() > 0 )
@@ -552,6 +607,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
ExcitationEnergy=GetExcitationEnergy();
} while ( ++ntry < maxtry && ExcitationEnergy < 0 );
}
_DebugEpConservation("corrected");
#ifdef debug_BIC_Propagate_finals
PrintKTVector(&theFinalState,std::string(" FinalState corrected"));
@@ -565,24 +621,22 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
if ( ExcitationEnergy < 0. )
{
// if ( ExcitationEnergy < 0. )
{
//#ifdef debug_G4BinaryCascade
// G4cerr << "G4BinaryCascade-Warning: negative excitation energy ";
// G4cerr <<ExcitationEnergy<<G4endl;
// PrintKTVector(&theFinalState,std::string("FinalState"));
// PrintKTVector(&theCapturedList,std::string("captured"));
// G4cout << "negative ExE:Final 4Momentum .mag: " << GetFinal4Momentum()
// << " "<< GetFinal4Momentum().mag()<< G4endl
// << "negative ExE:FinalNucleusMom .mag: " << GetFinalNucleusMomentum()
// << " "<< GetFinalNucleusMomentum().mag()<< G4endl;
//#endif
}
#ifdef debug_G4BinaryCascade
G4cerr << "G4BinaryCascade-Warning: negative excitation energy ";
G4cerr <<ExcitationEnergy<<G4endl;
PrintKTVector(&theFinalState,std::string("FinalState"));
PrintKTVector(&theCapturedList,std::string("captured"));
G4cout << "negative ExE:Final 4Momentum .mag: " << GetFinal4Momentum()
<< " "<< GetFinal4Momentum().mag()<< G4endl
<< "negative ExE:FinalNucleusMom .mag: " << GetFinalNucleusMomentum()
<< " "<< GetFinalNucleusMomentum().mag()<< G4endl;
#endif
#ifdef debug_BIC_return
G4cout << " negative Excitation E return empty products " << products << G4endl;
G4cout << "return 4, excit < 0 "<< G4endl;
#endif
ClearAndDestroy(products);
//G4cout << " negative Excitation E return empty products " << products << G4endl;
#ifdef debug_BIC_return
G4cout << "return 4, excit < 0 "<< G4endl;
#endif
return products; // return empty products- FIXME
}
@@ -590,6 +644,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
G4DecayKineticTracks decay(&theFinalState);
_DebugEpConservation("decayed");
products= ProductsAddFinalState(products, theFinalState);
@@ -601,7 +656,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
thePrimaryEscape = true;
#ifdef debug_BIC_return
G4cout << "return @end, all ok "<< G4endl;
G4cout << "BIC: return @end, all ok "<< G4endl;
//G4cout << " return products " << products << G4endl;
#endif
@@ -620,7 +675,7 @@ G4double G4BinaryCascade::GetExcitationEnergy()
if ( (currentA - finalA) != 0 || (currentZ - finalZ) != 0 )
{
G4cerr << "G4BIC:GetExcitationEnergy(): Nucleon counting error current/final{A,Z} "
<< currentA << " " << finalA << " "<< currentZ << " " << finalZ << G4endl;
<< "("<< currentA << "," << finalA << ") ("<< currentZ << "," << finalZ << ")" << G4endl;
}
#endif
@@ -629,7 +684,7 @@ G4double G4BinaryCascade::GetExcitationEnergy()
G4double nucleusMass(0);
if(currentZ>.5)
{
nucleusMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(currentZ,currentA);
nucleusMass = GetIonMass(currentZ,currentA);
}
else if (currentZ==0 ) // Uzhi && currentA==1 ) // Uzhi
{ // Uzhi
@@ -684,8 +739,7 @@ G4double G4BinaryCascade::GetExcitationEnergy()
G4double initialExc(0);
if(Z>.5)
{
initialExc = theInitial4Mom.mag()-
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z, A);
initialExc = theInitial4Mom.mag()- GetIonMass(Z, A);
G4cout << "GetExcitationEnergy: Initial nucleus A Z " << A << " " << Z << " " << initialExc << G4endl;
}
}
@@ -717,13 +771,13 @@ void G4BinaryCascade::BuildTargetList()
ClearAndDestroy(&theTargetList); // clear theTargetList before rebuilding
G4Nucleon * nucleon;
G4ParticleDefinition * definition;
const G4ParticleDefinition * definition;
G4ThreeVector pos;
G4LorentzVector mom;
// if there are nucleon hit by higher energy models, then SUM(momenta) != 0
initialZ=the3DNucleus->GetCharge();
initialA=the3DNucleus->GetMassNumber();
initial_nuclear_mass=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(initialZ,initialA);
initial_nuclear_mass=GetIonMass(initialZ,initialA);
theInitial4Mom = G4LorentzVector(0,0,0,initial_nuclear_mass);
currentA=0;
currentZ=0;
@@ -754,7 +808,7 @@ void G4BinaryCascade::BuildTargetList()
massInNucleus = 0;
if(currentZ>.5)
{
massInNucleus = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(currentZ,currentA);
massInNucleus = GetIonMass(currentZ,currentA);
} else if (currentZ==0 && currentA>=1 )
{
massInNucleus = currentA * G4Neutron::Neutron()->GetPDGMass();
@@ -871,9 +925,11 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
// if ( ExcitationEnergy >= 0 ) // closed by Uzhi
// { // closed by Uzhi
fragment = FindFragments();
if(fragment) // Uzhi
{ // Uzhi
if(fragment->GetA() >1.5) // Uzhi
if(fragment->GetA_asInt() >1) // Uzhi
{
pFragment=fragment->GetMomentum();
// G4cout << " going to preco with fragment 4 mom " << pFragment << G4endl;
@@ -887,7 +943,7 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
}
} else
{ // fragment->GetA() < 1.5, so a single proton, as a fragment must have Z>0
{ // fragment->GetA_asInt() <= 1, so a single proton, as a fragment must have Z>0
if (theTargetList.size() + theCapturedList.size() > 1 ) {
throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCasacde:: Invalid Fragment");
}
@@ -909,6 +965,24 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
precompoundProducts = DecayVoidNucleus();
}
#ifdef debug_BIC_DeexcitationProducts
G4LorentzVector fragment_momentum=GetFinalNucleusMomentum();
G4LorentzVector Preco_momentum;
if ( precompoundProducts )
{
std::vector<G4ReactionProduct *>::iterator j;
for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
{
G4LorentzVector pProduct((*j)->GetMomentum(),(*j)->GetTotalEnergy());
Preco_momentum += pProduct;
}
}
G4cout << "finalNuclMom / sum preco products" << fragment_momentum << " / " << Preco_momentum
<< " delta E "<< fragment_momentum.e() - Preco_momentum.e() << G4endl;
#endif
return precompoundProducts;
}
@@ -1004,6 +1078,9 @@ G4ReactionProductVector * G4BinaryCascade::ProductsAddFinalState(G4ReactionProdu
{
// fill in products the outgoing particles
size_t i(0);
#ifdef debug_BIC_Propagate_finals
G4LorentzVector mom_fs;
#endif
for(i = 0; i< fs.size(); i++)
{
G4KineticTrack * kt = fs[i];
@@ -1014,13 +1091,19 @@ G4ReactionProductVector * G4BinaryCascade::ProductsAddFinalState(G4ReactionProdu
products->push_back(aNew);
#ifdef debug_BIC_Propagate_finals
mom_fs += kt->Get4Momentum();
G4cout <<kt->GetDefinition()->GetParticleName();
G4cout << " Particle Ekin " << aNew->GetKineticEnergy();
G4cout << "final is " << kt->GetDefinition()->GetPDGStable() ? "stable" :
( kt->GetDefinition()->IsShortLived() ? "short lived " : "non stable") << G4endl;;
G4cout << ", is " << (kt->GetDefinition()->GetPDGStable() ? "stable" :
(kt->GetDefinition()->IsShortLived() ? "short lived " : "non stable")) ;
G4cout << G4endl;
#endif
}
#ifdef debug_BIC_Propagate_finals
G4cout << " Final state momentum " << mom_fs << G4endl;
#endif
return products;
}
//----------------------------------------------------------------------------
@@ -1038,11 +1121,11 @@ G4ReactionProductVector * G4BinaryCascade::ProductsAddPrecompound(G4ReactionProd
G4LorentzVector pProduct((*j)->GetMomentum(),(*j)->GetTotalEnergy());
pPreco+= pProduct;
#ifdef debug_BIC_Propagate_finals
G4cout << " pProduct be4 boost " <<pProduct << G4endl;
G4cout << "BIC: pProduct be4 boost " <<pProduct << G4endl;
#endif
pProduct *= precompoundLorentzboost;
#ifdef debug_BIC_Propagate_finals
G4cout << " pProduct aft boost " <<pProduct << G4endl;
G4cout << "BIC: pProduct aft boost " <<pProduct << G4endl;
#endif
pSumPreco += pProduct;
(*j)->SetTotalEnergy(pProduct.e());
@@ -1513,7 +1596,7 @@ G4bool G4BinaryCascade::CheckPauliPrinciple(G4KineticTrackVector * products)
const G4VNuclearDensity * density=the3DNucleus->GetNuclearDensity();
G4KineticTrackVector::iterator i;
G4ParticleDefinition * definition;
const G4ParticleDefinition * definition;
// ------ debug
G4bool myflag = true;
@@ -1634,8 +1717,7 @@ void G4BinaryCascade::StepParticlesOut()
{
nextCollision = theCollisionMgr->GetNextCollision();
timeToCollision = nextCollision->GetCollisionTime()-theCurrentTime;
G4cout << " NextCollision * , Time= " << nextCollision << " "
<<timeToCollision<< G4endl;
// G4cout << " NextCollision * , Time= " << nextCollision << " " <<timeToCollision<< G4endl;
}
if ( timeToCollision > minTimeStep )
{
@@ -1705,6 +1787,24 @@ void G4BinaryCascade::StepParticlesOut()
counter=0;
++countreset;
}
//G4cout << "currentZ @ end loop " << currentZ << G4endl;
if ( ! currentZ ){
// nucleus completely destroyed, fill in ReactionProductVector
// products = FillVoidNucleusProducts(products);
#ifdef debug_BIC_return
G4cout << "return @ Z=0 after collision loop "<< G4endl;
PrintKTVector(&theSecondaryList,std::string(" theSecondaryList"));
G4cout << "theTargetList size: " << theTargetList.size() << G4endl;
PrintKTVector(&theTargetList,std::string(" theTargetList"));
PrintKTVector(&theCapturedList,std::string(" theCapturedList"));
G4cout << " ExcitE be4 Correct : " <<GetExcitationEnergy() << G4endl;
G4cout << " Mom Transfered to nucleus : " << theMomentumTransfer << " " << theMomentumTransfer.mag() << G4endl;
PrintKTVector(&theFinalState,std::string(" FinalState uncorrected"));
// G4cout << "returned products: " << products->size() << G4endl;
#endif
}
}
// G4cerr <<"Finished capture loop "<<G4endl;
@@ -1735,7 +1835,7 @@ G4double G4BinaryCascade::CorrectShortlivedPrimaryForFermi(
std::vector<G4KineticTrack *>::iterator titer;
for ( titer=target_collection.begin() ; titer!=target_collection.end(); ++titer)
{
G4ParticleDefinition * aDef=(*titer)->GetDefinition();
const G4ParticleDefinition * aDef=(*titer)->GetDefinition();
G4int aCode=aDef->GetPDGEncoding();
G4ThreeVector aPos=(*titer)->GetPosition();
Efermi+= ((G4RKPropagation *)thePropagator)->GetField(aCode, aPos);
@@ -1775,9 +1875,10 @@ G4bool G4BinaryCascade::CorrectShortlivedFinalsForFermi(G4KineticTrackVector * p
{
return false;
}
// G4cout << " correct resonance from /to " << mom.e() << " / " << newEnergy<< G4endl;
G4ThreeVector mom3=std::sqrt(newEnergy2 - mass2) * mom.vect().unit();
(*res)->Set4Momentum(G4LorentzVector(mom3,newEnergy));
//G4cout << " correct resonance from /to " << mom.e() << " / " << newEnergy<<
// " 3mom from/to " << mom.vect() << " / " << mom3 << G4endl;
}
}
return true;
@@ -1841,8 +1942,8 @@ void G4BinaryCascade::CorrectFinalPandE()
#ifdef debug_BIC_CorrectFinalPandE
G4cout << "G4BinaryCascade::CorrectFinalPandE() : error! " << G4endl;
G4cout << "not enough mass to correct: mass, A,Z, mass(nucl), mass(finals) "
<< std::sqrt(s0-(m10+m20)*(m10+m20)) << " "
G4cout << "not enough mass to correct: mass^2, A,Z, mass(nucl), mass(finals) "
<< (s0-(m10+m20)*(m10+m20)) << " "
<< currentA << " " << currentZ << " "
<< m10 << " " << m20
<< G4endl;
@@ -2022,6 +2123,8 @@ G4bool G4BinaryCascade::DoTimeStep(G4double theTimeStep)
PrintKTVector(&theSecondaryList, std::string("DoTimeStep - secondaries aft trsprt"));
#endif
//_DebugEpConservation(" after stepping");
// Partclies which went INTO nucleus
G4KineticTrackVector * kt_gone_in = new G4KineticTrackVector;
@@ -2221,7 +2324,6 @@ G4KineticTrackVector* G4BinaryCascade::CorrectBarionsOnBoundary(
<< G4endl;
PrintKTVector(in,std::string("in be4 correction"));
#endif
for ( iter = in->begin(); iter != in->end(); ++iter)
{
if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
@@ -2243,8 +2345,8 @@ G4KineticTrackVector* G4BinaryCascade::CorrectBarionsOnBoundary(
}
#ifdef debug_BIC_CorrectBarionsOnBoundary
G4cout << " CorrectBarionsOnBoundary, aft, A, Z, sec-Z,A,m,m_in_nucleus "
<< currentA << " " << currentZ << " "
G4cout << " CorrectBarionsOnBoundary, aft, Z, A, sec-Z,A,m,m_in_nucleus "
<< currentZ << " " << currentA << " "
<< secondaryCharge_in << " " << secondaryBarions_in << " "
<< secondaryMass_in << " "
<< G4endl;
@@ -2281,7 +2383,7 @@ G4KineticTrackVector* G4BinaryCascade::CorrectBarionsOnBoundary(
currentA -=secondaryBarions_out;
currentZ -=secondaryCharge_out;
// G4cout << "CorrectBarionsOnBoundary,secondaryCharge_out, secondaryBarions_out"
// G4cout << "CorrectBarionsOnBoundary,secondaryCharge_out, secondaryBarions_out "
// << secondaryCharge_out << " "<< secondaryBarions_out << G4endl;
// a delta minus will do currentZ < 0 in light nuclei
@@ -2298,20 +2400,20 @@ G4KineticTrackVector* G4BinaryCascade::CorrectBarionsOnBoundary(
}
G4double mass_final=GetIonMass(currentZ,currentA);
G4double correction= mass_initial - mass_final - secondaryMass_out;
// G4cout << "G4BinaryCascade::CorrectBarionsOnBoundary() total out correction: " << correction << G4endl;
if (secondaries_out>1) correction /= secondaries_out;
#ifdef debug_BIC_CorrectBarionsOnBoundary
G4cout << "DoTimeStep,currentZ,currentA,"
<< "secondaries_out,"
<<"secondaryCharge_out,secondaryBarions_out,"
<<"energy correction,m_secondry,m_nucl_init,m_nucl_final "
<< " "<< currentZ << " "<< currentA <<" "
<< secondaries_out << " "
<< secondaryCharge_out<<" "<<secondaryBarions_out<<" "
<< correction << " "
<< secondaryMass_out << " "
<< mass_initial << " "
<< mass_final << " "
G4cout << "DoTimeStep,(current Z,A),"
<< "(secondaries out,Charge,Barions),"
<<"* energy correction,(m_secondry,m_nucl_init,m_nucl_final) "
<< "("<< currentZ << ","<< currentA <<") ("
<< secondaries_out << ","
<< secondaryCharge_out<<","<<secondaryBarions_out<<") * "
<< correction << " ("
<< secondaryMass_out << ", "
<< mass_initial << ", "
<< mass_final << ")"
<< G4endl;
PrintKTVector(out,std::string("out be4 correction"));
#endif
@@ -2356,8 +2458,8 @@ G4KineticTrackVector* G4BinaryCascade::CorrectBarionsOnBoundary(
<< secondaryCharge_out << " "<< secondaryBarions_out << " "<<
secondaryMass_out << " "
<< massInNucleus << " "
<< G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(currentZ,currentA)
<< " " << massInNucleus -G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(currentZ,currentA)
<< GetIonMass(currentZ,currentA)
<< " " << massInNucleus - GetIonMass(currentZ,currentA)
<< G4endl;
#endif
}
@@ -2417,10 +2519,10 @@ G4Fragment * G4BinaryCascade::FindFragments()
//debug
/*
* G4cout << " Fragment mass table / real "
* << G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z, a)
* << GetIonMass(z, a)
* << " / " << GetFinal4Momentum().mag()
* << " difference "
* << GetFinal4Momentum().mag() - G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z, a)
* << GetFinal4Momentum().mag() - GetIonMass(z, a)
* << G4endl;
*/
//
@@ -2462,7 +2564,7 @@ G4LorentzVector G4BinaryCascade::GetFinal4Momentum()
finals += (*i)->Get4Momentum();
}
if((final4Momentum.vect()/final4Momentum.e()).mag()>1.0 && currentA > 0)
if(final4Momentum.e()> 0 && (final4Momentum.vect()/final4Momentum.e()).mag()>1.0 && currentA > 0)
{
#ifdef debug_BIC_Final4Momentum
G4cerr << G4endl;
@@ -2474,7 +2576,7 @@ G4LorentzVector G4BinaryCascade::GetFinal4Momentum()
{
G4cerr <<" Final state: "<<(*i)->Get4Momentum()<<(*i)->GetDefinition()->GetParticleName()<<G4endl;
}
G4cerr << "Sum( 4-mon ) finals " << finals << G4endl;
G4cerr << "Sum( 4-mom ) finals " << finals << G4endl;
G4cerr<< " Final4Momentum = "<<final4Momentum <<" "<<final4Momentum.m()<<G4endl;
G4cerr <<" current A, Z = "<< currentA<<", "<<currentZ<<G4endl;
G4cerr << G4endl;
@@ -2538,7 +2640,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate1H1(
G4KineticTrackVector * secondaries, G4V3DNucleus * nucleus)
{
G4ReactionProductVector * products = new G4ReactionProductVector;
G4ParticleDefinition * aHTarg = G4Proton::ProtonDefinition();
const G4ParticleDefinition * aHTarg = G4Proton::ProtonDefinition();
if (nucleus->GetCharge() == 0) aHTarg = G4Neutron::NeutronDefinition();
G4double mass = aHTarg->GetPDGMass();
G4KineticTrackVector * secs = 0;
@@ -2720,12 +2822,12 @@ void G4BinaryCascade::PrintKTVector(G4KineticTrack * kt, std::string comment)
G4ThreeVector pos = kt->GetPosition();
G4LorentzVector mom = kt->Get4Momentum();
G4LorentzVector tmom = kt->GetTrackingMomentum();
G4ParticleDefinition * definition = kt->GetDefinition();
const G4ParticleDefinition * definition = kt->GetDefinition();
G4cout << " definition: " << definition->GetPDGEncoding() << " pos: "
<< 1/fermi*pos << " R: " << 1/fermi*pos.mag() << " 4mom: "
<< 1/MeV*mom <<"Tr_mom" << 1/MeV*tmom << " P: " << 1/MeV*mom.vect().mag()
<< " M: " << 1/MeV*mom.mag() << G4endl;
G4cout <<" trackstatus: "<<kt->GetState()<<G4endl;
G4cout <<" trackstatus: "<<kt->GetState() << " isParticipant " << (kt->IsParticipant()?"T":"F") <<G4endl;
} else {
G4cout << "G4BinaryCascade::PrintKTVector(): No Kinetictrack given" << G4endl;
}
@@ -2751,7 +2853,7 @@ G4double G4BinaryCascade::GetIonMass(G4int Z, G4int A)
// all neutral, or empty nucleus
mass = A * G4Neutron::Neutron()->GetPDGMass();
} else if ( A == 0 && std::abs(Z)<2 )
} else if ( A == 0 )
{
// empty nucleus, except maybe pions
mass = 0;
@@ -2763,37 +2865,30 @@ G4double G4BinaryCascade::GetIonMass(G4int Z, G4int A)
throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade::GetIonMass() - giving up");
}
// G4cout << "G4BinaryCascade::GetIonMass() Z, A, mass " << Z << " " << A << " " << mass << G4endl;
return mass;
}
G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionProductVector * products)
{
// return product when nucleus is destroyed, i.e. charge=0
// return product when nucleus is destroyed, i.e. charge=0, or theTaregtList.size()=0
G4double Esecondaries(0.);
G4LorentzVector psecondaries;
std::vector<G4KineticTrack *>::iterator iter;
std::vector<G4ReactionProduct *>::iterator rpiter;
decayKTV.Decay(&theFinalState);
//PrintKTVector(&theFinalState, " theFinalState @ void Nucl");
for(iter = theFinalState.begin(); iter != theFinalState.end(); ++iter)
{
G4ReactionProduct * aNew = new G4ReactionProduct((*iter)->GetDefinition());
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
Esecondaries +=(*iter)->Get4Momentum().e();
psecondaries +=(*iter)->Get4Momentum();
aNew->SetNewlyAdded(true);
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
}
//PrintKTVector(&theCapturedList, " theCapturedList @ void Nucl");
for(iter = theCapturedList.begin(); iter != theCapturedList.end(); ++iter)
{
G4ReactionProduct * aNew = new G4ReactionProduct((*iter)->GetDefinition());
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
Esecondaries +=(*iter)->Get4Momentum().e();
aNew->SetNewlyAdded(true);
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
}
// pull out late particles from collisions
//theCollisionMgr->Print();
while(theCollisionMgr->Entries() > 0)
@@ -2805,12 +2900,14 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
G4KineticTrackVector * lates = collision->GetFinalState();
if ( lates->size() == 1 ) {
G4KineticTrack * atrack=*(lates->begin());
//PrintKTVector(atrack, " late particle @ void Nucl ");
G4ReactionProduct * aNew = new G4ReactionProduct(atrack->GetDefinition());
aNew->SetMomentum(atrack->Get4Momentum().vect());
aNew->SetTotalEnergy(atrack->Get4Momentum().e());
Esecondaries +=atrack->Get4Momentum().e();
psecondaries +=atrack->Get4Momentum();
aNew->SetNewlyAdded(true);
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
}
@@ -2822,45 +2919,127 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
// decay must be after loop on Collisions, and Decay() will delete entries in theSecondaryList, refered
// to by Collisions.
decayKTV.Decay(&theSecondaryList);
//PrintKTVector(&theSecondaryList, " secondaires @ void Nucl");
// Correct for momentum transfered to Nucleus
G4ThreeVector transferCorrection(0);
if ( (theSecondaryList.size() + theCapturedList.size()) > 0)
{
transferCorrection= theMomentumTransfer /(theSecondaryList.size() + theCapturedList.size());
}
for(iter = theSecondaryList.begin(); iter != theSecondaryList.end(); ++iter)
{
G4ReactionProduct * aNew = new G4ReactionProduct((*iter)->GetDefinition());
(*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
Esecondaries +=(*iter)->Get4Momentum().e();
psecondaries +=(*iter)->Get4Momentum();
if ( (*iter)->IsParticipant() ) aNew->SetNewlyAdded(true);
products->push_back(aNew);
}
for(iter = theCapturedList.begin(); iter != theCapturedList.end(); ++iter)
{
G4ReactionProduct * aNew = new G4ReactionProduct((*iter)->GetDefinition());
(*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
Esecondaries +=(*iter)->Get4Momentum().e();
psecondaries +=(*iter)->Get4Momentum();
aNew->SetNewlyAdded(true);
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
}
G4double SumMassNucleons(0.);
G4LorentzVector pNucleons(0.);
for(iter = theTargetList.begin(); iter != theTargetList.end(); ++iter)
{
SumMassNucleons += (*iter)->GetDefinition()->GetPDGMass();
pNucleons += (*iter)->Get4Momentum();
}
G4double Ekinetic=theProjectile4Momentum.e() + initial_nuclear_mass - Esecondaries - SumMassNucleons;
//G4cout << "Void nucleus nucleons : "<<theTargetList.size() << " , T: " << Ekinetic << G4endl;
if (Ekinetic > 0.){
if (theTargetList.size() ) Ekinetic /= theTargetList.size();
#ifdef debug_BIC_FillVoidnucleus
G4LorentzVector deltaP=theProjectile4Momentum + G4LorentzVector(initial_nuclear_mass) -
psecondaries - pNucleons;
//G4cout << "BIC::FillVoidNucleus() nucleons : "<<theTargetList.size() << " , T: " << Ekinetic <<
// ", deltaP " << deltaP << " deltaPNoNucl " << deltaP + pNucleons << G4endl;
#endif
if (Ekinetic > 0. && theTargetList.size()){
Ekinetic /= theTargetList.size();
} else {
//G4cout << " zero or negative kinetic energy, use random: " << Ekinetic<< G4endl;
Ekinetic= ( 0.1 + G4UniformRand()*5.) * MeV; // violate Energy conservation by small amount here
}
//G4cout << " using T per nucleon: " << Ekinetic << G4endl;
G4double Ekineticrdm(0);
if (theTargetList.size()) Ekineticrdm = ( 0.1 + G4UniformRand()*5.) * MeV; // leave some Energy for Nucleons
G4double TotalEkin(Ekineticrdm);
for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
TotalEkin+=(*rpiter)->GetKineticEnergy();
}
G4double correction(1.);
if ( std::abs(Ekinetic) < 20*perCent * TotalEkin ){
correction=1. + (Ekinetic-Ekineticrdm)/TotalEkin; // Ekinetic < 0 == IS < FS, need to reduce energies
}
#ifdef debug_G4BinaryCascade
else {
G4cout << "BLIC::FillVoidNucleus() fail correction, Ekinetic, TotalEkin " << Ekinetic << ""<< TotalEkin << G4endl;
}
#endif
for(iter = theTargetList.begin(); iter != theTargetList.end(); ++iter)
{
for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
(*rpiter)->SetKineticEnergy((*rpiter)->GetKineticEnergy()*correction); // this sets kinetic & total energy
(*rpiter)->SetMomentum((*rpiter)->GetTotalMomentum() * (*rpiter)->GetMomentum().unit());
}
Ekinetic=Ekineticrdm*correction;
if (theTargetList.size())Ekinetic /= theTargetList.size();
}
for(iter = theTargetList.begin(); iter != theTargetList.end(); ++iter) {
// set Nucleon it to be hit - as it is in fact
(*iter)->Hit();
G4ReactionProduct * aNew = new G4ReactionProduct((*iter)->GetDefinition());
G4double mass=(*iter)->GetDefinition()->GetPDGMass();
G4double p=std::sqrt(sqr(Ekinetic) + 2.*Ekinetic*mass);
aNew->SetMomentum(p*(*iter)->Get4Momentum().vect().unit());
aNew->SetTotalEnergy(mass+Ekinetic);
aNew->SetKineticEnergy(Ekinetic);
aNew->SetMomentum(aNew->GetTotalMomentum() * ((*iter)->Get4Momentum().vect().unit()));
aNew->SetNewlyAdded(true);
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
Esecondaries += aNew->GetTotalEnergy();
psecondaries += G4LorentzVector(aNew->GetMomentum(),aNew->GetTotalEnergy() );
}
psecondaries=G4LorentzVector(0);
for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
psecondaries += G4LorentzVector((*rpiter)->GetMomentum(),(*rpiter)->GetTotalEnergy() );
}
G4LorentzVector initial4Mom=theProjectile4Momentum + G4LorentzVector(initial_nuclear_mass);
//G4cout << "::FillVoidNucleus()final e/p conservation initial" <<initial4Mom
// << " final " << psecondaries << " delta " << initial4Mom-psecondaries << G4endl;
G4ThreeVector SumMom=psecondaries.vect();
SumMom=initial4Mom.vect()-SumMom;
G4int loopcount(0);
std::vector<G4ReactionProduct *>::reverse_iterator reverse; // start to correct last added first
while ( SumMom.mag() > 0.1*MeV && loopcount++ < 10){
G4int index=products->size();
for (reverse=products->rbegin(); reverse!=products->rend(); ++reverse, --index){
SumMom=initial4Mom.vect();
for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
SumMom-=(*rpiter)->GetMomentum();
}
G4double p=((*reverse)->GetMomentum()).mag();
(*reverse)->SetMomentum( p*(((*reverse)->GetMomentum()+SumMom).unit()));
}
}
return products;
}
@@ -2877,7 +3056,7 @@ G4ReactionProductVector * G4BinaryCascade::HighEnergyModelFSProducts(G4ReactionP
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
}
G4ParticleDefinition* fragment = 0;
const G4ParticleDefinition* fragment = 0;
if (currentA == 1 && currentZ == 0) {
fragment = G4Neutron::NeutronDefinition();
} else if (currentA == 1 && currentZ == 1) {
@@ -2975,6 +3154,11 @@ G4bool G4BinaryCascade::CheckChargeAndBaryonNumber(G4String where)
G4int deltaA= iStateA - secsA - fStateA -currentA - lateA;
G4int deltaZ= iStateZ - secsZ - fStateZ -currentZ - lateZ;
#ifdef debugCheckChargeAndBaryonNumberverbose
G4cout << where <<" A: iState= "<< iStateA<<", secs= "<< secsA<< ", fState= "<< fStateA<< ", current= "<<currentA<< ", late= " <<lateA << G4endl;
G4cout << where <<" Z: iState= "<< iStateZ<<", secs= "<< secsZ<< ", fState= "<< fStateZ<< ", current= "<<currentZ<< ", late= " <<lateZ << G4endl;
#endif
if (deltaA != 0 || deltaZ!=0 ) {
if (deltaA != lastdA || deltaZ != lastdZ ) {
G4cout << "baryon/charge imbalance - " << where << G4endl
@@ -3061,13 +3245,11 @@ void G4BinaryCascade::DebugApplyCollision(G4CollisionInitialState * collision,
finalA -= product_barions;
finalZ -= GetTotalCharge(*products);
}
G4double delta = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(currentZ,currentA)
- (G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(finalZ,finalA)
+ mass_out);
G4double delta = GetIonMass(currentZ,currentA) - (GetIonMass(finalZ,finalA) + mass_out);
G4cout << " current/final a,z " << currentA << " " << currentZ << " "<< finalA<< " "<< finalZ
<< " delta-mass " << delta<<G4endl;
final+=delta;
mass_out = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(finalZ,finalA);
mass_out = GetIonMass(finalZ,finalA);
G4cout << " initE/ E_out/ Mfinal/ Excit " << currentInitialEnergy
<< " " << final << " "
<< mass_out<<" "
@@ -3078,7 +3260,7 @@ void G4BinaryCascade::DebugApplyCollision(G4CollisionInitialState * collision,
}
//----------------------------------------------------------------------------
G4bool G4BinaryCascade::DebugEpConservation(const G4HadProjectile & aTrack,
G4bool G4BinaryCascade::DebugFinalEpConservation(const G4HadProjectile & aTrack,
G4ReactionProductVector* products)
//----------------------------------------------------------------------------
{
@@ -3093,23 +3275,89 @@ G4bool G4BinaryCascade::DebugEpConservation(const G4HadProjectile & aTrack,
for(iter = products->begin(); iter != products->end(); ++iter)
{
// G4cout << " Secondary E - Ekin / p " <<
// (*iter)->GetDefinition()->GetParticleName() << " " <<
// (*iter)->GetTotalEnergy() << " - " <<
// (*iter)->GetKineticEnergy()<< " / " <<
// (*iter)->GetMomentum().x() << " " <<
// (*iter)->GetMomentum().y() << " " <<
// (*iter)->GetMomentum().z() << G4endl;
G4cout << " Secondary E - Ekin / p " <<
(*iter)->GetDefinition()->GetParticleName() << " " <<
(*iter)->GetTotalEnergy() << " - " <<
(*iter)->GetKineticEnergy()<< " / " <<
(*iter)->GetMomentum().x() << " " <<
(*iter)->GetMomentum().y() << " " <<
(*iter)->GetMomentum().z() << G4endl;
Efinal += (*iter)->GetTotalEnergy();
pFinal += (*iter)->GetMomentum();
}
// G4cout << "e outgoing/ total : " << Efinal << " " << Efinal+GetFinal4Momentum().e()<< G4endl;
G4cout << "BIC E/p delta " <<
(aTrack.Get4Momentum().e()+ the3DNucleus->GetMass() - Efinal)/MeV <<
G4cout << "e outgoing/ total : " << Efinal << " " << Efinal+GetFinal4Momentum().e()<< G4endl;
G4cout << "BIC E/p delta " <<
(aTrack.Get4Momentum().e()+theInitial4Mom.e() - Efinal)/MeV <<
" MeV / mom " << (aTrack.Get4Momentum() - pFinal ) /MeV << G4endl;
return (aTrack.Get4Momentum().e() + the3DNucleus->GetMass() - Efinal)/aTrack.Get4Momentum().e() < perCent;
return (aTrack.Get4Momentum().e() + theInitial4Mom.e() - Efinal)/aTrack.Get4Momentum().e() < perCent;
}
//----------------------------------------------------------------------------
G4bool G4BinaryCascade::DebugEpConservation(const G4String where)
//----------------------------------------------------------------------------
{
G4cout << where << G4endl;
G4LorentzVector psecs, ptgts, pcpts, pfins;
if (std::abs(theParticleChange.GetWeightChange() -1 ) > 1e-5 )
{
G4cout <<" BIC-weight change " << theParticleChange.GetWeightChange()<< G4endl;
}
std::vector<G4KineticTrack *>::iterator ktiter;
for(ktiter = theSecondaryList.begin(); ktiter != theSecondaryList.end(); ++ktiter)
{
G4cout << " Secondary E - Ekin / p " <<
(*ktiter)->GetDefinition()->GetParticleName() << " " <<
(*ktiter)->Get4Momentum().e() << " - " <<
(*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() << " / " <<
(*ktiter)->Get4Momentum().vect() << G4endl;
psecs += (*ktiter)->Get4Momentum();
}
for(ktiter = theTargetList.begin(); ktiter != theTargetList.end(); ++ktiter)
{
G4cout << " Target E - Ekin / p " <<
(*ktiter)->GetDefinition()->GetParticleName() << " " <<
(*ktiter)->Get4Momentum().e() << " - " <<
(*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() << " / " <<
(*ktiter)->Get4Momentum().vect() << G4endl;
ptgts += (*ktiter)->Get4Momentum();
}
for(ktiter = theCapturedList.begin(); ktiter != theCapturedList.end(); ++ktiter)
{
G4cout << " Captured E - Ekin / p " <<
(*ktiter)->GetDefinition()->GetParticleName() << " " <<
(*ktiter)->Get4Momentum().e() << " - " <<
(*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() << " / " <<
(*ktiter)->Get4Momentum().vect() << G4endl;
pcpts += (*ktiter)->Get4Momentum();
}
for(ktiter = theFinalState.begin(); ktiter != theFinalState.end(); ++ktiter)
{
G4cout << " Finals E - Ekin / p " <<
(*ktiter)->GetDefinition()->GetParticleName() << " " <<
(*ktiter)->Get4Momentum().e() << " - " <<
(*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() << " / " <<
(*ktiter)->Get4Momentum().vect() << G4endl;
pfins += (*ktiter)->Get4Momentum();
}
G4cout << " Secondaries " << psecs << ", Targets " << ptgts << G4endl
<<" Captured " << pcpts << ", Finals " << pfins << G4endl
<<" Sum " << psecs + ptgts + pcpts + pfins << " PTransfer " << theMomentumTransfer
<<" Sum+PTransfer " << psecs + ptgts + pcpts + pfins + theMomentumTransfer
<< G4endl<< G4endl;
return true;
}
@@ -45,6 +45,7 @@
//#define debug_G4BinaryLightIonReaction
//#define debug_BLIR_finalstate
//#define debug_BLIR_result
G4BinaryLightIonReaction::G4BinaryLightIonReaction(G4VPreCompoundModel* ptr)
: G4HadronicInteraction("Binary Light Ion Cascade"),
@@ -116,6 +117,17 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
// G4cout << "Using pre-compound only, E= "<<mom.t()-mom.mag()<<G4endl;
// m_nucl = mom.mag();
cascaders=FuseNucleiAndPrompound(mom);
if( !cascaders )
{
// abort!! happens for too low energy for nuclei to fuse
theResult.Clear();
theResult.SetStatusChange(isAlive);
theResult.SetEnergyChange(aTrack.GetKineticEnergy());
theResult.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
return &theResult;
}
}
else
{
@@ -123,7 +135,6 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
if(! result )
{
{
// abort!!
G4cerr << "G4BinaryLightIonReaction no final state for: " << G4endl;
@@ -143,8 +154,6 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
theResult.SetEnergyChange(aTrack.GetKineticEnergy());
theResult.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
return &theResult;
}
}
// Calculate excitation energy,
@@ -152,10 +161,10 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
pInitialState = mom;
//G4cout << "pInitialState from aTrack : " << pInitialState;
//G4cout << "BLIC: pInitialState from aTrack : " << pInitialState;
pInitialState.setT(pInitialState.getT() +
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(tZ,tA));
//G4cout << "target nucleus added : " << pInitialState << G4endl;
//G4cout << "BLIC: target nucleus added : " << pInitialState << G4endl;
delete target3dNucleus;target3dNucleus=0;
delete projectile3dNucleus;projectile3dNucleus=0;
@@ -167,9 +176,10 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
G4LorentzVector pspectators=SortResult(result,spectators,cascaders);
// pFinalState=std::accumulate(cascaders->begin(),cascaders->end(),pFinalState,ReactionProduct4Mom);
std::vector<G4ReactionProduct *>::iterator iter;
//G4cout << "pInitialState, pFinalState / pspectators"<< pInitialState << " / " << pFinalState << " / " << pspectators << G4endl;
// G4cout << "pInitialState, pFinalState / pspectators"<< pInitialState << " / " << pFinalState << " / " << pspectators << G4endl;
// if ( spectA-spectatorA !=0 || spectZ-spectatorZ !=0)
// {
// G4cout << "spect Nucl != spectators: nucl a,z; spect a,z" <<
@@ -179,11 +189,11 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
result=0;
G4LorentzVector momentum(pInitialState-pFinalState);
G4int loopcount(0);
//G4cout << "momentum, pspectators : " << momentum << " / " << pspectators << G4endl;
//G4cout << "BLIC: momentum, pspectators : " << momentum << " / " << pspectators << G4endl;
while (std::abs(momentum.e()-pspectators.e()) > 10*MeV)
{
G4LorentzVector pCorrect(pInitialState-pspectators);
//G4cout << "BIC nonconservation? (pInitialState-pFinalState) / spectators :" << momentum << " / " << pspectators << "pCorrect "<< pCorrect<< G4endl;
//G4cout << "BLIC:: BIC nonconservation? (pInitialState-pFinalState) / spectators :" << momentum << " / " << pspectators << "pCorrect "<< pCorrect<< G4endl;
// Correct outgoing casacde particles.... to have momentum of (initial state - spectators)
G4bool EnergyIsCorrect=EnergyAndMomentumCorrector(cascaders, pCorrect);
if ( ! EnergyIsCorrect && debug_G4BinaryLightIonReactionResults)
@@ -191,10 +201,9 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
G4cout << "Warning - G4BinaryLightIonReaction E/P correction for cascaders failed" << G4endl;
}
pFinalState=G4LorentzVector(0,0,0,0);
unsigned int i;
for(i=0; i<cascaders->size(); i++)
for(iter=cascaders->begin(); iter!=cascaders->end(); iter++)
{
pFinalState += G4LorentzVector( (*cascaders)[i]->GetMomentum(), (*cascaders)[i]->GetTotalEnergy() );
pFinalState += G4LorentzVector( (*iter)->GetMomentum(), (*iter)->GetTotalEnergy() );
}
momentum=pInitialState-pFinalState;
if (++loopcount > 10 )
@@ -216,12 +225,16 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
if ( momentum.vect().mag() - momentum.e()> 10*keV )
{
G4ReactionProductVector::iterator ispectator;
for (ispectator=spectators->begin();ispectator!=spectators->end();ispectator++)
for (iter=spectators->begin();iter!=spectators->end();iter++)
{
delete *ispectator;
delete *iter;
}
delete spectators;
for(iter=cascaders->begin(); iter!=cascaders->end(); iter++)
{
delete *iter;
}
delete cascaders;
G4cout << "G4BinaryLightIonReaction.cc: mom check: " << momentum
<< " 3.mag "<< momentum.vect().mag() << G4endl
@@ -238,7 +251,13 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
<< "," << targetNucleus.GetZ_asInt() << ")" << G4endl;
G4cout << " if frequent, please submit above information as bug report"
<< G4endl << G4endl;
#ifdef debug_G4BinaryLightIonReaction
G4ExceptionDescription ed;
ed << "G4BinaryLightIonreaction: Terminate for above error" << G4endl;
G4Exception("G4BinaryLightIonreaction::ApplyYourSelf()", "BLIC001", FatalException,
ed);
#endif
theResult.Clear();
theResult.SetStatusChange(isAlive);
theResult.SetEnergyChange(aTrack.GetKineticEnergy());
@@ -246,7 +265,7 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
return &theResult;
}
// DeExciteSpectatorNucleus() also handles also case of A=1, Z=0,1
DeExciteSpectatorNucleus(spectators, cascaders, theStatisticalExEnergy, momentum);
} else {
delete spectators;
@@ -262,17 +281,25 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
// theResult.Clear();
theResult.Clear();
theResult.SetStatusChange(stopAndKill);
G4double Etot(0);
size_t i=0;
for(i=0; i<cascaders->size(); i++)
G4LorentzVector ptot(0);
G4ReactionProductVector::iterator iter;
#ifdef debug_BLIR_result
G4LorentzVector p_raw;
#endif
//G4int i=0;
for(iter=cascaders->begin(); iter!=cascaders->end(); iter++)
{
if((*cascaders)[i]->GetNewlyAdded())
if((*iter)->GetNewlyAdded())
{
G4DynamicParticle * aNew =
new G4DynamicParticle((*cascaders)[i]->GetDefinition(),
(*cascaders)[i]->GetTotalEnergy(),
(*cascaders)[i]->GetMomentum() );
new G4DynamicParticle((*iter)->GetDefinition(),
(*iter)->GetTotalEnergy(),
(*iter)->GetMomentum() );
G4LorentzVector tmp = aNew->Get4Momentum();
#ifdef debug_BLIR_result
p_raw+= tmp;
#endif
if(swapped)
{
tmp*=toBreit.inverse();
@@ -280,23 +307,28 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
}
tmp *= toLab;
aNew->Set4Momentum(tmp);
//G4cout << "result[" << i << "], 4vect: " << tmp << G4endl;
theResult.AddSecondary(aNew);
Etot += tmp.e();
// G4cout << "LIBIC: Secondary " << aNew->GetDefinition()->GetParticleName()
// <<" "<< aNew->GetMomentum()
// <<" "<< aNew->GetTotalEnergy()
// << G4endl;
ptot += tmp;
//G4cout << "BLIC: Secondary " << aNew->GetDefinition()->GetParticleName()
// <<" "<< aNew->GetMomentum()<<" "<< aNew->GetTotalEnergy() << G4endl;
}
delete (*cascaders)[i];
delete *iter;
}
delete cascaders;
#ifdef debug_BLIR_result
G4cout << "Result analysis, secondaries" << theResult.GetNumberOfSecondaries() << G4endl;
G4cout << " Energy conservation initial/primary/nucleus/final/delta(init-final) "
<< aTrack.GetTotalEnergy() + m_nucl << aTrack.GetTotalEnergy() << m_nucl <<Etot
<< aTrack.GetTotalEnergy() + m_nucl - Etot;
//G4cout << "Result analysis, secondaries " << theResult.GetNumberOfSecondaries() << G4endl;
//G4cout << "p_tot_raw " << p_raw << " sum p final " << ptot << G4endl;
G4double m_nucl= G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass(targetNucleus.GetZ_asInt(),targetNucleus.GetA_asInt());
// delete? tZ=targetNucleus.GetZ_asInt();
//G4cout << "BLIC Energy conservation initial/primary/nucleus/final/delta(init-final) "
// << aTrack.GetTotalEnergy() + m_nucl <<" "<< aTrack.GetTotalEnergy() <<" "<< m_nucl <<" "<<ptot.e()
// <<" "<< aTrack.GetTotalEnergy() + m_nucl - ptot.e() << G4endl;
G4cout << "BLIC momentum conservation " << aTrack.Get4Momentum()+ G4LorentzVector(m_nucl)
<< " ptot " << ptot << " delta " << aTrack.Get4Momentum()+ G4LorentzVector(m_nucl) - ptot
<< " 3mom.mag() " << (aTrack.Get4Momentum()+ G4LorentzVector(m_nucl) - ptot).vect().mag() << G4endl;
#endif
if(getenv("BLICDEBUG") ) G4cerr << " ######### Binary Light Ion Reaction number ends ######### " << G4endl;
@@ -418,20 +450,31 @@ G4bool G4BinaryLightIonReaction::SetLighterAsProjectile(G4LorentzVector & mom,co
}
G4ReactionProductVector * G4BinaryLightIonReaction::FuseNucleiAndPrompound(const G4LorentzVector & mom)
{
// Check if kinematically nuclei can fuse.
G4double mFused=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(pZ+tZ,pA+tA);
G4double mTarget=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(tZ,tA);
G4LorentzVector pCompound(mom.e()+mTarget,mom.vect());
G4double m2Compound=pCompound.m2();
if (m2Compound < sqr(mFused) ) {
//G4cout << "G4BLIC: projectile p, mTarget, mFused, mCompound, delta: " <<mom << " " << mTarget << " " << mFused
// << " " << sqrt(m2Compound)<< " " << sqrt(m2Compound) - mFused << G4endl;
return 0;
}
G4Fragment aPreFrag;
aPreFrag.SetA(pA+tA);
aPreFrag.SetZ(pZ+tZ);
aPreFrag.SetZandA_asInt(pZ+tZ, pA+tA);
aPreFrag.SetNumberOfParticles(pA);
aPreFrag.SetNumberOfCharged(pZ);
aPreFrag.SetNumberOfHoles(0);
G4ThreeVector plop(0.,0., mom.vect().mag());
G4double m_nucl=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(tZ,tA);
G4LorentzVector aL(mom.t()+m_nucl, plop);
//GF FIXME: whyusing plop in z direction? this will not conserve momentum?
//G4ThreeVector plop(0.,0., mom.vect().mag());
//G4LorentzVector aL(mom.t()+mTarget, plop);
G4LorentzVector aL(mom.t()+mTarget,mom.vect());
aPreFrag.SetMomentum(aL);
// G4cout << "Fragment INFO "<< pA+tA <<" "<<pZ+tZ<<" "
// << aL <<" "<<preFragDef->GetParticleName()<<G4endl;
//G4cout << "Fragment INFO "<< pA+tA <<" "<<pZ+tZ<<" "
// << aL <<" "<<G4endl << aPreFrag << G4endl;
G4ReactionProductVector * cascaders = theProjectileFragmentation->DeExcite(aPreFrag);
//G4double tSum = 0;
for(size_t count = 0; count<cascaders->size(); count++)
@@ -471,6 +514,9 @@ G4ReactionProductVector * G4BinaryLightIonReaction::Interact(G4LorentzVector & m
projectile3dNucleus->StartLoop();
G4Nucleon * aNuc;
G4LorentzVector tmpV(0,0,0,0);
#ifdef debug_BLIR_finalstate
G4LorentzVector pinitial;
#endif
G4LorentzVector nucleonMom(1./pA*mom);
nucleonMom.setZ(nucleonMom.vect().mag());
nucleonMom.setX(0);
@@ -490,9 +536,29 @@ G4ReactionProductVector * G4BinaryLightIonReaction::Interact(G4LorentzVector & m
G4double Efermi= std::sqrt( sqr(mass) + sqr(pfermi)) - mass;
it1->SetProjectilePotential(-Efermi);
initalState->push_back(it1);
#ifdef debug_BLIR_finalstate
pinitial += it1->Get4Momentum();
#endif
}
result=theModel->Propagate(initalState, target3dNucleus);
#ifdef debug_BLIR_finalstate
if( result && result->size()>0)
{
G4LorentzVector presult;
G4ReactionProductVector::iterator iter;
G4ReactionProduct xp;
for (iter=result->begin(); iter !=result->end(); ++iter)
{
presult += G4LorentzVector((*iter)->GetMomentum(),(*iter)->GetTotalEnergy());
}
G4cout << "BLIC check result : initial " << pinitial << " mass tgt " << target3dNucleus->GetMass()
<< " final " << presult
<< " IF - FF " << pinitial +G4LorentzVector(target3dNucleus->GetMass()) - presult << G4endl;
}
#endif
if( result && result->size()==0)
{
delete result;
@@ -512,7 +578,6 @@ G4ReactionProductVector * G4BinaryLightIonReaction::Interact(G4LorentzVector & m
}
G4double G4BinaryLightIonReaction::GetProjectileExcitation()
{
spectatorA=spectatorZ=0;
G4Nucleon * aNuc;
// targetNucleus->StartLoop();
@@ -525,14 +590,8 @@ G4double G4BinaryLightIonReaction::GetProjectileExcitation()
projectile3dNucleus->StartLoop();
while( (aNuc=projectile3dNucleus->GetNextNucleon()) )
{
// G4cout << " Nucleon : " << aNuc->GetDefinition()->GetParticleName() <<" "<< aNuc->AreYouHit() <<" "<<aNuc->GetMomentum()<<G4endl;
if(!aNuc->AreYouHit())
{
spectatorA++;
spectatorZ+=G4lrint(aNuc->GetDefinition()->GetPDGCharge()/eplus);
}
else
{
//G4cout << " Nucleon : " << aNuc->GetDefinition()->GetParticleName() <<" "<< aNuc->AreYouHit() <<" "<<aNuc->GetMomentum()<<G4endl;
if(aNuc->AreYouHit()) {
G4ThreeVector aPosition(aNuc->GetPosition());
G4double localDensity = projectile3dNucleus->GetNuclearDensity()->GetDensity(aPosition);
G4double localPfermi = theFermi.GetFermiMomentum(localDensity);
@@ -548,7 +607,7 @@ G4double G4BinaryLightIonReaction::GetProjectileExcitation()
G4LorentzVector G4BinaryLightIonReaction::SortResult(G4ReactionProductVector * result, G4ReactionProductVector * spectators,G4ReactionProductVector * cascaders)
{
unsigned int i(0);
// G4int spectA(0),spectZ(0);
spectatorA=spectatorZ=0;
G4LorentzVector pspectators(0,0,0,0);
pFinalState=G4LorentzVector(0,0,0,0);
for(i=0; i<result->size(); i++)
@@ -562,8 +621,8 @@ G4LorentzVector G4BinaryLightIonReaction::SortResult(G4ReactionProductVector * r
// G4cout <<" spectator ... ";
pspectators += G4LorentzVector( (*result)[i]->GetMomentum(), (*result)[i]->GetTotalEnergy() );
spectators->push_back((*result)[i]);
// spectA++;
// spectZ+= G4lrint((*result)[i]->GetDefinition()->GetPDGCharge()/eplus);
spectatorA++;
spectatorZ+= G4lrint((*result)[i]->GetDefinition()->GetPDGCharge()/eplus);
}
// G4cout << (*result)[i]<< " "
@@ -571,7 +630,9 @@ G4LorentzVector G4BinaryLightIonReaction::SortResult(G4ReactionProductVector * r
// << (*result)[i]->GetMomentum()<< " "
// << (*result)[i]->GetTotalEnergy() << G4endl;
}
//G4cout << "pFinalState / pspectators" << pFinalState << " / " << pspectators << G4endl;
//G4cout << "pFinalState / pspectators, (A,Z), p " << pFinalState << " / " << spectators->size()
// << " (" << spectatorA << ", "<< spectatorZ << "), 4-mom: " << pspectators << G4endl;
return pspectators;
}
@@ -592,8 +653,7 @@ void G4BinaryLightIonReaction::DeExciteSpectatorNucleus(G4ReactionProductVector
{
// Make the fragment
G4Fragment aProRes;
aProRes.SetA(spectatorA);
aProRes.SetZ(spectatorZ);
aProRes.SetZandA_asInt(spectatorZ, spectatorA);
aProRes.SetNumberOfParticles(0);
aProRes.SetNumberOfCharged(0);
aProRes.SetNumberOfHoles(pA-spectatorA);
@@ -618,17 +678,18 @@ void G4BinaryLightIonReaction::DeExciteSpectatorNucleus(G4ReactionProductVector
}
else if(spectatorA!=0)
{
G4ReactionProductVector::iterator ispectator;
for (ispectator=spectators->begin();ispectator!=spectators->end();ispectator++)
G4ReactionProductVector::iterator ispectator;
for (ispectator=spectators->begin();ispectator!=spectators->end();ispectator++)
{
(*ispectator)->SetNewlyAdded(true);
cascaders->push_back(*ispectator);
pFragments+=G4LorentzVector((*ispectator)->GetMomentum(),(*ispectator)->GetTotalEnergy());
// G4cout << "from spectator "
// << (*ispectator)->GetDefinition()->GetParticleName() << " "
// << (*ispectator)->GetMomentum()<< " "
// << (*ispectator)->GetTotalEnergy() << G4endl;
pFinalState+=G4LorentzVector((*ispectator)->GetMomentum(),(*ispectator)->GetTotalEnergy());
//G4cout << "BLIC: spectatorA>0, Z=0 from spectator "
// << (*ispectator)->GetDefinition()->GetParticleName() << " "
// << (*ispectator)->GetMomentum()<< " "
// << (*ispectator)->GetTotalEnergy() << G4endl;
}
}
// / if (spectators)
delete spectators;
@@ -655,7 +716,8 @@ void G4BinaryLightIonReaction::DeExciteSpectatorNucleus(G4ReactionProductVector
// correct p/E of Cascade secondaries
G4LorentzVector pCas=pInitialState - pFragments;
//G4cout <<" Going to correct from " << pFinalState << " to " << pCas << G4endl;
//G4cout <<"BLIC: Going to correct from " << pFinalState << " to " << pCas << G4endl;
// the creation of excited fragment did violate E/p, so correct cascaders to get overall conservation.
G4bool EnergyIsCorrect=EnergyAndMomentumCorrector(cascaders, pCas);
if ( ! EnergyIsCorrect && debug_G4BinaryLightIonReactionResults)
{
@@ -671,10 +733,10 @@ void G4BinaryLightIonReaction::DeExciteSpectatorNucleus(G4ReactionProductVector
}
delete proFrag;
}
//G4cout << "EnergyIsCorrect? " << EnergyIsCorrect << G4endl;
//G4cout << "EnergyIsCorrect? " << EnergyIsCorrect << G4endl;
if ( ! EnergyIsCorrect )
{
//G4cout <<" ! EnergyIsCorrect " << pFinalState << " to " << pInitialState << G4endl;
// G4cout <<" ! EnergyIsCorrect " << pFinalState << " to " << pInitialState << G4endl;
if (! EnergyAndMomentumCorrector(cascaders,pInitialState))
{
if(debug_G4BinaryLightIonReactionResults)
File diff suppressed because it is too large Load Diff
@@ -80,8 +80,8 @@ G4NeutronField::~G4NeutronField()
G4double G4NeutronField::GetField(const G4ThreeVector & aPosition)
{
G4double x = aPosition.mag();
G4int index = static_cast<G4int>(x/(0.3*fermi) );
if(index+2> static_cast<G4int>(theFermiMomBuffer.size())) return theFermiMomBuffer.back();
unsigned int index = static_cast<unsigned int>(x/(0.3*fermi));
if( (index+2) > theFermiMomBuffer.size()) return theFermiMomBuffer.back();
G4double y1 = theFermiMomBuffer[index];
G4double y2 = theFermiMomBuffer[index+1];
G4double x1 = (0.3*fermi)*index;
@@ -84,8 +84,8 @@ G4double G4ProtonField::GetField(const G4ThreeVector & aPosition)
{
//G4cout << " Fermi Potential " << (fermiMom*fermiMom)/(2*proton_mass_c2) <<G4endl;
G4double x = aPosition.mag();
G4int index = static_cast<G4int>(x/(0.3*fermi) );
if(index+2>static_cast<G4int>(theFermiMomBuffer.size())) return theFermiMomBuffer.back();
unsigned int index = static_cast<unsigned int>(x/(0.3*fermi));
if((index+2) > theFermiMomBuffer.size()) return theFermiMomBuffer.back();
G4double y1 = theFermiMomBuffer[index];
G4double y2 = theFermiMomBuffer[index+1];
G4double x1 = (0.3*fermi)*index;
@@ -479,7 +479,6 @@ G4ThreeVector G4RKPropagation::GetMomentumTransfer() const
G4bool G4RKPropagation::FieldTransport(G4KineticTrack * kt, const G4double timeStep)
//----------------------------------------------------------------------------
{
theMomentumTranfer=G4ThreeVector(0,0,0);
// G4cout <<"Stepper input"<<kt->GetTrackingMomentum()<<G4endl;
// create the integrator stepper
// G4Mag_EqRhs * equation = mapIter->second;
@@ -521,7 +520,7 @@ G4bool G4RKPropagation::FieldTransport(G4KineticTrack * kt, const G4double timeS
<< G4endl;
*/
// Correct for momentum ( thus energy) transfered to nucleus, boost particle into moving nuclues frame.
// Correct for momentum ( thus energy) transfered to nucleus, boost particle into moving nucleus frame.
G4ThreeVector MomentumTranfer = kt->GetTrackingMomentum().vect() - track.GetMomentum();
G4ThreeVector boost= MomentumTranfer / std::sqrt (MomentumTranfer.mag2() +sqr(theNucleus->GetMass()));
@@ -15,6 +15,184 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
1 December 2014 M. Kelsey (hadr-casc-V10-00-20)
------------------------------------------------
- G4CascadParticle.cc: For stopped particles (zero path length), if at core
of nucleus switch "movingIn" flag to false to particle will be forced to
escape. Protects against very rare infinite loop in mu- capture (nu_mu
produced with tiny momentum, gets stuck in nucleus zone 0).
1 December 2014 M. Kelsey (hadr-casc-V10-00-19)
------------------------------------------------
- G4ElementaryParticleCollider.cc: In muon absorption, check return from
G4GDecay3 for null vector; report no-collision status and return.
- G4GDecay3.cc: Fix typo in error report to use correct class name.
21 November 2014 M. Kelsey (hadr-casc-V10-00-18)
-------------------------------------------------
Per A. Dotti, introduce G4AutoDelete for all singleton classes to avoid
end-of-job memory leaks:
G4CascadeChannelTables.cc,.hh (also make dtor public)
G4CascadeParameters.cc
G4MultiBodyMomentumDist.cc
G4TwoBodyAngularDist.cc
21 November 2014 M. Kelsey (hadr-casc-V10-00-17)
-------------------------------------------------
- G4PreCompoundDeexcitation.cc: Per V.I., fix memory leak on exit by passing
excitation handler through to PreCompound.
19 November 2014 M. Kelsey (hadr-casc-V10-00-16)
-------------------------------------------------
- G4CascadeInterface.cc: Fix parentheses in retryInelasticNucleus()
expression for conditional-compilation flag (does not affect defaults).
18 November 2014 M. Kelsey (hadr-casc-V10-00-15)
-------------------------------------------------
- G4CascadeInterface.cc: Fix possible infinite-loop condition where (nTries
>= maxTries) and momentum balance fails, by regrouping conditions in
retryInelasticNucleus().
11 November 2014 M. Kelsey (hadr-casc-V10-00-14)
-------------------------------------------------
- G4CascadeParameters.cc: Revert default changes in V10-00-12 tag: turn
off phase-space, trailing-effect, and PreCompound.
- G4InuclCollider.cc: Replace G4Fragment::GetA() with GetA_asInt().
- G4ElementaryParticleCollider.cc: Improve optional pion-nucleon
absorption. NOTE: This is DISABLED by default; used for studies of pion
stopping.
- G4NucleiModel.cc: Initialize local p1r variable in declaration.
30 October 2014 M. Kelsey (hadr-casc-V10-00-13)
------------------------------------------------
- G4CascadeParameters, G4CascadeParamMessenger: Add flag to enable
absorbing pion on a single nucleon. See G4EPCollider below for details.
- G4ElementaryParticleCollider: Add support for absorbing a pion with a
single nucleon (via a charge exchange interaction, e.g. pi- p -> n), with
momentum conservation handled by recoiling against the nucleus. This is
intended to improve the match to data for pi- capture.
- G4NucleiModel.cc: In boundaryTransition(), switch sign of "dv" so that
particle sees a barrier (next_zone potential > current potential) as
positive. In generateParticleFate(), pass (A,Z) to EPCollider for
possible nuclear-recoil calculations.
- G4CascadeCheckBalance.cc: Per V.Ivantchenko, use G4Fragment::GetZ_asInt(),
GetZ_asInt(). Should have been done long ago.
1 October 2014 M. Kelsey (hadr-casc-V10-00-12)
-----------------------------------------------
- G4CascadeCheckBalance: Change ctor arg from "const char*" to "const
G4String&" to avoid memory deallocation problems.
- G4CascadeColliderBase: Change ctor arg from "const char*" to "const
G4String&" to avoid memory deallocation problems.
- G4CascadeInterface.cc: Call both usePreCompoundDeexcitation() and
useCascadeDeexcitation() in ctor, with if-else.
- G4CascadeParameters.cc: Make PreCompound, phase space, trailing effect,
and light-ion clustering active by default. User must set envvars to "0"
to disable.
- G4InuclCollider.cc: Make PreCompound the default in ctor.
- G4VCascadeCollider: Change ctor arg from "const char*" to "const
G4String&" to avoid memory deallocation problems.
- G4VCascadeDeexcitation.hh: Change ctor arg from "const char*" to "const
G4String&" to avoid memory deallocation problems.
27 June 2014 M. Kelsey (hadr-casc-V10-00-11)
---------------------------------------------
- G4CascadeFinalStateAlgorithm.cc: Address bug #1558, using ".c_str()" in
diagnostic outputs, to avoid IBM XL compiler error.
23 May 2014 M. Kelsey (hadr-casc-V10-00-10)
--------------------------------------------
- G4InuclNuclei.cc: Avoid FPE in setExcitationEnergy() for zero Ekin. This
must be backported to 9.6 and 10.0.
9 May 2014 M. Kelsey (hadr-casc-V10-00-09)
-------------------------------------------
- G4PreCompoundDeexcitation.cc: Fix mistake in copying example code; created
a local copy instead of filling the data member.
9 May 2014 M. Kelsey (hadr-casc-V10-00-08)
-------------------------------------------
- 4PreCompoundDeexcitation.cc: Per V.Ivanchenko, attempt to use shared
instance of PreCompound by fetching from hadronic registry. Only if that
fails should a local instance be created.
9 April 2014 M. Kelsey (hadr-casc-V10-00-07)
---------------------------------------------
- G4IntraNucleiCascader.cc: Use const G4PD*.
- G4InuclEvaporation.cc: Remove temporary const_cast<G4PD*> (see 10 Mar).
12 March 2014 M. Kelsey (hadr-casc-V10-00-06)
----------------------------------------------
- G4CascadeParameters: Copy Gabriele's version of the singleton here, from
the 9.6-patch-03 branch.
10 March 2014 M. Kelsey (hadr-casc-V10-00-05)
----------------------------------------------
- G4CollisionOutput.cc: Use const G4PD* for G4HadronicProduct secondaries.
- G4InuclParticle: Apply "const G4PD*" everywhere for consistency with
hadr-util updates.
- G4InuclElementaryParticle: Apply "const G4PD*" everywhere for consistency
with hadr-util updates.
- G4InculEvaporation.cc: TEMPORARY: Use const_cast<G4PD*> to access ctor
of G4Fragment, until new hadr-util code is public.
10 March 2014 M. Kelsey (hadr-casc-V10-00-04)
----------------------------------------------
- G4IntraNucleiCascader.cc: Fix bug #1584, memory leak in secondaries.
10 March 2014 M. Kelsey (hadr-casc-V10-00-03)
----------------------------------------------
- G4CascadeParameters.cc: Restore original 10.0 version, because January
mods caused unexpected side effects in build, which aren't being fixed.
29 January 2014 G.Folger not tagged
-------------------------------------
- Removed cascade/utils from cascade/sources.cmake
16 January 2014 M.Kelsey (hadr-casc-V10-00-02)
-----------------------------------------------
- G4CascadeInterface: Move static member into const data, initialize in
ctor. This avoids calling G4CascadeParameters::Instance() before main().
- G4CascadeCoalescence: Move static members into const data, initialize in
ctor. This avoids calling G4CascadeParameters::Instance() before main().
- G4NucleiModel: Move static members which use envvars into const data,
initialize in ctors (with copy-and-paste code blocks). This avoids
calling G4CascadeParameters::Instance() before main().
7 January 2014 Dennis Wright (hadr-casc-V10-00-01)
---------------------------------------------------
- added new pi-nucleon 2-body angular distributions:
G4PipP2PipPAngDst, G4PimP2PimPAngDst, G4Pi0P2Pi0PAngDst and G4PimP2Pi0NAngDst.
Below 2.6 GeV, distributions taken from SAID phase shift calculations with
Coulomb phase removed. Above 2.6 GeV, taken from data.
- also modified: G4TwoBodyAngularDist, sources.cmake
6 January 2014 M.Kelsey (hadr-casc-V10-00-00)
----------------------------------------------
- G4CascadeParameters.cc: Improve singleton initialization by moving static
instance to pointer in file scope (anon namespace), check for null pointer
in Instance() call. Drop use of messenger (temporarily) since it's not
thread safe. This change needs to be backported to 9.6 and 10.0.
2 October 2013 V.Ivanchenko (hadr-casc-V09-06-52)
----------------------------------------------------
- G4NonEquilibriumEvaporator.hh - added forward declaration of G4Pow,
@@ -38,6 +38,7 @@
// 20130129 M. Kelsey -- Drop load-on-demand interfaces, fill in ctor
// 20130306 M. Kelsey -- Add inclusive printing of all tables here
// 20130429 M. Kelsey -- Change instance to thread-local pointer.
// 20141121 M. Kelsey -- Dtor must be public for end-of-job cleanup.
#ifndef G4_CASCADE_CHANNEL_TABLES_HH
#define G4_CASCADE_CHANNEL_TABLES_HH
@@ -61,12 +62,14 @@ public:
static void Print(std::ostream& os=G4cout);
static void PrintTable(G4int initialState, std::ostream& os=G4cout);
public:
~G4CascadeChannelTables();
private:
static const G4CascadeChannelTables& instance(); // Singleton
static G4ThreadLocal G4CascadeChannelTables* theInstance; // per thread
G4CascadeChannelTables();
~G4CascadeChannelTables();
// Fetch table from map if already registered, or return null
const G4CascadeChannel* FindTable(G4int initialState) const;
@@ -48,6 +48,7 @@
// 20121002 M. Kelsey -- Add strangeness check (useful for Omega- beam)
// 20130620 Address Coverity complaint about missing copy actions
// 20130621 Add interface to take G4Fragment input instead of G4InuclNuclei.
// 20140930 Change name from "const char*" to "const G4String"
#include "G4VCascadeCollider.hh"
#include "globals.hh"
@@ -65,13 +66,13 @@ class G4CascadeCheckBalance : public G4VCascadeCollider {
public:
static const G4double tolerance; // Don't do floating zero!
explicit G4CascadeCheckBalance(const char* owner="G4CascadeCheckBalance");
explicit G4CascadeCheckBalance(const G4String& owner="G4CascadeCheckBalance");
G4CascadeCheckBalance(G4double relative, G4double absolute,
const char* owner="G4CascadeCheckBalance");
const G4String& owner="G4CascadeCheckBalance");
virtual ~G4CascadeCheckBalance() {};
void setOwner(const char* owner) { setName(owner); }
void setOwner(const G4String& owner) { setName(owner); }
void setLimits(G4double relative, G4double absolute) {
setRelativeLimit(relative);
@@ -31,6 +31,8 @@
// 20110917 Michael Kelsey
// 20110920 M. Kelsey -- Use environment variables to set momentum cuts for tuning,
// replace polymorphic argument lists with use of "ClusterCandidate"
// 20140116 M. Kelsey -- Move statics to const data members to avoid weird
// interactions with MT.
#ifndef G4CASCADE_COALESCENCE_HH
#define G4CASCADE_COALESCENCE_HH
@@ -60,10 +62,6 @@ private:
G4int verboseLevel; // Control diagnostic messages
static const G4double dpMaxDoublet; // Relative momenta for clusters
static const G4double dpMaxTriplet;
static const G4double dpMaxAlpha;
std::vector<ClusterCandidate> allClusters; // List of candidates found
std::set<size_t> triedClusters; // Hashes of combinatorics
std::set<size_t> usedNucleons; // List of converted nucleons
@@ -74,6 +72,10 @@ private:
ClusterCandidate thisCluster; // Reusable buffer for attempts
G4InuclNuclei thisLightIon; // Reusable construction buffer
const G4double dpMaxDoublet; // Relative momenta for clusters
const G4double dpMaxTriplet;
const G4double dpMaxAlpha;
// Processing stages -- search, construct, cleanup
void selectCandidates();
void createNuclei();
@@ -42,6 +42,7 @@
// 20130621 Move doConservationChecks to G4CascadeParameters; change
// explosion to use reference, add validateOutput() w/G4Fragment
// 20130622 Move fragment-handling functions to G4CascadeDeexciteBase
// 20140930 Change name from "const char*" to "const G4String"
#include "G4VCascadeCollider.hh"
@@ -61,7 +62,7 @@ class G4V3DNucleus;
class G4CascadeColliderBase : public G4VCascadeCollider {
public:
G4CascadeColliderBase(const char* name, G4int verbose=0);
G4CascadeColliderBase(const G4String& name, G4int verbose=0);
virtual ~G4CascadeColliderBase();
// For use with top-level Propagate to preload a set of secondaries
@@ -56,6 +56,8 @@
// Remove local verboseLevel; shadows base class data member.
// 20130501 M. Kelsey -- Add static initializer to created shared objects.
// 20130628 M. Kelsey -- Address Coverity warnings about copy operations.
// 20140116 M. Kelsey -- Move statics to const data members to avoid weird
// interactions with MT.
#ifndef G4CASCADEINTERFACE_H
#define G4CASCADEINTERFACE_H 1
@@ -157,8 +159,8 @@ private:
return (this != &right);
}
static const G4String randomFile; // Filename to capture random seeds
static const G4int maximumTries; // Number of iterations for inelastic
const G4String randomFile; // Filename to capture random seeds
const G4int maximumTries; // Number of iterations for inelastic
G4int numberOfTries;
@@ -30,6 +30,7 @@
// 20130621 M. Kelsey -- Add flag for CHECK_ECONS, replacing #ifdef's; add
// flag to use three-body momentum parametrizations
// 20130703 M. Kelsey -- Add flag for USE_PHASESPACE
// 20141030 M. Kelsey -- Add flag to enable direct pi-N absorption
#ifndef G4CascadeParamMessenger_hh
#define G4CascadeParamMessenger_hh
@@ -71,6 +72,7 @@ private:
G4UIcmdWithABool* balanceCmd;
G4UIcmdWithABool* usePreCoCmd;
G4UIcmdWithABool* doCoalCmd;
G4UIcmdWithABool* piNAbsCmd;
G4UIcmdWithABool* historyCmd;
G4UIcmdWithABool* use3BodyCmd;
G4UIcmdWithABool* usePSCmd;
@@ -31,6 +31,8 @@
// 20130308 M. Kelsey -- Add flag to use separate 3-body momentum generators
// 20130421 M. Kelsey -- Add flag for CHECK_ECONS, replacing #ifdef's
// 20130702 M. Kelsey -- Add flag to use N-body phase-space generator
// 20140311 G. Cosmo -- Implement standard (non-const) singleton pattern
// 20141030 M. Kelsey -- Add flag to enable direct pi-N absorption
#ifndef G4CascadeParameters_hh
#define G4CascadeParameters_hh 1
@@ -51,6 +53,7 @@ public:
static G4bool checkConservation() { return Instance()->CHECK_ECONS; }
static G4bool usePreCompound() { return Instance()->USE_PRECOMPOUND; }
static G4bool doCoalescence() { return Instance()->DO_COALESCENCE; }
static G4bool piNAbsorption() { return Instance()->PIN_ABSORPTION; }
static G4bool showHistory() { return Instance()->SHOW_HISTORY; }
static G4bool use3BodyMom() { return Instance()->USE_3BODYMOM; }
static G4bool usePhaseSpace() { return Instance()->USE_PHASESPACE; }
@@ -78,6 +81,7 @@ private: // Environment variable values, null pointers mean not set
const char* G4CASCADE_CHECK_ECONS;
const char* G4CASCADE_USE_PRECOMPOUND;
const char* G4CASCADE_DO_COALESCENCE;
const char* G4CASCADE_PIN_ABSORPTION;
const char* G4CASCADE_SHOW_HISTORY;
const char* G4CASCADE_USE_3BODYMOM;
const char* G4CASCADE_USE_PHASESPACE;
@@ -101,6 +105,7 @@ private: // Environment variable values, null pointers mean not set
G4bool CHECK_ECONS;
G4bool USE_PRECOMPOUND;
G4bool DO_COALESCENCE;
G4bool PIN_ABSORPTION;
G4bool SHOW_HISTORY;
G4bool USE_3BODYMOM;
G4bool USE_PHASESPACE;
@@ -126,6 +131,8 @@ private: // Singleton -- no public constructor
G4CascadeParamMessenger* messenger; // For access via UI commands
friend class G4CascadeParamMessenger;
static G4CascadeParameters* fpInstance;
};
#endif /* G4CascadeParameters_hh */
@@ -54,6 +54,8 @@
// 20130508 D. Wright -- Add muon capture, with absorption on quasideuterons
// 20130620 Address Coverity complaint about missing copy actions
// 20130628 Add function to split dibaryon into particle_kinds list
// 20141009 M. Kelsey -- Add pion absorption by single nucleons, with
// nuclear recoil. Improves pi- capture performance.
#ifndef G4ELEMENTARY_PARTICLE_COLLIDER_HH
#define G4ELEMENTARY_PARTICLE_COLLIDER_HH
@@ -77,6 +79,10 @@ public:
void collide(G4InuclParticle* bullet, G4InuclParticle* target,
G4CollisionOutput& output);
void setNucleusState(G4int a, G4int z) { // Nucleus to use for recoil
nucleusA = a; nucleusZ = z;
}
private:
G4int generateMultiplicity(G4int is, G4double ekin) const;
@@ -86,14 +92,23 @@ private:
G4InuclElementaryParticle* particle1,
G4InuclElementaryParticle* particle2);
// Pion (or photon) absorption on a dibaryon
void generateSCMpionAbsorption(G4double etot_scm,
G4InuclElementaryParticle* particle1,
G4InuclElementaryParticle* particle2);
// Muon absorption on a dibaryon (with outgoing neutrino)
void generateSCMmuonAbsorption(G4double etot_scm,
G4InuclElementaryParticle* particle1,
G4InuclElementaryParticle* particle2);
// Pion absorption on a single nucleon (charge exchange)
void generateSCMpionNAbsorption(G4double etot_scm,
G4InuclElementaryParticle* particle1,
G4InuclElementaryParticle* particle2);
G4bool pionNucleonAbsorption(G4double ekin) const;
G4bool splitQuasiDeuteron(G4int qdtype); // Fill kinds with NN components
void fillOutgoingMasses(); // Fill mass arrays from particle types
@@ -109,6 +124,9 @@ private:
std::vector<G4double> masses2;
std::vector<G4int> particle_kinds;
// Nuclear environment (to do pion-nucleon absorption)
G4int nucleusA, nucleusZ;
private:
// Copying of modules is forbidden
G4ElementaryParticleCollider(const G4ElementaryParticleCollider&);
@@ -44,6 +44,7 @@
// 20110922 M. Kelsey -- Add stream argument to printParticle() => print()
// 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings.
// 20130702 M. Kelsey -- Use static type classifiers in G4InuclParticleNames
// 20140310 M. Kelsey -- Fix constness in G4PD* passing
#ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
#define G4INUCL_ELEMENTARY_PARTICLE_HH
@@ -77,7 +78,8 @@ public:
// WARNING: This may create a particle without a valid type code!
G4InuclElementaryParticle(const G4LorentzVector& mom,
G4ParticleDefinition* pd, Model model=DefaultModel)
const G4ParticleDefinition* pd,
Model model=DefaultModel)
: G4InuclParticle(pd, mom, model) {}
// Copy and assignment constructors for use with std::vector<>
@@ -94,7 +96,7 @@ public:
void fill(G4double ekin, G4int ityp, Model model=DefaultModel);
// WARNING: This may create a particle without a valid type code!
void fill(const G4LorentzVector& mom, G4ParticleDefinition* pd,
void fill(const G4LorentzVector& mom, const G4ParticleDefinition* pd,
Model model=DefaultModel);
// Assignment and accessor functions
@@ -136,7 +138,7 @@ public:
protected:
// Convert internal type code to standard GEANT4 pointer
static G4ParticleDefinition* makeDefinition(G4int ityp);
static const G4ParticleDefinition* makeDefinition(G4int ityp);
};
#endif // G4INUCL_ELEMENTARY_PARTICLE_HH
@@ -38,6 +38,7 @@
// 20110919 M. Kelsey -- Move setDefinition code to .cc to allow null argument
// 20110922 M. Kelsey -- Add stream argument to printParticle() => print(),
// add operator<<().
// 20140310 M. Kelsey -- Fix constness in G4PD* passing
#ifndef G4INUCL_PARTICLE_HH
#define G4INUCL_PARTICLE_HH
@@ -129,7 +130,7 @@ public:
virtual void print(std::ostream& os) const;
G4ParticleDefinition* getDefinition() const {
const G4ParticleDefinition* getDefinition() const {
return pDP.GetDefinition();
}
@@ -143,20 +144,21 @@ public:
protected:
// Special constructors for subclasses to set particle type correctly
explicit G4InuclParticle(G4ParticleDefinition* pd, Model model=DefaultModel)
explicit G4InuclParticle(const G4ParticleDefinition* pd,
Model model=DefaultModel)
: modelId(model) { setDefinition(pd); }
// FIXME: Bertini code doesn't pass valid 4-vectors, so force mass value
// from supplied PartDefn, with required unit conversions
G4InuclParticle(G4ParticleDefinition* pd, const G4LorentzVector& mom,
G4InuclParticle(const G4ParticleDefinition* pd, const G4LorentzVector& mom,
Model model=DefaultModel);
// NOTE: Momentum forced along Z direction
G4InuclParticle(G4ParticleDefinition* pd, G4double ekin,
G4InuclParticle(const G4ParticleDefinition* pd, G4double ekin,
Model model=DefaultModel)
: pDP(pd,G4ThreeVector(0.,0.,1.),ekin*CLHEP::GeV/CLHEP::MeV), modelId(model) {}
void setDefinition(G4ParticleDefinition* pd);
void setDefinition(const G4ParticleDefinition* pd);
private:
G4DynamicParticle pDP; // Carries all the kinematics and info
@@ -72,6 +72,8 @@
// 20130808 M. Kelsey -- To avoid thread collisions, move static neutronEP
// and protonEP objects to const data members.
// 20131001 M. Kelsey -- Move QDinterp object to data member, thread local
// 20140116 M. Kelsey -- Move statics to const data members to avoid weird
// interactions with MT.
#ifndef G4NUCLEI_MODEL_HH
#define G4NUCLEI_MODEL_HH
@@ -294,32 +296,29 @@ private:
// Symbolic names for nuclear potentials
enum PotentialType { WoodsSaxon=0, Gaussian=1 };
// Parameters for nuclear structure
const G4double crossSectionUnits; // Scale from internal to natural units
const G4double radiusUnits;
const G4double skinDepth; // Fraction of radius for outer skin
const G4double radiusScale; // Coefficients for two-parameter fit
const G4double radiusScale2; // R = 1.16*cbrt(A) - 1.3456/cbrt(A)
const G4double radiusForSmall; // Average radius of light A<5 nuclei
const G4double radScaleAlpha; // Scaling factor R_alpha/R_small
const G4double fermiMomentum;
const G4double R_nucleon;
const G4double gammaQDscale; // Gamma/cluster scattering rescaling
// Cutoffs for extreme values
static const G4double small;
static const G4double large;
static const G4double piTimes4thirds; // FIXME: We should not be using this!
// Parameters for nuclear structure
static const G4double skinDepth;
static const G4double radiusScale; // Coefficients for two-parameter fit
static const G4double radiusScale2; // R = 1.16*cbrt(A) - 1.3456/cbrt(A)
static const G4double radiusForSmall; // Average radius of light A<5 nuclei
static const G4double radScaleAlpha; // Scaling factor R_alpha/R_small
static const G4double fermiMomentum;
static const G4double R_nucleon;
static const G4double alfa3[3], alfa6[6];
static const G4double pion_vp;
static const G4double alfa3[3], alfa6[6]; // Zone boundaries in radii
static const G4double pion_vp; // Flat potentials for pi, K, Y
static const G4double pion_vp_small;
static const G4double kaon_vp;
static const G4double hyperon_vp;
// Scale parameter for gamma-quasideuteron scattering
static const G4double gammaQDscale;
// FIXME: We should not be using this!
static const G4double piTimes4thirds;
static const G4double crossSectionUnits;
static const G4double radiusUnits;
// Neutrons and protons, for computing trajectory placements
const G4InuclElementaryParticle neutronEP;
const G4InuclElementaryParticle protonEP;
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: class containing numerically integrated angular distributions
// in the CM for pi0 p and pi0 n elastic scattering. Distributions
// are the average of pi+ p and pi- p elastic scattering taken from
// SAID phase shift calculations with Coulomb interactions turned
// off. Above 2.6 GeV, the average of pi+ p and pi- p elastic data
// is used.
//
#ifndef G4Pi0P2Pi0PAngDst_h
#define G4Pi0P2PPi0AngDst_h 1
#include "G4NumIntTwoBodyAngDst.hh"
class G4Pi0P2Pi0PAngDst : public G4NumIntTwoBodyAngDst<11,19> {
public:
G4Pi0P2Pi0PAngDst(G4int verbose = 0);
virtual ~G4Pi0P2Pi0PAngDst() {;}
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: class containing numerically integrated angular distributions
// in the CM for pi- p, pi+ n, pi0 p and pi0 n charge exchange.
// Below 2.6 GeV distributions are taken from SAID phase shift
// calculations with Coulomb interactions turned off. Above 2.6
// GeV, pi- p charge exchange scattering data are used.
//
#ifndef G4PimP2Pi0NAngDst_h
#define G4PimP2Pi0NAngDst_h 1
#include "G4NumIntTwoBodyAngDst.hh"
class G4PimP2Pi0NAngDst : public G4NumIntTwoBodyAngDst<11,19> {
public:
G4PimP2Pi0NAngDst(G4int verbose = 0);
virtual ~G4PimP2Pi0NAngDst() {;}
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: class containing numerically integrated angular distributions
// in the CM for pi- p and pi+ n elastic scattering. Below 2.6
// GeV distributions are taken from SAID phase shift calculations
// with Coulomb interactions turned off. Above 2.6 GeV, pp
// elastic scattering data are used.
//
#ifndef G4PimP2PimPAngDst_h
#define G4PimP2PPimAngDst_h 1
#include "G4NumIntTwoBodyAngDst.hh"
class G4PimP2PimPAngDst : public G4NumIntTwoBodyAngDst<11,19> {
public:
G4PimP2PimPAngDst(G4int verbose = 0);
virtual ~G4PimP2PimPAngDst() {;}
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: class containing numerically integrated angular distributions
// in the CM for pi+ p and pi- n elastic scattering. Below 2.6
// GeV distributions are taken from SAID phase shift calculations
// with Coulomb interactions turned off. Above 2.6 GeV, pp
// elastic scattering data are used.
//
#ifndef G4PipP2PipPAngDst_h
#define G4PipP2PPipAngDst_h 1
#include "G4NumIntTwoBodyAngDst.hh"
class G4PipP2PipPAngDst : public G4NumIntTwoBodyAngDst<11,19> {
public:
G4PipP2PipPAngDst(G4int verbose = 0);
virtual ~G4PipP2PipPAngDst() {;}
};
#endif
@@ -46,6 +46,10 @@ class G4GamP2PPi0AngDst;
class G4PP2PPAngDst;
class G4NP2NPAngDst;
class G4NuclNuclAngDst;
class G4Pi0P2Pi0PAngDst;
class G4PimP2Pi0NAngDst;
class G4PimP2PimPAngDst;
class G4PipP2PipPAngDst;
class G4PiNInelasticAngDst;
class G4HadNElastic1AngDst;
class G4HadNElastic2AngDst;
@@ -88,6 +92,11 @@ private:
G4PP2PPAngDst* ppAngDst; // pp, nn elastic
G4NP2NPAngDst* npAngDst; // np and pn elastic
G4NuclNuclAngDst* nnAngDst; // Y N elastic and inelastic
G4Pi0P2Pi0PAngDst* pi0pAngDst; // pi0 p, pi0 n elastic
G4PimP2Pi0NAngDst* pipCXAngDst; // pi- p, pi+ n, pi0 p, pi0 n charge exchange
G4PimP2PimPAngDst* pimpAngDst; // pi- p, pi+ n elastic
G4PipP2PipPAngDst* pippAngDst; // pi+ p, pi- n elastic
G4PiNInelasticAngDst* qxAngDst; // pi N charge/strangeness exchange
G4HadNElastic1AngDst* hn1AngDst; // pi+p and related elastic scattering
G4HadNElastic2AngDst* hn2AngDst; // pi-p and related elastic scattering
@@ -31,6 +31,7 @@
// 20100711 M. Kelsey -- Allow name to be changed after ctor, by self
// 20100714 M. Kelsey -- Move concrete functions to G4CascadeColliderBase
// 20130620 Address Coverity complaint about missing copy actions
// 20140930 Change name from "const char*" to "const G4String"
#include "globals.hh"
@@ -39,7 +40,7 @@ class G4CollisionOutput;
class G4VCascadeCollider {
public:
G4VCascadeCollider(const char* name, G4int verbose=0);
G4VCascadeCollider(const G4String& name, G4int verbose=0);
virtual ~G4VCascadeCollider() {}
@@ -49,10 +50,10 @@ public:
virtual void setVerboseLevel(G4int verbose=0) { verboseLevel=verbose; }
protected:
const char* theName;
G4String theName;
G4int verboseLevel;
virtual void setName(const char* name) { theName = name; }
virtual void setName(const G4String& name) { theName = name; }
private:
// Copying of modules is forbidden
@@ -33,6 +33,7 @@
// 20130621 Implement collide() here to throw exception, use reference
// instead of pointer for deExcite()
// 20130622 Promote to direct base of G4VCascadeCollider
// 20140930 Change name from "const char*" to "const G4String"
#include "G4VCascadeCollider.hh"
#include "globals.hh"
@@ -44,7 +45,7 @@ class G4Fragment;
class G4VCascadeDeexcitation : public G4VCascadeCollider {
public:
G4VCascadeDeexcitation(const char* name) : G4VCascadeCollider(name) {}
G4VCascadeDeexcitation(const G4String& name) : G4VCascadeCollider(name) {}
virtual ~G4VCascadeDeexcitation() {}
// Standard Collider interface should not be used (will end job)
@@ -57,7 +57,6 @@ include_directories(${CMAKE_SOURCE_DIR}/source/particles/shortlived/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/cascade/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/utils/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fermi_breakup/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/handler/include)
@@ -186,7 +185,11 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_bert_cascade
G4ParamExpTwoBodyAngDst.icc
G4ParticleLargerBeta.hh
G4ParticleLargerEkin.hh
G4Pi0P2Pi0PAngDst.hh
G4PiNInelasticAngDst.hh
G4PimP2Pi0NAngDst.hh
G4PimP2PimPAngDst.hh
G4PipP2PipPAngDst.hh
G4PionNucSampler.hh
G4PP2PPAngDst.hh
G4PreCompoundDeexcitation.hh
@@ -287,7 +290,11 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_bert_cascade
G4NuclNuclAngDst.cc
G4NuclWatcher.cc
G4NucleiModel.cc
G4Pi0P2Pi0PAngDst.cc
G4PiNInelasticAngDst.cc
G4PimP2Pi0NAngDst.cc
G4PimP2PimPAngDst.cc
G4PipP2PipPAngDst.cc
G4PionNucSampler.cc
G4PP2PPAngDst.cc
G4PreCompoundDeexcitation.cc
@@ -122,6 +122,8 @@ G4double G4CascadParticle::getPathToTheNextZone(G4double rz_in,
if (std::abs(pp) < 1e-9) { // Cut-off for "at rest" is 1 eV momentum
if (verboseLevel > 3) G4cout << " at rest; path length is zero" << G4endl;
if (current_zone == 0) movingIn = false; // Allow 'stuck' to escape
return 0.;
}
@@ -39,8 +39,10 @@
// 20111007 M. Kelsey -- Add new gamma-n and gamma-p tables.
// 20130129 M. Kelsey -- Drop load-on-demand interfaces, fill in ctor
// 20130429 M. Kelsey -- Change instance to thread-local pointer.
// 20141121 Use G4AutoDelete to avoid end-of-thread memory leaks
#include "G4CascadeChannelTables.hh"
#include "G4AutoDelete.hh"
#include "G4CascadeChannel.hh"
#include "G4CascadeGamNChannel.hh"
#include "G4CascadeGamPChannel.hh"
@@ -87,7 +89,11 @@ using namespace G4InuclParticleNames;
G4ThreadLocal G4CascadeChannelTables* G4CascadeChannelTables::theInstance = 0;
const G4CascadeChannelTables& G4CascadeChannelTables::instance() {
if (!theInstance) theInstance = new G4CascadeChannelTables;
if (!theInstance) {
theInstance = new G4CascadeChannelTables;
G4AutoDelete::Register(theInstance);
}
return *theInstance;
}
@@ -49,6 +49,7 @@
// or abs. to pass (instead of requiring both)
// 20121002 M. Kelsey -- Add strangeness check (useful for Omega- beam)
// 20130621 Add interface to take G4Fragment input instead of G4InuclNuclei.
// 20140930 Change name from "const char*" to "const G4String"
#include "G4CascadeCheckBalance.hh"
#include "globals.hh"
@@ -65,7 +66,7 @@
const G4double G4CascadeCheckBalance::tolerance = 1e-6; // How small is zero?
G4CascadeCheckBalance::G4CascadeCheckBalance(const char* owner)
G4CascadeCheckBalance::G4CascadeCheckBalance(const G4String& owner)
: G4VCascadeCollider(owner), relativeLimit(G4CascadeCheckBalance::tolerance),
absoluteLimit(G4CascadeCheckBalance::tolerance), initialBaryon(0),
finalBaryon(0), initialCharge(0), finalCharge(0), initialStrange(0),
@@ -73,7 +74,7 @@ G4CascadeCheckBalance::G4CascadeCheckBalance(const char* owner)
G4CascadeCheckBalance::G4CascadeCheckBalance(G4double relative,
G4double absolute,
const char* owner)
const G4String& owner)
: G4VCascadeCollider(owner), relativeLimit(relative),
absoluteLimit(absolute), initialBaryon(0), finalBaryon(0),
initialCharge(0), finalCharge(0), initialStrange(0),
@@ -143,8 +144,8 @@ void G4CascadeCheckBalance::collide(const G4Fragment& fragment,
// Copy initial state directly from fragment (no bullet/target sums)
initial = fragment.GetMomentum();
initialCharge = G4int(fragment.GetZ());
initialBaryon = G4int(fragment.GetA());
initialCharge = fragment.GetZ_asInt();
initialBaryon = fragment.GetA_asInt();
initialStrange = 0; // No hypernuclei at present
// Final state totals are computed for us
@@ -64,19 +64,14 @@
typedef std::vector<G4InuclElementaryParticle> hadronList;
typedef hadronList::const_iterator hadronIter;
// Maximum relative momentum (in Bertini GeV) for nucleons in each cluster type
const G4double G4CascadeCoalescence::dpMaxDoublet = G4CascadeParameters::dpMaxDoublet();
const G4double G4CascadeCoalescence::dpMaxTriplet = G4CascadeParameters::dpMaxTriplet();
const G4double G4CascadeCoalescence::dpMaxAlpha = G4CascadeParameters::dpMaxAlpha();
// Constructor and Destructor
G4CascadeCoalescence::G4CascadeCoalescence(G4int verbose)
: verboseLevel(verbose), thisFinalState(0), thisHadrons(0) {}
: verboseLevel(verbose), thisFinalState(0), thisHadrons(0),
dpMaxDoublet(G4CascadeParameters::dpMaxDoublet()),
dpMaxTriplet(G4CascadeParameters::dpMaxTriplet()),
dpMaxAlpha(G4CascadeParameters::dpMaxAlpha()) {}
G4CascadeCoalescence::~G4CascadeCoalescence() {}
@@ -38,6 +38,7 @@
// before instantiating CheckBalance; change explosion() to
// use reference, add validateOutput() w/G4Fragment
// 20130622 Move fragment-handling functions to G4CascadeDeexciteBase
// 20140930 Change name from "const char*" to "const G4String"
#include "G4CascadeColliderBase.hh"
#include "G4CascadeCheckBalance.hh"
@@ -54,7 +55,7 @@ using namespace G4InuclSpecialFunctions;
// Constructor and destructor
G4CascadeColliderBase::G4CascadeColliderBase(const char* name, G4int verbose)
G4CascadeColliderBase::G4CascadeColliderBase(const G4String& name, G4int verbose)
: G4VCascadeCollider(name, verbose), balance(0) {
if (G4CascadeParameters::checkConservation())
balance = new G4CascadeCheckBalance(name);
@@ -40,6 +40,7 @@
// from first to last, while three-body starts with the last.
// 20130702 M. Kelsey: Copy phase-space algorithm from Kopylov; use if
// runtime envvar G4CASCADE_USE_PHASESPACE is set
// 20140627 BUG FIX: Use ".c_str()" in diagnostics to avoid IBM XL error.
#include "G4CascadeFinalStateAlgorithm.hh"
#include "G4CascadeParameters.hh"
@@ -149,8 +150,8 @@ void G4CascadeFinalStateAlgorithm::ChooseGenerators(G4int is, G4int fs) {
}
if (GetVerboseLevel()>1) {
G4cout << " " << (momDist?momDist->GetName():"") << " "
<< (angDist?angDist->GetName():"") << G4endl;
G4cout << " " << (momDist?momDist->GetName().c_str():"") << " "
<< (angDist?angDist->GetName().c_str():"") << G4endl;
}
}
@@ -97,6 +97,9 @@
// 20120822 M. Kelsey -- Move envvars to G4CascadeParameters.
// 20130508 D. Wright -- Add support for muon capture
// 20130804 M. Kelsey -- Fix bug #1513 -- "(Z=1)" in boolean expression
// 20140116 M. Kelsey -- Move statics to const data members to avoid weird
// interactions with MT.
// 20140929 M. Kelsey -- Explicitly call useCascadeDeexcitation() in ctor
#include <cmath>
#include <iostream>
@@ -135,27 +138,22 @@ typedef std::vector<G4InuclElementaryParticle>::const_iterator particleIterator;
typedef std::vector<G4InuclNuclei>::const_iterator nucleiIterator;
// Filename to capture random seed, if specified by user at runtime
const G4String G4CascadeInterface::randomFile = G4CascadeParameters::randomFile();
// Maximum number of iterations allowed for inelastic collision attempts
const G4int G4CascadeInterface::maximumTries = 20;
// Constructor and destrutor
G4CascadeInterface::G4CascadeInterface(const G4String& name)
: G4VIntraNuclearTransportModel(name), numberOfTries(0),
: G4VIntraNuclearTransportModel(name),
randomFile(G4CascadeParameters::randomFile()),
maximumTries(20), numberOfTries(0),
collider(new G4InuclCollider), balance(new G4CascadeCheckBalance(name)),
bullet(0), target(0), output(new G4CollisionOutput) {
SetEnergyMomentumCheckLevels(5*perCent, 10*MeV);
balance->setLimits(5*perCent, 10*MeV/GeV); // Bertini internal units
// Description(); // Model description
this->SetVerboseLevel(G4CascadeParameters::verbose());
if (G4CascadeParameters::usePreCompound()) usePreCompoundDeexcitation();
if (G4CascadeParameters::usePreCompound())
usePreCompoundDeexcitation();
else
useCascadeDeexcitation();
}
G4CascadeInterface::~G4CascadeInterface() {
@@ -735,18 +733,19 @@ G4bool G4CascadeInterface::retryInelasticNucleus() const {
<< G4endl;
#endif
return ( ((numberOfTries < maximumTries) &&
(npart != 0) &&
return ( (numberOfTries < maximumTries) &&
( ((npart != 0) &&
#ifdef G4CASCADE_COULOMB_DEV
(coulombBarrierViolation() && npart+nfrag > 2)
(coulombBarrierViolation() && npart+nfrag > 2)
#else
(npart+nfrag < 3 && firstOut == bullet->getDefinition())
(npart+nfrag < 3 && firstOut == bullet->getDefinition())
#endif
)
)
#ifndef G4CASCADE_SKIP_ECONS
|| (!balance->okay())
|| (!balance->okay())
#endif
);
)
);
}
@@ -30,6 +30,7 @@
// 20130621 M. Kelsey -- Add flag for CHECK_ECONS, replacing #ifdef's; add
// flag to use three-body momentum parametrizations
// 20130703 M. Kelsey -- Add flag for USE_PHASESPACE
// 20141030 M. Kelsey -- Add flag to enable direct pi-N absorption
#include "G4CascadeParamMessenger.hh"
#include "G4CascadeParameters.hh"
@@ -61,6 +62,8 @@ G4CascadeParamMessenger::G4CascadeParamMessenger(G4CascadeParameters* params)
"Use PreCompoundModel for nuclear de-excitation");
doCoalCmd = CreateCommand<G4UIcmdWithABool>("doCoalescence",
"Apply final-state nucleon clustering");
piNAbsCmd = CreateCommand<G4UIcmdWithABool>("piNAbsorption",
"Allow pion absorption on single nucleon");
historyCmd = CreateCommand<G4UIcmdWithABool>("showHistory",
"Collect and report full structure of cascade");
use3BodyCmd = CreateCommand<G4UIcmdWithABool>("use3BodyMom",
@@ -101,6 +104,7 @@ G4CascadeParamMessenger::~G4CascadeParamMessenger() {
delete reportCmd;
delete usePreCoCmd;
delete doCoalCmd;
delete piNAbsCmd;
delete historyCmd;
delete use3BodyCmd;
delete usePSCmd;
@@ -162,6 +166,9 @@ void G4CascadeParamMessenger::SetNewValue(G4UIcommand* cmd, G4String arg) {
if (cmd == doCoalCmd)
theParams->G4CASCADE_DO_COALESCENCE = StoB(arg) ? strdup(arg.c_str()) : 0;
if (cmd == piNAbsCmd)
theParams->G4CASCADE_PIN_ABSORPTION = StoB(arg) ? strdup(arg.c_str()) : 0;
if (cmd == historyCmd)
theParams->G4CASCADE_SHOW_HISTORY = StoB(arg) ? strdup(arg.c_str()) : 0;
@@ -31,9 +31,17 @@
// 20130308 M. Kelsey -- Add flag to use separate 3-body momentum generators
// 20130421 M. Kelsey -- Add flag for CHECK_ECONS, replacing #ifdef's
// 20130702 M. Kelsey -- Add flag to use N-body phase-space generator
// 20140311 G. Cosmo -- Implement standard (non-const) singleton pattern
// 20140929 M. Kelsey -- Enable some parameters as default true (must be set
// '0' for false): PreCompound, phase-space, clustering,
// trailing effect
// 20141111 M. Kelsey -- Revert defaults for PreCompound, phase-space,
// and trailing effect.
// 20141121 Use G4AutoDelete to avoid end-of-thread memory leaks
#include "G4CascadeParameters.hh"
#include "G4CascadeParamMessenger.hh"
#include "G4AutoDelete.hh"
#include <stdlib.h>
#include <iostream>
using std::endl;
@@ -41,9 +49,15 @@ using std::endl;
// Singleton accessor
G4CascadeParameters* G4CascadeParameters::fpInstance = 0;
const G4CascadeParameters* G4CascadeParameters::Instance() {
static const G4CascadeParameters theInstance;
return &theInstance;
if (!fpInstance) {
fpInstance = new G4CascadeParameters;
G4AutoDelete::Register(fpInstance);
}
return fpInstance;
}
@@ -56,6 +70,7 @@ G4CascadeParameters::G4CascadeParameters()
G4CASCADE_CHECK_ECONS(getenv("G4CASCADE_CHECK_ECONS")),
G4CASCADE_USE_PRECOMPOUND(getenv("G4CASCADE_USE_PRECOMPOUND")),
G4CASCADE_DO_COALESCENCE(getenv("G4CASCADE_DO_COALESCENCE")),
G4CASCADE_PIN_ABSORPTION(getenv("G4CASCADE_PIN_ABSORPTION")),
G4CASCADE_SHOW_HISTORY(getenv("G4CASCADE_SHOW_HISTORY")),
G4CASCADE_USE_3BODYMOM(getenv("G4CASCADE_USE_3BODYMOM")),
G4CASCADE_USE_PHASESPACE(getenv("G4CASCADE_USE_PHASESPACE")),
@@ -80,11 +95,15 @@ G4CascadeParameters::G4CascadeParameters()
void G4CascadeParameters::Initialize() {
VERBOSE_LEVEL = (G4CASCADE_VERBOSE ? atoi(G4CASCADE_VERBOSE) : 0);
CHECK_ECONS = (0!=G4CASCADE_CHECK_ECONS);
USE_PRECOMPOUND = (0!=G4CASCADE_USE_PRECOMPOUND);
DO_COALESCENCE = (0!=G4CASCADE_DO_COALESCENCE);
USE_PRECOMPOUND = (0!=G4CASCADE_USE_PRECOMPOUND &&
G4CASCADE_USE_PRECOMPOUND[0]!='0');
DO_COALESCENCE = (0==G4CASCADE_DO_COALESCENCE ||
G4CASCADE_DO_COALESCENCE[0]!='0');
PIN_ABSORPTION = (0!=G4CASCADE_PIN_ABSORPTION);
SHOW_HISTORY = (0!=G4CASCADE_SHOW_HISTORY);
USE_3BODYMOM = (0!=G4CASCADE_USE_3BODYMOM);
USE_PHASESPACE = (0!=G4CASCADE_USE_PHASESPACE);
USE_PHASESPACE = (0!=G4CASCADE_USE_PHASESPACE &&
G4CASCADE_USE_PHASESPACE[0]!='0');
RANDOM_FILE = (G4CASCADE_RANDOM_FILE ? G4CASCADE_RANDOM_FILE : "");
BEST_PAR = (0!=G4NUCMODEL_USE_BEST);
TWOPARAM_RADIUS = (0!=G4NUCMODEL_RAD_2PAR);
@@ -95,7 +114,7 @@ void G4CascadeParameters::Initialize() {
RADIUS_ALPHA = (G4NUCMODEL_RAD_ALPHA ? strtod(G4NUCMODEL_RAD_ALPHA,0)
: (BEST_PAR?0.84:0.70));
RADIUS_TRAILING = ((G4NUCMODEL_RAD_TRAILING ? strtod(G4NUCMODEL_RAD_TRAILING,0)
: (BEST_PAR?0.70:0.0)) * RADIUS_SCALE);
: 0.) * RADIUS_SCALE);
FERMI_SCALE = ((G4NUCMODEL_FERMI_SCALE ? strtod(G4NUCMODEL_FERMI_SCALE,0)
: (BEST_PAR?0.685:(1.932/OLD_RADIUS_UNITS))) * RADIUS_SCALE);
XSEC_SCALE = (G4NUCMODEL_XSEC_SCALE ? strtod(G4NUCMODEL_XSEC_SCALE,0)
@@ -122,6 +141,8 @@ void G4CascadeParameters::DumpConfig(std::ostream& os) const {
os << "G4CASCADE_USE_PRECOMPOUND = " << G4CASCADE_USE_PRECOMPOUND << endl;
if (G4CASCADE_DO_COALESCENCE)
os << "G4CASCADE_DO_COALESCENCE = " << G4CASCADE_DO_COALESCENCE << endl;
if (G4CASCADE_PIN_ABSORPTION)
os << "G4CASCADE_PIN_ABSORPTION = " << G4CASCADE_PIN_ABSORPTION << endl;
if (G4CASCADE_SHOW_HISTORY)
os << "G4CASCADE_SHOW_HISTORY = " << G4CASCADE_SHOW_HISTORY << endl;
if (G4CASCADE_USE_3BODYMOM)
@@ -160,7 +160,7 @@ void G4CollisionOutput::addOutgoingParticles(const G4ReactionProductVector* rpro
G4ReactionProductVector::const_iterator j;
for (j=rproducts->begin(); j!=rproducts->end(); ++j) {
G4ParticleDefinition* pd = (*j)->GetDefinition();
const G4ParticleDefinition* pd = (*j)->GetDefinition();
G4int type = G4InuclElementaryParticle::type(pd);
// FIXME: Momentum returned by value; extra copying here!
@@ -101,10 +101,15 @@
// reduce nesting and replicated code in collide().
// 20130508 D. Wright -- Implement muon capture
// 20130511 M. Kelsey -- Check for neutrinos and skip them in ::collide()
// 20141009 M. Kelsey -- Add pion absorption by single nucleons, with
// nuclear recoil. Improves pi- capture performance.
// 20141030 M. Kelsey -- Check flag for whether to do pi-N absorption
// 20141201 M. Kelsey -- Check for null vector return from G4GDecay3
#include "G4ElementaryParticleCollider.hh"
#include "G4CascadeChannel.hh"
#include "G4CascadeChannelTables.hh"
#include "G4CascadeParameters.hh"
#include "G4CollisionOutput.hh"
#include "G4GDecay3.hh"
#include "G4InuclParticleNames.hh"
@@ -128,7 +133,8 @@ typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
G4ElementaryParticleCollider::G4ElementaryParticleCollider()
: G4CascadeColliderBase("G4ElementaryParticleCollider") {;}
: G4CascadeColliderBase("G4ElementaryParticleCollider"),
nucleusA(0), nucleusZ(0) {;}
void
@@ -196,7 +202,12 @@ G4ElementaryParticleCollider::collide(G4InuclParticle* bullet,
G4double ekin = convertToSCM.getKinEnergyInTheTRS();
G4double etot_scm = convertToSCM.getTotalSCMEnergy();
generateSCMfinalState(ekin, etot_scm, particle1, particle2);
// SPECIAL: Very low energy pions may be absorbed by a nucleon
if (pionNucleonAbsorption(ekin)) {
generateSCMpionNAbsorption(etot_scm, particle1, particle2);
} else {
generateSCMfinalState(ekin, etot_scm, particle1, particle2);
}
}
// Generate pion or photon collision with quasi-deuteron
@@ -470,6 +481,14 @@ G4ElementaryParticleCollider::generateSCMmuonAbsorption(G4double etot_scm,
G4GDecay3 breakup(etot_scm, masses[0], masses[1], masses[2]);
std::vector<G4ThreeVector> theMomenta = breakup.GetThreeBodyMomenta();
if (theMomenta.empty()) {
G4cerr << " generateSCMmuonAbsorption: GetThreeBodyMomenta() failed"
<< " for " << type2 << " dibaryon" << G4endl;
particle_kinds.clear();
masses.clear();
return;
}
for (size_t i=0; i<3; i++) {
scm_momentums[i].setVectM(theMomenta[i], masses[i]);
particles[i].fill(scm_momentums[i], particle_kinds[i], G4InuclParticle::EPCollider);
@@ -477,6 +496,102 @@ G4ElementaryParticleCollider::generateSCMmuonAbsorption(G4double etot_scm,
}
// generate nucleons momenta for pion absorption by single nucleon
void
G4ElementaryParticleCollider::generateSCMpionNAbsorption(G4double etot_scm,
G4InuclElementaryParticle* particle1,
G4InuclElementaryParticle* particle2) {
if (verboseLevel > 3)
G4cout << " >>> G4ElementaryParticleCollider::generateSCMpionNAbsorption"
<< G4endl;
particles.clear(); // Initialize buffers for this event
particles.resize(1);
particle_kinds.clear();
G4int type1 = particle1->type();
G4int type2 = particle2->type();
// Ensure that single-nucleon absportion is valid (charge exchangeable)
if ((type1*type2 != pim*pro && type1*type2 != pip*neu)) {
G4cerr << " pion-nucleon absorption: "
<< particle1->getDefinition()->GetParticleName() << " + "
<< particle2->getDefinition()->GetParticleName() << " -> ?"
<< G4endl;
return;
}
// Get outgoing nucleon type using charge exchange
// Proton code is 1, neutron code is 2, so 3-# swaps them
G4int ntype = (particle2->nucleon() ? type2 : type1);
G4int outType = 3 - ntype;
particle_kinds.push_back(outType);
fillOutgoingMasses();
// Get mass of residual nucleus (2-ntype = 1 for proton, 0 for neutron)
G4double mRecoil =
G4InuclNuclei::getNucleiMass(nucleusA-1, nucleusZ-(2-ntype));
G4double mRecoil2 = mRecoil*mRecoil;
// Recompute Ecm to include nucleus (for recoil kinematics)
G4LorentzVector vsum(0.,0.,0.,mRecoil);
vsum += particle1->getMomentum() + particle2->getMomentum();
etot_scm = vsum.m();
// Two-body kinematics (nucleon against nucleus)
G4double a = 0.5 * (etot_scm*etot_scm - masses2[0] - mRecoil2);
G4double pmod = std::sqrt((a*a - masses2[0]*mRecoil2)
/ (masses2[0] + mRecoil2 + 2.0*a));
G4LorentzVector mom1 = generateWithRandomAngles(pmod, masses[0]);
if (verboseLevel > 3) {
G4cout << " outgoing type " << outType << " recoiling on nuclear mass "
<< mRecoil << " a " << a << " p(SCM) " << pmod << " Ekin "
<< mom1.e()-masses[0] << G4endl;
}
// Nuclear recoil four momentum, for boosting back
G4LorentzVector mom2;
mom2.setVectM(-mom1.vect(), mRecoil);
mom1.boost(-mom2.boostVector());
if (verboseLevel > 3) {
G4cout << " after nuclear recoil p " << mom1.rho() << " Ekin "
<< mom1.e()-masses[0] << G4endl;
}
// Fill only the ejected nucleon
particles[0].fill(mom1, particle_kinds[0], G4InuclParticle::EPCollider);
}
// Evaluate whether interaction is candidate for absorption on nucleon
G4bool
G4ElementaryParticleCollider::pionNucleonAbsorption(G4double ekin) const {
if (!G4CascadeParameters::piNAbsorption()) return false;
if (verboseLevel > 3)
G4cout << " >>> G4ElementaryParticleCollider::pionNucleonAbsorption ?"
<< " ekin " << ekin << " is " << interCase.hadrons() << G4endl;
const G4double mpi0 = G4InuclElementaryParticle::getParticleMass(pionZero);
// Absorption occurs only for pi- p -> n, or pi+ n -> p
// Restrict to "very slow" pions, to allow for some normal scattering
G4bool isAbsorbable = ((interCase.hadrons() == pim*pro ||
interCase.hadrons() == pip*neu)
&& ekin < 0.5*mpi0);
// FIXME: Should have an effective cross-section to throw random here
return isAbsorbable;
}
// generate constituents of dibaryon for "explosion"
G4bool G4ElementaryParticleCollider::splitQuasiDeuteron(G4int qdtype) {
@@ -33,6 +33,7 @@
// GDECA3 of Geant3
//
// 20130620 Address Coverity #51433, initializing all data members
// 20141201 Fix error message text to show correct class name
#include "G4GDecay3.hh"
#include "G4PhysicalConstants.hh"
@@ -129,7 +130,7 @@ std::vector<G4ThreeVector> G4GDecay3::GetThreeBodyMomenta()
pVect.push_back(pDaughter2*direction2);
} else {
G4cerr << "G4GDecay::GetThreeBodyMomenta: " << loopMax
G4cerr << "G4GDecay3::GetThreeBodyMomenta: " << loopMax
<< " or more loops in momentum magnitude calculation " << G4endl;
}
@@ -113,6 +113,8 @@
// 20121205 M. Kelsey -- In processSecondary(), set generation to 1, as these
// particles are not true projectiles, but already embedded.
// 20130304 M. Kelsey -- Use new G4CascadeHistory to dump cascade structure
// 20140310 M. Kelsey -- (Bug #1584) Release memory allocated by DecayIt()
// 20140409 M. Kelsey -- Use const G4ParticleDefinition* everywhere
#include <algorithm>
@@ -745,7 +747,7 @@ void G4IntraNucleiCascader::processSecondary(const G4KineticTrack* ktrack) {
if (!ktrack) return; // Sanity check
// Get particle type to determine whether to keep or release
G4ParticleDefinition* kpd = ktrack->GetDefinition();
const G4ParticleDefinition* kpd = ktrack->GetDefinition();
if (!kpd) return;
G4int ktype = G4InuclElementaryParticle::type(kpd);
@@ -783,7 +785,7 @@ void G4IntraNucleiCascader::processSecondary(const G4KineticTrack* ktrack) {
// Transfer unusable pre-cascade secondaries directly to output
void G4IntraNucleiCascader::releaseSecondary(const G4KineticTrack* ktrack) {
G4ParticleDefinition* kpd = ktrack->GetDefinition();
const G4ParticleDefinition* kpd = ktrack->GetDefinition();
if (verboseLevel > 1) {
G4cout << " >>> G4IntraNucleiCascader::releaseSecondary "
@@ -791,7 +793,7 @@ void G4IntraNucleiCascader::releaseSecondary(const G4KineticTrack* ktrack) {
}
// Convert light ion into nucleus on fragment list
if (dynamic_cast<G4Ions*>(kpd)) {
if (dynamic_cast<const G4Ions*>(kpd)) {
// Use resize() and fill() to avoid memory churn
output.getOutgoingNuclei().resize(output.numberOfOutgoingNuclei()+1);
G4InuclNuclei& inucl = output.getOutgoingNuclei().back();
@@ -900,4 +902,6 @@ decayTrappedParticle(const G4CascadParticle& trapped) {
output.addOutgoingParticle(idaugEP);
}
}
delete daughters; // Clean up memory created by DecayIt()
}
@@ -62,6 +62,9 @@
// 20111003 M. Kelsey -- Prepare for gamma-N interactions by checking for
// final-state tables instead of particle "isPhoton()"
// 20130621 M. Kelsey -- Pass G4Fragment to de-excitation modules directly
// 20140929 M. Kelsey -- Make PreCompound the default de-excitation
// 20141111 M. Kelsey -- Revert default use of PreCompound; replace
// G4Fragment::GetA() call with GetA_asInt().
#include "G4InuclCollider.hh"
#include "G4CascadeChannelTables.hh"
@@ -80,7 +83,7 @@ G4InuclCollider::G4InuclCollider()
: G4CascadeColliderBase("G4InuclCollider"),
theElementaryParticleCollider(new G4ElementaryParticleCollider),
theIntraNucleiCascader(new G4IntraNucleiCascader),
theDeexcitation(new G4CascadeDeexcitation) {}
theDeexcitation(new G4PreCompoundDeexcitation) {}
G4InuclCollider::~G4InuclCollider() {
delete theElementaryParticleCollider;
@@ -305,7 +308,7 @@ void G4InuclCollider::rescatter(G4InuclParticle* bullet,
void G4InuclCollider::deexcite(const G4Fragment& fragment,
G4CollisionOutput& globalOutput) {
if (fragment.GetA() <= 1) return; // Nothing real to be de-excited
if (fragment.GetA_asInt() <= 1) return; // Nothing real to be de-excited
if (verboseLevel) G4cout << " >>> G4InuclCollider::deexcite" << G4endl;
@@ -39,6 +39,7 @@
// 20110922 M. Kelsey -- Add stream argument to printParticle() => print()
// 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings.
// 20130508 D. Wright -- Add lepton construction, use wrapper header
// 20140310 M. Kelsey -- Fix constness in G4PD* passing
#include "G4InuclElementaryParticle.hh"
@@ -54,7 +55,7 @@
using namespace G4InuclParticleNames;
G4ParticleDefinition*
const G4ParticleDefinition*
G4InuclElementaryParticle::makeDefinition(G4int ityp) {
switch(ityp) {
case proton: return G4Proton::Definition(); break;
@@ -192,7 +193,7 @@ void G4InuclElementaryParticle::fill(G4double ekin, G4int ityp,
}
void G4InuclElementaryParticle::fill(const G4LorentzVector& mom,
G4ParticleDefinition* pd,
const G4ParticleDefinition* pd,
G4InuclParticle::Model model) {
setDefinition(pd);
setMomentum(mom);
@@ -209,12 +210,12 @@ G4InuclElementaryParticle::operator=(const G4InuclElementaryParticle& right) {
G4int G4InuclElementaryParticle::getStrangeness(G4int ityp) {
G4ParticleDefinition* pd = makeDefinition(ityp);
const G4ParticleDefinition* pd = makeDefinition(ityp);
return pd ? (pd->GetQuarkContent(3) - pd->GetAntiQuarkContent(3)) : 0;
}
G4double G4InuclElementaryParticle::getParticleMass(G4int ityp) {
G4ParticleDefinition* pd = makeDefinition(ityp);
const G4ParticleDefinition* pd = makeDefinition(ityp);
return pd ? pd->GetPDGMass()*MeV/GeV : 0.0; // From G4 to Bertini units
}
@@ -40,6 +40,7 @@
// 20100924 M. Kelsey -- Migrate to "OutgoingNuclei" names in CollisionOutput
// 20110728 M. Kelsey -- Fix Coverity #28776, remove return after throw.
// 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings.
// 20140310 M. Kelsey -- *TEMPORARY* const-cast G4PD* for G4Fragment ctor.
#include <numeric>
@@ -153,11 +154,11 @@ G4FragmentVector* G4InuclEvaporation::BreakItUp(const G4Fragment &theNucleus) {
G4LorentzVector vlab = ipart->getMomentum().boost(boostToLab);
// TEMPORARY: Remove constness on PD until G4Fragment is fixed
theResult->push_back( new G4Fragment(vlab, ipart->getDefinition()) );
}
}
// G4cout << "# fragments " << output.getOutgoingNuclei().size() << G4endl;
if (!outgoingNuclei.empty()) {
nucleiIterator ifrag = outgoingNuclei.begin();
for (i=1; ifrag != outgoingNuclei.end(); ifrag++) {
@@ -178,6 +179,5 @@ G4FragmentVector* G4InuclEvaporation::BreakItUp(const G4Fragment &theNucleus) {
}
}
//G4cout << ">>>> G4InuclEvaporation::BreakItUp end " << G4endl;
return theResult;
}
@@ -52,6 +52,7 @@
// 20130314 M. Kelsey -- Use G4IonList typedef for fragment map, encapsulate
// it in a static function with mutexes.
// 20130620 M. Kelsey -- Address Coverity #37503, check self in op=()
// 20140523 M. Kelsey -- Avoid FPE in setExcitationEnergy() for zero Ekin
#include "G4InuclNuclei.hh"
#include "G4AutoLock.hh"
@@ -184,8 +185,9 @@ void G4InuclNuclei::setExitationEnergy(G4double e) {
G4double emass = getNucleiMass() + e*MeV/GeV; // From Bertini to G4 units
// Directly compute new kinetic energy from old
G4double ekin_new = std::sqrt(emass*emass + ekin*(2.*getMass()+ekin)) - emass;
// Safety check -- if zero energy, don't do computation
G4double ekin_new = (ekin == 0.) ? 0.
: std::sqrt(emass*emass + ekin*(2.*getMass()+ekin)) - emass;
setMass(emass); // Momentum is computed from mass and Ekin
setKineticEnergy(ekin_new);
@@ -32,6 +32,7 @@
// 20130620 M. Kelsey -- Address Coverity #37504, check self in op=()
// 20130806 M. Kelsey -- Per A. Dotti, move empty G4DynPart to file scope to
// address thread-collision problem.
// 20140310 M. Kelsey -- Fix constness in G4PD* passing
#include <cmath>
@@ -40,7 +41,7 @@
#include "G4SystemOfUnits.hh"
// Internal constructor only usable by subclasses
G4InuclParticle::G4InuclParticle(G4ParticleDefinition* pd,
G4InuclParticle::G4InuclParticle(const G4ParticleDefinition* pd,
const G4LorentzVector& mom,
G4InuclParticle::Model model)
: modelId(model) {
@@ -66,7 +67,7 @@ namespace {
static const G4DynamicParticle empty; // To zero out everything
}
void G4InuclParticle::setDefinition(G4ParticleDefinition* pd) {
void G4InuclParticle::setDefinition(const G4ParticleDefinition* pd) {
if (pd) pDP.SetDefinition(pd);
else pDP = empty;
}
@@ -32,8 +32,10 @@
//
// 20130308 Use envvar to enable/disable use of 3-body generators.
// 20130619 Change singleton instance to be thread-local, to avoid collisions.
// 20141121 Use G4AutoDelete to avoid end-of-thread memory leaks
#include "G4MultiBodyMomentumDist.hh"
#include "G4AutoDelete.hh"
#include "G4CascadeParameters.hh"
#include "G4NuclNucl3BodyMomDst.hh"
#include "G4NuclNucl4BodyMomDst.hh"
@@ -48,7 +50,11 @@ using namespace G4InuclParticleNames;
G4ThreadLocal G4MultiBodyMomentumDist* G4MultiBodyMomentumDist::theInstance = 0;
const G4MultiBodyMomentumDist* G4MultiBodyMomentumDist::GetInstance() {
if (!theInstance) theInstance = new G4MultiBodyMomentumDist;
if (!theInstance) {
theInstance = new G4MultiBodyMomentumDist;
G4AutoDelete::Register(theInstance);
}
return theInstance;
}
@@ -25,6 +25,15 @@
//
// $Id: G4NucleiModel.cc 71989 2013-07-02 17:12:22Z mkelsey $
//
// For the best approximation to a physical-units model, set the following:
// setenv G4NUCMODEL_XSEC_SCALE 0.1
// setenv G4NUCMODEL_RAD_SCALE 1.0
// setenv G4NUCMODEL_RAD_2PAR 1
// setenv G4NUCMODEL_RAD_SMALL 1.992
// setenv G4NUCMODEL_RAD_ALPHA 0.84
// setenv G4NUCMODEL_FERMI_SCALE 0.685
// setenv G4NUCMODEL_RAD_TRAILING 0.70
//
// 20100112 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
// 20100114 M. Kelsey -- Use G4ThreeVector for position
// 20100309 M. Kelsey -- Use new generateWithRandomAngles for theta,phi stuff;
@@ -145,6 +154,8 @@
// 20130924 M. Kelsey -- Use G4Log, G4Exp, G4Pow for CPU speedup
// 20130925 M. Kelsey -- Eliminate unnecessary use of pow() in integrals
// 20131001 M. Kelsey -- Move QDinterp object to data member, thread local
// 20140116 M. Kelsey -- Move all envvar parameters to const data members
// 20141001 M. Kelsey -- Change sign of "dv" in boundaryTransition
#include "G4NucleiModel.hh"
#include "G4PhysicalConstants.hh"
@@ -177,42 +188,12 @@ using namespace G4InuclSpecialFunctions;
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
// For the best approximation to a physical-units model, set the following:
// setenv G4NUCMODEL_XSEC_SCALE 0.1
// setenv G4NUCMODEL_RAD_SCALE 1.0
// setenv G4NUCMODEL_RAD_2PAR 1
// setenv G4NUCMODEL_RAD_SMALL 1.992
// setenv G4NUCMODEL_RAD_ALPHA 0.84
// setenv G4NUCMODEL_FERMI_SCALE 0.685
// setenv G4NUCMODEL_RAD_TRAILING 0.70
// Cut-off limits for extreme values in calculations
const G4double G4NucleiModel::small = 1.0e-9;
const G4double G4NucleiModel::large = 1000.;
// Scaling factors for radii and cross-sections, currently different!
const G4double G4NucleiModel::crossSectionUnits = G4CascadeParameters::xsecScale();
const G4double G4NucleiModel::radiusUnits = G4CascadeParameters::radiusScale();
const G4double G4NucleiModel::skinDepth = 0.611207*radiusUnits;
// One- vs. two-parameter nuclear radius based on envvar
// ==> radius = radiusScale*cbrt(A) + radiusScale2/cbrt(A)
const G4double G4NucleiModel::radiusScale =
(G4CascadeParameters::useTwoParam() ? 1.16 : 1.2) * radiusUnits;
const G4double G4NucleiModel::radiusScale2 =
(G4CascadeParameters::useTwoParam() ? -1.3456 : 0.) * radiusUnits;
// NOTE: Old code used R_small = 8.0 (~2.83*units), and R_alpha = 0.7*R_small
// Published data suggests R_small ~ 1.992 fm, R_alpha = 0.84*R_small
const G4double G4NucleiModel::radiusForSmall = G4CascadeParameters::radiusSmall();
const G4double G4NucleiModel::radScaleAlpha = G4CascadeParameters::radiusAlpha();
// Scale factor relating Fermi momentum to density of states, units GeV.fm
// NOTE: Old code has 0.685*units GeV.fm, literature suggests 0.470 GeV.fm,
// but this gives too small momentum; old value gives <P_F> ~ 270 MeV
const G4double G4NucleiModel::fermiMomentum = G4CascadeParameters::fermiScale();
// Effective radius (0.87 to 1.2 fm) of nucleon, for trailing effect
const G4double G4NucleiModel::R_nucleon = G4CascadeParameters::radiusTrailing();
// For convenience in computing densities
const G4double G4NucleiModel::piTimes4thirds = pi*4./3.;
// Zone boundaries as fraction of nuclear radius (from outside in)
const G4double G4NucleiModel::alfa3[3] = { 0.7, 0.3, 0.01 };
@@ -224,16 +205,6 @@ const G4double G4NucleiModel::pion_vp_small = 0.007;
const G4double G4NucleiModel::kaon_vp = 0.015;
const G4double G4NucleiModel::hyperon_vp = 0.030;
// Cross-section scaling parameter for gamma-quasideuteron scattering
const G4double G4NucleiModel::gammaQDscale = G4CascadeParameters::gammaQDScale();
// For convenience in computing densities
const G4double G4NucleiModel::piTimes4thirds = pi*4./3.;
// Cut-off limits for extreme values in calculations
const G4double G4NucleiModel::small = 1.0e-9;
const G4double G4NucleiModel::large = 1000.;
namespace {
const G4double kebins[] =
{ 0.0, 0.01, 0.013, 0.018, 0.024, 0.032, 0.042, 0.056, 0.075, 0.1,
@@ -254,6 +225,16 @@ G4NucleiModel::G4NucleiModel()
A(0), Z(0), theNucleus(0), neutronNumber(0), protonNumber(0),
neutronNumberCurrent(0), protonNumberCurrent(0), current_nucl1(0),
current_nucl2(0), gammaQDinterp(kebins),
crossSectionUnits(G4CascadeParameters::xsecScale()),
radiusUnits(G4CascadeParameters::radiusScale()),
skinDepth(0.611207*radiusUnits),
radiusScale((G4CascadeParameters::useTwoParam()?1.16:1.2)*radiusUnits),
radiusScale2((G4CascadeParameters::useTwoParam()?-1.3456:0.)*radiusUnits),
radiusForSmall(G4CascadeParameters::radiusSmall()),
radScaleAlpha(G4CascadeParameters::radiusAlpha()),
fermiMomentum(G4CascadeParameters::fermiScale()),
R_nucleon(G4CascadeParameters::radiusTrailing()),
gammaQDscale(G4CascadeParameters::gammaQDScale()),
neutronEP(neutron), protonEP(proton) {}
G4NucleiModel::G4NucleiModel(G4int a, G4int z)
@@ -261,6 +242,16 @@ G4NucleiModel::G4NucleiModel(G4int a, G4int z)
A(0), Z(0), theNucleus(0), neutronNumber(0), protonNumber(0),
neutronNumberCurrent(0), protonNumberCurrent(0), current_nucl1(0),
current_nucl2(0), gammaQDinterp(kebins),
crossSectionUnits(G4CascadeParameters::xsecScale()),
radiusUnits(G4CascadeParameters::radiusScale()),
skinDepth(0.611207*radiusUnits),
radiusScale((G4CascadeParameters::useTwoParam()?1.16:1.2)*radiusUnits),
radiusScale2((G4CascadeParameters::useTwoParam()?-1.3456:0.)*radiusUnits),
radiusForSmall(G4CascadeParameters::radiusSmall()),
radScaleAlpha(G4CascadeParameters::radiusAlpha()),
fermiMomentum(G4CascadeParameters::fermiScale()),
R_nucleon(G4CascadeParameters::radiusTrailing()),
gammaQDscale(G4CascadeParameters::gammaQDScale()),
neutronEP(neutron), protonEP(proton) {
generateModel(a,z);
}
@@ -270,6 +261,16 @@ G4NucleiModel::G4NucleiModel(G4InuclNuclei* nuclei)
A(0), Z(0), theNucleus(0), neutronNumber(0), protonNumber(0),
neutronNumberCurrent(0), protonNumberCurrent(0), current_nucl1(0),
current_nucl2(0), gammaQDinterp(kebins),
crossSectionUnits(G4CascadeParameters::xsecScale()),
radiusUnits(G4CascadeParameters::radiusScale()),
skinDepth(0.611207*radiusUnits),
radiusScale((G4CascadeParameters::useTwoParam()?1.16:1.2)*radiusUnits),
radiusScale2((G4CascadeParameters::useTwoParam()?-1.3456:0.)*radiusUnits),
radiusForSmall(G4CascadeParameters::radiusSmall()),
radScaleAlpha(G4CascadeParameters::radiusAlpha()),
fermiMomentum(G4CascadeParameters::fermiScale()),
R_nucleon(G4CascadeParameters::radiusTrailing()),
gammaQDscale(G4CascadeParameters::gammaQDScale()),
neutronEP(neutron), protonEP(proton) {
generateModel(nuclei);
}
@@ -913,6 +914,9 @@ generateParticleFate(G4CascadParticle& cparticle,
}
EPCoutput.reset();
// Pass current (A,Z) configuration for possible recoils
G4int massNumberCurrent = protonNumberCurrent+neutronNumberCurrent;
theEPCollider->setNucleusState(massNumberCurrent, protonNumberCurrent);
theEPCollider->collide(&bullet, &target, EPCoutput);
// If collision failed, exit loop over partners
@@ -1115,17 +1119,18 @@ void G4NucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
G4double pr = pos.dot(mom.vect()) / r;
G4int next_zone = cparticle.movingInsideNuclei() ? zone - 1 : zone + 1;
G4double dv = getPotential(type,zone) - getPotential(type, next_zone);
// NOTE: dv is the height of the wall seen by the particle
G4double dv = getPotential(type,next_zone) - getPotential(type,zone);
if (verboseLevel > 3) {
G4cout << "Potentials for type " << type << " = "
<< getPotential(type,zone) << " , "
<< getPotential(type,next_zone) << G4endl;
}
G4double qv = dv * dv - 2.0 * dv * mom.e() + pr * pr;
G4double qv = dv * dv + 2.0 * dv * mom.e() + pr * pr;
G4double p1r;
G4double p1r = 0.;
if (verboseLevel > 3) {
G4cout << " type " << type << " zone " << zone << " next " << next_zone
@@ -1139,7 +1144,8 @@ void G4NucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
} else { // transition
if (verboseLevel > 3) G4cout << " passes thru boundary" << G4endl;
p1r = std::sqrt(qv);
if(pr < 0.0) p1r = -p1r;
if (pr < 0.0) p1r = -p1r;
cparticle.updateZone(next_zone);
cparticle.resetReflection();
}
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: implementation of numerically integrated angular distribution
// class for pi0 p and pi0 n elastic scattering
//
#include "G4Pi0P2Pi0PAngDst.hh"
namespace {
static const G4double eBins[11] =
{ 0.000, 0.031, 0.097, 0.240, 0.550, 0.873, 1.31, 1.53, 2.60, 3.86, 10.66};
static const G4double angleBins[19] =
{-1.000, -0.985, -0.940, -0.866, -0.766, -0.643, -0.500, -0.342, -0.174,
0.000, 0.174, 0.342, 0.500, 0.643, 0.766, 0.866, 0.940, 0.985,
1.000};
static const G4double integralTable[11][19] = {
{0.0000, 0.0088, 0.0350, 0.0777, 0.1346, 0.2032, 0.2814, 0.3658, 0.4530,
0.5408, 0.6260, 0.7062, 0.7794, 0.8442, 0.8988, 0.9426, 0.9744, 0.9936, 1.0000},
{0.0000, 0.0110, 0.0434, 0.0952, 0.1621, 0.2396, 0.3235, 0.4098, 0.4947,
0.5764, 0.6536, 0.7250, 0.7906, 0.8493, 0.9002, 0.9422, 0.9738, 0.9934, 1.0000},
{0.0000, 0.0112, 0.0440, 0.0946, 0.1570, 0.2250, 0.2940, 0.3602, 0.4224,
0.4822, 0.5421, 0.6047, 0.6726, 0.7454, 0.8196, 0.8897, 0.9480, 0.9866, 1.0000},
{0.0000, 0.0128, 0.0492, 0.1030, 0.1648, 0.2262, 0.2814, 0.3282, 0.3692,
0.4102, 0.4582, 0.5184, 0.5934, 0.6805, 0.7725, 0.8601, 0.9348, 0.9836, 1.0000},
{0.0000, 0.0052, 0.0201, 0.0416, 0.0646, 0.0842, 0.0973, 0.1045, 0.1118,
0.1299, 0.1705, 0.2416, 0.3450, 0.4750, 0.6188, 0.7603, 0.8820, 0.9698, 1.0000},
{0.0000, 0.0034, 0.0164, 0.0432, 0.0838, 0.1324, 0.1796, 0.2167, 0.2420,
0.2614, 0.2839, 0.3164, 0.3654, 0.4394, 0.5464, 0.6852, 0.8350, 0.9544, 1.0000},
{0.0000, 0.0070, 0.0240, 0.0430, 0.0624, 0.0884, 0.1274, 0.1752, 0.2203,
0.2546, 0.2764, 0.2888, 0.2996, 0.3259, 0.3968, 0.5370, 0.7360, 0.9224, 1.0000},
{0.0000, 0.0030, 0.0099, 0.0167, 0.0241, 0.0388, 0.0660, 0.1017, 0.1376,
0.1697, 0.1972, 0.2174, 0.2308, 0.2530, 0.3184, 0.4635, 0.6866, 0.9062, 1.0000},
{0.0000, 0.0020, 0.0056, 0.0086, 0.0124, 0.0166, 0.0204, 0.0238, 0.0263,
0.0294, 0.0370, 0.0492, 0.0638, 0.0782, 0.1052, 0.2048, 0.4638, 0.8202, 1.0000},
{0.0000, 0.0009, 0.0025, 0.0041, 0.0053, 0.0062, 0.0068, 0.0073, 0.0076,
0.0078, 0.0079, 0.0085, 0.0109, 0.0173, 0.0327, 0.0869, 0.3238, 0.7572, 1.0000},
{0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0002, 0.0269, 0.4555, 1.0000}
};
}
// Constructor passes arrays to templated base class
G4Pi0P2Pi0PAngDst::G4Pi0P2Pi0PAngDst(G4int verbose)
: G4NumIntTwoBodyAngDst<11,19>("G4Pi0P2Pi0PAngDst", eBins, angleBins,
integralTable, 7.43, verbose)
{}
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: implementation of numerically integrated angular distribution
// class for pi- p charge exchange scattering
//
#include "G4PimP2Pi0NAngDst.hh"
namespace {
static const G4double eBins[11] =
{ 0.000, 0.031, 0.097, 0.240, 0.550, 0.873, 1.31, 1.53, 2.60, 3.86, 10.66};
static const G4double angleBins[19] =
{-1.000, -0.985, -0.940, -0.866, -0.766, -0.643, -0.500, -0.342, -0.174,
0.000, 0.174, 0.342, 0.500, 0.643, 0.766, 0.866, 0.940, 0.985,
1.000};
static const G4double integralTable[11][19] = {
{0.0000, 0.0097, 0.0384, 0.0851, 0.1467, 0.2204, 0.3033, 0.3914, 0.4810,
0.5695, 0.6539, 0.7316, 0.8011, 0.8612, 0.9108, 0.9498, 0.9778, 0.9945, 1.0000},
{0.0000, 0.0175, 0.0687, 0.1489, 0.2501, 0.3634, 0.4804, 0.5925, 0.6934,
0.7798, 0.8493, 0.9021, 0.9402, 0.9659, 0.9822, 0.9917, 0.9969, 0.9993, 1.0000},
{0.0000, 0.0217, 0.0846, 0.1805, 0.2960, 0.4178, 0.5345, 0.6369, 0.7202,
0.7846, 0.8329, 0.8692, 0.8983, 0.9237, 0.9469, 0.9678, 0.9849, 0.9961, 1.0000},
{0.0000, 0.0098, 0.0379, 0.0798, 0.1287, 0.1781, 0.2236, 0.2632, 0.2988,
0.3357, 0.3806, 0.4398, 0.5178, 0.6134, 0.7196, 0.8257, 0.9170, 0.9785, 1.0000},
{0.0000, 0.0054, 0.0196, 0.0377, 0.0539, 0.0656, 0.0741, 0.0837, 0.0995,
0.1254, 0.1644, 0.2207, 0.3010, 0.4113, 0.5504, 0.7067, 0.8550, 0.9614, 1.0000},
{0.0000, 0.0058, 0.0353, 0.1089, 0.2242, 0.3480, 0.4383, 0.4785, 0.4902,
0.5098, 0.5536, 0.6067, 0.6457, 0.6688, 0.7015, 0.7706, 0.8714, 0.9631, 1.0000},
{0.0000, 0.0204, 0.0697, 0.1265, 0.1852, 0.2546, 0.3326, 0.4007, 0.4506,
0.4997, 0.5632, 0.6281, 0.6754, 0.7154, 0.7784, 0.8691, 0.9513, 0.9918, 1.0000},
{0.0000, 0.0093, 0.0328, 0.0640, 0.1041, 0.1580, 0.2202, 0.2780, 0.3369,
0.4192, 0.5215, 0.6020, 0.6368, 0.6540, 0.6963, 0.7805, 0.8874, 0.9707, 1.0000},
{0.0000, 0.0086, 0.0305, 0.0549, 0.0735, 0.0905, 0.1111, 0.1319, 0.1481,
0.1669, 0.2076, 0.2882, 0.4029, 0.5084, 0.5852, 0.6656, 0.7921, 0.9352, 1.0000},
{0.0000, 0.0010, 0.0027, 0.0043, 0.0056, 0.0065, 0.0072, 0.0077, 0.0081,
0.0090, 0.0108, 0.0138, 0.0224, 0.0534, 0.1173, 0.1715, 0.3494, 0.7745, 1.0000},
{0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0002, 0.0269, 0.4555, 1.0000}
};
}
// Constructor passes arrays to templated base class
G4PimP2Pi0NAngDst::G4PimP2Pi0NAngDst(G4int verbose)
: G4NumIntTwoBodyAngDst<11,19>("G4PimP2Pi0NAngDst", eBins, angleBins,
integralTable, 7.43, verbose)
{}
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: implementation of numerically integrated angular distribution
// class for pi- p and pi+ n elastic scattering
//
#include "G4PimP2PimPAngDst.hh"
namespace {
static const G4double eBins[11] =
{ 0.000, 0.031, 0.097, 0.240, 0.550, 0.873, 1.31, 1.53, 2.60, 3.86, 10.66};
static const G4double angleBins[19] =
{-1.000, -0.985, -0.940, -0.866, -0.766, -0.643, -0.500, -0.342, -0.174,
0.000, 0.174, 0.342, 0.500, 0.643, 0.766, 0.866, 0.940, 0.985,
1.000};
static const G4double integralTable[11][19] = {
{0.0000, 0.0065, 0.0262, 0.0590, 0.1037, 0.1595, 0.2258, 0.3007, 0.3820,
0.4682, 0.5562, 0.6428, 0.7260, 0.8028, 0.8699, 0.9251, 0.9664, 0.9916, 1.0000},
{0.0000, 0.0023, 0.0098, 0.0237, 0.0457, 0.0776, 0.1215, 0.1784, 0.2481,
0.3301, 0.4224, 0.5209, 0.6223, 0.7213, 0.8122, 0.8900, 0.9499, 0.9874, 1.0000},
{0.0000, 0.0045, 0.0179, 0.0395, 0.0678, 0.1017, 0.1408, 0.1849, 0.2350,
0.2933, 0.3621, 0.4426, 0.5356, 0.6381, 0.7437, 0.8434, 0.9263, 0.9810, 1.0000},
{0.0000, 0.0143, 0.0550, 0.1149, 0.1834, 0.2512, 0.3119, 0.3630, 0.4075,
0.4516, 0.5019, 0.5630, 0.6365, 0.7192, 0.8037, 0.8819, 0.9453, 0.9860, 1.0000},
{0.0000, 0.0097, 0.0368, 0.0745, 0.1137, 0.1464, 0.1682, 0.1799, 0.1879,
0.2032, 0.2366, 0.2953, 0.3812, 0.4907, 0.6158, 0.7460, 0.8668, 0.9654, 1.0000},
{0.0000, 0.0015, 0.0123, 0.0435, 0.0982, 0.1650, 0.2257, 0.2681, 0.2928,
0.3080, 0.3195, 0.3272, 0.3353, 0.3627, 0.4392, 0.5820, 0.7691, 0.9343, 1.0000},
{0.0000, 0.0029, 0.0108, 0.0221, 0.0369, 0.0571, 0.0840, 0.1158, 0.1492,
0.1791, 0.1997, 0.2099, 0.2191, 0.2506, 0.3352, 0.4943, 0.7130, 0.9153, 1.0000},
{0.0000, 0.0018, 0.0057, 0.0094, 0.0133, 0.0222, 0.0390, 0.0620, 0.0874,
0.1142, 0.1395, 0.1578, 0.1711, 0.1984, 0.2731, 0.4292, 0.6653, 0.8989, 1.0000},
{0.0000, 0.0005, 0.0016, 0.0030, 0.0043, 0.0051, 0.0058, 0.0069, 0.0085,
0.0123, 0.0206, 0.0329, 0.0471, 0.0607, 0.0866, 0.1828, 0.4420, 0.8093, 1.0000},
{0.0000, 0.0009, 0.0025, 0.0041, 0.0053, 0.0062, 0.0068, 0.0073, 0.0076,
0.0078, 0.0079, 0.0085, 0.0109, 0.0173, 0.0327, 0.0869, 0.3238, 0.7572, 1.0000},
{0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0002, 0.0269, 0.4555, 1.0000}
};
}
// Constructor passes arrays to templated base class
G4PimP2PimPAngDst::G4PimP2PimPAngDst(G4int verbose)
: G4NumIntTwoBodyAngDst<11,19>("G4PimP2PimPAngDst", eBins, angleBins,
integralTable, 7.43, verbose)
{}
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: $
// Author: Dennis Wright (SLAC)
// Date: 6 January 2014
//
// Description: implementation of numerically integrated angular distribution
// class for pi+ p and pi- n elastic scattering
//
#include "G4PipP2PipPAngDst.hh"
namespace {
static const G4double eBins[11] =
{ 0.000, 0.031, 0.097, 0.240, 0.550, 0.873, 1.31, 1.53, 2.60, 3.86, 10.66};
static const G4double angleBins[19] =
{-1.000, -0.985, -0.940, -0.866, -0.766, -0.643, -0.500, -0.342, -0.174,
0.000, 0.174, 0.342, 0.500, 0.643, 0.766, 0.866, 0.940, 0.985,
1.000};
static const G4double integralTable[11][19] = {
{0.0000, 0.0110, 0.0438, 0.0964, 0.1655, 0.2470, 0.3370, 0.4308, 0.5239,
0.6133, 0.6959, 0.7695, 0.8329, 0.8856, 0.9278, 0.9600, 0.9825, 0.9957, 1.0000},
{0.0000, 0.0197, 0.0771, 0.1667, 0.2785, 0.4016, 0.5255, 0.6411, 0.7413,
0.8228, 0.8849, 0.9292, 0.9588, 0.9773, 0.9883, 0.9945, 0.9978, 0.9995, 1.0000},
{0.0000, 0.0180, 0.0701, 0.1498, 0.2461, 0.3484, 0.4473, 0.5355, 0.6099,
0.6711, 0.7221, 0.7668, 0.8096, 0.8526, 0.8955, 0.9360, 0.9698, 0.9922, 1.0000},
{0.0000, 0.0113, 0.0434, 0.0910, 0.1461, 0.2011, 0.2510, 0.2935, 0.3309,
0.3689, 0.4145, 0.4738, 0.5502, 0.6418, 0.7413, 0.8383, 0.9243, 0.9811, 1.0000},
{0.0000, 0.0007, 0.0034, 0.0086, 0.0154, 0.0219, 0.0264, 0.0291, 0.0356,
0.0566, 0.1044, 0.1880, 0.3089, 0.4594, 0.6218, 0.7746, 0.8971, 0.9741, 1.0000},
{0.0000, 0.0053, 0.0204, 0.0428, 0.0694, 0.0999, 0.1335, 0.1653, 0.1911,
0.2147, 0.2483, 0.3057, 0.3956, 0.5161, 0.6535, 0.7884, 0.9009, 0.9746, 1.0000},
{0.0000, 0.0112, 0.0372, 0.0640, 0.0878, 0.1198, 0.1709, 0.2346, 0.2914,
0.3302, 0.3530, 0.3677, 0.3800, 0.4012, 0.4583, 0.5797, 0.7591, 0.9294, 1.0000},
{0.0000, 0.0043, 0.0141, 0.0240, 0.0349, 0.0555, 0.0930, 0.1414, 0.1879,
0.2252, 0.2548, 0.2770, 0.2904, 0.3077, 0.3637, 0.4978, 0.7079, 0.9136, 1.0000},
{0.0000, 0.0035, 0.0095, 0.0143, 0.0206, 0.0281, 0.0351, 0.0408, 0.0441,
0.0466, 0.0533, 0.0655, 0.0806, 0.0957, 0.1238, 0.2268, 0.4855, 0.8311, 1.0000},
{0.0000, 0.0009, 0.0025, 0.0041, 0.0053, 0.0062, 0.0068, 0.0073, 0.0076,
0.0078, 0.0079, 0.0085, 0.0109, 0.0173, 0.0327, 0.0869, 0.3238, 0.7572, 1.0000},
{0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0002, 0.0269, 0.4555, 1.0000}
};
}
// Constructor passes arrays to templated base class
G4PipP2PipPAngDst::G4PipP2PipPAngDst(G4int verbose)
: G4NumIntTwoBodyAngDst<11,19>("G4PipP2PipPAngDst", eBins, angleBins,
integralTable, 7.43, verbose)
{}
@@ -41,9 +41,11 @@
// 20130621 Replace collide() interface with deExcite() using G4Fragment ref
// 20130622 Inherit from G4CascadeDeexciteBase, add verbosity interface
// to pass to PreCompound
// 20140508 Per V. Ivanchenko, attempt to use common instance of PreCompound.
#include "G4PreCompoundDeexcitation.hh"
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4HadronicInteractionRegistry.hh"
#include "G4InuclElementaryParticle.hh"
#include "G4InuclNuclei.hh"
#include "G4InuclParticle.hh"
@@ -58,8 +60,18 @@ using namespace G4InuclParticleNames;
G4PreCompoundDeexcitation::G4PreCompoundDeexcitation()
: G4CascadeDeexciteBase("G4PreCompoundDeexcitation"),
theExcitationHandler(new G4ExcitationHandler),
theDeExcitation(new G4PreCompoundModel(theExcitationHandler)) {}
theExcitationHandler(0), theDeExcitation(0) {
// Access common instance of PreCompound instead of creating new one
G4HadronicInteraction* p =
G4HadronicInteractionRegistry::Instance()->FindModel("PRECO");
// If not found, or cast fails, create a local instance
theDeExcitation = static_cast<G4PreCompoundModel*>(p);
if (!theDeExcitation) {
theExcitationHandler = new G4ExcitationHandler;
theDeExcitation = new G4PreCompoundModel(theExcitationHandler);
}
}
G4PreCompoundDeexcitation::~G4PreCompoundDeexcitation() {
// Per V.I. -- do not delete locally; handled in hadronic registry
@@ -33,13 +33,19 @@
// 20130307 M. Kelsey -- Add verbosity interface
// 20130422 M. Kelsey -- Add three-body distributions, for temporary use
// 20130619 Change singleton instance to be thread-local, to avoid collisions.
// 20141121 Use G4AutoDelete to avoid end-of-thread memory leaks
#include "G4TwoBodyAngularDist.hh"
#include "G4AutoDelete.hh"
#include "G4GamP2NPipAngDst.hh"
#include "G4GamP2PPi0AngDst.hh"
#include "G4GammaNuclAngDst.hh"
#include "G4PP2PPAngDst.hh"
#include "G4NP2NPAngDst.hh"
#include "G4Pi0P2Pi0PAngDst.hh"
#include "G4PimP2Pi0NAngDst.hh"
#include "G4PimP2PimPAngDst.hh"
#include "G4PipP2PipPAngDst.hh"
#include "G4HadNElastic1AngDst.hh"
#include "G4HadNElastic2AngDst.hh"
#include "G4InuclParticleNames.hh"
@@ -55,7 +61,11 @@ using namespace G4InuclParticleNames;
G4ThreadLocal G4TwoBodyAngularDist* G4TwoBodyAngularDist::theInstance = 0;
const G4TwoBodyAngularDist* G4TwoBodyAngularDist::GetInstance() {
if (!theInstance) theInstance = new G4TwoBodyAngularDist;
if (!theInstance) {
theInstance = new G4TwoBodyAngularDist;
G4AutoDelete::Register(theInstance);
}
return theInstance;
}
@@ -64,7 +74,9 @@ const G4TwoBodyAngularDist* G4TwoBodyAngularDist::GetInstance() {
G4TwoBodyAngularDist::G4TwoBodyAngularDist()
: gp_npip(new G4GamP2NPipAngDst), gp_ppi0(new G4GamP2PPi0AngDst),
ppAngDst(new G4PP2PPAngDst), npAngDst(new G4NP2NPAngDst),
nnAngDst(new G4NuclNuclAngDst), qxAngDst(new G4PiNInelasticAngDst),
nnAngDst(new G4NuclNuclAngDst), pi0pAngDst(new G4Pi0P2Pi0PAngDst),
pipCXAngDst(new G4PimP2Pi0NAngDst), pimpAngDst(new G4PimP2PimPAngDst),
pippAngDst(new G4PipP2PipPAngDst), qxAngDst(new G4PiNInelasticAngDst),
hn1AngDst(new G4HadNElastic1AngDst), hn2AngDst(new G4HadNElastic2AngDst),
gnAngDst(new G4GammaNuclAngDst), hn3BodyDst(new G4HadNucl3BodyAngDst),
nn3BodyDst(new G4NuclNucl3BodyAngDst)
@@ -75,6 +87,10 @@ G4TwoBodyAngularDist::~G4TwoBodyAngularDist() {
delete gp_ppi0;
delete ppAngDst;
delete nnAngDst;
delete pi0pAngDst;
delete pipCXAngDst;
delete pimpAngDst;
delete pippAngDst;
delete qxAngDst;
delete hn1AngDst;
delete hn2AngDst;
@@ -96,6 +112,10 @@ void G4TwoBodyAngularDist::passVerbose(G4int verbose) {
if (gp_ppi0) gp_ppi0->setVerboseLevel(verbose);
if (ppAngDst) ppAngDst->setVerboseLevel(verbose);
if (nnAngDst) nnAngDst->setVerboseLevel(verbose);
if (pi0pAngDst) pi0pAngDst->setVerboseLevel(verbose);
if (pipCXAngDst) pipCXAngDst->setVerboseLevel(verbose);
if (pimpAngDst) pimpAngDst->setVerboseLevel(verbose);
if (pippAngDst) pippAngDst->setVerboseLevel(verbose);
if (qxAngDst) qxAngDst->setVerboseLevel(verbose);
if (hn1AngDst) hn1AngDst->setVerboseLevel(verbose);
if (hn2AngDst) hn2AngDst->setVerboseLevel(verbose);
@@ -134,6 +154,20 @@ G4TwoBodyAngularDist::ChooseDist(G4int is, G4int fs, G4int kw) const {
// np and pn elastic
if (is == pro*neu) return npAngDst;
// pi+ p and pi- n elastic
if ((fs == is) && (is == pip*pro || is == pim*neu) ) return pippAngDst;
// pi- p and pi+ n elastic
if ((fs == is) && (is == pim*pro || is == pip*neu) ) return pimpAngDst;
// pi0 p and pi0 n elastic
if ((fs == is) && (is == pi0*pro || is == pi0*neu) ) return pi0pAngDst;
// pi- p -> pi0 n, pi+ n -> pi0 p, pi0 p -> pi+ n, pi0 n -> pi- p
if ((is == pim*pro && fs == pi0*neu) || (is == pip*neu && fs == pi0*pip) ||
(is == pi0*pro && fs == pip*neu) || (is == pi0*neu && fs == pim*pro) )
return pipCXAngDst;
// hyperon-nucleon
if (is == pro*lam || is == pro*sp || is == pro*s0 ||
is == pro*sm || is == pro*xi0 || is == pro*xim ||
@@ -144,27 +178,27 @@ G4TwoBodyAngularDist::ChooseDist(G4int is, G4int fs, G4int kw) const {
return nnAngDst;
}
// gamma p -> pi+ n, gamma p -> pi0 p, gamma p -> K Y (and isospin variants)
// gamma p -> K Y (and isospin variants)
if (kw == 2 && (is == pro*gam || is == neu*gam)) {
return gnAngDst;
}
// pion-nucleon charge/strangeness exchange
// pion-nucleon strangeness production
if (kw == 2) {
return qxAngDst;
}
// pi+p, pi0p, gamma p, k+p, k0bp, pi-n, pi0n, gamma n, k-n, or k0n
if (is == pro*pip || is == pro*pi0 || is == pro*gam ||
// gamma p, k+p, k0bp, gamma n, k-n, or k0n
if (is == pro*gam ||
is == pro*kpl || is == pro*k0b ||
is == neu*pim || is == neu*pi0 || is == neu*gam ||
is == neu*gam ||
is == neu*kmi || is == neu*k0) {
return hn1AngDst;
}
// pi-p, pi+n, k-p, k0bn, k+n, or k0p
if (is == pro*pim || is == pro*kmi || is == pro*k0 ||
is == neu*pip || is == neu*kpl || is == neu*k0b) {
// k-p, k0bn, k+n, or k0p
if (is == pro*kmi || is == pro*k0 ||
is == neu*kpl || is == neu*k0b) {
return hn2AngDst;
}
@@ -29,6 +29,7 @@
// 20100623 M. Kelsey -- Use old bindingEnergy() wrapper (now returns
// G4NucleiProperties::GetBindingEnergy()).
// 20100714 M. Kelsey -- Move concrete functions to G4CascadeColliderBase
// 20140930 Change name from "const char*" to "const G4String"
#include "G4VCascadeCollider.hh"
#include "G4ios.hh"
@@ -36,7 +37,7 @@
// Constructor handles verbose announcement
G4VCascadeCollider::G4VCascadeCollider(const char* name, G4int verbose)
G4VCascadeCollider::G4VCascadeCollider(const G4String& name, G4int verbose)
: theName(name), verboseLevel(verbose) {
if (verboseLevel) G4cout << " >>> " << theName << " ctor " << G4endl;
}
@@ -1,4 +1,4 @@
# $Id: GNUmakefile 66892 2013-01-17 10:57:59Z gunter $
# $Id: GNUmakefile 86127 2014-11-07 11:11:47Z gcosmo $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -21,7 +21,9 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/hadronic/management/include/ \
-I$(G4BASE)/processes/hadronic/util/include/ \
-I$(G4BASE)/processes/hadronic/models/management/include/ \
-I$(G4BASE)/processes/hadronic/models/util/include/ \
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include/ \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include/ \
@@ -14,6 +14,113 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
24 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-24)
-----------------------------------------------------------------
- G4hhElastic - cleanup constructors
21 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-23)
-----------------------------------------------------------------
- G4hhElastic - fixed Coverity report (V.Grichine)
20 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-22)
-----------------------------------------------------------------
- G4LMsdGenerator - fixed memory leak (V.Grichine)
19 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-21)
-----------------------------------------------------------------
- G4LMsdGenerator - fixed shortlived decays (V.Grichine)
14 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-20)
-----------------------------------------------------------------
- G4LMsdGenerator - fixed energy concervation (V.Grichine)
12 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-19)
-----------------------------------------------------------------
- G4LMsdGenerator - added pions and kaons (V.Grichine)
08 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-18)
-----------------------------------------------------------------
- G4LMsdGenerator - fixed read out of the boundary
07 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-17)
-----------------------------------------------------------------
07 November 2014 V. Grichine fixed class G4LMsdGenerator
06 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-16)
-----------------------------------------------------------------
06 November 2014 V. Grichine class G4LMsdGenerator was added for
low mass single diffraction dissociation
14 October 2014 - A.Ribon (hadr-cohe-V10-00-14)
-----------------------------------------------------------------
- G4DiffuseElastic : extension down to 0.1 MeV, mainly for neutrons.
- G4hhElastic : changes to combine with low mass diffraction.
31 July 2014 - A.Ribon (hadr-cohe-V10-00-13)
-----------------------------------------------------------------
- G4DiffuseElastic and G4NuclNuclDiffuseElastic : use the average
nuclear weight for each element to compute the table of angles,
in order to improve the reproducibility.
30 July 2014 - A.Ribon (hadr-cohe-V10-00-12)
-----------------------------------------------------------------
- G4DiffuseElastic, G4NuclNuclDiffuseElastic, G4hhElastic, and
G4ChargeExchangeProcess : proper deletion of physics vectors.
27 June 2014 - V.Ivanchenko (hadr-cohe-V10-00-11)
-----------------------------------------------------------------
- G4LEppData, G4LEpp - removed data with Coulomb correction and
corresponding code due to reasons: not work properly, provides
double counting with EM, code too complex.
18 June 2014 - A.Ribon (hadr-cohe-V10-00-10)
-----------------------------------------------------------------
- G4NuclNuclDiffuseElastic : proper fix of the nuclear radius issue.
06 June 2014 - A.Ribon (hadr-cohe-V10-00-09)
-----------------------------------------------------------------
- G4DiffuseElastic : fixed deletion in destructor.
- G4NuclNuclDiffuseElastic : fixed deletion in destructor;
temporary fix of the nuclear radius (which was zero).
27 May 2014 - V.Ivanchenko (hadr-cohe-V10-00-08)
-----------------------------------------------------------------
- G4LEpp - fixed incorrect use data array, used GetInvariantT()
inside ApplyYourself
13 May 2014 - A.Ribon (hadr-cohe-V10-00-07)
-----------------------------------------------------------------
- Removed unused private members of G4hhElastic which are not used
(to avoid warnings).
12 May 2014 - A.Ribon (hadr-cohe-V10-00-06)
-----------------------------------------------------------------
- Added V. Grichine's new class G4hhElastic : implementation of the
qQ-model with springy Pomeron for hadron-hadron elastic scattering
06 May 2014 - A.Ribon (hadr-cohe-V10-00-05)
-----------------------------------------------------------------
- Tag V. Grichine's bug fix in G4DiffuseElastic.cc .
10 April 2014 - G.Cosmo (hadr-cohe-V10-00-04/03)
-----------------------------------------------------------------
- Get rid of deprecated 'register' storage class specifier in source files.
10 March 2014 - V.Ivanchenko (hadr-cohe-V10-00-02)
-----------------------------------------------------------------
- G4LEHadronProtonElastic, G4LEnp, G4LEpp - use const pointers
to G4ParticleDefinition
31 January 2014 - V.Ivanchenko (V.Grichine) (hadr-cohe-V10-00-01)
-----------------------------------------------------------------
- G4LEHadronProtonElastic - new dipole model
- G4LEnp, G4LEpp - add SampleInvariantT method and inheritance
from G4HadronElastic
18 January 2013 - V.Ivanchenko (hadr-cohe-V10-00-00)
------------------------------------------------------
- G4LEnp - implemented SampleT() method (V.Grichine)
04 June 2013 - A.Ribon (hadr-cohe-V09-06-03)
------------------------------------------------------
- Fix access to ions via the IonTable class and GetIon method
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4DiffuseElastic.hh 66892 2013-01-17 10:57:59Z gunter $
// $Id: G4DiffuseElastic.hh 82596 2014-06-30 08:59:33Z gcosmo $
//
// Author: V. Grichine (Vladimir,Grichine@cern.ch)
//
@@ -69,6 +69,9 @@ public:
virtual ~G4DiffuseElastic();
virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/,
G4Nucleus & /*targetNucleus*/);
void Initialise();
void InitialiseOnFly(G4double Z, G4double A);
@@ -224,6 +227,19 @@ private:
};
inline G4bool G4DiffuseElastic::IsApplicable(const G4HadProjectile & projectile,
G4Nucleus & nucleus)
{
if( ( projectile.GetDefinition() == G4Proton::Proton() ||
projectile.GetDefinition() == G4Neutron::Neutron() ||
projectile.GetDefinition() == G4PionPlus::PionPlus() ||
projectile.GetDefinition() == G4PionMinus::PionMinus() ||
projectile.GetDefinition() == G4KaonPlus::KaonPlus() ||
projectile.GetDefinition() == G4KaonMinus::KaonMinus() ) &&
nucleus.GetZ_asInt() >= 2 ) return true;
else return false;
}
inline void G4DiffuseElastic::SetRecoilKinEnergyLimit(G4double value)
{
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// G4 Low energy model: hadron-p elastic scattering
// V. Grichine based on em dipole boost approach
// The model is approximately applied for Tkin < 20 MeV
//
// 15.01.2014 V. Grichine first version
//
#ifndef G4LEHadronProtonElastic_h
#define G4LEHadronProtonElastic_h 1
#include "globals.hh"
#include "Randomize.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4ElementTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsVector.hh"
#include "G4LPhysicsFreeVector.hh"
#include "G4Gamma.hh"
#include "G4Step.hh"
#include "G4TrackStatus.hh"
#include "G4HadronElastic.hh"
#ifdef NPDEBUG
#include <iostream>
#include <fstream>
#endif
class G4LEHadronProtonElastic : public G4HadronElastic
{
public:
G4LEHadronProtonElastic();
~G4LEHadronProtonElastic();
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus);
// sample momentum transfer using Lab. momentum
G4double SampleInvariantT(const G4ParticleDefinition* p,
G4double plab, G4int Z, G4int A);
G4double RandCosThetaDipPen();
private:
};
#endif
@@ -23,12 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// G4 Low energy model: n-p scattering
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
//
// For further comments see G4LEnpData.hh and G4LEnp.cc
//
//
// G4 Low energy model: n-p scattering
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
//
// For further comments see G4LEnpData.hh and G4LEnp.cc
//
// 02.01.2014 V. Grichine add SampInvariantT for testing ds/dt
#ifndef G4LEnp_h
#define G4LEnp_h 1
@@ -44,7 +45,8 @@
#include "G4Gamma.hh"
#include "G4Step.hh"
#include "G4TrackStatus.hh"
#include "G4HadronicInteraction.hh"
// #include "G4HadronicInteraction.hh"
#include "G4HadronElastic.hh"
#ifdef NPDEBUG
#include <iostream>
@@ -52,7 +54,7 @@
#endif
class G4LEnp : public G4HadronicInteraction
class G4LEnp : public G4HadronElastic // G4HadronicInteraction
{
private:
@@ -68,7 +70,10 @@ class G4LEnp : public G4HadronicInteraction
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus);
// sample momentum transfer using Lab. momentum
G4double SampleInvariantT(const G4ParticleDefinition* p,
G4double plab, G4int Z, G4int A);
private:
// std::ofstream* outFile;
@@ -23,12 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// G4 Low energy model: n-n or p-p scattering
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
//
// For further comments see G4LEppData.hh and G4LEpp.cc
//
//
// G4 Low energy model: n-n or p-p scattering
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
//
// For further comments see G4LEppData.hh and G4LEpp.cc
//
// 30.01.14 V. Grichine add SampleInvariantT and inherit
// from G4HadronElastic
#ifndef G4LEpp_h
#define G4LEpp_h 1
@@ -44,43 +46,36 @@
#include "G4Gamma.hh"
#include "G4Step.hh"
#include "G4TrackStatus.hh"
#include "G4HadronicInteraction.hh"
#include "G4HadronElastic.hh"
class G4LEpp : public G4HadronicInteraction
class G4LEpp : public G4HadronElastic
{
private:
enum { NENERGY=40, NENERGYC=22, NANGLE=180 };
enum { NENERGY=40, NANGLE=180 };
public:
G4LEpp();
~G4LEpp();
virtual ~G4LEpp();
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus);
G4Nucleus& targetNucleus);
void SetCoulombEffects(G4int State);
G4double SampleInvariantT(const G4ParticleDefinition* p,
G4double plab, G4int Z, G4int A);
private:
const G4float * sig[NANGLE];
const G4float * elab;
// The following arrays are declared static to allow the use of initializers.
// They are initialized in G4LEppData.hh
// Coulomb effects suppressed:
static const G4float Sig[NENERGY][NANGLE];
static const G4float Pcm[NENERGY], Elab[NENERGY],
dSigmax[NENERGY], Sigtot[NENERGY];
// Coulomb effects not suppressed:
static const G4float SigCoul[NENERGYC][NANGLE];
static const G4float PcmCoul[NENERGYC], ElabCoul[NENERGYC],
dSigmaxCoul[NENERGYC], SigtotCoul[NENERGYC];
static const G4float elab[NENERGY];
static const G4float dSigmax[NENERGY];
static const G4float Sigtot[NENERGY];
};
@@ -40,21 +40,11 @@
// Range of validity of tables: 10 - 1200 MeV
// Results are extracted from RA Arndt's PSA of 1998
// CM Angle range: 0.5 - 179.5 degrees in 1 degree steps
#include "G4Types.hh"
// CM momentum (GeV/c)
const G4float G4LEpp::Pcm[NENERGY] = {
0.685E-01, 0.969E-01, 0.137, 0.181, 0.217, 0.237, 0.256,
0.291, 0.321, 0.349, 0.363, 0.375, 0.400, 0.444,
0.494, 0.540, 0.573, 0.613, 0.650, 0.685, 0.719, 0.751,
0.781, 0.810, 0.839, 0.866, 0.893, 0.919, 0.944,
0.969, 1.016, 1.061, 1.104, 1.146, 1.186, 1.263,
1.335, 1.404, 1.469, 1.532
};
// Lab energy (GeV)
const G4float G4LEpp::Elab[NENERGY] = {
const G4float G4LEpp::elab[NENERGY] = {
0.100E-01, 0.200E-01, 0.400E-01, 0.700E-01, 0.100, 0.120, 0.140,
0.180, 0.220, 0.260, 0.280, 0.300, 0.340, 0.420,
0.520, 0.620, 0.700, 0.800, 0.900, 1.00, 1.10, 1.20,
@@ -1165,643 +1155,3 @@
0.87648, 0.89378, 0.91051, 0.92644, 0.94135, 0.95500, 0.96718,
0.97772, 0.98641, 0.99311, 0.99768, 1.00000}
};
// Table of Cumulative pp Scattering Probabilities
// To be used for generation as a function of std::cos(theta cm)
// Coulomb effects are NOT suppressed
// -- including pp Coulomb-nuclear interference
// NOTE: Assumes angle range to be generated is 0-180 degrees
// even for IDENTICAL particles. This allows tracking of
// well-defined GEANT4 particles and generation of secondary
// Range of validity of tables: 10 - 1200 MeV
// Results are extracted from RA Arndt"s PSA of 1998
// CM Angle range: 0.5 - 179.5 degrees in 1 degree steps
// Appended at end: cm momentum (GeV/c), Lab Energy (GeV), max
// dSigma/domega-CM (mb/sr), total cross section
const G4float G4LEpp::SigCoul[NENERGYC][NANGLE] = {
//------------ 0.01 GeV
{0.47617, 0.49374, 0.49750, 0.49885, 0.49948, 0.49982, 0.50002,
0.50015, 0.50023, 0.50029, 0.50033, 0.50037, 0.50039, 0.50041,
0.50043, 0.50044, 0.50046, 0.50047, 0.50048, 0.50049, 0.50049,
0.50050, 0.50051, 0.50052, 0.50053, 0.50054, 0.50054, 0.50055,
0.50056, 0.50057, 0.50058, 0.50059, 0.50060, 0.50061, 0.50062,
0.50063, 0.50064, 0.50065, 0.50066, 0.50067, 0.50069, 0.50070,
0.50071, 0.50072, 0.50074, 0.50075, 0.50076, 0.50078, 0.50079,
0.50080, 0.50082, 0.50083, 0.50085, 0.50086, 0.50088, 0.50089,
0.50091, 0.50093, 0.50094, 0.50096, 0.50098, 0.50099, 0.50101,
0.50103, 0.50104, 0.50106, 0.50108, 0.50110, 0.50111, 0.50113,
0.50115, 0.50117, 0.50119, 0.50120, 0.50122, 0.50124, 0.50126,
0.50128, 0.50130, 0.50132, 0.50134, 0.50136, 0.50137, 0.50139,
0.50141, 0.50143, 0.50145, 0.50147, 0.50149, 0.50151, 0.50153,
0.50155, 0.50157, 0.50159, 0.50161, 0.50163, 0.50164, 0.50166,
0.50168, 0.50170, 0.50172, 0.50174, 0.50176, 0.50178, 0.50180,
0.50181, 0.50183, 0.50185, 0.50187, 0.50189, 0.50190, 0.50192,
0.50194, 0.50196, 0.50198, 0.50199, 0.50201, 0.50203, 0.50204,
0.50206, 0.50208, 0.50209, 0.50211, 0.50212, 0.50214, 0.50216,
0.50217, 0.50219, 0.50220, 0.50221, 0.50223, 0.50224, 0.50226,
0.50227, 0.50228, 0.50230, 0.50231, 0.50232, 0.50233, 0.50234,
0.50236, 0.50237, 0.50238, 0.50239, 0.50240, 0.50241, 0.50242,
0.50243, 0.50244, 0.50245, 0.50246, 0.50247, 0.50247, 0.50248,
0.50249, 0.50250, 0.50251, 0.50252, 0.50252, 0.50253, 0.50254,
0.50255, 0.50256, 0.50257, 0.50259, 0.50261, 0.50263, 0.50265,
0.50268, 0.50273, 0.50279, 0.50287, 0.50300, 0.50320, 0.50354,
0.50416, 0.50552, 0.50927, 0.52679, 1.00000},
//--------- 0.02 GeV
{0.47546, 0.49296, 0.49670, 0.49803, 0.49865, 0.49897, 0.49917,
0.49929, 0.49937, 0.49943, 0.49947, 0.49950, 0.49952, 0.49954,
0.49956, 0.49958, 0.49959, 0.49960, 0.49962, 0.49963, 0.49964,
0.49965, 0.49967, 0.49968, 0.49969, 0.49971, 0.49972, 0.49974,
0.49975, 0.49977, 0.49979, 0.49980, 0.49982, 0.49984, 0.49986,
0.49988, 0.49990, 0.49992, 0.49994, 0.49996, 0.49998, 0.50001,
0.50003, 0.50005, 0.50008, 0.50010, 0.50013, 0.50015, 0.50018,
0.50020, 0.50023, 0.50026, 0.50029, 0.50031, 0.50034, 0.50037,
0.50040, 0.50043, 0.50046, 0.50049, 0.50052, 0.50055, 0.50058,
0.50062, 0.50065, 0.50068, 0.50071, 0.50075, 0.50078, 0.50081,
0.50085, 0.50088, 0.50091, 0.50095, 0.50098, 0.50102, 0.50105,
0.50108, 0.50112, 0.50115, 0.50119, 0.50122, 0.50126, 0.50129,
0.50133, 0.50137, 0.50140, 0.50144, 0.50147, 0.50151, 0.50154,
0.50158, 0.50161, 0.50165, 0.50168, 0.50172, 0.50176, 0.50179,
0.50183, 0.50186, 0.50190, 0.50193, 0.50196, 0.50200, 0.50203,
0.50207, 0.50210, 0.50214, 0.50217, 0.50220, 0.50224, 0.50227,
0.50230, 0.50233, 0.50237, 0.50240, 0.50243, 0.50246, 0.50249,
0.50252, 0.50255, 0.50258, 0.50261, 0.50264, 0.50267, 0.50270,
0.50273, 0.50276, 0.50278, 0.50281, 0.50284, 0.50286, 0.50289,
0.50291, 0.50294, 0.50296, 0.50299, 0.50301, 0.50303, 0.50305,
0.50308, 0.50310, 0.50312, 0.50314, 0.50316, 0.50318, 0.50319,
0.50321, 0.50323, 0.50325, 0.50326, 0.50328, 0.50329, 0.50331,
0.50332, 0.50334, 0.50335, 0.50336, 0.50337, 0.50339, 0.50340,
0.50341, 0.50342, 0.50344, 0.50345, 0.50347, 0.50349, 0.50352,
0.50355, 0.50359, 0.50365, 0.50373, 0.50385, 0.50404, 0.50437,
0.50498, 0.50632, 0.51004, 0.52751, 1.00000},
//--------- 0.04 GeV
{0.47428, 0.49167, 0.49535, 0.49665, 0.49724, 0.49755, 0.49773,
0.49784, 0.49791, 0.49796, 0.49800, 0.49802, 0.49805, 0.49807,
0.49809, 0.49810, 0.49812, 0.49814, 0.49815, 0.49817, 0.49819,
0.49821, 0.49823, 0.49826, 0.49828, 0.49830, 0.49833, 0.49836,
0.49838, 0.49841, 0.49844, 0.49847, 0.49850, 0.49854, 0.49857,
0.49861, 0.49864, 0.49868, 0.49872, 0.49876, 0.49880, 0.49884,
0.49888, 0.49892, 0.49897, 0.49901, 0.49906, 0.49910, 0.49915,
0.49920, 0.49925, 0.49929, 0.49934, 0.49940, 0.49945, 0.49950,
0.49955, 0.49960, 0.49966, 0.49971, 0.49977, 0.49982, 0.49988,
0.49993, 0.49999, 0.50005, 0.50010, 0.50016, 0.50022, 0.50028,
0.50034, 0.50040, 0.50046, 0.50052, 0.50058, 0.50064, 0.50070,
0.50076, 0.50082, 0.50088, 0.50094, 0.50101, 0.50107, 0.50113,
0.50119, 0.50125, 0.50132, 0.50138, 0.50144, 0.50150, 0.50157,
0.50163, 0.50169, 0.50175, 0.50182, 0.50188, 0.50194, 0.50200,
0.50206, 0.50213, 0.50219, 0.50225, 0.50231, 0.50237, 0.50243,
0.50249, 0.50255, 0.50261, 0.50267, 0.50273, 0.50279, 0.50285,
0.50290, 0.50296, 0.50302, 0.50308, 0.50313, 0.50319, 0.50324,
0.50330, 0.50335, 0.50340, 0.50346, 0.50351, 0.50356, 0.50361,
0.50366, 0.50371, 0.50376, 0.50381, 0.50386, 0.50390, 0.50395,
0.50400, 0.50404, 0.50408, 0.50413, 0.50417, 0.50421, 0.50425,
0.50429, 0.50433, 0.50436, 0.50440, 0.50444, 0.50447, 0.50450,
0.50453, 0.50457, 0.50460, 0.50462, 0.50465, 0.50468, 0.50470,
0.50473, 0.50475, 0.50477, 0.50480, 0.50482, 0.50483, 0.50485,
0.50487, 0.50489, 0.50490, 0.50492, 0.50494, 0.50496, 0.50498,
0.50501, 0.50505, 0.50510, 0.50517, 0.50528, 0.50546, 0.50577,
0.50636, 0.50765, 0.51133, 0.52867, 1.00000},
//--------- 0.07 GeV
{0.47246, 0.48968, 0.49329, 0.49454, 0.49510, 0.49538, 0.49554,
0.49564, 0.49570, 0.49574, 0.49577, 0.49580, 0.49582, 0.49585,
0.49587, 0.49589, 0.49591, 0.49594, 0.49597, 0.49600, 0.49603,
0.49606, 0.49610, 0.49613, 0.49617, 0.49622, 0.49626, 0.49630,
0.49635, 0.49640, 0.49645, 0.49651, 0.49656, 0.49662, 0.49668,
0.49674, 0.49680, 0.49686, 0.49693, 0.49699, 0.49706, 0.49713,
0.49720, 0.49727, 0.49735, 0.49742, 0.49750, 0.49757, 0.49765,
0.49773, 0.49781, 0.49789, 0.49798, 0.49806, 0.49815, 0.49823,
0.49832, 0.49841, 0.49850, 0.49858, 0.49868, 0.49877, 0.49886,
0.49895, 0.49904, 0.49914, 0.49923, 0.49933, 0.49942, 0.49952,
0.49961, 0.49971, 0.49981, 0.49990, 0.50000, 0.50010, 0.50020,
0.50030, 0.50040, 0.50050, 0.50060, 0.50070, 0.50080, 0.50090,
0.50100, 0.50110, 0.50120, 0.50130, 0.50140, 0.50150, 0.50160,
0.50170, 0.50180, 0.50190, 0.50200, 0.50210, 0.50220, 0.50230,
0.50240, 0.50250, 0.50260, 0.50270, 0.50280, 0.50290, 0.50299,
0.50309, 0.50319, 0.50329, 0.50338, 0.50348, 0.50358, 0.50367,
0.50377, 0.50386, 0.50395, 0.50405, 0.50414, 0.50423, 0.50432,
0.50441, 0.50450, 0.50459, 0.50468, 0.50476, 0.50485, 0.50494,
0.50502, 0.50510, 0.50518, 0.50526, 0.50534, 0.50542, 0.50550,
0.50558, 0.50565, 0.50572, 0.50580, 0.50587, 0.50594, 0.50600,
0.50607, 0.50614, 0.50620, 0.50626, 0.50632, 0.50638, 0.50644,
0.50649, 0.50654, 0.50660, 0.50664, 0.50669, 0.50674, 0.50678,
0.50682, 0.50686, 0.50690, 0.50694, 0.50697, 0.50700, 0.50703,
0.50706, 0.50708, 0.50711, 0.50713, 0.50715, 0.50717, 0.50720,
0.50722, 0.50726, 0.50730, 0.50736, 0.50746, 0.50762, 0.50790,
0.50846, 0.50971, 0.51330, 0.53049, 1.00000},
//--------- 0.1 GeV
{0.47009, 0.48715, 0.49068, 0.49189, 0.49242, 0.49269, 0.49283,
0.49292, 0.49298, 0.49302, 0.49305, 0.49308, 0.49311, 0.49314,
0.49317, 0.49321, 0.49324, 0.49328, 0.49333, 0.49337, 0.49342,
0.49347, 0.49353, 0.49359, 0.49365, 0.49371, 0.49378, 0.49385,
0.49392, 0.49399, 0.49407, 0.49415, 0.49424, 0.49432, 0.49441,
0.49450, 0.49459, 0.49469, 0.49479, 0.49489, 0.49499, 0.49509,
0.49520, 0.49531, 0.49542, 0.49553, 0.49564, 0.49576, 0.49587,
0.49599, 0.49611, 0.49623, 0.49635, 0.49648, 0.49660, 0.49673,
0.49686, 0.49699, 0.49712, 0.49725, 0.49738, 0.49752, 0.49765,
0.49779, 0.49792, 0.49806, 0.49820, 0.49833, 0.49847, 0.49861,
0.49875, 0.49889, 0.49904, 0.49918, 0.49932, 0.49946, 0.49961,
0.49975, 0.49989, 0.50004, 0.50018, 0.50033, 0.50047, 0.50062,
0.50076, 0.50091, 0.50105, 0.50120, 0.50135, 0.50149, 0.50164,
0.50178, 0.50193, 0.50207, 0.50222, 0.50237, 0.50251, 0.50266,
0.50280, 0.50294, 0.50309, 0.50323, 0.50338, 0.50352, 0.50366,
0.50381, 0.50395, 0.50409, 0.50423, 0.50437, 0.50451, 0.50465,
0.50479, 0.50492, 0.50506, 0.50520, 0.50533, 0.50547, 0.50560,
0.50573, 0.50586, 0.50599, 0.50612, 0.50625, 0.50638, 0.50650,
0.50663, 0.50675, 0.50687, 0.50699, 0.50711, 0.50723, 0.50734,
0.50746, 0.50757, 0.50768, 0.50778, 0.50789, 0.50799, 0.50810,
0.50820, 0.50829, 0.50839, 0.50848, 0.50857, 0.50866, 0.50875,
0.50883, 0.50891, 0.50899, 0.50906, 0.50914, 0.50921, 0.50927,
0.50934, 0.50940, 0.50946, 0.50951, 0.50956, 0.50961, 0.50966,
0.50970, 0.50974, 0.50977, 0.50981, 0.50984, 0.50987, 0.50990,
0.50993, 0.50996, 0.51000, 0.51006, 0.51015, 0.51030, 0.51056,
0.51109, 0.51230, 0.51583, 0.53285, 1.00000},
//--------- 0.12 GeV
{0.46810, 0.48504, 0.48853, 0.48972, 0.49023, 0.49049, 0.49063,
0.49072, 0.49078, 0.49082, 0.49086, 0.49089, 0.49093, 0.49097,
0.49101, 0.49105, 0.49110, 0.49115, 0.49120, 0.49126, 0.49132,
0.49139, 0.49146, 0.49154, 0.49161, 0.49170, 0.49178, 0.49187,
0.49196, 0.49206, 0.49216, 0.49226, 0.49237, 0.49247, 0.49259,
0.49270, 0.49282, 0.49294, 0.49306, 0.49319, 0.49331, 0.49345,
0.49358, 0.49371, 0.49385, 0.49399, 0.49414, 0.49428, 0.49443,
0.49457, 0.49473, 0.49488, 0.49503, 0.49519, 0.49534, 0.49550,
0.49566, 0.49583, 0.49599, 0.49615, 0.49632, 0.49649, 0.49666,
0.49683, 0.49700, 0.49717, 0.49734, 0.49752, 0.49769, 0.49787,
0.49804, 0.49822, 0.49840, 0.49858, 0.49875, 0.49893, 0.49911,
0.49929, 0.49948, 0.49966, 0.49984, 0.50002, 0.50020, 0.50039,
0.50057, 0.50075, 0.50093, 0.50112, 0.50130, 0.50149, 0.50167,
0.50185, 0.50204, 0.50222, 0.50240, 0.50258, 0.50277, 0.50295,
0.50313, 0.50331, 0.50350, 0.50368, 0.50386, 0.50404, 0.50422,
0.50440, 0.50457, 0.50475, 0.50493, 0.50510, 0.50528, 0.50545,
0.50563, 0.50580, 0.50597, 0.50614, 0.50631, 0.50648, 0.50665,
0.50682, 0.50698, 0.50714, 0.50731, 0.50747, 0.50763, 0.50778,
0.50794, 0.50809, 0.50824, 0.50840, 0.50854, 0.50869, 0.50884,
0.50898, 0.50912, 0.50926, 0.50939, 0.50952, 0.50966, 0.50978,
0.50991, 0.51003, 0.51015, 0.51027, 0.51038, 0.51050, 0.51060,
0.51071, 0.51081, 0.51091, 0.51101, 0.51110, 0.51119, 0.51127,
0.51136, 0.51143, 0.51151, 0.51158, 0.51165, 0.51171, 0.51177,
0.51182, 0.51187, 0.51192, 0.51196, 0.51200, 0.51204, 0.51208,
0.51211, 0.51215, 0.51219, 0.51225, 0.51234, 0.51248, 0.51274,
0.51325, 0.51444, 0.51792, 0.53482, 1.00000},
//--------- 0.14 GeV
{0.46571, 0.48253, 0.48598, 0.48715, 0.48765, 0.48790, 0.48804,
0.48812, 0.48818, 0.48823, 0.48827, 0.48831, 0.48836, 0.48841,
0.48846, 0.48851, 0.48857, 0.48864, 0.48871, 0.48878, 0.48886,
0.48895, 0.48904, 0.48913, 0.48923, 0.48933, 0.48943, 0.48955,
0.48966, 0.48978, 0.48990, 0.49003, 0.49016, 0.49029, 0.49043,
0.49057, 0.49072, 0.49087, 0.49102, 0.49117, 0.49133, 0.49149,
0.49166, 0.49182, 0.49199, 0.49217, 0.49234, 0.49252, 0.49270,
0.49288, 0.49307, 0.49326, 0.49345, 0.49364, 0.49383, 0.49403,
0.49423, 0.49443, 0.49463, 0.49483, 0.49504, 0.49525, 0.49546,
0.49567, 0.49588, 0.49609, 0.49631, 0.49652, 0.49674, 0.49696,
0.49718, 0.49740, 0.49762, 0.49784, 0.49806, 0.49829, 0.49851,
0.49874, 0.49896, 0.49919, 0.49942, 0.49965, 0.49987, 0.50010,
0.50033, 0.50056, 0.50079, 0.50102, 0.50125, 0.50148, 0.50171,
0.50194, 0.50217, 0.50240, 0.50263, 0.50285, 0.50308, 0.50331,
0.50354, 0.50377, 0.50399, 0.50422, 0.50444, 0.50467, 0.50489,
0.50512, 0.50534, 0.50556, 0.50578, 0.50600, 0.50622, 0.50643,
0.50665, 0.50686, 0.50708, 0.50729, 0.50750, 0.50771, 0.50792,
0.50812, 0.50832, 0.50853, 0.50873, 0.50893, 0.50912, 0.50932,
0.50951, 0.50970, 0.50989, 0.51007, 0.51026, 0.51044, 0.51061,
0.51079, 0.51096, 0.51113, 0.51130, 0.51146, 0.51162, 0.51178,
0.51194, 0.51209, 0.51224, 0.51238, 0.51252, 0.51266, 0.51280,
0.51293, 0.51305, 0.51318, 0.51330, 0.51341, 0.51352, 0.51363,
0.51373, 0.51383, 0.51392, 0.51401, 0.51409, 0.51417, 0.51425,
0.51432, 0.51438, 0.51444, 0.51450, 0.51455, 0.51460, 0.51464,
0.51468, 0.51473, 0.51477, 0.51483, 0.51492, 0.51506, 0.51531,
0.51581, 0.51698, 0.52042, 0.53720, 1.00000},
//--------- 0.18 GeV
{0.45978, 0.47631, 0.47968, 0.48082, 0.48130, 0.48154, 0.48168,
0.48177, 0.48184, 0.48191, 0.48197, 0.48203, 0.48209, 0.48217,
0.48224, 0.48233, 0.48242, 0.48252, 0.48262, 0.48273, 0.48285,
0.48298, 0.48311, 0.48324, 0.48339, 0.48354, 0.48369, 0.48385,
0.48402, 0.48419, 0.48437, 0.48455, 0.48474, 0.48493, 0.48513,
0.48534, 0.48555, 0.48576, 0.48598, 0.48620, 0.48643, 0.48666,
0.48690, 0.48714, 0.48738, 0.48763, 0.48789, 0.48814, 0.48840,
0.48867, 0.48894, 0.48921, 0.48949, 0.48977, 0.49005, 0.49034,
0.49063, 0.49092, 0.49122, 0.49151, 0.49182, 0.49212, 0.49243,
0.49274, 0.49305, 0.49337, 0.49369, 0.49401, 0.49433, 0.49465,
0.49498, 0.49531, 0.49564, 0.49597, 0.49631, 0.49664, 0.49698,
0.49732, 0.49766, 0.49800, 0.49835, 0.49869, 0.49903, 0.49938,
0.49972, 0.50007, 0.50042, 0.50076, 0.50111, 0.50146, 0.50181,
0.50215, 0.50250, 0.50285, 0.50319, 0.50354, 0.50388, 0.50423,
0.50457, 0.50492, 0.50526, 0.50560, 0.50594, 0.50627, 0.50661,
0.50694, 0.50728, 0.50761, 0.50794, 0.50826, 0.50859, 0.50891,
0.50923, 0.50955, 0.50987, 0.51018, 0.51049, 0.51080, 0.51110,
0.51140, 0.51170, 0.51200, 0.51229, 0.51258, 0.51287, 0.51315,
0.51343, 0.51371, 0.51398, 0.51425, 0.51451, 0.51477, 0.51503,
0.51529, 0.51553, 0.51578, 0.51602, 0.51626, 0.51649, 0.51672,
0.51694, 0.51716, 0.51737, 0.51758, 0.51778, 0.51798, 0.51818,
0.51837, 0.51855, 0.51873, 0.51890, 0.51907, 0.51923, 0.51938,
0.51953, 0.51967, 0.51981, 0.51994, 0.52007, 0.52018, 0.52029,
0.52040, 0.52050, 0.52059, 0.52067, 0.52075, 0.52082, 0.52089,
0.52095, 0.52101, 0.52107, 0.52114, 0.52124, 0.52137, 0.52162,
0.52210, 0.52323, 0.52660, 0.54309, 1.00000},
//--------- 0.22 GeV
{0.45250, 0.46873, 0.47203, 0.47313, 0.47360, 0.47385, 0.47399,
0.47409, 0.47418, 0.47426, 0.47434, 0.47443, 0.47453, 0.47463,
0.47474, 0.47486, 0.47499, 0.47513, 0.47527, 0.47543, 0.47559,
0.47576, 0.47594, 0.47613, 0.47632, 0.47653, 0.47674, 0.47696,
0.47719, 0.47742, 0.47766, 0.47791, 0.47817, 0.47843, 0.47870,
0.47897, 0.47926, 0.47955, 0.47984, 0.48015, 0.48046, 0.48077,
0.48109, 0.48142, 0.48176, 0.48210, 0.48244, 0.48280, 0.48316,
0.48352, 0.48389, 0.48426, 0.48464, 0.48503, 0.48542, 0.48582,
0.48622, 0.48662, 0.48704, 0.48745, 0.48787, 0.48830, 0.48873,
0.48916, 0.48960, 0.49004, 0.49048, 0.49093, 0.49138, 0.49184,
0.49230, 0.49276, 0.49323, 0.49370, 0.49417, 0.49464, 0.49512,
0.49559, 0.49607, 0.49655, 0.49704, 0.49752, 0.49801, 0.49850,
0.49898, 0.49947, 0.49996, 0.50045, 0.50095, 0.50144, 0.50193,
0.50242, 0.50291, 0.50340, 0.50389, 0.50438, 0.50486, 0.50535,
0.50583, 0.50632, 0.50680, 0.50728, 0.50776, 0.50823, 0.50871,
0.50918, 0.50965, 0.51011, 0.51057, 0.51103, 0.51149, 0.51194,
0.51239, 0.51284, 0.51328, 0.51371, 0.51415, 0.51458, 0.51500,
0.51542, 0.51584, 0.51625, 0.51665, 0.51706, 0.51745, 0.51784,
0.51823, 0.51861, 0.51898, 0.51935, 0.51972, 0.52008, 0.52043,
0.52077, 0.52111, 0.52145, 0.52178, 0.52210, 0.52242, 0.52273,
0.52303, 0.52333, 0.52362, 0.52390, 0.52418, 0.52444, 0.52471,
0.52496, 0.52521, 0.52545, 0.52569, 0.52591, 0.52613, 0.52634,
0.52655, 0.52674, 0.52693, 0.52711, 0.52728, 0.52745, 0.52760,
0.52775, 0.52788, 0.52801, 0.52813, 0.52824, 0.52835, 0.52844,
0.52853, 0.52861, 0.52869, 0.52878, 0.52888, 0.52903, 0.52927,
0.52974, 0.53085, 0.53413, 0.55032, 1.00000},
//--------- 0.26 GeV
{0.44429, 0.46019, 0.46342, 0.46450, 0.46497, 0.46522, 0.46537,
0.46550, 0.46560, 0.46571, 0.46582, 0.46594, 0.46607, 0.46621,
0.46635, 0.46651, 0.46669, 0.46687, 0.46706, 0.46727, 0.46748,
0.46771, 0.46794, 0.46819, 0.46844, 0.46871, 0.46899, 0.46927,
0.46957, 0.46987, 0.47019, 0.47051, 0.47085, 0.47119, 0.47154,
0.47190, 0.47227, 0.47265, 0.47304, 0.47343, 0.47384, 0.47425,
0.47467, 0.47510, 0.47554, 0.47598, 0.47644, 0.47690, 0.47737,
0.47784, 0.47833, 0.47882, 0.47932, 0.47983, 0.48034, 0.48086,
0.48139, 0.48192, 0.48246, 0.48301, 0.48356, 0.48412, 0.48468,
0.48525, 0.48583, 0.48641, 0.48700, 0.48759, 0.48818, 0.48878,
0.48939, 0.49000, 0.49061, 0.49123, 0.49184, 0.49247, 0.49309,
0.49372, 0.49435, 0.49499, 0.49562, 0.49626, 0.49690, 0.49754,
0.49819, 0.49883, 0.49947, 0.50012, 0.50076, 0.50141, 0.50206,
0.50270, 0.50335, 0.50399, 0.50464, 0.50528, 0.50592, 0.50656,
0.50720, 0.50783, 0.50847, 0.50910, 0.50973, 0.51035, 0.51098,
0.51160, 0.51221, 0.51282, 0.51343, 0.51404, 0.51464, 0.51523,
0.51582, 0.51641, 0.51699, 0.51757, 0.51814, 0.51870, 0.51926,
0.51981, 0.52036, 0.52090, 0.52143, 0.52196, 0.52248, 0.52299,
0.52350, 0.52400, 0.52449, 0.52498, 0.52545, 0.52592, 0.52638,
0.52684, 0.52728, 0.52772, 0.52815, 0.52857, 0.52898, 0.52939,
0.52978, 0.53017, 0.53055, 0.53092, 0.53128, 0.53163, 0.53197,
0.53231, 0.53263, 0.53295, 0.53325, 0.53355, 0.53383, 0.53411,
0.53438, 0.53463, 0.53488, 0.53511, 0.53534, 0.53555, 0.53576,
0.53595, 0.53613, 0.53631, 0.53647, 0.53662, 0.53675, 0.53688,
0.53700, 0.53711, 0.53722, 0.53733, 0.53745, 0.53760, 0.53785,
0.53832, 0.53940, 0.54262, 0.55849, 1.00000},
//--------- 0.28 GeV
{0.43989, 0.45563, 0.45882, 0.45990, 0.46037, 0.46062, 0.46079,
0.46092, 0.46104, 0.46116, 0.46129, 0.46143, 0.46157, 0.46173,
0.46190, 0.46208, 0.46228, 0.46249, 0.46271, 0.46294, 0.46318,
0.46344, 0.46370, 0.46398, 0.46427, 0.46457, 0.46489, 0.46521,
0.46554, 0.46589, 0.46624, 0.46661, 0.46699, 0.46737, 0.46777,
0.46818, 0.46860, 0.46902, 0.46946, 0.46991, 0.47036, 0.47083,
0.47130, 0.47179, 0.47228, 0.47278, 0.47330, 0.47382, 0.47435,
0.47489, 0.47543, 0.47599, 0.47655, 0.47712, 0.47770, 0.47829,
0.47888, 0.47949, 0.48010, 0.48071, 0.48134, 0.48197, 0.48260,
0.48324, 0.48389, 0.48455, 0.48521, 0.48587, 0.48654, 0.48722,
0.48790, 0.48858, 0.48927, 0.48996, 0.49066, 0.49136, 0.49206,
0.49277, 0.49348, 0.49419, 0.49490, 0.49562, 0.49634, 0.49706,
0.49778, 0.49850, 0.49922, 0.49995, 0.50067, 0.50140, 0.50212,
0.50285, 0.50357, 0.50429, 0.50501, 0.50574, 0.50646, 0.50717,
0.50789, 0.50860, 0.50931, 0.51002, 0.51073, 0.51143, 0.51213,
0.51283, 0.51352, 0.51421, 0.51489, 0.51557, 0.51625, 0.51692,
0.51759, 0.51825, 0.51890, 0.51955, 0.52019, 0.52083, 0.52146,
0.52208, 0.52270, 0.52331, 0.52391, 0.52450, 0.52509, 0.52567,
0.52624, 0.52681, 0.52736, 0.52791, 0.52845, 0.52898, 0.52950,
0.53001, 0.53051, 0.53100, 0.53149, 0.53196, 0.53243, 0.53289,
0.53333, 0.53377, 0.53420, 0.53461, 0.53502, 0.53542, 0.53581,
0.53618, 0.53655, 0.53690, 0.53725, 0.53758, 0.53791, 0.53822,
0.53852, 0.53881, 0.53909, 0.53936, 0.53961, 0.53985, 0.54009,
0.54031, 0.54051, 0.54071, 0.54089, 0.54106, 0.54122, 0.54137,
0.54150, 0.54163, 0.54175, 0.54187, 0.54200, 0.54217, 0.54242,
0.54290, 0.54397, 0.54715, 0.56286, 1.00000},
//--------- 0.30 GeV
{0.43539, 0.45097, 0.45413, 0.45520, 0.45567, 0.45593, 0.45611,
0.45625, 0.45639, 0.45653, 0.45667, 0.45683, 0.45699, 0.45717,
0.45737, 0.45757, 0.45779, 0.45803, 0.45828, 0.45854, 0.45881,
0.45910, 0.45940, 0.45971, 0.46004, 0.46038, 0.46073, 0.46109,
0.46147, 0.46185, 0.46225, 0.46266, 0.46308, 0.46352, 0.46396,
0.46442, 0.46489, 0.46537, 0.46586, 0.46636, 0.46687, 0.46739,
0.46792, 0.46846, 0.46902, 0.46958, 0.47015, 0.47073, 0.47133,
0.47193, 0.47254, 0.47316, 0.47379, 0.47443, 0.47508, 0.47573,
0.47640, 0.47707, 0.47775, 0.47844, 0.47913, 0.47984, 0.48054,
0.48126, 0.48198, 0.48271, 0.48344, 0.48418, 0.48493, 0.48568,
0.48644, 0.48720, 0.48796, 0.48873, 0.48950, 0.49028, 0.49105,
0.49184, 0.49262, 0.49341, 0.49420, 0.49499, 0.49579, 0.49658,
0.49738, 0.49818, 0.49898, 0.49978, 0.50058, 0.50138, 0.50218,
0.50298, 0.50378, 0.50458, 0.50538, 0.50618, 0.50698, 0.50777,
0.50856, 0.50935, 0.51014, 0.51093, 0.51171, 0.51249, 0.51326,
0.51404, 0.51481, 0.51557, 0.51633, 0.51708, 0.51783, 0.51858,
0.51932, 0.52005, 0.52078, 0.52150, 0.52222, 0.52293, 0.52363,
0.52433, 0.52501, 0.52569, 0.52637, 0.52703, 0.52769, 0.52833,
0.52897, 0.52960, 0.53022, 0.53083, 0.53144, 0.53203, 0.53261,
0.53319, 0.53375, 0.53430, 0.53484, 0.53538, 0.53590, 0.53641,
0.53691, 0.53740, 0.53788, 0.53835, 0.53880, 0.53925, 0.53968,
0.54010, 0.54051, 0.54091, 0.54130, 0.54167, 0.54204, 0.54239,
0.54273, 0.54305, 0.54337, 0.54367, 0.54395, 0.54423, 0.54449,
0.54474, 0.54497, 0.54519, 0.54540, 0.54559, 0.54577, 0.54594,
0.54609, 0.54624, 0.54638, 0.54651, 0.54666, 0.54683, 0.54709,
0.54757, 0.54863, 0.55179, 0.56733, 1.00000},
//--------- 0.34 GeV
{0.42589, 0.44111, 0.44420, 0.44526, 0.44574, 0.44602, 0.44622,
0.44640, 0.44657, 0.44674, 0.44693, 0.44713, 0.44734, 0.44757,
0.44782, 0.44808, 0.44837, 0.44866, 0.44897, 0.44930, 0.44965,
0.45001, 0.45039, 0.45078, 0.45119, 0.45161, 0.45205, 0.45250,
0.45296, 0.45345, 0.45394, 0.45445, 0.45498, 0.45551, 0.45607,
0.45663, 0.45721, 0.45780, 0.45841, 0.45902, 0.45965, 0.46030,
0.46095, 0.46162, 0.46230, 0.46299, 0.46370, 0.46441, 0.46514,
0.46588, 0.46663, 0.46739, 0.46816, 0.46894, 0.46973, 0.47053,
0.47134, 0.47216, 0.47299, 0.47382, 0.47466, 0.47552, 0.47638,
0.47724, 0.47811, 0.47899, 0.47988, 0.48077, 0.48167, 0.48257,
0.48348, 0.48440, 0.48531, 0.48623, 0.48716, 0.48809, 0.48902,
0.48996, 0.49090, 0.49184, 0.49279, 0.49373, 0.49468, 0.49563,
0.49658, 0.49753, 0.49849, 0.49944, 0.50040, 0.50135, 0.50231,
0.50326, 0.50422, 0.50517, 0.50612, 0.50707, 0.50802, 0.50897,
0.50992, 0.51086, 0.51181, 0.51274, 0.51368, 0.51461, 0.51554,
0.51647, 0.51739, 0.51831, 0.51922, 0.52013, 0.52103, 0.52193,
0.52282, 0.52371, 0.52459, 0.52546, 0.52633, 0.52719, 0.52804,
0.52888, 0.52972, 0.53055, 0.53136, 0.53217, 0.53297, 0.53376,
0.53454, 0.53532, 0.53608, 0.53682, 0.53756, 0.53829, 0.53901,
0.53971, 0.54040, 0.54108, 0.54175, 0.54241, 0.54305, 0.54368,
0.54430, 0.54490, 0.54550, 0.54607, 0.54664, 0.54719, 0.54773,
0.54825, 0.54876, 0.54926, 0.54974, 0.55021, 0.55066, 0.55110,
0.55152, 0.55193, 0.55232, 0.55269, 0.55306, 0.55340, 0.55373,
0.55404, 0.55434, 0.55462, 0.55488, 0.55513, 0.55536, 0.55558,
0.55578, 0.55596, 0.55614, 0.55631, 0.55648, 0.55668, 0.55696,
0.55744, 0.55850, 0.56159, 0.57677, 1.00000},
//--------- 0.42 GeV
{0.40579, 0.42028, 0.42324, 0.42428, 0.42479, 0.42512, 0.42538,
0.42564, 0.42589, 0.42617, 0.42646, 0.42677, 0.42711, 0.42747,
0.42785, 0.42826, 0.42869, 0.42914, 0.42962, 0.43012, 0.43064,
0.43119, 0.43175, 0.43234, 0.43294, 0.43357, 0.43422, 0.43489,
0.43558, 0.43628, 0.43701, 0.43776, 0.43852, 0.43930, 0.44010,
0.44092, 0.44175, 0.44261, 0.44348, 0.44436, 0.44526, 0.44618,
0.44712, 0.44806, 0.44903, 0.45001, 0.45100, 0.45200, 0.45302,
0.45406, 0.45510, 0.45616, 0.45722, 0.45830, 0.45939, 0.46049,
0.46160, 0.46272, 0.46385, 0.46499, 0.46613, 0.46728, 0.46844,
0.46961, 0.47078, 0.47196, 0.47314, 0.47433, 0.47552, 0.47672,
0.47793, 0.47913, 0.48034, 0.48156, 0.48278, 0.48400, 0.48522,
0.48645, 0.48768, 0.48891, 0.49014, 0.49137, 0.49261, 0.49385,
0.49509, 0.49633, 0.49757, 0.49881, 0.50005, 0.50129, 0.50253,
0.50377, 0.50501, 0.50625, 0.50749, 0.50873, 0.50997, 0.51120,
0.51244, 0.51367, 0.51490, 0.51613, 0.51736, 0.51858, 0.51980,
0.52102, 0.52223, 0.52344, 0.52465, 0.52585, 0.52705, 0.52825,
0.52944, 0.53062, 0.53180, 0.53297, 0.53414, 0.53530, 0.53645,
0.53759, 0.53873, 0.53986, 0.54097, 0.54208, 0.54318, 0.54427,
0.54535, 0.54642, 0.54748, 0.54852, 0.54955, 0.55057, 0.55158,
0.55257, 0.55355, 0.55451, 0.55546, 0.55640, 0.55731, 0.55822,
0.55910, 0.55997, 0.56082, 0.56166, 0.56248, 0.56328, 0.56406,
0.56482, 0.56557, 0.56629, 0.56700, 0.56769, 0.56836, 0.56900,
0.56963, 0.57024, 0.57083, 0.57139, 0.57193, 0.57246, 0.57296,
0.57343, 0.57389, 0.57432, 0.57472, 0.57511, 0.57547, 0.57581,
0.57612, 0.57641, 0.57668, 0.57694, 0.57719, 0.57746, 0.57779,
0.57829, 0.57933, 0.58229, 0.59675, 1.00000},
//--------- 0.52 GeV
{0.38031, 0.39387, 0.39666, 0.39769, 0.39825, 0.39867, 0.39905,
0.39944, 0.39985, 0.40030, 0.40078, 0.40130, 0.40186, 0.40245,
0.40309, 0.40375, 0.40446, 0.40520, 0.40598, 0.40678, 0.40762,
0.40849, 0.40939, 0.41032, 0.41128, 0.41227, 0.41328, 0.41432,
0.41539, 0.41647, 0.41759, 0.41872, 0.41988, 0.42106, 0.42226,
0.42348, 0.42472, 0.42598, 0.42725, 0.42855, 0.42986, 0.43118,
0.43252, 0.43387, 0.43524, 0.43662, 0.43801, 0.43941, 0.44082,
0.44224, 0.44367, 0.44511, 0.44655, 0.44800, 0.44946, 0.45091,
0.45238, 0.45385, 0.45532, 0.45679, 0.45826, 0.45974, 0.46122,
0.46270, 0.46418, 0.46566, 0.46715, 0.46863, 0.47011, 0.47159,
0.47308, 0.47456, 0.47604, 0.47752, 0.47901, 0.48049, 0.48197,
0.48345, 0.48493, 0.48641, 0.48789, 0.48937, 0.49085, 0.49233,
0.49381, 0.49529, 0.49677, 0.49825, 0.49973, 0.50121, 0.50269,
0.50417, 0.50565, 0.50712, 0.50860, 0.51008, 0.51156, 0.51304,
0.51452, 0.51600, 0.51748, 0.51897, 0.52045, 0.52193, 0.52341,
0.52489, 0.52637, 0.52786, 0.52934, 0.53082, 0.53231, 0.53379,
0.53527, 0.53675, 0.53823, 0.53972, 0.54120, 0.54267, 0.54415,
0.54563, 0.54710, 0.54857, 0.55004, 0.55150, 0.55296, 0.55441,
0.55586, 0.55731, 0.55874, 0.56017, 0.56159, 0.56300, 0.56440,
0.56580, 0.56717, 0.56854, 0.56990, 0.57124, 0.57256, 0.57387,
0.57516, 0.57644, 0.57770, 0.57894, 0.58016, 0.58136, 0.58254,
0.58369, 0.58483, 0.58594, 0.58703, 0.58809, 0.58913, 0.59015,
0.59113, 0.59209, 0.59302, 0.59392, 0.59479, 0.59563, 0.59644,
0.59721, 0.59796, 0.59866, 0.59933, 0.59996, 0.60056, 0.60112,
0.60164, 0.60212, 0.60257, 0.60298, 0.60337, 0.60375, 0.60416,
0.60472, 0.60575, 0.60854, 0.62207, 1.00000},
//--------- 0.62 GeV
{0.35864, 0.37149, 0.37423, 0.37533, 0.37603, 0.37662, 0.37721,
0.37784, 0.37851, 0.37925, 0.38006, 0.38092, 0.38185, 0.38283,
0.38388, 0.38498, 0.38614, 0.38735, 0.38861, 0.38992, 0.39127,
0.39266, 0.39410, 0.39557, 0.39708, 0.39862, 0.40020, 0.40180,
0.40343, 0.40509, 0.40677, 0.40848, 0.41020, 0.41194, 0.41370,
0.41547, 0.41726, 0.41905, 0.42086, 0.42267, 0.42449, 0.42631,
0.42814, 0.42996, 0.43179, 0.43360, 0.43542, 0.43723, 0.43903,
0.44082, 0.44260, 0.44437, 0.44612, 0.44786, 0.44959, 0.45130,
0.45300, 0.45468, 0.45634, 0.45799, 0.45962, 0.46123, 0.46283,
0.46441, 0.46597, 0.46752, 0.46905, 0.47056, 0.47206, 0.47354,
0.47502, 0.47647, 0.47792, 0.47935, 0.48077, 0.48218, 0.48358,
0.48497, 0.48635, 0.48772, 0.48908, 0.49044, 0.49179, 0.49314,
0.49448, 0.49581, 0.49715, 0.49848, 0.49981, 0.50114, 0.50247,
0.50380, 0.50513, 0.50646, 0.50780, 0.50914, 0.51049, 0.51184,
0.51320, 0.51456, 0.51593, 0.51731, 0.51870, 0.52010, 0.52151,
0.52293, 0.52436, 0.52581, 0.52726, 0.52874, 0.53022, 0.53172,
0.53323, 0.53476, 0.53631, 0.53787, 0.53945, 0.54105, 0.54266,
0.54429, 0.54594, 0.54760, 0.54928, 0.55098, 0.55269, 0.55442,
0.55616, 0.55791, 0.55968, 0.56146, 0.56325, 0.56505, 0.56686,
0.56867, 0.57049, 0.57232, 0.57414, 0.57596, 0.57779, 0.57961,
0.58142, 0.58322, 0.58502, 0.58681, 0.58858, 0.59034, 0.59208,
0.59380, 0.59550, 0.59719, 0.59884, 0.60048, 0.60208, 0.60365,
0.60520, 0.60671, 0.60818, 0.60962, 0.61101, 0.61236, 0.61367,
0.61493, 0.61614, 0.61730, 0.61840, 0.61945, 0.62043, 0.62136,
0.62222, 0.62302, 0.62376, 0.62444, 0.62507, 0.62566, 0.62625,
0.62694, 0.62805, 0.63078, 0.64360, 1.00000},
//--------- 0.70 GeV
{0.34350, 0.35601, 0.35884, 0.36012, 0.36104, 0.36190, 0.36278,
0.36374, 0.36477, 0.36590, 0.36712, 0.36842, 0.36981, 0.37128,
0.37283, 0.37446, 0.37616, 0.37792, 0.37975, 0.38163, 0.38356,
0.38554, 0.38757, 0.38963, 0.39173, 0.39386, 0.39602, 0.39821,
0.40041, 0.40264, 0.40488, 0.40712, 0.40938, 0.41165, 0.41391,
0.41618, 0.41844, 0.42069, 0.42294, 0.42518, 0.42740, 0.42960,
0.43179, 0.43395, 0.43609, 0.43821, 0.44030, 0.44236, 0.44438,
0.44638, 0.44834, 0.45027, 0.45216, 0.45401, 0.45583, 0.45761,
0.45936, 0.46106, 0.46273, 0.46437, 0.46597, 0.46753, 0.46905,
0.47055, 0.47201, 0.47343, 0.47483, 0.47620, 0.47753, 0.47884,
0.48013, 0.48138, 0.48262, 0.48383, 0.48501, 0.48618, 0.48733,
0.48846, 0.48957, 0.49067, 0.49175, 0.49282, 0.49388, 0.49493,
0.49597, 0.49700, 0.49803, 0.49905, 0.50007, 0.50109, 0.50211,
0.50313, 0.50415, 0.50518, 0.50621, 0.50725, 0.50830, 0.50936,
0.51043, 0.51151, 0.51261, 0.51372, 0.51485, 0.51600, 0.51717,
0.51836, 0.51957, 0.52080, 0.52206, 0.52334, 0.52465, 0.52599,
0.52735, 0.52875, 0.53018, 0.53164, 0.53313, 0.53466, 0.53622,
0.53782, 0.53945, 0.54112, 0.54283, 0.54457, 0.54635, 0.54817,
0.55002, 0.55192, 0.55384, 0.55580, 0.55780, 0.55983, 0.56188,
0.56397, 0.56609, 0.56823, 0.57039, 0.57258, 0.57478, 0.57701,
0.57924, 0.58149, 0.58374, 0.58601, 0.58827, 0.59054, 0.59280,
0.59506, 0.59731, 0.59954, 0.60177, 0.60397, 0.60616, 0.60832,
0.61045, 0.61255, 0.61461, 0.61664, 0.61862, 0.62055, 0.62243,
0.62426, 0.62602, 0.62772, 0.62935, 0.63090, 0.63237, 0.63376,
0.63507, 0.63628, 0.63741, 0.63844, 0.63940, 0.64028, 0.64114,
0.64206, 0.64334, 0.64616, 0.65865, 1.00000},
//--------- 0.80 GeV
{0.32580, 0.33801, 0.34101, 0.34257, 0.34382, 0.34504, 0.34633,
0.34774, 0.34926, 0.35090, 0.35267, 0.35456, 0.35656, 0.35868,
0.36089, 0.36319, 0.36558, 0.36806, 0.37060, 0.37320, 0.37587,
0.37858, 0.38133, 0.38413, 0.38695, 0.38979, 0.39265, 0.39553,
0.39841, 0.40129, 0.40417, 0.40704, 0.40990, 0.41274, 0.41556,
0.41836, 0.42112, 0.42386, 0.42656, 0.42921, 0.43183, 0.43440,
0.43692, 0.43939, 0.44181, 0.44417, 0.44648, 0.44873, 0.45092,
0.45305, 0.45512, 0.45714, 0.45909, 0.46098, 0.46281, 0.46459,
0.46631, 0.46797, 0.46958, 0.47113, 0.47263, 0.47408, 0.47548,
0.47683, 0.47813, 0.47940, 0.48062, 0.48180, 0.48294, 0.48404,
0.48511, 0.48614, 0.48715, 0.48812, 0.48906, 0.48998, 0.49088,
0.49175, 0.49260, 0.49343, 0.49424, 0.49504, 0.49582, 0.49659,
0.49735, 0.49809, 0.49884, 0.49957, 0.50030, 0.50104, 0.50177,
0.50250, 0.50324, 0.50398, 0.50473, 0.50548, 0.50625, 0.50703,
0.50783, 0.50864, 0.50947, 0.51032, 0.51119, 0.51209, 0.51301,
0.51395, 0.51492, 0.51593, 0.51696, 0.51803, 0.51913, 0.52027,
0.52145, 0.52267, 0.52394, 0.52524, 0.52659, 0.52799, 0.52944,
0.53094, 0.53249, 0.53410, 0.53576, 0.53748, 0.53926, 0.54109,
0.54298, 0.54493, 0.54695, 0.54902, 0.55115, 0.55334, 0.55559,
0.55790, 0.56026, 0.56268, 0.56515, 0.56767, 0.57024, 0.57285,
0.57551, 0.57821, 0.58094, 0.58371, 0.58651, 0.58933, 0.59217,
0.59503, 0.59790, 0.60078, 0.60366, 0.60654, 0.60941, 0.61228,
0.61512, 0.61794, 0.62073, 0.62349, 0.62620, 0.62886, 0.63147,
0.63401, 0.63648, 0.63887, 0.64118, 0.64339, 0.64550, 0.64750,
0.64939, 0.65116, 0.65281, 0.65433, 0.65573, 0.65703, 0.65825,
0.65949, 0.66105, 0.66405, 0.67623, 1.00000},
//--------- 0.90 GeV
{0.31155, 0.32353, 0.32669, 0.32849, 0.33003, 0.33159, 0.33326,
0.33508, 0.33705, 0.33917, 0.34145, 0.34387, 0.34643, 0.34912,
0.35192, 0.35483, 0.35783, 0.36093, 0.36409, 0.36732, 0.37061,
0.37394, 0.37730, 0.38069, 0.38410, 0.38752, 0.39094, 0.39436,
0.39777, 0.40115, 0.40452, 0.40785, 0.41115, 0.41441, 0.41762,
0.42078, 0.42389, 0.42693, 0.42992, 0.43284, 0.43568, 0.43846,
0.44116, 0.44379, 0.44634, 0.44881, 0.45120, 0.45351, 0.45574,
0.45790, 0.45997, 0.46197, 0.46389, 0.46574, 0.46751, 0.46922,
0.47085, 0.47242, 0.47392, 0.47537, 0.47675, 0.47807, 0.47935,
0.48056, 0.48173, 0.48285, 0.48393, 0.48497, 0.48596, 0.48691,
0.48783, 0.48872, 0.48957, 0.49039, 0.49119, 0.49196, 0.49270,
0.49343, 0.49413, 0.49481, 0.49548, 0.49613, 0.49677, 0.49739,
0.49801, 0.49861, 0.49921, 0.49981, 0.50040, 0.50099, 0.50158,
0.50217, 0.50277, 0.50337, 0.50397, 0.50459, 0.50521, 0.50585,
0.50650, 0.50717, 0.50785, 0.50855, 0.50928, 0.51002, 0.51079,
0.51159, 0.51241, 0.51326, 0.51415, 0.51507, 0.51602, 0.51701,
0.51805, 0.51912, 0.52025, 0.52141, 0.52263, 0.52390, 0.52523,
0.52661, 0.52805, 0.52956, 0.53113, 0.53276, 0.53447, 0.53624,
0.53809, 0.54001, 0.54201, 0.54408, 0.54623, 0.54847, 0.55078,
0.55317, 0.55564, 0.55819, 0.56081, 0.56352, 0.56629, 0.56914,
0.57206, 0.57504, 0.57809, 0.58120, 0.58436, 0.58757, 0.59083,
0.59412, 0.59746, 0.60082, 0.60421, 0.60762, 0.61103, 0.61445,
0.61787, 0.62128, 0.62467, 0.62804, 0.63137, 0.63465, 0.63788,
0.64105, 0.64414, 0.64715, 0.65006, 0.65286, 0.65554, 0.65810,
0.66052, 0.66280, 0.66493, 0.66689, 0.66871, 0.67038, 0.67194,
0.67348, 0.67529, 0.67844, 0.69039, 1.00000},
//--------- 1.00 GeV
{0.30023, 0.31202, 0.31534, 0.31738, 0.31921, 0.32110, 0.32315,
0.32537, 0.32778, 0.33037, 0.33315, 0.33609, 0.33919, 0.34243,
0.34579, 0.34927, 0.35285, 0.35652, 0.36025, 0.36404, 0.36788,
0.37175, 0.37564, 0.37954, 0.38344, 0.38733, 0.39120, 0.39504,
0.39885, 0.40262, 0.40634, 0.41000, 0.41361, 0.41714, 0.42061,
0.42400, 0.42730, 0.43053, 0.43366, 0.43671, 0.43966, 0.44251,
0.44527, 0.44793, 0.45050, 0.45296, 0.45534, 0.45761, 0.45979,
0.46188, 0.46388, 0.46579, 0.46762, 0.46936, 0.47103, 0.47261,
0.47413, 0.47558, 0.47696, 0.47827, 0.47953, 0.48073, 0.48187,
0.48296, 0.48401, 0.48501, 0.48596, 0.48688, 0.48776, 0.48860,
0.48941, 0.49018, 0.49093, 0.49165, 0.49235, 0.49302, 0.49368,
0.49431, 0.49492, 0.49552, 0.49611, 0.49668, 0.49724, 0.49779,
0.49833, 0.49886, 0.49939, 0.49991, 0.50043, 0.50095, 0.50147,
0.50199, 0.50252, 0.50305, 0.50358, 0.50412, 0.50467, 0.50523,
0.50580, 0.50639, 0.50698, 0.50760, 0.50823, 0.50888, 0.50956,
0.51025, 0.51098, 0.51172, 0.51250, 0.51331, 0.51415, 0.51503,
0.51594, 0.51690, 0.51790, 0.51894, 0.52004, 0.52118, 0.52238,
0.52364, 0.52495, 0.52633, 0.52778, 0.52929, 0.53088, 0.53255,
0.53429, 0.53612, 0.53803, 0.54003, 0.54211, 0.54430, 0.54657,
0.54894, 0.55141, 0.55397, 0.55663, 0.55939, 0.56225, 0.56520,
0.56824, 0.57138, 0.57460, 0.57791, 0.58130, 0.58476, 0.58830,
0.59190, 0.59556, 0.59928, 0.60305, 0.60686, 0.61070, 0.61458,
0.61847, 0.62237, 0.62627, 0.63015, 0.63402, 0.63786, 0.64165,
0.64539, 0.64905, 0.65263, 0.65611, 0.65948, 0.66271, 0.66581,
0.66875, 0.67153, 0.67412, 0.67653, 0.67875, 0.68080, 0.68269,
0.68452, 0.68656, 0.68987, 0.70164, 1.00000},
//--------- 1.10 GeV
{0.29087, 0.30256, 0.30604, 0.30832, 0.31045, 0.31269, 0.31511,
0.31775, 0.32061, 0.32369, 0.32697, 0.33044, 0.33407, 0.33786,
0.34179, 0.34582, 0.34996, 0.35417, 0.35844, 0.36276, 0.36710,
0.37145, 0.37581, 0.38015, 0.38447, 0.38876, 0.39300, 0.39718,
0.40131, 0.40536, 0.40934, 0.41323, 0.41704, 0.42075, 0.42437,
0.42788, 0.43129, 0.43459, 0.43778, 0.44085, 0.44381, 0.44666,
0.44939, 0.45200, 0.45451, 0.45690, 0.45919, 0.46136, 0.46344,
0.46541, 0.46729, 0.46907, 0.47076, 0.47237, 0.47390, 0.47536,
0.47674, 0.47805, 0.47929, 0.48048, 0.48161, 0.48268, 0.48370,
0.48468, 0.48561, 0.48649, 0.48734, 0.48816, 0.48894, 0.48969,
0.49041, 0.49110, 0.49177, 0.49242, 0.49304, 0.49365, 0.49424,
0.49481, 0.49537, 0.49591, 0.49644, 0.49697, 0.49748, 0.49799,
0.49849, 0.49898, 0.49947, 0.49996, 0.50044, 0.50092, 0.50141,
0.50189, 0.50238, 0.50287, 0.50336, 0.50386, 0.50437, 0.50488,
0.50540, 0.50594, 0.50648, 0.50704, 0.50761, 0.50820, 0.50881,
0.50943, 0.51008, 0.51075, 0.51144, 0.51216, 0.51291, 0.51369,
0.51450, 0.51535, 0.51624, 0.51717, 0.51815, 0.51917, 0.52024,
0.52137, 0.52255, 0.52380, 0.52511, 0.52649, 0.52794, 0.52947,
0.53108, 0.53278, 0.53456, 0.53644, 0.53841, 0.54048, 0.54266,
0.54494, 0.54734, 0.54984, 0.55246, 0.55519, 0.55803, 0.56100,
0.56407, 0.56726, 0.57056, 0.57396, 0.57748, 0.58109, 0.58480,
0.58861, 0.59251, 0.59648, 0.60054, 0.60466, 0.60885, 0.61309,
0.61737, 0.62169, 0.62603, 0.63039, 0.63474, 0.63909, 0.64340,
0.64767, 0.65188, 0.65602, 0.66005, 0.66398, 0.66777, 0.67140,
0.67487, 0.67815, 0.68123, 0.68409, 0.68673, 0.68915, 0.69139,
0.69351, 0.69580, 0.69928, 0.71094, 1.00000},
//--------- 1.20 GeV
{0.28281, 0.29444, 0.29810, 0.30065, 0.30308, 0.30567, 0.30849,
0.31156, 0.31489, 0.31846, 0.32226, 0.32626, 0.33044, 0.33479,
0.33927, 0.34386, 0.34853, 0.35328, 0.35807, 0.36288, 0.36769,
0.37250, 0.37728, 0.38202, 0.38670, 0.39132, 0.39587, 0.40032,
0.40469, 0.40896, 0.41312, 0.41717, 0.42110, 0.42491, 0.42860,
0.43216, 0.43559, 0.43889, 0.44206, 0.44510, 0.44800, 0.45077,
0.45342, 0.45593, 0.45833, 0.46060, 0.46275, 0.46479, 0.46673,
0.46856, 0.47029, 0.47192, 0.47347, 0.47494, 0.47632, 0.47763,
0.47887, 0.48005, 0.48117, 0.48223, 0.48323, 0.48419, 0.48510,
0.48597, 0.48680, 0.48760, 0.48835, 0.48908, 0.48978, 0.49046,
0.49110, 0.49173, 0.49234, 0.49292, 0.49349, 0.49405, 0.49459,
0.49512, 0.49564, 0.49615, 0.49665, 0.49714, 0.49762, 0.49810,
0.49857, 0.49904, 0.49951, 0.49997, 0.50044, 0.50090, 0.50136,
0.50182, 0.50229, 0.50275, 0.50322, 0.50370, 0.50417, 0.50466,
0.50515, 0.50565, 0.50616, 0.50668, 0.50721, 0.50775, 0.50830,
0.50887, 0.50946, 0.51007, 0.51069, 0.51134, 0.51201, 0.51271,
0.51344, 0.51420, 0.51499, 0.51582, 0.51669, 0.51760, 0.51856,
0.51957, 0.52063, 0.52174, 0.52292, 0.52416, 0.52547, 0.52686,
0.52832, 0.52987, 0.53151, 0.53324, 0.53507, 0.53700, 0.53904,
0.54120, 0.54347, 0.54586, 0.54838, 0.55102, 0.55379, 0.55670,
0.55973, 0.56290, 0.56620, 0.56963, 0.57319, 0.57688, 0.58069,
0.58462, 0.58867, 0.59283, 0.59710, 0.60147, 0.60593, 0.61047,
0.61509, 0.61977, 0.62451, 0.62929, 0.63410, 0.63891, 0.64372,
0.64851, 0.65326, 0.65793, 0.66252, 0.66700, 0.67134, 0.67553,
0.67953, 0.68333, 0.68690, 0.69022, 0.69330, 0.69612, 0.69871,
0.70114, 0.70368, 0.70735, 0.71894, 1.00000}
};
// CM momentum (GeV/c)
const G4float G4LEpp::PcmCoul[NENERGYC] = {
0.685E-01, 0.969E-01, 0.137, 0.181, 0.217, 0.237, 0.256,
0.291, 0.321, 0.349, 0.362, 0.375, 0.399, 0.444,
0.494, 0.539, 0.573, 0.613, 0.650, 0.685, 0.718, 0.750
};
// Lab energy (GeV)
const G4float G4LEpp::ElabCoul[NENERGYC] = {
0.100E-01, 0.200E-01, 0.400E-01, 0.700E-01, 0.100, 0.120, 0.140,
0.180, 0.220, 0.260, 0.280, 0.300, 0.340, 0.420,
0.520, 0.620, 0.700, 0.800, 0.900, 1.00, 1.10, 1.20
};
// Max dSigma/domega-CM (mb/sr)
const G4float G4LEpp::dSigmaxCoul[NENERGYC] = {
0.145E+09, 0.368E+08, 0.950E+07, 0.324E+07, 0.166E+07, 0.118E+07, 0.893E+06,
0.570E+06, 0.401E+06, 0.302E+06, 0.266E+06, 0.237E+06, 0.193E+06, 0.138E+06,
0.994E+05, 0.767E+05, 0.645E+05, 0.536E+05, 0.458E+05, 0.399E+05, 0.353E+05,
0.316E+05
};
// Total cross section
const G4float G4LEpp::SigtotCoul[NENERGYC] = {
0.146E+06, 0.371E+05, 0.958E+04, 0.328E+04, 0.169E+04, 0.121E+04, 918.,
593., 424., 325., 290., 261., 217., 163.,
125., 102., 89.8, 78.8, 70.3, 63.6, 58.0, 53.5
};
@@ -0,0 +1,102 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id$
//
// Author: Vladimir Grichine, ~25 October 2014
//
// Class Description
// Final state production model for theoretical models of hadron inelastic
// scattering in geant4;
// To be used in your physics list in case you need this physics.
// In this case you want to register an object of this class with
// the corresponding process.
// Note: This class is part of an implementation framework. You need to
// register corresponding high energy generators and transport codes to
// fill it with life; decay of strong resonances is done directly,
// in case there is no residual nucleus.
// Class Description - End
//
// History:
//
// ~25.10.14 V. Grichine: p and kinematics tests
// 20.11.14 V. Grichine: n, pi+-, K+- added
//
//
#ifndef G4LMsdGenerator_h
#define G4LMsdGenerator_h 1
#include "G4HadronicInteraction.hh"
#include "G4HadFinalState.hh"
// class G4ParticleDefinition;
class G4LMsdGenerator : public G4HadronicInteraction
{
public:
G4LMsdGenerator(const G4String& name = "LMsdGenerator");
~G4LMsdGenerator();
private:
G4LMsdGenerator(const G4LMsdGenerator &right);
const G4LMsdGenerator & operator=(const G4LMsdGenerator &right);
int operator == (const G4LMsdGenerator &right) const;
int operator != (const G4LMsdGenerator &right) const;
public:
G4bool IsApplicable(const G4HadProjectile & thePrimary,
G4Nucleus & theNucleus);
G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary,
G4Nucleus & theNucleus);
G4double SampleMx(const G4HadProjectile* aParticle );
G4double SampleT( G4double Mx );
void ModelDescription(std::ostream& outFile) const;
private:
// G4ParticleDefinition* fParticle;
G4int fPDGencoding;
static const G4double fMxBdata[23][2];
static const G4double fProbMx[60][2];
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4NuclNuclDiffuseElastic.hh 68039 2013-03-13 14:17:40Z gcosmo $
// $Id: G4NuclNuclDiffuseElastic.hh 82391 2014-06-18 10:29:11Z gcosmo $
//
//
// G4 Model: optical elastic scattering with 4-momentum balance
File diff suppressed because it is too large Load Diff
@@ -11,7 +11,7 @@
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake 66892 2013-01-17 10:57:59Z gunter $
# $Id: sources.cmake 86127 2014-11-07 11:11:47Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -53,10 +53,13 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_coherent_elastic
G4DiffuseElastic.hh
G4ElasticHadrNucleusHE.hh
G4HadronElastic.hh
G4LEHadronProtonElastic.hh
G4hhElastic.hh
G4LEnp.hh
G4LEnpData.hh
G4LEpp.hh
G4LEppData.hh
G4LMsdGenerator.hh
G4NuclNuclDiffuseElastic.hh
SOURCES
G4AntiNuclElastic.cc
@@ -66,8 +69,11 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_coherent_elastic
G4DiffuseElastic.cc
G4ElasticHadrNucleusHE.cc
G4HadronElastic.cc
G4LEHadronProtonElastic.cc
G4hhElastic.cc
G4LEnp.cc
G4LEpp.cc
G4LMsdGenerator.cc
G4NuclNuclDiffuseElastic.cc
GRANULAR_DEPENDENCIES
G4baryons
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4ChargeExchangeProcess.cc 66892 2013-01-17 10:57:59Z gunter $
// $Id: G4ChargeExchangeProcess.cc 83427 2014-08-21 15:44:43Z gcosmo $
//
//
// Geant4 Hadron Charge Exchange Process -- source file
@@ -91,7 +91,7 @@ G4ChargeExchangeProcess::G4ChargeExchangeProcess(const G4String& procName)
G4ChargeExchangeProcess::~G4ChargeExchangeProcess()
{
delete factors;
if (factors) delete factors;
}
void G4ChargeExchangeProcess::
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DiffuseElastic.cc 70682 2013-06-04 07:57:01Z gcosmo $
// $Id: G4DiffuseElastic.cc 84417 2014-10-15 08:22:44Z gcosmo $
//
//
// Physics model class G4DiffuseElastic
@@ -55,6 +55,7 @@
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4NistManager.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsFreeVector.hh"
@@ -67,7 +68,7 @@
G4DiffuseElastic::G4DiffuseElastic()
: G4HadronElastic("DiffuseElastic"), fParticle(0)
{
SetMinEnergy( 0.01*GeV );
SetMinEnergy( 0.01*MeV ); // 0.01*GeV );
SetMaxEnergy( 1.*TeV );
verboseLevel = 0;
lowEnergyRecoilLimit = 100.*keV;
@@ -106,13 +107,18 @@ G4DiffuseElastic::G4DiffuseElastic()
G4DiffuseElastic::~G4DiffuseElastic()
{
if(fEnergyVector) delete fEnergyVector;
if( fAngleTable )
{
fAngleTable->clearAndDestroy();
delete fAngleTable ;
if ( fEnergyVector ) {
delete fEnergyVector;
fEnergyVector = 0;
}
for ( std::vector<G4PhysicsTable*>::iterator it = fAngleBank.begin();
it != fAngleBank.end(); ++it ) {
if ( (*it) ) (*it)->clearAndDestroy();
delete *it;
*it = 0;
}
fAngleTable = 0;
}
//////////////////////////////////////////////////////////////////////////////
@@ -131,7 +137,7 @@ void G4DiffuseElastic::Initialise()
for(jEl = 0 ; jEl < numOfEl; ++jEl) // application element loop
{
fAtomicNumber = (*theElementTable)[jEl]->GetZ(); // atomic number
fAtomicWeight = (*theElementTable)[jEl]->GetN(); // number of nucleons
fAtomicWeight = G4NistManager::Instance()->GetAtomicMassAmu( static_cast< G4int >( fAtomicNumber ) );
fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
if(verboseLevel > 0)
@@ -820,7 +826,7 @@ G4DiffuseElastic::SampleTableThetaCMS(const G4ParticleDefinition* particle,
for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
{
if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) break;
}
if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
@@ -896,10 +902,10 @@ G4DiffuseElastic::SampleTableThetaCMS(const G4ParticleDefinition* particle,
void G4DiffuseElastic::InitialiseOnFly(G4double Z, G4double A)
{
fAtomicNumber = Z; // atomic number
fAtomicWeight = A; // number of nucleons
fAtomicWeight = G4NistManager::Instance()->GetAtomicMassAmu( static_cast< G4int >( Z ) );
fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
if( verboseLevel > 0 )
{
G4cout<<"G4DiffuseElastic::Initialise() the element with Z = "
@@ -0,0 +1,303 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4 Low energy model: n-p scattering
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
// 11-OCT-2007 F.W. Jones: removed erroneous code for identity
// exchange of particles.
// FWJ 27-AUG-2010: extended to 5 GeV by Tony Kwan TRIUMF
#include "G4LEHadronProtonElastic.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
#include "G4ios.hh"
#include "Randomize.hh"
G4LEHadronProtonElastic::G4LEHadronProtonElastic():
G4HadronElastic("G4LEHadronProtonElastic")
{
SetMinEnergy(0.);
SetMaxEnergy(20.*MeV);
}
G4LEHadronProtonElastic::~G4LEHadronProtonElastic()
{
theParticleChange.Clear();
}
G4HadFinalState*
G4LEHadronProtonElastic::ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus)
{
theParticleChange.Clear();
const G4HadProjectile* aParticle = &aTrack;
G4double P = aParticle->GetTotalMomentum();
G4double Px = aParticle->Get4Momentum().x();
G4double Py = aParticle->Get4Momentum().y();
G4double Pz = aParticle->Get4Momentum().z();
G4double ek = aParticle->GetKineticEnergy();
G4ThreeVector theInitial = aParticle->Get4Momentum().vect();
if (verboseLevel > 1)
{
G4double E = aParticle->GetTotalEnergy();
G4double E0 = aParticle->GetDefinition()->GetPDGMass();
G4double Q = aParticle->GetDefinition()->GetPDGCharge();
G4int A = targetNucleus.GetA_asInt();
G4int Z = targetNucleus.GetZ_asInt();
G4cout << "G4LEHadronProtonElastic:ApplyYourself: incident particle: "
<< aParticle->GetDefinition()->GetParticleName() << G4endl;
G4cout << "P = " << P/GeV << " GeV/c"
<< ", Px = " << Px/GeV << " GeV/c"
<< ", Py = " << Py/GeV << " GeV/c"
<< ", Pz = " << Pz/GeV << " GeV/c" << G4endl;
G4cout << "E = " << E/GeV << " GeV"
<< ", kinetic energy = " << ek/GeV << " GeV"
<< ", mass = " << E0/GeV << " GeV"
<< ", charge = " << Q << G4endl;
G4cout << "G4LEHadronProtonElastic:ApplyYourself: material:" << G4endl;
G4cout << "A = " << A
<< ", Z = " << Z
<< ", atomic mass "
<< G4Proton::Proton()->GetPDGMass()/GeV << "GeV"
<< G4endl;
//
// GHEISHA ADD operation to get total energy, mass, charge
//
E += proton_mass_c2;
G4double E02 = E*E - P*P;
E0 = std::sqrt(std::abs(E02));
if (E02 < 0)E0 *= -1;
Q += Z;
G4cout << "G4LEHadronProtonElastic:ApplyYourself: total:" << G4endl;
G4cout << "E = " << E/GeV << " GeV"
<< ", mass = " << E0/GeV << " GeV"
<< ", charge = " << Q << G4endl;
}
G4double theta = (0.5)*pi/180.;
// Get the target particle
G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
G4double E1 = aParticle->GetTotalEnergy();
G4double M1 = aParticle->GetDefinition()->GetPDGMass();
G4double E2 = targetParticle->GetTotalEnergy();
G4double M2 = targetParticle->GetDefinition()->GetPDGMass();
G4double totalEnergy = E1 + E2;
G4double pseudoMass = std::sqrt(totalEnergy*totalEnergy - P*P);
// Transform into centre of mass system
G4double px = (M2/pseudoMass)*Px;
G4double py = (M2/pseudoMass)*Py;
G4double pz = (M2/pseudoMass)*Pz;
G4double p = std::sqrt(px*px + py*py + pz*pz);
if (verboseLevel > 1) {
G4cout << " E1, M1 (GeV) " << E1/GeV << " " << M1/GeV << G4endl;
G4cout << " E2, M2 (GeV) " << E2/GeV << " " << M2/GeV << G4endl;
G4cout << " particle 1 momentum in CM " << px/GeV << " " << py/GeV << " "
<< pz/GeV << " " << p/GeV << G4endl;
}
// First scatter w.r.t. Z axis
G4double phi = G4UniformRand()*twopi;
G4double pxnew = p*std::sin(theta)*std::cos(phi);
G4double pynew = p*std::sin(theta)*std::sin(phi);
G4double pznew = p*std::cos(theta);
// Rotate according to the direction of the incident particle
if (px*px + py*py > 0)
{
G4double cost, sint, ph, cosp, sinp;
cost = pz/p;
sint = (std::sqrt(std::fabs((1-cost)*(1+cost)))
+ std::sqrt(px*px+py*py)/p)/2;
py < 0 ? ph = 3*halfpi : ph = halfpi;
if (std::abs(px) > 0.000001*GeV) ph = std::atan2(py,px);
cosp = std::cos(ph);
sinp = std::sin(ph);
px = (cost*cosp*pxnew - sinp*pynew + sint*cosp*pznew);
py = (cost*sinp*pxnew + cosp*pynew + sint*sinp*pznew);
pz = (-sint*pxnew + cost*pznew);
}
else {
px = pxnew;
py = pynew;
pz = pznew;
}
if (verboseLevel > 1) {
G4cout << " AFTER SCATTER..." << G4endl;
G4cout << " particle 1 momentum in CM " << px/GeV
<< " " << py/GeV << " " << pz/GeV << " " << p/GeV
<< G4endl;
}
// Transform to lab system
G4double E1pM2 = E1 + M2;
G4double betaCM = P/E1pM2;
G4double betaCMx = Px/E1pM2;
G4double betaCMy = Py/E1pM2;
G4double betaCMz = Pz/E1pM2;
G4double gammaCM = E1pM2/std::sqrt(E1pM2*E1pM2 - P*P);
if (verboseLevel > 1) {
G4cout << " betaCM " << betaCMx << " " << betaCMy << " "
<< betaCMz << " " << betaCM << G4endl;
G4cout << " gammaCM " << gammaCM << G4endl;
}
// Now following GLOREN...
G4double BETA[5], PA[5], PB[5];
BETA[1] = -betaCMx;
BETA[2] = -betaCMy;
BETA[3] = -betaCMz;
BETA[4] = gammaCM;
//The incident particle...
PA[1] = px;
PA[2] = py;
PA[3] = pz;
PA[4] = std::sqrt(M1*M1 + p*p);
G4double BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
G4double BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
PB[1] = PA[1] + BPGAM * BETA[1];
PB[2] = PA[2] + BPGAM * BETA[2];
PB[3] = PA[3] + BPGAM * BETA[3];
PB[4] = (PA[4] - BETPA) * BETA[4];
G4DynamicParticle* newP = new G4DynamicParticle;
newP->SetDefinition(aParticle->GetDefinition());
newP->SetMomentum(G4ThreeVector(PB[1], PB[2], PB[3]));
//The target particle...
PA[1] = -px;
PA[2] = -py;
PA[3] = -pz;
PA[4] = std::sqrt(M2*M2 + p*p);
BETPA = BETA[1]*PA[1] + BETA[2]*PA[2] + BETA[3]*PA[3];
BPGAM = (BETPA * BETA[4]/(BETA[4] + 1.) - PA[4]) * BETA[4];
PB[1] = PA[1] + BPGAM * BETA[1];
PB[2] = PA[2] + BPGAM * BETA[2];
PB[3] = PA[3] + BPGAM * BETA[3];
PB[4] = (PA[4] - BETPA) * BETA[4];
targetParticle->SetMomentum(G4ThreeVector(PB[1], PB[2], PB[3]));
if (verboseLevel > 1) {
G4cout << " particle 1 momentum in LAB "
<< newP->GetMomentum()*(1./GeV)
<< " " << newP->GetTotalMomentum()/GeV << G4endl;
G4cout << " particle 2 momentum in LAB "
<< targetParticle->GetMomentum()*(1./GeV)
<< " " << targetParticle->GetTotalMomentum()/GeV << G4endl;
G4cout << " TOTAL momentum in LAB "
<< (newP->GetMomentum()+targetParticle->GetMomentum())*(1./GeV)
<< " "
<< (newP->GetMomentum()+targetParticle->GetMomentum()).mag()/GeV
<< G4endl;
}
theParticleChange.SetMomentumChange(newP->GetMomentumDirection());
theParticleChange.SetEnergyChange(newP->GetKineticEnergy());
delete newP;
theParticleChange.AddSecondary(targetParticle);
return &theParticleChange;
}
////////////////////////////////////////////////////////////////////
//
// sample momentum transfer using Lab. momentum
G4double
G4LEHadronProtonElastic::SampleInvariantT(const G4ParticleDefinition* p,
G4double plab, G4int , G4int )
{
G4double hMass = p->GetPDGMass();
G4double pCMS = 0.5*plab;
// pCMS *= 50;
G4double hEcms = std::sqrt(pCMS*pCMS+hMass*hMass);
// G4double gamma = hEcms/hMass;
// gamma *= 15;
G4double beta = pCMS/hEcms; // std::sqrt(1-1./gamma/gamma); //
// beta /= 0.8; // 0.95; // 1.0; // 1.1 // 0.5*pi; // pi; twopi;
G4double cosDipole = RandCosThetaDipPen();
G4double cosTheta = cosDipole + beta;
cosTheta /= 1. + cosDipole*beta;
G4double t = 2.*pCMS*pCMS*(1.-cosTheta);
return t;
}
///////////////////////////////////////////////////////////////
//
// 1 + cos^2(theta) random distribution in the projectile rest frame, Penelope algorithm
G4double G4LEHadronProtonElastic::RandCosThetaDipPen()
{
G4double x, cosTheta, signX, modX, power = 1./3.;
if( G4UniformRand() > 0.25)
{
cosTheta = 2.*G4UniformRand()-1.;
}
else
{
x = 2.*G4UniformRand()-1.;
if ( x < 0. )
{
modX = -x;
signX = -1.;
}
else
{
modX = x;
signX = 1.;
}
cosTheta = signX*std::pow(modX,power);
}
return cosTheta;
}
// end of file
@@ -42,7 +42,8 @@
#include "Randomize.hh"
G4LEnp::G4LEnp():G4HadronicInteraction("G4LEnp")
G4LEnp::G4LEnp():
G4HadronElastic("G4LEnp") // G4HadronicInteraction("G4LEnp")
{
// theParticleChange.SetNumberOfSecondaries(1);
@@ -262,7 +263,7 @@ G4LEnp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
PB[4] = (PA[4] - BETPA) * BETA[4];
G4DynamicParticle* newP = new G4DynamicParticle;
newP->SetDefinition(const_cast<G4ParticleDefinition *>(aParticle->GetDefinition()));
newP->SetDefinition(aParticle->GetDefinition());
newP->SetMomentum(G4ThreeVector(PB[1], PB[2], PB[3]));
//The target particle...
@@ -304,4 +305,73 @@ G4LEnp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
return &theParticleChange;
}
////////////////////////////////////////////////////////////////////
//
// sample momentum transfer using Lab. momentum
G4double G4LEnp::SampleInvariantT(const G4ParticleDefinition* p,
G4double plab, G4int , G4int )
{
G4double nMass = p->GetPDGMass(); // 939.565346*MeV;
G4double ek = std::sqrt(plab*plab+nMass*nMass) - nMass;
// Find energy bin
G4int je1 = 0;
G4int je2 = NENERGY - 1;
ek = ek/GeV;
do
{
G4int midBin = (je1 + je2)/2;
if (ek < elab[midBin])
je2 = midBin;
else
je1 = midBin;
} while (je2 - je1 > 1);
G4double delab = elab[je2] - elab[je1];
// Sample the angle
G4double sample = G4UniformRand();
G4int ke1 = 0;
G4int ke2 = NANGLE - 1;
G4double dsig = sig[je2][0] - sig[je1][0];
G4double rc = dsig/delab;
G4double b = sig[je1][0] - rc*elab[je1];
G4double sigint1 = rc*ek + b;
G4double sigint2 = 0.;
do
{
G4int midBin = (ke1 + ke2)/2;
dsig = sig[je2][midBin] - sig[je1][midBin];
rc = dsig/delab;
b = sig[je1][midBin] - rc*elab[je1];
G4double sigint = rc*ek + b;
if (sample < sigint)
{
ke2 = midBin;
sigint2 = sigint;
}
else
{
ke1 = midBin;
sigint1 = sigint;
}
} while (ke2 - ke1 > 1);
dsig = sigint2 - sigint1;
rc = 1./dsig;
b = ke1 - rc*sigint1;
G4double kint = rc*sample + b;
G4double theta = (0.5 + kint)*pi/180.;
G4double t = 0.5*plab*plab*(1-std::cos(theta));
return t;
}
// end of file
@@ -38,45 +38,14 @@
// Initialization of static data arrays:
#include "G4LEppData.hh"
G4LEpp::G4LEpp():G4HadronicInteraction("G4LEpp")
G4LEpp::G4LEpp():G4HadronElastic("G4LEpp")
{
// theParticleChange.SetNumberOfSecondaries(1);
// SetMinEnergy(10.*MeV);
// SetMaxEnergy(1200.*MeV);
SetCoulombEffects(0);
SetMinEnergy(0.);
SetMaxEnergy(5.*GeV);
}
G4LEpp::~G4LEpp()
{
// theParticleChange.Clear();
}
void
G4LEpp::SetCoulombEffects(G4int State)
{
if (State) {
for(G4int i=0; i<NANGLE; i++)
{
sig[i] = SigCoul[i];
}
elab = ElabCoul;
SetMaxEnergy(1.2*GeV);
}
else {
for(G4int i=0; i<NANGLE; i++)
{
sig[i] = Sig[i];
}
elab = Elab;
SetMaxEnergy(5.*GeV);
}
}
{}
G4HadFinalState*
G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
@@ -88,11 +57,11 @@ G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
G4double Px = aParticle->Get4Momentum().x();
G4double Py = aParticle->Get4Momentum().y();
G4double Pz = aParticle->Get4Momentum().z();
G4double ek = aParticle->GetKineticEnergy();
G4ThreeVector theInitial = aParticle->Get4Momentum().vect();
G4double E = aParticle->GetTotalEnergy();
G4ThreeVector theInitial = aParticle->Get4Momentum().vect().unit();
if (verboseLevel > 1) {
G4double E = aParticle->GetTotalEnergy();
G4double ek = aParticle->GetKineticEnergy();
G4double E0 = aParticle->GetDefinition()->GetPDGMass();
G4double Q = aParticle->GetDefinition()->GetPDGCharge();
G4int A = targetNucleus.GetA_asInt();
@@ -126,66 +95,12 @@ G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
<< ", mass = " << E0/GeV << " GeV"
<< ", charge = " << Q << G4endl;
}
// Find energy bin
G4int je1 = 0;
G4int je2 = NENERGY - 1;
ek = ek/GeV;
do {
G4int midBin = (je1 + je2)/2;
if (ek < elab[midBin])
je2 = midBin;
else
je1 = midBin;
} while (je2 - je1 > 1);
G4double delab = elab[je2] - elab[je1];
// Sample the angle
G4float sample = G4UniformRand();
G4int ke1 = 0;
G4int ke2 = NANGLE - 1;
G4double dsig = sig[je2][0] - sig[je1][0];
G4double rc = dsig/delab;
G4double b = sig[je1][0] - rc*elab[je1];
G4double sigint1 = rc*ek + b;
G4double sigint2 = 0.;
if (verboseLevel > 1) G4cout << "sample=" << sample << G4endl
<< ke1 << " " << ke2 << " "
<< sigint1 << " " << sigint2 << G4endl;
do {
G4int midBin = (ke1 + ke2)/2;
dsig = sig[je2][midBin] - sig[je1][midBin];
rc = dsig/delab;
b = sig[je1][midBin] - rc*elab[je1];
G4double sigint = rc*ek + b;
if (sample < sigint) {
ke2 = midBin;
sigint2 = sigint;
}
else {
ke1 = midBin;
sigint1 = sigint;
}
if (verboseLevel > 1)G4cout << ke1 << " " << ke2 << " "
<< sigint1 << " " << sigint2 << G4endl;
} while (ke2 - ke1 > 1);
dsig = sigint2 - sigint1;
rc = 1./dsig;
b = ke1 - rc*sigint1;
G4double kint = rc*sample + b;
G4double theta = (0.5 + kint)*pi/180.;
if (theta < 0.) { theta = 0.; }
if (verboseLevel > 1) {
G4cout << " energy bin " << je1 << " energy=" << elab[je1] << G4endl;
G4cout << " angle bin " << kint << " angle=" << theta/degree << G4endl;
}
G4double t = SampleInvariantT(aParticle->GetDefinition(), P, 0, 0);
G4double cost = 1.0 - 2*t/(P*P);
if(cost > 1.0) { cost = 1.0; }
if(cost <-1.0) { cost =-1.0; }
G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
G4double phi = twopi*G4UniformRand();
// Get the target particle
G4DynamicParticle* targetParticle = targetNucleus.ReturnTargetParticle();
@@ -206,21 +121,21 @@ G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
if (verboseLevel > 1) {
G4cout << " E1, M1 (GeV) " << E1/GeV << " " << M1/GeV << G4endl;
G4cout << " E2, M2 (GeV) " << E2/GeV << " " << M2/GeV << G4endl;
G4cout << " particle 1 momentum in CM " << px/GeV << " " << py/GeV << " "
G4cout << " particle 1 momentum in CM " << px/GeV
<< " " << py/GeV << " "
<< pz/GeV << " " << p/GeV << G4endl;
}
// First scatter w.r.t. Z axis
G4double phi = G4UniformRand()*twopi;
G4double pxnew = p*std::sin(theta)*std::cos(phi);
G4double pynew = p*std::sin(theta)*std::sin(phi);
G4double pznew = p*std::cos(theta);
G4double pxnew = p*sint*std::cos(phi);
G4double pynew = p*sint*std::sin(phi);
G4double pznew = p*cost;
// Rotate according to the direction of the incident particle
if (px*px + py*py > 0) {
G4double cost, sint, ph, cosp, sinp;
G4double ph, cosp, sinp;
cost = pz/p;
sint = (std::sqrt(std::fabs((1-cost)*(1+cost))) + std::sqrt(px*px+py*py)/p)/2;
sint = (std::sqrt((1-cost)*(1+cost)) + std::sqrt(px*px+py*py)/p)/2;
py < 0 ? ph = 3*halfpi : ph = halfpi;
if (std::fabs(px) > 0.000001*GeV) ph = std::atan2(py,px);
cosp = std::cos(ph);
@@ -280,7 +195,7 @@ G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
PB[4] = (PA[4] - BETPA) * BETA[4];
G4DynamicParticle* newP = new G4DynamicParticle;
newP->SetDefinition(const_cast<G4ParticleDefinition *>(aParticle->GetDefinition()) );
newP->SetDefinition(aParticle->GetDefinition());
newP->SetMomentum(G4ThreeVector(PB[1], PB[2], PB[3]));
//The target particle...
@@ -323,4 +238,76 @@ G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
return &theParticleChange;
}
// end of file
////////////////////////////////////////////////////////////////////
//
// sample momentum transfer using Lab. momentum
G4double G4LEpp::SampleInvariantT(const G4ParticleDefinition* p,
G4double plab, G4int , G4int )
{
G4double nMass = p->GetPDGMass(); // 939.565346*MeV;
G4double ek = std::sqrt(plab*plab+nMass*nMass) - nMass;
// Find energy bin
G4int je1 = 0;
G4int je2 = NENERGY - 1;
ek /= GeV;
do
{
G4int midBin = (je1 + je2)/2;
if (ek < elab[midBin]) je2 = midBin;
else je1 = midBin;
}
while (je2 - je1 > 1);
G4double delab = elab[je2] - elab[je1];
// Sample the angle
G4double sample = G4UniformRand();
G4int ke1 = 0;
G4int ke2 = NANGLE - 1;
G4double dsig, b, rc;
dsig = Sig[je2][0] - Sig[je1][0];
rc = dsig/delab;
b = Sig[je1][0] - rc*elab[je1];
G4double sigint1 = rc*ek + b;
G4double sigint2 = 0.;
do
{
G4int midBin = (ke1 + ke2)/2;
dsig = Sig[je2][midBin] - Sig[je1][midBin];
rc = dsig/delab;
b = Sig[je1][midBin] - rc*elab[je1];
G4double sigint = rc*ek + b;
if (sample < sigint)
{
ke2 = midBin;
sigint2 = sigint;
}
else
{
ke1 = midBin;
sigint1 = sigint;
}
}
while (ke2 - ke1 > 1);
dsig = sigint2 - sigint1;
rc = 1./dsig;
b = ke1 - rc*sigint1;
G4double kint = rc*sample + b;
G4double theta = (0.5 + kint)*pi/180.;
G4double t = 0.5*plab*plab*(1 - std::cos(theta));
return t;
}
// end of file
@@ -0,0 +1,536 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
// G4LMsdGenerator
//
//
#include "G4DynamicParticle.hh"
#include "G4LMsdGenerator.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
#include "G4IonTable.hh"
#include "G4NucleiProperties.hh"
#include "G4ParticleDefinition.hh"
#include "G4HadFinalState.hh"
#include "G4KineticTrack.hh"
#include "G4DecayKineticTracks.hh"
#include "G4KineticTrackVector.hh"
#include "G4Log.hh"
G4LMsdGenerator::G4LMsdGenerator(const G4String& name)
: G4HadronicInteraction(name)
{
fPDGencoding = 0;
// theParticleChange = new G4HadFinalState;
}
G4LMsdGenerator::~G4LMsdGenerator()
{
// delete theParticleChange;
}
void G4LMsdGenerator::ModelDescription(std::ostream& outFile) const
{
outFile << GetModelName() <<" consists of a "
<< " string model and a stage to de-excite the excited nuclear fragment."
<< "\n<p>"
<< "The string model simulates the interaction of\n"
<< "an incident hadron with a nucleus, forming \n"
<< "excited strings, decays these strings into hadrons,\n"
<< "and leaves an excited nucleus. \n"
<< "<p>The string model:\n";
}
/////////////////////////////////////////////////////////////////
//
// Particle and kinematical limitation od diffraction dissociation
G4bool
G4LMsdGenerator::IsApplicable( const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus )
{
G4bool applied = false;
if( ( aTrack.GetDefinition() == G4Proton::Proton() ||
aTrack.GetDefinition() == G4Neutron::Neutron() ) &&
targetNucleus.GetA_asInt() >= 1 &&
aTrack.GetKineticEnergy() > 1800*CLHEP::MeV ) // 750*CLHEP::MeV )
{
applied = true;
}
else if( ( aTrack.GetDefinition() == G4PionPlus::PionPlus() ||
aTrack.GetDefinition() == G4PionMinus::PionMinus() ) &&
targetNucleus.GetA_asInt() >= 1 &&
aTrack.GetKineticEnergy() > 2340*CLHEP::MeV )
{
applied = true;
}
else if( ( aTrack.GetDefinition() == G4KaonPlus::KaonPlus() ||
aTrack.GetDefinition() == G4KaonMinus::KaonMinus() ) &&
targetNucleus.GetA_asInt() >= 1 &&
aTrack.GetKineticEnergy() > 1980*CLHEP::MeV )
{
applied = true;
}
return applied;
}
/////////////////////////////////////////////////////////////////
//
// Return dissociated particle products and recoil nucleus
G4HadFinalState*
G4LMsdGenerator::ApplyYourself( const G4HadProjectile& aTrack,
G4Nucleus& targetNucleus )
{
theParticleChange.Clear();
const G4HadProjectile* aParticle = &aTrack;
G4double eTkin = aParticle->GetKineticEnergy();
if( eTkin <= 1.*CLHEP::GeV )
{
theParticleChange.SetEnergyChange(eTkin);
theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
return &theParticleChange;
}
G4int A = targetNucleus.GetA_asInt();
G4int Z = targetNucleus.GetZ_asInt();
G4double plab = aParticle->GetTotalMomentum();
G4double plab2 = plab*plab;
const G4ParticleDefinition* theParticle = aParticle->GetDefinition();
G4double partMass = theParticle->GetPDGMass();
G4double oldE = partMass + eTkin;
G4double targMass = G4NucleiProperties::GetNuclearMass(A, Z);
G4double targMass2 = targMass*targMass;
G4LorentzVector partLV = aParticle->Get4Momentum();
G4double sumE = oldE + targMass;
G4double sumE2 = sumE*sumE;
G4ThreeVector p1 = partLV.vect();
// G4cout<<"p1 = "<<p1<<G4endl;
G4ParticleMomentum p1unit = p1.unit();
G4double Mx = SampleMx(aParticle); // in GeV
G4double t = SampleT( Mx);
Mx *= CLHEP::GeV;
G4double Mx2 = Mx*Mx;
// equation for q|| based on sum-E-P and new invariant mass
G4double B = sumE2 + targMass2 - Mx2 - plab2;
G4double a = 4*(plab2 - sumE2);
G4double b = 4*plab*B;
G4double c = B*B - 4*sumE2*targMass2;
G4double det2 = b*b - 4*a*c;
G4double qLong, det, eRetard; // , x2, x3, e2;
if( det2 >= 0.)
{
det = std::sqrt(det2);
qLong = (-b - det)/2./a;
eRetard = std::sqrt((plab-qLong)*(plab-qLong)+Mx2);
}
else
{
theParticleChange.SetEnergyChange(eTkin);
theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
return &theParticleChange;
}
theParticleChange.SetStatusChange(stopAndKill);
plab -= qLong;
G4ThreeVector pRetard = plab*p1unit;
G4ThreeVector pTarg = p1 - pRetard;
G4double eTarg = std::sqrt( targMass2 + pTarg.mag2()); // std::sqrt( targMass*targMass + pTarg.mag2() );
G4LorentzVector lvRetard(pRetard, eRetard);
G4LorentzVector lvTarg(pTarg, eTarg);
lvTarg += lvRetard; // sum LV
G4ThreeVector bst = lvTarg.boostVector();
lvRetard.boost(-bst); // to CNS
G4ThreeVector pCMS = lvRetard.vect();
G4double momentumCMS = pCMS.mag();
G4double tMax = 4.0*momentumCMS*momentumCMS;
if( t > tMax ) t = tMax*G4UniformRand();
G4double cost = 1. - 2.0*t/tMax;
G4double phi = G4UniformRand()*CLHEP::twopi;
G4double sint;
if( cost > 1.0 || cost < -1.0 ) //
{
cost = 1.0;
sint = 0.0;
}
else // normal situation
{
sint = std::sqrt( (1.0-cost)*(1.0+cost) );
}
G4ThreeVector v1( sint*std::cos(phi), sint*std::sin(phi), cost);
v1 *= momentumCMS;
G4LorentzVector lvRes( v1.x(),v1.y(),v1.z(), std::sqrt( momentumCMS*momentumCMS + Mx2));
lvRes.boost(bst); // to LS
lvTarg -= lvRes;
G4double eRecoil = lvTarg.e() - targMass;
if( eRecoil > 100.*CLHEP::MeV ) // add recoil nucleus
{
G4ParticleDefinition * recoilDef = 0;
if ( Z == 1 && A == 1 ) { recoilDef = G4Proton::Proton(); }
else if ( Z == 1 && A == 2 ) { recoilDef = G4Deuteron::Deuteron(); }
else if ( Z == 1 && A == 3 ) { recoilDef = G4Triton::Triton(); }
else if ( Z == 2 && A == 3 ) { recoilDef = G4He3::He3(); }
else if ( Z == 2 && A == 4 ) { recoilDef = G4Alpha::Alpha(); }
else
{
recoilDef =
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon( Z, A, 0.0 );
}
G4DynamicParticle * aSec = new G4DynamicParticle( recoilDef, lvTarg);
theParticleChange.AddSecondary(aSec);
}
else if( eRecoil > 0.0 )
{
theParticleChange.SetLocalEnergyDeposit( eRecoil );
}
G4ParticleDefinition* ddPart = G4ParticleTable::GetParticleTable()->
FindParticle(fPDGencoding);
// G4cout<<fPDGencoding<<", "<<ddPart->GetParticleName()<<", "<<ddPart->GetPDGMass()<<" MeV; lvRes = "<<lvRes<<G4endl;
G4KineticTrack ddkt( ddPart, 0., G4ThreeVector(0.,0.,0.), lvRes);
G4KineticTrackVector* ddktv = ddkt.Decay();
for( unsigned int i = 0; i < ddktv->size(); i++ ) // add products to partchange
{
G4DynamicParticle * aNew =
new G4DynamicParticle( ddktv->operator[](i)->GetDefinition(),
ddktv->operator[](i)->Get4Momentum());
// G4cout<<" "<<i<<", "<<aNew->GetDefinition()->GetParticleName()<<", "<<aNew->Get4Momentum()<<G4endl;
theParticleChange.AddSecondary(aNew);
delete ddktv->operator[](i);
}
delete ddktv;
return &theParticleChange;
}
//////////////////////////////////////
//
// Sample Mx as Roper resonances, set PDG encoding
G4double G4LMsdGenerator::SampleMx(const G4HadProjectile* aParticle)
{
G4double Mx=0.;
G4int i;
G4double rand = G4UniformRand();
for( i = 0; i < 60; i++)
{
if( rand >= fProbMx[i][1] ) break;
}
if(i <= 0) Mx = fProbMx[0][0];
else if(i >= 59) Mx = fProbMx[59][0];
else Mx = fProbMx[i][0];
if ( Mx <= 1.45 )
{
if( aParticle->GetDefinition() == G4Proton::Proton() )
{
Mx = 1.44;
fPDGencoding = 12212;
}
else if( aParticle->GetDefinition() == G4Neutron::Neutron() )
{
Mx = 1.44;
fPDGencoding = 12112;
}
else if( aParticle->GetDefinition() == G4PionPlus::PionPlus() )
{
Mx = 1.3;
fPDGencoding = 100211;
}
else if( aParticle->GetDefinition() == G4PionMinus::PionMinus() )
{
Mx = 1.3;
fPDGencoding = -100211;
}
else if( aParticle->GetDefinition() == G4KaonPlus::KaonPlus() )
{
Mx = 1.27;
fPDGencoding = 10323;
}
else if( aParticle->GetDefinition() == G4KaonMinus::KaonMinus() )
{
Mx = 1.27;
fPDGencoding = -10323;
}
}
else if ( Mx <= 1.55 )
{
if( aParticle->GetDefinition() == G4Proton::Proton() )
{
Mx = 1.52;
fPDGencoding = 2124;
}
else if( aParticle->GetDefinition() == G4Neutron::Neutron() )
{
Mx = 1.52;
fPDGencoding = 1214;
}
else if( aParticle->GetDefinition() == G4PionPlus::PionPlus() )
{
Mx = 1.45;
fPDGencoding = 10211;
}
else if( aParticle->GetDefinition() == G4PionMinus::PionMinus() )
{
Mx = 1.45;
fPDGencoding = -10211;
}
else if( aParticle->GetDefinition() == G4KaonPlus::KaonPlus() )
{
Mx = 1.46;
fPDGencoding = 100321;
}
else if( aParticle->GetDefinition() == G4KaonMinus::KaonMinus() )
{
Mx = 1.46;
fPDGencoding = -100321;
}
}
else
{
if( aParticle->GetDefinition() == G4Proton::Proton() )
{
Mx = 1.68;
fPDGencoding = 12216;
}
else if( aParticle->GetDefinition() == G4Neutron::Neutron() )
{
Mx = 1.68;
fPDGencoding = 12116;
}
else if( aParticle->GetDefinition() == G4PionPlus::PionPlus() )
{
// Mx = 1.67;
// fPDGencoding = 10215;
Mx = 1.45;
fPDGencoding = 10211;
}
else if( aParticle->GetDefinition() == G4PionMinus::PionMinus() )
{
// Mx = 1.67; // f0 problems->4pi vmg 20.11.14
// fPDGencoding = -10215;
Mx = 1.45;
fPDGencoding = -10211;
}
else if( aParticle->GetDefinition() == G4KaonPlus::KaonPlus() )
{
Mx = 1.68;
fPDGencoding = 30323;
}
else if( aParticle->GetDefinition() == G4KaonMinus::KaonMinus() )
{
Mx = 1.68;
fPDGencoding = -30323;
}
}
if(fPDGencoding == 0)
{
Mx = 1.44;
fPDGencoding = 12212;
}
return Mx;
}
//////////////////////////////////////
//
// Sample t with kinematic limitations of Mx and Tkin
G4double G4LMsdGenerator::SampleT( // const G4HadProjectile* aParticle,
G4double Mx)
{
G4double t=0., b=0.;
G4int i;
for( i = 0; i < 23; ++i)
{
if( Mx <= fMxBdata[i][0] ) break;
}
if( i <= 0 ) b = fMxBdata[0][1];
else if( i >= 22 ) b = fMxBdata[22][1];
else b = fMxBdata[i][1];
G4double rand = G4UniformRand();
t = -G4Log(rand)/b;
t *= (CLHEP::GeV*CLHEP::GeV); // in G4 internal units
return t;
}
////////////////////////////////////////////////
//
// Integral spectrum of Mx (GeV)
const G4double G4LMsdGenerator::fProbMx[60][2] =
{
{1.000000e+00, 1.000000e+00},
{1.025000e+00, 1.000000e+00},
{1.050000e+00, 1.000000e+00},
{1.075000e+00, 1.000000e+00},
{1.100000e+00, 9.975067e-01},
{1.125000e+00, 9.934020e-01},
{1.150000e+00, 9.878333e-01},
{1.175000e+00, 9.805002e-01},
{1.200000e+00, 9.716846e-01},
{1.225000e+00, 9.604761e-01},
{1.250000e+00, 9.452960e-01},
{1.275000e+00, 9.265278e-01},
{1.300000e+00, 9.053632e-01},
{1.325000e+00, 8.775566e-01},
{1.350000e+00, 8.441969e-01},
{1.375000e+00, 8.076336e-01},
{1.400000e+00, 7.682520e-01},
{1.425000e+00, 7.238306e-01},
{1.450000e+00, 6.769306e-01},
{1.475000e+00, 6.303898e-01},
{1.500000e+00, 5.824632e-01},
{1.525000e+00, 5.340696e-01},
{1.550000e+00, 4.873736e-01},
{1.575000e+00, 4.422901e-01},
{1.600000e+00, 3.988443e-01},
{1.625000e+00, 3.583727e-01},
{1.650000e+00, 3.205405e-01},
{1.675000e+00, 2.856655e-01},
{1.700000e+00, 2.537508e-01},
{1.725000e+00, 2.247863e-01},
{1.750000e+00, 1.985798e-01},
{1.775000e+00, 1.750252e-01},
{1.800000e+00, 1.539777e-01},
{1.825000e+00, 1.352741e-01},
{1.850000e+00, 1.187157e-01},
{1.875000e+00, 1.040918e-01},
{1.900000e+00, 9.118422e-02},
{1.925000e+00, 7.980909e-02},
{1.950000e+00, 6.979378e-02},
{1.975000e+00, 6.097771e-02},
{2.000000e+00, 5.322122e-02},
{2.025000e+00, 4.639628e-02},
{2.050000e+00, 4.039012e-02},
{2.075000e+00, 3.510275e-02},
{2.100000e+00, 3.044533e-02},
{2.125000e+00, 2.633929e-02},
{2.150000e+00, 2.271542e-02},
{2.175000e+00, 1.951295e-02},
{2.200000e+00, 1.667873e-02},
{2.225000e+00, 1.416633e-02},
{2.250000e+00, 1.193533e-02},
{2.275000e+00, 9.950570e-03},
{2.300000e+00, 8.181515e-03},
{2.325000e+00, 6.601664e-03},
{2.350000e+00, 5.188025e-03},
{2.375000e+00, 3.920655e-03},
{2.400000e+00, 2.782246e-03},
{2.425000e+00, 1.757765e-03},
{2.450000e+00, 8.341435e-04},
{2.475000e+00, 0.000000e+00}
};
//////////////////////////////////////////////
//
// Slope b (1/GeV/GeV) vs Mx (GeV) for t-sampling over exp(-b*t)
const G4double G4LMsdGenerator::fMxBdata[23][2] =
{
{1.09014, 17.8620},
{1.12590, 19.2831},
{1.18549, 17.6907},
{1.21693, 16.4760},
{1.25194, 15.3867},
{1.26932, 14.4236},
{1.29019, 13.2931},
{1.30755, 12.2882},
{1.31790, 11.4509},
{1.33888, 10.6969},
{1.34911, 9.44130},
{1.37711, 8.56148},
{1.39101, 7.76593},
{1.42608, 6.88582},
{1.48593, 6.13019},
{1.53179, 5.87723},
{1.58111, 5.37308},
{1.64105, 4.95217},
{1.69037, 4.44803},
{1.81742, 3.89879},
{1.88096, 3.68693},
{1.95509, 3.43278},
{2.02219, 3.30445}
};
//
//
/////////////////////////////////////////////
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NuclNuclDiffuseElastic.cc 71874 2013-06-27 13:39:59Z gunter $
// $Id: G4NuclNuclDiffuseElastic.cc 83427 2014-08-21 15:44:43Z gcosmo $
//
//
// Physics model class G4NuclNuclDiffuseElastic
@@ -55,6 +55,7 @@
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4NistManager.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsFreeVector.hh"
@@ -112,12 +113,13 @@ G4NuclNuclDiffuseElastic::G4NuclNuclDiffuseElastic()
fCofDelta = 0.04;
fCofAlpha = 0.095;
fNuclearRadius1 = fNuclearRadius2 = fNuclearRadiusSquare = fNuclearRadiusCof
fNuclearRadius1 = fNuclearRadius2 = fNuclearRadiusSquare
= fRutherfordRatio = fCoulombPhase0 = fHalfRutThetaTg = fHalfRutThetaTg2
= fRutherfordTheta = fProfileLambda = fCofPhase = fCofFar = fCofAlphaMax
= fCofAlphaCoulomb = fSumSigma = fEtaRatio = fReZ = 0.0;
fMaxL = 0;
fNuclearRadiusCof = 1.0;
}
//////////////////////////////////////////////////////////////////////////////
@@ -126,13 +128,18 @@ G4NuclNuclDiffuseElastic::G4NuclNuclDiffuseElastic()
G4NuclNuclDiffuseElastic::~G4NuclNuclDiffuseElastic()
{
if(fEnergyVector) delete fEnergyVector;
if( fAngleTable )
{
fAngleTable->clearAndDestroy();
delete fAngleTable ;
if ( fEnergyVector ) {
delete fEnergyVector;
fEnergyVector = 0;
}
for ( std::vector<G4PhysicsTable*>::iterator it = fAngleBank.begin();
it != fAngleBank.end(); ++it ) {
if ( (*it) ) (*it)->clearAndDestroy();
delete *it;
*it = 0;
}
fAngleTable = 0;
}
//////////////////////////////////////////////////////////////////////////////
@@ -155,7 +162,7 @@ void G4NuclNuclDiffuseElastic::Initialise()
for(jEl = 0 ; jEl < numOfEl; ++jEl) // application element loop
{
fAtomicNumber = (*theElementTable)[jEl]->GetZ(); // atomic number
fAtomicWeight = (*theElementTable)[jEl]->GetN(); // number of nucleons
fAtomicWeight = G4NistManager::Instance()->GetAtomicMassAmu( static_cast< G4int >( fAtomicNumber ) );
fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
fNuclearRadius += R1;
@@ -929,7 +936,7 @@ G4NuclNuclDiffuseElastic::SampleTableThetaCMS(const G4ParticleDefinition* partic
void G4NuclNuclDiffuseElastic::InitialiseOnFly(G4double Z, G4double A)
{
fAtomicNumber = Z; // atomic number
fAtomicWeight = A; // number of nucleons
fAtomicWeight = G4NistManager::Instance()->GetAtomicMassAmu( static_cast< G4int >( Z ) );
G4double A1 = G4double( fParticle->GetBaryonNumber() );
G4double R1 = CalculateNuclearRad(A1);
@@ -1960,7 +1967,7 @@ G4complex G4NuclNuclDiffuseElastic::GammaLogarithm(G4complex zz)
const G4double cof[6] = { 76.18009172947146, -86.50532032941677,
24.01409824083091, -1.231739572450155,
0.1208650973866179e-2, -0.5395239384953e-5 } ;
register G4int j;
G4int j;
G4complex z = zz - 1.0;
G4complex tmp = z + 5.5;
tmp -= (z + 0.5) * std::log(tmp);
@@ -0,0 +1,715 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hhElastic.cc,v 1.5 2010-11-09 09:04:29 grichine Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// Physics model class G4hhElastic
//
//
// G4 Model: qQ hadron hadron elastic scattering with 4-momentum balance
//
// 02.05.2014 V. Grichine 1-st version
//
#include "G4hhElastic.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4IonTable.hh"
#include "G4NucleiProperties.hh"
#include "Randomize.hh"
#include "G4Integrator.hh"
#include "globals.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsFreeVector.hh"
#include "G4HadronNucleonXsc.hh"
using namespace std;
/////////////////////////////////////////////////////////////////////////
//
// Tracking constructor. Target is proton
G4hhElastic::G4hhElastic()
: G4HadronElastic("HadrHadrElastic")
{
SetMinEnergy( 1.*GeV );
SetMaxEnergy( 10000.*TeV );
verboseLevel = 0;
lowEnergyRecoilLimit = 100.*keV;
lowEnergyLimitQ = 0.0*GeV;
lowEnergyLimitHE = 0.0*GeV;
lowestEnergyLimit= 0.0*keV;
plabLowLimit = 20.0*MeV;
fRhoReIm=fSigmaTot=fOptRatio=fSpp=fPcms=0.0;
fInTkin=0;
theProton = G4Proton::Proton();
theNeutron = G4Neutron::Neutron();
thePionPlus = G4PionPlus::PionPlus();
thePionMinus= G4PionMinus::PionMinus();
fTarget = G4Proton::Proton();
fProjectile = 0;
fHadrNuclXsc = new G4HadronNucleonXsc();
fEnergyBin = 200;
fBinT = 514; // 514; // 500; // 200;
fEnergyVector = new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin );
fTableT = 0;
fOldTkin = 0.;
SetParameters();
Initialise();
}
/////////////////////////////////////////////////////////////////////////
//
// test constructor
G4hhElastic::G4hhElastic( G4ParticleDefinition* target, G4ParticleDefinition* projectile, G4double plab)
: G4HadronElastic("HadrHadrElastic")
{
SetMinEnergy( 1.*GeV );
SetMaxEnergy( 10000.*TeV );
verboseLevel = 0;
lowEnergyRecoilLimit = 100.*keV;
lowEnergyLimitQ = 0.0*GeV;
lowEnergyLimitHE = 0.0*GeV;
lowestEnergyLimit = 0.0*keV;
plabLowLimit = 20.0*MeV;
fRhoReIm=fSigmaTot=fOptRatio=fSpp=fPcms=0.0;
fInTkin=0;
theProton = G4Proton::Proton();
theNeutron = G4Neutron::Neutron();
thePionPlus = G4PionPlus::PionPlus();
thePionMinus= G4PionMinus::PionMinus();
fTarget = target;
fProjectile = projectile;
fMassTarg = fTarget->GetPDGMass();
fMassProj = fProjectile->GetPDGMass();
fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
fHadrNuclXsc = new G4HadronNucleonXsc();
fEnergyBin = 200;
fBinT = 514; // 200;
fEnergyVector = new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin );
fTableT = 0;
fOldTkin = 0.;
SetParameters();
SetParametersCMS( plab);
}
/////////////////////////////////////////////////////////////////////////
//
// constructor used for low mass diffraction
G4hhElastic::G4hhElastic( G4ParticleDefinition* target, G4ParticleDefinition* projectile)
: G4HadronElastic("HadrHadrElastic")
{
SetMinEnergy( 1.*GeV );
SetMaxEnergy( 10000.*TeV );
verboseLevel = 0;
lowEnergyRecoilLimit = 100.*keV;
lowEnergyLimitQ = 0.0*GeV;
lowEnergyLimitHE = 0.0*GeV;
lowestEnergyLimit= 0.0*keV;
plabLowLimit = 20.0*MeV;
fRhoReIm=fSigmaTot=fOptRatio=fSpp=fPcms=0.0;
fInTkin=0;
fTarget = target; // later vmg
fProjectile = projectile;
theProton = G4Proton::Proton();
theNeutron = G4Neutron::Neutron();
thePionPlus = G4PionPlus::PionPlus();
thePionMinus= G4PionMinus::PionMinus();
fTarget = G4Proton::Proton(); // later vmg
fProjectile = 0;
fMassTarg = fTarget->GetPDGMass();
fMassProj = fProjectile->GetPDGMass();
fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
fHadrNuclXsc = new G4HadronNucleonXsc();
fEnergyBin = 200;
fBinT = 514; // 514; // 500; // 200;
fEnergyVector = new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin );
fTableT = 0;
fOldTkin = 0.;
SetParameters();
}
//////////////////////////////////////////////////////////////////////////////
//
// Destructor
G4hhElastic::~G4hhElastic()
{
if ( fEnergyVector ) {
delete fEnergyVector;
fEnergyVector = 0;
}
for ( std::vector<G4PhysicsTable*>::iterator it = fBankT.begin();
it != fBankT.end(); ++it ) {
if ( (*it) ) (*it)->clearAndDestroy();
delete *it;
*it = 0;
}
fTableT = 0;
if(fHadrNuclXsc) delete fHadrNuclXsc;
}
/////////////////////////////////////////////////////////////////////////////
///////////////////// Table preparation and reading ////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// Initialisation for given particle on the proton target
void G4hhElastic::Initialise()
{
// pp,pn
fProjectile = G4Proton::Proton();
BuildTableT(fTarget, fProjectile);
fBankT.push_back(fTableT); // 0
// pi+-p
fProjectile = G4PionPlus::PionPlus();
BuildTableT(fTarget, fProjectile);
fBankT.push_back(fTableT); // 1
//K+-p
fProjectile = G4KaonPlus::KaonPlus();
BuildTableT(fTarget, fProjectile);
fBankT.push_back(fTableT); // 2
}
///////////////////////////////////////////////////////////////////////////////
//
// Build for given particle and proton table of momentum transfers.
void G4hhElastic::BuildTableT( G4ParticleDefinition* target, G4ParticleDefinition* projectile) // , G4double plab)
{
G4int iTkin, jTransfer;
G4double plab, Tkin, tMax;
G4double t1, t2, dt, delta = 0., sum = 0.;
fTarget = target;
fProjectile = projectile;
fMassTarg = fTarget->GetPDGMass();
fMassProj = fProjectile->GetPDGMass();
fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
G4Integrator<G4hhElastic,G4double(G4hhElastic::*)(G4double)> integral;
// G4HadronNucleonXsc* hnXsc = new G4HadronNucleonXsc();
fTableT = new G4PhysicsTable(fEnergyBin);
for( iTkin = 0; iTkin < fEnergyBin; iTkin++)
{
Tkin = fEnergyVector->GetLowEdgeEnergy(iTkin);
plab = std::sqrt( Tkin*( Tkin + 2*fMassProj ) );
// G4DynamicParticle* theDynamicParticle = new G4DynamicParticle(projectile,
// G4ParticleMomentum(0.,0.,1.),
// Tkin);
// fSigmaTot = fHadrNuclXsc->GetHadronNucleonXscNS( theDynamicParticle, target );
SetParametersCMS( plab );
tMax = 4.*fPcms*fPcms;
if( tMax > 15.*GeV*GeV ) tMax = 15.*GeV*GeV; // Check vs. energy ???
G4PhysicsFreeVector* vectorT = new G4PhysicsFreeVector(fBinT-1);
sum = 0.;
dt = tMax/fBinT;
// for(j = 1; j < fBinT; j++)
for( jTransfer = fBinT-1; jTransfer >= 1; jTransfer--)
{
t1 = dt*(jTransfer-1);
t2 = t1 + dt;
if( fMassProj > 900.*MeV ) // pp, pn
{
delta = integral.Legendre10(this, &G4hhElastic::GetdsdtF123, t1, t2);
// delta = integral.Legendre96(this, &G4hhElastic::GetdsdtF123, t1, t2);
}
else // pi+-p, K+-p
{
delta = integral.Legendre10(this, &G4hhElastic::GetdsdtF123qQgG, t1, t2);
// delta = integral.Legendre96(this, &G4hhElastic::GetdsdtF123qQgG, t1, t2);
}
sum += delta;
vectorT->PutValue( jTransfer-1, t1, sum ); // t2
}
// vectorT->PutValue( fBinT-1, dt*(fBinT-1), 0. ); // t2
fTableT->insertAt( iTkin, vectorT );
// delete theDynamicParticle;
}
// delete hnXsc;
return;
}
////////////////////////////////////////////////////////////////////////////
//
// Return inv momentum transfer -t > 0 from initialisation table
G4double G4hhElastic::SampleInvariantT( const G4ParticleDefinition* aParticle, G4double p,
G4int, G4int )
{
G4int iTkin, iTransfer;
G4double t, t2, position, m1 = aParticle->GetPDGMass();
G4double Tkin = std::sqrt(m1*m1+p*p) - m1;
if( aParticle == G4Proton::Proton() || aParticle == G4Neutron::Neutron() )
{
fTableT = fBankT[0];
}
if( aParticle == G4PionPlus::PionPlus() || aParticle == G4PionMinus::PionMinus() )
{
fTableT = fBankT[1];
}
if( aParticle == G4KaonPlus::KaonPlus() || aParticle == G4KaonMinus::KaonMinus() )
{
fTableT = fBankT[2];
}
G4double delta = std::abs(Tkin - fOldTkin)/(Tkin + fOldTkin);
G4double deltaMax = 1.e-2;
if ( delta < deltaMax ) iTkin = fInTkin;
else
{
for( iTkin = 0; iTkin < fEnergyBin; iTkin++)
{
if( Tkin < fEnergyVector->GetLowEdgeEnergy(iTkin) ) break;
}
}
if ( iTkin >= fEnergyBin ) iTkin = fEnergyBin-1; // Tkin is more then theMaxEnergy
if ( iTkin < 0 ) iTkin = 0; // against negative index, Tkin < theMinEnergy
fOldTkin = Tkin;
fInTkin = iTkin;
if (iTkin == fEnergyBin -1 || iTkin == 0 ) // the table edges
{
position = (*(*fTableT)(iTkin))(0)*G4UniformRand();
// G4cout<<"position = "<<position<<G4endl;
for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
{
if( position >= (*(*fTableT)(iTkin))(iTransfer) ) break;
}
if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
// G4cout<<"iTransfer = "<<iTransfer<<G4endl;
t = GetTransfer(iTkin, iTransfer, position);
// G4cout<<"t = "<<t<<G4endl;
}
else // Tkin inside between energy table edges
{
// position = (*(*fTableT)(iTkin))(fBinT-2)*G4UniformRand();
position = (*(*fTableT)(iTkin))(0)*G4UniformRand();
// G4cout<<"position = "<<position<<G4endl;
for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
{
// if( position < (*(*fTableT)(iTkin))(iTransfer) ) break;
if( position >= (*(*fTableT)(iTkin))(iTransfer) ) break;
}
if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
// G4cout<<"iTransfer = "<<iTransfer<<G4endl;
t2 = GetTransfer(iTkin, iTransfer, position);
return t2;
/*
G4double t1, E1, E2, W, W1, W2;
// G4cout<<"t2 = "<<t2<<G4endl;
E2 = fEnergyVector->GetLowEdgeEnergy(iTkin);
// G4cout<<"E2 = "<<E2<<G4endl;
iTkin--;
// position = (*(*fTableT)(iTkin))(fBinT-2)*G4UniformRand();
// G4cout<<"position = "<<position<<G4endl;
for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
{
// if( position < (*(*fTableT)(iTkin))(iTransfer) ) break;
if( position >= (*(*fTableT)(iTkin))(iTransfer) ) break;
}
if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
t1 = GetTransfer(iTkin, iTransfer, position);
// G4cout<<"t1 = "<<t1<<G4endl;
E1 = fEnergyVector->GetLowEdgeEnergy(iTkin);
// G4cout<<"E1 = "<<E1<<G4endl;
W = 1.0/(E2 - E1);
W1 = (E2 - Tkin)*W;
W2 = (Tkin - E1)*W;
t = W1*t1 + W2*t2;
*/
}
return t;
}
////////////////////////////////////////////////////////////////////////////
//
// Return inv momentum transfer -t > 0 from initialisation table
G4double G4hhElastic::SampleBisectionalT( const G4ParticleDefinition* aParticle, G4double p)
{
G4int iTkin, iTransfer;
G4double t, position, m1 = aParticle->GetPDGMass();
G4double Tkin = std::sqrt(m1*m1+p*p) - m1;
if( aParticle == G4Proton::Proton() || aParticle == G4Neutron::Neutron() )
{
fTableT = fBankT[0];
}
if( aParticle == G4PionPlus::PionPlus() || aParticle == G4PionMinus::PionMinus() )
{
fTableT = fBankT[1];
}
if( aParticle == G4KaonPlus::KaonPlus() || aParticle == G4KaonMinus::KaonMinus() )
{
fTableT = fBankT[2];
}
G4double delta = std::abs(Tkin - fOldTkin)/(Tkin + fOldTkin);
G4double deltaMax = 1.e-2;
if ( delta < deltaMax ) iTkin = fInTkin;
else
{
for( iTkin = 0; iTkin < fEnergyBin; iTkin++ )
{
if( Tkin < fEnergyVector->GetLowEdgeEnergy(iTkin) ) break;
}
}
if ( iTkin >= fEnergyBin ) iTkin = fEnergyBin-1; // Tkin is more then theMaxEnergy
if ( iTkin < 0 ) iTkin = 0; // against negative index, Tkin < theMinEnergy
fOldTkin = Tkin;
fInTkin = iTkin;
if (iTkin == fEnergyBin -1 || iTkin == 0 ) // the table edges
{
position = (*(*fTableT)(iTkin))(0)*G4UniformRand();
for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
{
if( position >= (*(*fTableT)(iTkin))(iTransfer) ) break;
}
if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
t = GetTransfer(iTkin, iTransfer, position);
}
else // Tkin inside between energy table edges
{
G4double rand = G4UniformRand();
position = (*(*fTableT)(iTkin))(0)*rand;
//
// (*fTableT)(iTkin)->GetLowEdgeEnergy(fBinT-2);
G4int sTransfer = 0, fTransfer = fBinT - 2, dTransfer = fTransfer - sTransfer;
G4double y2;
for( iTransfer = 0; iTransfer < fBinT - 1; iTransfer++ )
{
// dTransfer %= 2;
dTransfer /= 2;
// dTransfer *= 0.5;
y2 = (*(*fTableT)(iTkin))( sTransfer + dTransfer );
if( y2 > position ) sTransfer += dTransfer;
// if( dTransfer <= 1 ) break;
if( dTransfer < 1 ) break;
}
t = (*fTableT)(iTkin)->GetLowEdgeEnergy(sTransfer); // +(-0.5+rand)*(*fTableT)(iTkin)->GetLowEdgeEnergy(3);
}
return t;
}
///////////////////////////////////////////////////////////////////////////////
//
// Build for given particle and proton table of momentum transfers.
void G4hhElastic::BuildTableTest( G4ParticleDefinition* target, G4ParticleDefinition* projectile, G4double plab)
{
G4int jTransfer;
G4double tMax; // , sQq, sQG;
G4double t1, t2, dt, delta = 0., sum = 0. ; // , threshold;
fTarget = target;
fProjectile = projectile;
fMassTarg = fTarget->GetPDGMass();
fMassProj = fProjectile->GetPDGMass();
fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
fSpp = fMassProj*fMassProj + fMassTarg*fMassTarg + 2.*fMassTarg*std::sqrt(plab*plab + fMassProj*fMassProj);
fPcms = std::sqrt( (fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
G4cout<<"fMassTarg = "<<fMassTarg<<" MeV; fMassProj = "<<fMassProj<<" MeV"<<G4endl;
tMax = 4.*fPcms*fPcms;
if( tMax > 15.*GeV*GeV ) tMax = 15.*GeV*GeV; // Check vs. energy ???
G4Integrator<G4hhElastic,G4double(G4hhElastic::*)(G4double)> integral;
fTableT = new G4PhysicsTable(1);
G4PhysicsFreeVector* vectorT = new G4PhysicsFreeVector(fBinT-1);
sum = 0.;
dt = tMax/G4double(fBinT);
G4cout<<"s = "<<std::sqrt(fSpp)/GeV<<" GeV; fPcms = "<<fPcms/GeV
<<" GeV; qMax = "<<tMax/GeV/GeV<<" GeV2; dt = "<<dt/GeV/GeV<<" GeV2"<<G4endl;
// G4cout<<"fRA = "<<fRA*GeV<<"; fRB = "<<fRB*GeV<<G4endl;
// for(jTransfer = 1; jTransfer < fBinT; jTransfer++)
for( jTransfer = fBinT-1; jTransfer >= 1; jTransfer-- )
{
t1 = dt*(jTransfer-1);
t2 = t1 + dt;
if( fMassProj > 900.*MeV ) // pp, pn
{
delta = integral.Legendre10(this, &G4hhElastic::GetdsdtF123, t1, t2);
// threshold = integral.Legendre96(this, &G4hhElastic::GetdsdtF123, t1, tMax);
}
else // pi+-p, K+-p
{
delta = integral.Legendre10(this, &G4hhElastic::GetdsdtF123qQgG, t1, t2);
// threshold = integral.Legendre96(this, &G4hhElastic::GetdsdtF123qQgG, t1, tMax);
// delta = integral.Legendre96(this, &G4hhElastic::GetdsdtF123, t1, t2);
}
sum += delta;
// G4cout<<delta<<"\t"<<sum<<"\t"<<threshold<<G4endl;
// sQq = GetdsdtF123(q1);
// sQG = GetdsdtF123qQgG(q1);
// G4cout<<q1/GeV<<"\t"<<sQG*GeV*GeV/millibarn<<"\t"<<sQq*GeV*GeV/millibarn<<G4endl;
// G4cout<<"sum = "<<sum<<", ";
vectorT->PutValue( jTransfer-1, t1, sum ); // t2
}
// vectorT->PutValue( fBinT-1, dt*(fBinT-1), 0. ); // t2
fTableT->insertAt( 0, vectorT );
fBankT.push_back( fTableT ); // 0
// for(jTransfer = 0; jTransfer < fBinT-1; jTransfer++)
// G4cout<<(*(*fTableT)(0))(jTransfer)/sum<<"\t\t"<<std::pow(2.,-G4double(jTransfer))<<G4endl;
return;
}
////////////////////////////////////////////////////////////////////////////
//
// Return inv momentum transfer -t > 0 from initialisation table
G4double G4hhElastic::SampleTest(G4double tMin ) // const G4ParticleDefinition* aParticle, )
{
G4int iTkin, iTransfer, iTmin;
G4double t, position;
// G4double qMin = std::sqrt(tMin);
fTableT = fBankT[0];
iTkin = 0;
for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
{
// if( qMin <= (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer) ) break;
if( tMin <= (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer) ) break;
}
iTmin = iTransfer-1;
if(iTmin < 0 ) iTmin = 0;
position = (*(*fTableT)(iTkin))(iTmin)*G4UniformRand();
for( iTmin = 0; iTransfer < fBinT-1; iTransfer++)
{
if( position > (*(*fTableT)(iTkin))(iTransfer) ) break;
}
if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
t = GetTransfer(iTkin, iTransfer, position);
return t;
}
/////////////////////////////////////////////////////////////////////////////////
//
// Check with PAI sampling
G4double
G4hhElastic:: GetTransfer( G4int iTkin, G4int iTransfer, G4double position )
{
G4double x1, x2, y1, y2, randTransfer, delta, mean, epsilon = 1.e-6;
if( iTransfer == 0 )
{
randTransfer = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer);
// iTransfer++;
}
else
{
if ( iTransfer >= G4int((*fTableT)(iTkin)->GetVectorLength()) )
{
iTransfer = (*fTableT)(iTkin)->GetVectorLength() - 1;
}
y1 = (*(*fTableT)(iTkin))(iTransfer-1);
y2 = (*(*fTableT)(iTkin))(iTransfer);
x1 = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer-1);
x2 = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer);
delta = y2 - y1;
mean = y2 + y1;
if ( x1 == x2 ) randTransfer = x2;
else
{
// if ( y1 == y2 )
if ( delta < epsilon*mean )
randTransfer = x1 + ( x2 - x1 )*G4UniformRand();
else randTransfer = x1 + ( position - y1 )*( x2 - x1 )/delta; // ( y2 - y1 );
}
}
return randTransfer;
}
const G4double G4hhElastic::theNuclNuclData[18][6] =
{
// sqrt(fSpp) in GeV, fRA in 1/GeV, fRB in 1/GeV, fBq, fBQ, fImCof
{ 2.76754, 4.8, 4.8, 0.05, 0.742441, 10.5 }, // pp 3GeV/c
{ 3.07744, 5.4, 5.4, 0.02, 0.83818, 6.5 }, // pp 4GeV/c
{ 3.36305, 5.2, 5.2, 0.02, 0.838893, 7.5 }, // np 5GeV/c
{ 4.32941, 6, 6, 0.03, 0.769389, 7.5 }, // np 9 GeV/c
{ 4.62126, 6, 6, 0.03, 0.770111, 6.5 }, // pp 10.4 GeV/c
{ 5.47416, 4.5, 4.5, 0.03, 0.813185, 7.5 }, // np 15 GeV/c
{ 6.15088, 6.5, 6.5, 0.02, 0.799539, 6.5 }, // pp 19.2 GeV/c
{ 6.77474, 5.2, 5.2, 0.03, 0.784901, 7.5 }, // np 23.5 GeV/c
{ 9.77775, 7, 7, 0.03, 0.742531, 6.5 }, // pp 50 GeV/c
// {9.77775, 7, 7, 0.011, 0.84419, 4.5 }, // pp 50 GeV/c
{ 10.4728, 5.2, 5.2, 0.03, 0.780439, 7.5 }, // np 57.5 GeV/c
{ 13.7631, 7, 7, 0.008, 0.8664, 5.0 }, // pp 100 GeV/c
{ 19.4184, 6.8, 6.8, 0.009, 0.861337, 2.5 }, // pp 200 GeV/c
{ 23.5, 6.8, 6.8, 0.007, 0.878112, 1.5 }, // pp 23.5 GeV
// {24.1362, 6.4, 6.4, 0.09, 0.576215, 7.5 }, // np 309.5 GeV/c
{ 24.1362, 7.2, 7.2, 0.008, 0.864745, 5.5 },
{ 52.8, 6.8, 6.8, 0.008, 0.871929, 1.5 }, // pp 58.2 GeV
{ 546, 7.4, 7.4, 0.013, 0.845877, 5.5 }, // pb-p 546 GeV
{ 1960, 7.8, 7.8, 0.022, 0.809062, 7.5 }, // pb-p 1960 GeV
{ 7000, 8, 8, 0.024, 0.820441, 5.5 } // pp TOTEM
};
//////////////////////////////////////////////////////////////////////////////////
const G4double G4hhElastic::thePiKaNuclData[8][6] =
{
// sqrt(fSpp) in GeV, fRA in 1/GeV, fRB in 1/GeV, fBq, fBQ, fImCof
{ 2.5627, 3.8, 3.3, 0.22, 0.222, 1.5 }, // pipp 3.017 GeV/c
{ 2.93928, 4.3, 3.8, 0.2, 0.250601, 1.3 }, // pipp 4.122 GeV/c
{ 3.22326, 4.8, 4.3, 0.13, 0.32751, 2.5 }, // pipp 5.055 GeV/c
{ 7.80704, 5.5, 5, 0.13, 0.340631, 2.5 }, // pipp 32 GeV/c
{ 9.7328, 5, 4.5, 0.05, 0.416319, 5.5 }, // pipp 50 GeV/c
{ 13.7315, 5.3, 4.8, 0.05, 0.418426, 5.5 }, // pipp 100 GeV/c
{ 16.6359, 6.3, 5.8, 0.05, 0.423817, 5.5 }, // pipp 147 GeV/c
{ 19.3961, 5, 4.5, 0.05, 0.413477, 3.5 } // pimp 200 GeV/c
};
//
//
/////////////////////////////////////////////////////////////////////////////////
@@ -7,7 +7,7 @@
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt 66892 2013-01-17 10:57:59Z gunter $
# $Id: CMakeLists.txt 79364 2014-02-26 09:55:51Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -14,6 +14,186 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
28 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-28)
----------------------------------------------------------
- G4FermiBreakUp - fixed value of const coefficient to probability
of a decay channel
27 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-27)
----------------------------------------------------------
- G4DiscreteGammaDeexcitation, G4DiscreteGammaTransition return
back checks on transition energy to avoid having very low-energy
gamma in final state
- G4VGammaDeexcitation - removed not needed extra call to
CanDoTransition() inside DoChain() method
27 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-26)
----------------------------------------------------------
- G4DiscreteGammaDeexcitation, G4DiscreteGammaTransition fixed
internal conversion for the case when transition energy is
nearly electron bound energy
25 Nov 2014 Makoto Asai (hadr-deex-V10-00-25)
----------------------------------------------------------
- G4NuclearLevelManager - remove unnecessary data members to reduce
the memory consumption.
21 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-24)
----------------------------------------------------------
- G4ContinuumGammaTransition, G4ContinuumGammaDeexcitation,
G4DiscreteGammaDeexcitation, G4DiscreteGammaTransition,
G4VGammaDeexcitation - cleanup selection of continues or discrete
transition
- G4FermiFragmentPool further cleanup values of excitations
- G4ExcitationHandler - added Description for documentation
- GEN probabilities - verified and level energies using gamma
level data
- G4PhotonEvaporation - improved computation of probability
20 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-23)
----------------------------------------------------------
- G4NuclearLevelStore Makoto Asai redesign the class to enshure that
the same level is not uploaded twice running in MT mode
- G4FermiFragmentsPool - added DumpFragment() and Dump() methods
- G4VEvaporationChannel, G4GEMChannel, G4GEMProbability - added Dump()
method
- G4NuclearLevelManager, G4NuclearLevel - added DumpLevels() method
- G4ContinuumGammaTransition, G4VGammaDeexcitation - coherently use
the same energy tolarence 2 keV
17 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-22)
----------------------------------------------------------
- G4ContinuumGammaTransition - removed normC factor which has no effect
(return to 10.0 algorithm)
- G4FermiFragmentPool - fixed memory leak at destruction; fixed energy
or several excited levels to be the same in the gamma level database
- G4E1Probability - removed factor 3 in photon emission probability
- G4B10GEMProbability, G4B11GEMProbability nuclear level energies are
changed to be the same as in the gamma level database
12 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-21)
----------------------------------------------------------
- G4ContinuumGammaTransition - added factor 3 to probability of
gamma de-excitation according to theoretical prescriptions
- G4NuclearLevelStore - fixed bug #1684 - wrong deletion of user data
at exit
07 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-20)
----------------------------------------------------------
- removed debug cout
07 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-19)
----------------------------------------------------------
- removed obsolete G4FermiConfigurationList
- G4ContinuumGammaTransition, G4E1Probability - fixed probability
computation (J.M.Quesada)
03 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-18)
----------------------------------------------------------
- Fixed build problem
03 Nov 2014 Vladimir Ivanchenko (hadr-deex-V10-00-17)
----------------------------------------------------------
- Cleanup and redesign of photon evaporation
31 Oct 2014 Vladimir Ivanchenko (hadr-deex-V10-00-16)
----------------------------------------------------------
- Improved design of FermiBreakUp and fix decays of "unstable" Fermi
fragments
29 Oct 2014 Vladimir Ivanchenko (hadr-deex-V10-00-15)
----------------------------------------------------------
- G4FermiBreakUp, G4FermiFragmentsPool, G4VEvaporation,
G4ExcitationHandler, G4Evaporation, G4EvaporationChannel, G4GEMChannel,
G4UnstableFragmentBreakUp, G4VEvaporationChannel
further reduced memory churn
27 Oct 2014 Vladimir Ivanchenko (hadr-deex-V10-00-14)
----------------------------------------------------------
- G4FermiFragmentsPool - added method IfApplicable() for fast check
if FermiBreakUp is applicable to a given excited fragment
- G4EvaporationChannel, G4Evaporation, G4GEMChannel, G4GEMProbability,
G4VEvaporationChannel, G4ExcitationHandler - optimized code
reducing number of new/delete of intermediate objects, for that
slightly modified interface to evaporation channel; cleanup
logic and implementation
26 Oct 2014 Vladimir Ivanchenko (hadr-deex-V10-00-13)
----------------------------------------------------------
- G4ExcitationHandler - fixed problem in isomere production providing
energy non-concervation on level of 1 MeV
25 Oct 2014 Vladimir Ivanchenko (hadr-deex-V10-00-12)
----------------------------------------------------------
- G4ExcitationHandler, G4Evaporation, G4PhotonEvaporation - added
protection against abnormal fragments
25 Oct 2014 Vladimir Ivanchenko (hadr-deex-V10-00-11)
----------------------------------------------------------
- G4FermiFragmentsPool - is made pure static singletone, all methods
and data const in run time, no decay of exotic states
- G4FermiConfigurationList - reduced memory churn by reusing
vectors which are members of the class; improved and verified
computation of probabilities; public methods are const
- G4FermiConfiguration, G4UnstableFermiFragment - removed unused
members; make all methods be const
22 October 2014 Davide Mancusi (hadr-deex-V10-00-10)
----------------------------------------------------------
- Set af/an parameter for INCL++ to 1.02 for all nuclei.
14 October 2014 Davide Mancusi (hadr-deex-V10-00-09)
----------------------------------------------------------
- Moved theChannels and theChannelFactory to the base class, since they seem to
be common to all classes derived from G4VEvaporation.
- Some code refactoring.
- Introduce an INCL++-specific fission level-density parameter class.
22 Sept 2014 Vladimir Ivanchenko (hadr-deex-V10-00-08)
----------------------------------------------------------
- G4FermiFragmentsPool - revert back to the tag -06; make this
class to be G4ThreadLocalSingleton, this fixing data race due to
lazy initialisation but increase memory per thread; this
tag does not change physics
09 Sept 2014 Vladimir Ivanchenko (hadr-deex-V10-00-07)
----------------------------------------------------------
- G4FermiFragmentsPool - do not create list of extra decays of abnormal
fragments to avoid data race in MT mode; make all run time method
cosnt; move inline methods to source
23 July 2014 Vladimir Ivanchenko (hadr-deex-V10-00-06)
----------------------------------------------------------
- G4NuclearLevelStore - use G4ThreadLocalSingleton pattern
providing proper deletion of photon evaporation classes
at the end of run
28 March 2014 Gunter Folger (hadr-deex-V10-00-05)
----------------------------------------------------
-G4ExcitationHandler: add ModelDescription()
26 March 2014 Gunter Folger (hadr-deex-V10-00-04)
----------------------------------------------------
- use const G4ParticleDefinition*
25 February 2014 Alberto Ribon (hadr-deex-V10-00-03)
----------------------------------------------------
- CMakeLists.txt - reverting back as before the previous tag.
14 February 2014 Mathieu Karamitros (hadr-deex-V10-00-02)
----------------------------------------------------------
- CMakeLists.txt - reordering of add_subdirectory.
07 February 2014 Vladimir Ivanchenko (hadr-deex-V10-00-01)
----------------------------------------------------------
- G4NuclearLevelManager - trivial fix of Coverity report
24 January 2014 Vladimir Ivanchenko (hadr-deex-V10-00-00)
----------------------------------------------------------
- G4ExcitationHandler - fixed minor memory leak in the case when
FermiBreakUp has no final states available (hadronprocess
HyperNews post #1371 by Andreas Mueller)
20 November 2013 Vladimir Ivanchenko (hadr-deex-V09-06-27)
----------------------------------------------------------
- G4LevelReader, G4NuclearLevelManager - partial return back of tag
@@ -64,20 +64,21 @@
// version 9.2.r9, just in cases there's any subtle differences. See .cc
// file comments to see impact of the rest of the changes.
//
// 04 October 2014, D Mancusi
// Moved theChannels and theChannelFactory to the base class, since they seem
// to be common to all classes derived from G4VEvaporation.
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "G4VEvaporation.hh"
#include "G4VEvaporationChannel.hh"
#include "G4Fragment.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"
#include "G4VEvaporationFactory.hh"
#include "G4EvaporationFactory.hh"
#include <vector>
////////////////////////////////////////////////////////////////////////////////
//
class G4WilsonAblationModel : public G4VEvaporation
@@ -108,9 +109,6 @@ class G4WilsonAblationModel : public G4VEvaporation
G4FragmentVector *fragmentVector;
VectorOfFragmentTypes evapType;
std::vector<G4VEvaporationChannel*> * theChannels;
G4VEvaporationFactory * theChannelFactory;
};
////////////////////////////////////////////////////////////////////////////////
//
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4Evaporation.hh 69700 2013-05-13 08:56:05Z gcosmo $
// $Id: G4Evaporation.hh 85443 2014-10-29 14:35:57Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara
@@ -36,6 +36,10 @@
// 22/04/2011 V.Ivanchenko - added maxZ and maxA for FermiBreakUp model
// 23/01/2012 V.Ivanchenko added pointer of G4VPhotonEvaporation to the constructor
// 06/05/2013 V.Ivanchenko added pointer to ion table
// 04/10/2014 D. Mancusi Moved theChannels and theChannelFactory to the base
// class, since they seem to be common to all classes
// derived from G4VEvaporation.
//
#ifndef G4Evaporation_h
#define G4Evaporation_h 1
@@ -51,6 +55,7 @@
class G4VEvaporationFactory;
class G4NistManager;
class G4IonTable;
class G4FermiFragmentsPool;
class G4Evaporation : public G4VEvaporation
{
@@ -63,8 +68,15 @@ public:
virtual void Initialise();
// primary fragment is copied, the copy is deleted
// or is added to the list of products
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
// new interface - vector of products is added to the provided vector
// primary fragment is deleted or is modified and added to the list
// of products
void BreakFragment(G4FragmentVector*, G4Fragment* theNucleus);
void SetDefaultChannel();
void SetGEMChannel();
void SetCombinedChannel();
@@ -85,9 +97,7 @@ private:
G4bool operator==(const G4Evaporation &right) const;
G4bool operator!=(const G4Evaporation &right) const;
std::vector<G4VEvaporationChannel*>* theChannels;
std::vector<G4double> probabilities;
G4VEvaporationFactory* theChannelFactory;
size_t nChannels;
G4int maxZforFBU;
G4int maxAforFBU;
@@ -95,7 +105,7 @@ private:
G4NistManager* nist;
G4IonTable* theTableOfIons;
G4UnstableFragmentBreakUp unstableBreakUp;
G4FermiFragmentsPool* thePool;
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EvaporationChannel.hh 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4EvaporationChannel.hh 85841 2014-11-05 15:35:06Z gcosmo $
//
//
//J.M. Quesada (August2008). Based on:
@@ -43,17 +43,19 @@
#include "G4VCoulombBarrier.hh"
class G4EvaporationLevelDensityParameter;
class G4PairingCorrection;
class G4EvaporationChannel : public G4VEvaporationChannel
{
public:
// constructor
G4EvaporationChannel(G4int theA, G4int theZ, const G4String & aName,
G4EvaporationProbability * aEmissionStrategy,
G4VCoulombBarrier * aCoulombBarrier);
// destructor
virtual ~G4EvaporationChannel();
void Initialise();
inline void SetEmissionStrategy(G4EvaporationProbability * aEmissionStrategy)
{theEvaporationProbabilityPtr = aEmissionStrategy;}
@@ -61,31 +63,16 @@ public:
inline void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier)
{theCoulombBarrierPtr = aCoulombBarrier;}
protected:
// default constructor
G4EvaporationChannel();
public:
// virtual void Initialize(const G4Fragment & fragment);
virtual G4double GetEmissionProbability(G4Fragment* fragment);
G4FragmentVector * BreakUp(const G4Fragment & theNucleus);
virtual G4Fragment* EmittedFragment(G4Fragment* theNucleus);
inline G4double GetMaximalKineticEnergy(void) const
{ return MaximalKineticEnergy; }
virtual G4FragmentVector * BreakUp(const G4Fragment & theNucleus);
private:
// Calculate Binding Energy for separate fragment from nucleus
G4double CalcBindingEnergy(G4int anA, G4int aZ);
// Calculate maximal kinetic energy that can be carried by fragment (in MeV)
G4double CalcMaximalKineticEnergy(G4double U);
// Samples fragment kinetic energy.
G4double GetKineticEnergy(const G4Fragment & aFragment);
// Samples fragment kinetic energy.
G4double SampleKineticEnergy(const G4Fragment & aFragment);
// This has to be removed and put in Random Generator
G4ThreeVector IsotropicVector(G4double Magnitude = 1.0);
@@ -95,8 +82,6 @@ private:
G4bool operator==(const G4EvaporationChannel & right) const;
G4bool operator!=(const G4EvaporationChannel & right) const;
// Data Members
// ************
private:
// This data member define the channel.
@@ -115,12 +100,13 @@ private:
G4EvaporationProbability * theEvaporationProbabilityPtr;
// For Level Density calculation
// G4bool MyOwnLevelDensity;
G4VLevelDensityParameter * theLevelDensityPtr;
// For Coulomb Barrier calculation
G4VCoulombBarrier * theCoulombBarrierPtr;
G4double CoulombBarrier;
G4PairingCorrection* pairingCorrection;
//---------------------------------------------------
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UnstableFragmentBreakUp.hh 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4UnstableFragmentBreakUp.hh 85443 2014-10-29 14:35:57Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -66,6 +66,11 @@ public:
// decay fragment on light ions
virtual G4FragmentVector* BreakUpFragment(G4Fragment* fragment);
// returns always "false" by this model - primary is not deleted
// but after de-excitation it is modified and added to the products
virtual G4bool
BreakUpChain(G4FragmentVector* theResult, G4Fragment* theNucleus);
// dummy virtual methods
virtual G4Fragment* EmittedFragment(G4Fragment* fragment);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEvaporation.hh 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4VEvaporation.hh 85443 2014-10-29 14:35:57Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations interface
//
@@ -43,6 +43,9 @@
#include "globals.hh"
#include "G4Fragment.hh"
#include "G4VEvaporationFactory.hh"
#include "G4VEvaporationChannel.hh"
#include <vector>
class G4VEvaporationChannel;
@@ -60,13 +63,22 @@ private:
public:
// primary fragment is copied to the new instance, the copy is deleted
// or is added to the list of products
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus) = 0;
// new interface - vector of products is added to the provided vector
// primary fragment is deleted or is modified and added to the list
// of products
virtual void BreakFragment(G4FragmentVector*, G4Fragment* theNucleus);
// definition of options
virtual void Initialise();
virtual void SetPhotonEvaporation(G4VEvaporationChannel* ptr);
inline G4VEvaporationChannel* GetPhotonEvaporation();
inline G4VEvaporationChannel* GetFissionChannel();
// for inverse cross section choice
inline void SetOPTxs(G4int opt) { OPTxs = opt;}
@@ -80,6 +92,9 @@ protected:
G4int OPTxs;
G4bool useSICB;
std::vector<G4VEvaporationChannel*> * theChannels;
G4VEvaporationFactory * theChannelFactory;
};
inline G4VEvaporationChannel* G4VEvaporation::GetPhotonEvaporation()
@@ -87,4 +102,14 @@ inline G4VEvaporationChannel* G4VEvaporation::GetPhotonEvaporation()
return thePhotonEvaporation;
}
inline G4VEvaporationChannel* G4VEvaporation::GetFissionChannel()
{
for(std::vector<G4VEvaporationChannel*>::const_iterator iC = theChannels->begin(),
eC = theChannels->end(); iC!=eC; ++iC) {
if((*iC)->GetName() == "fission")
return *iC;
}
return 0;
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Evaporation.cc 71639 2013-06-19 15:07:54Z gcosmo $
// $Id: G4Evaporation.cc 86366 2014-11-10 08:46:07Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
@@ -62,8 +62,9 @@
#include "G4IonTable.hh"
G4Evaporation::G4Evaporation()
: theChannels(0),nChannels(0)
: nChannels(0)
{
thePool = G4FermiFragmentsPool::Instance();
SetPhotonEvaporation(new G4PhotonEvaporation());
theChannelFactory = new G4EvaporationDefaultGEMFactory(thePhotonEvaporation);
SetParameters();
@@ -72,11 +73,12 @@ G4Evaporation::G4Evaporation()
}
G4Evaporation::G4Evaporation(G4VEvaporationChannel* photoEvaporation)
: theChannels(0),nChannels(0)
: nChannels(0)
{
if(photoEvaporation) { SetPhotonEvaporation(photoEvaporation); }
else { SetPhotonEvaporation(new G4PhotonEvaporation()); }
thePool = G4FermiFragmentsPool::Instance();
theChannelFactory = new G4EvaporationDefaultGEMFactory(thePhotonEvaporation);
SetParameters();
InitialiseEvaporation();
@@ -100,8 +102,8 @@ void G4Evaporation::SetParameters()
{
nist = G4NistManager::Instance();
minExcitation = CLHEP::keV;
maxZforFBU = G4FermiFragmentsPool::Instance()->GetMaxZ();
maxAforFBU = G4FermiFragmentsPool::Instance()->GetMaxA();
maxZforFBU = thePool->GetMaxZ();
maxAforFBU = thePool->GetMaxA();
probabilities.reserve(68);
}
@@ -119,6 +121,7 @@ void G4Evaporation::Initialise()
for(size_t i=0; i<nChannels; ++i) {
(*theChannels)[i]->SetOPTxs(OPTxs);
(*theChannels)[i]->UseSICB(useSICB);
(*theChannels)[i]->Initialise();
}
}
@@ -152,12 +155,14 @@ void G4Evaporation::SetPhotonEvaporation(G4VEvaporationChannel* ptr)
G4FragmentVector * G4Evaporation::BreakItUp(const G4Fragment &theNucleus)
{
G4FragmentVector * theResult = new G4FragmentVector;
G4FragmentVector * theTempResult;
static const G4double Elimit = 3*MeV;
// The residual nucleus (after evaporation of each fragment)
G4Fragment* theResidualNucleus = new G4Fragment(theNucleus);
BreakFragment(theResult, theResidualNucleus);
return theResult;
}
void G4Evaporation::BreakFragment(G4FragmentVector* theResult,
G4Fragment* theResidualNucleus)
{
G4double totprob, prob, oldprob = 0.0;
size_t maxchannel, i;
@@ -170,26 +175,28 @@ G4FragmentVector * G4Evaporation::BreakItUp(const G4Fragment &theNucleus)
// g,n,p and light fragments - evaporation is finished
G4int Z = theResidualNucleus->GetZ_asInt();
G4int A = theResidualNucleus->GetA_asInt();
G4double Eex = theResidualNucleus->GetExcitationEnergy();
G4double mass = theResidualNucleus->GetGroundStateMass();
// stop deecitation loop if can be deexcited by FBU
if(maxZforFBU > Z && maxAforFBU >= A) {
theResult->push_back(theResidualNucleus);
return theResult;
// stop deecitation loop if residual can be deexcited by FBU
if(maxZforFBU > Z && maxAforFBU > A && Z > 0 && A > Z) {
if(thePool->IsApplicable(Z, A, mass+Eex)) {
theResult->push_back(theResidualNucleus);
return;
}
}
// check if it is stable, then finish evaporation
G4double abun = nist->GetIsotopeAbundance(Z, A);
/*
/*
G4cout << "### G4Evaporation::BreakItUp step " << ia << " Z= " << Z
<< " A= " << A << " Eex(MeV)= "
<< theResidualNucleus->GetExcitationEnergy()
<< " aban= " << abun << G4endl;
*/
// stop deecitation loop in the case of the cold stable fragment
G4double Eex = theResidualNucleus->GetExcitationEnergy();
// stop deecitation loop in the case of a cold stable fragment
if(Eex <= minExcitation && abun > 0.0) {
theResult->push_back(theResidualNucleus);
return theResult;
return;
}
totprob = 0.0;
@@ -205,6 +212,7 @@ G4FragmentVector * G4Evaporation::BreakItUp(const G4Fragment &theNucleus)
totprob += prob;
probabilities[i] = totprob;
// if two recent probabilities are near zero stop computations
if(i>=8) {
if(prob <= totprob*1.e-8 && oldprob <= totprob*1.e-8) {
@@ -213,47 +221,27 @@ G4FragmentVector * G4Evaporation::BreakItUp(const G4Fragment &theNucleus)
}
}
oldprob = prob;
// protection for very excited fragment - avoid GEM
if(7 == i && Eex > Elimit*A) {
maxchannel = 8;
break;
}
}
// photon evaporation in the case of no other channels available
// do evaporation chain and reset total probability
if(0.0 < totprob && probabilities[0] == totprob) {
//G4cout << "Start gamma evaporation" << G4endl;
theTempResult = (*theChannels)[0]->BreakUpFragment(theResidualNucleus);
if(theTempResult) {
size_t nsec = theTempResult->size();
for(size_t j=0; j<nsec; ++j) {
theResult->push_back((*theTempResult)[j]);
}
delete theTempResult;
}
//G4cout << "Start chain of gamma evaporation" << G4endl;
(*theChannels)[0]->BreakUpChain(theResult, theResidualNucleus);
totprob = 0.0;
}
// stable fragnent - evaporation is finished
// stable fragment - evaporation is finished
if(0.0 == totprob) {
// if fragment is exotic, then force its decay
if(0.0 == abun && Z < 20) {
//G4cout << "$$$ Decay exotic fragment" << G4endl;
theTempResult = unstableBreakUp.BreakUpFragment(theResidualNucleus);
if(theTempResult) {
size_t nsec = theTempResult->size();
for(size_t j=0; j<nsec; ++j) {
theResult->push_back((*theTempResult)[j]);
}
delete theTempResult;
}
unstableBreakUp.BreakUpChain(theResult, theResidualNucleus);
} else {
theResult->push_back(theResidualNucleus);
}
// save residual fragment
theResult->push_back(theResidualNucleus);
return theResult;
return;
}
// select channel
@@ -261,58 +249,16 @@ G4FragmentVector * G4Evaporation::BreakItUp(const G4Fragment &theNucleus)
// loop over evaporation channels
for(i=0; i<maxchannel; ++i) { if(probabilities[i] >= totprob) { break; } }
// this should not happen
if(i >= nChannels) { i = nChannels - 1; }
// single photon evaporation, primary pointer is kept
if(0 == i) {
//G4cout << "Single gamma" << G4endl;
G4Fragment* gamma = (*theChannels)[0]->EmittedFragment(theResidualNucleus);
if(gamma) { theResult->push_back(gamma); }
// fission, return results to the main loop if fission is succesful
} else if(1 == i) {
//G4cout << "Fission" << G4endl;
theTempResult = (*theChannels)[1]->BreakUp(*theResidualNucleus);
if(theTempResult) {
size_t nsec = theTempResult->size();
G4bool deletePrimary = true;
for(size_t j=0; j<nsec; ++j) {
if(theResidualNucleus == (*theTempResult)[j]) { deletePrimary = false; }
theResult->push_back((*theTempResult)[j]);
}
if(deletePrimary) { delete theResidualNucleus; }
delete theTempResult;
return theResult;
}
// other channels
} else {
//G4cout << "Channel # " << i << G4endl;
theTempResult = (*theChannels)[i]->BreakUp(*theResidualNucleus);
if(theTempResult) {
size_t nsec = theTempResult->size();
if(nsec > 0) {
--nsec;
for(size_t j=0; j<nsec; ++j) {
theResult->push_back((*theTempResult)[j]);
}
// if the residual change its pointer
// then delete previous residual fragment and update to the new
if(theResidualNucleus != (*theTempResult)[nsec] ) {
delete theResidualNucleus;
theResidualNucleus = (*theTempResult)[nsec];
}
}
delete theTempResult;
}
//G4cout << "Channel # " << i << G4endl;
G4Fragment* frag = (*theChannels)[i]->EmittedFragment(theResidualNucleus);
if(frag) { theResult->push_back(frag); }
// selected channel cannot sample secondary
else {
theResult->push_back(theResidualNucleus);
return;
}
}
// loop is stopped, save residual
// loop is stopped, save residual, which is unclear state
theResult->push_back(theResidualNucleus);
return theResult;
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EvaporationChannel.cc 74869 2013-10-23 09:26:17Z gcosmo $
// $Id: G4EvaporationChannel.cc 85841 2014-11-05 15:35:06Z gcosmo $
//
//J.M. Quesada (August2008). Based on:
//
@@ -64,24 +64,10 @@ G4EvaporationChannel::G4EvaporationChannel(G4int anA, G4int aZ,
{
ResidualA = 0;
ResidualZ = 0;
ResidualMass = CoulombBarrier=0.0;
ResidualMass = CoulombBarrier = 0.0;
EvaporatedMass = G4NucleiProperties::GetNuclearMass(theA, theZ);
theLevelDensityPtr = new G4EvaporationLevelDensityParameter;
}
G4EvaporationChannel::G4EvaporationChannel():
G4VEvaporationChannel(""),
theA(0),
theZ(0),
theEvaporationProbabilityPtr(0),
theCoulombBarrierPtr(0),
EmissionProbability(0.0),
MaximalKineticEnergy(-1000.0)
{
ResidualA = 0;
ResidualZ = 0;
EvaporatedMass = ResidualMass = CoulombBarrier = 0.0;
theLevelDensityPtr = new G4EvaporationLevelDensityParameter;
pairingCorrection = G4PairingCorrection::GetInstance();
}
G4EvaporationChannel::~G4EvaporationChannel()
@@ -89,156 +75,105 @@ G4EvaporationChannel::~G4EvaporationChannel()
delete theLevelDensityPtr;
}
//void G4EvaporationChannel::Initialize(const G4Fragment &)
//{}
G4double G4EvaporationChannel::GetEmissionProbability(G4Fragment* fragment)
void G4EvaporationChannel::Initialise()
{
//for inverse cross section choice
theEvaporationProbabilityPtr->SetOPTxs(OPTxs);
// for superimposed Coulomb Barrier for inverse cross sections
theEvaporationProbabilityPtr->UseSICB(useSICB);
G4VEvaporationChannel::Initialise();
}
G4double G4EvaporationChannel::GetEmissionProbability(G4Fragment* fragment)
{
G4int FragmentA = fragment->GetA_asInt();
G4int FragmentZ = fragment->GetZ_asInt();
ResidualA = FragmentA - theA;
ResidualZ = FragmentZ - theZ;
//G4cout << "G4EvaporationChannel::Initialize Z= " << theZ << " A= " << theA
// << " FragZ= " << FragmentZ << " FragA= " << FragmentA << G4endl;
//Effective excitation energy
G4double ExEnergy = fragment->GetExcitationEnergy() -
G4PairingCorrection::GetInstance()->GetPairingCorrection(FragmentA,FragmentZ);
EmissionProbability = 0.0;
// Only channels which are physically allowed are taken into account
if (ResidualA <= 0 || ResidualZ <= 0 || ResidualA < ResidualZ ||
(ResidualA == ResidualZ && ResidualA > 1) || ExEnergy <= 0.0) {
CoulombBarrier = ResidualMass = 0.0;
MaximalKineticEnergy = -1000.0*MeV;
EmissionProbability = 0.0;
} else {
if (ResidualA >= ResidualZ && ResidualZ > 0 && ResidualA >= theA) {
//Effective excitation energy
G4double ExEnergy = fragment->GetExcitationEnergy() -
pairingCorrection->GetPairingCorrection(FragmentA,FragmentZ);
ResidualMass = G4NucleiProperties::GetNuclearMass(ResidualA, ResidualZ);
G4double FragmentMass = fragment->GetGroundStateMass();
CoulombBarrier =
theCoulombBarrierPtr->GetCoulombBarrier(ResidualA,ResidualZ,ExEnergy);
// Maximal Kinetic Energy
MaximalKineticEnergy = CalcMaximalKineticEnergy(FragmentMass + ExEnergy);
//MaximalKineticEnergy = ExEnergy + fragment.GetGroundStateMass()
// - EvaporatedMass - ResidualMass;
// Emission probability
// Protection for the case Tmax<V. If not set in this way we could end up in an
// infinite loop in the method GetKineticEnergy if OPTxs!=0 && useSICB=true.
// Of course for OPTxs=0 we have the Coulomb barrier
G4double limit;
if (OPTxs==0 || (OPTxs!=0 && useSICB))
limit= CoulombBarrier;
else limit=0.;
limit = std::max(limit, FragmentMass - ResidualMass - EvaporatedMass);
G4double Etot = FragmentMass + ExEnergy;
// The threshold for charged particle emission must be set to 0 if Coulomb
//cutoff is included in the cross sections
if (MaximalKineticEnergy <= limit) EmissionProbability = 0.0;
else {
// Total emission probability for this channel
EmissionProbability = theEvaporationProbabilityPtr->
EmissionProbability(*fragment, MaximalKineticEnergy);
if(ExEnergy > 0.0 && Etot > ResidualMass + EvaporatedMass) {
// Maximal Kinetic Energy
MaximalKineticEnergy = ((Etot-ResidualMass)*(Etot+ResidualMass)
+ EvaporatedMass*EvaporatedMass)/(2.0*Etot) - EvaporatedMass;
// Emission probability
// Protection for the case Tmax<V. If not set in this way we could end up in an
// infinite loop in the method GetKineticEnergy if OPTxs!=0 && useSICB=true.
// Of course for OPTxs=0 we have the Coulomb barrier
CoulombBarrier = 0.0;
if (OPTxs==0 || (OPTxs!=0 && useSICB)) {
CoulombBarrier =
theCoulombBarrierPtr->GetCoulombBarrier(ResidualA,ResidualZ,ExEnergy);
}
// The threshold for charged particle emission must be set to 0 if Coulomb
//cutoff is included in the cross sections
if (MaximalKineticEnergy > CoulombBarrier) {
EmissionProbability = theEvaporationProbabilityPtr->
EmissionProbability(*fragment, MaximalKineticEnergy);
}
}
}
//G4cout << "G4EvaporationChannel:: probability= " << EmissionProbability << G4endl;
//G4cout << "G4EvaporationChannel:: probability= " << EmissionProbability << G4endl;
return EmissionProbability;
}
G4FragmentVector * G4EvaporationChannel::BreakUp(const G4Fragment & theNucleus)
G4Fragment* G4EvaporationChannel::EmittedFragment(G4Fragment* theNucleus)
{
/*
G4double Ecm = GetKineticEnergy(theNucleus) + ResidualMass + EvaporatedMass;
G4double EvaporatedEnergy =
((Ecm-ResidualMass)*(Ecm+ResidualMass) + EvaporatedMass*EvaporatedMass)/(2*Ecm);
*/
G4double EvaporatedEnergy = GetKineticEnergy(theNucleus) + EvaporatedMass;
G4Fragment* evFragment = 0;
G4double evEnergy = SampleKineticEnergy(*theNucleus) + EvaporatedMass;
G4ThreeVector momentum(IsotropicVector
(std::sqrt((EvaporatedEnergy - EvaporatedMass)*
(EvaporatedEnergy + EvaporatedMass))));
(std::sqrt((evEnergy - EvaporatedMass)*(evEnergy + EvaporatedMass))));
G4LorentzVector EvaporatedMomentum(momentum,EvaporatedEnergy);
G4LorentzVector ResidualMomentum = theNucleus.GetMomentum();
G4LorentzVector EvaporatedMomentum(momentum, evEnergy);
G4LorentzVector ResidualMomentum = theNucleus->GetMomentum();
EvaporatedMomentum.boost(ResidualMomentum.boostVector());
G4Fragment * EvaporatedFragment = new G4Fragment(theA,theZ,EvaporatedMomentum);
evFragment = new G4Fragment(theA,theZ,EvaporatedMomentum);
ResidualMomentum -= EvaporatedMomentum;
theNucleus->SetZandA_asInt(ResidualZ, ResidualA);
theNucleus->SetMomentum(ResidualMomentum);
G4Fragment * ResidualFragment = new G4Fragment(ResidualA, ResidualZ, ResidualMomentum);
G4FragmentVector * theResult = new G4FragmentVector;
#ifdef debug
G4double Efinal = ResidualMomentum.e() + EvaporatedMomentum.e();
G4ThreeVector Pfinal = ResidualMomentum.vect() + EvaporatedMomentum.vect();
if (std::abs(Efinal-theNucleus.GetMomentum().e()) > 1.0*keV) {
G4cout << "@@@@@@@@@@@@@@@@@@@@@ G4Evaporation Chanel: ENERGY @@@@@@@@@@@@@@@@"
<< G4endl;
G4cout << "Initial : " << theNucleus.GetMomentum().e()/MeV << " MeV Final :"
<<Efinal/MeV << " MeV Delta: "
<< (Efinal-theNucleus.GetMomentum().e())/MeV
<< " MeV" << G4endl;
}
if (std::abs(Pfinal.x()-theNucleus.GetMomentum().x()) > 1.0*keV ||
std::abs(Pfinal.y()-theNucleus.GetMomentum().y()) > 1.0*keV ||
std::abs(Pfinal.z()-theNucleus.GetMomentum().z()) > 1.0*keV ) {
G4cout << "@@@@@@@@@@@@@@@@@@@@@ G4Evaporation Chanel: MOMENTUM @@@@@@@@@@@@@@@@"
<< G4endl;
G4cout << "Initial : " << theNucleus.GetMomentum().vect() << " MeV Final :"
<<Pfinal/MeV << " MeV Delta: " << Pfinal-theNucleus.GetMomentum().vect()
<< " MeV" << G4endl;
}
#endif
theResult->push_back(EvaporatedFragment);
theResult->push_back(ResidualFragment);
return theResult;
return evFragment;
}
/////////////////////////////////////////
// Calculates the maximal kinetic energy that can be carried by fragment.
G4double G4EvaporationChannel::CalcMaximalKineticEnergy(G4double NucleusTotalE)
G4FragmentVector * G4EvaporationChannel::BreakUp(const G4Fragment & theNucleus)
{
// This is the "true" assimptotic kinetic energy (from energy conservation)
G4double Tmax =
((NucleusTotalE-ResidualMass)*(NucleusTotalE+ResidualMass)
+ EvaporatedMass*EvaporatedMass)/(2.0*NucleusTotalE) - EvaporatedMass;
//JMQ (13-09-08) bug fixed: in the original version the Tmax is calculated
//at the Coulomb barrier
//IMPORTANT: meaning of Tmax differs in OPTxs=0 and OPTxs!=0
//When OPTxs!=0 Tmax is the TRUE (assimptotic) maximal kinetic energy
if(OPTxs==0)
Tmax=Tmax- CoulombBarrier;
return Tmax;
}
G4FragmentVector * theResult = new G4FragmentVector();
G4Fragment* frag0 = new G4Fragment(theNucleus);
G4Fragment* frag1 = EmittedFragment(frag0);
if(frag1) { theResult->push_back(frag1); }
theResult->push_back(frag0);
return theResult;
}
///////////////////////////////////////////
//JMQ: New method for MC sampling of kinetic energy. Substitutes old CalcKineticEnergy
G4double G4EvaporationChannel::GetKineticEnergy(const G4Fragment & aFragment)
//JMQ: New method for MC sampling of kinetic energy.
G4double G4EvaporationChannel::SampleKineticEnergy(const G4Fragment & aFragment)
{
G4double T = 0.0;
if (OPTxs==0) {
// It uses Dostrovsky's approximation for the inverse reaction cross
// in the probability for fragment emission
// MaximalKineticEnergy energy in the original version (V.Lara) was calculated at
//the Coulomb barrier.
if (MaximalKineticEnergy < 0.0) {
throw G4HadronicException(__FILE__, __LINE__,
"G4EvaporationChannel::CalcKineticEnergy: maximal kinetic at the Coulomb barrier is less than 0");
}
G4double Rb = 4.0*theLevelDensityPtr->
LevelDensityParameter(ResidualA+theA,ResidualZ+theZ,MaximalKineticEnergy)*
MaximalKineticEnergy;
@@ -263,59 +198,17 @@ G4double G4EvaporationChannel::GetKineticEnergy(const G4Fragment & aFragment)
} while (FRk < G4UniformRand());
G4double result = MaximalKineticEnergy * (1.0-Rk*Rk) + CoulombBarrier;
return result;
} else if (OPTxs==1 || OPTxs==2 || OPTxs==3 || OPTxs==4) {
T = MaximalKineticEnergy * (1.0-Rk*Rk) + CoulombBarrier;
} else {
// Coulomb barrier is just included in the cross sections
G4double V = 0;
if(useSICB) { V= CoulombBarrier; }
V = std::max(V, aFragment.GetGroundStateMass()-EvaporatedMass-ResidualMass);
G4double Tmax=MaximalKineticEnergy;
G4double T(0.0);
G4double NormalizedProbability(1.0);
// VI: This is very ineffective - create new objects at each call to the method
/*
// A pointer is created in order to access the distribution function.
G4EvaporationProbability * G4EPtemp = 0;
if (theA==1 && theZ==0) G4EPtemp=new G4NeutronEvaporationProbability();
else if (theA==1 && theZ==1) G4EPtemp=new G4ProtonEvaporationProbability();
else if (theA==2 && theZ==1 ) G4EPtemp=new G4DeuteronEvaporationProbability();
else if (theA==3 && theZ==1 ) G4EPtemp=new G4TritonEvaporationProbability();
else if (theA==3 && theZ==2 ) G4EPtemp=new G4He3EvaporationProbability();
else if (theA==4 && theZ==2) G4EPtemp=new G4AlphaEvaporationProbability();
else {
std::ostringstream errOs;
errOs << "ejected particle out of range in G4EvaporationChannel" << G4endl;
throw G4HadronicException(__FILE__, __LINE__, errOs.str());
}
//for cross section selection and superimposed Coulom Barrier for xs
G4EPtemp->SetOPTxs(OPTxs);
G4EPtemp->UseSICB(useSICB);
*/
// use local pointer and not create a new one
do
{
T=V+G4UniformRand()*(Tmax-V);
NormalizedProbability =
theEvaporationProbabilityPtr->ProbabilityDistributionFunction(aFragment,T)/
GetEmissionProbability(const_cast<G4Fragment*>(&aFragment));
}
while (G4UniformRand() > NormalizedProbability);
// delete G4EPtemp;
return T;
} else{
std::ostringstream errOs;
errOs << "Bad option for energy sampling in evaporation" <<G4endl;
throw G4HadronicException(__FILE__, __LINE__, errOs.str());
G4double prob;
do {
T=CoulombBarrier+G4UniformRand()*(MaximalKineticEnergy-CoulombBarrier);
prob = theEvaporationProbabilityPtr->ProbabilityDistributionFunction(aFragment,T);
} while (EmissionProbability*G4UniformRand() >= prob);
}
return T;
}
G4ThreeVector G4EvaporationChannel::IsotropicVector(G4double Magnitude)
@@ -330,13 +223,3 @@ G4ThreeVector G4EvaporationChannel::IsotropicVector(G4double Magnitude)
Magnitude*CosTheta);
return Vector;
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UnstableFragmentBreakUp.cc 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4UnstableFragmentBreakUp.cc 85443 2014-10-29 14:35:57Z gcosmo $
//
// -------------------------------------------------------------------
// GEANT 4 class file
@@ -75,6 +75,14 @@ G4FragmentVector* G4UnstableFragmentBreakUp::BreakUpFragment(G4Fragment* nucleus
{
//G4cout << "G4UnstableFragmentBreakUp::BreakUpFragment" << G4endl;
G4FragmentVector * theResult = new G4FragmentVector();
BreakUpChain(theResult, nucleus);
return theResult;
}
G4bool G4UnstableFragmentBreakUp::BreakUpChain(G4FragmentVector* theResult,
G4Fragment* nucleus)
{
//G4cout << "G4UnstableFragmentBreakUp::BreakUpChain" << G4endl;
G4int Z = nucleus->GetZ_asInt();
G4int A = nucleus->GetA_asInt();
@@ -136,13 +144,10 @@ G4FragmentVector* G4UnstableFragmentBreakUp::BreakUpFragment(G4Fragment* nucleus
A -= Afr[index];
}
// updated fragment
if( theResult->size() > 0) {
nucleus->SetZandA_asInt(Z, A);
nucleus->SetMomentum(lv);
}
return theResult;
nucleus->SetZandA_asInt(Z, A);
nucleus->SetMomentum(lv);
theResult->push_back(nucleus);
return false;
}
G4FragmentVector* G4UnstableFragmentBreakUp::BreakUp(const G4Fragment&)
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEvaporation.cc 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4VEvaporation.cc 85443 2014-10-29 14:35:57Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998) writen from G4Evaporation.cc (May 1998)
@@ -37,6 +37,7 @@
G4VEvaporation::G4VEvaporation()
:thePhotonEvaporation(0),OPTxs(3),useSICB(false)
,theChannels(0),theChannelFactory(0)
{}
G4VEvaporation::~G4VEvaporation()
@@ -53,6 +54,9 @@ void G4VEvaporation::SetPhotonEvaporation(G4VEvaporationChannel* ptr)
}
}
void G4VEvaporation::BreakFragment(G4FragmentVector*, G4Fragment*)
{}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4FermiBreakUp.hh 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4FermiBreakUp.hh 85443 2014-10-29 14:35:57Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
@@ -32,7 +32,14 @@
#define G4FermiBreakUp_h 1
#include "G4VFermiBreakUp.hh"
#include "G4FermiConfigurationList.hh"
#include "globals.hh"
#include "G4FermiConfiguration.hh"
#include "G4VFermiFragment.hh"
#include "G4FermiPhaseSpaceDecay.hh"
#include <vector>
class G4FermiFragmentsPool;
class G4Pow;
class G4FermiBreakUp : public G4VFermiBreakUp
{
@@ -41,16 +48,42 @@ public:
G4FermiBreakUp();
virtual ~G4FermiBreakUp();
// primary fragment is copied to the new instance, the copy is deleted
// or is added to the list of products
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
// new interface - vector of products is added to the provided vector
// primary fragment is deleted or is modified and added to the list
// of products
void BreakFragment(G4FragmentVector*, G4Fragment* theNucleus);
private:
G4double CoulombBarrier(const std::vector<const G4VFermiFragment*>* v);
G4double DecayProbability(G4int A, G4double TotalE, const G4FermiConfiguration*);
const std::vector<const G4VFermiFragment*>*
SelectConfiguration(G4int Z, G4int A, G4double mass);
G4FermiBreakUp(const G4FermiBreakUp &right);
const G4FermiBreakUp & operator=(const G4FermiBreakUp &right);
G4bool operator==(const G4FermiBreakUp &right) const;
G4bool operator!=(const G4FermiBreakUp &right) const;
G4FermiConfigurationList theConfigurationList;
G4FermiFragmentsPool* thePool;
std::vector<G4double> NormalizedWeights;
G4double Coef;
G4double ConstCoeff;
size_t nmax;
G4Pow* g4pow;
const G4FermiPhaseSpaceDecay* thePhaseSpace;
std::vector<G4double> massRes;
std::vector<const G4VFermiFragment*> frag;
};
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4FermiConfiguration.hh 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4FermiConfiguration.hh 85841 2014-11-05 15:35:06Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
@@ -39,18 +39,16 @@
class G4FermiConfiguration
{
public:
// Constructors
G4FermiConfiguration(const std::vector<const G4VFermiFragment*>&);
~G4FermiConfiguration();
G4FragmentVector* GetFragments(const G4Fragment & theNucleus);
inline G4int GetA() const;
inline G4int GetZ() const;
inline G4double GetMass() const;
inline const std::vector<const G4VFermiFragment*>& GetFragmentList();
inline const std::vector<const G4VFermiFragment*>* GetFragmentList() const;
private:
@@ -83,10 +81,10 @@ inline G4double G4FermiConfiguration::GetMass() const
return totalMass;
}
inline const std::vector<const G4VFermiFragment*>&
G4FermiConfiguration::GetFragmentList()
inline const std::vector<const G4VFermiFragment*>*
G4FermiConfiguration::GetFragmentList() const
{
return Configuration;
return &Configuration;
}
#endif
@@ -38,6 +38,7 @@
#include "globals.hh"
#include "G4VFermiFragment.hh"
#include "G4FermiConfiguration.hh"
#include "G4FermiPhaseSpaceDecay.hh"
#include <vector>
class G4FermiFragmentsPool
@@ -48,14 +49,22 @@ public:
~G4FermiFragmentsPool();
const std::vector<G4FermiConfiguration*>*
GetConfigurationList(G4int Z, G4int A, G4double mass);
G4bool IsApplicable(G4int Z, G4int A, G4double mass) const;
const G4VFermiFragment* GetFragment(G4int Z, G4int A);
const std::vector<const G4FermiConfiguration*>*
GetConfigurationList(G4int Z, G4int A, G4double mass) const;
inline G4int GetMaxZ() const;
const G4VFermiFragment* GetFragment(G4int Z, G4int A) const;
inline G4int GetMaxA() const;
const G4FermiPhaseSpaceDecay* GetFermiPhaseSpaceDecay() const;
G4int GetMaxZ() const;
G4int GetMaxA() const;
void DumpFragment(const G4VFermiFragment* f) const;
void Dump() const;
private:
@@ -63,9 +72,9 @@ private:
void Initialise();
G4bool IsExist(G4int Z, G4int A, std::vector<const G4VFermiFragment*>&);
G4bool IsExist(G4int Z, G4int A, std::vector<const G4VFermiFragment*>&) const;
inline G4bool IsAvailable(G4int Z, G4int A);
G4bool IsAvailable(G4int Z, G4int A) const;
static G4FermiFragmentsPool* theInstance;
@@ -76,33 +85,13 @@ private:
G4int verbose;
// list of configuration sorted by A for 1, 2, 3, 4 final fragments
std::vector<G4FermiConfiguration*> list1[17];
std::vector<G4FermiConfiguration*> list2[17];
std::vector<G4FermiConfiguration*> list3[17];
std::vector<G4FermiConfiguration*> list4[17];
// list of exotic configurations
std::vector<G4FermiConfiguration*> listextra;
std::vector<const G4FermiConfiguration*> list1[17];
std::vector<const G4FermiConfiguration*> list2[17];
std::vector<const G4FermiConfiguration*> list3[17];
std::vector<const G4FermiConfiguration*> list4[17];
G4FermiPhaseSpaceDecay thePhaseSpace;
};
inline G4bool G4FermiFragmentsPool::IsAvailable(G4int Z, G4int A)
{
G4bool res = true;
if (2 == Z && 5 == A) { res = false; }
else if(3 == Z && 5 == A) { res = false; }
else if(4 == Z && 8 == A) { res = false; }
else if(5 == Z && 9 == A) { res = false; }
return res;
}
inline G4int G4FermiFragmentsPool::GetMaxZ() const
{
return maxZ;
}
inline G4int G4FermiFragmentsPool::GetMaxA() const
{
return maxA;
}
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4StableFermiFragment.hh 67983 2013-03-13 10:42:03Z gcosmo $
// $Id: G4StableFermiFragment.hh 85607 2014-10-31 11:21:24Z gcosmo $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
@@ -44,7 +44,7 @@ public:
virtual ~G4StableFermiFragment();
virtual G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum) const;
virtual void FillFragment(G4FragmentVector*, const G4LorentzVector & aMomentum) const;
private:

Some files were not shown because too many files have changed in this diff Show More