00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // Hadronic Process: Nuclear De-excitations 00030 // by V. Lara 00031 00032 #ifndef G4StatMFMicroCanonical_h 00033 #define G4StatMFMicroCanonical_h 1 00034 00035 #include <vector> 00036 00037 #include "G4VStatMFEnsemble.hh" 00038 #include "G4StatMFMicroPartition.hh" 00039 #include "G4StatMFMicroManager.hh" 00040 #include "G4StatMFParameters.hh" 00041 #include "G4StatMFChannel.hh" 00042 00043 #include "G4Fragment.hh" 00044 #include "Randomize.hh" 00045 00046 00047 class G4StatMFMicroCanonical : public G4VStatMFEnsemble { 00048 00049 public: 00050 00051 // G4StatMFMicroCanonical class must be initialized with a G4Fragment. 00052 G4StatMFMicroCanonical(const G4Fragment & theFragment); 00053 00054 // destructor 00055 ~G4StatMFMicroCanonical(); 00056 00057 private: 00058 // default constructor 00059 G4StatMFMicroCanonical() {}; 00060 00061 00062 // copy constructor 00063 G4StatMFMicroCanonical(const G4StatMFMicroCanonical &right); 00064 00065 00066 // operators 00067 G4StatMFMicroCanonical & operator=(const G4StatMFMicroCanonical & right); 00068 G4bool operator==(const G4StatMFMicroCanonical & right) const; 00069 G4bool operator!=(const G4StatMFMicroCanonical & right) const; 00070 00071 00072 public: 00073 00074 // Choice of fragment atomic numbers and charges. 00075 G4StatMFChannel * ChooseAandZ(const G4Fragment & theFragment); 00076 00077 enum {MaxAllowedMultiplicity = 4}; 00078 00079 private: 00080 00081 // Initailization method 00082 void Initialize(const G4Fragment & theFragment); 00083 00084 // Calculate Entropy of Compound Nucleus 00085 G4double CalcEntropyOfCompoundNucleus(const G4Fragment & theFragment, G4double & TConf); 00086 00087 G4double CalcFreeInternalEnergy(const G4Fragment & theFragment, G4double T); 00088 00089 G4double CalcInvLevelDensity(G4int anA); 00090 00091 00092 // Data members 00093 private: 00094 00095 // This is a vector of partitions managers for partitions of different 00096 // multiplicities: 00097 00098 std::vector<G4StatMFMicroManager*> _ThePartitionManagerVector; 00099 00100 // Statistical weight of compound nucleus 00101 G4double _WCompoundNucleus; 00102 00103 00104 struct DeleteFragment 00105 { 00106 template<typename T> 00107 void operator()(const T* ptr) const 00108 { 00109 delete ptr; 00110 } 00111 }; 00112 00113 class SumProbabilities : public std::binary_function<G4double,G4double,G4double> 00114 { 00115 public: 00116 SumProbabilities() : total(0.0) {} 00117 G4double operator() (G4double& /* probSoFar*/, G4StatMFMicroManager*& manager) 00118 { 00119 total += manager->GetProbability(); 00120 return total; 00121 } 00122 00123 G4double GetTotal() { return total; } 00124 public: 00125 G4double total; 00126 00127 }; 00128 00129 00130 }; 00131 00132 #endif