File indexing completed on 2025-02-23 09:22:19
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 #ifndef RadiobiologyRBE_H
0030 #define RadiobiologyRBE_H 1
0031
0032 #include "globals.hh"
0033
0034 #include "VRadiobiologicalQuantity.hh"
0035
0036 #include <map>
0037 #include <valarray>
0038 #include <vector>
0039
0040 namespace RadioBio
0041 {
0042
0043
0044 class DetectorConstruction;
0045 class RBEAccumulable;
0046 class RBEMessenger;
0047 class VoxelizedSensitiveDetector;
0048
0049 class RBE : public VRadiobiologicalQuantity
0050 {
0051 public:
0052 RBE();
0053 ~RBE();
0054
0055
0056 void LoadLEMTable(G4String path);
0057
0058
0059 void SetCellLine(G4String name);
0060
0061
0062 std::tuple<G4double, G4double> GetHitAlphaAndBeta(G4double E, G4int Z);
0063
0064
0065 void AddFromAccumulable(G4VAccumulable*) override;
0066 void Initialize() override;
0067 void Compute() override;
0068 void Reset() override;
0069 void Store() override;
0070 void PrintParameters() override;
0071
0072 private:
0073
0074 void ComputeAlphaAndBeta();
0075 void ComputeRBE();
0076
0077
0078 void StoreAlphaAndBeta();
0079 void StoreRBE();
0080
0081
0082
0083 void SetAlphaNumerator(const array_type alpha);
0084 void SetBetaNumerator(const array_type beta);
0085 void SetDenominator(const array_type denom);
0086
0087
0088 void AddAlphaNumerator(const array_type alpha);
0089 void AddBetaNumerator(const array_type beta);
0090 void AddDenominator(const array_type denom);
0091
0092
0093 void GetDose();
0094
0095
0096 G4double fAlphaX = 0.;
0097 G4double fBetaX = 0.;
0098 G4double fDoseCut = 0.;
0099
0100
0101 array_type fAlpha = {};
0102 array_type fBeta = {};
0103 array_type fDose = {};
0104
0105 array_type fAlphaNumerator = {};
0106 array_type fBetaNumerator = {};
0107 array_type fDenominator = {};
0108
0109
0110 array_type fLnS = {};
0111 array_type fSurvival = {};
0112 array_type fDoseX = {};
0113 array_type fRBE = {};
0114
0115
0116 using vector_type = std::map<G4int, std::vector<G4double>>;
0117 std::map<G4String, vector_type> fTablesEnergy = {};
0118 std::map<G4String, vector_type> fTablesAlpha = {};
0119 std::map<G4String, vector_type> fTablesBeta = {};
0120 std::map<G4String, G4double> fTablesAlphaX = {};
0121 std::map<G4String, G4double> fTablesBetaX = {};
0122 std::map<G4String, G4double> fTablesDoseCut = {};
0123
0124
0125
0126 G4String fActiveCellLine;
0127 vector_type* fActiveTableEnergy = nullptr;
0128 vector_type* fActiveTableAlpha = nullptr;
0129 vector_type* fActiveTableBeta = nullptr;
0130 std::map<G4int, G4double> fMaxEnergies = {};
0131 std::map<G4int, G4double> fMinEnergies = {};
0132 G4int fMinZ = -1;
0133 G4int fMaxZ = -1;
0134 };
0135
0136 }
0137
0138 #endif