DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Member Functions | List of all members

Class describing a sphere shape. More...

#include <Shapes.h>

Inheritance diagram for dd4hep::Sphere:
dd4hep::Solid_type< TGeoSphere > dd4hep::Handle< TGeoSphere >

Public Member Functions

 Sphere ()=default
 Default constructor. More...
 
 Sphere (Sphere &&e)=default
 Move Constructor. More...
 
 Sphere (const Sphere &e)=default
 Copy Constructor. More...
 
template<typename Q >
 Sphere (const Q *p)
 Constructor to be used with an existing object. More...
 
template<typename Q >
 Sphere (const Handle< Q > &e)
 Constructor to be used when passing an already created object. More...
 
 Sphere (double rmin, double rmax, double startTheta=0.0, double endTheta=M_PI, double startPhi=0.0, double endPhi=2. *M_PI)
 Constructor to create a new anonymous object with attribute initialization. More...
 
template<typename RMIN , typename RMAX , typename STARTTHETA = double, typename ENDTHETA = double, typename STARTPHI = double, typename ENDPHI = double>
 Sphere (RMIN rmin, RMAX rmax, STARTTHETA startTheta=0.0, ENDTHETA endTheta=M_PI, STARTPHI startPhi=0.0, ENDPHI endPhi=2. *M_PI)
 Constructor to create a new anonymous object with generic attribute initialization. More...
 
 Sphere (const std::string &nam, double rmin, double rmax, double startTheta=0.0, double endTheta=M_PI, double startPhi=0.0, double endPhi=2. *M_PI)
 Constructor to create a new identified object with attribute initialization. More...
 
template<typename RMIN , typename RMAX , typename STARTTHETA = double, typename ENDTHETA = double, typename STARTPHI = double, typename ENDPHI = double>
 Sphere (const std::string &nam, RMIN rmin, RMAX rmax, STARTTHETA startTheta=0.0, ENDTHETA endTheta=M_PI, STARTPHI startPhi=0.0, ENDPHI endPhi=2. *M_PI)
 Constructor to create a new identified object with generic attribute initialization. More...
 
Sphereoperator= (Sphere &&copy)=default
 Move Assignment operator. More...
 
Sphereoperator= (const Sphere &copy)=default
 Copy Assignment operator. More...
 
SpheresetDimensions (double rmin, double rmax, double startTheta, double endTheta, double startPhi, double endPhi)
 Set the Sphere dimensions. More...
 
double startPhi () const
 Accessor: start-phi value. More...
 
double endPhi () const
 Accessor: end-phi value. More...
 
double startTheta () const
 Accessor: start-theta value. More...
 
double endTheta () const
 Accessor: end-theta value. More...
 
double rMin () const
 Accessor: r-min value. More...
 
double rMax () const
 Accessor: r-max value. More...
 
