Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4InuclNuclei Class Reference

#include <G4InuclNuclei.hh>

Inheritance diagram for G4InuclNuclei:
Collaboration diagram for G4InuclNuclei:

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
 
- Public Member Functions inherited from G4InuclParticle
 G4InuclParticle ()
 
 G4InuclParticle (const G4DynamicParticle &dynPart, Model model=DefaultModel)
 
 G4InuclParticle (const G4LorentzVector &mom, Model model=DefaultModel)
 
virtual ~G4InuclParticle ()
 
 G4InuclParticle (const G4InuclParticle &right)
 
G4InuclParticleoperator= (const G4InuclParticle &right)
 
bool operator== (const G4InuclParticle &right)
 
bool operator!= (const G4InuclParticle &right)
 
void setEnergy ()
 
void setMomentum (const G4LorentzVector &mom)
 
void setKineticEnergy (G4double ekin)
 
void setMass (G4double mass)
 
G4double getMass () const
 
G4double getCharge () const
 
G4double getKineticEnergy () const
 
G4double getEnergy () const
 
G4double getMomModule () const
 
G4LorentzVector getMomentum () const
 
const G4ParticleDefinitiongetDefinition () const
 
const G4DynamicParticlegetDynamicParticle () const
 
void setModel (Model model)
 
Model getModel () 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)
 

Additional Inherited Members

- Public Types inherited from G4InuclParticle
enum  Model {
  DefaultModel, bullet, target, EPCollider,
  INCascader, NonEquilib, Equilib, Fissioner,
  BigBanger, PreCompound, Coalescence
}
 
- Protected Member Functions inherited from G4InuclParticle
 G4InuclParticle (const G4ParticleDefinition *pd, Model model=DefaultModel)
 
 G4InuclParticle (const G4ParticleDefinition *pd, const G4LorentzVector &mom, Model model=DefaultModel)
 
 G4InuclParticle (const G4ParticleDefinition *pd, G4double ekin, Model model=DefaultModel)
 
void setDefinition (const G4ParticleDefinition *pd)
 

Detailed Description

Definition at line 68 of file G4InuclNuclei.hh.

Constructor & Destructor Documentation

G4InuclNuclei::G4InuclNuclei ( )
inline

Definition at line 70 of file G4InuclNuclei.hh.

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

Definition at line 72 of file G4InuclNuclei.hh.

73  : G4InuclParticle(dynPart, model) {}
const XML_Char XML_Content * model
Definition: expat.h:151
G4InuclNuclei::G4InuclNuclei ( G4int  a,
G4int  z,
G4double  exc = 0.,
Model  model = DefaultModel 
)
inline

Definition at line 75 of file G4InuclNuclei.hh.

77  setExitationEnergy(exc);
78  }
void setExitationEnergy(G4double e)
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

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

Definition at line 80 of file G4InuclNuclei.hh.

82  : G4InuclParticle(makeDefinition(a,z), mom, model) {
83  setExitationEnergy(exc);
84  }
void setExitationEnergy(G4double e)
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

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

Definition at line 86 of file G4InuclNuclei.hh.

88  : G4InuclParticle(makeDefinition(a,z), ekin, model) {
89  setExitationEnergy(exc);
90  }
void setExitationEnergy(G4double e)
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

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

Definition at line 82 of file G4InuclNuclei.cc.

84  : G4InuclParticle() {
85  copy(aFragment, model);
86 }
void copy(const G4Fragment &aFragment, Model model=DefaultModel)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

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

Definition at line 128 of file G4InuclNuclei.cc.

130  : G4InuclParticle() {
131  copy(a3DNucleus, model);
132 }
void copy(const G4Fragment &aFragment, Model model=DefaultModel)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

virtual G4InuclNuclei::~G4InuclNuclei ( )
inlinevirtual

Definition at line 96 of file G4InuclNuclei.hh.

96 {}
G4InuclNuclei::G4InuclNuclei ( const G4InuclNuclei right)
inline

Definition at line 99 of file G4InuclNuclei.hh.

100  : G4InuclParticle(right),
101  theExitonConfiguration(right.theExitonConfiguration) {}

Member Function Documentation

void G4InuclNuclei::clear ( )

Definition at line 177 of file G4InuclNuclei.cc.

177  {
178  setDefinition(0);
181 }
void setDefinition(const G4ParticleDefinition *pd)
void clearExitonConfiguration()
void setModel(Model model)

