- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/cascade/cascade/include/G4InuclNuclei.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InuclNuclei.hh,v 1. 17 2010/06/25 09:43:26 gunterExp $27 // Geant4 tag: $Name: geant4-09-04-beta-01$26 // $Id: G4InuclNuclei.hh,v 1.27 2010/09/25 04:35:02 mkelsey Exp $ 27 // Geant4 tag: $Name: hadr-casc-V09-03-85 $ 28 28 // 29 29 // 20100112 Michael Kelsey -- Replace G4CascadeMomentum with G4LorentzVector … … 32 32 // 20100319 M. Kelsey -- Remove "using" directory and unnecessary #includes. 33 33 // 20100409 M. Kelsey -- Drop unused string argument from ctors. 34 // 20100630 M. Kelsey -- Add excitation energy as optional public ctor arg, 35 // remove excitation energy data member (part of G4Ions). Add 36 // excitation energy to "getNucleiMass()" function, move print to .cc 37 // 20100711 M. Kelsey -- Add optional model ID to constructors 38 // 20100714 M. Kelsey -- Use G4DynamicParticle::theDynamicalMass to deal with 39 // excitation energy without instantianting "infinite" G4PartDefns. 40 // 20100719 M. Kelsey -- Move setExitationEnergy implementation to .cc file. 41 // 20100906 M. Kelsey -- Add fill() functions to rewrite contents 42 // 20100909 M. Kelsey -- Add function to discard exciton configuration 43 // 20100914 M. Kelsey -- Use integers for A and Z 44 // 20100915 M. Kelsey -- Add constructor to copy G4DynamicParticle input 45 // 20100924 M. Kelsey -- Add constructor to copy G4Fragment input, and output 46 // functions to create G4Fragment. 34 47 35 48 #ifndef G4INUCL_NUCLEI_HH … … 37 50 38 51 #include "G4InuclParticle.hh" 52 #include "G4LorentzVector.hh" 39 53 #include "G4ExitonConfiguration.hh" 40 54 55 class G4Fragment; 41 56 class G4ParticleDefinition; 57 42 58 43 59 class G4InuclNuclei : public G4InuclParticle { … … 45 61 G4InuclNuclei() : G4InuclParticle() {} 46 62 47 G4InuclNuclei(G4double a, G4double z) 48 : G4InuclParticle(makeDefinition(a,z)), 49 exitationEnergy(0.0) {} 63 G4InuclNuclei(const G4DynamicParticle& dynPart, G4int model=0) 64 : G4InuclParticle(dynPart) { 65 setModel(model); 66 } 50 67 51 G4InuclNuclei(const G4LorentzVector& mom, G4double a, G4double z) 52 : G4InuclParticle(makeDefinition(a,z), mom), 53 exitationEnergy(0.0) {} 68 G4InuclNuclei(G4int a, G4int z, G4double exc=0., G4int model=0) 69 : G4InuclParticle(makeDefinition(a,z)) { 70 setExitationEnergy(exc); 71 setModel(model); 72 } 54 73 55 G4InuclNuclei(G4double ekin, G4double a, G4double z) 56 : G4InuclParticle(makeDefinition(a,z), ekin), 57 exitationEnergy(0.0) {} 74 G4InuclNuclei(const G4LorentzVector& mom, G4int a, G4int z, 75 G4double exc=0., G4int model=0) 76 : G4InuclParticle(makeDefinition(a,z), mom) { 77 setExitationEnergy(exc); 78 setModel(model); 79 } 80 81 G4InuclNuclei(G4double ekin, G4int a, G4int z, G4double exc, 82 G4int model=0) 83 : G4InuclParticle(makeDefinition(a,z), ekin) { 84 setExitationEnergy(exc); 85 setModel(model); 86 } 87 88 G4InuclNuclei(const G4Fragment& aFragment, G4int model=0); 58 89 59 90 virtual ~G4InuclNuclei() {} … … 61 92 // Copy and assignment constructors for use with std::vector<> 62 93 G4InuclNuclei(const G4InuclNuclei& right) 63 : G4InuclParticle(right), exitationEnergy(right.exitationEnergy),94 : G4InuclParticle(right), 64 95 theExitonConfiguration(right.theExitonConfiguration) {} 65 96 66 97 G4InuclNuclei& operator=(const G4InuclNuclei& right); 67 98 68 void setExitationEnergy(G4double e) { exitationEnergy = e; } 99 // Overwrite data structure (avoids creating/copying temporaries) 100 void fill(G4int a, G4int z, G4double exc=0., G4int model=0) { 101 fill(0., a, z, exc, model); 102 } 103 104 void fill(const G4LorentzVector& mom, G4int a, G4int z, 105 G4double exc=0., G4int model=0); 106 107 void fill(G4double ekin, G4int a, G4int z, G4double exc, 108 G4int model=0); 109 110 // Excitation energy is stored as dynamical mass of particle 111 void setExitationEnergy(G4double e); 69 112 70 113 void setExitonConfiguration(const G4ExitonConfiguration& config) { … … 72 115 } 73 116 74 G4double getA() const { return getDefinition()->GetAtomicMass(); }117 void clearExitonConfiguration() { theExitonConfiguration.clear(); } 75 118 76 G4double getZ() const { return getDefinition()->GetAtomicNumber(); } 119 G4int getA() const { return getDefinition()->GetAtomicMass(); } 120 G4int getZ() const { return getDefinition()->GetAtomicNumber(); } 77 121 78 G4double getExitationEnergy() const { return exitationEnergy; } 122 G4double getNucleiMass() const { 123 return getDefinition()->GetPDGMass()*MeV/GeV; // From G4 to Bertini 124 } 79 125 80 G4double getExitationEnergy InGeV() const {81 return 0.001 * exitationEnergy;126 G4double getExitationEnergy() const { 127 return (getMass()-getNucleiMass())*GeV/MeV; // Always in MeV 82 128 } 129 130 G4double getExitationEnergyInGeV() const { return getExitationEnergy()/GeV; } 83 131 84 132 const G4ExitonConfiguration& getExitonConfiguration() const { … … 86 134 } 87 135 88 static G4double getNucleiMass(G4 double a, G4double z);136 static G4double getNucleiMass(G4int a, G4int z, G4double exc=0.); 89 137 90 virtual void printParticle() const {91 G4cout << " A " << getA() << " Z " << getZ() << " mass " 92 << getMass() << " Eex (MeV) " << exitationEnergy << G4endl; 93 G4InuclParticle::printParticle();94 }138 virtual void printParticle() const; 139 140 // Convert contents to G4Fragment for use outside package 141 G4Fragment makeG4Fragment() const; 142 operator G4Fragment() const; 95 143 96 144 protected: 97 145 // Convert nuclear configuration to standard GEANT4 pointer 98 static G4ParticleDefinition* 99 makeDefinition(G4double a, G4double z, G4double exc=0.); 100 101 static G4ParticleDefinition* 102 makeNuclearFragment(G4double a, G4double z, G4double exc=0.); 146 static G4ParticleDefinition* makeDefinition(G4int a, G4int z); 147 static G4ParticleDefinition* makeNuclearFragment(G4int a, G4int z); 103 148 104 149 private: 105 G4double exitationEnergy;106 150 G4ExitonConfiguration theExitonConfiguration; 107 151 };
Note: See TracChangeset
for help on using the changeset viewer.