54 std::ostringstream message;
55 message <<
"Generic construct for G4Polycone NOT supported." <<
G4endl
56 <<
"Sorry! Solid: " << msol->
GetName() <<
".";
57 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
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: " << 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" );
367 - fOrigParamMother->
Z_values[0] , width, offset );
373 - fOrigParamMother->
Z_values[0] , nDiv, offset );
379 G4cout <<
" G4ParameterisationPolyconeZ - # divisions " <<
fnDiv <<
" = "
402 return (r1-r2)/(z1-z2)*z + ( r1 - (r1-r2)/(z1-z2)*z1 ) ;
412 fOrigParamMother->
Rmin[nseg],
414 fOrigParamMother->
Rmin[nseg+1]);
424 fOrigParamMother->
Rmax[nseg],
426 fOrigParamMother->
Rmax[nseg+1]);
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 ) {
475 if ( zstart >= fOrigParamMother->
Z_values[counter] &&
476 zstart < fOrigParamMother->Z_values[counter+1] ) {
480 if ( zend > fOrigParamMother->
Z_values[counter] &&
481 zend <= fOrigParamMother->Z_values[counter+1] ) {
495 while ( isegend < 0 && counter < fOrigParamMother->Num_z_planes-1 ) {
497 if ( zstart <= fOrigParamMother->Z_values[counter] &&
498 zstart > fOrigParamMother->
Z_values[counter+1] ) {
502 if ( zend < fOrigParamMother->Z_values[counter] &&
503 zend >= fOrigParamMother->
Z_values[counter+1] ) {
511 if ( isegstart != isegend ) {
512 std::ostringstream message;
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()",
521 fNSegment = isegstart;
533 = ( fOrigParamMother->
Z_values[copyNo]
534 + fOrigParamMother->
Z_values[copyNo+1])/2;
555 G4cout <<
" G4ParameterisationPolyconeZ - position: " << posi <<
G4endl
556 <<
" copyNo: " << copyNo <<
" - foffset: " <<
foffset/
deg
566 G4cout << std::setprecision(8) <<
" G4ParameterisationPolyconeZ "
568 <<
" Position: " << origin <<
" - Width: " <<
fwidth
596 + fOrigParamMother->
Z_values[copyNo+1])/2;
600 origparam.
Rmin[0] = fOrigParamMother->
Rmin[copyNo];
601 origparam.
Rmin[1] = fOrigParamMother->
Rmin[copyNo+1];
602 origparam.
Rmax[0] = fOrigParamMother->
Rmax[copyNo];
603 origparam.
Rmax[1] = fOrigParamMother->
Rmax[copyNo+1];
618 origparam.
Rmin[0] = GetRmin(zstart, fNSegment);
619 origparam.
Rmax[0] = GetRmax(zstart, fNSegment);
620 origparam.
Rmin[1] = GetRmin(zend, fNSegment);
621 origparam.
Rmax[1] = GetRmax(zend, fNSegment);
634 origparam.
Rmin[0] = GetRmin(zstart, fNSegment);
635 origparam.
Rmax[0] = GetRmax(zstart, fNSegment);
636 origparam.
Rmin[1] = GetRmin(zend, fNSegment);
637 origparam.
Rmax[1] = GetRmax(zend, fNSegment);
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;