G4FermiFragmentsPool Class Reference

#include <G4FermiFragmentsPool.hh>


Public Member Functions

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

Static Public Member Functions

static G4FermiFragmentsPool * Instance ()


Detailed Description

Definition at line 44 of file G4FermiFragmentsPool.hh.


Constructor & Destructor Documentation

G4FermiFragmentsPool::~G4FermiFragmentsPool (  ) 

Definition at line 74 of file G4FermiFragmentsPool.cc.

References G4InuclParticleNames::nn.

00075 {
00076   for(size_t i=0; i<17; ++i) {
00077     size_t nn = list1[i].size();
00078     if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list1[i])[j]; }}
00079     nn = list2[i].size();
00080     if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list2[i])[j]; }}
00081     nn = list3[i].size();
00082     if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list3[i])[j]; }}
00083     nn = list4[i].size();
00084     if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete (list4[i])[j]; }}
00085   }
00086   size_t nn = listextra.size();
00087   if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete listextra[j]; }}
00088   nn = fragment_pool.size();
00089   if(0 < nn) { for(size_t j=0; j<nn; ++j) { delete fragment_pool[j]; }}
00090 }


Member Function Documentation

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

Definition at line 450 of file G4FermiFragmentsPool.cc.

References G4cout, G4FermiConfiguration::GetA(), G4FermiConfiguration::GetFragmentList(), G4FermiConfiguration::GetMass(), G4NucleiProperties::GetNuclearMass(), and G4FermiConfiguration::GetZ().

