#ifndef SILADDER_HPP #define SILADDER_HPP // // $Id: SiLadder.hpp,v 1.12 2005/03/09 19:43:51 snyder Exp $ // // File: SiLadder.hh // Purpose: // Created: 21-OCT-1997 John Hobbs // // $Revision: 1.12 $ // // // Include files #include #include #include // Global definitions /// Define a silicon ladder. class SiLadder: public dgs::Plane { public: /// Default constructor (a ladder of zero dimensions) SiLadder(): dgs::Plane(0.0,0.0),_awidth(0.),_alength(0.),_cawidth(0.),_calength(0.) {} /// Instantiate a ladder with definite dimensions. SiLadder(float dxhalf, float dyhalf, float alength,float awidth,float calength,float cawidth): dgs::Plane(dxhalf,dyhalf), _awidth(awidth),_alength(alength), _cawidth(cawidth),_calength(calength) {} /** Return the address of the children. Used within dgs::GeometryElement and ReferencePoint to do positioning. */ const std::list get_children(); #ifdef OLDMAN /** Transform a point in the local ladder coordinate system to a global point in the D0 coordinate system. */ virtual SpacePoint local_to_global(const dgs::CartesianCoordinate& lpt) const; /** Transform a matrix in the local ladder coordinate system to a matrix in the global D0 coordinate system. */ virtual MatrixD local_to_global(const dgs::CartesianMatrix& theMatrix) const; /** Transform a point in the D0 coordinate system to a point in the local ladder coordinate system. */ virtual dgs::CartesianCoordinate global_to_local(const SpacePoint& gpt) const; #endif /// Text dump a ladder. friend std::ostream& operator<< (std::ostream& os, const SiLadder& me); friend bool operator<(const SiLadder& lhs, const SiLadder &rhs); /// Compare the size and position of the ladders friend bool operator==(const SiLadder& lhs, const SiLadder &rhs); /// and do it again friend bool operator!=(const SiLadder& lhs, const SiLadder &rhs) { return !(lhs==rhs); } float get_alength() const; float get_awidth() const; float get_alcenter() const; float get_awcenter() const; public: D0_OBJECT_SETUP(SiLadder); protected: float _awidth; float _alength; float _cawidth; float _calength; }; // Constructors/Destructors // Accessors #endif //SILADDER_HPP