DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Member Functions | List of all members
dd4hep::PolyhedraRegular Class Reference

Class describing a regular polyhedron shape. More...

#include <Shapes.h>

Inheritance diagram for dd4hep::PolyhedraRegular:
dd4hep::Solid_type< TGeoPgon > dd4hep::Handle< TGeoPgon >

Public Member Functions

 PolyhedraRegular ()=default
 Default constructor. More...
 
 PolyhedraRegular (PolyhedraRegular &&e)=default
 Move Constructor. More...
 
 PolyhedraRegular (const PolyhedraRegular &e)=default
 Copy Constructor. More...
 
template<typename Q >
 PolyhedraRegular (const Q *p)
 Constructor to be used with an existing object. More...
 
template<typename Q >
 PolyhedraRegular (const Handle< Q > &e)
 Constructor to be used when passing an already created object. More...
 
 PolyhedraRegular (int nsides, double rmin, double rmax, double zlen)
 Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2. More...
 
template<typename NSIDES , typename RMIN , typename RMAX , typename ZLEN >
 PolyhedraRegular (NSIDES nsides, RMIN rmin, RMAX rmax, ZLEN zlen)
 Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2. More...
 
 PolyhedraRegular (int nsides, double phi_start, double rmin, double rmax, double zlen)
 Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2. More...
 
template<typename NSIDES , typename PHI_START , typename RMIN , typename RMAX , typename ZLEN >
 PolyhedraRegular (NSIDES nsides, PHI_START phi_start, RMIN rmin, RMAX rmax, ZLEN zlen)
 Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2. More...
 
 PolyhedraRegular (int nsides, double rmin, double rmax, double zplanes[2])
 Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes a zplanes[0] and zplanes[1]. More...
 
 PolyhedraRegular (const std::string &nam, int nsides, double rmin, double rmax, double zlen)
 Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2. More...
 
 PolyhedraRegular (const std::string &nam, int nsides, double phi_start, double rmin, double rmax, double zlen)
 Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2. More...
 
 PolyhedraRegular (const std::string &nam, int nsides, double rmin, double rmax, double zplanes[2])
 Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes a zplanes[0] and zplanes[1]. More...
 
PolyhedraRegularoperator= (PolyhedraRegular &&copy)=default
 Move Assignment operator. More...
 
PolyhedraRegularoperator= (const PolyhedraRegular &copy)=default
 Copy Assignment operator. More...
 
int numEdges () const
 Accessor: Number of edges. More...
 
double startPhi () const
 Accessor: start-phi value. More...
 
double deltaPhi () const
 Accessor: delta-phi value. More...
 
double z (int which) const
 Accessor: r-min value. More...
 
double rMin (int which) const
 Accessor: r-min value. More...
 
double rMax (int which) const
 Accessor: r-max value. More...
 
std::vector< double > zPlaneZ () const
 Accessor: vector of z-values for Z-planes value. More...
 
std::vector< double > zPlaneRmin () const
 Accessor: vector of rMin-values for Z-planes value. More...
 
std::vector< double > zPlaneRmax () const
 Accessor: vector of rMax-values for Z-planes value. More...
 
- Public Member Functions inherited from dd4hep::Solid_type< TGeoPgon >
 Solid_type ()=default
 Default constructor for uninitialized object. More...
 
 Solid_type (Solid_type &&e)=default
 Move constructor. More...
 
 Solid_type (const Solid_type &e)=default
 Copy constructor. More...
 
 Solid_type (TGeoPgon *p)
 Direct assignment using the implementation pointer. More...
 
 Solid_type (Handle< TGeoPgon > &&e)
 Move Constructor from handle. More...
 
 Solid_type (const Handle< TGeoPgon > &e)
 Copy Constructor from handle. More...
 
 Solid_type (const Handle< Q > &e)
 Constructor to be used when passing an already created object: need to check pointers. More...
 
Solid_typeoperator= (Solid_type &&copy)=default
 Assignment move operator. More...
 
Solid_typeoperator= (const Solid_type &copy)=default
 Assignment copy operator. More...
 
const char * name () const
 Access to shape name. More...
 
Solid_type< TGeoPgon > & setName (const char *value)
 Set new shape name. More...
 
Solid_type< TGeoPgon > & setName (const std::string &value)
 Set new shape name. More...
 
const char * title () const
 Access to shape title (GetTitle accessor of the TGeoShape) More...
 
const char * type () const
 Access to shape type (The TClass name of the ROOT implementation) More...
 
 operator TGeoPgon * () const
 Auto conversion to underlying ROOT object. More...
 
TGeoPgon * operator-> () const
 Overloaded operator -> to access underlying object. More...
 
