59 std::ostringstream message;
60 message <<
"Invalid setup." <<
G4endl
61 <<
"NULL pointer specified as mother for volume: " << pName;
62 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
66 if (pLogical == pMotherLogical)
68 std::ostringstream message;
69 message <<
"Invalid setup." <<
G4endl
70 <<
"Cannot place a volume inside itself! Volume: " << pName;
71 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
94 std::ostringstream message;
95 message <<
"Invalid setup." <<
G4endl
96 <<
"NULL pointer specified as mother! Volume: " << pName;
97 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
101 if (pLogical == pMotherLogical)
103 std::ostringstream message;
104 message <<
"Invalid setup." <<
G4endl
105 <<
"Cannot place a volume inside itself! Volume: " << pName;
106 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
127 std::ostringstream message;
128 message <<
"Invalid setup." <<
G4endl
129 <<
"NULL pointer specified as mother! Volume: " + pName;
130 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
134 if (pLogical == pMotherLogical)
136 std::ostringstream message;
137 message <<
"Invalid setup." <<
G4endl
138 <<
"Cannot place a volume inside itself! Volume: "+ pName;
139 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
167 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
"GeomDiv0002",
181 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
"GeomDiv0002",
216 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
"GeomDiv0002",
228 if( msolType != dsolType && ( msolType !=
"G4Trd" || dsolType !=
"G4Trap" ) )
230 std::ostringstream message;
231 message <<
"Incorrect solid type for division of volume "
233 <<
"It is: " << msolType
234 <<
", while it should be: " << dsolType <<
"!";
235 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
323 if (mSolidType ==
"G4ReflectedSolid")
331 if( mSolidType ==
"G4Box" )
337 offset, mSolid, divType );
341 offset, mSolid, divType );
345 offset, mSolid, divType );
352 else if( mSolidType ==
"G4Tubs" )
358 offset, mSolid, divType );
362 offset, mSolid, divType );
366 offset, mSolid, divType );
373 else if( mSolidType ==
"G4Cons" )
379 offset, mSolid, divType );
383 offset, mSolid, divType );
387 offset, mSolid, divType );
394 else if( mSolidType ==
"G4Trd" )
400 offset, mSolid, divType );
404 offset, mSolid, divType );
408 offset, mSolid, divType );
415 else if( mSolidType ==
"G4Para" )
421 offset, mSolid, divType );
425 offset, mSolid, divType );
429 offset, mSolid, divType );
439 else if( mSolidType ==
"G4Polycone" )
445 offset, mSolid, divType );
449 offset, mSolid, divType );
453 offset, mSolid, divType );
460 else if( mSolidType ==
"G4Polyhedra" )
466 offset, mSolid, divType );
470 offset, mSolid, divType );
474 offset, mSolid, divType );
483 std::ostringstream message;
484 message <<
"Solid type " << mSolidType <<
" not supported!" <<
G4endl
485 <<
"Divisions for " << mSolidType <<
" are not implemented.";
486 G4Exception(
"G4PVDivision::SetParameterisation()",
"GeomDiv0001",
511 error +=
"Radial3D.";
519 G4Exception(
"G4PVDivision::ErrorInAxis()",
"GeomDiv0002",
G4bool IsParameterised() const
virtual G4bool IsMany() const
virtual G4bool IsReplicated() const
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
EAxis GetDivisionAxis() const
G4PVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)
virtual G4int GetCopyNo() const
virtual G4GeometryType GetEntityType() const =0
virtual G4VPVParameterisation * GetParameterisation() const
void SetRotation(G4RotationMatrix *)
G4double GetWidth() const
const G4String & GetName() const
virtual void SetCopyNo(G4int CopyNo)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool IsRegularStructure() const
void SetParameterisation(G4LogicalVolume *motherLogical, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset, DivisionType divType)
G4VDivisionParameterisation * fparam
void ErrorInAxis(EAxis axis, G4VSolid *solid)
G4LogicalVolume * GetLogicalVolume() const
const G4RotationMatrix * GetRotation() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
static PROLOG_HANDLER error
void SetMotherLogical(G4LogicalVolume *pMother)
G4int GetRegularStructureId() const
void CheckAndSetParameters(const EAxis pAxis, const G4int nDivs, const G4double width, const G4double offset, DivisionType divType, const G4LogicalVolume *pMotherLogical)
void AddDaughter(G4VPhysicalVolume *p)
G4VSolid * GetSolid() const