A DDSolid represents the shape of a part. More...
#include <DDSolid.h>
Public Member Functions | |
DDSolid (void) | |
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of DDLogicalPart. More... | |
DDSolid (const DDName &name) | |
Creates a reference-object to a solid named name. More... | |
const std::vector< double > & | parameters (void) const |
Give the parameters of the solid. More... | |
DDSolidShape | shape (void) const |
The type of the solid. More... | |
double | volume (void) const |
Returns the volume of the given solid (does not work with boolean soids !) More... | |
Public Member Functions inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > > | |
void | create (const DDName &name, std::unique_ptr< DDI::Solid > vals) |
void | create (const DDName &name) |
DDBase () | |
const DDName & | ddname () const |
def_type | isDefined () const |
bool | isValid () const |
true, if the wrapped pointer is valid More... | |
const DDName & | name () const |
operator bool () const | |
bool | operator< (const DDBase &b) const |
bool | operator== (const DDBase &b) const |
bool | operator> (const DDBase &b) const |
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference | rep () const |
DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference | rep () |
std::string | toString () const |
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference | val () const |
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference | val () |
virtual | ~DDBase () |
Private Member Functions | |
DDSolid (const DDName &, std::unique_ptr< DDI::Solid >) | |
DDSolid (const DDName &, DDSolidShape, const std::vector< double > &) | |
Friends | |
struct | DDSolidFactory |
std::ostream & | operator<< (std::ostream &, const DDSolid &) |
Additional Inherited Members | |
Public Types inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > > | |
using | def_type = std::pair< const DDName *, bool > |
using | StoreT = DDI::Singleton< DDI::Store< DDName, std::unique_ptr< DDI::Solid > > > |
Static Public Member Functions inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > > | |
static auto | begin () |
static auto | end () |
A DDSolid represents the shape of a part.
An object of this class is a reference-object and thus is a lightweight class. It can be copied by value without having a large overhead. Assignment to the reference-object invalidates the object to which it was referred. Assignment also affects all other instances of this class which were created using the same value of DDName. In fact, the value of DDName identifies a DDSolid uniquely.
For further details concerning the usage of reference-objects refer to the documentation of DDLogicalPart.
DDSolid::DDSolid | ( | void | ) |
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of DDLogicalPart.
Definition at line 55 of file DDSolid.cc.
Referenced by DDSolidFactory::box(), DDSolidFactory::cons(), DDSolidFactory::cuttubs(), DDSolidFactory::ellipticalTube(), DDSolidFactory::extrudedpolygon(), DDSolidFactory::intersection(), DDSolidFactory::polycone(), DDSolidFactory::polyhedra(), DDSolidFactory::pseudoTrap(), DDSolidFactory::shapeless(), DDSolidFactory::sphere(), DDSolidFactory::subtraction(), DDSolidFactory::torus(), DDSolidFactory::trap(), DDSolidFactory::truncTubs(), DDSolidFactory::tubs(), and DDSolidFactory::unionSolid().
DDSolid::DDSolid | ( | const DDName & | name | ) |
Creates a reference-object to a solid named name.
If the solid was not yet created using one of the solid generating factory functions DDbox()
, DDtub
, ... this constructor creates a (default) initialized reference object named name. It can be used as placeholder everywhere and becomes a reference to a valid solid as soon as one of the factory functions DDBox
, ... has been called (using the same value for DDName).
For further details concerning reference-objects refer to the documentation of DDLogicalPart.
Definition at line 58 of file DDSolid.cc.
References DDBase< DDName, std::unique_ptr< DDI::Solid > >::create().
|
private |
Definition at line 64 of file DDSolid.cc.
References DDBase< DDName, std::unique_ptr< DDI::Solid > >::create(), and eostools::move().
|
private |
Definition at line 70 of file DDSolid.cc.
References DDBase< DDName, std::unique_ptr< DDI::Solid > >::create(), ddbox, ddcons, ddcuttubs, ddellipticaltube, ddextrudedpolygon, ddpolycone_rrz, ddpolycone_rz, ddpolyhedra_rrz, ddpolyhedra_rz, ddpseudotrap, ddshapeless, ddsphere, ddtorus, ddtrap, ddtrunctubs, ddtubs, Exception, funct::false, and eostools::move().
const std::vector< double > & DDSolid::parameters | ( | void | ) | const |
Give the parameters of the solid.
Definition at line 144 of file DDSolid.cc.
References DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep().
Referenced by CSCGeometryParsFromDD::build(), ME0GeometryBuilderFromDDD::buildChamber(), GEMGeometryParsFromDD::buildChamber(), GEMGeometryBuilderFromDDD::buildChamber(), GEMGeometryParsFromDD::buildEtaPartition(), ME0GeometryBuilderFromDDD::buildEtaPartition(), GEMGeometryBuilderFromDDD::buildEtaPartition(), ME0GeometryBuilderFromDDD::buildGeometry(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCGeometryParsFromDD::buildGeometry(), ME0GeometryBuilderFromDDD::buildLayer(), GEMGeometryParsFromDD::buildSuperChamber(), GEMGeometryBuilderFromDDD::buildSuperChamber(), DDG4SolidConverter::convert(), TGeoFromDddService::createShape(), DDTruncTubs::cutInside(), DDCompareBoolSol(), DDCompareSolid(), ddstats(), DDEcalBarrelNewAlgo::execute(), DDEcalBarrelAlgo::execute(), DDEcalEndcapAlgo::execute(), DTGeometryBuilderFromDDD::extractParameters(), DTGeometryParsFromDD::extractParameters(), ME0GeometryParsFromDD::getDimension(), DDPolySolid::getVec(), DreamSD::initMap(), HcalTB02SD::initMap(), ECalSD::initMap(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputTags(), HcalGeomParameters::loadGeometry(), EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::recursePSetProperties(), DDPolyhedra::sides(), and DDExtrudedPolygon::xyPointsSize().
DDSolidShape DDSolid::shape | ( | void | ) | const |
The type of the solid.
Definition at line 138 of file DDSolid.cc.
References DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep().
Referenced by PrintGeomSummary::addSolid(), OutputMagneticFieldDDToDDL::addToSolStore(), OutputDDToDDL::addToSolStore(), CSCGeometryParsFromDD::build(), DDG4SolidConverter::convert(), TGeoFromDddService::createShape(), DDBox::DDBox(), DDCheckLP(), DDCompareBoolSol(), DDCompareSolid(), DDCons::DDCons(), DDCutTubs::DDCutTubs(), DDEllipticalTube::DDEllipticalTube(), DDExtrudedPolygon::DDExtrudedPolygon(), DDIntersection::DDIntersection(), DDPolycone::DDPolycone(), DDPolyhedra::DDPolyhedra(), DDPseudoTrap::DDPseudoTrap(), DDShapelessSolid::DDShapelessSolid(), DDSphere::DDSphere(), DDSubtraction::DDSubtraction(), DDTorus::DDTorus(), DDTrap::DDTrap(), DDTruncTubs::DDTruncTubs(), DDTubs::DDTubs(), DDUnion::DDUnion(), DTGeometryBuilderFromDDD::extractParameters(), DTGeometryParsFromDD::extractParameters(), DreamSD::initMap(), HcalTB02SD::initMap(), ECalSD::initMap(), HcalGeomParameters::loadGeometry(), DDLDivision::makeDivider(), EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry(), operator<<(), MagGeoBuilderFromDDD::volumeHandle::referencePlane(), DDPolycone::rMaxVec(), DDPolyhedra::rMaxVec(), DDPolycone::rMinVec(), DDPolyhedra::rMinVec(), DDPolycone::rVec(), DDPolyhedra::rVec(), MagGeoBuilderFromDDD::volumeHandle::shape(), MagGeoBuilderFromDDD::volumeHandle::sides(), DDErrorDetection::so(), DDCoreToDDXMLOutput::solid(), DDG4SolidConverter::trunctubs(), MagGeoBuilderFromDDD::volumeHandle::volumeHandle(), DDPolycone::zVec(), and DDPolyhedra::zVec().
double DDSolid::volume | ( | void | ) | const |
Returns the volume of the given solid (does not work with boolean soids !)
Definition at line 132 of file DDSolid.cc.
References DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep().
|
friend |
|
friend |
Definition at line 36 of file DDSolid.cc.