HerdSoftware  0.1.1
HoughTrackStub.h
Go to the documentation of this file.
1 /*
2  * HoughTrackStub.h
3  *
4  * Created on: 30 Dec 2018
5  * Author: Valerio Formato
6  */
7 
8 #ifndef HOUGHTRACKSTUB_H_
9 #define HOUGHTRACKSTUB_H_
10 
11 #include "common/RefFrame.h"
13 
14 namespace Herd {
15 
17 public:
18  HoughTrackStub(const HFCluster &cl1, const HFCluster &cl2, RefFrame::Axis dir1, RefFrame::Axis dir2);
19 
20  friend bool operator==(const HoughTrackStub &lhs, const HoughTrackStub &rhs);
21 
22  float Theta() const { return _theta; };
23  float R() const { return _r; };
24 
25  unsigned int cl1ID() { return _cl1ID; };
26  unsigned int cl2ID() { return _cl2ID; };
27 
28  bool ContainsCluster(const Cluster &cluster) const {
29  return (cluster.Hits()[cluster.SeedHitIndex()].VolumeID() == _cl1ID ||
30  cluster.Hits()[cluster.SeedHitIndex()].VolumeID() == _cl2ID);
31  };
32 
33 private:
34  unsigned int _cl1ID;
35  unsigned int _cl2ID;
36 
37  float _theta;
38  float _r;
39 };
40 
41 inline bool operator==(const HoughTrackStub &lhs, const HoughTrackStub &rhs) {
42  return ((lhs._cl1ID == rhs._cl1ID && lhs._cl2ID == rhs._cl2ID) ||
43  (lhs._cl1ID == rhs._cl2ID && lhs._cl1ID == rhs._cl2ID));
44 }
45 
46 } // namespace Herd
47 
48 #endif
unsigned int cl2ID()
Definition: HoughTrackStub.h:26
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
const std::vector< Hit > & Hits() const
Gets the hits forming the cluster.
Definition: Cluster.h:54
friend bool operator==(const HoughTrackStub &lhs, const HoughTrackStub &rhs)
Definition: HoughTrackStub.h:41
Definition: HoughTrackStub.h:16
float R() const
Definition: HoughTrackStub.h:23
Tracker cluster object for transient data model.
Definition: Cluster.h:30
unsigned int _cl1ID
Definition: HoughTrackStub.h:31
Axis
Aliases for the axes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:31
size_t SeedHitIndex() const
Gets the index of the seed hit within the hits vector.
Definition: Cluster.h:71
unsigned int cl1ID()
Definition: HoughTrackStub.h:25
unsigned int _cl2ID
Definition: HoughTrackStub.h:35
float Theta() const
Definition: HoughTrackStub.h:22
bool ContainsCluster(const Cluster &cluster) const
Definition: HoughTrackStub.h:28
HoughTrackStub(const HFCluster &cl1, const HFCluster &cl2, RefFrame::Axis dir1, RefFrame::Axis dir2)
Definition: HoughTrackStub.cpp:14
float _r
Definition: HoughTrackStub.h:38
Definition: HFCluster.h:21
float _theta
Definition: HoughTrackStub.h:37