|
|
Go to the documentation of this file.
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) {
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) {
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]);
DDLogicalPart makeDDLogicalPart(int copyNo) const override
DDDividedPolyhedraRho(const DDDivision &div, DDCompactView *cpv)
std::vector< double > rMaxVec(void) const
DDName is used to identify DDD entities uniquely.
def_type isDefined() const
std::vector< double > zVec(void) const
DDRotation makeDDRotation(int copyNo) const override
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::vector< double > rMinVec(void) const
DDDividedPolyhedraZ(const DDDivision &div, DDCompactView *cpv)
DDRotation makeDDRotation(int copyNo) const override
void checkParametersValidity() override
double getMaxParameter() const override
DDDividedPolyhedraPhi(const DDDivision &div, DDCompactView *cpv)
void checkParametersValidity() override
DDMaterial is used to define and access material information.
DDLogicalPart makeDDLogicalPart(int copyNo) const override
virtual void checkParametersValidity(void)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
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)
Compact representation of the geometrical detector hierarchy.
int calculateNDiv(double motherDim, double width, double offset) const
std::unique_ptr< DDRotationMatrix > changeRotMatrix(double rotZ=0.) const
DDLogicalPart makeDDLogicalPart(int copyNo) const override
DDTranslation makeDDTranslation(int copyNo) const override
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
DivisionType divisionType_
DDTranslation makeDDTranslation(int copyNo) const override
virtual void setType(const std::string &type)
void checkParametersValidity() override
const std::string & name() const
Returns the name.
DDRotation makeDDRotation(int copyNo) const override
double deltaPhi(void) const
double getMaxParameter() const override
const std::string & ns() const
Returns the namespace.
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
DDTranslation makeDDTranslation(int copyNo) const override
double startPhi(void) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
const DDLogicalPart & parent() const
double getMaxParameter() const override
double calculateWidth(double motherDim, int nDiv, double offset) const