58 fShape = MeshShape::cylinder;
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): ("
216 std::vector<double> ephi;
219 std::vector<std::vector<double> > zphicell;
220 for(
int z = 0;
z < fNSegment[
IZ];
z++) zphicell.push_back(ephi);
222 std::vector<std::vector<double> > rphicell;
223 for(
int r = 0;
r < fNSegment[
IR];
r++) rphicell.push_back(ephi);
227 std::map<G4int, G4StatDouble*>::iterator itr = map->
GetMap()->begin();
228 for(; itr != map->
GetMap()->end(); itr++) {
241 G4double zphimax = 0., rphimax = 0.;
242 for(
int iphi = 0; iphi < fNSegment[
IPHI]; iphi++) {
243 for(
int iz = 0; iz < fNSegment[
IZ]; iz++) {
244 if(zphimin > zphicell[iz][iphi]) zphimin = zphicell[iz][iphi];
245 if(zphimax < zphicell[iz][iphi]) zphimax = zphicell[iz][iphi];
247 for(
int ir = 0; ir < fNSegment[
IR]; ir++) {
248 if(rphimin > rphicell[ir][iphi]) rphimin = rphicell[ir][iphi];
249 if(rphimax < rphicell[ir][iphi]) rphimax = rphicell[ir][iphi];
271 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
278 angle, dphi*0.99999);
295 pVisManager->
Draw(*poly);
309 for(
int r = 0;
r < fNSegment[
IR];
r++) {
314 G4Tubs cylindern(
"z-phi", rs[0], rs[1], 0.001,
315 angle, dphi*0.99999);
316 G4Tubs cylinderp = cylindern;
337 pVisManager->
Draw(*polyn);
342 pVisManager->
Draw(*polyp);
372 if(idxColumn<0 || idxColumn>=
fNSegment[projAxis])
374 G4cerr <<
"Warning : Column number " << idxColumn <<
" is out of scoring mesh [0," <<
fNSegment[projAxis]-1 <<
375 "]. Method ignored." <<
G4endl;
382 std::vector<std::vector<std::vector<double> > > cell;
383 std::vector<double> ephi;
385 std::vector<std::vector<double> > ezphi;
386 for(
int z = 0;
z < fNSegment[
IZ];
z++) ezphi.push_back(ephi);
387 for(
int r = 0;
r < fNSegment[
IR];
r++) cell.push_back(ezphi);
389 std::vector<std::vector<double> > rzcell;
390 std::vector<double> ez;
391 for(
int z = 0;
z < fNSegment[
IZ];
z++) ez.push_back(0.);
392 for(
int r = 0;
r < fNSegment[
IR];
r++) rzcell.push_back(ez);
394 std::vector<std::vector<double> > zphicell;
395 for(
int z = 0;
z < fNSegment[
IZ];
z++) zphicell.push_back(ephi);
397 std::vector<std::vector<double> > rphicell;
398 for(
int r = 0;
r < fNSegment[
IR];
r++) rphicell.push_back(ephi);
402 std::map<G4int,G4StatDouble*>::iterator itr = map->
GetMap()->begin();
403 for(; itr != map->
GetMap()->end(); itr++) {
410 if(projAxis ==
IR && q[
IR] == idxColumn) {
413 if(projAxis ==
IZ && q[
IZ] == idxColumn) {
416 if(projAxis ==
IPHI && q[
IPHI] == idxColumn) {
423 G4double rzmax = 0., zphimax = 0., rphimax = 0.;
424 for(
int r = 0;
r < fNSegment[
IR];
r++) {
426 if(rphimin > rphicell[
r][
phi]) rphimin = rphicell[
r][
phi];
427 if(rphimax < rphicell[
r][phi]) rphimax = rphicell[
r][
phi];
429 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
430 if(rzmin > rzcell[
r][
z]) rzmin = rzcell[
r][
z];
431 if(rzmax < rzcell[
r][z]) rzmax = rzcell[
r][
z];
434 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
436 if(zphimin > zphicell[
z][
phi]) zphimin = zphicell[
z][
phi];
437 if(zphimax < zphicell[
z][phi]) zphimax = zphicell[
z][
phi];
456 fSize[0]/fNSegment[
IR]*(idxColumn+1)};
458 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
462 G4Tubs cylinder(
"z-phi", rsize[0], rsize[1], zhalf,
463 angle, dphi*0.99999);
480 pVisManager->
Draw(*poly);
485 }
else if(projAxis ==
IZ) {
490 for(
int r = 0;
r < fNSegment[
IR];
r++) {
496 G4Tubs cylinder(
"r-phi", rs[0], rs[1], dz,
497 angle, dphi*0.99999);
514 pVisManager->
Draw(*poly);
519 }
else if(projAxis ==
IPHI) {
526 for(
int z = 0;
z < fNSegment[
IZ];
z++) {
527 for(
int r = 0;
r < fNSegment[
IR];
r++) {
530 G4Tubs cylinder(
"z-phi", rs[0], rs[1], zhalf,
549 pVisManager->
Draw(*poly);
569 G4int jk = fNSegment[j]*fNSegment[
k];
571 q[j] = (index - q[i]*jk)/fNSegment[k];
572 q[
k] = index - q[j]*fNSegment[
k] - q[i]*jk;