45 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator= meant to not be accessable");
51 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator== meant to not be accessable");
58 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator!= meant to not be accessable");
74 G4double ZA5 = _theClusters->operator[](4)->GetZARatio();
75 G4double ILD5 = _theClusters->operator[](4)->GetInvLevelDensity();
77 _MeanTemperature*_MeanTemperature/ILD5 -
78 _ChemPotentialNu*ZA5 +
81 (5.0/3.0)*CP*ZA5*ZA5*std::pow(5.,2./3.) -
82 1.5*_MeanTemperature/5.0;
87 if (ChemPa/_MeanTemperature > 10.0) ChemPa = 10.0*_MeanTemperature;
88 G4double ChemPb = ChemPa - 0.5*std::abs(ChemPa);
100 G4int iterations = 0;
101 while (fChemPa*fChemPb > 0.0 && iterations < 100)
103 if (std::abs(fChemPa) <= std::abs(fChemPb))
105 ChemPa += 0.6*(ChemPa-ChemPb);
111 ChemPb += 0.6*(ChemPb-ChemPa);
117 if (fChemPa*fChemPb > 0.0)
119 G4cerr <<
"G4StatMFMacroMultiplicity:"<<
" ChemPa="<<ChemPa<<
" ChemPb="<<ChemPb<<
G4endl;
120 G4cerr <<
"G4StatMFMacroMultiplicity:"<<
" fChemPa="<<fChemPa<<
" fChemPb="<<fChemPb<<
G4endl;
121 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't bracket the root.");
123 else if (fChemPa*fChemPb < 0.0 && std::abs(ChemPa-ChemPb) > intervalWidth)
128 if (!theSolver->
Brent(*
this))
130 G4cerr <<
"G4StatMFMacroMultiplicity:"<<
" ChemPa="<<ChemPa<<
" ChemPb="<<ChemPb<<
G4endl;
131 G4cerr <<
"G4StatMFMacroMultiplicity:"<<
" fChemPa="<<fChemPa<<
" fChemPb="<<fChemPb<<
G4endl;
132 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't find the root.");
134 _ChemPotentialMu = theSolver->
GetRoot();
139 _ChemPotentialMu = ChemPa;
142 return _ChemPotentialMu;
154 _MeanMultiplicity = 0.0;
158 for (std::vector<G4VStatMFMacroCluster*>::iterator i = _theClusters->begin();
159 i != _theClusters->end(); ++i)
161 G4double multip = (*i)->CalcMeanMultiplicity(V0*_Kappa,mu,_ChemPotentialNu,_MeanTemperature);
162 MeanA += multip*
static_cast<G4double>(n++);
163 _MeanMultiplicity += multip;