Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends
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
 
voidoperator new (size_t)
 
void operator delete (void *aFragment)
 
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 68 of file G4Fragment.hh.

Constructor & Destructor Documentation

G4Fragment::G4Fragment ( )

Definition at line 53 of file G4Fragment.cc.

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

Definition at line 89 of file G4Fragment.cc.

90 {}
G4Fragment::G4Fragment ( const G4Fragment right)

Definition at line 71 of file G4Fragment.cc.

72 {
73  theA = right.theA;
74  theZ = right.theZ;
75  theExcitationEnergy = right.theExcitationEnergy;
76  theGroundStateMass = right.theGroundStateMass;
77  theMomentum = right.theMomentum;
78  theAngularMomentum = right.theAngularMomentum;
79  numberOfParticles = right.numberOfParticles;
80  numberOfCharged = right.numberOfCharged;
81  numberOfHoles = right.numberOfHoles;
82  numberOfChargedHoles = right.numberOfChargedHoles;
83  numberOfShellElectrons = right.numberOfShellElectrons;
84  theParticleDefinition = right.theParticleDefinition;
85  theCreationTime = right.theCreationTime;
86  isStable = right.isStable;
87 }
G4Fragment::G4Fragment ( G4int  A,
G4int  Z,
const G4LorentzVector aMomentum 
)

Definition at line 92 of file G4Fragment.cc.

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

Definition at line 119 of file G4Fragment.cc.

References G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGEncoding(), and G4ParticleDefinition::GetPDGMass().

120  :
121  theA(0),
122  theZ(0),
123  theMomentum(aMomentum),
124  theAngularMomentum(G4ThreeVector(0,0,0)),
125  numberOfParticles(0),
126  numberOfCharged(0),
127  numberOfHoles(0),
128  numberOfChargedHoles(0),
129  numberOfShellElectrons(0),
130  theParticleDefinition(aParticleDefinition),
131  theCreationTime(0.0),
132  isStable(true)
133 {
134  theExcitationEnergy = 0.0;
135  if(aParticleDefinition->GetPDGEncoding() != 22 &&
136  aParticleDefinition->GetPDGEncoding() != 11) {
137  G4String text = "G4Fragment::G4Fragment constructor for gamma used for "
138  + aParticleDefinition->GetParticleName();
139  throw G4HadronicException(__FILE__, __LINE__, text);
140  }
141  theGroundStateMass = aParticleDefinition->GetPDGMass();
142 }
CLHEP::Hep3Vector G4ThreeVector
const G4String & GetParticleName() const
G4double GetPDGMass() const

Member Function Documentation

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

Definition at line 293 of file G4Fragment.hh.

References G4NucleiProperties::GetNuclearMass().

Referenced by G4EvaporationProbability::ProbabilityDistributionFunction().