Here is the call graph for this function:

void G4InuclNuclei::clearExitonConfiguration ( )
inline

Definition at line 135 of file G4InuclNuclei.hh.

135 { theExitonConfiguration.clear(); }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 88 of file G4InuclNuclei.cc.

88  {
89  fill(aFragment.GetMomentum()/GeV, aFragment.GetA_asInt(),
90  aFragment.GetZ_asInt(), aFragment.GetExcitationEnergy(), model);
91 
92  // Exciton configuration must be set by hand
93  theExitonConfiguration.protonQuasiParticles = aFragment.GetNumberOfCharged();
94 
95  theExitonConfiguration.neutronQuasiParticles =
96  aFragment.GetNumberOfParticles() - aFragment.GetNumberOfCharged();
97 
98  theExitonConfiguration.protonHoles = aFragment.GetNumberOfChargedHoles();
99 
100  theExitonConfiguration.neutronHoles =
101  aFragment.GetNumberOfHoles() - theExitonConfiguration.protonHoles;
102 }
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
G4int GetNumberOfParticles() const
Definition: G4Fragment.hh:345
G4int GetNumberOfHoles() const
Definition: G4Fragment.hh:365
G4int GetA_asInt() const
Definition: G4Fragment.hh:266
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:307
static constexpr double GeV
Definition: G4SIunits.hh:217
G4int GetZ_asInt() const
Definition: G4Fragment.hh:271
G4int GetNumberOfChargedHoles() const
Definition: G4Fragment.hh:370
const XML_Char XML_Content * model
Definition: expat.h:151
G4int GetNumberOfCharged() const
Definition: G4Fragment.hh:350
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:283

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 134 of file G4InuclNuclei.cc.

134  {
135  if (!a3DNucleus) return; // Null pointer means no action
136 
137  fill(0., a3DNucleus->GetMassNumber(), a3DNucleus->GetCharge(), 0., model);
138 
139  // Convert every hit nucleon into an exciton hole
140  if (a3DNucleus->StartLoop()) {
141  G4Nucleon* nucl = 0;
142 
143  /* Loop checking 08.06.2015 MHK */
144  while ((nucl = a3DNucleus->GetNextNucleon())) {
145  if (nucl->AreYouHit()) { // Found previously interacted nucleon
146  if (nucl->GetParticleType() == G4Proton::Definition())
147  theExitonConfiguration.protonHoles++;
148 
150  theExitonConfiguration.neutronHoles++;
151  }
152  }
153  }
154 }
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
const G4ParticleDefinition * GetParticleType() const
Definition: G4Nucleon.hh:84
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual G4int GetMassNumber()=0
if(nIso!=0)
static G4Proton * Definition()
Definition: G4Proton.cc:49
G4bool AreYouHit() const
Definition: G4Nucleon.hh:97
static G4Neutron * Definition()
Definition: G4Neutron.cc:54
virtual G4Nucleon * GetNextNucleon()=0
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

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

Definition at line 112 of file G4InuclNuclei.hh.

112  {
113  fill(0., a, z, exc, model);
114  }
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the caller graph for this function:

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

Definition at line 159 of file G4InuclNuclei.cc.

160  {
162  setMomentum(mom);
163  setExitationEnergy(exc);
165  setModel(model);
166 }
void setDefinition(const G4ParticleDefinition *pd)
void setExitationEnergy(G4double e)
void clearExitonConfiguration()
void setModel(Model model)
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
void setMomentum(const G4LorentzVector &mom)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

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

Definition at line 168 of file G4InuclNuclei.cc.

169  {
171  setKineticEnergy(ekin);
172  setExitationEnergy(exc);
174  setModel(model);
175 }
void setDefinition(const G4ParticleDefinition *pd)
void setExitationEnergy(G4double e)
void clearExitonConfiguration()
void setModel(Model model)
void setKineticEnergy(G4double ekin)
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:

G4int G4InuclNuclei::getA ( ) const
inline

Definition at line 137 of file G4InuclNuclei.hh.

137 { return getDefinition()->GetAtomicMass(); }
const G4ParticleDefinition * getDefinition() const
G4int GetAtomicMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclNuclei::getExitationEnergy ( ) const
inline

Definition at line 144 of file G4InuclNuclei.hh.

