89 : icID(0),maxZForFermiBreakUp(9),maxAForFermiBreakUp(17),
90 fVerbose(1),fWarnings(0),minEForMultiFrag(1.*
CLHEP::TeV),
91 minExcitation(1.*
CLHEP::eV),maxExcitation(100.*
CLHEP::MeV),
92 isInitialised(false),isEvapLocal(true),isActive(true)
98 theMultiFragmentation =
nullptr;
99 theFermiModel =
nullptr;
100 theEvaporation =
nullptr;
101 thePhotonEvaporation =
nullptr;
102 theResults.reserve(60);
104 theEvapList.reserve(30);
118 if(fVerbose > 1) {
G4cout <<
"### New handler " <<
this <<
G4endl; }
123 delete theMultiFragmentation;
124 delete theFermiModel;
125 if(isEvapLocal) {
delete theEvaporation; }
128void G4ExcitationHandler::SetParameters()
134 if(
fDummy == param->GetDeexChannelsType()) {
140 for(
auto & elm : *table) { Zmax = std::max(Zmax, elm->GetZasInt()); }
143 minEForMultiFrag = param->GetMinExPerNucleounForMF();
144 minExcitation = param->GetMinExcitation();
145 maxExcitation = param->GetPrecoHighEnergy();
149 fVerbose = std::max(fVerbose, param->GetVerbose());
152 if(!theEvaporation) {
160 G4cout <<
"G4ExcitationHandler::SetParameters() done " <<
this <<
G4endl;
166 if(isInitialised) {
return; }
168 G4cout <<
"G4ExcitationHandler::Initialise() started " <<
this <<
G4endl;
172 isInitialised =
true;
184 if(ptr && ptr != theEvaporation) {
185 delete theEvaporation;
186 theEvaporation = ptr;
191 G4cout <<
"G4ExcitationHandler::SetEvaporation() for " <<
this <<
G4endl;
199 if(ptr && ptr != theMultiFragmentation) {
200 delete theMultiFragmentation;
201 theMultiFragmentation = ptr;
207 if(ptr && ptr != theFermiModel) {
208 delete theFermiModel;
217 if(ptr && ptr != thePhotonEvaporation) {
218 delete thePhotonEvaporation;
219 thePhotonEvaporation = ptr;
222 G4cout <<
"G4ExcitationHandler::SetPhotonEvaporation() " << ptr
223 <<
" for handler " <<
this <<
G4endl;
232 G4cout <<
"G4ExcitationHandler::SetDeexChannelsType " << val
233 <<
" for " <<
this <<
G4endl;
239 if(!evap) {
return; }
244 }
else if(val ==
fGEM) {
246 }
else if(val ==
fGEMVI) {
252 G4cout <<
"Number of de-excitation channels is changed to: "
262 if(!theEvaporation) { SetParameters(); }
263 return theEvaporation;
268 if(!theMultiFragmentation) { SetParameters(); }
269 return theMultiFragmentation;
274 if(!theFermiModel) { SetParameters(); }
275 return theFermiModel;
280 if(!thePhotonEvaporation) { SetParameters(); }
281 return thePhotonEvaporation;
290 G4cout <<
"@@@@@@@@@@ Start G4Excitation Handler @@@@@@@@@@@@@ " <<
G4endl;
308 if(exEnergy >
A*maxExcitation &&
A > 0) {
312 ed <<
"High excitation Fragment Z= " <<
Z <<
" A= " <<
A
313 <<
" Eex/A(MeV)= " << exEnergy/
A;
324 if(
A >= 3 &&
A <= 5 && nL <= 2) {
326 if(3 ==
A && 1 == nL) {
328 }
else if(5 ==
A && 2 ==
Z && 1 == nL) {
331 if(1 ==
Z && 1 == nL) {
333 }
else if(2 ==
Z && 1 == nL) {
335 }
else if(0 ==
Z && 2 == nL) {
337 }
else if(1 ==
Z && 2 == nL) {
344 if(
nullptr != part) {
347 if ( lambdaLV.
vect().
mag() > CLHEP::eV ) {
351 G4double etot = std::max(lambdaLV.
e(), mass);
352 dir *= std::sqrt((etot - mass)*(etot + mass));
358 v->push_back(theNew);
364 lambdaF = nL*(fLambdaMass - CLHEP::neutron_mass_c2)/mass;
375 ed <<
"Fragment with negative L: Z=" <<
Z <<
" A=" <<
A <<
" L=" << nL
376 <<
" Eex/A(MeV)= " << exEnergy/
A;
382 if (
A <= 1 || !isActive) {
383 theResults.push_back( theInitialStatePtr );
386 }
else if(exEnergy < minExcitation &&
388 theResults.push_back( theInitialStatePtr );
393 if((
A<maxAForFermiBreakUp &&
Z<maxZForFermiBreakUp)
394 || exEnergy <= minEForMultiFrag*
A) {
395 theEvapList.push_back(theInitialStatePtr);
399 theTempResult = theMultiFragmentation->
BreakItUp(theInitialState);
401 theEvapList.push_back(theInitialStatePtr);
403 size_t nsec = theTempResult->size();
407 theEvapList.push_back(theInitialStatePtr);
411 G4bool deletePrimary =
true;
412 for (
auto ptr : *theTempResult) {
413 if(ptr == theInitialStatePtr) { deletePrimary =
false; }
414 SortSecondaryFragment(ptr);
416 if( deletePrimary ) {
delete theInitialStatePtr; }
418 delete theTempResult;
423 G4cout <<
"## After first step of handler " << theEvapList.size()
425 << theResults.size() <<
" results. " <<
G4endl;
431 static const G4int countmax = 1000;
433 for (kk=0; kk<theEvapList.size(); ++kk) {
441 ed <<
"Infinite loop in the de-excitation module: " << kk
443 <<
" Initial fragment: \n" << theInitialState
444 <<
"\n Current fragment: \n" << *frag;
446 ed,
"Stop execution");
453 G4cout <<
"G4ExcitationHandler# " << kk <<
" Z= " <<
Z <<
" A= " <<
A
459 size_t nsec = results.size();
460 if(fVerbose > 2) {
G4cout <<
"FermiBreakUp Nsec= " << nsec <<
G4endl; }
465 for(
auto & res : results) {
466 SortSecondaryFragment(res);
476 G4cout <<
"Evaporation Nsec= " << results.size() <<
G4endl;
478 if(0 == results.size()) {
479 theResults.push_back(frag);
481 SortSecondaryFragment(frag);
485 for (
auto & res : results) {
489 SortSecondaryFragment(res);
493 G4cout <<
"## After 2nd step of handler " << theEvapList.size()
495 << theResults.size() <<
" results. " <<
G4endl;
503 theReactionProductVector->reserve( theResults.size() );
506 G4cout <<
"### ExcitationHandler provides " << theResults.size()
507 <<
" evaporated products:" <<
G4endl;
510 if ( nL > 0 ) partOfLambdaLV = lambdaLV/(
G4double)nL;
511 for (
auto & frag : theResults) {
518 G4double mass = frag->GetGroundStateMass();
520 G4double fac = (etot <= mass || 0.0 == ptot) ? 0.0
521 : std::sqrt((etot - mass)*(etot + mass))/ptot;
523 (frag->GetMomentum()).py()*fac,
524 (frag->GetMomentum()).pz()*fac, etot);
525 frag->SetMomentum(lv);
529 if(frag->NuclearPolarization()) {
530 G4cout <<
" " << frag->NuclearPolarization();
535 G4int fragmentA = frag->GetA_asInt();
536 G4int fragmentZ = frag->GetZ_asInt();
540 if (fragmentA == 0) {
541 theKindOfFragment = frag->GetParticleDefinition();
542 }
else if (fragmentA == 1 && fragmentZ == 0) {
543 theKindOfFragment = theNeutron;
544 }
else if (fragmentA == 1 && fragmentZ == 1) {
545 theKindOfFragment = theProton;
546 }
else if (fragmentA == 2 && fragmentZ == 1) {
547 theKindOfFragment = theDeuteron;
548 }
else if (fragmentA == 3 && fragmentZ == 1) {
549 theKindOfFragment = theTriton;
553 theKindOfFragment = p;
558 }
else if (fragmentA == 3 && fragmentZ == 2) {
559 theKindOfFragment = theHe3;
560 }
else if (fragmentA == 4 && fragmentZ == 2) {
561 theKindOfFragment = theAlpha;
565 theKindOfFragment = p;
573 eexc = frag->GetExcitationEnergy();
574 G4int idxf = frag->GetFloatingLevelNumber();
575 if(eexc < minExcitation) {
580 theKindOfFragment = theTableOfIons->
GetIon(fragmentZ, fragmentA, eexc,
583 G4cout <<
"### EXCH: Find ion Z= " << fragmentZ
584 <<
" A= " << fragmentA
585 <<
" Eexc(MeV)= " << eexc/MeV <<
" idx= " << idxf
590 if(
nullptr != theKindOfFragment) {
596 etot = std::max(lv.
e(), mass);
597 G4double ptot = std::sqrt((etot - mass)*(etot + mass));
607 if(theKindOfFragment == theElectron) {
612 theReactionProductVector->push_back(theNew);
618 if(theKindOfFragment) {
621 if(etot <= ionmass) {
624 G4double ptot = std::sqrt((etot - ionmass)*(etot + ionmass));
625 mom = (frag->GetMomentum().vect().unit())*ptot;
632 theReactionProductVector->push_back(theNew);
634 G4cout <<
" ground state, energy corrected E(MeV)= "
645 if ( lambdaLV.
vect().
mag() > CLHEP::eV ) {
649 dir *= std::sqrt((etot - fLambdaMass)*(etot + fLambdaMass));
650 for(
G4int i=0; i<nL; ++i) {
656 theReactionProductVector->push_back(theNew);
660 G4cout <<
"@@@@@@@@@@ End G4Excitation Handler "<<
G4endl;
662 return theReactionProductVector;
667 outFile <<
"G4ExcitationHandler description\n"
668 <<
"This class samples de-excitation of excited nucleus using\n"
669 <<
"Fermi Break-up model for light fragments (Z < 9, A < 17), "
670 <<
"evaporation, fission, and photo-evaporation models. Evaporated\n"
671 <<
"particle may be proton, neutron, and other light fragment \n"
672 <<
"(Z < 13, A < 29). During photon evaporation produced gamma \n"
673 <<
"or electrons due to internal conversion \n";
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::vector< G4Fragment * > G4FragmentVector
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
static G4Alpha * AlphaDefinition()
static G4Deuteron * DeuteronDefinition()
static G4Electron * Electron()
static G4ElementTable * GetElementTable()
virtual void InitialiseChannels() final
void SetCombinedChannel()
G4VEvaporationChannel * GetPhotonEvaporation()
G4VEvaporation * GetEvaporation()
void SetEvaporation(G4VEvaporation *ptr, G4bool isLocal=false)
void SetFermiModel(G4VFermiBreakUp *ptr)
void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
void ModelDescription(std::ostream &outFile) const
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
void SetMultiFragmentation(G4VMultiFragmentation *ptr)
G4VMultiFragmentation * GetMultiFragmentation()
G4VFermiBreakUp * GetFermiModel()
void SetDeexChannelsType(G4DeexChannelType val)
G4double GetGroundStateMass() const
G4int GetCreatorModelID() const
G4double GetExcitationEnergy() const
const G4LorentzVector & GetMomentum() const
G4double GetCreationTime() const
G4int GetNumberOfLambdas() const
void SetZAandMomentum(const G4LorentzVector &, G4int Z, G4int A, G4int nLambdas=0)
static G4He3 * He3Definition()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
static G4Lambda * Lambda()
static G4Neutron * NeutronDefinition()
static G4NistManager * Instance()
G4double GetIsotopeAbundance(G4int Z, G4int N) const
G4DeexPrecoParameters * GetParameters()
void UploadNuclearLevelData(G4int Z)
static G4NuclearLevelData * GetInstance()
G4double GetPDGMass() const
G4IonTable * GetIonTable() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
static G4Proton * ProtonDefinition()
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetCreatorModelID(const G4int mod)
void SetFormationTime(G4double aTime)
static G4Triton * TritonDefinition()
virtual void BreakFragment(G4FragmentVector *, G4Fragment *theNucleus)
size_t GetNumberOfChannels() const
G4VEvaporationChannel * GetPhotonEvaporation()
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
void SetFermiBreakUp(G4VFermiBreakUp *ptr)
virtual void InitialiseChannels()
virtual void Initialise()=0
virtual G4bool IsApplicable(G4int Z, G4int A, G4double mass) const =0
virtual void BreakFragment(G4FragmentVector *results, G4Fragment *theNucleus)=0
void SetVerbose(G4int val)
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)=0