CMS 3D CMS Logo

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

#include <PseudoTrap.h>

Inheritance diagram for DDI::PseudoTrap:
DDI::Solid

Public Member Functions

 PseudoTrap (double x1, double x2, double y1, double y2, double z, double radius, bool minusZ)
 
void stream (std::ostream &os) const override
 
double volume () const override
 
 ~PseudoTrap () 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 12 of file PseudoTrap.h.

Constructor & Destructor Documentation

◆ PseudoTrap()

DDI::PseudoTrap::PseudoTrap ( double  x1,
double  x2,
double  y1,
double  y2,
double  z,
double  radius,
bool  minusZ 
)
inline

◆ ~PseudoTrap()

DDI::PseudoTrap::~PseudoTrap ( )
inlineoverride

Definition at line 25 of file PseudoTrap.h.

25 {}

Member Function Documentation

◆ stream()

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

Reimplemented from DDI::Solid.

Definition at line 6 of file PseudoTrap.cc.

References angle_units::operators::convertMmToCm().

6  {
7  os << " x1[cm]=" << convertMmToCm(p_[0]) << " x2[cm]=" << convertMmToCm(p_[1]) << " y1[cm]=" << convertMmToCm(p_[2])
8  << " y2[cm]=" << convertMmToCm(p_[3]) << " z[cm]=" << convertMmToCm(p_[4])
9  << " radius[cm]=" << convertMmToCm(p_[5]);
10 
11  if (p_[6])
12  os << " minusZ=[yes]";
13  else
14  os << " minusZ=[no]";
15 }
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
std::vector< double > p_
Definition: Solid.h:30

◆ volume()

double DDI::PseudoTrap::volume ( void  ) const
inlineoverridevirtual

Reimplemented from DDI::Solid.

Definition at line 27 of file PseudoTrap.h.

27 { return -1; }