52 :
G4PVReplica(pName, nDivs, pAxis, pLogical, pMotherLogical)
66 :
G4PVReplica(pName, nDivs, pAxis, pLogical, pMotherLogical)
69 DivNDIV, pMotherLogical, pLogical);
80 :
G4PVReplica(pName, 0, pAxis, pLogical, pMotherLogical)
96 pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
98 if (pMotherPhysical ==
nullptr)
100 std::ostringstream message;
101 message <<
"Invalid setup." <<
G4endl
102 <<
"NULL pointer specified as mother for volume: " << pName;
103 G4Exception(
"G4ReplicatedSlice::G4ReplicatedSlice()",
"GeomDiv0002",
120 pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
122 if (pMotherPhysical ==
nullptr)
124 std::ostringstream message;
125 message <<
"Invalid setup." <<
G4endl
126 <<
"NULL pointer specified as mother for volume: " << pName;
127 G4Exception(
"G4ReplicatedSlice::G4ReplicatedSlice()",
"GeomDiv0002",
144 pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
146 if (pMotherPhysical ==
nullptr)
148 std::ostringstream message;
149 message <<
"Invalid setup." <<
G4endl
150 <<
"NULL pointer specified as mother for volume: " << pName;
151 G4Exception(
"G4ReplicatedSlice::G4ReplicatedSlice()",
"GeomDiv0002",
170 if(pMotherLogical ==
nullptr)
172 std::ostringstream message;
173 message <<
"Invalid setup." <<
G4endl
174 <<
"NULL pointer specified as mother! Volume: " <<
GetName();
175 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
178 if(pLogical == pMotherLogical)
180 std::ostringstream message;
181 message <<
"Invalid setup." <<
G4endl
182 <<
"Cannot place a volume inside itself! Volume: " <<
GetName();
183 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
193 if( msolType != dsolType && ( msolType !=
"G4Trd" || dsolType !=
"G4Trap" ) )
195 std::ostringstream message;
196 message <<
"Invalid setup." <<
G4endl
197 <<
"Incorrect solid type for division of volume: "
199 <<
" It is: " << msolType
200 <<
", while it should be: " << dsolType;
201 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
208 width, half_gap, offset, divType);
220 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
233 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
236 if(
fwidth < 2.*half_gap )
238 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
265 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
357 if (mSolidType ==
"G4ReflectedSolid")
365 if( mSolidType ==
"G4Box" )
371 offset, mSolid, divType );
375 offset, mSolid, divType );
379 offset, mSolid, divType );
386 else if( mSolidType ==
"G4Tubs" )
392 offset, mSolid, divType );
396 offset, mSolid, divType );
400 offset, mSolid, divType );
407 else if( mSolidType ==
"G4Cons" )
413 offset, mSolid, divType );
417 offset, mSolid, divType );
421 offset, mSolid, divType );
428 else if( mSolidType ==
"G4Trd" )
434 offset, mSolid, divType );
438 offset, mSolid, divType );
442 offset, mSolid, divType );
449 else if( mSolidType ==
"G4Para" )
455 offset, mSolid, divType );
459 offset, mSolid, divType );
463 offset, mSolid, divType );
517 std::ostringstream message;
518 message <<
"Solid type not supported: " << mSolidType <<
"." <<
G4endl
519 <<
"Divisions for " << mSolidType <<
" not implemented.";
520 G4Exception(
"G4ReplicatedSlice::SetParameterisation()",
"GeomDiv0001",
547 error +=
"Radial3D.";
555 G4Exception(
"G4ReplicatedSlice::ErrorInAxis()",
"GeomDiv0002",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::HepRotation G4RotationMatrix
G4VSolid * GetSolid() const
void AddDaughter(G4VPhysicalVolume *p)
EAxis GetDivisionAxis() const
virtual G4int GetMultiplicity() const
virtual G4bool IsReplicated() const
void ErrorInAxis(EAxis axis, G4VSolid *solid)
virtual G4bool IsMany() const
void CheckAndSetParameters(const EAxis pAxis, const G4int nDivs, const G4double width, const G4double half_gap, const G4double offset, DivisionType divType, G4LogicalVolume *pMotherLogical, const G4LogicalVolume *pLogical)
void SetParameterisation(G4LogicalVolume *motherLogical, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double half_gap, const G4double offset, DivisionType divType)
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
G4bool IsParameterised() const
virtual G4VPVParameterisation * GetParameterisation() const
G4int GetRegularStructureId() const
G4ReplicatedSlice(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double half_gap, const G4double offset)
EVolume VolumeType() const final
virtual ~G4ReplicatedSlice()
G4bool IsRegularStructure() const
G4VDivisionParameterisation * fparam
void SetHalfGap(G4double hg)
G4double GetWidth() const
const G4RotationMatrix * GetRotation() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
void SetRotation(G4RotationMatrix *)
void SetMotherLogical(G4LogicalVolume *pMother)
virtual G4GeometryType GetEntityType() const =0
static PROLOG_HANDLER error