File indexing completed on 2025-01-18 09:58:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 #ifndef G4PIXECROSSSECTIONHANDLER_HH
0044 #define G4PIXECROSSSECTIONHANDLER_HH 1
0045
0046 #include <map>
0047 #include <vector>
0048 #include <CLHEP/Units/SystemOfUnits.h>
0049
0050 #include "globals.hh"
0051 #include "G4DataVector.hh"
0052 #include "G4MaterialCutsCouple.hh"
0053
0054 class G4IInterpolator;
0055 class G4IDataSet;
0056 class G4Material;
0057 class G4Element;
0058
0059 class G4PixeCrossSectionHandler {
0060
0061 public:
0062
0063 G4PixeCrossSectionHandler();
0064
0065 G4PixeCrossSectionHandler(G4IInterpolator* interpolation,
0066 const G4String& modelK="ecpssr",
0067 const G4String& modelL="ecpssr",
0068 const G4String& modelM="ecpssr",
0069 G4double minE = 1*CLHEP::keV,
0070 G4double maxE = 0.1*CLHEP::GeV,
0071 G4int nBins = 200,
0072 G4double unitE = CLHEP::MeV,
0073 G4double unitData = CLHEP::barn,
0074 G4int minZ = 6, G4int maxZ = 92);
0075
0076 virtual ~G4PixeCrossSectionHandler();
0077
0078 void Initialise(G4IInterpolator* interpolation,
0079 const G4String& modelK="ecpssr",
0080 const G4String& modelL="ecpssr",
0081 const G4String& modelM="ecpssr",
0082 G4double minE = 1*CLHEP::keV,
0083 G4double maxE = 0.1*CLHEP::GeV,
0084 G4int nBins = 200,
0085 G4double unitE = CLHEP::MeV,
0086 G4double unitData = CLHEP::barn,
0087 G4int minZ = 6, G4int maxZ = 92);
0088
0089 G4int SelectRandomAtom(const G4Material* material, G4double e) const;
0090
0091 G4int SelectRandomShell(G4int Z, G4double e) const;
0092
0093 G4double FindValue(G4int Z, G4double e) const;
0094
0095 G4double FindValue(G4int Z, G4double e, G4int shellIndex) const;
0096
0097 G4double ValueForMaterial(const G4Material* material, G4double e) const;
0098
0099
0100
0101 void LoadShellData(const G4String& dataFile);
0102
0103
0104 G4double MicroscopicCrossSection(const G4ParticleDefinition* particleDef,
0105 G4double kineticEnergy,
0106 G4double Z,
0107 G4double deltaCut) const;
0108
0109 void PrintData() const;
0110
0111 void Clear();
0112
0113 private:
0114
0115
0116 G4PixeCrossSectionHandler(const G4PixeCrossSectionHandler&);
0117 G4PixeCrossSectionHandler & operator=(const G4PixeCrossSectionHandler &right);
0118
0119 G4int NumberOfComponents(G4int Z) const;
0120
0121 void ActiveElements();
0122
0123 void BuildForMaterials();
0124
0125 std::vector<G4IDataSet*>* BuildCrossSectionsForMaterials(const G4DataVector& energyVector);
0126
0127
0128 G4IInterpolator* CreateInterpolation();
0129
0130 const G4IInterpolator* GetInterpolation() const { return interpolation; }
0131
0132 G4IInterpolator* interpolation;
0133
0134 G4double eMin;
0135 G4double eMax;
0136 G4int nBins;
0137
0138 G4double unit1;
0139 G4double unit2;
0140
0141 G4int zMin;
0142 G4int zMax;
0143
0144 G4DataVector activeZ;
0145
0146
0147 std::map<G4int,G4IDataSet*,std::less<G4int> > dataMap;
0148
0149
0150
0151 std::vector<G4IDataSet*>* crossSections;
0152
0153 std::vector<G4String> crossModel;
0154
0155 };
0156
0157 #endif
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168