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 // Geant4 header G4EmTableUtil 27 // Geant4 header G4EmTableUtil 28 // 28 // 29 // Author V.Ivanchenko 14.03.2022 29 // Author V.Ivanchenko 14.03.2022 30 // 30 // 31 // Utilities used at initialisation of EM phys 31 // Utilities used at initialisation of EM physics 32 // 32 // 33 33 34 #ifndef G4EmTableUtil_h 34 #ifndef G4EmTableUtil_h 35 #define G4EmTableUtil_h 1 35 #define G4EmTableUtil_h 1 36 36 37 #include "globals.hh" 37 #include "globals.hh" 38 #include "G4PhysicsTable.hh" 38 #include "G4PhysicsTable.hh" 39 #include "G4VMultipleScattering.hh" 39 #include "G4VMultipleScattering.hh" 40 #include "G4VEmProcess.hh" 40 #include "G4VEmProcess.hh" 41 #include "G4VEnergyLossProcess.hh" 41 #include "G4VEnergyLossProcess.hh" 42 #include "G4EmModelManager.hh" 42 #include "G4EmModelManager.hh" 43 #include "G4LossTableBuilder.hh" 43 #include "G4LossTableBuilder.hh" 44 #include "G4ParticleDefinition.hh" 44 #include "G4ParticleDefinition.hh" 45 #include "G4MscStepLimitType.hh" 45 #include "G4MscStepLimitType.hh" 46 #include "G4DataVector.hh" 46 #include "G4DataVector.hh" 47 47 48 class G4EmTableUtil 48 class G4EmTableUtil 49 { 49 { 50 public: 50 public: 51 51 52 static const G4DataVector* 52 static const G4DataVector* 53 PrepareEmProcess(G4VEmProcess* proc, 53 PrepareEmProcess(G4VEmProcess* proc, 54 const G4ParticleDefinition* 54 const G4ParticleDefinition* part, 55 const G4ParticleDefinition* 55 const G4ParticleDefinition* secPart, 56 G4EmModelManager* modelManager, 56 G4EmModelManager* modelManager, 57 const G4double& maxKinEnerg 57 const G4double& maxKinEnergy, 58 G4int& secID, G4int& tripletID, 58 G4int& secID, G4int& tripletID, 59 G4int& mainSec, const G4int 59 G4int& mainSec, const G4int& verb, 60 const G4bool& master); 60 const G4bool& master); 61 61 62 static void BuildEmProcess(G4VEmProcess* pro 62 static void BuildEmProcess(G4VEmProcess* proc, 63 const G4VEmProces 63 const G4VEmProcess* masterProc, 64 const G4ParticleDefinition* firstPa 64 const G4ParticleDefinition* firstPart, 65 const G4ParticleDefinition* part, 65 const G4ParticleDefinition* part, 66 const G4int nModels, const G4int ve 66 const G4int nModels, const G4int verb, 67 const G4bool mast 67 const G4bool master, const G4bool isLocked, 68 const G4bool toBu 68 const G4bool toBuild, G4bool& baseMat); 69 69 70 static void BuildLambdaTable(G4VEmProcess* p 70 static void BuildLambdaTable(G4VEmProcess* proc, 71 const G4Particl 71 const G4ParticleDefinition* part, 72 G4EmModelManage 72 G4EmModelManager* modelManager, 73 G4LossTableBuilder* bld, 73 G4LossTableBuilder* bld, 74 G4PhysicsTable* 74 G4PhysicsTable* theLambdaTable, 75 G4PhysicsTable* 75 G4PhysicsTable* theLambdaTablePrim, 76 const G4double 76 const G4double minKinEnergy, 77 const G4double 77 const G4double minKinEnergyPrim, 78 const G4double 78 const G4double maxKinEnergy, 79 const G4double 79 const G4double scale, 80 const G4int ver 80 const G4int verbose, 81 const G4bool st 81 const G4bool startFromNull, 82 const G4bool sp 82 const G4bool splineFlag); 83 83 84 static void BuildLambdaTable(G4VEnergyLossPr 84 static void BuildLambdaTable(G4VEnergyLossProcess* proc, 85 const G4Particl 85 const G4ParticleDefinition* part, 86 G4EmModelManage 86 G4EmModelManager* modelManager, 87 G4LossTableBuilder* bld, 87 G4LossTableBuilder* bld, 88 G4PhysicsTable* 88 G4PhysicsTable* theLambdaTable, 89 const G4DataVec 89 const G4DataVector* theCuts, 90 const G4double 90 const G4double minKinEnergy, 91 const G4double 91 const G4double maxKinEnergy, 92 const G4double 92 const G4double scale, 93 const G4int ver 93 const G4int verbose, 94 const G4bool sp 94 const G4bool splineFlag); 95 95 96 static const G4ParticleDefinition* CheckIon( 96 static const G4ParticleDefinition* CheckIon( 97 G4VEnergyLossPr 97 G4VEnergyLossProcess* proc, 98 const G4Particl 98 const G4ParticleDefinition* part, 99 const G4Particl 99 const G4ParticleDefinition* particle, 100 const G4int ver 100 const G4int verboseLevel, G4bool& isIon); 101 101 102 static void UpdateModels(G4VEnergyLossProces 102 static void UpdateModels(G4VEnergyLossProcess* proc, 103 G4EmModelManager* modelManager, 103 G4EmModelManager* modelManager, 104 const G4double maxK 104 const G4double maxKinEnergy, 105 const G4int nModels 105 const G4int nModels, 106 G4int& secID, G4int 106 G4int& secID, G4int& biasID, 107 G4int& mainSecondar 107 G4int& mainSecondaries, const G4bool baseMat, 108 const G4bool isMast 108 const G4bool isMaster, const G4bool useAGen); 109 109 110 static void BuildLocalElossProcess(G4VEnergy 110 static void BuildLocalElossProcess(G4VEnergyLossProcess* proc, 111 const G4VEnergyLossProcess* maste 111 const G4VEnergyLossProcess* masterProc, 112 const G4ParticleDefinition* part, 112 const G4ParticleDefinition* part, 113 const G4i 113 const G4int nModels); 114 114 115 static void BuildDEDXTable(G4VEnergyLossProc 115 static void BuildDEDXTable(G4VEnergyLossProcess* proc, 116 const G4ParticleDefinition* part, 116 const G4ParticleDefinition* part, 117 G4EmModelManager* modelManager, 117 G4EmModelManager* modelManager, 118 G4LossTableBuilder* bld, 118 G4LossTableBuilder* bld, 119 G4PhysicsTable* table, 119 G4PhysicsTable* table, 120 const G4double minKinEnergy, 120 const G4double minKinEnergy, 121 const G4double maxKinEnergy, 121 const G4double maxKinEnergy, 122 const G4int nbins, 122 const G4int nbins, 123 const G4int verbose, 123 const G4int verbose, 124 const G4EmTableType tType, 124 const G4EmTableType tType, 125 const G4bool splineFlag); 125 const G4bool splineFlag); 126 126 127 static void PrepareMscProcess(G4VMultipleSca 127 static void PrepareMscProcess(G4VMultipleScattering* proc, 128 const G4Partic 128 const G4ParticleDefinition& part, 129 G4EmModelManager* modelManager, 129 G4EmModelManager* modelManager, 130 G4MscStepLimitType& stepLimit, 130 G4MscStepLimitType& stepLimit, 131 G4double& facr 131 G4double& facrange, 132 G4bool& latDisplacement, G4bool& 132 G4bool& latDisplacement, G4bool& master, 133 G4bool& isIon, G4bool& baseMat); 133 G4bool& isIon, G4bool& baseMat); 134 134 135 static void BuildMscProcess(G4VMultipleScatt 135 static void BuildMscProcess(G4VMultipleScattering* proc, 136 const G4VMultipl 136 const G4VMultipleScattering* masterProc, 137 const G4ParticleDefinition& 137 const G4ParticleDefinition& part, 138 const G4ParticleDefinition* 138 const G4ParticleDefinition* firstPart, 139 G4int nModels, G4bool master 139 G4int nModels, G4bool master); 140 140 141 static G4bool StoreMscTable(G4VMultipleScatt 141 static G4bool StoreMscTable(G4VMultipleScattering* proc, 142 const G4Particle 142 const G4ParticleDefinition* part, 143 const G4String& 143 const G4String& directory, 144 const G4int nModels, const G4int v 144 const G4int nModels, const G4int verb, 145 const G4bool asc 145 const G4bool ascii); 146 146 147 static G4bool StoreTable(G4VProcess*, const 147 static G4bool StoreTable(G4VProcess*, const G4ParticleDefinition*, 148 G4PhysicsTable*, co 148 G4PhysicsTable*, const G4String& dir, 149 const G4String& tna 149 const G4String& tname, G4int verb, 150 G4bool ascii); 150 G4bool ascii); 151 151 152 static G4bool RetrieveTable(G4VProcess* ptr, 152 static G4bool RetrieveTable(G4VProcess* ptr, 153 const G4Particle 153 const G4ParticleDefinition* part, 154 G4PhysicsTable* 154 G4PhysicsTable* aTable, 155 const G4String& 155 const G4String& dir, const G4String& tname, 156 const G4int verb 156 const G4int verb, const G4bool ascii, 157 const G4bool spl 157 const G4bool spline); 158 158 159 }; 159 }; 160 160 161 #endif 161 #endif 162 162 163 163 164 164