Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -13,6 +13,17 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
15 June 2020 Dennis Wright (hadr-qmd-V10-06-00)
------------------------------------------------
- Fix of bug 2236, by Jeonghyeok Park:
G4QMDReaction::ApplyYourself() : add code to get cross section when
projectile is pion
G4QMDReaction.hh and G4QMDReaction::G4QMDReaction() : replace data member
G4PiNuclearCrossSection with G4BGGPionElasticXS and G4BGGPionInelasticXS
G4QMDGroundStateNucleus ctor: move check for p or n projectile earlier
in code so baryon number can be conserved
31 October 2016 Tatsumi Koi (hadr-qmd-V10-02-01)
- Set type of deexcitation channels to fCombined
@@ -49,86 +49,91 @@
#include "G4IonsShenCrossSection.hh"
//#include "G4GeneralSpaceNNCrossSection.hh"
#include "G4PiNuclearCrossSection.hh"
#include "G4HadronicInteraction.hh"
#include "G4Evaporation.hh"
#include "G4ExcitationHandler.hh"
//#include "G4PreCompoundModel.hh"
class G4BGGPionElasticXS;
class G4BGGPionInelasticXS;
class G4QMDReaction : public G4HadronicInteraction
{
public:
G4QMDReaction();
~G4QMDReaction();
public:
G4QMDReaction();
~G4QMDReaction();
std::vector< G4QMDSystem* > GetFinalStates();
std::vector< G4QMDSystem* > GetFinalStates();
G4HadFinalState *ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus & targetNucleus );
G4HadFinalState* ApplyYourself(const G4HadProjectile &aTrack,
G4Nucleus & targetNucleus);
G4ExcitationHandler* GetExcitationHandler(){ return excitationHandler; };
G4ExcitationHandler* GetExcitationHandler() {return excitationHandler;};
void UnUseGEM(){ gem = false; setEvaporationCh(); };
void UseFRAG(){ frag = true; };
void UnUseGEM() {gem = false; setEvaporationCh();};
void UseFRAG() {frag = true;};
void SetTMAX( G4int i ){ maxTime = i; };
void SetDT( G4double t ){ deltaT = t; };
void SetEF( G4double x ){ envelopF = x; };
void SetTMAX(G4int i) { maxTime = i; };
void SetDT(G4double t) { deltaT = t; };
void SetEF(G4double x) { envelopF = x; };
virtual void ModelDescription(std::ostream& outFile) const;
virtual void ModelDescription(std::ostream& outFile) const;
private:
//copy is unexpeced
void operator =( const G4QMDReaction& ){};
G4QMDReaction( const G4QMDReaction& ):G4HadronicInteraction("QMDModel"){};
private:
//copy is unexpected
void operator =( const G4QMDReaction& ){};
G4QMDReaction( const G4QMDReaction& ):G4HadronicInteraction("QMDModel"){};
void setEvaporationCh();
void setHighEnergyModel();
void setEvaporationCh();
void setHighEnergyModel();
G4QMDMeanField* meanField;
G4QMDMeanField* meanField;
G4QMDCollision* collision;
G4QMDCollision* collision;
void doCollision();
std::vector< G4QMDSystem* > doClusterJudgment();
void doCollision();
std::vector< G4QMDSystem* > doClusterJudgment();
G4QMDSystem* system;
G4double deltaT;
G4int maxTime;
G4double envelopF;
G4Evaporation* evaporation;
G4ExcitationHandler* excitationHandler;
// G4VPreCompoundModel* preco;
G4QMDSystem* system;
G4double deltaT;
G4int maxTime;
G4double envelopF;
G4Evaporation* evaporation;
G4ExcitationHandler* excitationHandler;
// b pd_proj pd_targ z_p a_p z_t a_t plab elab
// G4double offSetOfCollision( G4double , G4ParticleDefinition* , G4ParticleDefinition* , G4int , G4int , G4int , G4int , G4double , G4double );
// b pd_proj pd_targ plab elab bmax boostToCM
void calcOffSetOfCollision( G4double , const G4ParticleDefinition* , const G4ParticleDefinition* , G4double , G4double , G4double , G4ThreeVector );
G4double coulomb_collision_gamma_proj;
G4double coulomb_collision_rx_proj;
G4double coulomb_collision_rz_proj;
G4double coulomb_collision_px_proj;
G4double coulomb_collision_pz_proj;
G4double coulomb_collision_gamma_targ;
G4double coulomb_collision_rx_targ;
G4double coulomb_collision_rz_targ;
G4double coulomb_collision_px_targ;
G4double coulomb_collision_pz_targ;
void calcOffSetOfCollision(G4double, const G4ParticleDefinition*,
const G4ParticleDefinition*, G4double,
G4double, G4double, G4ThreeVector);
G4double coulomb_collision_gamma_proj;
G4double coulomb_collision_rx_proj;
G4double coulomb_collision_rz_proj;
G4double coulomb_collision_px_proj;
G4double coulomb_collision_pz_proj;
G4double coulomb_collision_gamma_targ;
G4double coulomb_collision_rx_targ;
G4double coulomb_collision_rz_targ;
G4double coulomb_collision_px_targ;
G4double coulomb_collision_pz_targ;
//090331
G4IonsShenCrossSection* shenXS;
//G4GeneralSpaceNNCrossSection* genspaXS;
G4IonsShenCrossSection* shenXS;
// G4GeneralSpaceNNCrossSection* genspaXS;
G4PiNuclearCrossSection* piNucXS;
G4bool gem;
G4bool frag;
G4BGGPionElasticXS* pipElNucXS;
G4BGGPionElasticXS* pimElNucXS;
G4BGGPionInelasticXS* pipInelNucXS;
G4BGGPionInelasticXS* pimInelNucXS;
G4bool gem;
G4bool frag;
};
#endif
@@ -69,6 +69,22 @@ G4QMDGroundStateNucleus::G4QMDGroundStateNucleus( G4int z , G4int a )
csp = parameters->Get_csp();
clp = parameters->Get_clp();
// Following 10 lines should be here, right before the line 90.
// Otherwise, mass number cannot be conserved if the projectile or
// the target are nucleons.
//Nucleon primary or target case;
if ( z == 1 && a == 1 ) { // Hydrogen Case or proton primary
SetParticipant( new G4QMDParticipant( G4Proton::Proton() , G4ThreeVector( 0.0 ) , G4ThreeVector( 0.0 ) ) );
ebini = 0.0;
return;
}
else if ( z == 0 && a == 1 ) { // Neutron primary
SetParticipant( new G4QMDParticipant( G4Neutron::Neutron() , G4ThreeVector( 0.0 ) , G4ThreeVector( 0.0 ) ) );
ebini = 0.0;
return;
}
//edepth = 0.0;
for ( int i = 0 ; i < a ; i++ )
@@ -100,18 +116,6 @@ G4QMDGroundStateNucleus::G4QMDGroundStateNucleus( G4int z , G4int a )
//maxTrial = 1000;
//Nucleon primary or target case;
if ( z == 1 && a == 1 ) { // Hydrogen Case or proton primary
SetParticipant( new G4QMDParticipant( G4Proton::Proton() , G4ThreeVector( 0.0 ) , G4ThreeVector( 0.0 ) ) );
ebini = 0.0;
return;
}
else if ( z == 0 && a == 1 ) { // Neutron primary
SetParticipant( new G4QMDParticipant( G4Neutron::Neutron() , G4ThreeVector( 0.0 ) , G4ThreeVector( 0.0 ) ) );
ebini = 0.0;
return;
}
meanfield = new G4QMDMeanField();
meanfield->SetSystem( this );
@@ -43,6 +43,8 @@
#include "G4NistManager.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4BGGPionElasticXS.hh"
#include "G4BGGPionInelasticXS.hh"
G4QMDReaction::G4QMDReaction()
: G4HadronicInteraction("QMDModel")
@@ -57,7 +59,19 @@ G4QMDReaction::G4QMDReaction()
//090331
shenXS = new G4IonsShenCrossSection();
//genspaXS = new G4GeneralSpaceNNCrossSection();
piNucXS = (G4PiNuclearCrossSection*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4PiNuclearCrossSection::Default_Name());
pipElNucXS = new G4BGGPionElasticXS(G4PionPlus::PionPlus() );
pipElNucXS->BuildPhysicsTable(*(G4PionPlus::PionPlus() ) );
pimElNucXS = new G4BGGPionElasticXS(G4PionMinus::PionMinus() );
pimElNucXS->BuildPhysicsTable(*(G4PionMinus::PionMinus() ) );
pipInelNucXS = new G4BGGPionInelasticXS(G4PionPlus::PionPlus() );
pipInelNucXS->BuildPhysicsTable(*(G4PionPlus::PionPlus() ) );
pimInelNucXS = new G4BGGPionInelasticXS(G4PionMinus::PionMinus() );
pimInelNucXS->BuildPhysicsTable(*(G4PionMinus::PionMinus() ) );
meanField = new G4QMDMeanField();
collision = new G4QMDCollision();
@@ -81,11 +95,9 @@ G4QMDReaction::G4QMDReaction()
coulomb_collision_rz_targ = 0.0;
coulomb_collision_px_targ = 0.0;
coulomb_collision_pz_targ = 0.0;
}
G4QMDReaction::~G4QMDReaction()
{
delete evaporation;
@@ -95,7 +107,6 @@ G4QMDReaction::~G4QMDReaction()
}
G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectile , G4Nucleus & target )
{
//G4cout << "G4QMDReaction::ApplyYourself" << G4endl;
@@ -136,12 +147,20 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
G4VCrossSectionDataSet* theXS = shenXS;
if ( proj_pd->GetParticleType() == "meson" ) theXS = piNucXS;
G4double xs_0 = theXS->GetIsoCrossSection ( proj_dp , targ_Z , targ_A );
// When the projectile is a pion
if (proj_pd == G4PionPlus::PionPlus() ) {
xs_0 = pipElNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() ) +
pipInelNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() );
} else if (proj_pd == G4PionMinus::PionMinus() ) {
xs_0 = pimElNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() ) +
pimInelNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() );
}
//G4double xs_0 = genspaXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
//G4double xs_0 = theXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
//110822
G4double xs_0 = theXS->GetIsoCrossSection ( proj_dp , targ_Z , targ_A );
G4double bmax_0 = std::sqrt( xs_0 / pi );
//std::cout << "bmax_0 in fm (fermi) " << bmax_0/fermi << std::endl;
@@ -267,7 +286,9 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
G4LorentzVector targ4pCM = CLHEP::boostOf ( targ4p , boostToReac );
// Projectile
if ( proj != NULL )
//G4cout << "proj : " << proj << G4endl;
//if ( proj != NULL )
if ( proj_A != 1 )
{
// projectile is nucleus
@@ -297,6 +318,7 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
// projectile is particle
// avoid multiple set in "elastic" loop
//G4cout << "system Total Participants : " << system->GetTotalNumberOfParticipant() << ", target : " << targ->GetTotalNumberOfParticipant() << G4endl;
if ( system->GetTotalNumberOfParticipant() == targ->GetTotalNumberOfParticipant() )
{
@@ -540,6 +562,7 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
//theParticleChange.AddSecondary( dp );
if ( !( pd->GetAtomicNumber() == 4 && pd->GetAtomicMass() == 8 ) )
{
//G4cout << "pd out of notBreak loop : " << pd->GetParticleName() << G4endl;
G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
theParticleChange.AddSecondary( dp );
}
@@ -600,6 +623,7 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
{
const G4ParticleDefinition* pd = G4IonTable::GetIonTable()->GetIon( (*it)->GetAtomicNumber() , (*it)->GetMassNumber(), (*it)->GetExcitationEnergy()*GeV );
//G4cout << "pd in notBreak loop : " << pd->GetParticleName() << G4endl;
G4LorentzVector p4_CM = nucleus_p4CM;
G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB ); // Back to LAB
G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
@@ -622,7 +646,6 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
for ( G4int i = 0 ; i < system->GetTotalNumberOfParticipant() ; i++ )
{
// Secondary particles
const G4ParticleDefinition* pd = system->GetParticipant( i )->GetDefinition();
@@ -630,6 +653,7 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB );
G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
theParticleChange.AddSecondary( dp );
//G4cout << "In the last theParticleChange loop : " << pd->GetParticleName() << G4endl;
/*
G4cout << "G4QMDRESULT "
@@ -652,6 +676,14 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
theParticleChange.SetStatusChange( stopAndKill );
for (G4int i = 0; i < G4int(theParticleChange.GetNumberOfSecondaries() ); i++)
{
//G4cout << "Particle : " << theParticleChange.GetSecondary(i)->GetParticle()->GetParticleDefinition()->GetParticleName() << G4endl;
//G4cout << "KEnergy : " << theParticleChange.GetSecondary(i)->GetParticle()->GetKineticEnergy() << G4endl;
//G4cout << "KEnergy : " << theParticleChange.GetSecondary(i)->GetCreatorModelType() << G4endl;
theParticleChange.GetSecondary(i)->SetCreatorModelType(1111);
}
return &theParticleChange;
}
@@ -695,6 +727,7 @@ G4double ptot , G4double etot , G4double bmax , G4ThreeVector boostToCM )
G4int at = pd_targ->GetAtomicMass();
// Check the ramx0 value
//G4double rmax0 = 8.0; // T.K dicide parameter value // for low energy
G4double rmax0 = bmax + 4.0;
G4double rmax = std::sqrt( rmax0*rmax0 + b*b );