Changeset 962 for trunk/source/processes/hadronic/models/neutron_hp/src
- Timestamp:
- Apr 6, 2009, 12:30:29 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/neutron_hp/src
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPAngular.cc
r819 r962 29 29 // 30 30 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi) 31 // 080612 bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #5 31 32 // 32 33 #include "G4NeutronHPAngular.hh" … … 106 107 else 107 108 { 109 if(frameFlag == 1) // LAB 110 { 111 G4double en = aHadron.GetTotalMomentum(); 112 G4ReactionProduct boosted; 113 boosted.Lorentz(theNeutron, theTarget); 114 G4double kineticEnergy = boosted.GetKineticEnergy(); 115 G4double cosTh = 0.0; 116 if(theAngularDistributionType == 1) cosTh = theCoefficients->SampleMax(kineticEnergy); 117 if(theAngularDistributionType == 2) cosTh = theProbArray->Sample(kineticEnergy); 118 G4double theta = std::acos(cosTh); 119 G4double phi = twopi*G4UniformRand(); 120 G4double sinth = std::sin(theta); 121 G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) ); 122 aHadron.SetMomentum( temp ); 123 } 124 else if(frameFlag == 2) // costh in CMS 125 { 126 G4ReactionProduct boostedN; 127 boostedN.Lorentz(theNeutron, theTarget); 128 G4double kineticEnergy = boostedN.GetKineticEnergy(); 129 130 G4double cosTh = 0.0; 131 if(theAngularDistributionType == 1) cosTh = theCoefficients->SampleMax(kineticEnergy); 132 if(theAngularDistributionType == 2) cosTh = theProbArray->Sample(kineticEnergy); 133 134 //080612TK bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) 135 /* 108 136 if(theAngularDistributionType == 1) // LAB 109 137 { … … 121 149 else if(theAngularDistributionType == 2) // costh in CMS 122 150 { 123 G4ReactionProduct boostedN; 124 boostedN.Lorentz(theNeutron, theTarget); 125 G4double kineticEnergy = boostedN.GetKineticEnergy(); 126 G4double cosTh = theProbArray->Sample(kineticEnergy); 151 */ 152 153 // G4ReactionProduct boostedN; 154 // boostedN.Lorentz(theNeutron, theTarget); 155 // G4double kineticEnergy = boostedN.GetKineticEnergy(); 156 // G4double cosTh = theProbArray->Sample(kineticEnergy); 157 127 158 G4double theta = std::acos(cosTh); 128 159 G4double phi = twopi*G4UniformRand(); … … 130 161 131 162 G4ThreeVector temp(sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) ); //CMS 163 164 //080612TK bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #5 165 /* 132 166 G4double en = aHadron.GetTotalEnergy(); // Target rest 133 167 … … 172 206 aHadron.SetTotalEnergy( std::sqrt( mom*mom + aHadron.GetMass()*aHadron.GetMass() ) ); 173 207 aHadron.Lorentz(aHadron, trafo); // now in target rest frame 208 */ 209 // Determination of the hadron kinetic energy in CMS 210 // aHadron.GetKineticEnergy() is actually the residual kinetic energy in CMS (or target frame) 211 // kineticEnergy is incident neutron kinetic energy in CMS (or target frame) 212 G4double QValue = aHadron.GetKineticEnergy() - kineticEnergy; 213 G4double A1 = theTarget.GetMass()/boostedN.GetMass(); 214 G4double A1prim = aHadron.GetMass()/ boostedN.GetMass(); 215 G4double kinE = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*kineticEnergy+(1+A1)*QValue); 216 G4double totalE = kinE + aHadron.GetMass(); 217 G4double mom2 = totalE*totalE - aHadron.GetMass()*aHadron.GetMass(); 218 G4double mom; 219 if ( mom2 > 0.0 ) mom = std::sqrt( mom2 ); 220 else mom = 0.0; 221 222 aHadron.SetMomentum( mom*temp ); // Set momentum in CMS 223 aHadron.SetKineticEnergy(kinE); // Set kinetic energy in CMS 224 225 // get trafo from Target rest frame to CMS 226 G4ReactionProduct boostedT; 227 boostedT.Lorentz(theTarget, theTarget); 228 229 G4ThreeVector the3Neutron = boostedN.GetMomentum(); 230 G4double nEnergy = boostedN.GetTotalEnergy(); 231 G4ThreeVector the3Target = boostedT.GetMomentum(); 232 G4double tEnergy = boostedT.GetTotalEnergy(); 233 G4double totE = nEnergy+tEnergy; 234 G4ThreeVector the3trafo = -the3Target-the3Neutron; 235 G4ReactionProduct trafo; // for transformation from CMS to target rest frame 236 trafo.SetMomentum(the3trafo); 237 G4double cmsMom = std::sqrt(the3trafo*the3trafo); 238 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom)); 239 trafo.SetMass(sqrts); 240 trafo.SetTotalEnergy(totE); 241 242 aHadron.Lorentz(aHadron, trafo); 243 174 244 } 175 245 else -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPCaptureData.cc
r819 r962 31 31 // 070613 fix memory leaking by T. Koi 32 32 // 071002 enable cross section dump by T. Koi 33 // 080428 change checking point of "neglecting doppler broadening" flag 34 // from GetCrossSection to BuildPhysicsTable by T. Koi 35 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 36 // 34 37 #include "G4NeutronHPCaptureData.hh" … … 49 52 // TKDB 50 53 theCrossSections = 0; 54 onFlightDB = true; 51 55 BuildPhysicsTable(*G4Neutron::Neutron()); 52 56 } … … 65 69 if(&aP!=G4Neutron::Neutron()) 66 70 throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!"); 71 72 //080428 73 if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) onFlightDB = false; 74 67 75 size_t numberOfElements = G4Element::GetNumberOfElements(); 68 76 // G4cout << "CALLED G4NeutronHPCaptureData::BuildPhysicsTable "<<numberOfElements<<G4endl; … … 136 144 } 137 145 138 #include "G4NucleiProperties Table.hh"146 #include "G4NucleiProperties.hh" 139 147 140 148 G4double G4NeutronHPCaptureData:: … … 148 156 G4double eKinetic = aP->GetKineticEnergy(); 149 157 150 if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) 158 //if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) 159 //080428 160 if ( !onFlightDB ) 151 161 { 152 162 G4double factor = 1.0; … … 171 181 G4double theZ = anE->GetZ(); 172 182 G4double eleMass; 173 eleMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps)) 174 ) / G4Neutron::Neutron()->GetPDGMass(); 183 eleMass = G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) ) / G4Neutron::Neutron()->GetPDGMass(); 175 184 176 185 G4ReactionProduct boosted; -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPCaptureFS.cc
r819 r962 30 30 // 12-April-06 Enable IC electron emissions T. Koi 31 31 // 26-January-07 Add G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION flag 32 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 32 33 // 33 34 #include "G4NeutronHPCaptureFS.hh" … … 56 57 G4double eps = 0.0001; 57 58 if(targetMass<500*MeV) 58 targetMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /59 targetMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theBaseA+eps) , static_cast<G4int>(theBaseZ+eps) )) / 59 60 G4Neutron::Neutron()->GetPDGMass(); 60 61 G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum(); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPChannel.cc
r819 r962 30 30 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi) 31 31 // 071031 bug fix T. Koi on behalf of A. Howard 32 // 081203 bug fix in Register method by T. Koi 32 33 // 33 34 #include "G4NeutronHPChannel.hh" … … 68 69 registerCount++; 69 70 G4int Z = G4lrint(theElement->GetZ()); 71 72 Z = Z-registerCount; 73 if ( registerCount > 5 ) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this material"); // for Elastic, Capture, Fission case 74 if ( Z < 1 ) return false; 75 /* 70 76 if(registerCount<5) 71 77 { 72 78 Z = Z-registerCount; 73 79 } 80 */ 74 81 //if(Z=theElement->GetZ()-5) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this material"); 75 82 // Bug fix by TK on behalf of AH … … 84 91 delete [] active; 85 92 active = new G4bool[niso]; 93 86 94 delete [] theFinalStates; 87 95 theFinalStates = new G4NeutronHPFinalState * [niso]; -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPContAngularPar.cc
r819 r962 32 32 // (This fix has a real effect to the code.) 33 33 // 080409 Fix div0 error with G4FPE by T. Koi 34 // 080612 Fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #1 35 // 080714 Limiting the sum of energy of secondary particles by T. Koi 36 // 080801 Fix div0 error wiht G4FPE and memory leak by T. Koi 37 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 34 38 // 35 39 … … 46 50 #include "G4Alpha.hh" 47 51 #include "G4NeutronHPVector.hh" 48 #include "G4NucleiProperties Table.hh"52 #include "G4NucleiProperties.hh" 49 53 #include "G4NeutronHPKallbachMannSyst.hh" 50 54 #include "G4ParticleTable.hh" … … 67 71 G4ReactionProduct * 68 72 G4NeutronHPContAngularPar::Sample(G4double anEnergy, G4double massCode, G4double /*targetMass*/, 69 G4int angularRep, G4int /*interpolE*/)73 G4int angularRep, G4int interpolE ) 70 74 { 71 75 G4ReactionProduct * result = new G4ReactionProduct; … … 110 114 if(angularRep==1) 111 115 { 116 // 080612 Fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #1 117 if (interpolE == 2) 118 { 119 120 //TK080711 121 if ( fresh == true ) 122 { 123 remaining_energy = theAngular[0].GetLabel(); 124 fresh = false; 125 } 126 //TK080711 127 128 G4double random = G4UniformRand(); 129 G4double * running = new G4double[nEnergies+1]; 130 running[0]=0; 131 132 for(i=1; i<nEnergies+1; i++) 133 { 134 //TK080711 135 if ( remaining_energy >= theAngular[ i-1 ].GetLabel() ) 136 running[i] = running[i-1] + theAngular[i-1].GetValue(0); 137 else 138 running[i] = running[i-1]; 139 //TK080711 140 } 141 142 //080730 143 if ( running[ nEnergies ] != 0 ) 144 { 145 146 for ( i = 1 ; i < nEnergies+1 ; i++ ) 147 { 148 it = i-1; 149 if ( random > running[ i-1 ]/running[ nEnergies ] && random <= running[ i ] / running[ nEnergies ] ) break; 150 } 151 fsEnergy = theAngular[ it ].GetLabel(); 152 153 } 154 155 //TK080711 156 if ( i == nEnergies+1 || running[ nEnergies ] == 0 ) fsEnergy = remaining_energy; 157 //TK080711 //080730 158 159 G4NeutronHPLegendreStore theStore(1); 160 theStore.Init(0,fsEnergy,nAngularParameters); 161 for(i=0;i<nAngularParameters;i++) 162 { 163 theStore.SetCoeff(0,i,theAngular[it].GetValue(i)); 164 } 165 // use it to sample. 166 cosTh = theStore.SampleMax(fsEnergy); 167 168 //TK080711 169 remaining_energy -= fsEnergy; 170 //TK080711 171 172 //080801b 173 delete[] running; 174 //080801b 175 } 176 else 177 { 178 179 //080714 180 if ( fresh == true ) 181 { 182 remaining_energy = theAngular[ nEnergies-1 ].GetLabel(); 183 fresh = false; 184 } 185 //080714 186 187 112 188 G4double random = G4UniformRand(); 113 189 G4double * running = new G4double[nEnergies]; … … 116 192 for(i=1; i<nEnergies; i++) 117 193 { 194 /* 118 195 if(i!=0) 119 196 { … … 126 203 theAngular[i-1].GetLabel(), theAngular[i].GetLabel(), 127 204 theAngular[i-1].GetValue(0), theAngular[i].GetValue(0)); 205 */ 206 207 running[i]=running[i-1]; 208 if ( remaining_energy >= theAngular[i].GetLabel() ) 209 { 210 running[i] += theInt.GetBinIntegral(theManager.GetScheme(i-1), 211 theAngular[i-1].GetLabel(), theAngular[i].GetLabel(), 212 theAngular[i-1].GetValue(0), theAngular[i].GetValue(0)); 213 weighted += theInt.GetWeightedBinIntegral(theManager.GetScheme(i-1), 214 theAngular[i-1].GetLabel(), theAngular[i].GetLabel(), 215 theAngular[i-1].GetValue(0), theAngular[i].GetValue(0)); 216 } 128 217 } 129 218 // cash the mean energy in this distribution 130 219 //080409 TKDB 131 if ( nEnergies == 1 )220 if ( nEnergies == 1 || running[nEnergies-1] == 0 ) 132 221 currentMeanEnergy = 0.0; 133 222 else 223 { 134 224 currentMeanEnergy = weighted/running[nEnergies-1]; 225 } 135 226 136 227 //080409 TKDB 137 228 if ( nEnergies == 1 ) it = 0; 138 //for(i=1; i<nEnergies; i++) 139 for(i=1; i<nEnergies; i++) 140 { 141 it = i; 142 if(random<running[i]/running[nEnergies-1]) break; 143 } 229 230 //080729 231 if ( running[nEnergies-1] != 0 ) 232 { 233 for ( i = 1 ; i < nEnergies ; i++ ) 234 { 235 it = i; 236 if ( random < running [ i ] / running [ nEnergies-1 ] ) break; 237 } 238 } 239 240 //080714 241 if ( running [ nEnergies-1 ] == 0 ) it = 0; 242 //080714 243 144 244 if(it<nDiscreteEnergies||it==0) 145 245 { … … 201 301 } 202 302 delete [] running; 303 304 //080714 305 remaining_energy -= fsEnergy; 306 //080714 307 308 } 309 203 310 } 204 311 else if(angularRep==2) … … 271 378 G4double residualMass = residualZ*G4Proton::Proton()->GetPDGMass(); 272 379 residualMass +=(residualA-residualZ)*G4Neutron::Neutron()->GetPDGMass(); 273 residualMass -= G4NucleiProperties Table::GetBindingEnergy(residualZ, residualA);380 residualMass -= G4NucleiProperties::GetBindingEnergy( residualA , residualZ ); 274 381 G4NeutronHPKallbachMannSyst theKallbach(compoundFraction, 275 382 incidentEnergy, incidentMass, -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPContEnergyAngular.cc
r819 r962 28 28 // A prototype of the low energy neutron transport model. 29 29 // 30 // 080721 To be "ClearHistories" effective, the selection scheme of angular distribution is modified by T. Koi 31 // 32 // 30 33 #include "G4NeutronHPContEnergyAngular.hh" 31 34 … … 55 58 // This is the cause of the He3 problem !!!!!!!! 56 59 // See to it, if you can improve this. 57 G4double random = G4UniformRand(); 58 G4double deltaE = theAngular[it].GetEnergy()-theAngular[it-1].GetEnergy(); 59 G4double offset = theAngular[it].GetEnergy()-anEnergy; 60 if(random<offset/deltaE) it--; 60 //080714 TK commnet Randomizing use angular distribution 61 //080714 TK Always use the upper side distribution. enabling ClearHistories method. 62 //G4double random = G4UniformRand(); 63 //G4double deltaE = theAngular[it].GetEnergy()-theAngular[it-1].GetEnergy(); 64 //G4double offset = theAngular[it].GetEnergy()-anEnergy; 65 //if(random<offset/deltaE) it--; 61 66 theAngular[it].SetTarget(GetTarget()); 62 67 theAngular[it].SetTargetCode(theTargetCode); … … 84 89 return result; 85 90 } 91 92 93 94 void G4NeutronHPContEnergyAngular::ClearHistories() 95 { 96 if ( theAngular!= NULL ) 97 { 98 for ( G4int i = 0 ; i< nEnergy ; i++ ) 99 theAngular[i].ClearHistories(); 100 } 101 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPDeExGammas.cc
r819 r962 27 27 // J.P. Wellisch, Nov-1996 28 28 // A prototype of the low energy neutron transport model. 29 // 30 // 080801 Prohibit level transition to oneself by T. Koi 29 31 // 30 32 #include "G4NeutronHPDeExGammas.hh" … … 123 125 } 124 126 } 127 //080728 128 if ( it != -1 && currentLevelE == theLevels[it].GetLevelEnergy() ) 129 { 130 //TK Comment; Some data file in /Inelastic/Gammas has inconsistent level data (no level to transit) 131 //G4cout << "DeExGammas Transition level error: it " << it << " " << currentLevelE << " " << gammaE << " " << theLevels[it-1].GetLevelEnergy() << " " << currentLevelE - theLevels[it-1].GetLevelEnergy() << G4endl; 132 // Forced to connect the next(previous) level 133 it +=-1; 134 } 135 //080728 125 136 if(it!=-1) theGammas[i]->SetNext(&theLevels[it]); 126 137 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPDiscreteTwoBody.cc
r819 r962 28 28 // A prototype of the low energy neutron transport model. 29 29 // 30 //080612 Bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #2,3 31 //080709 Bug fix Sampling Legendre expansion by T. Koi 32 // 30 33 #include "G4NeutronHPDiscreteTwoBody.hh" 31 34 #include "G4Gamma.hh" … … 92 95 if(theCoeff[it].GetRepresentation()==0) 93 96 { 97 //TK Legendre expansion 94 98 G4NeutronHPLegendreStore theStore(1); 95 99 theStore.SetCoeff(0, theCoeff); 96 100 theStore.SetManager(theManager); 97 cosTh = theStore.SampleMax(anEnergy); 101 //cosTh = theStore.SampleMax(anEnergy); 102 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #3 103 cosTh = theStore.SampleDiscreteTwoBody(anEnergy); 98 104 } 99 105 else if(theCoeff[it].GetRepresentation()==12) // means LINLIN … … 136 142 if(theCoeff[it].GetRepresentation()==0) 137 143 { 144 //TK Legendre expansion 138 145 G4NeutronHPLegendreStore theStore(2); 139 146 theStore.SetCoeff(0, &(theCoeff[it-1])); … … 142 149 aManager.Init(theManager.GetScheme(it), 2); 143 150 theStore.SetManager(aManager); 144 cosTh = theStore.SampleMax(anEnergy); 151 //cosTh = theStore.SampleMax(anEnergy); 152 //080709 TKDB 153 cosTh = theStore.SampleDiscreteTwoBody(anEnergy); 145 154 } 146 155 else if(theCoeff[it].GetRepresentation()==12) // LINLIN … … 198 207 cosTh = theStore.Sample(); 199 208 } 200 else if(theCoeff[it].GetRepresentation()==14) 209 else if(theCoeff[it].GetRepresentation()==14) //TK LOG_LIN 201 210 { 202 211 G4NeutronHPVector theBuff1; … … 266 275 // now get the energy from kinematics and Q-value. 267 276 268 G4double restEnergy = anEnergy+GetQValue();277 //G4double restEnergy = anEnergy+GetQValue(); 269 278 270 279 // assumed to be in CMS @@@@@@@@@@@@@@@@@ 271 280 272 G4double residualMass = GetTarget()->GetMass() + GetNeutron()->GetMass() 273 - result->GetMass() - GetQValue(); 274 G4double kinE = restEnergy/(1+result->GetMass()/residualMass); // non relativistic @@ 281 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #2 282 //G4double residualMass = GetTarget()->GetMass() + GetNeutron()->GetMass() 283 // - result->GetMass() - GetQValue(); 284 //G4double kinE = restEnergy/(1+result->GetMass()/residualMass); // non relativistic @@ 285 G4double A1 = GetTarget()->GetMass()/GetNeutron()->GetMass(); 286 G4double A1prim = result->GetMass()/GetNeutron()->GetMass(); 287 G4double E1 = (A1+1)*(A1+1)/A1/A1*anEnergy; 288 G4double kinE = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*E1+(1+A1)*GetQValue()); 289 275 290 result->SetKineticEnergy(kinE); // non relativistic @@ 276 291 G4double phi = twopi*G4UniformRand(); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPElasticData.cc
r819 r962 31 31 // 070613 fix memory leaking by T. Koi 32 32 // 071002 enable cross section dump by T. Koi 33 // 080428 change checking point of "neglecting doppler broadening" flag 34 // from GetCrossSection to BuildPhysicsTable by T. Koi 35 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 36 // 34 37 #include "G4NeutronHPElasticData.hh" … … 49 52 // TKDB 50 53 theCrossSections = 0; 54 onFlightDB = true; 51 55 BuildPhysicsTable(*G4Neutron::Neutron()); 52 56 } … … 65 69 if(&aP!=G4Neutron::Neutron()) 66 70 throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!"); 71 72 //080428 73 if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) onFlightDB = false; 74 67 75 size_t numberOfElements = G4Element::GetNumberOfElements(); 68 76 // TKDB … … 131 139 132 140 #include "G4Nucleus.hh" 133 #include "G4NucleiProperties Table.hh"141 #include "G4NucleiProperties.hh" 134 142 #include "G4Neutron.hh" 135 143 #include "G4Electron.hh" … … 146 154 147 155 // T. K. 148 if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) 156 // if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) 157 //080428 158 if ( !onFlightDB ) 149 159 { 150 160 G4double factor = 1.0; … … 171 181 172 182 173 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))183 eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) ) 174 184 ) / G4Neutron::Neutron()->GetPDGMass(); 175 185 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPElasticFS.cc
r819 r962 30 30 // 25-08-06 New Final State type (refFlag==3 , Legendre (Low Energy) + Probability (High Energy) ) 31 31 // is added by T. KOI 32 // 080904 Add Protection for negative energy results in very low energy ( 1E-6 eV ) scattering by T. Koi 32 33 // 33 34 #include "G4NeutronHPElasticFS.hh" … … 304 305 G4double tM = theTarget.GetMass(); 305 306 theTarget.SetTotalEnergy(std::sqrt((tP+tM)*(tP+tM)-2.*tP*tM)); 307 308 /* 309 For debug purpose. 310 Same transformation G4ReactionProduct.Lorentz() by 4vectors 311 { 312 G4LorentzVector n4p = G4LorentzVector ( theNeutron.GetMomentum() , theNeutron.GetKineticEnergy() + theNeutron.GetMass() ); 313 G4cout << "before " << ( n4p.e() - n4p.m() ) / eV<< G4endl; 314 G4LorentzVector cm4p = G4LorentzVector ( theCMS.GetMomentum() , theCMS.GetKineticEnergy() + theCMS.GetMass() ); 315 n4p.boost( cm4p.boostVector() ); 316 G4cout << cm4p/eV << G4endl; 317 G4cout << "after " << ( n4p.e() - n4p.m() ) / eV<< G4endl; 318 } 319 */ 320 306 321 theNeutron.Lorentz(theNeutron, -1.*theCMS); 322 //080904 Add Protection for very low energy (1e-6eV) scattering 323 if ( theNeutron.GetKineticEnergy() < 0 ) 324 { 325 theNeutron.SetMomentum( G4ThreeVector(0) ); 326 theNeutron.SetTotalEnergy ( theNeutron.GetMass() ); 327 } 328 307 329 theTarget.Lorentz(theTarget, -1.*theCMS); 330 //080904 Add Protection for very low energy (1e-6eV) scattering 331 if ( theTarget.GetKineticEnergy() < 0 ) 332 { 333 theTarget.SetMomentum( G4ThreeVector(0) ); 334 theTarget.SetTotalEnergy ( theTarget.GetMass() ); 335 } 308 336 } 309 337 else -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPEnAngCorrelation.cc
r819 r962 134 134 return result; 135 135 } 136 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPFissionData.cc
r819 r962 30 30 // 070618 fix memory leaking by T. Koi 31 31 // 071002 enable cross section dump by T. Koi 32 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 // 081124 Protect invalid read which caused run time errors by T. Koi 32 34 33 35 #include "G4NeutronHPFissionData.hh" … … 110 112 G4cout << (*theElementTable)[i]->GetName() << G4endl; 111 113 114 if ( (*((*theCrossSections)(i))).GetVectorLength() == 0 ) 115 { 116 G4cout << "The cross-section data of the fission of this element is not available." << G4endl; 117 G4cout << G4endl; 118 continue; 119 } 120 112 121 G4int ie = 0; 113 122 … … 130 139 } 131 140 132 #include "G4NucleiProperties Table.hh"141 #include "G4NucleiProperties.hh" 133 142 134 143 G4double G4NeutronHPFissionData:: … … 152 161 G4double theZ = anE->GetZ(); 153 162 G4double eleMass; 154 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))163 eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps) , static_cast<G4int>(theZ+eps) ) 155 164 ) / G4Neutron::Neutron()->GetPDGMass(); 156 165 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelastic.cc
r819 r962 33 33 // and all its terms. 34 34 // 35 // $Id: G4NeutronHPInelastic.cc,v 1.2 3 2007/06/22 09:23:48 gcosmoExp $36 // GEANT4 tag $Name: $35 // $Id: G4NeutronHPInelastic.cc,v 1.24 2008/12/03 22:28:48 tkoi Exp $ 36 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 37 37 // 38 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi) 38 // 070523 bug fix for G4FPE_DEBUG on by A. Howard (and T. Koi) 39 // 081203 limit maximum trial for creating final states add protection for 1H isotope case by T. Koi 39 40 // 40 41 #include "G4NeutronHPInelastic.hh" … … 58 59 { 59 60 theInelastic[i].Init((*(G4Element::GetElementTable()))[i], dirName); 61 G4int itry = 0; 60 62 do 61 63 { … … 97 99 theInelastic[i].Register(&theDAFS, "F36"); 98 100 theInelastic[i].RestartRegistration(); 101 itry++; 99 102 } 100 while(!theInelastic[i].HasDataInAnyFinalState()); 103 //while(!theInelastic[i].HasDataInAnyFinalState()); 104 while( !theInelastic[i].HasDataInAnyFinalState() && itry < 6 ); 105 // 6 is corresponding to the value(5) of G4NeutronHPChannel. TK 106 if ( itry == 6 ) 107 { 108 // No Final State at all. 109 G4bool exceptional = false; 110 if ( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() == 1 ) 111 { 112 if ( (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() == 1 && (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() == 1 ) exceptional = true; //1H 113 } 114 if ( !exceptional ) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element"); 115 } 101 116 } 102 117 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticBaseFS.cc
r819 r962 28 28 // A prototype of the low energy neutron transport model. 29 29 // 30 // 080801 Give a warning message for irregular mass value in data file by T. Koi 31 // Introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi 32 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 // 30 34 #include "G4NeutronHPInelasticBaseFS.hh" 31 35 #include "G4Nucleus.hh" 32 #include "G4NucleiProperties Table.hh"36 #include "G4NucleiProperties.hh" 33 37 #include "G4He3.hh" 34 38 #include "G4Alpha.hh" 35 39 #include "G4Electron.hh" 36 40 #include "G4NeutronHPDataUsed.hh" 41 42 #include "G4ParticleTable.hh" 37 43 38 44 void G4NeutronHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR) … … 55 61 G4double eps = 0.001; 56 62 theNuclearMassDifference = 57 G4NucleiProperties Table::GetBindingEnergy(static_cast<G4int>(ZR+eps),static_cast<G4int>(AR+eps)) -58 G4NucleiProperties Table::GetBindingEnergy(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps));63 G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(AR+eps),static_cast<G4int>(ZR+eps)) - 64 G4NucleiProperties::GetBindingEnergy(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps)); 59 65 theGammas.Init(theGammaData); 60 66 // delete aName; … … 74 80 theBaseA = aFile.GetA(); 75 81 theBaseZ = aFile.GetZ(); 82 theNDLDataA = (int)aFile.GetA(); 83 theNDLDataZ = aFile.GetZ(); 76 84 if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001))) 77 85 { … … 170 178 G4double targetMass; 171 179 G4double eps = 0.0001; 172 targetMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /180 targetMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps))) / 173 181 G4Neutron::Neutron()->GetPDGMass(); 174 182 if(theEnergyAngData!=0) … … 176 184 if(theAngularDistribution!=0) 177 185 { targetMass = theAngularDistribution->GetTargetMass(); } 186 //080731a 187 if ( targetMass == 0 ) G4cout << "080731a It looks like something wrong value in G4NDL, please update the latest version. If you use the latest, then please report this problem to Geant4 Hyper news." << G4endl; 178 188 G4Nucleus aNucleus; 179 189 G4ReactionProduct theTarget; … … 255 265 } 256 266 G4ReactionProduct * aHadron; 257 G4double localMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps)));267 G4double localMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps))); 258 268 G4ThreeVector bufferedDirection(0,0,0); 259 269 for(i0=0; i0<nDef; i0++) … … 291 301 G4int z1 = static_cast<G4int>(theBaseZ+eps-theDefs[0]->GetPDGCharge()-theDefs[1]->GetPDGCharge()); 292 302 G4int a1 = static_cast<G4int>(theBaseA+eps)-theDefs[0]->GetBaryonNumber()-theDefs[1]->GetBaryonNumber(); 293 G4double concreteMass = G4NucleiProperties Table::GetNuclearMass(z1, a1);303 G4double concreteMass = G4NucleiProperties::GetNuclearMass(a1, z1); 294 304 G4double availableEnergy = eKinetic+mn+localMass-m1-m2-concreteMass; 295 305 // available kinetic energy in CMS (non relativistic) … … 357 367 G4double eBindN = 0; 358 368 G4double eBindP = 0; 359 G4double eBindD = G4NucleiProperties Table::GetBindingEnergy(1,2);360 G4double eBindT = G4NucleiProperties Table::GetBindingEnergy(1,3);361 G4double eBindHe3 = G4NucleiProperties Table::GetBindingEnergy(2,3);362 G4double eBindA = G4NucleiProperties Table::GetBindingEnergy(2,4);369 G4double eBindD = G4NucleiProperties::GetBindingEnergy(2,1); 370 G4double eBindT = G4NucleiProperties::GetBindingEnergy(3,1); 371 G4double eBindHe3 = G4NucleiProperties::GetBindingEnergy(3,2); 372 G4double eBindA = G4NucleiProperties::GetBindingEnergy(4,2); 363 373 for(i=0; i<tmpHadrons->size(); i++) 364 374 { … … 455 465 delete tmpHadrons; 456 466 467 //080721 468 G4ParticleDefinition* targ_pd = G4ParticleTable::GetParticleTable()->GetIon ( (G4int)theBaseZ , (G4int)theBaseA , 0.0 ); 469 G4LorentzVector targ_4p_lab ( theTarget.GetMomentum() , std::sqrt( targ_pd->GetPDGMass()*targ_pd->GetPDGMass() + theTarget.GetMomentum().mag2() ) ); 470 G4LorentzVector proj_4p_lab = theTrack.Get4Momentum(); 471 G4LorentzVector init_4p_lab = proj_4p_lab + targ_4p_lab; 472 adjust_final_state ( init_4p_lab ); 473 457 474 // clean up the primary neutron 458 475 theResult.SetStatusChange(stopAndKill); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc
r819 r962 30 30 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi) 31 31 // 070606 bug fix and migrate to enable to Partial cases by T. Koi 32 // 080603 bug fix for Hadron Hyper News #932 by T. Koi 33 // 080612 bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4,6 34 // 080717 bug fix of calculation of residual momentum by T. Koi 35 // 080801 protect negative avalable energy by T. Koi 36 // introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi 37 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 32 38 // 33 39 #include "G4NeutronHPInelasticCompFS.hh" 34 40 #include "G4Nucleus.hh" 35 #include "G4NucleiProperties Table.hh"41 #include "G4NucleiProperties.hh" 36 42 #include "G4He3.hh" 37 43 #include "G4Alpha.hh" … … 74 80 theBaseA = aFile.GetA(); 75 81 theBaseZ = aFile.GetZ(); 82 theNDLDataA = (int)aFile.GetA(); 83 theNDLDataZ = aFile.GetZ(); 76 84 if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001))) 77 85 { … … 185 193 } 186 194 195 196 //n,p,d,t,he3,a 187 197 void G4NeutronHPInelasticCompFS::CompositeApply(const G4HadProjectile & theTrack, G4ParticleDefinition * aDefinition) 188 198 { 189 199 190 //G4cout << "G4NeutronHPInelasticCompFS::CompositeApply " << G4endl;191 200 // prepare neutron 192 201 theResult.Clear(); … … 201 210 for(i=0; i<50; i++) 202 211 { if(theXsection[i] != 0) { break; } } 212 203 213 G4double targetMass=0; 204 214 G4double eps = 0.0001; 205 targetMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /215 targetMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theBaseA+eps), static_cast<G4int>(theBaseZ+eps))) / 206 216 G4Neutron::Neutron()->GetPDGMass(); 207 217 // if(theEnergyAngData[i]!=0) … … 220 230 G4double residualZ = theBaseZ - aDefinition->GetPDGCharge(); 221 231 G4double residualA = theBaseA - aDefinition->GetBaryonNumber()+1; 222 residualMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(residualZ+eps), static_cast<G4int>(residualA+eps)) ) /232 residualMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(residualA+eps), static_cast<G4int>(residualZ+eps)) ) / 223 233 G4Neutron::Neutron()->GetPDGMass(); 224 234 … … 230 240 231 241 // select exit channel for composite FS class. 232 G4int it = SelectExitChannel( eKinetic);242 G4int it = SelectExitChannel( eKinetic ); 233 243 234 244 // set target and neutron in the relevant exit channel … … 241 251 G4double availableEnergy = theNeutron.GetKineticEnergy() + theNeutron.GetMass() - aHadron.GetMass() + 242 252 (targetMass - residualMass)*G4Neutron::Neutron()->GetPDGMass(); 253 //080730c 254 if ( availableEnergy < 0 ) 255 { 256 //G4cout << "080730c Adjust availavleEnergy " << G4endl; 257 availableEnergy = 0; 258 } 243 259 G4int nothingWasKnownOnHadron = 0; 244 260 G4int dummy; 245 261 G4double eGamm = 0; 246 262 G4int iLevel=it-1; 247 // TK debug 070530 (without photon has it = 0) 248 //if(50==it) 249 if( 0 == it ) 250 { 263 264 // TK without photon has it = 0 265 if( 50 == it ) 266 { 267 268 // TK Excitation level is not determined 251 269 iLevel=-1; 252 270 aHadron.SetKineticEnergy(availableEnergy*residualMass*G4Neutron::Neutron()->GetPDGMass()/ 253 271 (aHadron.GetMass()+residualMass*G4Neutron::Neutron()->GetPDGMass())); 254 272 255 //aHadron.SetMomentum(theNeutron.GetMomentum()*(1./theNeutron.GetTotalMomentum())* 256 // std::sqrt(aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()- 257 // aHadron.GetMass()*aHadron.GetMass())); 258 273 aHadron.SetMomentum(theNeutron.GetMomentum()*(1./theNeutron.GetTotalMomentum())* 274 std::sqrt(aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()- 275 aHadron.GetMass()*aHadron.GetMass())); 276 277 /* 259 278 G4double p2 = ( aHadron.GetTotalEnergy()*aHadron.GetTotalEnergy()-aHadron.GetMass()*aHadron.GetMass() ); 260 279 G4double p = 0.0; … … 264 283 } 265 284 aHadron.SetMomentum(theNeutron.GetMomentum()*(1./theNeutron.GetTotalMomentum())*p ); 285 */ 266 286 267 287 } … … 270 290 while( iLevel!=-1 && theGammas.GetLevel(iLevel)==0 ) { iLevel--; } 271 291 } 272 if(theAngularDistribution[it]!= 0) 273 { 274 if(theEnergyDistribution[it]!=0) 292 293 294 if ( theAngularDistribution[it] != 0 ) // MF4 295 { 296 if(theEnergyDistribution[it]!=0) // MF5 275 297 { 276 298 aHadron.SetKineticEnergy(theEnergyDistribution[it]->Sample(eKinetic, dummy)); … … 304 326 } 305 327 theAngularDistribution[it]->SampleAndUpdate(aHadron); 306 if(theFinalStatePhotons[it] == 0) 328 329 if( theFinalStatePhotons[it] == 0 ) 307 330 { 308 331 // TK comment Most n,n* eneter to this … … 324 347 } 325 348 } 326 else if(theEnergyAngData[it] != 0) 349 else if(theEnergyAngData[it] != 0) // MF6 327 350 { 328 351 theParticles = theEnergyAngData[it]->Sample(eKinetic); … … 333 356 nothingWasKnownOnHadron = 1; 334 357 } 358 335 359 //G4cout << "theFinalStatePhotons it " << it << G4endl; 336 360 //G4cout << "theFinalStatePhotons[it] " << theFinalStatePhotons[it] << G4endl; 337 // TK 070530338 if ( it != 0 ) it = 50; // it 50 has final state data for photon MF13 cross and MF14 ang339 361 //G4cout << "theFinalStatePhotons it " << it << G4endl; 340 362 //G4cout << "theFinalStatePhotons[it] " << theFinalStatePhotons[it] << G4endl; 341 363 //G4cout << "thePhotons " << thePhotons << G4endl; 342 if(theFinalStatePhotons[it]!=0) 343 { 344 // the photon distributions are in the Nucleus rest frame. 364 365 if ( theFinalStatePhotons[it] != 0 ) 366 { 367 // the photon distributions are in the Nucleus rest frame. 368 // TK residual rest frame 345 369 G4ReactionProduct boosted; 346 370 boosted.Lorentz(theNeutron, theTarget); … … 493 517 ->GetIon(static_cast<G4int>(residualZ), static_cast<G4int>(residualA), 0)); 494 518 theResidual.SetKineticEnergy(aHadron.GetKineticEnergy()*aHadron.GetMass()/theResidual.GetMass()); 495 theResidual.SetMomentum(-1.*aHadron.GetMomentum()); 519 520 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #6 521 //theResidual.SetMomentum(-1.*aHadron.GetMomentum()); 522 G4ThreeVector incidentNeutronMomentum = theNeutron.GetMomentum(); 523 theResidual.SetMomentum(incidentNeutronMomentum - aHadron.GetMomentum()); 524 496 525 theResidual.Lorentz(theResidual, -1.*theTarget); 497 526 G4ThreeVector totalPhotonMomentum(0,0,0); … … 529 558 // cout << "Kinetic energy of the residual = "<<resiualKineticEnergy<<endl; 530 559 theResidual.SetKineticEnergy(resiualKineticEnergy); 531 theResidual.SetMomentum(-1.*totalMomentum); 560 561 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4 562 //theResidual.SetMomentum(-1.*totalMomentum); 563 //G4ThreeVector incidentNeutronMomentum = theNeutron.GetMomentum(); 564 //theResidual.SetMomentum(incidentNeutronMomentum - aHadron.GetMomentum()); 565 //080717 TK Comment still do NOT include photon's mometum which produce by thePhotons 566 theResidual.SetMomentum( theNeutron.GetMomentum() + theTarget.GetMomentum() - totalMomentum ); 567 532 568 theSec = new G4DynamicParticle; 533 569 theSec->SetDefinition(theResidual.GetDefinition()); … … 549 585 delete thePhotons; 550 586 } 587 588 //080721 589 G4ParticleDefinition* targ_pd = G4ParticleTable::GetParticleTable()->GetIon ( (G4int)theBaseZ , (G4int)theBaseA , 0.0 ); 590 G4LorentzVector targ_4p_lab ( theTarget.GetMomentum() , std::sqrt( targ_pd->GetPDGMass()*targ_pd->GetPDGMass() + theTarget.GetMomentum().mag2() ) ); 591 G4LorentzVector proj_4p_lab = theTrack.Get4Momentum(); 592 G4LorentzVector init_4p_lab = proj_4p_lab + targ_4p_lab; 593 adjust_final_state ( init_4p_lab ); 594 551 595 // clean up the primary neutron 552 596 theResult.SetStatusChange(stopAndKill); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticData.cc
r819 r962 31 31 // 070613 fix memory leaking by T. Koi 32 32 // 071002 enable cross section dump by T. Koi 33 // 080428 change checking point of "neglecting doppler broadening" flag 34 // from GetCrossSection to BuildPhysicsTable by T. Koi 35 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 33 36 // 34 37 #include "G4NeutronHPInelasticData.hh" … … 48 51 { 49 52 // TKDB 53 onFlightDB = true; 50 54 theCrossSections = 0; 51 55 BuildPhysicsTable(*G4Neutron::Neutron()); … … 64 68 if(&aP!=G4Neutron::Neutron()) 65 69 throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!"); 70 71 //080428 72 if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) onFlightDB = false; 73 66 74 size_t numberOfElements = G4Element::GetNumberOfElements(); 67 75 // theCrossSections = new G4PhysicsTable( numberOfElements ); … … 130 138 } 131 139 132 #include "G4NucleiProperties Table.hh"140 #include "G4NucleiProperties.hh" 133 141 134 142 G4double G4NeutronHPInelasticData:: … … 143 151 144 152 // T. K. 145 if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) 153 //if ( getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ) 154 //080428 155 if ( !onFlightDB ) 146 156 { 147 157 G4double factor = 1.0; … … 166 176 G4double theZ = anE->GetZ(); 167 177 G4double eleMass; 168 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))178 eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps)) 169 179 ) / G4Neutron::Neutron()->GetPDGMass(); 170 180 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPIsoData.cc
r819 r962 28 28 // A prototype of the low energy neutron transport model. 29 29 // 30 //080901 Avoiding troubles which caused by G4PhysicsVecotor of length 0 by T. Koi 31 // 30 32 #include "G4NeutronHPIsoData.hh" 31 33 #include "G4NeutronHPDataUsed.hh" … … 45 47 { 46 48 if(getenv("NeutronHPNamesLogging")) G4cout << "Skipped = "<< filename <<" "<<A<<" "<<Z<<G4endl; 47 theChannel.close(); 48 return false; 49 //080901 TKDB No more necessary below protection, cross sections set to 0 in G4NeutronHPNames 50 //And below two lines causes trouble with G4PhysicsVector 51 //theChannel.close(); 52 //return false; 49 53 } 50 54 if(!theChannel) {theChannel.close(); return false;} -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPKallbachMannSyst.cc
r819 r962 27 27 // J.P. Wellisch, Nov-1996 28 28 // A prototype of the low energy neutron transport model. 29 // 30 // 080801 Protect div0 error, when theCompundFraction is 1 by T. Koi 29 31 // 30 32 #include "G4NeutronHPKallbachMannSyst.hh" … … 69 71 { 70 72 G4double result; 73 if ( theCompoundFraction == 1 ) 74 { 75 //G4cout << "080730b Adjust theCompoundFraction " << G4endl; 76 theCompoundFraction *= (1-1.0e-15); 77 } 71 78 result = 0.5 * (1./A(anEnergy)) * std::log((1-theCompoundFraction)/(1+theCompoundFraction)); 72 79 return result; -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPLabAngularEnergy.cc
r819 r962 28 28 // A prototype of the low energy neutron transport model. 29 29 // 30 // 080808 Bug fix in serching mu bin and index for theBuff2b by T. Koi 31 // 30 32 #include "G4NeutronHPLabAngularEnergy.hh" 31 33 #include "G4Gamma.hh" … … 111 113 { 112 114 it = i; 113 if(anEnergy<theEnergies[i]) break; 114 } 115 if(it==0 || it == nEnergies-1) // it marks the energy bin 116 { 115 if ( anEnergy < theEnergies[i] ) break; 116 } 117 //080808 118 //if ( it == 0 || it == nEnergies-1 ) // it marks the energy bin 119 if ( it == 0 ) // it marks the energy bin 120 { 121 if(it==0) G4cout << "080808 Something unexpected is happen in G4NeutronHPLabAngularEnergy " << G4endl; 117 122 // integrate the prob for each costh, and select theta. 118 123 G4double * running = new G4double [nCosTh[it]]; … … 130 135 if(random<running[i]) break; 131 136 } 132 if(ith==0 || ith==nCosTh[it]-1) 133 { 134 cosTh = theData[it][ith].GetLabel(); 135 secEnergy = theData[it][ith].Sample(); 136 currentMeanEnergy = theData[it][ith].GetMeanX(); 137 //080807 138 //if ( ith == 0 || ith == nCosTh[it]-1 ) //ith marks the angluar bin 139 if ( ith == 0 ) //ith marks the angluar bin 140 { 141 cosTh = theData[it][ith].GetLabel(); 142 secEnergy = theData[it][ith].Sample(); 143 currentMeanEnergy = theData[it][ith].GetMeanX(); 137 144 } 138 145 else 139 146 { 140 G4double x1 = theData[it][ith-1].GetIntegral(); 141 G4double x2 = theData[it][ith].GetIntegral(); 147 //080808 148 //G4double x1 = theData[it][ith-1].GetIntegral(); 149 //G4double x2 = theData[it][ith].GetIntegral(); 150 G4double x1 = running [ ith-1 ]; 151 G4double x2 = running [ ith ]; 142 152 G4double x = random; 143 153 G4double y1 = theData[it][ith-1].GetLabel(); … … 157 167 y1 = theData[it][ith-1].GetY(i); 158 168 y2 = theData[it][ith].GetY(mu); 169 159 170 y = theInt.Interpolate(theSecondManager[it].GetScheme(ith), 160 171 cosTh, x1,x2,y1,y2); … … 298 309 G4NeutronHPVector theBuff2b; 299 310 theBuff2b.SetInterpolationManager(theData[it][i2].GetInterpolationManager()); 300 for(i=0;i<theData[it][i1].GetVectorLength(); i++) 301 { 302 E = theData[it][i1].GetX(i); 303 y1 = theData[it][i1-1].GetY(E); 304 y2 = theData[it][i1].GetY(i); 311 //080808 i1 -> i2 312 //for(i=0;i<theData[it][i1].GetVectorLength(); i++) 313 for(i=0;i<theData[it][i2].GetVectorLength(); i++) 314 { 315 //E = theData[it][i1].GetX(i); 316 //y1 = theData[it][i1-1].GetY(E); 317 //y2 = theData[it][i1].GetY(i); 318 E = theData[it][i2].GetX(i); 319 y1 = theData[it][i2-1].GetY(E); 320 y2 = theData[it][i2].GetY(i); 305 321 y = theInt.Lin(x, x1,x2,y1,y2); 306 322 theBuff2b.SetData(i, E, y); // wrong E, right theta. … … 339 355 currentMeanEnergy = theOne.GetMeanX(); 340 356 } 341 357 342 358 // now do random direction in phi, and fill the result. 343 359 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPLegendreStore.cc
r819 r962 28 28 // A prototype of the low energy neutron transport model. 29 29 // 30 // 080612 SampleDiscreteTwoBody contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #3 31 // 30 32 #include "G4NeutronHPLegendreStore.hh" 31 33 #include "G4NeutronHPVector.hh" … … 34 36 #include "Randomize.hh" 35 37 #include <iostream> 38 39 40 41 //080612TK contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #3 42 G4double G4NeutronHPLegendreStore::SampleDiscreteTwoBody (G4double anEnergy) 43 { 44 G4double result; 45 46 G4int i0; 47 G4int low(0), high(0); 48 G4NeutronHPFastLegendre theLeg; 49 for (i0=0; i0<nEnergy; i0++) 50 { 51 high = i0; 52 if(theCoeff[i0].GetEnergy()>anEnergy) break; 53 } 54 low = std::max(0, high-1); 55 G4NeutronHPInterpolator theInt; 56 G4double x, x1, x2; 57 x = anEnergy; 58 x1 = theCoeff[low].GetEnergy(); 59 x2 = theCoeff[high].GetEnergy(); 60 G4double theNorm = 0; 61 G4double try01=0, try02=0; 62 G4double max1, max2, costh; 63 max1 = 0; max2 = 0; 64 G4int l,m; 65 for(i0=0; i0<601; i0++) 66 { 67 costh = G4double(i0-300)/300.; 68 try01 = 0.5; 69 for(m=0; m<theCoeff[low].GetNumberOfPoly() ; m++) 70 { 71 l=m+1; 72 try01 += (2.*l+1)/2.*theCoeff[low].GetCoeff(m)*theLeg.Evaluate(l, costh); 73 } 74 if(try01>max1) max1=try01; 75 try02 = 0.5; 76 for(m=0; m<theCoeff[high].GetNumberOfPoly() ; m++) 77 { 78 l=m+1; 79 try02 += (2.*l+1)/2.*theCoeff[high].GetCoeff(m)*theLeg.Evaluate(l, costh); 80 } 81 if(try02>max2) max2=try02; 82 } 83 theNorm = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, max1, max2); 84 85 G4double value, random; 86 G4double v1, v2; 87 do 88 { 89 v1 = 0.5; 90 v2 = 0.5; 91 result = 2.*G4UniformRand()-1.; 92 for(m=0; m<theCoeff[low].GetNumberOfPoly() ; m++) 93 { 94 l=m+1; 95 G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN 96 v1 += (2.*l+1)/2.*theCoeff[low].GetCoeff(m)*legend; 97 } 98 for(m=0; m<theCoeff[high].GetNumberOfPoly() ; m++) 99 { 100 l=m+1; 101 G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN 102 v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(m)*legend; 103 } 104 // v1 = std::max(0.,v1); // Workaround in case one of the distributions is fully non-physical. 105 // v2 = std::max(0.,v2); 106 value = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, v1, v2); 107 random = G4UniformRand(); 108 if(0>=theNorm) break; // Workaround for negative cross-section values. @@@@ 31 May 2000 109 } 110 while(random>value/theNorm); 111 112 return result; 113 } 114 115 36 116 37 117 G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy) -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPNBodyPhaseSpace.cc
r819 r962 26 26 // 27 27 // $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.13 2006/06/29 20:53:11 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #include "G4NeutronHPNBodyPhaseSpace.hh" -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPNames.cc
r819 r962 34 34 // Natural Abundance data are allowed. by T. Koi 35 35 // 07-07-06 Allow _nat_ final state even for isotoped cross sections by T. Koi 36 // 08-09-01 Add protection that deuteron data do not selected for hydrogen and so on by T. Koi 36 37 // 37 38 #include "G4NeutronHPNames.hh" … … 319 320 else 320 321 { 321 G4cout << "NeutronHP: " << reac << " file for Z = " << Z << ", A = " << A << " is not found and NeutronHP will use " << result.GetName() << G4endl; 322 //080901 Add protection that deuteron data do not selected for hydrogen and so on by T. Koi 323 if ( (reac.find("Inelastic") != reac.size() && 324 ((Z == 1 && A == 1) || (Z == 2 && A == 4) ) ) 325 || 326 (reac.find("Capture") != reac.size() && (Z == 2 && A == 4) ) ) 327 { 328 G4String new_name = base+"/"+rest+"0_0_Zero"; 329 result.SetName( new_name ); 330 } 331 else 332 { 333 G4cout << "NeutronHP: " << reac << " file for Z = " << Z << ", A = " << A << " is not found and NeutronHP will use " << result.GetName() << G4endl; 334 } 322 335 } 323 336 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPPhotonDist.cc
r819 r962 33 33 // 070606 Add Partial case by T. Koi 34 34 // 070618 fix memory leaking by T. Koi 35 // 080801 fix memory leaking by T. Koi 36 // 080801 Correcting data disorder which happened when both InitPartial 37 // and InitAnglurar methods was called in a same instance by T. Koi 35 38 // 36 39 // there is a lot of unused (and undebugged) code in this file. Kept for the moment just in case. @@ … … 109 112 void G4NeutronHPPhotonDist::InitAngular(std::ifstream & aDataFile) 110 113 { 114 111 115 G4int i, ii; 112 116 //angular distributions … … 115 119 { 116 120 aDataFile >> tabulationType >> nDiscrete2 >> nIso; 117 theShells = new G4double[nDiscrete2]; 118 theGammas = new G4double[nDiscrete2]; 121 //080731 122 if ( theGammas != NULL && nDiscrete2 != nDiscrete ) G4cout << "080731c G4NeutronHPPhotonDist nDiscrete2 != nDiscrete, It looks like something wrong in your NDL files. Please update the latest. If you still have this messages after the update, then please report to Geant4 Hyper News." << G4endl; 123 124 // The order of cross section (InitPartials) and distribution (InitAngular here) data are different, we have to re-coordinate consistent data order. 125 std::vector < G4double > vct_gammas_par; 126 std::vector < G4double > vct_shells_par; 127 std::vector < G4int > vct_primary_par; 128 std::vector < G4int > vct_distype_par; 129 std::vector < G4NeutronHPVector* > vct_pXS_par; 130 if ( theGammas != NULL ) 131 { 132 //copy the cross section data 133 for ( i = 0 ; i < nDiscrete ; i++ ) 134 { 135 vct_gammas_par.push_back( theGammas[ i ] ); 136 vct_shells_par.push_back( theShells[ i ] ); 137 vct_primary_par.push_back( isPrimary[ i ] ); 138 vct_distype_par.push_back( disType[ i ] ); 139 G4NeutronHPVector* hpv = new G4NeutronHPVector; 140 *hpv = thePartialXsec[ i ]; 141 vct_pXS_par.push_back( hpv ); 142 } 143 } 144 if ( theGammas == NULL ) theGammas = new G4double[nDiscrete2]; 145 if ( theShells == NULL ) theShells = new G4double[nDiscrete2]; 146 //080731 147 119 148 for (i=0; i< nIso; i++) // isotropic photons 120 149 { 121 122 123 150 aDataFile >> theGammas[i] >> theShells[i]; 151 theGammas[i]*=eV; 152 theShells[i]*=eV; 124 153 } 125 154 nNeu = new G4int [nDiscrete2-nIso]; … … 157 186 } 158 187 } 188 //080731 189 if ( vct_gammas_par.size() > 0 ) 190 { 191 //Reordering cross section data to corrsponding distribution data 192 for ( i = 0 ; i < nDiscrete ; i++ ) 193 { 194 for ( G4int j = 0 ; j < nDiscrete ; j++ ) 195 { 196 // Checking gamma and shell to identification 197 if ( theGammas[ i ] == vct_gammas_par [ j ] && theShells [ i ] == vct_shells_par[ j ] ) 198 { 199 isPrimary [ i ] = vct_primary_par [ j ]; 200 disType [ i ] = vct_distype_par [ j ]; 201 thePartialXsec[ i ] = ( *( vct_pXS_par[ j ] ) ); 202 } 203 } 204 } 205 //Garbage collection 206 for ( std::vector < G4NeutronHPVector* >::iterator 207 it = vct_pXS_par.begin() ; it != vct_pXS_par.end() ; it++ ) 208 { 209 delete *it; 210 } 211 } 212 //080731 159 213 } 160 214 } … … 188 242 void G4NeutronHPPhotonDist::InitPartials(std::ifstream & aDataFile) 189 243 { 244 190 245 //G4cout << "G4NeutronHPPhotonDist::InitPartials " << G4endl; 191 246 aDataFile >> nDiscrete >> targetMass; -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPProduct.cc
r819 r962 27 27 // J.P. Wellisch, Nov-1996 28 28 // A prototype of the low energy neutron transport model. 29 // 30 // 080718 As for secondary photons, if its mean value has a value of integer, 31 // then a sampling of multiplicity that based on Poisson Distribution 32 // is not carried out and the mean is used as a multiplicity. 33 // modified by T. Koi. 34 // 080721 Using ClearHistories() methodl for limiting the sum of secondary energies 35 // modified by T. Koi. 36 // 080901 bug fix of too many secnodaries production in nd reactinos by T. Koi 37 // 29 38 #include "G4NeutronHPProduct.hh" 30 39 #include "G4Poisson.hh" … … 38 47 G4int multi; 39 48 multi = G4int(mean+0.0001); 40 if(theMassCode==0) multi = G4Poisson(mean); // @@@@gammas. please X-check this 49 //if(theMassCode==0) multi = G4Poisson(mean); // @@@@gammas. please X-check this 50 //080718 51 if ( theMassCode == 0 ) 52 { 53 if ( G4int ( mean ) == mean ) 54 { 55 multi = (G4int) mean; 56 } 57 else 58 { 59 multi = G4Poisson ( mean ); 60 } 61 } 41 62 theDist->SetTarget(theTarget); 42 63 theDist->SetNeutron(theNeutron); … … 46 67 theCurrentMultiplicity = static_cast<G4int>(mean); 47 68 G4ReactionProduct * tmp; 69 theDist->ClearHistories(); 48 70 for(i=0;i<multi;i++) 49 71 { … … 56 78 delete tmp; 57 79 } 80 /* 81 //080901 TK Comment out, too many secondaries are produced in deuteron reactions 58 82 if(theTarget->GetMass()<2*GeV) // @@@ take care of residuals in all cases 59 83 { … … 62 86 if(tmp != 0) { result->push_back(tmp); } 63 87 } 88 */ 64 89 return result; 65 90 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPThermalScattering.cc
r819 r962 39 39 40 40 // 070625 Fix memory leaking at destructor by T. Koi 41 // 081201 Fix memory leaking at destructor by T. Koi 41 42 42 43 #include "G4NeutronHPThermalScattering.hh" … … 103 104 { 104 105 105 { // separate name scope of it 106 std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* >::iterator it; 107 for ( it = incoherentFSs.begin() ; it != incoherentFSs.end() ; it++ ) 106 for ( std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* >::iterator it = incoherentFSs.begin() ; it != incoherentFSs.end() ; it++ ) 108 107 { 109 108 std::map < G4double , std::vector < E_isoAng* >* >::iterator itt; … … 119 118 delete it->second; 120 119 } 121 } 122 123 { 124 std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >::iterator it; 125 for ( it = coherentFSs.begin() ; it != coherentFSs.end() ; it++ ) 120 121 for ( std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >::iterator it = coherentFSs.begin() ; it != coherentFSs.end() ; it++ ) 126 122 { 127 123 std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >::iterator itt; … … 137 133 delete it->second; 138 134 } 139 } 140 141 { 142 std::map < G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* >::iterator it; 143 for ( it = inelasticFSs.begin() ; it != inelasticFSs.end() ; it++ ) 135 136 for ( std::map < G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* >::iterator it = inelasticFSs.begin() ; it != inelasticFSs.end() ; it++ ) 144 137 { 145 138 std::map < G4double , std::vector < E_P_E_isoAng* >* >::iterator itt; … … 160 153 delete it->second; 161 154 } 162 } 163 155 156 delete theHPElastic; 164 157 delete theXSection; 165 158 } -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPVector.cc
r819 r962 29 29 // 30 30 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi) 31 // 080808 bug fix in Sample() and GetXsec() by T. Koi 31 32 // 32 33 #include "G4NeutronHPVector.hh" … … 170 171 //if( (theData[high].GetX()-theData[low].GetX())/theData[high].GetX() < 0.000001) 171 172 if ( theData[high].GetX() !=0 172 &&( theData[high].GetX()-theData[low].GetX())/theData[high].GetX() < 0.000001) 173 //080808 TKDB 174 //&&( theData[high].GetX()-theData[low].GetX())/theData[high].GetX() < 0.000001) 175 &&( std::abs( (theData[high].GetX()-theData[low].GetX())/theData[high].GetX() ) < 0.000001 ) ) 173 176 { 174 177 y = theData[low].GetY(); … … 366 369 do 367 370 { 371 //080808 372 /* 373 G4double rand; 368 374 G4double value, test, baseline; 369 375 baseline = theData[GetVectorLength()-1].GetX()-theData[0].GetX(); 370 G4double rand;371 376 do 372 377 { … … 379 384 while( test < rand && test > 0 ); 380 385 result = value; 386 */ 387 G4double rand; 388 G4double value, test; 389 do 390 { 391 rand = G4UniformRand(); 392 G4int ibin = -1; 393 for ( G4int i = 0 ; i < GetVectorLength() ; i++ ) 394 { 395 if ( rand < theIntegral[i] ) 396 { 397 ibin = i; 398 break; 399 } 400 } 401 if ( ibin < 0 ) G4cout << "TKDB 080807 " << rand << G4endl; 402 // result 403 rand = G4UniformRand(); 404 G4double x1, x2; 405 if ( ibin == 0 ) 406 { 407 x1 = theData[ ibin ].GetX(); 408 value = x1; 409 break; 410 } 411 else 412 { 413 x1 = theData[ ibin-1 ].GetX(); 414 } 415 416 x2 = theData[ ibin ].GetX(); 417 value = rand * ( x2 - x1 ) + x1; 418 test = GetY ( value ) / std::max ( GetY( ibin-1 ) , GetY ( ibin ) ); 419 } 420 while ( G4UniformRand() > test ); 421 result = value; 422 //080807 381 423 } 382 424 while(IsBlocked(result)); -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLCaptureData.cc
r819 r962 29 29 // If NeutronHP data do not available for an element, then Low Energy 30 30 // Parameterization models handle the interactions of the element. 31 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 31 32 // 32 33 … … 89 90 90 91 #include "G4Nucleus.hh" 91 #include "G4NucleiProperties Table.hh"92 #include "G4NucleiProperties.hh" 92 93 #include "G4Neutron.hh" 93 94 #include "G4Electron.hh" … … 114 115 G4double theZ = anE->GetZ(); 115 116 G4double eleMass; 116 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))117 eleMass = ( G4NucleiProperties::GetNuclearMass( static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps)) 117 118 ) / G4Neutron::Neutron()->GetPDGMass(); 118 119 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLEInelasticData.cc
r819 r962 29 29 // If NeutronHP data do not available for an element, then Low Energy 30 30 // Parameterization models handle the interactions of the element. 31 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 31 32 // 32 33 … … 133 134 134 135 #include "G4Nucleus.hh" 135 #include "G4NucleiProperties Table.hh"136 #include "G4NucleiProperties.hh" 136 137 #include "G4Neutron.hh" 137 138 #include "G4Electron.hh" … … 158 159 G4double theZ = anE->GetZ(); 159 160 G4double eleMass; 160 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))161 eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps)) 161 162 ) / G4Neutron::Neutron()->GetPDGMass(); 162 163 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLElasticData.cc
r819 r962 29 29 // If NeutronHP data do not available for an element, then Low Energy 30 30 // Parameterization models handle the interactions of the element. 31 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 31 32 // 32 33 … … 89 90 90 91 #include "G4Nucleus.hh" 91 #include "G4NucleiProperties Table.hh"92 #include "G4NucleiProperties.hh" 92 93 #include "G4Neutron.hh" 93 94 #include "G4Electron.hh" … … 114 115 G4double theZ = anE->GetZ(); 115 116 G4double eleMass; 116 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))117 eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps)) 117 118 ) / G4Neutron::Neutron()->GetPDGMass(); 118 119 -
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPorLFissionData.cc
r819 r962 29 29 // If NeutronHP data do not available for an element, then Low Energy 30 30 // Parameterization models handle the interactions of the element. 31 // 081024 G4NucleiPropertiesTable:: to G4NucleiProperties:: 31 32 // 32 33 … … 89 90 90 91 #include "G4Nucleus.hh" 91 #include "G4NucleiProperties Table.hh"92 #include "G4NucleiProperties.hh" 92 93 #include "G4Neutron.hh" 93 94 #include "G4Electron.hh" … … 114 115 G4double theZ = anE->GetZ(); 115 116 G4double eleMass; 116 eleMass = ( G4NucleiProperties Table::GetNuclearMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))117 eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps)) 117 118 ) / G4Neutron::Neutron()->GetPDGMass(); 118 119
Note: See TracChangeset
for help on using the changeset viewer.