99 : CaptureThreshold(70*
MeV), DeltaM(5.0*
MeV), DeltaR(0.0), secID(-1)
139 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
147 G4cout<<
"Final stable particles number "<<theSecondaries->size()<<
G4endl;
155 G4int numberOfEx = 0;
156 G4int numberOfCh = 0;
157 G4int numberOfHoles = 0;
166 G4KineticTrackVector::iterator iter;
167 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
170 G4double e = (*iter)->Get4Momentum().e();
171 G4double mass = (*iter)->Get4Momentum().mag();
174 ((*iter)->GetPosition().mag() > R)) {
179 theTotalResult->push_back(theNew);
180 Secondary4Momentum += (*iter)->Get4Momentum();
183 <<(*iter)->Get4Momentum().mag()<<
G4endl;
191 theTotalResult->push_back(theNew);
192 Secondary4Momentum += (*iter)->Get4Momentum();
195 <<(*iter)->Get4Momentum().mag()<<
G4endl;
205 captured4Momentum += (*iter)->Get4Momentum();
213 delete theSecondaries;
218 while(theCurrentNucleon)
235 G4cout<<
"Sec + Captured "<<Secondary4Momentum+captured4Momentum<<
G4endl;
238 <<Secondary4Momentum + captured4Momentum + Residual4Momentum <<
G4endl;
244 while(theCurrentNucleon)
260 {
G4cout<<
"Residual 4Mom = 0 means that there were not wounded and captured nucleons"<<
G4endl;}
264 if(anA == 0)
return theTotalResult;
274 exciton4Momentum = Residual4Momentum + captured4Momentum;
277 if(ActualMass <= fMass ) {
278 exciton4Momentum.
setE(std::sqrt(exciton4Momentum.
vect().
mag2()+
sqr(fMass)));
283 if(ActualMass <= fMass ) {exEnergy = 0.;}
284 else {exEnergy = ActualMass - fMass;}
285 G4cout<<
"Ground state residual Mass "<<fMass<<
" E* "<<exEnergy<<
G4endl;
304 G4cout<<
"ResidualMass, GroundStateMass and E* "<<ActualMass<<
" "<<fMass<<
" "
305 <<ActualMass - fMass<<
G4endl;
308 if(ActualMass - fMass < 0.)
311 exciton4Momentum.
setE(ResE);
313 G4cout<<
"ActualMass - fMass < 0. "<<ActualMass<<
" "<<fMass<<
" "<<ActualMass - fMass<<
G4endl;
320 G4Fragment anInitialState(anA, aZ, exciton4Momentum);
330 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
332 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
334 theTotalResult->push_back(aPrecoResult->operator[](ll));
336 G4cout<<
"Fragment "<<ll<<
" "
337 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
338 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
339 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
340 <<aPrecoResult->operator[](ll)->GetDefinition()->GetPDGMass()<<
G4endl;
346 return theTotalResult;
352 G4cout <<
"G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
354 G4cout <<
"This class is only a mediator between generator and precompound"<<
G4endl;
355 G4cout <<
"Please remove from your physics list."<<
G4endl;
356 throw G4HadronicException(__FILE__, __LINE__,
"SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
361 outFile <<
"G4GeneratorPrecompoundInterface interfaces a high\n"
362 <<
"energy model through the wounded nucleus to precompound de-excitation.\n"
363 <<
"Low energy protons and neutron present among secondaries produced by \n"
364 <<
"the high energy generator and within the nucleus are captured. The wounded\n"
365 <<
"nucleus and the captured particles form an excited nuclear fragment. This\n"
366 <<
"fragment is passed to the Geant4 pre-compound model for de-excitation.\n"
367 <<
"Nuclear de-excitation:\n";
379 G4cout<<
"Projectile A and Z (and numberOfLambdas) "<<theProjectileNucleus->
GetMassNumber()<<
" "
380 <<theProjectileNucleus->
GetCharge()<<
" ("
385 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
394 G4int numberOfEx = 0;
395 G4int numberOfCh = 0;
396 G4int numberOfHoles = 0;
404 while(theCurrentNucleon)
419 G4cout<<
"Residual Target A Z (numberOfLambdas) E* 4mom "<<anA<<
" "<<aZ<<
" (0"
420 <<
") "<<exEnergy<<
" "<<Target4Momentum<<
G4endl;
425 G4bool ProjectileIsAntiNucleus=
433 G4int numberOfExB = 0;
434 G4int numberOfChB = 0;
435 G4int numberOfHolesB = 0;
443 while(theCurrentNucleon)
449 if(!ProjectileIsAntiNucleus) {
459 Projectile4Momentum -=theCurrentNucleon->
Get4Momentum();
465 0.3*
G4double (numberOfHoles + anA);
467 0.3*
G4double (numberOfHolesB + anAb);
470 G4cout<<
"Projectile residual A Z (numberOfLambdas) E* 4mom "<<anAb<<
" "<<aZb<<
" ("<<aLb
471 <<
") "<<exEnergyB<<
" "<<Projectile4Momentum<<
G4endl;
472 G4cout<<
" ExistTargetRemnant ExistProjectileRemnant "
473 <<ExistTargetRemnant<<
" "<< ExistProjectileRemnant<<
G4endl;
483 G4cout<<
"Secondary stable particles number "<<theSecondaries->size()<<
G4endl;
499 G4KineticTrackVector::iterator iter;
500 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
506 (part !=
ANTIproton && ProjectileIsAntiNucleus) &&
513 theTotalResult->push_back(theNew);
516 secondary4Momemtum += (*iter)->Get4Momentum();
517 G4cout<<
"Secondary "<<SecondrNum<<
" "
526 G4bool CanBeCapturedByTarget =
false;
529 CanBeCapturedByTarget = ExistTargetRemnant &&
531 (aTrack4Momentum + Target4Momentum).mag() -
532 aTrack4Momentum.
mag() - Target4Momentum.
mag()) &&
533 ((*iter)->GetPosition().mag() < R);
536 G4LorentzVector Position((*iter)->GetPosition(), (*iter)->GetFormationTime());
539 G4bool CanBeCapturedByProjectile =
false;
541 if( !ProjectileIsAntiNucleus &&
544 CanBeCapturedByProjectile = ExistProjectileRemnant &&
546 (aTrack4Momentum + Projectile4Momentum).mag() -
547 aTrack4Momentum.
mag() - Projectile4Momentum.
mag()) &&
548 (Position.vect().mag() < Rb);
551 if( ProjectileIsAntiNucleus &&
554 CanBeCapturedByProjectile = ExistProjectileRemnant &&
556 (aTrack4Momentum + Projectile4Momentum).mag() -
557 aTrack4Momentum.
mag() - Projectile4Momentum.
mag()) &&
558 (Position.vect().mag() < Rb);
561 if(CanBeCapturedByTarget && CanBeCapturedByProjectile)
564 { CanBeCapturedByTarget =
true; CanBeCapturedByProjectile =
false;}
566 { CanBeCapturedByTarget =
false; CanBeCapturedByProjectile =
true;}
569 if(CanBeCapturedByTarget)
576 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
583 Target4Momentum +=aTrack4Momentum;
585 }
else if(CanBeCapturedByProjectile)
592 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
597 if( ProjectileIsAntiNucleus )
Z=-
Z;
600 Projectile4Momentum +=aTrack4Momentum;
608 theTotalResult->push_back(theNew);
612 secondary4Momemtum += (*iter)->Get4Momentum();
623 delete theSecondaries;
627 G4cout<<
"Final target residual A Z (numberOfLambdas) E* 4mom "<<anA<<
" "<<aZ<<
" (0"
628 <<
") "<<exEnergy<<
" "<<Target4Momentum<<
G4endl;
637 {Target4Momentum.
setE(fMass);}
643 RemnMass=fMass + exEnergy;
644 Target4Momentum.
setE(std::sqrt(Target4Momentum.
vect().
mag2() +
647 { exEnergy=RemnMass-fMass;}
649 if( exEnergy < 0.) exEnergy=0.;
652 G4Fragment anInitialState(anA, aZ, Target4Momentum);
662 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
666 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
668 theTotalResult->push_back(aPrecoResult->operator[](ll));
670 G4cout<<
"Target fragment "<<ll<<
" "
671 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
672 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
673 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
674 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
681 if((anAb == theProjectileNucleus->
GetMassNumber())&& (exEnergyB <= 0.))
685 G4cout<<
"Final projectile residual A Z (numberOfLambdas) E* Pmom Pmag2 "<<anAb<<
" "<<aZb<<
" ("
686 <<aLb<<
") "<<exEnergyB<<
" "<<Projectile4Momentum<<
" "
703 RemnMass=fMass + exEnergyB;
704 Projectile4Momentum.
setE(std::sqrt(Projectile4Momentum.
vect().
mag2() +
707 { exEnergyB=RemnMass-fMass;}
709 if( exEnergyB < 0.) exEnergyB=0.;
712 Projectile4Momentum.
boost(bstToCM);
715 G4Fragment anInitialState(anAb, aZb, aLb, Projectile4Momentum);
725 G4cout<<
"Projectile fragment number "<<aPrecoResult->size()<<
G4endl;
729 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
732 aPrecoResult->operator[](ll)->GetTotalEnergy());
734 aPrecoResult->operator[](ll)->SetMomentum(tmp.
vect());
735 aPrecoResult->operator[](ll)->SetTotalEnergy(tmp.
e());
737 if(ProjectileIsAntiNucleus)
765 aPrecoResult->operator[](ll)->SetDefinitionAndUpdateE(LastFragment);
769 G4cout<<
"Projectile fragment "<<ll<<
" "
770 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
771 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
772 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
773 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
776 theTotalResult->push_back(aPrecoResult->operator[](ll));
782 return theTotalResult;
798 for (
size_t i = 0; i < tracks->size(); ++i ) {
801 if ( ! trackP )
continue;
807 for (
size_t j = 0; j < tracks->size(); ++j ) {
810 if (! trackN )
continue;
815 G4double EffMass = (Prot4Mom + Neut4Mom).mag();
817 if ( EffMass <= MassCut ) {
822 ( Prot4Mom + Neut4Mom ));
824 tracks->push_back(aDeuteron);
825 delete trackP;
delete trackN;
826 (*tracks)[i] =
nullptr; (*tracks)[j] =
nullptr;
833 for (
int jj = tracks->size()-1; jj >= 0; --jj ) {
834 if ( ! (*tracks)[jj] ) tracks->erase(tracks->begin()+jj);
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
static constexpr double eplus
static constexpr double fermi
static constexpr double MeV
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
Hep3Vector findBoostToCM() const
static G4AntiAlpha * AntiAlpha()
static G4AntiAlpha * AntiAlphaDefinition()
static G4AntiDeuteron * AntiDeuteronDefinition()
static G4AntiDeuteron * AntiDeuteron()
static G4AntiDoubleHyperDoubleNeutron * Definition()
static G4AntiDoubleHyperH4 * Definition()
static G4AntiHe3 * AntiHe3()
static G4AntiHe3 * AntiHe3Definition()
static G4AntiHyperAlpha * Definition()
static G4AntiHyperH4 * Definition()
static G4AntiHyperHe5 * Definition()
static G4AntiHyperTriton * Definition()
static G4AntiLambda * Definition()
static G4AntiNeutron * AntiNeutronDefinition()
static G4AntiNeutron * AntiNeutron()
static G4AntiProton * AntiProton()
static G4AntiProton * AntiProtonDefinition()
static G4AntiTriton * AntiTriton()
static G4AntiTriton * AntiTritonDefinition()
static G4Deuteron * Deuteron()
static G4DoubleHyperDoubleNeutron * Definition()
static G4DoubleHyperH4 * Definition()
void SetNumberOfCharged(G4int value)
void SetCreatorModelID(G4int value)
void SetNumberOfHoles(G4int valueTot, G4int valueP=0)
void SetNumberOfParticles(G4int value)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)
const G4ParticleDefinition * He3
const G4ParticleDefinition * neutron
const G4ParticleDefinition * He4
const G4ParticleDefinition * ANTItriton
const G4ParticleDefinition * deuteron
virtual ~G4GeneratorPrecompoundInterface()
virtual G4ReactionProductVector * PropagateNuclNucl(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus, G4V3DNucleus *theProjectileNucleus)
const G4ParticleDefinition * ANTIHe4
const G4ParticleDefinition * triton
const G4ParticleDefinition * ANTIHe3
const G4ParticleDefinition * proton
const G4ParticleDefinition * ANTIneutron
virtual void PropagateModelDescription(std::ostream &) const
const G4ParticleDefinition * ANTIproton
G4double CaptureThreshold
const G4ParticleDefinition * ANTIdeuteron
G4GeneratorPrecompoundInterface(G4VPreCompoundModel *p=0)
void MakeCoalescence(G4KineticTrackVector *theSecondaries)
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
static G4HyperAlpha * Definition()
static G4HyperH4 * Definition()
static G4HyperHe5 * Definition()
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
static G4HyperTriton * Definition()
G4double GetFormationTime() const
void SetCreatorModelID(G4int id)
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
static G4Lambda * Definition()
static G4Neutron * Neutron()
static G4double GetNuclearMass(const G4double A, const G4double Z)
const G4ParticleDefinition * GetParticleType() const
virtual const G4LorentzVector & Get4Momentum() const
G4double GetBindingEnergy() const
virtual const G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
const G4String & GetParticleName() const
static G4int GetModelID(const G4int modelIndex)
static G4Proton * Proton()
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
void SetCreatorModelID(const G4int mod)
G4ThreeVector GetMomentum() const
static G4Triton * Triton()
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4int GetNumberOfLambdas()=0
virtual G4bool StartLoop()=0
virtual G4double GetNuclearRadius()=0
virtual G4int GetMassNumber()=0
G4VPreCompoundModel * theDeExcitation
const G4HadProjectile * GetPrimaryProjectile() const
void SetDeExcitation(G4VPreCompoundModel *ptr)
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0
ParticleList decay(Cluster *const c)
Carries out a cluster decay.