66 G4double* zValuesRefl =
new double[nofZplanes];
67 for (
G4int i=0; i<nofZplanes; i++) zValuesRefl[i] = - zValues[i];
73 nofZplanes, zValuesRefl, rminValues, rmaxValues);
75 delete [] zValuesRefl;
97 SetType(
"DivisionPolyconeRho" );
105 - origparamMother->
Rmin[0], width, offset );
110 - origparamMother->
Rmin[0], nDiv, offset );
116 G4cout <<
" G4ParameterisationPolyconeRho - # divisions " <<
fnDiv
117 <<
" = " << nDiv <<
G4endl
138 std::ostringstream message;
140 <<
"Division along R will be done with a width "
141 <<
"different for each solid section." <<
G4endl
142 <<
"WIDTH will not be used !";
143 G4Exception(
"G4VParameterisationPolycone::CheckParametersValidity()",
148 std::ostringstream message;
150 <<
"Division along R will be done with a width "
151 <<
"different for each solid section." <<
G4endl
152 <<
"OFFSET will not be used !";
153 G4Exception(
"G4VParameterisationPolycone::CheckParametersValidity()",
163 return original_pars->
Rmax[0] - original_pars->
Rmin[0];
193 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconeRho "
195 <<
" Position: " << origin/
mm
215 for(
G4int ii = 0; ii < nZplanes; ii++ )
220 origparam.
Rmax[ii] = origparamMother->
Rmin[ii]+
foffset+width*(copyNo+1);
229 G4cout <<
"G4ParameterisationPolyconeRho::ComputeDimensions()" <<
G4endl
230 <<
"-- Parametrised pcone copy-number: " << copyNo <<
G4endl;
244 SetType(
"DivisionPolyconePhi" );
261 G4cout <<
" G4ParameterisationPolyconePhi - # divisions " <<
fnDiv
262 <<
" = " << nDiv <<
G4endl
297 G4cout <<
" G4ParameterisationPolyconePhi - position: " << posi/
deg
299 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/
deg
300 <<
" - fwidth: " << fwidth/
deg <<
G4endl;
309 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconePhi "
311 <<
" Position: " << origin <<
" - Width: " << fwidth
336 G4cout <<
"G4ParameterisationPolyconePhi::ComputeDimensions():" <<
G4endl;
349 fOrigParamMother(((
G4Polycone*)fmotherSolid)->GetOriginalParameters())
353 SetType(
"DivisionPolyconeZ" );
359 - fOrigParamMother->
Z_values[0] , width, offset );
365 - fOrigParamMother->
Z_values[0] , nDiv, offset );
371 G4cout <<
" G4ParameterisationPolyconeZ - # divisions " <<
fnDiv <<
" = "
394 return (r1-r2)/(z1-z2)*z + ( r1 - (r1-r2)/(z1-z2)*z1 ) ;
404 fOrigParamMother->
Rmin[nseg],
406 fOrigParamMother->
Rmin[nseg+1]);
416 fOrigParamMother->
Rmax[nseg],
418 fOrigParamMother->
Rmax[nseg+1]);
436 std::ostringstream error;
437 error <<
"Configuration not supported." <<
G4endl
438 <<
"Division along Z will be done by splitting in the defined"
440 <<
"Z planes, i.e, the number of division would be: "
442 <<
", instead of: " <<
fnDiv <<
" !";
443 G4Exception(
"G4ParameterisationPolyconeZ::CheckParametersValidity()",
454 G4int isegstart = -1;
465 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
467 if ( zstart >= fOrigParamMother->
Z_values[counter] &&
468 zstart < fOrigParamMother->Z_values[counter+1] ) {
472 if ( zend > fOrigParamMother->
Z_values[counter] &&
473 zend <= fOrigParamMother->Z_values[counter+1] ) {
487 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
489 if ( zstart <= fOrigParamMother->Z_values[counter] &&
490 zstart > fOrigParamMother->
Z_values[counter+1] ) {
494 if ( zend < fOrigParamMother->Z_values[counter] &&
495 zend >= fOrigParamMother->
Z_values[counter+1] ) {
503 if ( isegstart != isegend ) {
504 std::ostringstream message;
505 message <<
"Condiguration not supported." <<
G4endl
506 <<
"Division with user defined width." <<
G4endl
508 <<
"Divided region is not between two z planes.";
509 G4Exception(
"G4ParameterisationPolyconeZ::CheckParametersValidity()",
513 fNSegment = isegstart;
525 = ( fOrigParamMother->
Z_values[copyNo]
526 + fOrigParamMother->
Z_values[copyNo+1])/2;
547 G4cout <<
" G4ParameterisationPolyconeZ - position: " << posi <<
G4endl
548 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/
deg
558 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconeZ "
560 <<
" Position: " << origin <<
" - Width: " <<
fwidth
588 + fOrigParamMother->
Z_values[copyNo+1])/2;
592 origparam.
Rmin[0] = fOrigParamMother->
Rmin[copyNo];
593 origparam.
Rmin[1] = fOrigParamMother->
Rmin[copyNo+1];
594 origparam.
Rmax[0] = fOrigParamMother->
Rmax[copyNo];
595 origparam.
Rmax[1] = fOrigParamMother->
Rmax[copyNo+1];
610 origparam.
Rmin[0] = GetRmin(zstart, fNSegment);
611 origparam.
Rmax[0] = GetRmax(zstart, fNSegment);
612 origparam.
Rmin[1] = GetRmin(zend, fNSegment);
613 origparam.
Rmax[1] = GetRmax(zend, fNSegment);
626 origparam.
Rmin[0] = GetRmin(zstart, fNSegment);
627 origparam.
Rmax[0] = GetRmax(zstart, fNSegment);
628 origparam.
Rmin[1] = GetRmin(zend, fNSegment);
629 origparam.
Rmax[1] = GetRmax(zend, fNSegment);
633 if ( origparam.
Rmin[0] < 0.0 ) origparam.
Rmin[0] = 0.0;
634 if ( origparam.
Rmin[nz-1] < 0.0 ) origparam.
Rmin[1] = 0.0;
643 G4cout <<
"G4ParameterisationPolyconeZ::ComputeDimensions()" <<
G4endl
644 <<
"-- Parametrised pcone copy-number: " << copyNo <<
G4endl;
virtual void CheckParametersValidity()
CLHEP::Hep3Vector G4ThreeVector
void SetType(const G4String &type)
G4double GetMaxParameter() const
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
static G4ThreadLocal G4int verbose
virtual G4GeometryType GetEntityType() const =0
G4double GetEndPhi() const
G4ParameterisationPolyconeRho(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
~G4ParameterisationPolyconeZ()
void CheckParametersValidity()
G4GLOB_DLL std::ostream G4cout
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
virtual ~G4VParameterisationPolycone()
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
void CheckParametersValidity()
~G4ParameterisationPolyconePhi()
void SetTranslation(const G4ThreeVector &v)
void SetOriginalParameters(G4PolyconeHistorical *pars)
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
G4VParameterisationPolycone(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
G4PolyconeHistorical * GetOriginalParameters() const
G4double GetStartPhi() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4ParameterisationPolyconePhi(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
~G4ParameterisationPolyconeRho()
G4double GetMaxParameter() const
G4double GetMaxParameter() const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
DivisionType fDivisionType
G4ParameterisationPolyconeZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const