File indexing completed on 2024-04-06 12:04:02
0001 #ifndef DTSLRECCLUSTER_H
0002 #define DTSLRECCLUSTER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include "DataFormats/TrackingRecHit/interface/RecHit1D.h"
0018
0019
0020 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0021 #include "DataFormats/DTRecHit/interface/DTRecHit1DPair.h"
0022
0023
0024 #include <iosfwd>
0025
0026
0027
0028
0029
0030 class DTSLRecCluster : public RecHit1D {
0031 public:
0032
0033 DTSLRecCluster() {}
0034
0035
0036 DTSLRecCluster(const DTSuperLayerId id, const std::vector<DTRecHit1DPair>& pair);
0037
0038
0039 DTSLRecCluster(const DTSuperLayerId id, const LocalPoint&, const LocalError&, const std::vector<DTRecHit1DPair>& pair);
0040
0041
0042 ~DTSLRecCluster() override {}
0043
0044
0045
0046 DTSLRecCluster* clone() const override { return new DTSLRecCluster(*this); }
0047
0048
0049 DTSuperLayerId superLayerId() const { return theSlid; }
0050
0051
0052 AlgebraicVector parameters() const override { return param(localPosition()); }
0053
0054
0055 AlgebraicSymMatrix parametersError() const override { return parError(localPositionError()); }
0056
0057
0058
0059
0060 AlgebraicMatrix projectionMatrix() const override { return theProjectionMatrix; }
0061
0062
0063 int dimension() const override { return 2; }
0064 LocalPoint localPosition() const override { return thePos; }
0065 LocalError localPositionError() const override { return thePosError; }
0066
0067
0068 std::vector<const TrackingRecHit*> recHits() const override;
0069
0070 std::vector<TrackingRecHit*> recHits() override;
0071
0072
0073 std::vector<DTRecHit1DPair> specificRecHits() const { return thePairs; }
0074
0075 int nHits() const { return thePairs.size(); }
0076
0077 private:
0078 DTSuperLayerId theSlid;
0079
0080 LocalPoint thePos;
0081 LocalError thePosError;
0082
0083 std::vector<DTRecHit1DPair> thePairs;
0084
0085 private:
0086 static const AlgebraicMatrix theProjectionMatrix;
0087
0088 AlgebraicVector param(const LocalPoint& lp) const {
0089 AlgebraicVector result(1);
0090 result[1] = lp.x();
0091 return result;
0092 }
0093
0094 AlgebraicSymMatrix parError(const LocalError& le) const {
0095 AlgebraicSymMatrix m(1);
0096 m[0][0] = le.xx();
0097 return m;
0098 }
0099
0100 protected:
0101 };
0102 std::ostream& operator<<(std::ostream& os, const DTSLRecCluster& seg);
0103 #endif