Geant4 10.7.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)
 
G4bool 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)
 
G4bool operator== (const G4InuclParticle &right)
 
G4bool 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
 
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 67 of file G4InuclNuclei.hh.

Constructor & Destructor Documentation

◆ G4InuclNuclei() [1/8]

G4InuclNuclei::G4InuclNuclei ( )
inline

Definition at line 69 of file G4InuclNuclei.hh.

◆ G4InuclNuclei() [2/8]

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

Definition at line 71 of file G4InuclNuclei.hh.

72 : G4InuclParticle(dynPart, model) {}

◆ G4InuclNuclei() [3/8]

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

Definition at line 74 of file G4InuclNuclei.hh.

75 : G4InuclParticle(makeDefinition(a,z), model) {
77 }
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 79 of file G4InuclNuclei.hh.

81 : G4InuclParticle(makeDefinition(a,z), mom, model) {
83 }

◆ G4InuclNuclei() [5/8]

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

Definition at line 85 of file G4InuclNuclei.hh.

87 : G4InuclParticle(makeDefinition(a,z), ekin, model) {
89 }

◆ G4InuclNuclei() [6/8]

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

Definition at line 81 of file G4InuclNuclei.cc.

83 : G4InuclParticle() {
84 copy(aFragment, model);
85}
void copy(const G4Fragment &aFragment, Model model=DefaultModel)

◆ G4InuclNuclei() [7/8]

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

Definition at line 127 of file G4InuclNuclei.cc.

129 : G4InuclParticle() {
130 copy(a3DNucleus, model);
131}

◆ ~G4InuclNuclei()

virtual G4InuclNuclei::~G4InuclNuclei ( )
inlinevirtual

Definition at line 95 of file G4InuclNuclei.hh.

95{}

◆ G4InuclNuclei() [8/8]

G4InuclNuclei::G4InuclNuclei ( const G4InuclNuclei right)
inline

Definition at line 98 of file G4InuclNuclei.hh.

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

Member Function Documentation

◆ clear()

void G4InuclNuclei::clear ( )

Definition at line 176 of file G4InuclNuclei.cc.

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

◆ clearExitonConfiguration()

void G4InuclNuclei::clearExitonConfiguration ( )
inline

Definition at line 134 of file G4InuclNuclei.hh.

134{ theExitonConfiguration.clear(); }

Referenced by clear(), and fill().

◆ copy() [1/2]

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

Definition at line 87 of file G4InuclNuclei.cc.

87 {
88 fill(aFragment.GetMomentum()/GeV, aFragment.GetA_asInt(),
89 aFragment.GetZ_asInt(), aFragment.GetExcitationEnergy(), model);
90
91 // Exciton configuration must be set by hand
92 theExitonConfiguration.protonQuasiParticles = aFragment.GetNumberOfCharged();
93
94 theExitonConfiguration.neutronQuasiParticles =
95 aFragment.GetNumberOfParticles() - aFragment.GetNumberOfCharged();
96
97 theExitonConfiguration.protonHoles = aFragment.GetNumberOfChargedHoles();
98
99 theExitonConfiguration.neutronHoles =
100 aFragment.GetNumberOfHoles() - theExitonConfiguration.protonHoles;
101}
G4int GetNumberOfParticles() const
Definition: G4Fragment.hh:337
G4int GetNumberOfHoles() const
Definition: G4Fragment.hh:357
G4int GetNumberOfChargedHoles() const
Definition: G4Fragment.hh:362
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:275
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:299
G4int GetZ_asInt() const
Definition: G4Fragment.hh:263
G4int GetNumberOfCharged() const
Definition: G4Fragment.hh:342
G4int GetA_asInt() const
Definition: G4Fragment.hh:258
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 133 of file G4InuclNuclei.cc.

