54 fMeshElementLogical(0)
76 SetupGeometry(fWorldPhys);
98 boxLogical, boxName+
"0", worldLogical,
false, 0);
105 G4String layerName[2] = {boxName +
"1", boxName +
"2"};
111 layerSolid[0] =
new G4Box(layerName[0],
132 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
134 <<
"in placement of the first nested layer." <<
G4endl;
140 G4cout << layerName[0] <<
": kXAxis, "
147 layerSolid[1] =
new G4Box(layerName[1],
168 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : invalid parameter ("
170 <<
"in placement of the second nested layer." <<
G4endl;
176 G4cout << layerName[1] <<
": kYAxis, "
183 G4String elementName = boxName +
"3";
188 fMeshElementLogical =
new G4LogicalVolume(elementSolid, 0, elementName);
206 G4cerr <<
"ERROR : G4ScoringBox::SetupGeometry() : "
207 <<
"invalid parameter (" <<
fNSegment[2] <<
") "
208 <<
"in mesh element placement." <<
G4endl;
214 G4cout << elementName <<
": kZAxis, "
236 G4cout <<
" Size (x, y, z): ("
237 <<
fSize[0]/cm <<
", "
238 <<
fSize[1]/cm <<
", "
239 <<
fSize[2]/cm <<
") [cm]"
251 std::vector<std::vector<std::vector<double> > > cell;
252 std::vector<double> ez;
253 for(
int z = 0; z <
fNSegment[2]; z++) ez.push_back(0.);
254 std::vector<std::vector<double> > eyz;
255 for(
int y = 0; y <
fNSegment[1]; y++) eyz.push_back(ez);
256 for(
int x = 0; x <
fNSegment[0]; x++) cell.push_back(eyz);
258 std::vector<std::vector<double> > xycell;
259 std::vector<double> ey;
260 for(
int y = 0; y <
fNSegment[1]; y++) ey.push_back(0.);
261 for(
int x = 0; x <
fNSegment[0]; x++) xycell.push_back(ey);
263 std::vector<std::vector<double> > yzcell;
264 for(
int y = 0; y <
fNSegment[1]; y++) yzcell.push_back(ez);
266 std::vector<std::vector<double> > xzcell;
267 for(
int x = 0; x <
fNSegment[0]; x++) xzcell.push_back(ez);
271 std::map<G4int, G4double*>::iterator itr = map->begin();
272 for(; itr != map->end(); itr++) {
273 GetXYZ(itr->first, q);
282 G4double xymax = 0., yzmax = 0., xzmax = 0.;
285 if(xymin > xycell[x][y]) xymin = xycell[x][y];
286 if(xymax < xycell[x][y]) xymax = xycell[x][y];
289 if(xzmin > xzcell[x][z]) xzmin = xzcell[x][z];
290 if(xzmax < xzcell[x][z]) xzmax = xzcell[x][z];
295 if(yzmin > yzcell[y][z]) yzmin = yzcell[y][z];
296 if(yzmax < yzcell[y][z]) yzmax = yzcell[y][z];
328 pVisManager->
Draw(xyplate, att, trans);
329 pVisManager->
Draw(xyplate, att, trans2);
357 pVisManager->
Draw(yzplate, att, trans);
358 pVisManager->
Draw(yzplate, att, trans2);
386 pVisManager->
Draw(xzplate, att, trans);
387 pVisManager->
Draw(xzplate, att, trans2);
402 -
fSize[1] + 2*(y+0.5)*width.y(),
403 -
fSize[2] + 2*(z+0.5)*width.z());
408void G4ScoringBox::GetXYZ(
G4int index,
G4int q[3])
const {
423 if(idxColumn<0 || idxColumn>=
fNSegment[idxProj])
425 G4cerr <<
"ERROR : Column number " << idxColumn <<
" is out of scoring mesh [0," <<
fNSegment[idxProj]-1 <<
426 "]. Method ignored." <<
G4endl;
433 std::vector<std::vector<std::vector<double> > > cell;
434 std::vector<double> ez;
435 for(
int z = 0; z <
fNSegment[2]; z++) ez.push_back(0.);
436 std::vector<std::vector<double> > eyz;
437 for(
int y = 0; y <
fNSegment[1]; y++) eyz.push_back(ez);
438 for(
int x = 0; x <
fNSegment[0]; x++) cell.push_back(eyz);
440 std::vector<std::vector<double> > xycell;
441 std::vector<double> ey;
442 for(
int y = 0; y <
fNSegment[1]; y++) ey.push_back(0.);
443 for(
int x = 0; x <
fNSegment[0]; x++) xycell.push_back(ey);
445 std::vector<std::vector<double> > yzcell;
446 for(
int y = 0; y <
fNSegment[1]; y++) yzcell.push_back(ez);
448 std::vector<std::vector<double> > xzcell;
449 for(
int x = 0; x <
fNSegment[0]; x++) xzcell.push_back(ez);
453 std::map<G4int, G4double*>::iterator itr = map->begin();
454 for(; itr != map->end(); itr++) {
455 GetXYZ(itr->first, q);
457 if(idxProj == 0 && q[2] == idxColumn) {
460 if(idxProj == 1 && q[0] == idxColumn) {
463 if(idxProj == 2 && q[1] == idxColumn) {
470 G4double xymax = 0., yzmax = 0., xzmax = 0.;
473 if(xymin > xycell[x][y]) xymin = xycell[x][y];
474 if(xymax < xycell[x][y]) xymax = xycell[x][y];
477 if(xzmin > xzcell[x][z]) xzmin = xzcell[x][z];
478 if(xzmax < xzcell[x][z]) xzmax = xzcell[x][z];
483 if(yzmin > yzcell[y][z]) yzmin = yzcell[y][z];
484 if(yzmax < yzcell[y][z]) yzmax = yzcell[y][z];
512 pVisManager->
Draw(xyplate, att, trans);
534 pVisManager->
Draw(yzplate, att, trans);
555 pVisManager->
Draw(xzplate, att, trans);
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void Construct(G4VPhysicalVolume *fWorldPhys)
void Draw(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int axflg=111)
G4ScoringBox(G4String wName)
void DrawColumn(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)
static G4int GetReplicaLevel()
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() 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]
G4ThreeVector fCenterPosition
static G4VVisManager * GetConcreteInstance()
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetForceAuxEdgeVisible(G4bool)
void SetVisibility(G4bool)
void SetColour(const G4Colour &)
void SetForceSolid(G4bool)