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

Class describing a trap shape. More...

#include <Shapes.h>

Inheritance diagram for dd4hep::Trap:
dd4hep::Solid_type< TGeoTrap > dd4hep::Handle< TGeoTrap >

Public Member Functions

 Trap ()=default
 Default constructor. More...
 
 Trap (Trap &&e)=default
 Move Constructor. More...
 
 Trap (const Trap &e)=default
 Copy Constructor. More...
 
template<typename Q >
 Trap (const Q *p)
 Constructor to be used with an existing object. More...
 
template<typename Q >
 Trap (const Handle< Q > &e)
 Constructor to be used when passing an already created object. More...
 
 Trap (double z, double theta, double phi, double h1, double bl1, double tl1, double alpha1, double h2, double bl2, double tl2, double alpha2)
 Constructor to create a new anonymous object with attribute initialization. More...
 
 Trap (double pz, double py, double px, double pLTX)
 Constructor to create a new anonymous object for right angular wedge from STEP (Se G4 manual for details) More...
 
template<typename PZ , typename PY , typename PX , typename PLTX >
 Trap (PZ pz, PY py, PX px, PLTX pLTX)
 Constructor to create a new anonymous object with attribute initialization. More...
 
 Trap (const std::string &name, double z, double theta, double phi, double h1, double bl1, double tl1, double alpha1, double h2, double bl2, double tl2, double alpha2)
 Constructor to create a new identified object with attribute initialization. More...
 
 Trap (const std::string &nam, double pz, double py, double px, double pLTX)
 Constructor to create a new identified object for right angular wedge from STEP (Se G4 manual for details) More...
 
template<typename PZ , typename PY , typename PX , typename PLTX >
 Trap (const std::string &nam, PZ pz, PY py, PX px, PLTX pLTX)
 Constructor to create a new identified object with attribute initialization. More...
 
Trapoperator= (Trap &&copy)=default
 Move Assignment operator. More...
 
Trapoperator= (const Trap &copy)=default
 Copy Assignment operator. More...
 
TrapsetDimensions (double z, double theta, double phi, double h1, double bl1, double tl1, double alpha1, double h2, double bl2, double tl2, double alpha2)
 Set the trap dimensions. More...
 
double phi () const
 Accessor: phi value. More...
 
double theta () const
 Accessor: theta value. More...
 
double alpha1 () const
 Angle between centers of x edges and y axis at low z. More...
 
double alpha2 () const
 Angle between centers of x edges and y axis at low z. More...
 
double bottomLow1 () const
 Half length in x at low z and y low edge. More...
 
double bottomLow2 () const
 Half length in x at high z and y low edge. More...
 
double topLow1 () const
 Half length in x at low z and y high edge. More...
 
double topLow2 () const
 Half length in x at high z and y high edge. More...
 
double high1 () const
 Half length in y at low z. More...
 
double high2 () const
 Half length in y at high z. More...
 
double dZ () const
 Half length in dZ. More...
 
