43 : fZ(
Z), fA(
A), fExcEnergy(exc)
55void G4NuclearPolarization::Clean()
57 if(!fPolarization.empty()) {
58 for(
auto & pol : fPolarization) {
61 fPolarization.clear();
67 return (fZ == right.fZ && fA == right.fA && fExcEnergy == right.fExcEnergy
68 && fPolarization == right.fPolarization);
73 return (fZ != right.fZ || fA != right.fA || fExcEnergy != right.fExcEnergy
74 || fPolarization != right.fPolarization);
79 out <<
"G4NuclearPolarization: Z= " << p.fZ <<
" A= " << p.fA <<
" Exc(MeV)= "
82 size_t kk = p.fPolarization.size();
83 for(
size_t k=0; k<kk; ++k) {
84 if(k>0) { out <<
" {"; }
85 size_t kpmax = (p.fPolarization[k]).size();
86 for(
size_t kappa=0; kappa<kpmax; ++kappa) {
87 if(kappa > 0) { out <<
"} {"; }
88 out << p.fPolarization[k][kappa].real() <<
" + "
89 << p.fPolarization[k][kappa].imag() <<
"*i";
91 if(k+1 < kk) { out <<
"}" <<
G4endl; }
std::ostream & operator<<(std::ostream &out, const G4NuclearPolarization &p)
G4bool operator!=(const G4NuclearPolarization &right) const
G4bool operator==(const G4NuclearPolarization &right) const
G4NuclearPolarization(G4int Z, G4int A, G4double exc)