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

#include <G4Fragment.hh>

Public Member Functions

 G4Fragment ()
 
 ~G4Fragment ()
 
 G4Fragment (const G4Fragment &right)
 
 G4Fragment (G4int A, G4int Z, const G4LorentzVector &aMomentum)
 
 G4Fragment (const G4LorentzVector &aMomentum, G4ParticleDefinition *aParticleDefinition)
 
G4Fragmentoperator= (const G4Fragment &right)
 
G4bool operator== (const G4Fragment &right) const
 
G4bool operator!= (const G4Fragment &right) const
 
G4int GetZ_asInt () const
 
G4int GetA_asInt () const
 
void SetZandA_asInt (G4int Znew, G4int Anew)
 
G4double GetExcitationEnergy () const
 
G4double GetGroundStateMass () const
 
G4double GetBindingEnergy () const
 
const G4LorentzVectorGetMomentum () const
 
void SetMomentum (const G4LorentzVector &value)
 
const G4ThreeVectorGetAngularMomentum () const
 
void SetAngularMomentum (const G4ThreeVector &value)
 
G4double ComputeGroundStateMass (G4int Z, G4int A) const
 
G4double GetZ () const
 
G4double GetA () const
 
void SetZ (G4double value)
 
void SetA (G4double value)
 
G4int GetNumberOfExcitons () const
 
G4int GetNumberOfParticles () const
 
G4int GetNumberOfCharged () const
 
void SetNumberOfExcitedParticle (G4int valueTot, G4int valueP)
 
G4int GetNumberOfHoles () const
 
G4int GetNumberOfChargedHoles () const
 
void SetNumberOfHoles (G4int valueTot, G4int valueP=0)
 
void SetNumberOfParticles (G4int value)
 
void SetNumberOfCharged (G4int value)
 
G4int GetNumberOfElectrons () const
 
void SetNumberOfElectrons (G4int value)
 
G4ParticleDefinitionGetParticleDefinition () const
 
void SetParticleDefinition (G4ParticleDefinition *p)
 
G4double GetCreationTime () const
 
void SetCreationTime (G4double time)
 
G4bool IsStable () const
 
void SetStable (G4bool val)
 

Friends

std::ostream & operator<< (std::ostream &, const G4Fragment *)
 
std::ostream & operator<< (std::ostream &, const G4Fragment &)
 

Detailed Description

Definition at line 67 of file G4Fragment.hh.

Constructor & Destructor Documentation

◆ G4Fragment() [1/4]

G4Fragment::G4Fragment ( )

Definition at line 51 of file G4Fragment.cc.

51 :
52 theA(0),
53 theZ(0),
54 theExcitationEnergy(0.0),
55 theGroundStateMass(0.0),
56 theMomentum(G4LorentzVector(0,0,0,0)),
57 theAngularMomentum(G4ThreeVector(0,0,0)),
58 numberOfParticles(0),
59 numberOfCharged(0),
60 numberOfHoles(0),
61 numberOfChargedHoles(0),
62 numberOfShellElectrons(0),
63 theParticleDefinition(0),
64 theCreationTime(0.0),
65 isStable(true)
66{}
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector

◆ ~G4Fragment()

G4Fragment::~G4Fragment ( )

Definition at line 87 of file G4Fragment.cc.

88{}

◆ G4Fragment() [2/4]

G4Fragment::G4Fragment ( const G4Fragment right)

Definition at line 69 of file G4Fragment.cc.

70{
71 theA = right.theA;
72 theZ = right.theZ;
73 theExcitationEnergy = right.theExcitationEnergy;
74 theGroundStateMass = right.theGroundStateMass;
75 theMomentum = right.theMomentum;
76 theAngularMomentum = right.theAngularMomentum;
77 numberOfParticles = right.numberOfParticles;
78 numberOfCharged = right.numberOfCharged;
79 numberOfHoles = right.numberOfHoles;
80 numberOfChargedHoles = right.numberOfChargedHoles;
81 numberOfShellElectrons = right.numberOfShellElectrons;
82 theParticleDefinition = right.theParticleDefinition;
83 theCreationTime = right.theCreationTime;
84 isStable = right.isStable;
85}

