Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -66,6 +66,8 @@
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
#include <typeinfo>
|
||||
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
// turn on general debugging info, and consistency checks
|
||||
|
||||
//#define debug_G4BinaryCascade 1
|
||||
@@ -109,10 +111,7 @@
|
||||
#define _DebugEpConservation(val)
|
||||
#endif
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4Mutex G4BinaryCascade::BICMutex = G4MUTEX_INITIALIZER;
|
||||
#endif
|
||||
G4int G4BinaryCascade::theBIC_ID = -1;
|
||||
G4int G4BinaryCascade::theBIC_ID = -1;
|
||||
|
||||
//
|
||||
// C O N S T R U C T O R S A N D D E S T R U C T O R S
|
||||
@@ -165,18 +164,7 @@ G4VIntraNuclearTransportModel("Binary Cascade", ptr)
|
||||
currentInitialEnergy=initial_nuclear_mass=0.;
|
||||
massInNucleus=0.;
|
||||
theOuterRadius=0.;
|
||||
if ( theBIC_ID == -1 ) {
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MUTEXLOCK(&G4BinaryCascade::BICMutex);
|
||||
if ( theBIC_ID == -1 ) {
|
||||
#endif
|
||||
theBIC_ID = G4PhysicsModelCatalog::Register("Binary Cascade");
|
||||
#ifdef G4MULTITHREADED
|
||||
}
|
||||
G4MUTEXUNLOCK(&G4BinaryCascade::BICMutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
theBIC_ID = G4PhysicsModelCatalog::GetModelID("model_G4BinaryCascade");
|
||||
}
|
||||
|
||||
G4BinaryCascade::~G4BinaryCascade()
|
||||
@@ -365,7 +353,7 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
|
||||
G4double time=(*iter)->GetFormationTime();
|
||||
if(time < 0.0) { time = 0.0; }
|
||||
aNew.SetTime(timePrimary + time);
|
||||
aNew.SetCreatorModelType((*iter)->GetCreatorModel());
|
||||
aNew.SetCreatorModelID((*iter)->GetCreatorModelID());
|
||||
theParticleChange.AddSecondary(aNew);
|
||||
}
|
||||
|
||||
@@ -976,7 +964,7 @@ G4ReactionProductVector * G4BinaryCascade::DeExcite()
|
||||
if ( theCapturedList.size() == 1 ) {i=theCapturedList.begin();} // Uzhi
|
||||
G4ReactionProduct * aNew = new G4ReactionProduct((*i)->GetDefinition());
|
||||
aNew->SetTotalEnergy((*i)->GetDefinition()->GetPDGMass());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
aNew->SetMomentum(G4ThreeVector(0));// see boost for preCompoundProducts below..
|
||||
precompoundProducts = new G4ReactionProductVector();
|
||||
precompoundProducts->push_back(aNew);
|
||||
@@ -1070,7 +1058,7 @@ G4ReactionProductVector * G4BinaryCascade::DecayVoidNucleus()
|
||||
G4ReactionProduct * aNew = new G4ReactionProduct((*aNuc)->GetDefinition());
|
||||
aNew->SetTotalEnergy((*aMom)->e());
|
||||
aNew->SetMomentum((*aMom)->vect());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
result->push_back(aNew);
|
||||
|
||||
delete *aMom;
|
||||
@@ -1087,7 +1075,7 @@ G4ReactionProductVector * G4BinaryCascade::DecayVoidNucleus()
|
||||
(*aNuc)->GetDefinition()); // Uzhi
|
||||
aNew->SetTotalEnergy((*aMom)->e()); // Uzhi
|
||||
aNew->SetMomentum((*aMom)->vect()); // Uzhi
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
result->push_back(aNew); // Uzhi
|
||||
delete *aMom; // Uzhi
|
||||
} // Uzhi
|
||||
@@ -1114,7 +1102,7 @@ G4ReactionProductVector * G4BinaryCascade::ProductsAddFinalState(G4ReactionProdu
|
||||
aNew->SetMomentum(kt->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy(kt->Get4Momentum().e());
|
||||
aNew->SetNewlyAdded(kt->IsParticipant());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
products->push_back(aNew);
|
||||
|
||||
#ifdef debug_BIC_Propagate_finals
|
||||
@@ -2568,6 +2556,7 @@ G4Fragment * G4BinaryCascade::FindFragments()
|
||||
//GF fragment->SetNumberOfParticles(excitons-holes);
|
||||
fragment->SetNumberOfParticles(excitons);
|
||||
fragment->SetNumberOfCharged(zCaptured);
|
||||
fragment->SetCreatorModelID(theBIC_ID);
|
||||
|
||||
return fragment;
|
||||
}
|
||||
@@ -2731,7 +2720,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate1H1(
|
||||
G4ReactionProduct * aNew = new G4ReactionProduct(kt->GetDefinition());
|
||||
aNew->SetMomentum(kt->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy(kt->Get4Momentum().e());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
products->push_back(aNew);
|
||||
#ifdef debug_H1_BinaryCascade
|
||||
if (! kt->GetDefinition()->GetPDGStable() )
|
||||
@@ -2906,7 +2895,7 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
|
||||
G4ReactionProduct * aNew = new G4ReactionProduct((*iter)->GetDefinition());
|
||||
aNew->SetMomentum((*iter)->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
Esecondaries +=(*iter)->Get4Momentum().e();
|
||||
psecondaries +=(*iter)->Get4Momentum();
|
||||
aNew->SetNewlyAdded(true);
|
||||
@@ -2930,8 +2919,7 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
|
||||
G4ReactionProduct * aNew = new G4ReactionProduct(atrack->GetDefinition());
|
||||
aNew->SetMomentum(atrack->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy(atrack->Get4Momentum().e());
|
||||
// FIXME: should take creator model from atrack:
|
||||
// aNew->SetCreatorModel(atrack->GetCreatorModel());
|
||||
aNew->SetCreatorModelID(atrack->GetCreatorModelID());
|
||||
Esecondaries +=atrack->Get4Momentum().e();
|
||||
psecondaries +=atrack->Get4Momentum();
|
||||
aNew->SetNewlyAdded(true);
|
||||
@@ -2960,7 +2948,7 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
|
||||
(*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
|
||||
aNew->SetMomentum((*iter)->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
Esecondaries +=(*iter)->Get4Momentum().e();
|
||||
psecondaries +=(*iter)->Get4Momentum();
|
||||
if ( (*iter)->IsParticipant() ) aNew->SetNewlyAdded(true);
|
||||
@@ -2974,7 +2962,7 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
|
||||
(*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
|
||||
aNew->SetMomentum((*iter)->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
Esecondaries +=(*iter)->Get4Momentum().e();
|
||||
psecondaries +=(*iter)->Get4Momentum();
|
||||
aNew->SetNewlyAdded(true);
|
||||
@@ -3033,7 +3021,7 @@ G4ReactionProductVector * G4BinaryCascade::FillVoidNucleusProducts(G4ReactionPro
|
||||
aNew->SetKineticEnergy(Ekinetic);
|
||||
aNew->SetMomentum(aNew->GetTotalMomentum() * ((*iter)->Get4Momentum().vect().unit()));
|
||||
aNew->SetNewlyAdded(true);
|
||||
aNew->SetCreatorModel(theBIC_ID);
|
||||
aNew->SetCreatorModelID(theBIC_ID);
|
||||
products->push_back(aNew);
|
||||
Esecondaries += aNew->GetTotalEnergy();
|
||||
psecondaries += G4LorentzVector(aNew->GetMomentum(),aNew->GetTotalEnergy() );
|
||||
@@ -3084,9 +3072,7 @@ G4ReactionProductVector * G4BinaryCascade::HighEnergyModelFSProducts(G4ReactionP
|
||||
aNew->SetMomentum((*iter)->Get4Momentum().vect());
|
||||
aNew->SetTotalEnergy((*iter)->Get4Momentum().e());
|
||||
aNew->SetNewlyAdded(true);
|
||||
// FixMe: should take creator model from atrack:
|
||||
// aNew->SetCreatorModel(atrack->GetCreatorModel());
|
||||
|
||||
aNew->SetCreatorModelID((*iter)->GetCreatorModelID());
|
||||
//G4cout << " Particle Ekin " << aNew->GetKineticEnergy() << G4endl;
|
||||
products->push_back(aNew);
|
||||
}
|
||||
@@ -3111,8 +3097,7 @@ G4ReactionProductVector * G4BinaryCascade::HighEnergyModelFSProducts(G4ReactionP
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(fragment);
|
||||
theNew->SetMomentum(G4ThreeVector(0,0,0));
|
||||
theNew->SetTotalEnergy(massInNucleus);
|
||||
// FixMe: should take creator model from ???:
|
||||
// aNew->SetCreatorModel(???->GetCreatorModel());
|
||||
theNew->SetCreatorModelID(theBIC_ID);
|
||||
//theNew->SetFormationTime(??0.??);
|
||||
//G4cout << " Nucleus (" << currentZ << ","<< currentA << "), mass "<< massInNucleus << G4endl;
|
||||
products->push_back(theNew);
|
||||
|
||||
@@ -43,12 +43,9 @@
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4HadronicInteractionRegistry.hh"
|
||||
#include "G4Log.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4Mutex G4BinaryLightIonReaction::BLIRMutex = G4MUTEX_INITIALIZER;
|
||||
#endif
|
||||
G4int G4BinaryLightIonReaction::theBLIR_ID = -1;
|
||||
|
||||
G4int G4BinaryLightIonReaction::theBLIR_ID = -1;
|
||||
|
||||
//#define debug_G4BinaryLightIonReaction
|
||||
//#define debug_BLIR_finalstate
|
||||
@@ -69,19 +66,7 @@ G4BinaryLightIonReaction::G4BinaryLightIonReaction(G4VPreCompoundModel* ptr)
|
||||
}
|
||||
theModel = new G4BinaryCascade(theProjectileFragmentation);
|
||||
theHandler = theProjectileFragmentation->GetExcitationHandler();
|
||||
if ( theBLIR_ID == -1 ) {
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MUTEXLOCK(&G4BinaryLightIonReaction::BLIRMutex);
|
||||
if ( theBLIR_ID == -1 ) {
|
||||
#endif
|
||||
theBLIR_ID = G4PhysicsModelCatalog::Register("Binary Light Ion Reaction");
|
||||
#ifdef G4MULTITHREADED
|
||||
}
|
||||
G4MUTEXUNLOCK(&G4BinaryLightIonReaction::BLIRMutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
theBLIR_ID = G4PhysicsModelCatalog::GetModelID("model_G4BinaryLightIonReaction");
|
||||
debug_G4BinaryLightIonReactionResults=std::getenv("debug_G4BinaryLightIonReactionResults")!=0;
|
||||
}
|
||||
|
||||
@@ -332,7 +317,8 @@ ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
|
||||
G4double time = 0; //(*iter)->GetCreationTime();
|
||||
//if(time < 0.0) { time = 0.0; }
|
||||
aNew.SetTime(timePrimary + time);
|
||||
aNew.SetCreatorModelType((*iter)->GetCreatorModel());
|
||||
//aNew.SetCreatorModelID((*iter)->GetCreatorModelID()); //AR-02Aug2021 : For some reasons, it does NOT work!
|
||||
aNew.SetCreatorModelID(theBLIR_ID);
|
||||
|
||||
theResult.AddSecondary(aNew);
|
||||
ptot += tmp;
|
||||
|
||||
+116
-43
@@ -33,6 +33,10 @@
|
||||
//
|
||||
// M.Kelsey, 28 Jul 2011 -- Replace loop to decay input secondaries
|
||||
// with new utility class, simplify cleanup loops
|
||||
//
|
||||
// A.Ribon, 27 Oct 2021 -- Extended the method PropagateNuclNucl
|
||||
// to deal with projectile hypernuclei and anti-hypernuclei
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <algorithm>
|
||||
@@ -61,6 +65,20 @@
|
||||
#include "G4AntiHe3.hh"
|
||||
#include "G4AntiAlpha.hh"
|
||||
|
||||
#include "G4HyperTriton.hh"
|
||||
#include "G4HyperH4.hh"
|
||||
#include "G4HyperAlpha.hh"
|
||||
#include "G4HyperHe5.hh"
|
||||
#include "G4DoubleHyperH4.hh"
|
||||
#include "G4DoubleHyperDoubleNeutron.hh"
|
||||
|
||||
#include "G4AntiHyperTriton.hh"
|
||||
#include "G4AntiHyperH4.hh"
|
||||
#include "G4AntiHyperAlpha.hh"
|
||||
#include "G4AntiHyperHe5.hh"
|
||||
#include "G4AntiDoubleHyperH4.hh"
|
||||
#include "G4AntiDoubleHyperDoubleNeutron.hh"
|
||||
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
@@ -69,6 +87,8 @@
|
||||
#include "G4DecayKineticTracks.hh"
|
||||
#include "G4HadronicInteractionRegistry.hh"
|
||||
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
#include "G4HyperNucleiProperties.hh"
|
||||
//---------------------------------------------------------------------
|
||||
#include "Randomize.hh"
|
||||
#include "G4Log.hh"
|
||||
@@ -76,7 +96,7 @@
|
||||
//#define debugPrecoInt
|
||||
|
||||
G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel* preModel)
|
||||
: CaptureThreshold(70*MeV), DeltaM(5.0*MeV), DeltaR(0.0)
|
||||
: CaptureThreshold(70*MeV), DeltaM(5.0*MeV), DeltaR(0.0), secID(-1)
|
||||
{
|
||||
proton = G4Proton::Proton();
|
||||
neutron = G4Neutron::Neutron();
|
||||
@@ -102,6 +122,8 @@ G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundM
|
||||
if(!pre) { pre = new G4PreCompoundModel(); }
|
||||
SetDeExcitation(pre);
|
||||
}
|
||||
|
||||
secID = G4PhysicsModelCatalog::GetModelID("model_PRECO");
|
||||
}
|
||||
|
||||
G4GeneratorPrecompoundInterface::~G4GeneratorPrecompoundInterface()
|
||||
@@ -125,7 +147,7 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
|
||||
G4cout<<"Final stable particles number "<<theSecondaries->size()<<G4endl;
|
||||
#endif
|
||||
|
||||
// prepare the fragment
|
||||
// prepare the fragment (it is assumed that target nuclei are never hypernuclei)
|
||||
G4int anA=theNucleus->GetMassNumber();
|
||||
G4int aZ=theNucleus->GetCharge();
|
||||
// G4double TargetNucleusMass = G4NucleiProperties::GetNuclearMass(anA, aZ);
|
||||
@@ -153,6 +175,7 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(part);
|
||||
theNew->SetMomentum(mom);
|
||||
theNew->SetTotalEnergy(e);
|
||||
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
|
||||
theTotalResult->push_back(theNew);
|
||||
Secondary4Momentum += (*iter)->Get4Momentum();
|
||||
#ifdef debugPrecoInt
|
||||
@@ -164,6 +187,7 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(part);
|
||||
theNew->SetMomentum(mom);
|
||||
theNew->SetTotalEnergy(e);
|
||||
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
|
||||
theTotalResult->push_back(theNew);
|
||||
Secondary4Momentum += (*iter)->Get4Momentum();
|
||||
#ifdef debugPrecoInt
|
||||
@@ -291,30 +315,32 @@ Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// Need to de-excite the remnant nucleus only if excitation energy > 0.
|
||||
G4Fragment anInitialState(anA, aZ, exciton4Momentum);
|
||||
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
|
||||
anInitialState.SetNumberOfCharged(numberOfCh);
|
||||
anInitialState.SetNumberOfHoles(numberOfHoles);
|
||||
|
||||
G4ReactionProductVector * aPrecoResult =
|
||||
theDeExcitation->DeExcite(anInitialState);
|
||||
// fill pre-compound part into the result, and return
|
||||
// Need to de-excite the remnant nucleus only if excitation energy > 0.
|
||||
G4Fragment anInitialState(anA, aZ, exciton4Momentum);
|
||||
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
|
||||
anInitialState.SetNumberOfCharged(numberOfCh);
|
||||
anInitialState.SetNumberOfHoles(numberOfHoles);
|
||||
anInitialState.SetCreatorModelID(secID);
|
||||
|
||||
G4ReactionProductVector * aPrecoResult =
|
||||
theDeExcitation->DeExcite(anInitialState);
|
||||
// fill pre-compound part into the result, and return
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Target fragment number "<<aPrecoResult->size()<<G4endl;
|
||||
#endif
|
||||
for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
|
||||
{
|
||||
theTotalResult->push_back(aPrecoResult->operator[](ll));
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Target fragment number "<<aPrecoResult->size()<<G4endl;
|
||||
#endif
|
||||
for(unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
|
||||
{
|
||||
theTotalResult->push_back(aPrecoResult->operator[](ll));
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Fragment "<<ll<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetMomentum()<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetDefinition()->GetPDGMass()<<G4endl;
|
||||
#endif
|
||||
}
|
||||
delete aPrecoResult;
|
||||
G4cout<<"Fragment "<<ll<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetMomentum()<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetTotalEnergy()<<" "
|
||||
<<aPrecoResult->operator[](ll)->GetDefinition()->GetPDGMass()<<G4endl;
|
||||
#endif
|
||||
}
|
||||
delete aPrecoResult;
|
||||
}
|
||||
|
||||
return theTotalResult;
|
||||
@@ -350,18 +376,21 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
{
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<G4endl<<"G4GeneratorPrecompoundInterface::PropagateNuclNucl "<<G4endl;
|
||||
G4cout<<"Projectile A and Z "<<theProjectileNucleus->GetMassNumber()<<" "
|
||||
<<theProjectileNucleus->GetCharge()<<G4endl;
|
||||
G4cout<<"Projectile A and Z (and numberOfLambdas) "<<theProjectileNucleus->GetMassNumber()<<" "
|
||||
<<theProjectileNucleus->GetCharge()<<" ("
|
||||
<<theProjectileNucleus->GetNumberOfLambdas()<<")"<<G4endl;
|
||||
G4cout<<"Target A and Z "<<theNucleus->GetMassNumber()<<" "
|
||||
<<theNucleus->GetCharge()<<G4endl;
|
||||
<<theNucleus->GetCharge()<<" ("
|
||||
<<theNucleus->GetNumberOfLambdas()<<")"<<G4endl;
|
||||
G4cout<<"Directly produced particles number "<<theSecondaries->size()<<G4endl;
|
||||
G4cout<<"Projectile 4Mom and mass "<<GetPrimaryProjectile()->Get4Momentum()<<" "
|
||||
<<GetPrimaryProjectile()->Get4Momentum().mag()<<G4endl<<G4endl;
|
||||
#endif
|
||||
|
||||
// prepare the target residual
|
||||
// prepare the target residual (assumed to be never a hypernucleus)
|
||||
G4int anA=theNucleus->GetMassNumber();
|
||||
G4int aZ=theNucleus->GetCharge();
|
||||
//G4int aL=theNucleus->GetNumberOfLambdas(); // Should be 0
|
||||
G4int numberOfEx = 0;
|
||||
G4int numberOfCh = 0;
|
||||
G4int numberOfHoles = 0;
|
||||
@@ -369,7 +398,7 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
G4double R = theNucleus->GetNuclearRadius();
|
||||
G4LorentzVector Target4Momentum(0.,0.,0.,0.);
|
||||
|
||||
// loop over wounded target nucleus
|
||||
// loop over the wounded target nucleus
|
||||
G4Nucleon * theCurrentNucleon =
|
||||
theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
|
||||
while(theCurrentNucleon) /* Loop checking, 31.08.2015, G.Folger */
|
||||
@@ -387,11 +416,11 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
}
|
||||
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Residual Target A Z E* 4mom "<<anA<<" "<<aZ<<" "<<exEnergy<<" "
|
||||
<<Target4Momentum<<G4endl;
|
||||
G4cout<<"Residual Target A Z (numberOfLambdas) E* 4mom "<<anA<<" "<<aZ<<" (0"//<<aL
|
||||
<<") "<<exEnergy<<" "<<Target4Momentum<<G4endl;
|
||||
#endif
|
||||
|
||||
// prepare the projectile residual
|
||||
// prepare the projectile residual - which can be a hypernucleus or anti-hypernucleus
|
||||
|
||||
G4bool ProjectileIsAntiNucleus=
|
||||
GetPrimaryProjectile()->GetDefinition()->GetBaryonNumber() < -1;
|
||||
@@ -400,6 +429,7 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
|
||||
G4int anAb=theProjectileNucleus->GetMassNumber();
|
||||
G4int aZb=theProjectileNucleus->GetCharge();
|
||||
G4int aLb=theProjectileNucleus->GetNumberOfLambdas(); // Non negative number of (anti-)lambdas in (anti-)nucleus
|
||||
G4int numberOfExB = 0;
|
||||
G4int numberOfChB = 0;
|
||||
G4int numberOfHolesB = 0;
|
||||
@@ -407,7 +437,7 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
G4double Rb = theProjectileNucleus->GetNuclearRadius();
|
||||
G4LorentzVector Projectile4Momentum(0.,0.,0.,0.);
|
||||
|
||||
// loop over wounded projectile nucleus
|
||||
// loop over the wounded projectile nucleus or anti-nucleus
|
||||
theCurrentNucleon =
|
||||
theProjectileNucleus->StartLoop() ? theProjectileNucleus->GetNextNucleon() : 0;
|
||||
while(theCurrentNucleon) /* Loop checking, 31.08.2015, G.Folger */
|
||||
@@ -419,9 +449,11 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
if(!ProjectileIsAntiNucleus) {
|
||||
aZb -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/
|
||||
eplus + 0.1);
|
||||
if (theCurrentNucleon->GetParticleType()==G4Lambda::Definition()) --aLb;
|
||||
} else {
|
||||
aZb += G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/
|
||||
eplus - 0.1);
|
||||
if (theCurrentNucleon->GetParticleType()==G4AntiLambda::Definition()) --aLb;
|
||||
}
|
||||
exEnergyB += theCurrentNucleon->GetBindingEnergy();
|
||||
Projectile4Momentum -=theCurrentNucleon->Get4Momentum();
|
||||
@@ -435,8 +467,8 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
0.3*G4double (numberOfHolesB + anAb);
|
||||
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Projectile residual A Z E* 4mom "<<anAb<<" "<<aZb<<" "<<exEnergyB<<" "
|
||||
<<Projectile4Momentum<<G4endl;
|
||||
G4cout<<"Projectile residual A Z (numberOfLambdas) E* 4mom "<<anAb<<" "<<aZb<<" ("<<aLb
|
||||
<<") "<<exEnergyB<<" "<<Projectile4Momentum<<G4endl;
|
||||
G4cout<<" ExistTargetRemnant ExistProjectileRemnant "
|
||||
<<ExistTargetRemnant<<" "<< ExistProjectileRemnant<<G4endl;
|
||||
#endif
|
||||
@@ -456,7 +488,14 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
G4int SecondrNum(0);
|
||||
#endif
|
||||
|
||||
// loop over secondaries
|
||||
// Loop over secondaries.
|
||||
// We are assuming that only protons and neutrons - for nuclei -
|
||||
// and only antiprotons and antineutrons - for antinuclei - can be absorbed,
|
||||
// not instead lambdas (or hyperons more generally) - for nuclei - or anti-lambdas
|
||||
// (or anti-hyperons more generally) - for antinuclei. This is a simplification,
|
||||
// to be eventually reviewed later on, in particular when generic hypernuclei and
|
||||
// anti-hypernuclei are introduced, instead of the few light hypernuclei and
|
||||
// anti-hypernuclei which currently exist in Geant4.
|
||||
G4KineticTrackVector::iterator iter;
|
||||
for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
|
||||
{
|
||||
@@ -470,6 +509,7 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(part);
|
||||
theNew->SetMomentum(aTrack4Momentum.vect());
|
||||
theNew->SetTotalEnergy(aTrack4Momentum.e());
|
||||
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
|
||||
theTotalResult->push_back(theNew);
|
||||
#ifdef debugPrecoInt
|
||||
SecondrNum++;
|
||||
@@ -564,6 +604,7 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(part);
|
||||
theNew->SetMomentum(aTrack4Momentum.vect());
|
||||
theNew->SetTotalEnergy(aTrack4Momentum.e());
|
||||
theNew->SetCreatorModelID((*iter)->GetCreatorModelID());
|
||||
theTotalResult->push_back(theNew);
|
||||
|
||||
#ifdef debugPrecoInt
|
||||
@@ -583,12 +624,13 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
//-----------------------------------------------------
|
||||
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Final target residual A Z E* 4mom "<<anA<<" "<<aZ<<" "
|
||||
<<exEnergy<<" "<<Target4Momentum<<G4endl;
|
||||
G4cout<<"Final target residual A Z (numberOfLambdas) E* 4mom "<<anA<<" "<<aZ<<" (0"//<<aL
|
||||
<<") "<<exEnergy<<" "<<Target4Momentum<<G4endl;
|
||||
#endif
|
||||
|
||||
if(0!=anA )
|
||||
{
|
||||
// We assume that the target residual is never a hypernucleus
|
||||
G4double fMass = G4NucleiProperties::GetNuclearMass(anA, aZ);
|
||||
|
||||
if((anA == theNucleus->GetMassNumber()) && (exEnergy <= 0.))
|
||||
@@ -611,6 +653,7 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
|
||||
anInitialState.SetNumberOfCharged(numberOfCh);
|
||||
anInitialState.SetNumberOfHoles(numberOfHoles);
|
||||
anInitialState.SetCreatorModelID(secID);
|
||||
|
||||
G4ReactionProductVector * aPrecoResult =
|
||||
theDeExcitation->DeExcite(anInitialState);
|
||||
@@ -639,14 +682,20 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
{Projectile4Momentum = GetPrimaryProjectile()->Get4Momentum();}
|
||||
|
||||
#ifdef debugPrecoInt
|
||||
G4cout<<"Final projectile residual A Z E* Pmom Pmag2 "<<anAb<<" "<<aZb<<" "
|
||||
<<exEnergyB<<" "<<Projectile4Momentum<<" "
|
||||
G4cout<<"Final projectile residual A Z (numberOfLambdas) E* Pmom Pmag2 "<<anAb<<" "<<aZb<<" ("
|
||||
<<aLb<<") "<<exEnergyB<<" "<<Projectile4Momentum<<" "
|
||||
<<Projectile4Momentum.mag2()<<G4endl;
|
||||
#endif
|
||||
|
||||
if(0!=anAb)
|
||||
{
|
||||
G4double fMass = G4NucleiProperties::GetNuclearMass(anAb, aZb);
|
||||
// The projectile residual can be a hypernucleus or anti-hypernucleus
|
||||
G4double fMass = 0.0;
|
||||
if ( aLb > 0 ) {
|
||||
fMass = G4HyperNucleiProperties::GetNuclearMass(anAb, aZb, aLb);
|
||||
} else {
|
||||
fMass = G4NucleiProperties::GetNuclearMass(anAb, aZb);
|
||||
}
|
||||
G4double RemnMass=Projectile4Momentum.mag();
|
||||
|
||||
if(RemnMass < fMass)
|
||||
@@ -663,10 +712,11 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
Projectile4Momentum.boost(bstToCM);
|
||||
|
||||
// Need to de-excite the remnant nucleus
|
||||
G4Fragment anInitialState(anAb, aZb, Projectile4Momentum);
|
||||
G4Fragment anInitialState(anAb, aZb, aLb, Projectile4Momentum);
|
||||
anInitialState.SetNumberOfParticles(numberOfExB-numberOfHolesB);
|
||||
anInitialState.SetNumberOfCharged(numberOfChB);
|
||||
anInitialState.SetNumberOfHoles(numberOfHolesB);
|
||||
anInitialState.SetCreatorModelID(secID);
|
||||
|
||||
G4ReactionProductVector * aPrecoResult =
|
||||
theDeExcitation->DeExcite(anInitialState);
|
||||
@@ -696,6 +746,22 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
else if(aFragment == He4) {LastFragment=G4AntiAlpha::AntiAlphaDefinition();}
|
||||
else {}
|
||||
|
||||
if (aLb > 0) { // Anti-hypernucleus
|
||||
if (aFragment == G4HyperTriton::Definition()) {
|
||||
LastFragment=G4AntiHyperTriton::Definition();
|
||||
} else if (aFragment == G4HyperH4::Definition()) {
|
||||
LastFragment=G4AntiHyperH4::Definition();
|
||||
} else if (aFragment == G4HyperAlpha::Definition()) {
|
||||
LastFragment=G4AntiHyperAlpha::Definition();
|
||||
} else if (aFragment == G4HyperHe5::Definition()) {
|
||||
LastFragment=G4AntiHyperHe5::Definition();
|
||||
} else if (aFragment == G4DoubleHyperH4::Definition()) {
|
||||
LastFragment=G4AntiDoubleHyperH4::Definition();
|
||||
} else if (aFragment == G4DoubleHyperDoubleNeutron::Definition()) {
|
||||
LastFragment=G4AntiDoubleHyperDoubleNeutron::Definition();
|
||||
}
|
||||
}
|
||||
|
||||
aPrecoResult->operator[](ll)->SetDefinitionAndUpdateE(LastFragment);
|
||||
}
|
||||
|
||||
@@ -718,7 +784,13 @@ PropagateNuclNucl(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus
|
||||
|
||||
|
||||
void G4GeneratorPrecompoundInterface::MakeCoalescence(G4KineticTrackVector *tracks) {
|
||||
|
||||
// This method replaces pairs of proton-neutron - in the case of nuclei - or
|
||||
// antiproton-antineutron - in the case of anti-nuclei - which are close in
|
||||
// momentum, with, respectively, deuterons and anti-deuterons.
|
||||
// Note that in the case of hypernuclei or anti-hypernuclei, lambdas or anti-lambdas
|
||||
// are not considered for coalescence because hyper-deuteron or anti-hyper-deuteron
|
||||
// are assumed not to exist.
|
||||
|
||||
if (!tracks) return;
|
||||
|
||||
G4double MassCut = deuteron->GetPDGMass() + DeltaM; // In MeV
|
||||
@@ -748,6 +820,7 @@ void G4GeneratorPrecompoundInterface::MakeCoalescence(G4KineticTrackVector *trac
|
||||
(trackP->GetFormationTime() + trackN->GetFormationTime())/2.0,
|
||||
(trackP->GetPosition() + trackN->GetPosition() )/2.0,
|
||||
( Prot4Mom + Neut4Mom ));
|
||||
aDeuteron->SetCreatorModelID(secID);
|
||||
tracks->push_back(aDeuteron);
|
||||
delete trackP; delete trackN;
|
||||
(*tracks)[i] = nullptr; (*tracks)[j] = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user