File indexing completed on 2026-08-28 09:12:31
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 const std::vector<G4bool>* GetFluctuationFlags();
0096
0097 static G4bool GetFlag(std::size_t idx);
0098
0099 static G4bool GetBaseMaterialFlag();
0100
0101 inline void SetSplineFlag(G4bool flag);
0102
0103 inline void SetBaseMaterialActive(G4bool flag);
0104
0105 G4LossTableBuilder & operator=(const G4LossTableBuilder &right) = delete;
0106 G4LossTableBuilder(const G4LossTableBuilder&) = delete;
0107
0108 private:
0109
0110 G4EmParameters* theParameters;
0111
0112 G4bool splineFlag = true;
0113 G4bool isInitialized = false;
0114 G4bool isBaseMatActive = true;
0115 G4bool isInitializer;
0116
0117 static G4bool baseMatFlag;
0118 static std::vector<G4double>* theDensityFactor;
0119 static std::vector<G4int>* theDensityIdx;
0120 static std::vector<G4bool>* theFlag;
0121 static std::vector<G4bool>* theFluct;
0122 };
0123
0124 inline void G4LossTableBuilder::SetSplineFlag(G4bool flag)
0125 {
0126 splineFlag = flag;
0127 }
0128
0129
0130
0131
0132
0133
0134 inline void G4LossTableBuilder::SetBaseMaterialActive(G4bool flag)
0135 {
0136 isBaseMatActive = flag;
0137 }
0138
0139
0140
0141 #endif