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 // $Id: G4SeltzerBergerModel.hh 74458 2013-10-07 15:23:13Z gcosmo $ 26 // 27 // 27 // ------------------------------------------- 28 // ------------------------------------------------------------------- 28 // 29 // 29 // GEANT4 Class header file 30 // GEANT4 Class header file 30 // 31 // 31 // 32 // 32 // File name: G4SeltzerBergerModel 33 // File name: G4SeltzerBergerModel 33 // 34 // 34 // Author: Andreas Schaelicke & Vladimi 35 // Author: Andreas Schaelicke & Vladimir Ivantchenko 35 // 36 // 36 // Creation date: 04.10.2011 37 // Creation date: 04.10.2011 37 // 38 // 38 // Modifications: 39 // Modifications: 39 // 40 // 40 // 24.07.2018 Introduced possibility to use sa << 41 // emitted photon energy (instead o << 42 // Seltzer-Berger scalled DCS for b << 43 // Using these sampling tables opti << 44 // state generation than the origin << 45 // extra memory (+ ~6MB in the case << 46 // (M Novak) << 47 // 41 // 48 // Class Description: 42 // Class Description: 49 // 43 // 50 // Implementation of the bremssrahlung energy 44 // Implementation of the bremssrahlung energy spectrum using 51 // 1. S.M. Seltzer and M.J. Berger Nucl. Instr 45 // 1. S.M. Seltzer and M.J. Berger Nucl. Instr. Meth. B12 (1985) 95 52 // 2. S.M. Seltzer and M.J. Berger Atomic data << 46 // 2. S.M. Seltzer and M.J. Berger Atomic data and Nuclear Data 53 // Tables 35 (1986) 345 47 // Tables 35 (1986) 345 >> 48 // Cross section computation in the base class G4eBremsstrahlungRelModel 54 49 55 // ------------------------------------------- 50 // ------------------------------------------------------------------- 56 // 51 // 57 52 58 #ifndef G4SeltzerBergerModel_h 53 #ifndef G4SeltzerBergerModel_h 59 #define G4SeltzerBergerModel_h 1 54 #define G4SeltzerBergerModel_h 1 60 55 61 #include "G4VEmModel.hh" << 62 #include "G4eBremsstrahlungRelModel.hh" 56 #include "G4eBremsstrahlungRelModel.hh" 63 #include "globals.hh" 57 #include "globals.hh" 64 58 65 class G4Physics2DVector; 59 class G4Physics2DVector; 66 class G4SBBremTable; << 67 class G4ParticleChangeForLoss; << 68 60 69 class G4SeltzerBergerModel : public G4VEmModel << 61 class G4SeltzerBergerModel : public G4eBremsstrahlungRelModel 70 { 62 { 71 63 72 public: 64 public: 73 65 74 explicit G4SeltzerBergerModel(const G4Partic << 66 G4SeltzerBergerModel(const G4ParticleDefinition* p = 0, 75 const G4String << 67 const G4String& nam = "eBremSB"); 76 68 77 ~G4SeltzerBergerModel() override; << 69 virtual ~G4SeltzerBergerModel(); 78 70 79 void Initialise(const G4ParticleDefinition*, << 71 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 80 72 81 void InitialiseLocal(const G4ParticleDefinit << 73 virtual void InitialiseForElement(const G4ParticleDefinition*, G4int Z); 82 G4VEmModel* masterModel << 83 << 84 G4double ComputeDEDXPerVolume(const G4Materi << 85 const G4Partic << 86 G4double ekin, << 87 G4double cutEn << 88 << 89 G4double ComputeCrossSectionPerAtom(const G4 << 90 G4double << 91 G4double << 92 G4double << 93 G4double << 94 G4double << 95 << 96 void SampleSecondaries(std::vector<G4Dynamic << 97 const G4MaterialCutsC << 98 const G4DynamicPartic << 99 G4double cutEnergy, << 100 G4double maxEnergy) o << 101 << 102 void SetupForMaterial(const G4ParticleDefini << 103 const G4Material*, G4d << 104 << 105 G4double MinPrimaryEnergy(const G4Material*, << 106 const G4ParticleDe << 107 G4double cutEnergy << 108 << 109 inline void SetBicubicInterpolationFlag(G4bo << 110 { fIsUseBicubicInterpolation = val; }; << 111 << 112 // hide assignment operator and cctr << 113 G4SeltzerBergerModel & operator=(const G4Sel << 114 G4SeltzerBergerModel(const G4SeltzerBergerMo << 115 74 116 private: << 75 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 117 << 76 const G4MaterialCutsCouple*, 118 void SetParticle(const G4ParticleDefinition* << 77 const G4DynamicParticle*, >> 78 G4double cutEnergy, >> 79 G4double maxEnergy); 119 80 120 void ReadData(G4int Z); << 81 inline void SetBicubicInterpolationFlag(G4bool); 121 82 122 G4double ComputeBremLoss(G4double cutEnergy) << 83 protected: 123 84 124 G4double ComputeXSectionPerAtom(G4double cut << 85 virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy); 125 86 126 G4double ComputeDXSectionPerAtom(G4double ga << 87 virtual G4String DirectoryPath() const; 127 88 128 G4double SampleEnergyTransfer(const G4double << 89 private: 129 const G4double << 130 const G4double << 131 const G4double << 132 90 133 protected: << 91 void ReadData(G4int Z, const char* path = 0); 134 92 135 G4ParticleChangeForLoss* fParticleChange{nul << 93 // hide assignment operator >> 94 G4SeltzerBergerModel & operator=(const G4SeltzerBergerModel &right); >> 95 G4SeltzerBergerModel(const G4SeltzerBergerModel&); >> 96 >> 97 static G4Physics2DVector* dataSB[101]; >> 98 static G4double ylimit[101]; >> 99 static G4double expnumlim; >> 100 G4int nwarn; >> 101 size_t idx; >> 102 size_t idy; >> 103 G4bool useBicubicInterpolation; >> 104 }; 136 105 137 private: << 106 inline void G4SeltzerBergerModel::SetBicubicInterpolationFlag(G4bool val) >> 107 { >> 108 useBicubicInterpolation = val; >> 109 } 138 110 139 static constexpr G4int gMaxZet{101}; << 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 140 static constexpr G4double gExpNumLimit{-12.} << 141 static G4double gYLimitData[gMaxZet]; << 142 static G4Physics2DVector* gSBDCSData[gMaxZet << 143 static G4SBBremTable* gSBSamplingTable; << 144 static const G4double gBremFactor; << 145 static const G4double gMigdalConstant; << 146 << 147 G4bool fIsUseBicubicInterpolation{false}; << 148 G4bool fIsUseSamplingTables{true}; << 149 G4bool fIsElectron{true}; << 150 G4bool fIsScatOffElectron{false}; << 151 G4bool isInitializer{false}; << 152 // << 153 G4int fCurrentIZ{0}; << 154 G4int fNumWarnings{0}; << 155 << 156 const G4ParticleDefinition* fPrimaryParticle << 157 G4ParticleDefinition* fGammaParticle; << 158 << 159 // cash << 160 G4double fPrimaryKinEnergy{0.}; << 161 G4double fPrimaryTotalEnergy{0.}; << 162 G4double fDensityFactor{0.}; << 163 G4double fDensityCorr{0.}; << 164 G4double fLowestKinEnergy; << 165 112 166 std::size_t fIndx{0}; << 167 std::size_t fIndy{0}; << 168 }; << 169 113 170 #endif 114 #endif 171 115