Geant4 11.1.1
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 (G4int A, G4int Z, G4int numberOfLambdas, 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, G4int Lnew=0)
 
void SetNumberOfLambdas (G4int numberOfLambdas)
 
G4int GetNumberOfLambdas () const
 
G4double GetExcitationEnergy () const
 
G4double GetGroundStateMass () const
 
const G4LorentzVectorGetMomentum () const
 
G4double RecomputeGroundStateMass ()
 
void SetMomentum (const G4LorentzVector &value)
 
void SetZAandMomentum (const G4LorentzVector &, G4int Z, G4int A, G4int nLambdas=0)
 
void SetExcEnergyAndMomentum (G4double eexc, const G4LorentzVector &)
 
G4double GetBindingEnergy () const
 
G4double ComputeGroundStateMass (G4int Z, G4int A, G4int nLambdas=0) const
 
G4double GetSpin () const
 
void SetSpin (G4double value)
 
G4int GetCreatorModelID () const
 
void SetCreatorModelID (G4int value)
 
G4bool IsLongLived () const
 
void SetLongLived (G4bool 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)
 
G4int GetFloatingLevelNumber () const
 
void SetFloatingLevelNumber (G4int value)
 
const G4ParticleDefinitionGetParticleDefinition () const
 
void SetParticleDefinition (const G4ParticleDefinition *p)
 
G4double GetCreationTime () const
 
void SetCreationTime (G4double time)
 
G4NuclearPolarizationNuclearPolarization ()
 
G4NuclearPolarizationGetNuclearPolarization () const
 
void SetNuclearPolarization (G4NuclearPolarization *)
 
void SetAngularMomentum (const G4ThreeVector &)
 
G4ThreeVector GetAngularMomentum () const
 

Friends

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

Detailed Description

Definition at line 67 of file G4Fragment.hh.

Constructor & Destructor Documentation

◆ G4Fragment() [1/5]

G4Fragment::G4Fragment ( )

Definition at line 54 of file G4Fragment.cc.

54 :
55 theA(0),
56 theZ(0),
57 theL(0),
58 theExcitationEnergy(0.0),
59 theGroundStateMass(0.0),
60 theMomentum(G4LorentzVector(0,0,0,0)),
61 thePolarization(nullptr),
62 creatorModel(-1),
63 numberOfParticles(0),
64 numberOfCharged(0),
65 numberOfHoles(0),
66 numberOfChargedHoles(0),
67 numberOfShellElectrons(0),
68 xLevel(0),
69 theParticleDefinition(nullptr),
70 spin(0.0),
71 theCreationTime(0.0)
72{}
CLHEP::HepLorentzVector G4LorentzVector

◆ ~G4Fragment()

G4Fragment::~G4Fragment ( )

Definition at line 96 of file G4Fragment.cc.

97{}

◆ G4Fragment() [2/5]

G4Fragment::G4Fragment ( const G4Fragment right)

Definition at line 75 of file G4Fragment.cc.

75 :
76 theA(right.theA),
77 theZ(right.theZ),
78 theL(right.theL),
79 theExcitationEnergy(right.theExcitationEnergy),
80 theGroundStateMass(right.theGroundStateMass),
81 theMomentum(right.theMomentum),
82 thePolarization(right.thePolarization),
83 creatorModel(right.creatorModel),
84 numberOfParticles(right.numberOfParticles),
85 numberOfCharged(right.numberOfCharged),
86 numberOfHoles(right.numberOfHoles),
87 numberOfChargedHoles(right.numberOfChargedHoles),
88 numberOfShellElectrons(right.numberOfShellElectrons),
89 xLevel(right.xLevel),
90 theParticleDefinition(right.theParticleDefinition),
91 spin(right.spin),
92 theCreationTime(right.theCreationTime),
93 isLongLived(right.isLongLived)
94{}

◆ G4Fragment() [3/5]

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

Definition at line 99 of file G4Fragment.cc.

99 :
100 theA(A),
101 theZ(Z),
102 theL(0),
103 theExcitationEnergy(0.0),
104 theGroundStateMass(0.0),
105 theMomentum(aMomentum),
106 thePolarization(nullptr),
107 creatorModel(-1),
108 numberOfParticles(0),
109 numberOfCharged(0),
110 numberOfHoles(0),
111 numberOfChargedHoles(0),
112 numberOfShellElectrons(0),
113 xLevel(0),
114 theParticleDefinition(nullptr),
115 spin(0.0),
116 theCreationTime(0.0)
117{
118 if(theA > 0) {
119 CalculateMassAndExcitationEnergy();
120 }
121}
const G4int Z[17]
const G4double A[17]

