37 os << *(defined.first) <<
" ";
40 solid.
rep().stream(
os);
42 os <<
"* solid not defined * ";
45 os <<
"* solid not declared * ";
59 std::unique_ptr<DDI::Solid> solid(
nullptr);
60 std::vector<double>
dummy;
63 solid = std::make_unique<DDI::Box>(0, 0, 0);
66 solid = std::make_unique<DDI::Tubs>(0, 0, 0, 0, 0);
69 solid = std::make_unique<DDI::Cons>(0, 0, 0, 0, 0, 0, 0);
72 solid = std::make_unique<DDI::PseudoTrap>(0, 0, 0, 0, 0, 0,
false);
75 solid = std::make_unique<DDI::Shapeless>();
78 solid = std::make_unique<DDI::Trap>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
81 solid = std::make_unique<DDI::Polyhedra>(0, 0, 0,
dummy,
dummy);
87 solid = std::make_unique<DDI::Polycone>(0, 0,
dummy,
dummy);
93 solid = std::make_unique<DDI::TruncTubs>(0, 0, 0, 0, 0, 0, 0,
false);
96 solid = std::make_unique<DDI::Torus>(0, 0, 0, 0, 0);
99 solid = std::make_unique<DDI::Sphere>(0, 0, 0, 0, 0, 0);
102 solid = std::make_unique<DDI::EllipticalTube>(0, 0, 0);
105 solid = std::make_unique<DDI::CutTubs>(0., 0., 0., 0., 0., 0., 0., 1., 0., 0., -1.);
111 solid = std::make_unique<DDI::Assembly>();
115 <<
"DDSolid::DDSolid( DDName, DDSolidShape, std::vector<double> ): wrong shape.";
117 solid->setParameters(pars);
129 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDTrap.\n";
130 ex = ex +
"Use a different solid interface!";
159 edm::LogError(
"DDSolid") <<
"s.shape()=" <<
s.shape() <<
" " <<
s.name() << std::endl;
160 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDTruncTubs\n";
161 ex = ex +
"Use a different solid interface!";
184 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDPseudoTrap\n";
185 ex = ex +
"Use a different solid interface!";
206 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDBox.\n";
207 ex = ex +
"Use a different solid interface!";
220 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDShapelessSolid.\n";
221 ex = ex +
"Use a different solid interface!";
228 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDUnion.\n";
229 ex = ex +
"Use a different solid interface!";
236 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDIntersection.\n";
237 ex = ex +
"Use a different solid interface!";
244 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDSubtraction.\n";
245 ex = ex +
"Use a different solid interface!";
256 edm::LogError(
"DDSolid") <<
"Could not find equal sized components of std::vectors in a PolySolid description." 257 <<
"rep().parameters().size()=" <<
rep().parameters().size() <<
" numVecs=" << numVecs
258 <<
" offset=" <<
offset << std::endl;
260 std::vector<double> tvec;
269 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDPolycone.\n";
270 ex = ex +
"Use a different solid interface!";
280 std::vector<double> tvec;
294 std::vector<double> tvec;
301 std::vector<double> tvec;
309 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDPolyhedra.\n";
310 ex = ex +
"Use a different solid interface!";
322 std::vector<double> tvec;
336 std::vector<double> tvec;
343 std::vector<double> tvec;
351 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDExtrudedPolygon.\n";
352 ex = ex +
"Use a different solid interface!";
375 return rep().parameters()[0];
379 return std::vector<double>(
rep().parameters().begin() + 1,
rep().parameters().begin() + 1 +
xyPointsSize());
383 return std::vector<double>(
rep().parameters().begin() + 1 +
xyPointsSize(),
403 return std::vector<double>(
rep().parameters().end() -
zSectionsSize(),
rep().parameters().end());
408 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDCons.\n";
409 ex = ex +
"Use a different solid interface!";
430 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDTorus.\n";
431 ex = ex +
"Use a different solid interface!";
448 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDTubs.\n";
449 ex = ex +
"Use a different solid interface!";
476 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDSphere (or sphere section).\n";
477 ex = ex +
"Use a different solid interface!";
496 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDEllipticalTube.\n";
497 ex = ex +
"Use a different solid interface!";
510 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDCutTubs.\n";
511 ex = ex +
"Use a different solid interface!";
527 return std::array<double, 3>{{
rep().parameters()[5],
rep().parameters()[6],
rep().parameters()[7]}};
531 return std::array<double, 3>{{
rep().parameters()[8],
rep().parameters()[9],
rep().parameters()[10]}};
536 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDAssembly.\n";
537 ex = ex +
"Use a different solid interface!";
548 return DDSolid(
name, std::make_unique<DDI::Box>(xHalf, yHalf, zHalf));
554 const std::vector<double>&
z,
555 const std::vector<double>& rmin,
556 const std::vector<double>& rmax) {
561 const DDName&
name,
double startPhi,
double deltaPhi,
const std::vector<double>&
z,
const std::vector<double>&
r) {
569 const std::vector<double>&
z,
570 const std::vector<double>& rmin,
571 const std::vector<double>& rmax) {
572 return DDSolid(
name, std::make_unique<DDI::Polyhedra>(sides, startPhi,
deltaPhi,
z, rmin, rmax));
579 const std::vector<double>&
z,
580 const std::vector<double>&
r) {
585 const std::vector<double>&
x,
586 const std::vector<double>&
y,
587 const std::vector<double>&
z,
588 const std::vector<double>& zx,
589 const std::vector<double>& zy,
590 const std::vector<double>& zscale) {
591 return DDSolid(
name, std::make_unique<DDI::ExtrudedPolygon>(
x,
y,
z, zx, zy, zscale));
622 std::make_unique<DDI::Trap>(pDz, pTheta, pPhi, pDy1, pDx1, pDx2, pAlp1, pDy2, pDx3, pDx4, pAlp2));
634 return DDSolid(
name, std::make_unique<DDI::PseudoTrap>(pDx1, pDx2, pDy1, pDy2, pDz,
radius, atMinusZ));
647 name, std::make_unique<DDI::TruncTubs>(zHalf, rIn, rOut, startPhi,
deltaPhi, cutAtStart, cutAtDelta, cutInside));
659 std::make_unique<DDI::Cons>(zhalf, rInMinusZ, rOutMinusZ, rInPlusZ, rOutPlusZ, phiFrom,
deltaPhi));
668 const DDName&
name,
double zhalf,
double rIn,
double rOut,
double phiFrom,
double deltaPhi) {
684 return DDSolid(
name, std::make_unique<DDI::CutTubs>(zhalf, rIn, rOut, phiFrom,
deltaPhi, lx, ly, lz, tx, ty, tz));
699 return DDSolid(
name, std::make_unique<DDI::EllipticalTube>(xSemiAxis, ySemiAxis, zHeight));
DDPseudoTrap(void)=delete
DDExtrudedPolygon(void)=delete
static DDSolid torus(const DDName &name, double rMin, double rMax, double rTorus, double startPhi, double deltaPhi)
const DDSolid & b() const
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
DDSolid solidA(void) const
DDRotation rotation(void) const
std::vector< double > yVec(void) const
std::vector< double > zscaleVec(void) const
double zHeight(void) const
std::vector< double > rMinVec(void) const
const DDRotation & r() const
double outerRadius(void) const
double startPhi(void) const
angular start of the tube-section
static DDSolid pseudoTrap(const DDName &name, double pDx1, double pDx2, double pDy1, double pDy2, double pDz, double radius, bool atMinusZ)
double rInPlusZ(void) const
Abstract class for DDPolycone and DDPolyhedra. Basically a common member function.
std::vector< double > xVec(void) const
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
std::vector< double > rMinVec(void) const
std::vector< double > zVec(void) const
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
double volume(void) const
Returns the volume of the given solid (does not work with boolean soids !)
double deltaPhi(void) const
double rOutMinusZ(void) const
std::vector< double > rMaxVec(void) const
double ySemiAxis(void) const
std::array< double, 3 > highNorm(void) const
double innerRadius(void) const
auto xyPointsSize(void) const -> std::size_t
double cutAtStart(void) const
truncation at begin of the tube-section
double phi(void) const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
double halfZ(void) const
half of the z-Axis
DDName is used to identify DDD entities uniquely.
std::array< double, 3 > lowNorm(void) const
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
bool cutInside(void) const
true, if truncation is on the inner side of the tube-section
Log< level::Error, false > LogError
const DDI::rep_traits< N, C >::reference rep() const
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
DDIntersection(void)=delete
const DDI::BooleanSolid & boolean_
A DDSolid represents the shape of a part.
std::vector< double > zVec(void) const
Represents a uniquely identifyable rotation matrix.
double startPhi(void) const
static DDSolid cuttubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi, double lx, double ly, double lz, double tx, double ty, double tz)
double halfZ(void) const
half of the z-Axis
double startTheta(void) const
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
static const char *const name(DDSolidShape s)
DDTranslation translation(void) const
double x2(void) const
half length along x on +z
double phiFrom(void) const
static DDSolid intersection(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
const DDSolid & a() const
double y2(void) const
half length along y on +z
static DDSolid sphere(const DDName &name, double innerRadius, double outerRadius, double startPhi, double deltaPhi, double startTheta, double deltaTheta)
double zHalf(void) const
half of the z-Axis
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
std::ostream & operator<<(std::ostream &os, const DDSolidShape s)
double deltaPhi(void) const
static DDSolid assembly(const DDName &name)
Creates an assembly.
double y2(void) const
Half-length along y of the face at +pDz.
std::vector< double > rVec(void) const
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
double deltaPhi(void) const
DDSolid solidB(void) const
static DDSolid truncTubs(const DDName &name, double zHalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
std::vector< double > zxVec(void) const
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
double rInMinusZ(void) const
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
DDSolidShape shape(void) const
The type of the solid.
double rIn(void) const
inner radius
const DDName & name() const
double rOutPlusZ(void) const
std::vector< double > zyVec(void) const
double deltaTheta(void) const
double deltaPhi(void) const
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
static DDSolid ellipticalTube(const DDName &name, double xSemiAxis, double ySemiAxis, double zHeight)
double rOut(void) const
outer radius
static DDSolid extrudedpolygon(const DDName &name, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, const std::vector< double > &zx, const std::vector< double > &zy, const std::vector< double > &zscale)
double x1(void) const
half length along x on -z
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
double startPhi(void) const
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
double deltaPhi(void) const
double startPhi(void) const
auto zSectionsSize(void) const -> std::size_t
double alpha2(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of t...
static DDSolid shapeless(const DDName &name)
DDEllipticalTube(void)=delete
std::vector< double > zVec(void) const
double startPhi(void) const
DDShapelessSolid(void)=delete
std::vector< double > rVec(void) const
std::vector< double > rMaxVec(void) const
double xSemiAxis(void) const
double deltaPhi(void) const
angular span of the tube-section
double deltaPhi(void) const
std::pair< const N *, bool > def_type
double y1(void) const
Half-length along y of the face at -pDz.
DDBooleanSolid(void)=delete
DDSubtraction(void)=delete
DDSolid(void)
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of ...
static DDSolid unionSolid(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
const DDTranslation & t() const
double startPhi(void) const
double deltaPhi(void) const
double rTorus(void) const
double startPhi(void) const
def_type isDefined() const
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
double y1(void) const
half length along y on -z
double theta(void) const
Polar angle of the line joining the centres of the faces at -/+pDz.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
double cutAtDelta(void) const
truncation at end of the tube-section
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 x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
void create(const DDName &name, std::unique_ptr< DDI::Solid > vals)