CMS 3D CMS Logo

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  fGc.SetStrangePotential(strangePotential);
51 }
NAStrangePotential::fDatabase
DatabasePDG * fDatabase
Definition: StrangePotential.h:29
NAStrangeDensity::SetStrangePotential
void SetStrangePotential(double value)
Definition: StrangeDensity.h:41
NAStrangePotential::fNIteration
int fNIteration
Definition: StrangePotential.h:26
NAStrangePotential::fGc
NAStrangeDensity fGc
Definition: StrangePotential.h:30
NAStrangePotential::fBaryonPotential
double fBaryonPotential
Definition: StrangePotential.h:22
NAStrangePotential::fTolerance
double fTolerance
Definition: StrangePotential.h:28
NAEquationSolver::Brent
bool Brent(Function &theFunction)
NAStrangePotential::fNSolverIteration
int fNSolverIteration
Definition: StrangePotential.h:27
NAStrangePotential::fMaxStrangePotential
double fMaxStrangePotential
Definition: StrangePotential.h:25
NAStrangePotential::fMinStrangePotential
double fMinStrangePotential
Definition: StrangePotential.h:24
Abs
T Abs(T a)
Definition: MathUtil.h:49
NAStrangePotential::operator()
double operator()(const double strangePotential)
Definition: StrangePotential.h:48
NAEquationSolver
Definition: EquationSolver.h:18
NAEquationSolver::GetRoot
double GetRoot(void) const
Definition: EquationSolver.h:61
NAStrangeDensity::SetTemperature
void SetTemperature(double value)
Definition: StrangeDensity.h:39
NAStrangePotential::CalculateStrangeDensity
double CalculateStrangeDensity(const double strangePotential)
Definition: StrangePotential.cc:46
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
NAEquationSolver::SetIntervalLimits
void SetIntervalLimits(const double Limit1, const double Limit2)
NAStrangeDensity::StrangenessDensity
double StrangenessDensity(DatabasePDG *database)
Definition: StrangeDensity.cc:11
NAStrangeDensity::SetBaryonPotential
void SetBaryonPotential(double value)
Definition: StrangeDensity.h:40
NAStrangePotential::fTemperature
double fTemperature
Definition: StrangePotential.h:21
StrangePotential.h
edm::Log
Definition: MessageLogger.h:70
NAStrangePotential::CalculateStrangePotential
double CalculateStrangePotential()
Definition: StrangePotential.cc:11