Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
G4FermiFragmentsPool Class Reference

#include <G4FermiFragmentsPool.hh>

Public Member Functions

 ~G4FermiFragmentsPool ()
 
const std::vector
< G4FermiConfiguration * > * 
GetConfigurationList (G4int Z, G4int A, G4double mass)
 
const G4VFermiFragmentGetFragment (G4int Z, G4int A)
 
G4int GetMaxZ () const
 
G4int GetMaxA () const
 

Static Public Member Functions

static G4FermiFragmentsPoolInstance ()
 

Detailed Description

Definition at line 43 of file G4FermiFragmentsPool.hh.

Constructor & Destructor Documentation

G4FermiFragmentsPool::~G4FermiFragmentsPool ( )

Definition at line 73 of file G4FermiFragmentsPool.cc.

References G4InuclParticleNames::nn.

74 {
75  for(size_t i=0; i<17; ++i) {
76  size_t nn = list1[i].size();
77  if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list1[i])[j]; }}
78  nn = list2[i].size();
79  if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list2[i])[j]; }}
80  nn = list3[i].size();
81  if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list3[i])[j]; }}
82  nn = list4[i].size();
83  if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list4[i])[j]; }}
84  }
85  size_t nn = listextra.size();
86  if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete listextra[j]; }}
87  nn = fragment_pool.size();
88  if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete fragment_pool[j]; }}
89 }

Member Function Documentation

const std::vector< G4FermiConfiguration * > * G4FermiFragmentsPool::GetConfigurationList ( G4int  Z,
G4int  A,
G4double  mass 
)

Definition at line 449 of file G4FermiFragmentsPool.cc.

References G4cout, G4endl, G4FermiConfiguration::GetA(), G4FermiConfiguration::GetFragmentList(), G4FermiConfiguration::GetMass(), G4NucleiProperties::GetNuclearMass(), G4FermiConfiguration::GetZ(), python.hepunit::GeV, python.hepunit::neutron_mass_c2, python.hepunit::proton_mass_c2, and test::v.

