Go to the documentation of this file.00001 #ifndef CSC_WIRE_GEOMETRY_H
00002 #define CSC_WIRE_GEOMETRY_H
00003
00013 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00014 #include <vector>
00015 #include <utility>
00016
00017 class CSCWireGeometry {
00018 public:
00019 virtual ~CSCWireGeometry() {}
00020
00024 CSCWireGeometry( double wireSpacing, double yOfFirstWire,
00025 double narrowWidthOfPlane, double wideWidthOfPlane, double lengthOfPlane ) :
00026 theWireSpacing( wireSpacing ), theYOfFirstWire( yOfFirstWire ),
00027 theNarrowWidthOfPlane( narrowWidthOfPlane ), theWideWidthOfPlane( wideWidthOfPlane ),
00028 theLengthOfPlane( lengthOfPlane ) {}
00029
00033 double wireSpacing() const {
00034 return theWireSpacing; }
00035
00039 double yOfFirstWire() const {
00040 return theYOfFirstWire; }
00041
00045 double narrowWidthOfPlane() const {
00046 return theNarrowWidthOfPlane; }
00047
00051 double wideWidthOfPlane() const {
00052 return theWideWidthOfPlane; }
00053
00057 double lengthOfPlane() const {
00058 return theLengthOfPlane; }
00059
00063 virtual float wireAngle() const = 0;
00064
00069 virtual int nearestWire(const LocalPoint& lp) const = 0;
00070
00074 virtual float yOfWire(float wire, float x=0.) const = 0;
00075
00079 virtual CSCWireGeometry* clone() const = 0;
00080
00085 LocalPoint intersection( float m1, float c1, float m2, float c2) const;
00086
00091 std::pair< LocalPoint, LocalPoint > wireEnds( float wire ) const;
00092
00096 std::vector<float> wireValues( float wire ) const;
00097
00103 std::pair<float, float> equationOfWire( float wire ) const;
00104
00112 std::pair<float, float> yLimitsOfWirePlane() const;
00113
00114 private:
00115 double theWireSpacing;
00116 double theYOfFirstWire;
00117 double theNarrowWidthOfPlane;
00118 double theWideWidthOfPlane;
00119 double theLengthOfPlane;
00120 };
00121
00122 #endif