- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/cascade/cascade/include/G4InuclNuclei.hh
r962 r1315 1 #ifndef G4INUCL_NUCLEI_HH 2 #define G4INUCL_NUCLEI_HH 1 3 // 2 4 // ******************************************************************** … … 23 25 // * acceptance of all terms of the Geant4 Software license. * 24 26 // ******************************************************************** 27 // $Id: G4InuclNuclei.hh,v 1.16 2010/04/09 19:33:11 mkelsey Exp $ 28 // Geant4 tag: $Name: geant4-09-04-beta-cand-01 $ 25 29 // 26 #ifndef G4INUCL_NUCLEI_HH 27 #define G4INUCL_NUCLEI_HH 30 // 20100112 Michael Kelsey -- Replace G4CascadeMomentum with G4LorentzVector 31 // 20100301 M. Kelsey -- Add function to create unphysical nuclei for use 32 // as temporary final-state fragments. 33 // 20100319 M. Kelsey -- Remove "using" directory and unnecessary #includes. 34 // 20100409 M. Kelsey -- Drop unused string argument from ctors. 28 35 29 #ifndef G4INUCL_PARTICLE_HH30 36 #include "G4InuclParticle.hh" 31 #endif32 37 #include "G4ExitonConfiguration.hh" 33 #include "G4InuclSpecialFunctions.hh"34 38 35 using namespace G4InuclSpecialFunctions;39 class G4ParticleDefinition; 36 40 37 41 class G4InuclNuclei : public G4InuclParticle { 42 public: 43 G4InuclNuclei() : G4InuclParticle() {} 38 44 39 public: 45 G4InuclNuclei(G4double a, G4double z) 46 : G4InuclParticle(makeDefinition(a,z)), 47 exitationEnergy(0.0) {} 40 48 41 G4InuclNuclei() {}; 49 G4InuclNuclei(const G4LorentzVector& mom, G4double a, G4double z) 50 : G4InuclParticle(makeDefinition(a,z), mom), 51 exitationEnergy(0.0) {} 42 52 43 G4InuclNuclei(G4double a, 44 G4double z) 45 : A(a), 46 Z(z) { 53 G4InuclNuclei(G4double ekin, G4double a, G4double z) 54 : G4InuclParticle(makeDefinition(a,z), ekin), 55 exitationEnergy(0.0) {} 47 56 48 setNucleiMass(); 49 exitationEnergy = 0.0; 50 }; 57 virtual ~G4InuclNuclei() {} 51 58 52 G4InuclNuclei(const G4CascadeMomentum& mom, 53 G4double a, 54 G4double z) 55 : G4InuclParticle(mom), 56 A(a), 57 Z(z) { 59 // Copy and assignment constructors for use with std::vector<> 60 G4InuclNuclei(const G4InuclNuclei& right) 61 : G4InuclParticle(right), exitationEnergy(right.exitationEnergy), 62 theExitonConfiguration(right.theExitonConfiguration) {} 58 63 59 setNucleiMass(); 60 exitationEnergy = 0.0; 61 }; 64 G4InuclNuclei& operator=(const G4InuclNuclei& right); 62 65 63 G4InuclNuclei(G4double ekin, 64 G4double a, 65 G4double z) 66 : A(a), 67 Z(z) { 68 69 setNucleiMass(); 70 G4CascadeMomentum mom; 71 mom[0] = ekin + nucleiMass; 72 mom[3] = std::sqrt(mom[0] * mom[0] - nucleiMass * nucleiMass); 73 G4InuclParticle::setMomentum(mom); 74 exitationEnergy = 0.0; 75 }; 76 77 void setA(G4double a) { 78 79 A = a; 80 }; 81 82 void setZ(G4double z) { 83 84 Z = z; 85 }; 86 87 void setExitationEnergy(G4double e) { 88 89 exitationEnergy = e; 90 }; 91 92 void setEnergy() { 93 94 momentum[0] = std::sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] + 95 momentum[3] * momentum[3] + nucleiMass * nucleiMass); 96 }; 97 98 void setNucleiMass() { 99 100 nucleiMass = 0.93827 * Z + 0.93957 * (A - Z) - 0.001 * bindingEnergy(A, Z); 101 }; 66 void setExitationEnergy(G4double e) { exitationEnergy = e; } 102 67 103 68 void setExitonConfiguration(const G4ExitonConfiguration& config) { 69 theExitonConfiguration = config; 70 } 104 71 105 theExitonConfiguration = config; 106 }; 72 G4double getA() const { return getDefinition()->GetAtomicMass(); } 107 73 108 G4double get A() const {74 G4double getZ() const { return getDefinition()->GetAtomicNumber(); } 109 75 110 return A; 111 }; 112 113 G4double getZ() const { 114 115 return Z; 116 }; 117 118 G4double getExitationEnergy() const { 119 120 return exitationEnergy; 121 }; 76 G4double getExitationEnergy() const { return exitationEnergy; } 122 77 123 78 G4double getExitationEnergyInGeV() const { 79 return 0.001 * exitationEnergy; 80 } 124 81 125 return 0.001 * exitationEnergy; 126 }; 82 const G4ExitonConfiguration& getExitonConfiguration() const { 83 return theExitonConfiguration; 84 } 127 85 128 G4ExitonConfiguration getExitonConfiguration() const { 129 130 return theExitonConfiguration; 131 }; 132 133 G4double getMass() const { 134 135 return nucleiMass; 136 }; 137 138 G4double getKineticEnergy() const { 139 140 return momentum[0] - nucleiMass; 141 }; 142 143 G4double getNucleiMass(G4double a, 144 G4double z) const { 145 146 return 0.93827 * z + 0.93957 * (a - z) - 0.001 * bindingEnergy(a, z); 147 }; 86 static G4double getNucleiMass(G4double a, G4double z); 148 87 149 88 virtual void printParticle() const { 89 G4cout << " A " << getA() << " Z " << getZ() << " mass " 90 << getMass() << " Eex (MeV) " << exitationEnergy << G4endl; 91 G4InuclParticle::printParticle(); 92 } 150 93 151 G4cout << " A " << A << " Z " << Z << " mass " << nucleiMass << 152 " Eex (MeV) " << exitationEnergy << G4endl; 94 protected: 95 // Convert nuclear configuration to standard GEANT4 pointer 96 static G4ParticleDefinition* 97 makeDefinition(G4double a, G4double z, G4double exc=0.); 153 98 154 G4cout << " Px " << momentum[1] << " Py " << momentum[2] << " Pz " << 155 momentum[3] << " E " << momentum[0] << G4endl; 156 }; 99 static G4ParticleDefinition* 100 makeNuclearFragment(G4double a, G4double z, G4double exc=0.); 157 101 158 102 private: 159 160 G4double A;161 G4double Z;162 103 G4double exitationEnergy; 163 G4double nucleiMass;164 104 G4ExitonConfiguration theExitonConfiguration; 165 166 105 }; 167 106
Note: See TracChangeset
for help on using the changeset viewer.