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/G4PreCompoundAlpha.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundAlpha.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundAlpha.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 21.08.2008 J. M. Quesada add choice of options 
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4142//
    4243
    4344#include "G4PreCompoundAlpha.hh"
    44 
    45 G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const
    46 {
    47   G4ReactionProduct * theReactionProduct =
    48     new G4ReactionProduct(G4Alpha::AlphaDefinition());
    49   theReactionProduct->SetMomentum(GetMomentum().vect());
    50   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    51 #ifdef PRECOMPOUND_TEST
    52   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    53 #endif
    54   return theReactionProduct;
    55 }   
    56 
    57 G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P)
    58 {
    59   return
    60       (N-4.0)*(P-3.0)*(
    61                        (((N-3.0)*(P-2.0))/2.0) *(
    62                                                  (((N-2.0)*(P-1.0))/3.0) *(
    63                                                                            (((N-1.0)*P)/2.0)
    64                                                                            )
    65                                                  )
    66                        );
    67 }
    68  
    69 G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A)
    70 {
    71   return 4096.0/(A*A*A); 
     45#include "G4Alpha.hh"
     46
     47G4PreCompoundAlpha::G4PreCompoundAlpha()
     48  : G4PreCompoundIon(G4Alpha::Alpha(), &theAlphaCoulombBarrier)
     49{}
     50
     51G4PreCompoundAlpha::~G4PreCompoundAlpha()
     52{}
     53
     54G4double G4PreCompoundAlpha::FactorialFactor(G4int N, G4int P)
     55{
     56  return G4double((N-4)*(P-3)*(N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/12.0;
     57}
     58 
     59G4double G4PreCompoundAlpha::CoalescenceFactor(G4int A)
     60{
     61  return 4096.0/G4double(A*A*A); 
    7262}   
    7363
    74 G4double G4PreCompoundAlpha::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     64G4double G4PreCompoundAlpha::GetRj(G4int nParticles, G4int nCharged)
    7565{
    7666  G4double rj = 0.0;
    77   G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3);
    78   if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) {
    79     rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)*
    80                                    (NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 
     67  if(nCharged >=2 && (nParticles-nCharged) >=2 ) {
     68    G4double denominator =
     69      G4double(nParticles*(nParticles-1)*(nParticles-2)*(nParticles-3));
     70    rj = 6.0*nCharged*(nCharged-1)*(nParticles-nCharged)*(nParticles-nCharged-1)
     71      /denominator; 
    8172  }
    8273  return rj;
    8374}
    8475
    85 ////////////////////////////////////////////////////////////////////////////////////
     76/////////////////////////////////////////////////////////////////////////////////
    8677//J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections
    8778//OPT=0 Dostrovski's parameterization
     
    8980//OPT=3,4 Kalbach's parameterization
    9081//
    91 G4double G4PreCompoundAlpha::CrossSection(const  G4double K)
    92 {
    93 
    94   ResidualA=GetRestA();
    95   ResidualZ=GetRestZ();
    96   theA=GetA();
    97   theZ=GetZ();
    98   ResidualAthrd=std::pow(ResidualA,0.33333);
    99   FragmentA=GetA()+GetRestA();
    100   FragmentAthrd=std::pow(FragmentA,0.33333);
    101 
    102 
    103   if (OPTxs==0) return GetOpt0( K);
    104   else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);
    105   else if (OPTxs==3 || OPTxs==4)  return GetOpt34( K);
     82G4double G4PreCompoundAlpha::CrossSection(G4double K)
     83{
     84  ResidualA = GetRestA();
     85  ResidualZ = GetRestZ();
     86  theA = GetA();
     87  theZ = GetZ();
     88  ResidualAthrd = ResidualA13();
     89  FragmentA = theA + ResidualA;
     90  FragmentAthrd = g4pow->Z13(FragmentA);
     91
     92  if (OPTxs==0) { return GetOpt0( K); }
     93  else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); }
     94  else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); }
    10695  else{
    10796    std::ostringstream errOs;
     
    112101}
    113102
    114 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    115 
    116 G4double G4PreCompoundAlpha::GetOpt0(const  G4double K)
    117 {
    118   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    119   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    120   //with the rest of the options
    121   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    122 }
    123 //
    124 //----------------
    125 //
    126103G4double G4PreCompoundAlpha::GetAlpha()
    127104{
    128105  G4double C = 0.0;
    129   G4double aZ = GetZ() + GetRestZ();
     106  G4int aZ = theZ + ResidualZ;
    130107  if (aZ <= 30)
    131108    {
     
    134111  else if (aZ <= 50)
    135112    {
    136       C = 0.1 + -((aZ-50.)/20.)*0.02;
     113      C = 0.1 - (aZ-30)*0.001;
    137114    }
    138115  else if (aZ < 70)
    139116    {
    140       C = 0.08 + -((aZ-70.)/20.)*0.02;
     117      C = 0.08 - (aZ-50)*0.001;
    141118    }
    142119  else
     
    146123  return 1.0+C;
    147124}
    148 //
    149 //--------------------
    150 //
    151 G4double G4PreCompoundAlpha::GetBeta()
    152 {
    153   return -GetCoulombBarrier();
    154 }
    155 //
    156 //********************* OPT=1,2 : Chatterjee's cross section ************************
     125
     126//
     127//********************* OPT=1,2 : Chatterjee's cross section ********************
    157128//(fitting to cross section from Bechetti & Greenles OM potential)
    158129
    159 G4double G4PreCompoundAlpha::GetOpt12(const  G4double K)
    160 {
    161 
     130G4double G4PreCompoundAlpha::GetOpt12(G4double K)
     131{
    162132  G4double Kc=K;
    163133
    164134  // JMQ xsec is set constant above limit of validity
    165   if (K>50) Kc=50;
     135  if (K > 50*MeV) { Kc = 50*MeV; }
    166136
    167137  G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs;
     
    182152  p = p0 + p1/Ec + p2/(Ec*Ec);
    183153  landa = landa0*ResidualA + landa1;
    184   mu = mu0*std::pow(ResidualA,mu1);
    185   nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
     154  G4double resmu1 = g4pow->powZ(ResidualA,mu1);
     155  mu = mu0*resmu1;
     156  nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec));
    186157  q = landa - nu/(Ec*Ec) - 2*p*Ec;
    187158  r = mu + 2*nu/Ec + p*(Ec*Ec);
     
    194165             
    195166  return xs;
    196 
    197167}
    198168
    199169// *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)*************
    200 G4double G4PreCompoundAlpha::GetOpt34(const  G4double K)
     170G4double G4PreCompoundAlpha::GetOpt34(G4double K)
    201171// c     ** alpha from huizenga and igo
    202172{
    203 
    204173  G4double landa, mu, nu, p , signor(1.),sig;
    205174  G4double ec,ecsq,xnulam,etest(0.),a;
     
    209178  G4double     spill= 1.e+18;
    210179
    211   G4double       p0 = 10.95;
     180  G4double     p0 = 10.95;
    212181  G4double     p1 = -85.2;
    213182  G4double     p2 = 1146.;
     
    228197  p = p0 + p1/ec + p2/ecsq;
    229198  landa = landa0*ResidualA + landa1;
    230   a = std::pow(ResidualA,mu1);
     199  a = g4pow->powZ(ResidualA,mu1);
    231200  mu = mu0 * a;
    232201  nu = a* (nu0+nu1*ec+nu2*ecsq); 
    233202  xnulam = nu / landa;
    234   if (xnulam > spill) xnulam=0.;
    235   if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
     203  if (xnulam > spill) { xnulam=0.; }
     204  if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); }
    236205
    237206  a = -2.*p*ec + landa - nu/ecsq;
     
    239208  ecut = 0.;
    240209  cut = a*a - 4.*p*b;
    241   if (cut > 0.) ecut = std::sqrt(cut);
     210  if (cut > 0.) { ecut = std::sqrt(cut); }
    242211  ecut = (ecut-a) / (p+p);
    243212  ecut2 = ecut;
    244 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
    245 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum
    246 //  if (cut < 0.) ecut2 = ecut - 2.;
    247   if (cut < 0.) ecut2 = ecut;
    248   elab = K * FragmentA / ResidualA;
     213  //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
     214  // ecut<0 means that there is no cut with energy axis, i.e. xs is set
     215  // to 0 bellow minimum
     216  //  if (cut < 0.) ecut2 = ecut - 2.;
     217  if (cut < 0.) { ecut2 = ecut; }
     218  elab = K * FragmentA / G4double(ResidualA);
    249219  sig = 0.;
    250220 
    251221  if (elab <= ec) { //start for E<Ec
    252     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
     222    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }
    253223  }           //end for E<Ec
    254224  else {           //start for E>Ec
    255225    sig = (landa*elab+mu+nu/elab) * signor;
    256226    geom = 0.;
    257     if (xnulam < flow || elab < etest) return sig;
     227    if (xnulam < flow || elab < etest) { return sig; }
    258228    geom = std::sqrt(theA*K);
    259229    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
     
    262232  }           //end for E>Ec
    263233  return sig;
    264  
    265 }
    266 
    267 //   ************************** end of cross sections *******************************
     234}
Note: See TracChangeset for help on using the changeset viewer.