CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
cms::dd::DDTrap Class Reference

#include <DDShapes.h>

Public Member Functions

double alpha1 (void) const
 Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of the face at -pDz. More...
 
double alpha2 (void) const
 Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of the face at +pDz. More...
 
 DDTrap (const cms::DDFilteredView &fview)
 
 DDTrap (void)=delete
 
double halfZ (void) const
 half of the z-Axis More...
 
double phi (void) const
 Azimuthal angle of the line joining the centres of the faces at -/+pDz. More...
 
double theta (void) const
 Polar angle of the line joining the centres of the faces at -/+pDz. More...
 
double x1 (void) const
 Half-length along x of the side at y=-pDy1 of the face at -pDz. More...
 
double x2 (void) const
 Half-length along x of the side at y=+pDy1 of the face at -pDz. More...
 
double x3 (void) const
 Half-length along x of the side at y=-pDy2 of the face at +pDz. More...
 
double x4 (void) const
 Half-length along x of the side at y=+pDy2 of the face at +pDz. More...
 
double y1 (void) const
 Half-length along y of the face at -pDz. More...
 
double y2 (void) const
 Half-length along y of the face at +pDz. More...
 

Public Attributes

const bool valid
 

Private Attributes

double alpha1_
 
double alpha2_
 
double halfZ_
 
double phi_
 
double theta_
 
double x1_
 
double x2_
 
double x3_
 
double x4_
 
double y1_
 
double y2_
 

Detailed Description

Definition at line 78 of file DDShapes.h.

Constructor & Destructor Documentation

DDTrap::DDTrap ( const cms::DDFilteredView fview)

Definition at line 94 of file DDShapes.cc.

References alpha1_, alpha2_, angle_units::operators::convertDegToRad(), halfZ_, cms::DDFilteredView::isATrapezoid(), phi_, theta_, valid, x1_, x2_, x3_, x4_, y1_, and y2_.

94  : valid{fv.isATrapezoid()} {
95  if (valid) {
96  const TGeoTrap *trap = fv.getShapePtr<TGeoTrap>();
97  halfZ_ = trap->GetDz();
98  theta_ = convertDegToRad(trap->GetTheta());
99  phi_ = convertDegToRad(trap->GetPhi());
100  x1_ = trap->GetBl1(); // Along x, low y, low z
101  x2_ = trap->GetTl1(); // Along x, high y, low z
102  y1_ = trap->GetH1(); // Along y, low z
103  y2_ = trap->GetH2(); // Along y, high z
104  x3_ = trap->GetBl2(); // Along x, low y, high z
105  x4_ = trap->GetTl2(); // Along x, high y, high z
106  alpha1_ = convertDegToRad(trap->GetAlpha1());
107  alpha2_ = convertDegToRad(trap->GetAlpha2());
108  }
109 }
double alpha2_
Definition: DDShapes.h:129
constexpr long double convertDegToRad(NumType degrees)
Definition: angle_units.h:27
const bool valid
Definition: DDShapes.h:116
double theta_
Definition: DDShapes.h:120
double alpha1_
Definition: DDShapes.h:128
double halfZ_
Definition: DDShapes.h:119
cms::dd::DDTrap::DDTrap ( void  )
delete

Member Function Documentation

double cms::dd::DDTrap::alpha1 ( void  ) const
inline

Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of the face at -pDz.

Definition at line 111 of file DDShapes.h.

111 { return (alpha1_); }
double alpha1_
Definition: DDShapes.h:128
double cms::dd::DDTrap::alpha2 ( void  ) const
inline

Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of the face at +pDz.

Definition at line 114 of file DDShapes.h.

114 { return (alpha2_); }
double alpha2_
Definition: DDShapes.h:129
double cms::dd::DDTrap::halfZ ( void  ) const
inline

half of the z-Axis

Definition at line 84 of file DDShapes.h.

84 { return (halfZ_); }
double halfZ_
Definition: DDShapes.h:119
double cms::dd::DDTrap::phi ( void  ) const
inline

Azimuthal angle of the line joining the centres of the faces at -/+pDz.

Definition at line 90 of file DDShapes.h.

Referenced by Particle.Particle::__str__(), and ntupleDataFormat.Track::phiPull().

90 { return (phi_); }
double cms::dd::DDTrap::theta ( void  ) const
inline

Polar angle of the line joining the centres of the faces at -/+pDz.

Definition at line 87 of file DDShapes.h.

Referenced by Tau.Tau::zImpact().

87 { return (theta_); }
double theta_
Definition: DDShapes.h:120
double cms::dd::DDTrap::x1 ( void  ) const
inline

Half-length along x of the side at y=-pDy1 of the face at -pDz.

Definition at line 96 of file DDShapes.h.

Referenced by svgfig.Line::__repr__(), svgfig.LineGlobal::__repr__(), svgfig.HLine::__repr__(), svgfig.Rect::__repr__(), svgfig.LineAxis::__repr__(), svgfig.Rect::Path(), and svgfig.LineGlobal::SVG().

96 { return (x1_); }
double cms::dd::DDTrap::x2 ( void  ) const
inline

Half-length along x of the side at y=+pDy1 of the face at -pDz.

Definition at line 99 of file DDShapes.h.

Referenced by svgfig.Line::__repr__(), svgfig.LineGlobal::__repr__(), svgfig.HLine::__repr__(), svgfig.Rect::__repr__(), svgfig.LineAxis::__repr__(), svgfig.Rect::Path(), and svgfig.LineGlobal::SVG().

99 { return (x2_); }
double cms::dd::DDTrap::x3 ( void  ) const
inline

Half-length along x of the side at y=-pDy2 of the face at +pDz.

Definition at line 105 of file DDShapes.h.

105 { return (x3_); }
double cms::dd::DDTrap::x4 ( void  ) const
inline

Half-length along x of the side at y=+pDy2 of the face at +pDz.

Definition at line 108 of file DDShapes.h.

108 { return (x4_); }
double cms::dd::DDTrap::y1 ( void  ) const
inline
double cms::dd::DDTrap::y2 ( void  ) const
inline

Half-length along y of the face at +pDz.

Definition at line 102 of file DDShapes.h.

102 { return (y2_); }

Member Data Documentation

double cms::dd::DDTrap::alpha1_
private

Definition at line 128 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::alpha2_
private

Definition at line 129 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::halfZ_
private

Definition at line 119 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::phi_
private

Definition at line 121 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::theta_
private

Definition at line 120 of file DDShapes.h.

Referenced by DDTrap().

const bool cms::dd::DDTrap::valid

Definition at line 116 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::x1_
private

Definition at line 122 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::x2_
private

Definition at line 123 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::x3_
private

Definition at line 126 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::x4_
private

Definition at line 127 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::y1_
private

Definition at line 124 of file DDShapes.h.

Referenced by DDTrap().

double cms::dd::DDTrap::y2_
private

Definition at line 125 of file DDShapes.h.

Referenced by DDTrap().