48G4int G4Fragment::errCount = 0;
54 theExcitationEnergy(0.0),
55 theGroundStateMass(0.0),
61 numberOfChargedHoles(0),
62 numberOfShellElectrons(0),
63 theParticleDefinition(0),
73 theExcitationEnergy = right.theExcitationEnergy;
74 theGroundStateMass = right.theGroundStateMass;
75 theMomentum = right.theMomentum;
76 theAngularMomentum = right.theAngularMomentum;
77 numberOfParticles = right.numberOfParticles;
78 numberOfCharged = right.numberOfCharged;
79 numberOfHoles = right.numberOfHoles;
80 numberOfChargedHoles = right.numberOfChargedHoles;
81 numberOfShellElectrons = right.numberOfShellElectrons;
82 theParticleDefinition = right.theParticleDefinition;
83 theCreationTime = right.theCreationTime;
84 isStable = right.isStable;
93 theMomentum(aMomentum),
98 numberOfChargedHoles(0),
99 numberOfShellElectrons(0),
100 theParticleDefinition(0),
101 theCreationTime(0.0),
104 theExcitationEnergy = 0.0;
105 theGroundStateMass = 0.0;
107 CalculateGroundStateMass();
108 CalculateExcitationEnergy();
112 if(theExcitationEnergy > 0.0) { isStable =
false; }
121 theMomentum(aMomentum),
123 numberOfParticles(0),
126 numberOfChargedHoles(0),
127 numberOfShellElectrons(0),
128 theParticleDefinition(aParticleDefinition),
129 theCreationTime(0.0),
132 theExcitationEnergy = 0.0;
135 G4String text =
"G4Fragment::G4Fragment constructor for gamma used for "
139 theGroundStateMass = aParticleDefinition->
GetPDGMass();
144 if (
this != &right) {
147 theExcitationEnergy = right.theExcitationEnergy;
148 theGroundStateMass = right.theGroundStateMass;
149 theMomentum = right.theMomentum;
150 theAngularMomentum = right.theAngularMomentum;
151 numberOfParticles = right.numberOfParticles;
152 numberOfCharged = right.numberOfCharged;
153 numberOfHoles = right.numberOfHoles;
154 numberOfChargedHoles = right.numberOfChargedHoles;
155 numberOfShellElectrons = right.numberOfShellElectrons;
156 theParticleDefinition = right.theParticleDefinition;
157 theCreationTime = right.theCreationTime;
158 isStable = right.isStable;
176 out <<
"Fragment: null pointer ";
180 std::ios::fmtflags old_floatfield = out.flags();
181 out.setf(std::ios::floatfield);
183 out <<
"Fragment: A = " << std::setw(3) << theFragment->theA
184 <<
", Z = " << std::setw(3) << theFragment->theZ ;
185 out.setf(std::ios::scientific,std::ios::floatfield);
188 std::streamsize floatPrec = out.precision();
190 out << std::setprecision(3)
194 << theFragment->theMomentum.
x()/CLHEP::MeV <<
","
195 << theFragment->theMomentum.
y()/CLHEP::MeV <<
","
196 << theFragment->theMomentum.
z()/CLHEP::MeV
198 << theFragment->theMomentum.
t()/CLHEP::MeV <<
" MeV"
205 <<
"#Particles= " << theFragment->numberOfParticles
206 <<
", #Charged= " << theFragment->numberOfCharged
207 <<
", #Holes= " << theFragment->numberOfHoles
208 <<
", #ChargedHoles= " << theFragment->numberOfChargedHoles
211 out.setf(old_floatfield,std::ios::floatfield);
212 out.precision(floatPrec);
223void G4Fragment::ExcitationEnergyWarning()
225 if (theExcitationEnergy < -10 * CLHEP::eV) {
227 if ( errCount <= 1 ) {
228 G4cout <<
"G4Fragment::CalculateExcitationEnergy(): WARNING "<<
G4endl;
230 if( errCount == 10 ) {
231 G4String text =
"G4Fragment::G4Fragment Excitation Energy < 0.0 10 times!";
236 theExcitationEnergy = 0.0;
239void G4Fragment::NumberOfExitationWarning(
const G4String& value)
241 G4cout <<
"G4Fragment::"<< value <<
" ERROR "
244 G4String text =
"G4Fragment::G4Fragment wrong exciton number ";
std::ostream & operator<<(std::ostream &out, const G4Fragment *theFragment)
G4DLLIMPORT std::ostream G4cout
static G4Electron * Electron()
G4double GetExcitationEnergy() const
G4bool operator!=(const G4Fragment &right) const
G4int GetNumberOfExcitons() const
G4Fragment & operator=(const G4Fragment &right)
G4bool operator==(const G4Fragment &right) const
G4double GetPDGMass() const
const G4String & GetParticleName() const