Geant4 11.4.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 (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 &out, const G4Fragment &theFragment)

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

Referenced by G4Fragment(), operator delete(), operator!=(), operator<<, operator=(), and operator==().

◆ ~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 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) {
171 ed << "Particle: " << aParticleDefinition->GetParticleName() << G4endl;
172 G4Exception( "G4Fragment::G4Fragment: constructor for gamma used for another type of particle ! ",
173 "HAD_FRAGMENT_01", FatalException, ed );
174 }
175 theGroundStateMass = aParticleDefinition->GetPDGMass();
176}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4endl
Definition G4ios.hh:67
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)

◆ 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(), G4NuDEXNeutronCaptureModel::ApplyYourself(), G4Evaporation::BreakFragment(), G4FermiBreakUpAN::BreakFragment(), G4FermiBreakUpVI::BreakFragment(), G4ExcitationHandler::BreakItUp(), G4InuclEvaporation::BreakItUp(), G4StatMF::BreakItUp(), G4WilsonAblationModel::BreakItUp(), G4GEMProbability::CalcAlphaParam(), G4NeutronEvaporationProbability::CalcAlphaParam(), G4GEMProbability::CalcBetaParam(), G4NeutronEvaporationProbability::CalcBetaParam(), G4GNASHTransitions::CalculateProbability(), G4PreCompoundTransitions::CalculateProbability(), G4PreCompoundTransitionsInt::CalculateProbability(), G4StatMFMacroCanonical::ChooseAandZ(), G4StatMFMicroCanonical::ChooseAandZ(), G4CascadeCheckBalance::collide(), G4InuclNuclei::copy(), G4AblaInterface::DeExcite(), G4PreCompoundInterface::DeExcite(), G4PreCompoundModel::DeExcite(), G4InuclCollider::deexcite(), G4FissionProbability::EmissionProbability(), G4CompetitiveFission::EmittedFragment(), G4CascadeDeexciteBase::explosion(), G4GEMProbability::GetCoulombBarrier(), G4CompetitiveFission::GetEmissionProbability(), G4EvaporationChannel::GetEmissionProbability(), G4GEMChannel::GetEmissionProbability(), G4GEMChannelVI::GetEmissionProbability(), G4CascadeDeexciteBase::getTargetData(), G4StatMFMacroCanonical::Initialise(), G4StatMFMicroCanonical::Initialise(), G4VPreCompoundFragment::Initialize(), G4PreCompoundEmissionInt::PerformEmission(), G4GNASHTransitions::PerformTransition(), G4PreCompoundTransitions::PerformTransition(), G4PreCompoundTransitionsInt::PerformTransition(), G4EvaporationProbability::TotalProbability(), and G4GEMProbabilityVI::TotalProbability().

◆ GetAngularMomentum()

G4ThreeVector G4Fragment::GetAngularMomentum ( ) const

Definition at line 331 of file G4Fragment.cc.

332{
333 G4ThreeVector v(0.0,0.0,spin);
334 return v;
335}
CLHEP::Hep3Vector G4ThreeVector

Referenced by G4AblaInterface::DeExcite().

◆ GetBindingEnergy()

G4double G4Fragment::GetBindingEnergy ( ) const

Definition at line 213 of file G4Fragment.cc.

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

◆ GetCreationTime()

◆ GetCreatorModelID()

G4int G4Fragment::GetCreatorModelID ( ) const
inline

Definition at line 428 of file G4Fragment.hh.

429{
430 return creatorModel;
431}

Referenced by G4ExcitationHandler::BreakItUp(), and operator<<.

◆ 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(), and operator<<.

◆ GetGroundStateMass()

◆ GetMomentum()

◆ GetNuclearPolarization()

G4NuclearPolarization * G4Fragment::GetNuclearPolarization ( ) const
inline

Definition at line 494 of file G4Fragment.hh.

495{
496 return thePolarization;
497}

Referenced by operator<<.

◆ GetNumberOfCharged()

◆ GetNumberOfChargedHoles()

G4int G4Fragment::GetNumberOfChargedHoles ( ) const
inline

Definition at line 391 of file G4Fragment.hh.

392{
393 return numberOfChargedHoles;
394}

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

◆ GetNumberOfElectrons()

G4int G4Fragment::GetNumberOfElectrons ( ) const
inline

Definition at line 418 of file G4Fragment.hh.

419{
420 return numberOfShellElectrons;
421}

◆ GetNumberOfExcitons()

G4int G4Fragment::GetNumberOfExcitons ( ) const
inline

Definition at line 361 of file G4Fragment.hh.

362{
363 return numberOfParticles + numberOfHoles;
364}

Referenced by G4VPreCompoundFragment::Initialize(), and operator<<.

