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