Geant4  10.02.p03
G4Fragment Class Reference

#include <G4Fragment.hh>

Collaboration diagram for G4Fragment:

Public Member Functions

 G4Fragment ()
 
 ~G4Fragment ()
 
 G4Fragment (const G4Fragment &right)
 
 G4Fragment (G4int A, G4int Z, const G4LorentzVector &aMomentum)
 
 G4Fragment (const G4LorentzVector &aMomentum, const G4ParticleDefinition *aParticleDefinition)
 
G4Fragmentoperator= (const G4Fragment &right)
 
G4bool operator== (const G4Fragment &right) const
 
G4bool operator!= (const G4Fragment &right) const
 
void * operator 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)
 
G4double ComputeGroundStateMass (G4int Z, G4int A) const
 
G4double GetSpin () const
 
void SetSpin (G4double value)
 
G4int GetCreatorModelType () const
 
void SetCreatorModelType (G4int value)
 
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)
 
const G4ParticleDefinitionGetParticleDefinition () const
 
void SetParticleDefinition (const G4ParticleDefinition *p)
 
G4double GetCreationTime () const
 
void SetCreationTime (G4double time)
 
G4NuclearPolarizationGetNuclearPolarization () const
 
void SetNuclearPolarization (G4NuclearPolarization *)
 
void SetAngularMomentum (G4ThreeVector &)
 
G4ThreeVector GetAngularMomentum () const
 

Private Member Functions

void ExcitationEnergyWarning ()
 
void NumberOfExitationWarning (const G4String &)
 
void CalculateExcitationEnergy ()
 
void CalculateGroundStateMass ()
 

Private Attributes

G4int theA
 
G4int theZ
 
G4double theExcitationEnergy
 
G4double theGroundStateMass
 
G4LorentzVector theMomentum
 
G4NuclearPolarizationthePolarization
 
G4int creatorModel
 
G4int numberOfParticles
 
G4int numberOfCharged
 
G4int numberOfHoles
 
G4int numberOfChargedHoles
 
G4int numberOfShellElectrons
 
const G4ParticleDefinitiontheParticleDefinition
 
G4double spin
 
G4double theCreationTime
 

Friends

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

Detailed Description

Definition at line 66 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),
55  theGroundStateMass(0.0),
56  theMomentum(G4LorentzVector(0,0,0,0)),
57  thePolarization(nullptr),
58  creatorModel(-1),
60  numberOfCharged(0),
61  numberOfHoles(0),
64  theParticleDefinition(nullptr),
65  spin(0.0),
66  theCreationTime(0.0)
67 {}
G4int theZ
Definition: G4Fragment.hh:182
G4double theCreationTime
Definition: G4Fragment.hh:208
G4double theGroundStateMass
Definition: G4Fragment.hh:186
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
G4double spin
Definition: G4Fragment.hh:207
G4int theA
Definition: G4Fragment.hh:180
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
G4int numberOfHoles
Definition: G4Fragment.hh:199
G4int creatorModel
Definition: G4Fragment.hh:194
G4int numberOfParticles
Definition: G4Fragment.hh:197
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205
G4double theExcitationEnergy
Definition: G4Fragment.hh:184
CLHEP::HepLorentzVector G4LorentzVector

◆ ~G4Fragment()

G4Fragment::~G4Fragment ( )

Definition at line 92 of file G4Fragment.cc.

93 {}

◆ G4Fragment() [2/4]

G4Fragment::G4Fragment ( const G4Fragment right)

Definition at line 70 of file G4Fragment.cc.

70  :
71  theA(right.theA),
72  theZ(right.theZ),
75  theMomentum(right.theMomentum),
76  thePolarization(nullptr),
84  spin(right.spin),
86 {
87  if(right.thePolarization != nullptr) {
89  }
90 }
G4int theZ
Definition: G4Fragment.hh:182
G4double theCreationTime
Definition: G4Fragment.hh:208
G4double theGroundStateMass
Definition: G4Fragment.hh:186
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
G4double spin
Definition: G4Fragment.hh:207
G4int theA
Definition: G4Fragment.hh:180
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
G4int numberOfHoles
Definition: G4Fragment.hh:199
G4int creatorModel
Definition: G4Fragment.hh:194
G4int numberOfParticles
Definition: G4Fragment.hh:197
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205
G4double theExcitationEnergy
Definition: G4Fragment.hh:184

