CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
DDPolyhedra Class Reference

#include <DDSolid.h>

Inheritance diagram for DDPolyhedra:
DDPolySolid DDSolid DDBase< DDName, DDI::Solid * >

Public Member Functions

 DDPolyhedra (const DDSolid &s)
 
double deltaPhi (void) const
 
std::vector< double > rMaxVec (void) const
 
std::vector< double > rMinVec (void) const
 
std::vector< double > rVec (void) const
 
int sides (void) const
 
double startPhi (void) const
 
std::vector< double > zVec (void) const
 
- Public Member Functions inherited from DDPolySolid
 DDPolySolid (const DDSolid &s)
 
- Public Member Functions inherited from DDSolid
 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, DDI::Solid * >
 DDBase ()
 
const DDNameddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const DDNamename () 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, DDI::Solid * >::reference rep () const
 
DDI::rep_traits< DDName, DDI::Solid * >::reference rep ()
 
std::string toString () const
 
const DDI::rep_traits< DDName, DDI::Solid * >::reference val () const
 
const DDI::rep_traits< DDName, DDI::Solid * >::reference val ()
 
virtual ~DDBase ()
 

Private Member Functions

 DDPolyhedra (void)
 

Additional Inherited Members

- Public Types inherited from DDBase< DDName, DDI::Solid * >
typedef std::pair< const DDName *, bool > def_type
 
typedef DDI::Solidpimpl_type
 
typedef DDI::rep_type< DDName, pimpl_type > * prep_type
 
typedef DDI::Singleton< DDI::Store< DDName, DDI::Solid * > > StoreT
 
- Static Public Member Functions inherited from DDBase< DDName, DDI::Solid * >
static auto begin ()
 
static void clear ()
 
static auto end ()
 
static size_t size ()
 
- Protected Member Functions inherited from DDPolySolid
 DDPolySolid (void)
 
virtual std::vector< double > getVec (const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
 note defaults please. More...
 
- Protected Attributes inherited from DDBase< DDName, DDI::Solid * >
prep_type prep_
 

Detailed Description

Definition at line 238 of file DDSolid.h.

Constructor & Destructor Documentation

DDPolyhedra::DDPolyhedra ( const DDSolid s)

Definition at line 410 of file DDSolid.cc.

References ddpolyhedra_rrz, ddpolyhedra_rz, Exception, DDName::name(), DDBase< N, C >::name(), DDName::ns(), DDSolid::shape(), and AlCaHLTBitMon_QueryRunRegistry::string.

411  : DDPolySolid(s)
412 {
413  if (s.shape() != ddpolyhedra_rz && s.shape() != ddpolyhedra_rrz) {
414  std::string ex = "Solid [" + s.name().ns() + ":" + s.name().name() + "] is not a DDPolyhedra.\n";
415  ex = ex + "Use a different solid interface!";
416  throw cms::Exception("DDException") << ex;
417  }
418 }
const N & name() const
Definition: DDBase.h:78
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:104
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:151
DDPolySolid(void)
const std::string & name() const
Returns the name.
Definition: DDName.cc:90
DDPolyhedra::DDPolyhedra ( void  )
private

Member Function Documentation

double DDPolyhedra::deltaPhi ( void  ) const
std::vector< double > DDPolyhedra::rMaxVec ( void  ) const

Definition at line 447 of file DDSolid.cc.

References ddpolyhedra_rrz, DDPolySolid::getVec(), and DDSolid::shape().

Referenced by DDDividedPolyhedraRho::DDDividedPolyhedraRho(), DDDividedPolyhedraRho::getMaxParameter(), HGCalGeomParameters::loadGeometryHexagon(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), and DDCoreToDDXMLOutput::solid().

447  {
448  std::vector<double> tvec;
449  if (shape() == ddpolyhedra_rrz)
450  tvec = getVec(2, 3, 3);
451  return tvec;
452 }
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
Definition: DDSolid.cc:340
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:151
std::vector< double > DDPolyhedra::rMinVec ( void  ) const

Definition at line 440 of file DDSolid.cc.

References ddpolyhedra_rrz, DDPolySolid::getVec(), and DDSolid::shape().

Referenced by DDDividedPolyhedraRho::DDDividedPolyhedraRho(), DDDividedPolyhedraRho::getMaxParameter(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), and DDCoreToDDXMLOutput::solid().

440  {
441  std::vector<double> tvec;
442  if (shape() == ddpolyhedra_rrz)
443  tvec = getVec(1, 3, 3);
444  return tvec;
445 }
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
Definition: DDSolid.cc:340
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:151
std::vector< double > DDPolyhedra::rVec ( void  ) const

Definition at line 426 of file DDSolid.cc.

References ddpolyhedra_rz, DDPolySolid::getVec(), and DDSolid::shape().

Referenced by DDCoreToDDXMLOutput::solid().

426  {
427  std::vector<double> tvec;
428  if (shape() == ddpolyhedra_rz)
429  tvec = getVec(1, 3, 2);
430  return tvec;
431 }
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
Definition: DDSolid.cc:340
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:151
int DDPolyhedra::sides ( void  ) const

Definition at line 420 of file DDSolid.cc.

References createfilelist::int, DDSolid::parameters(), and DDBase< DDName, DDI::Solid * >::rep().

Referenced by DDDividedPolyhedraPhi::checkParametersValidity(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), and DDCoreToDDXMLOutput::solid().

420 { return int(rep().parameters()[0]); }
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:157
const DDI::rep_traits< DDName, DDI::Solid * >::reference rep() const
Definition: DDBase.h:84
double DDPolyhedra::startPhi ( void  ) const

Definition at line 422 of file DDSolid.cc.

References DDBase< DDName, DDI::Solid * >::rep().

Referenced by DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), and DDCoreToDDXMLOutput::solid().

422 { return rep().parameters()[1]; }
const DDI::rep_traits< DDName, DDI::Solid * >::reference rep() const
Definition: DDBase.h:84
std::vector< double > DDPolyhedra::zVec ( void  ) const

Definition at line 433 of file DDSolid.cc.

References ddpolyhedra_rz, DDPolySolid::getVec(), and DDSolid::shape().

Referenced by DDDividedPolyhedraZ::checkParametersValidity(), DDDividedPolyhedraZ::DDDividedPolyhedraZ(), DDDividedPolyhedraZ::getMaxParameter(), HGCalGeomParameters::loadGeometryHexagon(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDTranslation(), and DDCoreToDDXMLOutput::solid().

433  {
434  if (shape() == ddpolyhedra_rz)
435  return getVec(0, 3, 2);
436  else // (shape() == ddpolycone_rrz)
437  return getVec(0, 3, 3);
438 }
virtual std::vector< double > getVec(const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
note defaults please.
Definition: DDSolid.cc:340
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:151