17 #include "CLHEP/Units/GlobalSystemOfUnits.h"
23 setType(
"DivisionPolyhedraRho" );
68 <<
"DDDividedPolyhedraRho::checkParametersValidity()"
70 <<
" Solid " << msol << std::endl
71 <<
" Division along R will be done with a width "
72 <<
"different for each solid section." << std::endl
73 <<
" WIDTH will not be used !" << std::endl;
78 <<
"DDDividedPolyhedraRho::checkParametersValidity()"
80 <<
" Solid " << msol << std::endl
81 <<
" Division along R will be done with a width "
82 <<
"different for each solid section." << std::endl
83 <<
" OFFSET will not be used !" << std::endl;
112 std::vector<double> localrMaxVec = msol.
rMaxVec();
113 std::vector<double> localrMinVec = msol.
rMinVec();
114 std::vector<double> localzVec = msol.
zVec();
115 std::vector<double> newrMinVec;
116 std::vector<double> newrMaxVec;
117 int nZplanes = localzVec.size();
120 for(
int ii = 0; ii < nZplanes; ++ii)
127 newrMinVec[ii] = localrMinVec[ii] +
div_.
offset() + width * copyNo;
128 newrMaxVec[ii] = localrMaxVec[ii] +
div_.
offset() + width * (copyNo + 1);
145 DCOUT_V (
'P',
"DDDividedPolyhedraRho:makeDDLogicalPart lp:" << ddlp);
153 setType(
"DivisionPolyhedraPhi" );
200 <<
"DDDividedPolyhedraPhi::checkParametersValidity()"
202 <<
" Solid " << msol << std::endl
203 <<
" Division along PHI will be done splitting "
204 <<
"in the defined numSide." << std::endl
205 <<
" WIDTH will not be used !" << std::endl;
210 <<
"DDDividedPolyhedraPhi::checkParametersValidity()"
212 <<
" Solid " << msol << std::endl
213 <<
" Division along PHI will be done splitting "
214 <<
"in the defined numSide." << std::endl
215 <<
" OFFSET will not be used !" << std::endl;
221 <<
"DDDividedPolyhedraPhi::checkParametersValidity()"
223 <<
" Division along PHI will be done splitting in the defined"
225 <<
" numSide, i.e, the number of division would be :"
226 <<
" " << msol.
sides()
229 std::string
s =
"DDDividedPolyhedraPhi::checkParametersValidity() Not supported configuration.";
246 DCOUT_V (
'P',
" DDDividedPolyhedraPhi - position: " << posi/deg <<
"\n copyNo: " << copyNo <<
" - compWidth_: " <<
compWidth_/deg <<
"\n");
255 DCOUT_V (
'P',
"DDDividedPolyhedra::makeDDRotation: copyNo = " << copyNo <<
" rotation = " << myddrot);
269 if (!dsol.isDefined().second)
282 DCOUT_V (
'P',
"DDDividedPolyhedraPhi::makeDDLogicalPart() ddlp = " << ddlp);
290 setType(
"DivisionPolyhedraZ" );
294 std::vector<double> zvec = msol.
zVec();
321 std::vector<double> zvec = msol.
zVec();
322 return (zvec[zvec.size() - 1] - zvec[0]);
335 <<
"DDDividedPolyhedraZ::checkParametersValidity()"
337 <<
" Solid " << msol << std::endl
338 <<
" Division along Z will be done splitting "
339 <<
"in the defined z_planes." << std::endl
340 <<
" WIDTH will not be used !" << std::endl;
346 <<
"DDDividedPolyhedraZ::checkParametersValidity()"
348 <<
" Solid " << msol << std::endl
349 <<
" Division along Z will be done splitting "
350 <<
"in the defined z_planes." << std::endl
351 <<
" OFFSET will not be used !" << std::endl;
354 std::vector<double> zvec = msol.
zVec();
356 if ( zvec.size() - 1 != size_t(
compNDiv_) )
359 <<
"DDDividedPolyhedraZ::checkParametersValidity()"
361 <<
" Division along Z can only be done by splitting in the defined"
363 <<
" z_planes, i.e, the number of division would be :"
364 <<
" " << zvec.size() - 1
367 std::string
s =
"DDDividedPolyhedraZ::checkParametersValidity()";
368 s +=
"Illegal Construct. Not a supported configuration.";
377 std::vector<double> zvec = msol.
zVec();
380 double posi = (zvec[copyNo] + zvec[copyNo+1])/2;
385 DCOUT_V (
'P',
" DDDividedPolyhedraZ - position: " << posi <<
"\n copyNo: " << copyNo <<
" - offset: " <<
div_.
offset()/deg <<
" - compWidth_: " <<
compWidth_/deg <<
" translation = " << tr);
403 std::vector<double> zvec = msol.
zVec();
404 std::vector<double> rminvec = msol.
rMinVec();
405 std::vector<double> rmaxvec = msol.
rMaxVec();
407 double posi = ( zvec[ copyNo ] + zvec[ copyNo + 1 ] ) / 2.0;
411 std::vector<double> newRmin, newRmax, newZ;
412 newZ.push_back( zvec[ copyNo ] - posi );
413 newZ.push_back( zvec[ copyNo + 1 ] - posi );
414 newRmin.push_back( rminvec[ copyNo ]);
415 newRmin.push_back( rminvec[ copyNo + 1 ]);
416 newRmax.push_back( rmaxvec[ copyNo ]);
417 newRmax.push_back( rmaxvec[ copyNo + 1 ]);
428 DCOUT_V(
'P',
"DDDividedPolyhedraZ::makeDDLogicalPart" <<
"\n-- Parametrised phedra copy-number: " << copyNo <<
"\n-- DDLogicalPart " << lp );
virtual void checkParametersValidity()
def_type isDefined() const
DDDividedPolyhedraRho(const DDDivision &div, DDCompactView *cpv)
const int nReplicas() const
std::vector< double > zVec() 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.
std::vector< double > rMinVec() const
virtual double getMaxParameter() const
virtual void checkParametersValidity()
int calculateNDiv(double motherDim, double width, double offset) const
An exception for DDD errors.
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
type of data representation of DDCompactView
const DDMaterial & material() const
Returns a reference object of the material this LogicalPart is made of.
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)
virtual void checkParametersValidity()
virtual ~DDDividedPolyhedraZ()
#define DCOUT_V(M_v_Y, M_v_S)
const double width() const
virtual ~DDDividedPolyhedraPhi()
virtual double getMaxParameter() const
std::vector< double > rMaxVec() const
virtual DDTranslation makeDDTranslation(const int copyNo) const
const DDSolid & solid() const
Returns a reference object of the solid being the shape of this LogicalPart.
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
virtual DDRotation makeDDRotation(const int copyNo) const
const double offset() 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) //! Creates a polycone (refere to Gean...
virtual double getMaxParameter() const
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
DDRotationMatrix * changeRotMatrix(double rotZ=0.) const