00451 {
00452   //JMQ 040511 for printing the total number of configurations for a given A
00453   G4int nconf=0;
00454 
00455   std::vector<G4FermiConfiguration*>* v = new std::vector<G4FermiConfiguration*>;
00456   if(Z >= maxZ || A >= maxA) { return v; }
00457 
00458   //G4cout << "G4FermiFragmentsPool::GetConfigurationList:"
00459   // << " Z= " << Z << " A= " << A << " Mass(GeV)= " << mass/GeV<< G4endl;
00460 
00461   // look into pair list
00462   size_t nz = list2[A].size();
00463   if(0 < nz) {
00464     for(size_t j=0; j<nz; ++j) {
00465       G4FermiConfiguration* conf = (list2[A])[j];
00466       if(Z == conf->GetZ() && mass >= conf->GetMass()) { 
00467         v->push_back(conf); 
00468          ++nconf;
00469       }
00470       //if(Z == conf->GetZ()) { 
00471       //G4cout << "Pair dM(MeV)= " << mass - conf->GetMass() << G4endl; }
00472     }
00473   }
00474   // look into triple list
00475   nz = list3[A].size();
00476   if(0 < nz) {
00477     for(size_t j=0; j<nz; ++j) {
00478       G4FermiConfiguration* conf = (list3[A])[j];
00479       if(Z == conf->GetZ() && mass >= conf->GetMass()) { 
00480         v->push_back(conf); 
00481         ++nconf;
00482       }
00483       //if(Z == conf->GetZ()) { 
00484       //G4cout << "Triple dM(MeV)= " << mass - conf->GetMass() << G4endl; }
00485     }
00486   }
00487   // look into quartet list
00488   nz = list4[A].size();
00489   if(0 < nz) {
00490     for(size_t j=0; j<nz; ++j) {
00491       G4FermiConfiguration* conf = (list4[A])[j];
00492       if(Z == conf->GetZ() && mass >= conf->GetMass()) { 
00493         v->push_back(conf);
00494         ++nconf; 
00495       }
00496       //if(Z == conf->GetZ()) { 
00497       //  G4cout << "Quartet dM(MeV)= " << mass - conf->GetMass() << G4endl; }
00498     }
00499   }
00500   // return if vector not empty
00501   if(0 < v->size()) { 
00502     if(verbose > 0) { 
00503       G4double ExEn= mass - G4NucleiProperties::GetNuclearMass(A,Z);
00504       G4cout<<"Total number of configurations = "<<nconf<<" for A= "
00505             <<A<<"   Z= "<<Z<<"   E*= "<< ExEn<<" MeV"<<G4endl;
00506       size_t size_vector_conf = v->size();
00507       for(size_t jc=0; jc<size_vector_conf; ++jc) {     
00508         std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
00509         size_t size_vector_fragments = v_frag.size();
00510         G4cout<<size_vector_fragments<<"-body configuration "<<jc+1<<": ";
00511         for(size_t jf=0;jf<size_vector_fragments;++jf){
00512           G4int af= v_frag[jf]->GetA();
00513           G4int zf= v_frag[jf]->GetZ();
00514           G4double ex=v_frag[jf]->GetExcitationEnergy();
00515           G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<")  ";
00516         }
00517         G4cout<<G4endl;
00518         G4cout<<"-----------------------------------------------------"<<G4endl;    
00519       }
00520     }
00521     return v; 
00522   }
00523 
00524   // search in the pool and if found then return vector with one element
00525   nz = list1[A].size();
00526   G4FermiConfiguration* conf1 = 0; 
00527   if(0 < nz) {
00528     for(size_t j=0; j<nz; ++j) {
00529       G4FermiConfiguration* conf = (list1[A])[j];
00530       //if(Z == conf->GetZ()) { 
00531       //  G4cout << "Single dM(MeV)= " << mass - conf->GetMass() << G4endl; }
00532 
00533       if(Z == conf->GetZ() && mass >= conf->GetMass()) {
00534         if(!(conf->GetFragmentList())[0]->IsStable()) {
00535           ++nconf;
00536           v->push_back(conf);
00537           if(verbose > 0) { 
00538             G4double ExEn= mass -G4NucleiProperties::GetNuclearMass(A,Z);
00539             G4cout<<"Total number of configurations = "<<nconf<<" for A= "
00540                   <<A<<"   Z= "<<Z<<"   E*= "<< ExEn<<" MeV"<<G4endl;
00541             size_t size_vector_conf=v->size();
00542             for(size_t jc=0; jc<size_vector_conf; ++jc) {     
00543               std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
00544               size_t size_vector_fragments=v_frag.size();
00545               G4cout<<"1 Fragment configuration "<<jc+1<<": ";
00546               for(size_t jf=0;jf<size_vector_fragments;++jf){
00547                 G4int af= v_frag[jf]->GetA();
00548                 G4int zf= v_frag[jf]->GetZ();
00549                 G4double ex=v_frag[jf]->GetExcitationEnergy();
00550                 G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<")  ";
00551               }
00552               G4cout<<G4endl;
00553               G4cout<<"-----------------------------------------------------"<<G4endl;    
00554             }
00555           }
00556           return v;
00557         } else {
00558           conf1 = conf;
00559           break;
00560         }
00561       }
00562     }
00563   }
00564     
00565   // search in the list of exotic configurations
00566   nz = listextra.size();
00567   if(0 < nz) {
00568     for(size_t j=0; j<nz; ++j) {
00569       G4FermiConfiguration* conf = listextra[j];
00570       if(Z == conf->GetZ() && A == conf->GetA() && 
00571          mass >= conf->GetMass()) { 
00572         ++nconf;
00573         v->push_back(conf); 
00574         if(verbose > 0) { 
00575           G4double ExEn= mass -G4NucleiProperties::GetNuclearMass(A,Z);
00576           G4cout<<"Total number of configurations = "<<nconf<<" for A= "
00577                 <<A<<"   Z= "<<Z<<"   E*= "<< ExEn<<" MeV"<<G4endl;
00578           size_t size_vector_conf=v->size();
00579           for(size_t jc=0; jc<size_vector_conf; ++jc) {     
00580             std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
00581             size_t size_vector_fragments=v_frag.size();
00582             G4cout<<"Found exotic configuration -> configuration "<<jc+1<<": ";
00583             for(size_t jf=0;jf<size_vector_fragments;++jf){
00584               G4int af= v_frag[jf]->GetA();
00585               G4int zf= v_frag[jf]->GetZ();
00586               G4double ex=v_frag[jf]->GetExcitationEnergy();
00587               G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<")  ";
00588             }
00589             G4cout<<G4endl;
00590             G4cout<<"-----------------------------------------------------"<<G4endl;    
00591           }
00592         }
00593         return v;
00594       }
00595     }
00596   }
00597   //G4cout << "Explore dM(MeV)= " 
00598   //     << mass - Z*proton_mass_c2 - (A-Z)*neutron_mass_c2 << G4endl; 
00599 
00600   // add new exotic configuration
00601   if(mass > Z*proton_mass_c2 + (A-Z)*neutron_mass_c2) {
00602     std::vector<const G4VFermiFragment*>  newvec;
00603     G4int idx = 1;
00604     for(G4int i=0; i<A; ++i) {
00605       if(i == Z) { idx = 0; }
00606       newvec.push_back(fragment_pool[idx]);
00607     }
00608     G4FermiConfiguration* conf = new G4FermiConfiguration(newvec);
00609     listextra.push_back(conf);
00610     v->push_back(conf);
00611     ++nconf;
00612     if(verbose > 0) { 
00613       G4cout<<"Total number of configurations = "<<nconf<<G4cout;
00614       G4double ExEn= mass -G4NucleiProperties::GetNuclearMass(A,Z);
00615       G4cout<<"Total number of configurations = "<<nconf<<" for A= "
00616             <<A<<"   Z= "<<Z<<"   E*= "<< ExEn<<" MeV"<<G4endl;
00617       size_t size_vector_conf=v->size();
00618       for(size_t jc=0; jc<size_vector_conf; ++jc) {     
00619         std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
00620         size_t size_vector_fragments=v_frag.size();
00621         G4cout<<"New exotic configuration -> configuration "<<jc+1<<": ";
00622         for(size_t jf=0;jf<size_vector_fragments;++jf){
00623           G4int af= v_frag[jf]->GetA();
00624           G4int zf= v_frag[jf]->GetZ();
00625           G4double ex=v_frag[jf]->GetExcitationEnergy();
00626           G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<")  ";
00627         }
00628         G4cout<<G4endl;
00629         G4cout<<"-----------------------------------------------------"<<G4endl;    
00630       }
00631     }
00632     return v;
00633   }
00634 
00635   // only photon evaporation is possible
00636   if(conf1) {
00637     v->push_back(conf1); 
00638     ++nconf;
00639     if(verbose > 0) { 
00640       G4cout<<"Total number of configurations = "<<nconf<<G4endl;
00641       G4double ExEn= mass -G4NucleiProperties::GetNuclearMass(A,Z);
00642       G4cout<<"Total number of configurations = "<<nconf<<" for A= "
00643             <<A<<"   Z= "<<Z<<"   E*= "<< ExEn<<" MeV"<<G4endl;
00644       size_t size_vector_conf=v->size();
00645       for(size_t jc=0; jc<size_vector_conf; ++jc) {     
00646         std::vector<const G4VFermiFragment*> v_frag = (*v)[jc]->GetFragmentList();
00647         size_t size_vector_fragments=v_frag.size();
00648         G4cout<<"Only evaporation is possible -> configuration  "<<jc+1<<": ";
00649         for(size_t jf=0;jf<size_vector_fragments;++jf){
00650           G4int af= v_frag[jf]->GetA();
00651           G4int zf= v_frag[jf]->GetZ();
00652           G4double ex=v_frag[jf]->GetExcitationEnergy();
00653           G4cout<<"(a="<<af<<", z="<<zf<<", ex="<<ex<<")  ";
00654         }
00655         G4cout<<G4endl;
00656         G4cout<<"-----------------------------------------------------"<<G4endl;    
00657       }
00658     }
00659     return v;   
00660   }
00661 
00662   //failer
00663   if(verbose > 0) { 
00664     G4cout << "G4FermiFragmentsPool::GetConfigurationList: WARNING: not "
00665            << "able decay fragment Z= " << Z << " A= " << A
00666            << " Mass(GeV)= " << mass/GeV<< G4endl;
00667   }
00668   return v;
00669 }

