2 #include "CLHEP/Units/GlobalSystemOfUnits.h" 3 #include "CLHEP/Units/SystemOfUnits.h" 26 setType(
"DivisionPolyhedraRho" );
54 <<
"DDDividedPolyhedraRho::checkParametersValidity()" 56 <<
" Solid " << msol << std::endl
57 <<
" Division along R will be done with a width " 58 <<
"different for each solid section." << std::endl
59 <<
" WIDTH will not be used !" << std::endl;
64 <<
"DDDividedPolyhedraRho::checkParametersValidity()" 66 <<
" Solid " << msol << std::endl
67 <<
" Division along R will be done with a width " 68 <<
"different for each solid section." << std::endl
69 <<
" OFFSET will not be used !" << std::endl;
98 std::vector<double> localrMaxVec = msol.
rMaxVec();
99 std::vector<double> localrMinVec = msol.
rMinVec();
100 std::vector<double> localzVec = msol.
zVec();
101 std::vector<double> newrMinVec;
102 std::vector<double> newrMaxVec;
103 int nZplanes = localzVec.size();
106 for(
int ii = 0;
ii < nZplanes; ++
ii)
113 newrMinVec[
ii] = localrMinVec[
ii] +
div_.
offset() + width * copyNo;
114 newrMaxVec[
ii] = localrMaxVec[
ii] +
div_.
offset() + width * (copyNo + 1);
138 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.";
245 if (!dsol.isDefined().second)
256 if (!ddlp.isDefined().second)
265 setType(
"DivisionPolyhedraZ" );
269 std::vector<double> zvec = msol.
zVec();
291 std::vector<double> zvec = msol.
zVec();
292 return (zvec[zvec.size() - 1] - zvec[0]);
305 <<
"DDDividedPolyhedraZ::checkParametersValidity()" 307 <<
" Solid " << msol << std::endl
308 <<
" Division along Z will be done splitting " 309 <<
"in the defined z_planes." << std::endl
310 <<
" WIDTH will not be used !" << std::endl;
316 <<
"DDDividedPolyhedraZ::checkParametersValidity()" 318 <<
" Solid " << msol << std::endl
319 <<
" Division along Z will be done splitting " 320 <<
"in the defined z_planes." << std::endl
321 <<
" OFFSET will not be used !" << std::endl;
324 std::vector<double> zvec = msol.
zVec();
326 if ( zvec.size() - 1 != size_t(
compNDiv_) )
329 <<
"DDDividedPolyhedraZ::checkParametersValidity()" 331 <<
" Division along Z can only be done by splitting in the defined" 333 <<
" z_planes, i.e, the number of division would be :" 334 <<
" " << zvec.size() - 1
337 std::string s =
"DDDividedPolyhedraZ::checkParametersValidity()";
338 s +=
"Illegal Construct. Not a supported configuration.";
347 std::vector<double> zvec = msol.
zVec();
350 double posi = (zvec[copyNo] + zvec[copyNo+1])/2;
371 std::vector<double> zvec = msol.
zVec();
372 std::vector<double> rminvec = msol.
rMinVec();
373 std::vector<double> rmaxvec = msol.
rMaxVec();
375 double posi = ( zvec[ copyNo ] + zvec[ copyNo + 1 ] ) / 2.0;
379 std::vector<double> newRmin, newRmax, newZ;
380 newZ.emplace_back( zvec[ copyNo ] - posi );
381 newZ.emplace_back( zvec[ copyNo + 1 ] - posi );
382 newRmin.emplace_back( rminvec[ copyNo ]);
383 newRmin.emplace_back( rminvec[ copyNo + 1 ]);
384 newRmax.emplace_back( rmaxvec[ copyNo ]);
385 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.
type of data representation of DDCompactView
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::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
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)
double getMaxParameter() const override
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
DDRotationMatrix * changeRotMatrix(double rotZ=0.) const