Import Geant4 9.3.0 source tree
This commit is contained in:
@@ -27,9 +27,10 @@
|
||||
// 081120 Add deltaT in signature of CalKinematicsOfBinaryCollisions
|
||||
// Add several required updating of Mean Filed
|
||||
// Modified handling of absorption case by T. Koi
|
||||
// 090126 Fix in absorption case by T. Koi
|
||||
// 090331 Fix for gamma participant by T. Koi
|
||||
//
|
||||
#include "G4QMDCollision.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Scatterer.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
@@ -259,6 +260,8 @@ void G4QMDCollision::CalKinematicsOfBinaryCollisions( G4double dt )
|
||||
G4LorentzVector p4i = theSystem->GetParticipant( i )->Get4Momentum();
|
||||
G4double rmi = theSystem->GetParticipant( i )->GetMass();
|
||||
G4ParticleDefinition* pdi = theSystem->GetParticipant( i )->GetDefinition();
|
||||
//090331 gamma
|
||||
if ( pdi->GetPDGMass() == 0.0 ) continue;
|
||||
|
||||
//std::cout << " p4i00 " << p4i << std::endl;
|
||||
for ( G4int j = 0 ; j < i ; j++ )
|
||||
@@ -294,6 +297,8 @@ void G4QMDCollision::CalKinematicsOfBinaryCollisions( G4double dt )
|
||||
G4LorentzVector p4j = theSystem->GetParticipant( j )->Get4Momentum();
|
||||
G4double rmj = theSystem->GetParticipant( j )->GetMass();
|
||||
G4ParticleDefinition* pdj = theSystem->GetParticipant( j )->GetDefinition();
|
||||
//090331 gamma
|
||||
if ( pdj->GetPDGMass() == 0.0 ) continue;
|
||||
|
||||
G4double rr2 = theMeanField->GetRR2( i , j );
|
||||
|
||||
@@ -331,7 +336,7 @@ void G4QMDCollision::CalKinematicsOfBinaryCollisions( G4double dt )
|
||||
G4double pij = p4i*p4j;
|
||||
G4double pidr = p4i.vect()*dr;
|
||||
G4double pjdr = p4j.vect()*dr;
|
||||
|
||||
|
||||
G4double aij = 1.0 - ( rmi*rmj /pij ) * ( rmi*rmj /pij );
|
||||
G4double bij = pidr / rmi - pjdr*rmi/pij;
|
||||
G4double cij = rsq + ( pidr / rmi ) * ( pidr / rmi );
|
||||
@@ -659,7 +664,9 @@ G4bool G4QMDCollision::CalFinalStateOfTheBinaryCollision( G4int i , G4int j )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( theMeanField->IsPauliBlocked ( i ) == false )
|
||||
//if ( theMeanField->IsPauliBlocked ( i ) == false )
|
||||
//090126 i-1 cause jth is erased
|
||||
if ( theMeanField->IsPauliBlocked ( i-1 ) == false )
|
||||
{
|
||||
//G4cout << "Absorption Happen " << theSystem->GetTotalNumberOfParticipant() << G4endl;
|
||||
delete absorbed;
|
||||
|
||||
@@ -47,12 +47,16 @@ G4QMDGroundStateNucleus::G4QMDGroundStateNucleus( G4int z , G4int a )
|
||||
|
||||
//std::cout << " G4QMDGroundStateNucleus( G4int z , G4int a ) Begin " << z << " " << a << std::endl;
|
||||
|
||||
// Hydrogen Case
|
||||
if ( z == 1 && a == 1 )
|
||||
if ( z == 1 && a == 1 ) // Hydrogen Case or proton primary
|
||||
{
|
||||
SetParticipant( new G4QMDParticipant( G4Proton::Proton() , G4ThreeVector( 0.0 ) , G4ThreeVector( 0.0 ) ) );
|
||||
return;
|
||||
}
|
||||
else if ( z == 0 && a == 1 ) // Neutron primary
|
||||
{
|
||||
SetParticipant( new G4QMDParticipant( G4Neutron::Neutron() , G4ThreeVector( 0.0 ) , G4ThreeVector( 0.0 ) ) );
|
||||
return;
|
||||
}
|
||||
|
||||
dsam2 = dsam*dsam;
|
||||
ddif2 = ddif*ddif;
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
// 081107 Add UnUseGEM (then use the default channel of G4Evaporation)
|
||||
// UseFrag (chage criterion of a inelastic reaction)
|
||||
// Fix bug in nucleon projectiles by T. Koi
|
||||
// 090122 Be8 -> Alpha + Alpha
|
||||
// 090331 Change member shenXS and genspaXS object to pointer
|
||||
// 091119 Fix for incidence of neutral particles
|
||||
//
|
||||
#include "G4QMDReaction.hh"
|
||||
#include "G4QMDNucleus.hh"
|
||||
@@ -44,6 +47,11 @@ G4QMDReaction::G4QMDReaction()
|
||||
, gem ( true )
|
||||
, frag ( false )
|
||||
{
|
||||
|
||||
//090331
|
||||
shenXS = new G4IonsShenCrossSection();
|
||||
//genspaXS = new G4GeneralSpaceNNCrossSection();
|
||||
piNucXS = new G4PiNuclearCrossSection();
|
||||
meanField = new G4QMDMeanField();
|
||||
collision = new G4QMDCollision();
|
||||
|
||||
@@ -98,8 +106,15 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
|
||||
const G4Element* targ_ele = nistMan->FindOrBuildElement( targ_Z );
|
||||
G4double aTemp = projectile.GetMaterial()->GetTemperature();
|
||||
|
||||
//G4double xs_0 = shenXS.GetCrossSection ( proj_dp , targ_ele , aTemp );
|
||||
G4double xs_0 = genspaXS.GetCrossSection ( proj_dp , targ_ele , aTemp );
|
||||
//090331
|
||||
|
||||
G4VCrossSectionDataSet* theXS = shenXS;
|
||||
|
||||
if ( proj_pd->GetParticleType() == "meson" ) theXS = piNucXS;
|
||||
|
||||
G4double xs_0 = theXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
|
||||
|
||||
//G4double xs_0 = genspaXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
|
||||
G4double bmax_0 = std::sqrt( xs_0 / pi );
|
||||
//std::cout << "bmax_0 in fm (fermi) " << bmax_0/fermi << std::endl;
|
||||
|
||||
@@ -149,7 +164,7 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
|
||||
//G4cout << "G4QMDRESULT bmax_0 = " << bmax_0/fermi << " fm, bmax = " << bmax << " fm , b = " << b << " fm " << G4endl;
|
||||
|
||||
G4double plab = projectile.GetTotalMomentum()/GeV;
|
||||
G4double elab = (projectile.GetKineticEnergy() + proj_pd->GetPDGMass() + targ_pd->GetPDGMass() )/GeV;
|
||||
G4double elab = ( projectile.GetKineticEnergy() + proj_pd->GetPDGMass() + targ_pd->GetPDGMass() )/GeV;
|
||||
|
||||
calcOffSetOfCollision( b , proj_pd , targ_pd , plab , elab , bmax , boostCMtoNN );
|
||||
|
||||
@@ -168,11 +183,12 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
|
||||
proj = new G4QMDGroundStateNucleus( proj_Z , proj_A );
|
||||
//proj->ShowParticipants();
|
||||
|
||||
}
|
||||
|
||||
meanField->SetSystem ( proj );
|
||||
proj->SetTotalPotential( meanField->GetTotalPotential() );
|
||||
proj->CalEnergyAndAngularMomentumInCM();
|
||||
meanField->SetSystem ( proj );
|
||||
proj->SetTotalPotential( meanField->GetTotalPotential() );
|
||||
proj->CalEnergyAndAngularMomentumInCM();
|
||||
|
||||
}
|
||||
|
||||
// Target
|
||||
G4int iz = int ( target.GetZ() );
|
||||
@@ -211,7 +227,6 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
|
||||
G4LorentzVector proj4pCM = CLHEP::boostOf ( proj4pLAB , boostToReac );
|
||||
G4LorentzVector targ4pCM = CLHEP::boostOf ( targ4p , boostToReac );
|
||||
|
||||
|
||||
// Projectile
|
||||
if ( proj != NULL )
|
||||
{
|
||||
@@ -242,28 +257,34 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
|
||||
|
||||
// projectile is particle
|
||||
|
||||
G4int i = targ->GetTotalNumberOfParticipant();
|
||||
// avoid multiple set in "elastic" loop
|
||||
if ( system->GetTotalNumberOfParticipant() == targ->GetTotalNumberOfParticipant() )
|
||||
{
|
||||
|
||||
G4int i = targ->GetTotalNumberOfParticipant();
|
||||
|
||||
G4ThreeVector p0( 0 );
|
||||
G4ThreeVector r0( 0 );
|
||||
G4ThreeVector p0( 0 );
|
||||
G4ThreeVector r0( 0 );
|
||||
|
||||
G4ThreeVector p ( p0.x() + coulomb_collision_px_proj
|
||||
, p0.y()
|
||||
, p0.z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
|
||||
|
||||
G4ThreeVector p ( p0.x() + coulomb_collision_px_proj
|
||||
, p0.y()
|
||||
, p0.z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
|
||||
G4ThreeVector r ( r0.x() + coulomb_collision_rx_proj
|
||||
, r0.y()
|
||||
, r0.z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
|
||||
|
||||
G4ThreeVector r ( r0.x() + coulomb_collision_rx_proj
|
||||
, r0.y()
|
||||
, r0.z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
|
||||
system->SetParticipant( new G4QMDParticipant( (G4ParticleDefinition*)projectile.GetDefinition() , p , r ) );
|
||||
// This is not important becase only 1 projectile particle.
|
||||
system->GetParticipant ( i )->SetProjectile();
|
||||
}
|
||||
|
||||
system->SetParticipant( new G4QMDParticipant( (G4ParticleDefinition*)projectile.GetDefinition() , p , r ) );
|
||||
system->GetParticipant ( i )->SetProjectile();
|
||||
}
|
||||
//system->ShowParticipants();
|
||||
|
||||
delete targ;
|
||||
delete proj;
|
||||
|
||||
|
||||
meanField->SetSystem ( system );
|
||||
collision->SetMeanField ( meanField );
|
||||
|
||||
@@ -469,12 +490,44 @@ G4HadFinalState* G4QMDReaction::ApplyYourself( const G4HadProjectile & projectil
|
||||
notBreak = false;
|
||||
// Secondary from this nucleus (*it)
|
||||
G4ParticleDefinition* pd = (*itt)->GetDefinition();
|
||||
|
||||
G4LorentzVector p4 ( (*itt)->GetMomentum()/GeV , (*itt)->GetTotalEnergy()/GeV ); //in nucleus(*it) rest system
|
||||
G4LorentzVector p4_CM = CLHEP::boostOf( p4 , -nucleus_p4CM.findBoostToCM() ); // Back to CM
|
||||
G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB ); // Back to LAB
|
||||
|
||||
G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
|
||||
theParticleChange.AddSecondary( dp );
|
||||
|
||||
//090122
|
||||
//theParticleChange.AddSecondary( dp );
|
||||
if ( !( pd->GetAtomicNumber() == 4 && pd->GetAtomicMass() == 8 ) )
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
|
||||
theParticleChange.AddSecondary( dp );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Be8 -> Alpha + Alpha + Q
|
||||
G4ThreeVector randomized_direction( G4UniformRand() , G4UniformRand() , G4UniformRand() );
|
||||
randomized_direction = randomized_direction.unit();
|
||||
G4double q_decay = (*itt)->GetMass() - 2*G4Alpha::Alpha()->GetPDGMass();
|
||||
G4double p_decay = std::sqrt ( std::pow(G4Alpha::Alpha()->GetPDGMass()+q_decay/2,2) - std::pow(G4Alpha::Alpha()->GetPDGMass() , 2 ) );
|
||||
G4LorentzVector p4_a1 ( p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 ); //in Be8 rest system
|
||||
|
||||
G4LorentzVector p4_a1_Be8 = CLHEP::boostOf ( p4_a1/GeV , -p4.findBoostToCM() );
|
||||
G4LorentzVector p4_a1_CM = CLHEP::boostOf ( p4_a1_Be8 , -nucleus_p4CM.findBoostToCM() );
|
||||
G4LorentzVector p4_a1_LAB = CLHEP::boostOf ( p4_a1_CM , boostBackToLAB );
|
||||
|
||||
G4LorentzVector p4_a2 ( -p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 ); //in Be8 rest system
|
||||
|
||||
G4LorentzVector p4_a2_Be8 = CLHEP::boostOf ( p4_a2/GeV , -p4.findBoostToCM() );
|
||||
G4LorentzVector p4_a2_CM = CLHEP::boostOf ( p4_a2_Be8 , -nucleus_p4CM.findBoostToCM() );
|
||||
G4LorentzVector p4_a2_LAB = CLHEP::boostOf ( p4_a2_CM , boostBackToLAB );
|
||||
|
||||
G4DynamicParticle* dp1 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a1_LAB*GeV );
|
||||
G4DynamicParticle* dp2 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a2_LAB*GeV );
|
||||
theParticleChange.AddSecondary( dp1 );
|
||||
theParticleChange.AddSecondary( dp2 );
|
||||
}
|
||||
//090122
|
||||
|
||||
/*
|
||||
std::cout
|
||||
@@ -570,6 +623,7 @@ G4ParticleDefinition* pd_proj ,
|
||||
G4ParticleDefinition* pd_targ ,
|
||||
G4double ptot , G4double etot , G4double bmax , G4ThreeVector boostToCM )
|
||||
{
|
||||
|
||||
G4double mass_proj = pd_proj->GetPDGMass()/GeV;
|
||||
G4double mass_targ = pd_targ->GetPDGMass()/GeV;
|
||||
|
||||
@@ -582,11 +636,25 @@ G4double ptot , G4double etot , G4double bmax , G4ThreeVector boostToCM )
|
||||
G4double pzcc = pstt;
|
||||
G4double eccm = stot - ( mass_proj + mass_targ );
|
||||
|
||||
G4int zp = pd_proj->GetAtomicNumber();
|
||||
G4int ap = pd_proj->GetAtomicMass();
|
||||
G4int zp = 1;
|
||||
G4int ap = 1;
|
||||
if ( pd_proj->GetParticleType() == "nucleus" )
|
||||
{
|
||||
zp = pd_proj->GetAtomicNumber();
|
||||
ap = pd_proj->GetAtomicMass();
|
||||
}
|
||||
else
|
||||
{
|
||||
// proton, neutron, mesons
|
||||
zp = int ( pd_proj->GetPDGCharge()/eplus + 0.5 );
|
||||
// ap = 1;
|
||||
}
|
||||
|
||||
|
||||
G4int zt = pd_targ->GetAtomicNumber();
|
||||
G4int at = pd_targ->GetAtomicMass();
|
||||
|
||||
|
||||
//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 );
|
||||
@@ -596,9 +664,16 @@ G4double ptot , G4double etot , G4double bmax , G4ThreeVector boostToCM )
|
||||
|
||||
G4double pccf = std::sqrt( pcca );
|
||||
|
||||
G4double aas = 2.0 * eccm * b / double ( zp * zt ) / ccoul;
|
||||
G4double bbs = 1.0 / std::sqrt ( 1.0 + aas*aas );
|
||||
G4double aas1 = ( 1.0 + aas * b / rmax ) * bbs;
|
||||
//Fix for neutral particles
|
||||
G4double aas1 = 0.0;
|
||||
G4double bbs = 0.0;
|
||||
|
||||
if ( zp != 0 )
|
||||
{
|
||||
G4double aas = 2.0 * eccm * b / double ( zp * zt ) / ccoul;
|
||||
bbs = 1.0 / std::sqrt ( 1.0 + aas*aas );
|
||||
aas1 = ( 1.0 + aas * b / rmax ) * bbs;
|
||||
}
|
||||
|
||||
G4double cost = 0.0;
|
||||
G4double sint = 0.0;
|
||||
@@ -697,4 +772,3 @@ void G4QMDReaction::setEvaporationCh()
|
||||
evaporation->SetDefaultChannel();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user