![]() |
|
|||
File indexing completed on 2025-07-15 08:56:26
0001 // ******************************************************************** 0002 // * License and Disclaimer * 0003 // * * 0004 // * The Geant4 software is copyright of the Copyright Holders of * 0005 // * the Geant4 Collaboration. It is provided under the terms and * 0006 // * conditions of the Geant4 Software License, included in the file * 0007 // * LICENSE and available at http://cern.ch/geant4/license . These * 0008 // * include a list of copyright holders. * 0009 // * * 0010 // * Neither the authors of this software system, nor their employing * 0011 // * institutes,nor the agencies providing financial support for this * 0012 // * work make any representation or warranty, express or implied, * 0013 // * regarding this software system or assume any liability for its * 0014 // * use. Please see the license in the file LICENSE and URL above * 0015 // * for the full disclaimer and the limitation of liability. * 0016 // * * 0017 // * This code implementation is the result of the scientific and * 0018 // * technical work of the GEANT4 collaboration. * 0019 // * By using, copying, modifying or distributing the software (or * 0020 // * any work based on the software) you agree to acknowledge its * 0021 // * use in resulting scientific publications, and indicate your * 0022 // * acceptance of all terms of the Geant4 Software license. * 0023 // ******************************************************************** 0024 // 0025 // 0026 // ------------------------------------------------------------------- 0027 // GEANT4 Class file 0028 // 0029 // File name: G4NuclearPolarization 0030 // 0031 // Author: Jason Detwiler (jasondet@gmail.com) 0032 // 0033 // Creation date: Aug 2015 0034 // 0035 // Description: 0036 // Stores the statistical tensor describing the nuclear polarization 0037 // (see Alder and Winther, "Electromagnetic Excitation" (1975), 0038 // Appendix F). 0039 // 0040 // V.Ivanchenko left only polarization tensor and access methods 0041 // in this class, also add operators 0042 // this allows future implemention of polarized 0043 // hadronic models with polarized initial and 0044 // final states 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 // ============= OPERATORS ================== 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
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |