Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (15 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/hadronic/models/de_excitation/multifragmentation
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4Solver.hh

    r819 r962  
    2626//
    2727// $Id: G4Solver.hh,v 1.4 2006/06/29 20:23:59 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMF.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMF.hh,v 1.3 2006/06/29 20:24:03 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFChannel.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFChannel.hh,v 1.3 2006/06/29 20:24:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFFragment.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFFragment.hh,v 1.3 2006/06/29 20:24:07 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroBiNucleon.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroBiNucleon.hh,v 1.3 2006/06/29 20:24:09 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroBiNucleon.hh,v 1.4 2008/10/24 23:03:33 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    3535
    3636#include "G4VStatMFMacroCluster.hh"
    37 #include "G4NucleiPropertiesTable.hh"
     37#include "G4NucleiProperties.hh"
    3838
    3939class G4StatMFMacroBiNucleon : public G4VStatMFMacroCluster {
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroChemicalPotential.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMacroChemicalPotential.hh,v 1.3 2006/06/29 20:24:13 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroMultiNucleon.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMacroMultiNucleon.hh,v 1.3 2006/06/29 20:24:15 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroMultiplicity.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMacroMultiplicity.hh,v 1.3 2006/06/29 20:24:17 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroNucleon.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMacroNucleon.hh,v 1.3 2006/06/29 20:24:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroTemperature.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMacroTemperature.hh,v 1.3 2006/06/29 20:24:21 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroTetraNucleon.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroTetraNucleon.hh,v 1.3 2006/06/29 20:24:23 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroTetraNucleon.hh,v 1.4 2008/10/24 23:03:23 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    3535
    3636#include "G4VStatMFMacroCluster.hh"
    37 #include "G4NucleiPropertiesTable.hh"
     37#include "G4NucleiProperties.hh"
    3838
    3939class G4StatMFMacroTetraNucleon : public G4VStatMFMacroCluster {
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMacroTriNucleon.hh

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroTriNucleon.hh,v 1.3 2006/06/29 20:24:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroTriNucleon.hh,v 1.4 2008/10/24 23:01:32 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    3535
    3636#include "G4VStatMFMacroCluster.hh"
    37 #include "G4NucleiPropertiesTable.hh"
     37#include "G4NucleiProperties.hh"
    3838
    3939class G4StatMFMacroTriNucleon : public G4VStatMFMacroCluster {
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMicroCanonical.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMicroCanonical.hh,v 1.3 2006/06/29 20:24:27 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMicroManager.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMicroManager.hh,v 1.3 2006/06/29 20:24:29 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFMicroPartition.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFMicroPartition.hh,v 1.3 2006/06/29 20:24:31 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4StatMFParameters.hh

    r819 r962  
    2626//
    2727// $Id: G4StatMFParameters.hh,v 1.3 2006/06/29 20:24:33 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4VMultiFragmentation.hh

    r819 r962  
    2626//
    2727// $Id: G4VMultiFragmentation.hh,v 1.3 2006/06/29 20:24:35 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4VStatMFEnsemble.hh

    r819 r962  
    2626//
    2727// $Id: G4VStatMFEnsemble.hh,v 1.3 2006/06/29 20:24:37 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/include/G4VStatMFMacroCluster.hh

    r819 r962  
    2626//
    2727// $Id: G4VStatMFMacroCluster.hh,v 1.5 2006/08/19 19:55:09 dennis Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4Solver.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4Solver.cc,v 1.3 2006/06/29 20:24:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4Solver.cc,v 1.4 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMF.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMF.cc,v 1.5 2006/06/29 20:24:43 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMF.cc,v 1.6 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    106106
    107107  G4int Iterations = 0;
     108  G4int IterationsLimit = 100000;
    108109  G4double Temperature = 0.0;
    109110 
    110111  G4bool FirstTime = true;
    111112  G4StatMFChannel * theChannel = 0;
    112 
     113 
    113114  G4bool ChannelOk;
    114   do {  // Try to de-excite as much as 10 times
     115  do {  // Try to de-excite as much as IterationLimit permits
    115116    do {
    116117     
     
    137138      }
    138139     
    139       if (!(ChannelOk = theChannel->CheckFragments())) delete theChannel;
     140      ChannelOk = theChannel->CheckFragments();
     141      if (!ChannelOk) delete theChannel;
    140142     
    141143    } while (!ChannelOk);
     
    156158   
    157159    // Find temperature of breaking channel.
    158     Temperature = _theEnsemble->GetMeanTemperature(); // Initial value for Temperature
    159     
     160    Temperature = _theEnsemble->GetMeanTemperature(); // Initial guess for Temperature
     161 
    160162    if (FindTemperatureOfBreakingChannel(theFragment,theChannel,Temperature)) break;
    161    
    162   } while (Iterations++ < 10);
    163  
    164  
    165   // If Iterations >= 10 means that we couldn't solve for temperature
    166   if (Iterations >= 10)
     163 
     164    // Do not forget to delete this unusable channel, for which we failed to find the temperature,
     165    // otherwise for very proton-reach nuclei it would lead to memory leak due to large
     166    // number of iterations. N.B. "theChannel" is created in G4StatMFMacroCanonical::ChooseZ()
     167
     168    // G4cout << " Iteration # " << Iterations << " Mean Temperature = " << Temperature << G4endl;   
     169
     170    delete theChannel;   
     171
     172  } while (Iterations++ < IterationsLimit );
     173 
     174 
     175
     176  // If Iterations >= IterationsLimit means that we couldn't solve for temperature
     177  if (Iterations >= IterationsLimit)
    167178    throw G4HadronicException(__FILE__, __LINE__, "G4StatMF::BreakItUp: Was not possible to solve for temperature of breaking channel");
    168179 
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFChannel.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFChannel.cc,v 1.6.2.1 2008/04/23 16:19:50 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4StatMFChannel.cc,v 1.10 2008/11/19 14:33:31 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
    3131// by V. Lara
     32//
     33// Modified:
     34// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
     35//          Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
     36//          Moscow, pshenich@fias.uni-frankfurt.de) fixed semi-infinite loop
     37
    3238
    3339#include "G4StatMFChannel.hh"
     
    9298        G4int A = static_cast<G4int>((*i)->GetA());
    9399        G4int Z = static_cast<G4int>((*i)->GetZ());
    94         if ( (A > 1 && (Z >= A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
     100        if ( (A > 1 && (Z > A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
    95101    }
    96102   
     
    315321        G4double CosTheta1;
    316322        G4double Sign;
    317         do
    318           {
    319             do
    320               {
    321                 CosTheta1 = 1.0 - 2.0*G4UniformRand();
    322               }
    323             while (CosTheta1*CosTheta1 < CTM12);
    324           }
    325         while (CTM12 >= 0.0 && CosTheta1 < 0.0);
     323
     324        if (CTM12 > 0.9999) {CosTheta1 = 1.;}
     325        else {
     326         do
     327           {
     328             do
     329               {
     330                 CosTheta1 = 1.0 - 2.0*G4UniformRand();
     331               }
     332             while (CosTheta1*CosTheta1 < CTM12);
     333           }
     334          while (CTM12 >= 0.0 && CosTheta1 < 0.0);
     335        }
    326336
    327337        if (CTM12 < 0.0) Sign = 1.0;
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFFragment.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFFragment.cc,v 1.6 2006/06/29 20:24:47 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFFragment.cc,v 1.7 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroBiNucleon.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroBiNucleon.cc,v 1.5 2006/06/29 20:24:49 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroBiNucleon.cc,v 1.7 2008/10/24 22:56:42 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    6969        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    7070   
    71     const G4double BindingE = G4NucleiPropertiesTable::GetBindingEnergy(1,theA); //old value was 2.796*MeV
     71    const G4double BindingE = G4NucleiProperties::GetBindingEnergy(theA,1); //old value was 2.796*MeV
    7272    G4double exponent = (BindingE + theA*(mu+nu*theZARatio) -
    7373                         Coulomb*theZARatio*theZARatio*std::pow(G4double(theA),5./3.))/T;
     
    8989        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    9090                                                                       
    91     _Energy  = -G4NucleiPropertiesTable::GetBindingEnergy(1,theA) +
     91    _Energy  = -G4NucleiProperties::GetBindingEnergy(theA,1) +
    9292        Coulomb * theZARatio * theZARatio * std::pow(G4double(theA),5./3.) +
    9393        (3./2.) * T;
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroCanonical.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroCanonical.cc,v 1.6 2006/06/29 20:24:51 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroCanonical.cc,v 1.8 2008/11/19 14:33:31 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// by V. Lara
    3131// --------------------------------------------------------------------
     32//
     33// Modified:
     34// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
     35//          Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
     36//          Moscow, pshenich@fias.uni-frankfurt.de) fixed infinite loop for
     37//          a fagment with Z=A; fixed memory leak
    3238
    3339#include "G4StatMFMacroCanonical.hh"
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroChemicalPotential.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroChemicalPotential.cc,v 1.5 2006/06/29 20:24:53 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroChemicalPotential.cc,v 1.6 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    9494    theSolver->SetIntervalLimits(ChemPa,ChemPb);
    9595    //    if (!theSolver->Crenshaw(*this))
    96     if (!theSolver->Brent(*this))
     96    if (!theSolver->Brent(*this)){
     97      G4cerr <<"G4StatMFMacroChemicalPotential:"<<" ChemPa="<<ChemPa<<" ChemPb="<<ChemPb<< G4endl;
     98      G4cerr <<"G4StatMFMacroChemicalPotential:"<<" fChemPa="<<fChemPa<<" fChemPb="<<fChemPb<< G4endl;
    9799      throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroChemicalPotential::CalcChemicalPotentialNu: I couldn't find the root.");
     100    }
    98101    _ChemPotentialNu = theSolver->GetRoot();
    99102    delete theSolver;
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroMultiNucleon.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroMultiNucleon.cc,v 1.5 2006/06/29 20:25:06 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroMultiNucleon.cc,v 1.7 2008/11/19 14:33:31 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
    3131// by V. Lara
     32//
     33// Modified:
     34// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
     35//          Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
     36//          Moscow, pshenich@fias.uni-frankfurt.de) fixed computation of the
     37//          symmetry energy
    3238
    3339#include "G4StatMFMacroMultiNucleon.hh"
     
    128134       
    129135    // Symmetry term
    130 //      G4double ESym = static_cast<G4double>(theA) * G4StatMFParameters::GetGamma0() *(1. - 2.* theZARatio * theZARatio);
     136    G4double ESym = static_cast<G4double>(theA) * G4StatMFParameters::GetGamma0() *(1. - 2.* theZARatio) * (1. - 2.* theZARatio);
    131137       
    132138    // Surface term
     
    139145    G4double ETrans = (3./2.)*T;
    140146       
    141        
    142     return _Energy = EVol + ESurf + ECoul + ETrans; // + ESym;
     147       
     148    return _Energy = EVol + ESurf + ECoul + ETrans + ESym;
    143149}
    144150
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroMultiplicity.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroMultiplicity.cc,v 1.5 2006/06/29 20:25:10 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroMultiplicity.cc,v 1.7 2008/11/19 14:33:31 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
    3131// by V. Lara
    32 
     32//
     33// Modified:
     34// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
     35//          Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
     36//          Moscow, pshenich@fias.uni-frankfurt.de) additional checks in
     37//          solver of equation for the chemical potential
    3338
    3439#include "G4StatMFMacroMultiplicity.hh"
     
    8792    G4double fChemPb = this->operator()(ChemPb);
    8893   
     94
     95    // Set the precision level for locating the root.
     96    // If the root is inside this interval, then it's done!
     97    G4double intervalWidth = 1.e-4;
     98
    8999    // bracketing the solution
    90100    G4int iterations = 0;
    91     while (fChemPa*fChemPb > 0.0 && iterations < 10)
     101    while (fChemPa*fChemPb > 0.0 && iterations < 100)
    92102    {
    93103        if (std::abs(fChemPa) <= std::abs(fChemPb))
     
    95105            ChemPa += 0.6*(ChemPa-ChemPb);
    96106            fChemPa = this->operator()(ChemPa);
     107            iterations++;
    97108        }
    98109        else
     
    100111            ChemPb += 0.6*(ChemPb-ChemPa);
    101112            fChemPb = this->operator()(ChemPb);
     113            iterations++;
    102114        }
    103115    }
    104     if (fChemPa*fChemPb > 0.0)
     116
     117    if (fChemPa*fChemPb > 0.0) // the bracketing failed, complain
    105118    {
     119      G4cerr <<"G4StatMFMacroMultiplicity:"<<" ChemPa="<<ChemPa<<" ChemPb="<<ChemPb<< G4endl;
     120      G4cerr <<"G4StatMFMacroMultiplicity:"<<" fChemPa="<<fChemPa<<" fChemPb="<<fChemPb<< G4endl;
    106121        throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't bracket the root.");
    107122    }
    108        
    109        
    110     G4Solver<G4StatMFMacroMultiplicity> * theSolver = new G4Solver<G4StatMFMacroMultiplicity>(100,1.e-4);
     123    else if (fChemPa*fChemPb < 0.0 && std::abs(ChemPa-ChemPb) > intervalWidth) // the bracketing was OK, try to locate the root
     124    {   
     125    G4Solver<G4StatMFMacroMultiplicity> * theSolver = new G4Solver<G4StatMFMacroMultiplicity>(100,intervalWidth);
    111126    theSolver->SetIntervalLimits(ChemPa,ChemPb);
    112127    //    if (!theSolver->Crenshaw(*this))
    113128    if (!theSolver->Brent(*this))
    114129    {
     130      G4cerr <<"G4StatMFMacroMultiplicity:"<<" ChemPa="<<ChemPa<<" ChemPb="<<ChemPb<< G4endl;
     131      G4cerr <<"G4StatMFMacroMultiplicity:"<<" fChemPa="<<fChemPa<<" fChemPb="<<fChemPb<< G4endl;
    115132        throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't find the root.");
    116133    }
    117134    _ChemPotentialMu = theSolver->GetRoot();
    118135    delete theSolver;
     136    }
     137    else // the root is within the interval, which is shorter then the precision level - all done
     138    {
     139     _ChemPotentialMu = ChemPa;
     140    }
     141
    119142    return _ChemPotentialMu;
    120143}
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroNucleon.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroNucleon.cc,v 1.5 2006/06/29 20:25:19 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroNucleon.cc,v 1.6 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    7272    G4double exponent_neutron = mu/T;
    7373
    74     if (exponent_neutron > 700.0) exponent_proton = 700.0;
     74    if (exponent_neutron > 700.0) exponent_neutron = 700.0;
    7575    if (exponent_proton > 700.0) exponent_proton = 700.0;
    7676
    77     _NeutronMeanMultiplicity = (degeneracy*FreeVol/lambda3)*std::exp(mu/T);
     77    _NeutronMeanMultiplicity = (degeneracy*FreeVol/lambda3)*std::exp(exponent_neutron);
    7878       
    79     _ProtonMeanMultiplicity = (degeneracy*FreeVol/lambda3)*
    80         std::exp((mu+nu-Coulomb)/T);
     79    _ProtonMeanMultiplicity = (degeneracy*FreeVol/lambda3)*std::exp(exponent_proton);
    8180
    8281       
     
    9291        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    9392                                                                       
    94     return _Energy = Coulomb * theZARatio + (3./2.) * T;
     93    return _Energy = Coulomb * theZARatio * theZARatio + (3./2.) * T;
    9594                                                       
    9695}
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroTemperature.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroTemperature.cc,v 1.5 2006/06/29 20:25:21 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroTemperature.cc,v 1.7 2008/11/19 14:33:31 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
    3131// by V. Lara
    32 
     32//
     33// Modified:
     34// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
     35//          Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
     36//          Moscow, pshenich@fias.uni-frankfurt.de) make algorithm closer to
     37//          original MF model
    3338
    3439#include "G4StatMFMacroTemperature.hh"
     
    5964
    6065G4double G4StatMFMacroTemperature::CalcTemperature(void)
    61     //  Calculate Chemical potential \nu
    6266{
    63     // Temperature
    64     G4double Ta = 0.00012;
     67    // Inital guess for the interval of the ensemble temperature values
     68    G4double Ta = 0.5;
    6569    G4double Tb = std::max(std::sqrt(_ExEnergy/(theA*0.12)),0.01*MeV);
    6670   
     
    7175    // T should be greater than 0.
    7276    // The interval is [Ta,Tb]
    73     // We start with a low value for Ta = 0.0012 K
     77    // We start with a value for Ta = 0.5 MeV
    7478    // it should be enough to have fTa > 0 If it isn't
    7579    // the case, we decrease Ta. But carefully, because
     
    8589    iterations = 0; 
    8690    while (fTa*fTb > 0.0 && iterations++ < 10) {
    87         Tb += 1.5*std::abs(Tb-Ta);
     91        Tb += 2.*std::abs(Tb-Ta);
    8892        fTb = this->operator()(Tb);
    8993    }
    9094       
    9195    if (fTa*fTb > 0.0) {
    92         throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::CalcTemperature: I couldn't bracket    the solution.");
     96      G4cerr <<"G4StatMFMacroTemperature:"<<" Ta="<<Ta<<" Tb="<<Tb<< G4endl;
     97      G4cerr <<"G4StatMFMacroTemperature:"<<" fTa="<<fTa<<" fTb="<<fTb<< G4endl;
     98        throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::CalcTemperature: I couldn't bracket the solution.");
    9399    }
    94100
    95101    G4Solver<G4StatMFMacroTemperature> * theSolver = new G4Solver<G4StatMFMacroTemperature>(100,1.e-4);
    96102    theSolver->SetIntervalLimits(Ta,Tb);
    97     //    if (!theSolver->Crenshaw(*this))
    98     if (!theSolver->Brent(*this))
    99         throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::CalcTemperature: I couldn't find the root.");
     103    if (!theSolver->Crenshaw(*this)){
     104      G4cerr <<"G4StatMFMacroTemperature, Crenshaw method failed:"<<" Ta="<<Ta<<" Tb="<<Tb<< G4endl;
     105      G4cerr <<"G4StatMFMacroTemperature, Crenshaw method failed:"<<" fTa="<<fTa<<" fTb="<<fTb<< G4endl;
     106    }
    100107    _MeanTemperature = theSolver->GetRoot();
    101     delete theSolver;
     108    G4double FunctionValureAtRoot =  this->operator()(_MeanTemperature);
     109    delete  theSolver;
     110
     111    // Verify if the root is found and it is indeed within the physical domain,
     112    // say, between 1 and 50 MeV, otherwise try Brent method:
     113    if (_MeanTemperature < 1. || _MeanTemperature > 50. || std::abs(FunctionValureAtRoot) > 5.e-2) {
     114    G4cout << "Crenshaw method failed; function = " << FunctionValureAtRoot << " solution? = " << _MeanTemperature << " MeV " << G4endl;
     115    G4Solver<G4StatMFMacroTemperature> * theSolverBrent = new G4Solver<G4StatMFMacroTemperature>(200,1.e-3);
     116    theSolverBrent->SetIntervalLimits(Ta,Tb);
     117    if (!theSolverBrent->Brent(*this)){
     118      G4cerr <<"G4StatMFMacroTemperature, Brent method failed:"<<" Ta="<<Ta<<" Tb="<<Tb<< G4endl;
     119      G4cerr <<"G4StatMFMacroTemperature, Brent method failed:"<<" fTa="<<fTa<<" fTb="<<fTb<< G4endl;
     120        throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::CalcTemperature: I couldn't find the root with any method.");
     121    }
     122
     123    _MeanTemperature = theSolverBrent->GetRoot();
     124    FunctionValureAtRoot =  this->operator()(_MeanTemperature);
     125    delete theSolverBrent;
     126
     127     if (_MeanTemperature < 1. || _MeanTemperature > 50. || std::abs(FunctionValureAtRoot) > 5.e-2) {
     128    G4cout << "Brent method failed; function = " << FunctionValureAtRoot << " solution? = " << _MeanTemperature << " MeV " << G4endl;
     129        throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroTemperature::CalcTemperature: I couldn't find the root with any method.");
     130     }
     131    }
     132
    102133    return _MeanTemperature;
    103134}
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroTetraNucleon.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroTetraNucleon.cc,v 1.5 2006/06/29 20:25:23 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroTetraNucleon.cc,v 1.7 2008/10/24 22:57:07 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    7878        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    7979
    80     const G4double BindingE = G4NucleiPropertiesTable::GetBindingEnergy(2,theA); //old value was 30.11*MeV
     80    const G4double BindingE = G4NucleiProperties::GetBindingEnergy(theA,2); //old value was 30.11*MeV
    8181       
    8282    G4double exponent = (BindingE + theA*(mu+nu*theZARatio+T*T/_InvLevelDensity) -
     
    9797        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    9898                                                                       
    99     return _Energy  = -G4NucleiPropertiesTable::GetBindingEnergy(2,theA) +
     99    return _Energy  = -G4NucleiProperties::GetBindingEnergy(theA,2) +
    100100        Coulomb * theZARatio * theZARatio * std::pow(static_cast<G4double>(theA),5./3.) +
    101101        (3./2.) * T +
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroTriNucleon.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMacroTriNucleon.cc,v 1.5 2006/06/29 20:25:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMacroTriNucleon.cc,v 1.7 2008/10/24 22:57:24 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
     
    7070        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    7171
    72     const G4double BindingE = G4NucleiPropertiesTable::GetBindingEnergy(1,theA); // old value was 9.224*MeV
    73 //                                                      + G4NucleiProperties::GetBindingEnergy(2,theA);
     72    const G4double BindingE = G4NucleiProperties::GetBindingEnergy(theA,1); // old value was 9.224*MeV
     73//                                                      + G4NucleiProperties::GetBindingEnergy(theA,2);
    7474
    7575    G4double exponent = (BindingE+ theA*(mu+nu*theZARatio) -
     
    9090        (1.0 - 1.0/std::pow(1.0+G4StatMFParameters::GetKappaCoulomb(),1./3.));
    9191                                                                       
    92     return _Energy  = -G4NucleiPropertiesTable::GetBindingEnergy(1,theA) +
     92    return _Energy  = -G4NucleiProperties::GetBindingEnergy(theA,1) +
    9393        Coulomb * theZARatio * theZARatio * std::pow(static_cast<G4double>(theA),5./3.) +
    9494        (3./2.) * T;
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMicroCanonical.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMicroCanonical.cc,v 1.6 2006/06/29 20:25:27 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMicroCanonical.cc,v 1.7 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMicroManager.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMicroManager.cc,v 1.5 2006/06/29 20:25:29 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMicroManager.cc,v 1.6 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMicroPartition.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFMicroPartition.cc,v 1.7 2006/06/29 20:25:31 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFMicroPartition.cc,v 1.8 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// by V. Lara
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFParameters.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFParameters.cc,v 1.4 2006/06/29 20:25:33 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4StatMFParameters.cc,v 1.5 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4VMultiFragmentation.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4VMultiFragmentation.cc,v 1.5 2006/06/29 20:25:35 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VMultiFragmentation.cc,v 1.6 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4VStatMFEnsemble.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4VStatMFEnsemble.cc,v 1.5 2006/06/29 20:25:37 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VStatMFEnsemble.cc,v 1.6 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
  • trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4VStatMFMacroCluster.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4VStatMFMacroCluster.cc,v 1.4 2006/06/29 20:25:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VStatMFMacroCluster.cc,v 1.5 2008/07/25 11:20:47 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
Note: See TracChangeset for help on using the changeset viewer.