◆ G4Fragment() [3/4]

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

Definition at line 95 of file G4Fragment.cc.

95  :
96  theA(A),
97  theZ(Z),
99  theGroundStateMass(0.0),
100  theMomentum(aMomentum),
101  thePolarization(nullptr),
102  creatorModel(-1),
104  numberOfCharged(0),
105  numberOfHoles(0),
108  theParticleDefinition(nullptr),
109  spin(0.0),
110  theCreationTime(0.0)
111 {
112  if(theA > 0) {
115  }
116 }
G4int theZ
Definition: G4Fragment.hh:182
G4double theCreationTime
Definition: G4Fragment.hh:208
G4double theGroundStateMass
Definition: G4Fragment.hh:186
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
double A(double temperature)
Float_t Z
G4double spin
Definition: G4Fragment.hh:207
void CalculateExcitationEnergy()
Definition: G4Fragment.hh:239
G4int theA
Definition: G4Fragment.hh:180
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
G4int numberOfHoles
Definition: G4Fragment.hh:199
G4int creatorModel
Definition: G4Fragment.hh:194
G4int numberOfParticles
Definition: G4Fragment.hh:197
void CalculateGroundStateMass()
Definition: G4Fragment.hh:251
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205
G4double theExcitationEnergy
Definition: G4Fragment.hh:184
Here is the call graph for this function:

◆ G4Fragment() [4/4]

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

Definition at line 119 of file G4Fragment.cc.

120  :
121  theA(0),
122  theZ(0),
123  theExcitationEnergy(0.0),
124  theMomentum(aMomentum),
125  thePolarization(nullptr),
126  creatorModel(-1),
128  numberOfCharged(0),
129  numberOfHoles(0),
132  theParticleDefinition(aParticleDefinition),
133  spin(0.0),
134  theCreationTime(0.0)
135 {
136  if(aParticleDefinition->GetPDGEncoding() != 22 &&
137  aParticleDefinition->GetPDGEncoding() != 11) {
138  G4String text = "G4Fragment::G4Fragment constructor for gamma used for "
139  + aParticleDefinition->GetParticleName();
140  throw G4HadronicException(__FILE__, __LINE__, text);
141  }
142  theGroundStateMass = aParticleDefinition->GetPDGMass();
143 }
G4int theZ
Definition: G4Fragment.hh:182
G4double theCreationTime
Definition: G4Fragment.hh:208
G4double theGroundStateMass
Definition: G4Fragment.hh:186
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
const G4String & GetParticleName() const
G4double spin
Definition: G4Fragment.hh:207
G4int theA
Definition: G4Fragment.hh:180
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
G4int numberOfHoles
Definition: G4Fragment.hh:199
G4int creatorModel
Definition: G4Fragment.hh:194
G4int numberOfParticles
Definition: G4Fragment.hh:197
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205
G4double theExcitationEnergy
Definition: G4Fragment.hh:184
Here is the call graph for this function:

Member Function Documentation

◆ CalculateExcitationEnergy()

void G4Fragment::CalculateExcitationEnergy ( )
inlineprivate

Definition at line 239 of file G4Fragment.hh.

240 {
243 }
G4double theGroundStateMass
Definition: G4Fragment.hh:186
void ExcitationEnergyWarning()
Definition: G4Fragment.cc:241
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
G4double theExcitationEnergy
Definition: G4Fragment.hh:184
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateGroundStateMass()

void G4Fragment::CalculateGroundStateMass ( )
inlineprivate

Definition at line 251 of file G4Fragment.hh.

252 {
254 }
G4int theZ
Definition: G4Fragment.hh:182
G4double theGroundStateMass
Definition: G4Fragment.hh:186
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4int theA
Definition: G4Fragment.hh:180
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeGroundStateMass()

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

