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
 
double volume () const
 
 ~PseudoTrap ()
 
- 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 DDI::Solid::p_.

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

Definition at line 27 of file PseudoTrap.h.

27 { }

Member Function Documentation

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

Reimplemented from DDI::Solid.

Definition at line 8 of file PseudoTrap.cc.

References DDI::Solid::p_.

Referenced by volume().

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

Reimplemented from DDI::Solid.

Definition at line 29 of file PseudoTrap.h.

References stream().

29 { return -1; }