124 kMessenger(messenger),
126 kbSetModalityVoxelSize(false),
127 kbModelingTrajectory(false),
129 kFlagInModeling(false),
130 kFlagSaving_g4_gdd(false),
131 kFlagParameterization(0),
132 kFlagProcessedInteractiveScorer(false) {
135 if(std::getenv(
"G4GMocrenFile_DEST_DIR") == NULL) {
142 const char * env = std::getenv(
"G4GMocrenFile_DEST_DIR");
143 int len = std::strlen(env);
145 G4Exception(
"G4GMocrenFileSceneHandler::G4GMocrenFileSceneHandler(*)",
147 "Invalid length of string set in G4GMocrenFile_DEST_DIR");
156 if ( std::getenv(
"G4GMocrenFile_MAX_FILE_NUM" ) != NULL ) {
157 char * pcFileNum = getenv(
"G4GMocrenFile_MAX_FILE_NUM");
159 std::strncpy(c10FileNum, pcFileNum, 10);
192 for(
G4int i = 0; i < 3; i++) {
215 static G4int currentNumber = 0;
219 if( i == MAX_FILE_INDEX )
222 G4cout <<
"===========================================" <<
G4endl;
223 G4cout <<
"WARNING MESSAGE from GMocrenFile driver: " <<
G4endl;
224 G4cout <<
" This file name is the final one in the " <<
G4endl;
225 G4cout <<
" automatic updation of the output file name." <<
G4endl;
226 G4cout <<
" You may overwrite existing files, i.e. " <<
G4endl;
228 G4cout <<
"===========================================" <<
G4endl;
233 if( i >= 0 && i <= 9 ) {
256 G4cout <<
"======================================================================" <<
G4endl;
259 G4cout <<
"Maximum number of files in the destination directory: " << kMaxFileNum <<
G4endl;
261 G4cout <<
" * The maximum number is customizable as: " <<
G4endl;
262 G4cout <<
" % setenv G4GMocrenFile_MAX_FILE_NUM number " <<
G4endl;
263 G4cout <<
" * The destination directory is customizable as:" <<
G4endl;
264 G4cout <<
" % setenv G4GMocrenFile_DEST_DIR dir_name/ " <<
G4endl;
265 G4cout <<
" ** Do not forget \"/\" at the end of the dir_name, e.g. \"./tmp/\"." <<
G4endl;
269 G4cout <<
"======================================================================" <<
G4endl;
283 G4cout <<
"***** (started) " ;
296 std::vector<G4float> map;
298 for(
G4int i = minmax[0]; i <= minmax[1]; i++) {
334 std::vector<Detector>::iterator itr =
kDetectors.begin();
353 G4cout <<
"***** (started) (close "
360 G4int xmax=0, ymax=0, zmax=0;
362 if(itr->first.x > xmax) xmax = itr->first.x;
363 if(itr->first.y > ymax) ymax = itr->first.y;
364 if(itr->first.z > zmax) zmax = itr->first.z;
371 if(
GFDEBUG)
G4cout <<
"gMocren-file driver : modality size : "
378 for(
G4int z = 0; z < kModalitySize[2]; z++) {
379 short * modality =
new short[nxy];
380 for(
G4int y = 0; y < kModalitySize[1]; y++) {
381 for(
G4int x = 0; x < kModalitySize[0]; x++) {
385 G4int ixy = x + y*kModalitySize[0];
392 modality[ixy] = -1024;
404 std::map<Index3D, G4double>::iterator hitsItr;
405 std::map<G4String, std::map<Index3D, G4double> >::iterator hitsListItr =
kNestedHitsList.begin();
414 for(
G4int z = 0 ; z < kModalitySize[2]; z++) {
416 for(
G4int y = 0; y < kModalitySize[1]; y++) {
417 for(
G4int x = 0; x < kModalitySize[0]; x++) {
419 G4int ixy = x + y*kModalitySize[0];
421 hitsItr = hitsListItr->second.find(idx);
422 if(hitsItr != hitsListItr->second.end()) {
424 values[ixy] = hitsItr->second;
428 if(values[ixy] < minmax[0]) minmax[0] = values[ixy];
429 if(values[ixy] > minmax[1]) minmax[1] = values[ixy];
436 if(minmax[0] < 0) lower = minmax[0];
437 G4double scale = (minmax[1]-lower)/25000.;
451 std::vector<G4float *> tracks;
452 unsigned char colors[3];
454 tracks.push_back(trk);
456 G4ThreeVector orig(0.,0.,0), xa(2000.,0.,0.), ya(0.,2000.,0.), za(0.,0.,2000.);
465 for(
G4int i = 0; i < 3; i++) trk[i] = orig[i];
466 for(
G4int i = 0; i < 3; i++) trk[i+3] = xa[i];
467 colors[0] = 255; colors[1] = 0; colors[2] = 0;
470 for(
G4int i = 0; i < 3; i++) trk[i+3] = ya[i];
471 colors[0] = 0; colors[1] = 255; colors[2] = 0;
474 for(
G4int i = 0; i < 3; i++) trk[i+3] = za[i];
475 colors[0] = 0; colors[1] = 0; colors[2] = 255;
484 std::vector<G4float> transformObjects;
485 for(
G4int i = 0; i < 3; i++) {
511 G4cout <<
"***** G4GMocrenFileSceneHandler::GFBeginModeling (called & started)" <<
G4endl;
525 std::vector<G4Scene::Model>::iterator itr = vmodel.begin();
526 for(; itr != vmodel.end(); itr++) {
527 G4cout <<
" IIIIII model name: " << itr->fpModel->GetGlobalTag() <<
G4endl;
543 static G4bool warned =
false;
547 (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Polyline&)",
549 "2D polylines not implemented. Ignored.");
557 static G4int numTrajectories = 0;
566 (
"G4VSceneHandler::AddCompound(const G4Polyline&)",
576 std::vector<G4float *> trajectory;
577 if(polyline.size() < 2)
return;
578 G4Polyline::const_iterator preitr = polyline.begin();
579 G4Polyline::const_iterator postitr = preitr; postitr++;
580 for(; postitr != polyline.end(); preitr++, postitr++) {
584 G4ThreeVector postPts(postitr->x(), postitr->y(), postitr->z());
588 stepPts[0] = prePts.x();
589 stepPts[1] = prePts.y();
590 stepPts[2] = prePts.z();
591 stepPts[3] = postPts.x();
592 stepPts[4] = postPts.y();
593 stepPts[5] = postPts.z();
594 trajectory.push_back(stepPts);
598 << stepPts[0] <<
", "
599 << stepPts[1] <<
", "
600 << stepPts[2] <<
") - ("
601 << stepPts[3] <<
", "
602 << stepPts[4] <<
", "
603 << stepPts[5] <<
")" <<
G4endl;
609 unsigned char trkcolor[3];
610 trkcolor[0] = (
unsigned char)(color.
GetRed()*255);
611 trkcolor[1] = (
unsigned char)(color.
GetGreen()*255);
612 trkcolor[2] = (
unsigned char)(color.
GetBlue()*255);
632 static G4bool warned =
false;
636 (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Text&)",
638 "2D text not implemented. Ignored.");
663 static G4bool warned =
false;
667 (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Circle&)",
669 "2D circles not implemented. Ignored.");
692 static G4bool warned =
false;
696 (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Square&)",
698 "2D squares not implemented. Ignored.");
718 G4cout <<
"***** AddPrimitive( G4Polyhedron )" <<
G4endl;
721 if (polyhedron.GetNoFacets() == 0)
return;
724 static G4bool warned =
false;
728 (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Polyhedron&)",
730 "2D polyhedra not implemented. Ignored.");
739 for (
G4int f = polyhedron.GetNoFacets(); f; f--){
740 G4bool notLastEdge =
true;
748 notLastEdge = polyhedron.GetNextVertexIndex(index, edgeFlag);
751 }
while (notLastEdge);
762 "ERROR G4GMocrenFileSceneHandler::AddPrimitive(G4Polyhedron)" <<
G4endl;
773 "\nG4Polyhedron facet with " << i <<
" edges" <<
G4endl;
792 G4cout <<
"***** GFEndModeling (started) " ;
793 G4cout <<
"(/EndModeling, /DrawAll, /CloseDevice)" <<
G4endl;
839 G4cout <<
"G4GMocrenFileSceneHandler::AddSolid(const G4Box&) : "
859 for(
G4int i = 0; i < 12; i++) {
860 poly->GetNextEdge(v1, v2, next);
862 G4cout <<
" (" << v1.x() <<
", "
867 << v2.z() <<
") [" << next <<
"]"
883 if(pScBox != NULL) bMesh =
true;
886 << volName <<
" - " << bMesh <<
G4endl;
891 if (!pv_model) { return ; }
894 if (!pPVModel) { return ; }
906 G4cout <<
" density : " << dens <<
" [g/cm3]" <<
G4endl;
925 G4cout <<
"kVolumeTrans3D: " << trans1 << G4endl << rot1 <<
G4endl;
936 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
939 G4int dirAxis[3] = {-1,-1,-1};
940 G4int nDaughters[3] = {0,0,0};
944 nDaughters[0] = nReplicas;
946 case kXAxis: dirAxis[0] = 0;
break;
947 case kYAxis: dirAxis[0] = 1;
break;
948 case kZAxis: dirAxis[0] = 2;
break;
950 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
956 <<
" # : " << nDaughters[0] <<
G4endl;
960 if(pv[0]->GetLogicalVolume()->GetNoDaughters()) {
961 G4cout <<
"# of daughters : "
972 if(pv[0]->GetLogicalVolume()->GetNoDaughters() == 0) {
983 nDaughters[1] = nReplicas;
985 case kXAxis: dirAxis[1] = 0;
break;
986 case kYAxis: dirAxis[1] = 1;
break;
987 case kZAxis: dirAxis[1] = 2;
break;
989 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
995 <<
" # : " << nDaughters[1]<<
G4endl;
1004 <<
" # : " << nDaughters[2] <<
G4endl;
1006 if(nDaughters[2] > 1) {
1009 if(nestPara == NULL)
1010 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1019 G4cout << trans0 <<
" - " << trans1 <<
" - " << diff <<
G4endl;
1021 if(diff.x() != 0.) dirAxis[2] = 0;
1022 else if(diff.y() != 0.) dirAxis[2] = 1;
1023 else if(diff.z() != 0.) dirAxis[2] = 2;
1025 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1026 "gMocren0009",
FatalException,
"Unexpected nested parameterisation");
1031 for(
G4int i = 0; i < 3; i++) {
1042 if(nestPara != NULL) {
1043 G4double prexyz[3] = {0.,0.,0.}, xyz[3] = {0.,0.,0.};
1044 for(
G4int n0 = 0; n0 < nDaughters[0]; n0++) {
1045 for(
G4int n1 = 0; n1 < nDaughters[1]; n1++) {
1046 for(
G4int n2 = 0; n2 < nDaughters[2]; n2++) {
1050 G4cout <<
" retrieve volume : copy # : " << n0
1051 <<
", " << n1 <<
", " << n2 <<
G4endl;
1057 G4cout <<
" density :" << dens <<
" [g/cm3]" <<
G4endl;
1064 if(n0 != 0 || n1 != 0 || n2 != 0) {
1065 for(
G4int i = 0; i < 3; i++) {
1066 if(xyz[i] != prexyz[i])
1067 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1077 idx[dirAxis[0]] = n0;
1078 idx[dirAxis[1]] = n1;
1079 idx[dirAxis[2]] = n2;
1080 Index3D i3d(idx[0],idx[1],idx[2]);
1083 G4cout <<
" index: " << idx[0] <<
", " << idx[1] <<
", " << idx[2]
1084 <<
" density: " << dens <<
G4endl;
1086 for(
G4int i = 0; i < 3; i++) prexyz[i] = xyz[i];
1097 static_cast<G4float>(2*xyz[1]),
1098 static_cast<G4float>(2*xyz[2])};
1107 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1121 G4cout <<
" physical volume node id : "
1122 <<
"size: " << npvp <<
", PV name: ";
1123 for(
G4int i = 0; i < npvp; i++) {
1126 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->IsParameterised()
1128 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->IsReplicated();
1129 if(pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetParameterisation()) {
1131 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetParameterisation()->IsNested();
1134 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetCopyNo();
1143 G4Box * pbox =
dynamic_cast<G4Box *
>(pPVModel->
GetDrawnPVPath()[npvp-2].GetPhysicalVolume()->GetLogicalVolume()->GetSolid());
1148 G4cout <<
" mother size ["
1149 << pPVModel->
GetDrawnPVPath()[npvp-2].GetPhysicalVolume()->GetName()
1151 << pareDims[0] <<
" x "
1152 << pareDims[1] <<
" x "
1153 << pareDims[2] <<
" [mm3]"
1157 G4Box * boxP =
dynamic_cast<G4Box *
>(pPVModel->
GetDrawnPVPath()[npvp-1].GetPhysicalVolume()->GetLogicalVolume()->GetSolid());
1162 G4cout <<
" parameterised volume? ["
1163 << pPVModel->
GetDrawnPVPath()[npvp-1].GetPhysicalVolume()->GetName()
1165 << paraDims[0] <<
" x "
1166 << paraDims[1] <<
" x "
1167 << paraDims[2] <<
" [mm3] : "
1168 <<
G4int(pareDims[0]/paraDims[0]) <<
" x "
1169 <<
G4int(pareDims[1]/paraDims[1]) <<
" x "
1173 <<
" isn't a G4Box." <<
G4endl;
1184 if(phantomPara == NULL) {
1185 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1202 for(
G4int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
1203 for(
G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
1204 for(
G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
1206 G4int repNo = n0 + n1*nX + n2*nXY;
1213 idx[kNestedVolumeDirAxis[1]] = n1;
1214 idx[kNestedVolumeDirAxis[2]] = n2;
1215 Index3D i3d(idx[0],idx[1],idx[2]);
1219 G4cout <<
" index: " << idx[0] <<
", " << idx[1] <<
", " << idx[2]
1220 <<
" density: " << dens <<
G4endl;
1271 for(
G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
1272 for(
G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
1278 idx[kNestedVolumeDirAxis[1]] = n1;
1279 idx[kNestedVolumeDirAxis[2]] = n2;
1280 Index3D i3d(idx[0],idx[1],idx[2]);
1289 G4cout <<
"Interactive Scorer : size - "
1290 << boxSize.x()/
cm <<
" x "
1291 << boxSize.y()/
cm <<
" x "
1292 << boxSize.z()/
cm <<
" [cm3]" <<
G4endl;
1293 G4cout <<
"Interactive Scorer : # voxels - "
1294 << nVoxels[0] <<
" x "
1295 << nVoxels[1] <<
" x "
1304 G4float spacing[3] = {
static_cast<G4float>(boxSize.x()*2/nVoxels[0]),
1305 static_cast<G4float>(boxSize.y()*2/nVoxels[1]),
1306 static_cast<G4float>(boxSize.z()*2/nVoxels[2])};
1325 if(!sbrm.isIdentity()) {
1377 if(volName == box.
GetName()) {
1399 if(volDSolidName == box.
GetName()) {
1436 G4int nv = poly->GetNoVertices();
1437 for(
G4int i = 0; i < nv; i++) {
1438 G4cout <<
" (" << poly->GetVertex(i).x() <<
", "
1439 << poly->GetVertex(i).y() <<
", "
1440 << poly->GetVertex(i).z() <<
")" <<
G4endl;
1446 if (!pv_model) { return ; }
1449 if (!pPVModel) { return ; }
1598 G4cout <<
" ::AddCompound(const G4VTrajectory&) >>>>>>>>> " <<
G4endl;
1602 (
"G4VSceneHandler::AddCompound(const G4VTrajectory&)",
1616 for(
G4int i = 0; i < nPnt; i++) {
1648 std::vector<G4String>::iterator itr = hitNames.begin();
1649 for(; itr != hitNames.end(); itr++)
1650 G4cout <<
" hit name : " << *itr << G4endl;
1657 G4bool bid[3] = {
false,
false,
false};
1660 std::vector<G4AttValue>::iterator itr;
1662 for(itr = attval->begin(); itr != attval->end(); itr++) {
1663 std::string stmp = itr->GetValue();
1664 std::istringstream sval(stmp.c_str());
1666 if(itr->GetName() ==
G4String(
"XID")) {
1671 if(itr->GetName() ==
G4String(
"YID")) {
1676 if(itr->GetName() ==
G4String(
"ZID")) {
1685 if(bid[0] && bid[1] && bid[2]) {
1688 G4cout <<
" Hit : index(" <<
id.x <<
", " <<
id.y <<
", "
1689 <<
id.z <<
")" <<
G4endl;
1692 for(itr = attval->begin(); itr != attval->end(); itr++) {
1693 for(
G4int i = 0; i < nhitname; i++) {
1694 if(itr->GetName() == hitNames[i]) {
1696 std::string stmp = itr->GetValue();
1697 std::istringstream sval(stmp.c_str());
1700 sval >> value >> unit;
1702 std::map<G4String, std::map<Index3D, G4double> >::iterator kNestedHitsListItr;
1707 kNestedHitsListItr->second[id] = value;
1709 std::map<Index3D, G4double> hits;
1710 hits.insert(std::map<Index3D, G4double>::value_type(
id, value));
1716 G4cout <<
" : " << hitNames[i] <<
" -> " << value
1717 <<
" [" << unit <<
"]" <<
G4endl;
1722 G4Exception(
"G4GMocrenFileSceneHandler::AddCompound(const G4VHit &)",
1738 G4cout <<
" ::AddCompound(const std::map<G4int, G4double*> &) >>>>>>>>> " <<
G4endl;
1742 G4int nhitname = (
G4int)hitScorerNames.size();
1760 std::map<G4int, G4double*> * map = hits.
GetMap();
1761 std::map<G4int, G4double*>::const_iterator itr = map->begin();
1762 for(; itr != map->end(); itr++) {
1764 Index3D id(idx[0], idx[1], idx[2]);
1766 std::map<G4String, std::map<Index3D, G4double> >::iterator nestedHitsListItr;
1769 nestedHitsListItr->second[id] = *(itr->second);
1771 std::map<Index3D, G4double> hit;
1772 hit.insert(std::map<Index3D, G4double>::value_type(
id, *(itr->second)));
1784 G4cout <<
" >>>>> " << meshname <<
" : " << scorername <<
G4endl;
1786 for(
G4int i = 0; i < nhitname; i++)
1787 if(scorername == hitScorerNames[i])
1788 G4cout <<
" !!!! Hit scorer !!!! " << scorername <<
G4endl;
1796 std::map<G4int, G4double*> * map = hits.
GetMap();
1797 std::map<G4int, G4double*>::const_iterator itr = map->begin();
1798 for(; itr != map->end(); itr++) {
1800 G4cout <<
"[" << itr->first <<
"] "
1801 <<
"("<<
id[0] <<
"," <<
id[1] <<
"," <<
id[2] <<
")"
1802 << *(itr->second) <<
", ";
1810 G4cout <<
" ::AddCompound(const std::map<G4int, G4StatDouble*> &) >>>>>>>>> " <<
G4endl;
1814 G4int nhitname = (
G4int)hitScorerNames.size();
1832 std::map<G4int, G4StatDouble*> * map = hits.
GetMap();
1833 std::map<G4int, G4StatDouble*>::const_iterator itr = map->begin();
1834 for(; itr != map->end(); itr++) {
1836 Index3D id(idx[0], idx[1], idx[2]);
1838 std::map<G4String, std::map<Index3D, G4double> >::iterator nestedHitsListItr;
1841 nestedHitsListItr->second[id] = itr->second->sum_wx();
1843 std::map<Index3D, G4double> hit;
1844 hit.insert(std::map<Index3D, G4double>::value_type(
id, itr->second->sum_wx()));
1856 G4cout <<
" >>>>> " << meshname <<
" : " << scorername <<
G4endl;
1858 for(
G4int i = 0; i < nhitname; i++)
1859 if(scorername == hitScorerNames[i])
1860 G4cout <<
" !!!! Hit scorer !!!! " << scorername <<
G4endl;
1868 std::map<G4int, G4StatDouble*> * map = hits.
GetMap();
1869 std::map<G4int, G4StatDouble*>::const_iterator itr = map->begin();
1870 for(; itr != map->end(); itr++) {
1872 G4cout <<
"[" << itr->first <<
"] "
1873 <<
"("<<
id[0] <<
"," <<
id[1] <<
"," <<
id[2] <<
")"
1874 << itr->second->sum_wx() <<
", ";
1884 G4bool visibility = true ;
1922 if (!pv_model) { return ; }
1925 if (!pPVModel) { return ; }
1928 std::vector<G4float *> dedges;
1934 unsigned char uccolor[3] = {30, 30, 30};
1937 uccolor[0] = (
unsigned char)(color.
GetRed()*255);
1938 uccolor[1] = (
unsigned char)(color.
GetGreen()*255);
1939 uccolor[2] = (
unsigned char)(color.
GetBlue()*255);
1943 for(
G4int i = 0; i < 3; i++) detector.
color[i] = uccolor[i];
1948 G4cout <<
"0 color: (" << (
G4int)uccolor[0] <<
", "
1949 << (
G4int)uccolor[1] <<
", " << (
G4int)uccolor[2] <<
")"
1958 std::vector<Detector>::iterator itr =
kDetectors.begin();
1968 std::vector<G4float *> dedges;
1970 poly->Transform(itr->transform3D);
1972 poly->Transform(invVolTrans);
1980 if(!(poly->GetNextEdge(v1, v2, next))) bnext =
false;
1982 edge[0] = v1.x()/
mm;
1983 edge[1] = v1.y()/
mm;
1984 edge[2] = v1.z()/
mm;
1985 edge[3] = v2.x()/
mm;
1986 edge[4] = v2.y()/
mm;
1987 edge[5] = v2.z()/
mm;
1988 dedges.push_back(edge);
1993 unsigned char uccolor[3] = {itr->color[0],
1998 for(
G4int i = 0; i < nedges; i++) {
1999 delete [] dedges[i];
2004 G4cout <<
" color: (" << (
G4int)uccolor[0] <<
", "
2005 << (
G4int)uccolor[1] <<
", " << (
G4int)uccolor[2] <<
")"
2015 for(
G4int i = 0; i < 3; i++) _idx3d[i] = 0;
2023 G4int line = kNestedVolumeDimension[2];
2036 _idx3d[kNestedVolumeDirAxis[1]] = (_idx%plane)/line;
2037 _idx3d[kNestedVolumeDirAxis[2]] = (_idx%plane)%line;
2065 G4int line = kNestedVolumeDimension[0];
2067 _idx3d[kNestedVolumeDirAxis[1]] = (_idx%plane)/line;
2068 _idx3d[kNestedVolumeDirAxis[0]] = (_idx%plane)%line;
2081 if(!polyhedron)
delete polyhedron;
2085 if(!polyhedron)
delete polyhedron;
2086 color[0] = color[1] = color[2] = 255;
2087 transform3D = G4Transform3D::Identity;
2092 : x(0), y(0), z(0) {
2097 : x(_index3D.x), y(_index3D.y), z(_index3D.z) {
2108 : x(_x), y(_y), z(_z) {
2112 if(z < static_cast<Index3D>(_right).z) {
2114 }
else if(z == _right.
z) {
2115 if(y < static_cast<Index3D>(_right).y)
return true;
2116 else if(y == _right.
y)
2117 if(x < static_cast<Index3D>(_right).x)
return true;
2122 if(z == _right.
z && y == _right.
y && x == _right.
x)
return true;
virtual G4Material * ComputeMaterial(G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch=0)=0
void AddCompound(const G4VTrajectory &traj)
G4VModel * GetModel() const
void GetNumberOfSegments(G4int nSegment[3])
short convertDensityToHU(float &_dens)
G4double GetXHalfLength() const
virtual ~G4GMocrenFileSceneHandler()
G4RotationMatrix GetRotationMatrix() const
void setDoseDistUnit(std::string &_unit, int _num=0)
virtual void AddSolid(const G4Box &)
G4int kFlagParameterization
const std::vector< Model > & GetEndOfEventModelList() const
static constexpr double mm
virtual G4bool IsNested() const
virtual void BeginModeling()
virtual void BeginPrimitives(const G4Transform3D &objectTransformation)
CLHEP::Hep3Vector G4ThreeVector
void AddDetector(const G4VSolid &solid)
CLHEP::HepRotation G4RotationMatrix
virtual G4bool IsReplicated() const =0
void addTrack(float *_tracks)
G4bool operator==(const Index3D &_right) const
G4Transform3D kVolumeTrans3D
virtual void BeginPrimitives(const G4Transform3D &objectTransformation)
G4bool operator<(const Index3D &_right) const
const G4String & GetName() const
G4bool kFlagSaving_g4_gdd
virtual G4VTrajectoryPoint * GetPoint(G4int i) const =0
void setDoseDistMinMax(short _minmax[2], int _num=0)
G4Material * GetCurrentMaterial() const
G4Polyhedron * polyhedron
std::map< G4String, std::map< Index3D, G4double > > kNestedHitsList
G4Transform3D transform3D
G4double GetDensity() const
virtual G4String getVolumeName()
G4VSolid * GetSolid() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
void setModalityImageSize(int _size[3])
const G4String & GetName() const
G4Transform3D fObjectTransformation
const G4int FR_MAX_FILE_NUM
HepGeom::Point3D< G4double > G4Point3D
void AddSolid(const G4Box &box)
const char DEFAULT_GDD_FILE_NAME[]
const char * name(G4int ptype)
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
const G4VisAttributes * GetVisAttributes() const
static constexpr double rad
static constexpr double g
void ClearTransientStore()
virtual G4GeometryType GetEntityType() const =0
const std::vector< G4PhysicalVolumeNodeID > & GetDrawnPVPath() const
G4ThreeVector GetSize() const
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
G4int GetCurrentDepth() const
G4double GetZHalfLength() const
G4Polyhedron * CreatePolyhedron() const
size_t GetNoVoxelZ() const
void translateDetector(std::vector< float > &_translate)
virtual void DrawTrajectory() const
G4bool kbModelingTrajectory
void setDoseDist(double *_image, int _num=0)
virtual G4bool getDrawVolumeGrid()
virtual int GetPointEntries() const =0
bool storeData(char *_filename)
G4GLOB_DLL std::ostream G4cout
virtual std::vector< G4String > getHitNames()
virtual G4String GetParticleName() const =0
const G4String & GetName() const
G4Polyhedron * CreatePolyhedron() const
void BeginSavingGdd(void)
G4double GetGreen() const
G4double GetDensity(G4int &_ct) const
G4ThreeVector GetTranslation() const
static constexpr double cm
virtual G4VPVParameterisation * GetParameterisation() const =0
const char GDD_FILE_HEADER[]
virtual void ComputeTransformation(const G4int no, G4VPhysicalVolume *currentPV) const =0
const G4VisAttributes * GetVisAttributes() const
virtual void EndModeling()
virtual void EndPrimitives()
G4double GetYHalfLength() const
G4bool kFlagProcessedInteractiveScorer
void setModalityImageMinMax(short _minmax[2])
virtual G4Polyhedron * CreatePolyhedron() const
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
G4double GetVoxelHalfY() const
virtual G4double GetCharge() const =0
void setModalityImage(short *_image)
void GetNestedVolumeIndex(G4int, G4int[3])
static constexpr double cm3
G4int GetNoDaughters() const
void setVoxelSpacing(float _spacing[3])
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * GetTopPhysicalVolume() const
virtual G4bool IsParameterised() const =0
const G4int MAX_NUM_TRAJECTORIES
virtual std::vector< G4String > getHitScorerNames()
const G4Color & GetColor() const
G4GMocrenMessenger & kMessenger
G4int kNestedVolumeDirAxis[3]
size_t GetNoVoxelY() const
virtual const G4ThreeVector GetPosition() const =0
const G4VisAttributes * fpVisAttribs
G4Scene * GetScene() const
std::vector< Detector > kDetectors
virtual void AddCompound(const G4VTrajectory &)
G4LogicalVolume * GetLogicalVolume() const
const G4VTrajectory * GetCurrentTrajectory() const
G4double GetVoxelHalfX() const
void InitializeParameters()
G4ThreeVector kVolumeSize
virtual G4int GetCopyNo() const =0
G4ThreeVector kVoxelDimension
virtual G4int GetTrackID() const =0
void translateTracks(std::vector< float > &_translateo)
G4int kNestedVolumeDimension[3]
virtual G4int GetMultiplicity() const
static Verbosity GetVerbosity()
void AddPrimitive(const G4Polyline &line)
virtual std::vector< G4AttValue > * CreateAttValues() const
std::map< G4int, T * > * GetMap() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
G4bool kbSetModalityVoxelSize
static G4int kSceneIdCount
G4double GetVoxelHalfZ() const
static constexpr double pi
size_t GetNoVoxelX() const
static G4ScoringManager * GetScoringManager()
G4ThreeVector GetObjectTranslation() const
virtual G4ThreeVector GetInitialMomentum() const =0
void setDoseDistScale(double &_scale, int _num=0)
void addDetector(std::string &_name, std::vector< float * > &_det, unsigned char _color[3])
virtual void EndPrimitives()
const G4bool GFDEBUG_DIGI
void setDoseDistSize(int _size[3], int _num=0)
G4LogicalVolume * GetCurrentLV() const
G4VPhysicalVolume * GetCurrentPV() const
std::vector< G4String > kNestedVolumeNames
G4Polyline & transform(const G4Transform3D &)
std::map< Index3D, float > kNestedModality
void setDoseDistName(std::string _name, int _num=0)
G4GMocrenFileSceneHandler(G4GMocrenFile &system, G4GMocrenMessenger &messenger, const G4String &name="")
void setModalityImageDensityMap(std::vector< float > &_map)