|
||||
File indexing completed on 2025-01-18 09:58:13
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 #ifndef G4EmSaturation_h 0028 #define G4EmSaturation_h 1 0029 0030 // ------------------------------------------------------------- 0031 // 0032 // GEANT4 Class header file 0033 // 0034 // 0035 // File name: G4EmSaturation 0036 // 0037 // Author: Vladimir Ivanchenko 0038 // 0039 // Creation date: 18.02.2008 0040 // 0041 // Modifications: 0042 // 0043 // 0044 // Class Description: 0045 // Compution on saturation effect, which reduce visible energy 0046 // deposition at the step. Default implementation takes into 0047 // account Birks effect. Birks coefficients for some materials 0048 // from G4 database on materials are provided 0049 // 0050 // This class assumed to be G4ThreadLocal, because it is using 0051 // cache value for material 0052 // 0053 // ------------------------------------------------------------- 0054 0055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0057 0058 #include "globals.hh" 0059 #include "G4Step.hh" 0060 #include "G4ParticleDefinition.hh" 0061 #include <vector> 0062 0063 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0064 0065 class G4NistManager; 0066 class G4MaterialCutsCouple; 0067 class G4Material; 0068 0069 class G4EmSaturation 0070 { 0071 public: 0072 0073 explicit G4EmSaturation(G4int verb); 0074 virtual ~G4EmSaturation(); 0075 0076 // this method may be overwritten in the derived class 0077 // which implements alternative algorithm of saturation 0078 virtual G4double VisibleEnergyDeposition(const G4ParticleDefinition*, 0079 const G4MaterialCutsCouple*, 0080 G4double length, 0081 G4double edepTotal, 0082 G4double edepNIEL = 0.0) const; 0083 0084 // activate default model 0085 void InitialiseG4Saturation(); 0086 0087 // find and Birks coefficient 0088 G4double FindG4BirksCoefficient(const G4Material*); 0089 0090 // dump coeffitients used in run time 0091 void DumpBirksCoefficients(); 0092 0093 // dump G4 list 0094 void DumpG4BirksCoefficients(); 0095 0096 // this method should not be overwritten 0097 inline G4double VisibleEnergyDepositionAtAStep(const G4Step*) const; 0098 0099 inline void SetVerbose(G4int); 0100 0101 // hide assignment operator 0102 G4EmSaturation & operator=(const G4EmSaturation &right) = delete; 0103 G4EmSaturation(const G4EmSaturation&) = delete; 0104 0105 private: 0106 0107 void InitialiseBirksCoefficient(const G4Material*); 0108 0109 void InitialiseG4materials(); 0110 0111 const G4ParticleDefinition* electron; 0112 const G4ParticleDefinition* proton; 0113 G4NistManager* nist; 0114 0115 G4int verbose; 0116 G4int nG4Birks; 0117 G4int nWarnings; 0118 0119 static size_t nMaterials; 0120 0121 // list of materials used in run time 0122 static std::vector<G4double> massFactors; 0123 static std::vector<G4double> effCharges; 0124 0125 // list of G4 materials 0126 static std::vector<G4double> g4MatData; 0127 static std::vector<G4String> g4MatNames; 0128 }; 0129 0130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0131 0132 inline void G4EmSaturation::SetVerbose(G4int val) 0133 { 0134 verbose = val; 0135 } 0136 0137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0138 0139 inline G4double G4EmSaturation::VisibleEnergyDepositionAtAStep( 0140 const G4Step* step) const 0141 { 0142 return VisibleEnergyDeposition(step->GetTrack()->GetParticleDefinition(), 0143 step->GetTrack()->GetMaterialCutsCouple(), 0144 step->GetStepLength(), 0145 step->GetTotalEnergyDeposit(), 0146 step->GetNonIonizingEnergyDeposit()); 0147 } 0148 0149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0150 0151 #endif 0152
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |