Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // original by H.P. Wellisch 26 // original by H.P. Wellisch 27 // modified by J.L. Chuma, TRIUMF, 19-Nov-1996 27 // modified by J.L. Chuma, TRIUMF, 19-Nov-1996 28 // last modified: 27-Mar-1997 28 // last modified: 27-Mar-1997 29 // Chr. Volcker, 10-Nov-1997: new methods and 29 // Chr. Volcker, 10-Nov-1997: new methods and class variables. 30 // M.G. Pia, 2 Oct 1998: modified GetFermiMome 30 // M.G. Pia, 2 Oct 1998: modified GetFermiMomentum (original design was 31 // the source of memory 31 // the source of memory leaks) 32 // G.Folger, spring 2010: add integer A/Z int 32 // G.Folger, spring 2010: add integer A/Z interface 33 // A. Ribon, autumn 2021: extended to hypernu << 33 34 << 35 #ifndef G4Nucleus_h 34 #ifndef G4Nucleus_h 36 #define G4Nucleus_h 1 35 #define G4Nucleus_h 1 37 // Class Description 36 // Class Description 38 // This class knows how to describe a nucleus; 37 // This class knows how to describe a nucleus; 39 // to be used in your physics implementation ( 38 // to be used in your physics implementation (not physics list) in case you need this physics. 40 // Class Description - End 39 // Class Description - End 41 40 42 41 43 #include "globals.hh" 42 #include "globals.hh" 44 #include "G4ThreeVector.hh" 43 #include "G4ThreeVector.hh" 45 #include "G4ParticleTypes.hh" 44 #include "G4ParticleTypes.hh" 46 #include "G4ReactionProduct.hh" 45 #include "G4ReactionProduct.hh" 47 #include "G4DynamicParticle.hh" 46 #include "G4DynamicParticle.hh" 48 #include "G4ReactionProductVector.hh" 47 #include "G4ReactionProductVector.hh" 49 #include "Randomize.hh" 48 #include "Randomize.hh" 50 49 51 class G4Nucleus 50 class G4Nucleus 52 { 51 { 53 public: 52 public: 54 53 55 G4Nucleus(); 54 G4Nucleus(); 56 G4Nucleus(const G4double A, const G4double << 55 G4Nucleus(const G4double A, const G4double Z); 57 G4Nucleus(const G4int A, const G4int Z, co << 56 G4Nucleus(const G4int A, const G4int Z); 58 G4Nucleus(const G4Material* aMaterial); 57 G4Nucleus(const G4Material* aMaterial); 59 58 60 ~G4Nucleus(); 59 ~G4Nucleus(); 61 60 62 inline G4Nucleus( const G4Nucleus &right ) 61 inline G4Nucleus( const G4Nucleus &right ) 63 { *this = right; } 62 { *this = right; } 64 63 65 inline G4Nucleus& operator = (const G4Nucl 64 inline G4Nucleus& operator = (const G4Nucleus& right) 66 { 65 { 67 if (this != &right) { 66 if (this != &right) { 68 theA=right.theA; 67 theA=right.theA; 69 theZ=right.theZ; 68 theZ=right.theZ; 70 theL=right.theL; << 71 aEff=right.aEff; 69 aEff=right.aEff; 72 zEff=right.zEff; 70 zEff=right.zEff; 73 fIsotope = right.fIsotope; 71 fIsotope = right.fIsotope; 74 pnBlackTrackEnergy=right.pnBlackTrackE 72 pnBlackTrackEnergy=right.pnBlackTrackEnergy; 75 dtaBlackTrackEnergy=right.dtaBlackTrac 73 dtaBlackTrackEnergy=right.dtaBlackTrackEnergy; 76 pnBlackTrackEnergyfromAnnihilation = 74 pnBlackTrackEnergyfromAnnihilation = 77 right.pnBlackTrackEnergyf 75 right.pnBlackTrackEnergyfromAnnihilation; 78 dtaBlackTrackEnergyfromAnnihilation = 76 dtaBlackTrackEnergyfromAnnihilation = 79 right.dtaBlackTrackEnergy 77 right.dtaBlackTrackEnergyfromAnnihilation; 80 theTemp = right.theTemp; 78 theTemp = right.theTemp; 81 excitationEnergy = right.excitationEne 79 excitationEnergy = right.excitationEnergy; 82 momentum = right.momentum; 80 momentum = right.momentum; 83 fermiMomentum = right.fermiMomentum; 81 fermiMomentum = right.fermiMomentum; 84 } 82 } 85 return *this; 83 return *this; 86 } 84 } 87 85 88 inline G4bool operator==( const G4Nucleus 86 inline G4bool operator==( const G4Nucleus &right ) const 89 { return ( this == (G4Nucleus *) &right ); 87 { return ( this == (G4Nucleus *) &right ); } 90 88 91 inline G4bool operator!=( const G4Nucleus 89 inline G4bool operator!=( const G4Nucleus &right ) const 92 { return ( this != (G4Nucleus *) &right ); 90 { return ( this != (G4Nucleus *) &right ); } 93 91 94 void ChooseParameters( const G4Material *a 92 void ChooseParameters( const G4Material *aMaterial ); 95 93 96 void SetParameters( const G4double A, cons << 94 void SetParameters( const G4double A, const G4double Z ); 97 void SetParameters( const G4int A, const G << 95 void SetParameters( const G4int A, const G4int Z ); 98 96 >> 97 /* >> 98 #ifndef G4Hadr_Nucleus_IntegerAZ >> 99 //deprecated Jan 2010, GF >> 100 inline G4double GetN() const >> 101 { return aEff; } >> 102 >> 103 inline G4double GetZ() const >> 104 { return zEff; } >> 105 #endif >> 106 //to be replaced by new >> 107 */ >> 108 99 inline G4int GetA_asInt() const 109 inline G4int GetA_asInt() const 100 { return theA; } 110 { return theA; } 101 111 102 inline G4int GetN_asInt() const 112 inline G4int GetN_asInt() const 103 { return theA-theZ-theL; } << 113 { return theA-theZ; } 104 114 105 inline G4int GetZ_asInt() const 115 inline G4int GetZ_asInt() const 106 { return theZ; } 116 { return theZ; } 107 << 117 //... \GF 108 inline G4int GetL() const // Number of La << 109 { return theL; } << 110 118 111 inline const G4Isotope* GetIsotope() 119 inline const G4Isotope* GetIsotope() 112 { return fIsotope; } 120 { return fIsotope; } 113 121 114 inline void SetIsotope(const G4Isotope* is 122 inline void SetIsotope(const G4Isotope* iso) 115 { 123 { 116 fIsotope = iso; 124 fIsotope = iso; 117 if(iso) { 125 if(iso) { 118 theZ = iso->GetZ(); 126 theZ = iso->GetZ(); 119 theA = iso->GetN(); 127 theA = iso->GetN(); 120 theL = 0; << 121 aEff = theA; 128 aEff = theA; 122 zEff = theZ; 129 zEff = theZ; 123 } 130 } 124 } 131 } 125 132 126 G4DynamicParticle *ReturnTargetParticle() 133 G4DynamicParticle *ReturnTargetParticle() const; 127 134 128 G4double AtomicMass( const G4double A, con << 135 G4double AtomicMass( const G4double A, const G4double Z ) const; 129 G4double AtomicMass( const G4int A, const << 136 G4double AtomicMass( const G4int A, const G4int Z ) const; 130 << 137 131 G4double GetThermalPz( const G4double mass 138 G4double GetThermalPz( const G4double mass, const G4double temp ) const; 132 139 133 G4ReactionProduct GetThermalNucleus(G4doub 140 G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const; 134 141 135 G4ReactionProduct GetBiasedThermalNucleus( 142 G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const; 136 143 137 void DoKinematicsOfThermalNucleus(const G4 << 138 G4Reacti << 139 << 140 G4double Cinema( G4double kineticEnergy ); 144 G4double Cinema( G4double kineticEnergy ); 141 145 142 G4double EvaporationEffects( G4double kine 146 G4double EvaporationEffects( G4double kineticEnergy ); 143 147 144 G4double AnnihilationEvaporationEffects(G4 148 G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg); 145 149 146 inline G4double GetPNBlackTrackEnergy() co 150 inline G4double GetPNBlackTrackEnergy() const 147 { return pnBlackTrackEnergy; } 151 { return pnBlackTrackEnergy; } 148 152 149 inline G4double GetDTABlackTrackEnergy() c 153 inline G4double GetDTABlackTrackEnergy() const 150 { return dtaBlackTrackEnergy; } 154 { return dtaBlackTrackEnergy; } 151 155 152 inline G4double GetAnnihilationPNBlackTrac 156 inline G4double GetAnnihilationPNBlackTrackEnergy() const 153 { return pnBlackTrackEnergyfromAnnihilatio 157 { return pnBlackTrackEnergyfromAnnihilation; } 154 158 155 inline G4double GetAnnihilationDTABlackTra 159 inline G4double GetAnnihilationDTABlackTrackEnergy() const 156 { return dtaBlackTrackEnergyfromAnnihilati 160 { return dtaBlackTrackEnergyfromAnnihilation; } 157 161 158 // ****************** methods introduced by C 162 // ****************** methods introduced by ChV *********************** 159 // return fermi momentum 163 // return fermi momentum 160 G4ThreeVector GetFermiMomentum(); 164 G4ThreeVector GetFermiMomentum(); 161 165 162 /* 166 /* 163 // return particle to be absorbed. 167 // return particle to be absorbed. 164 G4DynamicParticle* ReturnAbsorbingParticl 168 G4DynamicParticle* ReturnAbsorbingParticle(G4double weight); 165 */ 169 */ 166 170 167 // final nucleus fragmentation. Return List 171 // final nucleus fragmentation. Return List of particles 168 // which should be used for further tracking 172 // which should be used for further tracking. 169 G4ReactionProductVector* Fragmentate(); 173 G4ReactionProductVector* Fragmentate(); 170 174 171 175 172 // excitation Energy... 176 // excitation Energy... 173 void AddExcitationEnergy(G4double anEnerg 177 void AddExcitationEnergy(G4double anEnergy); 174 178 175 179 176 // momentum of absorbed Particles .. 180 // momentum of absorbed Particles .. 177 void AddMomentum(const G4ThreeVector aMom 181 void AddMomentum(const G4ThreeVector aMomentum); 178 182 179 // return excitation Energy 183 // return excitation Energy 180 G4double GetEnergyDeposit() {return excit 184 G4double GetEnergyDeposit() {return excitationEnergy; } 181 185 182 186 183 187 184 // ****************************** end ChV **** 188 // ****************************** end ChV ****************************** 185 189 186 190 187 private: 191 private: 188 192 189 G4int theA; 193 G4int theA; 190 G4int theZ; 194 G4int theZ; 191 G4int theL; // Number of Lambdas (in t << 192 G4double aEff; // effective atomic weight 195 G4double aEff; // effective atomic weight 193 G4double zEff; // effective atomic number 196 G4double zEff; // effective atomic number 194 197 195 const G4Isotope* fIsotope; 198 const G4Isotope* fIsotope; 196 199 197 G4double pnBlackTrackEnergy; // the kinet 200 G4double pnBlackTrackEnergy; // the kinetic energy available for 198 // proton/ne 201 // proton/neutron black track particles 199 G4double dtaBlackTrackEnergy; // the kinet 202 G4double dtaBlackTrackEnergy; // the kinetic energy available for 200 // deuteron/ 203 // deuteron/triton/alpha particles 201 G4double pnBlackTrackEnergyfromAnnihilatio 204 G4double pnBlackTrackEnergyfromAnnihilation; 202 // kinetic energy availab 205 // kinetic energy available for proton/neutron black 203 // track particles based 206 // track particles based on baryon annihilation 204 G4double dtaBlackTrackEnergyfromAnnihilati 207 G4double dtaBlackTrackEnergyfromAnnihilation; 205 // kinetic energy availab 208 // kinetic energy available for deuteron/triton/alpha 206 // black track particles 209 // black track particles based on baryon annihilation 207 210 208 211 209 // ************************** member variables 212 // ************************** member variables by ChV ******************* 210 // Excitation Energy leading to evaporation 213 // Excitation Energy leading to evaporation or deexcitation. 211 G4double excitationEnergy; 214 G4double excitationEnergy; 212 215 213 // Momentum, accumulated by absorbing Partic 216 // Momentum, accumulated by absorbing Particles 214 G4ThreeVector momentum; 217 G4ThreeVector momentum; 215 218 216 // Fermi Gas model: at present, we assume co 219 // Fermi Gas model: at present, we assume constant nucleon density for all 217 // nuclei. The radius of a nucleon is taken 220 // nuclei. The radius of a nucleon is taken to be 1 fm. 218 // see for example S.Fl"ugge, Encyclopedia o 221 // see for example S.Fl"ugge, Encyclopedia of Physics, Vol XXXIX, 219 // Structure of Atomic Nuclei (Berlin-Gottin 222 // Structure of Atomic Nuclei (Berlin-Gottingen-Heidelberg, 1957) page 426. 220 223 221 // maximum momentum possible from fermi gas 224 // maximum momentum possible from fermi gas model: 222 G4double fermiMomentum; 225 G4double fermiMomentum; 223 G4double theTemp; // temperature 226 G4double theTemp; // temperature 224 // ****************************** end ChV **** 227 // ****************************** end ChV ****************************** 225 228 226 }; 229 }; 227 230 228 #endif 231 #endif 229 232 230 233