File indexing completed on 2023-03-17 13:02:40
0001 #ifndef CSC_NONSLANTED_WIRE_GEOMETRY_H
0002 #define CSC_NONSLANTED_WIRE_GEOMETRY_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "Geometry/CSCGeometry/interface/CSCWireGeometry.h"
0013 #include "Geometry/CSCGeometry/interface/nint.h"
0014 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0015
0016 class CSCNonslantedWireGeometry : public CSCWireGeometry {
0017 public:
0018 ~CSCNonslantedWireGeometry() override {}
0019
0020
0021
0022
0023 CSCNonslantedWireGeometry(double wireSpacing, double yOfFirstWire, double narrow, double wide, double length)
0024 : CSCWireGeometry(wireSpacing, yOfFirstWire, narrow, wide, length) {}
0025
0026
0027
0028
0029 float wireAngle() const override { return 0.; }
0030
0031
0032
0033
0034
0035 int nearestWire(const LocalPoint& lp) const override { return 1 + nint((lp.y() - yOfFirstWire()) / wireSpacing()); }
0036
0037
0038
0039
0040
0041 float yOfWire(float wire, float x = 0.) const override { return yOfFirstWire() + (wire - 1.) * wireSpacing(); }
0042
0043
0044
0045
0046
0047 CSCWireGeometry* clone() const override { return new CSCNonslantedWireGeometry(*this); }
0048 };
0049
0050 #endif