CMS 3D CMS Logo

List of all members | Public Member Functions
DDI::CutTubs Class Reference

#include <CutTubs.h>

Inheritance diagram for DDI::CutTubs:
DDI::Solid

Public Member Functions

 CutTubs (double zHalf, double rIn, double rOut, double startPhi, double deltaPhi, double lx, double ly, double lz, double tx, double ty, double tz)
 
void stream (std::ostream &os) const override
 
double volume () const override
 
- Public Member Functions inherited from DDI::Solid
const std::vector< double > & parameters () const
 
void setParameters (std::vector< double > const &p)
 
DDSolidShape shape () const
 
 Solid ()
 
 Solid (DDSolidShape shape)
 
virtual ~Solid ()
 

Additional Inherited Members

- Protected Attributes inherited from DDI::Solid
std::vector< double > p_
 
DDSolidShape shape_
 

Detailed Description

Definition at line 9 of file CutTubs.h.

Constructor & Destructor Documentation

DDI::CutTubs::CutTubs ( double  zHalf,
double  rIn,
double  rOut,
double  startPhi,
double  deltaPhi,
double  lx,
double  ly,
double  lz,
double  tx,
double  ty,
double  tz 
)

Definition at line 13 of file CutTubs.cc.

References ddcuttubs, and DDI::Solid::p_.

20 {
21  p_.emplace_back(zhalf);
22  p_.emplace_back(rIn);
23  p_.emplace_back(rOut);
24  p_.emplace_back(startPhi);
25  p_.emplace_back(deltaPhi);
26  p_.emplace_back(lx);
27  p_.emplace_back(ly);
28  p_.emplace_back(lz);
29  p_.emplace_back(tx);
30  p_.emplace_back(ty);
31  p_.emplace_back(tz);
32 }
Solid()
Definition: Solid.h:14
std::vector< double > p_
Definition: Solid.h:32

Member Function Documentation

void DDI::CutTubs::stream ( std::ostream &  os) const
overridevirtual

Reimplemented from DDI::Solid.

Definition at line 34 of file CutTubs.cc.

References CONVERT_TO, and DDI::Solid::p_.

Referenced by volume().

35 {
36  os << " zhalf=" << CONVERT_TO( p_[0], cm )
37  << " rIn=" << CONVERT_TO( p_[1], cm )
38  << " rOut=" << CONVERT_TO( p_[2], cm )
39  << " startPhi=" << CONVERT_TO( p_[3], deg )
40  << " deltaPhi=" << CONVERT_TO( p_[4], deg )
41  << " Outside Normal at -z (" << p_[5] << "," << p_[6] << "," << p_[7] << ")"
42  << " Outside Normal at +z (" << p_[8] << "," << p_[9] << "," << p_[10] << ")";
43 }
#define CONVERT_TO(_x, _y)
Definition: DDUnits.h:6
std::vector< double > p_
Definition: Solid.h:32
double DDI::CutTubs::volume ( void  ) const
inlineoverridevirtual

Reimplemented from DDI::Solid.

Definition at line 19 of file CutTubs.h.

References stream().

19 { return -1; }