G4InuclNuclei Class Reference

#include <G4InuclNuclei.hh>

Inheritance diagram for G4InuclNuclei:

G4InuclParticle

Public Member Functions

 G4InuclNuclei ()
 G4InuclNuclei (const G4DynamicParticle &dynPart, Model model=DefaultModel)
 G4InuclNuclei (G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
 G4InuclNuclei (const G4LorentzVector &mom, G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
 G4InuclNuclei (G4double ekin, G4int a, G4int z, G4double exc, Model model=DefaultModel)
 G4InuclNuclei (const G4Fragment &aFragment, Model model=DefaultModel)
 G4InuclNuclei (G4V3DNucleus *a3DNucleus, Model model=DefaultModel)
virtual ~G4InuclNuclei ()
 G4InuclNuclei (const G4InuclNuclei &right)
G4InuclNucleioperator= (const G4InuclNuclei &right)
bool operator== (const G4InuclNuclei &right)
void fill (G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
void fill (const G4LorentzVector &mom, G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
void fill (G4double ekin, G4int a, G4int z, G4double exc, Model model=DefaultModel)
void copy (const G4Fragment &aFragment, Model model=DefaultModel)
void copy (G4V3DNucleus *a3DNucleus, Model model=DefaultModel)
void clear ()
void setExitationEnergy (G4double e)
void setExitonConfiguration (const G4ExitonConfiguration &config)
void clearExitonConfiguration ()
G4int getA () const
G4int getZ () const
G4double getNucleiMass () const
G4double getExitationEnergy () const
G4double getExitationEnergyInGeV () const
const G4ExitonConfigurationgetExitonConfiguration () const
virtual void print (std::ostream &os) const
G4Fragment makeG4Fragment () const
 operator G4Fragment () const

Static Public Member Functions

static G4double getNucleiMass (G4int a, G4int z, G4double exc=0.)

Static Protected Member Functions

static G4ParticleDefinitionmakeDefinition (G4int a, G4int z)
static G4ParticleDefinitionmakeNuclearFragment (G4int a, G4int z)

Detailed Description

Definition at line 68 of file G4InuclNuclei.hh.


Constructor & Destructor Documentation

G4InuclNuclei::G4InuclNuclei (  )  [inline]

Definition at line 70 of file G4InuclNuclei.hh.

00070 : G4InuclParticle() {}

G4InuclNuclei::G4InuclNuclei ( const G4DynamicParticle dynPart,
Model  model = DefaultModel 
) [inline]

Definition at line 72 of file G4InuclNuclei.hh.

00073     : G4InuclParticle(dynPart, model) {}

G4InuclNuclei::G4InuclNuclei ( G4int  a,
G4int  z,
G4double  exc = 0.,
Model  model = DefaultModel 
) [inline]

Definition at line 75 of file G4InuclNuclei.hh.

References setExitationEnergy().

00076     : G4InuclParticle(makeDefinition(a,z), model) {
00077     setExitationEnergy(exc);
00078   }

G4InuclNuclei::G4InuclNuclei ( const G4LorentzVector mom,
G4int  a,
G4int  z,
G4double  exc = 0.,
Model  model = DefaultModel 
) [inline]

Definition at line 80 of file G4InuclNuclei.hh.

References setExitationEnergy().

00082     : G4InuclParticle(makeDefinition(a,z), mom, model) {
00083     setExitationEnergy(exc);
00084   }

G4InuclNuclei::G4InuclNuclei ( G4double  ekin,
G4int  a,
G4int  z,
G4double  exc,
Model  model = DefaultModel 
) [inline]

Definition at line 86 of file G4InuclNuclei.hh.

References setExitationEnergy().

00088     : G4InuclParticle(makeDefinition(a,z), ekin, model) {
00089     setExitationEnergy(exc);
00090   }

G4InuclNuclei::G4InuclNuclei ( const G4Fragment aFragment,
Model  model = DefaultModel 
)

G4InuclNuclei::G4InuclNuclei ( G4V3DNucleus a3DNucleus,
Model  model = DefaultModel 
)

virtual G4InuclNuclei::~G4InuclNuclei (  )  [inline, virtual]

Definition at line 96 of file G4InuclNuclei.hh.

00096 {}

G4InuclNuclei::G4InuclNuclei ( const G4InuclNuclei right  )  [inline]

Definition at line 99 of file G4InuclNuclei.hh.

00100     : G4InuclParticle(right),
00101       theExitonConfiguration(right.theExitonConfiguration) {}


Member Function Documentation

void G4InuclNuclei::clear (  ) 

Definition at line 168 of file G4InuclNuclei.cc.

References clearExitonConfiguration(), G4InuclParticle::DefaultModel, G4InuclParticle::setDefinition(), and G4InuclParticle::setModel().

void G4InuclNuclei::clearExitonConfiguration (  )  [inline]

Definition at line 135 of file G4InuclNuclei.hh.

References G4ExitonConfiguration::clear().

Referenced by clear().

00135 { theExitonConfiguration.clear(); }

void G4InuclNuclei::copy ( G4V3DNucleus a3DNucleus,
Model  model = DefaultModel 
)

Definition at line 127 of file G4InuclNuclei.cc.

References G4Neutron::Definition(), G4Proton::Definition(), fill(), G4V3DNucleus::GetCharge(), G4V3DNucleus::GetMassNumber(), G4V3DNucleus::GetNextNucleon(), G4ExitonConfiguration::neutronHoles, G4ExitonConfiguration::protonHoles, and G4V3DNucleus::StartLoop().

00127                                                               {
00128   if (!a3DNucleus) return;              // Null pointer means no action
00129 
00130   fill(0., a3DNucleus->GetMassNumber(), a3DNucleus->GetCharge(), 0., model);
00131 
00132   // Convert every hit nucleon into an exciton hole
00133   if (a3DNucleus->StartLoop()) {
00134     G4Nucleon* nucl = 0;
00135     while ((nucl = a3DNucleus->GetNextNucleon())) {
00136       if (nucl->AreYouHit()) {  // Found previously interacted nucleon
00137         if (nucl->GetParticleType() == G4Proton::Definition())
00138           theExitonConfiguration.protonHoles++;
00139 
00140         if (nucl->GetParticleType() == G4Neutron::Definition())
00141           theExitonConfiguration.neutronHoles++;
00142       }
00143     }
00144   }
00145 }

void G4InuclNuclei::copy ( const G4Fragment aFragment,
Model  model = DefaultModel 
)

Definition at line 81 of file G4InuclNuclei.cc.

References fill(), G4Fragment::GetA_asInt(), G4Fragment::GetExcitationEnergy(), G4Fragment::GetMomentum(), G4Fragment::GetNumberOfCharged(), G4Fragment::GetNumberOfChargedHoles(), G4Fragment::GetNumberOfHoles(), G4Fragment::GetNumberOfParticles(), G4Fragment::GetZ_asInt(), G4ExitonConfiguration::neutronHoles, G4ExitonConfiguration::neutronQuasiParticles, G4ExitonConfiguration::protonHoles, and G4ExitonConfiguration::protonQuasiParticles.

00081                                                                  {
00082   fill(aFragment.GetMomentum()/GeV, aFragment.GetA_asInt(),
00083        aFragment.GetZ_asInt(), aFragment.GetExcitationEnergy(), model);
00084 
00085   // Exciton configuration must be set by hand
00086   theExitonConfiguration.protonQuasiParticles = aFragment.GetNumberOfCharged();
00087 
00088   theExitonConfiguration.neutronQuasiParticles =
00089     aFragment.GetNumberOfParticles() - aFragment.GetNumberOfCharged();
00090 
00091   theExitonConfiguration.protonHoles = aFragment.GetNumberOfChargedHoles();
00092 
00093   theExitonConfiguration.neutronHoles =
00094     aFragment.GetNumberOfHoles() - theExitonConfiguration.protonHoles;
00095 }

void G4InuclNuclei::fill ( G4double  ekin,
G4int  a,
G4int  z,
G4double  exc,
Model  model = DefaultModel 
)

void G4InuclNuclei::fill ( const G4LorentzVector mom,
G4int  a,
G4int  z,
G4double  exc = 0.,
Model  model = DefaultModel 
)

void G4InuclNuclei::fill ( G4int  a,
G4int  z,
G4double  exc = 0.,
Model  model = DefaultModel 
) [inline]

Definition at line 112 of file G4InuclNuclei.hh.

Referenced by copy(), G4CascadeInterface::createBullet(), G4IntraNucleiCascader::createTarget(), G4CascadeInterface::createTarget(), G4CascadeRecoilMaker::makeRecoilNuclei(), and G4IntraNucleiCascader::releaseSecondary().

00112                                                                          {
00113     fill(0., a, z, exc, model);
00114   }

G4int G4InuclNuclei::getA (  )  const [inline]

Definition at line 137 of file G4InuclNuclei.hh.

References G4ParticleDefinition::GetAtomicMass(), and G4InuclParticle::getDefinition().

Referenced by G4PreCompoundDeexcitation::collide(), G4NonEquilibriumEvaporator::collide(), G4InuclCollider::collide(), G4Fissioner::collide(), G4EquilibriumEvaporator::collide(), G4BigBanger::collide(), G4CascadeColliderBase::explosion(), G4CascadeColliderBase::inelasticInteractionPossible(), G4IntraNucleiCascader::initialize(), G4NucleiModel::initializeCascad(), makeG4Fragment(), print(), G4InteractionCase::set(), and G4IntraNucleiCascader::setupCascade().

00137 { return getDefinition()->GetAtomicMass(); }

G4double G4InuclNuclei::getExitationEnergy (  )  const [inline]

Definition at line 144 of file G4InuclNuclei.hh.

References G4InuclParticle::getMass(), and getNucleiMass().

Referenced by G4NonEquilibriumEvaporator::collide(), G4Fissioner::collide(), G4EquilibriumEvaporator::collide(), G4BigBanger::collide(), G4CascadeColliderBase::explosion(), getExitationEnergyInGeV(), and print().

00144                                       {
00145     return (getMass()-getNucleiMass())*CLHEP::GeV/CLHEP::MeV; // Always in MeV
00146   }

G4double G4InuclNuclei::getExitationEnergyInGeV (  )  const [inline]

Definition at line 148 of file G4InuclNuclei.hh.

References getExitationEnergy().

00148 { return getExitationEnergy()/CLHEP::GeV; }

const G4ExitonConfiguration& G4InuclNuclei::getExitonConfiguration (  )  const [inline]

Definition at line 150 of file G4InuclNuclei.hh.

Referenced by G4NonEquilibriumEvaporator::collide().

00150                                                               {
00151     return theExitonConfiguration;
00152   }

G4double G4InuclNuclei::getNucleiMass ( G4int  a,
G4int  z,
G4double  exc = 0. 
) [static]

Definition at line 260 of file G4InuclNuclei.cc.

References G4NucleiProperties::GetNuclearMass().

00260                                                                     {
00261   // Simple minded mass calculation use constants in CLHEP (all in MeV)
00262   G4double mass = G4NucleiProperties::GetNuclearMass(a,z) + exc;
00263 
00264   return mass*MeV/GeV;          // Convert from GEANT4 to Bertini units
00265 }

G4double G4InuclNuclei::getNucleiMass (  )  const [inline]

Definition at line 140 of file G4InuclNuclei.hh.

References G4InuclParticle::getDefinition(), and G4ParticleDefinition::GetPDGMass().

Referenced by G4NonEquilibriumEvaporator::collide(), G4Fissioner::collide(), G4EquilibriumEvaporator::collide(), G4CascadeRecoilMaker::deltaM(), getExitationEnergy(), makeNuclearFragment(), G4CascadeRecoilMaker::makeRecoilFragment(), and setExitationEnergy().

00140                                  {
00141     return getDefinition()->GetPDGMass()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini
00142   }

G4int G4InuclNuclei::getZ (  )  const [inline]

Definition at line 138 of file G4InuclNuclei.hh.

References G4ParticleDefinition::GetAtomicNumber(), and G4InuclParticle::getDefinition().

Referenced by G4PreCompoundDeexcitation::collide(), G4NonEquilibriumEvaporator::collide(), G4InuclCollider::collide(), G4Fissioner::collide(), G4EquilibriumEvaporator::collide(), G4BigBanger::collide(), G4CascadeColliderBase::explosion(), G4IntraNucleiCascader::generateCascade(), G4CascadeColliderBase::inelasticInteractionPossible(), G4IntraNucleiCascader::initialize(), G4NucleiModel::initializeCascad(), makeG4Fragment(), print(), and G4IntraNucleiCascader::setupCascade().

00138 { return getDefinition()->GetAtomicNumber(); }

G4ParticleDefinition * G4InuclNuclei::makeDefinition ( G4int  a,
G4int  z 
) [static, protected]

Definition at line 195 of file G4InuclNuclei.cc.

References G4ParticleTable::GetIon(), G4ParticleTable::GetParticleTable(), and makeNuclearFragment().

00195                                                                     {
00196   // SPECIAL CASE:  (0,0) means create dummy without definition
00197   if (0 == a && 0 == z) return 0;
00198 
00199   G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
00200   G4ParticleDefinition *pd = pTable->GetIon(z, a, 0.);
00201 
00202   // SPECIAL CASE:  Non-physical nuclear fragment, for final-state return
00203   if (!pd) pd = makeNuclearFragment(a,z);
00204 
00205   return pd;            // This could return a null pointer if above fails
00206 }

G4Fragment G4InuclNuclei::makeG4Fragment (  )  const

Definition at line 99 of file G4InuclNuclei.cc.

References getA(), G4InuclParticle::getMomentum(), getZ(), G4ExitonConfiguration::neutronHoles, G4ExitonConfiguration::neutronQuasiParticles, G4ExitonConfiguration::protonHoles, G4ExitonConfiguration::protonQuasiParticles, G4Fragment::SetNumberOfExcitedParticle(), and G4Fragment::SetNumberOfHoles().

Referenced by operator G4Fragment().

00099                                                {
00100   G4Fragment frag(getA(), getZ(), getMomentum()*GeV);   // From Bertini units
00101 
00102   // Note:  exciton configuration has to be set piece by piece
00103   frag.SetNumberOfHoles(theExitonConfiguration.protonHoles
00104                         + theExitonConfiguration.neutronHoles,
00105                         theExitonConfiguration.protonHoles);
00106 
00107   frag.SetNumberOfExcitedParticle(theExitonConfiguration.protonQuasiParticles 
00108                   + theExitonConfiguration.neutronQuasiParticles,
00109                   theExitonConfiguration.protonQuasiParticles);
00110 
00111   return frag;
00112 }

G4ParticleDefinition * G4InuclNuclei::makeNuclearFragment ( G4int  a,
G4int  z 
) [static, protected]

Definition at line 214 of file G4InuclNuclei.cc.

References G4cerr, G4endl, getNucleiMass(), G4IonTable::GetNucleusEncoding(), and G4ParticleDefinition::SetAntiPDGEncoding().

Referenced by makeDefinition().

00214                                                    {
00215   if (a<=0 || z<0 || a<z) {
00216     G4cerr << " >>> G4InuclNuclei::makeNuclearFragment() called with"
00217            << " impossible arguments A=" << a << " Z=" << z << G4endl;
00218     throw G4HadronicException(__FILE__, __LINE__,
00219                               "G4InuclNuclei impossible A/Z arguments");
00220   }
00221 
00222   G4int code = G4IonTable::GetNucleusEncoding(z, a);
00223 
00224   // Use local lookup table (see G4IonTable.hh) to maintain singletons
00225   // NOTE:  G4ParticleDefinitions don't need to be explicitly deleted
00226   //        (see comments in G4IonTable.cc::~G4IonTable)
00227 
00228   // If correct nucleus already created return it
00229   static std::map<G4int, G4ParticleDefinition*> fragmentList;
00230   if (fragmentList.find(code) != fragmentList.end()) return fragmentList[code];
00231 
00232   // Name string follows format in G4IonTable.cc::GetIonName(Z,A,E)
00233   std::stringstream zstr, astr;
00234   zstr << z;
00235   astr << a;
00236   
00237   G4String name = "Z" + zstr.str() + "A" + astr.str();
00238   
00239   G4double mass = getNucleiMass(a,z) *GeV/MeV;  // From Bertini to GEANT4 units
00240   
00241   //    Arguments for constructor are as follows
00242   //               name             mass          width         charge
00243   //             2*spin           parity  C-conjugation
00244   //          2*Isospin       2*Isospin3       G-parity
00245   //               type    lepton number  baryon number   PDG encoding
00246   //             stable         lifetime    decay table
00247   //             shortlived      subType    anti_encoding Excitation-energy
00248   
00249   G4Ions* fragPD = new G4Ions(name,       mass, 0., z*eplus,
00250                               0,          +1,   0,
00251                               0,          0,    0,
00252                               "nucleus",  0,    a, code,
00253                               true,       0.,   0,
00254                               true, "generic",  0,  0.);
00255   fragPD->SetAntiPDGEncoding(0);
00256 
00257   return (fragmentList[code] = fragPD);     // Store in table for next lookup
00258 }

G4InuclNuclei::operator G4Fragment (  )  const

Definition at line 114 of file G4InuclNuclei.cc.

References makeG4Fragment().

00114                                          {
00115   return makeG4Fragment();
00116 }

G4InuclNuclei & G4InuclNuclei::operator= ( const G4InuclNuclei right  ) 

Definition at line 268 of file G4InuclNuclei.cc.

References G4InuclParticle::operator=(), and theExitonConfiguration.

00268                                                                   {
00269   theExitonConfiguration = right.theExitonConfiguration;
00270   G4InuclParticle::operator=(right);
00271   return *this;
00272 }

bool G4InuclNuclei::operator== ( const G4InuclNuclei right  )  [inline]

Definition at line 106 of file G4InuclNuclei.hh.

References theExitonConfiguration.

00106                                               {
00107     return ( G4InuclParticle::operator==(right) && 
00108              theExitonConfiguration == right.theExitonConfiguration );
00109   }

void G4InuclNuclei::print ( std::ostream &  os  )  const [virtual]

Reimplemented from G4InuclParticle.

Definition at line 276 of file G4InuclNuclei.cc.

References G4ExitonConfiguration::empty(), G4endl, getA(), G4InuclParticle::getDefinition(), getExitationEnergy(), G4InuclParticle::getMass(), G4ParticleDefinition::GetParticleName(), getZ(), and G4InuclParticle::print().

00276                                               {
00277   G4InuclParticle::print(os);
00278   os << G4endl << " Nucleus: " << getDefinition()->GetParticleName() 
00279      << " A " << getA() << " Z " << getZ() << " mass " << getMass()
00280      << " Eex (MeV) " << getExitationEnergy();
00281 
00282   if (!theExitonConfiguration.empty())
00283     os << G4endl << "         " << theExitonConfiguration;
00284 }

void G4InuclNuclei::setExitationEnergy ( G4double  e  ) 

Definition at line 177 of file G4InuclNuclei.cc.

References G4InuclParticle::getKineticEnergy(), G4InuclParticle::getMass(), getNucleiMass(), G4InuclParticle::setKineticEnergy(), and G4InuclParticle::setMass().

Referenced by G4InuclEvaporation::BreakItUp(), and G4InuclNuclei().

00177                                                  {
00178   G4double ekin = getKineticEnergy();           // Current kinetic energy
00179 
00180   G4double emass = getNucleiMass() + e*MeV/GeV; // From Bertini to G4 units
00181 
00182   // Directly compute new kinetic energy from old
00183   G4double ekin_new = std::sqrt(emass*emass + ekin*(2.*getMass()+ekin)) - emass;
00184 
00185   setMass(emass);              // Momentum is computed from mass and Ekin
00186   setKineticEnergy(ekin_new);
00187 }

void G4InuclNuclei::setExitonConfiguration ( const G4ExitonConfiguration config  )  [inline]

Definition at line 131 of file G4InuclNuclei.hh.

Referenced by G4CascadeRecoilMaker::makeRecoilNuclei().

00131                                                                    { 
00132     theExitonConfiguration = config;
00133   }


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