File indexing completed on 2024-04-06 12:04:12
0001 #ifndef GEMRecHit_ME0Segment_h
0002 #define GEMRecHit_ME0Segment_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "DataFormats/TrackingRecHit/interface/RecSegment.h"
0014 #include "DataFormats/GEMRecHit/interface/ME0RecHitCollection.h"
0015
0016 #include <iosfwd>
0017
0018 class ME0DetId;
0019
0020 class ME0Segment final : public RecSegment {
0021 public:
0022
0023 ME0Segment() : theChi2(0.), theTimeValue(0.), theTimeUncrt(0.), theDeltaPhi(0.) {}
0024
0025
0026 ME0Segment(const std::vector<const ME0RecHit*>& proto_segment,
0027 const LocalPoint& origin,
0028 const LocalVector& direction,
0029 const AlgebraicSymMatrix& errors,
0030 float chi2);
0031
0032 ME0Segment(const std::vector<const ME0RecHit*>& proto_segment,
0033 const LocalPoint& origin,
0034 const LocalVector& direction,
0035 const AlgebraicSymMatrix& errors,
0036 float chi2,
0037 float time,
0038 float timeErr,
0039 float deltaPhi);
0040
0041
0042 ~ME0Segment() override;
0043
0044
0045 ME0Segment* clone() const override { return new ME0Segment(*this); }
0046
0047 LocalPoint localPosition() const override { return theOrigin; }
0048 LocalError localPositionError() const override;
0049
0050 LocalVector localDirection() const override { return theLocalDirection; }
0051 LocalError localDirectionError() const override;
0052
0053
0054 AlgebraicVector parameters() const override;
0055
0056
0057 AlgebraicSymMatrix parametersError() const override { return theCovMatrix; }
0058
0059
0060 AlgebraicMatrix projectionMatrix() const override;
0061
0062 std::vector<const TrackingRecHit*> recHits() const override;
0063
0064 std::vector<TrackingRecHit*> recHits() override;
0065
0066 double chi2() const override { return theChi2; };
0067
0068 int dimension() const override { return 4; }
0069
0070 int degreesOfFreedom() const override { return 2 * nRecHits() - 4; }
0071
0072
0073
0074 const std::vector<ME0RecHit>& specificRecHits() const { return theME0RecHits; }
0075
0076 int nRecHits() const { return theME0RecHits.size(); }
0077
0078 ME0DetId me0DetId() const { return geographicalId(); }
0079
0080 float time() const { return theTimeValue; }
0081 float timeErr() const { return theTimeUncrt; }
0082
0083 float deltaPhi() const { return theDeltaPhi; }
0084
0085 void print() const;
0086
0087 private:
0088 std::vector<ME0RecHit> theME0RecHits;
0089 LocalPoint theOrigin;
0090 LocalVector theLocalDirection;
0091 AlgebraicSymMatrix theCovMatrix;
0092 float theChi2;
0093 float theTimeValue;
0094 float theTimeUncrt;
0095 float theDeltaPhi;
0096 };
0097
0098 std::ostream& operator<<(std::ostream& os, const ME0Segment& seg);
0099
0100 #endif