83 boxLogical, boxName+
"0", worldLogical,
false, 0);
90 G4String layerName[2] = {boxName +
"_1", boxName +
"_2"};
96 layerSolid[0] =
new G4Box(layerName[0],
103 G4cout <<
"G4ScoringBox::Construct() : Replicate to x direction" <<
G4endl;
116 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
118 boxLogical,
false, 0);
120 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter (" 122 <<
"in placement of the first nested layer." <<
G4endl;
128 G4cout << layerName[0] <<
": kXAxis, " 135 layerSolid[1] =
new G4Box(layerName[1],
142 G4cout <<
"G4ScoringBox::Construct() : Replicate to y direction" <<
G4endl;
155 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
157 layerLogical[0],
false, 0);
159 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter (" 161 <<
"in placement of the second nested layer." <<
G4endl;
167 G4cout << layerName[1] <<
": kYAxis, " 174 G4String elementName = boxName +
"_3";
182 G4cout <<
"G4ScoringBox::Construct() : Replicate to z direction" <<
G4endl;
196 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
198 elementName, layerLogical[1],
false, 0);
200 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : " 201 <<
"invalid parameter (" <<
fNSegment[2] <<
") " 202 <<
"in mesh element placement." <<
G4endl;
208 G4cout << elementName <<
": kZAxis, " 230 G4cout <<
" Size (x, y, z): (" 246 std::vector<std::vector<std::vector<double> > > cell;
247 std::vector<double> ez;
249 std::vector<std::vector<double> > eyz;
250 for(
int y = 0;
y < fNSegment[1];
y++) eyz.push_back(ez);
251 for(
int x = 0;
x < fNSegment[0];
x++) cell.push_back(eyz);
253 std::vector<std::vector<double> > xycell;
254 std::vector<double> ey;
255 for(
int y = 0;
y < fNSegment[1];
y++) ey.push_back(0.);
256 for(
int x = 0;
x < fNSegment[0];
x++) xycell.push_back(ey);
258 std::vector<std::vector<double> > yzcell;
259 for(
int y = 0;
y < fNSegment[1];
y++) yzcell.push_back(ez);
261 std::vector<std::vector<double> > xzcell;
262 for(
int x = 0;
x < fNSegment[0];
x++) xzcell.push_back(ez);
266 std::map<G4int, G4double*>::iterator itr = map->begin();
267 for(; itr != map->end(); itr++) {
277 G4double xymax = 0., yzmax = 0., xzmax = 0.;
278 for(
int x = 0;
x < fNSegment[0];
x++) {
279 for(
int y = 0;
y < fNSegment[1];
y++) {
280 if(xymin > xycell[
x][
y]) xymin = xycell[
x][
y];
281 if(xymax < xycell[
x][y]) xymax = xycell[
x][
y];
283 for(
int z = 0;
z < fNSegment[2];
z++) {
284 if(xzmin > xzcell[
x][
z]) xzmin = xzcell[
x][
z];
285 if(xzmax < xzcell[
x][z]) xzmax = xzcell[
x][
z];
288 for(
int y = 0;
y < fNSegment[1];
y++) {
289 for(
int z = 0;
z < fNSegment[2];
z++) {
290 if(yzmin > yzcell[
y][
z]) yzmin = yzcell[
y][
z];
291 if(yzmax < yzcell[
y][z]) yzmax = yzcell[
y][
z];
308 for(
int x = 0;
x < fNSegment[0];
x++) {
309 for(
int y = 0;
y < fNSegment[1];
y++) {
332 pVisManager->
Draw(*poly);
334 G4Box xyplate2 = xyplate;
338 pVisManager->
Draw(*poly2);
371 for(
int y = 0;
y < fNSegment[1];
y++) {
372 for(
int z = 0;
z < fNSegment[2];
z++) {
390 G4Box yzplate(
"yz", thick,
391 fSize[1]/fNSegment[1],
392 fSize[2]/fNSegment[2]);
396 pVisManager->
Draw(*poly);
398 G4Box yzplate2 = yzplate;
402 pVisManager->
Draw(*poly2);
435 for(
int x = 0;
x < fNSegment[0];
x++) {
436 for(
int z = 0;
z < fNSegment[2];
z++) {
454 G4Box xzplate(
"xz",
fSize[0]/fNSegment[0], thick,
455 fSize[2]/fNSegment[2]);
459 pVisManager->
Draw(*poly);
461 G4Box xzplate2 = xzplate;
465 pVisManager->
Draw(*poly2);
503 -
fSize[1] + 2*(y+0.5)*width.
y(),
504 -
fSize[2] + 2*(z+0.5)*width.
z());
525 G4int iColumn[3] = {2, 0, 1};
526 if(idxColumn<0 || idxColumn>=
fNSegment[iColumn[idxProj]])
528 G4cerr <<
"ERROR : Column number " << idxColumn
529 <<
" is out of scoring mesh [0," <<
fNSegment[iColumn[idxProj]]-1
530 <<
"]. Method ignored." <<
G4endl;
538 std::vector<std::vector<std::vector<double> > > cell;
539 std::vector<double> ez;
541 std::vector<std::vector<double> > eyz;
542 for(
int y = 0;
y < fNSegment[1];
y++) eyz.push_back(ez);
543 for(
int x = 0;
x < fNSegment[0];
x++) cell.push_back(eyz);
545 std::vector<std::vector<double> > xycell;
546 std::vector<double> ey;
547 for(
int y = 0;
y < fNSegment[1];
y++) ey.push_back(0.);
548 for(
int x = 0;
x < fNSegment[0];
x++) xycell.push_back(ey);
550 std::vector<std::vector<double> > yzcell;
551 for(
int y = 0;
y < fNSegment[1];
y++) yzcell.push_back(ez);
553 std::vector<std::vector<double> > xzcell;
554 for(
int x = 0;
x < fNSegment[0];
x++) xzcell.push_back(ez);
558 std::map<G4int, G4double*>::iterator itr = map->begin();
559 for(; itr != map->end(); itr++) {
562 if(idxProj == 0 && q[2] == idxColumn) {
565 if(idxProj == 1 && q[0] == idxColumn) {
568 if(idxProj == 2 && q[1] == idxColumn) {
575 G4double xymax = 0., yzmax = 0., xzmax = 0.;
576 for(
int x = 0;
x < fNSegment[0];
x++) {
577 for(
int y = 0;
y < fNSegment[1];
y++) {
578 if(xymin > xycell[
x][
y]) xymin = xycell[
x][
y];
579 if(xymax < xycell[
x][y]) xymax = xycell[
x][
y];
581 for(
int z = 0;
z < fNSegment[2];
z++) {
582 if(xzmin > xzcell[
x][
z]) xzmin = xzcell[
x][
z];
583 if(xzmax < xzcell[
x][z]) xzmax = xzcell[
x][
z];
586 for(
int y = 0;
y < fNSegment[1];
y++) {
587 for(
int z = 0;
z < fNSegment[2];
z++) {
588 if(yzmin > yzcell[
y][
z]) yzmin = yzcell[
y][
z];
589 if(yzmax < yzcell[
y][z]) yzmax = yzcell[
y][
z];
602 for(
int x = 0;
x < fNSegment[0];
x++) {
603 for(
int y = 0;
y < fNSegment[1];
y++) {
605 fSize[2]/fNSegment[2]);
622 pVisManager->
Draw(*poly);
630 for(
int y = 0;
y < fNSegment[1];
y++) {
631 for(
int z = 0;
z < fNSegment[2];
z++) {
633 fSize[2]/fNSegment[2]);
650 pVisManager->
Draw(*poly);
657 for(
int x = 0;
x < fNSegment[0];
x++) {
658 for(
int z = 0;
z < fNSegment[2];
z++) {
660 fSize[2]/fNSegment[2]);
677 pVisManager->
Draw(*poly);
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
G4ScoringBox(G4String wName)
void SetColour(const G4Colour &)
void SetPSName(G4String &psName)
G4ThreeVector fCenterPosition
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetReplicaPosition(G4int x, G4int y, G4int z)
static G4VVisManager * GetConcreteInstance()
G4MultiFunctionalDetector * fMFD
void Draw(std::map< G4int, G4double *> *map, G4VScoreColorMap *colorMap, G4int axflg=111)
void SetVisibility(G4bool)
void SetPSUnit(G4String &unit)
virtual void GetMapColor(G4double val, G4double color[4])=0
void SetForceSolid(G4bool)
HepPolyhedron & Transform(const G4Transform3D &t)
void SetMinMax(G4double minVal, G4double maxVal)
G4bool IfFloatMinMax() const
G4GLOB_DLL std::ostream G4cout
static G4int GetReplicaLevel()
G4RotationMatrix * fRotationMatrix
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)
virtual void BeginDraw(const G4Transform3D &objectTransformation=G4Transform3D())=0
G4int GetIndex(G4int x, G4int y, G4int z) const
void SetForceAuxEdgeVisible(G4bool)
void SetVisAttributes(const G4VisAttributes *)
G4LogicalVolume * fMeshElementLogical
void DrawColumn(std::map< G4int, G4double *> *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)
G4String fDivisionAxisNames[3]
G4LogicalVolume * GetLogicalVolume() const
virtual G4Polyhedron * GetPolyhedron() const
void GetXYZ(G4int index, G4int q[3]) const
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
virtual void List() const
static const G4double pos
G4GLOB_DLL std::ostream G4cerr
virtual void DrawColorChart(G4int nPoint=5)