54 std::ostringstream message;
55 #ifdef G4MULTITHREADED 56 message <<
"Divisions for G4Polyhedra currently NOT supported in MT-mode." 58 <<
"Sorry! Solid: " << msolid->
GetName();
59 G4Exception(
"G4VParameterisationPolyhedra::G4VParameterisationPolyhedra()",
66 message <<
"Generic construct for G4Polyhedra NOT supported." <<
G4endl 67 <<
"Sorry! Solid: " << msol->
GetName();
68 G4Exception(
"G4VParameterisationPolyhedra::G4VParameterisationPolyhedra()",
90 for (
G4int i=0; i<nofZplanes; i++)
94 zValuesRefl[i] = - zValues[i];
102 nofZplanes, zValuesRefl, rminValues2, rmaxValues2);
104 delete [] rminValues2;
105 delete [] rmaxValues2;
106 delete [] zValuesRefl;
128 if ( (phiTotal <=0) || (phiTotal >
132 return std::cos(0.5*phiTotal/nofSides);
144 SetType(
"DivisionPolyhedraRho" );
152 - original_pars->
Rmin[0], width, offset );
157 - original_pars->
Rmin[0], nDiv, offset );
163 G4cout <<
" G4ParameterisationPolyhedraRho - # divisions " <<
fnDiv 164 <<
" = " << nDiv <<
G4endl 185 std::ostringstream message;
187 <<
"Division along R will be done with a width " 188 <<
"different for each solid section." <<
G4endl 189 <<
"WIDTH will not be used !";
190 G4Exception(
"G4ParameterisationPolyhedraRho::CheckParametersValidity()",
195 std::ostringstream message;
197 <<
"Division along R will be done with a width " 198 <<
"different for each solid section." <<
G4endl 199 <<
"OFFSET will not be used !";
200 G4Exception(
"G4ParameterisationPolyhedraRho::CheckParametersValidity()",
210 return original_pars->
Rmax[0] - original_pars->
Rmin[0];
240 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyhedraRho " 242 <<
" Position: " << origin
262 for(
G4int ii = 0; ii < nZplanes; ii++ )
267 origparam.
Rmax[ii] = origparamMother->
Rmin[ii]+
foffset+width*(copyNo+1);
276 G4cout <<
"G4ParameterisationPolyhedraRho::ComputeDimensions()" <<
G4endl 277 <<
"-- Parametrised phedra copy-number: " << copyNo <<
G4endl;
291 SetType(
"DivisionPolyhedraPhi" );
306 G4cout <<
" G4ParameterisationPolyhedraPhi - # divisions " <<
fnDiv 307 <<
" = " << nDiv <<
G4endl 335 std::ostringstream message;
337 <<
" Division along PHI will be done splitting " 338 <<
"in the defined numSide." <<
G4endl 339 <<
"WIDTH will not be used !";
340 G4Exception(
"G4ParameterisationPolyhedraPhi::CheckParametersValidity()",
345 std::ostringstream message;
347 <<
"Division along PHI will be done splitting " 348 <<
"in the defined numSide." <<
G4endl 349 <<
"OFFSET will not be used !";
350 G4Exception(
"G4ParameterisationPolyhedraPhi::CheckParametersValidity()",
358 std::ostringstream message;
359 message <<
"Configuration not supported." <<
G4endl 360 <<
"Division along PHI will be done splitting in the defined" 362 <<
"numSide, i.e, the number of division would be :" 363 << origparamMother->
numSide <<
" instead of " <<
fnDiv <<
" !";
364 G4Exception(
"G4ParameterisationPolyhedraPhi::CheckParametersValidity()",
385 G4cout <<
" G4ParameterisationPolyhedraPhi - position: " << posi/
deg 387 <<
" copyNo: " << copyNo
388 <<
" - fwidth: " << fwidth/
deg <<
G4endl;
397 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyhedraPhi " << copyNo
399 <<
" Position: " << origin <<
" - Width: " << fwidth
426 G4cout <<
"G4ParameterisationPolyhedraPhi::ComputeDimensions():" <<
G4endl;
442 SetType(
"DivisionPolyhedraZ" );
460 G4cout <<
" G4ParameterisationPolyhedraZ - # divisions " <<
fnDiv <<
" = " 483 return (r1-r2)/(z1-z2)*z + ( r1 - (r1-r2)/(z1-z2)*z1 ) ;
525 std::ostringstream message;
526 message <<
"Configuration not supported." <<
G4endl 527 <<
"Division along Z will be done splitting in the defined" 529 <<
"Z planes, i.e, the number of division would be :" 532 G4Exception(
"G4ParameterisationPolyhedraZ::CheckParametersValidity()",
543 G4int isegstart = -1;
554 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
557 zstart < fOrigParamMother->Z_values[counter+1] ) {
562 zend <= fOrigParamMother->Z_values[counter+1] ) {
576 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
578 if ( zstart <= fOrigParamMother->Z_values[counter] &&
583 if ( zend < fOrigParamMother->Z_values[counter] &&
591 if ( isegstart != isegend ) {
592 std::ostringstream message;
593 message <<
"Configuration not supported." <<
G4endl 594 <<
"Division with user defined width." <<
G4endl 596 <<
"Divided region is not between two Z planes.";
597 G4Exception(
"G4ParameterisationPolyhedraZ::CheckParametersValidity()",
635 G4cout <<
" G4ParameterisationPolyhedraZ - position: " << posi <<
G4endl 636 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/
deg 646 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyhedraZ " 648 <<
" Position: " << origin <<
" - Width: " <<
fwidth 723 if ( origparam.
Rmin[0] < 0.0 ) origparam.
Rmin[0] = 0.0;
724 if ( origparam.
Rmin[nz-1] < 0.0 ) origparam.
Rmin[1] = 0.0;
733 G4cout <<
"G4ParameterisationPolyhedraZ::ComputeDimensions()" <<
G4endl 734 <<
"-- Parametrised phedra copy-number: " << copyNo <<
G4endl;
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
virtual ~G4VParameterisationPolyhedra()
virtual void CheckParametersValidity()
static const G4int verbose
CLHEP::Hep3Vector G4ThreeVector
G4double GetMaxParameter() const
void ComputeDimensions(G4Polyhedra &phedra, const G4int copyNo, const G4VPhysicalVolume *physVol) const
void SetType(const G4String &type)
G4double GetStartPhi() const
void CheckParametersValidity()
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
G4double GetMaxParameter() const
virtual G4GeometryType GetEntityType() const =0
G4double ConvertRadiusFactor(const G4Polyhedra &phedra) const
G4ParameterisationPolyhedraPhi(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
G4VParameterisationPolyhedra(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
G4PolyhedraHistorical * GetOriginalParameters() const
G4GLOB_DLL std::ostream G4cout
void SetTranslation(const G4ThreeVector &v)
G4PolyhedraHistorical * fOrigParamMother
void CheckParametersValidity()
G4ParameterisationPolyhedraZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void ComputeDimensions(G4Polyhedra &phedra, const G4int copyNo, const G4VPhysicalVolume *physVol) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
void CheckParametersValidity()
G4double GetMaxParameter() const
G4ParameterisationPolyhedraRho(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
G4double GetEndPhi() const
G4double GetRmin(G4double z, G4int nsegment) const
G4double GetR(G4double z, G4double z1, G4double r1, G4double z2, G4double r2) const
~G4ParameterisationPolyhedraRho()
void SetOriginalParameters(G4PolyhedraHistorical *pars)
~G4ParameterisationPolyhedraPhi()
void ComputeDimensions(G4Polyhedra &phedra, const G4int copyNo, const G4VPhysicalVolume *physVol) const
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
~G4ParameterisationPolyhedraZ()
G4double GetRmax(G4double z, G4int nsegment) const
static G4GeometryTolerance * GetInstance()
DivisionType fDivisionType