- Public Member Functions inherited from dd4hep::Solid_type< TGeoSphere >
 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 (TGeoSphere *p)
 Direct assignment using the implementation pointer. More...
 
 Solid_type (Handle< TGeoSphere > &&e)
 Move Constructor from handle. More...
 
 Solid_type (const Handle< TGeoSphere > &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< TGeoSphere > & setName (const char *value)
 Set new shape name. More...
 
Solid_type< TGeoSphere > & 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 TGeoSphere * () const
 Auto conversion to underlying ROOT object. More...
 
TGeoSphere * 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< TGeoSphere >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< TGeoSphere > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< TGeoSphere > &element)=default
 Copy constructor. More...
 
 Handle (TGeoSphere *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< TGeoSphere > & operator= (Handle< TGeoSphere > &&element)=default
 Assignment move operator. More...
 
Handle< TGeoSphere > & operator= (const Handle< TGeoSphere > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< TGeoSphere > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< TGeoSphere > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< TGeoSphere > &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< TGeoSphere > & clear ()
 Release the object held by the handle. More...
 
TGeoSphere * operator-> () const
 Access the held object using the -> operator. More...
 
 operator TGeoSphere & () const
 Automatic type conversion to an object references. More...
 
TGeoSphere & operator* () const
 Access the held object using the * operator. More...
 
TGeoSphere * 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...
 
TGeoSphere * 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, double rmin, double rmax, double startTheta, double endTheta, double startPhi, double endPhi)
 Constructor function to be used when creating a new object with attribute initialization. More...
 
- Protected Member Functions inherited from dd4hep::Solid_type< TGeoSphere >
void _setDimensions (double *param) const
 
void _assign (TGeoSphere *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< TGeoSphere >
typedef TGeoSphere Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< TGeoSphere > Base
 Self type: used by sub-classes. More...
 
- Static Public Member Functions inherited from dd4hep::Handle< TGeoSphere >
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< TGeoSphere >
TGeoSphere * m_element
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

Class describing a sphere shape.

For any further documentation please see the following ROOT documentation:

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

Definition at line 1288 of file Shapes.h.

Constructor & Destructor Documentation

◆ Sphere() [1/9]

dd4hep::Sphere::Sphere ( )
default

Default constructor.

◆ Sphere() [2/9]

dd4hep::Sphere::Sphere ( Sphere &&  e)
default

Move Constructor.

◆ Sphere() [3/9]

dd4hep::Sphere::Sphere ( const Sphere e)
default

Copy Constructor.

◆ Sphere() [4/9]

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

Constructor to be used with an existing object.

Definition at line 1303 of file Shapes.h.

◆ Sphere() [5/9]

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

Constructor to be used when passing an already created object.

Definition at line 1305 of file Shapes.h.

◆ Sphere() [6/9]

dd4hep::Sphere::Sphere ( double  rmin,
double  rmax,
double  startTheta = 0.0,
double  endTheta = M_PI,
double  startPhi = 0.0,
double  endPhi = 2. * M_PI 
)
inline

Constructor to create a new anonymous object with attribute initialization.

Definition at line 1308 of file Shapes.h.

◆ Sphere() [7/9]

template<typename RMIN , typename RMAX , typename STARTTHETA = double, typename ENDTHETA = double, typename STARTPHI = double, typename ENDPHI = double>
dd4hep::Sphere::Sphere ( RMIN  rmin,
RMAX  rmax,
STARTTHETA  startTheta = 0.0,
ENDTHETA  endTheta = M_PI,
STARTPHI  startPhi = 0.0,
ENDPHI  endPhi = 2. * M_PI 
)
inline

Constructor to create a new anonymous object with generic attribute initialization.

Definition at line 1316 of file Shapes.h.

◆ Sphere() [8/9]

dd4hep::Sphere::Sphere ( const std::string &  nam,
double  rmin,
double  rmax,
double  startTheta = 0.0,
double  endTheta = M_PI,
double  startPhi = 0.0,
double  endPhi = 2. * M_PI 
)
inline

Constructor to create a new identified object with attribute initialization.

Definition at line 1326 of file Shapes.h.

◆ Sphere() [9/9]

template<typename RMIN , typename RMAX , typename STARTTHETA = double, typename ENDTHETA = double, typename STARTPHI = double, typename ENDPHI = double>
dd4hep::Sphere::Sphere ( const std::string &  nam,
RMIN  rmin,
RMAX  rmax,
STARTTHETA  startTheta = 0.0,
ENDTHETA  endTheta = M_PI,
STARTPHI  startPhi = 0.0,
ENDPHI  endPhi = 2. * M_PI 
)
inline

Constructor to create a new identified object with generic attribute initialization.

Definition at line 1335 of file Shapes.h.

Member Function Documentation

◆ endPhi()

double dd4hep::Sphere::endPhi ( ) const
inline

Accessor: end-phi value.

Definition at line 1357 of file Shapes.h.

◆ endTheta()

double dd4hep::Sphere::endTheta ( ) const
inline

Accessor: end-theta value.

Definition at line 1361 of file Shapes.h.

◆ make()

void Sphere::make ( const std::string &  nam,
double  rmin,
double  rmax,
double  startTheta,
double  endTheta,
double  startPhi,
double  endPhi 
)
protected

Constructor function to be used when creating a new object with attribute initialization.

Definition at line 566 of file Shapes.cpp.

◆ operator=() [1/2]

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

Copy Assignment operator.

◆ operator=() [2/2]

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

Move Assignment operator.

◆ rMax()

double dd4hep::Sphere::rMax ( ) const
inline

Accessor: r-max value.

Definition at line 1365 of file Shapes.h.

◆ rMin()

double dd4hep::Sphere::rMin ( ) const
inline

Accessor: r-min value.

Definition at line 1363 of file Shapes.h.

◆ setDimensions()

Sphere & Sphere::setDimensions ( double  rmin,
double  rmax,
double  startTheta,
double  endTheta,
double  startPhi,
double  endPhi 
)

Set the Sphere dimensions.

Definition at line 573 of file Shapes.cpp.

◆ startPhi()

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

Accessor: start-phi value.

Definition at line 1355 of file Shapes.h.

◆ startTheta()

double dd4hep::Sphere::startTheta ( ) const
inline

Accessor: start-theta value.

Definition at line 1359 of file Shapes.h.


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