Go to the source code of this file.
|
void | Read (TString source, TString physics_list) |
|
void Read |
( |
TString |
source, |
|
|
TString |
physics_list |
|
) |
| |
Definition at line 1 of file TG43_relative_dose.C.
References f, h20, radius, and Reset().
6 TString fileName=
"brachytherapy_"+
source+
"_"+physics_list+
".root";
7 std::cout<<
"Reading " << fileName << std::endl;
11 Double_t Seed_length = 0.35;
13 Double_t EnergyMap[401];
15 Double_t normDose[401];
16 Double_t GeomFunction[401];
17 Double_t GeometryFunctionZero;
24 Int_t numberOfBins=801;
26 for (
int i=0; i <401; i++)
33 for (
int k=0; k< numberOfBins; k++)
35 for (
int m=0; m< numberOfBins; m++)
37 Double_t xx_histo =
h20->GetXaxis()->GetBinCenter(k);
38 Double_t yy_histo =
h20->GetYaxis()->GetBinCenter(m);
39 Double_t edep_histo=
h20->GetBinContent(k, m);
40 radius = sqrt(xx_histo*xx_histo+yy_histo*yy_histo);
45 radInt = TMath::Nint(4*radius);
46 if ((radInt>0)&&(radInt<=400))
48 EnergyMap[radInt]+= edep_histo;
58 std::cout <<
"The energy deposition at the reference point is " << EnergyMap[40] << std::endl;
59 Double_t tempNormValue = EnergyMap[40]/Voxels[40];
61 std::cout <<
"Dose rate ditribution (distances in cm)" << std::endl;
64 TString outputFileName =
"geant4_dose_"+
source+
"_"+physics_list+
".txt";
66 myfile.open(outputFileName);
67 std::cout <<
"file " << outputFileName <<
" is created "<<std::endl;
69 for (
int i=0; i<=400; i++)
72 if (Voxels[i]>0) normDose[i] = EnergyMap[i]/Voxels[i]/tempNormValue;
80 myfile << R <<
" " << normDose[i] <<
"\n";
ntupleExperimental Reset()