◆ G4Fragment() [4/5]

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

Definition at line 123 of file G4Fragment.cc.

124 :
125 theA(A),
126 theZ(Z),
127 theL(std::max(numberOfLambdas,0)),
128 theExcitationEnergy(0.0),
129 theGroundStateMass(0.0),
130 theMomentum(aMomentum),
131 thePolarization(nullptr),
132 creatorModel(-1),
133 numberOfParticles(0),
134 numberOfCharged(0),
135 numberOfHoles(0),
136 numberOfChargedHoles(0),
137 numberOfShellElectrons(0),
138 xLevel(0),
139 theParticleDefinition(nullptr),
140 spin(0.0),
141 theCreationTime(0.0)
142{
143 if(theA > 0) {
144 CalculateMassAndExcitationEnergy();
145 }
146}

◆ G4Fragment() [5/5]

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

Definition at line 149 of file G4Fragment.cc.

150 :
151 theA(0),
152 theZ(0),
153 theL(0),
154 theExcitationEnergy(0.0),
155 theMomentum(aMomentum),
156 thePolarization(nullptr),
157 creatorModel(-1),
158 numberOfParticles(0),
159 numberOfCharged(0),
160 numberOfHoles(0),
161 numberOfChargedHoles(0),
162 numberOfShellElectrons(0),
163 xLevel(0),
164 theParticleDefinition(aParticleDefinition),
165 spin(0.0),
166 theCreationTime(0.0)
167{
168 if(aParticleDefinition->GetPDGEncoding() != 22 &&
169 aParticleDefinition->GetPDGEncoding() != 11) {
170 G4String text = "G4Fragment::G4Fragment constructor for gamma used for "
171 + aParticleDefinition->GetParticleName();
172 throw G4HadronicException(__FILE__, __LINE__, text);
173 }
174 theGroundStateMass = aParticleDefinition->GetPDGMass();
175}
const G4String & GetParticleName() const

Member Function Documentation

◆ ComputeGroundStateMass()

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

Definition at line 271 of file G4Fragment.hh.

272{
273 return ( nLambdas <= 0 )
275 : G4HyperNucleiProperties::GetNuclearMass(A, Z, nLambdas);
276}
static G4double GetNuclearMass(const G4double A, const G4double Z)

Referenced by G4PhotonEvaporation::GetEmissionProbability().

◆ GetA()

G4double G4Fragment::GetA ( ) const
inline

Definition at line 346 of file G4Fragment.hh.

347{
348 return static_cast<G4double>(theA);
349}
double G4double
Definition: G4Types.hh:83

◆ GetA_asInt()

G4int G4Fragment::GetA_asInt ( ) const
inline

Definition at line 284 of file G4Fragment.hh.

285{
286 return theA;
287}

Referenced by G4NeutronRadCapture::ApplyYourself(), G4Evaporation::BreakFragment(), G4FermiBreakUpVI::BreakFragment(), G4ExcitationHandler::BreakItUp(), G4InuclEvaporation::BreakItUp(), G4WilsonAblationModel::BreakItUp(), G4StatMF::BreakItUp(), G4UnstableFragmentBreakUp::BreakUpChain(), G4PhotonEvaporation::BreakUpChain(), G4GEMProbability::CalcAlphaParam(), G4NeutronEvaporationProbability::CalcAlphaParam(), G4GEMProbability::CalcBetaParam(), G4NeutronEvaporationProbability::CalcBetaParam(), G4GNASHTransitions::CalculateProbability(), G4PreCompoundTransitions::CalculateProbability(), G4StatMFMacroCanonical::ChooseAandZ(), G4StatMFMicroCanonical::ChooseAandZ(), G4CascadeCheckBalance::collide(), G4EvaporationChannel::ComputeProbability(), G4GEMProbabilityVI::ComputeTotalProbability(), G4InuclNuclei::copy(), G4InuclCollider::deexcite(), G4AblaInterface::DeExcite(), G4PreCompoundModel::DeExcite(), G4FissionProbability::EmissionProbability(), G4CompetitiveFission::EmittedFragment(), G4PhotonEvaporation::EmittedFragment(), G4CascadeDeexciteBase::explosion(), G4StatMFMacroCanonical::G4StatMFMacroCanonical(), G4GEMProbability::GetCoulombBarrier(), G4EvaporationChannel::GetEmissionProbability(), G4GEMChannel::GetEmissionProbability(), G4GEMChannelVI::GetEmissionProbability(), G4CompetitiveFission::GetEmissionProbability(), G4PhotonEvaporation::GetEmissionProbability(), G4CascadeDeexciteBase::getTargetData(), G4VPreCompoundFragment::Initialize(), G4GNASHTransitions::PerformTransition(), G4PreCompoundTransitions::PerformTransition(), and G4EvaporationProbability::TotalProbability().

