78 SetupGeometry(fWorldPhys);
105 tubsLogical, tubsName+
"0", worldLogical,
false, 0);
110 G4String layerName[2] = {tubsName +
"1", tubsName +
"2"};
116 layerSolid[0] =
new G4Tubs(layerName[0],
136 G4cerr <<
"G4ScoringCylinder::SetupGeometry() : invalid parameter ("
138 <<
"in placement of the first nested layer." <<
G4endl;
143 layerSolid[1] =
new G4Tubs(layerName[1],
164 G4cerr <<
"ERROR : G4ScoringCylinder::SetupGeometry() : invalid parameter ("
166 <<
"in placement of the second nested layer." <<
G4endl;
170 G4String elementName = tubsName +
"3";
177 fMeshElementLogical =
new G4LogicalVolume(elementSolid, 0, elementName);
184 new G4PVReplica(elementName, fMeshElementLogical, layerLogical[1],
kRho,
194 G4cerr <<
"G4ScoringCylinder::SetupGeometry() : "
195 <<
"invalid parameter (" <<
fNSegment[IR] <<
") "
196 <<
"in mesh element placement." <<
G4endl;
216 G4cout <<
" Size (R, Dz): ("
217 <<
fSize[0]/cm <<
", "
218 <<
fSize[1]/cm <<
") [cm]"
231 std::vector<double> ephi;
232 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) ephi.push_back(0.);
234 std::vector<std::vector<double> > zphicell;
235 for(
int z = 0; z <
fNSegment[IZ]; z++) zphicell.push_back(ephi);
237 std::vector<std::vector<double> > rphicell;
238 for(
int r = 0; r <
fNSegment[IR]; r++) rphicell.push_back(ephi);
242 std::map<G4int, G4double*>::iterator itr = map->begin();
243 for(; itr != map->end(); itr++) {
256 G4double zphimax = 0., rphimax = 0.;
257 for(
int iphi = 0; iphi <
fNSegment[IPHI]; iphi++) {
258 for(
int iz = 0; iz <
fNSegment[IZ]; iz++) {
259 if(zphimin > zphicell[iz][iphi]) zphimin = zphicell[iz][iphi];
260 if(zphimax < zphicell[iz][iphi]) zphimax = zphicell[iz][iphi];
262 for(
int ir = 0; ir <
fNSegment[IR]; ir++) {
263 if(rphimin > rphicell[ir][iphi]) rphimin = rphicell[ir][iphi];
264 if(rphimax < rphicell[ir][iphi]) rphimax = rphicell[ir][iphi];
283 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) {
291 angle, dphi*0.99999);
305 pVisManager->
Draw(cylinder, att, trans);
315 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) {
318 G4double rs[2] = {rsize*r, rsize*(r+1)};
321 G4Tubs cylinder(
"z-phi", rs[0], rs[1], 0.001,
322 angle, dphi*0.99999);
349 pVisManager->
Draw(cylinder, att, transn);
350 pVisManager->
Draw(cylinder, att, transp);
378 if(idxColumn<0 || idxColumn>=
fNSegment[projAxis])
380 G4cerr <<
"Warning : Column number " << idxColumn <<
" is out of scoring mesh [0," <<
fNSegment[projAxis]-1 <<
381 "]. Method ignored." <<
G4endl;
388 std::vector<std::vector<std::vector<double> > > cell;
389 std::vector<double> ephi;
390 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) ephi.push_back(0.);
391 std::vector<std::vector<double> > ezphi;
392 for(
int z = 0; z <
fNSegment[IZ]; z++) ezphi.push_back(ephi);
393 for(
int r = 0; r <
fNSegment[IR]; r++) cell.push_back(ezphi);
395 std::vector<std::vector<double> > rzcell;
396 std::vector<double> ez;
397 for(
int z = 0; z <
fNSegment[IZ]; z++) ez.push_back(0.);
398 for(
int r = 0; r <
fNSegment[IR]; r++) rzcell.push_back(ez);
400 std::vector<std::vector<double> > zphicell;
401 for(
int z = 0; z <
fNSegment[IZ]; z++) zphicell.push_back(ephi);
403 std::vector<std::vector<double> > rphicell;
404 for(
int r = 0; r <
fNSegment[IR]; r++) rphicell.push_back(ephi);
408 std::map<G4int, G4double*>::iterator itr = map->begin();
409 for(; itr != map->end(); itr++) {
416 if(projAxis == IR && q[IR] == idxColumn) {
419 if(projAxis == IZ && q[IZ] == idxColumn) {
422 if(projAxis == IPHI && q[IPHI] == idxColumn) {
429 G4double rzmax = 0., zphimax = 0., rphimax = 0.;
431 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) {
432 if(rphimin > rphicell[r][phi]) rphimin = rphicell[r][phi];
433 if(rphimax < rphicell[r][phi]) rphimax = rphicell[r][phi];
436 if(rzmin > rzcell[r][z]) rzmin = rzcell[r][z];
437 if(rzmax < rzcell[r][z]) rzmax = rzcell[r][z];
441 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) {
442 if(zphimin > zphicell[z][phi]) zphimin = zphicell[z][phi];
443 if(zphimax < zphicell[z][phi]) zphimax = zphicell[z][phi];
461 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) {
466 G4Tubs cylinder(
"z-phi", rsize[0], rsize[1], zhalf,
467 angle, dphi*0.99999);
480 pVisManager->
Draw(cylinder, att, trans);
485 }
else if(projAxis == IZ) {
489 for(
int phi = 0; phi <
fNSegment[IPHI]; phi++) {
492 G4double rs[2] = {rsize*r, rsize*(r+1)};
496 G4Tubs cylinder(
"r-phi", rs[0], rs[1], dz,
497 angle, dphi*0.99999);
510 pVisManager->
Draw(cylinder, att, trans);
515 }
else if(projAxis == IPHI) {
525 G4double rs[2] = {rsize*r, rsize*(r+1)};
526 G4Tubs cylinder(
"z-phi", rs[0], rs[1], zhalf,
541 pVisManager->
Draw(cylinder, att, trans);
563 q[k] = index - q[j]*
fNSegment[k] - q[i]*jk;
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void GetRZPhi(G4int index, G4int q[3]) const
virtual void DrawColumn(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)
virtual void Construct(G4VPhysicalVolume *fWorldPhys)
virtual void Draw(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int axflg=111)
virtual void List() const
G4ScoringCylinder(G4String wName)
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)