std::vector< double > dimensions ()
 Access the dimensions of the shape: inverse of the setDimensions member function. More...
 
Solid_typesetDimensions (const std::vector< double > &params)
 Set the shape dimensions. As for the TGeo shape, but angles in rad rather than degrees. More...
 
std::string toString (int precision=2) const
 Conversion to string for pretty print. More...
 
TGeoVolume * divide (const Volume &voldiv, const std::string &divname, int iaxis, int ndiv, double start, double step) const
 Divide volume into subsections (See the ROOT manuloa for details) More...
 
- Public Member Functions inherited from dd4hep::Handle< TGeoPgon >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< TGeoPgon > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< TGeoPgon > &element)=default
 Copy constructor. More...
 
 Handle (TGeoPgon *element)
 Initializing constructor from pointer. More...
 
 Handle (Q *element)
 Initializing constructor from unrelated pointer with type checking. More...
 
 Handle (const Handle< Q > &element)
 Initializing constructor from unrelated handle with type checking. More...
 
Handle< TGeoPgon > & operator= (Handle< TGeoPgon > &&element)=default
 Assignment move operator. More...
 
Handle< TGeoPgon > & operator= (const Handle< TGeoPgon > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< TGeoPgon > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< TGeoPgon > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< TGeoPgon > &element) const
 Boolean operator > used for RB tree insertions. More...
 
bool isValid () const
 Check the validity of the object held by the handle. More...
 
bool operator! () const
 Check the validity of the object held by the handle. More...
 
Handle< TGeoPgon > & clear ()
 Release the object held by the handle. More...
 
TGeoPgon * operator-> () const
 Access the held object using the -> operator. More...
 
 operator TGeoPgon & () const
 Automatic type conversion to an object references. More...
 
TGeoPgon & operator* () const
 Access the held object using the * operator. More...
 
TGeoPgon * ptr () const
 Access to the held object. More...
 
Q * _ptr () const
 Access to an unrelated object type. More...
 
Q * data () const
 Access to an unrelated object type. More...
 
Q & object () const
 Access to an unrelated object type. More...
 
TGeoPgon * access () const
 Checked object access. Throws invalid handle runtime exception if invalid handle. More...
 
const char * name () const
 Access the object name (or "" if not supported by the object) More...
 
const char * name () const
 
const char * name () const
 
void assign (Object *n, const std::string &nam, const std::string &title)
 Assign a new named object. Note: object references must be managed by the user. More...
 
void assign (_Segmentation *s, const std::string &n, const std::string &)
 
void assign (NamedObject *p, const std::string &n, const std::string &t)
 
void destroy ()
 Destroy the underlying object (be careful here: things are not reference counted)! More...
 

Protected Member Functions

void make (const std::string &nam, int nsides, double rmin, double rmax, double zpos, double zneg, double start, double delta)
 Helper function to create the polyhedron. More...
 
- Protected Member Functions inherited from dd4hep::Solid_type< TGeoPgon >
void _setDimensions (double *param) const
 
void _assign (TGeoPgon *n, const std::string &nam, const std::string &tit, bool cbbox)
 Assign pointrs and register solid to geometry. More...
 

Additional Inherited Members

- Public Types inherited from dd4hep::Handle< TGeoPgon >
typedef TGeoPgon Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< TGeoPgon > Base
 Self type: used by sub-classes. More...
 
- Static Public Member Functions inherited from dd4hep::Handle< TGeoPgon >
static void bad_assignment (const std::type_info &from, const std::type_info &to)
 Helper routine called when unrelated types are assigned. More...
 
- Public Attributes inherited from dd4hep::Handle< TGeoPgon >
TGeoPgon * m_element
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

Class describing a regular polyhedron shape.

For any further documentation please see the following ROOT documentation:

See also
http://root.cern.ch/root/html/TGeoPgon.html
Author
M.Frank
Version
1.0

Definition at line 1493 of file Shapes.h.

Constructor & Destructor Documentation