◆ G4Fragment() [3/4]

G4Fragment::G4Fragment ( G4int  A,
G4int  Z,
const G4LorentzVector aMomentum 
)

Definition at line 90 of file G4Fragment.cc.

90 :
91 theA(A),
92 theZ(Z),
93 theMomentum(aMomentum),
94 theAngularMomentum(G4ThreeVector(0,0,0)),
95 numberOfParticles(0),
96 numberOfCharged(0),
97 numberOfHoles(0),
98 numberOfChargedHoles(0),
99 numberOfShellElectrons(0),
100 theParticleDefinition(0),
101 theCreationTime(0.0),
102 isStable(true)
103{
104 theExcitationEnergy = 0.0;
105 theGroundStateMass = 0.0;
106 if(theA > 0) {
107 CalculateGroundStateMass();
108 CalculateExcitationEnergy();
109
110 // default flag of stability for excited fragments is false
111 // it may be overwritten by SetStable(G4bool val) method
112 if(theExcitationEnergy > 0.0) { isStable = false; }
113 }
114}

◆ G4Fragment() [4/4]

G4Fragment::G4Fragment ( const G4LorentzVector aMomentum,
G4ParticleDefinition aParticleDefinition 
)

Definition at line 117 of file G4Fragment.cc.

118 :
119 theA(0),
120 theZ(0),
121 theMomentum(aMomentum),
122 theAngularMomentum(G4ThreeVector(0,0,0)),
123 numberOfParticles(0),
124 numberOfCharged(0),
125 numberOfHoles(0),
126 numberOfChargedHoles(0),
127 numberOfShellElectrons(0),
128 theParticleDefinition(aParticleDefinition),
129 theCreationTime(0.0),
130 isStable(true)
131{
132 theExcitationEnergy = 0.0;
133 if(aParticleDefinition != G4Gamma::Gamma() &&
134 aParticleDefinition != G4Electron::Electron()) {
135 G4String text = "G4Fragment::G4Fragment constructor for gamma used for "
136 + aParticleDefinition->GetParticleName();
137 throw G4HadronicException(__FILE__, __LINE__, text);
138 }
139 theGroundStateMass = aParticleDefinition->GetPDGMass();
140}
static G4Electron * Electron()
Definition: G4Electron.cc:94
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
const G4String & GetParticleName() const

Member Function Documentation

◆ ComputeGroundStateMass()

G4double G4Fragment::ComputeGroundStateMass ( G4int  Z,
G4int  A 
) const
inline

Definition at line 273 of file G4Fragment.hh.

274{
276}
static G4double GetNuclearMass(const G4double A, const G4double Z)

Referenced by G4EvaporationProbability::ProbabilityDistributionFunction().

◆ GetA()

◆ GetA_asInt()

G4int G4Fragment::GetA_asInt ( ) const
inline

Definition at line 218 of file G4Fragment.hh.

219{
220 return theA;
221}

Referenced by G4NeutronRadCapture::ApplyYourself(), G4ExcitationHandler::BreakItUp(), G4InuclEvaporation::BreakItUp(), G4WilsonAblationModel::BreakItUp(), G4Evaporation::BreakItUp(), G4StatMF::BreakItUp(), G4CompetitiveFission::BreakUp(), G4UnstableFragmentBreakUp::BreakUpFragment(), G4GEMProbability::CalcAlphaParam(), G4GEMProbability::CalcBetaParam(), G4PreCompoundTransitions::CalculateProbability(), G4StatMFMacroCanonical::ChooseAandZ(), G4StatMFMicroCanonical::ChooseAandZ(), G4InuclNuclei::copy(), G4ContinuumGammaDeexcitation::CreateTransition(), G4DiscreteGammaDeexcitation::CreateTransition(), G4PreCompoundModel::DeExcite(), G4FissionProbability::EmissionProbability(), G4E1Probability::EmissionProbDensity(), G4E1SingleProbability1::EmissionProbDensity(), G4CascadeColliderBase::explosion(), G4StatMFMacroCanonical::G4StatMFMacroCanonical(), G4GEMProbability::GetCoulombBarrier(), G4EvaporationChannel::GetEmissionProbability(), G4CompetitiveFission::GetEmissionProbability(), G4GEMChannel::GetEmissionProbability(), G4PromptPhotonEvaporation::GetEmissionProbability(), G4FermiConfigurationList::GetFragments(), G4HETCChargedFragment::GetKineticEnergy(), G4HETCNeutron::GetKineticEnergy(), G4CollisionOutput::getTotalBaryonNumber(), G4VPreCompoundFragment::Initialize(), G4PreCompoundTransitions::PerformTransition(), G4EvaporationProbability::ProbabilityDistributionFunction(), G4PreCompoundIon::ProbabilityDistributionFunction(), and G4PreCompoundNucleon::ProbabilityDistributionFunction().

