Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:24

0001 #ifndef CSC_SLANTED_WIRE_GEOMETRY_H
0002 #define CSC_SLANTED_WIRE_GEOMETRY_H
0003 
0004 /** \class CSCSlantedWireGeometry
0005  * A concrete CSCWireGeometry in which wires are slanted,
0006  * i.e. they have a fixed, non-zero angle w.r.t. local x axis.
0007  *
0008  * \author Tim Cox
0009  *
0010  */
0011 
0012 #include "Geometry/CSCGeometry/interface/CSCWireGeometry.h"
0013 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0014 
0015 class CSCSlantedWireGeometry : public CSCWireGeometry {
0016 public:
0017   ~CSCSlantedWireGeometry() override {}
0018 
0019   /**
0020    * Constructor from wire spacing and wire angle
0021    */
0022   CSCSlantedWireGeometry(
0023       double wireSpacing, double yOfFirstWire, double narrow, double wide, double length, float wireAngle);
0024 
0025   /**
0026    * The angle of the wires w.r.t local x axis (in radians)
0027    */
0028   float wireAngle() const override { return theWireAngle; }
0029 
0030   /**
0031    * The nearest (virtual) wire to a given LocalPoint.
0032    * Beware that this wire might not exist or be read out!
0033    */
0034   int nearestWire(const LocalPoint& lp) const override;
0035 
0036   /**
0037    * Local y of a given wire 'number' (float) at given x
0038    */
0039   float yOfWire(float wire, float x = 0.) const override;
0040 
0041   /**
0042    * Clone to handle correct copy of component objects referenced
0043    * by base class pointer.
0044    */
0045   CSCWireGeometry* clone() const override { return new CSCSlantedWireGeometry(*this); }
0046 
0047 private:
0048   float theWireAngle;
0049   float cosWireAngle;
0050   float sinWireAngle;
0051   float theWireOffset;  // local y of first wire * cos(wire angle)
0052 };
0053 
0054 #endif