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

Class describing a box shape. More...

#include <Shapes.h>

Inheritance diagram for dd4hep::Box:
dd4hep::Solid_type< TGeoBBox > dd4hep::Handle< TGeoBBox >

Public Member Functions

 Box ()=default
 Default constructor. More...
 
 Box (Box &&e)=default
 Move constructor. More...
 
 Box (const Box &e)=default
 Copy constructor. More...
 
template<typename Q >
 Box (const Q *p)
 Constructor to be used with an existing object. More...
 
template<typename Q >
 Box (const Handle< Q > &e)
 Copy Constructor to be used with an existing object handle. More...
 
 Box (double x_val, double y_val, double z_val)
 Constructor to create an anonymous new box object (retrieves name from volume) More...
 
 Box (const std::string &nam, double x_val, double y_val, double z_val)
 Constructor to create a named new box object (retrieves name from volume) More...
 
template<typename X , typename Y , typename Z >
 Box (const X &x_val, const Y &y_val, const Z &z_val)
 Constructor to create an anonymous new box object (retrieves name from volume) More...
 
template<typename X , typename Y , typename Z >
 Box (const std::string &nam, const X &x_val, const Y &y_val, const Z &z_val)
 Constructor to create a named new box object (retrieves name from volume) More...
 
Boxoperator= (Box &&copy)=default
 Move Assignment operator. More...
 
Boxoperator= (const Box &copy)=default
 Copy Assignment operator. More...
 
BoxsetDimensions (double x_val, double y_val, double z_val)
 Set the box dimensions. More...
 
double x () const
 Access half "length" of the box. More...
 
double y () const
 Access half "width" of the box. More...
 
double z () const
 Access half "depth" of the box. More...
 
- Public Member Functions inherited from dd4hep::Solid_type< TGeoBBox >
 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 (TGeoBBox *p)
 Direct assignment using the implementation pointer. More...
 
 Solid_type (Handle< TGeoBBox > &&e)
 Move Constructor from handle. More...
 
 Solid_type (const Handle< TGeoBBox > &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< TGeoBBox > & setName (const char *value)
 Set new shape name. More...
 
Solid_type< TGeoBBox > & 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 TGeoBBox * () const
 Auto conversion to underlying ROOT object. More...
 
TGeoBBox * 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< TGeoBBox >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< TGeoBBox > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< TGeoBBox > &element)=default
 Copy constructor. More...
 
 Handle (TGeoBBox *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< TGeoBBox > & operator= (Handle< TGeoBBox > &&element)=default
 Assignment move operator. More...
 
Handle< TGeoBBox > & operator= (const Handle< TGeoBBox > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< TGeoBBox > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< TGeoBBox > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< TGeoBBox > &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< TGeoBBox > & clear ()
 Release the object held by the handle. More...
 
TGeoBBox * operator-> () const
 Access the held object using the -> operator. More...
 
 operator TGeoBBox & () const
 Automatic type conversion to an object references. More...
 
TGeoBBox & operator* () const
 Access the held object using the * operator. More...
 
TGeoBBox * 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...
 
TGeoBBox * 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 &name, double x_val, double y_val, double z_val)
 Internal helper method to support object construction. More...
 
- Protected Member Functions inherited from dd4hep::Solid_type< TGeoBBox >
void _setDimensions (double *param) const
 
void _assign (TGeoBBox *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< TGeoBBox >
typedef TGeoBBox Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< TGeoBBox > Base
 Self type: used by sub-classes. More...
 
- Static Public Member Functions inherited from dd4hep::Handle< TGeoBBox >
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< TGeoBBox >
TGeoBBox * m_element
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

Class describing a box shape.

For any further documentation please see the following ROOT documentation:

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

Definition at line 294 of file Shapes.h.

Constructor & Destructor Documentation

◆ Box() [1/9]

dd4hep::Box::Box ( )
default

Default constructor.

◆ Box() [2/9]

dd4hep::Box::Box ( Box &&  e)
default

Move constructor.

◆ Box() [3/9]

dd4hep::Box::Box ( const Box e)
default

Copy constructor.

◆ Box() [4/9]

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

Constructor to be used with an existing object.

Definition at line 307 of file Shapes.h.

◆ Box() [5/9]

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

Copy Constructor to be used with an existing object handle.

Definition at line 309 of file Shapes.h.

◆ Box() [6/9]

dd4hep::Box::Box ( double  x_val,
double  y_val,
double  z_val 
)
inline

Constructor to create an anonymous new box object (retrieves name from volume)

Definition at line 312 of file Shapes.h.

◆ Box() [7/9]

dd4hep::Box::Box ( const std::string &  nam,
double  x_val,
double  y_val,
double  z_val 
)
inline

Constructor to create a named new box object (retrieves name from volume)

Definition at line 315 of file Shapes.h.

◆ Box() [8/9]

template<typename X , typename Y , typename Z >
dd4hep::Box::Box ( const X &  x_val,
const Y &  y_val,
const Z &  z_val 
)
inline

Constructor to create an anonymous new box object (retrieves name from volume)

Definition at line 320 of file Shapes.h.

◆ Box() [9/9]

template<typename X , typename Y , typename Z >
dd4hep::Box::Box ( const std::string &  nam,
const X &  x_val,
const Y &  y_val,
const Z &  z_val 
)
inline

Constructor to create a named new box object (retrieves name from volume)

Definition at line 324 of file Shapes.h.

Member Function Documentation

◆ make()

void Box::make ( const std::string &  name,
double  x_val,
double  y_val,
double  z_val 
)
protected

Internal helper method to support object construction.

Definition at line 143 of file Shapes.cpp.

◆ operator=() [1/2]

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

Move Assignment operator.

◆ operator=() [2/2]

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

Copy Assignment operator.

◆ setDimensions()

Box & Box::setDimensions ( double  x_val,
double  y_val,
double  z_val 
)

Set the box dimensions.

Set the box dimensionsy.

Definition at line 148 of file Shapes.cpp.

◆ x()

double Box::x ( ) const

Access half "length" of the box.

Definition at line 155 of file Shapes.cpp.

◆ y()

double Box::y ( ) const

Access half "width" of the box.

Definition at line 160 of file Shapes.cpp.

◆ z()

double Box::z ( ) const

Access half "depth" of the box.

Definition at line 165 of file Shapes.cpp.


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