HerdSoftware  0.3.2
Track.h
Go to the documentation of this file.
1 /*
2  * Track.h
3  *
4  * Created on: 19 Oct 2018
5  * Author: Nicola Mori
6  */
7 
10 #ifndef HERD_TRACK_H_
11 #define HERD_TRACK_H_
12 
13 // HerdSoftware headers
14 #include "dataobjects/CaloHits.h"
17 #include "dataobjects/Line.h"
18 #include "dataobjects/Point.h"
23 #include "dataobjects/Track2D.h"
24 
25 #ifdef HS_USE_ROOT
26 #include "Rtypes.h"
27 #endif
28 
29 namespace Herd {
30 
44 class Track {
45 public:
48 
56 
70  Track(const Track2D &proj1, RefFrame::View view1, const Track2D &proj2, RefFrame::View view2);
71 
73  virtual ~Track() = default;
74 
79  const Herd::Line &GetLine() const { return m_line; }
80 
85  void SetLine(Herd::Line line) { m_line = std::move(line); }
86 
98  void SetCaloHits(CaloHits hits, std::string objName = "", size_t index = Herd::defaultValue<size_t>);
99 
106  void AddClusters(const StkClustersColl &clusterColl);
107 
114  void AddClusters(const ScdClustersColl &clusterColl);
115 
122  void AddClusters(const FitClustersColl &clusterColl);
123 
128  void SetCaloClusterIndex(size_t index) { m_caloClustersIndex = index; }
129 
137  void SetCaloDataObjName(std::string name) { m_caloDataObjName = std::move(name); }
138 
144 
150 
156 
161  const Herd::CaloHits &CaloHits() const { return m_caloHits; }
162 
177  size_t CaloClusterIndex() const { return m_caloClustersIndex; }
178 
194  const std::string &CaloDataObjName() const { return m_caloDataObjName; }
195 
196 private:
201 
203 
205  std::string m_caloDataObjName;
206 
207 #ifdef HS_USE_ROOT
208  ClassDef(Track, 2)
209 #endif
210 };
211 
212 } // namespace Herd
213 
214 #endif /* HERD_TRACK_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
void SetLine(Herd::Line line)
Returns the line associated to the track.
Definition: Track.h:85
#define DEFAULT_INIT(x)
Definition: DefaultValues.h:23
void SetCaloClusterIndex(size_t index)
Sets the index of the CALO hits cluster used to build the track.
Definition: Track.h:128
const std::string & CaloDataObjName() const
Returns the name of the CALO data object used to build the track was taken.
Definition: Track.h:194
size_t CaloClusterIndex() const
Returns the index of the hits cluster used to build the axis.
Definition: Track.h:177
const ScdClustersColl & GetScdClusters() const
Returns the SCD clusters associated to the track.
Definition: Track.h:149
virtual ~Track()=default
Virtual destructor.
Class describing a line in the 3D space.
Definition: Line.h:34
void SetCaloDataObjName(std::string name)
Sets the name of the CALO data object from which the cluster used to build the track was taken...
Definition: Track.h:137
void SetCaloHits(CaloHits hits, std::string objName="", size_t index=Herd::defaultValue< size_t >)
Set CALO hits.
Definition: Track.cpp:48
const Herd::CaloHits & CaloHits() const
Returns the calorimeter hits associated to the track.
Definition: Track.h:161
Track(Line line)
Constructor.
Definition: Track.h:55
Herd::CaloHits m_caloHits
Definition: Track.h:197
FitClustersColl m_fitClusterColl
Definition: Track.h:200
Class describing a track.
Definition: Track2D.h:34
std::string m_caloDataObjName
Definition: Track.h:205
ScdClustersColl m_scdClusterColl
Definition: Track.h:199
StkClustersColl m_stkClusterColl
Definition: Track.h:198
Class describing a track.
Definition: Track.h:44
Collection of containers for the clusters of all the FIT detectors.
Definition: FitClustersColl.h:23
std::vector< Hit > CaloHits
Definition: CaloHits.h:21
void AddClusters(const StkClustersColl &clusterColl)
Add STK clusters to the current collection.
Definition: Track.cpp:54
const StkClustersColl & GetStkClusters() const
Returns the STK clusters associated to the track.
Definition: Track.h:143
Herd::Line m_line
Definition: Track.h:202
size_t m_caloClustersIndex
Definition: Track.h:204
View
Aliases for the three 2D projection planes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:93
const FitClustersColl & GetFitClusters() const
Returns the FIT clusters associated to the track.
Definition: Track.h:155
Track()
Default constructor.
Definition: Track.h:47
Container for the hits of a single CALO detector.
Collection of containers for the clusters of all the SCD detectors.
Definition: ScdClustersColl.h:24
Collection of containers for the clusters of all the STK detectors.
Definition: StkClustersColl.h:24
const Herd::Line & GetLine() const
Returns the line associated to the track.
Definition: Track.h:79