CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StrangePotential.cc
Go to the documentation of this file.
1 /*
2 
3 Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna
4 amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru
5 November. 2, 2006
6 
7 */
8 
10 
12  double minFunction = this->operator()(fMinStrangePotential);
13  double maxFunction = this->operator()(fMaxStrangePotential);
14 
15  int iter = 0;
16  while(minFunction < 0.0 && iter++ < fNIteration) {
18  minFunction = this->operator()(fMinStrangePotential);
19  }
20 
21  iter = 0;
22  while(minFunction*maxFunction > 0.0 && iter++ < fNIteration) {
24  maxFunction = this->operator()(fMaxStrangePotential);
25  }
26 
27  if(minFunction*maxFunction > 0.0) {
28  edm::LogError("StrangePotential") << "CalculateStrangePotential: minFunction*maxFunction is positive!";
29  return 0.;
30  }
31 
34 
36 
37  if (!theSolver->Brent(*this))
38  edm::LogError("StrangePotential") << "CalculateStrangePotential: the root is not found!";
39 
40  double strangePotential = theSolver->GetRoot();
41  delete theSolver;
42  return strangePotential;
43 }
44 
45 //calculate hadron system strange density
46 double NAStrangePotential::CalculateStrangeDensity(const double strangePotential)
47 {
48  fGc.SetStrangePotential(strangePotential);
52 }
void SetBaryonPotential(double value)
double CalculateStrangePotential()
double GetRoot(void) const
T Abs(T a)
Definition: MathUtil.h:49
NAStrangeDensity fGc
DatabasePDG * fDatabase
double StrangenessDensity(DatabasePDG *database)
bool Brent(Function &theFunction)
void SetStrangePotential(double value)
double CalculateStrangeDensity(const double strangePotential)
double operator()(const double strangePotential)
void SetTemperature(double value)
void SetIntervalLimits(const double Limit1, const double Limit2)