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 // Author: Luciano Pandola 00029 // 00030 // History: 00031 // ----------- 00032 // 20 Oct 2010 L. Pandola 1st implementation. 00033 // 02 May 2011 L. Pandola Remove dependency on CLHEP::HepMatrix 00034 // 24 May 2011 L. Pandola Renamed (make default Penelope) 00035 // 00036 // ------------------------------------------------------------------- 00037 // 00038 // Class description: 00039 // Helper class for the calculation of final state (energy and angular 00040 // distribution) for bremsstrahlung, Penelope Model, version 2008 00041 // ------------------------------------------------------------------- 00042 00043 #ifndef G4PENELOPEBREMSSTRAHLUNGFS_HH 00044 #define G4PENELOPEBREMSSTRAHLUNGFS_HH 1 00045 00046 #include "globals.hh" 00047 #include "G4DataVector.hh" 00048 #include <map> 00049 00050 class G4PhysicsFreeVector; 00051 class G4PhysicsLogVector; 00052 class G4Material; 00053 class G4PhysicsTable; 00054 00055 class G4PenelopeBremsstrahlungFS 00056 { 00057 public: 00058 00059 G4PenelopeBremsstrahlungFS(); 00060 ~G4PenelopeBremsstrahlungFS(); 00061 00062 G4double GetEffectiveZSquared(const G4Material* mat); 00063 void ClearTables(); 00064 size_t GetNBinsX(){return nBinsX;}; 00065 00066 00067 //utilities 00068 G4double GetMomentumIntegral(G4double* y, 00069 G4double up,G4int momOrder); 00070 00071 G4PhysicsTable* GetScaledXSTable(const G4Material*,G4double cut); 00072 G4double SampleGammaEnergy(G4double energy,const G4Material*, G4double cut); 00073 00074 private: 00075 //assignment operator 00076 G4PenelopeBremsstrahlungFS & operator=(const G4PenelopeBremsstrahlungFS &right); 00077 //copy constructor 00078 G4PenelopeBremsstrahlungFS(const G4PenelopeBremsstrahlungFS&); 00079 00080 //Differential cross section tables 00081 //Table contains G4PhysicsVectors of log(XS(E,x)) vs. log(E) for a grid of 32 values in 00082 //x (= reduced photon energy) 00083 std::map< std::pair<const G4Material*,G4double> , 00084 G4PhysicsTable*> *theReducedXSTable; 00085 00086 void BuildScaledXSTable(const G4Material* material,G4double cut); 00087 std::map<const G4Material*,G4double> *theEffectiveZSq; 00088 00089 00090 //Element data table 00091 static const size_t nBinsE = 57; 00092 static const size_t nBinsX = 32; 00093 //x and E grids used in the data tables 00094 G4double theXGrid[nBinsX]; 00095 G4double theEGrid[nBinsE]; 00096 void ReadDataFile(G4int Z); 00097 00098 //Map of element data vs. Z. 00099 //This is conceptually an array [57][33] with 57 energy 00100 //points and 32 points in x. The 33-th column gives the total XS vs. E. 00101 //It is implemented as a one-dimensional array of dimension 00102 //57*33=1881 elements. data[e][x] --> theElementData[e*(nBinsX+1)+x] 00103 std::map<G4int,G4DataVector*> *theElementData; 00104 00105 //Tables for energy sampling 00106 void InitializeEnergySampling(const G4Material*,G4double cut); 00107 00108 //Table contains G4PhysicsVectors of integral_XS(E,x) vs. x for a grid of 00109 //57 values in energy 00110 std::map< std::pair<const G4Material*,G4double> , 00111 G4PhysicsTable*> *theSamplingTable; 00112 std::map< std::pair<const G4Material*,G4double> , 00113 G4PhysicsFreeVector* > *thePBcut; 00114 00115 //temporary vector. Used as member variable to avoid to book/release the 00116 //memory on the fly. This vector is over-written at every call of 00117 //SampleGammaEnergy() 00118 G4PhysicsFreeVector* theTempVec; 00119 00120 }; 00121 00122 #endif 00123