133 {
134 if (!a3DNucleus) return; // Null pointer means no action
135
136 fill(0., a3DNucleus->GetMassNumber(), a3DNucleus->GetCharge(), 0., model);
137
138 // Convert every hit nucleon into an exciton hole
139 if (a3DNucleus->StartLoop()) {
140 G4Nucleon* nucl = 0;
141
142 /* Loop checking 08.06.2015 MHK */
143 while ((nucl = a3DNucleus->GetNextNucleon())) {
144 if (nucl->AreYouHit()) { // Found previously interacted nucleon
145 if (nucl->GetParticleType() == G4Proton::Definition())
146 theExitonConfiguration.protonHoles++;
147
148 if (nucl->GetParticleType() == G4Neutron::Definition())
149 theExitonConfiguration.neutronHoles++;
150 }
151 }
152 }
153}
static G4Neutron * Definition()
Definition: G4Neutron.cc:53
G4bool AreYouHit() const
Definition: G4Nucleon.hh:96
const G4ParticleDefinition * GetParticleType() const
Definition: G4Nucleon.hh:83
static G4Proton * Definition()
Definition: G4Proton.cc:48
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 158 of file G4InuclNuclei.cc.

159 {
161 setMomentum(mom);
164 setModel(model);
165}
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 167 of file G4InuclNuclei.cc.

168 {
170 setKineticEnergy(ekin);
173 setModel(model);
174}
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 143 of file G4InuclNuclei.hh.

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

Referenced by getExitationEnergyInGeV(), and print().

◆ getExitationEnergyInGeV()

G4double G4InuclNuclei::getExitationEnergyInGeV ( ) const
inline

Definition at line 147 of file G4InuclNuclei.hh.

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

◆ getExitonConfiguration()

const G4ExitonConfiguration & G4InuclNuclei::getExitonConfiguration ( ) const
inline

Definition at line 149 of file G4InuclNuclei.hh.

149 {
150 return theExitonConfiguration;
151 }

◆ getNucleiMass() [1/2]

◆ getNucleiMass() [2/2]

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

Definition at line 276 of file G4InuclNuclei.cc.

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

◆ getZ()

◆ makeDefinition()

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

Definition at line 204 of file G4InuclNuclei.cc.

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

Referenced by fill().

◆ makeG4Fragment()

G4Fragment G4InuclNuclei::makeG4Fragment ( ) const

Definition at line 105 of file G4InuclNuclei.cc.

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

◆ makeNuclearFragment()

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

Definition at line 229 of file G4InuclNuclei.cc.

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

Referenced by makeDefinition().

◆ operator G4Fragment()

G4InuclNuclei::operator G4Fragment ( ) const

Definition at line 120 of file G4InuclNuclei.cc.

120 {
121 return makeG4Fragment();
122}
G4Fragment makeG4Fragment() const

◆ operator=()

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

Definition at line 284 of file G4InuclNuclei.cc.

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

◆ operator==()

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

Definition at line 105 of file G4InuclNuclei.hh.

105 {
106 return ( G4InuclParticle::operator==(right) &&
107 theExitonConfiguration == right.theExitonConfiguration );
108 }

◆ print()

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

Reimplemented from G4InuclParticle.

Definition at line 294 of file G4InuclNuclei.cc.

294 {
296 os << G4endl << " Nucleus: " << getDefinition()->GetParticleName()
297 << " A " << getA() << " Z " << getZ() << " mass " << getMass()
298 << " Eex (MeV) " << getExitationEnergy();
299
300 if (!theExitonConfiguration.empty())
301 os << G4endl << " " << theExitonConfiguration;
302}
virtual void print(std::ostream &os) const
const G4String & GetParticleName() const

◆ setExitationEnergy()

void G4InuclNuclei::setExitationEnergy ( G4double  e)

Definition at line 185 of file G4InuclNuclei.cc.

185 {
186 G4double ekin = getKineticEnergy(); // Current kinetic energy
187
188 G4double emass = getNucleiMass() + e*MeV/GeV; // From Bertini to G4 units
189
190 // Safety check -- if zero energy, don't do computation
191 G4double ekin_new = (ekin == 0.) ? 0.
192 : std::sqrt(emass*emass + ekin*(2.*getMass()+ekin)) - emass;
193
194 setMass(emass); // Momentum is computed from mass and Ekin
195 setKineticEnergy(ekin_new);
196}
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 130 of file G4InuclNuclei.hh.

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

Referenced by G4CascadeRecoilMaker::makeRecoilNuclei().


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