70 {
G4cout <<
"BrachyUserScorer-defined DumpQuantityToFile() method is invoked."
79 if(opt.size() == 0) opt =
"csv";
82 std::ofstream
ofile(fileName);
86 G4cerr <<
"ERROR : DumpToFile : File open error -> " << fileName <<
G4endl;
94 MeshScoreMap::const_iterator msMapItr = fSMap.find(psName);
96 if(msMapItr == fSMap.end())
98 G4cerr <<
"ERROR : DumpToFile : Unknown quantity, \""<< psName
103 std::map<G4int, G4StatDouble*> * score = msMapItr ->
second-> GetMap();
105 ofile <<
"# primitive scorer name: " << msMapItr -> first <<
G4endl;
109 ofile << std::setprecision(16);
112 for(
int y = 0;
y < fNMeshSegments[1];
y++) {
113 for(
int z = 0;
z < fNMeshSegments[2];
z++){
114 G4int numberOfVoxel_x = fNMeshSegments[0];
115 G4int numberOfVoxel_y = fNMeshSegments[1];
116 G4int numberOfVoxel_z =fNMeshSegments[2];
121 G4double xx = ( - numberOfVoxel_x + 1+ 2*
x )* voxelWidth/2;
122 G4double yy = ( - numberOfVoxel_y + 1+ 2*
y )* voxelWidth/2;
123 G4double zz = ( - numberOfVoxel_z + 1+ 2*
z )* voxelWidth/2;
125 std::map<G4int, G4StatDouble*>::iterator
value = score -> find(idx);
127 if (value != score -> end())
131 ofile << xx <<
" " << yy <<
" " << zz <<
" "
132 <<(value->second->sum_wx())/
CLHEP::keV << G4endl;
139 analysis -> FillH2WithEnergyDeposition(xx,yy,
144 ofile << std::setprecision(6);