46 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator= meant to not be accessable");
52 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator== meant to not be accessable");
59 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator!= meant to not be accessable");
79 (5.0/3.0)*CP*ZA5*ZA5*g4calc->
Z23(5) -
84 G4double ChemPb = ChemPa - 0.5*std::abs(ChemPa);
91 const G4double intervalWidth = 1.e-4;
96 while (fChemPa*fChemPb > 0.0 && iterations < 100)
99 if (std::abs(fChemPa) <= std::abs(fChemPb))
101 ChemPa += 0.6*(ChemPa-ChemPb);
106 ChemPb += 0.6*(ChemPb-ChemPa);
111 if (fChemPa*fChemPb > 0.0)
113 G4cout <<
"G4StatMFMacroMultiplicity:"<<
" ChemPa="<<ChemPa
114 <<
" ChemPb="<<ChemPb<<
G4endl;
115 G4cout <<
"G4StatMFMacroMultiplicity:"<<
" fChemPa="<<fChemPa
116 <<
" fChemPb="<<fChemPb<<
G4endl;
117 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't bracket the root.");
119 else if (fChemPa*fChemPb < 0.0 && std::abs(ChemPa-ChemPb) > intervalWidth)
125 if (!theSolver->
Brent(*
this))
127 G4cout <<
"G4StatMFMacroMultiplicity:"<<
" ChemPa="<<ChemPa
128 <<
" ChemPb="<<ChemPb<<
G4endl;
129 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't find the root.");
152 for (std::vector<G4VStatMFMacroCluster*>::iterator i =
_theClusters->begin();
157 MeanA += multip*(n++);
G4double Z13(G4int Z) const
G4double CalcChemicalPotentialMu(void)
G4StatMFMacroMultiplicity & operator=(const G4StatMFMacroMultiplicity &right)
G4double _MeanMultiplicity
std::vector< G4VStatMFMacroCluster * > * _theClusters
G4bool operator!=(const G4StatMFMacroMultiplicity &right) const
G4double _ChemPotentialMu
static G4double GetCoulomb()
G4bool operator==(const G4StatMFMacroMultiplicity &right) const
G4double _ChemPotentialNu
static G4Pow * GetInstance()
G4double GetRoot(void) const
G4double operator()(const G4double mu)
void SetIntervalLimits(const G4double Limit1, const G4double Limit2)
static G4double Beta(G4double T)
G4GLOB_DLL std::ostream G4cout
G4double _MeanTemperature
static constexpr double pi
G4double CalcMeanA(const G4double mu)
G4bool Brent(Function &theFunction)
G4double Z23(G4int Z) const
static G4double GetGamma0()