const G4VFermiFragment * G4FermiFragmentsPool::GetFragment ( G4int  Z,
G4int  A 
)

Definition at line 718 of file G4FermiFragmentsPool.cc.

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

Referenced by G4ExcitationHandler::BreakItUp().

00719 {
00720   const G4VFermiFragment* f = 0;
00721   if(Z >= maxZ || A >= maxA) { return f; }
00722   size_t nz = list1[A].size();
00723   if(0 < nz) {
00724     for(size_t j=0; j<nz; ++j) {
00725       G4FermiConfiguration* conf = (list1[A])[j];
00726       if(Z == conf->GetZ()) { return (conf->GetFragmentList())[0]; }
00727     }
00728   }
00729   return f;
00730 }

G4int G4FermiFragmentsPool::GetMaxA (  )  const [inline]

Definition at line 103 of file G4FermiFragmentsPool.hh.

00104 {
00105   return maxA;
00106 }

G4int G4FermiFragmentsPool::GetMaxZ (  )  const [inline]

Definition at line 98 of file G4FermiFragmentsPool.hh.

00099 {
00100   return maxZ;
00101 }

G4FermiFragmentsPool * G4FermiFragmentsPool::Instance (  )  [static]

Definition at line 57 of file G4FermiFragmentsPool.cc.

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

00058 {
00059   if(0 == theInstance) {
00060     static G4FermiFragmentsPool pool;
00061     theInstance = &pool;
00062   }
00063   return theInstance;
00064 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:59 2013 for Geant4 by  doxygen 1.4.7