44G4PVDivision::G4PVDivision(
const G4String& pName,
51 :
G4PVReplica(pName, nDivs, pAxis, pLogical, pMotherLogical)
53 if (pMotherLogical ==
nullptr)
55 std::ostringstream message;
56 message <<
"Invalid setup." <<
G4endl
57 <<
"NULL pointer specified as mother for volume: " << pName;
58 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
62 if (pLogical == pMotherLogical)
64 std::ostringstream message;
65 message <<
"Invalid setup." <<
G4endl
66 <<
"Cannot place a volume inside itself! Volume: " << pName;
67 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
71 SetMotherLogical(pMotherLogical);
72 SetParameterisation(pMotherLogical, pAxis, nDivs,
74 CheckAndSetParameters (pAxis, nDivs, width,
offset,
79G4PVDivision::G4PVDivision(
const G4String& pName,
85 :
G4PVReplica(pName, nDivs, pAxis, pLogical, pMotherLogical)
87 if (pMotherLogical ==
nullptr)
89 std::ostringstream message;
90 message <<
"Invalid setup." <<
G4endl
91 <<
"NULL pointer specified as mother! Volume: " << pName;
92 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
96 if (pLogical == pMotherLogical)
98 std::ostringstream message;
99 message <<
"Invalid setup." <<
G4endl
100 <<
"Cannot place a volume inside itself! Volume: " << pName;
101 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
105 SetMotherLogical(pMotherLogical);
106 SetParameterisation(pMotherLogical, pAxis, nDivs, 0.,
offset,
DivNDIV);
107 CheckAndSetParameters (pAxis, nDivs, 0.,
offset,
DivNDIV, pMotherLogical);
117 :
G4PVReplica(pName, 0, pAxis, pLogical, pMotherLogical)
119 if (pMotherLogical ==
nullptr)
121 std::ostringstream message;
122 message <<
"Invalid setup." <<
G4endl
123 <<
"NULL pointer specified as mother! Volume: " + pName;
124 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
128 if (pLogical == pMotherLogical)
130 std::ostringstream message;
131 message <<
"Invalid setup." <<
G4endl
132 <<
"Cannot place a volume inside itself! Volume: "+ pName;
133 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
137 SetMotherLogical(pMotherLogical);
138 SetParameterisation(pMotherLogical, pAxis, 0, width,
offset,
DivWIDTH);
139 CheckAndSetParameters (pAxis, 0, width,
offset,
DivWIDTH, pMotherLogical);
151 pMotherPhysical != nullptr ? pMotherPhysical->GetLogicalVolume() : nullptr)
153 if (pMotherPhysical ==
nullptr)
155 std::ostringstream message;
156 message <<
"Invalid setup." <<
G4endl
157 <<
"NULL pointer specified as mother for volume: " << pName;
158 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
163 if (pLogical == pMotherLogical)
165 std::ostringstream message;
166 message <<
"Invalid setup." <<
G4endl
167 <<
"Cannot place a volume inside itself! Volume: " << pName;
168 G4Exception(
"G4PVDivision::G4PVDivision()",
"GeomDiv0002",
172 SetMotherLogical(pMotherLogical);
173 SetParameterisation(pMotherLogical, pAxis, nDivs,
175 CheckAndSetParameters (pAxis, nDivs, width,
offset,
181G4PVDivision::CheckAndSetParameters(
const EAxis pAxis,
198 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
"GeomDiv0002",
212 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
"GeomDiv0002",
247 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
"GeomDiv0002",
258 G4String dsolType = GetLogicalVolume()->GetSolid()->GetEntityType();
259 if( msolType != dsolType && ( msolType !=
"G4Trd" || dsolType !=
"G4Trap" ) )
261 std::ostringstream message;
262 message <<
"Incorrect solid type for division of volume "
263 << GetName() <<
"." <<
G4endl
264 <<
"It is: " << msolType
265 <<
", while it should be: " << dsolType <<
"!";
266 G4Exception(
"G4PVDivision::CheckAndSetParameters()",
272G4PVDivision::~G4PVDivision() =
default;
275EAxis G4PVDivision::GetDivisionAxis()
const
281G4bool G4PVDivision::IsParameterised()
const
287G4bool G4PVDivision::IsMany()
const
293G4bool G4PVDivision::IsReplicated()
const
299G4int G4PVDivision::GetMultiplicity()
const
311void G4PVDivision::GetReplicationData(
EAxis&
axis,
325EVolume G4PVDivision::VolumeType()
const
351 if (mSolidType ==
"G4ReflectedSolid")
359 if( mSolidType ==
"G4Box" )
365 offset, mSolid, divType );
369 offset, mSolid, divType );
373 offset, mSolid, divType );
376 ErrorInAxis(
axis, mSolid );
380 else if( mSolidType ==
"G4Tubs" )
386 offset, mSolid, divType );
390 offset, mSolid, divType );
394 offset, mSolid, divType );
397 ErrorInAxis(
axis, mSolid );
401 else if( mSolidType ==
"G4Cons" )
407 offset, mSolid, divType );
411 offset, mSolid, divType );
415 offset, mSolid, divType );
418 ErrorInAxis(
axis, mSolid );
422 else if( mSolidType ==
"G4Trd" )
428 offset, mSolid, divType );
432 offset, mSolid, divType );
436 offset, mSolid, divType );
439 ErrorInAxis(
axis, mSolid );
443 else if( mSolidType ==
"G4Para" )
449 offset, mSolid, divType );
453 offset, mSolid, divType );
457 offset, mSolid, divType );
460 ErrorInAxis(
axis, mSolid );
467 else if( mSolidType ==
"G4Polycone" )
473 offset, mSolid, divType );
477 offset, mSolid, divType );
481 offset, mSolid, divType );
484 ErrorInAxis(
axis, mSolid );
488 else if( mSolidType ==
"G4Polyhedra" )
494 offset, mSolid, divType );
498 offset, mSolid, divType );
502 offset, mSolid, divType );
505 ErrorInAxis(
axis, mSolid );
511 std::ostringstream message;
512 message <<
"Solid type " << mSolidType <<
" not supported!" <<
G4endl
513 <<
"Divisions for " << mSolidType <<
" are not implemented.";
514 G4Exception(
"G4PVDivision::SetParameterisation()",
"GeomDiv0001",
539 error +=
"Radial3D.";
547 G4Exception(
"G4PVDivision::ErrorInAxis()",
"GeomDiv0002",
558G4bool G4PVDivision::IsRegularStructure()
const
566G4int G4PVDivision::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...
G4ParameterisationPolyconePhi represents the parameterised positioning equivalent to dividing a G4Pol...
G4ParameterisationPolyconeRho represents the parameterised positioning equivalent to dividing a G4Pol...
G4ParameterisationPolyconeZ represents the parameterised positioning equivalent to dividing a G4Polyc...
G4ParameterisationPolyhedraPhi represents the parameterised positioning equivalent to dividing a G4Po...
G4ParameterisationPolyhedraRho represents the parameterised positioning equivalent to dividing a G4Po...
G4ParameterisationPolyhedraZ represents the parameterised positioning equivalent to dividing a G4Poly...
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