44G4ReplicatedSlice::G4ReplicatedSlice(
const G4String& pName,
52 :
G4PVReplica(pName, nDivs, pAxis, pLogical, pMotherLogical)
54 CheckAndSetParameters(pAxis, nDivs, width, half_gap,
offset,
59G4ReplicatedSlice::G4ReplicatedSlice(
const G4String& pName,
66 :
G4PVReplica(pName, nDivs, pAxis, pLogical, pMotherLogical)
68 CheckAndSetParameters(pAxis, nDivs, 0., half_gap,
offset,
69 DivNDIV, pMotherLogical, pLogical);
73G4ReplicatedSlice::G4ReplicatedSlice(
const G4String& pName,
80 :
G4PVReplica(pName, 0, pAxis, pLogical, pMotherLogical)
82 CheckAndSetParameters(pAxis, 0, width, half_gap,
offset,
87G4ReplicatedSlice::G4ReplicatedSlice(
const G4String& pName,
96 pMotherPhysical != nullptr ? 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",
107 CheckAndSetParameters(pAxis, nDivs, width, half_gap,
offset,
112G4ReplicatedSlice::G4ReplicatedSlice(
const G4String& pName,
120 pMotherPhysical != nullptr ? 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",
131 CheckAndSetParameters(pAxis, nDivs, 0., half_gap,
offset,
136G4ReplicatedSlice::G4ReplicatedSlice(
const G4String& pName,
144 pMotherPhysical != nullptr ? 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",
155 CheckAndSetParameters(pAxis, 0, width, half_gap,
offset,
161G4ReplicatedSlice::CheckAndSetParameters(
const EAxis pAxis,
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()",
206 SetMotherLogical(pMotherLogical);
207 SetParameterisation(pMotherLogical, pAxis, nDivs,
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",
279G4ReplicatedSlice::~G4ReplicatedSlice()
281 delete GetRotation();
285EAxis G4ReplicatedSlice::GetDivisionAxis()
const
291G4bool G4ReplicatedSlice::IsParameterised()
const
297G4bool G4ReplicatedSlice::IsMany()
const
303G4bool G4ReplicatedSlice::IsReplicated()
const
309G4int G4ReplicatedSlice::GetMultiplicity()
const
321EVolume G4ReplicatedSlice::VolumeType()
const
327void G4ReplicatedSlice::GetReplicationData(
EAxis&
axis,
342void G4ReplicatedSlice::SetParameterisation(
G4LogicalVolume* motherLogical,
357 if (mSolidType ==
"G4ReflectedSolid")
365 if( mSolidType ==
"G4Box" )
371 offset, mSolid, divType );
375 offset, mSolid, divType );
379 offset, mSolid, divType );
382 ErrorInAxis(
axis, mSolid );
386 else if( mSolidType ==
"G4Tubs" )
392 offset, mSolid, divType );
396 offset, mSolid, divType );
400 offset, mSolid, divType );
403 ErrorInAxis(
axis, mSolid );
407 else if( mSolidType ==
"G4Cons" )
413 offset, mSolid, divType );
417 offset, mSolid, divType );
421 offset, mSolid, divType );
424 ErrorInAxis(
axis, mSolid );
428 else if( mSolidType ==
"G4Trd" )
434 offset, mSolid, divType );
438 offset, mSolid, divType );
442 offset, mSolid, divType );
445 ErrorInAxis(
axis, mSolid );
449 else if( mSolidType ==
"G4Para" )
455 offset, mSolid, divType );
459 offset, mSolid, divType );
463 offset, mSolid, divType );
466 ErrorInAxis(
axis, mSolid );
517 std::ostringstream message;
518 message <<
"Solid type not supported: " << mSolidType <<
"." <<
G4endl
519 <<
"Divisions for " << mSolidType <<
" not implemented.";
520 G4Exception(
"G4ReplicatedSlice::SetParameterisation()",
"GeomDiv0001",
524 fparam->SetHalfGap(half_gap);
547 error +=
"Radial3D.";
555 G4Exception(
"G4ReplicatedSlice::ErrorInAxis()",
"GeomDiv0002",
566G4bool G4ReplicatedSlice::IsRegularStructure()
const
574G4int G4ReplicatedSlice::GetRegularStructureId()
const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ThreadLocal T * G4GeomSplitter< T >::offset
G4VDivisionParameterisation * fparam
G4PVReplica(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset=0.)
G4PVReplica represents many touchable detector elements differing only in their positioning....
CLHEP::HepRotation G4RotationMatrix
G4LogicalVolume represents a leaf node or unpositioned subtree in the geometry hierarchy....
G4VSolid * GetSolid() const
void AddDaughter(G4VPhysicalVolume *p)
G4ParameterisationBoxX represents the parameterised positioning equivalent to dividing a G4Box along ...
G4ParameterisationBoxY represents the parameterised positioning equivalent to dividing a G4Box along ...
G4ParameterisationBoxZ represents the parameterised positioning equivalent to dividing a G4Box along ...
G4ParameterisationConsPhi represents the parameterised positioning equivalent to dividing a G4Cons al...
G4ParameterisationConsRho represents the parameterised positioning equivalent to dividing a G4Cons al...
G4ParameterisationConsZ represents the parameterised positioning equivalent to dividing a G4Cons alon...
G4ParameterisationParaX represents the parameterised positioning equivalent to dividing a G4Para alon...
G4ParameterisationParaY represents the parameterised positioning equivalent to dividing a G4Para alon...
G4ParameterisationParaZ represents the parameterised positioning equivalent to dividing a G4Para alon...
G4ParameterisationTrdX represents the parameterised positioning equivalent to dividing a G4Trd along ...
G4ParameterisationTrdY represents the parameterised positioning equivalent to dividing a G4Trd along ...
G4ParameterisationTrdZ represents the parameterised positioning equivalent to dividing a G4Trd along ...
G4ReflectedSolid is a solid that has been shifted from its original frame of reference to a new refle...
G4VPVParameterisation ia an abstract base class for Parameterisation, able to compute the transformat...
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
G4LogicalVolume * GetLogicalVolume() const
G4VSolid is an abstract base class for solids, physical shapes that can be tracked through....
virtual G4GeometryType GetEntityType() const =0
const axis_t axis_to_type< N >::axis