Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4InuclNuclei Class Reference

#include <G4InuclNuclei.hh>

+ Inheritance 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
 
virtual void print (std::ostream &os) 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 (G4ParticleDefinition *pd, Model model=DefaultModel)
 
 G4InuclParticle (G4ParticleDefinition *pd, const G4LorentzVector &mom, Model model=DefaultModel)
 
 G4InuclParticle (G4ParticleDefinition *pd, G4double ekin, Model model=DefaultModel)
 
void setDefinition (G4ParticleDefinition *pd)
 

Detailed Description

Definition at line 68 of file G4InuclNuclei.hh.

Constructor & Destructor Documentation

◆ G4InuclNuclei() [1/8]

G4InuclNuclei::G4InuclNuclei ( )
inline

Definition at line 70 of file G4InuclNuclei.hh.

◆ G4InuclNuclei() [2/8]

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

Definition at line 72 of file G4InuclNuclei.hh.

73 : G4InuclParticle(dynPart, model) {}

◆ G4InuclNuclei() [3/8]

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

Definition at line 75 of file G4InuclNuclei.hh.

76 : G4InuclParticle(makeDefinition(a,z), model) {
78 }
static G4ParticleDefinition * makeDefinition(G4int a, G4int z)
void setExitationEnergy(G4double e)

◆ G4InuclNuclei() [4/8]

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) {
84 }

◆ G4InuclNuclei() [5/8]

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) {
90 }

◆ G4InuclNuclei() [6/8]

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

Definition at line 75 of file G4InuclNuclei.cc.

77 : G4InuclParticle() {
78 copy(aFragment, model);
79}
void copy(const G4Fragment &aFragment, Model model=DefaultModel)

◆ G4InuclNuclei() [7/8]

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

Definition at line 121 of file G4InuclNuclei.cc.

123 : G4InuclParticle() {
124 copy(a3DNucleus, model);
125}

◆ ~G4InuclNuclei()

virtual G4InuclNuclei::~G4InuclNuclei ( )
inlinevirtual

Definition at line 96 of file G4InuclNuclei.hh.

96{}

◆ G4InuclNuclei() [8/8]

G4InuclNuclei::G4InuclNuclei ( const G4InuclNuclei right)
inline

Definition at line 99 of file G4InuclNuclei.hh.

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

Member Function Documentation

◆ clear()

void G4InuclNuclei::clear ( )

Definition at line 168 of file G4InuclNuclei.cc.

168 {
169 setDefinition(0);
172}
void clearExitonConfiguration()
void setDefinition(G4ParticleDefinition *pd)
void setModel(Model model)

◆ clearExitonConfiguration()

void G4InuclNuclei::clearExitonConfiguration ( )
inline

Definition at line 135 of file G4InuclNuclei.hh.

135{ theExitonConfiguration.clear(); }

Referenced by clear(), and fill().

◆ copy() [1/2]

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

Definition at line 81 of file G4InuclNuclei.cc.

81 {
82 fill(aFragment.GetMomentum()/GeV, aFragment.GetA_asInt(),
83 aFragment.GetZ_asInt(), aFragment.GetExcitationEnergy(), model);
84
85 // Exciton configuration must be set by hand
86 theExitonConfiguration.protonQuasiParticles = aFragment.GetNumberOfCharged();
87
88 theExitonConfiguration.neutronQuasiParticles =
89 aFragment.GetNumberOfParticles() - aFragment.GetNumberOfCharged();
90
91 theExitonConfiguration.protonHoles = aFragment.GetNumberOfChargedHoles();
92
93 theExitonConfiguration.neutronHoles =
94 aFragment.GetNumberOfHoles() - theExitonConfiguration.protonHoles;
95}
G4int GetNumberOfParticles() const
Definition: G4Fragment.hh:305
G4int GetNumberOfHoles() const
Definition: G4Fragment.hh:325
G4int GetNumberOfChargedHoles() const
Definition: G4Fragment.hh:330
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:235
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:251
G4int GetZ_asInt() const
Definition: G4Fragment.hh:223
G4int GetNumberOfCharged() const
Definition: G4Fragment.hh:310
G4int GetA_asInt() const
Definition: G4Fragment.hh:218
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)

Referenced by G4InuclNuclei().

◆ copy() [2/2]

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

