LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArPfoObjects.h
Go to the documentation of this file.
1 
8 #ifndef LAR_PFO_OBJECTS_H
9 #define LAR_PFO_OBJECTS_H 1
10 
11 #include "Objects/CartesianVector.h"
12 #include "Objects/TrackState.h"
13 
14 #include <vector>
15 
16 namespace pandora
17 {
18 class CaloHit;
19 }
20 
21 //------------------------------------------------------------------------------------------------------------------------------------------
22 
23 namespace lar_content
24 {
25 
29 class LArTrackState : public pandora::TrackState
30 {
31 public:
39  LArTrackState(const pandora::CartesianVector &position, const pandora::CartesianVector &direction, const pandora::CaloHit *const pCaloHit);
40 
47  LArTrackState(const pandora::CartesianVector &position, const pandora::CartesianVector &direction);
48 
54  const pandora::CartesianVector &GetDirection() const;
55 
61  const pandora::CaloHit *GetCaloHit() const;
62 
63 private:
64  const pandora::CaloHit *m_pCaloHit;
65 };
66 
67 typedef std::vector<LArTrackState> LArTrackStateVector;
68 
69 //------------------------------------------------------------------------------------------------------------------------------------------
70 
74 class LArTrackTrajectoryPoint : public std::pair<float, LArTrackState>
75 {
76 public:
83  LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState);
84 
92  LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState, const int index);
93 
99  int GetIndex() const;
100 
101 private:
102  int m_index;
103 };
104 
105 typedef std::vector<LArTrackTrajectoryPoint> LArTrackTrajectory;
106 
107 //------------------------------------------------------------------------------------------------------------------------------------------
108 
113 {
114 public:
124  LArShowerPCA(const pandora::CartesianVector &centroid, const pandora::CartesianVector &primaryAxis,
125  const pandora::CartesianVector &secondaryAxis, const pandora::CartesianVector &tertiaryAxis, const pandora::CartesianVector &eigenvalues);
126 
132  const pandora::CartesianVector &GetCentroid() const;
133 
139  const pandora::CartesianVector &GetPrimaryAxis() const;
140 
146  const pandora::CartesianVector &GetSecondaryAxis() const;
147 
153  const pandora::CartesianVector &GetTertiaryAxis() const;
154 
160  const pandora::CartesianVector &GetEigenValues() const;
161 
167  const pandora::CartesianVector &GetAxisLengths() const;
168 
174  float GetPrimaryLength() const;
175 
181  float GetSecondaryLength() const;
182 
188  float GetTertiaryLength() const;
189 
190 private:
191  const pandora::CartesianVector m_centroid;
192  const pandora::CartesianVector m_primaryAxis;
193  const pandora::CartesianVector m_secondaryAxis;
194  const pandora::CartesianVector m_tertiaryAxis;
195  const pandora::CartesianVector m_eigenValues;
196  const pandora::CartesianVector m_axisLengths;
197 };
198 
199 //------------------------------------------------------------------------------------------------------------------------------------------
200 //------------------------------------------------------------------------------------------------------------------------------------------
201 
202 inline LArTrackTrajectoryPoint::LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState) :
203  std::pair<float, LArTrackState>(projectedDistance, larTrackState),
204  m_index(-1)
205 {
206 }
207 
208 //------------------------------------------------------------------------------------------------------------------------------------------
209 
210 inline LArTrackTrajectoryPoint::LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState, const int index) :
211  std::pair<float, LArTrackState>(projectedDistance, larTrackState),
212  m_index(index)
213 {
214 }
215 
216 //------------------------------------------------------------------------------------------------------------------------------------------
217 
219 {
220  return m_index;
221 }
222 
223 } // namespace lar_content
224 
225 #endif // #ifndef LAR_PFO_OBJECTS_H
int m_index
The index associated with the trajectory point.
LArTrackState class.
Definition: LArPfoObjects.h:29
STL namespace.
const pandora::CaloHit * m_pCaloHit
Definition: LArPfoObjects.h:64
const pandora::CartesianVector m_eigenValues
The vector of eigenvalues.
int GetIndex() const
Get the index associated with the trajectory point.
std::vector< LArTrackTrajectoryPoint > LArTrackTrajectory
const pandora::CartesianVector m_tertiaryAxis
The tertiary axis.
LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState)
Constructor.
const pandora::CartesianVector m_primaryAxis
The primary axis.
const pandora::CartesianVector m_centroid
The centroid.
const pandora::CartesianVector m_axisLengths
The vector of lengths.
std::vector< LArTrackState > LArTrackStateVector
Definition: LArPfoObjects.h:67
LArTrackTrajectoryPoint class.
Definition: LArPfoObjects.h:74
LArShowerPCA class.
const pandora::CartesianVector m_secondaryAxis
The secondary axis.