40 os << *(defined.first) <<
" ";
43 solid.
rep().stream(os);
46 os <<
"* solid not defined * ";
50 os <<
"* solid not declared * ";
72 std::unique_ptr<DDI::Solid> solid(
nullptr );
73 std::vector<double>
dummy;
76 solid = std::make_unique< DDI::Box >( 0, 0, 0 );
79 solid = std::make_unique< DDI::Tubs >( 0, 0, 0, 0, 0 );
82 solid = std::make_unique< DDI::Cons >( 0, 0, 0, 0, 0, 0, 0 );
85 solid = std::make_unique< DDI::PseudoTrap >( 0, 0, 0, 0, 0, 0,
false );
88 solid = std::make_unique< DDI::Shapeless >( );
91 solid = std::make_unique< DDI::Trap >( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
94 solid = std::make_unique< DDI::Polyhedra >( 0, 0, 0, dummy, dummy );
97 solid = std::make_unique< DDI::Polyhedra >( 0, 0, 0, dummy, dummy, dummy );
100 solid = std::make_unique< DDI::Polycone >( 0, 0, dummy, dummy );
103 solid = std::make_unique< DDI::Polycone >( 0, 0, dummy, dummy, dummy );
106 solid = std::make_unique< DDI::TruncTubs >( 0, 0, 0, 0, 0, 0, 0,
false );
109 solid = std::make_unique< DDI::Torus >( 0, 0, 0, 0, 0 );
112 solid = std::make_unique< DDI::Sphere >( 0, 0, 0, 0, 0, 0 );
115 solid = std::make_unique< DDI::EllipticalTube >( 0, 0, 0 );
118 solid = std::make_unique< DDI::CutTubs >( 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., -1. );
121 solid = std::make_unique< DDI::ExtrudedPolygon >( dummy, dummy, dummy, dummy, dummy, dummy );
125 <<
"DDSolid::DDSolid( DDName, DDSolidShape, std::vector<double> ): wrong shape.";
127 solid->setParameters( pars );
134 return rep().volume();
140 return rep().shape();
143 const std::vector<double> &
146 return rep().parameters();
153 ex = ex +
"Use a different solid interface!";
196 ex = ex +
"Use a different solid interface!";
229 ex = ex +
"Use a different solid interface!";
260 ex = ex +
"Use a different solid interface!";
267 {
return rep().parameters()[0]; }
271 {
return rep().parameters()[1]; }
275 {
return rep().parameters()[2]; }
281 ex = ex +
"Use a different solid interface!";
291 ex = ex +
"Use a different solid interface!";
301 ex = ex +
"Use a different solid interface!";
311 ex = ex +
"Use a different solid interface!";
323 const size_t& numVecs)
const 328 edm::LogError (
"DDSolid") <<
"Could not find equal sized components of std::vectors in a PolySolid description." 329 <<
"rep().parameters().size()=" <<
rep().parameters().size() <<
" numVecs=" << numVecs
330 <<
" offset=" << offset << std::endl;
332 std::vector<double> tvec;
333 for(
size_t i = offset + which;
i <
rep().parameters().size();
i =
i + numVecs ) {
344 ex = ex +
"Use a different solid interface!";
356 std::vector<double> tvec;
372 std::vector<double> tvec;
380 std::vector<double> tvec;
391 ex = ex +
"Use a different solid interface!";
407 std::vector<double> tvec;
423 std::vector<double> tvec;
431 std::vector<double> tvec;
442 ex = ex +
"Use a different solid interface!";
469 return rep().parameters()[0];
475 return std::vector<double>(
rep().parameters().begin() + 1,
482 return std::vector<double>(
rep().parameters().begin() + 1 +
xyPointsSize(),
511 rep().parameters().end());
518 ex = ex +
"Use a different solid interface!";
548 ex = ex +
"Use a different solid interface!";
572 ex = ex +
"Use a different solid interface!";
594 boolean_( static_cast<
DDI::BooleanSolid& >( s.
rep()))
625 ex = ex +
"Use a different solid interface!";
652 ex = ex +
"Use a different solid interface!";
670 ex = ex +
"Use a different solid interface!";
690 std::array<double, 3>
692 return std::array<double, 3>{{
rep().parameters()[5],
rep().parameters()[6],
rep().parameters()[7]}};
695 std::array<double, 3>
697 return std::array<double, 3>{{
rep().parameters()[8],
rep().parameters()[9],
rep().parameters()[10]}};
709 return DDSolid( name, std::make_unique< DDI::Box >( xHalf, yHalf, zHalf ));
714 const std::vector<double> &
z,
715 const std::vector<double> & rmin,
716 const std::vector<double> & rmax )
718 return DDSolid( name, std::make_unique< DDI::Polycone >( startPhi, deltaPhi, z, rmin, rmax ));
723 const std::vector<double> &
z,
724 const std::vector<double> &
r )
726 return DDSolid(name, std::make_unique< DDI::Polycone >( startPhi, deltaPhi, z, r ));
734 const std::vector<double> &
z,
735 const std::vector<double> & rmin,
736 const std::vector<double> & rmax )
738 return DDSolid( name, std::make_unique< DDI::Polyhedra >( sides, startPhi, deltaPhi, z, rmin, rmax ));
746 const std::vector<double> &
z,
747 const std::vector<double> &
r )
749 return DDSolid( name, std::make_unique< DDI::Polyhedra >( sides, startPhi, deltaPhi, z, r ));
754 const std::vector<double> &
x,
755 const std::vector<double> &
y,
756 const std::vector<double> &
z,
757 const std::vector<double> & zx,
758 const std::vector<double> & zy,
759 const std::vector<double> & zscale )
761 return DDSolid( name, std::make_unique< DDI::ExtrudedPolygon >( x, y, z, zx, zy, zscale ));
770 return DDSolid( name, std::make_unique< DDI::Union >( a, b, t, r ));
779 return DDSolid( name, std::make_unique< DDI::Subtraction >( a, b, t, r ));
788 return DDSolid( name, std::make_unique< DDI::Intersection >( a, b, t, r ));
794 double pTheta,
double pPhi,
795 double pDy1,
double pDx1,
double pDx2,
797 double pDy2,
double pDx3,
double pDx4,
800 return DDSolid( name, std::make_unique< DDI::Trap >( pDz, pTheta, pPhi,
801 pDy1, pDx1, pDx2, pAlp1,
802 pDy2, pDx3, pDx4, pAlp2 ));
816 return DDSolid( name, std::make_unique< DDI::PseudoTrap >( pDx1, pDx2, pDy1, pDy2, pDz,
831 return DDSolid( name, std::make_unique< DDI::TruncTubs >( zHalf, rIn, rOut,
833 cutAtStart, cutAtDelta,
847 return DDSolid( name, std::make_unique< DDI::Cons >( zhalf,
848 rInMinusZ, rOutMinusZ,
850 phiFrom, deltaPhi ));
861 return DDSolid( name, std::make_unique< DDI::Torus >( rMin, rMax, rTorus, startPhi, deltaPhi ));
870 return DDSolid( name, std::make_unique< DDI::Tubs >( zhalf, rIn, rOut, phiFrom, deltaPhi ));
878 double lx,
double ly,
double lz,
879 double tx,
double ty,
double tz )
881 return DDSolid( name, std::make_unique< DDI::CutTubs >( zhalf, rIn, rOut,
896 return DDSolid( name, std::make_unique< DDI::Sphere >( innerRadius, outerRadius,
898 startTheta, deltaTheta ));
903 double xSemiAxis,
double ySemiAxis,
double zHeight )
905 return DDSolid( name, std::make_unique< DDI::EllipticalTube >( xSemiAxis, ySemiAxis, zHeight ));
911 return DDSolid( name, std::make_unique< DDI::Shapeless >());
DDPseudoTrap(void)=delete
DDExtrudedPolygon(void)=delete
static DDSolid torus(const DDName &name, double rMin, double rMax, double rTorus, double startPhi, double deltaPhi)
double startPhi(void) const
double cutAtStart(void) const
truncation at begin of the tube-section
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
double halfZ(void) const
half of the z-Axis
def_type isDefined() const
bool cutInside(void) const
true, if truncation is on the inner side of the tube-section
std::vector< double > rVec(void) const
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
const DDName & name() const
double zHalf(void) const
half of the z-Axis
const DDTranslation & t() const
double y2(void) const
half length along y on +z
auto zSectionsSize(void) const -> std::size_t
double startTheta(void) const
std::vector< double > rMaxVec(void) const
double deltaPhi(void) const
angular span 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 deltaPhi(void) const
std::vector< double > rMaxVec(void) const
Abstract class for DDPolycone and DDPolyhedra. Basically a common member function.
double phi(void) const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
std::array< double, 3 > highNorm(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 rTorus(void) const
std::vector< double > rVec(void) const
double cutAtDelta(void) const
truncation at end of the tube-section
std::vector< double > yVec(void) const
double phiFrom(void) const
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
double rIn(void) const
inner radius
const DDSolid & a() const
double rOutMinusZ(void) const
double rOutPlusZ(void) const
std::vector< double > zyVec(void) const
const DDRotation & r() const
DDTranslation translation(void) const
DDIntersection(void)=delete
double innerRadius(void) const
const DDI::BooleanSolid & boolean_
A DDSolid represents the shape of a part.
double y1(void) const
half length along y on -z
DDSolid solidB(void) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
const DDI::rep_traits< N, C >::reference rep() const
std::vector< double > xVec(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)
std::array< double, 3 > lowNorm(void) const
double outerRadius(void) const
static const char *const name(DDSolidShape s)
auto xyPointsSize(void) const -> std::size_t
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
static DDSolid intersection(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
DDRotation rotation(void) const
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
double halfZ(void) const
half of the z-Axis
std::vector< double > rMinVec(void) const
double startPhi(void) const
double startPhi(void) const
double xSemiAxis(void) const
static DDSolid sphere(const DDName &name, double innerRadius, double outerRadius, double startPhi, double deltaPhi, double startTheta, double deltaTheta)
std::ostream & operator<<(std::ostream &os, const DDSolidShape s)
const DDSolid & b() const
double deltaPhi(void) const
double startPhi(void) const
double y1(void) const
Half-length along y of the face at -pDz.
double rInMinusZ(void) const
DDSolidShape shape(void) const
The type of the solid.
double deltaTheta(void) const
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
double ySemiAxis(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)
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
std::vector< double > rMinVec(void) const
double deltaPhi(void) const
DDSolid solidA(void) const
double deltaPhi(void) const
double deltaPhi(void) const
double startPhi(void) const
std::vector< double > zVec(void) const
std::vector< double > zxVec(void) const
static DDSolid ellipticalTube(const DDName &name, double xSemiAxis, double ySemiAxis, double zHeight)
std::vector< double > zVec(void) const
double deltaPhi(void) const
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)
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
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 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...
double startPhi(void) const
angular start of the tube-section
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
static DDSolid shapeless(const DDName &name)
DDEllipticalTube(void)=delete
DDShapelessSolid(void)=delete
double zHeight(void) const
std::pair< const N *, bool > def_type
double deltaPhi(void) const
double y2(void) const
Half-length along y of the face at +pDz.
DDBooleanSolid(void)=delete
DDSubtraction(void)=delete
double rInPlusZ(void) const
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)
double x2(void) const
half length along x on +z
double rOut(void) const
outer radius
double theta(void) const
Polar angle of the line joining the centres of the faces at -/+pDz.
std::vector< double > zscaleVec(void) const
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 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 > zVec(void) const
double x1(void) const
half length along x on -z
double startPhi(void) const
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
void create(const DDName &name, std::unique_ptr< DDI::Solid > vals)