101 : CaptureThreshold(70*MeV), DeltaM(5.0*MeV), DeltaR(0.0), secID(-1)
142 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
150 G4cout<<
"Final stable particles number "<<theSecondaries->size()<<
G4endl;
158 G4int numberOfEx = 0;
159 G4int numberOfCh = 0;
160 G4int numberOfHoles = 0;
169 G4KineticTrackVector::iterator iter;
170 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
173 G4double e = (*iter)->Get4Momentum().e();
174 G4double mass = (*iter)->Get4Momentum().mag();
176 if((part != proton && part != neutron) ||
177 ((*iter)->GetPosition().mag() > R)) {
184 theTotalResult->push_back(theNew);
185 Secondary4Momentum += (*iter)->Get4Momentum();
188 <<(*iter)->Get4Momentum().mag()<<
G4endl;
198 theTotalResult->push_back(theNew);
199 Secondary4Momentum += (*iter)->Get4Momentum();
202 <<(*iter)->Get4Momentum().mag()<<
G4endl;
212 captured4Momentum += (*iter)->Get4Momentum();
220 delete theSecondaries;
225 while(theCurrentNucleon)
242 G4cout<<
"Sec + Captured "<<Secondary4Momentum+captured4Momentum<<
G4endl;
245 <<Secondary4Momentum + captured4Momentum + Residual4Momentum <<
G4endl;
251 while(theCurrentNucleon)
267 {
G4cout<<
"Residual 4Mom = 0 means that there were not wounded and captured nucleons"<<
G4endl;}
271 if(anA == 0)
return theTotalResult;
281 exciton4Momentum = Residual4Momentum + captured4Momentum;
284 if(ActualMass <= fMass ) {
285 exciton4Momentum.
setE(std::sqrt(exciton4Momentum.
vect().
mag2()+
sqr(fMass)));
290 if(ActualMass <= fMass ) {exEnergy = 0.;}
291 else {exEnergy = ActualMass - fMass;}
292 G4cout<<
"Ground state residual Mass "<<fMass<<
" E* "<<exEnergy<<
G4endl;
311 G4cout<<
"ResidualMass, GroundStateMass and E* "<<ActualMass<<
" "<<fMass<<
" "
312 <<ActualMass - fMass<<
G4endl;
315 if(ActualMass - fMass < 0.)
318 exciton4Momentum.
setE(ResE);
320 G4cout<<
"ActualMass - fMass < 0. "<<ActualMass<<
" "<<fMass<<
" "<<ActualMass - fMass<<
G4endl;
326 G4Fragment anInitialState(anA, aZ, exciton4Momentum);
336 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
338 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
340 theTotalResult->push_back(aPrecoResult->operator[](ll));
342 G4cout<<
"Fragment "<<ll<<
" "
343 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
344 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
345 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
346 <<aPrecoResult->operator[](ll)->GetDefinition()->GetPDGMass()<<
G4endl;
352 return theTotalResult;
358 G4cout <<
"G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
360 G4cout <<
"This class is only a mediator between generator and precompound"<<
G4endl;
361 G4cout <<
"Please remove from your physics list."<<
G4endl;
362 throw G4HadronicException(__FILE__, __LINE__,
"SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
367 outFile <<
"G4GeneratorPrecompoundInterface interfaces a high\n"
368 <<
"energy model through the wounded nucleus to precompound de-excitation.\n"
369 <<
"Low energy protons and neutron present among secondaries produced by \n"
370 <<
"the high energy generator and within the nucleus are captured. The wounded\n"
371 <<
"nucleus and the captured particles form an excited nuclear fragment. This\n"
372 <<
"fragment is passed to the Geant4 pre-compound model for de-excitation.\n"
373 <<
"Nuclear de-excitation:\n";
385 G4cout<<
"Projectile A and Z (and numberOfLambdas) "<<theProjectileNucleus->
GetMassNumber()<<
" "
386 <<theProjectileNucleus->
GetCharge()<<
" ("
391 G4cout<<
"Directly produced particles number "<<theSecondaries->size()<<
G4endl;
400 G4int numberOfEx = 0;
401 G4int numberOfCh = 0;
402 G4int numberOfHoles = 0;
410 while(theCurrentNucleon)
425 G4cout<<
"Residual Target A Z (numberOfLambdas) E* 4mom "<<anA<<
" "<<aZ<<
" (0"
426 <<
") "<<exEnergy<<
" "<<Target4Momentum<<
G4endl;
431 G4bool ProjectileIsAntiNucleus=
439 G4int numberOfExB = 0;
440 G4int numberOfChB = 0;
441 G4int numberOfHolesB = 0;
449 while(theCurrentNucleon)
455 if(!ProjectileIsAntiNucleus) {
465 Projectile4Momentum -=theCurrentNucleon->
Get4Momentum();
471 0.3*
G4double (numberOfHoles + anA);
473 0.3*
G4double (numberOfHolesB + anAb);
476 G4cout<<
"Projectile residual A Z (numberOfLambdas) E* 4mom "<<anAb<<
" "<<aZb<<
" ("<<aLb
477 <<
") "<<exEnergyB<<
" "<<Projectile4Momentum<<
G4endl;
478 G4cout<<
" ExistTargetRemnant ExistProjectileRemnant "
479 <<ExistTargetRemnant<<
" "<< ExistProjectileRemnant<<
G4endl;
489 G4cout<<
"Secondary stable particles number "<<theSecondaries->size()<<
G4endl;
505 G4KineticTrackVector::iterator iter;
506 for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
511 if( part != proton && part != neutron &&
512 (part != ANTIproton && ProjectileIsAntiNucleus) &&
513 (part != ANTIneutron && ProjectileIsAntiNucleus) )
521 theTotalResult->push_back(theNew);
524 secondary4Momemtum += (*iter)->Get4Momentum();
525 G4cout<<
"Secondary "<<SecondrNum<<
" "
534 G4bool CanBeCapturedByTarget =
false;
535 if( part == proton || part == neutron)
537 CanBeCapturedByTarget = ExistTargetRemnant &&
539 (aTrack4Momentum + Target4Momentum).mag() -
540 aTrack4Momentum.
mag() - Target4Momentum.
mag()) &&
541 ((*iter)->GetPosition().mag() < R);
544 G4LorentzVector Position((*iter)->GetPosition(), (*iter)->GetFormationTime());
547 G4bool CanBeCapturedByProjectile =
false;
549 if( !ProjectileIsAntiNucleus &&
550 ( part == proton || part == neutron))
552 CanBeCapturedByProjectile = ExistProjectileRemnant &&
554 (aTrack4Momentum + Projectile4Momentum).mag() -
555 aTrack4Momentum.
mag() - Projectile4Momentum.
mag()) &&
556 (Position.vect().mag() < Rb);
559 if( ProjectileIsAntiNucleus &&
560 ( part == ANTIproton || part == ANTIneutron))
562 CanBeCapturedByProjectile = ExistProjectileRemnant &&
564 (aTrack4Momentum + Projectile4Momentum).mag() -
565 aTrack4Momentum.
mag() - Projectile4Momentum.
mag()) &&
566 (Position.vect().mag() < Rb);
569 if(CanBeCapturedByTarget && CanBeCapturedByProjectile)
572 { CanBeCapturedByTarget =
true; CanBeCapturedByProjectile =
false;}
574 { CanBeCapturedByTarget =
false; CanBeCapturedByProjectile =
true;}
577 if(CanBeCapturedByTarget)
584 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
591 Target4Momentum +=aTrack4Momentum;
593 }
else if(CanBeCapturedByProjectile)
600 <<aTrack4Momentum<<
" "<<aTrack4Momentum.
mag()<<
G4endl;
605 if( ProjectileIsAntiNucleus )
Z=-
Z;
608 Projectile4Momentum +=aTrack4Momentum;
618 theTotalResult->push_back(theNew);
622 secondary4Momemtum += (*iter)->Get4Momentum();
633 delete theSecondaries;
637 G4cout<<
"Final target residual A Z (numberOfLambdas) E* 4mom "<<anA<<
" "<<aZ<<
" (0"
638 <<
") "<<exEnergy<<
" "<<Target4Momentum<<
G4endl;
647 {Target4Momentum.
setE(fMass);}
653 RemnMass=fMass + exEnergy;
654 Target4Momentum.
setE(std::sqrt(Target4Momentum.
vect().
mag2() +
657 { exEnergy=RemnMass-fMass;}
659 if( exEnergy < 0.) exEnergy=0.;
662 G4Fragment anInitialState(anA, aZ, Target4Momentum);
672 G4cout<<
"Target fragment number "<<aPrecoResult->size()<<
G4endl;
676 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
678 theTotalResult->push_back(aPrecoResult->operator[](ll));
680 G4cout<<
"Target fragment "<<ll<<
" "
681 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
682 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
683 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
684 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
691 if((anAb == theProjectileNucleus->
GetMassNumber())&& (exEnergyB <= 0.))
695 G4cout<<
"Final projectile residual A Z (numberOfLambdas) E* Pmom Pmag2 "<<anAb<<
" "<<aZb<<
" ("
696 <<aLb<<
") "<<exEnergyB<<
" "<<Projectile4Momentum<<
" "
713 RemnMass=fMass + exEnergyB;
714 Projectile4Momentum.
setE(std::sqrt(Projectile4Momentum.
vect().
mag2() +
717 { exEnergyB=RemnMass-fMass;}
719 if( exEnergyB < 0.) exEnergyB=0.;
722 Projectile4Momentum.
boost(bstToCM);
725 G4Fragment anInitialState(anAb, aZb, aLb, Projectile4Momentum);
735 G4cout<<
"Projectile fragment number "<<aPrecoResult->size()<<
G4endl;
739 for(
unsigned int ll=0; ll<aPrecoResult->size(); ++ll)
742 aPrecoResult->operator[](ll)->GetTotalEnergy());
744 aPrecoResult->operator[](ll)->SetMomentum(tmp.
vect());
745 aPrecoResult->operator[](ll)->SetTotalEnergy(tmp.
e());
747 if(ProjectileIsAntiNucleus)
776 aPrecoResult->operator[](ll)->SetDefinitionAndUpdateE(LastFragment);
780 G4cout<<
"Projectile fragment "<<ll<<
" "
781 <<aPrecoResult->operator[](ll)->GetDefinition()->GetParticleName()<<
" "
782 <<aPrecoResult->operator[](ll)->GetMomentum()<<
" "
783 <<aPrecoResult->operator[](ll)->GetTotalEnergy()<<
" "
784 <<aPrecoResult->operator[](ll)->GetMass()<<
G4endl;
787 theTotalResult->push_back(aPrecoResult->operator[](ll));
793 return theTotalResult;
809 for ( std::size_t i = 0; i < tracks->size(); ++i ) {
812 if ( ! trackP )
continue;
818 for ( std::size_t j = 0; j < tracks->size(); ++j ) {
821 if (! trackN )
continue;
826 G4double EffMass = (Prot4Mom + Neut4Mom).mag();
828 if ( EffMass <= MassCut ) {
833 ( Prot4Mom + Neut4Mom ));
835 tracks->push_back(aDeuteron);
836 delete trackP;
delete trackN;
837 (*tracks)[i] =
nullptr; (*tracks)[j] =
nullptr;
844 for (
G4int jj = (
G4int)tracks->size()-1; jj >= 0; --jj ) {
845 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 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 * AntiLambdaDefinition()
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)
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()
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 * Lambda()
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)
void SetParentResonanceDef(const G4ParticleDefinition *parentDef)
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
void SetCreatorModelID(const G4int mod)
G4ThreeVector GetMomentum() const
void SetParentResonanceID(const G4int parentID)
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