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 /* 26 /* 27 * File: G4FissionFragmentGenerator.hh 27 * File: G4FissionFragmentGenerator.hh 28 * Author: B. Wendt (wendbryc@isu.edu) 28 * Author: B. Wendt (wendbryc@isu.edu) 29 * 29 * 30 * Created on May 11, 2011, 12:04 PM 30 * Created on May 11, 2011, 12:04 PM 31 */ 31 */ 32 32 33 #ifndef G4FISSIONFRAGMENTGENERATOR_HH 33 #ifndef G4FISSIONFRAGMENTGENERATOR_HH 34 #define G4FISSIONFRAGMENTGENERATOR_HH 34 #define G4FISSIONFRAGMENTGENERATOR_HH 35 35 36 #include "G4FFGEnumerations.hh" 36 #include "G4FFGEnumerations.hh" 37 #include "G4FissionProductYieldDist.hh" 37 #include "G4FissionProductYieldDist.hh" 38 #include "G4HadFinalState.hh" 38 #include "G4HadFinalState.hh" 39 #include "G4HadProjectile.hh" 39 #include "G4HadProjectile.hh" 40 #include "G4Ions.hh" 40 #include "G4Ions.hh" 41 #include "G4TableTemplate.hh" 41 #include "G4TableTemplate.hh" 42 #include "globals.hh" 42 #include "globals.hh" 43 43 44 /** G4FissionFragmentGenerator is the front en 44 /** G4FissionFragmentGenerator is the front end class to be used by the user for 45 * handling all fission event generation. 45 * handling all fission event generation. 46 * 46 * 47 * This class is intended to be instantiated 47 * This class is intended to be instantiated for one type of fission event for 48 * as specific isotope/isomer, fission type, 48 * as specific isotope/isomer, fission type, and incident neutron energy. For 49 * this reason no functions exist to change o 49 * this reason no functions exist to change or modify these values once the 50 * class in constructed. A new class must be 50 * class in constructed. A new class must be created by the user for each type 51 * of fission event, if such functionality is 51 * of fission event, if such functionality is desired. 52 */ 52 */ 53 class G4FissionFragmentGenerator 53 class G4FissionFragmentGenerator 54 { 54 { 55 public: 55 public: 56 // Constructor definition 56 // Constructor definition 57 /** Default constructor 57 /** Default constructor 58 * - Usage: No arguments required 58 * - Usage: No arguments required 59 * 59 * 60 * - Notes: 60 * - Notes: 61 * - There are methods that should be 61 * - There are methods that should be called to set operating 62 * parameters before generating any 62 * parameters before generating any fission events with 63 * G4FissionFragmentGenerator. Thes 63 * G4FissionFragmentGenerator. These are: 64 * - G4SetIsotope() 64 * - G4SetIsotope() 65 * - G4SetMetaState() 65 * - G4SetMetaState() 66 * - G4SetCause() 66 * - G4SetCause() 67 * - G4SetIncidentEnergy() 67 * - G4SetIncidentEnergy() 68 * - G4SetYieldType() 68 * - G4SetYieldType() 69 * - G4SetAlphaProduction() 69 * - G4SetAlphaProduction() 70 * - G4SetAlphaProductionProbabil 70 * - G4SetAlphaProductionProbability() 71 * - G4SetSamplingScheme() 71 * - G4SetSamplingScheme() 72 * - If any or all of these parameter 72 * - If any or all of these parameters are not set by the user, then 73 * default values will be used. 73 * default values will be used. 74 * - Isotope: \p 92238 74 * - Isotope: \p 92238 75 * - Metastable state: \p GROUND_ 75 * - Metastable state: \p GROUND_STATE 76 * - Cause: \p SPONTANEOUS 76 * - Cause: \p SPONTANEOUS 77 * - Incident energy: \p 0.025 eV 77 * - Incident energy: \p 0.025 eV 78 * - Yield type: \p INDEPENDENT 78 * - Yield type: \p INDEPENDENT 79 * - Alpha production: \p 0 79 * - Alpha production: \p 0 80 * - Alpha production probability 80 * - Alpha production probability: \p 0 81 * - Sampling scheme: \p NORMAL 81 * - Sampling scheme: \p NORMAL 82 */ 82 */ 83 G4FissionFragmentGenerator(); 83 G4FissionFragmentGenerator(); 84 /** Overloaded constructor 84 /** Overloaded constructor 85 * - Usage: 85 * - Usage: 86 * - \p Verbosity: Verbosity level 86 * - \p Verbosity: Verbosity level 87 * 87 * 88 * - Notes: 88 * - Notes: 89 - Refer to the documentation for t 89 - Refer to the documentation for the default constructor for 90 * setting up the operating paramet 90 * setting up the operating parameters. 91 */ 91 */ 92 G4FissionFragmentGenerator(G4int Verbosity 92 G4FissionFragmentGenerator(G4int Verbosity); 93 93 94 protected: 94 protected: 95 /** Initialize is a common function called 95 /** Initialize is a common function called by all constructors. */ 96 void Initialize(); 96 void Initialize(); 97 97 98 public: 98 public: 99 // Functions 99 // Functions 100 /** Generates a single fission event 100 /** Generates a single fission event 101 * - Usage: No arguments required 101 * - Usage: No arguments required 102 * 102 * 103 * - Notes: 103 * - Notes: 104 * - Generates a single fission event 104 * - Generates a single fission event by calling the overloaded function 105 * and passing an argument of '1' 105 * and passing an argument of '1' 106 */ 106 */ 107 G4DynamicParticleVector* G4GenerateFission 107 G4DynamicParticleVector* G4GenerateFission(); 108 /** Generates a single fission event 108 /** Generates a single fission event 109 * - Usage: 109 * - Usage: 110 * -\p Projectile: G4HadProjectile of t 110 * -\p Projectile: G4HadProjectile of the fission-inducing particle 111 * 111 * 112 * - Notes: 112 * - Notes: 113 * - Generates a single fission event 113 * - Generates a single fission event by calling the overloaded function 114 * and passing an argument of '1' 114 * and passing an argument of '1' 115 */ 115 */ 116 G4DynamicParticleVector* G4GenerateFission 116 G4DynamicParticleVector* G4GenerateFission(const G4HadProjectile& Projectile); 117 /** Generates NumberOfFissions fission eve 117 /** Generates NumberOfFissions fission events 118 * - Usage: 118 * - Usage: 119 * -\p NumberOfFissions: The number o 119 * -\p NumberOfFissions: The number of fission events to generate 120 * 120 * 121 * - Notes: 121 * - Notes: 122 * - Generates \p NumberOfFissions fi 122 * - Generates \p NumberOfFissions fission events 123 */ 123 */ 124 const std::vector<G4DynamicParticleVector* 124 const std::vector<G4DynamicParticleVector*> 125 G4GenerateFission(G4long NumberOfFissions, 125 G4GenerateFission(G4long NumberOfFissions, const G4HadProjectile& Projectile); 126 /** Returns a randomly sampled fission pro 126 /** Returns a randomly sampled fission product */ 127 G4Ions* G4GenerateFissionProduct(); 127 G4Ions* G4GenerateFissionProduct(); 128 /** Returns the production rate of alpha p 128 /** Returns the production rate of alpha particles for fission events */ 129 G4double G4GetAlphaProduction(); 129 G4double G4GetAlphaProduction(); 130 /** Returns the probability of ternary fis 130 /** Returns the probability of ternary fission */ 131 G4double G4GetTernaryProbability(); 131 G4double G4GetTernaryProbability(); 132 /** Returns the FissionCause of the fissio 132 /** Returns the FissionCause of the fission event. */ 133 G4FFGEnumerations::FissionCause G4GetCause 133 G4FFGEnumerations::FissionCause G4GetCause(); 134 /** Returns the energy of the fission indu 134 /** Returns the energy of the fission inducing particle. */ 135 G4double G4GetIncidentEnergy(); 135 G4double G4GetIncidentEnergy(); 136 /** Returns the code of the fission isotop 136 /** Returns the code of the fission isotope in ZZZAAA format. */ 137 G4int G4GetIsotope(); 137 G4int G4GetIsotope(); 138 /** Returns the MetaState of the fission i 138 /** Returns the MetaState of the fission isotope. */ 139 G4FFGEnumerations::MetaState G4GetMetaStat 139 G4FFGEnumerations::MetaState G4GetMetaState(); 140 /** Returns the FissionSamplingScheme that 140 /** Returns the FissionSamplingScheme that is currently in use. */ 141 G4FFGEnumerations::FissionSamplingScheme G 141 G4FFGEnumerations::FissionSamplingScheme G4GetSamplingScheme(); 142 /** Returns the yield type that is current 142 /** Returns the yield type that is currently in use */ 143 G4FFGEnumerations::YieldType G4GetYieldTyp 143 G4FFGEnumerations::YieldType G4GetYieldType(); 144 /** Initializes a new \p G4FPY...Dist clas 144 /** Initializes a new \p G4FPY...Dist class based on the class descriptor 145 * variables of G4FissionFragmentGenerato 145 * variables of G4FissionFragmentGenerator. 146 */ 146 */ 147 bool InitializeFissionProductYieldClass(st 147 bool InitializeFissionProductYieldClass(std::istringstream& dataFile); 148 /** Converts the Z, A and M of an isotope 148 /** Converts the Z, A and M of an isotope into an integer representation **/ 149 static G4int G4MakeIsotopeCode(G4int Z, G4 149 static G4int G4MakeIsotopeCode(G4int Z, G4int A, G4int M); 150 /** Sets the number of alpha particles pro 150 /** Sets the number of alpha particles produced in fission. 151 * - Usage: 151 * - Usage: 152 * - if \p AlphaProduction is negativ 152 * - if \p AlphaProduction is negative then alpha particles are sampled 153 * on a Gaussian with a mean of \p 153 * on a Gaussian with a mean of \p abs(AlphaProduction). 154 * 154 * 155 * - Notes: 155 * - Notes: 156 * - The maximum number of alpha part 156 * - The maximum number of alpha particles that may be created is 157 * physically limited by the nucleo 157 * physically limited by the nucleons present in the parent nucleus. 158 * Setting the AlphaProduction too 158 * Setting the AlphaProduction too high will have unpredictable 159 * results on the sampling of the f 159 * results on the sampling of the fission products. 160 */ 160 */ 161 void G4SetAlphaProduction(G4double WhatAlp 161 void G4SetAlphaProduction(G4double WhatAlphaProduction); 162 /** Sets the probability of ternary fissio 162 /** Sets the probability of ternary fission 163 * - Usage: 163 * - Usage: 164 * - \p WhatAlphaProductionProbabilit 164 * - \p WhatAlphaProductionProbability: Probability of generating alpha 165 * particles for a fission event. 1 = 165 * particles for a fission event. 1 = 100% chance of alpha production 166 * 166 * 167 * - Notes: 167 * - Notes: 168 */ 168 */ 169 void G4SetTernaryProbability(G4double What 169 void G4SetTernaryProbability(G4double WhatTernaryProbability); 170 /** Sets the cause of fission event. 170 /** Sets the cause of fission event. 171 * - Usage: 171 * - Usage: 172 * - \p WhichCause: \p SPONTANEOUS, \ 172 * - \p WhichCause: \p SPONTANEOUS, \p N_INDUCED, \p P_INDUCED, or 173 * \p G_INDUCED 173 * \p G_INDUCED 174 * 174 * 175 * - Notes: 175 * - Notes: 176 */ 176 */ 177 void G4SetCause(G4FFGEnumerations::Fission 177 void G4SetCause(G4FFGEnumerations::FissionCause WhichCause); 178 /** Sets the incident energy, if any, of t 178 /** Sets the incident energy, if any, of the particle that cause fission. 179 * - Usage: 179 * - Usage: 180 * - \p WhatIncidentEnergy: Kinetic e 180 * - \p WhatIncidentEnergy: Kinetic energy of the particle with units applied; 181 * 181 * 182 * - Notes: 182 * - Notes: 183 */ 183 */ 184 void G4SetIncidentEnergy(G4double WhatInci 184 void G4SetIncidentEnergy(G4double WhatIncidentEnergy); 185 /** Sets the fission isotope 185 /** Sets the fission isotope 186 * - Usage: 186 * - Usage: 187 * - \p WhichIsotope: Code of the iso 187 * - \p WhichIsotope: Code of the isotope in ZZZAAA format 188 * 188 * 189 * - Notes: 189 * - Notes: 190 */ 190 */ 191 void G4SetIsotope(G4int WhichIsotope); 191 void G4SetIsotope(G4int WhichIsotope); 192 /** Sets the metastable state of the fissi 192 /** Sets the metastable state of the fission isotope. 193 * - Usage: 193 * - Usage: 194 * - \p WhichMetaState: \p GROUND_STA 194 * - \p WhichMetaState: \p GROUND_STATE, \p META_1, or \p META_2 195 * 195 * 196 * - Notes: 196 * - Notes: 197 */ 197 */ 198 void G4SetMetaState(G4FFGEnumerations::Met 198 void G4SetMetaState(G4FFGEnumerations::MetaState WhichMetaState); 199 /** Set the sampling scheme. 199 /** Set the sampling scheme. 200 * - Usage: 200 * - Usage: 201 * - NewScheme: The G4FissionSampling 201 * - NewScheme: The G4FissionSamplingScheme value for the sampling 202 * scheme to use. 202 * scheme to use. 203 * 203 * 204 * - Notes: 204 * - Notes: 205 * - \p NORMAL: Sets the parameters o 205 * - \p NORMAL: Sets the parameters of this class to sample fission 206 * events without any biasing. 206 * events without any biasing. 207 * - \p LIGHT_FRAGMENT: Sets the para 207 * - \p LIGHT_FRAGMENT: Sets the parameters of this class to bias the 208 * fragment generation by always 208 * fragment generation by always selecting a light fragment 209 * (A \< 115) first. 209 * (A \< 115) first. 210 * - \p WENDT: Sets the parameters of 210 * - \p WENDT: Sets the parameters of this class to sample fission 211 * events according to the Wendt 211 * events according to the Wendt sampling scheme. Please refer to 212 * the code documentation for G4 212 * the code documentation for G4FPYWendtSamplingDist for a more 213 * detailed explanation. 213 * detailed explanation. 214 */ 214 */ 215 void G4SetSamplingScheme(G4FFGEnumerations 215 void G4SetSamplingScheme(G4FFGEnumerations::FissionSamplingScheme NewScheme); 216 /** Sets the ENDF yield type to be used fo 216 /** Sets the ENDF yield type to be used for the data 217 * - Usage: 217 * - Usage: 218 * - \p WhichYieldType: \p INDEPENDEN 218 * - \p WhichYieldType: \p INDEPENDENT or \p COMULATIVE 219 * 219 * 220 * - Notes: 220 * - Notes: 221 */ 221 */ 222 void G4SetYieldType(G4FFGEnumerations::Yie 222 void G4SetYieldType(G4FFGEnumerations::YieldType WhichYieldType); 223 /** Sets the verbosity levels 223 /** Sets the verbosity levels 224 * - Usage: 224 * - Usage: 225 * - \p WhichVerbosity: Combination o 225 * - \p WhichVerbosity: Combination of levels 226 * 226 * 227 * - Notes: 227 * - Notes: 228 * - \p SILENT: All verbose output is 228 * - \p SILENT: All verbose output is repressed 229 * - \p UPDATES: Only high-level inte 229 * - \p UPDATES: Only high-level internal changes are reported 230 * - \p DAUGHTER_INFO: Displays infor 230 * - \p DAUGHTER_INFO: Displays information about daughter product sampling 231 * - \p NEUTRON_INFO: Displays inform 231 * - \p NEUTRON_INFO: Displays information about neutron sampling 232 * - \p GAMMA_INFO: Displays informat 232 * - \p GAMMA_INFO: Displays information about gamma sampling 233 * - \p ALPHA_INFO: Displays informat 233 * - \p ALPHA_INFO: Displays information about alpha sampling 234 * - \p MOMENTUM_INFO: Displays infor 234 * - \p MOMENTUM_INFO: Displays information about momentum balancing 235 * - \p EXTRAPOLATION_INTERPOLATION_I 235 * - \p EXTRAPOLATION_INTERPOLATION_INFO: Displays information about any data extrapolation 236 * or interpolation that occurs 236 * or interpolation that occurs 237 * - \p DEBUG: Reports program flow a 237 * - \p DEBUG: Reports program flow as it steps through functions 238 * - \p PRINT_ALL: Displays any and a 238 * - \p PRINT_ALL: Displays any and all output 239 */ 239 */ 240 void G4SetVerbosity(G4int WhatVerbosity); 240 void G4SetVerbosity(G4int WhatVerbosity); 241 241 242 protected: 242 protected: 243 // Variables 243 // Variables 244 // Class descriptor variables 244 // Class descriptor variables 245 /** Number in ZZZAAA format of the isotope 245 /** Number in ZZZAAA format of the isotope that 246 * G4FissionFragmentGenerator references 246 * G4FissionFragmentGenerator references 247 */ 247 */ 248 G4int Isotope_; 248 G4int Isotope_; 249 /** MetaState information of the isotope t 249 /** MetaState information of the isotope that G4FissionFragmentGenerator 250 * references 250 * references 251 * \n A value of 0 refers to the ground s 251 * \n A value of 0 refers to the ground state 252 */ 252 */ 253 G4FFGEnumerations::MetaState MetaState_; 253 G4FFGEnumerations::MetaState MetaState_; 254 /** The cause of fission: \p SPONTANEOUS o 254 /** The cause of fission: \p SPONTANEOUS or \p N_INDUCED. */ 255 G4FFGEnumerations::FissionCause Cause_; 255 G4FFGEnumerations::FissionCause Cause_; 256 /** Kinetic energy, if any, of the inciden 256 /** Kinetic energy, if any, of the incident particle in GeV. */ 257 G4double IncidentEnergy_; 257 G4double IncidentEnergy_; 258 /** The type of yield to be used: \p INDEP 258 /** The type of yield to be used: \p INDEPENDET or \p CUMULATIVE */ 259 G4FFGEnumerations::YieldType YieldType_; 259 G4FFGEnumerations::YieldType YieldType_; 260 /** Sets the ternary fission probability. 260 /** Sets the ternary fission probability. Valid ranges are [0, 1] */ 261 G4double TernaryProbability_; 261 G4double TernaryProbability_; 262 /** Controls whether alpha particles are e 262 /** Controls whether alpha particles are emitted, and how many */ 263 G4double AlphaProduction_; 263 G4double AlphaProduction_; 264 /** If Isotope_, MetaState_, Cause_, or In 264 /** If Isotope_, MetaState_, Cause_, or IncidentEnergy_ are changed in 265 * the middle of a run then the class poi 265 * the middle of a run then the class pointed at by YieldData_ will 266 * need to be reconstructed 266 * need to be reconstructed 267 */ 267 */ 268 G4bool IsReconstructionNeeded_; 268 G4bool IsReconstructionNeeded_; 269 /** Verbosity level */ 269 /** Verbosity level */ 270 G4int Verbosity_; 270 G4int Verbosity_; 271 271 272 // Defines the current sampling scheme and 272 // Defines the current sampling scheme and the respective class 273 /** The sampling scheme that is used: \p N 273 /** The sampling scheme that is used: \p NORMAL, \p LIGHT_FRAGMENT, or 274 * \p WENDT. 274 * \p WENDT. 275 */ 275 */ 276 G4FFGEnumerations::FissionSamplingScheme S 276 G4FFGEnumerations::FissionSamplingScheme SamplingScheme_; 277 /** Pointer to G4FissionProductYieldDist c 277 /** Pointer to G4FissionProductYieldDist class that holds all the 278 * probabilistic yield data 278 * probabilistic yield data 279 */ 279 */ 280 G4FissionProductYieldDist* YieldData_; 280 G4FissionProductYieldDist* YieldData_; 281 281 282 // Destructor function(s) 282 // Destructor function(s) 283 public: 283 public: 284 /** Default deconstructor */ 284 /** Default deconstructor */ 285 ~G4FissionFragmentGenerator(); 285 ~G4FissionFragmentGenerator(); 286 }; 286 }; 287 287 288 #endif /* G4FISSIONFRAGMENTGENERATOR_HH */ 288 #endif /* G4FISSIONFRAGMENTGENERATOR_HH */ 289 289