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

Class describing a regular polyhedron shape. More...

#include <Shapes.h>

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

Public Member Functions

 Polyhedra ()=default
 Default constructor. More...
 
 Polyhedra (Polyhedra &&e)=default
 Move Constructor. More...
 
 Polyhedra (const Polyhedra &e)=default
 Copy Constructor. More...
 
template<typename Q >
 Polyhedra (const Q *p)
 Constructor to be used with an existing object. More...
 
template<typename Q >
 Polyhedra (const Handle< Q > &e)
 Constructor to be used when passing an already created object. More...
 
 Polyhedra (int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &r)
 Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions. More...
 
 Polyhedra (int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
 Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions. More...
 
 Polyhedra (const std::string &nam, int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &r)
 Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions. More...
 
 Polyhedra (const std::string &nam, int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
 Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions. More...
 
Polyhedraoperator= (Polyhedra &&copy)=default
 Move Assignment operator. More...
 
Polyhedraoperator= (const Polyhedra &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: z 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 start, double delta, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
 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 1582 of file Shapes.h.

Constructor & Destructor Documentation

◆ Polyhedra() [1/9]

dd4hep::Polyhedra::Polyhedra ( )
default

Default constructor.

◆ Polyhedra() [2/9]

dd4hep::Polyhedra::Polyhedra ( Polyhedra &&  e)
default

Move Constructor.

◆ Polyhedra() [3/9]

dd4hep::Polyhedra::Polyhedra ( const Polyhedra e)
default

Copy Constructor.

◆ Polyhedra() [4/9]

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

Constructor to be used with an existing object.

Definition at line 1597 of file Shapes.h.

◆ Polyhedra() [5/9]

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

Constructor to be used when passing an already created object.

Definition at line 1599 of file Shapes.h.

◆ Polyhedra() [6/9]

dd4hep::Polyhedra::Polyhedra ( int  nsides,
double  start,
double  delta,
const std::vector< double > &  z,
const std::vector< double > &  r 
)
inline

Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.

Definition at line 1602 of file Shapes.h.

◆ Polyhedra() [7/9]

dd4hep::Polyhedra::Polyhedra ( int  nsides,
double  start,
double  delta,
const std::vector< double > &  z,
const std::vector< double > &  rmin,
const std::vector< double > &  rmax 
)
inline

Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.

Definition at line 1608 of file Shapes.h.

◆ Polyhedra() [8/9]

dd4hep::Polyhedra::Polyhedra ( const std::string &  nam,
int  nsides,
double  start,
double  delta,
const std::vector< double > &  z,
const std::vector< double > &  r 
)
inline

Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.

Definition at line 1613 of file Shapes.h.

◆ Polyhedra() [9/9]

dd4hep::Polyhedra::Polyhedra ( const std::string &  nam,
int  nsides,
double  start,
double  delta,
const std::vector< double > &  z,
const std::vector< double > &  rmin,
const std::vector< double > &  rmax 
)
inline

Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.

Definition at line 1619 of file Shapes.h.

Member Function Documentation

◆ deltaPhi()

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

Accessor: delta-phi value.

Definition at line 1632 of file Shapes.h.

◆ make()

void Polyhedra::make ( const std::string &  nam,
int  nsides,
double  start,
double  delta,
const std::vector< double > &  z,
const std::vector< double > &  rmin,
const std::vector< double > &  rmax 
)
protected

Helper function to create the polyhedron.

Helper function to create poly hedron.

Definition at line 756 of file Shapes.cpp.

◆ numEdges()

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

Accessor: Number of edges.

Definition at line 1628 of file Shapes.h.

◆ operator=() [1/2]

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

Copy Assignment operator.

◆ operator=() [2/2]

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

Move Assignment operator.

◆ rMax()

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

Accessor: r-max value.

Definition at line 1639 of file Shapes.h.

◆ rMin()

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

Accessor: r-min value.

Definition at line 1637 of file Shapes.h.

◆ startPhi()

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

Accessor: start-phi value.

Definition at line 1630 of file Shapes.h.

◆ z()

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

Accessor: z value.

Definition at line 1635 of file Shapes.h.

◆ zPlaneRmax()

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

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

Definition at line 1646 of file Shapes.h.

◆ zPlaneRmin()

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

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

Definition at line 1644 of file Shapes.h.

◆ zPlaneZ()

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

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

Definition at line 1642 of file Shapes.h.


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