Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NuclearPolarization.cc File Reference
#include "G4NuclearPolarization.hh"
#include <iomanip>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const G4NuclearPolarization &p)
 

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & out,
const G4NuclearPolarization & p )

Definition at line 77 of file G4NuclearPolarization.cc.

78{
79 out << "G4NuclearPolarization: Z= " << p.fZ << " A= " << p.fA << " Exc(MeV)= "
80 << p.fExcEnergy << G4endl;
81 out << " P = [ {";
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";
90 }
91 if(k+1 < kk) { out << "}" << G4endl; }
92 }
93 out << "} ]" << G4endl;
94 return out;
95}
#define G4endl
Definition G4ios.hh:67