27 setType(
"DivisionPolyhedraRho" );
55 <<
"DDDividedPolyhedraRho::checkParametersValidity()" 57 <<
" Solid " << msol << std::endl
58 <<
" Division along R will be done with a width " 59 <<
"different for each solid section." << std::endl
60 <<
" WIDTH will not be used !" << std::endl;
65 <<
"DDDividedPolyhedraRho::checkParametersValidity()" 67 <<
" Solid " << msol << std::endl
68 <<
" Division along R will be done with a width " 69 <<
"different for each solid section." << std::endl
70 <<
" OFFSET will not be used !" << std::endl;
99 std::vector<double> localrMaxVec = msol.
rMaxVec();
100 std::vector<double> localrMinVec = msol.
rMinVec();
101 std::vector<double> localzVec = msol.
zVec();
102 std::vector<double> newrMinVec;
103 std::vector<double> newrMaxVec;
104 int nZplanes = localzVec.size();
107 for(
int ii = 0;
ii < nZplanes; ++
ii)
114 newrMinVec[
ii] = localrMinVec[
ii] +
div_.
offset() + width * copyNo;
115 newrMaxVec[
ii] = localrMaxVec[
ii] +
div_.
offset() + width * (copyNo + 1);
139 setType(
"DivisionPolyhedraPhi" );
180 <<
"DDDividedPolyhedraPhi::checkParametersValidity()" 182 <<
" Solid " << msol << std::endl
183 <<
" Division along PHI will be done splitting " 184 <<
"in the defined numSide." << std::endl
185 <<
" WIDTH will not be used !" << std::endl;
190 <<
"DDDividedPolyhedraPhi::checkParametersValidity()" 192 <<
" Solid " << msol << std::endl
193 <<
" Division along PHI will be done splitting " 194 <<
"in the defined numSide." << std::endl
195 <<
" OFFSET will not be used !" << std::endl;
201 <<
"DDDividedPolyhedraPhi::checkParametersValidity()" 203 <<
" Division along PHI will be done splitting in the defined" 205 <<
" numSide, i.e, the number of division would be :" 206 <<
" " << msol.
sides()
209 std::string s =
"DDDividedPolyhedraPhi::checkParametersValidity() Not supported configuration.";
226 "_DIVCHILD_ROT" + std::to_string( copyNo ),
242 if (!dsol.isDefined().second)
253 if (!ddlp.isDefined().second)
262 setType(
"DivisionPolyhedraZ" );
266 std::vector<double> zvec = msol.
zVec();
286 std::vector<double> zvec = msol.
zVec();
287 return (zvec[zvec.size() - 1] - zvec[0]);
300 <<
"DDDividedPolyhedraZ::checkParametersValidity()" 302 <<
" Solid " << msol << std::endl
303 <<
" Division along Z will be done splitting " 304 <<
"in the defined z_planes." << std::endl
305 <<
" WIDTH will not be used !" << std::endl;
311 <<
"DDDividedPolyhedraZ::checkParametersValidity()" 313 <<
" Solid " << msol << std::endl
314 <<
" Division along Z will be done splitting " 315 <<
"in the defined z_planes." << std::endl
316 <<
" OFFSET will not be used !" << std::endl;
319 std::vector<double> zvec = msol.
zVec();
321 if ( zvec.size() - 1 != size_t(
compNDiv_) )
324 <<
"DDDividedPolyhedraZ::checkParametersValidity()" 326 <<
" Division along Z can only be done by splitting in the defined" 328 <<
" z_planes, i.e, the number of division would be :" 329 <<
" " << zvec.size() - 1
332 std::string s =
"DDDividedPolyhedraZ::checkParametersValidity()";
333 s +=
"Illegal Construct. Not a supported configuration.";
342 std::vector<double> zvec = msol.
zVec();
345 double posi = (zvec[copyNo] + zvec[copyNo+1])/2;
366 std::vector<double> zvec = msol.
zVec();
367 std::vector<double> rminvec = msol.
rMinVec();
368 std::vector<double> rmaxvec = msol.
rMaxVec();
370 double posi = ( zvec[ copyNo ] + zvec[ copyNo + 1 ] ) / 2.0;
374 std::vector<double> newRmin, newRmax, newZ;
375 newZ.emplace_back( zvec[ copyNo ] - posi );
376 newZ.emplace_back( zvec[ copyNo + 1 ] - posi );
377 newRmin.emplace_back( rminvec[ copyNo ]);
378 newRmin.emplace_back( rminvec[ copyNo + 1 ]);
379 newRmax.emplace_back( rmaxvec[ copyNo ]);
380 newRmax.emplace_back( rmaxvec[ copyNo + 1 ]);
double startPhi(void) const
DDRotation makeDDRotation(int copyNo) const override
void checkParametersValidity() override
DDTranslation makeDDTranslation(int copyNo) const override
DDDividedPolyhedraRho(const DDDivision &div, DDCompactView *cpv)
double getMaxParameter() const override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
std::vector< double > rMaxVec(void) const
DDMaterial is used to define and access material information.
int calculateNDiv(double motherDim, double width, double offset) const
DDTranslation makeDDTranslation(int copyNo) const override
double getMaxParameter() const override
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
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Compact representation of the geometrical detector hierarchy.
DDRotation makeDDRotation(int copyNo) const override
void checkParametersValidity() override
A DDSolid represents the shape of a part.
virtual void checkParametersValidity(void)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
void checkParametersValidity() override
DivisionType divisionType_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
DDRotation makeDDRotation(int copyNo) const override
virtual void setType(const std::string &type)
std::vector< double > rMinVec(void) const
DDLogicalPart makeDDLogicalPart(int copyNo) const override
std::unique_ptr< DDRotationMatrix > changeRotMatrix(double rotZ=0.) const
std::vector< double > zVec(void) const
DDTranslation makeDDTranslation(int copyNo) const override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
double deltaPhi(void) const
const DDLogicalPart & parent() const
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)
double getMaxParameter() const override
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.