◆ GetAngularMomentum()

G4ThreeVector G4Fragment::GetAngularMomentum ( ) const

Definition at line 330 of file G4Fragment.cc.

331{
332 G4ThreeVector v(0.0,0.0,spin);
333 return v;
334}

Referenced by G4AblaInterface::DeExcite().

◆ GetBindingEnergy()

G4double G4Fragment::GetBindingEnergy ( ) const

Definition at line 211 of file G4Fragment.cc.

212{
213 const G4double lambdaMass = 1.115683*CLHEP::GeV;
214 return (theA-theZ-theL)*CLHEP::neutron_mass_c2
215 + theZ*CLHEP::proton_mass_c2 + theL*lambdaMass
216 - theGroundStateMass;
217}

◆ GetCreationTime()

G4double G4Fragment::GetCreationTime ( ) const
inline

◆ GetCreatorModelID()

G4int G4Fragment::GetCreatorModelID ( ) const
inline

Definition at line 428 of file G4Fragment.hh.

429{
430 return creatorModel;
431}

Referenced by G4ExcitationHandler::BreakItUp().

◆ GetExcitationEnergy()

G4double G4Fragment::GetExcitationEnergy ( ) const
inline

◆ GetFloatingLevelNumber()

G4int G4Fragment::GetFloatingLevelNumber ( ) const
inline

Definition at line 458 of file G4Fragment.hh.

459{
460 return xLevel;
461}

Referenced by G4ITDecay::DecayIt().

◆ GetGroundStateMass()

◆ GetMomentum()

◆ GetNuclearPolarization()

G4NuclearPolarization * G4Fragment::GetNuclearPolarization ( ) const
inline

Definition at line 494 of file G4Fragment.hh.

495{
496 return thePolarization;
497}

Referenced by G4PhotonEvaporation::EmittedFragment().

◆ GetNumberOfCharged()

◆ GetNumberOfChargedHoles()

G4int G4Fragment::GetNumberOfChargedHoles ( ) const
inline

Definition at line 391 of file G4Fragment.hh.

392{
393 return numberOfChargedHoles;
394}

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

◆ GetNumberOfElectrons()

G4int G4Fragment::GetNumberOfElectrons ( ) const
inline

Definition at line 418 of file G4Fragment.hh.

419{
420 return numberOfShellElectrons;
421}

Referenced by G4GammaTransition::SampleTransition().

◆ GetNumberOfExcitons()

G4int G4Fragment::GetNumberOfExcitons ( ) const
inline

Definition at line 361 of file G4Fragment.hh.

362{
363 return numberOfParticles + numberOfHoles;
364}

Referenced by G4PreCompoundModel::DeExcite().

◆ GetNumberOfHoles()

◆ GetNumberOfLambdas()

G4int G4Fragment::GetNumberOfLambdas ( ) const
inline

Definition at line 307 of file G4Fragment.hh.

308{
309 return theL;
310}

Referenced by G4ExcitationHandler::BreakItUp(), G4AblaInterface::DeExcite(), and G4PreCompoundModel::DeExcite().

◆ GetNumberOfParticles()

◆ GetParticleDefinition()

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

Definition at line 469 of file G4Fragment.hh.

470{
471 return theParticleDefinition;
472}

Referenced by G4NeutronRadCapture::ApplyYourself(), and G4ITDecay::DecayIt().

◆ GetSpin()

G4double G4Fragment::GetSpin ( ) const
inline

Definition at line 438 of file G4Fragment.hh.

439{
440 return spin;
441}

◆ GetZ()

G4double G4Fragment::GetZ ( ) const
inline

Definition at line 341 of file G4Fragment.hh.

