//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // The abstract basis class for the shapes used by the pads. // Each shape owns a LookupTable. // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Cristoforo Simonetto TUM (original author) // // //----------------------------------------------------------- #ifndef TPCABSPADSHAPE_HH #define TPCABSPADSHAPE_HH // Base Class Headers ---------------- // Collaborating Class Headers ------- #include // Collaborating Class Declarations -- class TpcPRLookupTable; class TpcAbsPadShape { public: // Constructors/Destructors --------- TpcAbsPadShape(const unsigned int _ID); virtual ~TpcAbsPadShape(); // Operators friend bool operator== (const TpcAbsPadShape& lhs, const TpcAbsPadShape& rhs); friend std::ostream& operator<< (std::ostream& s, const TpcAbsPadShape& me); // Accessors ----------------------- TpcPRLookupTable* GetLookupTable() const {return(lookupTable);} unsigned int GetID() const {return(ID);} //returns the width and height of an covering rectangle parallel to the axis, //if the sahpe is rotated by angle (in math. direction of rotation) virtual void EvalBoundingRect(double& width, double& height, const double angle) const =0; //returns if a point (x,y) in the coordinate system of the shape //is boundary point virtual bool Contains(const double x, const double y) const =0; //returns the number of points, you can get with GetBoundaryPoint virtual int GetNBoundaryPoints() const =0; //returns those points on the boundary, which describe the form //e.g. a polygon returns the edges, //e.g a circle could return points with small distances from each other virtual void GetBoundaryPoint(const int index, double& x, double& y) const =0; //returns the integrated value of the signal caused by an electron //avalanche at (x,y) (in the coordinate system of the shape) double GetValue(const double x, const double y) const; // Modifiers ----------------------- // The LookupTable should not be modified protected: // Private Data Members ------------ TpcPRLookupTable* lookupTable; unsigned int ID; // Private Methods ----------------- }; #endif //-------------------------------------------------------------- // $Log$ //--------------------------------------------------------------