◆ GetAngularMomentum()

const G4ThreeVector & G4Fragment::GetAngularMomentum ( ) const
inline

Definition at line 262 of file G4Fragment.hh.

263{
264 return theAngularMomentum;
265}

◆ GetBindingEnergy()

G4double G4Fragment::GetBindingEnergy ( ) const
inline

Definition at line 245 of file G4Fragment.hh.

246{
247 return (theA-theZ)*CLHEP::neutron_mass_c2 + theZ*CLHEP::proton_mass_c2
248 - theGroundStateMass;
249}

◆ GetCreationTime()

G4double G4Fragment::GetCreationTime ( ) const
inline

Definition at line 378 of file G4Fragment.hh.

379{
380 return theCreationTime;
381}

Referenced by G4UnstableFragmentBreakUp::BreakUpFragment(), and G4VGammaDeexcitation::GenerateGamma().

◆ GetExcitationEnergy()

G4double G4Fragment::GetExcitationEnergy ( ) const
inline

Definition at line 235 of file G4Fragment.hh.

236{
237 return theExcitationEnergy;
238}

Referenced by G4ParaFissionModel::ApplyYourself(), G4ExcitationHandler::BreakItUp(), G4AblaEvaporation::BreakItUp(), G4InuclEvaporation::BreakItUp(), G4BertiniEvaporation::BreakItUp(), G4WilsonAblationModel::BreakItUp(), G4Evaporation::BreakItUp(), G4StatMF::BreakItUp(), G4CompetitiveFission::BreakUp(), G4GEMChannel::BreakUp(), G4GNASHTransitions::CalculateProbability(), G4PreCompoundTransitions::CalculateProbability(), G4ContinuumGammaDeexcitation::CanDoTransition(), G4DiscreteGammaDeexcitation::CanDoTransition(), G4InuclNuclei::copy(), G4ContinuumGammaDeexcitation::CreateTransition(), G4DiscreteGammaDeexcitation::CreateTransition(), G4PreCompoundModel::DeExcite(), G4VGammaDeexcitation::DoChain(), G4E1SingleProbability1::EmissionProbability(), G4EvaporationProbability::EmissionProbability(), G4GEMProbability::EmissionProbability(), G4FissionProbability::EmissionProbability(), G4E1Probability::EmissionProbDensity(), G4E1SingleProbability1::EmissionProbDensity(), G4PromptPhotonEvaporation::EmittedFragment(), G4CascadeColliderBase::explosion(), G4VGammaDeexcitation::GenerateGamma(), G4GEMProbability::GetCoulombBarrier(), G4EvaporationChannel::GetEmissionProbability(), G4CompetitiveFission::GetEmissionProbability(), G4GEMChannel::GetEmissionProbability(), G4PhotonEvaporation::GetEmissionProbability(), G4PromptPhotonEvaporation::GetEmissionProbability(), G4VGammaDeexcitation::Initialize(), G4VPreCompoundFragment::Initialize(), G4EvaporationProbability::ProbabilityDistributionFunction(), G4PreCompoundIon::ProbabilityDistributionFunction(), G4PreCompoundNucleon::ProbabilityDistributionFunction(), G4CollisionOutput::setOnShell(), G4CollisionOutput::setRemainingExitationEnergy(), and G4VGammaDeexcitation::Update().

◆ GetGroundStateMass()

◆ GetMomentum()

◆ GetNumberOfCharged()

◆ GetNumberOfChargedHoles()