342{
343 return static_cast<G4double>(theZ);
344}

◆ GetZ_asInt()

G4int G4Fragment::GetZ_asInt ( ) const
inline

Definition at line 289 of file G4Fragment.hh.

290{
291 return theZ;
292}

Referenced by G4NeutronRadCapture::ApplyYourself(), G4Evaporation::BreakFragment(), G4FermiBreakUpVI::BreakFragment(), G4ExcitationHandler::BreakItUp(), G4InuclEvaporation::BreakItUp(), G4WilsonAblationModel::BreakItUp(), G4StatMF::BreakItUp(), G4UnstableFragmentBreakUp::BreakUpChain(), G4PhotonEvaporation::BreakUpChain(), G4GEMProbability::CalcAlphaParam(), G4TritonEvaporationProbability::CalcAlphaParam(), G4AlphaEvaporationProbability::CalcAlphaParam(), G4DeuteronEvaporationProbability::CalcAlphaParam(), G4He3EvaporationProbability::CalcAlphaParam(), G4ProtonEvaporationProbability::CalcAlphaParam(), G4GNASHTransitions::CalculateProbability(), G4PreCompoundTransitions::CalculateProbability(), G4StatMFMacroCanonical::ChooseAandZ(), G4StatMFMicroCanonical::ChooseAandZ(), G4CascadeCheckBalance::collide(), G4EvaporationChannel::ComputeProbability(), G4GEMProbabilityVI::ComputeTotalProbability(), G4InuclNuclei::copy(), G4AblaInterface::DeExcite(), G4PreCompoundModel::DeExcite(), G4FissionProbability::EmissionProbability(), G4CompetitiveFission::EmittedFragment(), G4PhotonEvaporation::EmittedFragment(), G4CascadeDeexciteBase::explosion(), G4GEMProbability::GetCoulombBarrier(), G4EvaporationChannel::GetEmissionProbability(), G4GEMChannel::GetEmissionProbability(), G4GEMChannelVI::GetEmissionProbability(), G4CompetitiveFission::GetEmissionProbability(), G4PhotonEvaporation::GetEmissionProbability(), G4CascadeDeexciteBase::getTargetData(), G4VPreCompoundFragment::Initialize(), G4GNASHTransitions::PerformTransition(), G4PreCompoundTransitions::PerformTransition(), G4GammaTransition::SampleTransition(), and G4EvaporationProbability::TotalProbability().

◆ IsLongLived()

G4bool G4Fragment::IsLongLived ( ) const
inline

Definition at line 448 of file G4Fragment.hh.

449{
450 return isLongLived;
451}

Referenced by G4Evaporation::BreakFragment().

◆ NuclearPolarization()

G4NuclearPolarization * G4Fragment::NuclearPolarization ( )
inline

Definition at line 489 of file G4Fragment.hh.

490{
491 return thePolarization;
492}

◆ operator delete()

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

Definition at line 265 of file G4Fragment.hh.

266{
267 pFragmentAllocator()->FreeSingle((G4Fragment *) aFragment);
268}
G4DLLIMPORT G4Allocator< G4Fragment > *& pFragmentAllocator()
Definition: G4Fragment.cc:47

◆ operator new()

void * G4Fragment::operator new ( size_t  )
inline

Definition at line 257 of file G4Fragment.hh.

258{
259 if (!pFragmentAllocator()) {
261 }
262 return (void*) pFragmentAllocator()->MallocSingle();
263}

◆ operator!=()

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

Definition at line 249 of file G4Fragment.cc.

250{
251 return (this != (G4Fragment *) &right);
252}

◆ operator=()

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

Definition at line 219 of file G4Fragment.cc.

220{
221 if (this != &right) {
222 theA = right.theA;
223 theZ = right.theZ;
224 theL = right.theL;
225 theExcitationEnergy = right.theExcitationEnergy;
226 theGroundStateMass = right.theGroundStateMass;
227 theMomentum = right.theMomentum;
228 thePolarization = right.thePolarization;
229 creatorModel = right.creatorModel;
230 numberOfParticles = right.numberOfParticles;
231 numberOfCharged = right.numberOfCharged;
232 numberOfHoles = right.numberOfHoles;
233 numberOfChargedHoles = right.numberOfChargedHoles;
234 numberOfShellElectrons = right.numberOfShellElectrons;
235 xLevel = right.xLevel;
236 theParticleDefinition = right.theParticleDefinition;
237 spin = right.spin;
238 theCreationTime = right.theCreationTime;
239 isLongLived = right.isLongLived;
240 }
241 return *this;
242}

