123     kMessenger(messenger),
   125     kbSetModalityVoxelSize(false),
   126     kbModelingTrajectory(false),
   128     kFlagInModeling(false),
   129     kFlagSaving_g4_gdd(false),
   130     kFlagParameterization(0),
   131     kFlagProcessedInteractiveScorer(false) {
   134   if(std::getenv(
"G4GMocrenFile_DEST_DIR") == NULL) {
   141     const char * env = std::getenv(
"G4GMocrenFile_DEST_DIR");
   142     int len = std::strlen(env);
   144       G4Exception(
"G4GMocrenFileSceneHandler::G4GMocrenFileSceneHandler(*)",
   146                   "Invalid length of string set in G4GMocrenFile_DEST_DIR");
   155   if ( std::getenv( 
"G4GMocrenFile_MAX_FILE_NUM" ) != NULL ) {  
   156     char * pcFileNum = getenv(
"G4GMocrenFile_MAX_FILE_NUM");
   158     std::strncpy(c10FileNum, pcFileNum, 10);
   191   for(
G4int i = 0; i < 3; i++) {
   214   static G4int currentNumber = 0;
   218     if( i == MAX_FILE_INDEX ) 
   221       G4cout << 
"==========================================="   << 
G4endl; 
   222       G4cout << 
"WARNING MESSAGE from GMocrenFile driver:   "   << 
G4endl;
   223       G4cout << 
"  This file name is the final one in the   "   << 
G4endl;
   224       G4cout << 
"  automatic updation of the output file name." << 
G4endl; 
   225       G4cout << 
"  You may overwrite existing files, i.e.   "   << 
G4endl; 
   227       G4cout << 
"==========================================="   << 
G4endl; 
   232     if( i >=  0 && i <= 9 ) { 
   255   G4cout << 
"======================================================================" << 
G4endl; 
   258   G4cout << 
"Maximum number of files in the destination directory: " << kMaxFileNum << 
G4endl; 
   260   G4cout << 
"  * The maximum number is customizable as:           " << 
G4endl;
   261   G4cout << 
"      % setenv  G4GMocrenFile_MAX_FILE_NUM  number " << 
G4endl;        
   262   G4cout << 
"  * The destination directory is customizable as:" << 
G4endl;
   263   G4cout << 
"      % setenv  G4GMocrenFile_DEST_DIR  dir_name/  " << 
G4endl;        
   264   G4cout << 
"     ** Do not forget \"/\" at the end of the dir_name, e.g. \"./tmp/\"." << 
G4endl;              
   268   G4cout << 
"======================================================================" << 
G4endl; 
   282       G4cout << 
"*****                   (started) " ;
   295     std::vector<G4float> map;
   297     for(
G4int i = minmax[0]; i <= minmax[1]; i++) {
   333     std::vector<Detector>::iterator itr = 
kDetectors.begin();
   352       G4cout << 
"*****                 (started) (close "   359     G4int xmax=0, ymax=0, zmax=0;
   361       if(itr->first.x > xmax) xmax = itr->first.x;
   362       if(itr->first.y > ymax) ymax = itr->first.y;
   363       if(itr->first.z > zmax) zmax = itr->first.z;
   370     if(
GFDEBUG) 
G4cout << 
"gMocren-file driver : modality size : "   377     for(
G4int z = 0; 
z < kModalitySize[2]; 
z++) {
   378       short * modality = 
new short[nxy];
   379       for(
G4int y = 0; 
y < kModalitySize[1]; 
y++) {
   380     for(
G4int x = 0; 
x < kModalitySize[0]; 
x++) {
   384       G4int ixy = 
x + 
y*kModalitySize[0];
   391         modality[ixy] = -1024;
   403     std::map<Index3D, G4double>::iterator hitsItr;
   404     std::map<G4String, std::map<Index3D, G4double> >::iterator hitsListItr = 
kNestedHitsList.begin();
   413       for(
G4int z = 0 ; 
z < kModalitySize[2]; 
z++) {
   415     for(
G4int y = 0; 
y < kModalitySize[1]; 
y++) {
   416       for(
G4int x = 0; 
x < kModalitySize[0]; 
x++) {
   418         G4int ixy = 
x + 
y*kModalitySize[0];
   420         hitsItr = hitsListItr->second.find(idx);
   421         if(hitsItr != hitsListItr->second.end()) {
   423           values[ixy] = hitsItr->second;
   427         if(values[ixy] < minmax[0]) minmax[0] = values[ixy];
   428         if(values[ixy] > minmax[1]) minmax[1] = values[ixy];
   435       if(minmax[0] < 0)  lower = minmax[0];
   450       std::vector<G4float *> tracks;
   451       unsigned char colors[3];
   453       tracks.push_back(trk);
   455       G4ThreeVector orig(0.,0.,0), xa(2000.,0.,0.), ya(0.,2000.,0.), za(0.,0.,2000.);
   464       for(
G4int i = 0; i < 3; i++) trk[i] = orig[i];
   465       for(
G4int i = 0; i < 3; i++) trk[i+3] = xa[i];
   466       colors[0] = 255; colors[1] = 0; colors[2] = 0;
   469       for(
G4int i = 0; i < 3; i++) trk[i+3] = ya[i];
   470       colors[0] = 0; colors[1] = 255; colors[2] = 0;
   473       for(
G4int i = 0; i < 3; i++) trk[i+3] = za[i];
   474       colors[0] = 0; colors[1] = 0; colors[2] = 255;
   483     std::vector<G4float> transformObjects;
   484     for(
G4int i = 0; i < 3; i++) {
   510       G4cout << 
"***** G4GMocrenFileSceneHandler::GFBeginModeling (called & started)" << 
G4endl;
   524       std::vector<G4Scene::Model>::iterator itr = vmodel.begin();
   525       for(; itr != vmodel.end(); itr++) {
   526         G4cout << 
" IIIIII model name: " << itr->fpModel->GetGlobalTag() << 
G4endl;
   542     static G4bool warned = 
false;
   546     (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Polyline&)",
   548      "2D polylines not implemented.  Ignored.");
   556   static G4int numTrajectories = 0;
   565     (
"G4VSceneHandler::AddCompound(const G4Polyline&)",
   575     std::vector<G4float *> trajectory;
   576     if(polyline.size() < 2) 
return;
   577     G4Polyline::const_iterator preitr = polyline.begin();
   578     G4Polyline::const_iterator postitr = preitr; postitr++;
   579     for(; postitr != polyline.end(); preitr++, postitr++) {
   583       G4ThreeVector postPts(postitr->x(), postitr->y(), postitr->z());
   587       stepPts[0] = prePts.
x();
   588       stepPts[1] = prePts.y();
   589       stepPts[2] = prePts.z();
   590       stepPts[3] = postPts.x();
   591       stepPts[4] = postPts.y();
   592       stepPts[5] = postPts.z();
   593       trajectory.push_back(stepPts);
   597            << stepPts[0] << 
", "   598            << stepPts[1] << 
", "   599            << stepPts[2] << 
") - ("    600            << stepPts[3] << 
", "   601            << stepPts[4] << 
", "   602            << stepPts[5] << 
")" << 
G4endl;
   608     unsigned char trkcolor[3];
   609     trkcolor[0] = (
unsigned char)(color.
GetRed()*255);
   610     trkcolor[1] = (
unsigned char)(color.
GetGreen()*255);
   611     trkcolor[2] = (
unsigned char)(color.
GetBlue()*255);
   631     static G4bool warned = 
false;
   635     (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Text&)",
   637      "2D text not implemented.  Ignored.");
   662     static G4bool warned = 
false;
   666     (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Circle&)",
   668      "2D circles not implemented.  Ignored.");
   691     static G4bool warned = 
false;
   695     (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Square&)",
   697      "2D squares not implemented.  Ignored.");
   717     G4cout << 
"***** AddPrimitive( G4Polyhedron )" << 
G4endl;
   723     static G4bool warned = 
false;
   727     (
"G4GMocrenFileSceneHandler::AddPrimitive (const G4Polyhedron&)",
   729      "2D polyhedra not implemented.  Ignored.");
   739     G4bool notLastEdge = 
true;
   750     }
while (notLastEdge);
   761       "ERROR G4GMocrenFileSceneHandler::AddPrimitive(G4Polyhedron)" << 
G4endl;
   772       "\nG4Polyhedron facet with " << i << 
" edges" << 
G4endl;  
   791       G4cout << 
"***** GFEndModeling (started) " ; 
   792       G4cout << 
"(/EndModeling, /DrawAll, /CloseDevice)" << 
G4endl;
   838     G4cout << 
"G4GMocrenFileSceneHandler::AddSolid(const G4Box&)  : "   858     for(
G4int i = 0; i < 12; i++) { 
   861       G4cout << 
"    (" << v1.
x() << 
", "   866          << v2.
z() << 
") [" << next << 
"]"   881       if(pScBox != NULL) bMesh = 
true;
   884                  << volName << 
" - " << bMesh << 
G4endl;
   889   if (!pv_model) { return ; } 
   892   if (!pPVModel) { return ; }
   904     G4cout << 
"    density : " << dens << 
" [g/cm3]" << 
G4endl;
   923       G4cout << 
"kVolumeTrans3D: " << trans1 << G4endl << rot1 << 
G4endl;
   934       G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
   937     G4int dirAxis[3] = {-1,-1,-1};
   938     G4int nDaughters[3] = {0,0,0};
   942     nDaughters[0] = nReplicas;
   944     case kXAxis: dirAxis[0] = 0; 
break;
   945     case kYAxis: dirAxis[0] = 1; 
break;
   946     case kZAxis: dirAxis[0] = 2; 
break;
   948       G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
   954          << 
"   # : " << nDaughters[0] << 
G4endl;
   958       if(pv[0]->GetLogicalVolume()->GetNoDaughters()) {
   959     G4cout << 
"# of daughters : "    970     if(pv[0]->GetLogicalVolume()->GetNoDaughters() == 0) {
   981     nDaughters[1] = nReplicas;
   983     case kXAxis: dirAxis[1] = 0; 
break;
   984     case kYAxis: dirAxis[1] = 1; 
break;
   985     case kZAxis: dirAxis[1] = 2; 
break;
   987       G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
   993          << 
"   # : " << nDaughters[1]<< 
G4endl;
  1002            << 
"   # : " << nDaughters[2] << 
G4endl;
  1004       if(nDaughters[2] > 1) {
  1007         if(nestPara == NULL)
  1008           G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
  1017           G4cout << trans0 << 
" - " << trans1 << 
" - " << diff << 
G4endl;
  1019         if(diff.
x() != 0.) dirAxis[2] = 0;
  1020         else if(diff.
y() != 0.) dirAxis[2] = 1;
  1021         else if(diff.
z() != 0.) dirAxis[2] = 2;
  1023           G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
  1024               "gMocren0009", 
FatalException, 
"Unexpected nested parameterisation");
  1029       for(
G4int i = 0; i < 3; i++) {
  1040       if(nestPara != NULL) {
  1041     G4double prexyz[3] = {0.,0.,0.}, xyz[3] = {0.,0.,0.};
  1042     for(
G4int n0 = 0; n0 < nDaughters[0]; n0++) {
  1043       for(
G4int n1 = 0; n1 < nDaughters[1]; n1++) {
  1044         for(
G4int n2 = 0; n2 < nDaughters[2]; n2++) {
  1048         G4cout << 
"   retrieve volume : copy # : " << n0
  1049                << 
", " << n1 << 
", " << n2 << 
G4endl;
  1055         G4cout << 
"           density :" << dens << 
" [g/cm3]" << 
G4endl;
  1062           if(n0 != 0 || n1 != 0 || n2 != 0) {
  1063         for(
G4int i = 0; i < 3; i++) {
  1064           if(xyz[i] != prexyz[i])
  1065             G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
  1075           idx[dirAxis[0]] = n0;
  1076           idx[dirAxis[1]] = n1;
  1077           idx[dirAxis[2]] = n2;
  1078           Index3D i3d(idx[0],idx[1],idx[2]);
  1081         G4cout << 
" index: " << idx[0] << 
", " << idx[1] << 
", " << idx[2]
  1082                << 
"  density: " << dens << 
G4endl;
  1084           for(
G4int i = 0; i < 3; i++) prexyz[i] = xyz[i];
  1095                                 static_cast<G4float>(2*xyz[1]),
  1096                                 static_cast<G4float>(2*xyz[2])};
  1105     G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
  1119       G4cout << 
"     physical volume node id : "  1120          << 
"size: " << npvp << 
", PV name: ";
  1121       for(
G4int i = 0; i < npvp; i++) {
  1124            << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->IsParameterised()
  1126            << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->IsReplicated();
  1127         if(pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetParameterisation()) {
  1129              << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetParameterisation()->IsNested();
  1132            << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetCopyNo();
  1141       G4Box * pbox = 
dynamic_cast<G4Box *
>(pPVModel->
GetDrawnPVPath()[npvp-2].GetPhysicalVolume()->GetLogicalVolume()->GetSolid());
  1146         G4cout << 
"     mother size ["  1147            << pPVModel->
GetDrawnPVPath()[npvp-2].GetPhysicalVolume()->GetName()
  1149            << pareDims[0] << 
" x "  1150            << pareDims[1] << 
" x "  1151            << pareDims[2] << 
" [mm3]"  1155       G4Box * boxP = 
dynamic_cast<G4Box *
>(pPVModel->
GetDrawnPVPath()[npvp-1].GetPhysicalVolume()->GetLogicalVolume()->GetSolid());
  1160         G4cout << 
"     parameterised volume? ["  1161            << pPVModel->
GetDrawnPVPath()[npvp-1].GetPhysicalVolume()->GetName()
  1163            << paraDims[0] << 
" x "  1164            << paraDims[1] << 
" x "  1165            << paraDims[2] << 
" [mm3]  : "  1166            << 
G4int(pareDims[0]/paraDims[0]) << 
" x "  1167            << 
G4int(pareDims[1]/paraDims[1]) << 
" x "  1171            << 
" isn't a G4Box." << 
G4endl;
  1182       if(phantomPara == NULL) {
  1183     G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
  1200       for(
G4int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
  1201     for(
G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
  1202       for(
G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
  1204         G4int repNo = n0 + n1*nX + n2*nXY;
  1211         idx[kNestedVolumeDirAxis[1]] = n1;
  1212         idx[kNestedVolumeDirAxis[2]] = n2;
  1213         Index3D i3d(idx[0],idx[1],idx[2]);
  1217           G4cout << 
" index: " << idx[0] << 
", " << idx[1] << 
", " << idx[2]
  1218              << 
"  density: " << dens << 
G4endl;
  1248     if(!pScrMan) 
return;
  1251     if(scoringBox == NULL) 
return;
  1266       for(
G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
  1267     for(
G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
  1273       idx[kNestedVolumeDirAxis[1]] = n1;
  1274       idx[kNestedVolumeDirAxis[2]] = n2;
  1275       Index3D i3d(idx[0],idx[1],idx[2]);
  1284       G4cout << 
"Interactive Scorer : size - "  1285          << boxSize.
x()/
cm << 
" x "   1286          << boxSize.
y()/
cm << 
" x "   1287          << boxSize.
z()/
cm << 
" [cm3]" << 
G4endl;
  1288       G4cout << 
"Interactive Scorer : # voxels - "  1289          << nVoxels[0] << 
" x "   1290          << nVoxels[1] << 
" x "   1300                 static_cast<G4float>(boxSize.
y()*2/nVoxels[1]),
  1301                 static_cast<G4float>(boxSize.
z()*2/nVoxels[2])};
  1350       if(volName == box.
GetName()) {
  1363       if(volName != box.
GetName()) {
  1401     for(
G4int i = 0; i < nv; i++) {
  1410   if (!pv_model) { return ; } 
  1413   if (!pPVModel) { return ; }
  1562     G4cout << 
" ::AddCompound(const G4VTrajectory&) >>>>>>>>> " << 
G4endl;
  1566     (
"G4VSceneHandler::AddCompound(const G4VTrajectory&)",
  1580       for(
G4int i = 0; i < nPnt; i++) {
  1612     std::vector<G4String>::iterator itr = hitNames.begin();
  1613     for(; itr != hitNames.end(); itr++) 
  1614       G4cout << 
"  hit name : " << *itr << G4endl;
  1621     G4bool bid[3] = {
false, 
false, 
false};
  1624     std::vector<G4AttValue>::iterator itr;
  1626     for(itr = attval->begin(); itr != attval->end(); itr++) {
  1627       std::string stmp = itr->GetValue();
  1628       std::istringstream sval(stmp.c_str());
  1630       if(itr->GetName() == 
G4String(
"XID")) {
  1635       if(itr->GetName() == 
G4String(
"YID")) {
  1640       if(itr->GetName() == 
G4String(
"ZID")) {
  1649     if(bid[0] && bid[1] && bid[2]) {
  1652     G4cout << 
" Hit : index(" << 
id.x << 
", " << 
id.y << 
", "  1653            << 
id.z << 
")" << 
G4endl;
  1656       for(itr = attval->begin(); itr != attval->end(); itr++) {
  1657     for(
G4int i = 0; i < nhitname; i++) {
  1658       if(itr->GetName() == hitNames[i]) {
  1660         std::string stmp = itr->GetValue();
  1661         std::istringstream sval(stmp.c_str());
  1664         sval >> value >> unit;
  1666         std::map<G4String, std::map<Index3D, G4double> >::iterator kNestedHitsListItr;
  1671           kNestedHitsListItr->second[id] = value;
  1673           std::map<Index3D, G4double> 
hits;
  1674           hits.insert(std::map<Index3D, G4double>::value_type(
id, value));
  1680           G4cout << 
"     : " << hitNames[i] << 
" -> " << value
  1681              << 
" [" << unit << 
"]" << 
G4endl;
  1686       G4Exception(
"G4GMocrenFileSceneHandler::AddCompound(const G4VHit &)",
  1702     G4cout << 
" ::AddCompound(const std::map<G4int, G4double*> &) >>>>>>>>> " << 
G4endl;
  1706   G4int nhitname = (
G4int)hitScorerNames.size();
  1724       std::map<G4int, G4double*> * map = hits.
GetMap();
  1725       std::map<G4int, G4double*>::const_iterator itr = map->begin();
  1726       for(; itr != map->end(); itr++) {
  1728     Index3D id(idx[0], idx[1], idx[2]);
  1730     std::map<G4String, std::map<Index3D, G4double> >::iterator nestedHitsListItr;
  1733       nestedHitsListItr->second[id] = *itr->second;
  1735       std::map<Index3D, G4double> hit;
  1736       hit.insert(std::map<Index3D, G4double>::value_type(
id, *itr->second));
  1748     G4cout << 
"       >>>>> " << meshname << 
" : " << scorername  << 
G4endl;
  1750     for(
G4int i = 0; i < nhitname; i++)
  1751       if(scorername == hitScorerNames[i]) 
  1752     G4cout << 
"       !!!! Hit scorer !!!! " << scorername << 
G4endl;
  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       G4cout << 
"[" << itr->first << 
"] "  1765          << 
"("<< 
id[0] << 
"," << 
id[1] << 
"," << 
id[2] << 
")"  1766          << *itr->second << 
", ";
  1777   G4bool  visibility  = true ;
  1815   if (!pv_model) { return ; } 
  1818   if (!pPVModel) { return ; }
  1821   std::vector<G4float *> dedges;
  1827   unsigned char uccolor[3] = {30, 30, 30};
  1830     uccolor[0] = (
unsigned char)(color.
GetRed()*255);
  1831     uccolor[1] = (
unsigned char)(color.
GetGreen()*255);
  1832     uccolor[2] = (
unsigned char)(color.
GetBlue()*255);
  1836   for(
G4int i = 0; i < 3; i++) detector.
color[i] = uccolor[i];
  1841     G4cout << 
"0     color:   (" << (
G4int)uccolor[0] << 
", "  1842        << (
G4int)uccolor[1] << 
", " << (
G4int)uccolor[2] << 
")"  1851   std::vector<Detector>::iterator itr = 
kDetectors.begin();
  1861     std::vector<G4float *> dedges;
  1873       if(!(poly->
GetNextEdge(v1, v2, next))) bnext =
false;
  1875       edge[0] = v1.
x()/
mm;
  1876       edge[1] = v1.
y()/
mm;
  1877       edge[2] = v1.
z()/
mm;
  1878       edge[3] = v2.
x()/
mm;
  1879       edge[4] = v2.
y()/
mm;
  1880       edge[5] = v2.
z()/
mm;
  1881       dedges.push_back(edge);
  1886     unsigned char uccolor[3] = {itr->color[0],
  1891     for(
G4int i = 0; i < nedges; i++) { 
  1892       delete [] dedges[i];
  1897       G4cout << 
"    color:   (" << (
G4int)uccolor[0] << 
", "  1898          << (
G4int)uccolor[1] << 
", " << (
G4int)uccolor[2] << 
")"  1908     for(
G4int i = 0; i < 3; i++) _idx3d[i] = 0;
  1916     G4int line = kNestedVolumeDimension[2];
  1929     _idx3d[kNestedVolumeDirAxis[1]] = (_idx%plane)/line;
  1930     _idx3d[kNestedVolumeDirAxis[2]] = (_idx%plane)%line;
  1958     G4int line = kNestedVolumeDimension[0];
  1960     _idx3d[kNestedVolumeDirAxis[1]] = (_idx%plane)/line;
  1961     _idx3d[kNestedVolumeDirAxis[0]] = (_idx%plane)%line;
  1985   : 
x(0), 
y(0), 
z(0) {
  1990   : 
x(_index3D.
x), 
y(_index3D.
y), 
z(_index3D.
z) {
  2001   : 
x(_x), 
y(_y), 
z(_z) {
  2005   if(
z < static_cast<Index3D>(_right).
z) {
  2007   } 
else if(z == _right.
z) {
  2008     if(
y < static_cast<Index3D>(_right).
y) 
return true;
  2009     else if(y == _right.
y) 
  2010       if(
x < static_cast<Index3D>(_right).
x) 
return true;
  2015   if(
z == _right.
z && 
y == _right.
y && 
x == _right.
x) 
return true;
 void set(double x, double y, double z)
const std::vector< G4PhysicalVolumeNodeID > & GetDrawnPVPath() const
virtual G4Material * ComputeMaterial(G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch=0)=0
void AddCompound(const G4VTrajectory &traj)
G4ThreeVector GetSize() const
void GetNumberOfSegments(G4int nSegment[3])
const G4VisAttributes * GetVisAttributes() const
G4Point3D GetVertex(G4int index) const
short convertDensityToHU(float &_dens)
virtual ~G4GMocrenFileSceneHandler()
void setDoseDistUnit(std::string &_unit, int _num=0)
G4bool operator<(const Index3D &_right) const
const std::vector< Model > & GetEndOfEventModelList() const
virtual void AddSolid(const G4Box &)
G4int kFlagParameterization
virtual void BeginModeling()
G4VPhysicalVolume * GetTopPhysicalVolume() const
virtual void BeginPrimitives(const G4Transform3D &objectTransformation)
G4int GetNoDaughters() const
std::map< G4int, T * > * GetMap() const
void addDetector(std::string &_name, std::vector< float *> &_det, unsigned char _color[3])
virtual G4int GetMultiplicity() const
void AddDetector(const G4VSolid &solid)
virtual void DrawTrajectory() const
virtual G4bool IsReplicated() const =0
void addTrack(float *_tracks)
G4double GetVoxelHalfY() const
G4Scene * GetScene() const
G4Transform3D kVolumeTrans3D
virtual void BeginPrimitives(const G4Transform3D &objectTransformation)
G4bool kFlagSaving_g4_gdd
virtual G4VTrajectoryPoint * GetPoint(G4int i) const =0
void setDoseDistMinMax(short _minmax[2], int _num=0)
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
G4Polyhedron * polyhedron
const G4String & GetName() const
G4Polyhedron * CreatePolyhedron() const
std::map< G4String, std::map< Index3D, G4double > > kNestedHitsList
G4Transform3D transform3D
virtual G4String getVolumeName()
void setModalityImageSize(int _size[3])
size_t GetNoVoxelX() const
G4ThreeVector GetTranslation() const
G4double GetDensity() const
G4Transform3D fObjectTransformation
const G4int FR_MAX_FILE_NUM
void AddSolid(const G4Box &box)
G4double GetDensity(G4int &_ct) const
const char DEFAULT_GDD_FILE_NAME[]
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
G4RotationMatrix GetRotationMatrix() const
G4double GetGreen() const
G4double GetVoxelHalfZ() const
void ClearTransientStore()
virtual G4GeometryType GetEntityType() const =0
HepPolyhedron & Transform(const G4Transform3D &t)
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
G4int GetNoFacets() const
size_t GetNoVoxelZ() const
void translateDetector(std::vector< float > &_translate)
G4bool kbModelingTrajectory
void setDoseDist(double *_image, int _num=0)
G4double GetXHalfLength() const
virtual G4bool getDrawVolumeGrid()
G4VModel * GetModel() const
virtual int GetPointEntries() const =0
bool storeData(char *_filename)
G4GLOB_DLL std::ostream G4cout
virtual std::vector< G4String > getHitNames()
virtual G4String GetParticleName() const =0
G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag) const
G4double GetZHalfLength() const
const G4VisAttributes * GetVisAttributes() const
void BeginSavingGdd(void)
virtual G4VPVParameterisation * GetParameterisation() const =0
const char GDD_FILE_HEADER[]
virtual void ComputeTransformation(const G4int no, G4VPhysicalVolume *currentPV) const =0
G4int GetCurrentDepth() const
virtual void EndModeling()
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual void EndPrimitives()
G4bool kFlagProcessedInteractiveScorer
void setModalityImageMinMax(short _minmax[2])
G4LogicalVolume * GetCurrentLV() const
virtual G4bool IsNested() const
Hep3Vector & transform(const HepRotation &)
virtual G4double GetCharge() const =0
void setModalityImage(short *_image)
void GetNestedVolumeIndex(G4int, G4int[3])
size_t GetNoVoxelY() const
void setVoxelSpacing(float _spacing[3])
G4ThreeVector GetObjectTranslation() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4bool IsParameterised() const =0
const G4int MAX_NUM_TRAJECTORIES
const G4Color & GetColor() const
virtual std::vector< G4String > getHitScorerNames()
G4double GetVoxelHalfX() const
G4double GetYHalfLength() const
const G4String & GetName() const
G4GMocrenMessenger & kMessenger
G4int kNestedVolumeDirAxis[3]
virtual const G4ThreeVector GetPosition() const =0
const G4VisAttributes * fpVisAttribs
std::vector< Detector > kDetectors
virtual void AddCompound(const G4VTrajectory &)
void InitializeParameters()
G4ThreeVector kVolumeSize
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
const G4VTrajectory * GetCurrentTrajectory() const
virtual G4int GetCopyNo() const =0
G4Polyhedron * CreatePolyhedron() const
G4ThreeVector kVoxelDimension
virtual G4int GetTrackID() const =0
void translateTracks(std::vector< float > &_translateo)
G4int kNestedVolumeDimension[3]
static Verbosity GetVerbosity()
void AddPrimitive(const G4Polyline &line)
G4VPhysicalVolume * GetCurrentPV() const
system("rm -rf microbeam.root")
G4Material * GetCurrentMaterial() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
G4bool kbSetModalityVoxelSize
static G4int kSceneIdCount
G4VPhysicalVolume * GetDaughter(const G4int i) const
virtual G4Polyhedron * CreatePolyhedron() const
static G4ScoringManager * GetScoringManager()
HepRotation inverse() const
virtual G4ThreeVector GetInitialMomentum() const =0
void setDoseDistScale(double &_scale, int _num=0)
G4bool operator==(const Index3D &_right) const
virtual void EndPrimitives()
const G4bool GFDEBUG_DIGI
void setDoseDistSize(int _size[3], int _num=0)
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
std::vector< G4String > kNestedVolumeNames
G4int GetNoVertices() const
G4VSolid * GetSolid() const
G4bool GetNextVertexIndex(G4int &index, G4int &edgeFlag) const
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)