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