78 SetupGeometry(fWorldPhys);
103 tubsLogical, tubsName+
"0", worldLogical,
false, 0);
108 G4String layerName[2] = {tubsName +
"1", tubsName +
"2"};
114 layerSolid[0] =
new G4Tubs(layerName[0],
134 G4cerr <<
"G4ScoringCylinder::SetupGeometry() : invalid parameter ("
136 <<
"in placement of the first nested layer." <<
G4endl;
141 layerSolid[1] =
new G4Tubs(layerName[1],
162 G4cerr <<
"ERROR : G4ScoringCylinder::SetupGeometry() : invalid parameter ("
164 <<
"in placement of the second nested layer." <<
G4endl;
168 G4String elementName = tubsName +
"3";
192 G4cerr <<
"G4ScoringCylinder::SetupGeometry() : "
194 <<
"in mesh element placement." <<
G4endl;
214 G4cout <<
" Size (R, Dz): ("
229 std::vector<double> ephi;
230 for(
int phi = 0; phi <
fNSegment[
IPHI]; phi++) ephi.push_back(0.);
232 std::vector<std::vector<double> > zphicell;
233 for(
int z = 0;
z < fNSegment[
IZ];
z++) zphicell.push_back(ephi);
235 std::vector<std::vector<double> > rphicell;
236 for(
int r = 0; r < fNSegment[
IR]; r++) rphicell.push_back(ephi);
240 std::map<G4int, G4double*>::iterator itr = map->begin();
241 for(; itr != map->end(); itr++) {
254 G4double zphimax = 0., rphimax = 0.;
255 for(
int iphi = 0; iphi < fNSegment[
IPHI]; iphi++) {
256 for(
int iz = 0;
iz < fNSegment[
IZ];
iz++) {
257 if(zphimin > zphicell[
iz][iphi]) zphimin = zphicell[
iz][iphi];
258 if(zphimax < zphicell[
iz][iphi]) zphimax = zphicell[
iz][iphi];
260 for(
int ir = 0; ir < fNSegment[
IR]; ir++) {
261 if(rphimin > rphicell[ir][iphi]) rphimin = rphicell[ir][iphi];
262 if(rphimax < rphicell[ir][iphi]) rphimax = rphicell[ir][iphi];
281 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
282 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
289 angle, dphi*0.99999);
303 pVisManager->
Draw(cylinder, att, trans);
313 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
314 for(
int r = 0; r < fNSegment[
IR]; r++) {
316 G4double rs[2] = {rsize*r, rsize*(r+1)};
319 G4Tubs cylinder(
"z-phi", rs[0], rs[1], 0.001,
320 angle, dphi*0.99999);
347 pVisManager->
Draw(cylinder, att, transn);
348 pVisManager->
Draw(cylinder, att, transp);
376 if(idxColumn<0 || idxColumn>=
fNSegment[projAxis])
378 G4cerr <<
"Warning : Column number " << idxColumn <<
" is out of scoring mesh [0," <<
fNSegment[projAxis]-1 <<
379 "]. Method ignored." <<
G4endl;
386 std::vector<std::vector<std::vector<double> > > cell;
387 std::vector<double> ephi;
388 for(
int phi = 0; phi <
fNSegment[
IPHI]; phi++) ephi.push_back(0.);
389 std::vector<std::vector<double> > ezphi;
390 for(
int z = 0;
z < fNSegment[
IZ];
z++) ezphi.push_back(ephi);
391 for(
int r = 0; r < fNSegment[
IR]; r++) cell.push_back(ezphi);
393 std::vector<std::vector<double> > rzcell;
394 std::vector<double> ez;
395 for(
int z = 0;
z < fNSegment[
IZ];
z++) ez.push_back(0.);
396 for(
int r = 0; r < fNSegment[
IR]; r++) rzcell.push_back(ez);
398 std::vector<std::vector<double> > zphicell;
399 for(
int z = 0;
z < fNSegment[
IZ];
z++) zphicell.push_back(ephi);
401 std::vector<std::vector<double> > rphicell;
402 for(
int r = 0; r < fNSegment[
IR]; r++) rphicell.push_back(ephi);
406 std::map<G4int, G4double*>::iterator itr = map->begin();
407 for(; itr != map->end(); itr++) {
414 if(projAxis ==
IR && q[
IR] == idxColumn) {
417 if(projAxis ==
IZ && q[
IZ] == idxColumn) {
420 if(projAxis ==
IPHI && q[
IPHI] == idxColumn) {
427 G4double rzmax = 0., zphimax = 0., rphimax = 0.;
428 for(
int r = 0; r < fNSegment[
IR]; r++) {
429 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
430 if(rphimin > rphicell[r][phi]) rphimin = rphicell[r][phi];
431 if(rphimax < rphicell[r][phi]) rphimax = rphicell[r][phi];
433 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
434 if(rzmin > rzcell[r][
z]) rzmin = rzcell[r][
z];
435 if(rzmax < rzcell[r][z]) rzmax = rzcell[r][
z];
438 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
439 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
440 if(zphimin > zphicell[
z][phi]) zphimin = zphicell[
z][phi];
441 if(zphimax < zphicell[
z][phi]) zphimax = zphicell[
z][phi];
458 fSize[0]/fNSegment[
IR]*(idxColumn+1)};
459 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
460 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
464 G4Tubs cylinder(
"z-phi", rsize[0], rsize[1], zhalf,
465 angle, dphi*0.99999);
478 pVisManager->
Draw(cylinder, att, trans);
483 }
else if(projAxis ==
IZ) {
487 for(
int phi = 0; phi < fNSegment[
IPHI]; phi++) {
488 for(
int r = 0; r < fNSegment[
IR]; r++) {
490 G4double rs[2] = {rsize*r, rsize*(r+1)};
494 G4Tubs cylinder(
"r-phi", rs[0], rs[1], dz,
495 angle, dphi*0.99999);
508 pVisManager->
Draw(cylinder, att, trans);
513 }
else if(projAxis ==
IPHI) {
520 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
521 for(
int r = 0; r < fNSegment[
IR]; r++) {
523 G4double rs[2] = {rsize*r, rsize*(r+1)};
524 G4Tubs cylinder(
"z-phi", rs[0], rs[1], zhalf,
539 pVisManager->
Draw(cylinder, att, trans);
558 G4int jk = fNSegment[j]*fNSegment[k];
560 q[j] = (index - q[i]*jk)/fNSegment[k];
561 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()
const G4String & GetName() const
virtual void List() const
G4RotationMatrix * fRotationMatrix
virtual void Construct(G4VPhysicalVolume *fWorldPhys)
void SetForceAuxEdgeVisible(G4bool)
G4LogicalVolume * fMeshElementLogical
G4ScoringCylinder(G4String wName)
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 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