- Public Member Functions inherited from dd4hep::Solid_type< TGeoTrap >
 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 (TGeoTrap *p)
 Direct assignment using the implementation pointer. More...
 
 Solid_type (Handle< TGeoTrap > &&e)
 Move Constructor from handle. More...
 
 Solid_type (const Handle< TGeoTrap > &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< TGeoTrap > & setName (const char *value)
 Set new shape name. More...
 
Solid_type< TGeoTrap > & 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 TGeoTrap * () const
 Auto conversion to underlying ROOT object. More...
 
TGeoTrap * 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< TGeoTrap >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< TGeoTrap > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< TGeoTrap > &element)=default
 Copy constructor. More...
 
 Handle (TGeoTrap *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< TGeoTrap > & operator= (Handle< TGeoTrap > &&element)=default
 Assignment move operator. More...
 
Handle< TGeoTrap > & operator= (const Handle< TGeoTrap > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< TGeoTrap > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< TGeoTrap > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< TGeoTrap > &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< TGeoTrap > & clear ()
 Release the object held by the handle. More...
 
TGeoTrap * operator-> () const
 Access the held object using the -> operator. More...
 
 operator TGeoTrap & () const
 Automatic type conversion to an object references. More...
 
TGeoTrap & operator* () const
 Access the held object using the * operator. More...
 
TGeoTrap * 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...
 
TGeoTrap * 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 &name, double pz, double py, double px, double pLTX)
 Internal helper method to support object construction. More...
 

Additional Inherited Members

- Public Types inherited from dd4hep::Handle< TGeoTrap >
typedef TGeoTrap Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< TGeoTrap > Base
 Self type: used by sub-classes. More...
 
- Static Public Member Functions inherited from dd4hep::Handle< TGeoTrap >
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< TGeoTrap >
TGeoTrap * m_element
 Single and only data member: Reference to the actual element. More...
 
- Protected Member Functions inherited from dd4hep::Solid_type< TGeoTrap >
void _setDimensions (double *param) const
 
void _assign (TGeoTrap *n, const std::string &nam, const std::string &tit, bool cbbox)
 Assign pointrs and register solid to geometry. More...
 

Detailed Description

Class describing a trap shape.

For any further documentation please see the following ROOT documentation:

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

Definition at line 974 of file Shapes.h.

Constructor & Destructor Documentation

◆ Trap() [1/11]

dd4hep::Trap::Trap ( )
default

Default constructor.

◆ Trap() [2/11]

dd4hep::Trap::Trap ( Trap &&  e)
default

Move Constructor.

◆ Trap() [3/11]

dd4hep::Trap::Trap ( const Trap e)
default

Copy Constructor.

◆ Trap() [4/11]

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

Constructor to be used with an existing object.

Definition at line 986 of file Shapes.h.

◆ Trap() [5/11]

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

Constructor to be used when passing an already created object.

Definition at line 988 of file Shapes.h.

◆ Trap() [6/11]

Trap::Trap ( double  z,
double  theta,
double  phi,
double  h1,
double  bl1,
double  tl1,
double  alpha1,
double  h2,
double  bl2,
double  tl2,
double  alpha2 
)

Constructor to create a new anonymous object with attribute initialization.

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

Definition at line 592 of file Shapes.cpp.

◆ Trap() [7/11]

dd4hep::Trap::Trap ( double  pz,
double  py,
double  px,
double  pLTX 
)
inline

Constructor to create a new anonymous object for right angular wedge from STEP (Se G4 manual for details)

Definition at line 995 of file Shapes.h.

◆ Trap() [8/11]

template<typename PZ , typename PY , typename PX , typename PLTX >
dd4hep::Trap::Trap ( PZ  pz,
PY  py,
PX  px,
PLTX  pLTX 
)
inline

Constructor to create a new anonymous object with attribute initialization.

Definition at line 998 of file Shapes.h.

◆ Trap() [9/11]

Trap::Trap ( const std::string &  name,
double  z,
double  theta,
double  phi,
double  h1,
double  bl1,
double  tl1,
double  alpha1,
double  h2,
double  bl2,
double  tl2,
double  alpha2 
)

Constructor to create a new identified object with attribute initialization.

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

Definition at line 601 of file Shapes.cpp.

◆ Trap() [10/11]

dd4hep::Trap::Trap ( const std::string &  nam,
double  pz,
double  py,
double  px,
double  pLTX 
)
inline

Constructor to create a new identified object for right angular wedge from STEP (Se G4 manual for details)

Definition at line 1007 of file Shapes.h.

◆ Trap() [11/11]

template<typename PZ , typename PY , typename PX , typename PLTX >
dd4hep::Trap::Trap ( const std::string &  nam,
PZ  pz,
PY  py,
PX  px,
PLTX  pLTX 
)
inline

Constructor to create a new identified object with attribute initialization.

Definition at line 1011 of file Shapes.h.

Member Function Documentation

◆ alpha1()

double dd4hep::Trap::alpha1 ( ) const
inline

Angle between centers of x edges and y axis at low z.

Definition at line 1028 of file Shapes.h.

◆ alpha2()

double dd4hep::Trap::alpha2 ( ) const
inline

Angle between centers of x edges and y axis at low z.

Definition at line 1030 of file Shapes.h.

◆ bottomLow1()

double dd4hep::Trap::bottomLow1 ( ) const
inline

Half length in x at low z and y low edge.

Definition at line 1032 of file Shapes.h.

◆ bottomLow2()

double dd4hep::Trap::bottomLow2 ( ) const
inline

Half length in x at high z and y low edge.

Definition at line 1034 of file Shapes.h.

◆ dZ()

double dd4hep::Trap::dZ ( ) const
inline

Half length in dZ.

Definition at line 1044 of file Shapes.h.

◆ high1()

double dd4hep::Trap::high1 ( ) const
inline

Half length in y at low z.

Definition at line 1040 of file Shapes.h.

◆ high2()

double dd4hep::Trap::high2 ( ) const
inline

Half length in y at high z.

Definition at line 1042 of file Shapes.h.

◆ make()

void Trap::make ( const std::string &  name,
double  pz,
double  py,
double  px,
double  pLTX 
)
private

Internal helper method to support object construction.

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

Definition at line 611 of file Shapes.cpp.

◆ operator=() [1/2]

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

Copy Assignment operator.

◆ operator=() [2/2]

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

Move Assignment operator.

◆ phi()

double dd4hep::Trap::phi ( ) const
inline

Accessor: phi value.

Definition at line 1024 of file Shapes.h.

◆ setDimensions()

Trap & Trap::setDimensions ( double  z,
double  theta,
double  phi,
double  h1,
double  bl1,
double  tl1,
double  alpha1,
double  h2,
double  bl2,
double  tl2,
double  alpha2 
)

Set the trap dimensions.

Definition at line 631 of file Shapes.cpp.

◆ theta()

double dd4hep::Trap::theta ( ) const
inline

Accessor: theta value.

Definition at line 1026 of file Shapes.h.

◆ topLow1()

double dd4hep::Trap::topLow1 ( ) const
inline

Half length in x at low z and y high edge.

Definition at line 1036 of file Shapes.h.

◆ topLow2()

double dd4hep::Trap::topLow2 ( ) const
inline

Half length in x at high z and y high edge.

Definition at line 1038 of file Shapes.h.


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