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

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

Definition at line 15 of file PseudoTrap.h.

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

17  {
18  p_.emplace_back(x1);
19  p_.emplace_back(x2);
20  p_.emplace_back(y1);
21  p_.emplace_back(y2);
22  p_.emplace_back(z);
23  p_.emplace_back(radius);
24  p_.emplace_back(minusZ);
25  }
Solid()
Definition: Solid.h:14
std::vector< double > p_
Definition: Solid.h:32
DDI::PseudoTrap::~PseudoTrap ( )
inlineoverride

Definition at line 27 of file PseudoTrap.h.

27 { }

Member Function Documentation

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

Reimplemented from DDI::Solid.

Definition at line 6 of file PseudoTrap.cc.

References CONVERT_TO.

Referenced by volume().

7 {
8  os << " x1[cm]=" << CONVERT_TO( p_[0], cm )
9  << " x2[cm]=" << CONVERT_TO( p_[1], cm )
10  << " y1[cm]=" << CONVERT_TO( p_[2], cm )
11  << " y2[cm]=" << CONVERT_TO( p_[3], cm )
12  << " z[cm]=" << CONVERT_TO( p_[4], cm )
13  << " radius[cm]=" << CONVERT_TO( p_[5], cm );
14 
15  if (p_[6])
16  os << " minusZ=[yes]";
17  else
18  os << " minusZ=[no]";
19 }
#define CONVERT_TO(_x, _y)
Definition: DDUnits.h:6
std::vector< double > p_
Definition: Solid.h:32
double DDI::PseudoTrap::volume ( void  ) const
inlineoverridevirtual

Reimplemented from DDI::Solid.

Definition at line 29 of file PseudoTrap.h.

References stream().

29 { return -1; }