[819] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
| 27 | // $Id: G4StatMFMicroCanonical.hh,v 1.3 2006/06/29 20:24:27 gunter Exp $ |
---|
[1196] | 28 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
[819] | 29 | // |
---|
| 30 | // Hadronic Process: Nuclear De-excitations |
---|
| 31 | // by V. Lara |
---|
| 32 | |
---|
| 33 | #ifndef G4StatMFMicroCanonical_h |
---|
| 34 | #define G4StatMFMicroCanonical_h 1 |
---|
| 35 | |
---|
| 36 | #include <vector> |
---|
| 37 | |
---|
| 38 | #include "G4VStatMFEnsemble.hh" |
---|
| 39 | #include "G4StatMFMicroPartition.hh" |
---|
| 40 | #include "G4StatMFMicroManager.hh" |
---|
| 41 | #include "G4StatMFParameters.hh" |
---|
| 42 | #include "G4StatMFChannel.hh" |
---|
| 43 | |
---|
| 44 | #include "G4Fragment.hh" |
---|
| 45 | #include "Randomize.hh" |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | class G4StatMFMicroCanonical : public G4VStatMFEnsemble { |
---|
| 49 | |
---|
| 50 | public: |
---|
| 51 | |
---|
| 52 | // G4StatMFMicroCanonical class must be initialized with a G4Fragment. |
---|
| 53 | G4StatMFMicroCanonical(const G4Fragment & theFragment); |
---|
| 54 | |
---|
| 55 | // destructor |
---|
| 56 | ~G4StatMFMicroCanonical(); |
---|
| 57 | |
---|
| 58 | private: |
---|
| 59 | // default constructor |
---|
| 60 | G4StatMFMicroCanonical() {}; |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | // copy constructor |
---|
| 64 | G4StatMFMicroCanonical(const G4StatMFMicroCanonical &right); |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | // operators |
---|
| 68 | G4StatMFMicroCanonical & operator=(const G4StatMFMicroCanonical & right); |
---|
| 69 | G4bool operator==(const G4StatMFMicroCanonical & right) const; |
---|
| 70 | G4bool operator!=(const G4StatMFMicroCanonical & right) const; |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | public: |
---|
| 74 | |
---|
| 75 | // Choice of fragment atomic numbers and charges. |
---|
| 76 | G4StatMFChannel * ChooseAandZ(const G4Fragment & theFragment); |
---|
| 77 | |
---|
| 78 | enum {MaxAllowedMultiplicity = 4}; |
---|
| 79 | |
---|
| 80 | private: |
---|
| 81 | |
---|
| 82 | // Initailization method |
---|
| 83 | void Initialize(const G4Fragment & theFragment); |
---|
| 84 | |
---|
| 85 | // Calculate Entropy of Compound Nucleus |
---|
| 86 | G4double CalcEntropyOfCompoundNucleus(const G4Fragment & theFragment, G4double & TConf); |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | G4double CalcFreeInternalEnergy(const G4Fragment & theFragment, const G4double T); |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | G4double CalcInvLevelDensity(const G4int anA); |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | // Data members |
---|
| 96 | private: |
---|
| 97 | |
---|
| 98 | // This is a vector of partitions managers for partitions of different |
---|
| 99 | // multiplicities: |
---|
| 100 | |
---|
| 101 | std::vector<G4StatMFMicroManager*> _ThePartitionManagerVector; |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | // Statistical weight of compound nucleus |
---|
| 106 | G4double _WCompoundNucleus; |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | struct DeleteFragment |
---|
| 110 | { |
---|
| 111 | template<typename T> |
---|
| 112 | void operator()(const T* ptr) const |
---|
| 113 | { |
---|
| 114 | delete ptr; |
---|
| 115 | } |
---|
| 116 | }; |
---|
| 117 | |
---|
| 118 | class SumProbabilities : public std::binary_function<G4double,G4double,G4double> |
---|
| 119 | { |
---|
| 120 | public: |
---|
| 121 | SumProbabilities() : total(0.0) {} |
---|
| 122 | G4double operator() (G4double& /* probSoFar*/, G4StatMFMicroManager*& manager) |
---|
| 123 | { |
---|
| 124 | total += manager->GetProbability(); |
---|
| 125 | return total; |
---|
| 126 | } |
---|
| 127 | |
---|
| 128 | G4double GetTotal() { return total; } |
---|
| 129 | public: |
---|
| 130 | G4double total; |
---|
| 131 | |
---|
| 132 | }; |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | }; |
---|
| 136 | |
---|
| 137 | #endif |
---|