Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // >> 26 // >> 27 // $Id: G4ExcitationHandler.hh,v 1.6 2006/06/29 20:23:45 gunter Exp $ >> 28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ >> 29 // 26 // Hadronic Process: Nuclear De-excitations 30 // Hadronic Process: Nuclear De-excitations 27 // by V. Lara (May 1998) 31 // by V. Lara (May 1998) 28 // << 32 // Modif (30 June 1998) by V. Lara: 29 // Modifications: << 30 // 30 June 1998 by V. Lara: << 31 // -Using G4ParticleTable and therefore G 33 // -Using G4ParticleTable and therefore G4IonTable 32 // it can return all kind of fragments p 34 // it can return all kind of fragments produced in 33 // deexcitation 35 // deexcitation 34 // -It uses default algorithms for: 36 // -It uses default algorithms for: 35 // Evaporation: G4StatEvaporation 37 // Evaporation: G4StatEvaporation 36 // MultiFragmentation: G4DummyMF 38 // MultiFragmentation: G4DummyMF (a dummy one) 37 // Fermi Breakup model: G4StatFer 39 // Fermi Breakup model: G4StatFermiBreakUp 38 // << 40 39 // 03 September 2008 by J. M. Quesada for exte << 40 // cross section option << 41 // 06 September 2008 JMQ Also external choices << 42 // superimposed Coulomb barrier (if useSICB << 43 // 23 January 2012 by V.Ivanchenko remove obso << 44 // methods to deexcitation components << 45 // << 46 41 47 #ifndef G4ExcitationHandler_h 42 #ifndef G4ExcitationHandler_h 48 #define G4ExcitationHandler_h 1 43 #define G4ExcitationHandler_h 1 49 44 50 #include "globals.hh" << 45 #include "G4VMultiFragmentation.hh" >> 46 #include "G4VFermiBreakUp.hh" >> 47 #include "G4VEvaporation.hh" >> 48 #include "G4VPhotonEvaporation.hh" 51 #include "G4Fragment.hh" 49 #include "G4Fragment.hh" >> 50 #include "G4DynamicParticle.hh" 52 #include "G4ReactionProductVector.hh" 51 #include "G4ReactionProductVector.hh" 53 #include "G4IonTable.hh" << 52 #include "G4ReactionProduct.hh" 54 #include "G4DeexPrecoParameters.hh" << 53 #include "G4ParticleTypes.hh" 55 #include "G4NistManager.hh" << 54 #include "G4ParticleTable.hh" 56 << 55 // needed for default models 57 class G4VMultiFragmentation; << 56 #include "G4Evaporation.hh" 58 class G4VFermiBreakUp; << 57 #include "G4StatMF.hh" 59 class G4VEvaporation; << 58 #include "G4FermiBreakUp.hh" 60 class G4VEvaporationChannel; << 59 #include "G4PhotonEvaporation.hh" 61 class G4ParticleTable; << 60 #include "G4IonConstructor.hh" >> 61 >> 62 //#define debug 62 63 63 class G4ExcitationHandler 64 class G4ExcitationHandler 64 { 65 { 65 public: 66 public: 66 << 67 G4ExcitationHandler(); 67 G4ExcitationHandler(); 68 ~G4ExcitationHandler(); 68 ~G4ExcitationHandler(); >> 69 private: >> 70 G4ExcitationHandler(const G4ExcitationHandler &right); 69 71 70 G4ReactionProductVector* BreakItUp(const G4F << 72 const G4ExcitationHandler & operator=(const G4ExcitationHandler &right); >> 73 G4bool operator==(const G4ExcitationHandler &right) const; >> 74 G4bool operator!=(const G4ExcitationHandler &right) const; >> 75 >> 76 >> 77 public: >> 78 G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState) const; >> 79 >> 80 void SetEvaporation(G4VEvaporation *const value); 71 81 72 // short model description used for automati << 82 void SetMultiFragmentation(G4VMultiFragmentation *const value); 73 void ModelDescription(std::ostream& outFile) << 74 83 75 void Initialise(); << 84 void SetFermiModel(G4VFermiBreakUp *const value); 76 85 77 // user defined sub-models << 86 void SetPhotonEvaporation(G4VPhotonEvaporation * const value); 78 // deletion is responsibility of this handle << 87 79 void SetEvaporation(G4VEvaporation* ptr, G4b << 88 void SetMaxZForFermiBreakUp(G4int aZ); 80 void SetMultiFragmentation(G4VMultiFragmenta << 89 void SetMaxAForFermiBreakUp(G4int anA); 81 void SetFermiModel(G4VFermiBreakUp* ptr); << 90 void SetMaxAandZForFermiBreakUp(G4int anA,G4int aZ); 82 void SetPhotonEvaporation(G4VEvaporationChan << 91 void SetMinEForMultiFrag(G4double anE); 83 void SetDeexChannelsType(G4DeexChannelType v << 84 << 85 //======== Obsolete methods to be removed == << 86 << 87 // parameters of sub-models << 88 inline void SetMaxZForFermiBreakUp(G4int aZ) << 89 inline void SetMaxAForFermiBreakUp(G4int anA << 90 inline void SetMaxAandZForFermiBreakUp(G4int << 91 inline void SetMinEForMultiFrag(G4double anE << 92 << 93 // access methods << 94 G4VEvaporation* GetEvaporation(); << 95 G4VMultiFragmentation* GetMultiFragmentation << 96 G4VFermiBreakUp* GetFermiModel(); << 97 G4VEvaporationChannel* GetPhotonEvaporation( << 98 << 99 // for inverse cross section choice << 100 inline void SetOPTxs(G4int opt); << 101 // for superimposed Coulomb Barrier for inve << 102 inline void UseSICB(); << 103 << 104 //========================================== << 105 << 106 G4ExcitationHandler(const G4ExcitationHandle << 107 const G4ExcitationHandler & operator << 108 =(const G4ExcitationHandler &right) = delete << 109 G4bool operator==(const G4ExcitationHandler << 110 G4bool operator!=(const G4ExcitationHandler << 111 92 112 private: 93 private: 113 94 114 void SetParameters(); << 95 G4ReactionProductVector * Transform(G4FragmentVector * theFragmentVector) const; 115 96 116 inline void SortSecondaryFragment(G4Fragment << 97 const G4VEvaporation * GetEvaporation() const; 117 << 118 G4VEvaporation* theEvaporation{nullptr}; << 119 G4VMultiFragmentation* theMultiFragmentation << 120 G4VFermiBreakUp* theFermiModel; << 121 G4VEvaporationChannel* thePhotonEvaporation; << 122 G4ParticleTable* thePartTable; << 123 G4IonTable* theTableOfIons; << 124 G4NistManager* nist; << 125 << 126 const G4ParticleDefinition* theElectron; << 127 const G4ParticleDefinition* theNeutron; << 128 const G4ParticleDefinition* theProton; << 129 const G4ParticleDefinition* theDeuteron; << 130 const G4ParticleDefinition* theTriton; << 131 const G4ParticleDefinition* theHe3; << 132 const G4ParticleDefinition* theAlpha; << 133 const G4ParticleDefinition* theLambda; << 134 98 135 G4int icID{0}; << 99 const G4VMultiFragmentation * GetMultiFragmentation() const; 136 100 137 G4int maxZForFermiBreakUp{9}; << 101 const G4VFermiBreakUp * GetFermiModel() const; 138 G4int maxAForFermiBreakUp{17}; << 139 102 140 G4int fVerbose{1}; << 103 const G4VPhotonEvaporation * GetPhotonEvaporation() const; 141 G4int fWarnings{0}; << 142 104 >> 105 const G4int GetMaxZ() const; >> 106 const G4int GetMaxA() const; >> 107 const G4double GetMinE() const; >> 108 >> 109 >> 110 #ifdef debug >> 111 void CheckConservation(const G4Fragment & aFragment, >> 112 G4FragmentVector * Result) const; >> 113 #endif >> 114 private: >> 115 >> 116 G4VEvaporation *theEvaporation; >> 117 >> 118 G4VMultiFragmentation *theMultiFragmentation; >> 119 >> 120 G4VFermiBreakUp *theFermiModel; >> 121 >> 122 G4VPhotonEvaporation * thePhotonEvaporation; >> 123 >> 124 G4int maxZForFermiBreakUp; >> 125 G4int maxAForFermiBreakUp; 143 G4double minEForMultiFrag; 126 G4double minEForMultiFrag; 144 G4double minExcitation; << 145 G4double maxExcitation; << 146 G4double fLambdaMass; << 147 << 148 G4bool isInitialised{false}; << 149 G4bool isEvapLocal{true}; << 150 G4bool isActive{true}; << 151 127 152 // list of fragments to store final result << 128 G4ParticleTable *theTableOfParticles; 153 std::vector<G4Fragment*> theResults; << 129 >> 130 G4bool MyOwnEvaporationClass; >> 131 G4bool MyOwnMultiFragmentationClass; >> 132 G4bool MyOwnFermiBreakUpClass; >> 133 G4bool MyOwnPhotonEvaporationClass; >> 134 >> 135 struct DeleteFragment >> 136 { >> 137 template<typename T> >> 138 void operator()(const T* ptr) const >> 139 { >> 140 delete ptr; >> 141 } >> 142 }; 154 143 155 // list of fragments to store intermediate r << 156 std::vector<G4Fragment*> results; << 157 144 158 // list of fragments to apply Evaporation or << 159 std::vector<G4Fragment*> theEvapList; << 160 }; 145 }; 161 146 >> 147 >> 148 >> 149 inline const G4VEvaporation * G4ExcitationHandler::GetEvaporation() const >> 150 { >> 151 return theEvaporation; >> 152 } >> 153 >> 154 inline void G4ExcitationHandler::SetEvaporation(G4VEvaporation *const value) >> 155 { >> 156 if (theEvaporation != 0 && MyOwnEvaporationClass) delete theEvaporation; >> 157 MyOwnEvaporationClass = false; >> 158 theEvaporation = value; >> 159 } >> 160 >> 161 inline const G4VMultiFragmentation * G4ExcitationHandler::GetMultiFragmentation() const >> 162 { >> 163 return theMultiFragmentation; >> 164 } >> 165 >> 166 inline void G4ExcitationHandler::SetMultiFragmentation(G4VMultiFragmentation *const value) >> 167 { >> 168 if (theMultiFragmentation != 0 && MyOwnMultiFragmentationClass) delete theMultiFragmentation; >> 169 MyOwnMultiFragmentationClass = false; >> 170 theMultiFragmentation = value; >> 171 } >> 172 >> 173 inline const G4VFermiBreakUp * G4ExcitationHandler::GetFermiModel() const >> 174 { >> 175 return theFermiModel; >> 176 } >> 177 >> 178 inline void G4ExcitationHandler::SetFermiModel(G4VFermiBreakUp *const value) >> 179 { >> 180 if (theFermiModel != 0 && MyOwnFermiBreakUpClass) delete theFermiModel; >> 181 MyOwnFermiBreakUpClass = false; >> 182 theFermiModel = value; >> 183 } >> 184 >> 185 >> 186 inline const G4VPhotonEvaporation * G4ExcitationHandler::GetPhotonEvaporation() const >> 187 { >> 188 return thePhotonEvaporation; >> 189 } >> 190 >> 191 inline void G4ExcitationHandler::SetPhotonEvaporation(G4VPhotonEvaporation *const value) >> 192 { >> 193 if (thePhotonEvaporation != 0 && MyOwnPhotonEvaporationClass) delete thePhotonEvaporation; >> 194 MyOwnPhotonEvaporationClass = false; >> 195 thePhotonEvaporation = value; >> 196 } >> 197 162 inline void G4ExcitationHandler::SetMaxZForFer 198 inline void G4ExcitationHandler::SetMaxZForFermiBreakUp(G4int aZ) 163 { 199 { 164 maxZForFermiBreakUp = aZ; 200 maxZForFermiBreakUp = aZ; 165 } 201 } 166 202 167 inline void G4ExcitationHandler::SetMaxAForFer 203 inline void G4ExcitationHandler::SetMaxAForFermiBreakUp(G4int anA) 168 { 204 { 169 maxAForFermiBreakUp = anA; 205 maxAForFermiBreakUp = anA; 170 } 206 } 171 207 172 inline void G4ExcitationHandler::SetMaxAandZFo 208 inline void G4ExcitationHandler::SetMaxAandZForFermiBreakUp(G4int anA, G4int aZ) 173 { 209 { 174 SetMaxAForFermiBreakUp(anA); << 210 maxAForFermiBreakUp = anA; 175 SetMaxZForFermiBreakUp(aZ); << 211 maxZForFermiBreakUp = aZ; 176 } 212 } 177 213 178 inline void G4ExcitationHandler::SetMinEForMul 214 inline void G4ExcitationHandler::SetMinEForMultiFrag(G4double anE) 179 { 215 { 180 minEForMultiFrag = anE; 216 minEForMultiFrag = anE; 181 } 217 } 182 218 183 inline void G4ExcitationHandler::SortSecondary << 219 inline const G4int G4ExcitationHandler::GetMaxZ() const 184 { << 220 { 185 G4int A = frag->GetA_asInt(); << 221 return maxZForFermiBreakUp; 186 << 187 // gamma, e-, p, n << 188 if(A <= 1 || frag->IsLongLived()) { << 189 theResults.push_back(frag); << 190 } else if(frag->GetExcitationEnergy() < minE << 191 // cold fragments << 192 G4int Z = frag->GetZ_asInt(); << 193 << 194 // is stable or d, t, He3, He4 << 195 if(nist->GetIsotopeAbundance(Z, A) > 0.0 | << 196 theResults.push_back(frag); // stable fr << 197 } else { << 198 theEvapList.push_back(frag); << 199 } << 200 // hot fragments are unstable << 201 } else { << 202 theEvapList.push_back(frag); << 203 } << 204 } 222 } >> 223 >> 224 inline const G4int G4ExcitationHandler::GetMaxA() const >> 225 { >> 226 return maxAForFermiBreakUp; >> 227 } >> 228 >> 229 inline const G4double G4ExcitationHandler::GetMinE() const >> 230 { >> 231 return minEForMultiFrag; >> 232 } >> 233 205 234 206 #endif 235 #endif 207 236