File indexing completed on 2023-10-25 09:49:09
0001 #ifndef CSC_WIRE_GEOMETRY_H
0002 #define CSC_WIRE_GEOMETRY_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0014 #include <vector>
0015 #include <utility> // for std::pair
0016
0017 class CSCWireGeometry {
0018 public:
0019 virtual ~CSCWireGeometry() {}
0020
0021
0022
0023
0024 CSCWireGeometry(
0025 double wireSpacing, double yOfFirstWire, double narrowWidthOfPlane, double wideWidthOfPlane, double lengthOfPlane)
0026 : theWireSpacing(wireSpacing),
0027 theYOfFirstWire(yOfFirstWire),
0028 theNarrowWidthOfPlane(narrowWidthOfPlane),
0029 theWideWidthOfPlane(wideWidthOfPlane),
0030 theLengthOfPlane(lengthOfPlane) {}
0031
0032
0033
0034
0035 double wireSpacing() const { return theWireSpacing; }
0036
0037
0038
0039
0040 double yOfFirstWire() const { return theYOfFirstWire; }
0041
0042
0043
0044
0045 double narrowWidthOfPlane() const { return theNarrowWidthOfPlane; }
0046
0047
0048
0049
0050 double wideWidthOfPlane() const { return theWideWidthOfPlane; }
0051
0052
0053
0054
0055 double lengthOfPlane() const { return theLengthOfPlane; }
0056
0057
0058
0059
0060 virtual float wireAngle() const = 0;
0061
0062
0063
0064
0065
0066 virtual int nearestWire(const LocalPoint& lp) const = 0;
0067
0068
0069
0070
0071 virtual float yOfWire(float wire, float x = 0.) const = 0;
0072
0073
0074
0075
0076 virtual CSCWireGeometry* clone() const = 0;
0077
0078
0079
0080
0081
0082 LocalPoint intersection(float m1, float c1, float m2, float c2) const;
0083
0084
0085
0086
0087
0088 std::pair<LocalPoint, LocalPoint> wireEnds(float wire) const;
0089
0090
0091
0092
0093 std::vector<float> wireValues(float wire) const;
0094
0095
0096
0097
0098
0099
0100 std::pair<float, float> equationOfWire(float wire) const;
0101
0102
0103
0104
0105
0106
0107
0108
0109 std::pair<float, float> yLimitsOfWirePlane() const;
0110
0111 private:
0112 double theWireSpacing;
0113 double theYOfFirstWire;
0114 double theNarrowWidthOfPlane;
0115 double theWideWidthOfPlane;
0116 double theLengthOfPlane;
0117 };
0118
0119 #endif