26 setType(
"DivisionPolyhedraRho");
44 <<
"DDDividedPolyhedraRho::checkParametersValidity()" << std::endl
45 <<
" Solid " << msol << std::endl
46 <<
" Division along R will be done with a width " 47 <<
"different for each solid section." << std::endl
48 <<
" WIDTH will not be used !" << std::endl;
52 <<
"DDDividedPolyhedraRho::checkParametersValidity()" << std::endl
53 <<
" Solid " << msol << std::endl
54 <<
" Division along R will be done with a width " 55 <<
"different for each solid section." << std::endl
56 <<
" OFFSET will not be used !" << std::endl;
73 std::vector<double> localrMaxVec = msol.
rMaxVec();
74 std::vector<double> localrMinVec = msol.
rMinVec();
75 std::vector<double> localzVec = msol.
zVec();
76 std::vector<double> newrMinVec;
77 std::vector<double> newrMaxVec;
78 int nZplanes = localzVec.size();
81 for (
int ii = 0;
ii < nZplanes; ++
ii) {
87 newrMinVec[
ii] = localrMinVec[
ii] +
div_.
offset() + width * copyNo;
88 newrMaxVec[
ii] = localrMaxVec[
ii] +
div_.
offset() + width * (copyNo + 1);
105 setType(
"DivisionPolyhedraPhi");
138 <<
"DDDividedPolyhedraPhi::checkParametersValidity()" << std::endl
139 <<
" Solid " << msol << std::endl
140 <<
" Division along PHI will be done splitting " 141 <<
"in the defined numSide." << std::endl
142 <<
" WIDTH will not be used !" << std::endl;
146 <<
"DDDividedPolyhedraPhi::checkParametersValidity()" << std::endl
147 <<
" Solid " << msol << std::endl
148 <<
" Division along PHI will be done splitting " 149 <<
"in the defined numSide." << std::endl
150 <<
" OFFSET will not be used !" << std::endl;
155 <<
"DDDividedPolyhedraPhi::checkParametersValidity()" << std::endl
156 <<
" Division along PHI will be done splitting in the defined" << std::endl
157 <<
" numSide, i.e, the number of division would be :" 158 <<
" " << msol.
sides() <<
" instead of " <<
compNDiv_ <<
" !" << std::endl;
159 std::string s =
"DDDividedPolyhedraPhi::checkParametersValidity() Not supported configuration.";
182 if (!dsol.isDefined().second) {
187 if (!ddlp.isDefined().second)
199 std::vector<double> zvec = msol.
zVec();
211 std::vector<double> zvec = msol.
zVec();
212 return (zvec[zvec.size() - 1] - zvec[0]);
222 <<
"DDDividedPolyhedraZ::checkParametersValidity()" << std::endl
223 <<
" Solid " << msol << std::endl
224 <<
" Division along Z will be done splitting " 225 <<
"in the defined z_planes." << std::endl
226 <<
" WIDTH will not be used !" << std::endl;
231 <<
"DDDividedPolyhedraZ::checkParametersValidity()" << std::endl
232 <<
" Solid " << msol << std::endl
233 <<
" Division along Z will be done splitting " 234 <<
"in the defined z_planes." << std::endl
235 <<
" OFFSET will not be used !" << std::endl;
238 std::vector<double> zvec = msol.
zVec();
240 if (zvec.size() - 1 != size_t(
compNDiv_)) {
242 <<
"DDDividedPolyhedraZ::checkParametersValidity()" << std::endl
243 <<
" Division along Z can only be done by splitting in the defined" << std::endl
244 <<
" z_planes, i.e, the number of division would be :" 245 <<
" " << zvec.size() - 1 <<
" instead of " <<
compNDiv_ <<
" !" << std::endl;
246 std::string s =
"DDDividedPolyhedraZ::checkParametersValidity()";
247 s +=
"Illegal Construct. Not a supported configuration.";
254 std::vector<double> zvec = msol.
zVec();
257 double posi = (zvec[copyNo] + zvec[copyNo + 1]) / 2;
272 std::vector<double> zvec = msol.
zVec();
273 std::vector<double> rminvec = msol.
rMinVec();
274 std::vector<double> rmaxvec = msol.
rMaxVec();
276 double posi = (zvec[copyNo] + zvec[copyNo + 1]) / 2.0;
279 std::vector<double> newRmin, newRmax, newZ;
280 newZ.emplace_back(zvec[copyNo] - posi);
281 newZ.emplace_back(zvec[copyNo + 1] - posi);
282 newRmin.emplace_back(rminvec[copyNo]);
283 newRmin.emplace_back(rminvec[copyNo + 1]);
284 newRmax.emplace_back(rmaxvec[copyNo]);
285 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
ROOT::Math::Rotation3D DDRotation
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.