39 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroChemicalPotential::operator= meant to not be accessable");
45 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroChemicalPotential::operator== meant to not be accessable");
52 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroChemicalPotential::operator!= meant to not be accessable");
71 G4double ChemPb = 0.5*_ChemPotentialNu;
76 if (fChemPa*fChemPb > 0.0) {
80 ChemPb -= 1.5*std::abs(ChemPb-ChemPa);
82 }
while (fChemPb < 0.0);
85 ChemPb += 1.5*std::abs(ChemPb-ChemPa);
87 }
while (fChemPb > 0.0);
95 if (!theSolver->
Brent(*
this)){
96 G4cerr <<
"G4StatMFMacroChemicalPotential:"<<
" ChemPa="<<ChemPa<<
" ChemPb="<<ChemPb<<
G4endl;
97 G4cerr <<
"G4StatMFMacroChemicalPotential:"<<
" fChemPa="<<fChemPa<<
" fChemPb="<<fChemPb<<
G4endl;
98 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroChemicalPotential::CalcChemicalPotentialNu: I couldn't find the root.");
100 _ChemPotentialNu = theSolver->
GetRoot();
102 return _ChemPotentialNu;
109 std::vector<G4VStatMFMacroCluster*>::iterator i;
110 for (i= _theClusters->begin()+1; i != _theClusters->end(); ++i)
112 (*i)->CalcZARatio(nu);
114 CalcChemicalPotentialMu(nu);
118 (*_theClusters->begin())->CalcZARatio(nu);
122 for (i = _theClusters->begin(); i != _theClusters->end(); ++i)
124 MeanZ +=
static_cast<G4double>(n++) *
126 (*i)->GetMeanMultiplicity();
132 void G4StatMFMacroChemicalPotential::CalcChemicalPotentialMu(
const G4double nu)
static G4double GetGamma0()
G4double operator()(const G4double nu)
static G4double GetKappaCoulomb()
void SetIntervalLimits(const G4double Limit1, const G4double Limit2)
G4double CalcChemicalPotentialMu(void)
G4bool Brent(Function &theFunction)
G4double GetMeanMultiplicity(void) const
G4double GetRoot(void) const
G4double CalcChemicalPotentialNu(void)
G4GLOB_DLL std::ostream G4cerr