CMS 3D CMS Logo

CSCNonslantedWireGeometry.h
Go to the documentation of this file.
1 #ifndef CSC_NONSLANTED_WIRE_GEOMETRY_H
2 #define CSC_NONSLANTED_WIRE_GEOMETRY_H
3 
15 
17 public:
19 
23  CSCNonslantedWireGeometry(double wireSpacing, double yOfFirstWire, double narrow, double wide, double length)
24  : CSCWireGeometry(wireSpacing, yOfFirstWire, narrow, wide, length) {}
25 
29  float wireAngle() const override { return 0.; }
30 
35  int nearestWire(const LocalPoint& lp) const override { return 1 + nint((lp.y() - yOfFirstWire()) / wireSpacing()); }
36 
41  float yOfWire(float wire, float x = 0.) const override { return yOfFirstWire() + (wire - 1.) * wireSpacing(); }
42 
47  CSCWireGeometry* clone() const override { return new CSCNonslantedWireGeometry(*this); }
48 };
49 
50 #endif
T y() const
Definition: PV3DBase.h:60
float yOfWire(float wire, float x=0.) const override
CSCNonslantedWireGeometry(double wireSpacing, double yOfFirstWire, double narrow, double wide, double length)
double wireSpacing() const
int nearestWire(const LocalPoint &lp) const override
float wireAngle() const override
int nint(float a)
Return the nearest integer - analogous to the FORTRAN intrinsic NINT.
Definition: nint.h:8
double yOfFirstWire() const
CSCWireGeometry * clone() const override