Loading...
Searching...
No Matches
RBE.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26/// \file radiobiology/include/RBE.hh
27/// \brief Definition of the RadioBio::RBE class
28
29#ifndef RadiobiologyRBE_H
30#define RadiobiologyRBE_H 1
31
32#include "globals.hh"
33
35
36#include <map>
37#include <valarray>
38#include <vector>
39
40namespace RadioBio
41{
42
43// Forward declariation of other radiobiology classes
44class DetectorConstruction;
45class RBEAccumulable;
46class RBEMessenger;
47class VoxelizedSensitiveDetector;
48
49class RBE : public VRadiobiologicalQuantity
50{
51 public:
52 RBE();
53 ~RBE();
54
55 // Initialization of data from a CSV file
56 void LoadLEMTable(G4String path);
57
58 // Select the cell and update the pointer
59 void SetCellLine(G4String name);
60
61 // Calculate alpha and beta for single deposition, {0,0} if not applicable
62 std::tuple<G4double, G4double> GetHitAlphaAndBeta(G4double E, G4int Z);
63
64 // Virtual methods to override
65 void AddFromAccumulable(G4VAccumulable*) override;
66 void Initialize() override;
67 void Compute() override;
68 void Reset() override;
69 void Store() override;
70 void PrintParameters() override;
71
72 private:
73 // Calculation
75 void ComputeRBE();
76
77 // Output to text files (called at the end of run)
78 void StoreAlphaAndBeta();
79 void StoreRBE();
80
81 // Update the class with accumulated data
82 // (To be used for accumulation)
83 void SetAlphaNumerator(const array_type alpha);
84 void SetBetaNumerator(const array_type beta);
85 void SetDenominator(const array_type denom);
86
87 // Accumulation variants necessary for multi-run sumation
88 void AddAlphaNumerator(const array_type alpha);
89 void AddBetaNumerator(const array_type beta);
90 void AddDenominator(const array_type denom);
91
92 // Method to copy dose from the proper Radiobiological Quantity
93 void GetDose();
94
95 // Parameters for calculation
96 G4double fAlphaX = 0.;
97 G4double fBetaX = 0.;
98 G4double fDoseCut = 0.;
99
100 // Matrices to be set when accumulated
103 array_type fDose = {}; // Note: this is copied from calculation in Dose
104
108
109 // Matrices of calculated values
114
115 // Available tables and associated values.
116 using vector_type = std::map<G4int, std::vector<G4double>>;
117 std::map<G4String, vector_type> fTablesEnergy = {};
118 std::map<G4String, vector_type> fTablesAlpha = {};
119 std::map<G4String, vector_type> fTablesBeta = {};
120 std::map<G4String, G4double> fTablesAlphaX = {};
121 std::map<G4String, G4double> fTablesBetaX = {};
122 std::map<G4String, G4double> fTablesDoseCut = {};
123
124 // Selected tables and associated values.
125 // (changed when the cell line is set)
130 std::map<G4int, G4double> fMaxEnergies = {};
131 std::map<G4int, G4double> fMinEnergies = {};
132 G4int fMinZ = -1;
133 G4int fMaxZ = -1;
134};
135
136} // namespace RadioBio
137
138#endif
Definition of the RadioBio::VRadiobiologicalQuantity class.
vector_type * fActiveTableAlpha
Definition RBE.hh:128
G4int fMinZ
Definition RBE.hh:132
vector_type * fActiveTableEnergy
Definition RBE.hh:127
void SetAlphaNumerator(const array_type alpha)
Definition RBE.cc:489
array_type fLnS
Definition RBE.hh:110
vector_type * fActiveTableBeta
Definition RBE.hh:129
array_type fBetaNumerator
Definition RBE.hh:106
std::map< G4String, vector_type > fTablesEnergy
Definition RBE.hh:117
array_type fAlphaNumerator
Definition RBE.hh:105
void AddFromAccumulable(G4VAccumulable *) override
Definition RBE.cc:653
void Compute() override
Definition RBE.cc:416
array_type fDoseX
Definition RBE.hh:112
std::map< G4int, std::vector< G4double > > vector_type
Definition RBE.hh:116
array_type fSurvival
Definition RBE.hh:111
void SetCellLine(G4String name)
Definition RBE.cc:242
void ComputeAlphaAndBeta()
Definition RBE.cc:344
array_type fDose
Definition RBE.hh:103
void StoreRBE()
Definition RBE.cc:591
std::map< G4int, G4double > fMaxEnergies
Definition RBE.hh:130
std::tuple< G4double, G4double > GetHitAlphaAndBeta(G4double E, G4int Z)
Definition RBE.cc:287
void PrintParameters() override
Definition RBE.cc:99
array_type fBeta
Definition RBE.hh:102
std::map< G4String, G4double > fTablesAlphaX
Definition RBE.hh:120
std::map< G4String, G4double > fTablesDoseCut
Definition RBE.hh:122
G4double fDoseCut
Definition RBE.hh:98
array_type fRBE
Definition RBE.hh:113
void GetDose()
Definition RBE.cc:439
void AddDenominator(const array_type denom)
Definition RBE.cc:470
void SetDenominator(const array_type denom)
Definition RBE.cc:460
std::map< G4String, vector_type > fTablesAlpha
Definition RBE.hh:118
void LoadLEMTable(G4String path)
Definition RBE.cc:146
void AddAlphaNumerator(const array_type alpha)
Definition RBE.cc:509
void Reset() override
Definition RBE.cc:636
void SetBetaNumerator(const array_type beta)
Definition RBE.cc:499
array_type fDenominator
Definition RBE.hh:107
std::map< G4String, vector_type > fTablesBeta
Definition RBE.hh:119
void Store() override
Definition RBE.cc:91
G4String fActiveCellLine
Definition RBE.hh:126
std::map< G4String, G4double > fTablesBetaX
Definition RBE.hh:121
std::map< G4int, G4double > fMinEnergies
Definition RBE.hh:131
void AddBetaNumerator(const array_type beta)
Definition RBE.cc:528
G4double fAlphaX
Definition RBE.hh:96
void StoreAlphaAndBeta()
Definition RBE.cc:547
void Initialize() override
Definition RBE.cc:81
array_type fAlpha
Definition RBE.hh:101
void ComputeRBE()
Definition RBE.cc:378
G4double fBetaX
Definition RBE.hh:97
G4int fMaxZ
Definition RBE.hh:133

Applications | User Support | Publications | Collaboration