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

Class describing a tessellated shape. More...

#include <Shapes.h>

Inheritance diagram for dd4hep::TessellatedSolid:
dd4hep::Solid_type< TGeoTessellated > dd4hep::Handle< TGeoTessellated >

Public Types

typedef Object::Vertex_t Vertex
 
typedef TGeoFacet Facet
 
- Public Types inherited from dd4hep::Handle< TGeoTessellated >
typedef TGeoTessellated Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< TGeoTessellated > Base
 Self type: used by sub-classes. More...
 

Public Member Functions

 TessellatedSolid ()=default
 Default constructor. More...
 
 TessellatedSolid (TessellatedSolid &&e)=default
 Move Constructor. More...
 
 TessellatedSolid (const TessellatedSolid &e)=default
 Copy Constructor. More...
 
template<typename Q >
 TessellatedSolid (const Q *p)
 Constructor to be used with an existing object. More...
 
template<typename Q >
 TessellatedSolid (const Handle< Q > &e)
 Constructor to be used when passing an already created object. More...
 
 TessellatedSolid (int num_facets)
 Constructor to create a new anonymous object with attribute initialization. More...
 
 TessellatedSolid (const std::vector< Vertex > &vertices)
 Constructor to create a new identified object with attribute initialization. More...
 
 TessellatedSolid (const std::string &nam, int num_facets)
 Constructor to create a new anonymous object with attribute initialization. More...
 
 TessellatedSolid (const std::string &nam, const std::vector< Vertex > &vertices)
 Constructor to create a new identified object with attribute initialization. More...
 
TessellatedSolidoperator= (TessellatedSolid &&copy)=default
 Move Assignment operator. More...
 
TessellatedSolidoperator= (const TessellatedSolid &copy)=default
 Copy Assignment operator. More...
 
bool addFacet (const Vertex &pt0, const Vertex &pt1, const Vertex &pt2) const
 Add new facet to the shape. More...
 
bool addFacet (const Vertex &pt0, const Vertex &pt1, const Vertex &pt2, const Vertex &pt3) const
 Add new facet to the shape. More...
 
bool addFacet (const int pt0, const int pt1, const int pt2) const
 Add new facet to the shape. Call only if the tessellated shape was constructed with vertices. More...
 
bool addFacet (const int pt0, const int pt1, const int pt2, const int pt3) const
 Add new facet to the shape. Call only if the tessellated shape was constructed with vertices. More...
 
int num_facet () const
 Access the number of facets in the shape. More...
 
const Facetfacet (int index) const
 Access a facet from the built shape. More...
 
int num_vertex () const
 Access the number of vertices in the shape. More...
 
const Vertexvertex (int index) const
 Access a single vertex from the shape. More...
 
