|
|
Go to the documentation of this file.
36 os << *(defined.first) <<
" ";
39 solid.
rep().stream(os);
41 os <<
"* solid not defined * ";
44 os <<
"* solid not declared * ";
58 std::unique_ptr<DDI::Solid> solid(
nullptr);
59 std::vector<double>
dummy;
62 solid = std::make_unique<DDI::Box>(0, 0, 0);
65 solid = std::make_unique<DDI::Tubs>(0, 0, 0, 0, 0);
68 solid = std::make_unique<DDI::Cons>(0, 0, 0, 0, 0, 0, 0);
71 solid = std::make_unique<DDI::PseudoTrap>(0, 0, 0, 0, 0, 0,
false);
74 solid = std::make_unique<DDI::Shapeless>();
77 solid = std::make_unique<DDI::Trap>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
80 solid = std::make_unique<DDI::Polyhedra>(0, 0, 0,
dummy,
dummy);
86 solid = std::make_unique<DDI::Polycone>(0, 0,
dummy,
dummy);
92 solid = std::make_unique<DDI::TruncTubs>(0, 0, 0, 0, 0, 0, 0,
false);
95 solid = std::make_unique<DDI::Torus>(0, 0, 0, 0, 0);
98 solid = std::make_unique<DDI::Sphere>(0, 0, 0, 0, 0, 0);
101 solid = std::make_unique<DDI::EllipticalTube>(0, 0, 0);
104 solid = std::make_unique<DDI::CutTubs>(0., 0., 0., 0., 0., 0., 0., 1., 0., 0., -1.);
111 <<
"DDSolid::DDSolid( DDName, DDSolidShape, std::vector<double> ): wrong shape.";
113 solid->setParameters(pars);
125 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDTrap.\n";
126 ex = ex +
"Use a different solid interface!";
155 edm::LogError(
"DDSolid") <<
"s.shape()=" <<
s.shape() <<
" " <<
s.name() << std::endl;
156 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDTruncTubs\n";
157 ex = ex +
"Use a different solid interface!";
180 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDPseudoTrap\n";
181 ex = ex +
"Use a different solid interface!";
202 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDBox.\n";
203 ex = ex +
"Use a different solid interface!";
216 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDShapelessSolid.\n";
217 ex = ex +
"Use a different solid interface!";
224 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDUnion.\n";
225 ex = ex +
"Use a different solid interface!";
232 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDIntersection.\n";
233 ex = ex +
"Use a different solid interface!";
240 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is no DDSubtraction.\n";
241 ex = ex +
"Use a different solid interface!";
252 edm::LogError(
"DDSolid") <<
"Could not find equal sized components of std::vectors in a PolySolid description."
253 <<
"rep().parameters().size()=" <<
rep().parameters().size() <<
" numVecs=" << numVecs
254 <<
" offset=" <<
offset << std::endl;
256 std::vector<double> tvec;
265 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDPolycone.\n";
266 ex = ex +
"Use a different solid interface!";
276 std::vector<double> tvec;
290 std::vector<double> tvec;
297 std::vector<double> tvec;
305 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDPolyhedra.\n";
306 ex = ex +
"Use a different solid interface!";
318 std::vector<double> tvec;
332 std::vector<double> tvec;
339 std::vector<double> tvec;
347 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDExtrudedPolygon.\n";
348 ex = ex +
"Use a different solid interface!";
371 return rep().parameters()[0];
404 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDCons.\n";
405 ex = ex +
"Use a different solid interface!";
426 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDTorus.\n";
427 ex = ex +
"Use a different solid interface!";
444 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDTubs.\n";
445 ex = ex +
"Use a different solid interface!";
472 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDSphere (or sphere section).\n";
473 ex = ex +
"Use a different solid interface!";
492 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDEllipticalTube.\n";
493 ex = ex +
"Use a different solid interface!";
506 std::string ex =
"Solid [" +
s.name().ns() +
":" +
s.name().name() +
"] is not a DDCutTubs.\n";
507 ex = ex +
"Use a different solid interface!";
523 return std::array<double, 3>{{
rep().parameters()[5],
rep().parameters()[6],
rep().parameters()[7]}};
527 return std::array<double, 3>{{
rep().parameters()[8],
rep().parameters()[9],
rep().parameters()[10]}};
534 return DDSolid(
name, std::make_unique<DDI::Box>(xHalf, yHalf, zHalf));
540 const std::vector<double>&
z,
541 const std::vector<double>& rmin,
542 const std::vector<double>& rmax) {
547 const DDName&
name,
double startPhi,
double deltaPhi,
const std::vector<double>&
z,
const std::vector<double>&
r) {
555 const std::vector<double>&
z,
556 const std::vector<double>& rmin,
557 const std::vector<double>& rmax) {
558 return DDSolid(
name, std::make_unique<DDI::Polyhedra>(sides, startPhi,
deltaPhi,
z, rmin, rmax));
565 const std::vector<double>&
z,
566 const std::vector<double>&
r) {
571 const std::vector<double>&
x,
572 const std::vector<double>&
y,
573 const std::vector<double>&
z,
574 const std::vector<double>& zx,
575 const std::vector<double>& zy,
576 const std::vector<double>& zscale) {
577 return DDSolid(
name, std::make_unique<DDI::ExtrudedPolygon>(
x,
y,
z, zx, zy, zscale));
608 std::make_unique<DDI::Trap>(pDz, pTheta, pPhi, pDy1, pDx1, pDx2, pAlp1, pDy2, pDx3, pDx4, pAlp2));
620 return DDSolid(
name, std::make_unique<DDI::PseudoTrap>(pDx1, pDx2, pDy1, pDy2, pDz,
radius, atMinusZ));
633 name, std::make_unique<DDI::TruncTubs>(zHalf, rIn, rOut, startPhi,
deltaPhi, cutAtStart, cutAtDelta, cutInside));
645 std::make_unique<DDI::Cons>(zhalf, rInMinusZ, rOutMinusZ, rInPlusZ, rOutPlusZ, phiFrom,
deltaPhi));
654 const DDName&
name,
double zhalf,
double rIn,
double rOut,
double phiFrom,
double deltaPhi) {
670 return DDSolid(
name, std::make_unique<DDI::CutTubs>(zhalf, rIn, rOut, phiFrom,
deltaPhi, lx, ly, lz, tx, ty, tz));
685 return DDSolid(
name, std::make_unique<DDI::EllipticalTube>(xSemiAxis, ySemiAxis, zHeight));
DDSolid solidB(void) const
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
std::pair< const N *, bool > def_type
DDPseudoTrap(void)=delete
std::vector< double > rMaxVec(void) const
double phi(void) const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
DDExtrudedPolygon(void)=delete
double halfZ(void) const
half of the z-Axis
double startPhi(void) const
angular start of the tube-section
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
double y2(void) const
half length along y on +z
std::vector< double > yVec(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.
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
DDName is used to identify DDD entities uniquely.
def_type isDefined() const
std::vector< double > zVec(void) const
double startPhi(void) const
double innerRadius(void) const
DDSubtraction(void)=delete
double deltaPhi(void) const
double x2(void) const
half length along x on +z
DDRotation rotation(void) const
std::vector< double > rMinVec(void) const
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)
double deltaPhi(void) const
double phiFrom(void) const
double rInMinusZ(void) const
double cutAtStart(void) const
truncation at begin of the tube-section
auto xyPointsSize(void) const -> std::size_t
const DDRotation & r() const
std::vector< double > zVec(void) const
double rInPlusZ(void) const
double startPhi(void) const
double deltaTheta(void) const
bool cutInside(void) const
true, if truncation is on the inner side of the tube-section
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
double deltaPhi(void) const
double zHalf(void) const
half of the z-Axis
DDSolidShape shape(void) const
The type of the solid.
DDEllipticalTube(void)=delete
DDTranslation translation(void) const
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
static DDSolid truncTubs(const DDName &name, double zHalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
DDIntersection(void)=delete
const DDSolid & a() const
double rOutMinusZ(void) const
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)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
double y1(void) const
Half-length along y of the face at -pDz.
double rTorus(void) const
double zHeight(void) const
double startTheta(void) const
double theta(void) const
Polar angle of the line joining the centres of the faces at -/+pDz.
const DDName & name() const
std::vector< double > zVec(void) const
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
const DDI::rep_traits< N, C >::reference rep() const
double xSemiAxis(void) const
DDShapelessSolid(void)=delete
std::vector< double > rMaxVec(void) const
Abstract class for DDPolycone and DDPolyhedra. Basically a common member function.
double y1(void) const
half length along y on -z
static const char *const name(DDSolidShape s)
std::array< double, 3 > lowNorm(void) const
double deltaPhi(void) const
static DDSolid intersection(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
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 ySemiAxis(void) const
static DDSolid ellipticalTube(const DDName &name, double xSemiAxis, double ySemiAxis, double zHeight)
double rIn(void) const
inner radius
std::array< double, 3 > highNorm(void) const
double outerRadius(void) const
std::vector< double > zxVec(void) const
double x1(void) const
half length along x on -z
double startPhi(void) const
const DDSolid & b() const
const DDTranslation & t() 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)
std::vector< double > rVec(void) const
static DDSolid shapeless(const DDName &name)
std::vector< double > zyVec(void) const
static DDSolid unionSolid(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
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 deltaPhi(void) const
double halfZ(void) const
half of the z-Axis
static DDSolid torus(const DDName &name, double rMin, double rMax, double rTorus, double startPhi, double deltaPhi)
double y2(void) const
Half-length along y of the face at +pDz.
double startPhi(void) const
double deltaPhi(void) const
angular span of the tube-section
double startPhi(void) const
static DDSolid pseudoTrap(const DDName &name, double pDx1, double pDx2, double pDy1, double pDy2, double pDz, double radius, bool atMinusZ)
double cutAtDelta(void) const
truncation at end of the tube-section
void create(const DDName &name, std::unique_ptr< DDI::Solid > vals)
auto zSectionsSize(void) const -> std::size_t
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
double rOut(void) const
outer radius
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
static DDSolid sphere(const DDName &name, double innerRadius, double outerRadius, double startPhi, double deltaPhi, double startTheta, double deltaTheta)
DDSolid solidA(void) const
double rOutPlusZ(void) const
const DDI::BooleanSolid & boolean_
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 startPhi(void) const
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 box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
DDBooleanSolid(void)=delete
std::vector< double > rMinVec(void) const
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)
double deltaPhi(void) const
std::vector< double > rVec(void) const
std::ostream & operator<<(std::ostream &os, const DDSolidShape s)
DDSolid(void)
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of ...
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
double volume(void) const
Returns the volume of the given solid (does not work with boolean soids !)
std::vector< double > zscaleVec(void) const