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");
72 G4double ZA5 = _theClusters->operator[](4)->GetZARatio();
73 G4double ILD5 = _theClusters->operator[](4)->GetInvLevelDensity();
75 _MeanTemperature*_MeanTemperature/ILD5 -
76 _ChemPotentialNu*ZA5 +
79 (5.0/3.0)*CP*ZA5*ZA5*g4calc->
Z23(5) -
80 1.5*_MeanTemperature/5.0;
83 if (ChemPa/_MeanTemperature > 10.0) ChemPa = 10.0*_MeanTemperature;
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.");
131 _ChemPotentialMu = theSolver->
GetRoot();
136 _ChemPotentialMu = ChemPa;
139 return _ChemPotentialMu;
149 _MeanMultiplicity = 0.0;
152 for (std::vector<G4VStatMFMacroCluster*>::iterator i = _theClusters->begin();
153 i != _theClusters->end(); ++i)
155 G4double multip = (*i)->CalcMeanMultiplicity(V0*_Kappa,mu,_ChemPotentialNu,
157 MeanA += multip*(n++);
158 _MeanMultiplicity += multip;
static G4double GetGamma0()
static G4Pow * GetInstance()
void SetIntervalLimits(const G4double Limit1, const G4double Limit2)
G4double CalcChemicalPotentialMu(void)
G4bool Brent(Function &theFunction)
G4GLOB_DLL std::ostream G4cout
G4double Z13(G4int Z) const
G4double GetRoot(void) const
static G4double GetCoulomb()
G4double Z23(G4int Z) const
static constexpr double pi
static G4double Beta(G4double T)
G4double operator()(const G4double mu)