Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
LArThreeDSlidingConeFitResult.h
Go to the documentation of this file.
1
8#ifndef LAR_THREE_D_SLIDING_CONE_FIT_RESULT_H
9#define LAR_THREE_D_SLIDING_CONE_FIT_RESULT_H 1
10
11#include "Api/PandoraApi.h"
12
14
15#include <list>
16#include <unordered_map>
17
18namespace lar_content
19{
20
30
31//------------------------------------------------------------------------------------------------------------------------------------------
32
37{
38public:
47 SimpleCone(const pandora::CartesianVector &coneApex, const pandora::CartesianVector &coneDirection, const float coneLength, const float coneTanHalfAngle);
48
55
62
68 float GetConeLength() const;
69
75 float GetConeTanHalfAngle() const;
76
84 float GetMeanRT(const pandora::Cluster *const pCluster) const;
85
93 float GetBoundedHitFraction(const pandora::Cluster *const pCluster) const;
94
104 float GetBoundedHitFraction(const pandora::Cluster *const pCluster, const float coneLength, const float coneTanHalfAngle) const;
105
106private:
111};
112
113typedef std::vector<SimpleCone> SimpleConeList;
114
115//------------------------------------------------------------------------------------------------------------------------------------------
116
117typedef std::map<int, pandora::TrackState> TrackStateMap;
118
123{
124public:
132 template <typename T>
133 ThreeDSlidingConeFitResult(const T *const pT, const unsigned int slidingFitWindow, const float slidingFitLayerPitch);
134
141
147 const TrackStateMap &GetTrackStateMap() const;
148
157 void GetSimpleConeList(const unsigned int nLayersForConeFit, const unsigned int nCones, const ConeSelection coneSelection,
158 SimpleConeList &simpleConeList) const;
159
160private:
161 typedef std::list<pandora::TrackState> TrackStateLinkedList;
162
165};
166
167typedef std::vector<ThreeDSlidingConeFitResult> ThreeDSlidingConeFitResultList;
168typedef std::unordered_map<const pandora::Cluster *, ThreeDSlidingConeFitResult> ThreeDSlidingConeFitResultMap;
169
170//------------------------------------------------------------------------------------------------------------------------------------------
171//------------------------------------------------------------------------------------------------------------------------------------------
172
174 const float coneLength, const float coneTanHalfAngle) :
175 m_coneApex(coneApex),
176 m_coneDirection(coneDirection),
177 m_coneLength(coneLength),
178 m_coneTanHalfAngle(coneTanHalfAngle)
179{
180}
181
182//------------------------------------------------------------------------------------------------------------------------------------------
183
185{
186 return m_coneApex;
187}
188
189//------------------------------------------------------------------------------------------------------------------------------------------
190
195
196//------------------------------------------------------------------------------------------------------------------------------------------
197
198inline float SimpleCone::GetConeLength() const
199{
200 return m_coneLength;
201}
202
203//------------------------------------------------------------------------------------------------------------------------------------------
204
206{
207 return m_coneTanHalfAngle;
208}
209
210//------------------------------------------------------------------------------------------------------------------------------------------
211
212inline float SimpleCone::GetBoundedHitFraction(const pandora::Cluster *const pCluster) const
213{
214 return this->GetBoundedHitFraction(pCluster, this->GetConeLength(), this->GetConeTanHalfAngle());
215}
216
217//------------------------------------------------------------------------------------------------------------------------------------------
218//------------------------------------------------------------------------------------------------------------------------------------------
219
224
225//------------------------------------------------------------------------------------------------------------------------------------------
226
231
232} // namespace lar_content
233
234#endif // #ifndef LAR_THREE_D_SLIDING_CONE_FIT_RESULT_H
Header file for the lar three dimensional sliding fit result class.
Header file for the pandora api class.
float GetBoundedHitFraction(const pandora::Cluster *const pCluster) const
Get the fraction of hits in a provided cluster that are bounded within the cone, using fitted cone an...
float m_coneTanHalfAngle
The tangent of the cone half-angle.
const pandora::CartesianVector & GetConeApex() const
Get the cone apex.
float GetMeanRT(const pandora::Cluster *const pCluster) const
Get the mean transverse distance to all hits in a cluster (whether contained or not)
SimpleCone(const pandora::CartesianVector &coneApex, const pandora::CartesianVector &coneDirection, const float coneLength, const float coneTanHalfAngle)
Constructor.
pandora::CartesianVector m_coneApex
The cone apex.
const pandora::CartesianVector & GetConeDirection() const
Get the cone direction.
float GetConeTanHalfAngle() const
Get the tangent of the cone half-angle.
float GetConeLength() const
Get the cone length.
pandora::CartesianVector m_coneDirection
The cone direction.
const ThreeDSlidingFitResult & GetSlidingFitResult() const
Get the sliding fit result for the full cluster.
void GetSimpleConeList(const unsigned int nLayersForConeFit, const unsigned int nCones, const ConeSelection coneSelection, SimpleConeList &simpleConeList) const
Get the list of simple cones fitted to the three dimensional cluster.
std::list< pandora::TrackState > TrackStateLinkedList
The track state linked list typedef.
const ThreeDSlidingFitResult m_slidingFitResult
The sliding fit result for the full cluster.
const TrackStateMap & GetTrackStateMap() const
Get the track state map, which caches results from the sliding fit result.
CartesianVector class.
Cluster class.
Definition Cluster.h:31
std::vector< ThreeDSlidingConeFitResult > ThreeDSlidingConeFitResultList
std::unordered_map< const pandora::Cluster *, ThreeDSlidingConeFitResult > ThreeDSlidingConeFitResultMap
ConeSelection
ConeSelection enum.
std::map< int, pandora::TrackState > TrackStateMap
std::vector< SimpleCone > SimpleConeList