294 {
296 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double G4Fragment::GetA ( void  ) const
inline

Definition at line 303 of file G4Fragment.hh.

Referenced by G4WilsonAbrasionModel::ApplyYourself(), G4CascadeCheckBalance::collide(), and G4InuclCollider::deexcite().

304 {
305  return G4double(theA);
306 }
double G4double
Definition: G4Types.hh:76
G4int G4Fragment::GetA_asInt ( void  ) const
inline

Definition at line 238 of file G4Fragment.hh.

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

239 {
240  return theA;
241 }
const G4ThreeVector & G4Fragment::GetAngularMomentum ( ) const
inline

Definition at line 282 of file G4Fragment.hh.

Referenced by G4AblaInterface::DeExcite().

283 {
284  return theAngularMomentum;
285 }
G4double G4Fragment::GetBindingEnergy ( ) const
inline

Definition at line 265 of file G4Fragment.hh.

266 {
267  return (theA-theZ)*CLHEP::neutron_mass_c2 + theZ*CLHEP::proton_mass_c2
268  - theGroundStateMass;
269 }
G4double G4Fragment::GetCreationTime ( ) const
inline

Definition at line 398 of file G4Fragment.hh.

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

399 {
400  return theCreationTime;
401 }
G4double G4Fragment::GetExcitationEnergy ( void  ) const
inline

Definition at line 255 of file G4Fragment.hh.

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

256 {
257  return theExcitationEnergy;
258 }
G4double G4Fragment::GetGroundStateMass ( ) const
inline
const G4LorentzVector & G4Fragment::GetMomentum ( void  ) const
inline
G4int G4Fragment::GetNumberOfCharged ( ) const
inline
G4int G4Fragment::GetNumberOfChargedHoles ( ) const
inline

Definition at line 350 of file G4Fragment.hh.

Referenced by G4InuclNuclei::copy(), and G4ExitonConfiguration::fill().

351 {
352  return numberOfChargedHoles;
353 }
G4int G4Fragment::GetNumberOfElectrons ( ) const
inline

Definition at line 377 of file G4Fragment.hh.

378 {
379  return numberOfShellElectrons;
380 }
G4int G4Fragment::GetNumberOfExcitons ( ) const
inline

Definition at line 320 of file G4Fragment.hh.

Referenced by G4PreCompoundModel::DeExcite(), and operator<<().

321 {
322  return numberOfParticles + numberOfHoles;
323 }
G4int G4Fragment::GetNumberOfHoles ( ) const
inline
G4int G4Fragment::GetNumberOfParticles ( ) const
inline
G4ParticleDefinition * G4Fragment::GetParticleDefinition ( void  ) const
inline

Definition at line 388 of file G4Fragment.hh.

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

389 {
390  return theParticleDefinition;
391 }
G4double G4Fragment::GetZ ( void  ) const
inline

Definition at line 298 of file G4Fragment.hh.

Referenced by G4WilsonAbrasionModel::ApplyYourself(), and G4CascadeCheckBalance::collide().

299 {
300  return G4double(theZ);
301 }
double G4double
Definition: G4Types.hh:76
G4int G4Fragment::GetZ_asInt ( void  ) const
inline
G4bool G4Fragment::IsStable ( ) const
inline

Definition at line 408 of file G4Fragment.hh.

Referenced by operator<<().

409 {
410  return isStable;
411 }
void G4Fragment::operator delete ( void aFragment)
inline

Definition at line 222 of file G4Fragment.hh.

References pFragmentAllocator.

223 {
224  pFragmentAllocator->FreeSingle((G4Fragment *) aFragment);
225 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4Fragment > * pFragmentAllocator
Definition: G4Fragment.cc:50
void * G4Fragment::operator new ( size_t  )
inline

Definition at line 216 of file G4Fragment.hh.

References pFragmentAllocator.

217 {
219  return (void*) pFragmentAllocator->MallocSingle();
220 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4Fragment > * pFragmentAllocator
Definition: G4Fragment.cc:50
G4bool G4Fragment::operator!= ( const G4Fragment right) const

Definition at line 170 of file G4Fragment.cc.

171 {
172  return (this != (G4Fragment *) &right);
173 }
G4Fragment & G4Fragment::operator= ( const G4Fragment right)

Definition at line 144 of file G4Fragment.cc.

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

Definition at line 165 of file G4Fragment.cc.

166 {
167  return (this == (G4Fragment *) &right);
168 }
void G4Fragment::SetA ( G4double  value)
inline

Definition at line 314 of file G4Fragment.hh.

References G4lrint().

315 {
316  theA = G4lrint(value);
317  CalculateGroundStateMass();
318 }
int G4lrint(double ad)
Definition: templates.hh:163
const XML_Char int const XML_Char * value
void G4Fragment::SetAngularMomentum ( const G4ThreeVector value)
inline

Definition at line 287 of file G4Fragment.hh.

Referenced by G4INCLXXInterface::ApplyYourself().

288 {
289  theAngularMomentum = value;
290 }
const XML_Char int const XML_Char * value
void G4Fragment::SetCreationTime ( G4double  time)
inline
void G4Fragment::SetMomentum ( const G4LorentzVector value)
inline
void G4Fragment::SetNumberOfCharged ( G4int  value)
inline

Definition at line 369 of file G4Fragment.hh.

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

370 {
371  numberOfCharged = value;
372  if(value > numberOfParticles) {
373  NumberOfExitationWarning("SetNumberOfCharged");
374  }
375 }
const XML_Char int const XML_Char * value
void G4Fragment::SetNumberOfElectrons ( G4int  value)
inline

Definition at line 382 of file G4Fragment.hh.

383 {
384  numberOfShellElectrons = value;
385 }
const XML_Char int const XML_Char * value
void G4Fragment::SetNumberOfExcitedParticle ( G4int  valueTot,
G4int  valueP 
)
inline

Definition at line 336 of file G4Fragment.hh.

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

337 {
338  numberOfParticles = valueTot;
339  numberOfCharged = valueP;
340  if(valueTot < valueP) {
341  NumberOfExitationWarning("SetNumberOfExcitedParticle");
342  }
343 }
void G4Fragment::SetNumberOfHoles ( G4int  valueTot,
G4int  valueP = 0 
)
inline
void G4Fragment::SetNumberOfParticles ( G4int  value)
inline
void G4Fragment::SetParticleDefinition ( G4ParticleDefinition p)
inline

Definition at line 393 of file G4Fragment.hh.

394 {
395  theParticleDefinition = p;
396 }
const char * p
Definition: xmltok.h:285
void G4Fragment::SetStable ( G4bool  val)
inline

Definition at line 413 of file G4Fragment.hh.

414 {
415  isStable = val;
416 }
void G4Fragment::SetZ ( G4double  value)
inline

Definition at line 308 of file G4Fragment.hh.

References G4lrint().

309 {
310  theZ = G4lrint(value);
311  CalculateGroundStateMass();
312 }
int G4lrint(double ad)
Definition: templates.hh:163
const XML_Char int const XML_Char * value
void G4Fragment::SetZandA_asInt ( G4int  Znew,
G4int  Anew 
)
inline

Definition at line 248 of file G4Fragment.hh.

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

249 {
250  theZ = Znew;
251  theA = Anew;
252  CalculateGroundStateMass();
253 }

Friends And Related Function Documentation

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

Definition at line 175 of file G4Fragment.cc.

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

Definition at line 219 of file G4Fragment.cc.

220 {
221  out << &theFragment;
222  return out;
223 }

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