CMS 3D CMS Logo

CSCWireGeometry.h
Go to the documentation of this file.
1 #ifndef CSC_WIRE_GEOMETRY_H
2 #define CSC_WIRE_GEOMETRY_H
3 
14 #include <vector>
15 #include <utility> // for std::pair
16 
18  public:
19  virtual ~CSCWireGeometry() {}
20 
25  double narrowWidthOfPlane, double wideWidthOfPlane, double lengthOfPlane ) :
26  theWireSpacing( wireSpacing ), theYOfFirstWire( yOfFirstWire ),
27  theNarrowWidthOfPlane( narrowWidthOfPlane ), theWideWidthOfPlane( wideWidthOfPlane ),
28  theLengthOfPlane( lengthOfPlane ) {}
29 
33  double wireSpacing() const {
34  return theWireSpacing; }
35 
39  double yOfFirstWire() const {
40  return theYOfFirstWire; }
41 
45  double narrowWidthOfPlane() const {
46  return theNarrowWidthOfPlane; }
47 
51  double wideWidthOfPlane() const {
52  return theWideWidthOfPlane; }
53 
57  double lengthOfPlane() const {
58  return theLengthOfPlane; }
59 
63  virtual float wireAngle() const = 0;
64 
69  virtual int nearestWire(const LocalPoint& lp) const = 0;
70 
74  virtual float yOfWire(float wire, float x=0.) const = 0;
75 
79  virtual CSCWireGeometry* clone() const = 0;
80 
85  LocalPoint intersection( float m1, float c1, float m2, float c2) const;
86 
91  std::pair< LocalPoint, LocalPoint > wireEnds( float wire ) const;
92 
96  std::vector<float> wireValues( float wire ) const;
97 
103  std::pair<float, float> equationOfWire( float wire ) const;
104 
112  std::pair<float, float> yLimitsOfWirePlane() const;
113 
114  private:
116  double theYOfFirstWire; // local y
120 };
121 
122 #endif
double narrowWidthOfPlane() const
virtual float wireAngle() const =0
double wideWidthOfPlane() const
std::vector< float > wireValues(float wire) const
virtual ~CSCWireGeometry()
std::pair< float, float > yLimitsOfWirePlane() const
virtual float yOfWire(float wire, float x=0.) const =0
std::pair< LocalPoint, LocalPoint > wireEnds(float wire) const
double wireSpacing() const
virtual CSCWireGeometry * clone() const =0
double lengthOfPlane() const
LocalPoint intersection(float m1, float c1, float m2, float c2) const
double theWideWidthOfPlane
double yOfFirstWire() const
std::pair< float, float > equationOfWire(float wire) const
CSCWireGeometry(double wireSpacing, double yOfFirstWire, double narrowWidthOfPlane, double wideWidthOfPlane, double lengthOfPlane)
double theNarrowWidthOfPlane
virtual int nearestWire(const LocalPoint &lp) const =0