Geant4 Cross Reference |
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 // ------------------------------------------------------------------- 28 // 29 // GEANT4 class file 30 // 31 // CERN, Geneva, Switzerland 32 // 33 // File name: G4PhotonEvaporation 34 // 35 // Author: Vladimir Ivantchenko 36 // 37 // Creation date: 22 October 2015 38 // 39 // ------------------------------------------------------------------- 40 // 41 // This is gamma deexcitation model based on the nuclear levels data 42 // 43 44 #ifndef G4PHOTONEVAPORATION_HH 45 #define G4PHOTONEVAPORATION_HH 1 46 47 #include "globals.hh" 48 #include "G4VEvaporationChannel.hh" 49 #include "G4NuclearLevelData.hh" 50 #include "G4LevelManager.hh" 51 #include "G4Fragment.hh" 52 53 class G4GammaTransition; 54 55 class G4PhotonEvaporation : public G4VEvaporationChannel { 56 57 public: 58 59 explicit G4PhotonEvaporation(G4GammaTransition* ptr=nullptr); 60 61 ~G4PhotonEvaporation() override; 62 63 void Initialise() override; 64 65 // one photon or e- emission 66 G4Fragment* EmittedFragment(G4Fragment* theNucleus) override; 67 68 // returns "false", emitted gamma and e- are added to the results 69 G4bool 70 BreakUpChain(G4FragmentVector* theResult, G4Fragment* theNucleus) override; 71 72 // emitted gamma, e-, and residual fragment are added to the results 73 G4FragmentVector* BreakItUp(const G4Fragment& theNucleus); 74 75 // compute emission probability for both continum and discrete cases 76 // must be called before any method above 77 G4double GetEmissionProbability(G4Fragment* theNucleus) override; 78 79 // methods for unit tests 80 G4double ComputeInverseXSection(G4Fragment* theNucleus, 81 G4double kinEnergy) override; 82 G4double ComputeProbability(G4Fragment* theNucleus, 83 G4double kinEnergy) override; 84 85 G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy); 86 87 G4double GetUpperLevelEnergy(G4int Z, G4int A); 88 89 void SetGammaTransition(G4GammaTransition*); 90 91 void SetICM(G4bool) override; 92 93 void RDMForced (G4bool) override; 94 95 inline void SetVerboseLevel(G4int verbose); 96 97 inline G4int GetVacantShellNumber() const; 98 99 G4PhotonEvaporation(const G4PhotonEvaporation & right) = delete; 100 const G4PhotonEvaporation & operator = 101 (const G4PhotonEvaporation & right) = delete; 102 103 private: 104 105 void InitialiseGRData(); 106 107 G4Fragment* GenerateGamma(G4Fragment* nucleus); 108 109 inline void InitialiseLevelManager(G4int Z, G4int A); 110 111 G4NuclearLevelData* fNuclearLevelData; 112 const G4LevelManager* fLevelManager{nullptr}; 113 G4GammaTransition* fTransition; 114 115 // fPolarization stores polarization tensor for consecutive 116 // decays of a nucleus 117 G4NuclearPolarization* fPolarization{nullptr}; 118 119 G4int fVerbose; 120 G4int theZ{0}; 121 G4int theA{0}; 122 G4int fPoints{0}; 123 G4int fCode{0}; 124 G4int vShellNumber{-1}; 125 G4int MAXDEPOINT{10}; 126 std::size_t fIndex{0}; 127 128 G4int fSecID; // Creator model ID for the secondaries created by this model 129 130 G4double fLevelEnergyMax{0.0}; 131 G4double fExcEnergy{0.0}; 132 G4double fProbability{0.0}; 133 G4double fStep{0.0}; 134 G4double fMaxLifeTime{DBL_MAX}; 135 136 G4double fTolerance; 137 138 G4bool fICM{true}; 139 G4bool fRDM{false}; 140 G4bool fSampleTime{true}; 141 G4bool fCorrelatedGamma{false}; 142 G4bool isInitialised{false}; 143 144 static const G4int MAXGRDATA{300}; 145 static G4float GREnergy[MAXGRDATA]; 146 static G4float GRWidth[MAXGRDATA]; 147 148 G4double fCummProbability[10] = {0.0}; 149 }; 150 151 inline void G4PhotonEvaporation::SetVerboseLevel(G4int verbose) 152 { 153 fVerbose = verbose; 154 } 155 156 inline void 157 G4PhotonEvaporation::InitialiseLevelManager(G4int Z, G4int A) 158 { 159 if(Z != theZ || A != theA) { 160 theZ = Z; 161 theA = A; 162 fIndex = 0; 163 fLevelManager = fNuclearLevelData->GetLevelManager(theZ, theA); 164 fLevelEnergyMax = fLevelManager ? fLevelManager->MaxLevelEnergy() : 0.0; 165 } 166 } 167 168 inline G4int G4PhotonEvaporation::GetVacantShellNumber() const 169 { 170 return vShellNumber; 171 } 172 173 #endif 174