File indexing completed on 2026-07-13 08:21:05
0001
0002 #ifndef G4HepEmSBBremTableBuilder_HH
0003 #define G4HepEmSBBremTableBuilder_HH
0004
0005
0006 #include "globals.hh"
0007 #include "G4String.hh"
0008
0009 #include <vector>
0010
0011
0012 class G4MaterialCutsCouple;
0013
0014 class G4HepEmSBBremTableBuilder {
0015
0016 public:
0017
0018 G4HepEmSBBremTableBuilder();
0019
0020 ~G4HepEmSBBremTableBuilder();
0021
0022
0023
0024 void Initialize(const G4double lowe, const G4double highe);
0025
0026
0027 void ClearSamplingTables();
0028
0029
0030
0031 void Dump();
0032
0033
0034 public:
0035
0036
0037 struct STPoint {
0038 G4double fCum;
0039 G4double fParA;
0040 G4double fParB;
0041 };
0042
0043
0044 struct STable {
0045
0046 std::vector<G4double> fCumCutValues;
0047
0048 std::vector<STPoint> fSTable;
0049 };
0050
0051
0052
0053 struct SamplingTablePerZ {
0054 SamplingTablePerZ() : fNumGammaCuts(0), fMinElEnergyIndx(-1), fMaxElEnergyIndx(-1) {}
0055 size_t fNumGammaCuts;
0056 G4int fMinElEnergyIndx;
0057 G4int fMaxElEnergyIndx;
0058 std::vector<STable*> fTablesPerEnergy;
0059
0060 std::vector<G4double> fGammaECuts;
0061 std::vector<G4double> fLogGammaECuts;
0062
0063 std::vector<size_t> fMatCutIndxToGamCutIndx;
0064
0065 std::vector< std::vector<size_t> > fGamCutIndxToMatCutIndx;
0066 };
0067
0068
0069
0070 const SamplingTablePerZ* GetSamplingTablesForZ(int iz) { return fSBSamplingTables[iz]; }
0071 const double* GetElEnergyVect() { return fElEnergyVect.data(); }
0072 const double* GetKappaVect() { return fKappaVect.data(); }
0073
0074
0075 private:
0076
0077 void BuildSamplingTables();
0078
0079 void InitSamplingTables();
0080
0081 void LoadSTGrid();
0082
0083 void LoadSamplingTables(G4int iz);
0084
0085 void ReadCompressedFile(const G4String &fname, std::istringstream &iss);
0086
0087
0088
0089
0090
0091
0092
0093 public:
0094
0095
0096 G4int fMaxZet;
0097 G4int fNumElEnergy;
0098 G4int fNumKappa;
0099
0100
0101 G4double fUsedLowEenergy;
0102 G4double fUsedHighEenergy;
0103 G4double fLogMinElEnergy;
0104 G4double fILDeltaElEnergy;
0105
0106
0107 std::vector<G4double> fElEnergyVect;
0108 std::vector<G4double> fLElEnergyVect;
0109 std::vector<G4double> fKappaVect;
0110 std::vector<G4double> fLKappaVect;
0111
0112
0113 std::vector<SamplingTablePerZ*> fSBSamplingTables;
0114
0115 };
0116
0117 #endif