00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // $Id$ 00027 // 00028 // 00029 #ifndef G4EmSaturation_h 00030 #define G4EmSaturation_h 1 00031 00032 // ------------------------------------------------------------- 00033 // 00034 // GEANT4 Class header file 00035 // 00036 // 00037 // File name: G4EmSaturation 00038 // 00039 // Author: Vladimir Ivanchenko 00040 // 00041 // Creation date: 18.02.2008 00042 // 00043 // Modifications: 00044 // 00045 // 00046 // Class Description: 00047 // Compution on saturation effect, which reduce visible energy 00048 // deposition at the step. Default implementation takes into 00049 // account Birks effect. Birks coefficients for some materials 00050 // from G4 database on materials are provided 00051 // 00052 // ------------------------------------------------------------- 00053 00054 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00056 00057 #include "globals.hh" 00058 #include "G4Step.hh" 00059 #include "G4ParticleDefinition.hh" 00060 #include <vector> 00061 00062 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00063 00064 class G4LossTableManager; 00065 class G4NistManager; 00066 class G4MaterialCutsCouple; 00067 class G4Material; 00068 00069 class G4EmSaturation 00070 { 00071 public: 00072 00073 G4EmSaturation(); 00074 virtual ~G4EmSaturation(); 00075 00076 G4double VisibleEnergyDeposition(const G4ParticleDefinition*, 00077 const G4MaterialCutsCouple*, 00078 G4double length, 00079 G4double edepTotal, 00080 G4double edepNIEL = 0.0); 00081 00082 inline G4double VisibleEnergyDeposition(const G4Step*); 00083 00084 // find and Birks coefficient 00085 G4double FindG4BirksCoefficient(const G4Material*); 00086 00087 inline void SetVerbose(G4int); 00088 00089 // dump coeffitients used in run time 00090 void DumpBirksCoefficients(); 00091 00092 // dump G4 list 00093 void DumpG4BirksCoefficients(); 00094 00095 private: 00096 00097 // hide assignment operator 00098 G4EmSaturation & operator=(const G4EmSaturation &right); 00099 G4EmSaturation(const G4EmSaturation&); 00100 00101 G4double FindBirksCoefficient(const G4Material*); 00102 00103 void Initialise(); 00104 00105 const G4ParticleDefinition* electron; 00106 const G4ParticleDefinition* proton; 00107 G4LossTableManager* manager; 00108 G4NistManager* nist; 00109 00110 // cash 00111 const G4Material* curMaterial; 00112 G4double curBirks; 00113 G4double curRatio; 00114 G4double curChargeSq; 00115 00116 G4int verbose; 00117 G4int nMaterials; 00118 G4int nG4Birks; 00119 00120 // list of materials used in run time 00121 std::vector<const G4Material*> matPointers; 00122 std::vector<G4String> matNames; 00123 std::vector<G4double> massFactors; 00124 std::vector<G4double> effCharges; 00125 00126 // list of G4 materials 00127 std::vector<G4double> g4MatData; 00128 std::vector<G4String> g4MatNames; 00129 00130 }; 00131 00132 inline void G4EmSaturation::SetVerbose(G4int val) 00133 { 00134 verbose = val; 00135 } 00136 00137 inline G4double G4EmSaturation::VisibleEnergyDeposition( 00138 const G4Step* step) 00139 { 00140 G4Track* track = step->GetTrack(); 00141 return VisibleEnergyDeposition(track->GetParticleDefinition(), 00142 track->GetMaterialCutsCouple(), 00143 step->GetStepLength(), 00144 step->GetTotalEnergyDeposit(), 00145 step->GetNonIonizingEnergyDeposit()); 00146 } 00147 00148 #endif 00149