Geant4  10.02.p03
G4StatMFMicroManager Class Reference

#include <G4StatMFMicroManager.hh>

Collaboration diagram for G4StatMFMicroManager:

Classes

struct  DeleteFragment
 

Public Member Functions

 G4StatMFMicroManager (const G4Fragment &theFragment, G4int multiplicity, G4double FreeIntE, G4double SCompNuc)
 
 ~G4StatMFMicroManager ()
 
G4bool operator== (const G4StatMFMicroManager &right) const
 
G4bool operator!= (const G4StatMFMicroManager &right) const
 
G4StatMFChannelChooseChannel (G4int A0, G4int Z0, G4double MeanT)
 
G4double GetProbability (void) const
 
void Normalize (G4double Norm)
 
G4double GetMeanMultiplicity (void) const
 
G4double GetMeanTemperature (void) const
 
G4double GetMeanEntropy (void) const
 

Private Member Functions

 G4StatMFMicroManager ()
 
 G4StatMFMicroManager (const G4StatMFMicroManager &right)
 
G4StatMFMicroManageroperator= (const G4StatMFMicroManager &right)
 
void Initialize (const G4Fragment &theFragment, G4int m, G4double FreeIntE, G4double SCompNuc)
 
G4bool MakePartition (G4int k, G4int *ANumbers)
 

Private Attributes

std::vector< G4StatMFMicroPartition * > _Partition
 
G4double _WW
 
G4double _Normalization
 
G4double _MeanMultiplicity
 
G4double _MeanTemperature
 
G4double _MeanEntropy
 

Detailed Description

Definition at line 44 of file G4StatMFMicroManager.hh.

Constructor & Destructor Documentation

◆ G4StatMFMicroManager() [1/3]

G4StatMFMicroManager::G4StatMFMicroManager ( const G4Fragment theFragment,
G4int  multiplicity,
G4double  FreeIntE,
G4double  SCompNuc 
)

Definition at line 63 of file G4StatMFMicroManager.cc.

65  :
66  _Normalization(0.0)
67 {
68  // Perform class initialization
69  Initialize(theFragment,multiplicity,FreeIntE,SCompNuc);
70 }
void Initialize(const G4Fragment &theFragment, G4int m, G4double FreeIntE, G4double SCompNuc)
Here is the call graph for this function:

◆ ~G4StatMFMicroManager()

G4StatMFMicroManager::~G4StatMFMicroManager ( )

Definition at line 73 of file G4StatMFMicroManager.cc.

74 {
75  if (!_Partition.empty())
76  {
77  std::for_each(_Partition.begin(),_Partition.end(),
78  DeleteFragment());
79  }
80 }
std::vector< G4StatMFMicroPartition * > _Partition

◆ G4StatMFMicroManager() [2/3]

G4StatMFMicroManager::G4StatMFMicroManager ( )
inlineprivate

Definition at line 58 of file G4StatMFMicroManager.hh.

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

◆ G4StatMFMicroManager() [3/3]

G4StatMFMicroManager::G4StatMFMicroManager ( const G4StatMFMicroManager right)
private

Definition at line 36 of file G4StatMFMicroManager.cc.

37 {
38  throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroManager::copy_constructor meant to not be accessable");
39 }
Here is the call graph for this function:

Member Function Documentation

◆ ChooseChannel()

G4StatMFChannel * G4StatMFMicroManager::ChooseChannel ( G4int  A0,
G4int  Z0,
G4double  MeanT 
)

Definition at line 171 of file G4StatMFMicroManager.cc.

172 {
173  G4double RandNumber = _Normalization * _WW * G4UniformRand();
174  G4double AccumWeight = 0.0;
175 
176  for (std::vector<G4StatMFMicroPartition*>::iterator i = _Partition.begin();
177  i != _Partition.end(); ++i)
178  {
179  AccumWeight += (*i)->GetProbability();
180  if (RandNumber < AccumWeight)
181  return (*i)->ChooseZ(A0,Z0,MeanT);
182  }
183 
184  throw G4HadronicException(__FILE__, __LINE__,
185  "G4StatMFMicroCanonical::ChooseChannel: Couldn't find a channel.");
186  return 0;
187 }
std::vector< G4StatMFMicroPartition * > _Partition
#define G4UniformRand()
Definition: Randomize.hh:97
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ GetMeanEntropy()

G4double G4StatMFMicroManager::GetMeanEntropy ( void  ) const
inline

Definition at line 86 of file G4StatMFMicroManager.hh.

86 {return _MeanEntropy; }
Here is the call graph for this function:

◆ GetMeanMultiplicity()

G4double G4StatMFMicroManager::GetMeanMultiplicity ( void  ) const
inline

Definition at line 82 of file G4StatMFMicroManager.hh.

◆ GetMeanTemperature()

G4double G4StatMFMicroManager::GetMeanTemperature ( void  ) const
inline

Definition at line 84 of file G4StatMFMicroManager.hh.

84 {return _MeanTemperature; }

◆ GetProbability()

G4double G4StatMFMicroManager::GetProbability ( void  ) const
inline

Definition at line 78 of file G4StatMFMicroManager.hh.

78 {return _WW;}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

void G4StatMFMicroManager::Initialize ( const G4Fragment theFragment,
G4int  m,
G4double  FreeIntE,
G4double  SCompNuc 
)
private

Definition at line 82 of file G4StatMFMicroManager.cc.

84 {
85  G4int i;
86 
87  G4double U = theFragment.GetExcitationEnergy();
88 
89  G4int A = theFragment.GetA_asInt();
90  G4int Z = theFragment.GetZ_asInt();
91 
92  // Statistical weights
93  _WW = 0.0;
94 
95  // Mean breakup multiplicity
96  _MeanMultiplicity = 0.0;
97 
98  // Mean channel temperature
99  _MeanTemperature = 0.0;
100 
101  // Mean channel entropy
102  _MeanEntropy = 0.0;
103 
104  // Keep fragment atomic numbers
105  // G4int * FragmentAtomicNumbers = new G4int(static_cast<G4int>(A+0.5));
106  // G4int * FragmentAtomicNumbers = new G4int(m);
107  G4int FragmentAtomicNumbers[4];
108 
109  // We distribute A nucleons between m fragments mantaining the order
110  // FragmentAtomicNumbers[m-1]>FragmentAtomicNumbers[m-2]>...>FragmentAtomicNumbers[0]
111  // Our initial distribution is
112  // FragmentAtomicNumbers[m-1]=A, FragmentAtomicNumbers[m-2]=0, ..., FragmentAtomicNumbers[0]=0
113  FragmentAtomicNumbers[im-1] = A;
114  for (i = 0; i < (im - 1); i++) FragmentAtomicNumbers[i] = 0;
115 
116  // We try to distribute A nucleons in partitions of m fragments
117  // MakePartition return true if it is possible
118  // and false if it is not
119 
120  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
121  while (MakePartition(im,FragmentAtomicNumbers)) {
122  // Allowed partitions are stored and its probability calculated
123 
124  G4StatMFMicroPartition * aPartition = new G4StatMFMicroPartition(A,Z);
125  G4double PartitionProbability = 0.0;
126 
127  for (i = im-1; i >= 0; i--) aPartition->SetPartitionFragment(FragmentAtomicNumbers[i]);
128  PartitionProbability = aPartition->CalcPartitionProbability(U,FreeIntE,SCompNuc);
129  _Partition.push_back(aPartition);
130 
131  _WW += PartitionProbability;
132  _MeanMultiplicity += im*PartitionProbability;
133  _MeanTemperature += aPartition->GetTemperature() * PartitionProbability;
134  if (PartitionProbability > 0.0)
135  _MeanEntropy += PartitionProbability * aPartition->GetEntropy();
136  }
137 }
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:273
std::vector< G4StatMFMicroPartition * > _Partition
G4int GetA_asInt() const
Definition: G4Fragment.hh:256
int G4int
Definition: G4Types.hh:78
G4bool MakePartition(G4int k, G4int *ANumbers)
double A(double temperature)
G4int GetZ_asInt() const
Definition: G4Fragment.hh:261
Float_t Z
G4double CalcPartitionProbability(G4double U, G4double FreeInternalE0, G4double SCompound)
double G4double
Definition: G4Types.hh:76
void SetPartitionFragment(G4int anA)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakePartition()

G4bool G4StatMFMicroManager::MakePartition ( G4int  k,
G4int ANumbers 
)
private

Definition at line 139 of file G4StatMFMicroManager.cc.

143 {
144  G4int l = 1;
145  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
146  while (l < k) {
147  G4int tmp = ANumbers[l-1] + ANumbers[k-1];
148  ANumbers[l-1] += 1;
149  ANumbers[k-1] -= 1;
150  if (ANumbers[l-1] > ANumbers[l] || ANumbers[k-2] > ANumbers[k-1]) {
151  ANumbers[l-1] = 1;
152  ANumbers[k-1] = tmp - 1;
153  l++;
154  } else return true;
155  }
156  return false;
157 }
Float_t tmp
int G4int
Definition: G4Types.hh:78
Here is the caller graph for this function:

◆ Normalize()

void G4StatMFMicroManager::Normalize ( G4double  Norm)

Definition at line 159 of file G4StatMFMicroManager.cc.

160 {
161  _Normalization = Norm;
162  _WW /= Norm;
163  _MeanMultiplicity /= Norm;
164  _MeanTemperature /= Norm;
165  _MeanEntropy /= Norm;
166 
167  return;
168 }
Here is the caller graph for this function:

◆ operator!=()

G4bool G4StatMFMicroManager::operator!= ( const G4StatMFMicroManager right) const

Definition at line 57 of file G4StatMFMicroManager.cc.

58 {
59  return true;
60 }
Here is the caller graph for this function:

◆ operator=()

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

Definition at line 44 of file G4StatMFMicroManager.cc.

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

◆ operator==()

G4bool G4StatMFMicroManager::operator== ( const G4StatMFMicroManager right) const

Definition at line 51 of file G4StatMFMicroManager.cc.

52 {
53  return false;
54 }
Here is the caller graph for this function:

Member Data Documentation

◆ _MeanEntropy

G4double G4StatMFMicroManager::_MeanEntropy
private

Definition at line 116 of file G4StatMFMicroManager.hh.

◆ _MeanMultiplicity

G4double G4StatMFMicroManager::_MeanMultiplicity
private

Definition at line 112 of file G4StatMFMicroManager.hh.

◆ _MeanTemperature

G4double G4StatMFMicroManager::_MeanTemperature
private

Definition at line 114 of file G4StatMFMicroManager.hh.

◆ _Normalization

G4double G4StatMFMicroManager::_Normalization
private

Definition at line 110 of file G4StatMFMicroManager.hh.

◆ _Partition

std::vector<G4StatMFMicroPartition*> G4StatMFMicroManager::_Partition
private

Definition at line 104 of file G4StatMFMicroManager.hh.

◆ _WW

G4double G4StatMFMicroManager::_WW
private

Definition at line 108 of file G4StatMFMicroManager.hh.


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