CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
double wideWidthOfPlane() const
CSCWireTopology(const CSCWireGroupPackage &wg, double yOfFirstWire, float wireAngleInDegrees)
virtual int wireGroup(int wire) const =0
int numberOfWiresPerGroup(int wireGroup) const
virtual int numberOfWiresPerGroup(int wireGroup) const =0
double theAlignmentPinToFirstWire
CSCWireGrouping * theWireGrouping
LocalPoint localPosition(const MeasurementPoint &) const override
virtual float middleWireOfGroup(int wireGroup) const =0
std::vector< float > wireValues(float wire) const
double wireSpacing() const
float yOfWireGroup(int wireGroup, float x=0.) const
CSCWireTopology & operator=(const CSCWireTopology &)
virtual float yOfWire(float wire, float x=0.) const =0
bool insideYOfWirePlane(float y) const
~CSCWireTopology() override
virtual int numberOfWires() const =0
std::pair< LocalPoint, LocalPoint > wireEnds(float wire) const
float wireAngle() const override
std::pair< LocalPoint, LocalPoint > wireEnds(float wire) const
double wireSpacing() const
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
double lengthOfPlane() const
float yOfWire(float wire, float x=0.) const
int wireGroup(int wire) const
double lengthOfPlane() const
virtual int nearestWire(const LocalPoint &lp) const =0
double narrowWidthOfPlane() const
float middleWireOfGroup(int wireGroup) const
std::vector< float > wireValues(float wire) const
double wideWidthOfPlane() const
float yResolution(int wireGroup=1) const
int numberOfWireGroups() const
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override
float restrictToYOfWirePlane(float y) const
int nearestWire(const LocalPoint &lp) const override
float wirePitch() const override
int channel(const LocalPoint &p) const override
double extentOfWirePlane() const
virtual int numberOfWireGroups() const =0
MeasurementPoint measurementPosition(const LocalPoint &) const override
int numberOfWires() const override
virtual float wireAngle() const =0
CSCWireGeometry * theWireGeometry