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 249 of file DDSolid.h.

Constructor & Destructor Documentation

◆ DDExtrudedPolygon() [1/2]

DDExtrudedPolygon::DDExtrudedPolygon ( const DDSolid s)

Definition at line 349 of file DDSolid.cc.

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

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 357 of file DDSolid.cc.

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

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 365 of file DDSolid.cc.

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

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:357
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 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:365
Exception
Definition: hltDiff.cc:245
DDSolid::parameters
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:125
DDSolidShape::ddextrudedpolygon
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
DDPolySolid::DDPolySolid
DDPolySolid(void)=delete