◆ PolyhedraRegular() [1/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( )
default

Default constructor.

◆ PolyhedraRegular() [2/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( PolyhedraRegular &&  e)
default

Move Constructor.

◆ PolyhedraRegular() [3/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( const PolyhedraRegular e)
default

Copy Constructor.

◆ PolyhedraRegular() [4/13]

template<typename Q >
dd4hep::PolyhedraRegular::PolyhedraRegular ( const Q *  p)
inline

Constructor to be used with an existing object.

Definition at line 1505 of file Shapes.h.

◆ PolyhedraRegular() [5/13]

template<typename Q >
dd4hep::PolyhedraRegular::PolyhedraRegular ( const Handle< Q > &  e)
inline

Constructor to be used when passing an already created object.

Definition at line 1507 of file Shapes.h.

◆ PolyhedraRegular() [6/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( int  nsides,
double  rmin,
double  rmax,
double  zlen 
)
inline

Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.

Definition at line 1510 of file Shapes.h.

◆ PolyhedraRegular() [7/13]

template<typename NSIDES , typename RMIN , typename RMAX , typename ZLEN >
dd4hep::PolyhedraRegular::PolyhedraRegular ( NSIDES  nsides,
RMIN  rmin,
RMAX  rmax,
ZLEN  zlen 
)
inline

Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.

Definition at line 1514 of file Shapes.h.

◆ PolyhedraRegular() [8/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( int  nsides,
double  phi_start,
double  rmin,
double  rmax,
double  zlen 
)
inline

Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.

Definition at line 1522 of file Shapes.h.

◆ PolyhedraRegular() [9/13]

template<typename NSIDES , typename PHI_START , typename RMIN , typename RMAX , typename ZLEN >
dd4hep::PolyhedraRegular::PolyhedraRegular ( NSIDES  nsides,
PHI_START  phi_start,
RMIN  rmin,
RMAX  rmax,
ZLEN  zlen 
)
inline

Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.

Definition at line 1526 of file Shapes.h.

◆ PolyhedraRegular() [10/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( int  nsides,
double  rmin,
double  rmax,
double  zplanes[2] 
)
inline

Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes a zplanes[0] and zplanes[1].

Definition at line 1534 of file Shapes.h.

◆ PolyhedraRegular() [11/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( const std::string &  nam,
int  nsides,
double  rmin,
double  rmax,
double  zlen 
)
inline

Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.

Definition at line 1538 of file Shapes.h.

◆ PolyhedraRegular() [12/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( const std::string &  nam,
int  nsides,
double  phi_start,
double  rmin,
double  rmax,
double  zlen 
)
inline

Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.

Definition at line 1541 of file Shapes.h.

◆ PolyhedraRegular() [13/13]

dd4hep::PolyhedraRegular::PolyhedraRegular ( const std::string &  nam,
int  nsides,
double  rmin,
double  rmax,
double  zplanes[2] 
)
inline

Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes a zplanes[0] and zplanes[1].

Definition at line 1544 of file Shapes.h.

Member Function Documentation

◆ deltaPhi()

double dd4hep::PolyhedraRegular::deltaPhi ( ) const
inline

Accessor: delta-phi value.

Definition at line 1556 of file Shapes.h.

◆ make()

void PolyhedraRegular::make ( const std::string &  nam,
int  nsides,
double  rmin,
double  rmax,
double  zpos,
double  zneg,
double  start,
double  delta 
)
protected

Helper function to create the polyhedron.

Helper function to create poly hedron.

Definition at line 744 of file Shapes.cpp.

◆ numEdges()

int dd4hep::PolyhedraRegular::numEdges ( ) const
inline

Accessor: Number of edges.

Definition at line 1552 of file Shapes.h.

◆ operator=() [1/2]

PolyhedraRegular& dd4hep::PolyhedraRegular::operator= ( const PolyhedraRegular copy)
default

Copy Assignment operator.

◆ operator=() [2/2]

PolyhedraRegular& dd4hep::PolyhedraRegular::operator= ( PolyhedraRegular &&  copy)
default

Move Assignment operator.

◆ rMax()

double dd4hep::PolyhedraRegular::rMax ( int  which) const
inline

Accessor: r-max value.

Definition at line 1563 of file Shapes.h.

◆ rMin()

double dd4hep::PolyhedraRegular::rMin ( int  which) const
inline

Accessor: r-min value.

Definition at line 1561 of file Shapes.h.

◆ startPhi()

double dd4hep::PolyhedraRegular::startPhi ( ) const
inline

Accessor: start-phi value.

Definition at line 1554 of file Shapes.h.

◆ z()

double dd4hep::PolyhedraRegular::z ( int  which) const
inline

Accessor: r-min value.

Definition at line 1559 of file Shapes.h.

◆ zPlaneRmax()

std::vector<double> dd4hep::PolyhedraRegular::zPlaneRmax ( ) const
inline

Accessor: vector of rMax-values for Z-planes value.

Definition at line 1570 of file Shapes.h.

◆ zPlaneRmin()

std::vector<double> dd4hep::PolyhedraRegular::zPlaneRmin ( ) const
inline

Accessor: vector of rMin-values for Z-planes value.

Definition at line 1568 of file Shapes.h.

◆ zPlaneZ()

std::vector<double> dd4hep::PolyhedraRegular::zPlaneZ ( ) const
inline

Accessor: vector of z-values for Z-planes value.

Definition at line 1566 of file Shapes.h.


The documentation for this class was generated from the following files: