Changeset 1340 for trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundNucleon.cc,v 1.13 2009/02/11 18:06:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundNucleon.cc,v 1.14 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 39 38 // Modified: 40 39 // 10.02.2009 J. M. Quesada cleanup 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 41 42 // 42 43 43 44 #include "G4PreCompoundNucleon.hh" 44 #include "G4PreCompoundParameters.hh"45 45 46 G4bool G4PreCompoundNucleon::IsItPossible(const G4Fragment& aFragment) 46 G4PreCompoundNucleon:: 47 G4PreCompoundNucleon(const G4ParticleDefinition* part, 48 G4VCoulombBarrier* aCoulombBarrier) 49 : G4PreCompoundFragment(part,aCoulombBarrier) 47 50 { 48 G4int pplus = aFragment.GetNumberOfCharged(); 49 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 50 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ()); 51 fact = 2*CLHEP::millibarn/(CLHEP::pi2*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc); 51 52 } 52 53 54 G4PreCompoundNucleon::~G4PreCompoundNucleon() 55 {} 56 53 57 G4double G4PreCompoundNucleon:: 54 ProbabilityDistributionFunction( constG4double eKin,58 ProbabilityDistributionFunction(G4double eKin, 55 59 const G4Fragment& aFragment) 56 60 { 57 if ( !IsItPossible(aFragment) ) return 0.0;61 if ( !IsItPossible(aFragment) ) { return 0.0; } 58 62 59 63 G4double U = aFragment.GetExcitationEnergy(); 60 G4double P = aFragment.GetNumberOfParticles(); 61 G4double H = aFragment.GetNumberOfHoles(); 62 G4double N = P + H; 64 G4int P = aFragment.GetNumberOfParticles(); 65 G4int H = aFragment.GetNumberOfHoles(); 66 G4int N = P + H; 67 68 G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 69 G4double g1 = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity(); 63 70 64 G4double g0 = (6.0/pi2)*aFragment.GetA() * 65 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 66 67 G4double g1 = (6.0/pi2)*GetRestA() * 68 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 71 G4double A0 = G4double(P*P+H*H+P-3*H)/(4.0*g0); 72 G4double A1 = (A0 - 0.5*P)/g1; 69 73 70 G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0; 74 G4double E0 = U - A0; 75 if (E0 <= 0.0) { return 0.0; } 71 76 72 G4double A1 = (A0 - P/2.0)/g1; 77 G4double E1 = U - eKin - GetBindingEnergy() - A1; 78 if (E1 <= 0.0) { return 0.0; } 79 80 G4double rj = GetRj(P, aFragment.GetNumberOfCharged()); 81 G4double xs = CrossSection(eKin); 82 83 if (rj <0.0 || xs < 0.0) { 84 std::ostringstream errOs; 85 G4cout<<"WARNING: NEGATIVE VALUES "<<G4endl; 86 errOs << "Rj=" << rj <<" xsec(" 87 <<eKin/MeV<<" MeV)= "<< xs <<" A= "<<GetA()<<" Z= "<<GetZ() 88 <<G4endl; 89 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 90 } 91 92 G4double Probability = fact * GetReducedMass() * rj * xs * eKin * P * (N-1) 93 * g4pow->powN(g1*E1/(g0*E0),N-2) * g1 / (E0*g0*g0); 73 94 74 G4double E0 = std::max(0.0,U - A0); 75 if (E0 == 0.0) return 0.0; 76 G4double E1 = std::max(0.0,U - eKin - GetBindingEnergy() - A1); 77 if (E1 == 0.0) return 0.0; 78 79 95 /* 80 96 G4double Probability = 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass() 81 97 * GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 82 * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0); 83 84 if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0 85 || CrossSection(eKin) <0) { 86 std::ostringstream errOs; 87 G4cout<<"WARNING: NEGATIVE VALUES "<<G4endl; 88 errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 89 <<G4endl; 90 errOs <<" xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl; 91 errOs <<" A="<<GetA()<<" Z="<<GetZ()<<G4endl; 92 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 93 } 98 * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * 99 std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0); 100 */ 94 101 95 102 return Probability;
Note: See TracChangeset
for help on using the changeset viewer.