HerdSoftware  0.4.0
TrackingDetectorGeoParams.h
Go to the documentation of this file.
1 /*
2  * TrackingDetectorGeoParams.h
3  *
4  * Created on: 22 May 2020
5  * Author: Valerio Formato
6  */
7 
10 #ifndef HERD_TRACKINGDETECTORGEOPARAMS_H_
11 #define HERD_TRACKINGDETECTORGEOPARAMS_H_
12 
13 // HERD headers
18 
19 #ifdef HS_USE_ROOT
20 #include "Rtypes.h"
21 #endif
22 
23 // c++ headers
24 #include <optional>
25 
26 namespace Herd {
27 
32 private:
33  /* data */
34 public:
42 
44  virtual ~TrackingDetectorGeoParams() = default;
45 
51  [[nodiscard]] virtual const RefFrame::Side &Side() const { return _side; }
52 
58  [[nodiscard]] virtual size_t LayerNumber() const { return _layerNumber; }
59 
64  [[nodiscard]] virtual bool HasTungsten() const { return _hasTungsten; }
65 
71  [[nodiscard]] float TungstenThickness() const { return _tungstenThickness; }
72 
78  [[nodiscard]] virtual float ElementPitch() const { return _elementPitch; }
79 
87  [[nodiscard]] virtual std::optional<unsigned int> ElementID(const Point &position) const = 0;
88 
95  [[nodiscard]] virtual Point ElementPosition(unsigned int volID) const = 0;
96 
102  [[nodiscard]] virtual RefFrame::Direction NormalDirection() const { return _normalDir; };
103 
114  [[nodiscard]] virtual std::pair<RefFrame::Direction, RefFrame::Direction> SegmentationDirections() const {
115  return std::make_pair(_mainSegmDir, _secSegmDir);
116  };
117 
124  virtual void SetSideAndMainSegmDir(RefFrame::Side dside, RefFrame::Direction segmDir) = 0;
125 
131  virtual void SetHasTungsten(bool value) { _hasTungsten = value; }
132 
138  virtual void SetTungstenThickness(float value) { _tungstenThickness = value; }
139 
140 protected:
142  size_t _layerNumber;
149 
150 #ifdef HS_USE_ROOT
151  ClassDef(TrackingDetectorGeoParams, 2)
152 #endif
153 };
154 
155 } // namespace Herd
156 
157 #endif
Herd::TrackingDetectorGeoParams::HasTungsten
virtual bool HasTungsten() const
Check if layer is preceded by tungsten plane.
Definition: TrackingDetectorGeoParams.h:64
Herd::TrackingDetectorGeoParams::ElementPitch
virtual float ElementPitch() const
Get element pitch.
Definition: TrackingDetectorGeoParams.h:78
Herd::TrackingDetectorGeoParams
Base data structure for single tracking detector layer geometry parameters.
Definition: TrackingDetectorGeoParams.h:31
Point.h
Herd::TrackingDetectorGeoParams::TungstenThickness
float TungstenThickness() const
Get the tungsten layer thickness.
Definition: TrackingDetectorGeoParams.h:71
Herd::Vec3D
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Herd::TrackingDetectorGeoParams::NormalDirection
virtual RefFrame::Direction NormalDirection() const
Get the normal direction to the detector.
Definition: TrackingDetectorGeoParams.h:102
Herd::TrackingDetectorGeoParams::SetTungstenThickness
virtual void SetTungstenThickness(float value)
Set the tungsten plane thickness.
Definition: TrackingDetectorGeoParams.h:138
Herd::TrackingDetectorGeoParams::_elementPitch
float _elementPitch
Secondary segmentation direction for elements.
Definition: TrackingDetectorGeoParams.h:146
DEFAULT_INIT
#define DEFAULT_INIT(x)
Definition: DefaultValues.h:23
AxesArray.h
Herd::RefFrame::Direction
Direction
Aliases for the six axis directions.
Definition: RefFrame.h:55
Herd::TrackingDetectorGeoParams::_normalDir
RefFrame::Direction _normalDir
Layer number.
Definition: TrackingDetectorGeoParams.h:143
Herd::TrackingDetectorGeoParams::SegmentationDirections
virtual std::pair< RefFrame::Direction, RefFrame::Direction > SegmentationDirections() const
Return the segmentation directions of the tracking elements.
Definition: TrackingDetectorGeoParams.h:114
Herd::RefFrame::Side
Side
Aliases for the five sides.
Definition: RefFrame.h:111
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Herd::TrackingDetectorGeoParams::_secSegmDir
RefFrame::Direction _secSegmDir
Main segmentation direction for elements.
Definition: TrackingDetectorGeoParams.h:145
Herd::TrackingDetectorGeoParams::_mainSegmDir
RefFrame::Direction _mainSegmDir
Normal direction.
Definition: TrackingDetectorGeoParams.h:144
Herd::TrackingDetectorGeoParams::_layerNumber
size_t _layerNumber
Detector side.
Definition: TrackingDetectorGeoParams.h:142
Herd::TrackingDetectorGeoParams::SetSideAndMainSegmDir
virtual void SetSideAndMainSegmDir(RefFrame::Side dside, RefFrame::Direction segmDir)=0
Set the detector side and the main segmentation direction for elements.
Herd::TrackingDetectorGeoParams::_tungstenThickness
float _tungstenThickness
True if layer is preceded by a tungsten plane.
Definition: TrackingDetectorGeoParams.h:148
Herd::TrackingDetectorGeoParams::ElementPosition
virtual Point ElementPosition(unsigned int volID) const =0
Get position of a given element.
Herd::TrackingDetectorGeoParams::_side
RefFrame::Side _side
Definition: TrackingDetectorGeoParams.h:141
SidesArray.h
Herd::TrackingDetectorGeoParams::SetHasTungsten
virtual void SetHasTungsten(bool value)
Set the tungsten flag.
Definition: TrackingDetectorGeoParams.h:131
DefaultValues.h
Herd::TrackingDetectorGeoParams::ElementID
virtual std::optional< unsigned int > ElementID(const Point &position) const =0
Utility function to get volumeID from a set of coordinates. Reimplemented in derived classes.
Herd::TrackingDetectorGeoParams::~TrackingDetectorGeoParams
virtual ~TrackingDetectorGeoParams()=default
Virtual destructor
Herd::TrackingDetectorGeoParams::LayerNumber
virtual size_t LayerNumber() const
Return the layer number for this layer in its detector.
Definition: TrackingDetectorGeoParams.h:58
Herd::TrackingDetectorGeoParams::TrackingDetectorGeoParams
TrackingDetectorGeoParams()
Default constructor.
Definition: TrackingDetectorGeoParams.h:39
Herd::TrackingDetectorGeoParams::Side
virtual const RefFrame::Side & Side() const
Return the detector side this layer is in.
Definition: TrackingDetectorGeoParams.h:51
Herd::TrackingDetectorGeoParams::_hasTungsten
bool _hasTungsten
Element pitch.
Definition: TrackingDetectorGeoParams.h:147