Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    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 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 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
    4142//
    4243
    4344#include "G4PreCompoundNucleon.hh"
    44 #include "G4PreCompoundParameters.hh"
    4545
    46 G4bool G4PreCompoundNucleon::IsItPossible(const G4Fragment& aFragment)
     46G4PreCompoundNucleon::
     47G4PreCompoundNucleon(const G4ParticleDefinition* part,
     48                      G4VCoulombBarrier* aCoulombBarrier)
     49  : G4PreCompoundFragment(part,aCoulombBarrier)
    4750{
    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);
    5152}
    5253
     54G4PreCompoundNucleon::~G4PreCompoundNucleon()
     55{}
     56
    5357G4double G4PreCompoundNucleon::
    54 ProbabilityDistributionFunction(const G4double eKin,
     58ProbabilityDistributionFunction(G4double eKin,
    5559                                const G4Fragment& aFragment)
    5660{
    57   if ( !IsItPossible(aFragment) ) return 0.0;
     61  if ( !IsItPossible(aFragment) ) { return 0.0; }
    5862
    5963  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();
    6370 
    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; 
    6973
    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; }
    7176
    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);
    7394 
    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  /*
    8096  G4double Probability = 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass()
    8197    * 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  */
    94101
    95102  return Probability;
Note: See TracChangeset for help on using the changeset viewer.