82 boxLogical, boxName+
"0", worldLogical,
false, 0);
89 G4String layerName[2] = {boxName +
"_1", boxName +
"_2"};
95 layerSolid[0] =
new G4Box(layerName[0],
102 G4cout <<
"G4ScoringBox::Construct() : Replicate to x direction" <<
G4endl;
115 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
117 boxLogical,
false, 0);
119 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
121 <<
"in placement of the first nested layer." <<
G4endl;
127 G4cout << layerName[0] <<
": kXAxis, "
134 layerSolid[1] =
new G4Box(layerName[1],
141 G4cout <<
"G4ScoringBox::Construct() : Replicate to y direction" <<
G4endl;
154 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
156 layerLogical[0],
false, 0);
158 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
160 <<
"in placement of the second nested layer." <<
G4endl;
166 G4cout << layerName[1] <<
": kYAxis, "
173 G4String elementName = boxName +
"_3";
181 G4cout <<
"G4ScoringBox::Construct() : Replicate to z direction" <<
G4endl;
195 G4cout <<
"G4ScoringBox::Construct() : Placement" <<
G4endl;
197 elementName, layerLogical[1],
false, 0);
199 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : "
200 <<
"invalid parameter (" <<
fNSegment[2] <<
") "
201 <<
"in mesh element placement." <<
G4endl;
207 G4cout << elementName <<
": kZAxis, "
229 G4cout <<
" Size (x, y, z): ("
245 std::vector<std::vector<std::vector<double> > > cell;
246 std::vector<double> ez;
248 std::vector<std::vector<double> > eyz;
249 for(
int y = 0; y < fNSegment[1]; y++) eyz.push_back(ez);
250 for(
int x = 0; x < fNSegment[0]; x++) cell.push_back(eyz);
252 std::vector<std::vector<double> > xycell;
253 std::vector<double> ey;
254 for(
int y = 0; y < fNSegment[1]; y++) ey.push_back(0.);
255 for(
int x = 0; x < fNSegment[0]; x++) xycell.push_back(ey);
257 std::vector<std::vector<double> > yzcell;
258 for(
int y = 0; y < fNSegment[1]; y++) yzcell.push_back(ez);
260 std::vector<std::vector<double> > xzcell;
261 for(
int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez);
265 std::map<G4int, G4double*>::iterator itr = map->begin();
266 for(; itr != map->end(); itr++) {
276 G4double xymax = 0., yzmax = 0., xzmax = 0.;
277 for(
int x = 0; x < fNSegment[0]; x++) {
278 for(
int y = 0; y < fNSegment[1]; y++) {
279 if(xymin > xycell[x][y]) xymin = xycell[x][y];
280 if(xymax < xycell[x][y]) xymax = xycell[x][y];
282 for(
int z = 0;
z < fNSegment[2];
z++) {
283 if(xzmin > xzcell[x][
z]) xzmin = xzcell[x][
z];
284 if(xzmax < xzcell[x][z]) xzmax = xzcell[x][
z];
287 for(
int y = 0; y < fNSegment[1]; y++) {
288 for(
int z = 0;
z < fNSegment[2];
z++) {
289 if(yzmin > yzcell[y][
z]) yzmin = yzcell[y][
z];
290 if(yzmax < yzcell[y][z]) yzmax = yzcell[y][
z];
305 fSize[2]/fNSegment[2]*0.01);
306 for(
int x = 0; x < fNSegment[0]; x++) {
307 for(
int y = 0; y < fNSegment[1]; y++) {
323 pVisManager->
Draw(xyplate, att, trans);
324 pVisManager->
Draw(xyplate, att, trans2);
335 fSize[2]/fNSegment[2]);
336 for(
int y = 0; y < fNSegment[1]; y++) {
337 for(
int z = 0;
z < fNSegment[2];
z++) {
353 pVisManager->
Draw(yzplate, att, trans);
354 pVisManager->
Draw(yzplate, att, trans2);
365 fSize[2]/fNSegment[2]);
366 for(
int x = 0; x < fNSegment[0]; x++) {
367 for(
int z = 0;
z < fNSegment[2];
z++) {
383 pVisManager->
Draw(xzplate, att, trans);
384 pVisManager->
Draw(xzplate, att, trans2);
400 -
fSize[1] + 2*(y+0.5)*width.y(),
401 -
fSize[2] + 2*(z+0.5)*width.z());
422 G4int iColumn[3] = {2, 0, 1};
423 if(idxColumn<0 || idxColumn>=
fNSegment[iColumn[idxProj]])
425 G4cerr <<
"ERROR : Column number " << idxColumn
426 <<
" is out of scoring mesh [0," <<
fNSegment[iColumn[idxProj]]-1
427 <<
"]. Method ignored." <<
G4endl;
434 std::vector<std::vector<std::vector<double> > > cell;
435 std::vector<double> ez;
437 std::vector<std::vector<double> > eyz;
438 for(
int y = 0; y < fNSegment[1]; y++) eyz.push_back(ez);
439 for(
int x = 0; x < fNSegment[0]; x++) cell.push_back(eyz);
441 std::vector<std::vector<double> > xycell;
442 std::vector<double> ey;
443 for(
int y = 0; y < fNSegment[1]; y++) ey.push_back(0.);
444 for(
int x = 0; x < fNSegment[0]; x++) xycell.push_back(ey);
446 std::vector<std::vector<double> > yzcell;
447 for(
int y = 0; y < fNSegment[1]; y++) yzcell.push_back(ez);
449 std::vector<std::vector<double> > xzcell;
450 for(
int x = 0; x < fNSegment[0]; x++) xzcell.push_back(ez);
454 std::map<G4int, G4double*>::iterator itr = map->begin();
455 for(; itr != map->end(); itr++) {
458 if(idxProj == 0 && q[2] == idxColumn) {
461 if(idxProj == 1 && q[0] == idxColumn) {
464 if(idxProj == 2 && q[1] == idxColumn) {
471 G4double xymax = 0., yzmax = 0., xzmax = 0.;
472 for(
int x = 0; x < fNSegment[0]; x++) {
473 for(
int y = 0; y < fNSegment[1]; y++) {
474 if(xymin > xycell[x][y]) xymin = xycell[x][y];
475 if(xymax < xycell[x][y]) xymax = xycell[x][y];
477 for(
int z = 0;
z < fNSegment[2];
z++) {
478 if(xzmin > xzcell[x][
z]) xzmin = xzcell[x][
z];
479 if(xzmax < xzcell[x][z]) xzmax = xzcell[x][
z];
482 for(
int y = 0; y < fNSegment[1]; y++) {
483 for(
int z = 0;
z < fNSegment[2];
z++) {
484 if(yzmin > yzcell[y][
z]) yzmin = yzcell[y][
z];
485 if(yzmax < yzcell[y][z]) yzmax = yzcell[y][
z];
500 fSize[2]/fNSegment[2]);
501 for(
int x = 0; x < fNSegment[0]; x++) {
502 for(
int y = 0; y < fNSegment[1]; y++) {
514 pVisManager->
Draw(xyplate, att, trans);
523 fSize[2]/fNSegment[2]);
524 for(
int y = 0; y < fNSegment[1]; y++) {
525 for(
int z = 0;
z < fNSegment[2];
z++) {
537 pVisManager->
Draw(yzplate, att, trans);
545 fSize[2]/fNSegment[2]);
546 for(
int x = 0; x < fNSegment[0]; x++) {
547 for(
int z = 0;
z < fNSegment[2];
z++) {
559 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
G4ThreeVector GetReplicaPosition(G4int x, G4int y, G4int z)
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 GetXYZ(G4int index, G4int q[3]) const
void SetMinMax(G4double minVal, G4double maxVal)
G4GLOB_DLL std::ostream G4cout
static G4int GetReplicaLevel()
virtual void List() const
G4RotationMatrix * fRotationMatrix
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)
void SetForceAuxEdgeVisible(G4bool)
G4LogicalVolume * fMeshElementLogical
G4int GetIndex(G4int x, G4int y, G4int z) const
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)
static const G4double pos
G4GLOB_DLL std::ostream G4cerr
virtual void DrawColorChart(G4int nPoint=5)