CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/Geometry/CSCGeometry/src/CSCNonslantedWireGeometry.h

Go to the documentation of this file.
00001 #ifndef CSC_NONSLANTED_WIRE_GEOMETRY_H
00002 #define CSC_NONSLANTED_WIRE_GEOMETRY_H
00003 
00012 #include "Geometry/CSCGeometry/interface/CSCWireGeometry.h"
00013 #include "Geometry/CSCGeometry/interface/nint.h"
00014 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00015 
00016 class CSCNonslantedWireGeometry : public CSCWireGeometry {
00017  public:
00018   virtual ~CSCNonslantedWireGeometry() {}
00019   
00023   CSCNonslantedWireGeometry( double wireSpacing, double yOfFirstWire, 
00024               double narrow, double wide, double length ) :
00025        CSCWireGeometry( wireSpacing, yOfFirstWire, narrow, wide, length ) {}
00026 
00030   float wireAngle() const { return 0.; }
00031 
00036   int nearestWire(const LocalPoint& lp) const {
00037     return 1 + nint( (lp.y()-yOfFirstWire())/wireSpacing() ) ;
00038   }
00039 
00044   float yOfWire(float wire, float x=0.) const {
00045     return yOfFirstWire() + (wire-1.)*wireSpacing();
00046   }
00047 
00052   CSCWireGeometry* clone() const {
00053     return new CSCNonslantedWireGeometry(*this);
00054   }
00055 
00056 };
00057 
00058 #endif