#include <HadrontherapyLet.hh>
|
| ~HadrontherapyLet () |
|
void | Initialize () |
|
void | Clear () |
|
void | Fill (G4int i, G4int j, G4int k, G4double DE, G4double DX) |
|
void | FillEnergySpectrum (G4int trackID, G4ParticleDefinition *particleDef, G4double DE, G4double DX, G4int i, G4int j, G4int k) |
|
void | LetOutput () |
|
void | StoreLetAscii () |
|
void | StoreLetRoot () |
|
Definition at line 61 of file HadrontherapyLet.hh.
HadrontherapyLet::~HadrontherapyLet |
( |
| ) |
|
void HadrontherapyLet::Clear |
( |
| ) |
|
Clear all stored data
Definition at line 98 of file HadrontherapyLet.cc.
100 for (
size_t i=0; i < ionLetStore.size(); i++)
102 delete [] ionLetStore[i].letDN;
103 delete [] ionLetStore[i].letDD;
Definition at line 107 of file HadrontherapyLet.cc.
114 if (DE <= 0. || DX <=0.)
return;
116 G4int Z = particleDef -> GetAtomicNumber();
119 G4int PDGencoding = particleDef -> GetPDGEncoding();
120 PDGencoding -= PDGencoding%10;
122 G4int voxel = matrix -> Index(i,j,k);
124 totalLetD[voxel] += DE*(DE/DX);
125 DtotalLetD[voxel] += DE;
131 for (l=0; l < ionLetStore.size(); l++)
133 if (ionLetStore[l].PDGencoding == PDGencoding)
134 if ( ((trackID ==1) && (ionLetStore[l].isPrimary)) || ((trackID !=1) && (!ionLetStore[l].isPrimary)))
138 if (l == ionLetStore.size())
141 G4int A = particleDef -> GetAtomicMass();
143 G4String fullName = particleDef -> GetParticleName();
144 G4String name = fullName.substr (0, fullName.find(
"[") );
148 (trackID == 1) ?
true:
false,
160 ionLetStore.push_back(ion);
164 ionLetStore[l].letDN[voxel] += DE*(DE/DX);
165 ionLetStore[l].letDD[voxel] += DE;
static G4bool doCalculation
double A(double temperature)
void HadrontherapyLet::Initialize |
( |
| ) |
|
void HadrontherapyLet::LetOutput |
( |
| ) |
|
Definition at line 172 of file HadrontherapyLet.cc.
174 for(
G4int v=0; v < nVoxels; v++) if (DtotalLetD[v]>0.) totalLetD[
v] = totalLetD[
v]/DtotalLetD[
v];
176 std::sort(ionLetStore.begin(), ionLetStore.end());
181 for (
size_t ion=0;
ion < ionLetStore.size();
ion++)
183 if (ionLetStore[
ion].letDD[
v] >0.) ionLetStore[
ion].letDN[
v] = ionLetStore[
ion].letDN[
v] / ionLetStore[
ion].letDD[
v];
void HadrontherapyLet::StoreLetAscii |
( |
| ) |
|
Definition at line 190 of file HadrontherapyLet.cc.
193 if(ionLetStore.size())
195 ofs.open(filename, std::ios::out);
200 ofs << std::setprecision(6) <<
std::left <<
202 ofs << std::setw(
width) <<
"LDT";
203 for (
size_t l=0; l < ionLetStore.size(); l++)
205 G4String a = (ionLetStore[l].isPrimary) ?
"_1":
"";
206 ofs << std::setw(
width) << ionLetStore[l].name +
a ;
211 for(
G4int i = 0; i < numberOfVoxelAlongX; i++)
212 for(
G4int j = 0; j < numberOfVoxelAlongY; j++)
213 for(
G4int k = 0; k < numberOfVoxelAlongZ; k++)
215 G4int v = matrix -> Index(i, j, k);
217 for (
size_t l=0; l < ionLetStore.size(); l++)
220 if(ionLetStore[l].letDN)
223 ofs << i <<
'\t' << j <<
'\t' << k <<
'\t';
226 for (
size_t ll=0; ll < ionLetStore.size(); ll++)
228 ofs << std::setw(
width) << ionLetStore[ll].letDN[
v]/(
keV/
um) ;
235 G4cout <<
"Let is being written to " << filename <<
G4endl;
std::vector< ExP01TrackerHit * > a
G4GLOB_DLL std::ostream G4cout
static constexpr double um
static constexpr double keV
void HadrontherapyLet::StoreLetRoot |
( |
| ) |
|
Definition at line 241 of file HadrontherapyLet.cc.
243 #ifdef G4ANALYSIS_USE_ROOT
247 for(
G4int i = 0; i < numberOfVoxelAlongX; i++)
248 for(
G4int j = 0; j < numberOfVoxelAlongY; j++)
249 for(
G4int k = 0; k < numberOfVoxelAlongZ; k++)
251 G4int v = matrix -> Index(i, j, k);
252 for (
size_t ion=0;
ion < ionLetStore.size();
ion++)
255 analysis -> FillLetFragmentTuple( i, j, k, ionLetStore[
ion].
A, ionLetStore[
ion].
Z, ionLetStore[
ion].letDN[v]);
static HadrontherapyAnalysisManager * GetInstance()
double A(double temperature)
G4bool HadrontherapyLet::doCalculation = false |
|
static |
The documentation for this class was generated from the following files: