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),
157 if (res<=0) {
return false; }
164 std::vector<G4ThreeVector> points;
168 G4cout <<
"Checking overlaps for parameterised volume "
198 trials++; retval =
true;
199 std::ostringstream message;
200 message <<
"Overlap with mother volume !" <<
G4endl
201 <<
" Overlap is detected for volume "
203 <<
" with its mother volume "
205 <<
" at mother local point " << mp <<
", "
206 <<
"overlapping by at least: "
211 <<
"NOTE: Reached maximum fixed number -" << maxErr
212 <<
"- of overlaps reports for this volume !";
216 if (trials>=maxErr) {
return true; }
219 points.push_back(mp);
224 std::vector<G4ThreeVector>::iterator
pos;
235 for (pos=points.begin(); pos!=points.end(); pos++)
241 if (solidB->Inside(md)==
kInside)
243 G4double distout = solidB->DistanceToOut(md);
246 trials++; retval =
true;
247 std::ostringstream message;
248 message <<
"Overlap within parameterised volumes !" <<
G4endl
249 <<
" Overlap is detected for volume "
251 <<
" with parameterised volume instance: " << j
253 <<
" at local point " << md <<
", "
254 <<
"overlapping by at least: "
256 <<
", related to volume instance: " << j <<
".";
260 <<
"NOTE: Reached maximum fixed number -" << maxErr
261 <<
"- of overlaps reports for this volume !";
265 if (trials>=maxErr) {
return true; }
virtual void SetRegularStructureId(G4int Code)
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
std::vector< ExP01TrackerHit * > a
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
G4VSolid * GetSolid() const
G4bool IsParameterised() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
const G4RotationMatrix * GetRotation() const
G4VPVParameterisation * GetParameterisation() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual ~G4PVParameterised()
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
G4LogicalVolume * GetMotherLogical() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4bool IsParameterised() const =0
const G4ThreeVector & GetTranslation() const
virtual void SetRegularStructureId(G4int Code)
G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int maxErr=1)
void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
virtual G4ThreeVector GetPointOnSurface() const
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
virtual G4int GetMultiplicity() const
const G4String & GetName() const
G4PVParameterised(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, G4VPVParameterisation *pParam, G4bool pSurfChk=false)
static const G4double pos