HerdSoftware  0.1.1
StkIntersectionsAlgo.h
Go to the documentation of this file.
1 /*
2  * StkIntersectionsAlgo.h
3  *
4  * Created on: 24 Oct 2019
5  * Author: Lorenzo Pacini
6  */
7 
8 #ifndef HERD_COMPUTESTKACCINFO_H_
9 #define HERD_COMPUTESTKACCINFO_H_
10 
11 #include "algorithm/Algorithm.h"
12 #include "common/RefFrame.h"
13 #include "common/SidesArray.h"
14 #include "dataobjects/Plane.h"
16 
17 using namespace EA;
18 
19 namespace Herd {
20 
21 // clang-format off
39 // clang-format on
40 class StkIntersectionsAlgo : public Algorithm {
41 public:
46  StkIntersectionsAlgo(const std::string &name);
47 
52  bool Initialize();
53 
58  bool Process();
59 
64  bool Finalize();
65 
66 private:
73  bool CheckIfPointIsInStkSurface(const Point &p, const RefFrame::Side &view);
74 
82  bool CheckIfPointIsInABox(const Point &p1, const Point &p2, const Point p);
83 
91  bool CheckIfPointIsInABox_SpecificCorners(const Point &pXNegYNegZNeg, const Point &pXPosYPosZPos, const Point p);
92 
99  float PntDistance(const Point &p1, const Point &p2);
100 
101  observer_ptr<EventDataStore> _evStore;
102 
104 
106 
107  const float _Prec; // cm
108  const unsigned int _NStkLayers;
109 
110  const float _topStkZ[12]; // cm
111  const float _topStkX;
112  const float _topStkY;
113  const float _topStkDX;
114  const float _topStkDY;
115  const float _XnegStkX[12];
116  const float _XnegStkY;
117  const float _XnegStkZ;
118  const float _XnegStkDY;
119  const float _XnegStkDZ;
120  const float _XposStkX[12];
121  const float _XposStkY;
122  const float _XposStkZ;
123  const float _XposStkDY;
124  const float _XposStkDZ;
125  const float _YnegStkY[12];
126  const float _YnegStkZ;
127  const float _YnegStkX;
128  const float _YnegStkDZ;
129  const float _YnegStkDX;
130  const float _YposStkY[12];
131  const float _YposStkZ;
132  const float _YposStkX;
133  const float _YposStkDZ;
134  const float _YposStkDX;
135 };
136 
137 } // namespace Herd
138 
139 #endif /* HERD_COMPUTESTKACCINFO_H_ */
const float _YnegStkX
Definition: StkIntersectionsAlgo.h:127
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
const float _XnegStkY
Definition: StkIntersectionsAlgo.h:116
observer_ptr< EventDataStore > _evStore
Pointer to the event data store.
Definition: StkIntersectionsAlgo.h:101
A container of information about interesections between a track and the STK.
Definition: StkIntersections.h:64
const float _topStkDY
Definition: StkIntersectionsAlgo.h:114
const float _YposStkDZ
Definition: StkIntersectionsAlgo.h:133
Side
Aliases for the five sides. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:104
const float _YnegStkDZ
Definition: StkIntersectionsAlgo.h:128
An algorithm that calculate the intersections between a track and the STK.
Definition: StkIntersectionsAlgo.h:40
SidesArray< std::vector< Plane > > _Planes
STK surfaces for each side and each layer.
Definition: StkIntersectionsAlgo.h:105
const float _YposStkZ
Definition: StkIntersectionsAlgo.h:131
const float _XnegStkDZ
Definition: StkIntersectionsAlgo.h:119
const float _XnegStkZ
Definition: StkIntersectionsAlgo.h:117
const float _topStkY
Definition: StkIntersectionsAlgo.h:112
A class describing a vector in 3D space.
Definition: Vec3D.h:33
const float _XposStkY
Definition: StkIntersectionsAlgo.h:121
const float _Prec
Definition: StkIntersectionsAlgo.h:107
const float _topStkDX
Definition: StkIntersectionsAlgo.h:113
An array that accepts side as subscripts.
Definition: SidesArray.h:72
const unsigned int _NStkLayers
Definition: StkIntersectionsAlgo.h:108
const float _YnegStkDX
Definition: StkIntersectionsAlgo.h:129
const float _XposStkZ
Definition: StkIntersectionsAlgo.h:122
const float _topStkX
Definition: StkIntersectionsAlgo.h:111
const float _YposStkDX
Definition: StkIntersectionsAlgo.h:134
const float _XnegStkDY
Definition: StkIntersectionsAlgo.h:118
const float _XposStkDZ
Definition: StkIntersectionsAlgo.h:124
const float _XposStkDY
Definition: StkIntersectionsAlgo.h:123
const float _YposStkX
Definition: StkIntersectionsAlgo.h:132
StkIntersections _stkIntersections
The stkIntersections object to fill with the computed information.
Definition: StkIntersectionsAlgo.h:103
const float _YnegStkZ
Definition: StkIntersectionsAlgo.h:126