79: CaptureThreshold(70*MeV), DeltaM(5.0*MeV), DeltaR(0.0)
117 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
125 G4cout<<
"Final stable particles number "<<theSecondaries->size()<<
G4endl;
133 G4int numberOfEx = 0;
134 G4int numberOfCh = 0;
135 G4int numberOfHoles = 0;
144 G4KineticTrackVector::iterator iter;
145 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
148 G4double e = (*iter)->Get4Momentum().e();
149 G4double mass = (*iter)->Get4Momentum().mag();
151 if((part != proton && part != neutron) ||
152 ((*iter)->GetPosition().mag() > R)) {
156 theTotalResult->push_back(theNew);
157 Secondary4Momentum += (*iter)->Get4Momentum();
160 <<(*iter)->Get4Momentum().mag()<<
G4endl;
167 theTotalResult->push_back(theNew);
168 Secondary4Momentum += (*iter)->Get4Momentum();
171 <<(*iter)->Get4Momentum().mag()<<
G4endl;
181 captured4Momentum += (*iter)->Get4Momentum();
189 delete theSecondaries;
194 while(theCurrentNucleon)
211 G4cout<<
"Sec + Captured "<<Secondary4Momentum+captured4Momentum<<
G4endl;
214 <<Secondary4Momentum + captured4Momentum + Residual4Momentum <<
G4endl;
220 while(theCurrentNucleon)
236 {
G4cout<<
"Residual 4Mom = 0 means that there were not wounded and captured nucleons"<<
G4endl;}
240 if(anA == 0)
return theTotalResult;
250 exciton4Momentum = Residual4Momentum + captured4Momentum;
253 if(ActualMass <= fMass ) {
254 exciton4Momentum.
setE(std::sqrt(exciton4Momentum.
vect().
mag2()+
sqr(fMass)));
259 if(ActualMass <= fMass ) {exEnergy = 0.;}
260 else {exEnergy = ActualMass - fMass;}
261 G4cout<<
"Ground state residual Mass "<<fMass<<
" E* "<<exEnergy<<
G4endl;
280 G4cout<<
"ResidualMass, GroundStateMass and E* "<<ActualMass<<
" "<<fMass<<
" "
281 <<ActualMass - fMass<<
G4endl;
284 if(ActualMass - fMass < 0.)
287 exciton4Momentum.
setE(ResE);
289 G4cout<<
"ActualMass - fMass < 0. "<<ActualMass<<
" "<<fMass<<
" "<<ActualMass - fMass<<
G4endl;
295 G4Fragment anInitialState(anA, aZ, exciton4Momentum);
304 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
306 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
308 theTotalResult->push_back(aPrecoResult->operator[](ll));
310 G4cout<<
"Fragment "<<ll<<
" "
311 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
312 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
313 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
314 <<aPrecoResult->operator[](ll)->GetDefinition()->GetPDGMass()<<
G4endl;
320 return theTotalResult;
326 G4cout <<
"G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
328 G4cout <<
"This class is only a mediator between generator and precompound"<<
G4endl;
329 G4cout <<
"Please remove from your physics list."<<
G4endl;
330 throw G4HadronicException(__FILE__, __LINE__,
"SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
335 outFile <<
"G4GeneratorPrecompoundInterface interfaces a high\n"
336 <<
"energy model through the wounded nucleus to precompound de-excitation.\n"
337 <<
"Low energy protons and neutron present among secondaries produced by \n"
338 <<
"the high energy generator and within the nucleus are captured. The wounded\n"
339 <<
"nucleus and the captured particles form an excited nuclear fragment. This\n"
340 <<
"fragment is passed to the Geant4 pre-compound model for de-excitation.\n"
341 <<
"Nuclear de-excitation:\n";
357 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
365 G4int numberOfEx = 0;
366 G4int numberOfCh = 0;
367 G4int numberOfHoles = 0;
375 while(theCurrentNucleon)
390 G4cout<<
"Residual Target A Z E* 4mom "<<anA<<
" "<<aZ<<
" "<<exEnergy<<
" "
391 <<Target4Momentum<<
G4endl;
396 G4bool ProjectileIsAntiNucleus=
403 G4int numberOfExB = 0;
404 G4int numberOfChB = 0;
405 G4int numberOfHolesB = 0;
413 while(theCurrentNucleon)
419 if(!ProjectileIsAntiNucleus) {
427 Projectile4Momentum -=theCurrentNucleon->
Get4Momentum();
433 0.3*
G4double (numberOfHoles + anA);
435 0.3*
G4double (numberOfHolesB + anAb);
438 G4cout<<
"Projectile residual A Z E* 4mom "<<anAb<<
" "<<aZb<<
" "<<exEnergyB<<
" "
439 <<Projectile4Momentum<<
G4endl;
440 G4cout<<
" ExistTargetRemnant ExistProjectileRemnant "
441 <<ExistTargetRemnant<<
" "<< ExistProjectileRemnant<<
G4endl;
451 G4cout<<
"Secondary stable particles number "<<theSecondaries->size()<<
G4endl;
460 G4KineticTrackVector::iterator iter;
461 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
466 if( part != proton && part != neutron &&
467 (part != ANTIproton && ProjectileIsAntiNucleus) &&
468 (part != ANTIneutron && ProjectileIsAntiNucleus) )
473 theTotalResult->push_back(theNew);
476 secondary4Momemtum += (*iter)->Get4Momentum();
477 G4cout<<
"Secondary "<<SecondrNum<<
" "
486 G4bool CanBeCapturedByTarget =
false;
487 if( part == proton || part == neutron)
489 CanBeCapturedByTarget = ExistTargetRemnant &&
491 (aTrack4Momentum + Target4Momentum).mag() -
492 aTrack4Momentum.
mag() - Target4Momentum.
mag()) &&
493 ((*iter)->GetPosition().mag() < R);
496 G4LorentzVector Position((*iter)->GetPosition(), (*iter)->GetFormationTime());
499 G4bool CanBeCapturedByProjectile =
false;
501 if( !ProjectileIsAntiNucleus &&
502 ( part == proton || part == neutron))
504 CanBeCapturedByProjectile = ExistProjectileRemnant &&
506 (aTrack4Momentum + Projectile4Momentum).mag() -
507 aTrack4Momentum.
mag() - Projectile4Momentum.
mag()) &&
508 (Position.vect().mag() < Rb);
511 if( ProjectileIsAntiNucleus &&
512 ( part == ANTIproton || part == ANTIneutron))
514 CanBeCapturedByProjectile = ExistProjectileRemnant &&
516 (aTrack4Momentum + Projectile4Momentum).mag() -
517 aTrack4Momentum.
mag() - Projectile4Momentum.
mag()) &&
518 (Position.vect().mag() < Rb);
521 if(CanBeCapturedByTarget && CanBeCapturedByProjectile)
524 { CanBeCapturedByTarget =
true; CanBeCapturedByProjectile =
false;}
526 { CanBeCapturedByTarget =
false; CanBeCapturedByProjectile =
true;}
529 if(CanBeCapturedByTarget)
536 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
543 Target4Momentum +=aTrack4Momentum;
545 }
else if(CanBeCapturedByProjectile)
552 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
557 if( ProjectileIsAntiNucleus ) Z=-Z;
560 Projectile4Momentum +=aTrack4Momentum;
567 theTotalResult->push_back(theNew);
571 secondary4Momemtum += (*iter)->Get4Momentum();
582 delete theSecondaries;
586 G4cout<<
"Final target residual A Z E* 4mom "<<anA<<
" "<<aZ<<
" "
587 <<exEnergy<<
" "<<Target4Momentum<<
G4endl;
595 {Target4Momentum.
setE(fMass);}
601 RemnMass=fMass + exEnergy;
602 Target4Momentum.
setE(std::sqrt(Target4Momentum.
vect().
mag2() +
605 { exEnergy=RemnMass-fMass;}
607 if( exEnergy < 0.) exEnergy=0.;
610 G4Fragment anInitialState(anA, aZ, Target4Momentum);
619 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
623 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
625 theTotalResult->push_back(aPrecoResult->operator[](ll));
627 G4cout<<
"Target fragment "<<ll<<
" "
628 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
629 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
630 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
631 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
638 if((anAb == theProjectileNucleus->
GetMassNumber())&& (exEnergyB <= 0.))
642 G4cout<<
"Final projectile residual A Z E* Pmom Pmag2 "<<anAb<<
" "<<aZb<<
" "
643 <<exEnergyB<<
" "<<Projectile4Momentum<<
" "
654 RemnMass=fMass + exEnergyB;
655 Projectile4Momentum.
setE(std::sqrt(Projectile4Momentum.
vect().
mag2() +
658 { exEnergyB=RemnMass-fMass;}
660 if( exEnergyB < 0.) exEnergyB=0.;
663 Projectile4Momentum.
boost(bstToCM);
666 G4Fragment anInitialState(anAb, aZb, Projectile4Momentum);
675 G4cout<<
"Projectile fragment number "<<aPrecoResult->size()<<
G4endl;
679 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
682 aPrecoResult->operator[](ll)->GetTotalEnergy());
684 aPrecoResult->operator[](ll)->SetMomentum(tmp.
vect());
685 aPrecoResult->operator[](ll)->SetTotalEnergy(tmp.
e());
687 if(ProjectileIsAntiNucleus)
699 aPrecoResult->operator[](ll)->SetDefinitionAndUpdateE(LastFragment);
703 G4cout<<
"Projectile fragment "<<ll<<
" "
704 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
705 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
706 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
707 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
710 theTotalResult->push_back(aPrecoResult->operator[](ll));
716 return theTotalResult;
726 for (
size_t i = 0; i < tracks->size(); ++i ) {
729 if ( ! trackP )
continue;
735 for (
size_t j = 0; j < tracks->size(); ++j ) {
738 if (! trackN )
continue;
743 G4double EffMass = (Prot4Mom + Neut4Mom).mag();
745 if ( EffMass <= MassCut ) {
750 ( Prot4Mom + Neut4Mom ));
751 tracks->push_back(aDeuteron);
752 delete trackP;
delete trackN;
753 (*tracks)[i] =
nullptr; (*tracks)[j] =
nullptr;
760 for (
int jj = tracks->size()-1; jj >= 0; --jj ) {
761 if ( ! (*tracks)[jj] ) tracks->erase(tracks->begin()+jj);
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
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 G4AntiHe3 * AntiHe3()
static G4AntiHe3 * AntiHe3Definition()
static G4AntiNeutron * AntiNeutronDefinition()
static G4AntiNeutron * AntiNeutron()
static G4AntiProton * AntiProton()
static G4AntiProton * AntiProtonDefinition()
static G4AntiTriton * AntiTriton()
static G4AntiTriton * AntiTritonDefinition()
static G4Deuteron * Deuteron()
void SetNumberOfCharged(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)
virtual ~G4GeneratorPrecompoundInterface()
virtual G4ReactionProductVector * PropagateNuclNucl(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus, G4V3DNucleus *theProjectileNucleus)
virtual void PropagateModelDescription(std::ostream &) const
G4GeneratorPrecompoundInterface(G4VPreCompoundModel *p=0)
void MakeCoalescence(G4KineticTrackVector *theSecondaries)
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
G4double GetFormationTime() const
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
static G4Neutron * Neutron()
static G4double GetNuclearMass(const G4double A, const G4double Z)
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 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
G4ThreeVector GetMomentum() const
static G4Triton * Triton()
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=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