Geant4  10.02.p03
G4StatMFMacroMultiplicity Class Reference

#include <G4StatMFMacroMultiplicity.hh>

Collaboration diagram for G4StatMFMacroMultiplicity:

Public Member Functions

 G4StatMFMacroMultiplicity (const G4double anA, const G4double kappa, const G4double temp, const G4double nu, std::vector< G4VStatMFMacroCluster *> *ClusterVector)
 
 ~G4StatMFMacroMultiplicity ()
 
G4double operator() (const G4double mu)
 
G4double GetMeanMultiplicity (void) const
 
G4double GetChemicalPotentialMu (void) const
 
G4double CalcChemicalPotentialMu (void)
 

Private Member Functions

 G4StatMFMacroMultiplicity ()
 
 G4StatMFMacroMultiplicity (const G4StatMFMacroMultiplicity &)
 
G4StatMFMacroMultiplicityoperator= (const G4StatMFMacroMultiplicity &right)
 
G4bool operator== (const G4StatMFMacroMultiplicity &right) const
 
G4bool operator!= (const G4StatMFMacroMultiplicity &right) const
 
G4double CalcMeanA (const G4double mu)
 

Private Attributes

G4double theA
 
G4double _Kappa
 
G4double _MeanMultiplicity
 
G4double _MeanTemperature
 
G4double _ChemPotentialMu
 
G4double _ChemPotentialNu
 
std::vector< G4VStatMFMacroCluster * > * _theClusters
 

Detailed Description

Definition at line 43 of file G4StatMFMacroMultiplicity.hh.

Constructor & Destructor Documentation

◆ G4StatMFMacroMultiplicity() [1/3]

G4StatMFMacroMultiplicity::G4StatMFMacroMultiplicity ( const G4double  anA,
const G4double  kappa,
const G4double  temp,
const G4double  nu,
std::vector< G4VStatMFMacroCluster *> *  ClusterVector 
)
inline

Definition at line 47 of file G4StatMFMacroMultiplicity.hh.

◆ ~G4StatMFMacroMultiplicity()

G4StatMFMacroMultiplicity::~G4StatMFMacroMultiplicity ( )
inline

Definition at line 61 of file G4StatMFMacroMultiplicity.hh.

61 {};

◆ G4StatMFMacroMultiplicity() [2/3]

G4StatMFMacroMultiplicity::G4StatMFMacroMultiplicity ( )
inlineprivate

Definition at line 68 of file G4StatMFMacroMultiplicity.hh.

68 {};

◆ G4StatMFMacroMultiplicity() [3/3]

G4StatMFMacroMultiplicity::G4StatMFMacroMultiplicity ( const G4StatMFMacroMultiplicity )
inlineprivate

Definition at line 71 of file G4StatMFMacroMultiplicity.hh.

71 {};
Here is the call graph for this function:

Member Function Documentation

◆ CalcChemicalPotentialMu()

G4double G4StatMFMacroMultiplicity::CalcChemicalPotentialMu ( void  )

Definition at line 63 of file G4StatMFMacroMultiplicity.cc.

66 {
67  G4Pow* g4pow = G4Pow::GetInstance();
69 
70  // starting value for chemical potential \mu
71  // it is the derivative of F(T,V)-\nu*Z w.r.t. Af in Af=5
72  G4double ZA5 = _theClusters->operator[](4)->GetZARatio();
73  G4double ILD5 = _theClusters->operator[](4)->GetInvLevelDensity();
76  _ChemPotentialNu*ZA5 +
77  G4StatMFParameters::GetGamma0()*(1.0-2.0*ZA5)*(1.0-2.0*ZA5) +
78  (2.0/3.0)*G4StatMFParameters::Beta(_MeanTemperature)/g4pow->Z13(5) +
79  (5.0/3.0)*CP*ZA5*ZA5*g4pow->Z23(5) -
80  1.5*_MeanTemperature/5.0;
81 
82  G4double ChemPa = _ChemPotentialMu;
83  if (ChemPa/_MeanTemperature > 10.0) ChemPa = 10.0*_MeanTemperature;
84  G4double ChemPb = ChemPa - 0.5*std::abs(ChemPa);
85 
86  G4double fChemPa = this->operator()(ChemPa);
87  G4double fChemPb = this->operator()(ChemPb);
88 
89  // Set the precision level for locating the root.
90  // If the root is inside this interval, then it's done!
91  const G4double intervalWidth = 1.e-4;
92 
93  // bracketing the solution
94  G4int iterations = 0;
95  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
96  while (fChemPa*fChemPb > 0.0 && iterations < 100)
97  {
98  iterations++;
99  if (std::abs(fChemPa) <= std::abs(fChemPb))
100  {
101  ChemPa += 0.6*(ChemPa-ChemPb);
102  fChemPa = this->operator()(ChemPa);
103  }
104  else
105  {
106  ChemPb += 0.6*(ChemPb-ChemPa);
107  fChemPb = this->operator()(ChemPb);
108  }
109  }
110 
111  if (fChemPa*fChemPb > 0.0) // the bracketing failed, complain
112  {
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.");
118  }
119  else if (fChemPa*fChemPb < 0.0 && std::abs(ChemPa-ChemPb) > intervalWidth)
120  {
122  new G4Solver<G4StatMFMacroMultiplicity>(100,intervalWidth);
123  theSolver->SetIntervalLimits(ChemPa,ChemPb);
124  // if (!theSolver->Crenshaw(*this))
125  if (!theSolver->Brent(*this))
126  {
127  G4cout <<"G4StatMFMacroMultiplicity:"<<" ChemPa="<<ChemPa
128  <<" ChemPb="<<ChemPb<< G4endl;
129  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroMultiplicity::CalcChemicalPotentialMu: I couldn't find the root.");
130  }
131  _ChemPotentialMu = theSolver->GetRoot();
132  delete theSolver;
133  }
134  else // the root is within the interval, which is shorter then the precision level - all done
135  {
136  _ChemPotentialMu = ChemPa;
137  }
138 
139  return _ChemPotentialMu;
140 }
static G4double GetGamma0()
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
Definition: G4Pow.hh:56
void SetIntervalLimits(const G4double Limit1, const G4double Limit2)
int G4int
Definition: G4Types.hh:78
G4bool Brent(Function &theFunction)
G4GLOB_DLL std::ostream G4cout
static G4double GetE0()
std::vector< G4VStatMFMacroCluster * > * _theClusters
G4double Z13(G4int Z) const
Definition: G4Pow.hh:127
static G4double GetCoulomb()
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4double Beta(G4double T)
G4double Z23(G4int Z) const
Definition: G4Pow.hh:154
G4double GetRoot(void) const
Definition: G4Solver.hh:77
G4double operator()(const G4double mu)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalcMeanA()