G4int G4Fragment::GetNumberOfChargedHoles ( ) const
inline

Definition at line 330 of file G4Fragment.hh.

331{
332 return numberOfChargedHoles;
333}

Referenced by G4InuclNuclei::copy().

◆ GetNumberOfElectrons()

G4int G4Fragment::GetNumberOfElectrons ( ) const
inline

Definition at line 357 of file G4Fragment.hh.

358{
359 return numberOfShellElectrons;
360}

◆ GetNumberOfExcitons()

G4int G4Fragment::GetNumberOfExcitons ( ) const
inline

Definition at line 300 of file G4Fragment.hh.

301{
302 return numberOfParticles + numberOfHoles;
303}

Referenced by G4PreCompoundModel::DeExcite().

◆ GetNumberOfHoles()

◆ GetNumberOfParticles()

◆ GetParticleDefinition()

G4ParticleDefinition * G4Fragment::GetParticleDefinition ( void  ) const
inline

Definition at line 368 of file G4Fragment.hh.

369{
370 return theParticleDefinition;
371}

Referenced by G4NeutronRadCapture::ApplyYourself(), and G4ParaFissionModel::ApplyYourself().

◆ GetZ()

◆ GetZ_asInt()

◆ IsStable()

G4bool G4Fragment::IsStable ( ) const
inline

Definition at line 388 of file G4Fragment.hh.

389{
390 return isStable;
391}

◆ operator!=()

G4bool G4Fragment::operator!= ( const G4Fragment right) const

Definition at line 168 of file G4Fragment.cc.

169{
170 return (this != (G4Fragment *) &right);
171}

◆ operator=()

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

Definition at line 142 of file G4Fragment.cc.

143{
144 if (this != &right) {
145 theA = right.theA;
146 theZ = right.theZ;
147 theExcitationEnergy = right.theExcitationEnergy;
148 theGroundStateMass = right.theGroundStateMass;
149 theMomentum = right.theMomentum;
150 theAngularMomentum = right.theAngularMomentum;
151 numberOfParticles = right.numberOfParticles;
152 numberOfCharged = right.numberOfCharged;
153 numberOfHoles = right.numberOfHoles;
154 numberOfChargedHoles = right.numberOfChargedHoles;
155 numberOfShellElectrons = right.numberOfShellElectrons;
156 theParticleDefinition = right.theParticleDefinition;
157 theCreationTime = right.theCreationTime;
158 isStable = right.isStable;
159 }
160 return *this;
161}

◆ operator==()

G4bool G4Fragment::operator== ( const G4Fragment right) const

Definition at line 163 of file G4Fragment.cc.

164{
165 return (this == (G4Fragment *) &right);
166}

◆ SetA()

void G4Fragment::SetA ( G4double  value)
inline

Definition at line 294 of file G4Fragment.hh.

295{
296 theA = G4lrint(value);
297 CalculateGroundStateMass();
298}
int G4lrint(double ad)
Definition: templates.hh:163

◆ SetAngularMomentum()

void G4Fragment::SetAngularMomentum ( const G4ThreeVector value)
inline

Definition at line 267 of file G4Fragment.hh.

268{
269 theAngularMomentum = value;
270}

Referenced by G4INCLXXInterface::ApplyYourself().

◆ SetCreationTime()

void G4Fragment::SetCreationTime ( G4double  time)
inline

◆ SetMomentum()

◆ SetNumberOfCharged()

void G4Fragment::SetNumberOfCharged ( G4int  value)
inline

Definition at line 349 of file G4Fragment.hh.

350{
351 numberOfCharged = value;
352 if(value > numberOfParticles) {
353 NumberOfExitationWarning("SetNumberOfCharged");
354 }
355}

Referenced by G4PreCompoundEmission::PerformEmission(), G4GNASHTransitions::PerformTransition(), G4PreCompoundTransitions::PerformTransition(), and G4GeneratorPrecompoundInterface::Propagate().

◆ SetNumberOfElectrons()

void G4Fragment::SetNumberOfElectrons ( G4int  value)
inline

Definition at line 362 of file G4Fragment.hh.

363{
364 numberOfShellElectrons = value;
365}

◆ SetNumberOfExcitedParticle()

