File indexing completed on 2024-04-06 12:04:01
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef DataFormats_CTPPSReco_TotemRPUVPattern
0010 #define DataFormats_CTPPSReco_TotemRPUVPattern
0011
0012 #include "DataFormats/Common/interface/DetSet.h"
0013 #include "DataFormats/Common/interface/DetSetVector.h"
0014 #include "DataFormats/CTPPSReco/interface/TotemRPRecHit.h"
0015
0016
0017
0018
0019
0020
0021
0022
0023 class TotemRPUVPattern {
0024 public:
0025 enum ProjectionType { projInvalid, projU, projV };
0026
0027 TotemRPUVPattern() : projection_(projInvalid), a_(0.), b_(0.), w_(0.), fittable_(false) {}
0028
0029 ProjectionType projection() const { return projection_; }
0030 void setProjection(ProjectionType type) { projection_ = type; }
0031
0032 double a() const { return a_; }
0033 void setA(double a) { a_ = a; }
0034
0035 double b() const { return b_; }
0036 void setB(double b) { b_ = b; }
0037
0038 double w() const { return w_; }
0039 void setW(double w) { w_ = w; }
0040
0041 bool fittable() const { return fittable_; }
0042 void setFittable(bool fittable) { fittable_ = fittable; }
0043
0044 void addHit(edm::det_id_type detId, const TotemRPRecHit &hit) { hits_.find_or_insert(detId).push_back(hit); }
0045
0046 const edm::DetSetVector<TotemRPRecHit> &hits() const { return hits_; }
0047
0048 friend bool operator<(const TotemRPUVPattern &l, const TotemRPUVPattern &r);
0049
0050 private:
0051 ProjectionType projection_;
0052 double a_;
0053 double b_;
0054 double w_;
0055 bool fittable_;
0056
0057 edm::DetSetVector<TotemRPRecHit> hits_;
0058 };
0059
0060
0061
0062 extern bool operator<(const TotemRPUVPattern &l, const TotemRPUVPattern &r);
0063
0064 #endif