◆ operator==()

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

Definition at line 244 of file G4Fragment.cc.

245{
246 return (this == (G4Fragment *) &right);
247}

◆ RecomputeGroundStateMass()

G4double G4Fragment::RecomputeGroundStateMass ( )
inline

Definition at line 278 of file G4Fragment.hh.

279{
280 CalculateMassAndExcitationEnergy();
281 return theGroundStateMass;
282}

◆ SetA()

void G4Fragment::SetA ( G4double  value)
inline

Definition at line 356 of file G4Fragment.hh.

357{
358 theA = G4lrint(value);
359}
int G4lrint(double ad)
Definition: templates.hh:134

◆ SetAngularMomentum()

void G4Fragment::SetAngularMomentum ( const G4ThreeVector v)

Definition at line 325 of file G4Fragment.cc.

326{
327 spin = v.mag();
328}
double mag() const

Referenced by G4INCLXXInterface::ApplyYourself().

◆ SetCreationTime()

void G4Fragment::SetCreationTime ( G4double  time)
inline

◆ SetCreatorModelID()

◆ SetExcEnergyAndMomentum()

void G4Fragment::SetExcEnergyAndMomentum ( G4double  eexc,
const G4LorentzVector v 
)

Definition at line 203 of file G4Fragment.cc.

205{
206 theExcitationEnergy = eexc;
207 theMomentum.set(0.0, 0.0, 0.0, theGroundStateMass + eexc);
208 theMomentum.boost(v.boostVector());
209}
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void set(double x, double y, double z, double t)

Referenced by G4NeutrinoNucleusModel::CoherentPion(), G4NeutrinoNucleusModel::FinalBarion(), and G4GammaTransition::SampleTransition().

◆ SetFloatingLevelNumber()

void G4Fragment::SetFloatingLevelNumber ( G4int  value)
inline

Definition at line 463 of file G4Fragment.hh.

464{
465 xLevel = value;
466}

◆ SetLongLived()

void G4Fragment::SetLongLived ( G4bool  value)
inline

Definition at line 453 of file G4Fragment.hh.

454{
455 isLongLived = value;
456}

Referenced by G4Evaporation::BreakFragment().

◆ SetMomentum()

◆ SetNuclearPolarization()

void G4Fragment::SetNuclearPolarization ( G4NuclearPolarization p)
inline

Definition at line 499 of file G4Fragment.hh.

500{
501 thePolarization = p;
502}

Referenced by G4PhotonEvaporation::BreakUpChain(), and G4PhotonEvaporation::EmittedFragment().

◆ SetNumberOfCharged()

void G4Fragment::SetNumberOfCharged ( G4int  value)
inline

Definition at line 410 of file G4Fragment.hh.

411{
412 numberOfCharged = value;
413 if(value > numberOfParticles) {
414 NumberOfExitationWarning("SetNumberOfCharged");
415 }
416}

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

◆ SetNumberOfElectrons()

void G4Fragment::SetNumberOfElectrons ( G4int  value)
inline

Definition at line 423 of file G4Fragment.hh.

424{
425 numberOfShellElectrons = value;
426}

Referenced by G4GammaTransition::SampleTransition().

◆ SetNumberOfExcitedParticle()

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

Definition at line 377 of file G4Fragment.hh.

378{
379 numberOfParticles = valueTot;
380 numberOfCharged = valueP;
381 if(valueTot < valueP) {
382 NumberOfExitationWarning("SetNumberOfExcitedParticle");
383 }
384}

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

◆ SetNumberOfHoles()

◆ SetNumberOfLambdas()

void G4Fragment::SetNumberOfLambdas ( G4int  numberOfLambdas)
inline

Definition at line 302 of file G4Fragment.hh.

303{
304 theL = std::max(Lnew, 0);
305}

◆ SetNumberOfParticles()

◆ SetParticleDefinition()

void G4Fragment::SetParticleDefinition ( const G4ParticleDefinition p)
inline

Definition at line 474 of file G4Fragment.hh.

475{
476 theParticleDefinition = p;
477}

◆ SetSpin()

void G4Fragment::SetSpin ( G4double  value)
inline

Definition at line 443 of file G4Fragment.hh.

444{
445 spin = value;
446}

