HerdSoftware  0.1.1
HFCluster.h
Go to the documentation of this file.
1 /*
2  * HFCluster.h
3  *
4  * Created on: 18 Oct 2019
5  * Author: Valerio Formato
6  */
7 
8 #ifndef HFCLUSTER_H_
9 #define HFCLUSTER_H_
10 
11 #include "common/RefFrame.h"
12 #include "dataobjects/Cluster.h"
14 
15 #include "core/ObserverPtr.h"
16 
17 #include <numeric>
18 
19 namespace Herd {
20 
21 class HFCluster : public Cluster {
22 public:
23  enum class DetectorType { NONE = -1, Stk, Scd, Fit };
24 
26  HFCluster(const Cluster &cl, const TrackingDetectorGeoParams &geoParams, DetectorType type)
27  : Cluster(cl), m_geoParams(&geoParams), m_type{type} {};
28 
30 
31  RefFrame::Side Side() const { return m_geoParams->Side(); };
32  size_t LayerNumber() const { return m_geoParams->LayerNumber(); };
33  RefFrame::Axis NormalAxis() const { return RefFrame::ToAxis(m_geoParams->NormalDirection()); };
34  DetectorType Type() const { return m_type; }
35 
36 private:
37  EA::observer_ptr<const TrackingDetectorGeoParams> m_geoParams;
39 };
40 } // namespace Herd
41 
42 #endif
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
DetectorType
Definition: HFCluster.h:23
Tracker cluster object for transient data model.
Definition: Cluster.h:30
size_t LayerNumber() const
Definition: HFCluster.h:32
Axis ToAxis(Coo coo)
Associates an axis to a coordinate .
Definition: RefFrame.h:177
Side
Aliases for the five sides. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:104
Axis
Aliases for the axes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:31
A class describing a vector in 3D space.
Definition: Vec3D.h:33
EA::observer_ptr< const TrackingDetectorGeoParams > m_geoParams
Definition: HFCluster.h:37
DetectorType m_type
Definition: HFCluster.h:38
HFCluster(const Cluster &cl, const TrackingDetectorGeoParams &geoParams, DetectorType type)
Definition: HFCluster.h:26
RefFrame::Axis NormalAxis() const
Definition: HFCluster.h:33
Point COGPosition(const TrackingDetectorGeoParams &geoParams) const
Get the center of gravity position of the cluster.
Definition: Cluster.cpp:29
HFCluster()
Definition: HFCluster.h:25
RefFrame::Side Side() const
Definition: HFCluster.h:31
Base data structure for single tracking detector layer geometry parameters.
Definition: TrackingDetectorGeoParams.h:28
Definition: HFCluster.h:21
Point COGPosition() const
Definition: HFCluster.h:29
DetectorType Type() const
Definition: HFCluster.h:34