50 const G4int nReplicas,
53 :
G4PVReplica(pName, pLogical, pMother, pAxis, nReplicas, 0, 0),
59 std::ostringstream message, hint;
60 message <<
"A parameterised volume is being placed" <<
G4endl
61 <<
"inside another parameterised volume !";
62 hint <<
"To make sure that no overlaps are generated," <<
G4endl
63 <<
"you should verify the mother replicated shapes" <<
G4endl
64 <<
"are of the same type and dimensions." <<
G4endl
65 <<
" Mother physical volume: " << pMother->
GetName() <<
G4endl
66 <<
" Parameterised volume: " << pName <<
G4endl
67 <<
" (To switch this warning off, compile with G4_NO_VERBOSE)";
68 G4Exception(
"G4PVParameterised::G4PVParameterised()",
"GeomVol1002",
82 const G4int nReplicas,
85 :
G4PVReplica(pName, pLogical, pMotherLogical, pAxis, nReplicas, 0, 0),
156 if (res<=0) {
return false; }
161 std::vector<G4ThreeVector> points;
165 G4cout <<
"Checking overlaps for parameterised volume "
184 for (
G4int n=0; n<res; n++)
195 std::ostringstream message;
196 message <<
"Overlap with mother volume !" <<
G4endl
197 <<
" Overlap is detected for volume "
199 <<
" with its mother volume "
201 <<
" at mother local point " << mp <<
", "
202 <<
"overlapping by at least: "
209 points.push_back(mp);
214 std::vector<G4ThreeVector>::iterator pos;
225 for (pos=points.begin(); pos!=points.end(); pos++)
231 if (solidB->Inside(md)==
kInside)
233 G4double distout = solidB->DistanceToOut(md);
236 std::ostringstream message;
237 message <<
"Overlap within parameterised volumes !" <<
G4endl
238 <<
" Overlap is detected for volume "
240 <<
" with parameterised volume instance: " << j
242 <<
" at local point " << md <<
", "
243 <<
"overlapping by at least: "
245 <<
", related to volume instance: " << j <<
".";
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4DLLIMPORT std::ostream G4cout
G4VSolid * GetSolid() const
G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true)
G4bool IsParameterised() const
void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
G4VPVParameterisation * GetParameterisation() const
virtual ~G4PVParameterised()
virtual void SetRegularStructureId(G4int Code)
G4PVParameterised(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, G4VPVParameterisation *pParam, G4bool pSurfChk=false)
virtual G4int GetMultiplicity() const
virtual void SetRegularStructureId(G4int Code)
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
G4LogicalVolume * GetMotherLogical() const
const G4RotationMatrix * GetRotation() const
const G4String & GetName() const
const G4ThreeVector & GetTranslation() const
virtual G4bool IsParameterised() const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4ThreeVector GetPointOnSurface() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)