Referenced by G4FermiBreakUpVI::BreakFragment().

◆ SetZ()

void G4Fragment::SetZ ( G4double  value)
inline

Definition at line 351 of file G4Fragment.hh.

352{
353 theZ = G4lrint(value);
354}

◆ SetZAandMomentum()

void G4Fragment::SetZAandMomentum ( const G4LorentzVector v,
G4int  Z,
G4int  A,
G4int  nLambdas = 0 
)
inline

Definition at line 334 of file G4Fragment.hh.

336{
337 SetZandA_asInt(Z, A, nLambdas);
338 SetMomentum(v);
339}
void SetZandA_asInt(G4int Znew, G4int Anew, G4int Lnew=0)
Definition: G4Fragment.hh:295
void SetMomentum(const G4LorentzVector &value)
Definition: G4Fragment.hh:327

Referenced by G4ExcitationHandler::BreakItUp(), and G4EvaporationChannel::EmittedFragment().

◆ SetZandA_asInt()

void G4Fragment::SetZandA_asInt ( G4int  Znew,
G4int  Anew,
G4int  Lnew = 0 
)
inline

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 254 of file G4Fragment.cc.

255{
256 std::ios::fmtflags old_floatfield = out.flags();
257 out.setf(std::ios::floatfield);
258
259 out << "Fragment: A = " << std::setw(3) << theFragment.theA
260 << ", Z = " << std::setw(3) << theFragment.theZ
261 << ", numberOfLambdas = " << std::setw(3) << theFragment.theL ;
262 out.setf(std::ios::scientific,std::ios::floatfield);
263
264 // Store user's precision setting and reset to (3) here: back-compatibility
265 std::streamsize floatPrec = out.precision();
266
267 out << std::setprecision(3)
268 << ", U = " << theFragment.GetExcitationEnergy()/CLHEP::MeV
269 << " MeV ";
270 if(theFragment.GetCreatorModelID() >= 0) {
271 out << " creatorModelID= " << theFragment.GetCreatorModelID();
272 }
273 if(theFragment.GetCreationTime() > 0.0) {
274 out << " Time= " << theFragment.GetCreationTime()/CLHEP::ns << " ns";
275 }
276 out << G4endl
277 << " P = ("
278 << theFragment.GetMomentum().x()/CLHEP::MeV << ","
279 << theFragment.GetMomentum().y()/CLHEP::MeV << ","
280 << theFragment.GetMomentum().z()/CLHEP::MeV
281 << ") MeV E = "
282 << theFragment.GetMomentum().t()/CLHEP::MeV << " MeV"
283 << G4endl;
284
285 out << " #spin= " << theFragment.GetSpin()
286 << " #floatLevelNo= " << theFragment.GetFloatingLevelNumber() << " ";
287
288 if (theFragment.GetNumberOfExcitons() != 0) {
289 out << " "
290 << "#Particles= " << theFragment.GetNumberOfParticles()
291 << ", #Charged= " << theFragment.GetNumberOfCharged()
292 << ", #Holes= " << theFragment.GetNumberOfHoles()
293 << ", #ChargedHoles= " << theFragment.GetNumberOfChargedHoles();
294 }
295 out << G4endl;
296 if(theFragment.GetNuclearPolarization()) {
297 out << *(theFragment.GetNuclearPolarization());
298 }
299 //out << G4endl;
300 out.setf(old_floatfield,std::ios::floatfield);
301 out.precision(floatPrec);
302
303 return out;
304}
#define G4endl
Definition: G4ios.hh:57
G4int GetNumberOfParticles() const
Definition: G4Fragment.hh:366
G4int GetCreatorModelID() const
Definition: G4Fragment.hh:428
G4int GetNumberOfHoles() const
Definition: G4Fragment.hh:386
G4NuclearPolarization * GetNuclearPolarization() const
Definition: G4Fragment.hh:494
G4int GetNumberOfChargedHoles() const
Definition: G4Fragment.hh:391
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:312
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:322
G4double GetCreationTime() const
Definition: G4Fragment.hh:479
G4double GetSpin() const
Definition: G4Fragment.hh:438
G4int GetFloatingLevelNumber() const
Definition: G4Fragment.hh:458
G4int GetNumberOfExcitons() const
Definition: G4Fragment.hh:361
G4int GetNumberOfCharged() const
Definition: G4Fragment.hh:371

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