CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 14 of file PseudoTrap.h.

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

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

Definition at line 25 of file PseudoTrap.h.

25 {}

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 geant_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 }
std::vector< double > p_
Definition: Solid.h:30
constexpr NumType convertMmToCm(NumType millimeters)
Definition: GeantUnits.h:63
double DDI::PseudoTrap::volume ( void  ) const
inlineoverridevirtual

Reimplemented from DDI::Solid.

Definition at line 27 of file PseudoTrap.h.

27 { return -1; }