86 : icID(0),maxZForFermiBreakUp(9),maxAForFermiBreakUp(17),
87 fVerbose(1),fWarnings(0),minEForMultiFrag(1.*
CLHEP::TeV),
88 minExcitation(1.*
CLHEP::eV),maxExcitation(100.*
CLHEP::MeV),
89 isInitialised(false),isEvapLocal(true),isActive(true)
94 theMultiFragmentation =
nullptr;
95 theFermiModel =
nullptr;
96 theEvaporation =
nullptr;
97 thePhotonEvaporation =
nullptr;
98 theResults.reserve(60);
100 theEvapList.reserve(30);
111 if(fVerbose > 1) {
G4cout <<
"### New handler " <<
this <<
G4endl; }
116 delete theMultiFragmentation;
117 delete theFermiModel;
118 if(isEvapLocal) {
delete theEvaporation; }
121void G4ExcitationHandler::SetParameters()
127 if(
fDummy == param->GetDeexChannelsType()) {
133 for(
auto & elm : *table) { Zmax = std::max(Zmax, elm->GetZasInt()); }
136 minEForMultiFrag = param->GetMinExPerNucleounForMF();
137 minExcitation = param->GetMinExcitation();
138 maxExcitation = param->GetPrecoHighEnergy();
139 icID = param->GetInternalConversionID();
142 fVerbose = std::max(fVerbose, param->GetVerbose());
145 if(!theEvaporation) {
153 G4cout <<
"G4ExcitationHandler::SetParameters() done " <<
this <<
G4endl;
159 if(isInitialised) {
return; }
161 G4cout <<
"G4ExcitationHandler::Initialise() started " <<
this <<
G4endl;
165 isInitialised =
true;
177 if(ptr && ptr != theEvaporation) {
178 delete theEvaporation;
179 theEvaporation = ptr;
184 G4cout <<
"G4ExcitationHandler::SetEvaporation() for " <<
this <<
G4endl;
192 if(ptr && ptr != theMultiFragmentation) {
193 delete theMultiFragmentation;
194 theMultiFragmentation = ptr;
200 if(ptr && ptr != theFermiModel) {
201 delete theFermiModel;
210 if(ptr && ptr != thePhotonEvaporation) {
211 delete thePhotonEvaporation;
212 thePhotonEvaporation = ptr;
215 G4cout <<
"G4ExcitationHandler::SetPhotonEvaporation() " << ptr
216 <<
" for handler " <<
this <<
G4endl;
225 G4cout <<
"G4ExcitationHandler::SetDeexChannelsType " << val
226 <<
" for " <<
this <<
G4endl;
232 if(!evap) {
return; }
237 }
else if(val ==
fGEM) {
239 }
else if(val ==
fGEMVI) {
245 G4cout <<
"Number of de-excitation channels is changed to: "
255 if(!theEvaporation) { SetParameters(); }
256 return theEvaporation;
261 if(!theMultiFragmentation) { SetParameters(); }
262 return theMultiFragmentation;
267 if(!theFermiModel) { SetParameters(); }
268 return theFermiModel;
273 if(!thePhotonEvaporation) { SetParameters(); }
274 return thePhotonEvaporation;
283 G4cout <<
"@@@@@@@@@@ Start G4Excitation Handler @@@@@@@@@@@@@ " <<
G4endl;
300 if(exEnergy >
A*maxExcitation &&
A > 0) {
304 ed <<
"High excitation Fragment Z= " << Z <<
" A= " <<
A
305 <<
" Eex/A(MeV)= " << exEnergy/
A;
311 if (
A <= 1 || !isActive) {
312 theResults.push_back( theInitialStatePtr );
315 }
else if(exEnergy < minExcitation && nist->GetIsotopeAbundance(Z,
A) > 0.0) {
316 theResults.push_back( theInitialStatePtr );
321 if((
A<maxAForFermiBreakUp && Z<maxZForFermiBreakUp)
322 || exEnergy <= minEForMultiFrag*
A) {
323 theEvapList.push_back(theInitialStatePtr);
327 theTempResult = theMultiFragmentation->
BreakItUp(theInitialState);
329 theEvapList.push_back(theInitialStatePtr);
331 size_t nsec = theTempResult->size();
335 theEvapList.push_back(theInitialStatePtr);
339 G4bool deletePrimary =
true;
340 for (
auto ptr : *theTempResult) {
341 if(ptr == theInitialStatePtr) { deletePrimary =
false; }
342 SortSecondaryFragment(ptr);
344 if( deletePrimary ) {
delete theInitialStatePtr; }
346 delete theTempResult;
351 G4cout <<
"## After first step of handler " << theEvapList.size()
353 << theResults.size() <<
" results. " <<
G4endl;
359 static const G4int countmax = 1000;
361 for (kk=0; kk<theEvapList.size(); ++kk) {
369 ed <<
"Infinite loop in the de-excitation module: " << kk
371 <<
" Initial fragment: \n" << theInitialState
372 <<
"\n Current fragment: \n" << *frag;
374 ed,
"Stop execution");
381 G4cout <<
"G4ExcitationHandler# " << kk <<
" Z= " << Z <<
" A= " <<
A
387 size_t nsec = results.size();
388 if(fVerbose > 2) {
G4cout <<
"FermiBreakUp Nsec= " << nsec <<
G4endl; }
393 for(
auto & res : results) {
394 SortSecondaryFragment(res);
404 G4cout <<
"Evaporation Nsec= " << results.size() <<
G4endl;
406 if(0 == results.size()) {
407 theResults.push_back(frag);
409 SortSecondaryFragment(frag);
413 for (
auto & res : results) {
417 SortSecondaryFragment(res);
421 G4cout <<
"## After 2nd step of handler " << theEvapList.size()
423 << theResults.size() <<
" results. " <<
G4endl;
431 theReactionProductVector->reserve( theResults.size() );
434 G4cout <<
"### ExcitationHandler provides " << theResults.size()
435 <<
" evaporated products:" <<
G4endl;
437 for (
auto & frag : theResults) {
442 G4double mass = frag->GetGroundStateMass();
443 G4double ptot = (frag->GetMomentum()).vect().mag();
444 G4double etot = (frag->GetMomentum()).e();
445 G4double fac = (etot <= mass || 0.0 == ptot) ? 0.0
446 : std::sqrt((etot - mass)*(etot + mass))/ptot;
448 (frag->GetMomentum()).py()*fac,
449 (frag->GetMomentum()).pz()*fac, etot);
450 frag->SetMomentum(lv);
454 if(frag->NuclearPolarization()) {
455 G4cout <<
" " << frag->NuclearPolarization();
460 G4int fragmentA = frag->GetA_asInt();
461 G4int fragmentZ = frag->GetZ_asInt();
462 G4double etot= frag->GetMomentum().e();
465 if (fragmentA == 0) {
466 theKindOfFragment = frag->GetParticleDefinition();
467 }
else if (fragmentA == 1 && fragmentZ == 0) {
468 theKindOfFragment = theNeutron;
469 }
else if (fragmentA == 1 && fragmentZ == 1) {
470 theKindOfFragment = theProton;
471 }
else if (fragmentA == 2 && fragmentZ == 1) {
472 theKindOfFragment = theDeuteron;
473 }
else if (fragmentA == 3 && fragmentZ == 1) {
474 theKindOfFragment = theTriton;
475 }
else if (fragmentA == 3 && fragmentZ == 2) {
476 theKindOfFragment = theHe3;
477 }
else if (fragmentA == 4 && fragmentZ == 2) {
478 theKindOfFragment = theAlpha;
482 eexc = frag->GetExcitationEnergy();
483 G4int idxf = frag->GetFloatingLevelNumber();
484 if(eexc < minExcitation) {
489 theKindOfFragment = theTableOfIons->
GetIon(fragmentZ,fragmentA,eexc,
492 G4cout <<
"### EXCH: Find ion Z= " << fragmentZ
493 <<
" A= " << fragmentA
494 <<
" Eexc(MeV)= " << eexc/MeV <<
" idx= " << idxf
499 if(theKindOfFragment) {
504 if(theKindOfFragment == theElectron) { theNew->
SetCreatorModel(icID); }
505 theReactionProductVector->push_back(theNew);
511 if(theKindOfFragment) {
514 if(etot <= ionmass) {
517 G4double ptot = std::sqrt((etot - ionmass)*(etot + ionmass));
518 mom = (frag->GetMomentum().vect().unit())*ptot;
524 theReactionProductVector->push_back(theNew);
526 G4cout <<
" ground state, energy corrected E(MeV)= "
534 G4cout <<
"@@@@@@@@@@ End G4Excitation Handler "<<
G4endl;
536 return theReactionProductVector;
541 outFile <<
"G4ExcitationHandler description\n"
542 <<
"This class samples de-excitation of excited nucleus using\n"
543 <<
"Fermi Break-up model for light fragments (Z < 9, A < 17), "
544 <<
"evaporation, fission, and photo-evaporation models. Evaporated\n"
545 <<
"particle may be proton, neutron, and other light fragment \n"
546 <<
"(Z < 13, A < 29). During photon evaporation produced gamma \n"
547 <<
"or electrons due to internal conversion \n";
double A(double temperature)
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::vector< G4Fragment * > G4FragmentVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
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 GetExcitationEnergy() const
static G4He3 * He3Definition()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
static G4Neutron * NeutronDefinition()
static G4NistManager * Instance()
G4DeexPrecoParameters * GetParameters()
void UploadNuclearLevelData(G4int Z)
static G4NuclearLevelData * GetInstance()
G4double GetPDGMass() const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4Pow * GetInstance()
static G4Proton * ProtonDefinition()
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetCreatorModel(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