LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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/TrackState.h"
12 #include "Objects/CartesianVector.h"
13 
14 #include <vector>
15 
16 namespace pandora {class CaloHit;}
17 
18 //------------------------------------------------------------------------------------------------------------------------------------------
19 
20 namespace lar_content
21 {
22 
26 class LArTrackState : public pandora::TrackState
27 {
28 public:
36  LArTrackState(const pandora::CartesianVector &position, const pandora::CartesianVector &direction, const pandora::CaloHit *const pCaloHit);
37 
44  LArTrackState(const pandora::CartesianVector &position, const pandora::CartesianVector &direction);
45 
51  const pandora::CartesianVector &GetDirection() const;
52 
58  const pandora::CaloHit *GetCaloHit() const;
59 
60 private:
61  const pandora::CaloHit *m_pCaloHit;
62 };
63 
64 typedef std::vector<LArTrackState> LArTrackStateVector;
65 
66 //------------------------------------------------------------------------------------------------------------------------------------------
67 
71 class LArTrackTrajectoryPoint : public std::pair<float, LArTrackState>
72 {
73 public:
80  LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState);
81 
89  LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState, const int index);
90 
96  int GetIndex() const;
97 
98 private:
99  int m_index;
100 };
101 
102 typedef std::vector<LArTrackTrajectoryPoint> LArTrackTrajectory;
103 
104 //------------------------------------------------------------------------------------------------------------------------------------------
105 
110 {
111 public:
121  LArShowerPCA(const pandora::CartesianVector &centroid, const pandora::CartesianVector &primaryAxis, const pandora::CartesianVector &secondaryAxis,
122  const pandora::CartesianVector &tertiaryAxis, const pandora::CartesianVector &eigenvalues);
123 
129  const pandora::CartesianVector &GetCentroid() const;
130 
136  const pandora::CartesianVector &GetPrimaryAxis() const;
137 
143  const pandora::CartesianVector &GetSecondaryAxis() const;
144 
150  const pandora::CartesianVector &GetTertiaryAxis() const;
151 
157  const pandora::CartesianVector &GetEigenValues() const;
158 
164  const pandora::CartesianVector &GetAxisLengths() const;
165 
171  float GetPrimaryLength() const;
172 
178  float GetSecondaryLength() const;
179 
185  float GetTertiaryLength() const;
186 
187 private:
188  const pandora::CartesianVector m_centroid;
189  const pandora::CartesianVector m_primaryAxis;
190  const pandora::CartesianVector m_secondaryAxis;
191  const pandora::CartesianVector m_tertiaryAxis;
192  const pandora::CartesianVector m_eigenValues;
193  const pandora::CartesianVector m_axisLengths;
194 };
195 
196 //------------------------------------------------------------------------------------------------------------------------------------------
197 //------------------------------------------------------------------------------------------------------------------------------------------
198 
199 inline LArTrackTrajectoryPoint::LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState) :
200  std::pair<float, LArTrackState>(projectedDistance, larTrackState),
201  m_index(-1)
202 {
203 }
204 
205 //------------------------------------------------------------------------------------------------------------------------------------------
206 
207 inline LArTrackTrajectoryPoint::LArTrackTrajectoryPoint(const float projectedDistance, const LArTrackState &larTrackState, const int index) :
208  std::pair<float, LArTrackState>(projectedDistance, larTrackState),
209  m_index(index)
210 {
211 }
212 
213 //------------------------------------------------------------------------------------------------------------------------------------------
214 
216 {
217  return m_index;
218 }
219 
220 } // namespace lar_content
221 
222 #endif // #ifndef LAR_PFO_OBJECTS_H
int m_index
The index associated with the trajectory point.
Definition: LArPfoObjects.h:99
LArTrackState class.
Definition: LArPfoObjects.h:26
STL namespace.
const pandora::CaloHit * m_pCaloHit
Definition: LArPfoObjects.h:61
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:64
LArTrackTrajectoryPoint class.
Definition: LArPfoObjects.h:71
LArShowerPCA class.
const pandora::CartesianVector m_secondaryAxis
The secondary axis.