48 fmany(pMany), fcopyNo(pCopyNo)
53 if (pLogical == motherLogical)
55 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
75 Transform3D.getTranslation(), pName, pLogical, pMother),
76 fmany(pMany), fcopyNo(pCopyNo)
82 if (pLogical == motherLogical)
83 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
105 fmany(pMany), fcopyNo(pCopyNo)
107 if (pCurrentLogical == pMotherLogical)
109 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
113 if (pMotherLogical) { pMotherLogical->
AddDaughter(
this); }
129 pName, pCurrentLogical, nullptr),
130 fmany(pMany), fcopyNo(pCopyNo)
132 if (pCurrentLogical == pMotherLogical)
134 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
140 if (pMotherLogical) { pMotherLogical->
AddDaughter(
this); }
246 if (res <= 0) {
return false; }
250 if (motherLog ==
nullptr) {
return false; }
268 message <<
"Sample point is not on the surface !" <<
G4endl
269 <<
" The issue is detected for volume "
272 <<
" generated point " << ptmp
273 <<
" is " << position[solid->
Inside(ptmp)];
283 std::vector<G4ThreeVector> points(res);
287 for (
G4int i = 0; i < res; ++i)
301 for (
G4int i = 0; i < res; ++i)
311 message <<
"Overlap with mother volume !" <<
G4endl
312 <<
" Overlap is detected for volume "
315 <<
" with its mother volume " << motherLog->
GetName()
317 <<
" at mother local point " << mp <<
", "
318 <<
"overlapping by at least: "
320 if (trials >= maxErr)
323 <<
"NOTE: Reached maximum fixed number -" << maxErr
324 <<
"- of overlaps reports for this volume !";
328 if (trials >= maxErr) {
return true; }
338 if (daughter ==
this)
continue;
344 if (!Td.IsRotated()) {
350 if (pmin.
x() >=
xmax)
continue;
351 if (pmin.
y() >=
ymax)
continue;
352 if (pmin.
z() >= zmax)
continue;
353 if (pmax.
x() <=
xmin)
continue;
354 if (pmax.
y() <=
ymin)
continue;
355 if (pmax.
z() <= zmin)
continue;
356 for (
G4int i = 0; i < res; ++i)
359 if (p.
x() <= pmin.
x())
continue;
360 if (p.
x() >= pmax.
x())
continue;
361 if (p.
y() <= pmin.
y())
continue;
362 if (p.
y() >= pmax.
y())
continue;
363 if (p.
z() <= pmin.
z())
continue;
364 if (p.
z() >= pmax.
z())
continue;
369 if (dtmp <= tol)
continue;
390 for (
G4int i = 0; i < 8; ++i)
400 if (dxmin >= xmax)
continue;
401 if (dymin >= ymax)
continue;
402 if (dzmin >= zmax)
continue;
403 if (dxmax <= xmin)
continue;
404 if (dymax <= ymin)
continue;
405 if (dzmax <= zmin)
continue;
406 for (
G4int i = 0; i < res; ++i)
409 if (p.
x() >= dxmax)
continue;
410 if (p.
x() <= dxmin)
continue;
411 if (p.
y() >= dymax)
continue;
412 if (p.
y() <= dymin)
continue;
413 if (p.
z() >= dzmax)
continue;
414 if (p.
z() <= dzmin)
continue;
419 if (dtmp <= tol)
continue;
432 message <<
"Overlap with volume already placed !" <<
G4endl
433 <<
" Overlap is detected for volume "
436 <<
" with " << daughter->
GetName()
440 <<
" local point " << plocal <<
", "
441 <<
"overlapping by at least: "
443 if (trials >= maxErr)
446 <<
"NOTE: Reached maximum fixed number -" << maxErr
447 <<
"- of overlaps reports for this volume !";
451 if (trials >= maxErr) {
return true; }
473 message <<
"Overlap with volume already placed !" <<
G4endl
474 <<
" Overlap is detected for volume "
477 <<
" apparently fully encapsulating volume "
480 <<
" at the same level !";
481 if (trials >= maxErr)
484 <<
"NOTE: Reached maximum fixed number -" << maxErr
485 <<
"- of overlaps reports for this volume !";
489 if (trials >= maxErr) {
return true; }
494 if (verbose && trials == 0) {
G4cout <<
"OK! " <<
G4endl; }
514 pRotMatrix =
nullptr;