CMS 3D CMS Logo

List of all members | Public Member Functions
DDBox Class Reference

Interface to a Box. More...

#include <DDSolid.h>

Inheritance diagram for DDBox:
DDSolid DDBase< DDName, std::unique_ptr< DDI::Solid > >

Public Member Functions

 DDBox (const DDSolid &s)
 
 DDBox (void)=delete
 
double halfX (void) const
 
double halfY (void) const
 
double halfZ (void) const
 
- Public Member Functions inherited from DDSolid
 DDSolid (void)
 Uninitialilzed solid reference-object; for further details on reference-objects see documentation of DDLogicalPart. More...
 
 DDSolid (const DDName &name)
 Creates a reference-object to a solid named name. More...
 
const std::vector< double > & parameters (void) const
 Give the parameters of the solid. More...
 
DDSolidShape shape (void) const
 The type of the solid. More...
 
double volume (void) const
 Returns the volume of the given solid (does not work with boolean soids !) More...
 
- Public Member Functions inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > >
void create (const DDName &name, std::unique_ptr< DDI::Solid > vals)
 
void create (const DDName &name)
 
 DDBase ()
 
const DDNameddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const DDNamename () const
 
 operator bool () const
 
bool operator< (const DDBase &b) const
 
bool operator== (const DDBase &b) const
 
bool operator> (const DDBase &b) const
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep () const
 
DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep ()
 
std::string toString () const
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference val () const
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference val ()
 
virtual ~DDBase ()
 

Additional Inherited Members

- Public Types inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > >
using def_type = std::pair< const DDName *, bool >
 
using StoreT = DDI::Singleton< DDI::Store< DDName, std::unique_ptr< DDI::Solid > > >
 
- Static Public Member Functions inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > >
static auto begin ()
 
static auto end ()
 

Detailed Description

Interface to a Box.

The definition (parameters, local frame) of the Box is the same than in Geant4.

Definition at line 163 of file DDSolid.h.

Constructor & Destructor Documentation

DDBox::DDBox ( const DDSolid s)

Definition at line 255 of file DDSolid.cc.

References ddbox, Exception, DDName::name(), DDBase< N, C >::name(), DDName::ns(), DDSolid::shape(), and AlCaHLTBitMon_QueryRunRegistry::string.

256  : DDSolid(s)
257 {
258  if (s.shape() != DDSolidShape::ddbox) {
259  std::string ex = "Solid [" + s.name().ns() + ":" + s.name().name() + "] is not a DDBox.\n";
260  ex = ex + "Use a different solid interface!";
261  throw cms::Exception("DDException") << ex;
262  }
263 }
const N & name() const
Definition: DDBase.h:74
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:67
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:138
DDSolid(void)
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of ...
Definition: DDSolid.cc:55
const std::string & name() const
Returns the name.
Definition: DDName.cc:53
DDBox::DDBox ( void  )
delete

Member Function Documentation

double DDBox::halfX ( void  ) const

Definition at line 266 of file DDSolid.cc.

References DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep().

Referenced by DDDividedBoxX::DDDividedBoxX(), DDDividedBoxX::getMaxParameter(), HcalGeomParameters::loadGeometry(), DDDividedBoxX::makeDDTranslation(), and DDCoreToDDXMLOutput::solid().

267 { return rep().parameters()[0]; }
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep() const
Definition: DDBase.h:80
double DDBox::halfY ( void  ) const
double DDBox::halfZ ( void  ) const

Definition at line 274 of file DDSolid.cc.

References DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep().

Referenced by DDDividedBoxZ::DDDividedBoxZ(), DDDividedBoxZ::getMaxParameter(), HcalGeomParameters::loadGeometry(), DDDividedBoxZ::makeDDTranslation(), and DDCoreToDDXMLOutput::solid().

275 { return rep().parameters()[2]; }
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep() const
Definition: DDBase.h:80