Definition at line 127 of file G4InuclNuclei.cc.

127 {
128 if (!a3DNucleus) return; // Null pointer means no action
129
130 fill(0., a3DNucleus->GetMassNumber(), a3DNucleus->GetCharge(), 0., model);
131
132 // Convert every hit nucleon into an exciton hole
133 if (a3DNucleus->StartLoop()) {
134 G4Nucleon* nucl = 0;
135 while ((nucl = a3DNucleus->GetNextNucleon())) {
136 if (nucl->AreYouHit()) { // Found previously interacted nucleon
137 if (nucl->GetParticleType() == G4Proton::Definition())
138 theExitonConfiguration.protonHoles++;
139
140 if (nucl->GetParticleType() == G4Neutron::Definition())
141 theExitonConfiguration.neutronHoles++;
142 }
143 }
144 }
145}
static G4Neutron * Definition()
Definition: G4Neutron.cc:54
G4bool AreYouHit() const
Definition: G4Nucleon.hh:97
G4ParticleDefinition * GetParticleType() const
Definition: G4Nucleon.hh:84
static G4Proton * Definition()
Definition: G4Proton.cc:49
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual G4int GetMassNumber()=0

◆ fill() [1/3]

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

Definition at line 150 of file G4InuclNuclei.cc.

151 {
153 setMomentum(mom);
156 setModel(model);
157}
void setMomentum(const G4LorentzVector &mom)

◆ fill() [2/3]

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

Definition at line 159 of file G4InuclNuclei.cc.

160 {
162 setKineticEnergy(ekin);
165 setModel(model);
166}
void setKineticEnergy(G4double ekin)

◆ fill() [3/3]

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

◆ getA()

◆ getExitationEnergy()

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
G4double getMass() const

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

◆ getExitationEnergyInGeV()

G4double G4InuclNuclei::getExitationEnergyInGeV ( ) const
inline

Definition at line 148 of file G4InuclNuclei.hh.

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

◆ getExitonConfiguration()

const G4ExitonConfiguration & G4InuclNuclei::getExitonConfiguration ( ) const
inline

Definition at line 150 of file G4InuclNuclei.hh.

150 {
151 return theExitonConfiguration;
152 }

Referenced by G4NonEquilibriumEvaporator::collide().

◆ getNucleiMass() [1/2]

G4double G4InuclNuclei::getNucleiMass ( ) const
inline

◆ getNucleiMass() [2/2]

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

Definition at line 260 of file G4InuclNuclei.cc.

260 {
261 // Simple minded mass calculation use constants in CLHEP (all in MeV)
263
264 return mass*MeV/GeV; // Convert from GEANT4 to Bertini units
265}
double G4double
Definition: G4Types.hh:64
static G4double GetNuclearMass(const G4double A, const G4double Z)

◆ getZ()

◆ makeDefinition()

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

Definition at line 195 of file G4InuclNuclei.cc.

195 {
196 // SPECIAL CASE: (0,0) means create dummy without definition
197 if (0 == a && 0 == z) return 0;
198
200 G4ParticleDefinition *pd = pTable->GetIon(z, a, 0.);
201
202 // SPECIAL CASE: Non-physical nuclear fragment, for final-state return
203 if (!pd) pd = makeNuclearFragment(a,z);
204
205 return pd; // This could return a null pointer if above fails
206}
static G4ParticleDefinition * makeNuclearFragment(G4int a, G4int z)
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * GetIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)

Referenced by fill().

◆ makeG4Fragment()

G4Fragment G4InuclNuclei::makeG4Fragment ( ) const

Definition at line 99 of file G4InuclNuclei.cc.

99 {
100 G4Fragment frag(getA(), getZ(), getMomentum()*GeV); // From Bertini units
101
102 // Note: exciton configuration has to be set piece by piece
103 frag.SetNumberOfHoles(theExitonConfiguration.protonHoles
104 + theExitonConfiguration.neutronHoles,
105 theExitonConfiguration.protonHoles);
106
107 frag.SetNumberOfExcitedParticle(theExitonConfiguration.protonQuasiParticles
108 + theExitonConfiguration.neutronQuasiParticles,
109 theExitonConfiguration.protonQuasiParticles);
110
111 return frag;
112}
G4int getZ() const
G4int getA() const
G4LorentzVector getMomentum() const

