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): ("
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++) {
284 for(
int z = 0;
z < fNSegment[IZ];
z++) {
291 angle, dphi*0.99999);
305 pVisManager->
Draw(cylinder, att, trans);
315 for(
int phi = 0; phi < fNSegment[IPHI]; phi++) {
316 for(
int r = 0;
r < fNSegment[IR];
r++) {
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.;
430 for(
int r = 0;
r < fNSegment[IR];
r++) {
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];
435 for(
int z = 0;
z < fNSegment[IZ];
z++) {
436 if(rzmin > rzcell[
r][
z]) rzmin = rzcell[
r][
z];
437 if(rzmax < rzcell[
r][z]) rzmax = rzcell[
r][
z];
440 for(
int z = 0;
z < fNSegment[IZ];
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];
460 fSize[0]/fNSegment[IR]*(idxColumn+1)};
461 for(
int phi = 0; phi < fNSegment[IPHI]; phi++) {
462 for(
int z = 0;
z < fNSegment[IZ];
z++) {
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++) {
490 for(
int r = 0;
r < fNSegment[IR];
r++) {
496 G4Tubs cylinder(
"r-phi", rs[0], rs[1], dz,
497 angle, dphi*0.99999);
499 -
fSize[1]+
fSize[1]/fNSegment[IZ]*(idxColumn*2+1));
510 pVisManager->
Draw(cylinder, att, trans);
515 }
else if(projAxis == IPHI) {
522 for(
int z = 0;
z < fNSegment[IZ];
z++) {
523 for(
int r = 0;
r < fNSegment[IR];
r++) {
526 G4Tubs cylinder(
"z-phi", rs[0], rs[1], zhalf,
541 pVisManager->
Draw(cylinder, att, trans);
560 G4int jk = fNSegment[j]*fNSegment[k];
562 q[j] = (index - q[i]*jk)/fNSegment[k];
563 q[k] = index - q[j]*fNSegment[k] - q[i]*jk;