Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4NuclearPolarization Class Reference

#include <G4NuclearPolarization.hh>

Public Member Functions

 G4NuclearPolarization ()
 
 ~G4NuclearPolarization ()
 
void Unpolarize ()
 
void SetPolarization (std::vector< std::vector< G4complex > > &p)
 
std::vector< std::vector
< G4complex > > & 
GetPolarization ()
 
G4NuclearPolarizationoperator= (const G4NuclearPolarization &right)
 
 G4NuclearPolarization (const G4NuclearPolarization &right)
 
G4bool operator== (const G4NuclearPolarization &right) const
 
G4bool operator!= (const G4NuclearPolarization &right) const
 

Friends

std::ostream & operator<< (std::ostream &, const G4NuclearPolarization *)
 
std::ostream & operator<< (std::ostream &, const G4NuclearPolarization &)
 

Detailed Description

Definition at line 54 of file G4NuclearPolarization.hh.

Constructor & Destructor Documentation

G4NuclearPolarization::G4NuclearPolarization ( )

Definition at line 42 of file G4NuclearPolarization.cc.

43 {
44  Unpolarize();
45 }

Here is the call graph for this function:

G4NuclearPolarization::~G4NuclearPolarization ( )

Definition at line 47 of file G4NuclearPolarization.cc.

48 {}
G4NuclearPolarization::G4NuclearPolarization ( const G4NuclearPolarization right)
inline

Definition at line 86 of file G4NuclearPolarization.hh.

87  {
88  *this = right;
89  }

Member Function Documentation

std::vector< std::vector<G4complex> >& G4NuclearPolarization::GetPolarization ( void  )
inline

Definition at line 73 of file G4NuclearPolarization.hh.

74  {
75  return fPolarization;
76  }

Here is the caller graph for this function:

G4bool G4NuclearPolarization::operator!= ( const G4NuclearPolarization right) const

Definition at line 55 of file G4NuclearPolarization.cc.

56 {
57  return (fPolarization != right.fPolarization);
58 }
G4NuclearPolarization& G4NuclearPolarization::operator= ( const G4NuclearPolarization right)
inline

Definition at line 80 of file G4NuclearPolarization.hh.

81  {
82  if (this != &right) { fPolarization = right.fPolarization; }
83  return *this;
84  }
G4bool G4NuclearPolarization::operator== ( const G4NuclearPolarization right) const

Definition at line 50 of file G4NuclearPolarization.cc.

51 {
52  return (fPolarization == right.fPolarization);
53 }
void G4NuclearPolarization::SetPolarization ( std::vector< std::vector< G4complex > > &  p)
inline

Definition at line 68 of file G4NuclearPolarization.hh.

69  {
70  fPolarization = p;
71  }
const char * p
Definition: xmltok.h:285

Here is the caller graph for this function:

void G4NuclearPolarization::Unpolarize ( )
inline

Definition at line 62 of file G4NuclearPolarization.hh.

63  {
64  fPolarization.resize(1);
65  fPolarization[0].assign(1, 1.);
66  }

Here is the caller graph for this function:

Friends And Related Function Documentation

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

Definition at line 60 of file G4NuclearPolarization.cc.

61 {
62  out << " P = [ { ";
63  for(size_t k=0; k<p->fPolarization.size(); ++k) {
64  if(k>0) { out << " }, { "; }
65  for(size_t kappa=0; kappa<p->fPolarization[k].size(); ++kappa) {
66  if(kappa > 0) { out << ", "; }
67  out << p->fPolarization[k][kappa].real() << " + "
68  << p->fPolarization[k][kappa].imag() << "*i";
69  }
70  }
71  out << " } ]" << G4endl;
72  return out;
73 }
#define G4endl
Definition: G4ios.hh:61
std::ostream& operator<< ( std::ostream &  out,
const G4NuclearPolarization np 
)
friend

Definition at line 75 of file G4NuclearPolarization.cc.

76 {
77  out << &np;
78  return out;
79 }

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