- 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/G4IonsKoxCrossSection.cc
r1055 r1340 32 32 #include "G4ParticleTable.hh" 33 33 #include "G4IonTable.hh" 34 #include "G4HadTmpUtil.hh" 34 35 35 36 G4double G4IonsKoxCrossSection:: 36 Get IsoZACrossSection(const G4DynamicParticle* aParticle, G4doubleZZ,37 G4 doubleAA, G4double /*temperature*/)37 GetZandACrossSection(const G4DynamicParticle* aParticle, G4int ZZ, 38 G4int AA, G4double /*temperature*/) 38 39 { 39 40 G4double xsection = 0.0; 40 41 41 42 G4int Ap = aParticle->GetDefinition()->GetBaryonNumber(); 42 G4int Zp = int (aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5);43 G4int Zp = G4int(aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5); 43 44 G4double ke_per_N = aParticle->GetKineticEnergy() / Ap; 44 45 … … 46 47 // if ( ke_per_N < lowerLimit ) return xsection; 47 48 48 G4int At = int (AA + 0.5);49 G4int Zt = int (ZZ + 0.5 );49 G4int At = AA; 50 G4int Zt = ZZ; 50 51 51 52 G4double one_third = 1.0 / 3.0; … … 54 55 G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 55 56 57 // rc divide fermi 58 G4double Bc = Zt * Zp / ( (rc/fermi) * (cubicrAp+cubicrAt) ); 56 59 57 G4double Bc = Zt * Zp / ( ( rc / fermi ) * ( cubicrAp + cubicrAt ) ); // rc divide fermi58 G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At);59 G4double proj_mass = aParticle->GetMass(); 60 G4double targ_mass = 61 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Zt, At); 62 G4double proj_mass = aParticle->GetMass(); 60 63 G4double proj_momentum = aParticle->GetMomentum().mag(); 61 64 … … 69 72 70 73 G4double a = 1.85; 71 G4double Rsurf = r0 * ( a * cubicrAp * cubicrAt / ( cubicrAp + cubicrAt) - c);74 G4double Rsurf = r0 * (a*cubicrAp * cubicrAt/(cubicrAp + cubicrAt) - c); 72 75 G4double D = 5.0 * ( At - 2 * Zt ) * Zp / ( Ap * At ); 73 76 Rsurf = Rsurf + D * fermi; // multiply D by fermi 74 77 75 78 G4double Rint = Rvol + Rsurf; 76 77 79 xsection = pi * Rint * Rint * ( 1 - Bc / ( Ecm / MeV ) ); 78 80 79 81 return xsection; 80 82 } 83 81 84 82 85 G4double G4IonsKoxCrossSection:: … … 91 94 G4IsotopeVector* isoVector = anElement->GetIsotopeVector(); 92 95 G4double* abundVector = anElement->GetRelativeAbundanceVector(); 93 G4 doubleZZ;94 G4 doubleAA;96 G4int ZZ; 97 G4int AA; 95 98 96 99 for (G4int i = 0; i < nIso; i++) { 97 ZZ = G4double( (*isoVector)[i]->GetZ());98 AA = G4double( (*isoVector)[i]->GetN());99 sig = Get IsoZACrossSection(aParticle, ZZ, AA, temperature);100 ZZ = (*isoVector)[i]->GetZ(); 101 AA = (*isoVector)[i]->GetN(); 102 sig = GetZandACrossSection(aParticle, ZZ, AA, temperature); 100 103 xsection += sig*abundVector[i]; 101 104 } 102 105 103 106 } else { 104 xsection =105 GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),106 107 G4int ZZ = G4lrint(anElement->GetZ()); 108 G4int AA = G4lrint(anElement->GetN()); 109 xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 107 110 } 108 111 … … 111 114 112 115 113 G4double G4IonsKoxCrossSection::calEcm ( G4double mp , G4double mt , G4double Plab ) 116 G4double 117 G4IonsKoxCrossSection::calEcm(G4double mp, G4double mt, G4double Plab) 114 118 { 115 119 G4double Elab = std::sqrt ( mp * mp + Plab * Plab ); … … 121 125 122 126 123 G4double G4IonsKoxCrossSection::calCeValue( const G4double ke)127 G4double G4IonsKoxCrossSection::calCeValue(const G4double ke) 124 128 { 125 129 // Calculate c value … … 131 135 G4double Ce; 132 136 G4double log10_ke = std::log10 ( ke ); 133 if ( log10_ke > 1.5)137 if (log10_ke > 1.5) 134 138 { 135 139 Ce = - 10.0 / std::pow ( G4double(log10_ke) , G4double(5) ) + 2.0; … … 137 141 else 138 142 { 139 Ce = ( - 10.0 / std::pow ( G4double(1.5) , G4double(5) ) + 2.0 ) / std::pow ( G4double(1.5) , G4double(3) ) * std::pow ( G4double(log10_ke) , G4double(3) ); 143 Ce = (-10.0/std::pow(G4double(1.5), G4double(5) ) + 2.0) / 144 std::pow(G4double(1.5), G4double(3)) * std::pow(G4double(log10_ke), G4double(3) ); 140 145 141 146 }
Note: See TracChangeset
for help on using the changeset viewer.