89 tubsLogical, tubsName+
"0", worldLogical,
false, 0);
94 G4String layerName[2] = {tubsName +
"1", tubsName +
"2"};
100 layerSolid[0] =
new G4Tubs(layerName[0],
120 G4cerr <<
"G4ScoringCylinder::SetupGeometry() : invalid parameter ("
122 <<
"in placement of the first nested layer." <<
G4endl;
127 layerSolid[1] =
new G4Tubs(layerName[1],
148 G4cerr <<
"ERROR : G4ScoringCylinder::SetupGeometry() : invalid parameter ("
150 <<
"in placement of the second nested layer." <<
G4endl;
154 G4String elementName = tubsName +
"3";
178 G4cerr <<
"G4ScoringCylinder::SetupGeometry() : "
180 <<
"in mesh element placement." <<
G4endl;
200 G4cout <<
" Size (R, Dz): ("
215 std::vector<double> ephi;
216 for(
int phi = 0; phi <
fNSegment[
IPHI]; phi++) ephi.push_back(0.);
218 std::vector<std::vector<double> > zphicell;
219 for(
int z = 0;
z < fNSegment[
IZ];
z++) zphicell.push_back(ephi);
221 std::vector<std::vector<double> > rphicell;
222 for(
int r = 0; r < fNSegment[
IR]; r++) rphicell.push_back(ephi);
226 std::map<G4int, G4double*>::iterator itr = map->begin();
227 for(; itr != map->end(); itr++) {
240 G4double zphimax = 0., rphimax = 0.;
241 for(
int iphi = 0; iphi < fNSegment[
IPHI]; iphi++) {
242 for(
int iz = 0;
iz < fNSegment[
IZ];
iz++) {
243 if(zphimin > zphicell[
iz][iphi]) zphimin = zphicell[
iz][iphi];
244 if(zphimax < zphicell[
iz][iphi]) zphimax = zphicell[
iz][iphi];
246 for(
int ir = 0; ir < fNSegment[
IR]; ir++) {
247 if(rphimin > rphicell[ir][iphi]) rphimin = rphicell[ir][iphi];
248 if(rphimax < rphicell[ir][iphi]) rphimax = rphicell[ir][iphi];
267 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
268 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
275 angle, dphi*0.99999);
289 pVisManager->
Draw(cylinder, att, trans);
299 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
300 for(
int r = 0; r < fNSegment[
IR]; r++) {
302 G4double rs[2] = {rsize*r, rsize*(r+1)};
305 G4Tubs cylinder(
"z-phi", rs[0], rs[1], 0.001,
306 angle, dphi*0.99999);
333 pVisManager->
Draw(cylinder, att, transn);
334 pVisManager->
Draw(cylinder, att, transp);
362 if(idxColumn<0 || idxColumn>=
fNSegment[projAxis])
364 G4cerr <<
"Warning : Column number " << idxColumn <<
" is out of scoring mesh [0," <<
fNSegment[projAxis]-1 <<
365 "]. Method ignored." <<
G4endl;
372 std::vector<std::vector<std::vector<double> > > cell;
373 std::vector<double> ephi;
374 for(
int phi = 0; phi <
fNSegment[
IPHI]; phi++) ephi.push_back(0.);
375 std::vector<std::vector<double> > ezphi;
376 for(
int z = 0;
z < fNSegment[
IZ];
z++) ezphi.push_back(ephi);
377 for(
int r = 0; r < fNSegment[
IR]; r++) cell.push_back(ezphi);
379 std::vector<std::vector<double> > rzcell;
380 std::vector<double> ez;
381 for(
int z = 0;
z < fNSegment[
IZ];
z++) ez.push_back(0.);
382 for(
int r = 0; r < fNSegment[
IR]; r++) rzcell.push_back(ez);
384 std::vector<std::vector<double> > zphicell;
385 for(
int z = 0;
z < fNSegment[
IZ];
z++) zphicell.push_back(ephi);
387 std::vector<std::vector<double> > rphicell;
388 for(
int r = 0; r < fNSegment[
IR]; r++) rphicell.push_back(ephi);
392 std::map<G4int, G4double*>::iterator itr = map->begin();
393 for(; itr != map->end(); itr++) {
400 if(projAxis ==
IR && q[
IR] == idxColumn) {
403 if(projAxis ==
IZ && q[
IZ] == idxColumn) {
406 if(projAxis ==
IPHI && q[
IPHI] == idxColumn) {
413 G4double rzmax = 0., zphimax = 0., rphimax = 0.;
414 for(
int r = 0; r < fNSegment[
IR]; r++) {
415 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
416 if(rphimin > rphicell[r][phi]) rphimin = rphicell[r][phi];
417 if(rphimax < rphicell[r][phi]) rphimax = rphicell[r][phi];
419 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
420 if(rzmin > rzcell[r][
z]) rzmin = rzcell[r][
z];
421 if(rzmax < rzcell[r][z]) rzmax = rzcell[r][
z];
424 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
425 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
426 if(zphimin > zphicell[
z][phi]) zphimin = zphicell[
z][phi];
427 if(zphimax < zphicell[
z][phi]) zphimax = zphicell[
z][phi];
444 fSize[0]/fNSegment[
IR]*(idxColumn+1)};
445 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
446 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
450 G4Tubs cylinder(
"z-phi", rsize[0], rsize[1], zhalf,
451 angle, dphi*0.99999);
464 pVisManager->
Draw(cylinder, att, trans);
469 }
else if(projAxis ==
IZ) {
473 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
474 for(
int r = 0; r < fNSegment[
IR]; r++) {
476 G4double rs[2] = {rsize*r, rsize*(r+1)};
480 G4Tubs cylinder(
"r-phi", rs[0], rs[1], dz,
481 angle, dphi*0.99999);
494 pVisManager->
Draw(cylinder, att, trans);
499 }
else if(projAxis ==
IPHI) {
506 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
507 for(
int r = 0; r < fNSegment[
IR]; r++) {
509 G4double rs[2] = {rsize*r, rsize*(r+1)};
510 G4Tubs cylinder(
"z-phi", rs[0], rs[1], zhalf,
525 pVisManager->
Draw(cylinder, att, trans);
544 G4int jk = fNSegment[j]*fNSegment[k];
546 q[j] = (index - q[i]*jk)/fNSegment[k];
547 q[k] = index - q[j]*fNSegment[k] - q[i]*jk;
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)
void SetPSName(G4String &psName)
G4ThreeVector fCenterPosition
virtual void Draw(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int axflg=111)
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 SetForceSolid(G4bool)
void SetMinMax(G4double minVal, G4double maxVal)
virtual void List() const
G4GLOB_DLL std::ostream G4cout
static G4int GetReplicaLevel()
virtual void List() const
G4RotationMatrix * fRotationMatrix
void SetForceAuxEdgeVisible(G4bool)
G4LogicalVolume * fMeshElementLogical
G4ScoringCylinder(G4String wName)
G4LogicalVolume * GetLogicalVolume() const
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)
G4bool IfFloatMinMax() const
static const double radian
G4String fDivisionAxisNames[3]
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
G4GLOB_DLL std::ostream G4cerr
virtual void DrawColumn(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)
virtual void DrawColorChart(G4int nPoint=5)
void GetRZPhi(G4int index, G4int q[3]) const