File indexing completed on 2025-10-18 09:09:51
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
0044
0045
0046
0047
0048 #ifndef G4LossTableBuilder_h
0049 #define G4LossTableBuilder_h 1
0050
0051 #include <vector>
0052 #include "globals.hh"
0053 #include "G4PhysicsTable.hh"
0054
0055 class G4VEmModel;
0056 class G4ParticleDefinition;
0057 class G4EmParameters;
0058
0059 class G4LossTableBuilder
0060 {
0061
0062 public:
0063
0064 explicit G4LossTableBuilder(G4bool master);
0065
0066 ~G4LossTableBuilder();
0067
0068
0069 void BuildDEDXTable(G4PhysicsTable* dedxTable,
0070 const std::vector<G4PhysicsTable*>&);
0071
0072
0073 void BuildRangeTable(const G4PhysicsTable* dedxTable,
0074 G4PhysicsTable* rangeTable);
0075
0076
0077 void BuildInverseRangeTable(const G4PhysicsTable* rangeTable,
0078 G4PhysicsTable* invRangeTable);
0079
0080
0081 G4PhysicsTable* BuildTableForModel(G4PhysicsTable* table,
0082 G4VEmModel* model,
0083 const G4ParticleDefinition*,
0084 G4double emin, G4double emax,
0085 G4bool spline);
0086
0087
0088 void InitialiseBaseMaterials(const G4PhysicsTable* table=nullptr);
0089
0090
0091 static const std::vector<G4int>* GetCoupleIndexes();
0092
0093 static const std::vector<G4double>* GetDensityFactors();
0094
0095 static G4bool GetFlag(std::size_t idx);
0096
0097 static G4bool GetBaseMaterialFlag();
0098
0099 inline void SetSplineFlag(G4bool flag);
0100
0101 inline void SetBaseMaterialActive(G4bool flag);
0102
0103 G4LossTableBuilder & operator=(const G4LossTableBuilder &right) = delete;
0104 G4LossTableBuilder(const G4LossTableBuilder&) = delete;
0105
0106 private:
0107
0108 G4EmParameters* theParameters;
0109
0110 G4bool splineFlag = true;
0111 G4bool isInitialized = false;
0112 G4bool isBaseMatActive = true;
0113 G4bool isInitializer;
0114
0115 static G4bool baseMatFlag;
0116 static std::vector<G4double>* theDensityFactor;
0117 static std::vector<G4int>* theDensityIdx;
0118 static std::vector<G4bool>* theFlag;
0119 };
0120
0121 inline void G4LossTableBuilder::SetSplineFlag(G4bool flag)
0122 {
0123 splineFlag = flag;
0124 }
0125
0126
0127
0128
0129
0130
0131 inline void G4LossTableBuilder::SetBaseMaterialActive(G4bool flag)
0132 {
0133 isBaseMatActive = flag;
0134 }
0135
0136
0137
0138 #endif