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,
131 G4ReplicatedSlice::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",
312 void G4ReplicatedSlice::SetParameterisation(
G4LogicalVolume* motherLogical,
327 if (mSolidType ==
"G4ReflectedSolid")
335 if( mSolidType ==
"G4Box" )
341 offset, mSolid, divType );
345 offset, mSolid, divType );
349 offset, mSolid, divType );
352 ErrorInAxis( axis, mSolid );
356 else if( mSolidType ==
"G4Tubs" )
362 offset, mSolid, divType );
366 offset, mSolid, divType );
370 offset, mSolid, divType );
373 ErrorInAxis( axis, mSolid );
377 else if( mSolidType ==
"G4Cons" )
383 offset, mSolid, divType );
387 offset, mSolid, divType );
391 offset, mSolid, divType );
394 ErrorInAxis( axis, mSolid );
398 else if( mSolidType ==
"G4Trd" )
404 offset, mSolid, divType );
408 offset, mSolid, divType );
412 offset, mSolid, divType );
415 ErrorInAxis( axis, mSolid );
419 else if( mSolidType ==
"G4Para" )
425 offset, mSolid, divType );
429 offset, mSolid, divType );
433 offset, mSolid, divType );
436 ErrorInAxis( axis, mSolid );
487 std::ostringstream message;
488 message <<
"Solid type not supported: " << mSolidType <<
"." <<
G4endl
489 <<
"Divisions for " << mSolidType <<
" not implemented.";
490 G4Exception(
"G4ReplicatedSlice::SetParameterisation()",
"GeomDiv0001",
498 void G4ReplicatedSlice::ErrorInAxis(
EAxis axis,
G4VSolid* solid )
517 error +=
"Radial3D.";
525 G4Exception(
"G4ReplicatedSlice::ErrorInAxis()",
"GeomDiv0002",
virtual void SetCopyNo(G4int CopyNo)
CLHEP::HepRotation G4RotationMatrix
G4bool IsParameterised() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
G4VSolid * GetSolid() const
G4bool IsRegularStructure() const
void SetHalfGap(G4double hg)
const G4RotationMatrix * GetRotation() const
virtual G4GeometryType GetEntityType() const =0
void SetRotation(G4RotationMatrix *)
G4VDivisionParameterisation * fparam
virtual G4int GetCopyNo() const
G4double GetWidth() 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)
const G4String & GetName() const
G4int GetRegularStructureId() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4bool IsMany() const
G4LogicalVolume * GetLogicalVolume() const
static PROLOG_HANDLER error
virtual G4VPVParameterisation * GetParameterisation() const
void SetMotherLogical(G4LogicalVolume *pMother)
void AddDaughter(G4VPhysicalVolume *p)
virtual ~G4ReplicatedSlice()
virtual G4bool IsReplicated() const
EAxis GetDivisionAxis() const