◆ makeNuclearFragment()

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

Definition at line 214 of file G4InuclNuclei.cc.

214 {
215 if (a<=0 || z<0 || a<z) {
216 G4cerr << " >>> G4InuclNuclei::makeNuclearFragment() called with"
217 << " impossible arguments A=" << a << " Z=" << z << G4endl;
218 throw G4HadronicException(__FILE__, __LINE__,
219 "G4InuclNuclei impossible A/Z arguments");
220 }
221
223
224 // Use local lookup table (see G4IonTable.hh) to maintain singletons
225 // NOTE: G4ParticleDefinitions don't need to be explicitly deleted
226 // (see comments in G4IonTable.cc::~G4IonTable)
227
228 // If correct nucleus already created return it
229 static std::map<G4int, G4ParticleDefinition*> fragmentList;
230 if (fragmentList.find(code) != fragmentList.end()) return fragmentList[code];
231
232 // Name string follows format in G4IonTable.cc::GetIonName(Z,A,E)
233 std::stringstream zstr, astr;
234 zstr << z;
235 astr << a;
236
237 G4String name = "Z" + zstr.str() + "A" + astr.str();
238
239 G4double mass = getNucleiMass(a,z) *GeV/MeV; // From Bertini to GEANT4 units
240
241 // Arguments for constructor are as follows
242 // name mass width charge
243 // 2*spin parity C-conjugation
244 // 2*Isospin 2*Isospin3 G-parity
245 // type lepton number baryon number PDG encoding
246 // stable lifetime decay table
247 // shortlived subType anti_encoding Excitation-energy
248
249 G4Ions* fragPD = new G4Ions(name, mass, 0., z*eplus,
250 0, +1, 0,
251 0, 0, 0,
252 "nucleus", 0, a, code,
253 true, 0., 0,
254 true, "generic", 0, 0.);
255 fragPD->SetAntiPDGEncoding(0);
256
257 return (fragmentList[code] = fragPD); // Store in table for next lookup
258}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int J=0)
Definition: G4IonTable.cc:446
Definition: G4Ions.hh:52
void SetAntiPDGEncoding(G4int aEncoding)

Referenced by makeDefinition().

◆ operator G4Fragment()

G4InuclNuclei::operator G4Fragment ( ) const

Definition at line 114 of file G4InuclNuclei.cc.

114 {
115 return makeG4Fragment();
116}
G4Fragment makeG4Fragment() const

◆ operator=()

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

Definition at line 268 of file G4InuclNuclei.cc.

268 {
269 theExitonConfiguration = right.theExitonConfiguration;
271 return *this;
272}
G4InuclParticle & operator=(const G4InuclParticle &right)

◆ operator==()

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 }

◆ print()

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

Reimplemented from G4InuclParticle.

Definition at line 276 of file G4InuclNuclei.cc.

276 {
278 os << G4endl << " Nucleus: " << getDefinition()->GetParticleName()
279 << " A " << getA() << " Z " << getZ() << " mass " << getMass()
280 << " Eex (MeV) " << getExitationEnergy();
281
282 if (!theExitonConfiguration.empty())
283 os << G4endl << " " << theExitonConfiguration;
284}
virtual void print(std::ostream &os) const
const G4String & GetParticleName() const

◆ setExitationEnergy()

void G4InuclNuclei::setExitationEnergy ( G4double  e)

Definition at line 177 of file G4InuclNuclei.cc.

177 {
178 G4double ekin = getKineticEnergy(); // Current kinetic energy
179
180 G4double emass = getNucleiMass() + e*MeV/GeV; // From Bertini to G4 units
181
182 // Directly compute new kinetic energy from old
183 G4double ekin_new = std::sqrt(emass*emass + ekin*(2.*getMass()+ekin)) - emass;
184
185 setMass(emass); // Momentum is computed from mass and Ekin
186 setKineticEnergy(ekin_new);
187}
void setMass(G4double mass)
G4double getKineticEnergy() const

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

◆ setExitonConfiguration()

void G4InuclNuclei::setExitonConfiguration ( const G4ExitonConfiguration config)
inline

Definition at line 131 of file G4InuclNuclei.hh.

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

Referenced by G4CascadeRecoilMaker::makeRecoilNuclei().


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