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 // 00028 // Hadronic Process: Nuclear De-excitations 00029 // by V. Lara 00030 00031 #ifndef G4StatMFMacroCanonical_h 00032 #define G4StatMFMacroCanonical_h 1 00033 00034 #include "G4Fragment.hh" 00035 #include "G4StatMFFragment.hh" 00036 #include "G4VStatMFEnsemble.hh" 00037 #include "G4VStatMFMacroCluster.hh" 00038 #include "G4StatMFMacroNucleon.hh" 00039 #include "G4StatMFMacroBiNucleon.hh" 00040 #include "G4StatMFMacroTriNucleon.hh" 00041 #include "G4StatMFMacroTetraNucleon.hh" 00042 #include "G4StatMFMacroMultiNucleon.hh" 00043 #include "G4StatMFParameters.hh" 00044 #include "G4StatMFChannel.hh" 00045 #include "G4StatMFMacroTemperature.hh" 00046 #include "Randomize.hh" 00047 00048 00049 class G4StatMFMacroCanonical : public G4VStatMFEnsemble { 00050 00051 public: 00052 00053 // G4StatMFMacroCanonical class must be initialized with a G4Fragment. 00054 G4StatMFMacroCanonical(G4Fragment const & theFragment); 00055 00056 // destructor 00057 ~G4StatMFMacroCanonical(); 00058 00059 private: 00060 // default constructor 00061 G4StatMFMacroCanonical() {}; 00062 00063 00064 // copy constructor 00065 G4StatMFMacroCanonical(const G4StatMFMacroCanonical &) : G4VStatMFEnsemble() {}; 00066 00067 00068 // operators 00069 G4StatMFMacroCanonical & operator=(const G4StatMFMacroCanonical & right); 00070 G4bool operator==(const G4StatMFMacroCanonical & right) const; 00071 G4bool operator!=(const G4StatMFMacroCanonical & right) const; 00072 00073 00074 public: 00075 00076 // Choice of fragment atomic numbers and charges. 00077 G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment); 00078 00079 private: 00080 00081 // Initailization method 00082 void Initialize(const G4Fragment & theFragment); 00083 00084 // 00085 void CalculateTemperature(const G4Fragment & theFragment); 00086 00087 // Determines fragments multiplicities and compute total fragment multiplicity 00088 G4double ChooseA(G4int A, std::vector<G4int> & ANumbers); 00089 00090 // Samples charges of fragments 00091 G4StatMFChannel * ChooseZ(G4int & Z, 00092 std::vector<G4int> & FragmentsA); 00093 00094 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00095 00096 00097 // Chemical Potential \mu 00098 G4double _ChemPotentialMu; 00099 00100 // Chemical Potential \nu 00101 G4double _ChemPotentialNu; 00102 00103 00104 // Parameter Kappa 00105 G4double _Kappa; 00106 00107 // Clusters 00108 std::vector<G4VStatMFMacroCluster*> _theClusters; 00109 00110 struct DeleteFragment 00111 { 00112 template<typename T> 00113 void operator()(const T* ptr) const 00114 { 00115 delete ptr; 00116 } 00117 }; 00118 00119 00120 }; 00121 00122 #endif