16 #include "CLHEP/Units/GlobalSystemOfUnits.h"
22 setType(
"DivisionPolyhedraRho" );
67 <<
"DDDividedPolyhedraRho::checkParametersValidity()"
69 <<
" Solid " << msol << std::endl
70 <<
" Division along R will be done with a width "
71 <<
"different for each solid section." << std::endl
72 <<
" WIDTH will not be used !" << std::endl;
77 <<
"DDDividedPolyhedraRho::checkParametersValidity()"
79 <<
" Solid " << msol << std::endl
80 <<
" Division along R will be done with a width "
81 <<
"different for each solid section." << std::endl
82 <<
" OFFSET will not be used !" << std::endl;
111 std::vector<double> localrMaxVec = msol.
rMaxVec();
112 std::vector<double> localrMinVec = msol.
rMinVec();
113 std::vector<double> localzVec = msol.
zVec();
114 std::vector<double> newrMinVec;
115 std::vector<double> newrMaxVec;
116 int nZplanes = localzVec.size();
119 for(
int ii = 0; ii < nZplanes; ++ii)
126 newrMinVec[ii] = localrMinVec[ii] +
div_.
offset() + width * copyNo;
127 newrMaxVec[ii] = localrMaxVec[ii] +
div_.
offset() + width * (copyNo + 1);
144 DCOUT_V (
'P',
"DDDividedPolyhedraRho:makeDDLogicalPart lp:" << ddlp);
152 setType(
"DivisionPolyhedraPhi" );
199 <<
"DDDividedPolyhedraPhi::checkParametersValidity()"
201 <<
" Solid " << msol << std::endl
202 <<
" Division along PHI will be done splitting "
203 <<
"in the defined numSide." << std::endl
204 <<
" WIDTH will not be used !" << std::endl;
209 <<
"DDDividedPolyhedraPhi::checkParametersValidity()"
211 <<
" Solid " << msol << std::endl
212 <<
" Division along PHI will be done splitting "
213 <<
"in the defined numSide." << std::endl
214 <<
" OFFSET will not be used !" << std::endl;
220 <<
"DDDividedPolyhedraPhi::checkParametersValidity()"
222 <<
" Division along PHI will be done splitting in the defined"
224 <<
" numSide, i.e, the number of division would be :"
225 <<
" " << msol.
sides()
228 std::string
s =
"DDDividedPolyhedraPhi::checkParametersValidity() Not supported configuration.";
245 DCOUT_V (
'P',
" DDDividedPolyhedraPhi - position: " << posi/deg <<
"\n copyNo: " << copyNo <<
" - compWidth_: " <<
compWidth_/deg <<
"\n");
254 DCOUT_V (
'P',
"DDDividedPolyhedra::makeDDRotation: copyNo = " << copyNo <<
" rotation = " << myddrot);
268 if (!dsol.isDefined().second)
281 DCOUT_V (
'P',
"DDDividedPolyhedraPhi::makeDDLogicalPart() ddlp = " << ddlp);
289 setType(
"DivisionPolyhedraZ" );
293 std::vector<double> zvec = msol.
zVec();
320 std::vector<double> zvec = msol.
zVec();
321 return (zvec[zvec.size() - 1] - zvec[0]);
334 <<
"DDDividedPolyhedraZ::checkParametersValidity()"
336 <<
" Solid " << msol << std::endl
337 <<
" Division along Z will be done splitting "
338 <<
"in the defined z_planes." << std::endl
339 <<
" WIDTH will not be used !" << std::endl;
345 <<
"DDDividedPolyhedraZ::checkParametersValidity()"
347 <<
" Solid " << msol << std::endl
348 <<
" Division along Z will be done splitting "
349 <<
"in the defined z_planes." << std::endl
350 <<
" OFFSET will not be used !" << std::endl;
353 std::vector<double> zvec = msol.
zVec();
355 if ( zvec.size() - 1 != size_t(
compNDiv_) )
358 <<
"DDDividedPolyhedraZ::checkParametersValidity()"
360 <<
" Division along Z can only be done by splitting in the defined"
362 <<
" z_planes, i.e, the number of division would be :"
363 <<
" " << zvec.size() - 1
366 std::string
s =
"DDDividedPolyhedraZ::checkParametersValidity()";
367 s +=
"Illegal Construct. Not a supported configuration.";
376 std::vector<double> zvec = msol.
zVec();
379 double posi = (zvec[copyNo] + zvec[copyNo+1])/2;
384 DCOUT_V (
'P',
" DDDividedPolyhedraZ - position: " << posi <<
"\n copyNo: " << copyNo <<
" - offset: " <<
div_.
offset()/deg <<
" - compWidth_: " <<
compWidth_/deg <<
" translation = " << tr);
402 std::vector<double> zvec = msol.
zVec();
403 std::vector<double> rminvec = msol.
rMinVec();
404 std::vector<double> rmaxvec = msol.
rMaxVec();
406 double posi = ( zvec[ copyNo ] + zvec[ copyNo + 1 ] ) / 2.0;
410 std::vector<double> newRmin, newRmax, newZ;
411 newZ.push_back( zvec[ copyNo ] - posi );
412 newZ.push_back( zvec[ copyNo + 1 ] - posi );
413 newRmin.push_back( rminvec[ copyNo ]);
414 newRmin.push_back( rminvec[ copyNo + 1 ]);
415 newRmax.push_back( rmaxvec[ copyNo ]);
416 newRmax.push_back( rmaxvec[ copyNo + 1 ]);
427 DCOUT_V(
'P',
"DDDividedPolyhedraZ::makeDDLogicalPart" <<
"\n-- Parametrised phedra copy-number: " << copyNo <<
"\n-- DDLogicalPart " << lp );
virtual void checkParametersValidity()
double startPhi(void) const
def_type isDefined() const
DDDividedPolyhedraRho(const DDDivision &div, DDCompactView *cpv)
std::vector< double > rMaxVec(void) const
static std::string itostr(int i)
WARNING: abused by other classes in this system: yet another conversion from int to std::string...
DDMaterial is used to define and access material information.
virtual double getMaxParameter() const
virtual void checkParametersValidity()
int calculateNDiv(double motherDim, double width, double offset) const
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
DDDividedPolyhedraPhi(const DDDivision &div, DDCompactView *cpv)
double calculateWidth(double motherDim, int nDiv, double offset) const
virtual DDTranslation makeDDTranslation(const int copyNo) const
virtual DDRotation makeDDRotation(const int copyNo) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
type of data representation of DDCompactView
A DDSolid represents the shape of a part.
virtual void checkParametersValidity(void)
virtual DDTranslation makeDDTranslation(const int copyNo) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
DivisionType divisionType_
virtual ~DDDividedPolyhedraRho()
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual void setType(const std::string &type)
std::vector< double > rMinVec(void) const
virtual void checkParametersValidity()
virtual ~DDDividedPolyhedraZ()
#define DCOUT_V(M_v_Y, M_v_S)
std::vector< double > zVec(void) const
virtual ~DDDividedPolyhedraPhi()
virtual double getMaxParameter() const
virtual DDTranslation makeDDTranslation(const int copyNo) const
double deltaPhi(void) const
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
virtual DDRotation makeDDRotation(const int copyNo) const
const DDLogicalPart & parent() const
virtual DDRotation makeDDRotation(const int copyNo) const
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDDividedPolyhedraZ(const DDDivision &div, DDCompactView *cpv)
const std::string & name() const
Returns the name.
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
virtual double getMaxParameter() const
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
DDRotationMatrix * changeRotMatrix(double rotZ=0.) const