1 void Read(TString source, TString physics_list){
6 TString fileName=
"brachytherapy_"+source+
"_"+physics_list+
".root";
7 std::cout<<
"Reading " << fileName << std::endl;
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++)
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";