Geant4  10.02.p03
G4StatMFMacroChemicalPotential Class Reference

#include <G4StatMFMacroChemicalPotential.hh>

Collaboration diagram for G4StatMFMacroChemicalPotential:

Public Member Functions

 G4StatMFMacroChemicalPotential (const G4double anA, const G4double aZ, const G4double kappa, const G4double temp, std::vector< G4VStatMFMacroCluster *> *ClusterVector)
 
 ~G4StatMFMacroChemicalPotential ()
 
G4double operator() (const G4double nu)
 
G4double GetMeanMultiplicity (void) const
 
G4double GetChemicalPotentialMu (void) const
 
G4double GetChemicalPotentialNu (void) const
 
G4double CalcChemicalPotentialNu (void)
 

Private Member Functions

 G4StatMFMacroChemicalPotential ()
 
 G4StatMFMacroChemicalPotential (const G4StatMFMacroChemicalPotential &)
 
G4StatMFMacroChemicalPotentialoperator= (const G4StatMFMacroChemicalPotential &right)
 
G4bool operator== (const G4StatMFMacroChemicalPotential &right) const
 
G4bool operator!= (const G4StatMFMacroChemicalPotential &right) const
 
G4double CalcMeanZ (const G4double nu)
 
void CalcChemicalPotentialMu (const G4double nu)
 

Private Attributes

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

Detailed Description

Definition at line 44 of file G4StatMFMacroChemicalPotential.hh.

Constructor & Destructor Documentation

◆ G4StatMFMacroChemicalPotential() [1/3]

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

◆ ~G4StatMFMacroChemicalPotential()

G4StatMFMacroChemicalPotential::~G4StatMFMacroChemicalPotential ( )
inline

Definition at line 62 of file G4StatMFMacroChemicalPotential.hh.

62 {};

◆ G4StatMFMacroChemicalPotential() [2/3]

G4StatMFMacroChemicalPotential::G4StatMFMacroChemicalPotential ( )
inlineprivate

Definition at line 69 of file G4StatMFMacroChemicalPotential.hh.

69 {};

◆ G4StatMFMacroChemicalPotential() [3/3]

G4StatMFMacroChemicalPotential::G4StatMFMacroChemicalPotential ( const G4StatMFMacroChemicalPotential )
inlineprivate

Definition at line 72 of file G4StatMFMacroChemicalPotential.hh.

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

Member Function Documentation

◆ CalcChemicalPotentialMu()

void G4StatMFMacroChemicalPotential::CalcChemicalPotentialMu ( const G4double  nu)
private

Definition at line 131 of file G4StatMFMacroChemicalPotential.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalcChemicalPotentialNu()

G4double G4StatMFMacroChemicalPotential::CalcChemicalPotentialNu ( void  )

Definition at line 57 of file G4StatMFMacroChemicalPotential.cc.

59 {
60  G4Pow* g4pow = G4Pow::GetInstance();
62 
63  // Initial value for _ChemPotentialNu
65  +2.0*CP*g4pow->Z23(theA))
67 
68  G4double ChemPa = _ChemPotentialNu;
69  G4double ChemPb = 0.5*_ChemPotentialNu;
70 
71  G4double fChemPa = this->operator()(ChemPa);
72  G4double fChemPb = this->operator()(ChemPb);
73 
74  if (fChemPa*fChemPb > 0.0) {
75  // bracketing the solution
76  if (fChemPa < 0.0) {
77  do {
78  ChemPb -= 1.5*std::abs(ChemPb-ChemPa);
79  fChemPb = this->operator()(ChemPb);
80  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
81  } while (fChemPb < 0.0);
82  } else {
83  do {
84  ChemPb += 1.5*std::abs(ChemPb-ChemPa);
85  fChemPb = this->operator()(ChemPb);
86  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
87  } while (fChemPb > 0.0);
88  }
89  }
90 
93  theSolver->SetIntervalLimits(ChemPa,ChemPb);
94  // if (!theSolver->Crenshaw(*this))
95  if (!theSolver->Brent(*this)){
96  G4cout <<"G4StatMFMacroChemicalPotential:"<<" ChemPa="<<ChemPa
97  <<" ChemPb="<<ChemPb<< G4endl;
98  G4cout <<"G4StatMFMacroChemicalPotential:"<<" fChemPa="<<fChemPa
99  <<" fChemPb="<<fChemPb<< G4endl;
100  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroChemicalPotential::CalcChemicalPotentialNu: I couldn't find the root.");
101  }
102  _ChemPotentialNu = theSolver->GetRoot();
103  delete theSolver;
104  return _ChemPotentialNu;
105 }
static G4double GetGamma0()
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
Definition: G4Pow.hh:56
void SetIntervalLimits(const G4double Limit1, const G4double Limit2)
G4bool Brent(Function &theFunction)
G4GLOB_DLL std::ostream G4cout
static G4double GetCoulomb()
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double Z23(G4int Z) const
Definition: G4Pow.hh:154
G4double GetRoot(void) const
Definition: G4Solver.hh:77
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalcMeanZ()

G4double G4StatMFMacroChemicalPotential::CalcMeanZ ( const G4double  nu)
private

Definition at line 109 of file G4StatMFMacroChemicalPotential.cc.

110 {
111  std::vector<G4VStatMFMacroCluster*>::iterator i;
112  for (i= _theClusters->begin()+1; i != _theClusters->end(); ++i)
113  {
114  (*i)->CalcZARatio(nu);
115  }
117  // This is important, the Z over A ratio for proton and neutron depends on the
118  // chemical potential Mu, while for the first guess for Chemical potential mu
119  // some values of Z over A ratio. This is the reason for that.
120  (*_theClusters->begin())->CalcZARatio(nu);
121 
122  G4double MeanZ = 0.0;
123  G4int n = 1;
124  for (i = _theClusters->begin(); i != _theClusters->end(); ++i)
125  {
126  MeanZ += (n++) * (*i)->GetZARatio() * (*i)->GetMeanMultiplicity();
127  }
128  return MeanZ;
129 }
std::vector< G4VStatMFMacroCluster * > * _theClusters
int G4int
Definition: G4Types.hh:78
Char_t n[5]
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetChemicalPotentialMu()

G4double G4StatMFMacroChemicalPotential::GetChemicalPotentialMu ( void  ) const
inline

Definition at line 84 of file G4StatMFMacroChemicalPotential.hh.

Here is the caller graph for this function:

◆ GetChemicalPotentialNu()

G4double G4StatMFMacroChemicalPotential::GetChemicalPotentialNu ( void  ) const
inline

Definition at line 86 of file G4StatMFMacroChemicalPotential.hh.

Here is the call graph for this function:

◆ GetMeanMultiplicity()

G4double G4StatMFMacroChemicalPotential::GetMeanMultiplicity ( void  ) const
inline

Definition at line 82 of file G4StatMFMacroChemicalPotential.hh.

Here is the caller graph for this function:

◆ operator!=()

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

Definition at line 51 of file G4StatMFMacroChemicalPotential.cc.

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

◆ operator()()

G4double G4StatMFMacroChemicalPotential::operator() ( const G4double  nu)
inline

Definition at line 64 of file G4StatMFMacroChemicalPotential.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

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

Definition at line 38 of file G4StatMFMacroChemicalPotential.cc.

39 {
40  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMacroChemicalPotential::operator= meant to not be accessable");
41  return *this;
42 }
Here is the caller graph for this function:

◆ operator==()

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

Definition at line 44 of file G4StatMFMacroChemicalPotential.cc.

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

Member Data Documentation

◆ _ChemPotentialMu

G4double G4StatMFMacroChemicalPotential::_ChemPotentialMu
private

Definition at line 108 of file G4StatMFMacroChemicalPotential.hh.

◆ _ChemPotentialNu

G4double G4StatMFMacroChemicalPotential::_ChemPotentialNu
private

Definition at line 110 of file G4StatMFMacroChemicalPotential.hh.

◆ _Kappa

G4double G4StatMFMacroChemicalPotential::_Kappa
private

Definition at line 102 of file G4StatMFMacroChemicalPotential.hh.

◆ _MeanMultiplicity

G4double G4StatMFMacroChemicalPotential::_MeanMultiplicity
private

Definition at line 104 of file G4StatMFMacroChemicalPotential.hh.

◆ _MeanTemperature

G4double G4StatMFMacroChemicalPotential::_MeanTemperature
private

Definition at line 106 of file G4StatMFMacroChemicalPotential.hh.

◆ _theClusters

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

Definition at line 112 of file G4StatMFMacroChemicalPotential.hh.

◆ theA

G4double G4StatMFMacroChemicalPotential::theA
private

Definition at line 98 of file G4StatMFMacroChemicalPotential.hh.

◆ theZ

G4double G4StatMFMacroChemicalPotential::theZ
private

Definition at line 100 of file G4StatMFMacroChemicalPotential.hh.


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