Definition at line 246 of file G4Fragment.hh.

247 {
249 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
double A(double temperature)
Float_t Z
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExcitationEnergyWarning()

void G4Fragment::ExcitationEnergyWarning ( )
private

Definition at line 241 of file G4Fragment.cc.

242 {
243  const G4double exclimit = -10*CLHEP::eV;
244  if (theExcitationEnergy < exclimit) {
245 
246 #ifdef G4VERBOSE
247  G4cout << "G4Fragment::CalculateExcitationEnergy(): WARNING "<<G4endl;
248  G4cout << *this << G4endl;
249 #endif
250 
251 #ifdef debug_G4Fragment
253  ed << *this << G4endl;
254  G4Exception("G4Fragment::ExcitationEnergyWarning()", "had777",
255  FatalException,ed);
256 #endif
257  }
258  theExcitationEnergy = 0.0;
259 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static const double eV
G4double theExcitationEnergy
Definition: G4Fragment.hh:184
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetA()

G4double G4Fragment::GetA ( void  ) const
inline

Definition at line 305 of file G4Fragment.hh.

306 {
307  return G4double(theA);
308 }
G4int theA
Definition: G4Fragment.hh:180
double G4double
Definition: G4Types.hh:76

◆ GetA_asInt()

G4int G4Fragment::GetA_asInt ( void  ) const
inline

Definition at line 256 of file G4Fragment.hh.

257 {
258  return theA;
259 }
G4int theA
Definition: G4Fragment.hh:180

◆ GetAngularMomentum()

G4ThreeVector G4Fragment::GetAngularMomentum ( ) const

Definition at line 275 of file G4Fragment.cc.

276 {
277  G4ThreeVector v(0.0,0.0,spin);
278  return v;
279 }
G4double spin
Definition: G4Fragment.hh:207
Here is the caller graph for this function:

◆ GetBindingEnergy()

G4double G4Fragment::GetBindingEnergy ( ) const
inline

Definition at line 283 of file G4Fragment.hh.

284 {
287 }
G4int theZ
Definition: G4Fragment.hh:182
G4double theGroundStateMass
Definition: G4Fragment.hh:186
static const double proton_mass_c2
G4int theA
Definition: G4Fragment.hh:180
static const double neutron_mass_c2

◆ GetCreationTime()

G4double G4Fragment::GetCreationTime ( ) const
inline

Definition at line 420 of file G4Fragment.hh.

421 {
422  return theCreationTime;
423 }
G4double theCreationTime
Definition: G4Fragment.hh:208
Here is the caller graph for this function:

◆ GetCreatorModelType()

G4int G4Fragment::GetCreatorModelType ( ) const
inline

Definition at line 389 of file G4Fragment.hh.

390 {
391  return creatorModel;
392 }
G4int creatorModel
Definition: G4Fragment.hh:194
Here is the caller graph for this function:

◆ GetExcitationEnergy()

G4double G4Fragment::GetExcitationEnergy ( void  ) const
inline

Definition at line 273 of file G4Fragment.hh.

274 {
275  return theExcitationEnergy;
276 }
G4double theExcitationEnergy
Definition: G4Fragment.hh:184
Here is the caller graph for this function:

◆ GetGroundStateMass()

G4double G4Fragment::GetGroundStateMass ( ) const
inline

Definition at line 278 of file G4Fragment.hh.

279 {
280  return theGroundStateMass;
281 }
G4double theGroundStateMass
Definition: G4Fragment.hh:186
Here is the caller graph for this function:

◆ GetMomentum()

const G4LorentzVector & G4Fragment::GetMomentum ( void  ) const
inline

Definition at line 289 of file G4Fragment.hh.

290 {
291  return theMomentum;
292 }
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
Here is the caller graph for this function:

◆ GetNuclearPolarization()

G4NuclearPolarization * G4Fragment::GetNuclearPolarization ( ) const
inline

Definition at line 430 of file G4Fragment.hh.

431 {
432  return thePolarization;
433 }
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
Here is the caller graph for this function:

◆ GetNumberOfCharged()

G4int G4Fragment::GetNumberOfCharged ( ) const
inline

Definition at line 332 of file G4Fragment.hh.

333 {
334  return numberOfCharged;
335 }
G4int numberOfCharged
Definition: G4Fragment.hh:198
Here is the caller graph for this function:

◆ GetNumberOfChargedHoles()

G4int G4Fragment::GetNumberOfChargedHoles ( ) const
inline

Definition at line 352 of file G4Fragment.hh.

353 {
354  return numberOfChargedHoles;
355 }
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
Here is the caller graph for this function:

◆ GetNumberOfElectrons()

G4int G4Fragment::GetNumberOfElectrons ( ) const
inline

Definition at line 379 of file G4Fragment.hh.

380 {
381  return numberOfShellElectrons;
382 }
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
Here is the caller graph for this function:

◆ GetNumberOfExcitons()

G4int G4Fragment::GetNumberOfExcitons ( ) const
inline

Definition at line 322 of file G4Fragment.hh.

323 {
325 }
G4int numberOfHoles
Definition: G4Fragment.hh:199
G4int numberOfParticles
Definition: G4Fragment.hh:197
Here is the caller graph for this function:

◆ GetNumberOfHoles()

G4int G4Fragment::GetNumberOfHoles ( ) const
inline

Definition at line 347 of file G4Fragment.hh.

348 {
349  return numberOfHoles;
350 }
G4int numberOfHoles
Definition: G4Fragment.hh:199
Here is the caller graph for this function:

◆ GetNumberOfParticles()

G4int G4Fragment::GetNumberOfParticles ( ) const
inline

Definition at line 327 of file G4Fragment.hh.

328 {
329  return numberOfParticles;
330 }
G4int numberOfParticles
Definition: G4Fragment.hh:197
Here is the caller graph for this function:

◆ GetParticleDefinition()

const G4ParticleDefinition * G4Fragment::GetParticleDefinition ( void  ) const
inline

Definition at line 410 of file G4Fragment.hh.

411 {
412  return theParticleDefinition;
413 }
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205
Here is the caller graph for this function:

◆ GetSpin()

G4double G4Fragment::GetSpin ( void  ) const
inline

Definition at line 399 of file G4Fragment.hh.

400 {
401  return spin;
402 }
G4double spin
Definition: G4Fragment.hh:207
Here is the caller graph for this function:

◆ GetZ()

G4double G4Fragment::GetZ ( void  ) const
inline

Definition at line 300 of file G4Fragment.hh.

301 {
302  return G4double(theZ);
303 }
G4int theZ
Definition: G4Fragment.hh:182
double G4double
Definition: G4Types.hh:76

◆ GetZ_asInt()

G4int G4Fragment::GetZ_asInt ( void  ) const
inline

Definition at line 261 of file G4Fragment.hh.

262 {
263  return theZ;
264 }
G4int theZ
Definition: G4Fragment.hh:182
Here is the caller graph for this function:

◆ NumberOfExitationWarning()

void G4Fragment::NumberOfExitationWarning ( const G4String value)
private

Definition at line 261 of file G4Fragment.cc.

262 {
263  G4cout << "G4Fragment::"<< value << " ERROR "
264  << G4endl;
265  G4cout << this << G4endl;
266  G4String text = "G4Fragment::G4Fragment wrong exciton number ";
267  throw G4HadronicException(__FILE__, __LINE__, text);
268 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ operator delete()

void G4Fragment::operator delete ( void *  aFragment)
inline

Definition at line 233 of file G4Fragment.hh.

234 {
235  ((G4Fragment *)aFragment)->SetNuclearPolarization(nullptr);
236  pFragmentAllocator->FreeSingle((G4Fragment *) aFragment);
237 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4Fragment > * pFragmentAllocator
Definition: G4Fragment.cc:48

◆ operator new()

void * G4Fragment::operator new ( size_t  )
inline

Definition at line 227 of file G4Fragment.hh.

228 {
230  return (void*) pFragmentAllocator->MallocSingle();
231 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4Fragment > * pFragmentAllocator
Definition: G4Fragment.cc:48

◆ operator!=()

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

Definition at line 176 of file G4Fragment.cc.

177 {
178  return (this != (G4Fragment *) &right);
179 }

◆ operator=()

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

Definition at line 145 of file G4Fragment.cc.

146 {
147  if (this != &right) {
148  theA = right.theA;
149  theZ = right.theZ;
152  theMomentum = right.theMomentum;
153  delete thePolarization;
154  thePolarization = nullptr;
155  if(right.thePolarization != nullptr) {
157  }
158  creatorModel = right.creatorModel;
165  spin = right.spin;
167  }
168  return *this;
169 }
G4int theZ
Definition: G4Fragment.hh:182
G4double theCreationTime
Definition: G4Fragment.hh:208
G4double theGroundStateMass
Definition: G4Fragment.hh:186
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
G4double spin
Definition: G4Fragment.hh:207
G4int theA
Definition: G4Fragment.hh:180
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
G4int numberOfHoles
Definition: G4Fragment.hh:199
G4int creatorModel
Definition: G4Fragment.hh:194
G4int numberOfParticles
Definition: G4Fragment.hh:197
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205
G4double theExcitationEnergy
Definition: G4Fragment.hh:184

◆ operator==()

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

Definition at line 171 of file G4Fragment.cc.

172 {
173  return (this == (G4Fragment *) &right);
174 }

◆ SetA()

void G4Fragment::SetA ( G4double  value)
inline

Definition at line 316 of file G4Fragment.hh.

317 {
318  theA = G4lrint(value);
320 }
G4int theA
Definition: G4Fragment.hh:180
int G4lrint(double ad)
Definition: templates.hh:163
void CalculateGroundStateMass()
Definition: G4Fragment.hh:251
Here is the call graph for this function:

◆ SetAngularMomentum()

void G4Fragment::SetAngularMomentum ( G4ThreeVector v)

Definition at line 270 of file G4Fragment.cc.

271 {
272  spin = v.mag();
273 }
double mag() const
G4double spin
Definition: G4Fragment.hh:207
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCreationTime()

void G4Fragment::SetCreationTime ( G4double  time)
inline

Definition at line 425 of file G4Fragment.hh.

426 {
428 }
G4double theCreationTime
Definition: G4Fragment.hh:208
Here is the caller graph for this function:

◆ SetCreatorModelType()

void G4Fragment::SetCreatorModelType ( G4int  value)
inline

Definition at line 394 of file G4Fragment.hh.

395 {
396  creatorModel = value;
397 }
G4int creatorModel
Definition: G4Fragment.hh:194

◆ SetMomentum()

void G4Fragment::SetMomentum ( const G4LorentzVector value)
inline

Definition at line 294 of file G4Fragment.hh.

295 {
296  theMomentum = value;
298 }
void CalculateExcitationEnergy()
Definition: G4Fragment.hh:239
G4LorentzVector theMomentum
Definition: G4Fragment.hh:188
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNuclearPolarization()

void G4Fragment::SetNuclearPolarization ( G4NuclearPolarization p)
inline

Definition at line 213 of file G4Fragment.hh.

214 {
215  if(p != thePolarization) {
216  delete thePolarization;
217  thePolarization = p;
218  }
219 }
G4NuclearPolarization * thePolarization
Definition: G4Fragment.hh:191
Here is the caller graph for this function:

◆ SetNumberOfCharged()

void G4Fragment::SetNumberOfCharged ( G4int  value)
inline

Definition at line 371 of file G4Fragment.hh.

372 {
373  numberOfCharged = value;
374  if(value > numberOfParticles) {
375  NumberOfExitationWarning("SetNumberOfCharged");
376  }
377 }
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4int numberOfParticles
Definition: G4Fragment.hh:197
void NumberOfExitationWarning(const G4String &)
Definition: G4Fragment.cc:261
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNumberOfElectrons()

void G4Fragment::SetNumberOfElectrons ( G4int  value)
inline

Definition at line 384 of file G4Fragment.hh.

385 {
386  numberOfShellElectrons = value;
387 }
G4int numberOfShellElectrons
Definition: G4Fragment.hh:203
Here is the caller graph for this function:

◆ SetNumberOfExcitedParticle()

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

Definition at line 338 of file G4Fragment.hh.

339 {
340  numberOfParticles = valueTot;
341  numberOfCharged = valueP;
342  if(valueTot < valueP) {
343  NumberOfExitationWarning("SetNumberOfExcitedParticle");
344  }
345 }
G4int numberOfCharged
Definition: G4Fragment.hh:198
G4int numberOfParticles
Definition: G4Fragment.hh:197
void NumberOfExitationWarning(const G4String &)
Definition: G4Fragment.cc:261
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNumberOfHoles()

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

Definition at line 357 of file G4Fragment.hh.

358 {
359  numberOfHoles = valueTot;
360  numberOfChargedHoles = valueP;
361  if(valueTot < valueP) {
362  NumberOfExitationWarning("SetNumberOfHoles");
363  }
364 }
G4int numberOfHoles
Definition: G4Fragment.hh:199
void NumberOfExitationWarning(const G4String &)
Definition: G4Fragment.cc:261
G4int numberOfChargedHoles
Definition: G4Fragment.hh:200
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNumberOfParticles()

void G4Fragment::SetNumberOfParticles ( G4int  value)
inline

Definition at line 366 of file G4Fragment.hh.

367 {
368  numberOfParticles = value;
369 }
G4int numberOfParticles
Definition: G4Fragment.hh:197
Here is the caller graph for this function:

◆ SetParticleDefinition()

void G4Fragment::SetParticleDefinition ( const G4ParticleDefinition p)
inline

Definition at line 415 of file G4Fragment.hh.

416 {
418 }
const G4ParticleDefinition * theParticleDefinition
Definition: G4Fragment.hh:205

◆ SetSpin()

void G4Fragment::SetSpin ( G4double  value)
inline

Definition at line 404 of file G4Fragment.hh.

405 {
406  spin = value;
407 }
G4double spin
Definition: G4Fragment.hh:207

◆ SetZ()

void G4Fragment::SetZ ( G4double  value)
inline

Definition at line 310 of file G4Fragment.hh.

311 {
312  theZ = G4lrint(value);
314 }
G4int theZ
Definition: G4Fragment.hh:182
int G4lrint(double ad)
Definition: templates.hh:163
void CalculateGroundStateMass()
Definition: G4Fragment.hh:251
Here is the call graph for this function:

◆ SetZandA_asInt()

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

Definition at line 266 of file G4Fragment.hh.

267 {
268  theZ = Znew;
269  theA = Anew;
271 }
G4int theZ
Definition: G4Fragment.hh:182
G4int theA
Definition: G4Fragment.hh:180
void CalculateGroundStateMass()
Definition: G4Fragment.hh:251
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<< [1/2]

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

Definition at line 181 of file G4Fragment.cc.

182 {
183  if (!theFragment) {
184  out << "Fragment: null pointer ";
185  return out;
186  }
187 
188  std::ios::fmtflags old_floatfield = out.flags();
189  out.setf(std::ios::floatfield);
190 
191  out << "Fragment: A = " << std::setw(3) << theFragment->theA
192  << ", Z = " << std::setw(3) << theFragment->theZ ;
193  out.setf(std::ios::scientific,std::ios::floatfield);
194 
195  // Store user's precision setting and reset to (3) here: back-compatibility
196  std::streamsize floatPrec = out.precision();
197 
198  out << std::setprecision(3)
199  << ", U = " << theFragment->GetExcitationEnergy()/CLHEP::MeV
200  << " MeV ";
201  if(theFragment->GetCreatorModelType() >= 0) {
202  out << " creatorModelType= " << theFragment->GetCreatorModelType();
203  }
204  if(theFragment->GetCreationTime() > 0.0) {
205  out << " Time= " << theFragment->GetCreationTime()/CLHEP::ns << " ns";
206  }
207  out << G4endl
208  << " P = ("
209  << theFragment->GetMomentum().x()/CLHEP::MeV << ","
210  << theFragment->GetMomentum().y()/CLHEP::MeV << ","
211  << theFragment->GetMomentum().z()/CLHEP::MeV
212  << ") MeV E = "
213  << theFragment->GetMomentum().t()/CLHEP::MeV << " MeV"
214  << G4endl;
215 
216  if(theFragment->GetNuclearPolarization()) {
217  out << theFragment->GetNuclearPolarization();
218  }
219 
220  if (theFragment->GetNumberOfExcitons() != 0) {
221  out << " "
222  << "#Particles= " << theFragment->GetNumberOfParticles()
223  << ", #Charged= " << theFragment->GetNumberOfCharged()
224  << ", #Holes= " << theFragment->GetNumberOfHoles()
225  << ", #ChargedHoles= " << theFragment->GetNumberOfChargedHoles()
226  << ", #spin= " << theFragment->GetSpin()
227  << G4endl;
228  }
229  out.setf(old_floatfield,std::ios::floatfield);
230  out.precision(floatPrec);
231 
232  return out;
233 }
G4int GetNumberOfExcitons() const
Definition: G4Fragment.hh:322
G4int theZ
Definition: G4Fragment.hh:182
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:273
G4int GetNumberOfHoles() const
Definition: G4Fragment.hh:347
G4int GetCreatorModelType() const
Definition: G4Fragment.hh:389
G4int theA
Definition: G4Fragment.hh:180
G4int GetNumberOfParticles() const
Definition: G4Fragment.hh:327
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:289
G4NuclearPolarization * GetNuclearPolarization() const
Definition: G4Fragment.hh:430
G4double GetSpin() const
Definition: G4Fragment.hh:399
#define G4endl
Definition: G4ios.hh:61
static const double ns
G4double GetCreationTime() const
Definition: G4Fragment.hh:420
static const double MeV
G4int GetNumberOfChargedHoles() const
Definition: G4Fragment.hh:352
G4int GetNumberOfCharged() const
Definition: G4Fragment.hh:332

◆ operator<< [2/2]

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

Definition at line 235 of file G4Fragment.cc.

236 {
237  out << &theFragment;
238  return out;
239 }

Member Data Documentation

◆ creatorModel

G4int G4Fragment::creatorModel
private

Definition at line 194 of file G4Fragment.hh.

◆ numberOfCharged

G4int G4Fragment::numberOfCharged
private

Definition at line 198 of file G4Fragment.hh.

◆ numberOfChargedHoles

G4int G4Fragment::numberOfChargedHoles
private

Definition at line 200 of file G4Fragment.hh.

◆ numberOfHoles

G4int G4Fragment::numberOfHoles
private

Definition at line 199 of file G4Fragment.hh.

◆ numberOfParticles

G4int G4Fragment::numberOfParticles
private

Definition at line 197 of file G4Fragment.hh.

◆ numberOfShellElectrons

G4int G4Fragment::numberOfShellElectrons
private

Definition at line 203 of file G4Fragment.hh.

◆ spin

G4double G4Fragment::spin
private

Definition at line 207 of file G4Fragment.hh.

◆ theA

G4int G4Fragment::theA
private

Definition at line 180 of file G4Fragment.hh.

◆ theCreationTime

G4double G4Fragment::theCreationTime
private

Definition at line 208 of file G4Fragment.hh.

◆ theExcitationEnergy

G4double G4Fragment::theExcitationEnergy
private

Definition at line 184 of file G4Fragment.hh.

◆ theGroundStateMass

G4double G4Fragment::theGroundStateMass
private

Definition at line 186 of file G4Fragment.hh.

◆ theMomentum

G4LorentzVector G4Fragment::theMomentum
private

Definition at line 188 of file G4Fragment.hh.

◆ theParticleDefinition

const G4ParticleDefinition* G4Fragment::theParticleDefinition
private

Definition at line 205 of file G4Fragment.hh.

◆ thePolarization

G4NuclearPolarization* G4Fragment::thePolarization
private

Definition at line 191 of file G4Fragment.hh.

◆ theZ

G4int G4Fragment::theZ
private

Definition at line 182 of file G4Fragment.hh.


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