CMS 3D CMS Logo

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

#include <DDSolid.h>

Inheritance diagram for DDExtrudedPolygon:
DDPolySolid DDSolid DDBase< DDName, std::unique_ptr< DDI::Solid > >

Public Member Functions

 DDExtrudedPolygon (const DDSolid &s)
 
 DDExtrudedPolygon (void)=delete
 
std::vector< double > xVec (void) const
 
std::vector< double > yVec (void) const
 
std::vector< double > zscaleVec (void) const
 
std::vector< double > zVec (void) const
 
std::vector< double > zxVec (void) const
 
std::vector< double > zyVec (void) const
 
- Public Member Functions inherited from DDPolySolid
 DDPolySolid (const DDSolid &s)
 
 DDPolySolid (void)=delete
 
- Public Member Functions inherited from DDSolid
 DDSolid (const DDName &name)
 Creates a reference-object to a solid named name. More...
 
 DDSolid (void)
 Uninitialilzed solid reference-object; for further details on reference-objects see documentation of DDLogicalPart. 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)
 
void create (const DDName &name, std::unique_ptr< DDI::Solid > vals)
 
 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
 
DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep ()
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep () const
 
std::string toString () const
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference val ()
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference val () const
 
virtual ~DDBase ()
 

Private Member Functions

auto xyPointsSize (void) const -> std::size_t
 
auto zSectionsSize (void) const -> std::size_t
 

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 ()
 
- Protected Member Functions inherited from 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...
 

Detailed Description

Definition at line 238 of file DDSolid.h.

Constructor & Destructor Documentation

◆ DDExtrudedPolygon() [1/2]

DDExtrudedPolygon::DDExtrudedPolygon ( const DDSolid s)

Definition at line 345 of file DDSolid.cc.

345  : DDPolySolid(s) {
346  if (s.shape() != DDSolidShape::ddextrudedpolygon) {
347  std::string ex = "Solid [" + s.name().ns() + ":" + s.name().name() + "] is not a DDExtrudedPolygon.\n";
348  ex = ex + "Use a different solid interface!";
349  throw cms::Exception("DDException") << ex;
350  }
351 }

References ddextrudedpolygon, Exception, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ DDExtrudedPolygon() [2/2]

DDExtrudedPolygon::DDExtrudedPolygon ( void  )
delete

Member Function Documentation

◆ xVec()

std::vector< double > DDExtrudedPolygon::xVec ( void  ) const

◆ xyPointsSize()

auto DDExtrudedPolygon::xyPointsSize ( void  ) const -> std::size_t
private

Definition at line 353 of file DDSolid.cc.

353  {
354  // Compute the size of the X and Y coordinate vectors
355  // which define the vertices of the outlined polygon
356  // defined in clock-wise order
357 
358  return (rep().parameters().size() - 4 * zSectionsSize()) * 0.5;
359 }

References cuy::rep, and findQualityFiles::size.

Referenced by xVec(), and yVec().

◆ yVec()

std::vector< double > DDExtrudedPolygon::yVec ( void  ) const

◆ zscaleVec()

std::vector< double > DDExtrudedPolygon::zscaleVec ( void  ) const

◆ zSectionsSize()

auto DDExtrudedPolygon::zSectionsSize ( void  ) const -> std::size_t
private

Definition at line 361 of file DDSolid.cc.

361  {
362  // The first parameters element stores a size of the four equal size vectors
363  // which form the ExtrudedPolygon shape Z sections:
364  //
365  // * first: Z coordinate of the XY polygone plane,
366  // * second and third: x and y offset of the polygone in the XY plane,
367  // * fourth: the polygone scale in each XY plane
368  //
369  // The Z sections defined by the z position in an increasing order.
370 
371  return rep().parameters()[0];
372 }

References cuy::rep.

Referenced by zscaleVec(), zVec(), zxVec(), and zyVec().

◆ zVec()

std::vector< double > DDExtrudedPolygon::zVec ( void  ) const

◆ zxVec()

std::vector< double > DDExtrudedPolygon::zxVec ( void  ) const

◆ zyVec()

std::vector< double > DDExtrudedPolygon::zyVec ( void  ) const
DDExtrudedPolygon::xyPointsSize
auto xyPointsSize(void) const -> std::size_t
Definition: DDSolid.cc:353
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDBase< DDName, std::unique_ptr< DDI::Solid > >::end
static auto end()
Definition: DDBase.h:52
DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep() const
Definition: DDBase.h:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDBase< DDName, std::unique_ptr< DDI::Solid > >::begin
static auto begin()
Definition: DDBase.h:53
DDExtrudedPolygon::zSectionsSize
auto zSectionsSize(void) const -> std::size_t
Definition: DDSolid.cc:361
Exception
Definition: hltDiff.cc:246
DDSolid::parameters
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:121
DDSolidShape::ddextrudedpolygon
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
DDPolySolid::DDPolySolid
DDPolySolid(void)=delete