G4double G4StatMFMacroMultiplicity::CalcMeanA ( const G4double  mu)
private

Definition at line 142 of file G4StatMFMacroMultiplicity.cc.

143 {
145  G4double V0 = (4.0/3.0)*pi*theA*r0*r0*r0;
146 
147  G4double MeanA = 0.0;
148 
149  _MeanMultiplicity = 0.0;
150 
151  G4int n = 1;
152  for (std::vector<G4VStatMFMacroCluster*>::iterator i = _theClusters->begin();
153  i != _theClusters->end(); ++i)
154  {
155  G4double multip = (*i)->CalcMeanMultiplicity(V0*_Kappa,mu,_ChemPotentialNu,
157  MeanA += multip*(n++);
158  _MeanMultiplicity += multip;
159  }
160 
161  return MeanA;
162 }
int G4int
Definition: G4Types.hh:78
static G4double Getr0()
Char_t n[5]
std::vector< G4VStatMFMacroCluster * > * _theClusters
static const double pi
Definition: G4SIunits.hh:74
double G4double
Definition: G4Types.hh:76
const G4double r0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetChemicalPotentialMu()

G4double G4StatMFMacroMultiplicity::GetChemicalPotentialMu ( void  ) const
inline

Definition at line 83 of file G4StatMFMacroMultiplicity.hh.

Here is the call graph for this function:

◆ GetMeanMultiplicity()

G4double G4StatMFMacroMultiplicity::GetMeanMultiplicity ( void  ) const
inline

Definition at line 81 of file G4StatMFMacroMultiplicity.hh.

Here is the caller graph for this function:

◆ operator!=()

G4bool G4StatMFMacroMultiplicity::operator!= ( const G4StatMFMacroMultiplicity right) const
private

Definition at line 57 of file G4StatMFMacroMultiplicity.cc.

58 {
59  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroMultiplicity::operator!= meant to not be accessable");
60  return true;
61 }
Here is the caller graph for this function:

◆ operator()()

G4double G4StatMFMacroMultiplicity::operator() ( const G4double  mu)
inline

Definition at line 63 of file G4StatMFMacroMultiplicity.hh.

64  { return (theA - this->CalcMeanA(mu))/theA; }
G4double CalcMeanA(const G4double mu)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

G4StatMFMacroMultiplicity & G4StatMFMacroMultiplicity::operator= ( const G4StatMFMacroMultiplicity right)
private

Definition at line 44 of file G4StatMFMacroMultiplicity.cc.

45 {
46  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroMultiplicity::operator= meant to not be accessable");
47  return *this;
48 }
Here is the caller graph for this function:

◆ operator==()

G4bool G4StatMFMacroMultiplicity::operator== ( const G4StatMFMacroMultiplicity right) const
private

Definition at line 50 of file G4StatMFMacroMultiplicity.cc.

51 {
52  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroMultiplicity::operator== meant to not be accessable");
53  return false;
54 }
Here is the caller graph for this function:

Member Data Documentation

◆ _ChemPotentialMu

G4double G4StatMFMacroMultiplicity::_ChemPotentialMu
private

Definition at line 101 of file G4StatMFMacroMultiplicity.hh.

◆ _ChemPotentialNu

G4double G4StatMFMacroMultiplicity::_ChemPotentialNu
private

Definition at line 103 of file G4StatMFMacroMultiplicity.hh.

◆ _Kappa

G4double G4StatMFMacroMultiplicity::_Kappa
private

Definition at line 95 of file G4StatMFMacroMultiplicity.hh.

◆ _MeanMultiplicity

G4double G4StatMFMacroMultiplicity::_MeanMultiplicity
private

Definition at line 97 of file G4StatMFMacroMultiplicity.hh.

◆ _MeanTemperature

G4double G4StatMFMacroMultiplicity::_MeanTemperature
private

Definition at line 99 of file G4StatMFMacroMultiplicity.hh.

◆ _theClusters

std::vector<G4VStatMFMacroCluster*>* G4StatMFMacroMultiplicity::_theClusters
private

Definition at line 105 of file G4StatMFMacroMultiplicity.hh.

◆ theA

G4double G4StatMFMacroMultiplicity::theA
private

Definition at line 93 of file G4StatMFMacroMultiplicity.hh.


The documentation for this class was generated from the following files: