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",
76 SetParameterisation(pMotherLogical, pAxis, nDivs,
78 CheckAndSetParameters (pAxis, nDivs, width, offset,
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",
111 SetParameterisation(pMotherLogical, pAxis, nDivs, 0., offset,
DivNDIV);
112 CheckAndSetParameters (pAxis, nDivs, 0., offset,
DivNDIV, pMotherLogical);
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",
144 SetParameterisation(pMotherLogical, pAxis, 0, width, offset,
DivWIDTH);
145 CheckAndSetParameters (pAxis, 0, width, offset,
DivWIDTH, pMotherLogical);
150G4PVDivision::CheckAndSetParameters(
const EAxis pAxis,
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 );
348 ErrorInAxis( axis, mSolid );
352 else if( mSolidType ==
"G4Tubs" )
358 offset, mSolid, divType );
362 offset, mSolid, divType );
366 offset, mSolid, divType );
369 ErrorInAxis( axis, mSolid );
373 else if( mSolidType ==
"G4Cons" )
379 offset, mSolid, divType );
383 offset, mSolid, divType );
387 offset, mSolid, divType );
390 ErrorInAxis( axis, mSolid );
394 else if( mSolidType ==
"G4Trd" )
400 offset, mSolid, divType );
404 offset, mSolid, divType );
408 offset, mSolid, divType );
411 ErrorInAxis( axis, mSolid );
415 else if( mSolidType ==
"G4Para" )
421 offset, mSolid, divType );
425 offset, mSolid, divType );
429 offset, mSolid, divType );
432 ErrorInAxis( axis, mSolid );
439 else if( mSolidType ==
"G4Polycone" )
445 offset, mSolid, divType );
449 offset, mSolid, divType );
453 offset, mSolid, divType );
456 ErrorInAxis( axis, mSolid );
460 else if( mSolidType ==
"G4Polyhedra" )
466 offset, mSolid, divType );
470 offset, mSolid, divType );
474 offset, mSolid, divType );
477 ErrorInAxis( axis, mSolid );
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",
CLHEP::HepRotation G4RotationMatrix
G4VSolid * GetSolid() const
void AddDaughter(G4VPhysicalVolume *p)
virtual G4VPVParameterisation * GetParameterisation() const
virtual G4bool IsReplicated() const
virtual void SetCopyNo(G4int CopyNo)
virtual G4bool IsMany() const
virtual G4int GetCopyNo() const
G4VDivisionParameterisation * fparam
EAxis GetDivisionAxis() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
G4PVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)
G4bool IsRegularStructure() const
G4bool IsParameterised() const
G4int GetRegularStructureId() const
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)