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.8 2008/09/19 13:32:54 ahoward Exp $ >> 28 // GEANT4 tag $Name: geant4-09-02-patch-03 $ >> 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 // 29 // Modifications: << 33 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 30 // 30 June 1998 by V. Lara: << 34 // cross section option >> 35 // >> 36 // Modif (30 June 1998) by V. Lara: 31 // -Using G4ParticleTable and therefore G 37 // -Using G4ParticleTable and therefore G4IonTable 32 // it can return all kind of fragments p 38 // it can return all kind of fragments produced in 33 // deexcitation 39 // deexcitation 34 // -It uses default algorithms for: 40 // -It uses default algorithms for: 35 // Evaporation: G4StatEvaporation 41 // Evaporation: G4StatEvaporation 36 // MultiFragmentation: G4DummyMF 42 // MultiFragmentation: G4DummyMF (a dummy one) 37 // Fermi Breakup model: G4StatFer 43 // Fermi Breakup model: G4StatFermiBreakUp 38 // 44 // 39 // 03 September 2008 by J. M. Quesada for exte << 45 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 40 // cross section option << 46 // cross section option 41 // 06 September 2008 JMQ Also external choices << 47 // JMQ (06 September 2008) Also external choices have been added for 42 // superimposed Coulomb barrier (if useSICB << 48 // superimposed Coulomb barrier (if useSICBis set true, by default is false) 43 // 23 January 2012 by V.Ivanchenko remove obso << 44 // methods to deexcitation components << 45 // << 46 49 47 #ifndef G4ExcitationHandler_h 50 #ifndef G4ExcitationHandler_h 48 #define G4ExcitationHandler_h 1 51 #define G4ExcitationHandler_h 1 49 52 50 #include "globals.hh" << 53 #include "G4VMultiFragmentation.hh" >> 54 #include "G4VFermiBreakUp.hh" >> 55 #include "G4VEvaporation.hh" >> 56 #include "G4VPhotonEvaporation.hh" 51 #include "G4Fragment.hh" 57 #include "G4Fragment.hh" >> 58 #include "G4DynamicParticle.hh" 52 #include "G4ReactionProductVector.hh" 59 #include "G4ReactionProductVector.hh" 53 #include "G4IonTable.hh" << 60 #include "G4ReactionProduct.hh" 54 #include "G4DeexPrecoParameters.hh" << 61 #include "G4ParticleTypes.hh" 55 #include "G4NistManager.hh" << 62 #include "G4ParticleTable.hh" 56 << 63 // needed for default models 57 class G4VMultiFragmentation; << 64 #include "G4Evaporation.hh" 58 class G4VFermiBreakUp; << 65 #include "G4StatMF.hh" 59 class G4VEvaporation; << 66 #include "G4FermiBreakUp.hh" 60 class G4VEvaporationChannel; << 67 #include "G4PhotonEvaporation.hh" 61 class G4ParticleTable; << 68 #include "G4IonConstructor.hh" >> 69 >> 70 //#define debug 62 71 63 class G4ExcitationHandler 72 class G4ExcitationHandler 64 { 73 { 65 public: 74 public: 66 << 67 G4ExcitationHandler(); 75 G4ExcitationHandler(); 68 ~G4ExcitationHandler(); 76 ~G4ExcitationHandler(); >> 77 private: >> 78 G4ExcitationHandler(const G4ExcitationHandler &right); 69 79 70 G4ReactionProductVector* BreakItUp(const G4F << 80 const G4ExcitationHandler & operator=(const G4ExcitationHandler &right); >> 81 G4bool operator==(const G4ExcitationHandler &right) const; >> 82 G4bool operator!=(const G4ExcitationHandler &right) const; >> 83 71 84 72 // short model description used for automati << 85 public: 73 void ModelDescription(std::ostream& outFile) << 86 G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState) const; 74 87 75 void Initialise(); << 88 void SetEvaporation(G4VEvaporation *const value); 76 89 77 // user defined sub-models << 90 void SetMultiFragmentation(G4VMultiFragmentation *const value); 78 // deletion is responsibility of this handle << 91 79 void SetEvaporation(G4VEvaporation* ptr, G4b << 92 void SetFermiModel(G4VFermiBreakUp *const value); 80 void SetMultiFragmentation(G4VMultiFragmenta << 93 81 void SetFermiModel(G4VFermiBreakUp* ptr); << 94 void SetPhotonEvaporation(G4VPhotonEvaporation * const value); 82 void SetPhotonEvaporation(G4VEvaporationChan << 95 83 void SetDeexChannelsType(G4DeexChannelType v << 96 void SetMaxZForFermiBreakUp(G4int aZ); 84 << 97 void SetMaxAForFermiBreakUp(G4int anA); 85 //======== Obsolete methods to be removed == << 98 void SetMaxAandZForFermiBreakUp(G4int anA,G4int aZ); 86 << 99 void SetMinEForMultiFrag(G4double anE); 87 // parameters of sub-models << 100 88 inline void SetMaxZForFermiBreakUp(G4int aZ) << 101 // for inverse cross section choice 89 inline void SetMaxAForFermiBreakUp(G4int anA << 102 inline void SetOPTxs(G4int opt) { OPTxs = opt;} 90 inline void SetMaxAandZForFermiBreakUp(G4int << 103 // for superimposed Coulomb Barrir for inverse cross sections 91 inline void SetMinEForMultiFrag(G4double anE << 104 inline void UseSICB(){useSICB=true;} 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 105 112 private: 106 private: 113 107 114 void SetParameters(); << 108 G4ReactionProductVector * Transform(G4FragmentVector * theFragmentVector) const; 115 109 116 inline void SortSecondaryFragment(G4Fragment << 110 const G4VEvaporation * GetEvaporation() const; 117 << 111 118 G4VEvaporation* theEvaporation{nullptr}; << 112 const G4VMultiFragmentation * GetMultiFragmentation() const; 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 113 135 G4int icID{0}; << 114 const G4VFermiBreakUp * GetFermiModel() const; 136 115 137 G4int maxZForFermiBreakUp{9}; << 116 const G4VPhotonEvaporation * GetPhotonEvaporation() const; 138 G4int maxAForFermiBreakUp{17}; << 139 117 140 G4int fVerbose{1}; << 118 G4int GetMaxZ() const; 141 G4int fWarnings{0}; << 119 G4int GetMaxA() const; >> 120 G4double GetMinE() const; >> 121 >> 122 #ifdef debug >> 123 void CheckConservation(const G4Fragment & aFragment, >> 124 G4FragmentVector * Result) const; >> 125 #endif >> 126 private: >> 127 >> 128 G4VEvaporation *theEvaporation; >> 129 >> 130 G4VMultiFragmentation *theMultiFragmentation; >> 131 >> 132 G4VFermiBreakUp *theFermiModel; >> 133 >> 134 G4VPhotonEvaporation * thePhotonEvaporation; 142 135 >> 136 G4int maxZForFermiBreakUp; >> 137 G4int maxAForFermiBreakUp; 143 G4double minEForMultiFrag; 138 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 139 152 // list of fragments to store final result << 140 G4ParticleTable *theTableOfParticles; 153 std::vector<G4Fragment*> theResults; << 141 >> 142 G4bool MyOwnEvaporationClass; >> 143 G4bool MyOwnMultiFragmentationClass; >> 144 G4bool MyOwnFermiBreakUpClass; >> 145 G4bool MyOwnPhotonEvaporationClass; >> 146 >> 147 G4int OPTxs; >> 148 G4bool useSICB; >> 149 >> 150 struct DeleteFragment >> 151 { >> 152 template<typename T> >> 153 void operator()(const T* ptr) const >> 154 { >> 155 delete ptr; >> 156 } >> 157 }; 154 158 155 // list of fragments to store intermediate r << 156 std::vector<G4Fragment*> results; << 157 159 158 // list of fragments to apply Evaporation or << 159 std::vector<G4Fragment*> theEvapList; << 160 }; 160 }; 161 161 >> 162 >> 163 >> 164 inline const G4VEvaporation * G4ExcitationHandler::GetEvaporation() const >> 165 { >> 166 return theEvaporation; >> 167 } >> 168 >> 169 inline void G4ExcitationHandler::SetEvaporation(G4VEvaporation *const value) >> 170 { >> 171 if (theEvaporation != 0 && MyOwnEvaporationClass) delete theEvaporation; >> 172 MyOwnEvaporationClass = false; >> 173 theEvaporation = value; >> 174 } >> 175 >> 176 inline const G4VMultiFragmentation * G4ExcitationHandler::GetMultiFragmentation() const >> 177 { >> 178 return theMultiFragmentation; >> 179 } >> 180 >> 181 inline void G4ExcitationHandler::SetMultiFragmentation(G4VMultiFragmentation *const value) >> 182 { >> 183 if (theMultiFragmentation != 0 && MyOwnMultiFragmentationClass) delete theMultiFragmentation; >> 184 MyOwnMultiFragmentationClass = false; >> 185 theMultiFragmentation = value; >> 186 } >> 187 >> 188 inline const G4VFermiBreakUp * G4ExcitationHandler::GetFermiModel() const >> 189 { >> 190 return theFermiModel; >> 191 } >> 192 >> 193 inline void G4ExcitationHandler::SetFermiModel(G4VFermiBreakUp *const value) >> 194 { >> 195 if (theFermiModel != 0 && MyOwnFermiBreakUpClass) delete theFermiModel; >> 196 MyOwnFermiBreakUpClass = false; >> 197 theFermiModel = value; >> 198 } >> 199 >> 200 >> 201 inline const G4VPhotonEvaporation * G4ExcitationHandler::GetPhotonEvaporation() const >> 202 { >> 203 return thePhotonEvaporation; >> 204 } >> 205 >> 206 inline void G4ExcitationHandler::SetPhotonEvaporation(G4VPhotonEvaporation *const value) >> 207 { >> 208 if (thePhotonEvaporation != 0 && MyOwnPhotonEvaporationClass) delete thePhotonEvaporation; >> 209 MyOwnPhotonEvaporationClass = false; >> 210 thePhotonEvaporation = value; >> 211 } >> 212 162 inline void G4ExcitationHandler::SetMaxZForFer 213 inline void G4ExcitationHandler::SetMaxZForFermiBreakUp(G4int aZ) 163 { 214 { 164 maxZForFermiBreakUp = aZ; 215 maxZForFermiBreakUp = aZ; 165 } 216 } 166 217 167 inline void G4ExcitationHandler::SetMaxAForFer 218 inline void G4ExcitationHandler::SetMaxAForFermiBreakUp(G4int anA) 168 { 219 { 169 maxAForFermiBreakUp = anA; 220 maxAForFermiBreakUp = anA; 170 } 221 } 171 222 172 inline void G4ExcitationHandler::SetMaxAandZFo 223 inline void G4ExcitationHandler::SetMaxAandZForFermiBreakUp(G4int anA, G4int aZ) 173 { 224 { 174 SetMaxAForFermiBreakUp(anA); << 225 maxAForFermiBreakUp = anA; 175 SetMaxZForFermiBreakUp(aZ); << 226 maxZForFermiBreakUp = aZ; 176 } 227 } 177 228 178 inline void G4ExcitationHandler::SetMinEForMul 229 inline void G4ExcitationHandler::SetMinEForMultiFrag(G4double anE) 179 { 230 { 180 minEForMultiFrag = anE; 231 minEForMultiFrag = anE; 181 } 232 } 182 233 183 inline void G4ExcitationHandler::SortSecondary << 234 inline G4int G4ExcitationHandler::GetMaxZ() const 184 { << 235 { 185 G4int A = frag->GetA_asInt(); << 236 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 } 237 } >> 238 >> 239 inline G4int G4ExcitationHandler::GetMaxA() const >> 240 { >> 241 return maxAForFermiBreakUp; >> 242 } >> 243 >> 244 inline G4double G4ExcitationHandler::GetMinE() const >> 245 { >> 246 return minEForMultiFrag; >> 247 } >> 248 205 249 206 #endif 250 #endif 207 251