File indexing completed on 2023-03-17 13:02:39
0001 #ifndef CSC_WIRE_TOPOLOGY_H
0002 #define CSC_WIRE_TOPOLOGY_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "Geometry/CSCGeometry/interface/WireTopology.h"
0013 #include "Geometry/CSCGeometry/interface/CSCWireGeometry.h"
0014 #include "Geometry/CSCGeometry/interface/CSCWireGrouping.h"
0015 #include "Geometry/CSCGeometry/interface/CSCWireGroupPackage.h"
0016 #include <utility> // for std::pair
0017
0018 class CSCWireTopology : public WireTopology {
0019 public:
0020 ~CSCWireTopology() override;
0021
0022
0023
0024
0025
0026 CSCWireTopology(const CSCWireGroupPackage& wg, double yOfFirstWire, float wireAngleInDegrees);
0027
0028
0029
0030 CSCWireTopology(const CSCWireTopology&);
0031
0032
0033
0034
0035 CSCWireTopology& operator=(const CSCWireTopology&);
0036
0037
0038
0039
0040
0041 LocalPoint localPosition(const MeasurementPoint&) const override;
0042 LocalError localError(const MeasurementPoint&, const MeasurementError&) const override;
0043 MeasurementPoint measurementPosition(const LocalPoint&) const override;
0044 MeasurementError measurementError(const LocalPoint&, const LocalError&) const override;
0045
0046
0047
0048
0049
0050 int channel(const LocalPoint& p) const override;
0051
0052
0053
0054
0055
0056
0057
0058
0059 double wireSpacing() const { return theWireGeometry->wireSpacing(); }
0060
0061
0062
0063
0064
0065 float wirePitch() const override { return static_cast<float>(wireSpacing()); }
0066
0067
0068
0069
0070 float wireAngle() const override { return theWireGeometry->wireAngle(); }
0071
0072
0073
0074
0075
0076 int nearestWire(const LocalPoint& lp) const override { return theWireGeometry->nearestWire(lp); }
0077
0078
0079
0080
0081 float yOfWire(float wire, float x = 0.) const { return theWireGeometry->yOfWire(wire, x); }
0082
0083
0084
0085
0086 double narrowWidthOfPlane() const { return theWireGeometry->narrowWidthOfPlane(); }
0087
0088
0089
0090
0091 double wideWidthOfPlane() const { return theWireGeometry->wideWidthOfPlane(); }
0092
0093
0094
0095
0096 double lengthOfPlane() const { return theWireGeometry->lengthOfPlane(); }
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108 int numberOfWires() const override { return theWireGrouping->numberOfWires(); }
0109
0110
0111
0112
0113 int numberOfWireGroups() const { return theWireGrouping->numberOfWireGroups(); }
0114
0115
0116
0117
0118 int numberOfWiresPerGroup(int wireGroup) const { return theWireGrouping->numberOfWiresPerGroup(wireGroup); }
0119
0120
0121
0122
0123 int wireGroup(int wire) const { return theWireGrouping->wireGroup(wire); }
0124
0125
0126
0127
0128
0129
0130
0131 float middleWireOfGroup(int wireGroup) const { return theWireGrouping->middleWireOfGroup(wireGroup); }
0132
0133
0134
0135
0136
0137
0138
0139
0140 float yOfWireGroup(int wireGroup, float x = 0.) const;
0141
0142
0143
0144
0145
0146
0147
0148 float yResolution(int wireGroup = 1) const;
0149
0150
0151
0152
0153
0154
0155 double extentOfWirePlane() const { return wireSpacing() * (numberOfWires() - 1); }
0156
0157
0158
0159
0160
0161
0162 std::pair<LocalPoint, LocalPoint> wireEnds(float wire) const { return theWireGeometry->wireEnds(wire); }
0163
0164
0165
0166
0167 std::vector<float> wireValues(float wire) const { return theWireGeometry->wireValues(wire); }
0168
0169
0170
0171
0172
0173
0174 std::pair<float, float> equationOfWire(float wire) const;
0175
0176
0177
0178
0179 float restrictToYOfWirePlane(float y) const;
0180
0181
0182
0183
0184 bool insideYOfWirePlane(float y) const;
0185
0186 private:
0187 CSCWireGrouping* theWireGrouping;
0188 CSCWireGeometry* theWireGeometry;
0189
0190 double theAlignmentPinToFirstWire;
0191 };
0192
0193 #endif