CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 () const
 
std::vector< double > rMaxVec () const
 
std::vector< double > rMinVec () const
 
std::vector< double > rVec () const
 
int sides () const
 
double startPhi () const
 
std::vector< double > zVec () const
 
- Public Member Functions inherited from DDPolySolid
 DDPolySolid (const DDSolid &s)
 
- Public Member Functions inherited from DDSolid
 DDSolid ()
 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 () const
 Don't use (only meant to be used by DDbox(), DDtub(), ...) More...
 
DDSolidShape shape () const
 The type of the solid. More...
 
double volume () 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 ()
 

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 DDI::Store< DDName,
DDI::Solid * >::iterator 
begin ()
 
static void clear ()
 
static DDI::Store< DDName,
DDI::Solid * >::iterator 
end ()
 
static size_t size ()
 
- Protected Member Functions inherited from DDPolySolid
 DDPolySolid ()
 
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 259 of file DDSolid.h.

Constructor & Destructor Documentation

DDPolyhedra::DDPolyhedra ( const DDSolid s)

Definition at line 406 of file DDSolid.cc.

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

407  : DDPolySolid(s)
408 {
409  if (s.shape() != ddpolyhedra_rz && s.shape() != ddpolyhedra_rrz) {
410  std::string ex = "Solid [" + s.name().ns() + ":" + s.name().name() + "] is not a DDPolyhedra.\n";
411  ex = ex + "Use a different solid interface!";
412  throw DDException(ex);
413  }
414 }
const N & name() const
Definition: DDBase.h:88
DDSolidShape shape() const
The type of the solid.
Definition: DDSolid.cc:147
An exception for DDD errors.
Definition: DDException.h:23
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:101
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
DDPolyhedra::DDPolyhedra ( )
private

Member Function Documentation

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

Definition at line 443 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().

443  {
444  std::vector<double> tvec;
445  if (shape() == ddpolyhedra_rrz)
446  tvec = getVec(2, 3, 3);
447  return tvec;
448 }
DDSolidShape shape() const
The type of the solid.
Definition: DDSolid.cc:147
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:336
std::vector< double > DDPolyhedra::rMinVec ( ) const

Definition at line 436 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().

436  {
437  std::vector<double> tvec;
438  if (shape() == ddpolyhedra_rrz)
439  tvec = getVec(1, 3, 3);
440  return tvec;
441 }
DDSolidShape shape() const
The type of the solid.
Definition: DDSolid.cc:147
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:336
std::vector< double > DDPolyhedra::rVec ( ) const

Definition at line 422 of file DDSolid.cc.

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

Referenced by DDCoreToDDXMLOutput::solid().

422  {
423  std::vector<double> tvec;
424  if (shape() == ddpolyhedra_rz)
425  tvec = getVec(1, 3, 2);
426  return tvec;
427 }
DDSolidShape shape() const
The type of the solid.
Definition: DDSolid.cc:147
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:336
int DDPolyhedra::sides ( ) const

Definition at line 416 of file DDSolid.cc.

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

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

416 { return int(rep().parameters()[0]); }
const std::vector< double > & parameters() const
Don&#39;t use (only meant to be used by DDbox(), DDtub(), ...)
Definition: DDSolid.cc:153
const DDI::rep_traits< DDName, DDI::Solid * >::reference rep() const
Definition: DDBase.h:95
double DDPolyhedra::startPhi ( ) const

Definition at line 418 of file DDSolid.cc.

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

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

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

Definition at line 429 of file DDSolid.cc.

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

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

429  {
430  if (shape() == ddpolyhedra_rz)
431  return getVec(0, 3, 2);
432  else // (shape() == ddpolycone_rrz)
433  return getVec(0, 3, 3);
434 }
DDSolidShape shape() const
The type of the solid.
Definition: DDSolid.cc:147
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:336