54 CheckAndSetParameters(pAxis, nDivs, width, half_gap, offset,
68 CheckAndSetParameters(pAxis, nDivs, 0., half_gap, offset,
69 DivNDIV, pMotherLogical, pLogical);
82 CheckAndSetParameters(pAxis, 0, width, half_gap, offset,
97 CheckAndSetParameters(pAxis, nDivs, width, half_gap, offset,
111 CheckAndSetParameters(pAxis, nDivs, 0., half_gap, offset,
125 CheckAndSetParameters(pAxis, 0, width, half_gap, offset,
131G4ReplicatedSlice::CheckAndSetParameters(
const EAxis pAxis,
142 std::ostringstream message;
143 message <<
"Invalid setup." <<
G4endl
144 <<
"NULL pointer specified as mother! Volume: " <<
GetName();
145 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
148 if(pLogical == pMotherLogical)
150 std::ostringstream message;
151 message <<
"Invalid setup." <<
G4endl
152 <<
"Cannot place a volume inside itself! Volume: " <<
GetName();
153 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
163 if( msolType != dsolType && ( msolType !=
"G4Trd" || dsolType !=
"G4Trap" ) )
165 std::ostringstream message;
166 message <<
"Invalid setup." <<
G4endl
167 <<
"Incorrect solid type for division of volume: "
169 <<
" It is: " << msolType
170 <<
", while it should be: " << dsolType;
171 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
177 SetParameterisation(pMotherLogical, pAxis, nDivs,
178 width, half_gap, offset, divType);
190 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
203 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
206 if(
fwidth < 2.*half_gap )
208 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
235 G4Exception(
"G4ReplicatedSlice::CheckAndSetParameters()",
"GeomDiv0002",
312void G4ReplicatedSlice::SetParameterisation(
G4LogicalVolume* motherLogical,
326 if (mSolidType ==
"G4ReflectedSolid")
334 if( mSolidType ==
"G4Box" )
340 offset, mSolid, divType );
344 offset, mSolid, divType );
348 offset, mSolid, divType );
351 ErrorInAxis( axis, mSolid );
355 else if( mSolidType ==
"G4Tubs" )
361 offset, mSolid, divType );
365 offset, mSolid, divType );
369 offset, mSolid, divType );
372 ErrorInAxis( axis, mSolid );
376 else if( mSolidType ==
"G4Cons" )
382 offset, mSolid, divType );
386 offset, mSolid, divType );
390 offset, mSolid, divType );
393 ErrorInAxis( axis, mSolid );
397 else if( mSolidType ==
"G4Trd" )
403 offset, mSolid, divType );
407 offset, mSolid, divType );
411 offset, mSolid, divType );
414 ErrorInAxis( axis, mSolid );
418 else if( mSolidType ==
"G4Para" )
424 offset, mSolid, divType );
428 offset, mSolid, divType );
432 offset, mSolid, divType );
435 ErrorInAxis( axis, mSolid );
486 std::ostringstream message;
487 message <<
"Solid type not supported: " << mSolidType <<
"." <<
G4endl
488 <<
"Divisions for " << mSolidType <<
" not implemented.";
489 G4Exception(
"G4ReplicatedSlice::SetParameterisation()",
"GeomDiv0001",
497void G4ReplicatedSlice::ErrorInAxis(
EAxis axis,
G4VSolid* solid )
516 error +=
"Radial3D.";
524 G4Exception(
"G4ReplicatedSlice::ErrorInAxis()",
"GeomDiv0002",
CLHEP::HepRotation G4RotationMatrix
G4VSolid * GetSolid() const
void AddDaughter(G4VPhysicalVolume *p)
EAxis GetDivisionAxis() const
virtual G4bool IsReplicated() const
virtual G4bool IsMany() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
virtual G4int GetCopyNo() 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)
virtual ~G4ReplicatedSlice()
G4bool IsRegularStructure() const
G4VDivisionParameterisation * fparam
virtual void SetCopyNo(G4int CopyNo)
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
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)