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);
150 G4PVDivision::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()",
306 void G4PVDivision::SetParameterisation(
G4LogicalVolume* motherLogical,
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",
492 void G4PVDivision::ErrorInAxis(
EAxis axis,
G4VSolid* solid )
511 error +=
"Radial3D.";
519 G4Exception(
"G4PVDivision::ErrorInAxis()",
"GeomDiv0002",