51 #ifdef G4MULTITHREADED
53 message <<
"Divisions for G4Polycone currently NOT supported in MT-mode."
55 <<
"Sorry! Solid: " << msolid->
GetName();
56 G4Exception(
"G4VParameterisationPolycone::G4VParameterisationPolycone()",
74 G4double* zValuesRefl =
new double[nofZplanes];
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
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()",
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: " << origin/
mm
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
305 G4cout <<
" G4ParameterisationPolyconePhi - position: " << posi/
deg
307 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/
deg
308 <<
" - fwidth: " << fwidth/
deg <<
G4endl;
317 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconePhi "
319 <<
" Position: " << origin <<
" - Width: " << fwidth
344 G4cout <<
"G4ParameterisationPolyconePhi::ComputeDimensions():" <<
G4endl;
357 fOrigParamMother(((
G4Polycone*)fmotherSolid)->GetOriginalParameters())
361 SetType(
"DivisionPolyconeZ" );
379 G4cout <<
" G4ParameterisationPolyconeZ - # divisions " <<
fnDiv <<
" = "
402 return (r1-r2)/(z1-z2)*z + ( r1 - (r1-r2)/(z1-z2)*z1 ) ;
444 std::ostringstream
error;
445 error <<
"Configuration not supported." <<
G4endl
446 <<
"Division along Z will be done by splitting in the defined"
448 <<
"Z planes, i.e, the number of division would be: "
450 <<
", instead of: " <<
fnDiv <<
" !";
451 G4Exception(
"G4ParameterisationPolyconeZ::CheckParametersValidity()",
462 G4int isegstart = -1;
473 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
476 zstart < fOrigParamMother->Z_values[counter+1] ) {
481 zend <= fOrigParamMother->Z_values[counter+1] ) {
495 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
497 if ( zstart <= fOrigParamMother->Z_values[counter] &&
502 if ( zend < fOrigParamMother->Z_values[counter] &&
511 if ( isegstart != isegend ) {
513 message <<
"Condiguration not supported." <<
G4endl
514 <<
"Division with user defined width." <<
G4endl
516 <<
"Divided region is not between two z planes.";
517 G4Exception(
"G4ParameterisationPolyconeZ::CheckParametersValidity()",
555 G4cout <<
" G4ParameterisationPolyconeZ - position: " << posi <<
G4endl
556 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/
deg
566 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconeZ "
568 <<
" Position: " << origin <<
" - Width: " <<
fwidth
641 if ( origparam.
Rmin[0] < 0.0 ) origparam.
Rmin[0] = 0.0;
642 if ( origparam.
Rmin[nz-1] < 0.0 ) origparam.
Rmin[1] = 0.0;
651 G4cout <<
"G4ParameterisationPolyconeZ::ComputeDimensions()" <<
G4endl
652 <<
"-- Parametrised pcone copy-number: " << copyNo <<
G4endl;
G4double GetMaxParameter() const
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
static const G4int verbose
CLHEP::Hep3Vector G4ThreeVector
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
void SetOriginalParameters(G4PolyconeHistorical *pars)
virtual ~G4VParameterisationPolycone()
DivisionType fDivisionType
static constexpr double mm
G4double GetRmin(G4double z, G4int nsegment) const
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
G4double GetMaxParameter() const
void message(RunManager *runmanager)
G4ParameterisationPolyconePhi(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void SetTranslation(const G4ThreeVector &v)
G4ParameterisationPolyconeZ(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
void CheckParametersValidity()
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
~G4ParameterisationPolyconeRho()
static constexpr double deg
G4double GetR(G4double z, G4double z1, G4double r1, G4double z2, G4double r2) const
G4double GetMaxParameter() const
void ComputeDimensions(G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
G4double GetEndPhi() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double GetRmax(G4double z, G4int nsegment) const
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
~G4ParameterisationPolyconeZ()
G4double GetStartPhi() const
virtual void CheckParametersValidity()
G4GLOB_DLL std::ostream G4cout
~G4ParameterisationPolyconePhi()
static PROLOG_HANDLER error
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4PolyconeHistorical * GetOriginalParameters() const
virtual G4GeometryType GetEntityType() const =0
void SetType(const G4String &type)
G4PolyconeHistorical * fOrigParamMother
G4ParameterisationPolyconeRho(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
G4VParameterisationPolycone(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
void CheckParametersValidity()