38#define G4MT_copyNo ((subInstanceManager.offset[instanceID]).fcopyNo)
47 const G4int nReplicas,
57 std::ostringstream message;
58 message <<
"NULL pointer specified as mother volume." <<
G4endl
59 <<
"The world volume cannot be sliced or parameterised !";
60 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
65 if (pLogical == motherLogical)
67 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
75 std::ostringstream message;
76 message <<
"Replica or parameterised volume must be the only daughter !"
78 <<
" Mother physical volume: " << pMother->
GetName() <<
G4endl
79 <<
" Replicated volume: " << pName;
80 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
84 CheckAndSetParameters (pAxis, nReplicas, width, offset);
92 const G4int nReplicas,
100 if (pMotherLogical ==
nullptr)
102 std::ostringstream message;
103 message <<
"NULL pointer specified as mother volume for "
105 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
109 if (pLogical == pMotherLogical)
111 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
120 std::ostringstream message;
121 message <<
"Replica or parameterised volume must be the only daughter !"
123 <<
" Mother logical volume: " << pMotherLogical->
GetName()
125 <<
" Replicated volume: " << pName;
126 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
130 CheckAndSetParameters (pAxis, nReplicas, width, offset);
148 if (pMotherLogical ==
nullptr)
150 std::ostringstream message;
151 message <<
"NULL pointer specified as mother volume for "
153 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
157 if (pLogical == pMotherLogical)
159 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
163 CheckOnlyDaughter(pMotherLogical);
178 CheckAndSetParameters (pAxis, nReplicas, 0.0, 0.0);
186 std::ostringstream message;
187 message <<
"Replica or parameterised volume must be the only daughter !"
189 <<
" Mother logical volume: " << pMotherLogical->
GetName()
192 <<
" Existing 'sister': " << pMotherLogical->
GetDaughter(0)
194 G4Exception(
"G4PVReplica::G4PVReplica()",
"GeomVol0002",
201void G4PVReplica::CheckAndSetParameters(
const EAxis pAxis,
202 const G4int nReplicas,
208 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0002",
214 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0002",
228 if (pRMat ==
nullptr)
230 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0003",
242 G4Exception(
"G4PVReplica::CheckAndSetParameters()",
"GeomVol0002",
325 return (fRegularVolsId != 0);
331 return fRegularVolsId;
337 fRegularVolsId =
code;
345 return subInstanceManager;
375 if (pRMat ==
nullptr)
377 G4Exception(
"G4PVReplica::InitialiseWorker(...)",
"GeomVol0003",
389 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)
std::size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const std::size_t 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)