Warning, file /include/Geant4/G4NuclearPolarization.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef G4NUCLEARPOLARIZATION_HH
0049 #define G4NUCLEARPOLARIZATION_HH
0050
0051 #include "globals.hh"
0052 #include <vector>
0053
0054 class G4NuclearPolarization
0055 {
0056 public:
0057
0058 explicit G4NuclearPolarization(G4int Z, G4int A, G4double exc);
0059
0060 ~G4NuclearPolarization();
0061
0062 inline void Unpolarize()
0063 {
0064 Clean();
0065 fPolarization.resize(1);
0066 fPolarization[0].push_back(1.0);
0067 }
0068
0069 inline void SetPolarization(std::vector< std::vector<G4complex> >& p)
0070 {
0071 Clean();
0072 for(auto & pol : p) {
0073 fPolarization.push_back(pol);
0074 }
0075 }
0076
0077 inline std::vector< std::vector<G4complex> >& GetPolarization()
0078 {
0079 return fPolarization;
0080 }
0081
0082 inline G4int GetZ() const
0083 {
0084 return fZ;
0085 }
0086
0087 inline G4int GetA() const
0088 {
0089 return fA;
0090 }
0091
0092 inline G4double GetExcitationEnergy() const
0093 {
0094 return fExcEnergy;
0095 }
0096
0097 inline void SetExcitationEnergy(G4double val)
0098 {
0099 fExcEnergy = val;
0100 }
0101
0102
0103
0104 inline G4NuclearPolarization & operator=(const G4NuclearPolarization &right)
0105 {
0106 if (this != &right) {
0107 fZ = right.fZ;
0108 fA = right.fA;
0109 fExcEnergy = right.fExcEnergy;
0110 fPolarization = right.fPolarization;
0111 }
0112 return *this;
0113 }
0114
0115 inline G4NuclearPolarization(const G4NuclearPolarization &right )
0116 {
0117 *this = right;
0118 }
0119
0120 G4bool operator==(const G4NuclearPolarization &right) const;
0121 G4bool operator!=(const G4NuclearPolarization &right) const;
0122
0123 friend std::ostream& operator<<(std::ostream&, const G4NuclearPolarization&);
0124
0125 private:
0126
0127 void Clean();
0128
0129 G4int fZ;
0130 G4int fA;
0131 G4double fExcEnergy;
0132 std::vector< std::vector<G4complex> > fPolarization;
0133 };
0134
0135 #endif