00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
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
00101
00102 void LoadShellData(const G4String& dataFile);
00103
00104
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
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
00126 std::vector<G4IDataSet*>* BuildCrossSectionsForMaterials(const G4DataVector& energyVector);
00127
00128
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
00148 std::map<G4int,G4IDataSet*,std::less<G4int> > dataMap;
00149
00150
00151
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