void G4Fragment::SetNumberOfExcitedParticle ( G4int  valueTot,
G4int  valueP 
)
inline

Definition at line 316 of file G4Fragment.hh.

317{
318 numberOfParticles = valueTot;
319 numberOfCharged = valueP;
320 if(valueTot < valueP) {
321 NumberOfExitationWarning("SetNumberOfExcitedParticle");
322 }
323}

Referenced by G4MuMinusCapturePrecompound::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4InuclNuclei::makeG4Fragment(), and G4CascadeRecoilMaker::makeRecoilFragment().

◆ SetNumberOfHoles()

void G4Fragment::SetNumberOfHoles ( G4int  valueTot,
G4int  valueP = 0 
)
inline

◆ SetNumberOfParticles()

void G4Fragment::SetNumberOfParticles ( G4int  value)
inline

◆ SetParticleDefinition()

void G4Fragment::SetParticleDefinition ( G4ParticleDefinition p)
inline

Definition at line 373 of file G4Fragment.hh.

374{
375 theParticleDefinition = p;
376}

◆ SetStable()

void G4Fragment::SetStable ( G4bool  val)
inline

Definition at line 393 of file G4Fragment.hh.

394{
395 isStable = val;
396}

◆ SetZ()

void G4Fragment::SetZ ( G4double  value)
inline

Definition at line 288 of file G4Fragment.hh.

289{
290 theZ = G4lrint(value);
291 CalculateGroundStateMass();
292}

◆ SetZandA_asInt()

void G4Fragment::SetZandA_asInt ( G4int  Znew,
G4int  Anew 
)
inline

Definition at line 228 of file G4Fragment.hh.

229{
230 theZ = Znew;
231 theA = Anew;
232 CalculateGroundStateMass();
233}

Referenced by G4UnstableFragmentBreakUp::BreakUpFragment(), G4CascadeRecoilMaker::makeRecoilFragment(), and G4PreCompoundEmission::PerformEmission().

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  out,
const G4Fragment theFragment 
)
friend

Definition at line 217 of file G4Fragment.cc.

218{
219 out << &theFragment;
220 return out;
221}

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  out,
const G4Fragment theFragment 
)
friend

Definition at line 173 of file G4Fragment.cc.

174{
175 if (!theFragment) {
176 out << "Fragment: null pointer ";
177 return out;
178 }
179
180 std::ios::fmtflags old_floatfield = out.flags();
181 out.setf(std::ios::floatfield);
182
183 out << "Fragment: A = " << std::setw(3) << theFragment->theA
184 << ", Z = " << std::setw(3) << theFragment->theZ ;
185 out.setf(std::ios::scientific,std::ios::floatfield);
186
187 // Store user's precision setting and reset to (3) here: back-compatibility
188 std::streamsize floatPrec = out.precision();
189
190 out << std::setprecision(3)
191 << ", U = " << theFragment->GetExcitationEnergy()/CLHEP::MeV
192 << " MeV IsStable= " << theFragment->IsStable() << G4endl
193 << " P = ("
194 << theFragment->theMomentum.x()/CLHEP::MeV << ","
195 << theFragment->theMomentum.y()/CLHEP::MeV << ","
196 << theFragment->theMomentum.z()/CLHEP::MeV
197 << ") MeV E = "
198 << theFragment->theMomentum.t()/CLHEP::MeV << " MeV"
199 << G4endl;
200
201 // What about Angular momentum???
202
203 if (theFragment->GetNumberOfExcitons() != 0) {
204 out << " "
205 << "#Particles= " << theFragment->numberOfParticles
206 << ", #Charged= " << theFragment->numberOfCharged
207 << ", #Holes= " << theFragment->numberOfHoles
208 << ", #ChargedHoles= " << theFragment->numberOfChargedHoles
209 << G4endl;
210 }
211 out.setf(old_floatfield,std::ios::floatfield);
212 out.precision(floatPrec);
213
214 return out;
215}
#define G4endl
Definition: G4ios.hh:52
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:235
G4bool IsStable() const
Definition: G4Fragment.hh:388
G4int GetNumberOfExcitons() const
Definition: G4Fragment.hh:300

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