144  {
145  return (getMass()-getNucleiMass())*CLHEP::GeV/CLHEP::MeV; // Always in MeV
146  }
G4double getNucleiMass() const
static constexpr double MeV
static constexpr double GeV
G4double getMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclNuclei::getExitationEnergyInGeV ( ) const
inline

Definition at line 148 of file G4InuclNuclei.hh.

148 { return getExitationEnergy()/CLHEP::GeV; }
G4double getExitationEnergy() const
static constexpr double GeV

Here is the call graph for this function:

const G4ExitonConfiguration& G4InuclNuclei::getExitonConfiguration ( ) const
inline

Definition at line 150 of file G4InuclNuclei.hh.

150  {
151  return theExitonConfiguration;
152  }
G4double G4InuclNuclei::getNucleiMass ( ) const
inline

Definition at line 140 of file G4InuclNuclei.hh.

140  {
141  return getDefinition()->GetPDGMass()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini
142  }
const G4ParticleDefinition * getDefinition() const
static constexpr double MeV
static constexpr double GeV
G4double GetPDGMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 277 of file G4InuclNuclei.cc.

277  {
278  // Simple minded mass calculation use constants in CLHEP (all in MeV)
280 
281  return mass*MeV/GeV; // Convert from GEANT4 to Bertini units
282 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
static constexpr double GeV
Definition: G4SIunits.hh:217
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4int G4InuclNuclei::getZ ( ) const
inline

Definition at line 138 of file G4InuclNuclei.hh.

138 { return getDefinition()->GetAtomicNumber(); }
const G4ParticleDefinition * getDefinition() const
G4int GetAtomicNumber() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4InuclNuclei::makeDefinition ( G4int  a,
G4int  z 
)
staticprotected

Definition at line 205 of file G4InuclNuclei.cc.

205  {
206  // SPECIAL CASE: (0,0) means create dummy without definition
207  if (0 == a && 0 == z) return 0;
208 
210  G4ParticleDefinition *pd = pTable->GetIonTable()->GetIon(z, a, 0);
211 
212  // SPECIAL CASE: Non-physical nuclear fragment, for final-state return
213  if (!pd) pd = makeNuclearFragment(a,z);
214 
215  return pd; // This could return a null pointer if above fails
216 }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4ParticleDefinition * makeNuclearFragment(G4int a, G4int z)

Here is the call graph for this function:

Here is the caller graph for this function:

G4Fragment G4InuclNuclei::makeG4Fragment ( ) const

Definition at line 106 of file G4InuclNuclei.cc.

106  {
107  G4Fragment frag(getA(), getZ(), getMomentum()*GeV); // From Bertini units
108 
109  // Note: exciton configuration has to be set piece by piece
110  frag.SetNumberOfHoles(theExitonConfiguration.protonHoles
111  + theExitonConfiguration.neutronHoles,
112  theExitonConfiguration.protonHoles);
113 
114  frag.SetNumberOfExcitedParticle(theExitonConfiguration.protonQuasiParticles
115  + theExitonConfiguration.neutronQuasiParticles,
116  theExitonConfiguration.protonQuasiParticles);
117 
118  return frag;
119 }
G4int getZ() const
G4LorentzVector getMomentum() const
G4int getA() const
static constexpr double GeV
Definition: G4SIunits.hh:217

Here is the call graph for this function:

G4ParticleDefinition * G4InuclNuclei::makeNuclearFragment ( G4int  a,
G4int  z 
)
staticprotected

Definition at line 230 of file G4InuclNuclei.cc.

230  {
231  if (a<=0 || z<0 || a<z) {
232  G4cerr << " >>> G4InuclNuclei::makeNuclearFragment() called with"
233  << " impossible arguments A=" << a << " Z=" << z << G4endl;
234  throw G4HadronicException(__FILE__, __LINE__,
235  "G4InuclNuclei impossible A/Z arguments");
236  }
237 
239 
240  // Use local lookup table (see above) to maintain singletons
241  // NOTE: G4ParticleDefinitions don't need to be explicitly deleted
242  // (see comments in G4IonTable.cc::~G4IonTable)
243 
244  G4AutoLock fragListLock(&fragListMutex);
245  if (fragmentList.find(code) != fragmentList.end()) return fragmentList[code];
246  fragListLock.unlock();
247 
248  // Name string follows format in G4IonTable.cc::GetIonName(Z,A,E)
249  std::stringstream zstr, astr;
250  zstr << z;
251  astr << a;
252 
253  G4String name = "Z" + zstr.str() + "A" + astr.str();
254 
255  G4double mass = getNucleiMass(a,z) *GeV/MeV; // From Bertini to GEANT4 units
256 
257  // Arguments for constructor are as follows
258  // name mass width charge
259  // 2*spin parity C-conjugation
260  // 2*Isospin 2*Isospin3 G-parity
261  // type lepton number baryon number PDG encoding
262  // stable lifetime decay table
263  // shortlived subType anti_encoding Excitation-energy
264 
265  G4Ions* fragPD = new G4Ions(name, mass, 0., z*eplus,
266  0, +1, 0,
267  0, 0, 0,
268  "nucleus", 0, a, code,
269  true, 0., 0,
270  true, "generic", 0, 0.);
271  fragPD->SetAntiPDGEncoding(0);
272 
273  fragListLock.lock(); // Protect before saving new fragment
274  return (fragmentList[code] = fragPD); // Store in table for next lookup
275 }
const XML_Char * name
Definition: expat.h:151
void SetAntiPDGEncoding(G4int aEncoding)
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
Definition: G4Ions.hh:51
G4double getNucleiMass() const
static constexpr double eplus
Definition: G4SIunits.hh:199
Definition: inftrees.h:24
static constexpr double GeV
Definition: G4SIunits.hh:217
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

G4InuclNuclei::operator G4Fragment ( ) const

Definition at line 121 of file G4InuclNuclei.cc.

121  {
122  return makeG4Fragment();
123 }
G4Fragment makeG4Fragment() const
G4InuclNuclei & G4InuclNuclei::operator= ( const G4InuclNuclei right)

Definition at line 285 of file G4InuclNuclei.cc.

285  {
286  if (this != &right) {
287  theExitonConfiguration = right.theExitonConfiguration;
289  }
290  return *this;
291 }
G4InuclParticle & operator=(const G4InuclParticle &right)

Here is the call graph for this function:

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

Definition at line 106 of file G4InuclNuclei.hh.

106  {
107  return ( G4InuclParticle::operator==(right) &&
108  theExitonConfiguration == right.theExitonConfiguration );
109  }
void G4InuclNuclei::print ( std::ostream &  os) const
virtual

Reimplemented from G4InuclParticle.

Definition at line 295 of file G4InuclNuclei.cc.

295  {
297  os << G4endl << " Nucleus: " << getDefinition()->GetParticleName()
298  << " A " << getA() << " Z " << getZ() << " mass " << getMass()
299  << " Eex (MeV) " << getExitationEnergy();
300 
301  if (!theExitonConfiguration.empty())
302  os << G4endl << " " << theExitonConfiguration;
303 }
G4int getZ() const
const G4ParticleDefinition * getDefinition() const
const G4String & GetParticleName() const
virtual void print(std::ostream &os) const
G4int getA() const
G4double getExitationEnergy() const
#define G4endl
Definition: G4ios.hh:61
G4double getMass() const

Here is the call graph for this function:

void G4InuclNuclei::setExitationEnergy ( G4double  e)

Definition at line 186 of file G4InuclNuclei.cc.

186  {
187  G4double ekin = getKineticEnergy(); // Current kinetic energy
188 
189  G4double emass = getNucleiMass() + e*MeV/GeV; // From Bertini to G4 units
190 
191  // Safety check -- if zero energy, don't do computation
192  G4double ekin_new = (ekin == 0.) ? 0.
193  : std::sqrt(emass*emass + ekin*(2.*getMass()+ekin)) - emass;
194 
195  setMass(emass); // Momentum is computed from mass and Ekin
196  setKineticEnergy(ekin_new);
197 }
G4double getKineticEnergy() const
G4double getNucleiMass() const
static constexpr double GeV
Definition: G4SIunits.hh:217
void setMass(G4double mass)
static constexpr double MeV
Definition: G4SIunits.hh:214
void setKineticEnergy(G4double ekin)
double G4double
Definition: G4Types.hh:76
G4double getMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4InuclNuclei::setExitonConfiguration ( const G4ExitonConfiguration config)
inline

Definition at line 131 of file G4InuclNuclei.hh.

131  {
132  theExitonConfiguration = config;
133  }
struct config_s config

Here is the caller graph for this function:


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