[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: G4StatMFChannel.hh,v 1.3 2006/06/29 20:24:05 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 G4StatMFChannel_h |
---|
| 34 | #define G4StatMFChannel_h 1 |
---|
| 35 | |
---|
| 36 | #include <deque> |
---|
| 37 | |
---|
| 38 | #include "G4StatMFParameters.hh" |
---|
| 39 | #include "G4StatMFFragment.hh" |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | class G4StatMFChannel { |
---|
| 43 | |
---|
| 44 | public: |
---|
| 45 | // Default Constructor |
---|
| 46 | G4StatMFChannel() : |
---|
| 47 | _NumOfNeutralFragments(0), |
---|
| 48 | _NumOfChargedFragments(0) |
---|
| 49 | {} |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | // Destructor |
---|
| 53 | ~G4StatMFChannel() { |
---|
| 54 | if (!_theFragments.empty()) { |
---|
| 55 | std::for_each(_theFragments.begin(),_theFragments.end(), |
---|
| 56 | DeleteFragment()); |
---|
| 57 | } |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | private: |
---|
| 61 | |
---|
| 62 | // Copy constructor |
---|
| 63 | G4StatMFChannel(const G4StatMFChannel & right); |
---|
| 64 | |
---|
| 65 | // operators |
---|
| 66 | G4StatMFChannel & operator=(const G4StatMFChannel & right); |
---|
| 67 | |
---|
| 68 | public: |
---|
| 69 | G4bool operator==(const G4StatMFChannel & right) const; |
---|
| 70 | G4bool operator!=(const G4StatMFChannel & right) const; |
---|
| 71 | |
---|
| 72 | public: |
---|
| 73 | |
---|
| 74 | void CreateFragment(const G4double A, const G4double Z); |
---|
| 75 | |
---|
| 76 | G4int GetMultiplicity(void) { return _theFragments.size();} |
---|
| 77 | |
---|
| 78 | // Return false if there is some unphysical fragment |
---|
| 79 | G4bool CheckFragments(void); |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | G4double GetFragmentsCoulombEnergy(void); |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | G4double GetFragmentsEnergy(const G4double T) const; |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | G4FragmentVector * GetFragments(const G4double anA, const G4double anZ, const G4double T); |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | private: |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | // This method calculates asymptotic fragments momenta. |
---|
| 95 | void CoulombImpulse(const G4double anA, const G4double anZ, const G4double T); |
---|
| 96 | |
---|
| 97 | void PlaceFragments(const G4double anA); |
---|
| 98 | |
---|
| 99 | void SolveEqOfMotion(const G4double anA, const G4double anZ, const G4double T); |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | // Calculates fragments momentum components at the breakup instant. |
---|
| 103 | // Fragment kinetic energies will be calculated according to the |
---|
| 104 | // Boltzamann distribution at given temperature. |
---|
| 105 | void FragmentsMomenta(const G4int NF, const G4int idx, const G4double T); |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | // Samples a isotropic random vectorwith a magnitud given by Magnitude. |
---|
| 109 | // By default Magnitude = 1 |
---|
| 110 | G4ThreeVector IsotropicVector(const G4double Magnitude = 1.0); |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | // Rotates a 3-vector P to close momentum triangle Pa + V + P = 0 |
---|
| 114 | G4ThreeVector RotateMomentum(G4ThreeVector Pa, G4ThreeVector V, |
---|
| 115 | G4ThreeVector P); |
---|
| 116 | |
---|
| 117 | private: |
---|
| 118 | |
---|
| 119 | std::deque<G4StatMFFragment*> _theFragments; |
---|
| 120 | |
---|
| 121 | G4int _NumOfNeutralFragments; |
---|
| 122 | |
---|
| 123 | G4int _NumOfChargedFragments; |
---|
| 124 | |
---|
| 125 | struct DeleteFragment |
---|
| 126 | { |
---|
| 127 | template<typename T> |
---|
| 128 | void operator()(const T* ptr) const |
---|
| 129 | { |
---|
| 130 | delete ptr; |
---|
| 131 | } |
---|
| 132 | }; |
---|
| 133 | |
---|
| 134 | }; |
---|
| 135 | |
---|
| 136 | #endif |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | |
---|