CMS 3D CMS Logo

CSCWireTopology.h
Go to the documentation of this file.
1 #ifndef CSC_WIRE_TOPOLOGY_H
2 #define CSC_WIRE_TOPOLOGY_H
3 
16 #include <utility> // for std::pair
17 
18 class CSCWireTopology : public WireTopology {
19 public:
20  ~CSCWireTopology() override;
21 
26  CSCWireTopology(const CSCWireGroupPackage& wg, double yOfFirstWire, float wireAngleInDegrees);
31 
36 
41  LocalPoint localPosition(const MeasurementPoint&) const override;
42  LocalError localError(const MeasurementPoint&, const MeasurementError&) const override;
43  MeasurementPoint measurementPosition(const LocalPoint&) const override;
44  MeasurementError measurementError(const LocalPoint&, const LocalError&) const override;
45 
50  int channel(const LocalPoint& p) const override;
51 
59  double wireSpacing() const { return theWireGeometry->wireSpacing(); }
60 
65  float wirePitch() const override { return static_cast<float>(wireSpacing()); }
66 
70  float wireAngle() const override { return theWireGeometry->wireAngle(); }
71 
76  int nearestWire(const LocalPoint& lp) const override { return theWireGeometry->nearestWire(lp); }
77 
81  float yOfWire(float wire, float x = 0.) const { return theWireGeometry->yOfWire(wire, x); }
82 
87 
91  double wideWidthOfPlane() const { return theWireGeometry->wideWidthOfPlane(); }
92 
96  double lengthOfPlane() const { return theWireGeometry->lengthOfPlane(); }
97 
108  int numberOfWires() const override { return theWireGrouping->numberOfWires(); }
109 
114 
119 
123  int wireGroup(int wire) const { return theWireGrouping->wireGroup(wire); }
124 
131  float middleWireOfGroup(int wireGroup) const { return theWireGrouping->middleWireOfGroup(wireGroup); }
132 
140  float yOfWireGroup(int wireGroup, float x = 0.) const;
141 
148  float yResolution(int wireGroup = 1) const;
149 
155  double extentOfWirePlane() const { return wireSpacing() * (numberOfWires() - 1); }
156 
162  std::pair<LocalPoint, LocalPoint> wireEnds(float wire) const { return theWireGeometry->wireEnds(wire); }
163 
167  std::vector<float> wireValues(float wire) const { return theWireGeometry->wireValues(wire); }
168 
174  std::pair<float, float> equationOfWire(float wire) const;
175 
179  float restrictToYOfWirePlane(float y) const;
180 
184  bool insideYOfWirePlane(float y) const;
185 
186 private:
187  CSCWireGrouping* theWireGrouping; // handles grouping of wires for read out
188  CSCWireGeometry* theWireGeometry; // handles non-zero angle w.r.t x axis
189 
190  double theAlignmentPinToFirstWire; //@@ Not sure this is actually required!
191 };
192 
193 #endif
double narrowWidthOfPlane() const
std::pair< float, float > equationOfWire(float wire) const
virtual float wireAngle() const =0
double wideWidthOfPlane() const
int nearestWire(const LocalPoint &lp) const override
CSCWireTopology(const CSCWireGroupPackage &wg, double yOfFirstWire, float wireAngleInDegrees)
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
int numberOfWiresPerGroup(int wireGroup) const
double theAlignmentPinToFirstWire
CSCWireGrouping * theWireGrouping
std::vector< float > wireValues(float wire) const
double wireSpacing() const
float yOfWireGroup(int wireGroup, float x=0.) const
CSCWireTopology & operator=(const CSCWireTopology &)
bool insideYOfWirePlane(float y) const
~CSCWireTopology() override
LocalPoint localPosition(const MeasurementPoint &) const override
std::pair< LocalPoint, LocalPoint > wireEnds(float wire) const
virtual float yOfWire(float wire, float x=0.) const =0
std::pair< LocalPoint, LocalPoint > wireEnds(float wire) const
double wireSpacing() const
virtual int wireGroup(int wire) const =0
double lengthOfPlane() const
float yOfWire(float wire, float x=0.) const
int wireGroup(int wire) const
MeasurementPoint measurementPosition(const LocalPoint &) const override
double lengthOfPlane() const
virtual int numberOfWireGroups() const =0
double narrowWidthOfPlane() const
virtual int numberOfWires() const =0
float wirePitch() const override
float middleWireOfGroup(int wireGroup) const
std::vector< float > wireValues(float wire) const
virtual int numberOfWiresPerGroup(int wireGroup) const =0
double wideWidthOfPlane() const
virtual float middleWireOfGroup(int wireGroup) const =0
float yResolution(int wireGroup=1) const
int numberOfWireGroups() const
float restrictToYOfWirePlane(float y) const
int channel(const LocalPoint &p) const override
float wireAngle() const override
double extentOfWirePlane() const
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override
CSCWireGeometry * theWireGeometry
virtual int nearestWire(const LocalPoint &lp) const =0
int numberOfWires() const override