◆ GetNumberOfHoles()

◆ GetNumberOfLambdas()

G4int G4Fragment::GetNumberOfLambdas ( ) const
inline

◆ 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(), G4NuDEXNeutronCaptureModel::ApplyYourself(), and G4ITDecay::DecayIt().

◆ GetSpin()

G4double G4Fragment::GetSpin ( ) const
inline

Definition at line 438 of file G4Fragment.hh.

439{
440 return spin;
441}

Referenced by operator<<.

◆ 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(), G4NuDEXNeutronCaptureModel::ApplyYourself(), G4Evaporation::BreakFragment(), G4FermiBreakUpAN::BreakFragment(), G4FermiBreakUpVI::BreakFragment(), G4ExcitationHandler::BreakItUp(), G4InuclEvaporation::BreakItUp(), G4StatMF::BreakItUp(), G4WilsonAblationModel::BreakItUp(), G4AlphaEvaporationProbability::CalcAlphaParam(), G4DeuteronEvaporationProbability::CalcAlphaParam(), G4GEMProbability::CalcAlphaParam(), G4He3EvaporationProbability::CalcAlphaParam(), G4ProtonEvaporationProbability::CalcAlphaParam(), G4TritonEvaporationProbability::CalcAlphaParam(), G4GNASHTransitions::CalculateProbability(), G4PreCompoundTransitions::CalculateProbability(), G4PreCompoundTransitionsInt::CalculateProbability(), G4StatMFMacroCanonical::ChooseAandZ(), G4StatMFMicroCanonical::ChooseAandZ(), G4CascadeCheckBalance::collide(), G4InuclNuclei::copy(), G4AblaInterface::DeExcite(), G4PreCompoundInterface::DeExcite(), G4PreCompoundModel::DeExcite(), G4FissionProbability::EmissionProbability(), G4CompetitiveFission::EmittedFragment(), G4CascadeDeexciteBase::explosion(), G4GEMProbability::GetCoulombBarrier(), G4CompetitiveFission::GetEmissionProbability(), G4EvaporationChannel::GetEmissionProbability(), G4GEMChannel::GetEmissionProbability(), G4GEMChannelVI::GetEmissionProbability(), G4CascadeDeexciteBase::getTargetData(), G4StatMFMacroCanonical::Initialise(), G4StatMFMicroCanonical::Initialise(), G4VPreCompoundFragment::Initialize(), G4PreCompoundEmissionInt::PerformEmission(), G4GNASHTransitions::PerformTransition(), G4PreCompoundTransitions::PerformTransition(), G4PreCompoundTransitionsInt::PerformTransition(), G4EvaporationProbability::TotalProbability(), and G4GEMProbabilityVI::TotalProbability().

◆ IsLongLived()

G4bool G4Fragment::IsLongLived ( ) const
inline

Definition at line 448 of file G4Fragment.hh.

449{
450 return isLongLived;
451}

Referenced by G4Evaporation::BreakFragment(), and G4ExcitationHandler::BreakItUp().

◆ 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()) {
260 pFragmentAllocator() = new G4Allocator<G4Fragment>;
261 }
262 return (void*) pFragmentAllocator()->MallocSingle();
263}

◆ operator!=()

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

Definition at line 251 of file G4Fragment.cc.

252{
253 return (this != (G4Fragment *) &right);
254}

◆ operator=()

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

Definition at line 221 of file G4Fragment.cc.

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

◆ operator==()

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

Definition at line 246 of file G4Fragment.cc.

247{
248 return (this == (G4Fragment *) &right);
249}

◆ 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 326 of file G4Fragment.cc.

327{
328 spin = v.mag();
329}
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 const G4double elim2 = 100.*CLHEP::eV*CLHEP::eV;
209 if (v.vect().mag2() > elim2)
210 theMomentum.boost(v.boostVector());
211}
double mag2() const
Hep3Vector boostVector() const
Hep3Vector vect() const

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

◆ 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()

void G4Fragment::SetMomentum ( const G4LorentzVector & value)
inline

◆ SetNuclearPolarization()

void G4Fragment::SetNuclearPolarization ( G4NuclearPolarization * p)
inline

Definition at line 499 of file G4Fragment.hh.

500{
501 thePolarization = p;
502}

◆ 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}

◆ 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 G4AblaInterface::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4InuclNuclei::makeG4Fragment(), G4PreCompoundEmissionInt::PerformEmission(), and G4PreCompoundTransitionsInt::PerformTransition().

◆ 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}

◆ 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)
void SetMomentum(const G4LorentzVector &value)

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

◆ SetZandA_asInt()

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

◆ operator<<

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

Definition at line 256 of file G4Fragment.cc.

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

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