84 boxLogical, boxName+
"0", worldLogical,
false, 0);
91 G4String layerName[2] = {boxName +
"_1", boxName +
"_2"};
97 layerSolid[0] =
new G4Box(layerName[0],
104 G4cout <<
"G4ScoringBox::Construct() : Replicate to x direction" <<
G4endl;
117 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
119 boxLogical,
false, 0);
121 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
123 <<
"in placement of the first nested layer." <<
G4endl;
129 G4cout << layerName[0] <<
": kXAxis, "
136 layerSolid[1] =
new G4Box(layerName[1],
143 G4cout <<
"G4ScoringBox::Construct() : Replicate to y direction" <<
G4endl;
156 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
158 layerLogical[0],
false, 0);
160 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
162 <<
"in placement of the second nested layer." <<
G4endl;
168 G4cout << layerName[1] <<
": kYAxis, "
175 G4String elementName = boxName +
"_3";
183 G4cout <<
"G4ScoringBox::Construct() : Replicate to z direction" <<
G4endl;
197 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
199 elementName, layerLogical[1],
false, 0);
201 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : "
202 <<
"invalid parameter (" <<
fNSegment[2] <<
") "
203 <<
"in mesh element placement." <<
G4endl;
209 G4cout << elementName <<
": kZAxis, "
231 G4cout <<
" Size (x, y, z): ("
232 <<
fSize[0]/cm <<
", "
233 <<
fSize[1]/cm <<
", "
234 <<
fSize[2]/cm <<
") [cm]"
247 std::vector<std::vector<std::vector<double> > > cell;
248 std::vector<double> ez;
249 for(
int z = 0; z <
fNSegment[2]; z++) ez.push_back(0.);
250 std::vector<std::vector<double> > eyz;
251 for(
int y = 0; y <
fNSegment[1]; y++) eyz.push_back(ez);
252 for(
int x = 0; x <
fNSegment[0]; x++) cell.push_back(eyz);
254 std::vector<std::vector<double> > xycell;
255 std::vector<double> ey;
256 for(
int y = 0; y <
fNSegment[1]; y++) ey.push_back(0.);
257 for(
int x = 0; x <
fNSegment[0]; x++) xycell.push_back(ey);
259 std::vector<std::vector<double> > yzcell;
260 for(
int y = 0; y <
fNSegment[1]; y++) yzcell.push_back(ez);
262 std::vector<std::vector<double> > xzcell;
263 for(
int x = 0; x <
fNSegment[0]; x++) xzcell.push_back(ez);
267 std::map<G4int, G4StatDouble*>::iterator itr = map->
GetMap()->begin();
268 for(; itr != map->
GetMap()->end(); itr++) {
269 GetXYZ(itr->first, q);
278 G4double xymax = 0., yzmax = 0., xzmax = 0.;
281 if(xymin > xycell[x][y]) xymin = xycell[x][y];
282 if(xymax < xycell[x][y]) xymax = xycell[x][y];
285 if(xzmin > xzcell[x][z]) xzmin = xzcell[x][z];
286 if(xzmax < xzcell[x][z]) xzmax = xzcell[x][z];
291 if(yzmin > yzcell[y][z]) yzmin = yzcell[y][z];
292 if(yzmax < yzcell[y][z]) yzmax = yzcell[y][z];
333 pVisManager->
Draw(*poly);
335 G4Box xyplate2 = xyplate;
339 pVisManager->
Draw(*poly2);
391 G4Box yzplate(
"yz", thick,
397 pVisManager->
Draw(*poly);
399 G4Box yzplate2 = yzplate;
403 pVisManager->
Draw(*poly2);
460 pVisManager->
Draw(*poly);
462 G4Box xzplate2 = xzplate;
466 pVisManager->
Draw(*poly2);
504 -
fSize[1] + 2*(y+0.5)*width.y(),
505 -
fSize[2] + 2*(z+0.5)*width.z());
510void G4ScoringBox::GetXYZ(
G4int index,
G4int q[3])
const {
526 G4int iColumn[3] = {2, 0, 1};
527 if(idxColumn<0 || idxColumn>=
fNSegment[iColumn[idxProj]])
529 G4cerr <<
"ERROR : Column number " << idxColumn
530 <<
" is out of scoring mesh [0," <<
fNSegment[iColumn[idxProj]]-1
531 <<
"]. Method ignored." <<
G4endl;
539 std::vector<std::vector<std::vector<double> > > cell;
540 std::vector<double> ez;
541 for(
int z = 0; z <
fNSegment[2]; z++) ez.push_back(0.);
542 std::vector<std::vector<double> > eyz;
543 for(
int y = 0; y <
fNSegment[1]; y++) eyz.push_back(ez);
544 for(
int x = 0; x <
fNSegment[0]; x++) cell.push_back(eyz);
546 std::vector<std::vector<double> > xycell;
547 std::vector<double> ey;
548 for(
int y = 0; y <
fNSegment[1]; y++) ey.push_back(0.);
549 for(
int x = 0; x <
fNSegment[0]; x++) xycell.push_back(ey);
551 std::vector<std::vector<double> > yzcell;
552 for(
int y = 0; y <
fNSegment[1]; y++) yzcell.push_back(ez);
554 std::vector<std::vector<double> > xzcell;
555 for(
int x = 0; x <
fNSegment[0]; x++) xzcell.push_back(ez);
559 std::map<G4int, G4StatDouble*>::iterator itr = map->
GetMap()->begin();
560 for(; itr != map->
GetMap()->end(); itr++) {
561 GetXYZ(itr->first, q);
563 if(idxProj == 0 && q[2] == idxColumn) {
566 if(idxProj == 1 && q[0] == idxColumn) {
569 if(idxProj == 2 && q[1] == idxColumn) {
576 G4double xymax = 0., yzmax = 0., xzmax = 0.;
579 if(xymin > xycell[x][y]) xymin = xycell[x][y];
580 if(xymax < xycell[x][y]) xymax = xycell[x][y];
583 if(xzmin > xzcell[x][z]) xzmin = xzcell[x][z];
584 if(xzmax < xzcell[x][z]) xzmax = xzcell[x][z];
589 if(yzmin > yzcell[y][z]) yzmin = yzcell[y][z];
590 if(yzmax < yzcell[y][z]) yzmax = yzcell[y][z];
623 pVisManager->
Draw(*poly);
651 pVisManager->
Draw(*poly);
678 pVisManager->
Draw(*poly);
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
virtual G4Polyhedron * GetPolyhedron() const
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void Draw(RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111)
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)
G4ScoringBox(G4String wName)
void DrawColumn(RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)
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 SetVisibility(G4bool=true)
void SetForceAuxEdgeVisible(G4bool=true)
void SetForceSolid(G4bool=true)
void SetVisAttributes(const G4VisAttributes *)
HepPolyhedron & Transform(const G4Transform3D &t)