Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (14 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/de_excitation/evaporation/src/G4EvaporationChannel.cc

    r962 r1347  
    2424// ********************************************************************
    2525//
     26// $Id: G4EvaporationChannel.cc,v 1.19 2010/11/24 15:30:49 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2628//
    2729//J.M. Quesada (August2008). Based on:
     
    3032// by V. Lara (Oct 1998)
    3133//
    32 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse
    33 // cross section option
    34 // JMQ (06 September 2008) Also external choices have been added for
    35 // superimposed Coulomb barrier (if useSICB is set true, by default is false)
    36 
     34// Modified:
     35// 03-09-2008 J.M. Quesada for external choice of inverse cross section option
     36// 06-09-2008 J.M. Quesada Also external choices have been added for superimposed
     37//                 Coulomb barrier (if useSICB is set true, by default is false)
     38// 17-11-2010 V.Ivanchenko in constructor replace G4VEmissionProbability by
     39//            G4EvaporationProbability and do not new and delete probability
     40//            object at each call; use G4Pow
    3741
    3842#include "G4EvaporationChannel.hh"
    3943#include "G4PairingCorrection.hh"
    40 
    41 
    42 
    43 G4EvaporationChannel::G4EvaporationChannel(const G4int anA, const G4int aZ, const G4String & aName,
    44                                            G4VEmissionProbability * aEmissionStrategy,
    45                                            G4VCoulombBarrier * aCoulombBarrier):
     44#include "G4NucleiProperties.hh"
     45#include "G4Pow.hh"
     46#include "G4EvaporationLevelDensityParameter.hh"
     47#include "Randomize.hh"
     48#include "G4Alpha.hh"
     49
     50G4EvaporationChannel::G4EvaporationChannel(G4int anA, G4int aZ,
     51                                           const G4String & aName,
     52                                           G4EvaporationProbability* aEmissionStrategy,
     53                                           G4VCoulombBarrier* aCoulombBarrier):
    4654    G4VEvaporationChannel(aName),
    4755    theA(anA),
     
    5260    MaximalKineticEnergy(-1000.0)
    5361{
    54     theLevelDensityPtr = new G4EvaporationLevelDensityParameter;
    55 //    MyOwnLevelDensity = true; 
     62  ResidualA = 0;
     63  ResidualZ = 0;
     64  ResidualMass = CoulombBarrier=0.0;
     65  EvaporatedMass = G4NucleiProperties::GetNuclearMass(theA, theZ);
     66  theLevelDensityPtr = new G4EvaporationLevelDensityParameter;
     67}
     68
     69G4EvaporationChannel::G4EvaporationChannel():
     70    G4VEvaporationChannel(""),
     71    theA(0),
     72    theZ(0),
     73    theEvaporationProbabilityPtr(0),
     74    theCoulombBarrierPtr(0),
     75    EmissionProbability(0.0),
     76    MaximalKineticEnergy(-1000.0)
     77{
     78  ResidualA = 0;
     79  ResidualZ = 0;
     80  EvaporatedMass = ResidualMass = CoulombBarrier = 0.0;
     81  theLevelDensityPtr = new G4EvaporationLevelDensityParameter;
    5682}
    5783
     
    6086  delete theLevelDensityPtr;
    6187}
    62 
    63 G4EvaporationChannel::G4EvaporationChannel(const G4EvaporationChannel & ) : G4VEvaporationChannel()
    64 {
    65     throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationChannel::copy_costructor meant to not be accessable");
    66 }
    67 
    68 const G4EvaporationChannel & G4EvaporationChannel::operator=(const G4EvaporationChannel & )
    69 {
    70     throw G4HadronicException(__FILE__, __LINE__, "G4EvaporationChannel::operator= meant to not be accessable");
    71     return *this;
    72 }
    73 
    74 G4bool G4EvaporationChannel::operator==(const G4EvaporationChannel & right) const
    75 {
    76     return (this == (G4EvaporationChannel *) &right);
    77     //  return false;
    78 }
    79 
    80 G4bool G4EvaporationChannel::operator!=(const G4EvaporationChannel & right) const
    81 {
    82     return (this != (G4EvaporationChannel *) &right);
    83     //  return true;
    84 }
    85 
    86 //void G4EvaporationChannel::SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity)
    87 //  {
    88 //    if (MyOwnLevelDensity) delete theLevelDensityPtr;
    89 //    theLevelDensityPtr = aLevelDensity;
    90 //    MyOwnLevelDensity = false;
    91 //  }
    9288
    9389void G4EvaporationChannel::Initialize(const G4Fragment & fragment)
     
    9894  theEvaporationProbabilityPtr->UseSICB(useSICB);
    9995 
    100  
    101   G4int FragmentA = static_cast<G4int>(fragment.GetA());
    102   G4int FragmentZ = static_cast<G4int>(fragment.GetZ());
     96  G4int FragmentA = fragment.GetA_asInt();
     97  G4int FragmentZ = fragment.GetZ_asInt();
    10398  ResidualA = FragmentA - theA;
    10499  ResidualZ = FragmentZ - theZ;
     100  //G4cout << "G4EvaporationChannel::Initialize Z= " << theZ << " A= " << theA
     101  //     << " FragZ= " << FragmentZ << " FragA= " << FragmentA << G4endl;
    105102 
    106103  //Effective excitation energy
     
    108105    G4PairingCorrection::GetInstance()->GetPairingCorrection(FragmentA,FragmentZ);
    109106 
    110  
    111107  // Only channels which are physically allowed are taken into account
    112108  if (ResidualA <= 0 || ResidualZ <= 0 || ResidualA < ResidualZ ||
    113109      (ResidualA == ResidualZ && ResidualA > 1) || ExEnergy <= 0.0) {
    114     CoulombBarrier=0.0;
     110    CoulombBarrier = ResidualMass = 0.0;
    115111    MaximalKineticEnergy = -1000.0*MeV;
    116112    EmissionProbability = 0.0;
    117113  } else {
     114    ResidualMass = G4NucleiProperties::GetNuclearMass(ResidualA, ResidualZ);
     115    G4double FragmentMass = fragment.GetGroundStateMass();
    118116    CoulombBarrier = theCoulombBarrierPtr->GetCoulombBarrier(ResidualA,ResidualZ,ExEnergy);
    119117    // Maximal Kinetic Energy
    120     MaximalKineticEnergy = CalcMaximalKineticEnergy
    121       (G4ParticleTable::GetParticleTable()->
    122        GetIonTable()->GetNucleusMass(FragmentZ,FragmentA)+ExEnergy);
     118    MaximalKineticEnergy = CalcMaximalKineticEnergy(FragmentMass + ExEnergy);
     119    //MaximalKineticEnergy = ExEnergy + fragment.GetGroundStateMass()
     120    //  - EvaporatedMass - ResidualMass;
    123121   
    124122    // Emission probability
     
    131129      limit= CoulombBarrier;
    132130    else limit=0.;
     131    limit = std::max(limit, FragmentMass - ResidualMass - EvaporatedMass);
    133132 
    134133    // The threshold for charged particle emission must be  set to 0 if Coulomb
    135134    //cutoff  is included in the cross sections
    136     //if (MaximalKineticEnergy <= 0.0) EmissionProbability = 0.0; 
    137135    if (MaximalKineticEnergy <= limit) EmissionProbability = 0.0;
    138136    else {
     
    142140    }
    143141  }
     142  //G4cout << "G4EvaporationChannel:: probability= " << EmissionProbability << G4endl;
    144143 
    145144  return;
     
    148147G4FragmentVector * G4EvaporationChannel::BreakUp(const G4Fragment & theNucleus)
    149148{
    150   G4double EvaporatedKineticEnergy=GetKineticEnergy(theNucleus);
    151  
    152   G4double EvaporatedMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
    153     GetIonMass(theZ,theA);
    154   G4double EvaporatedEnergy = EvaporatedKineticEnergy + EvaporatedMass;
    155  
     149  /*
     150  G4double Ecm = GetKineticEnergy(theNucleus) + ResidualMass + EvaporatedMass;
     151 
     152  G4double EvaporatedEnergy =
     153    ((Ecm-ResidualMass)*(Ecm+ResidualMass) + EvaporatedMass*EvaporatedMass)/(2*Ecm);
     154  */
     155  G4double EvaporatedEnergy = GetKineticEnergy(theNucleus) + EvaporatedMass;
     156
    156157  G4ThreeVector momentum(IsotropicVector
    157                          (std::sqrt(EvaporatedKineticEnergy*
    158                                     (EvaporatedKineticEnergy+2.0*EvaporatedMass))));
    159  
    160   momentum.rotateUz(theNucleus.GetMomentum().vect().unit());
     158                         (std::sqrt((EvaporatedEnergy - EvaporatedMass)*
     159                                    (EvaporatedEnergy + EvaporatedMass))));
    161160 
    162161  G4LorentzVector EvaporatedMomentum(momentum,EvaporatedEnergy);
    163   EvaporatedMomentum.boost(theNucleus.GetMomentum().boostVector());
     162  G4LorentzVector ResidualMomentum = theNucleus.GetMomentum();
     163  EvaporatedMomentum.boost(ResidualMomentum.boostVector());
    164164 
    165165  G4Fragment * EvaporatedFragment = new G4Fragment(theA,theZ,EvaporatedMomentum);
    166 #ifdef PRECOMPOUND_TEST
    167   EvaporatedFragment->SetCreatorModel(G4String("G4Evaporation"));
    168 #endif
    169   // ** And now the residual nucleus **
    170   G4double theExEnergy = theNucleus.GetExcitationEnergy();
    171   G4double theMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
    172     GetNucleusMass(static_cast<G4int>(theNucleus.GetZ()),
    173                    static_cast<G4int>(theNucleus.GetA()));
    174   G4double ResidualEnergy = theMass +
    175     (theExEnergy - EvaporatedKineticEnergy) - EvaporatedMass;
    176  
    177   G4LorentzVector ResidualMomentum(-momentum,ResidualEnergy);
    178   ResidualMomentum.boost(theNucleus.GetMomentum().boostVector());
    179  
    180   G4Fragment * ResidualFragment = new G4Fragment(ResidualA, ResidualZ, ResidualMomentum );
    181  
    182 #ifdef PRECOMPOUND_TEST
    183   ResidualFragment->SetCreatorModel(G4String("ResidualNucleus"));
    184 #endif
     166  ResidualMomentum -= EvaporatedMomentum;
     167
     168  G4Fragment * ResidualFragment = new G4Fragment(ResidualA, ResidualZ, ResidualMomentum);
     169 
    185170  G4FragmentVector * theResult = new G4FragmentVector;
    186171 
     
    211196/////////////////////////////////////////
    212197// Calculates the maximal kinetic energy that can be carried by fragment.
    213 G4double G4EvaporationChannel::CalcMaximalKineticEnergy(const G4double NucleusTotalE)
    214 {
    215   G4double ResidualMass = G4ParticleTable::GetParticleTable()->
    216     GetIonTable()->GetNucleusMass( ResidualZ, ResidualA );
    217   G4double EvaporatedMass = G4ParticleTable::GetParticleTable()->
    218     GetIonTable()->GetNucleusMass( theZ, theA );
    219 
     198G4double G4EvaporationChannel::CalcMaximalKineticEnergy(G4double NucleusTotalE)
     199{
    220200  // This is the "true" assimptotic kinetic energy (from energy conservation)   
    221   G4double Tmax = (NucleusTotalE*NucleusTotalE + EvaporatedMass*EvaporatedMass -               
    222                    ResidualMass*ResidualMass)/(2.0*NucleusTotalE) - EvaporatedMass;
     201  G4double Tmax =
     202    ((NucleusTotalE-ResidualMass)*(NucleusTotalE+ResidualMass) + EvaporatedMass*EvaporatedMass)
     203    /(2.0*NucleusTotalE) - EvaporatedMass;
    223204 
    224205  //JMQ (13-09-08) bug fixed: in the original version the Tmax is calculated
     
    245226   
    246227   
    247     if (MaximalKineticEnergy < 0.0)  
     228    if (MaximalKineticEnergy < 0.0) {
    248229      throw G4HadronicException(__FILE__, __LINE__,
    249230                                "G4EvaporationChannel::CalcKineticEnergy: maximal kinetic at the Coulomb barrier is less than 0");
    250    
     231    }
    251232    G4double Rb = 4.0*theLevelDensityPtr->
    252233      LevelDensityParameter(ResidualA+theA,ResidualZ+theZ,MaximalKineticEnergy)*
     
    263244      G4double Q2 = 1.0;
    264245      if (theZ == 0) { // for emitted neutron
    265         G4double Beta = (2.12/std::pow(G4double(ResidualA),2./3.) - 0.05)*MeV/
    266           (0.76 + 2.2/std::pow(G4double(ResidualA),1./3.));
     246        G4double Beta = (2.12/G4Pow::GetInstance()->Z23(ResidualA) - 0.05)*MeV/
     247          (0.76 + 2.2/G4Pow::GetInstance()->Z13(ResidualA));
    267248        Q1 = 1.0 + Beta/(MaximalKineticEnergy);
    268249        Q2 = Q1*std::sqrt(Q1);
     
    277258  } else if (OPTxs==1 || OPTxs==2 || OPTxs==3 || OPTxs==4) {
    278259   
    279     G4double V;
    280     if(useSICB) V= CoulombBarrier;
    281     else V=0.;
    282     //If Coulomb barrier is just included  in the cross sections
    283     //  G4double V=0.;
     260    // Coulomb barrier is just included  in the cross sections
     261    G4double V = 0;
     262    if(useSICB) { V= CoulombBarrier; }
     263
     264    V = std::max(V, aFragment.GetGroundStateMass()-EvaporatedMass-ResidualMass);
    284265
    285266    G4double Tmax=MaximalKineticEnergy;
    286267    G4double T(0.0);
    287268    G4double NormalizedProbability(1.0);
    288    
     269
     270    // VI: This is very ineffective - create new objects at each call to the method   
     271    /*
    289272    // A pointer is created in order to access the distribution function.
    290     G4EvaporationProbability * G4EPtemp;
     273    G4EvaporationProbability * G4EPtemp = 0;
    291274   
    292275    if (theA==1 && theZ==0) G4EPtemp=new G4NeutronEvaporationProbability();
     
    305288      G4EPtemp->SetOPTxs(OPTxs);
    306289      G4EPtemp->UseSICB(useSICB);
    307 
     290    */
     291
     292    // use local pointer and not create a new one
    308293    do
    309294      { 
    310295        T=V+G4UniformRand()*(Tmax-V);
    311         NormalizedProbability=G4EPtemp->ProbabilityDistributionFunction(aFragment,T)/
    312           (this->GetEmissionProbability());
     296        NormalizedProbability =
     297          theEvaporationProbabilityPtr->ProbabilityDistributionFunction(aFragment,T)/
     298          GetEmissionProbability();
    313299       
    314300      }
    315301    while (G4UniformRand() > NormalizedProbability);
    316    delete G4EPtemp;
    317    return T;
     302    //   delete G4EPtemp;
     303    return T;
    318304  } else{
    319305    std::ostringstream errOs;
     
    323309}
    324310
    325 G4ThreeVector G4EvaporationChannel::IsotropicVector(const G4double Magnitude)
     311G4ThreeVector G4EvaporationChannel::IsotropicVector(G4double Magnitude)
    326312    // Samples a isotropic random vectorwith a magnitud given by Magnitude.
    327313    // By default Magnitude = 1.0
    328314{
    329     G4double CosTheta = 1.0 - 2.0*G4UniformRand();
    330     G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta);
    331     G4double Phi = twopi*G4UniformRand();
    332     G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta,
    333                         Magnitude*std::sin(Phi)*SinTheta,
    334                         Magnitude*CosTheta);
    335     return Vector;
    336             }
     315  G4double CosTheta = 1.0 - 2.0*G4UniformRand();
     316  G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta);
     317  G4double Phi = twopi*G4UniformRand();
     318  G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta,
     319                      Magnitude*std::sin(Phi)*SinTheta,
     320                      Magnitude*CosTheta);
     321  return Vector;
     322}
    337323
    338324
Note: See TracChangeset for help on using the changeset viewer.