CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CTPPSTimingLocalTrack.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CTPPS offline software.
4  * Authors:
5  * Laurent Forthomme (laurent.forthomme@cern.ch)
6  * Nicola Minafra (nicola.minafra@cern.ch)
7  * Mateusz Szpyrka (mateusz.szpyrka@cern.ch)
8  *
9  ****************************************************************************/
10 
11 #ifndef DataFormats_CTPPSReco_CTPPSTimingLocalTrack
12 #define DataFormats_CTPPSReco_CTPPSTimingLocalTrack
13 
16 
17 //----------------------------------------------------------------------------------------------------
18 
20 public:
22  CTPPSTimingLocalTrack(const math::XYZPoint& pos0, const math::XYZPoint& pos0_sigma, float t, float t_sigma);
23 
24  enum class CheckDimension { x, y, all };
25  bool containsHit(const CTPPSTimingRecHit& recHit,
26  float tolerance = 0.1f,
28 
29  //--- spatial get'ters
30 
31  inline float x0() const { return pos0_.x(); }
32  inline float x0Sigma() const { return pos0_sigma_.x(); }
33 
34  inline float y0() const { return pos0_.y(); }
35  inline float y0Sigma() const { return pos0_sigma_.y(); }
36 
37  inline float z0() const { return pos0_.z(); }
38  inline float z0Sigma() const { return pos0_sigma_.z(); }
39 
40  inline int numberOfHits() const { return num_hits_; }
41  inline int numberOfPlanes() const { return num_planes_; }
42 
43  //--- spatial set'ters
44 
45  inline void setPosition(const math::XYZPoint& pos0) { pos0_ = pos0; }
46  inline void setPositionSigma(const math::XYZPoint& pos0_sigma) { pos0_sigma_ = pos0_sigma; }
47 
48  inline void setNumOfHits(int num_hits) { num_hits_ = num_hits; }
49  inline void setNumOfPlanes(int num_planes) { num_planes_ = num_planes; }
50 
51  //--- validity related members
52 
53  inline bool isValid() const { return valid_; }
54  inline void setValid(bool valid) { valid_ = valid; }
55 
56  //--- temporal get'ters
57 
58  inline float time() const { return t_; }
59  inline float timeSigma() const { return t_sigma_; }
60 
61  //--- temporal set'ters
62 
63  inline void setTime(float t) { t_ = t; }
64  inline void setTimeSigma(float t_sigma) { t_sigma_ = t_sigma; }
65 
66 private:
67  //--- spatial information
68 
73 
75  int num_hits_;
76 
79 
81  bool valid_;
82 
83  //--- timing information
84  float t_;
85  float t_sigma_;
86 };
87 
89 bool operator<(const CTPPSTimingLocalTrack& lhs, const CTPPSTimingLocalTrack& rhs);
90 
91 #endif
Reconstructed hit in timing detectors.
const double tolerance
void setNumOfPlanes(int num_planes)
math::XYZPoint pos0_sigma_
error on the initial track position
void setTimeSigma(float t_sigma)
bool containsHit(const CTPPSTimingRecHit &recHit, float tolerance=0.1f, CheckDimension check=CheckDimension::all) const
int num_hits_
number of hits participating in the track
void setPosition(const math::XYZPoint &pos0)
math::XYZPoint pos0_
initial track position
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
int num_planes_
number of planes participating in the track
bool operator<(DTCELinkId const &lhs, DTCELinkId const &rhs)
Definition: DTCELinkId.h:70
void setNumOfHits(int num_hits)
void setPositionSigma(const math::XYZPoint &pos0_sigma)