#include <HadrontherapyMatrix.hh>
|
| ~HadrontherapyMatrix () |
|
void | PrintNuclides () |
|
void | ClearHitTrack () |
|
G4int * | GetHitTrack (G4int i, G4int j, G4int k) |
|
void | Initialize () |
|
void | Clear () |
|
G4bool | Fill (G4int, G4ParticleDefinition *particleDef, G4int i, G4int j, G4int k, G4double energyDeposit, G4bool fluence=false) |
|
void | Fill (G4int i, G4int j, G4int k, G4double energyDeposit) |
|
void | TotalEnergyDeposit () |
|
void | StoreMatrix (G4String file, void *data, size_t psize) |
|
void | StoreFluenceData () |
|
void | StoreDoseData () |
|
void | StoreDoseFluenceAscii (G4String filename="") |
|
G4int | Index (G4int i, G4int j, G4int k) |
|
G4double * | GetMatrix () |
|
G4int | GetNvoxel () |
|
G4int | GetNumberOfVoxelAlongX () |
|
G4int | GetNumberOfVoxelAlongY () |
|
G4int | GetNumberOfVoxelAlongZ () |
|
Definition at line 55 of file HadrontherapyMatrix.hh.
◆ HadrontherapyMatrix()
HadrontherapyMatrix::HadrontherapyMatrix |
( |
G4int |
numberOfVoxelAlongX, |
|
|
G4int |
numberOfVoxelAlongY, |
|
|
G4int |
numberOfVoxelAlongZ, |
|
|
G4double |
massOfVoxel |
|
) |
| |
|
private |
Definition at line 61 of file HadrontherapyMatrix.cc.
76 G4cout <<
"HadrontherapyMatrix: Memory space to store physical dose into " <<
78 " voxels has been allocated " <<
G4endl;
80 else G4Exception(
"HadrontherapyMatrix::HadrontherapyMatrix()",
"Hadrontherapy0005",
FatalException,
"Can't allocate memory to store physical dose!");
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int numberOfVoxelAlongX
◆ ~HadrontherapyMatrix()
HadrontherapyMatrix::~HadrontherapyMatrix |
( |
| ) |
|
◆ Clear()
void HadrontherapyMatrix::Clear |
( |
| ) |
|
◆ ClearHitTrack()
void HadrontherapyMatrix::ClearHitTrack |
( |
| ) |
|
Definition at line 132 of file HadrontherapyMatrix.cc.
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4int numberOfVoxelAlongX
◆ Fill() [1/2]
Definition at line 148 of file HadrontherapyMatrix.cc.
154 if ( (energyDeposit <=0. && !fluence) || !
secondary)
return false;
156 G4int PDGencoding = particleDef -> GetPDGEncoding();
157 PDGencoding -= PDGencoding%10;
160 for (
size_t l=0; l <
ionStore.size(); l++)
162 if (
ionStore[l].PDGencoding == PDGencoding )
164 if ( (trackID ==1 &&
ionStore[l].isPrimary) || (trackID !=1 && !
ionStore[l].isPrimary))
166 if (energyDeposit > 0.)
ionStore[l].dose[
Index(i, j, k)] += energyDeposit;
175 G4int Z = particleDef-> GetAtomicNumber();
176 G4int A = particleDef-> GetAtomicMass();
178 G4String fullName = particleDef -> GetParticleName();
179 G4String name = fullName.substr (0, fullName.find(
"[") );
183 (trackID == 1) ?
true:
false,
200 if (energyDeposit > 0.) newIon.
dose[
Index(i, j, k)] += energyDeposit;
G4int Index(G4int i, G4int j, G4int k)
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
double A(double temperature)
std::vector< ion > ionStore
G4int numberOfVoxelAlongX
◆ Fill() [2/2]
◆ GetHitTrack()
◆ GetInstance() [1/2]
◆ GetInstance() [2/2]
Definition at line 54 of file HadrontherapyMatrix.cc.
HadrontherapyMatrix(G4int numberOfVoxelAlongX, G4int numberOfVoxelAlongY, G4int numberOfVoxelAlongZ, G4double massOfVoxel)
static HadrontherapyMatrix * instance
◆ GetMatrix()
G4double* HadrontherapyMatrix::GetMatrix |
( |
| ) |
|
|
inline |
◆ GetNumberOfVoxelAlongX()
G4int HadrontherapyMatrix::GetNumberOfVoxelAlongX |
( |
| ) |
|
|
inline |
◆ GetNumberOfVoxelAlongY()
G4int HadrontherapyMatrix::GetNumberOfVoxelAlongY |
( |
| ) |
|
|
inline |
◆ GetNumberOfVoxelAlongZ()
G4int HadrontherapyMatrix::GetNumberOfVoxelAlongZ |
( |
| ) |
|
|
inline |
◆ GetNvoxel()
G4int HadrontherapyMatrix::GetNvoxel |
( |
| ) |
|
|
inline |
Definition at line 116 of file HadrontherapyMatrix.hh.
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4int numberOfVoxelAlongX
◆ Index()
◆ Initialize()
void HadrontherapyMatrix::Initialize |
( |
| ) |
|
Definition at line 110 of file HadrontherapyMatrix.cc.
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4int numberOfVoxelAlongX
◆ PrintNuclides()
void HadrontherapyMatrix::PrintNuclides |
( |
| ) |
|
◆ StoreDoseData()
void HadrontherapyMatrix::StoreDoseData |
( |
| ) |
|
Definition at line 267 of file HadrontherapyMatrix.cc.
270 for (
size_t i=0; i <
ionStore.size(); i++){
void StoreMatrix(G4String file, void *data, size_t psize)
std::vector< ion > ionStore
◆ StoreDoseFluenceAscii()
void HadrontherapyMatrix::StoreDoseFluenceAscii |
( |
G4String |
filename = "" | ) |
|
Definition at line 278 of file HadrontherapyMatrix.cc.
284 G4cout <<
"Dose is being written to " << filename <<
G4endl;
285 ofs.open(filename, std::ios::out);
292 ofs << std::setw(
width) <<
"Dose(Gy)";
295 for (
size_t l=0; l <
ionStore.size(); l++)
330 ofs << i <<
'\t' << j <<
'\t' << k <<
'\t';
335 for (
size_t l=0; l <
ionStore.size(); l++)
G4int Index(G4int i, G4int j, G4int k)
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4GLOB_DLL std::ostream G4cout
std::vector< ion > ionStore
G4int numberOfVoxelAlongX
◆ StoreFluenceData()
void HadrontherapyMatrix::StoreFluenceData |
( |
| ) |
|
Definition at line 260 of file HadrontherapyMatrix.cc.
262 for (
size_t i=0; i <
ionStore.size(); i++){
void StoreMatrix(G4String file, void *data, size_t psize)
std::vector< ion > ionStore
◆ StoreMatrix()
void HadrontherapyMatrix::StoreMatrix |
( |
G4String |
file, |
|
|
void * |
data, |
|
|
size_t |
psize |
|
) |
| |
Definition at line 228 of file HadrontherapyMatrix.cc.
232 ofs.open(file, std::ios::out);
241 if (psize ==
sizeof(
unsigned int))
243 unsigned int* pdata = (
unsigned int*)data;
244 if (pdata[n])
ofs << i <<
'\t' << j <<
'\t' <<
245 k <<
'\t' << pdata[
n] <<
G4endl;
250 if (pdata[n])
ofs << i <<
'\t' << j <<
'\t' <<
251 k <<
'\t' << pdata[
n] <<
G4endl;
G4int Index(G4int i, G4int j, G4int k)
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4int numberOfVoxelAlongX
◆ TotalEnergyDeposit()
void HadrontherapyMatrix::TotalEnergyDeposit |
( |
| ) |
|
Definition at line 386 of file HadrontherapyMatrix.cc.
391 #ifdef G4ANALYSIS_USE_ROOT 401 #ifdef G4ANALYSIS_USE_ROOT 403 if (analysis -> IsTheTFile() )
static HadrontherapyAnalysisManager * GetInstance()
G4int Index(G4int i, G4int j, G4int k)
G4int numberOfVoxelAlongY
G4int numberOfVoxelAlongZ
G4int numberOfVoxelAlongX
◆ doseUnit
◆ filename
◆ hitTrack
G4int* HadrontherapyMatrix::hitTrack |
|
private |
◆ instance
◆ ionStore
std::vector<ion> HadrontherapyMatrix::ionStore |
|
private |
◆ massOfVoxel
G4double HadrontherapyMatrix::massOfVoxel |
|
private |
◆ matrix
◆ numberOfVoxelAlongX
G4int HadrontherapyMatrix::numberOfVoxelAlongX |
|
private |
◆ numberOfVoxelAlongY
G4int HadrontherapyMatrix::numberOfVoxelAlongY |
|
private |
◆ numberOfVoxelAlongZ
G4int HadrontherapyMatrix::numberOfVoxelAlongZ |
|
private |
◆ ofs
std::ofstream HadrontherapyMatrix::ofs |
|
private |
◆ secondary
G4bool HadrontherapyMatrix::secondary = false |
|
static |
◆ stdFile
The documentation for this class was generated from the following files: