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 // 18 Mar 2010 L. Pandola 1st implementation. 00033 // 09 Mar 2012 L. Pandola Add public method (and machinery) to return 00034 // the absolute and the normalized shell cross 00035 // sections independently. 00036 // 00037 // ------------------------------------------------------------------- 00038 // 00039 // Class description: 00040 // This class is a container for cross sections and transport momenta 00041 // calculated by Penelope models (ionisation, bremsstrahlung). It stores 00042 // PhysicsTables/PhysicsVectors of 00043 // a) the "hard quantities" (above the threshold), 0-th order (cross section) 00044 // 1-st order (= stopping XS), 2-nd order (= straggling XS) 00045 // b) the "soft quantities" (below threshold), 0-th order (cross section) 00046 // 1-st order (= stopping XS), 2-nd order (= straggling XS) 00047 // c) total hard cross sections for individual oscillators 00048 // vs. energy. Two versions are available, one with normalized values 00049 // (good for sampling) and one with absolute values. 00050 // 00051 // The interface *always* uses energy and cross sections, while internally 00052 // log(energy) and log(XS) are used. 00053 // 00054 // One instance per each cut-material couple should be created by the 00055 // calling class. 00056 // 00057 // Public method to retrieve hard cross section, soft stopping power, 00058 // total cross section and hard shell cross sections. 00059 // 00060 // Notice: all quantities stored here are *per molecule* 00061 // 00062 // ------------------------------------------------------------------- 00063 00064 #ifndef G4PENELOPECROSSSECTION_HH 00065 #define G4PENELOPECROSSSECTION_HH 1 00066 00067 #include "globals.hh" 00068 00069 class G4PhysicsTable; 00070 class G4DataVector; 00071 00072 class G4PenelopeCrossSection 00073 { 00074 00075 public: 00076 //constructor: one has to give the number of points in each PhysicsVector 00077 //(= dimension of the energy grid) and the number of shells (0 is the 00078 //default). 00079 G4PenelopeCrossSection(size_t nOfEnergyPoints,size_t nOfShells=0); 00080 // 00081 ~G4PenelopeCrossSection(); 00082 00084 G4double GetTotalCrossSection(G4double energy); 00086 G4double GetHardCrossSection(G4double energy); 00088 G4double GetSoftStoppingPower(G4double energy); 00090 G4double GetShellCrossSection(size_t shellID,G4double energy); 00092 G4double GetNormalizedShellCrossSection(size_t shellID,G4double energy); 00093 00094 size_t GetNumberOfShells(){return numberOfShells;}; 00095 00096 void AddCrossSectionPoint(size_t binNumber, 00097 G4double energy,G4double XH0, G4double XH1, 00098 G4double XH2, 00099 G4double XS0, G4double XS1, G4double XS2); 00100 00101 void AddShellCrossSectionPoint(size_t binNumber, 00102 size_t shellID,G4double energy,G4double xs); 00103 00104 private: 00105 G4PenelopeCrossSection & operator=(const G4PenelopeCrossSection &right); 00106 G4PenelopeCrossSection(const G4PenelopeCrossSection&); 00107 void NormalizeShellCrossSections(); 00108 00109 G4bool isNormalized; 00110 00111 size_t numberOfEnergyPoints; 00112 size_t numberOfShells; 00113 00114 //all tables are log. XS vs. log E 00115 00116 //XS0, XS1, XS2 in Penelope nomenclature 00117 G4PhysicsTable* softCrossSections; 00118 00119 //XH0, XH1, XH2 in Penelope nomenclature 00120 G4PhysicsTable* hardCrossSections; 00121 00122 //XS for individual shells 00123 G4PhysicsTable* shellCrossSections; 00124 G4PhysicsTable* shellNormalizedCrossSections; 00125 00126 }; 00127 00128 #endif 00129