- Public Member Functions inherited from dd4hep::Solid_type< TGeoTessellated >
 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 (TGeoTessellated *p)
 Direct assignment using the implementation pointer. More...
 
 Solid_type (Handle< TGeoTessellated > &&e)
 Move Constructor from handle. More...
 
 Solid_type (const Handle< TGeoTessellated > &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< TGeoTessellated > & setName (const char *value)
 Set new shape name. More...
 
Solid_type< TGeoTessellated > & 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 TGeoTessellated * () const
 Auto conversion to underlying ROOT object. More...
 
TGeoTessellated * 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< TGeoTessellated >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< TGeoTessellated > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< TGeoTessellated > &element)=default
 Copy constructor. More...
 
 Handle (TGeoTessellated *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< TGeoTessellated > & operator= (Handle< TGeoTessellated > &&element)=default
 Assignment move operator. More...
 
Handle< TGeoTessellated > & operator= (const Handle< TGeoTessellated > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< TGeoTessellated > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< TGeoTessellated > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< TGeoTessellated > &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< TGeoTessellated > & clear ()
 Release the object held by the handle. More...
 
TGeoTessellated * operator-> () const
 Access the held object using the -> operator. More...
 
 operator TGeoTessellated & () const
 Automatic type conversion to an object references. More...
 
TGeoTessellated & operator* () const
 Access the held object using the * operator. More...
 
TGeoTessellated * 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...
 
TGeoTessellated * 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...
 

Private Member Functions

void make (const std::string &nam, int num_facets)
 Internal helper method to support object construction. More...
 
void make (const std::string &nam, const std::vector< Object::Vertex_t > &vertices)
 Internal helper method to support object construction. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from dd4hep::Handle< TGeoTessellated >
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< TGeoTessellated >
TGeoTessellated * m_element
 Single and only data member: Reference to the actual element. More...
 
- Protected Member Functions inherited from dd4hep::Solid_type< TGeoTessellated >
void _setDimensions (double *param) const
 
void _assign (TGeoTessellated *n, const std::string &nam, const std::string &tit, bool cbbox)
 Assign pointrs and register solid to geometry. More...
 

Detailed Description

Class describing a tessellated shape.

For any further documentation please see the following ROOT documentation:

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

Definition at line 1772 of file Shapes.h.

Member Typedef Documentation

◆ Facet

Definition at line 1781 of file Shapes.h.

◆ Vertex

typedef Object::Vertex_t dd4hep::TessellatedSolid::Vertex

Definition at line 1780 of file Shapes.h.

Constructor & Destructor Documentation

◆ TessellatedSolid() [1/9]

dd4hep::TessellatedSolid::TessellatedSolid ( )
default

Default constructor.

◆ TessellatedSolid() [2/9]

dd4hep::TessellatedSolid::TessellatedSolid ( TessellatedSolid &&  e)
default

Move Constructor.

◆ TessellatedSolid() [3/9]

dd4hep::TessellatedSolid::TessellatedSolid ( const TessellatedSolid e)
default

Copy Constructor.

◆ TessellatedSolid() [4/9]

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

Constructor to be used with an existing object.

Definition at line 1791 of file Shapes.h.

◆ TessellatedSolid() [5/9]

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

Constructor to be used when passing an already created object.

Definition at line 1793 of file Shapes.h.

◆ TessellatedSolid() [6/9]

dd4hep::TessellatedSolid::TessellatedSolid ( int  num_facets)
inline

Constructor to create a new anonymous object with attribute initialization.

Definition at line 1796 of file Shapes.h.

◆ TessellatedSolid() [7/9]

dd4hep::TessellatedSolid::TessellatedSolid ( const std::vector< Vertex > &  vertices)
inline

Constructor to create a new identified object with attribute initialization.

Definition at line 1800 of file Shapes.h.

◆ TessellatedSolid() [8/9]

dd4hep::TessellatedSolid::TessellatedSolid ( const std::string &  nam,
int  num_facets 
)
inline

Constructor to create a new anonymous object with attribute initialization.

Definition at line 1804 of file Shapes.h.

◆ TessellatedSolid() [9/9]

dd4hep::TessellatedSolid::TessellatedSolid ( const std::string &  nam,
const std::vector< Vertex > &  vertices 
)
inline

Constructor to create a new identified object with attribute initialization.

Definition at line 1808 of file Shapes.h.

Member Function Documentation

◆ addFacet() [1/4]

bool TessellatedSolid::addFacet ( const int  pt0,
const int  pt1,
const int  pt2 
) const

Add new facet to the shape. Call only if the tessellated shape was constructed with vertices.

Definition at line 821 of file Shapes.cpp.

◆ addFacet() [2/4]

bool TessellatedSolid::addFacet ( const int  pt0,
const int  pt1,
const int  pt2,
const int  pt3 
) const

Add new facet to the shape. Call only if the tessellated shape was constructed with vertices.

Definition at line 826 of file Shapes.cpp.

◆ addFacet() [3/4]

bool TessellatedSolid::addFacet ( const Vertex pt0,
const Vertex pt1,
const Vertex pt2 
) const

Add new facet to the shape.

Definition at line 811 of file Shapes.cpp.

◆ addFacet() [4/4]

bool TessellatedSolid::addFacet ( const Vertex pt0,
const Vertex pt1,
const Vertex pt2,
const Vertex pt3 
) const

Add new facet to the shape.

Definition at line 816 of file Shapes.cpp.

◆ facet()

const TessellatedSolid::Facet & TessellatedSolid::facet ( int  index) const

Access a facet from the built shape.

Definition at line 836 of file Shapes.cpp.

◆ make() [1/2]

void TessellatedSolid::make ( const std::string &  nam,
const std::vector< Object::Vertex_t > &  vertices 
)
private

Internal helper method to support object construction.

Definition at line 806 of file Shapes.cpp.

◆ make() [2/2]

void TessellatedSolid::make ( const std::string &  nam,
int  num_facets 
)
private

Internal helper method to support object construction.

Definition at line 801 of file Shapes.cpp.

◆ num_facet()

int TessellatedSolid::num_facet ( ) const

Access the number of facets in the shape.

Definition at line 831 of file Shapes.cpp.

◆ num_vertex()

int TessellatedSolid::num_vertex ( ) const

Access the number of vertices in the shape.

Definition at line 841 of file Shapes.cpp.

◆ operator=() [1/2]

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

Copy Assignment operator.

◆ operator=() [2/2]

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

Move Assignment operator.

◆ vertex()

const TessellatedSolid::Vertex & TessellatedSolid::vertex ( int  index) const

Access a single vertex from the shape.

Definition at line 846 of file Shapes.cpp.


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