55 , fSegmentDirection(-1)
83 worldLogical,
false, 0);
85 G4String layerName[2] = { boxName +
"_1", boxName +
"_2" };
94 layerLogical[0] =
new G4LogicalVolume(layerSolid[0],
nullptr, layerName[0]);
98 G4cout <<
"G4ScoringBox::Construct() : Replicate to x direction"
114 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
116 layerName[0], boxLogical,
false, 0);
119 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
121 <<
"in placement of the first nested layer." <<
G4endl;
136 layerLogical[1] =
new G4LogicalVolume(layerSolid[1],
nullptr, layerName[1]);
140 G4cout <<
"G4ScoringBox::Construct() : Replicate to y direction"
156 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
158 layerName[1], layerLogical[0],
false, 0);
161 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
163 <<
"in placement of the second nested layer." <<
G4endl;
176 G4String elementName = boxName +
"_3";
184 G4cout <<
"G4ScoringBox::Construct() : Replicate to z direction"
201 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
203 elementName, layerLogical[1],
false, 0);
206 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : "
207 <<
"invalid parameter (" <<
fNSegment[2] <<
") "
208 <<
"in mesh element placement." <<
G4endl;
223 visatt->SetVisibility(
false);
226 visatt->SetVisibility(
true);
242 if(pVisManager !=
nullptr)
245 std::vector<std::vector<std::vector<double>>> cell;
246 std::vector<double> ez;
249 std::vector<std::vector<double>> eyz;
255 std::vector<std::vector<double>> xycell;
256 std::vector<double> ey;
260 xycell.push_back(ey);
262 std::vector<std::vector<double>> yzcell;
264 yzcell.push_back(ez);
266 std::vector<std::vector<double>> xzcell;
268 xzcell.push_back(ez);
272 auto itr = map->GetMap()->begin();
273 for(; itr != map->GetMap()->end(); itr++)
275 GetXYZ(itr->first, q);
284 G4double xymax = 0., yzmax = 0., xzmax = 0.;
289 if(xymin > xycell[x][y])
290 xymin = xycell[x][y];
291 if(xymax < xycell[x][y])
292 xymax = xycell[x][y];
296 if(xzmin > xzcell[x][z])
297 xzmin = xzcell[x][z];
298 if(xzmax < xzcell[x][z])
299 xzmax = xzcell[x][z];
306 if(yzmin > yzcell[y][z])
307 yzmin = yzcell[y][z];
308 if(yzmax < yzcell[y][z])
309 yzmax = yzcell[y][z];
359 pVisManager->
Draw(*poly);
361 G4Box xyplate2 = xyplate;
365 pVisManager->
Draw(*poly2);
406 G4Box yzplate(
"yz", thick,
411 pVisManager->
Draw(*poly);
413 G4Box yzplate2 = yzplate;
417 pVisManager->
Draw(*poly2);
464 pVisManager->
Draw(*poly);
466 G4Box xzplate2 = xzplate;
470 pVisManager->
Draw(*poly2);
486 -
fSize[1] + 2 * (y + 0.5) * width.y(),
487 -
fSize[2] + 2 * (z + 0.5) * width.z());
492void G4ScoringBox::GetXYZ(
G4int index,
G4int q[3])
const
507 G4int iColumn[3] = { 2, 0, 1 };
508 if(idxColumn < 0 || idxColumn >=
fNSegment[iColumn[idxProj]])
510 G4cerr <<
"ERROR : Column number " << idxColumn
511 <<
" is out of scoring mesh [0," <<
fNSegment[iColumn[idxProj]] - 1
512 <<
"]. Method ignored." <<
G4endl;
516 if(pVisManager !=
nullptr)
521 std::vector<std::vector<std::vector<double>>> cell;
522 std::vector<double> ez;
525 std::vector<std::vector<double>> eyz;
531 std::vector<std::vector<double>> xycell;
532 std::vector<double> ey;
536 xycell.push_back(ey);
538 std::vector<std::vector<double>> yzcell;
540 yzcell.push_back(ez);
542 std::vector<std::vector<double>> xzcell;
544 xzcell.push_back(ez);
548 auto itr = map->GetMap()->begin();
549 for(; itr != map->GetMap()->end(); itr++)
551 GetXYZ(itr->first, q);
553 if(idxProj == 0 && q[2] == idxColumn)
557 if(idxProj == 1 && q[0] == idxColumn)
561 if(idxProj == 2 && q[1] == idxColumn)
569 G4double xymax = 0., yzmax = 0., xzmax = 0.;
574 if(xymin > xycell[x][y])
575 xymin = xycell[x][y];
576 if(xymax < xycell[x][y])
577 xymax = xycell[x][y];
581 if(xzmin > xzcell[x][z])
582 xzmin = xzcell[x][z];
583 if(xzmax < xzcell[x][z])
584 xzmax = xzcell[x][z];
591 if(yzmin > yzcell[y][z])
592 yzmin = yzcell[y][z];
593 if(yzmax < yzcell[y][z])
594 yzmax = yzcell[y][z];
635 pVisManager->
Draw(*poly);
672 pVisManager->
Draw(*poly);
709 pVisManager->
Draw(*poly);
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4Polyhedron * GetPolyhedron() const override
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void Draw(RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111) override
void DrawColumn(RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn) override
void SetupGeometry(G4VPhysicalVolume *fWorldPhys) override
G4ScoringBox(G4String wName)
void List() const override
static G4int GetReplicaLevel()
G4LogicalVolume * GetLogicalVolume() const
virtual void DrawColorChart(G4int nPoint=5)
G4bool IfFloatMinMax() const
void SetMinMax(G4double minVal, G4double maxVal)
void SetPSUnit(G4String &unit)
virtual void GetMapColor(G4double val, G4double color[4])=0
void SetPSName(G4String &psName)
G4RotationMatrix * fRotationMatrix
virtual void List() const
G4MultiFunctionalDetector * fMFD
G4String fDivisionAxisNames[3]
G4LogicalVolume * fMeshElementLogical
G4ThreeVector fCenterPosition
static G4VVisManager * GetConcreteInstance()
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void BeginDraw(const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)
void SetForceAuxEdgeVisible(G4bool=true)
void SetForceSolid(G4bool=true)
void SetVisAttributes(const G4VisAttributes *)
HepPolyhedron & Transform(const G4Transform3D &t)