Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
LArTwoDSlidingShowerFitResult.h
Go to the documentation of this file.
1
8#ifndef LAR_TWO_D_SLIDING_SHOWER_FIT_RESULT_H
9#define LAR_TWO_D_SLIDING_SHOWER_FIT_RESULT_H 1
10
11#include "Api/PandoraApi.h"
12
14
15#include <unordered_map>
16
17namespace lar_content
18{
19
28
29//------------------------------------------------------------------------------------------------------------------------------------------
30
35{
36public:
45 template <typename T>
47 const T *const pT, const unsigned int slidingFitWindow, const float slidingFitLayerPitch, const float showerEdgeMultiplier = 1.f);
48
55
62
69
77 void GetShowerEdges(const float x, const bool widenIfAmbiguity, pandora::FloatVector &edgePositions) const;
78
79private:
90 static TwoDSlidingFitResult LArTwoDShowerEdgeFit(const pandora::Cluster *const pCluster, const TwoDSlidingFitResult &fullShowerFit,
91 const ShowerEdge showerEdge, const float showerEdgeMultiplier);
92
104 const TwoDSlidingFitResult &fullShowerFit, const ShowerEdge showerEdge, const float showerEdgeMultiplier);
105
106 typedef std::pair<float, float> FitCoordinate;
107 typedef std::vector<FitCoordinate> FitCoordinateList;
108 typedef std::map<int, FitCoordinateList> FitCoordinateMap;
109
113};
114
115typedef std::vector<TwoDSlidingShowerFitResult> TwoDSlidingShowerFitResultList;
116typedef std::unordered_map<const pandora::Cluster *, TwoDSlidingShowerFitResult> TwoDSlidingShowerFitResultMap;
117
118//------------------------------------------------------------------------------------------------------------------------------------------
119
124{
125public:
133 ShowerExtent(const float xCoordinate, const float highEdgeZ, const float lowEdgeZ);
134
140 float GetXCoordinate() const;
141
147 float GetHighEdgeZ() const;
148
154 float GetLowEdgeZ() const;
155
156private:
160};
161
162typedef std::map<int, ShowerExtent> ShowerPositionMap;
163
164//------------------------------------------------------------------------------------------------------------------------------------------
165//------------------------------------------------------------------------------------------------------------------------------------------
166
171
172//------------------------------------------------------------------------------------------------------------------------------------------
173
178
179//------------------------------------------------------------------------------------------------------------------------------------------
180
185
186//------------------------------------------------------------------------------------------------------------------------------------------
187//------------------------------------------------------------------------------------------------------------------------------------------
188
189inline ShowerExtent::ShowerExtent(const float xCoordinate, const float edge1, const float edge2) :
190 m_xCoordinate(xCoordinate),
191 m_highEdgeZ(std::max(edge1, edge2)),
192 m_lowEdgeZ(std::min(edge1, edge2))
193{
194}
195
196//------------------------------------------------------------------------------------------------------------------------------------------
197
199{
200 return m_xCoordinate;
201}
202
203//------------------------------------------------------------------------------------------------------------------------------------------
204
205inline float ShowerExtent::GetHighEdgeZ() const
206{
207 return m_highEdgeZ;
208}
209
210//------------------------------------------------------------------------------------------------------------------------------------------
211
212inline float ShowerExtent::GetLowEdgeZ() const
213{
214 return m_lowEdgeZ;
215}
216
217} // namespace lar_content
218
219#endif // #ifndef LAR_TWO_D_SLIDING_SHOWER_FIT_RESULT_H
Header file for the lar two dimensional sliding fit result class.
Header file for the pandora api class.
ShowerExtent(const float xCoordinate, const float highEdgeZ, const float lowEdgeZ)
Constructor.
float m_lowEdgeZ
The shower low edge z coordinate.
float m_highEdgeZ
The shower high edge z coordinate.
TwoDSlidingFitResult m_positiveEdgeFitResult
The sliding fit result for the positive shower edge.
TwoDSlidingFitResult m_showerFitResult
The sliding fit result for the full shower cluster.
void GetShowerEdges(const float x, const bool widenIfAmbiguity, pandora::FloatVector &edgePositions) const
Get the most appropriate shower edges at a given x coordinate.
const TwoDSlidingFitResult & GetNegativeEdgeFitResult() const
Get the sliding fit result for the negative shower edge.
const TwoDSlidingFitResult & GetShowerFitResult() const
Get the sliding fit result for the full shower cluster.
static TwoDSlidingFitResult LArTwoDShowerEdgeFit(const pandora::Cluster *const pCluster, const TwoDSlidingFitResult &fullShowerFit, const ShowerEdge showerEdge, const float showerEdgeMultiplier)
Perform two dimensional sliding fit to shower edge, using specified primary axis.
const TwoDSlidingFitResult & GetPositiveEdgeFitResult() const
Get the sliding fit result for the positive shower edge.
TwoDSlidingFitResult m_negativeEdgeFitResult
The sliding fit result for the negative shower edge.
std::map< int, FitCoordinateList > FitCoordinateMap
Cluster class.
Definition Cluster.h:31
std::unordered_map< const pandora::Cluster *, TwoDSlidingShowerFitResult > TwoDSlidingShowerFitResultMap
std::vector< TwoDSlidingShowerFitResult > TwoDSlidingShowerFitResultList
std::map< int, ShowerExtent > ShowerPositionMap
std::vector< CartesianVector > CartesianPointVector
std::vector< float > FloatVector