58 theExcitationEnergy(0.0),
59 theGroundStateMass(0.0),
61 thePolarization(nullptr),
66 numberOfChargedHoles(0),
67 numberOfShellElectrons(0),
69 theParticleDefinition(nullptr),
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),
90 theParticleDefinition(right.theParticleDefinition),
92 theCreationTime(right.theCreationTime),
93 isLongLived(right.isLongLived)
103 theExcitationEnergy(0.0),
104 theGroundStateMass(0.0),
105 theMomentum(aMomentum),
106 thePolarization(nullptr),
108 numberOfParticles(0),
111 numberOfChargedHoles(0),
112 numberOfShellElectrons(0),
114 theParticleDefinition(nullptr),
119 CalculateMassAndExcitationEnergy();
127 theL(
std::max(numberOfLambdas,0)),
128 theExcitationEnergy(0.0),
129 theGroundStateMass(0.0),
130 theMomentum(aMomentum),
131 thePolarization(nullptr),
133 numberOfParticles(0),
136 numberOfChargedHoles(0),
137 numberOfShellElectrons(0),
139 theParticleDefinition(nullptr),
144 CalculateMassAndExcitationEnergy();
154 theExcitationEnergy(0.0),
155 theMomentum(aMomentum),
156 thePolarization(nullptr),
158 numberOfParticles(0),
161 numberOfChargedHoles(0),
162 numberOfShellElectrons(0),
164 theParticleDefinition(aParticleDefinition),
170 G4ExceptionDescription ed;
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 );
175 theGroundStateMass = aParticleDefinition->
GetPDGMass();
178void G4Fragment::CalculateMassAndExcitationEnergy()
181 if(theZ > theA || theZ + theL > theA) {
183 ed <<
"Fragment: Z=" << theZ <<
" A=" << theA <<
" nLambdas=" << theL <<
G4endl;
184 G4Exception(
"G4Fragment::CalculateMassAndExcitationEnergy: inconsistent number of nucleons ! ",
188 theGroundStateMass = ( theL == 0 )
193 const G4double minFragExcitation = 10.*CLHEP::eV;
194 theExcitationEnergy = theMomentum.
mag() - theGroundStateMass;
195 if(theExcitationEnergy < minFragExcitation) {
196 if(theExcitationEnergy < -minFragExcitation) {
197 ExcitationEnergyWarning();
199 theExcitationEnergy = 0.0;
206 theExcitationEnergy = eexc;
207 theMomentum.
set(0.0, 0.0, 0.0, theGroundStateMass + eexc);
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;
221 if (
this != &right) {
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;
238 theCreationTime = right.theCreationTime;
239 isLongLived = right.isLongLived;
256 std::ios::fmtflags old_floatfield = out.flags();
257 out.setf(std::ios::floatfield);
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);
265 std::streamsize floatPrec = out.precision();
267 out << std::setprecision(3)
285 out <<
" #spin= " << theFragment.
GetSpin()
300 out.setf(old_floatfield,std::ios::floatfield);
301 out.precision(floatPrec);
306void G4Fragment::ExcitationEnergyWarning()
309 G4cout <<
"G4Fragment::CalculateExcitationEnergy(): WARNING "
310 <<
" GraundStateMass(MeV)= " << theGroundStateMass
316void G4Fragment::NumberOfExitationWarning(
const G4String& value)
319 ed <<
"Value=" << value <<
G4endl;
320 G4Exception(
"G4Fragment::NumberOfExitationWarning : wrong exciton number ! ",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4Allocator< G4Fragment > *& pFragmentAllocator()
std::ostream & operator<<(std::ostream &out, const G4Fragment &theFragment)
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void set(double x, double y, double z, double t)
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 GetBindingEnergy() const
G4bool operator!=(const G4Fragment &right) const
G4int GetFloatingLevelNumber() const
G4int GetNumberOfExcitons() const
G4ThreeVector GetAngularMomentum() const
void SetExcEnergyAndMomentum(G4double eexc, const G4LorentzVector &)
G4Fragment & operator=(const G4Fragment &right)
G4int GetNumberOfCharged() const
G4bool operator==(const G4Fragment &right) const
void SetAngularMomentum(const G4ThreeVector &)
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
#define G4ThreadLocalStatic