41 const G4int nReplicas,
53 std::ostringstream message;
54 message <<
"NULL pointer specified as mother volume." <<
G4endl
55 <<
"The world volume cannot be sliced or parameterised !";
56 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
61 if (pLogical == motherLogical)
63 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
71 std::ostringstream message;
72 message <<
"Replica or parameterised volume must be the only daughter !"
74 <<
" Mother physical volume: " << pMother->
GetName() <<
G4endl
75 <<
" Replicated volume: " << pName;
76 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
80 CheckAndSetParameters (pAxis, nReplicas, width, offset);
87 const G4int nReplicas,
96 if (pMotherLogical ==
nullptr)
98 std::ostringstream message;
99 message <<
"NULL pointer specified as mother volume for "
101 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
105 if (pLogical == pMotherLogical)
107 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
116 std::ostringstream message;
117 message <<
"Replica or parameterised volume must be the only daughter !"
119 <<
" Mother logical volume: " << pMotherLogical->
GetName()
121 <<
" Replicated volume: " << pName;
122 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
126 CheckAndSetParameters (pAxis, nReplicas, width, offset);
144 if (pMotherLogical ==
nullptr)
146 std::ostringstream message;
147 message <<
"NULL pointer specified as mother volume for "
149 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
153 if (pLogical == pMotherLogical)
155 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
159 CheckOnlyDaughter(pMotherLogical);
174 CheckAndSetParameters (pAxis, nReplicas, 0.0, 0.0);
181 std::ostringstream message;
182 message <<
"Replica or parameterised volume must be the only daughter !"
184 <<
" Mother logical volume: " << pMotherLogical->
GetName()
187 <<
" Existing 'sister': " << pMotherLogical->
GetDaughter(0)
189 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
195void G4PVReplica::CheckAndSetParameters(
const EAxis pAxis,
196 const G4int nReplicas,
202 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0002",
208 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0002",
222 if (pRMat ==
nullptr)
224 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0003",
236 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0002",
312 return (fRegularVolsId != 0);
317 return fRegularVolsId;
322 fRegularVolsId =
code;
329 return subInstanceManager;
359 if (pRMat ==
nullptr)
361 G4Exception(
"G4PVReplica::InitialiseWorker(...)",
"GeomVol0003",
373 G4Exception(
"G4PVReplica::InitialiseWorker(...)",
"GeomVol0002",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::HepRotation G4RotationMatrix
CLHEP::Hep3Vector G4ThreeVector
G4int CreateSubInstance()
void SlaveCopySubInstanceArray()
void AddDaughter(G4VPhysicalVolume *p)
size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
const G4String & GetName() const
G4int GetRegularStructureId() const
virtual void SetRegularStructureId(G4int code)
G4PVReplica(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset=0.)
virtual void SetCopyNo(G4int CopyNo)
G4bool IsReplicated() const
virtual G4int GetMultiplicity() const
static const G4PVRManager & GetSubInstanceManager()
virtual G4VPVParameterisation * GetParameterisation() const
void TerminateWorker(G4PVReplica *pMasterObject)
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
virtual G4bool IsParameterised() const
G4bool IsRegularStructure() const
void InitialiseWorker(G4PVReplica *pMasterObject)
virtual G4int GetCopyNo() const
virtual EVolume VolumeType() const
const G4RotationMatrix * GetRotation() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
void SetRotation(G4RotationMatrix *)
void SetMotherLogical(G4LogicalVolume *pMother)
void InitialiseWorker(G4VPhysicalVolume *pMasterObject, G4RotationMatrix *pRot, const G4ThreeVector &tlate)