52 fmany(pMany), fallocatedRotM(false), fcopyNo(pCopyNo)
57 if (pLogical == motherLogical)
59 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
79 Transform3D.getTranslation(),pName,pLogical,pMother),
80 fmany(pMany), fcopyNo(pCopyNo)
86 if (pLogical == motherLogical)
87 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
109 fmany(pMany), fallocatedRotM(false), fcopyNo(pCopyNo)
111 if (pCurrentLogical == pMotherLogical)
113 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
117 if (pMotherLogical) { pMotherLogical->
AddDaughter(
this); }
133 fmany(pMany), fcopyNo(pCopyNo)
135 if (pCurrentLogical == pMotherLogical)
137 G4Exception(
"G4PVPlacement::G4PVPlacement()",
"GeomVol0002",
143 if (pMotherLogical) { pMotherLogical->
AddDaughter(
this); }
239 if (res<=0) {
return false; }
243 if (!motherLog) {
return false; }
252 G4cout <<
"Checking overlaps for volume " <<
GetName() <<
" ... ";
276 trials++; retval =
true;
278 message <<
"Overlap with mother volume !" <<
G4endl
279 <<
" Overlap is detected for volume "
281 <<
" with its mother volume "
283 <<
" at mother local point " << mp <<
", "
284 <<
"overlapping by at least: "
289 <<
"NOTE: Reached maximum fixed number -" << maxErr
290 <<
"- of overlaps reports for this volume !";
294 if (trials>=maxErr) {
return true; }
304 if (daughter ==
this) {
continue; }
318 trials++; retval =
true;
320 message <<
"Overlap with volume already placed !" <<
G4endl
321 <<
" Overlap is detected for volume "
323 <<
" with " << daughter->
GetName()
324 <<
':' << daughter->
GetCopyNo() <<
" volume's"
326 <<
" local point " << md <<
", "
327 <<
"overlapping by at least: "
332 <<
"NOTE: Reached maximum fixed number -" << maxErr
333 <<
"- of overlaps reports for this volume !";
337 if (trials>=maxErr) {
return true; }
359 trials++; retval =
true;
361 message <<
"Overlap with volume already placed !" <<
G4endl
362 <<
" Overlap is detected for volume "
364 <<
" apparently fully encapsulating volume "
366 <<
" at the same level !";
369 if (trials>=maxErr) {
return true; }
void SetMotherLogical(G4LogicalVolume *pMother)
G4bool IsParameterised() const
std::vector< ExP01TrackerHit * > a
G4LogicalVolume * GetLogicalVolume() const
CLHEP::HepRotation G4RotationMatrix
void message(RunManager *runmanager)
G4int GetNoDaughters() const
virtual G4ThreeVector GetPointOnSurface() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
const G4ThreeVector & GetTranslation() const
virtual EInside Inside(const G4ThreeVector &p) const =0
G4LogicalVolume * GetMotherLogical() const
G4VPVParameterisation * GetParameterisation() const
G4bool IsReplicated() const
static G4RotationMatrix * NewPtrRotMatrix(const G4RotationMatrix &RotMat)
void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
virtual G4int GetCopyNo() const =0
void AddDaughter(G4VPhysicalVolume *p)
G4PVPlacement(G4RotationMatrix *pRot, const G4ThreeVector &tlate, G4LogicalVolume *pCurrentLogical, const G4String &pName, G4LogicalVolume *pMotherLogical, G4bool pMany, G4int pCopyNo, G4bool pSurfChk=false)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4VSolid * GetSolid() const
G4bool IsRegularStructure() const
void SetRotation(G4RotationMatrix *)
const G4RotationMatrix * GetRotation() const
void SetCopyNo(G4int CopyNo)
G4int GetRegularStructureId() const
HepRotation inverse() const
const G4String & GetName() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int maxErr=1)
const G4String & GetName() const