45 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator= meant to not be accessible");
51 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator== meant to not be accessible");
58 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::operator!= meant to not be accessible");
71 G4double ZA5 = _theClusters->operator[](4)->GetZARatio();
72 G4double ILD5 = _theClusters->operator[](4)->GetInvLevelDensity();
74 _MeanTemperature*_MeanTemperature/ILD5 -
75 _ChemPotentialNu*ZA5 +
78 (5.0/3.0)*CP*ZA5*ZA5*g4calc->
Z23(5) -
79 1.5*_MeanTemperature/5.0;
82 if (ChemPa/_MeanTemperature > 10.0) ChemPa = 10.0*_MeanTemperature;
83 G4double ChemPb = ChemPa - 0.5*std::abs(ChemPa);
90 const G4double intervalWidth = 1.e-4;
95 while (fChemPa*fChemPb > 0.0 && iterations < 100)
98 if (std::abs(fChemPa) <= std::abs(fChemPb))
100 ChemPa += 0.6*(ChemPa-ChemPb);
105 ChemPb += 0.6*(ChemPb-ChemPa);
110 if (fChemPa*fChemPb > 0.0)
112 G4cout <<
"G4StatMFMacroMultiplicity:"<<
" ChemPa="<<ChemPa
113 <<
" ChemPb="<<ChemPb<<
G4endl;
114 G4cout <<
"G4StatMFMacroMultiplicity:"<<
" fChemPa="<<fChemPa
115 <<
" fChemPb="<<fChemPb<<
G4endl;
116 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't bracket the root.");
118 else if (fChemPa*fChemPb < 0.0 && std::abs(ChemPa-ChemPb) > intervalWidth)
124 if (!theSolver->
Brent(*
this))
126 G4cout <<
"G4StatMFMacroMultiplicity:"<<
" ChemPa="<<ChemPa
127 <<
" ChemPb="<<ChemPb<<
G4endl;
128 throw G4HadronicException(__FILE__, __LINE__,
"G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't find the root.");
130 _ChemPotentialMu = theSolver->
GetRoot();
135 _ChemPotentialMu = ChemPa;
138 return _ChemPotentialMu;
144 G4double V0 = (4.0/3.0)*pi*theA*r0*r0*r0;
148 _MeanMultiplicity = 0.0;
151 for (std::vector<G4VStatMFMacroCluster*>::iterator i = _theClusters->begin();
152 i != _theClusters->end(); ++i)
154 G4double multip = (*i)->CalcMeanMultiplicity(V0*_Kappa,mu,_ChemPotentialNu,
156 MeanA += multip*(n++);
157 _MeanMultiplicity += multip;
G4GLOB_DLL std::ostream G4cout
static G4Pow * GetInstance()
G4double Z13(G4int Z) const
G4double Z23(G4int Z) const
G4bool Brent(Function &theFunction)
void SetIntervalLimits(const G4double Limit1, const G4double Limit2)
G4double GetRoot(void) const
G4double CalcChemicalPotentialMu(void)
G4double operator()(const G4double mu)
static G4double GetGamma0()
static G4double Beta(G4double T)
static G4double GetCoulomb()