G4PixeCrossSectionHandler.hh

Go to the documentation of this file.
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 //
00027 // $Id$
00028 //
00029 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
00030 //
00031 // History:
00032 // -----------
00033 // 16 Jun 2008   MGP           Created on the basis of G4CrossSectionHandler
00034 
00035 // -------------------------------------------------------------------
00036 // Class description:
00037 // Cross section manager for hadron impact ionization
00038 // Documented in:
00039 // M.G. Pia et al., PIXE Simulation With Geant4,
00040 // IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, Dec. 2009.
00041 
00042 // -------------------------------------------------------------------
00043 
00044 #ifndef G4PIXECROSSSECTIONHANDLER_HH
00045 #define G4PIXECROSSSECTIONHANDLER_HH 1
00046 
00047 #include <map>
00048 #include <vector>
00049 #include <CLHEP/Units/SystemOfUnits.h>
00050 
00051 #include "globals.hh"
00052 #include "G4DataVector.hh"
00053 #include "G4MaterialCutsCouple.hh"
00054 
00055 class G4IInterpolator;
00056 class G4IDataSet;
00057 class G4Material;
00058 class G4Element;
00059 
00060 class G4PixeCrossSectionHandler {
00061 
00062 public:
00063 
00064   G4PixeCrossSectionHandler();
00065 
00066   G4PixeCrossSectionHandler(G4IInterpolator* interpolation,
00067                             const G4String& modelK="ecpssr",
00068                             const G4String& modelL="ecpssr",
00069                             const G4String& modelM="ecpssr",
00070                             G4double minE = 1*CLHEP::keV,
00071                             G4double maxE = 0.1*CLHEP::GeV,
00072                             G4int nBins = 200,
00073                             G4double unitE = CLHEP::MeV,
00074                             G4double unitData = CLHEP::barn,
00075                             G4int minZ = 6, G4int maxZ = 92);
00076   
00077   virtual ~G4PixeCrossSectionHandler();
00078 
00079   void Initialise(G4IInterpolator* interpolation,
00080                   const G4String& modelK="ecpssr",
00081                   const G4String& modelL="ecpssr",
00082                   const G4String& modelM="ecpssr",
00083                   G4double minE = 1*CLHEP::keV,
00084                   G4double maxE = 0.1*CLHEP::GeV,
00085                   G4int nBins = 200,
00086                   G4double unitE = CLHEP::MeV,
00087                   G4double unitData = CLHEP::barn,
00088                   G4int minZ = 6, G4int maxZ = 92);
00089 
00090   G4int SelectRandomAtom(const G4Material* material, G4double e) const;
00091 
00092   G4int SelectRandomShell(G4int Z, G4double e) const;
00093 
00094   G4double FindValue(G4int Z, G4double e) const;
00095 
00096   G4double FindValue(G4int Z, G4double e, G4int shellIndex) const;
00097 
00098   G4double ValueForMaterial(const G4Material* material, G4double e) const;
00099 
00100   // void LoadData(const G4String& dataFile);
00101 
00102   void LoadShellData(const G4String& dataFile);
00103 
00104   // Ionisation cross section as in Geant4 Physics Reference Manual
00105   G4double MicroscopicCrossSection(const G4ParticleDefinition* particleDef,
00106                                    G4double kineticEnergy,
00107                                    G4double Z,
00108                                    G4double deltaCut) const;
00109 
00110   void PrintData() const;
00111 
00112   void Clear();
00113 
00114 private:
00115 
00116  // Hide copy constructor and assignment operator
00117   G4PixeCrossSectionHandler(const G4PixeCrossSectionHandler&);
00118   G4PixeCrossSectionHandler & operator=(const G4PixeCrossSectionHandler &right);
00119 
00120   G4int NumberOfComponents(G4int Z) const;
00121 
00122   void ActiveElements();
00123 
00124   void BuildForMaterials();
00125   // Factory method
00126   std::vector<G4IDataSet*>* BuildCrossSectionsForMaterials(const G4DataVector& energyVector);
00127 
00128   // Factory method
00129   G4IInterpolator* CreateInterpolation();
00130 
00131   const G4IInterpolator* GetInterpolation() const { return interpolation; }
00132  
00133   G4IInterpolator* interpolation;
00134 
00135   G4double eMin;
00136   G4double eMax;
00137   G4int nBins;
00138 
00139   G4double unit1;
00140   G4double unit2;
00141 
00142   G4int zMin;
00143   G4int zMax;
00144 
00145   G4DataVector activeZ;
00146 
00147   // Map of PixeShellDataSets with the shell cross sections for each element
00148   std::map<G4int,G4IDataSet*,std::less<G4int> > dataMap;
00149 
00150   // Vector of composite cross sections for each material in the MaterialTable 
00151   // The composite cross section is composed of cross sections for each element in material
00152   std::vector<G4IDataSet*>* crossSections;
00153 
00154   std::vector<G4String> crossModel;
00155 
00156 };
00157 
00158 #endif
00159 
00160 
00161 
00162 
00163 
00164 
00165 
00166 
00167 
00168 
00169 

Generated on Mon May 27 17:49:22 2013 for Geant4 by  doxygen 1.4.7