File indexing completed on 2024-04-06 12:04:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef DataFormats_CTPPSReco_CTPPSTimingLocalTrack
0012 #define DataFormats_CTPPSReco_CTPPSTimingLocalTrack
0013
0014 #include "DataFormats/Math/interface/Point3D.h"
0015 #include "DataFormats/CTPPSReco/interface/CTPPSTimingRecHit.h"
0016
0017
0018
0019 class CTPPSTimingLocalTrack {
0020 public:
0021 CTPPSTimingLocalTrack();
0022 CTPPSTimingLocalTrack(const math::XYZPoint& pos0, const math::XYZPoint& pos0_sigma, float t, float t_sigma);
0023
0024 enum class CheckDimension { x, y, all };
0025 bool containsHit(const CTPPSTimingRecHit& recHit,
0026 float tolerance = 0.1f,
0027 CheckDimension check = CheckDimension::all) const;
0028
0029
0030
0031 inline float x0() const { return pos0_.x(); }
0032 inline float x0Sigma() const { return pos0_sigma_.x(); }
0033
0034 inline float y0() const { return pos0_.y(); }
0035 inline float y0Sigma() const { return pos0_sigma_.y(); }
0036
0037 inline float z0() const { return pos0_.z(); }
0038 inline float z0Sigma() const { return pos0_sigma_.z(); }
0039
0040 inline int numberOfHits() const { return num_hits_; }
0041 inline int numberOfPlanes() const { return num_planes_; }
0042
0043
0044
0045 inline void setPosition(const math::XYZPoint& pos0) { pos0_ = pos0; }
0046 inline void setPositionSigma(const math::XYZPoint& pos0_sigma) { pos0_sigma_ = pos0_sigma; }
0047
0048 inline void setNumOfHits(int num_hits) { num_hits_ = num_hits; }
0049 inline void setNumOfPlanes(int num_planes) { num_planes_ = num_planes; }
0050
0051
0052
0053 inline bool isValid() const { return valid_; }
0054 inline void setValid(bool valid) { valid_ = valid; }
0055
0056
0057
0058 inline float time() const { return t_; }
0059 inline float timeSigma() const { return t_sigma_; }
0060
0061
0062
0063 inline void setTime(float t) { t_ = t; }
0064 inline void setTimeSigma(float t_sigma) { t_sigma_ = t_sigma; }
0065
0066 private:
0067
0068
0069
0070 math::XYZPoint pos0_;
0071
0072 math::XYZPoint pos0_sigma_;
0073
0074
0075 int num_hits_;
0076
0077
0078 int num_planes_;
0079
0080
0081 bool valid_;
0082
0083
0084 float t_;
0085 float t_sigma_;
0086 };
0087
0088
0089 bool operator<(const CTPPSTimingLocalTrack& lhs, const CTPPSTimingLocalTrack& rhs);
0090
0091 #endif