#ifndef SIWEDGE_HPP #define SIWEDGE_HPP // // $Id: SiWedge.hpp,v 1.9 2005/03/09 19:43:51 snyder Exp $ // // File: SiWedge.hpp // Purpose: // Created: 22-NOV-1997 Tom Trippe // // $Revision: 1.9 $ // // Include files #include #include namespace dgs { class CartesianCoordinate; class CartesianMatrix; } // Global definitions class SiWedge: public dgs::Wedge { public: /// Default constructor (a wedge of zero dimensions) SiWedge(): dgs::Wedge(0.0,0.0,0.0),_act_halfwidth1(0.), _act_halfwidth2(0.),_act_halfheight(0.), _act_center(0.) {} /// Instantiate a wedge with definite dimensions. SiWedge(float dswidth, float dheight, float dangle,float a_dw1,float a_dw2,float a_dh, float a_center): dgs::Wedge(dswidth,dheight,dangle), _act_halfwidth1(a_dw1), _act_halfwidth2(a_dw2),_act_halfheight(a_dh), _act_center(a_center) {} /** Return the address of the children. Used within dgs::GeometryElement and ReferencePoint to do positioning. */ const std::list get_children(); /** Transform a point in the local wedge coordinate system (for a p-side: z-axis along the height pointing up, y-axis pointing into the wedge and x-axis to define a right-handed 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 wedge coordinate system (for a p-side: z-axis along the height pointing up, y-axis pointing into the wedge and x-axis to define a right-handed 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 (for a p-side: z-axis along the height pointing up, y-axis pointing into the wedge and x-axis to define a right-handed coordinate system) to a point in the local wedge coordinate system. */ virtual dgs::CartesianCoordinate global_to_local(const SpacePoint& gpt) const; float get_aw1size() const; float get_aw2size() const; float get_ahsize() const ; float get_acenter() const ; /// Text dump a wedge. friend std::ostream& operator<< (std::ostream& os, const SiWedge& me); /// Are two wedges equal? friend bool operator==(const SiWedge& lhs, const SiWedge& rhs); friend bool operator!=(const SiWedge& lhs, const SiWedge& rhs); public: D0_OBJECT_SETUP(SiWedge); protected: float _act_halfwidth1; float _act_halfwidth2; float _act_halfheight; float _act_center; }; // Constructors/Destructors // Accessors #endif //SIWEDGE_HPP