Changeset 1340 for trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc
r819 r1340 34 34 // ******************************************************************** 35 35 // 36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 37 37 // 38 38 // MODULE: G4EMDissociationCrossSection.cc … … 45 45 // Contract: 17191/03/NL/LvH 46 46 // 47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 48 // 49 49 // CHANGE HISTORY … … 56 56 // Beta release 57 57 // 58 // 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for gant4 7.1. 59 // 60 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 61 //////////////////////////////////////////////////////////////////////////////// 58 // 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for 59 // geant4 7.1. 60 // 61 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 62 ////////////////////////////////////////////////////////////////////////////// 62 63 // 63 64 #include "G4EMDissociationCrossSection.hh" … … 65 66 #include "G4ParticleTable.hh" 66 67 #include "G4IonTable.hh" 68 #include "G4HadTmpUtil.hh" 67 69 #include "globals.hh" 68 //////////////////////////////////////////////////////////////////////////////// 69 // 70 71 70 72 G4EMDissociationCrossSection::G4EMDissociationCrossSection () 71 73 { 72 //73 74 // 74 75 // This function makes use of the class which can sample the virtual photon … … 86 87 xd = 0.25; 87 88 } 88 ////////////////////////////////////////////////////////////////////////////// //89 ////////////////////////////////////////////////////////////////////////////// 89 90 // 90 91 G4EMDissociationCrossSection::~G4EMDissociationCrossSection() … … 92 93 delete thePhotonSpectrum; 93 94 } 94 /////////////////////////////////////////////////////////////////////////////// 95 // 96 G4bool G4EMDissociationCrossSection::IsZAApplicable 97 (const G4DynamicParticle* theDynamicParticle, G4double /*ZZ*/, G4double AA) 95 ///////////////////////////////////////////////////////////////////////////// 96 // 97 G4bool 98 G4EMDissociationCrossSection::IsIsoApplicable(const G4DynamicParticle* theDynamicParticle, 99 G4int /*ZZ*/, G4int AA) 98 100 { 99 101 // … … 105 107 // 106 108 if (G4ParticleTable::GetParticleTable()->GetIonTable()-> 107 IsIon(theDynamicParticle->GetDefinition()) && AA > 1 .0)109 IsIon(theDynamicParticle->GetDefinition()) && AA > 1) 108 110 return true; 109 111 else … … 114 116 (const G4DynamicParticle* theDynamicParticle, const G4Element* theElement) 115 117 { 116 return Is ZAApplicable(theDynamicParticle, 0., theElement->GetN());118 return IsIsoApplicable(theDynamicParticle, 0, G4lrint(theElement->GetN())); 117 119 } 118 120 … … 130 132 G4IsotopeVector* isoVector = theElement->GetIsotopeVector(); 131 133 G4double* abundVector = theElement->GetRelativeAbundanceVector(); 132 G4 doubleZZ;133 G4 doubleAA;134 G4int ZZ; 135 G4int AA; 134 136 135 137 for (G4int i = 0; i < nIso; i++) { 136 ZZ = G4double( (*isoVector)[i]->GetZ());137 AA = G4double( (*isoVector)[i]->GetN());138 sig = Get IsoZACrossSection(theDynamicParticle, ZZ, AA, temperature);138 ZZ = (*isoVector)[i]->GetZ(); 139 AA = (*isoVector)[i]->GetN(); 140 sig = GetZandACrossSection(theDynamicParticle, ZZ, AA, temperature); 139 141 crossSection += sig*abundVector[i]; 140 142 } 141 143 142 144 } else { 143 crossSection =144 GetIsoZACrossSection(theDynamicParticle, theElement->GetZ(),145 theElement->GetN(), temperature);145 G4int ZZ = G4lrint(theElement->GetZ()); 146 G4int AA = G4lrint(theElement->GetN()); 147 crossSection = GetZandACrossSection(theDynamicParticle, ZZ, AA, temperature); 146 148 } 147 149 … … 150 152 151 153 152 G4double G4EMDissociationCrossSection::GetIsoZACrossSection 153 (const G4DynamicParticle *theDynamicParticle, G4double ZZ, G4double AA, 154 G4double /*temperature*/) 155 { 156 // 154 G4double 155 G4EMDissociationCrossSection::GetZandACrossSection(const G4DynamicParticle *theDynamicParticle, 156 G4int ZZ, G4int AA, G4double /*temperature*/) 157 { 157 158 // 158 159 // Get relevant information about the projectile and target (A, Z) and … … 240 241 return theCrossSectionVector; 241 242 } 243 242 244 //////////////////////////////////////////////////////////////////////////////// 243 245 // … … 247 249 { 248 250 // 249 //250 251 // This is a cheaky little member function to calculate the probability of 251 252 // EMD for the target in the field of the projectile ... just by reversing the … … 254 255 return GetCrossSectionForProjectile (AT, ZT, AP, ZP, b, bmin); 255 256 } 256 //////////////////////////////////////////////////////////////////////////////// 257 // 257 258 258 259 G4double 259 G4EMDissociationCrossSection::GetWilsonProbabilityForProtonDissociation 260 (G4double A, G4double Z) 261 { 262 // 260 G4EMDissociationCrossSection::GetWilsonProbabilityForProtonDissociation(G4double A, 261 G4double Z) 262 { 263 263 // 264 264 // This is a simple algorithm to choose whether a proton or neutron is ejected … … 282 282 return p; 283 283 } 284 ////////////////////////////////////////////////////////////////////////////////285 //
Note: See TracChangeset
for help on using the changeset viewer.