Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
+17 -18
View File
@@ -1,31 +1,30 @@
-------------------------------------------------------------------
# Category hadr-abla History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
---------------------------------------------------------------------
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
History file for the ABLA evaporation/fission model
---------------------------------------------------
-------------------------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-04-25 Ben Morgan (hadr-abla-V11-00-03)
- Add needed dependencies
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
20 April 2022 - Alberto Ribon (hadr-abla-V10-07-06)
---------------------------------------------------
## 2022-04-20 Alberto Ribon (hadr-abla-V11-00-02)
- G4Abla.cc : fixed compilation warnings for 'may be used uninitialized'
variables.
9 February 2022 - Gabriele Cosmo
--------------------------------
## 2022-02-09 Gabriele Cosmo (hadr-abla-V11-00-01)
- Fixed compilation warnings on Intel compilers for unused variables.
## 2021-12-10 Ben Morgan (hadr-abla-V11-00-00)
- Change to new Markdown History format.
---
# History entries prior to 11.0
8 November 2021 - Jose Luis Rodriguez Sanchez (hadr-abla-V10-07-05)
-------------------------------------------------------------------
-----------------------------------------------------
- Update of G4Abla for hypernuclei.
27 October 2021 - Alberto Ribon (hadr-abla-V10-07-04)
@@ -23,5 +23,7 @@ geant4_module_link_libraries(G4hadronic_abla
G4hadronic_mgt
G4hadronic_util
PRIVATE
G4hadronic_deex_handler
G4heprandom
G4ions
G4partman)
@@ -68,7 +68,7 @@ G4AblaDataFile::~G4AblaDataFile()
bool G4AblaDataFile::readData()
{
#ifdef ABLAXX_IN_GEANT4_MODE
if(!std::getenv("G4ABLADATA")) {
if(!G4FindDataDir("G4ABLADATA")) {
// throw G4HadronicException(__FILE__, __LINE__, "ERROR: Data
// missing. Set environment variable G4ABLA3.0 to point to the
// directory containing data files needed by INCL and ABLA
@@ -85,7 +85,7 @@ bool G4AblaDataFile::readData()
G4Exception("G4AblaDataFile::readData()","ABLA_001",
FatalException, ed);
}
G4String dataPath(std::getenv("G4ABLADATA"));
G4String dataPath(G4FindDataDir("G4ABLADATA"));
#else
G4String dataPath(theConfig->getABLAXXDataFilePath().c_str());
#endif
@@ -1,17 +1,16 @@
# Category had-abrasion History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for hadronic/models/abrasion directory
--------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2021-12-10 Ben Morgan (had-abrasion-V11-00-00)
- Change to new Markdown History format
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
---
# History entries prior to 11.0
04-Aug-2021 Alberto Ribon (had-abrasion-V10-07-02)
--------------------------------------------------
@@ -1,17 +1,21 @@
# Category had-binary History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for hadronic/models/binary_cascade directory
--------------------------------------------------------
## 2022-05-25 Alberto Ribon (had-binary-V11-00-01)
- `G4GeneratorPrecompoundInterface`, `G4BinaryCascade`: propagate the information
on parent resonance (in the `G4BinaryCascade::ApplyYourself` method,
from `G4ReactionProduct` to `G4HadSecondary`, in other methods
from `G4KineticTrack` to `G4ReactionProduct`)
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2021-12-10 Ben Morgan (had-binary-V11-00-00)
- Change to new Markdown History format
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
---
# History entries prior to 11.0
27-Oct-2021, Alberto Ribon had-binary-V10-07-03
- G4GeneratorPrecompoundInterface : extended the method PropagateNuclNucl
@@ -354,6 +354,8 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
if(time < 0.0) { time = 0.0; }
aNew.SetTime(timePrimary + time);
aNew.SetCreatorModelID((*iter)->GetCreatorModelID());
aNew.SetParentResonanceDef((*iter)->GetParentResonanceDef());
aNew.SetParentResonanceID((*iter)->GetParentResonanceID());
theParticleChange.AddSecondary(aNew);
}
@@ -697,12 +699,11 @@ G4double G4BinaryCascade::GetExcitationEnergy()
{
nucleusMass = GetIonMass(currentZ,currentA);
}
else if (currentZ==0 ) // Uzhi && currentA==1 ) // Uzhi
{ // Uzhi
if(currentA == 1) {nucleusMass = G4Neutron::Neutron()->GetPDGMass();}// Uzhi
else {nucleusMass = GetFinalNucleusMomentum().mag() // Uzhi
- 3.*MeV*currentA;} // Uzhi
} // Uzhi
else if (currentZ==0 )
{
if(currentA == 1) {nucleusMass = G4Neutron::Neutron()->GetPDGMass();}
else {nucleusMass = GetFinalNucleusMomentum().mag() - 3.*MeV*currentA;}
}
else
{
#ifdef debug_G4BinaryCascade
@@ -933,14 +934,11 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
G4LorentzVector pFragment(0);
// G4cout << " final4mon " << GetFinal4Momentum() /MeV << G4endl;
// if ( ExcitationEnergy >= 0 ) // closed by Uzhi
// { // closed by Uzhi
fragment = FindFragments();
if(fragment) // Uzhi
{ // Uzhi
if(fragment->GetA_asInt() >1) // Uzhi
if(fragment)
{
if(fragment->GetA_asInt() >1)
{
pFragment=fragment->GetMomentum();
// G4cout << " going to preco with fragment 4 mom " << pFragment << G4endl;
@@ -961,10 +959,12 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
std::vector<G4KineticTrack *>::iterator i;
if ( theTargetList.size() == 1 ) {i=theTargetList.begin();}
if ( theCapturedList.size() == 1 ) {i=theCapturedList.begin();} // Uzhi
if ( theCapturedList.size() == 1 ) {i=theCapturedList.begin();}
G4ReactionProduct * aNew = new G4ReactionProduct((*i)->GetDefinition());
aNew->SetTotalEnergy((*i)->GetDefinition()->GetPDGMass());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef((*i)->GetParentResonanceDef());
aNew->SetParentResonanceID((*i)->GetParentResonanceID());
aNew->SetMomentum(G4ThreeVector(0));// see boost for preCompoundProducts below..
precompoundProducts = new G4ReactionProductVector();
precompoundProducts->push_back(aNew);
@@ -973,7 +973,7 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
fragment=0;
} else // End of if(fragment)
{ // No fragment, can be neutrons only // Uzhi
{ // No fragment, can be neutrons only
precompoundProducts = DecayVoidNucleus();
}
@@ -1011,24 +1011,23 @@ G4ReactionProductVector * G4BinaryCascade::DecayVoidNucleus()
std::vector<G4double> masses;
G4double sumMass(0);
if ( theTargetList.size() != 0) // Uzhi
{
if ( theTargetList.size() != 0)
{
for ( aNuc=theTargetList.begin(); aNuc != theTargetList.end(); aNuc++)
{
G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
masses.push_back(mass);
sumMass += mass;
}
} // Uzhi
}
if ( theCapturedList.size() != 0) // Uzhi
{ // Uzhi
for(aNuc = theCapturedList.begin(); // Uzhi
aNuc != theCapturedList.end(); aNuc++) // Uzhi
{ // Uzhi
G4double mass=(*aNuc)->GetDefinition()->GetPDGMass(); // Uzhi
masses.push_back(mass); // Uzhi
sumMass += mass; // Uzhi
if ( theCapturedList.size() != 0)
{
for(aNuc = theCapturedList.begin(); aNuc != theCapturedList.end(); aNuc++)
{
G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
masses.push_back(mass);
sumMass += mass;
}
}
@@ -1059,27 +1058,29 @@ G4ReactionProductVector * G4BinaryCascade::DecayVoidNucleus()
aNew->SetTotalEnergy((*aMom)->e());
aNew->SetMomentum((*aMom)->vect());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef((*aNuc)->GetParentResonanceDef());
aNew->SetParentResonanceID((*aNuc)->GetParentResonanceID());
result->push_back(aNew);
delete *aMom;
}
}
if ( theCapturedList.size() != 0) // Uzhi
{ // Uzhi
for ( aNuc=theCapturedList.begin(); // Uzhi
(aNuc != theCapturedList.end()) && (aMom!=momenta->end()); // Uzhi
aNuc++, aMom++ ) // Uzhi
{ // Uzhi
G4ReactionProduct * aNew = new G4ReactionProduct( // Uzhi
(*aNuc)->GetDefinition()); // Uzhi
aNew->SetTotalEnergy((*aMom)->e()); // Uzhi
aNew->SetMomentum((*aMom)->vect()); // Uzhi
if ( theCapturedList.size() != 0)
{
for ( aNuc=theCapturedList.begin();
(aNuc != theCapturedList.end()) && (aMom!=momenta->end());
aNuc++, aMom++ )
{
G4ReactionProduct * aNew = new G4ReactionProduct((*aNuc)->GetDefinition());
aNew->SetTotalEnergy((*aMom)->e());
aNew->SetMomentum((*aMom)->vect());
aNew->SetCreatorModelID(theBIC_ID);
result->push_back(aNew); // Uzhi
delete *aMom; // Uzhi
} // Uzhi
} // Uzhi
aNew->SetParentResonanceDef((*aNuc)->GetParentResonanceDef());
aNew->SetParentResonanceID((*aNuc)->GetParentResonanceID());
result->push_back(aNew);
delete *aMom;
}
}
delete momenta;
}
@@ -1103,6 +1104,8 @@ G4ReactionProductVector * G4BinaryCascade::ProductsAddFinalState(G4ReactionProdu
aNew->SetTotalEnergy(kt->Get4Momentum().e());
aNew->SetNewlyAdded(kt->IsParticipant());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef(kt->GetParentResonanceDef());
aNew->SetParentResonanceID(kt->GetParentResonanceID());
products->push_back(aNew);
#ifdef debug_BIC_Propagate_finals
@@ -2721,6 +2724,8 @@ G4ReactionProductVector * G4BinaryCascade::Propagate1H1(
aNew->SetMomentum(kt->Get4Momentum().vect());
aNew->SetTotalEnergy(kt->Get4Momentum().e());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef(kt->GetParentResonanceDef());
aNew->SetParentResonanceID(kt->GetParentResonanceID());
products->push_back(aNew);
#ifdef debug_H1_BinaryCascade
if (! kt->GetDefinition()->GetPDGStable() )
@@ -2896,6 +2901,8 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
aNew->SetParentResonanceID((*iter)->GetParentResonanceID());
Esecondaries +=(*iter)->Get4Momentum().e();
psecondaries +=(*iter)->Get4Momentum();
aNew->SetNewlyAdded(true);
@@ -2920,6 +2927,8 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
aNew->SetMomentum(atrack->Get4Momentum().vect());
aNew->SetTotalEnergy(atrack->Get4Momentum().e());
aNew->SetCreatorModelID(atrack->GetCreatorModelID());
aNew->SetParentResonanceDef(atrack->GetParentResonanceDef());
aNew->SetParentResonanceID(atrack->GetParentResonanceID());
Esecondaries +=atrack->Get4Momentum().e();
psecondaries +=atrack->Get4Momentum();
aNew->SetNewlyAdded(true);
@@ -2949,13 +2958,14 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
aNew->SetParentResonanceID((*iter)->GetParentResonanceID());
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());
@@ -2963,6 +2973,8 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
aNew->SetMomentum((*iter)->Get4Momentum().vect());
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
aNew->SetParentResonanceID((*iter)->GetParentResonanceID());
Esecondaries +=(*iter)->Get4Momentum().e();
psecondaries +=(*iter)->Get4Momentum();
aNew->SetNewlyAdded(true);
@@ -3022,6 +3034,8 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
aNew->SetMomentum(aNew->GetTotalMomentum() * ((*iter)->Get4Momentum().vect().unit()));
aNew->SetNewlyAdded(true);
aNew->SetCreatorModelID(theBIC_ID);
aNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
aNew->SetParentResonanceID((*iter)->GetParentResonanceID());
products->push_back(aNew);
Esecondaries += aNew->GetTotalEnergy();
psecondaries += G4LorentzVector(aNew->GetMomentum(),aNew->GetTotalEnergy() );
@@ -3031,8 +3045,6 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
psecondaries += G4LorentzVector((*rpiter)->GetMomentum(),(*rpiter)->GetTotalEnergy() );
}
G4LorentzVector initial4Mom=theProjectile4Momentum + G4LorentzVector(initial_nuclear_mass);
//G4cout << "::FillVoidNucleus()final e/p conservation initial" <<initial4Mom
@@ -3059,7 +3071,6 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
}
}
return products;
}
G4ReactionProductVector * G4BinaryCascade::HighEnergyModelFSProducts(G4ReactionProductVector * products,
@@ -3073,6 +3084,8 @@ G4ReactionProductVector * G4BinaryCascade::HighEnergyModelFSProducts(G4ReactionP
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
aNew->SetNewlyAdded(true);
aNew->SetCreatorModelID((*iter)->GetCreatorModelID());
aNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
aNew->SetParentResonanceID((*iter)->GetParentResonanceID());
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
products->push_back(aNew);
}
@@ -176,6 +176,8 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
theNew->SetMomentum(mom);
theNew->SetTotalEnergy(e);
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
theTotalResult->push_back(theNew);
Secondary4Momentum += (*iter)->Get4Momentum();
#ifdef debugPrecoInt
@@ -188,6 +190,8 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
theNew->SetMomentum(mom);
theNew->SetTotalEnergy(e);
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
theTotalResult->push_back(theNew);
Secondary4Momentum += (*iter)->Get4Momentum();
#ifdef debugPrecoInt
@@ -311,7 +315,6 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
exciton4Momentum.setE(ResE);
#ifdef debugPrecoInt
G4cout<<"ActualMass - fMass < 0. "<<ActualMass<<" "<<fMass<<" "<<ActualMass - fMass<<G4endl;
G4int Uzhi; G4cin>>Uzhi;
#endif
}
}
@@ -510,6 +513,8 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
theNew->SetMomentum(aTrack4Momentum.vect());
theNew->SetTotalEnergy(aTrack4Momentum.e());
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
theTotalResult->push_back(theNew);
#ifdef debugPrecoInt
SecondrNum++;
@@ -605,6 +610,8 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
theNew->SetMomentum(aTrack4Momentum.vect());
theNew->SetTotalEnergy(aTrack4Momentum.e());
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
theNew->SetParentResonanceDef((*iter)->GetParentResonanceDef());
theNew->SetParentResonanceID((*iter)->GetParentResonanceID());
theTotalResult->push_back(theNew);
#ifdef debugPrecoInt
@@ -1,24 +1,26 @@
-------------------------------------------------------------------
# Category hadr-casc History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
History file for hadronic/models/cascade
----------------------------------------
-------------------------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-05-23 Gabriele Cosmo (hadr-casc-V11-00-02)
- Fixed wrong comparison between two arrays in findCrossSection(..)
for G4CascadePPChannel, G4CascadeNPChanneland G4CascadeNNChannel.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
9 February 2022 Gabriele Cosmo (hadr-casc-V11-00-01)
-----------------------------------------------------
## 2022-02-09 Gabriele Cosmo (hadr-casc-V11-00-01)
- Fixed compilation warnings on Intel compilers for unused variables.
- Use const iterator in G4InuclEvaporation::BreakItUp(..).
## 2021-12-10 Ben Morgan (hadr-casc-V11-00-00)
- Change to new Markdown History format.
---
# History entries prior to 11.0
4 August 2021 Alberto Ribon (hadr-casc-V10-07-04)
--------------------------------------------------
- G4CascadeInterface : set the creator model ID for the secondaries
@@ -1886,7 +1886,10 @@ G4CascadeNNChannelData::data(nn2bfs, nn3bfs, nn4bfs, nn5bfs, nn6bfs, nn7bfs,
G4double
G4CascadeNNChannel::findCrossSection(G4double ke,
const G4double (&xsec)[30]) const {
if (ke < 0.01 && (xsec == nnTotXSec || xsec == nnCrossSections[0])) {
if (ke < 0.01 &&
(std::equal(std::cbegin(xsec), std::cend(xsec), std::cbegin(nnTotXSec))
|| std::equal(std::cbegin(xsec), std::cend(xsec), std::cbegin(nnCrossSections[0]))))
{
// Stepanov's function for ke < 10 MeV, up to zero-energy value
const G4double kemin = 4.0/nnTotXSec[0];
return (ke>0.001 ? (9.0692 - 0.0050574/ke)/ke + 6.9466 :
@@ -2079,7 +2079,10 @@ G4CascadeNPChannelData::data(np2bfs, np3bfs, np4bfs, np5bfs, np6bfs, np7bfs,
G4double
G4CascadeNPChannel::findCrossSection(G4double ke,
const G4double (&xsec)[30]) const {
if (ke < 0.01 && (xsec == npTotXSec || xsec == npCrossSections[0])) {
if (ke < 0.01 &&
(std::equal(std::cbegin(xsec), std::cend(xsec), std::cbegin(npTotXSec))
|| std::equal(std::cbegin(xsec), std::cend(xsec), std::cbegin(npCrossSections[0]))))
{
// Stepanov's function for ke < 10 MeV, up to zero-energy value
const G4double kemin = 1.92/npTotXSec[0];
return (ke>0.001 ? (3.0885 - 0.0011748/ke)/ke + 5.3107 :
@@ -1886,7 +1886,10 @@ G4CascadePPChannelData::data(pp2bfs, pp3bfs, pp4bfs, pp5bfs, pp6bfs, pp7bfs,
G4double
G4CascadePPChannel::findCrossSection(G4double ke,
const G4double (&xsec)[30]) const {
if (ke < 0.01 && (xsec == ppTotXSec || xsec == ppCrossSections[0])) {
if (ke < 0.01 &&
(std::equal(std::cbegin(xsec), std::cend(xsec), std::cbegin(ppTotXSec))
|| std::equal(std::cbegin(xsec), std::cend(xsec), std::cbegin(ppCrossSections[0]))))
{
// Stepanov's function for ke < 10 MeV, up to zero-energy value
const G4double kemin = 4.0/ppTotXSec[0];
return (ke>0.001 ? (9.0692 - 0.0050574/ke)/ke + 6.9466 :
@@ -1,31 +1,27 @@
-------------------------------------------------------------------
# Category hadr-cohe History
==================================================
Geant4 - an Object-Oriented Toolkit for Simulation
==================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for Low Energy Parameterized Models
------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
04 February 2022 - V.Ivanchenko (hadr-cohe-V10-07-06)
-----------------------------------------------------
## 2022-02-04 Vladimir Ivanchenko (hadr-cohe-V11-00-02)
- G4ElasticHadrNucleusHE, G4NeutronElectronElModel, G4NeutrinoElectronNcModel
fixed compilation warnings on unused variables; removed commented lines;
use Energy(..) method of G4PhysicsVector instead of obsolete GetLowEdgeEnergy(...)
fixed compilation warnings on unused variables; removed commented lines;
use Energy(..) method of G4PhysicsVector instead of obsolete GetLowEdgeEnergy(...)
03 January 2022 - A.Ribon (hadr-cohe-V10-07-05)
--------------------------------------------------
## 2022-01-03 Alberto Ribon (hadr-cohe-V11-00-01)
- G4AntiNuclElastic : Vladimir Uzhinsky's correction in the SampleInvariantT
method of the highest momentum transfer (which was causing the cosine of
the polar angle in the center-of-mass system to be larger than 1 in some
cases). This should fix the bug #2204.
cases). This should be fixed bug #2204.
## 2021-12-10 Ben Morgan (hadr-cohe-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
04 August 2021 - A.Ribon (hadr-cohe-V10-07-04)
--------------------------------------------------
@@ -195,7 +195,7 @@ private:
static G4ElasticData* fElasticData[NHADRONS][ZMAX];
G4NistManager* nistManager;
char* fDirectory;
const char* fDirectory;
G4bool isMaster;
@@ -1381,7 +1381,7 @@ G4ElasticHadrNucleusHE::InFileName(std::ostringstream& ss,
const G4ParticleDefinition* p, G4int Z)
{
if(!fDirectory) {
fDirectory = std::getenv("G4LEDATA");
fDirectory = G4FindDataDir("G4LEDATA");
if (fDirectory) {
ss << fDirectory << "/";
}
@@ -1,18 +1,83 @@
-------------------------------------------------------------------
# Category hadr-deex History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for hadronic/models/de_excitation
----------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-06-16 Vladimir Ivanchenko (hadr-deex-V11-00-12)
- G4PhotonEvaporation - simplified handling of floating levels
- G4EvaporationProbability - reduce usage of cache
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
## 2022-05-31 Vladimir Ivanchenko (hadr-deex-V11-00-11)
- G4PhotonEvaporation - fix Coverity warning
## 2022-04-29 Vladimir Ivanchenko (hadr-deex-V11-00-10)
- G4VEvaporationChannel, G4EvaporationChannel,
G4VEmissionProbability, G4EvaporationProbability - improved
inverse cross section parameterisation at threshold; code
cleanup;
## 2022-04-27 Vladimir Ivanchenko (hadr-deex-V11-00-09)
- G4VEvaporationChannel, G4EvaporationChannel, G4VEvaporation,
G4EvaporationProbability, G4PhotonEvaporation - added extra
public interfaces to be used in unit tests
- G4NuclearLevelData - use G4AutoLock
## 2022-04-25 Michel Maire (hadr-deex-V11-00-08)
- G4DeexPrecoParameters::StreamInfo() : use G4BestUnit
## 2022-04-18 Vladimir Ivanchenko (hadr-deex-V11-00-07)
- G4EvaporationChannel, G4Evaporation - added limitation
(A < 30) on decay of unphysical fragment, which allows
removal light unphysical states and provides improved
isotope production for the spalation fragments
- G4CoulombBarrier, G4PairingCorrection, G4ShellCorrection,
G4CameronShellPlusPairingCorrection,
G4CameronGilbertShellCorrections - code clean-up
## 2022-04-04 Vladimir Ivanchenko (hadr-deex-V11-00-06)
- G4EvaporationChannel, G4EvaporationProbability,
G4VEmissionProbability, G4VCoulombBarrier, G4CoulombBarrier
code/headers clean-up; use new method from G4Fragment
## 2022-03-27 Vladimir Ivanchenko (hadr-deex-V11-00-05)
- G4VEmissionProbability - more strong limit on accuracy of integrated
probability, improved debug printout
## 2022-03-21 Vladimir Ivanchenko (hadr-deex-V11-00-04)
- G4PhotonEvaporation - for floating levels check if levels with the same
energy can be used for sampling transitions, code clean-up
- G4LevelManger, G4NuclLevel - removed verbose printouts, code clean-up
- G4VEmissionProbability - fixed sampling of tail of distribution, added
numerical protections
- G4CoulombBarrier - tune parameters
## 2022-02-24 Vladimir Ivanchenko (hadr-deex-V11-00-03)
- G4LevelManager - use correct type
- G4VEmissionProbability - updated sampling of the emitted fragment energy
needed due to analysis of Alexsandr Svetlichny and colleagues (#2443)
## 2022-02-15 Vladimir Ivanchenko (hadr-deex-V11-00-02)
- G4PhotonEvaporation - fixed situation when excited fragments is created with
excitation energy does not corresponding to level energies from Geant4
G4LEVELGAMMADATA, which fixes #2434, it is also fix non-reproducibility for
the case, when radioactive decay is enabled on top of any physics list.
## 2021-12-13 Vladimir Ivanchenko (hadr-deex-V11-00-01)
- G4Evaporation, G4UnstableFragmentBreakUp complete fix of production
of unphysical fragments (bug #2355); improved debug printout
- G4ExcitationHandler - use IsLongLived() flag from G4Fragment to decide
if de-excitation of the fragment should be stopped
- G4VEmissionProbability - limit number of bins for numerical
integration to 50
## 2021-12-10 Ben Morgan (hadr-deex-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
02 November 2021 Vladimir Ivanchenko (hadr-deex-V10-07-08)
- G4PhotonEvaporation - changed logic de-excitation from levels, which
@@ -1,67 +0,0 @@
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Internal Conversion History file
-------------------------------------
This file should be used by responsible icm developers to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
15 Nov 2002 Fan Lei:
First implementation of the Internal Conversion in the G4PhotonEvaporation class
The following classes have been modified:
G4NuclearLevelManager.hh
G4DiscreteGammaDeexcitation.hh G4PhotonEvaporation.hh
G4DiscreteGammaTransition.hh G4VGammaDeexcitation.hh
G4NuclearLevel.hh G4VGammaTransition.hh
Atomic Relaxation can be included from the low energy EM group but Auger electron
production is switched.
Instructions on how to activate the Internal Conversion Model (ICM)
Conversion electron emission is a competting process to gamma emission in
nuclear photo-evaporation. It has been implemented in the new G4PhotoEvaporation class and
it contolled by the following public methods which have been added to the class.
void SetICM (G4bool);
To activate or deactivate the ICM in photo evaporation process. ICM is off by default.
void RDMForced (G4bool);
Special method used primarily by G4RadioactiveDecay() to force photoevaporation of
long lived levels.
If this is set to true the evaporation will bypass the MaxHalfLife test as set by
the SetMaxHalfLife() method.
void SetMaxHalfLife(G4double) ;
New method to stop evaporating long lived levels. Default is 1e-6 seconds
void SetEOccupancy( G4ElectronOccupancy) ;
To set the orbital electron configuration of the nuclei
G4ElectronOccupancy GetEOccupancy () { return _eOccupancy;} ;
To retrieve the modified eletron configuration.
G4int GetVacantShellNumber () { return _vShellNumber;};
To obtained the vacant shell number, for further atomic relaxation
void SetARM (G4bool val) ;
To activate or deactivate the atomic relaxation process. ARM is off by default.
@@ -78,15 +78,15 @@ public:
void SetGEMVIChannel();
void SetCombinedChannel();
G4Evaporation(const G4Evaporation &right) = delete;
const G4Evaporation & operator=(const G4Evaporation &right) = delete;
G4bool operator==(const G4Evaporation &right) const = delete;
G4bool operator!=(const G4Evaporation &right) const = delete;
private:
void InitialiseChannelFactory();
G4Evaporation(const G4Evaporation &right);
const G4Evaporation & operator=(const G4Evaporation &right);
G4bool operator==(const G4Evaporation &right) const;
G4bool operator!=(const G4Evaporation &right) const;
G4int fVerbose;
size_t nChannels;
G4double minExcitation;
@@ -57,27 +57,26 @@ public:
G4Fragment* EmittedFragment(G4Fragment* theNucleus) override;
G4double ComputeInverseXSection(G4Fragment*, G4double kinEnergy) override;
G4double ComputeProbability(G4Fragment*, G4double kinEnergy) override;
inline G4int GetZ() const { return theZ; };
inline G4int GetA() const { return theA; };
inline G4EvaporationProbability* GetEvaporationProbability()
{ return theProbability; }
G4EvaporationChannel(const G4EvaporationChannel & right) = delete;
const G4EvaporationChannel & operator=
(const G4EvaporationChannel & right) = delete;
G4bool operator==(const G4EvaporationChannel & right) const = delete;
G4bool operator!=(const G4EvaporationChannel & right) const = delete;
private:
G4EvaporationChannel(const G4EvaporationChannel & right);
const G4EvaporationChannel & operator=(const G4EvaporationChannel & right);
G4bool operator==(const G4EvaporationChannel & right) const;
G4bool operator!=(const G4EvaporationChannel & right) const;
// This data member define the channel.
// They are initialised at object creation (constructor) time.
G4int theA;
G4int theZ;
G4int resA;
G4int resZ;
G4int secID; // Creator model ID for the secondaries created by this model
G4double mass;
G4double resMass;
G4double evapMass;
G4double evapMass2;
G4NuclearLevelData* theLevelData;
// For evaporation probability calcualation
G4EvaporationProbability* theProbability;
@@ -85,7 +84,21 @@ private:
// For Coulomb Barrier calculation
G4CoulombBarrier* theCoulombBarrier;
G4NuclearLevelData* theLevelData;
// This data member define the channel.
// They are initialised at object creation (constructor) time.
G4int theA;
G4int theZ;
G4int resA = 0;
G4int resZ = 0;
G4int secID; // Creator model ID for this model
G4double mass = 0.0;
G4double resMass = 0.0;
G4double ekinmax = 0.0;
G4double bCoulomb = 0.0;
G4double evapMass;
G4double evapMass2;
};
#endif
@@ -45,27 +45,25 @@ public:
explicit G4EvaporationProbability(G4int anA, G4int aZ,
G4double aGamma);
~G4EvaporationProbability() override;
~G4EvaporationProbability() override = default;
// general method used for evaporation
virtual G4double TotalProbability(const G4Fragment& fragment,
G4double minKinEnergy,
G4double maxKinEnergy,
G4double CB, G4double exEnergy);
/*
virtual G4double TotalProbability(const G4Fragment& fragment,
G4double minKinEnergy,
G4double maxKinEnergy,
G4double CB);
*/
// main method to compute full probability for OPTx > 2
G4double ComputeProbability(G4double K, G4double CB) override;
// Samples fragment kinetic energy and excitation energy
// of the residual nucleaus
G4double SampleKineticEnergy(G4double minKinEnergy,
G4double maxKinEnergy,
G4double CB);
G4double CrossSection(G4double K, G4double CB);
// Copy constructor
G4EvaporationProbability(const G4EvaporationProbability &right) = delete;
const G4EvaporationProbability & operator=
(const G4EvaporationProbability &right) = delete;
G4bool operator==(const G4EvaporationProbability &right) const = delete;
G4bool operator!=(const G4EvaporationProbability &right) const = delete;
protected:
@@ -75,20 +73,8 @@ protected:
private:
G4double CrossSection(G4double K, G4double CB);
// Copy constructor
G4EvaporationProbability(const G4EvaporationProbability &right);
const G4EvaporationProbability & operator=
(const G4EvaporationProbability &right);
G4bool operator==(const G4EvaporationProbability &right) const;
G4bool operator!=(const G4EvaporationProbability &right) const;
//G4int fragA;
//G4int fragZ;
G4int index;
G4double resA13;
G4double lastA;
G4double muu;
G4double freeU;
G4double a0;
@@ -98,6 +84,8 @@ private:
// number and S_f is fragment spin
G4double fGamma;
G4double pcoeff;
G4int index;
};
#endif
@@ -71,6 +71,7 @@ public:
inline G4VFermiBreakUp* GetFermiBreakUp() const;
inline G4VEvaporationChannel* GetPhotonEvaporation();
inline G4VEvaporationChannel* GetFissionChannel();
inline G4VEvaporationChannel* GetChannel(size_t idx);
// for inverse cross section choice
inline void SetOPTxs(G4int opt);
@@ -79,6 +80,11 @@ public:
inline size_t GetNumberOfChannels() const;
G4VEvaporation(const G4VEvaporation &right) = delete;
const G4VEvaporation & operator=(const G4VEvaporation &right) = delete;
G4bool operator==(const G4VEvaporation &right) const = delete;
G4bool operator!=(const G4VEvaporation &right) const = delete;
protected:
void CleanChannels();
@@ -91,13 +97,6 @@ protected:
std::vector<G4VEvaporationChannel*> * theChannels;
G4VEvaporationFactory * theChannelFactory;
private:
G4VEvaporation(const G4VEvaporation &right) = delete;
const G4VEvaporation & operator=(const G4VEvaporation &right) = delete;
G4bool operator==(const G4VEvaporation &right) const = delete;
G4bool operator!=(const G4VEvaporation &right) const = delete;
};
inline void G4VEvaporation::SetFermiBreakUp(G4VFermiBreakUp* ptr)
@@ -117,7 +116,14 @@ inline G4VEvaporationChannel* G4VEvaporation::GetPhotonEvaporation()
inline G4VEvaporationChannel* G4VEvaporation::GetFissionChannel()
{
return (theChannels && theChannels->size() > 1) ? (*theChannels)[1] : nullptr;
return (nullptr != theChannels && theChannels->size() > 1) ?
(*theChannels)[1] : nullptr;
}
inline G4VEvaporationChannel* G4VEvaporation::GetChannel(size_t idx)
{
return (nullptr != theChannels && theChannels->size() > idx) ?
(*theChannels)[idx] : nullptr;
}
inline void G4VEvaporation::SetOPTxs(G4int opt)
@@ -188,6 +188,7 @@ void G4Evaporation::BreakFragment(G4FragmentVector* theResult,
if(fVerbose > 1) {
G4cout << "### G4Evaporation::BreakItUp loop" << G4endl;
}
CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
// Starts loop over evaporated particles, loop is limited by number
// of nucleons
@@ -218,7 +219,7 @@ void G4Evaporation::BreakFragment(G4FragmentVector* theResult,
// loop over evaporation channels
for(i=0; i<nChannels; ++i) {
prob = (*theChannels)[i]->GetEmissionProbability(theResidualNucleus);
if(fVerbose > 2 && prob > 0.0) {
if(fVerbose > 1 && prob > 0.0) {
G4cout << " Channel# " << i << " prob= " << prob << G4endl;
}
totprob += prob;
@@ -241,16 +242,23 @@ void G4Evaporation::BreakFragment(G4FragmentVector* theResult,
G4cout << "$$$ Start chain of gamma evaporation" << G4endl;
}
(*theChannels)[0]->BreakUpChain(theResult, theResidualNucleus);
// release residual stable fragment
if(abun > 0.0) {
theResidualNucleus->SetLongLived(true);
break;
}
// release residual fragment known to FBU
Eex = theResidualNucleus->GetExcitationEnergy();
if(theFBU->IsApplicable(Z, A, Eex)) { break; }
// release residual fragment with non-zero life time
if(theResidualNucleus->IsLongLived()) { break; }
totprob = 0.0;
}
// stable fragment - evaporation is finished
if(0.0 == totprob) {
// release fragment known to DB
if(fLevelData->GetLevelManager(Z, A)) { break; }
// if fragment is exotic, then it forced to decay
if(0.0 == totprob && A < 30) {
// if residual fragment is exotic, then it forced to decay
// if success, then decay product is added to results
if(fVerbose > 1) {
G4cout << "$$$ Decay exotic fragment" << G4endl;
@@ -263,7 +271,8 @@ void G4Evaporation::BreakFragment(G4FragmentVector* theResult,
}
// select channel
totprob *= G4UniformRand();
totprob *= rndm->flat();
// loop over evaporation channels
for(i=0; i<maxchannel; ++i) { if(probabilities[i] >= totprob) { break; } }
@@ -272,7 +281,7 @@ void G4Evaporation::BreakFragment(G4FragmentVector* theResult,
if(fVerbose > 2 && frag) { G4cout << " " << *frag << G4endl; }
// normaly a fragment should be created
if(frag) { theResult->push_back(frag); }
else { break; }
if(nullptr != frag) { theResult->push_back(frag); }
else { break; }
}
}
@@ -48,24 +48,17 @@
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
#include "G4RandomDirection.hh"
#include "G4Alpha.hh"
#include "G4PhysicsModelCatalog.hh"
G4EvaporationChannel::G4EvaporationChannel(G4int anA, G4int aZ,
G4EvaporationProbability* aprob):
G4VEvaporationChannel(),
theA(anA),
theZ(aZ),
secID(-1),
theProbability(aprob),
theCoulombBarrier(new G4CoulombBarrier(anA, aZ))
theCoulombBarrier(new G4CoulombBarrier(anA, aZ)),
theA(anA), theZ(aZ)
{
resA = resZ = 0;
secID = G4PhysicsModelCatalog::GetModelID("model_G4EvaporationChannel");
mass = resMass = 0.0;
evapMass = G4NucleiProperties::GetNuclearMass(theA, theZ);
//G4cout << "G4EvaporationChannel: Z= " << theZ << " A= " << theA
// << " M(GeV)= " << evapMass/GeV << G4endl;
evapMass2 = evapMass*evapMass;
theLevelData = G4NuclearLevelData::GetInstance();
}
@@ -96,7 +89,7 @@ G4double G4EvaporationChannel::GetEmissionProbability(G4Fragment* fragment)
G4double exEnergy = fragment->GetExcitationEnergy();
G4double delta0 = theLevelData->GetPairingCorrection(fragZ,fragA);
/*
/*
G4cout << "G4EvaporationChannel::Initialize Z= "<<theZ<<" A= "<<theA
<< " FragZ= " << fragZ << " FragA= " << fragA
<< " exEnergy= " << exEnergy << " d0= " << delta0 << G4endl;
@@ -107,34 +100,30 @@ G4double G4EvaporationChannel::GetEmissionProbability(G4Fragment* fragment)
mass = fragMass + exEnergy;
resMass = G4NucleiProperties::GetNuclearMass(resA, resZ);
G4double bCoulomb = 0.0;
ekinmax = 0.5*((mass-resMass)*(mass+resMass) + evapMass2)/mass - evapMass;
G4double elim = 0.0;
if(theZ > 0) {
bCoulomb = theCoulombBarrier->GetCoulombBarrier(resA,resZ,exEnergy);
bCoulomb = theCoulombBarrier->GetCoulombBarrier(resA, resZ, 0.0);
// for OPTxs >0 penetration under the barrier is taken into account
const G4double dCB = 3.5*CLHEP::MeV;
elim = (0 != OPTxs) ?
std::max(bCoulomb*0.5, bCoulomb - dCB*theZ) : bCoulomb;
elim = (0 != OPTxs) ? bCoulomb*0.5 : bCoulomb;
}
/*
G4cout << "exEnergy= " << exEnergy << " Ec= " << bCoulomb
<< " d0= " << delta0
<< " elim=" << elim << " d0= " << delta0
<< " Free= " << mass - resMass - evapMass
<< G4endl;
*/
if(mass <= resMass + evapMass + elim) { return 0.0; }
G4double twoMass = mass + mass;
G4double ekinmax =
((mass-resMass)*(mass+resMass) + evapMass2)/twoMass - evapMass;
G4double ekinmin = 0.0;
if(elim > 0.0) {
G4double resM = std::max(mass - evapMass - elim, resMass);
G4double resM = mass - evapMass - elim;
ekinmin =
std::max(((mass-resM)*(mass+resM) + evapMass2)/twoMass - evapMass,0.0);
std::max(0.5*((mass-resM)*(mass+resM) + evapMass2)/mass - evapMass, 0.0);
}
/*
/*
G4cout << "Emin= " <<ekinmin<<" Emax= "<<ekinmax
<< " mass= " << mass << " resM= " << resMass
<< " evapM= " << evapMass << G4endl;
@@ -142,25 +131,18 @@ G4double G4EvaporationChannel::GetEmissionProbability(G4Fragment* fragment)
if(ekinmax <= ekinmin) { return 0.0; }
theProbability->SetDecayKinematics(resZ, resA, resMass, mass);
G4double prob = theProbability->TotalProbability(*fragment, ekinmin,
G4double prob = theProbability->TotalProbability(*fragment, ekinmin,
ekinmax, bCoulomb,
exEnergy - delta0);
/*
G4cout<<"G4EvaporationChannel: prob= "<< prob << " Z= " << theZ
<< " A= " << theA << " E1= " << ekinmin << " E2= " << ekinmax
<< G4endl;
*/
return prob;
}
G4Fragment* G4EvaporationChannel::EmittedFragment(G4Fragment* theNucleus)
{
G4double ekin;
G4double ekin = ekinmax;
// assumed, that TotalProbability(...) was already called
// if value iz zero no possiblity to sample final state
if(resA <= 4 || theProbability->GetProbability() == 0.0) {
ekin = 0.5*(mass*mass - resMass*resMass + evapMass2)/mass - evapMass;
} else {
if(resA > 4 && theProbability->GetProbability() > 0.0) {
ekin = theProbability->SampleEnergy();
}
ekin = std::max(ekin, 0.0);
@@ -170,13 +152,27 @@ G4Fragment* G4EvaporationChannel::EmittedFragment(G4Fragment* theNucleus)
lv.boost(lv0.boostVector());
G4Fragment* evFragment = new G4Fragment(theA, theZ, lv);
if(evFragment != nullptr) { evFragment->SetCreatorModelID(secID); }
evFragment->SetCreatorModelID(secID);
lv0 -= lv;
theNucleus->SetZandA_asInt(resZ, resA);
theNucleus->SetMomentum(lv0);
theNucleus->SetZAandMomentum(lv0, resZ, resA);
theNucleus->SetCreatorModelID(secID);
//G4cout << "Residual: Z= " << resZ << " A= " << resA << " Eex= "
// << theNucleus->GetExcitationEnergy() << G4endl;
return evFragment;
}
G4double G4EvaporationChannel::ComputeInverseXSection(G4Fragment* frag,
G4double kinEnergy)
{
ComputeProbability(frag, kinEnergy);
return theProbability->CrossSection(kinEnergy, bCoulomb);
}
G4double G4EvaporationChannel::ComputeProbability(G4Fragment* frag,
G4double kinEnergy)
{
G4int fragA = frag->GetA_asInt();
G4int fragZ = frag->GetZ_asInt();
resA = fragA - theA;
resZ = fragZ - theZ;
bCoulomb = theCoulombBarrier->GetCoulombBarrier(resA, resZ, 0.0);
return theProbability->ComputeProbability(kinEnergy, bCoulomb);
}
@@ -52,15 +52,13 @@
#include "G4Log.hh"
#include "G4Pow.hh"
using namespace std;
static const G4double explim = 160.;
G4EvaporationProbability::G4EvaporationProbability(G4int anA, G4int aZ,
G4double aGamma)
: G4VEmissionProbability(aZ, anA), fGamma(aGamma)
{
resA13 = muu = freeU = a0 = delta1 = 0.0;
resA13 = lastA = muu = freeU = a0 = delta1 = 0.0;
pcoeff = fGamma*pEvapMass*CLHEP::millibarn
/((CLHEP::pi*CLHEP::hbarc)*(CLHEP::pi*CLHEP::hbarc));
@@ -72,13 +70,8 @@ G4EvaporationProbability::G4EvaporationProbability(G4int anA, G4int aZ,
} else {
ResetIntegrator(30, 0.5*CLHEP::MeV, 0.03);
}
// G4cout << "G4EvaporationProbability: Z= " << theZ << " A= " << theA
// << " M(GeV)= " << pEvapMass/GeV << G4endl;
}
G4EvaporationProbability::~G4EvaporationProbability()
{}
G4double G4EvaporationProbability::CalcAlphaParam(const G4Fragment&)
{
return 1.0;
@@ -98,9 +91,9 @@ G4double G4EvaporationProbability::TotalProbability(
G4double U = fragment.GetExcitationEnergy();
a0 = pNuclearLevelData->GetLevelDensity(fragZ,fragA,U);
freeU = exEnergy;
resA13 = pG4pow->Z13(resA);
delta1 = pNuclearLevelData->GetPairingCorrection(resZ,resA);
/*
resA13 = pG4pow->Z13(resA);
/*
G4cout << "G4EvaporationProbability: Z= " << theZ << " A= " << theA
<< " resZ= " << resZ << " resA= " << resA
<< " fragZ= " << fragZ << " fragA= " << fragA
@@ -109,10 +102,9 @@ G4double G4EvaporationProbability::TotalProbability(
<< minEnergy << " emax= " << maxEnergy
<< " CB= " << CB << G4endl;
*/
if (OPTxs==0 || (OPTxs==4 && freeU < 10.)) {
if (OPTxs==0) {
G4double SystemEntropy = 2.0*std::sqrt(a0*freeU);
const G4double RN2 = 2.25*CLHEP::fermi*CLHEP::fermi
/(CLHEP::twopi*CLHEP::hbar_Planck*hbar_Planck);
@@ -136,30 +128,26 @@ G4double G4EvaporationProbability::TotalProbability(
pProbability = GlobalFactor*(Term1*ExpTerm1 + Term2*ExpTerm2);
} else {
// compute power once
if(0 < index) {
muu = G4KalbachCrossSection::ComputePowerParameter(resA, index);
}
// if Coulomb barrier cutoff is superimposed for all cross sections
// then the limit is the Coulomb Barrier
pProbability = IntegrateProbability(minEnergy, maxEnergy, CB);
}
/*
G4cout << "TotalProbability: Emin=" << minEnergy << " Emax= " << maxEnergy
<< " CB= " << CB << " prob=" << pProbability << G4endl;
*/
return pProbability;
}
G4double G4EvaporationProbability::ComputeProbability(G4double K, G4double CB)
{
//G4cout << "### G4EvaporationProbability::ProbabilityDistributionFunction"
// << G4endl;
G4double E0 = freeU;
// abnormal case - should never happens
if(pMass < pEvapMass + pResMass) { return 0.0; }
G4double m02 = pMass*pMass;
G4double m12 = pEvapMass*pEvapMass;
G4double mres = sqrt(m02 + m12 - 2.*pMass*(pEvapMass + K));
G4double m02 = pMass*pMass;
G4double m12 = pEvapMass*pEvapMass;
G4double mres = std::sqrt(m02 + m12 - 2.*pMass*(pEvapMass + K));
G4double excRes = mres - pResMass;
G4double E1 = excRes - delta1;
@@ -167,80 +155,29 @@ G4double G4EvaporationProbability::ComputeProbability(G4double K, G4double CB)
G4double a1 = pNuclearLevelData->GetLevelDensity(resZ,resA,excRes);
G4double xs = CrossSection(K, CB);
G4double prob = pcoeff*G4Exp(2.0*(std::sqrt(a1*E1) - std::sqrt(a0*E0)))*K*xs;
/*
G4cout << "PDF: Z= " << theZ << " A= " << theA
<< " K= " << K << " E0= " << E0 << " E1= " << E1 << G4endl;
G4cout << " prob= " << prob << " pcoeff= " << pcoeff
<< " xs= " << xs << G4endl;
*/
return prob;
}
G4double
G4EvaporationProbability::CrossSection(G4double K, G4double CB)
{
G4double res;
// compute power once
if(resA != lastA) {
lastA = resA;
if(0 < index)
muu = G4KalbachCrossSection::ComputePowerParameter(resA, index);
}
G4double res = 0.0;
if(OPTxs <= 2) {
res = G4ChatterjeeCrossSection::ComputeCrossSection(K, CB, resA13, muu,
index, theZ, resA);
} else {
res = G4KalbachCrossSection::ComputeCrossSection(K, CB, resA13, muu,
index, theZ, theA, resA);
} else {
G4double elim = 0.5*CB;
if(K > elim) {
res = G4KalbachCrossSection::ComputeCrossSection(K, elim, resA13, muu,
index, theZ, theA, resA);
res *= (1.0 - elim/K);
}
}
//G4cout << "XS: K= "<<K<<" res= "<<res<<" cb= "<<CB<<" muu= "
// <<muu<<" index= " << index<< G4endl;
return res;
}
G4double
G4EvaporationProbability::SampleKineticEnergy(G4double minKinEnergy,
G4double maxKinEnergy,
G4double)
{
/*
G4cout << "### Sample probability Emin= " << minKinEnergy
<< " Emax= " << maxKinEnergy
<< " Z= " << theZ << " A= " << theA << G4endl;
*/
G4double T = 0.0;
CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
if (OPTxs==0 || (OPTxs==4 && freeU < 10.)) {
// JMQ:
// 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.
G4double Rb = 4.0*a0*maxKinEnergy;
G4double RbSqrt = std::sqrt(Rb);
G4double PEX1 = (RbSqrt < explim) ? G4Exp(-RbSqrt) : 0.0;
G4double Rk = 0.0;
G4double FRk = 0.0;
G4int nn = 0;
const G4int nmax = 100;
const G4double ssqr3 = 1.5*std::sqrt(3.0);
do {
G4double RandNumber = rndm->flat();
Rk = 1.0 + (1./RbSqrt)*G4Log(RandNumber + (1.0-RandNumber)*PEX1);
G4double Q1 = 1.0;
G4double Q2 = 1.0;
if (theZ == 0) { // for emitted neutron
G4double Beta = (2.12/(resA13*resA13) - 0.05)*MeV/(0.76 + 2.2/resA13);
Q1 = 1.0 + Beta/maxKinEnergy;
Q2 = Q1*std::sqrt(Q1);
}
FRk = ssqr3 * Rk * (Q1 - Rk*Rk)/Q2;
if(nn > nmax) { break; }
++nn;
// Loop checking, 05-Aug-2015, Vladimir Ivanchenko
} while (FRk < rndm->flat());
T = std::max(maxKinEnergy * (1.0-Rk*Rk), 0.0) + minKinEnergy;
} else {
T = SampleEnergy();
}
//G4cout<<"-- new Z= "<<theZ<<" A= "<< theA << " ekin= " << T << G4endl;
return T;
}
@@ -90,7 +90,7 @@ G4bool G4UnstableFragmentBreakUp::BreakUpChain(G4FragmentVector* results,
<< " Eex(MeV)= " << nucleus->GetExcitationEnergy() << G4endl;
}
const G4double tolerance = 10*CLHEP::eV;
const G4double dmlimit = 0.2*CLHEP::MeV;
const G4double dmlimit = 0.005*CLHEP::MeV;
G4double mass = lv.mag();
G4double exca = -1000.0;
G4bool isChannel = false;
@@ -102,19 +102,20 @@ G4bool G4UnstableFragmentBreakUp::BreakUpChain(G4FragmentVector* results,
if(Ares <= 4) {
for(G4int j=0; j<6; ++j) {
if(Zres == Zfr[j] && Ares == Afr[j]) {
/*
G4cout << "i= " << i << " j= " << j << " Zres= " << Zres
<< " Ares= " << Ares << " dm= " << mass - masses[i] - masses[j]
<< G4endl;
*/
G4double delm = mass - masses[i] - masses[j];
/*
G4cout << "i=" << i << " j=" << j << " Zres=" << Zres
<< " Ares=" << Ares << " delm=" << delm << G4endl;
*/
if(delm > exca) {
mass2 = masses[i]; // emitted
mass1 = masses[j]; // recoil
exca = delm;
idx = i;
if(delm > 0.0) { isChannel = true; }
break;
if(delm > 0.0) {
isChannel = true;
break;
}
}
}
}
@@ -124,33 +125,36 @@ G4bool G4UnstableFragmentBreakUp::BreakUpChain(G4FragmentVector* results,
G4double mres = G4NucleiProperties::GetNuclearMass(Ares, Zres);
G4double e = mass - mres - masses[i];
// select excited state
const G4LevelManager* lman = fLevelData->GetLevelManager(Zres, Ares);
if(lman && e >= 0.0) {
//const G4LevelManager* lman = fLevelData->GetLevelManager(Zres, Ares);
/*
G4cout << "i=" << i << " Zres=" << Zres
<< " Ares=" << Ares << " delm=" << e << G4endl;
*/
if(e >= exca) {
mass2 = masses[i];
mass1 = mres + e*G4UniformRand();
mass1 = (Ares > 4 && e > 0.0) ? mres + e*G4UniformRand() : mres;
exca = e;
idx = i;
isChannel = true;
break;
if(e > 0.0) {
isChannel = true;
break;
}
}
// if physical channel is not identified
// check excitation energy
if(e > exca) {
mass2 = masses[i];
mass1 = mres;
if(e > 0.0) { mass1 += e; }
exca = e;
idx = i;
}
}
}
G4double massmin = mass1 + mass2;
if(mass < massmin) {
if(fVerbose > 1) {
G4cout << "isChannel:" << isChannel << " idx=" << idx << " Zfr=" << Zfr[idx]
<< " Arf=" << Afr[idx] << " delm=" << mass - massmin << G4endl;
}
if(!isChannel || mass < massmin) {
if(mass + dmlimit < massmin) { return false; }
if(fVerbose > 1) {
G4cout << "#Unstable decay correction: Z= " << Z << " A= " << A
<< " idx= " << idx
<< " deltaM(MeV)= " << mass - massmin
<< G4endl;
<< " idx= " << idx
<< " deltaM(MeV)= " << mass - massmin
<< G4endl;
}
mass = massmin;
G4double e = std::max(lv.e(), mass + tolerance);
@@ -187,7 +187,7 @@ inline void G4ExcitationHandler::SortSecondaryFragment(G4Fragment* frag)
G4int A = frag->GetA_asInt();
// gamma, e-, p, n
if(A <= 1) {
if(A <= 1 || frag->IsLongLived()) {
theResults.push_back(frag);
} else if(frag->GetExcitationEnergy() < minExcitation) {
// cold fragments
@@ -70,54 +70,53 @@ public:
// run time inlined const functions
//===================================================================
// only in this method there is a check on the vector boundary
size_t NearestLevelIndex(const G4double energy, const size_t index=0) const;
inline size_t NumberOfTransitions() const;
inline const G4NucLevel* GetLevel(size_t i) const;
inline const G4NucLevel* GetLevel(const size_t i) const;
inline G4double LevelEnergy(size_t i) const;
inline G4double LevelEnergy(const size_t i) const;
inline G4double MaxLevelEnergy() const;
size_t NearestLevelIndex(G4double energy, size_t index=0) const;
inline size_t NearestLowEdgeLevelIndex(const G4double energy) const;
inline size_t NearestLowEdgeLevelIndex(G4double energy) const;
inline const G4NucLevel* NearestLevel(const G4double energy,
const size_t index=0) const;
inline const G4NucLevel* NearestLevel(G4double energy, size_t index=0) const;
inline G4double NearestLevelEnergy(const G4double energy,
const size_t index=0) const;
inline G4double NearestLevelEnergy(G4double energy, size_t index=0) const;
inline G4double NearestLowEdgeLevelEnergy(G4double energy) const;
inline G4double NearestLowEdgeLevelEnergy(const G4double energy) const;
// for stable isotopes life time is -1
inline G4double LifeTime(size_t i) const;
inline G4double LifeTime(const size_t i) const;
inline G4int SpinTwo(size_t i) const;
inline G4int SpinTwo(const size_t i) const;
inline G4int Parity(size_t i) const;
inline G4int Parity(const size_t i) const;
inline G4int FloatingLevel(size_t i) const;
inline G4int FloatingLevel(const size_t i) const;
inline G4double ShellCorrection() const;
inline G4double LevelDensity(G4double U) const;
inline G4double LevelDensity(const G4double U) const;
const G4String& FloatingType(size_t i) const;
const G4String& FloatingType(const size_t i) const;
void StreamInfo(std::ostream& os) const;
private:
#ifdef G4VERBOSE
void PrintError(size_t idx, const G4String&) const;
#endif
G4LevelManager(const G4LevelManager & right) = delete;
const G4LevelManager& operator=(const G4LevelManager &right) = delete;
G4bool operator==(const G4LevelManager &right) const = delete;
G4bool operator!=(const G4LevelManager &right) const = delete;
std::vector<G4double> fLevelEnergy;
std::vector<G4int> fSpin;
private:
std::vector<G4double> fLevelEnergy;
std::vector<G4int> fSpin;
std::vector<const G4NucLevel*> fLevels;
G4double fShellCorrection;
@@ -135,19 +134,13 @@ inline size_t G4LevelManager::NumberOfTransitions() const
return nTransitions;
}
inline const G4NucLevel* G4LevelManager::GetLevel(size_t i) const
inline const G4NucLevel* G4LevelManager::GetLevel(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "GetLevel(idx)"); }
#endif
return fLevels[i];
}
inline G4double G4LevelManager::LevelEnergy(size_t i) const
inline G4double G4LevelManager::LevelEnergy(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "LevelEnergy(idx)"); }
#endif
return fLevelEnergy[i];
}
@@ -156,7 +149,8 @@ inline G4double G4LevelManager::MaxLevelEnergy() const
return fLevelEnergy[nTransitions];
}
inline size_t G4LevelManager::NearestLowEdgeLevelIndex(G4double energy) const
inline size_t
G4LevelManager::NearestLowEdgeLevelIndex(const G4double energy) const
{
size_t idx = nTransitions;
if(energy < fLevelEnergy[nTransitions]) {
@@ -167,51 +161,41 @@ inline size_t G4LevelManager::NearestLowEdgeLevelIndex(G4double energy) const
}
inline const G4NucLevel*
G4LevelManager::NearestLevel(G4double energy, size_t index) const
G4LevelManager::NearestLevel(const G4double energy, const size_t index) const
{
return GetLevel(NearestLevelIndex(energy, index));
}
inline G4double
G4LevelManager::NearestLevelEnergy(G4double energy, size_t index) const
G4LevelManager::NearestLevelEnergy(const G4double energy,
const size_t index) const
{
return LevelEnergy(NearestLevelIndex(energy, index));
}
inline G4double G4LevelManager::NearestLowEdgeLevelEnergy(G4double energy) const
inline G4double
G4LevelManager::NearestLowEdgeLevelEnergy(const G4double energy) const
{
return LevelEnergy(NearestLowEdgeLevelIndex(energy));
}
inline G4double G4LevelManager::LifeTime(size_t i) const
inline G4double G4LevelManager::LifeTime(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "LifeTime"); }
#endif
return (fLevels[i]) ? fLevels[i]->GetTimeGamma() : 0.0;
}
inline G4int G4LevelManager::SpinTwo(size_t i) const
inline G4int G4LevelManager::SpinTwo(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "SpinTwo"); }
#endif
return std::abs(fSpin[i]%100000 - 100);
}
inline G4int G4LevelManager::Parity(size_t i) const
inline G4int G4LevelManager::Parity(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "SpinTwo"); }
#endif
return (fSpin[i]%100000 - 100 > 0) ? 1 : -1;
}
inline G4int G4LevelManager::FloatingLevel(size_t i) const
inline G4int G4LevelManager::FloatingLevel(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "Floating"); }
#endif
return fSpin[i]/100000;
}
@@ -220,7 +204,7 @@ inline G4double G4LevelManager::ShellCorrection() const
return fShellCorrection;
}
inline G4double G4LevelManager::LevelDensity(G4double) const
inline G4double G4LevelManager::LevelDensity(const G4double) const
{
return fLevelDensity;
}
@@ -84,17 +84,14 @@ public:
void StreamInfo(std::ostream& os) const;
private:
#ifdef G4VERBOSE
void PrintError(size_t idx, const G4String&) const;
#endif
G4NucLevel(const G4NucLevel &right) = delete;
G4bool operator==(const G4NucLevel &right) const = delete;
G4bool operator!=(const G4NucLevel &right) const = delete;
G4bool operator<(const G4NucLevel &right) const = delete;
const G4NucLevel& operator=(const G4NucLevel &right) = delete;
private:
size_t length;
G4double fTimeGamma;
@@ -110,19 +107,13 @@ inline size_t G4NucLevel::NumberOfTransitions() const
return length;
}
inline size_t G4NucLevel::FinalExcitationIndex(size_t idx) const
inline size_t G4NucLevel::FinalExcitationIndex(const size_t idx) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "FinalExcitationIndex(idx)"); }
#endif
return (size_t)(fTrans[idx]/10000);
}
inline G4int G4NucLevel::TransitionType(size_t idx) const
inline G4int G4NucLevel::TransitionType(const size_t idx) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "TransitionType(idx)"); }
#endif
return fTrans[idx]%10000;
}
@@ -131,33 +122,24 @@ inline G4double G4NucLevel::GetTimeGamma() const
return fTimeGamma;
}
inline G4float G4NucLevel::GammaProbability(size_t idx) const
inline G4float G4NucLevel::GammaProbability(const size_t idx) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "GammaProbability(idx)"); }
#endif
return fGammaProbability[idx];
}
inline G4float G4NucLevel::GammaCumProbability(size_t idx) const
inline G4float G4NucLevel::GammaCumProbability(const size_t idx) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "GammaCumProbability(idx)"); }
#endif
return fGammaCumProbability[idx];
}
inline G4float G4NucLevel::MultipolarityRatio(size_t idx) const
inline G4float G4NucLevel::MultipolarityRatio(const size_t idx) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "MultipolarityRatio(idx)"); }
#endif
return fMpRatio[idx];
}
inline size_t G4NucLevel::SampleGammaTransition(G4double rndm) const
inline size_t G4NucLevel::SampleGammaTransition(const G4double rndm) const
{
G4float x = (G4float)rndm;
G4float x = rndm;
size_t idx = 0;
for(; idx<length; ++idx) {
if(x <= fGammaCumProbability[idx]) { break; }
@@ -165,16 +147,14 @@ inline size_t G4NucLevel::SampleGammaTransition(G4double rndm) const
return idx;
}
inline G4int G4NucLevel::SampleShell(size_t idx, G4double rndm) const
inline G4int
G4NucLevel::SampleShell(const size_t idx, const G4double rndm) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "SampleShell(idx,rndm)"); }
#endif
const std::vector<G4float>* prob = fShellProbability[idx];
G4int i(-1);
if(prob) {
if(nullptr != prob) {
G4int nn = prob->size();
G4float x = (G4float)rndm;
G4float x = rndm;
for(i=0; i<nn; ++i) { if(x <= (*prob)[i]) { break; } }
}
return i;
@@ -183,9 +163,6 @@ inline G4int G4NucLevel::SampleShell(size_t idx, G4double rndm) const
inline const std::vector<G4float>*
G4NucLevel::ShellProbabilty(size_t idx) const
{
#ifdef G4VERBOSE
if(idx >= length) { PrintError(idx, "ShellProbability(idx)"); }
#endif
return fShellProbability[idx];
}
@@ -47,7 +47,6 @@
#include "globals.hh"
#include "G4DeexPrecoParameters.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
@@ -131,10 +130,6 @@ private:
std::vector<const G4LevelManager*> fLevelManagers[ZMAX];
std::vector<G4bool> fLevelManagerFlags[ZMAX];
#ifdef G4MULTITHREADED
static G4Mutex nuclearLevelDataMutex;
#endif
};
#endif
@@ -39,7 +39,6 @@
#include "globals.hh"
#include "G4Fragment.hh"
#include <vector>
class G4NuclearLevelData;
class G4Pow;
@@ -49,7 +48,8 @@ class G4VEmissionProbability
public:
explicit G4VEmissionProbability(G4int Z, G4int A);
virtual ~G4VEmissionProbability();
virtual ~G4VEmissionProbability() = default;
void Initialise();
@@ -65,7 +65,7 @@ public:
// Z, A, rmass are residual parameters
// fmass is SCM mass of decaying nucleus
// exc is an excitation of emitted fragment
inline void SetDecayKinematics(G4int Z, G4int A, G4double rmass,
inline void SetDecayKinematics(G4int rZ, G4int rA, G4double rmass,
G4double fmass);
inline G4double GetRecoilExcitation() const { return fExcRes; };
@@ -80,59 +80,61 @@ public:
// for given initial fragment and decay channel
G4double SampleEnergy();
G4VEmissionProbability(const G4VEmissionProbability &right) = delete;
const G4VEmissionProbability & operator=
(const G4VEmissionProbability &right) = delete;
G4bool operator==(const G4VEmissionProbability &right) const = delete;
G4bool operator!=(const G4VEmissionProbability &right) const = delete;
protected:
void ResetIntegrator(size_t nbin, G4double de, G4double eps);
G4double IntegrateProbability(G4double elow, G4double ehigh, G4double CB);
G4NuclearLevelData* pNuclearLevelData;
G4Pow* pG4pow;
G4int OPTxs;
G4int pVerbose;
G4int theZ;
G4int theA;
G4int resZ;
G4int resA;
G4int resZ = 0;
G4int resA = 0;
G4double pMass; // initial fragment
G4double pEvapMass;
G4double pResMass;
G4double pProbability;
G4NuclearLevelData* pNuclearLevelData;
G4Pow* pG4pow;
G4double pMass = 0.0; // initial fragment
G4double pEvapMass = 0.0;
G4double pResMass = 0.0;
G4double pProbability = 0.0;
G4double pTolerance = 0.0;
private:
G4double FindRecoilExcitation(G4double e);
G4double FindRecoilExcitation(const G4double e);
G4VEmissionProbability(const G4VEmissionProbability &right);
const G4VEmissionProbability & operator=
(const G4VEmissionProbability &right);
G4bool operator==(const G4VEmissionProbability &right) const;
G4bool operator!=(const G4VEmissionProbability &right) const;
G4double fExc = 0.0;
G4double fExcRes = 0.0;
size_t length;
size_t nbin;
G4double fE1 = 0.0;
G4double fE2 = 0.0;
G4double fP2 = 0.0;
G4double fExc;
G4double fExcRes;
G4double emin;
G4double emax;
G4double emin = 0.0;
G4double emax = 0.0;
G4double eCoulomb = 0.0;
G4double accuracy = 0.005;
G4double probmax = 0.0;
G4double elimit;
G4double eCoulomb;
G4double accuracy;
G4double probmax;
G4bool fFD;
G4bool fFD = false;
};
inline void
G4VEmissionProbability::SetDecayKinematics(G4int Z, G4int A, G4double rmass,
G4VEmissionProbability::SetDecayKinematics(G4int rZ, G4int rA, G4double rmass,
G4double fmass)
{
resZ = Z;
resA = A;
resZ = rZ;
resA = rA;
pMass = fmass;
pResMass = rmass;
}
@@ -51,7 +51,7 @@ class G4VEvaporationChannel
public:
explicit G4VEvaporationChannel(const G4String & aName = "");
virtual ~G4VEvaporationChannel();
virtual ~G4VEvaporationChannel() = default;
virtual G4double GetEmissionProbability(G4Fragment* theNucleus) = 0;
@@ -75,6 +75,12 @@ public:
// but not included in this vector
inline G4FragmentVector* BreakUpFragment(G4Fragment* theNucleus);
// methods for unit tests
virtual G4double ComputeInverseXSection(G4Fragment* theNucleus,
G4double kinEnergy);
virtual G4double ComputeProbability(G4Fragment* theNucleus,
G4double kinEnergy);
virtual void Dump() const;
// enable internal conversion
@@ -88,18 +94,16 @@ public:
// for superimposed Coulomb Barrier for inverse cross sections
inline void UseSICB(G4bool use);
G4VEvaporationChannel(const G4VEvaporationChannel & right) = delete;
const G4VEvaporationChannel & operator=
(const G4VEvaporationChannel & right) = delete;
G4bool operator==(const G4VEvaporationChannel & right) const = delete;
G4bool operator!=(const G4VEvaporationChannel & right) const = delete;
protected:
G4int OPTxs;
G4bool useSICB;
private:
G4VEvaporationChannel(const G4VEvaporationChannel & right);
const G4VEvaporationChannel & operator=
(const G4VEvaporationChannel & right);
G4bool operator==(const G4VEvaporationChannel & right) const;
G4bool operator!=(const G4VEvaporationChannel & right) const;
};
inline G4FragmentVector*
@@ -33,6 +33,7 @@
#include "G4ApplicationState.hh"
#include "G4StateManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4UnitsTable.hh"
#include "G4PhysicsModelCatalog.hh"
#include "G4DeexParametersMessenger.hh"
#include "G4HadronicParameters.hh"
@@ -87,7 +88,7 @@ void G4DeexPrecoParameters::SetDefaults()
fStoreAllLevels = false;
fInternalConversion = true;
fLD = true;
fFD = false;
fFD = true;
fIsomerFlag = true;
fDeexChannelType = fCombined;
#ifdef G4MULTITHREADED
@@ -299,31 +300,31 @@ std::ostream& G4DeexPrecoParameters::StreamInfo(std::ostream& os) const
os << "=======================================================================" << "\n";
os << "Type of pre-compound inverse x-section " << fPrecoType << "\n";
os << "Pre-compound model active " << (!fPrecoDummy) << "\n";
os << "Pre-compound excitation low energy (MeV) "
<< fPrecoLowEnergy/CLHEP::MeV << "\n";
os << "Pre-compound excitation high energy (MeV) "
<< fPrecoHighEnergy/CLHEP::MeV << "\n";
os << "Pre-compound excitation low energy "
<< G4BestUnit(fPrecoLowEnergy, "Energy") << "\n";
os << "Pre-compound excitation high energy "
<< G4BestUnit(fPrecoHighEnergy, "Energy") << "\n";
os << "Type of de-excitation inverse x-section " << fDeexType << "\n";
os << "Type of de-excitation factory " << namm[idx] << "\n";
os << "Number of de-excitation channels " << nmm[idx] << "\n";
os << "Min excitation energy (keV) "
<< fMinExcitation/CLHEP::keV << "\n";
os << "Min energy per nucleon for multifragmentation (MeV) "
<< fMinExPerNucleounForMF/CLHEP::MeV << "\n";
os << "Limit excitation energy for Fermi BreakUp (MeV) "
<< fFBUEnergyLimit/CLHEP::MeV << "\n";
os << "Min excitation energy "
<< G4BestUnit(fMinExcitation, "Energy") << "\n";
os << "Min energy per nucleon for multifragmentation "
<< G4BestUnit(fMinExPerNucleounForMF, "Energy") << "\n";
os << "Limit excitation energy for Fermi BreakUp "
<< G4BestUnit(fFBUEnergyLimit, "Energy") << "\n";
os << "Level density (1/MeV) "
<< fLevelDensity*CLHEP::MeV << "\n";
os << "Use simple level density model " << fLD << "\n";
os << "Use discrete excitation energy of the residual " << fFD << "\n";
os << "Time limit for long lived isomeres (ns) "
<< fMaxLifeTime/CLHEP::ns << "\n";
os << "Time limit for long lived isomeres "
<< G4BestUnit(fMaxLifeTime, "Time") << "\n";
os << "Isomer production flag " << fIsomerFlag << "\n";
os << "Internal e- conversion flag "
<< fInternalConversion << "\n";
os << "Store e- internal conversion data " << fStoreAllLevels << "\n";
os << "Correlated gamma emission flag " << fCorrelatedGamma << "\n";
os << "Max 2J for sampling of angular correlations " << fTwoJMAX << "\n";
os << "Max 2J for sampling of angular correlations " << fTwoJMAX << "\n";
os << "=======================================================================" << G4endl;
os.precision(prec);
return os;
@@ -45,6 +45,7 @@
#include "G4HadronicException.hh"
#include "G4Pow.hh"
#include <iomanip>
#include <CLHEP/Units/SystemOfUnits.h>
G4String G4LevelManager::fFloatingLevels[] = {
"-", "+X", "+Y", "+Z", "+U", "+V", "+W", "+R", "+S", "+T", "+A", "+B", "+C"};
@@ -68,21 +69,25 @@ G4LevelManager::G4LevelManager(G4int Z, G4int A, size_t ntrans,
//G4cout << "New G4LevelManager N= " << nTransitions << " "
//<< fLevelEnergy.size() << " <" << this << ">" << G4endl;
}
auto ndata = G4NuclearLevelData::GetInstance();
fLevelDensity = ndata->GetLevelDensity(Z, A, 0.0);
// J. Nucl. Sci. Tech. 31(2): 151-162 (1994)
fShellCorrection = G4NuclearLevelData::GetInstance()->
GetShellCorrection()->GetShellCorrection(A,Z);
G4int N = A - Z;
G4int In = N - (N/2)*2;
G4int Iz = Z - (Z/2)*2;
G4double a13 = 1.0/G4Pow::GetInstance()->Z13(A);
if(In == 0 && Iz == 0) {
fLevelDensity = 0.067946*A*(1.0 + 4.1277*a13);
} else if(In == 0 && Iz == 1) {
fLevelDensity = 0.053061*A*(1.0 + 7.1862*a13);
} else if(In == 1 && Iz == 0) {
fLevelDensity = 0.060920*A*(1.0 + 3.8767*a13);
} else {
fLevelDensity = 0.065291*A*(1.0 + 4.4505*a13);
fShellCorrection = ndata->GetShellCorrection()->GetShellCorrection(A,Z);
if(A > 20) {
G4int N = A - Z;
G4int In = N - (N/2)*2;
G4int Iz = Z - (Z/2)*2;
G4double a13 = 1.0/G4Pow::GetInstance()->Z13(A);
if(In == 0 && Iz == 0) {
fLevelDensity = 0.067946*A*(1.0 + 4.1277*a13);
} else if(In == 0 && Iz == 1) {
fLevelDensity = 0.053061*A*(1.0 + 7.1862*a13);
} else if(In == 1 && Iz == 0) {
fLevelDensity = 0.060920*A*(1.0 + 3.8767*a13);
} else {
fLevelDensity = 0.065291*A*(1.0 + 4.4505*a13);
}
}
}
@@ -91,53 +96,26 @@ G4LevelManager::~G4LevelManager()
for(size_t i=0; i<=nTransitions; ++i) { delete fLevels[i]; }
}
size_t
G4LevelManager::NearestLevelIndex(G4double energy, size_t index) const
size_t G4LevelManager::NearestLevelIndex(const G4double energy,
const size_t index) const
{
//G4cout<< "index= " << index << " max= " << nTransitions << " exc= " << ener
// << " Emax= " << fLevelEnergy[nTransitions] << G4endl;
size_t idx = std::min(index, nTransitions);
static const G4double tolerance = 1.0f-6;
static const G4double tolerance = 10*CLHEP::eV;
if(0 == nTransitions || std::abs(energy - fLevelEnergy[idx]) <= tolerance) {
return idx;
}
// ground state
if(energy <= fLevelEnergy[1]*0.5)
{ idx = 0; }
// take top level
else if((fLevelEnergy[nTransitions] + fLevelEnergy[nTransitions-1])*0.5 <= energy)
{ idx = nTransitions; }
idx = NearestLowEdgeLevelIndex(energy);
if(idx < nTransitions &&
(fLevelEnergy[idx] + fLevelEnergy[idx+1])*0.5 <= energy) { ++idx; }
// if shortcuts are not working, make binary search
else {
idx = std::lower_bound(fLevelEnergy.begin(), fLevelEnergy.end(), energy)
- fLevelEnergy.begin() - 1;
if(energy - fLevelEnergy[idx] > fLevelEnergy[idx+1] - energy) { ++idx; }
//G4cout << "E= " << energy << " " << fLevelEnergy[idx-1]
//<< " " << fLevelEnergy[idx] << G4endl;
}
return idx;
}
const G4String& G4LevelManager::FloatingType(size_t i) const
const G4String& G4LevelManager::FloatingType(const size_t i) const
{
#ifdef G4VERBOSE
if(i > nTransitions) { PrintError(i, "FloatingType(idx)"); }
#endif
return fFloatingLevels[fSpin[i]/100000];
}
#ifdef G4VERBOSE
void G4LevelManager::PrintError(size_t idx, const G4String& ss) const
{
G4String sss = "G4LevelManager::"+ss+"()";
G4ExceptionDescription ed;
ed << "Index of a level " << idx << " >= "
<< nTransitions+1 << " (Nlevels) ";
G4Exception(sss,"had061",JustWarning,ed,"");
}
#endif
void G4LevelManager::StreamInfo(std::ostream& out) const
{
for(size_t i=0; i<=nTransitions; ++i) {
@@ -58,7 +58,7 @@ G4LevelReader::G4LevelReader(G4NuclearLevelData* ptr)
fAlphaMax = (G4float)1.e15;
fParam = fData->GetParameters();
fTimeFactor = CLHEP::second/G4Pow::GetInstance()->logZ(2);
char* directory = std::getenv("G4LEVELGAMMADATA");
const char* directory = G4FindDataDir("G4LEVELGAMMADATA");
if(directory) {
fDirectory = directory;
} else {
@@ -319,7 +319,8 @@ G4LevelReader::LevelManager(G4int Z, G4int A, G4int nlev,
vEnergy[i] = ener;
if(fTime > 0.0f) { fTime *= fTimeFactor; }
if(fSpin > 48.0f) { fSpin = 0.0f; }
vSpin[i] = (G4int)(100 + fSpin + fSpin) + k*100000;
G4int twos = G4lrint(2*fSpin);
vSpin[i] = 100 + twos + k*100000;
if(fVerbose > 2) {
G4cout << " Level #" << i1 << " E(MeV)= " << ener/CLHEP::MeV
<< " LTime(s)= " << fTime << " 2S= " << vSpin[i]
@@ -74,25 +74,6 @@ G4NucLevel::~G4NucLevel()
}
}
#ifdef G4VERBOSE
void G4NucLevel::PrintError(size_t idx, const G4String& ss) const
{
G4cout << "G4NucLevel::PrintError: length= " << length << G4endl;
for(size_t i=0; i<length; ++i) {
G4cout << i << ". " /*<< fFinalIndex[i] << " "*/ << fTrans[i]
<< fGammaCumProbability[i] << " " << fTimeGamma << " "
<< fGammaProbability[i] << " "
<< fMpRatio[i] << G4endl;
}
G4String sss = "G4NucLevel::"+ss+"()";
G4ExceptionDescription ed;
ed << "Index of a level " << idx << " >= "
<< length << " (number of transitions)";
G4Exception(sss,"had061",JustWarning,ed,"");
throw G4HadronicException(__FILE__, __LINE__,"FATAL Hadronic Exception");
}
#endif
void G4NucLevel::StreamInfo(std::ostream& out) const
{
G4int prec = out.precision(4);
@@ -47,6 +47,7 @@
#include "G4PairingCorrection.hh"
#include "G4ShellCorrection.hh"
#include "G4SystemOfUnits.hh"
#include "G4AutoLock.hh"
#include "G4Pow.hh"
#include <iomanip>
@@ -414,23 +415,20 @@ static const G4float LEVELMAX[3188] = {0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, //3171-3180
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
#ifdef G4MULTITHREADED
G4Mutex G4NuclearLevelData::nuclearLevelDataMutex = G4MUTEX_INITIALIZER;
#endif
namespace
{
G4Mutex nuclearLevelDataMutex = G4MUTEX_INITIALIZER;
}
G4NuclearLevelData* G4NuclearLevelData::GetInstance()
{
if (!theInstance) {
#ifdef G4MULTITHREADED
G4MUTEXLOCK(&nuclearLevelDataMutex);
if (!theInstance) {
#endif
if (nullptr == theInstance) {
G4AutoLock l(&nuclearLevelDataMutex);
if (nullptr == theInstance) {
static G4NuclearLevelData theData;
theInstance = &theData;
#ifdef G4MULTITHREADED
}
G4MUTEXUNLOCK(&nuclearLevelDataMutex);
#endif
l.unlock();
}
return theInstance;
}
@@ -469,16 +467,12 @@ G4NuclearLevelData::GetLevelManager(G4int Z, G4int A)
if(Z < 1 || Z >= ZMAX || A < AMIN[Z] || A > AMAX[Z]) { return nullptr; }
const G4int idx = A - AMIN[Z];
if( !(fLevelManagerFlags[Z])[idx] ) {
#ifdef G4MULTITHREADED
G4MUTEXLOCK(&nuclearLevelDataMutex);
G4AutoLock l(&nuclearLevelDataMutex);
if( !(fLevelManagerFlags[Z])[idx] ) {
#endif
(fLevelManagers[Z])[idx] = fLevelReader->CreateLevelManager(Z, A);
(fLevelManagerFlags[Z])[idx] = true;
#ifdef G4MULTITHREADED
}
G4MUTEXUNLOCK(&nuclearLevelDataMutex);
#endif
l.unlock();
}
return (fLevelManagers[Z])[idx];
}
@@ -488,9 +482,7 @@ G4NuclearLevelData::AddPrivateData(G4int Z, G4int A, const G4String& filename)
{
G4bool res = false;
if(Z > 0 && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) {
#ifdef G4MULTITHREADED
G4MUTEXLOCK(&nuclearLevelDataMutex);
#endif
G4AutoLock l(&nuclearLevelDataMutex);
const G4LevelManager* newman =
fLevelReader->MakeLevelManager(Z, A, filename);
if(newman) {
@@ -503,9 +495,7 @@ G4NuclearLevelData::AddPrivateData(G4int Z, G4int A, const G4String& filename)
(fLevelManagers[Z])[idx] = newman;
(fLevelManagerFlags[Z])[idx] = true;
}
#ifdef G4MULTITHREADED
G4MUTEXUNLOCK(&nuclearLevelDataMutex);
#endif
l.unlock();
} else {
G4ExceptionDescription ed;
ed << "private nuclear level data for Z= " << Z << " A= " << A
@@ -529,9 +519,7 @@ G4int G4NuclearLevelData::GetMaxA(G4int Z) const
void G4NuclearLevelData::UploadNuclearLevelData(G4int ZZ)
{
if(fInitialized) return;
#ifdef G4MULTITHREADED
G4MUTEXLOCK(&nuclearLevelDataMutex);
#endif
G4AutoLock l(&nuclearLevelDataMutex);
if(!fInitialized) {
fInitialized = true;
G4int mZ = ZZ;
@@ -546,9 +534,7 @@ void G4NuclearLevelData::UploadNuclearLevelData(G4int ZZ)
}
}
}
#ifdef G4MULTITHREADED
G4MUTEXUNLOCK(&nuclearLevelDataMutex);
#endif
l.unlock();
}
G4double G4NuclearLevelData::GetMaxLevelEnergy(G4int Z, G4int A) const
@@ -35,35 +35,28 @@
#include "G4DeexPrecoParameters.hh"
#include "Randomize.hh"
#include "G4Pow.hh"
#include "G4Log.hh"
#include "G4Exp.hh"
G4VEmissionProbability::G4VEmissionProbability(G4int Z, G4int A)
: OPTxs(3),pVerbose(1),theZ(Z),theA(A),resZ(0),resA(0),
pMass(0.0),pEvapMass(0.0),pResMass(0.0),fExc(0.0),fExcRes(0.0),
elimit(CLHEP::MeV),accuracy(0.02),fFD(false)
: OPTxs(3), pVerbose(1), theZ(Z), theA(A), elimit(CLHEP::MeV)
{
pNuclearLevelData = G4NuclearLevelData::GetInstance();
pG4pow = G4Pow::GetInstance();
if(A > 0) { pEvapMass = G4NucleiProperties::GetNuclearMass(theA, theZ); }
// G4cout << "G4VEvaporationProbability: Z= " << theZ << " A= " << theA
// << " M(GeV)= " << pEvapMass/1000. << G4endl;
length = nbin = 0;
emin = emax = eCoulomb = pProbability = probmax = 0.0;
}
G4VEmissionProbability::~G4VEmissionProbability()
{}
void G4VEmissionProbability::Initialise()
{
G4DeexPrecoParameters* param = pNuclearLevelData->GetParameters();
OPTxs = param->GetDeexModelType();
pVerbose = param->GetVerbose();
fFD = param->GetDiscreteExcitationFlag();
pTolerance = param->GetMinExcitation();
}
void G4VEmissionProbability::ResetIntegrator(size_t nbins, G4double de, G4double eps)
void G4VEmissionProbability::ResetIntegrator(size_t, G4double de, G4double eps)
{
if(nbins > 0) { length = nbins; }
if(de > 0.0) { elimit = de; }
if(eps > 0.0) { accuracy = eps; }
}
@@ -89,42 +82,48 @@ G4double G4VEmissionProbability::IntegrateProbability(G4double elow,
emax = ehigh;
eCoulomb = cb;
G4double edelta = elimit;
nbin = (size_t)((emax - emin)/edelta) + 1;
const G4double edeltamin = 0.2*CLHEP::MeV;
const G4double edeltamax = 2*CLHEP::MeV;
if(nbin < 4) {
nbin = 4;
edelta = (emax - emin)/(G4double)nbin;
} else if(nbin > length) {
nbin = length;
}
G4double edelta = std::max(std::min(elimit, edeltamax), edeltamin);
G4double xbin = (emax - emin)/edelta + 1.0;
G4int ibin = xbin;
if(ibin < 4) ibin = 4;
G4double x(emin), del, y;
G4double edelmicro= edelta*0.02;
// providing smart binning
G4int nbin = ibin*5;
edelta = (emax - emin)/ibin;
G4double x(emin), y(0.0);
G4double edelmicro = edelta*0.02;
probmax = ComputeProbability(x + edelmicro, eCoulomb);
G4double problast = probmax;
if(pVerbose > 2) {
G4cout << "### G4VEmissionProbability::IntegrateProbability: "
<< " Emax= " << emax << " QB= " << cb << " nbin= " << nbin
if(pVerbose > 1) {
G4cout << "### G4VEmissionProbability::IntegrateProbability: "
<< "probmax=" << probmax << " Emin=" << emin
<< " Emax=" << emax << " QB=" << cb << " nbin=" << nbin
<< G4endl;
G4cout << " 0. E= " << emin << " prob= " << probmax << G4endl;
}
for(size_t i=1; i<=nbin; ++i) {
fE1 = fE2 = fP2 = 0.0;
G4double emax0 = emax - edelmicro;
G4bool endpoint = false;
for(G4int i=0; i<nbin; ++i) {
x += edelta;
if(x > emax) {
edelta += (emax - x);
x = emax;
if(x >= emax0) {
x = emax0;
endpoint = true;
}
G4bool endpoint = (std::abs(x - emax) < edelmicro) ? true : false;
G4double xx = endpoint ? x - edelmicro : x;
y = ComputeProbability(xx, eCoulomb);
y = ComputeProbability(x, eCoulomb);
if(pVerbose > 2) {
G4cout << " " << i << ". E= " << x << " prob= " << y
G4cout << " " << i << ". E= " << x << " prob= " << y
<< " Edel= " << edelta << G4endl;
}
probmax = std::max(probmax, y);
del = (y + problast)*edelta*0.5;
if(y >= probmax) {
probmax = y;
} else if(0.0 == fE1 && 2*y < probmax) {
fE1 = x;
}
G4double del = (y + problast)*edelta*0.5;
pProbability += del;
// end of the loop
if(del < accuracy*pProbability || endpoint) { break; }
@@ -138,10 +137,15 @@ G4double G4VEmissionProbability::IntegrateProbability(G4double elow,
edelta *= 1.5;
}
}
if(fE1 > emin && fE1 < emax) {
fE2 = std::max(0.5*(fE1 + emax), emax - edelta);
fP2 = 2*ComputeProbability(fE2, eCoulomb);
}
if(pVerbose > 1) {
G4cout << " Probability= " << pProbability << " probmax= "
<< probmax << G4endl;
<< probmax << " emin=" << emin << " emax=" << emax
<< " E1=" << fE1 << " E2=" << fE2 << G4endl;
}
return pProbability;
}
@@ -149,94 +153,121 @@ G4double G4VEmissionProbability::IntegrateProbability(G4double elow,
G4double G4VEmissionProbability::SampleEnergy()
{
static const G4double fact = 1.05;
static const G4double alim = 0.05;
static const G4double blim = 20.;
probmax *= fact;
// two regions with flat and exponential majorant
G4double del = emax - emin;
G4double p1 = 1.0;
G4double p2 = 0.0;
G4double a0 = 0.0;
G4double a1 = 1.0;
G4double x;
if(fE1 > 0.0 && fP2 > 0.0 && fP2 < 0.5*probmax) {
a0 = G4Log(probmax/fP2)/(fE2 - fE1);
del= fE1 - emin;
p1 = del;
x = a0*(emax - fE1);
if(x < blim) {
a1 = (x > alim) ? 1.0 - G4Exp(-x) : x*(1.0 - 0.5*x);
}
p2 = a1/a0;
p1 /= (p1 + p2);
p2 = 1.0 - p1;
}
if(pVerbose > 1) {
G4cout << "### G4VEmissionProbability::SampleEnergy: "
<< " Emin= " << emin << " Emax= " << emax
<< " probmax= " << probmax << G4endl;
<< "/n E1=" << fE1 << " p1=" << p1
<< " probmax=" << probmax << " P2=" << fP2 << G4endl;
}
CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
const G4int nmax = 100;
G4double del = emax - emin;
G4double ekin, g;
const G4int nmax = 1000;
G4double ekin, g, gmax;
G4int n = 0;
do {
ekin = del*rndm->flat() + emin;
++n;
G4double q = rndm->flat();
if(q <= p1) {
gmax = probmax;
ekin = del*q/p1 + emin;
} else {
ekin = fE1 - G4Log(1.0 - (q - p1)*a1/p2)/a0;
x = a0*(ekin - fE1);
gmax = fP2;
if(x < blim) {
gmax = probmax*((x > alim) ? G4Exp(-x) : 1.0 - x*(1.0 - 0.5*x));
}
}
g = ComputeProbability(ekin, eCoulomb);
if(pVerbose > 2) {
G4cout << " " << n
<< ". prob= " << g << " probmax= " << probmax
<< " Ekin= " << ekin << G4endl;
}
if((g > probmax || n > nmax) && pVerbose > 1) {
if((g > gmax || n > nmax) && pVerbose > 1) {
G4cout << "### G4VEmissionProbability::SampleEnergy for Z= " << theZ
<< " A= " << theA
<< " A= " << theA << " Eex(MeV)=" << fExc << " p1=" << p1
<< "\n Warning n= " << n
<< " prob/probmax= " << g/probmax
<< " prob= " << g << " probmax= " << probmax
<< " prob/gmax=" << g/gmax
<< " prob=" << g << " gmax=" << gmax << " probmax=" << probmax
<< "\n Ekin= " << ekin << " Emin= " << emin
<< " Emax= " << emax << G4endl;
}
} while(probmax*rndm->flat() > g && n < nmax);
return (fFD) ? FindRecoilExcitation(ekin) : ekin;
} while(gmax*rndm->flat() > g && n < nmax);
G4double enew = FindRecoilExcitation(ekin);
if(pVerbose > 1) {
G4cout << "### SampleEnergy: Efinal= "
<< enew << " E=" << ekin << " Eexc=" << fExcRes << G4endl;
}
return enew;
}
G4double G4VEmissionProbability::FindRecoilExcitation(G4double e)
G4double G4VEmissionProbability::FindRecoilExcitation(const G4double e)
{
fExcRes = 0.0;
G4double mass = pEvapMass + fExc;
// abnormal case - should never happens
if(pMass < mass + pResMass) { return 0.0; }
G4double m02 = pMass*pMass;
G4double m12 = mass*mass;
G4double m22 = pResMass*pResMass;
G4double mres = std::sqrt(m02 + m12 - 2.*pMass*(mass + e));
G4double m02 = pMass*pMass;
G4double m12 = mass*mass;
G4double m22 = pResMass*pResMass;
G4double mres = std::sqrt(m02 + m12 - 2.*pMass*(mass + e));
fExcRes = mres - pResMass;
const G4double tolerance = 0.1*CLHEP::keV;
if(pVerbose > 1) {
G4cout << "### G4VEmissionProbability::FindRecoilExcitation for resZ= "
G4cout << "### FindRecoilExcitation for resZ= "
<< resZ << " resA= " << resA
<< " evaporated Z= " << theZ << " A= " << theA
<< " Ekin= " << e << " Eexc= " << fExcRes << G4endl;
}
// residual nucleus is in the ground state
if(fExcRes < tolerance) {
if(fExcRes < pTolerance) {
fExcRes = 0.0;
//G4cout<<"Ground state Ekin= "<< 0.5*(m02 + m12 - m22)/pMass - mass<<G4endl;
return std::max(0.5*(m02 + m12 - m22)/pMass - mass,0.0);
return std::max(0.5*(m02 + m12 - m22)/pMass - mass, 0.0);
}
if(!fFD) { return e; }
// select final state excitation
auto lManager = pNuclearLevelData->GetLevelManager(resZ, resA);
if(!lManager) { return e; }
if(nullptr == lManager) { return e; }
//G4cout<<"ExcMax= "<< lManager->MaxLevelEnergy()<<" CB= "<<eCoulomb<<G4endl;
// levels are not known
if(fExcRes > lManager->MaxLevelEnergy() + tolerance) { return e; }
if(fExcRes > lManager->MaxLevelEnergy() + pTolerance) { return e; }
// find level
auto idx = lManager->NearestLevelIndex(fExcRes);
//G4cout << "idx= " << idx << " Exc= " << fExcRes
// << " Elevel= " << lManager->LevelEnergy(idx) << G4endl;
for(; idx > 0; --idx) {
fExcRes = lManager->LevelEnergy(idx);
// excited level
if(pMass > mass + pResMass + fExcRes && lManager->FloatingLevel(idx) == 0) {
G4double massR = pResMass + fExcRes;
G4double mr2 = massR*massR;
//G4cout << "Result idx= " << idx << " Eexc= " << fExcRes
// << " Ekin= " << 0.5*(m02 + m12 - mr2)/pMass - mass << G4endl;
return std::max(0.5*(m02 + m12 - mr2)/pMass - mass,0.0);
}
G4double elevel = lManager->NearestLevelEnergy(fExcRes);
// excited level
if(pMass > mass + pResMass + elevel &&
std::abs(elevel - fExcRes) <= pTolerance) {
G4double massR = pResMass + elevel;
G4double mr2 = massR*massR;
fExcRes = elevel;
return std::max(0.5*(m02 + m12 - mr2)/pMass - mass, 0.0);
}
// ground level
fExcRes = 0.0;
//G4cout << "Ground state Ekin= " << 0.5*(m02 + m12 - m22)/pMass - mass << G4endl;
return std::max(0.5*(m02 + m12 - m22)/pMass - mass,0.0);
return e;
}
@@ -37,11 +37,6 @@
G4VEvaporationChannel::G4VEvaporationChannel(const G4String &)
:OPTxs(3),useSICB(true)
{
//G4cout << "New G4VEvaporationChannel " << this << G4endl;
}
G4VEvaporationChannel::~G4VEvaporationChannel()
{}
void G4VEvaporationChannel::Initialise()
@@ -52,6 +47,16 @@ G4double G4VEvaporationChannel::GetLifeTime(G4Fragment*)
return 0.0;
}
G4double G4VEvaporationChannel::ComputeInverseXSection(G4Fragment*, G4double)
{
return 0.0;
}
G4double G4VEvaporationChannel::ComputeProbability(G4Fragment*, G4double)
{
return 0.0;
}
void G4VEvaporationChannel::SetICM(G4bool)
{}
@@ -66,33 +66,39 @@ public:
explicit G4PhotonEvaporation(G4GammaTransition* ptr=nullptr);
virtual ~G4PhotonEvaporation();
~G4PhotonEvaporation() override;
virtual void Initialise() final;
void Initialise() override;
// one photon or e- emission
virtual G4Fragment* EmittedFragment(G4Fragment* theNucleus) final;
G4Fragment* EmittedFragment(G4Fragment* theNucleus) override;
// returns "false", emitted gamma and e- are added to the results
virtual G4bool
BreakUpChain(G4FragmentVector* theResult, G4Fragment* theNucleus) final;
G4bool
BreakUpChain(G4FragmentVector* theResult, G4Fragment* theNucleus) override;
// emitted gamma, e-, and residual fragment are added to the results
G4FragmentVector* BreakItUp(const G4Fragment& theNucleus);
// compute emission probability for both continum and discrete cases
// must be called before any method above
virtual G4double GetEmissionProbability(G4Fragment* theNucleus) final;
G4double GetEmissionProbability(G4Fragment* theNucleus) override;
virtual G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy) final;
// methods for unit tests
G4double ComputeInverseXSection(G4Fragment* theNucleus,
G4double kinEnergy) override;
G4double ComputeProbability(G4Fragment* theNucleus,
G4double kinEnergy) override;
virtual G4double GetUpperLevelEnergy(G4int Z, G4int A) final;
G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy);
G4double GetUpperLevelEnergy(G4int Z, G4int A);
void SetGammaTransition(G4GammaTransition*);
virtual void SetICM(G4bool);
void SetICM(G4bool) override;
virtual void RDMForced (G4bool);
void RDMForced (G4bool) override;
inline void SetVerboseLevel(G4int verbose);
@@ -139,13 +145,12 @@ private:
G4double fStep;
G4double fMaxLifeTime;
G4double Tolerance;
G4double fTolerance;
G4bool fICM;
G4bool fRDM;
G4bool fSampleTime;
G4bool fCorrelatedGamma;
G4bool fIsomerFlag;
G4bool isInitialised;
#ifdef G4MULTITHREADED
@@ -66,11 +66,11 @@ G4PhotonEvaporation::G4PhotonEvaporation(G4GammaTransition* p)
fVerbose(1), fPoints(0), vShellNumber(-1), fIndex(0), fSecID(-1),
fMaxLifeTime(DBL_MAX),
fICM(true), fRDM(false), fSampleTime(true),
fCorrelatedGamma(false), fIsomerFlag(false), isInitialised(false)
fCorrelatedGamma(false), isInitialised(false)
{
//G4cout << "### New G4PhotonEvaporation() " << this << G4endl;
fNuclearLevelData = G4NuclearLevelData::GetInstance();
Tolerance = 20*CLHEP::eV;
fTolerance = 20*CLHEP::eV;
if(!fTransition) { fTransition = new G4GammaTransition(); }
@@ -93,12 +93,10 @@ void G4PhotonEvaporation::Initialise()
isInitialised = true;
G4DeexPrecoParameters* param = fNuclearLevelData->GetParameters();
Tolerance = param->GetMinExcitation();
fTolerance = param->GetMinExcitation();
fMaxLifeTime = param->GetMaxLifeTime();
fCorrelatedGamma = param->CorrelatedGamma();
fICM = param->GetInternalConversionFlag();
fIsomerFlag = param->IsomerProduction();
if(fRDM) { fIsomerFlag = true; }
fVerbose = param->GetVerbose();
fTransition->SetPolarizationFlag(fCorrelatedGamma);
@@ -131,7 +129,7 @@ G4Fragment*
G4PhotonEvaporation::EmittedFragment(G4Fragment* nucleus)
{
if(!isInitialised) { Initialise(); }
fSampleTime = (fRDM) ? false : true;
fSampleTime = !fRDM;
// potentially external code may set initial polarization
// but only for radioactive decay nuclear polarization is considered
@@ -251,7 +249,7 @@ G4PhotonEvaporation::GetEmissionProbability(G4Fragment* nucleus)
}
// ignore gamma de-excitation for exotic fragments
// and for very low excitations
if(0 >= Z || 1 >= A || Z == A || Tolerance >= fExcEnergy)
if(0 >= Z || 1 >= A || Z == A || fTolerance >= fExcEnergy)
{ return fProbability; }
// ignore gamma de-excitation for highly excited levels
@@ -321,14 +319,26 @@ G4PhotonEvaporation::GetEmissionProbability(G4Fragment* nucleus)
return fProbability;
}
G4double
G4PhotonEvaporation::ComputeInverseXSection(G4Fragment*, G4double)
{
return 0.0;
}
G4double
G4PhotonEvaporation::ComputeProbability(G4Fragment* theNucleus, G4double)
{
return GetEmissionProbability(theNucleus);
}
G4double
G4PhotonEvaporation::GetFinalLevelEnergy(G4int Z, G4int A, G4double energy)
{
G4double E = energy;
InitialiseLevelManager(Z, A);
if(fLevelManager) {
E = fLevelManager->NearestLevelEnergy(energy, fIndex);
if(E > fLevelEnergyMax + Tolerance) { E = energy; }
if(E > fLevelEnergyMax + fTolerance) { E = energy; }
}
return E;
}
@@ -345,9 +355,10 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
if(!isInitialised) { Initialise(); }
G4Fragment* result = nullptr;
G4double eexc = nucleus->GetExcitationEnergy();
if(eexc <= Tolerance) { return result; }
if(eexc <= fTolerance) { return result; }
InitialiseLevelManager(nucleus->GetZ_asInt(), nucleus->GetA_asInt());
nucleus->SetLongLived(false);
G4double time = nucleus->GetCreationTime();
@@ -368,37 +379,39 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
<< " Eexmax= " << fLevelEnergyMax << G4endl;
}
// initial discrete state
if(fLevelManager && eexc <= fLevelEnergyMax + Tolerance) {
fIndex = fLevelManager->NearestLevelIndex(eexc, fIndex);
// initial state below 1st level
if(0 == fIndex && eexc >= Tolerance
&& fLevelManager->NumberOfTransitions() > 0) { fIndex = 1; }
isDiscrete = true;
if(nullptr != fLevelManager && eexc <= fLevelEnergyMax + fTolerance) {
fIndex = fLevelManager->NearestLevelIndex(eexc);
G4double elevel = fLevelManager->LevelEnergy(fIndex);
isDiscrete = (std::abs(elevel - eexc) < fTolerance);
if(fVerbose > 2) {
G4cout << " index= " << fIndex
<< " lTime= " << fLevelManager->LifeTime(fIndex) << G4endl;
}
if(0 < fIndex) {
if(isDiscrete && 0 < fIndex) {
// for discrete transition
level = fLevelManager->GetLevel(fIndex);
if(level) {
ntrans = level->NumberOfTransitions();
JP1 = fLevelManager->SpinTwo(fIndex);
if(nullptr != level) {
if(fVerbose > 2) {
G4cout << " ntrans= " << ntrans << " JP= " << JP1
<< " RDM: " << fRDM << G4endl;
}
if(0 == ntrans && fLevelManager->FloatingLevel(fIndex) > 0) {
--fIndex;
level = fLevelManager->GetLevel(fIndex);
ntrans = level->NumberOfTransitions();
JP1 = fLevelManager->SpinTwo(fIndex);
}
ntrans = level->NumberOfTransitions();
// for floating level check levels with the same energy
if(fLevelManager->FloatingLevel(fIndex) > 0 && 0 == ntrans &&
std::abs(elevel - fLevelManager->LevelEnergy(fIndex-1)) < fTolerance) {
auto newlevel = fLevelManager->GetLevel(fIndex-1);
if(nullptr != newlevel && newlevel->NumberOfTransitions() > 0) {
--fIndex;
level = newlevel;
ntrans = level->NumberOfTransitions();
}
}
JP1 = fLevelManager->SpinTwo(fIndex);
}
}
// if a level has no defined transitions
if(0 == ntrans) { isDiscrete = false; }
}
// if a level has no defined transitions
if(0 == ntrans) { isDiscrete = false; }
if(fVerbose > 2) {
G4int prec = G4cout.precision(4);
G4cout << "GenerateGamma: Z= " << nucleus->GetZ_asInt()
@@ -439,7 +452,7 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
if(fVerbose > 2) {
G4cout << "Continues proposes Efinal= " << efinal << G4endl;
}
if(fLevelManager) {
if(nullptr != fLevelManager) {
if(efinal < fLevelEnergyMax) {
fIndex = fLevelManager->NearestLevelIndex(efinal, fIndex);
efinal = fLevelManager->LevelEnergy(fIndex);
@@ -462,6 +475,12 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
}
//discrete part ground state
} else if(0 == fIndex) {
G4bool isLL = false;
if(nullptr != fLevelManager) {
G4double ltime = fLevelManager->LifeTime(0);
if(ltime < 0.0 || ltime > fMaxLifeTime) { isLL = true; }
}
nucleus->SetLongLived(isLL);
return result;
//discrete part
@@ -478,7 +497,10 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
// stable fragment has life time -1 or above the limit
// if is called from the radioactive decay the life time is not checked
G4double ltime = fLevelManager->LifeTime(fIndex);
if(ltime < 0.0 || (!fRDM && ltime > fMaxLifeTime)) { return result; }
if(ltime < 0.0 || (!fRDM && ltime > fMaxLifeTime)) {
nucleus->SetLongLived(true);
return result;
}
size_t idx = 0;
if(1 < ntrans) {
@@ -488,7 +510,7 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
G4cout << "Ntrans= " << ntrans << " idx= " << idx
<< " ICM= " << fICM << " JP1= " << JP1 << G4endl;
}
G4double prob = (G4double)level->GammaProbability(idx);
G4double prob = level->GammaProbability(idx);
// prob = 0 means that there is only internal conversion
if(fICM && prob < 1.0) {
G4double rndm = G4UniformRand();
@@ -508,28 +530,36 @@ G4PhotonEvaporation::GenerateGamma(G4Fragment* nucleus)
efinal = fLevelManager->LevelEnergy(fIndex);
// time is sampled if decay not prompt and this class called not
// from radioactive decay and isomer production is enabled
if(fSampleTime && fIsomerFlag && ltime > 0.0) {
if(fSampleTime && ltime > 0.0) {
time -= ltime*G4Log(G4UniformRand());
}
nucleus->SetFloatingLevelNumber(fLevelManager->FloatingLevel(fIndex));
}
G4bool isLL = false;
if(nullptr != fLevelManager) {
G4double ltime = fLevelManager->LifeTime(fIndex);
if(ltime < 0.0 || ltime > fMaxLifeTime) { isLL = true; }
}
nucleus->SetLongLived(isLL);
// protection for floating levels
if(std::abs(efinal - eexc) <= Tolerance) { return result; }
if(std::abs(efinal - eexc) <= fTolerance) { return result; }
result = fTransition->SampleTransition(nucleus, efinal, ratio, JP1,
JP2, multiP, vShellNumber,
isDiscrete, isGamma);
if(result) { result->SetCreationTime(time); }
if(nullptr != result) { result->SetCreationTime(time); }
// updated residual nucleus
nucleus->SetCreationTime(time);
nucleus->SetSpin(0.5*JP2);
if(fPolarization) { fPolarization->SetExcitationEnergy(efinal); }
if(nullptr != fPolarization) { fPolarization->SetExcitationEnergy(efinal); }
// ignore the floating levels with zero energy and create ground state
if(efinal == 0.0 && fIndex > 0) {
fIndex = 0;
nucleus->SetFloatingLevelNumber(fLevelManager->FloatingLevel(fIndex));
nucleus->SetFloatingLevelNumber(fLevelManager->FloatingLevel(0));
}
if(fVerbose > 2) {
@@ -41,6 +41,8 @@ public:
G4CameronGilbertShellCorrections();
~G4CameronGilbertShellCorrections() = default;
inline G4bool GetShellCorrection(G4int N, G4int Z, G4double& result) const
{
G4bool res = false;
@@ -54,10 +56,11 @@ public:
enum { ZTableSize = 88, NTableSize = 140, ZTableMin = 11, ZTableMax = 98,
NTableMin = 11, NTableMax = 150 };
private:
G4CameronGilbertShellCorrections(const G4CameronGilbertShellCorrections & right) = delete;
const G4CameronGilbertShellCorrections & operator=(const G4CameronGilbertShellCorrections & right) = delete;
const G4CameronGilbertShellCorrections & operator=
(const G4CameronGilbertShellCorrections & right) = delete;
private:
static G4double ShellZTable[ZTableSize];
static G4double ShellNTable[NTableSize];
@@ -41,6 +41,8 @@ public:
explicit G4CameronShellPlusPairingCorrections();
~G4CameronShellPlusPairingCorrections() = default;
inline G4bool GetPairingCorrection(G4int N, G4int Z, G4double& result) const
{
G4bool res = false;
@@ -53,10 +55,11 @@ public:
enum { TableSize = 200 };
private:
G4CameronShellPlusPairingCorrections(const G4CameronShellPlusPairingCorrections & right) = delete;
const G4CameronShellPlusPairingCorrections & operator=(const G4CameronShellPlusPairingCorrections & right) = delete;
const G4CameronShellPlusPairingCorrections & operator=
(const G4CameronShellPlusPairingCorrections & right) = delete;
private:
static G4double SPZTable[TableSize];
static G4double SPNTable[TableSize];
@@ -34,7 +34,6 @@
#include "globals.hh"
#include "G4VCoulombBarrier.hh"
#include <CLHEP/Units/SystemOfUnits.h>
class G4Pow;
@@ -44,25 +43,23 @@ class G4CoulombBarrier : public G4VCoulombBarrier
public:
explicit G4CoulombBarrier(G4int anA, G4int aZ);
virtual ~G4CoulombBarrier();
~G4CoulombBarrier() override = default;
G4double GetCoulombBarrier(G4int ARes, G4int ZRes, G4double U) const;
G4double GetCoulombBarrier(G4int ARes, G4int ZRes, G4double U) const override;
virtual G4double BarrierPenetrationFactor(G4int Eexc) const;
G4double BarrierPenetrationFactor(G4int aZ) const override;
private:
G4CoulombBarrier(const G4CoulombBarrier & right);
const G4CoulombBarrier & operator=(const G4CoulombBarrier & right);
G4bool operator==(const G4CoulombBarrier & right) const;
G4bool operator!=(const G4CoulombBarrier & right) const;
G4CoulombBarrier(const G4CoulombBarrier & right) = delete;
const G4CoulombBarrier & operator=(const G4CoulombBarrier & right) = delete;
G4bool operator==(const G4CoulombBarrier & right) const = delete;
G4bool operator!=(const G4CoulombBarrier & right) const = delete;
protected:
G4Pow* g4calc;
private:
G4double factor;
G4double factor;
};
#endif
@@ -35,8 +35,9 @@
#define G4PairingCorrection_h 1
#include "globals.hh"
#include "G4CookPairingCorrections.hh"
#include "G4CameronGilbertPairingCorrections.hh"
#include "G4CameronGilbertShellCorrections.hh"
#include "G4CameronShellPlusPairingCorrections.hh"
class G4PairingCorrection
{
@@ -44,16 +45,21 @@ public:
explicit G4PairingCorrection();
~G4PairingCorrection();
~G4PairingCorrection() = default;
G4double GetPairingCorrection(G4int A, G4int Z) const;
G4double GetFissionPairingCorrection(G4int A, G4int Z) const;
G4PairingCorrection(const G4PairingCorrection & right) = delete;
const G4PairingCorrection & operator=
(const G4PairingCorrection & right) = delete;
private:
G4CookPairingCorrections theCookPairingCorrections;
G4CameronGilbertPairingCorrections theCameronGilbertPairingCorrections;
G4CameronGilbertShellCorrections theCameronGilbertShellCorrections;
G4CameronShellPlusPairingCorrections theCorr;
};
#endif
@@ -45,7 +45,7 @@ public:
explicit G4ShellCorrection();
~G4ShellCorrection();
~G4ShellCorrection() = default;
const G4CameronTruranHilfShellCorrections*
GetCameronTruranHilfShellCorrections() const;
@@ -55,6 +55,10 @@ public:
G4double GetShellCorrection(G4int A, G4int Z) const;
G4ShellCorrection(const G4ShellCorrection & right) = delete;
const G4ShellCorrection & operator=
(const G4ShellCorrection & right) = delete;
private:
G4CookShellCorrections theCookShellCorrections;
@@ -38,12 +38,12 @@ class G4VCoulombBarrier
public:
explicit G4VCoulombBarrier(G4int anA, G4int aZ);
virtual ~G4VCoulombBarrier();
virtual ~G4VCoulombBarrier() = default;
virtual G4double GetCoulombBarrier(G4int ARes, G4int ZRes,
G4double U) const = 0;
G4double U = 0.0) const = 0;
virtual G4double BarrierPenetrationFactor(G4int Eexc) const = 0;
virtual G4double BarrierPenetrationFactor(G4int aZ) const = 0;
void SetParameters(G4double rho, G4double r0);
@@ -52,12 +52,12 @@ public:
inline G4double GetRho(void) const { return theRho; }
inline G4double GetR0(void) const { return theR0; }
private:
G4VCoulombBarrier(const G4VCoulombBarrier & right) = delete;
const G4VCoulombBarrier & operator=(const G4VCoulombBarrier & right) = delete;
G4bool operator==(const G4VCoulombBarrier & right) const = delete;
G4bool operator!=(const G4VCoulombBarrier & right) const = delete;
private:
G4int theA;
G4int theZ;
@@ -40,22 +40,27 @@ G4CoulombBarrier::G4CoulombBarrier(G4int A, G4int Z)
: G4VCoulombBarrier(A, Z), g4calc(G4Pow::GetInstance())
{
factor = CLHEP::elm_coupling*Z;
SetParameters(0.4*G4NuclearRadii::RadiusCB(Z, A),1.3*CLHEP::fermi);
SetParameters(0.4*G4NuclearRadii::RadiusCB(Z, A), 1.5*CLHEP::fermi);
}
G4CoulombBarrier::~G4CoulombBarrier()
{}
G4double G4CoulombBarrier::GetCoulombBarrier(
G4int ARes, G4int ZRes, G4double) const
G4int ARes, G4int ZRes, G4double U) const
{
return factor*ZRes/(G4NuclearRadii::RadiusCB(ZRes,ARes) + GetRho());
//return factor*ZRes/((G4NuclearRadii::RadiusCB(ZRes,ARes)
// + GetRho())*(1.0 + std::sqrt(U/(G4double)(2*ARes))));
G4double cb = factor*ZRes/(G4NuclearRadii::RadiusCB(ZRes,ARes) + GetRho());
if(U > 0.0) { cb /= (1.0 + std::sqrt( U/((2*ARes)*CLHEP::MeV) )); }
return cb;
}
G4double G4CoulombBarrier::BarrierPenetrationFactor(G4int aZ) const
{
// Data comes from
// Dostrovsky, Fraenkel and Friedlander
// Physical Review, vol 116, num. 3 1959
//
// const G4int size = 5;
// const G4double Zlist[size] = {10.0, 20.0, 30.0, 50.0, 70.0};
// const G4double Kprot[size] = {0.42, 0.58, 0.68, 0.77, 0.80};
//
G4double res = 1.0;
if(GetZ() == 1) {
res = (aZ >= 70) ? 0.80 :
@@ -33,25 +33,22 @@
#include "G4PairingCorrection.hh"
#include "G4SystemOfUnits.hh"
static const G4double PairingConstant = 12.0*CLHEP::MeV;
const G4double PairingConstant = 12.0*CLHEP::MeV;
G4PairingCorrection::G4PairingCorrection()
{}
G4PairingCorrection::~G4PairingCorrection()
{}
G4double G4PairingCorrection::GetPairingCorrection(G4int A, G4int Z) const
{
G4double pairCorr = 0.0;
G4int N = A - Z;
// if(!theCookPairingCorrections.GetPairingCorrection(N,Z,pairCorr)) {
if(!theCameronGilbertPairingCorrections.GetPairingCorrection(N,Z,pairCorr)) {
pairCorr = ((1 - Z + 2*(Z/2)) + (1 - N + 2*(N/2)))
*PairingConstant/std::sqrt(static_cast<G4double>(A));
}
//theCorr.GetPairingCorrection(N,Z,pairCorr);
return std::max(pairCorr, 0.0);
}
@@ -35,9 +35,6 @@
G4ShellCorrection::G4ShellCorrection()
{}
G4ShellCorrection::~G4ShellCorrection()
{}
const G4CameronTruranHilfShellCorrections*
G4ShellCorrection::GetCameronTruranHilfShellCorrections() const
{
@@ -38,9 +38,6 @@ G4VCoulombBarrier::G4VCoulombBarrier(G4int anA, G4int aZ)
theR0 = 1.5*CLHEP::fermi;
}
G4VCoulombBarrier::~G4VCoulombBarrier()
{}
void G4VCoulombBarrier::SetParameters(G4double rho, G4double r0)
{
theRho = rho;
@@ -1,18 +1,19 @@
-------------------------------------------------------------------
# Category hadr-emd History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for the Electromagnetic Dissociation model
-------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-04-04 Vladimir Ivanchenko (hadr-emd-V11-00-01)
- G4EMDissociation : make consistent with G4Fragment modifications
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
## 2021-12-10 Ben Morgan (hadr-emd-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
04 August 2021 - Alberto Ribon (hadr-emd-V10-07-02)
---------------------------------------------------
@@ -364,8 +364,9 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
}
G4Fragment* theFragment = new
G4Fragment((G4int) typeDaughter->GetBaryonNumber(),
(G4int) typeDaughter->GetPDGCharge(), dynamicDaughter->Get4Momentum(), false);
G4Fragment(typeDaughter->GetBaryonNumber(),
G4lrint(typeDaughter->GetPDGCharge()/CLHEP::eplus),
dynamicDaughter->Get4Momentum());
if (verboseLevel >= 2) {
G4cout <<"Dynamic properties of the prefragment:" <<G4endl;
@@ -1,18 +1,16 @@
-------------------------------------------------------------------
# Category hadr-fission History
==========================================================
Geant4 - an Object-Oriented Toolkit for Phyiscs Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for Lawrence Livermore Laboratory Fission Model
------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2021-12-10 Ben Morgan (hadr-fission-V11-00-00)
- Change to new Markdown History format
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
---
# History entries prior to 11.0
4 August 2021 Alberto Ribon (hadr-fission-V10-07-03)
----------------------------------------------------
@@ -66,11 +66,11 @@ G4FissLib::G4FissLib()
{
SetMinEnergy(0.0);
SetMaxEnergy(20.*MeV);
if(!std::getenv("G4NEUTRONHPDATA")) {
if(!G4FindDataDir("G4NEUTRONHPDATA")) {
G4cout << "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files." << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
}
dirName = std::getenv("G4NEUTRONHPDATA");
dirName = G4FindDataDir("G4NEUTRONHPDATA");
G4String tString = "/Fission/";
dirName = dirName + tString;
numEle = G4Element::GetNumberOfElements();
@@ -1,18 +1,16 @@
-------------------------------------------------------------------
# Category hadr-gammanuc History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for hadronic/models/gamma_nuclear directory
-----------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2021-12-10 Ben Morgan (hadr-gammanuc-V11-00-00)
- Change to new Markdown History format
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
---
# History entries prior to 11.0
4 August 2021 Alberto Ribon (hadr-gammanuc-V10-07-02)
-----------------------------------------------------
@@ -1,18 +1,16 @@
-------------------------------------------------------------------
# Category had-im_r History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for hadronic/models/im_r_matrix
--------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2021-12-10 Ben Morgan (had-im_r-V11-00-00)
- Change to new Markdown History format
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
---
# History entries prior to 11.0
21-May 2021, Vladimir Ivanchenko had-im_r_V10-07-02
- G4XnpElasticLowE, G4XNNElasticLowE, G4XnpTotalLowE - substituted
+27 -19
View File
@@ -1,27 +1,29 @@
-------------------------------------------------------------------
# Category hadr-inclxx History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
---------------------------------------------------------------------
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
History file for the Liege cascade INCL Model
---------------------------------------------
-------------------------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-05-25 Alberto Ribon (hadr-inclxx-V11-00-04)
- G4INCLParticle, G4INCLEventInfo, G4INCLNucleus, G4INCLDeltaDecayChannel,
G4INCLXXInterface : set and propagate the information on parent resonance.
- G4INCLPiNElasticChannel : erase the information on parent resonance in
the case of charge exchange.
- G4INCLPiNToDeltaChannel, G4INCLPiNToOmegaChannel, G4INCLPiNToEtaChannel,
G4INCLPiNToMultiPionsChannel, G4INCLNpiToLKpiChannel, G4INCLNpiToLKChannel,
G4INCLNpiToLK2piChannel, G4INCLNpiToNKKbChannel, G4INCLNpiToSK2piChannel,
G4INCLNpiToSKpiChannel, G4INCLNpiToSKChannel,
G4INCLNpiToMissingStrangenessChannel : erase the information on parent
resonance in inelastic channels (where the nucleon and pion initial-state
objects are re-used for the final state).
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
18 May 2022 - Gabriele Cosmo (hadr-inclxx-V10-07-08)
----------------------------------------------------
## 2022-05-18 Gabriele Cosmo (hadr-inclxx-V11-00-03)
- Fixed misuse of bitwise '|' operator instead of logical in INCL::postCascade()
and in INCL::makeCompoundNucleus().
03 March 2022 - Alberto Ribon (hadr-inclxx-V10-07-07)
-----------------------------------------------------
## 2022-03-03 Alberto Ribon (hadr-inclxx-V11-00-02)
- G4INCLXXInterface : fixed treatment of kaon0, anti_kaon0, kaon0L, and kaon0S.
In current reference physics lists, INCLXX is never used for handling kaons,
although it is capable of doing so, but at process-level or in custom
@@ -29,11 +31,17 @@ code and to keep track of all tags.
neutral kaon projectiles. The change (provided by Jean-Christophe David)
fixes this misbehavior.
09 February 2022 - Gabriele Cosmo
---------------------------------
## 2022-02-09 Gabriele Cosmo (hadr-inclxx-V11-00-01)
- Fixed compilation warnings on Intel compilers for shadowing of variables
and not used variable.
## 2021-12-10 Ben Morgan (hadr-inclxx-V11-00-00)
- Change to new Markdown History format,
---
# History entries prior to 11.0
09 November 2021 - Alberto Ribon (hadr-inclxx-V10-07-06)
-------------------------------------------------------
- G4INCLNuclearPotentialIsospin : improved nuclear potential for
@@ -133,10 +133,12 @@ namespace G4INCL {
theParticle->setHelicity(0.0);
ParticleType pionType;
G4int deltaPDGCode = 0;
switch(theParticle->getType()) {
case DeltaPlusPlus:
theParticle->setType(Proton);
pionType = PiPlus;
deltaPDGCode = 2224;
break;
case DeltaPlus:
if(Random::shoot() < 1.0/3.0) {
@@ -146,6 +148,7 @@ namespace G4INCL {
theParticle->setType(Proton);
pionType = PiZero;
}
deltaPDGCode = 2214;
break;
case DeltaZero:
if(Random::shoot() < 1.0/3.0) {
@@ -155,10 +158,12 @@ namespace G4INCL {
theParticle->setType(Neutron);
pionType = PiZero;
}
deltaPDGCode = 2114;
break;
case DeltaMinus:
theParticle->setType(Neutron);
pionType = PiMinus;
deltaPDGCode = 1114;
break;
default:
INCL_FATAL("Unrecognized delta type; type=" << theParticle->getType() << '\n');
@@ -180,6 +185,14 @@ namespace G4INCL {
theParticle->setMomentum(-pionMomentum);
theParticle->adjustEnergyFromMomentum();
// Set the information about the parent resonance for the two daughters
// (as unique, integer ID, we take the rounded integer of the resonance mass in keV)
G4int parentResonanceID = static_cast<G4int>(round(deltaMass/CLHEP::keV));
pion->setParentResonancePDGCode(deltaPDGCode);
pion->setParentResonanceID(parentResonanceID);
theParticle->setParentResonancePDGCode(deltaPDGCode);
theParticle->setParentResonanceID(parentResonanceID);
fs->addModifiedParticle(theParticle);
fs->addCreatedParticle(pion);
// call loren(q1,q2,q3,b1,b2,b3,wq)
@@ -129,6 +129,12 @@ namespace G4INCL {
}
nucleon->setType(Lambda);
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
ParticleList list;
list.push_back(nucleon);
@@ -91,7 +91,13 @@ namespace G4INCL {
pion->adjustEnergyFromMomentum();
//INCL_DEBUG("NpiToLK " << (pion->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
fs->addModifiedParticle(nucleon);
fs->addModifiedParticle(pion);
@@ -104,7 +104,13 @@ namespace G4INCL {
}
nucleon->setType(Lambda);
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
ParticleList list;
list.push_back(nucleon);
list.push_back(pion);
@@ -110,6 +110,12 @@ namespace G4INCL {
available_iso += nbr_pions*2;
nbr_particle += nbr_pions;
// Erase the parent resonance information of the initial particles
particle1->setParentResonancePDGCode(0);
particle1->setParentResonanceID(0);
particle2->setParentResonancePDGCode(0);
particle2->setParentResonanceID(0);
ParticleList list;
ParticleType PionType = PiZero;
@@ -121,6 +121,12 @@ namespace G4INCL {
nucleon->setType(ParticleTable::getNucleonType(iso));
}
}
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
ParticleList list;
list.push_back(nucleon);
@@ -226,6 +226,12 @@ namespace G4INCL {
pion->setType(PiZero);
}
}
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
ParticleList list;
list.push_back(nucleon);
@@ -122,6 +122,12 @@ namespace G4INCL {
nucleon->adjustEnergyFromMomentum();
pion->adjustEnergyFromMomentum();
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
fs->addModifiedParticle(nucleon);
fs->addModifiedParticle(pion);
@@ -157,6 +157,12 @@ namespace G4INCL {
nucleon->setType(ParticleTable::getSigmaType(iso*2));
}
}
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
ParticleList list;
list.push_back(nucleon);
@@ -1061,6 +1061,8 @@ namespace G4INCL {
eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
eventInfo->origin[eventInfo->nParticles] = -1;
eventInfo->parentResonancePDGCode[eventInfo->nParticles] = (*i)->getParentResonancePDGCode();
eventInfo->parentResonanceID[eventInfo->nParticles] = (*i)->getParentResonanceID();
eventInfo->history.push_back("");
if ((*i)->getType() != Composite) {
ParticleSpecies pt((*i)->getType());
@@ -94,6 +94,9 @@ namespace G4INCL {
nucleon->setMomentum(mom_nucleon);
pion->setMomentum(-mom_nucleon);
ParticleType startingNucleonType = nucleon->getType();
ParticleType startingPionType = pion->getType();
G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
if (iso == 1 || iso == -1) {
rndm=3*Random::shoot();
@@ -116,6 +119,14 @@ namespace G4INCL {
pion->setType(pionType);
}
// Erase the parent resonance information if the nucleon or pion changes type
if ( startingNucleonType != nucleon->getType() || startingPionType != pion->getType() ) {
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
}
fs->addModifiedParticle(nucleon);
fs->addModifiedParticle(pion);
}
@@ -87,6 +87,12 @@ namespace G4INCL {
nucleon->setType(deltaType); // nucleon becomes the delta
nucleon->setEnergy(deltaEnergy); // set the energy of the delta
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
ThreeVector deltaMomentum = nucleon->getMomentum() + pion->getMomentum();
nucleon->setMomentum(deltaMomentum);
@@ -65,7 +65,6 @@ namespace G4INCL {
pion = particle1;
}
G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
// assert(iso == 1 || iso == -1);
if (iso == 1) {
@@ -75,6 +74,13 @@ namespace G4INCL {
nucleon->setType(Neutron);
}
pion->setType(Eta);
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
G4double sh=nucleon->getEnergy()+pion->getEnergy();
G4double mn=nucleon->getMass();
G4double me=pion->getMass();
@@ -74,6 +74,13 @@ namespace G4INCL {
nucleon = particle2;
pion = particle1;
}
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
G4int ipi=ParticleTable::getIsospin(pion->getType());
ind2=ParticleTable::getIsospin(nucleon->getType());
@@ -65,7 +65,6 @@ namespace G4INCL {
pion = particle1;
}
G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
// assert(iso == 1 || iso == -1);
if (iso == 1) {
@@ -75,6 +74,13 @@ namespace G4INCL {
nucleon->setType(Neutron);
}
pion->setType(Omega);
// Erase the parent resonance information of the nucleon and pion
nucleon->setParentResonancePDGCode(0);
nucleon->setParentResonanceID(0);
pion->setParentResonancePDGCode(0);
pion->setParentResonanceID(0);
// nucleon->setEnergy(std::sqrt((nucleon->getMass())*(nucleon->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
// pion->setEnergy(std::sqrt((pion->getMass())*(pion->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
G4double sh=nucleon->getEnergy()+pion->getEnergy();
@@ -44,6 +44,8 @@
#include "G4INCLCascade.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
#include "G4HadSecondary.hh"
#include "G4ParticleTable.hh"
#include "G4INCLXXInterfaceStore.hh"
#include "G4INCLXXVInterfaceTally.hh"
#include "G4String.hh"
@@ -365,7 +367,17 @@ G4HadFinalState* G4INCLXXInterface::ApplyYourself(const G4HadProjectile& aTrack,
// Set the four-momentum of the reaction products
p->Set4Momentum(momentum);
fourMomentumOut += momentum;
theResult.AddSecondary(p, secID);
// Propagate the particle's parent resonance information
G4HadSecondary secondary(p, 1.0, secID);
G4ParticleDefinition* parentResonanceDef = nullptr;
if ( eventInfo.parentResonancePDGCode[i] != 0 ) {
parentResonanceDef = G4ParticleTable::GetParticleTable()->FindParticle(eventInfo.parentResonancePDGCode[i]);
}
secondary.SetParentResonanceDef(parentResonanceDef);
secondary.SetParentResonanceID(eventInfo.parentResonanceID[i]);
theResult.AddSecondary(secondary);
} else {
G4String message = "the model produced a particle that couldn't be converted to Geant4 particle.";
@@ -131,6 +131,8 @@ namespace G4INCL {
std::fill_n(theta, maxSizeParticles, (Float_t)0.0);
std::fill_n(phi, maxSizeParticles, (Float_t)0.0);
std::fill_n(origin, maxSizeParticles, 0);
std::fill_n(parentResonancePDGCode, maxSizeParticles, 0);
std::fill_n(parentResonanceID, maxSizeParticles, 0);
std::fill_n(emissionTime, maxSizeParticles, (Float_t)0.0);
std::fill_n(ARem, maxSizeRemnants, 0);
std::fill_n(ZRem, maxSizeRemnants, 0);
@@ -191,6 +193,10 @@ namespace G4INCL {
* Should be -1 for cascade particles, or the number of the remnant for
* de-excitation particles. */
Short_t origin[maxSizeParticles];
/** \brief Particle's parent resonance PDG code */
Int_t parentResonancePDGCode[maxSizeParticles];
/** \brief Particle's parent resonance unique ID identifier */
Int_t parentResonanceID[maxSizeParticles];
/** \brief Emission time [fm/c] */
Float_t emissionTime[maxSizeParticles];
/** \brief History of the particle
@@ -101,6 +101,8 @@ namespace G4INCL {
uncorrelatedMomentum(rhs.uncorrelatedMomentum),
theParticleBias(rhs.theParticleBias),
theNKaon(rhs.theNKaon),
theParentResonancePDGCode(rhs.theParentResonancePDGCode),
theParentResonanceID(rhs.theParentResonanceID),
theHelicity(rhs.theHelicity),
emissionTime(rhs.emissionTime),
outOfWell(rhs.outOfWell),
@@ -146,6 +148,9 @@ namespace G4INCL {
std::swap(thePotentialEnergy, rhs.thePotentialEnergy);
// ID intentionally not swapped
std::swap(theParentResonancePDGCode, rhs.theParentResonancePDGCode);
std::swap(theParentResonanceID, rhs.theParentResonanceID);
std::swap(theHelicity, rhs.theHelicity);
std::swap(emissionTime, rhs.emissionTime);
std::swap(outOfWell, rhs.outOfWell);
@@ -156,7 +161,6 @@ namespace G4INCL {
std::swap(theParticleBias, rhs.theParticleBias);
std::swap(theBiasCollisionVector, rhs.theBiasCollisionVector);
}
public:
@@ -1052,7 +1056,12 @@ namespace G4INCL {
G4int getNumberOfKaon() const { return theNKaon; };
void setNumberOfKaon(const G4int NK) { theNKaon = NK; }
G4int getParentResonancePDGCode() const { return theParentResonancePDGCode; };
void setParentResonancePDGCode(const G4int parentPDGCode) { theParentResonancePDGCode = parentPDGCode; };
G4int getParentResonanceID() const { return theParentResonanceID; };
void setParentResonanceID(const G4int parentID) { theParentResonanceID = parentID; };
public:
/** \brief Time ordered vector of all bias applied
*
@@ -1099,6 +1108,9 @@ namespace G4INCL {
/// \brief The number of Kaons inside the nucleus (update during the cascade)
G4int theNKaon;
G4int theParentResonancePDGCode;
G4int theParentResonanceID;
private:
G4double theHelicity;
G4double emissionTime;
@@ -118,6 +118,8 @@ namespace G4INCL {
EKin[nParticles] = EKinRem[remnantIndex];
origin[nParticles] = -1; // Origin: cascade
parentResonancePDGCode[nParticles] = 0; // No parent resonance
parentResonanceID[nParticles] = 0; // No parent resonance
history.push_back(""); // history
nParticles++;
// assert(history.size()==(unsigned int)nParticles);
@@ -87,7 +87,7 @@ namespace G4INCL {
cleanTable();
#ifdef INCLXX_IN_GEANT4_MODE
if(!std::getenv("G4INCLDATA")) {
if(!G4FindDataDir("G4INCLDATA")) {
G4ExceptionDescription ed;
ed << " Data missing: set environment variable G4INCLDATA\n"
<< " to point to the directory containing data files needed\n"
@@ -95,7 +95,7 @@ namespace G4INCL {
G4Exception("G4INCLDataFile::readData()","table_radius_hfb.dat",
FatalException, ed);
}
G4String dataPath0(std::getenv("G4INCLDATA"));
G4String dataPath0(G4FindDataDir("G4INCLDATA"));
G4String dataPath(dataPath0 + "/table_radius_hfb.dat");
#else
// File name
@@ -74,6 +74,8 @@ namespace G4INCL {
uncorrelatedMomentum(0.),
theParticleBias(1.),
theNKaon(0),
theParentResonancePDGCode(0),
theParentResonanceID(0),
theHelicity(0.0),
emissionTime(0.0),
outOfWell(false),
@@ -98,6 +100,8 @@ namespace G4INCL {
uncorrelatedMomentum(theMomentum.mag()),
theParticleBias(1.),
theNKaon(0),
theParentResonancePDGCode(0),
theParentResonanceID(0),
theHelicity(0.0),
emissionTime(0.0), outOfWell(false)
{
@@ -124,6 +128,8 @@ namespace G4INCL {
uncorrelatedMomentum(theMomentum.mag()),
theParticleBias(1.),
theNKaon(0),
theParentResonancePDGCode(0),
theParentResonanceID(0),
theHelicity(0.0),
emissionTime(0.0), outOfWell(false)
{
+18 -18
View File
@@ -1,33 +1,33 @@
# -----------------------------------------------------------
# Category hadr-lend History
==================================================
Geant4 - an Object-Oriented Toolkit for Simulation
==================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
History file for LEND Cross Section and Model
---------------------------------------------
-------------------------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-05-23 Gabriele Cosmo (hadr-lend-V11-00-04)
- Fixed potential use of pointer after free in nf_utilities/nfu_realloc(..)
function.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
26 April 2022 Alberto Ribon (hard-lend-V10-07-03)
-------------------------------------------------
## 2022-04-26 Alberto Ribon (hard-lend-V11-00-03)
- MCGIDI_energy.cc : fixed compilation warnings for 'may be used uninitialized'
variables.
20 April 2022 Alberto Ribon
---------------------------
## 2022-04-20 Alberto Ribon (hadr-lend-V11-00-02)
- MCGIDI_energy.cc, ptwXY_methods.cc, ptwXY_misc.cc : fixed compilation
warnings for 'may be used uninitialized' variables.
9 February 2022 Gabriele Cosmo
------------------------------
## 2022-02-09 Gabriele Cosmo (hadr-lend-V11-00-01)
- Fixed compilation warning on Intel compilers for unused variable.
## 2021-12-10 Ben Morgan (hadr-lend-V11-00-00)
- Change to new Markdown History format.
---
# History entries prior to 11.0
4 August 2021 Alberto Ribon (hadr-lend-V10-07-02)
-------------------------------------------------
- G4LENDModel, G4LENDCapture, G4LENDElastic, G4LENDFission, G4LENDInelastic :
@@ -66,23 +66,23 @@ G4LENDManager::G4LENDManager()
G4String xmcf_t;
G4String xmcf_he3;
G4String xmcf_a;
if( std::getenv("G4LENDDATA") == NULL ) {
if( G4FindDataDir("G4LENDDATA") == NULL ) {
throw G4HadronicException(__FILE__, __LINE__, " Please setenv G4LENDDATA to point to the LEND files." );
} else {
xmcf = std::getenv("G4LENDDATA");
xmcf = G4FindDataDir("G4LENDDATA");
//xmcf += "/xmcf.n_1.map";
xmcf += "/neutrons.map";
xmcf_gamma = std::getenv("G4LENDDATA");
xmcf_gamma = G4FindDataDir("G4LENDDATA");
xmcf_gamma += "/gammas.map";
xmcf_p = std::getenv("G4LENDDATA");
xmcf_p = G4FindDataDir("G4LENDDATA");
xmcf_p += "/protons.map";
xmcf_d = std::getenv("G4LENDDATA");
xmcf_d = G4FindDataDir("G4LENDDATA");
xmcf_d += "/deuterons.map";
xmcf_t = std::getenv("G4LENDDATA");
xmcf_t = G4FindDataDir("G4LENDDATA");
xmcf_t += "/tritons.map";
xmcf_he3 = std::getenv("G4LENDDATA");
xmcf_he3 = G4FindDataDir("G4LENDDATA");
xmcf_he3 += "/He3s.map";
xmcf_a = std::getenv("G4LENDDATA");
xmcf_a = G4FindDataDir("G4LENDDATA");
xmcf_a += "/alphas.map";
}
@@ -134,7 +134,7 @@ void *nfu_realloc( size_t size, void *old ) {
void *p = realloc( old, size );
if( nfu_debugging ) printf( "nfu_realloc %12p size = %8llu, old = %12p\n", p, (long long unsigned) size, old );
if( nfu_debugging ) printf( "nfu_realloc %12p size = %8llu", p, (long long unsigned) size );
return( p );
}
/*
@@ -1,32 +1,36 @@
-------------------------------------------------------------------
# Category hadr-lepnuc History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
History file for hadronic/models/util directory
-----------------------------------------------
-------------------------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
## 2022-06-20 Igor Semeniouk (hadr-lepnuc-V11-00-04)
- G4ANuElNucleusCcModel.cc, G4ANuElNucleusNcModel.cc,
G4ANuMuNucleusCcModel.cc, G4ANuMuNucleusNcModel.cc,
G4NuElNucleusCcModel.cc, G4NuElNucleusNcModel.cc,
G4NuMuNucleusCcModel.cc,G4NuMuNucleusNcModel.cc :
use G4FindDataDir("G4PARTICLEXSDATA") on place of getenv.
20 April 2022 Alberto Ribon (hadr-lepnuc-V10-07-06)
---------------------------------------------------
## 2022-04-20 Alberto Ribon (hadr-lepnuc-V11-00-03)
- G4MuonVDNuclearModel.cc : fixed compilation warnings for
'may be used uninitialized' variables.
17 February 2022 Vladimir Ivanchenko
------------------------------------
## 2022-02-17 Vladimir Ivanchenko (hadr-lepnuc-V11-00-02)
- G4NeutrinoNucleusModel - fixed memory leak reported by Coverity
09 February 2022 Gabriele Cosmo
-------------------------------
## 2022-02-09 Gabriele Cosmo (hadr-lepnuc-V11-00-01)
- Fixed compilation warning on Intel compilers for unused variables.
## 2021-12-10 Ben Morgan (hadr-lepnuc-V11-00-00)
- Change to new Markdown History format.
---
# History entries prior to 11.0
04 August 2021 A. Ribon (hadr-lepnuc-V10-07-05)
--------------------------------------------------
- G4ElectroVDNuclearModel, G4MuonVDNuclearModel,
@@ -140,7 +140,7 @@ void G4ANuElNucleusCcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraycckr";
@@ -120,7 +120,7 @@ void G4ANuElNucleusNcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraynckr";
@@ -138,7 +138,7 @@ void G4ANuMuNucleusCcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraycckr";
@@ -121,7 +121,7 @@ void G4ANuMuNucleusNcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraynckr";
@@ -140,7 +140,7 @@ void G4NuElNucleusCcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraycckr";
@@ -120,7 +120,7 @@ void G4NuElNucleusNcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraynckr";
@@ -139,7 +139,7 @@ void G4NuMuNucleusCcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraycckr";
@@ -121,7 +121,7 @@ void G4NuMuNucleusNcModel::InitialiseModel()
if(fMaster)
{
char* path = getenv("G4PARTICLEXSDATA");
const char* path = G4FindDataDir("G4PARTICLEXSDATA");
std::ostringstream ost1, ost2, ost3, ost4;
ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraynckr";
@@ -1,27 +1,38 @@
-------------------------------------------------------------------
# Category hadr-hpp History
==================================================
Geant4 - an Object-Oriented Toolkit for Simulation
==================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!
History file for High Precision Neutron model
---------------------------------------------
-------------------------------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
## 2022-06-23 Alberto Ribon (hadr-hpp-V11-00-11)
- G4ParticleHPContAngularPar.cc : added protections against evaluations of
arrays at negative index (-1), fixing rare reproducibility problems.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
## 2022-06-22 Guilherme Amadio (hadr-hpp-V11-00-10)
- Replace std::getenv with G4FindDataDir
11 May 2022 Dennis Wright (hadr-hpp-V10-07-12)
----------------------------------------------
## 2022-06-20 Igor Semeniouk (hadr-hpp-V11-00-09)
- G4ParticleHPIsoData.cc, G4ParticleHPInelasticData.cc,
G4ParticleHPJENDLHEData.cc, G4ParticleHPThermalScatteringData.cc,
G4ParticleHPThermalScattering.cc :
quick fix, use G4FindDataDir for G4NEUTRONHPDATA and other dataDirVariable environment variables.
## 2022-06-14 Igor Semeniouk (hadr-hpp-V11-00-08)
- G4ParticleHPInelastic.cc : quick fix, use G4FindDataDir for G4NEUTRONHPDATA
and other dataDirVariable environment variables.
## 2022-06-10 Alberto Ribon (hadr-hpp-V11-00-07)
- G4ParticleHPContEnergyAngular.hh : fixed Coverity report.
(Correction suggested by Dennis Wright; expected no effect).
## 2022-05-11 Dennis Wright (hadr-hpp-V11-00-06)
- code cleanup of G4ParticleHPContEnergyAngular.cc and
G4ParticleHPContAngularPar.cc : remove debug code, remove commented out code,
fix indentation of loops and if branches
27 April 2022 Dennis Wright
---------------------------
## 2022-04-27 Dennis Wright (hadr-hpp-V11-00-05)
- fix of bug #2468: many or most photons generated from G4NDL/Capture/FSMF6 data
are too high in energy. Bug reported and fixed by Sven Menke.
- G4ParticleHPContEnergyAngular
@@ -37,14 +48,16 @@ code and to keep track of all tags.
assignment of elements
: disable and replace code with incorrect assignment of
continuous energies
G4ParticleHPContEnergyAngular:
## 2022-04-27 Gunter Folger (hadr-hpp-V11-00-04)
- G4ParticleHPThermalScatteringNames.cc updated to use new ThermalScattering data. File provided by Loic Thulliez.
26 April 2022 Alberto Ribon
---------------------------
## 2022-04-26 Alberto Ribon (hadr-hpp-V11-00-03)
- G4ParticleHPVector : fixed compilation warning for 'may be used uninitialized'
variable.
20 April 2022 Alberto Ribon
---------------------------
## 2022-04-20 Alberto Ribon (hadr-hpp-V11-00-02)
- G4ParticleHPFissionSpectrum.hh, G4ParticleHPSimpleEvapSpectrum.hh,
G4FPYNormalFragmentDist.cc, G4FissionProductYieldDist.cc,
G4ParticleHPInelasticCompFS.cc, G4ParticleHPKallbachMannSyst.cc,
@@ -52,11 +65,17 @@ code and to keep track of all tags.
G4ParticleHPVector.cc, G4ParticleHPWattSpectrum.cc : fixed compilation
warnings for 'may be used uninitialized' variables.
09 February 2022 Gabriele Cosmo
-------------------------------
## 2022-02-09 Gabriele Cosmo (hadr-hpp-V11-00-01)
- Fixed compilation warnings on Intel compilers for deprecated use of
operator=() in G4ParticleHPDataPoint.
## 2021-12-10 Ben Morgan (hadr-hpp-V11-00-00)
- Change to new Markdown History format.
---
# History entries prior to 11.0
05 November 2021 Alberto Ribon (hadr-hpp-V10-07-11)
--------------------------------------------------
Improvements made by Loic Thulliez and Eric Dumonteil (CEA Saclay):
@@ -77,11 +77,7 @@ public:
theAngular[i].Init(aDataFile, theProjectile);
theAngular[i].SetInterpolation(theInterpolation);
#ifndef PHP_AS_HP
if( i != 0 ) {
theAngular[i].PrepareTableInterpolation();
} else {
theAngular[i].PrepareTableInterpolation();
}
theAngular[i].PrepareTableInterpolation();
#endif
}
}
@@ -1041,7 +1041,7 @@ G4FFG_FUNCTIONENTER__
// Generate the file location starting in the Geant4 data directory
std::ostringstream DirectoryName;
DirectoryName << std::getenv("G4NEUTRONHPDATA") << G4FFGDefaultValues::ENDFFissionDataLocation;
DirectoryName << G4FindDataDir("G4NEUTRONHPDATA") << G4FFGDefaultValues::ENDFFissionDataLocation;
// Return the directory structure
G4FFG_FUNCTIONLEAVE__
@@ -49,9 +49,9 @@
SetMaxEnergy( 20.*MeV );
/*
// G4cout << "Capture : start of construction!!!!!!!!"<<G4endl;
if(!std::getenv("G4NEUTRONHPDATA"))
if(!G4FindDataDir("G4NEUTRONHPDATA"))
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
dirName = std::getenv("G4NEUTRONHPDATA");
dirName = G4FindDataDir("G4NEUTRONHPDATA");
G4String tString = "/Capture";
dirName = dirName + tString;
numEle = G4Element::GetNumberOfElements();
@@ -207,9 +207,9 @@ void G4ParticleHPCapture::BuildPhysicsTable(const G4ParticleDefinition&)
return;
}
if ( !std::getenv("G4NEUTRONHPDATA") )
if ( !G4FindDataDir("G4NEUTRONHPDATA") )
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
dirName = std::getenv("G4NEUTRONHPDATA");
dirName = G4FindDataDir("G4NEUTRONHPDATA");
G4String tString = "/Capture";
dirName = dirName + tString;
@@ -216,6 +216,7 @@ G4ParticleHPContAngularPar::Sample(G4double anEnergy, G4double massCode,
if (j == nDiscreteEnergies) {
e_low = 0.0/eV;
} else {
if ( j < 1 ) j = 1; // Protection against evaluation of arrays at index j-1
e_low = theAngular[j-1].GetLabel()/eV;
}
e_high = theAngular[j].GetLabel()/eV;
@@ -275,6 +276,8 @@ G4ParticleHPContAngularPar::Sample(G4double anEnergy, G4double massCode,
}
}
if ( it < 1 ) it = 1; // Protection against evaluation of arrays at index it-1
G4double x1 = running[it-1];
G4double x2 = running[it];
@@ -398,6 +401,7 @@ G4ParticleHPContAngularPar::Sample(G4double anEnergy, G4double massCode,
}
} else { // continuum contribution
if ( it < 1 ) it = 1; // Protection against evaluation of arrays at index it-1
G4double x1 = running[it-1]/running[nEnergies-1];
G4double x2 = running[it]/running[nEnergies-1];
G4double y1 = theAngular[it-1].GetLabel();
@@ -586,6 +590,7 @@ G4ParticleHPContAngularPar::Sample(G4double anEnergy, G4double massCode,
}
} else {
if ( it < 1 ) it = 1; // Protection against evaluation of arrays at index it-1
G4double x1 = running[it-1]/running[nEnergies-1];
G4double x2 = running[it]/running[nEnergies-1];
G4double y1 = theAngular[it-1].GetLabel();
@@ -691,7 +696,7 @@ void G4ParticleHPContAngularPar::PrepareTableInterpolation()
G4double ener = theAngular[ie].GetLabel();
G4double enerT = (ener-theMinEner)/(theMaxEner-theMinEner);
theEnergiesTransformed.insert(enerT);
if( getenv("G4PHPTEST2") ) G4cout <<this << " G4ParticleHPContAngularPar::PrepareTableInterpolation theEnergiesTransformed1 " << enerT << G4endl; //GDEB
if( std::getenv("G4PHPTEST2") ) G4cout <<this << " G4ParticleHPContAngularPar::PrepareTableInterpolation theEnergiesTransformed1 " << enerT << G4endl; //GDEB
}
G4int nEnergiesPrev = angParPrev->GetNEnergies();
G4double minEnerPrev = angParPrev->GetMinEner();
@@ -700,7 +705,7 @@ void G4ParticleHPContAngularPar::PrepareTableInterpolation()
G4double ener = angParPrev->theAngular[ie].GetLabel();
G4double enerT = (ener-minEnerPrev)/(maxEnerPrev-minEnerPrev);
theEnergiesTransformed.insert(enerT);
if( getenv("G4PHPTEST2") ) G4cout << this << " G4ParticleHPContAngularPar::PrepareTableInterpolation theEnergiesTransformed2 " << enerT << G4endl; //GDEB
if( std::getenv("G4PHPTEST2") ) G4cout << this << " G4ParticleHPContAngularPar::PrepareTableInterpolation theEnergiesTransformed2 " << enerT << G4endl; //GDEB
}
// add the maximum energy
//theEnergiesTransformed.insert(1.);
@@ -174,9 +174,9 @@ void G4ParticleHPElastic::BuildPhysicsTable(const G4ParticleDefinition&)
}
G4ParticleHPElasticFS * theFS = new G4ParticleHPElasticFS;
if(!std::getenv("G4NEUTRONHPDATA"))
if(!G4FindDataDir("G4NEUTRONHPDATA"))
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
dirName = std::getenv("G4NEUTRONHPDATA");
dirName = G4FindDataDir("G4NEUTRONHPDATA");
G4String tString = "/Elastic";
dirName = dirName + tString;
for ( G4int i = numEle ; i < (G4int)G4Element::GetNumberOfElements() ; i++ ) {
@@ -46,9 +46,9 @@
SetMinEnergy( 0.0 );
SetMaxEnergy( 20.*MeV );
/*
if(!std::getenv("G4NEUTRONHPDATA"))
if(!G4FindDataDir("G4NEUTRONHPDATA"))
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
dirName = std::getenv("G4NEUTRONHPDATA");
dirName = G4FindDataDir("G4NEUTRONHPDATA");
G4String tString = "/Fission";
dirName = dirName + tString;
numEle = G4Element::GetNumberOfElements();
@@ -198,9 +198,9 @@ void G4ParticleHPFission::BuildPhysicsTable(const G4ParticleDefinition&)
return;
}
if ( !std::getenv("G4NEUTRONHPDATA") )
if ( !G4FindDataDir("G4NEUTRONHPDATA") )
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
dirName = std::getenv("G4NEUTRONHPDATA");
dirName = G4FindDataDir("G4NEUTRONHPDATA");
G4String tString = "/Fission";
dirName = dirName + tString;
@@ -51,8 +51,8 @@ G4ParticleHPInelastic::G4ParticleHPInelastic(G4ParticleDefinition* projectile, c
,theProjectile(projectile)
{
G4String baseName;
if ( std::getenv("G4PARTICLEHPDATA") ) {
baseName = std::getenv( "G4PARTICLEHPDATA" );
if ( G4FindDataDir("G4PARTICLEHPDATA") ) {
baseName = G4FindDataDir( "G4PARTICLEHPDATA" );
}
//const char* dataDirVariable;
G4String particleName;
@@ -82,13 +82,13 @@ G4ParticleHPInelastic::G4ParticleHPInelastic(G4ParticleDefinition* projectile, c
SetMaxEnergy( 20.*MeV );
//G4cout << " entering G4ParticleHPInelastic constructor"<<G4endl;
if ( !std::getenv("G4PARTICLEHPDATA") && !std::getenv(dataDirVariable) ) {
if ( !G4FindDataDir("G4PARTICLEHPDATA") && !G4FindDataDir(dataDirVariable) ) {
G4String message("Please setenv G4PARTICLEHPDATA (recommended) or, at least setenv " +
G4String(dataDirVariable) + " to point to the " + theProjectile->GetParticleName() + " cross-section files." );
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
if ( std::getenv(dataDirVariable) ) {
dirName = std::getenv(dataDirVariable);
if ( G4FindDataDir(dataDirVariable) ) {
dirName = G4FindDataDir(dataDirVariable);
} else {
dirName = baseName + "/" + particleName;
}
@@ -77,9 +77,9 @@ void G4ParticleHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR)
void G4ParticleHPInelasticBaseFS::Init (G4double A, G4double Z, G4int M, G4String & dirName, G4String & bit, G4ParticleDefinition* )
{
gammaPath = "/Inelastic/Gammas/";
if(!std::getenv("G4NEUTRONHPDATA"))
if(!G4FindDataDir("G4NEUTRONHPDATA"))
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files where Inelastic/Gammas data is found.");
G4String tBase = std::getenv("G4NEUTRONHPDATA");
G4String tBase = G4FindDataDir("G4NEUTRONHPDATA");
gammaPath = tBase+gammaPath;
G4String tString = dirName;
G4bool dbool;
@@ -86,9 +86,9 @@ void G4ParticleHPInelasticCompFS::InitGammas(G4double AR, G4double ZR)
void G4ParticleHPInelasticCompFS::Init (G4double A, G4double Z, G4int M, G4String & dirName, G4String & aFSType, G4ParticleDefinition*)
{
gammaPath = "/Inelastic/Gammas/"; //only in neutron data base
if(!std::getenv("G4NEUTRONHPDATA"))
if(!G4FindDataDir("G4NEUTRONHPDATA"))
throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files where Inelastic/Gammas data is found.");
G4String tBase = std::getenv("G4NEUTRONHPDATA");
G4String tBase = G4FindDataDir("G4NEUTRONHPDATA");
gammaPath = tBase+gammaPath;
G4String tString = dirName;
G4bool dbool;
@@ -75,17 +75,17 @@ G4ParticleHPInelasticData::G4ParticleHPInelasticData(G4ParticleDefinition* proje
dataName.at(0) = toupper(dataName.at(0)) ;
SetName( dataName );
if ( !std::getenv(dataDirVariable) && !std::getenv( "G4PARTICLEHPDATA" ) ){
if ( !G4FindDataDir(dataDirVariable) && !G4FindDataDir( "G4PARTICLEHPDATA" ) ){
G4String message("Please setenv G4PARTICLEHPDATA (recommended) or, at least setenv " +
G4String(dataDirVariable) + " to point to the " + projectile->GetParticleName() + " cross-section files.");
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
G4String dirName;
if ( std::getenv(dataDirVariable) ) {
dirName = std::getenv(dataDirVariable);
if ( G4FindDataDir(dataDirVariable) ) {
dirName = G4FindDataDir(dataDirVariable);
} else {
G4String baseName = std::getenv( "G4PARTICLEHPDATA" );
G4String baseName = G4FindDataDir( "G4PARTICLEHPDATA" );
dirName = baseName + "/" + particleName;
}
#ifdef G4VERBOSE

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