70 G4cout << fWorldPhys->
GetName() <<
" --- All quantities are reset."
76 SetupGeometry(fWorldPhys);
97 boxLogical, boxName+
"0", worldLogical,
false, 0);
104 G4String layerName[2] = {boxName +
"_1", boxName +
"_2"};
110 layerSolid[0] =
new G4Box(layerName[0],
117 G4cout <<
"G4ScoringBox::Construct() : Replicate to x direction" <<
G4endl;
130 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
132 boxLogical,
false, 0);
134 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
136 <<
"in placement of the first nested layer." <<
G4endl;
142 G4cout << layerName[0] <<
": kXAxis, "
149 layerSolid[1] =
new G4Box(layerName[1],
156 G4cout <<
"G4ScoringBox::Construct() : Replicate to y direction" <<
G4endl;
169 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
171 layerLogical[0],
false, 0);
173 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
175 <<
"in placement of the second nested layer." <<
G4endl;
181 G4cout << layerName[1] <<
": kYAxis, "
188 G4String elementName = boxName +
"_3";
196 G4cout <<
"G4ScoringBox::Construct() : Replicate to z direction" <<
G4endl;
210 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
212 elementName, layerLogical[1],
false, 0);
214 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : "
215 <<
"invalid parameter (" <<
fNSegment[2] <<
") "
216 <<
"in mesh element placement." <<
G4endl;
222 G4cout << elementName <<
": kZAxis, "
244 G4cout <<
" Size (x, y, z): ("
260 std::vector<std::vector<std::vector<double> > > cell;
261 std::vector<double> ez;
263 std::vector<std::vector<double> > eyz;
264 for(
int y = 0;
y < fNSegment[1];
y++) eyz.push_back(ez);
265 for(
int x = 0;
x < fNSegment[0];
x++) cell.push_back(eyz);
267 std::vector<std::vector<double> > xycell;
268 std::vector<double> ey;
269 for(
int y = 0;
y < fNSegment[1];
y++) ey.push_back(0.);
270 for(
int x = 0;
x < fNSegment[0];
x++) xycell.push_back(ey);
272 std::vector<std::vector<double> > yzcell;
273 for(
int y = 0;
y < fNSegment[1];
y++) yzcell.push_back(ez);
275 std::vector<std::vector<double> > xzcell;
276 for(
int x = 0;
x < fNSegment[0];
x++) xzcell.push_back(ez);
280 std::map<G4int, G4double*>::iterator itr = map->begin();
281 for(; itr != map->end(); itr++) {
282 GetXYZ(itr->first, q);
291 G4double xymax = 0., yzmax = 0., xzmax = 0.;
292 for(
int x = 0;
x < fNSegment[0];
x++) {
293 for(
int y = 0;
y < fNSegment[1];
y++) {
294 if(xymin > xycell[
x][
y]) xymin = xycell[
x][
y];
295 if(xymax < xycell[
x][y]) xymax = xycell[
x][
y];
297 for(
int z = 0;
z < fNSegment[2];
z++) {
298 if(xzmin > xzcell[
x][
z]) xzmin = xzcell[
x][
z];
299 if(xzmax < xzcell[
x][z]) xzmax = xzcell[
x][
z];
302 for(
int y = 0;
y < fNSegment[1];
y++) {
303 for(
int z = 0;
z < fNSegment[2];
z++) {
304 if(yzmin > yzcell[
y][
z]) yzmin = yzcell[
y][
z];
305 if(yzmax < yzcell[
y][z]) yzmax = yzcell[
y][
z];
320 fSize[2]/fNSegment[2]*0.01);
321 for(
int x = 0;
x < fNSegment[0];
x++) {
322 for(
int y = 0;
y < fNSegment[1];
y++) {
338 pVisManager->
Draw(xyplate, att, trans);
339 pVisManager->
Draw(xyplate, att, trans2);
350 fSize[2]/fNSegment[2]);
351 for(
int y = 0;
y < fNSegment[1];
y++) {
352 for(
int z = 0;
z < fNSegment[2];
z++) {
368 pVisManager->
Draw(yzplate, att, trans);
369 pVisManager->
Draw(yzplate, att, trans2);
380 fSize[2]/fNSegment[2]);
381 for(
int x = 0;
x < fNSegment[0];
x++) {
382 for(
int z = 0;
z < fNSegment[2];
z++) {
398 pVisManager->
Draw(xzplate, att, trans);
399 pVisManager->
Draw(xzplate, att, trans2);
437 G4int iColumn[3] = {2, 0, 1};
438 if(idxColumn<0 || idxColumn>=
fNSegment[iColumn[idxProj]])
440 G4cerr <<
"ERROR : Column number " << idxColumn
441 <<
" is out of scoring mesh [0," <<
fNSegment[iColumn[idxProj]]-1
442 <<
"]. Method ignored." <<
G4endl;
449 std::vector<std::vector<std::vector<double> > > cell;
450 std::vector<double> ez;
451 for(
int z = 0; z <
fNSegment[2]; z++) ez.push_back(0.);
452 std::vector<std::vector<double> > eyz;
453 for(
int y = 0; y < fNSegment[1]; y++) eyz.push_back(ez);
454 for(
int x = 0; x < fNSegment[0]; x++) cell.push_back(eyz);
456 std::vector<std::vector<double> > xycell;
457 std::vector<double> ey;
458 for(
int y = 0; y < fNSegment[1]; y++) ey.push_back(0.);
459 for(
int x = 0; x < fNSegment[0]; x++) xycell.push_back(ey);
461 std::vector<std::vector<double> > yzcell;
462 for(
int y = 0; y < fNSegment[1]; y++) yzcell.push_back(ez);
464 std::vector<std::vector<double> > xzcell;
465 for(
int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez);
469 std::map<G4int, G4double*>::iterator itr = map->begin();
470 for(; itr != map->end(); itr++) {
471 GetXYZ(itr->first, q);
473 if(idxProj == 0 && q[2] == idxColumn) {
476 if(idxProj == 1 && q[0] == idxColumn) {
479 if(idxProj == 2 && q[1] == idxColumn) {
486 G4double xymax = 0., yzmax = 0., xzmax = 0.;
487 for(
int x = 0; x < fNSegment[0]; x++) {
488 for(
int y = 0; y < fNSegment[1]; y++) {
489 if(xymin > xycell[x][y]) xymin = xycell[
x][
y];
490 if(xymax < xycell[x][y]) xymax = xycell[
x][
y];
492 for(
int z = 0; z < fNSegment[2]; z++) {
493 if(xzmin > xzcell[x][z]) xzmin = xzcell[
x][
z];
494 if(xzmax < xzcell[x][z]) xzmax = xzcell[
x][
z];
497 for(
int y = 0; y < fNSegment[1]; y++) {
498 for(
int z = 0; z < fNSegment[2]; z++) {
499 if(yzmin > yzcell[y][z]) yzmin = yzcell[
y][
z];
500 if(yzmax < yzcell[y][z]) yzmax = yzcell[
y][
z];
515 fSize[2]/fNSegment[2]);
516 for(
int x = 0; x < fNSegment[0]; x++) {
517 for(
int y = 0; y < fNSegment[1]; y++) {
529 pVisManager->
Draw(xyplate, att, trans);
538 fSize[2]/fNSegment[2]);
539 for(
int y = 0; y < fNSegment[1]; y++) {
540 for(
int z = 0; z < fNSegment[2]; z++) {
552 pVisManager->
Draw(yzplate, att, trans);
560 fSize[2]/fNSegment[2]);
561 for(
int x = 0; x < fNSegment[0]; x++) {
562 for(
int z = 0; z < fNSegment[2]; z++) {
574 pVisManager->
Draw(xzplate, att, trans);
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
static G4VVisManager * GetConcreteInstance()
G4MultiFunctionalDetector * fMFD
void SetVisibility(G4bool)
void SetPSUnit(G4String &unit)
virtual void GetMapColor(G4double val, G4double color[4])=0
void DrawColumn(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)
void SetForceSolid(G4bool)
void SetMinMax(G4double minVal, G4double maxVal)
G4GLOB_DLL std::ostream G4cout
static G4int GetReplicaLevel()
const G4String & GetName() const
virtual void List() const
G4RotationMatrix * fRotationMatrix
virtual void Construct(G4VPhysicalVolume *fWorldPhys)
void SetForceAuxEdgeVisible(G4bool)
G4LogicalVolume * fMeshElementLogical
void Draw(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int axflg=111)
G4LogicalVolume * GetLogicalVolume() const
G4bool IfFloatMinMax() const
G4String fDivisionAxisNames[3]
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
G4GLOB_DLL std::ostream G4cerr
virtual void DrawColorChart(G4int nPoint=5)