450 {
451  //JMQ 040511 for printing the total number of configurations for a given A
452  G4int nconf=0;
453 
454  std::vector<G4FermiConfiguration*>* v = new std::vector<G4FermiConfiguration*>;
455  if(Z >= maxZ || A >= maxA) { return v; }
456 
457  //G4cout << "G4FermiFragmentsPool::GetConfigurationList:"
458  // << " Z= " << Z << " A= " << A << " Mass(GeV)= " << mass/GeV<< G4endl;
459 
460  // look into pair list
461  size_t nz = list2[A].size();
462  if(0 < nz) {
463  for(size_t j=0; j<nz; ++j) {
464  G4FermiConfiguration* conf = (list2[A])[j];
465  if(Z == conf->GetZ() && mass >= conf->GetMass()) {
466  v->push_back(conf);
467  ++nconf;
468  }
469  //if(Z == conf->GetZ()) {
470  //G4cout << "Pair dM(MeV)= " << mass - conf->GetMass() << G4endl; }
471  }
472  }
473  // look into triple list
474  nz = list3[A].size();
475  if(0 < nz) {
476  for(size_t j=0; j<nz; ++j) {
477  G4FermiConfiguration* conf = (list3[A])[j];
478  if(Z == conf->GetZ() && mass >= conf->GetMass()) {
479  v->push_back(conf);
480  ++nconf;
481  }
482  //if(Z == conf->GetZ()) {
483  //G4cout << "Triple dM(MeV)= " << mass - conf->GetMass() << G4endl; }
484  }
485  }
486  // look into quartet list
487  nz = list4[A].size();
488  if(0 < nz) {
489  for(size_t j=0; j<nz; ++j) {
490  G4FermiConfiguration* conf = (list4[A])[j];
491  if(Z == conf->GetZ() && mass >= conf->GetMass()) {
492  v->push_back(conf);
493  ++nconf;
494  }
495  //if(Z == conf->GetZ()) {
496  // G4cout << "Quartet dM(MeV)= " << mass - conf->GetMass() << G4endl; }
497  }
498  }
499  // return if vector not empty
500  if(0 < v->size()) {
501  if(verbose > 0) {
503  G4cout<<"Total number of configurations = "<<nconf<<" for A= "
504  <<A<<" Z= "<<Z<<" E*= "<< ExEn<<" MeV"<<G4endl;
505  size_t size_vector_conf = v->size();
506  for(size_t jc=0; jc<size_vector_conf; ++jc) {
507  std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
508  size_t size_vector_fragments = v_frag.size();
509  G4cout<<size_vector_fragments<<"-body configuration "<<jc+1<<": ";
510  for(size_t jf=0;jf<size_vector_fragments;++jf){
511  G4int af= v_frag[jf]->GetA();
512  G4int zf= v_frag[jf]->GetZ();
513  G4double ex=v_frag[jf]->GetExcitationEnergy();
514  G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<") ";
515  }
516  G4cout<<G4endl;
517  G4cout<<"-----------------------------------------------------"<<G4endl;
518  }
519  }
520  return v;
521  }
522 
523  // search in the pool and if found then return vector with one element
524  nz = list1[A].size();
525  G4FermiConfiguration* conf1 = 0;
526  if(0 < nz) {
527  for(size_t j=0; j<nz; ++j) {
528  G4FermiConfiguration* conf = (list1[A])[j];
529  //if(Z == conf->GetZ()) {
530  // G4cout << "Single dM(MeV)= " << mass - conf->GetMass() << G4endl; }
531 
532  if(Z == conf->GetZ() && mass >= conf->GetMass()) {
533  if(!(conf->GetFragmentList())[0]->IsStable()) {
534  ++nconf;
535  v->push_back(conf);
536  if(verbose > 0) {
538  G4cout<<"Total number of configurations = "<<nconf<<" for A= "
539  <<A<<" Z= "<<Z<<" E*= "<< ExEn<<" MeV"<<G4endl;
540  size_t size_vector_conf=v->size();
541  for(size_t jc=0; jc<size_vector_conf; ++jc) {
542  std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
543  size_t size_vector_fragments=v_frag.size();
544  G4cout<<"1 Fragment configuration "<<jc+1<<": ";
545  for(size_t jf=0;jf<size_vector_fragments;++jf){
546  G4int af= v_frag[jf]->GetA();
547  G4int zf= v_frag[jf]->GetZ();
548  G4double ex=v_frag[jf]->GetExcitationEnergy();
549  G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<") ";
550  }
551  G4cout<<G4endl;
552  G4cout<<"-----------------------------------------------------"<<G4endl;
553  }
554  }
555  return v;
556  } else {
557  conf1 = conf;
558  break;
559  }
560  }
561  }
562  }
563 
564  // search in the list of exotic configurations
565  nz = listextra.size();
566  if(0 < nz) {
567  for(size_t j=0; j<nz; ++j) {
568  G4FermiConfiguration* conf = listextra[j];
569  if(Z == conf->GetZ() && A == conf->GetA() &&
570  mass >= conf->GetMass()) {
571  ++nconf;
572  v->push_back(conf);
573  if(verbose > 0) {
575  G4cout<<"Total number of configurations = "<<nconf<<" for A= "
576  <<A<<" Z= "<<Z<<" E*= "<< ExEn<<" MeV"<<G4endl;
577  size_t size_vector_conf=v->size();
578  for(size_t jc=0; jc<size_vector_conf; ++jc) {
579  std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
580  size_t size_vector_fragments=v_frag.size();
581  G4cout<<"Found exotic configuration -> configuration "<<jc+1<<": ";
582  for(size_t jf=0;jf<size_vector_fragments;++jf){
583  G4int af= v_frag[jf]->GetA();
584  G4int zf= v_frag[jf]->GetZ();
585  G4double ex=v_frag[jf]->GetExcitationEnergy();
586  G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<") ";
587  }
588  G4cout<<G4endl;
589  G4cout<<"-----------------------------------------------------"<<G4endl;
590  }
591  }
592  return v;
593  }
594  }
595  }
596  //G4cout << "Explore dM(MeV)= "
597  // << mass - Z*proton_mass_c2 - (A-Z)*neutron_mass_c2 << G4endl;
598 
599  // add new exotic configuration
600  if(mass > Z*proton_mass_c2 + (A-Z)*neutron_mass_c2) {
601  std::vector<const G4VFermiFragment*> newvec;
602  G4int idx = 1;
603  for(G4int i=0; i<A; ++i) {
604  if(i == Z) { idx = 0; }
605  newvec.push_back(fragment_pool[idx]);
606  }
607  G4FermiConfiguration* conf = new G4FermiConfiguration(newvec);
608  listextra.push_back(conf);
609  v->push_back(conf);
610  ++nconf;
611  if(verbose > 0) {
612  G4cout<<"Total number of configurations = "<<nconf<<G4endl;
614  G4cout<<"Total number of configurations = "<<nconf<<" for A= "
615  <<A<<" Z= "<<Z<<" E*= "<< ExEn<<" MeV"<<G4endl;
616  size_t size_vector_conf=v->size();
617  for(size_t jc=0; jc<size_vector_conf; ++jc) {
618  std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
619  size_t size_vector_fragments=v_frag.size();
620  G4cout<<"New exotic configuration -> configuration "<<jc+1<<": ";
621  for(size_t jf=0;jf<size_vector_fragments;++jf){
622  G4int af= v_frag[jf]->GetA();
623  G4int zf= v_frag[jf]->GetZ();
624  G4double ex=v_frag[jf]->GetExcitationEnergy();
625  G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<") ";
626  }
627  G4cout<<G4endl;
628  G4cout<<"-----------------------------------------------------"<<G4endl;
629  }
630  }
631  return v;
632  }
633 
634  // only photon evaporation is possible
635  if(conf1) {
636  v->push_back(conf1);
637  ++nconf;
638  if(verbose > 0) {
639  G4cout<<"Total number of configurations = "<<nconf<<G4endl;
641  G4cout<<"Total number of configurations = "<<nconf<<" for A= "
642  <<A<<" Z= "<<Z<<" E*= "<< ExEn<<" MeV"<<G4endl;
643  size_t size_vector_conf=v->size();
644  for(size_t jc=0; jc<size_vector_conf; ++jc) {
645  std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
646  size_t size_vector_fragments=v_frag.size();
647  G4cout<<"Only evaporation is possible -> configuration "<<jc+1<<": ";
648  for(size_t jf=0;jf<size_vector_fragments;++jf){
649  G4int af= v_frag[jf]->GetA();
650  G4int zf= v_frag[jf]->GetZ();
651  G4double ex=v_frag[jf]->GetExcitationEnergy();
652  G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<") ";
653  }
654  G4cout<<G4endl;
655  G4cout<<"-----------------------------------------------------"<<G4endl;
656  }
657  }
658  return v;
659  }
660 
661  //failer
662  if(verbose > 0) {
663  G4cout << "G4FermiFragmentsPool::GetConfigurationList: WARNING: not "
664  << "able decay fragment Z= " << Z << " A= " << A
665  << " Mass(GeV)= " << mass/GeV<< G4endl;
666  }
667  return v;
668 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetMass() const
const std::vector< const G4VFermiFragment * > & GetFragmentList()
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
float proton_mass_c2
Definition: hepunit.py:275
float neutron_mass_c2
Definition: hepunit.py:276
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
const G4VFermiFragment * G4FermiFragmentsPool::GetFragment ( G4int  Z,
G4int  A 
)

Definition at line 717 of file G4FermiFragmentsPool.cc.

References G4FermiConfiguration::GetFragmentList(), and G4FermiConfiguration::GetZ().

Referenced by G4ExcitationHandler::BreakItUp().

718 {
719  const G4VFermiFragment* f = 0;
720  if(Z >= maxZ || A >= maxA) { return f; }
721  size_t nz = list1[A].size();
722  if(0 < nz) {
723  for(size_t j=0; j<nz; ++j) {
724  G4FermiConfiguration* conf = (list1[A])[j];
725  if(Z == conf->GetZ()) { return (conf->GetFragmentList())[0]; }
726  }
727  }
728  return f;
729 }
const std::vector< const G4VFermiFragment * > & GetFragmentList()
G4int G4FermiFragmentsPool::GetMaxA ( ) const
inline

Definition at line 102 of file G4FermiFragmentsPool.hh.

103 {
104  return maxA;
105 }
G4int G4FermiFragmentsPool::GetMaxZ ( ) const
inline

Definition at line 97 of file G4FermiFragmentsPool.hh.

98 {
99  return maxZ;
100 }
G4FermiFragmentsPool * G4FermiFragmentsPool::Instance ( void  )
static

Definition at line 56 of file G4FermiFragmentsPool.cc.

Referenced by G4ExcitationHandler::G4ExcitationHandler(), and G4FermiConfigurationList::G4FermiConfigurationList().

57 {
58  if(0 == theInstance) {
59  static G4FermiFragmentsPool pool;
60  theInstance = &pool;
61  }
62  return theInstance;
63 }

The documentation for this class was generated from the following files: