75 for (
G4int i=0; i<nofZplanes; ++i) { zValuesRefl[i] = - zValues[i]; }
81 nofZplanes, zValuesRefl, rminValues, rmaxValues);
83 delete [] zValuesRefl;
105 SetType(
"DivisionPolyconeRho" );
113 - origparamMother->
Rmin[0], width, offset );
118 - origparamMother->
Rmin[0], nDiv, offset );
124 G4cout <<
" G4ParameterisationPolyconeRho - # divisions " <<
fnDiv
125 <<
" = " << nDiv <<
G4endl
146 std::ostringstream message;
148 <<
"Division along R will be done with a width "
149 <<
"different for each solid section." <<
G4endl
150 <<
"WIDTH will not be used !";
151 G4Exception(
"G4VParameterisationPolycone::CheckParametersValidity()",
156 std::ostringstream message;
158 <<
"Division along R will be done with a width "
159 <<
"different for each solid section." <<
G4endl
160 <<
"OFFSET will not be used !";
161 G4Exception(
"G4VParameterisationPolycone::CheckParametersValidity()",
171 return original_pars->
Rmax[0] - original_pars->
Rmin[0];
201 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconeRho "
203 <<
" Position: (0,0,0)"
204 <<
" - Width: " <<
fwidth/CLHEP::deg
223 for(
G4int ii = 0; ii < nZplanes; ++ii )
228 origparam.
Rmax[ii] = origparamMother->
Rmin[ii]+
foffset+width*(copyNo+1);
237 G4cout <<
"G4ParameterisationPolyconeRho::ComputeDimensions()" <<
G4endl
238 <<
"-- Parametrised pcone copy-number: " << copyNo <<
G4endl;
252 SetType(
"DivisionPolyconePhi" );
269 G4cout <<
" G4ParameterisationPolyconePhi - # divisions " <<
fnDiv
270 <<
" = " << nDiv <<
G4endl
271 <<
" Offset " <<
foffset/CLHEP::deg <<
" = " << offset/CLHEP::deg <<
G4endl
272 <<
" Width " <<
fwidth/CLHEP::deg <<
" = " << width/CLHEP::deg <<
G4endl;
305 G4cout <<
" G4ParameterisationPolyconePhi - position: " << posi/CLHEP::deg
307 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/CLHEP::deg
317 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconePhi "
319 <<
" Position: (0,0,0) - Width: " <<
fwidth
344 G4cout <<
"G4ParameterisationPolyconePhi::ComputeDimensions():" <<
G4endl;
356 fOrigParamMother(((
G4Polycone*)fmotherSolid)->GetOriginalParameters())
360 SetType(
"DivisionPolyconeZ" );
366 - fOrigParamMother->
Z_values[0] , width, offset );
372 - fOrigParamMother->
Z_values[0] , nDiv, offset );
378 G4cout <<
" G4ParameterisationPolyconeZ - # divisions " <<
fnDiv <<
" = "
401 return (r1-r2)/(z1-z2)*z + ( r1 - (r1-r2)/(z1-z2)*z1 ) ;
411 fOrigParamMother->
Rmin[nseg],
413 fOrigParamMother->
Rmin[nseg+1]);
423 fOrigParamMother->
Rmax[nseg],
425 fOrigParamMother->
Rmax[nseg+1]);
446 std::ostringstream error;
447 error <<
"Configuration not supported." <<
G4endl
448 <<
"Division along Z will be done by splitting in the defined"
450 <<
"Z planes, i.e, the number of division would be: "
452 <<
", instead of: " <<
fnDiv <<
" !";
453 G4Exception(
"G4ParameterisationPolyconeZ::CheckParametersValidity()",
466 G4int isegstart = -1;
479 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 )
482 if ( zstart >= fOrigParamMother->
Z_values[counter] &&
483 zstart < fOrigParamMother->Z_values[counter+1] )
488 if ( zend > fOrigParamMother->
Z_values[counter] &&
489 zend <= fOrigParamMother->Z_values[counter+1] )
506 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 )
509 if ( zstart <= fOrigParamMother->Z_values[counter] &&
510 zstart > fOrigParamMother->
Z_values[counter+1] )
515 if ( zend < fOrigParamMother->Z_values[counter] &&
516 zend >= fOrigParamMother->
Z_values[counter+1] )
525 if ( isegstart != isegend )
527 std::ostringstream message;
528 message <<
"Condiguration not supported." <<
G4endl
529 <<
"Division with user defined width." <<
G4endl
531 <<
"Divided region is not between two z planes.";
532 G4Exception(
"G4ParameterisationPolyconeZ::CheckParametersValidity()",
536 fNSegment = isegstart;
550 posi = ( fOrigParamMother->
Z_values[copyNo]
551 + fOrigParamMother->
Z_values[copyNo+1])/2;
559 posi = fOrigParamMother->
Z_values[0];
574 G4cout <<
" G4ParameterisationPolyconeZ - position: " << posi <<
G4endl
575 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/CLHEP::deg
585 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconeZ "
587 <<
" Position: (0,0,0) - Width: " <<
fwidth
618 + fOrigParamMother->
Z_values[copyNo+1])/2;
622 origparam.
Rmin[0] = fOrigParamMother->
Rmin[copyNo];
623 origparam.
Rmin[1] = fOrigParamMother->
Rmin[copyNo+1];
624 origparam.
Rmax[0] = fOrigParamMother->
Rmax[copyNo];
625 origparam.
Rmax[1] = fOrigParamMother->
Rmax[copyNo+1];
644 origparam.
Rmin[0] = GetRmin(zstart, fNSegment);
645 origparam.
Rmax[0] = GetRmax(zstart, fNSegment);
646 origparam.
Rmin[1] = GetRmin(zend, fNSegment);
647 origparam.
Rmax[1] = GetRmax(zend, fNSegment);
663 origparam.
Rmin[0] = GetRmin(zstart, fNSegment);
664 origparam.
Rmax[0] = GetRmax(zstart, fNSegment);
665 origparam.
Rmin[1] = GetRmin(zend, fNSegment);
666 origparam.
Rmax[1] = GetRmax(zend, fNSegment);
671 if ( origparam.
Rmin[0] < 0.0 ) origparam.
Rmin[0] = 0.0;
672 if ( origparam.
Rmin[nz-1] < 0.0 ) origparam.
Rmin[1] = 0.0;
681 G4cout <<
"G4ParameterisationPolyconeZ::ComputeDimensions()" <<
G4endl
682 <<
"-- Parametrised pcone copy-number: " << copyNo <<
G4endl;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
~G4ParameterisationPolyconePhi()
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
G4double GetMaxParameter() const
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
G4ParameterisationPolyconePhi(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
G4double GetMaxParameter() const
void CheckParametersValidity()
G4ParameterisationPolyconeRho(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
~G4ParameterisationPolyconeRho()
~G4ParameterisationPolyconeZ()
void CheckParametersValidity()
G4double GetMaxParameter() const
G4ParameterisationPolyconeZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
G4double GetEndPhi() const
void SetOriginalParameters(G4PolyconeHistorical *pars)
G4double GetStartPhi() const
G4PolyconeHistorical * GetOriginalParameters() const
virtual void CheckParametersValidity()
void SetType(const G4String &type)
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
static const G4int verbose
DivisionType fDivisionType
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.0) const
virtual ~G4VParameterisationPolycone()
G4VParameterisationPolycone(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
void SetTranslation(const G4ThreeVector &v)
virtual G4GeometryType GetEntityType() const =0