8 #ifndef LAR_TWO_D_SLIDING_FIT_OBJECTS_H 9 #define LAR_TWO_D_SLIDING_FIT_OBJECTS_H 1 11 #include "Pandora/StatusCodes.h" 47 LayerFitResult(
const double l,
const double fitT,
const double gradient,
const double rms);
105 void AddPoint(
const float l,
const float t);
112 double GetSumT()
const;
119 double GetSumL()
const;
126 double GetSumTT()
const;
133 double GetSumLT()
const;
140 double GetSumLL()
const;
147 unsigned int GetNPoints()
const;
182 const double firstWeight,
const double secondWeight);
189 bool IsInitialized()
const;
210 double GetStartLayerWeight()
const;
217 double GetEndLayerWeight()
const;
245 FitSegment(
const int startLayer,
const int endLayer,
const double startX,
const double endX);
252 int GetStartLayer()
const;
259 int GetEndLayer()
const;
266 double GetMinX()
const;
273 double GetMaxX()
const;
280 bool IsIncreasingX()
const;
348 const double T =
static_cast<double>(t);
349 const double L =
static_cast<double>(l);
405 m_isInitialized(false),
406 m_startLayerWeight(0.
f),
407 m_endLayerWeight(0.
f)
435 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
445 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
455 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
465 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
474 m_startLayer(startLayer),
477 m_minX = std::min(startX, endX);
478 m_maxX = std::max(startX, endX);
519 #endif // #ifndef LAR_TWO_D_SLIDING_FIT_OBJECTS_H double GetSumLL() const
Get the sum l * l.
double m_sumTT
The sum t * t.
bool IsIncreasingX() const
Whether the x coordinate increases between the start and end layers.
LayerFitResultMap::const_iterator m_startLayerIter
The start layer iterator.
int GetStartLayer() const
Get start layer.
double m_sumLT
The sum l * t.
int m_startLayer
The start layer.
double GetEndLayerWeight() const
Get the end layer weight.
void AddPoint(const float l, const float t)
Add point to layer fit.
TransverseDirection
TransverseDirection enum.
double GetSumLT() const
Get the sum l * t.
LayerFitContribution()
Default constructor.
LayerFitContribution class.
double m_l
The l coordinate.
std::vector< FitSegment > FitSegmentList
bool m_isIncreasingX
Whether the x coordinate increases between the start and end layers.
double m_maxX
The maximum x value.
double GetSumTT() const
Get the sum t * t.
std::map< int, LayerFitContribution > LayerFitContributionMap
unsigned int GetNPoints() const
Get the number of points used.
double m_sumLL
The sum l * l.
double GetFitT() const
Get the fitted t coordinate.
LayerFitResultMap::const_iterator GetEndLayerIter() const
Get the end layer iterator.
bool m_isInitialized
Whether the object is initialized.
double GetStartLayerWeight() const
Get the start layer weight.
LayerFitResult(const double l, const double fitT, const double gradient, const double rms)
Constructor.
double m_startLayerWeight
The start layer weight.
std::map< int, LayerFitResult > LayerFitResultMap
int m_endLayer
The end layer.
double GetGradient() const
Get the fitted gradient dt/dz.
std::vector< LayerInterpolation > LayerInterpolationList
double m_rms
The rms of the fit residuals.
double m_gradient
The fitted gradient dt/dl.
double GetSumL() const
Get the sum l.
LayerInterpolation()
Default constructor.
double m_fitT
The fitted t coordinate.
double GetRms() const
Get the rms of the fit residuals.
LayerFitResultMap::const_iterator m_endLayerIter
The end layer iterator.
LayerInterpolation class.
double m_endLayerWeight
The end layer weight.
double GetMinX() const
Get the minimum x value.
unsigned int m_nPoints
The number of points used.
LayerFitResultMap::const_iterator GetStartLayerIter() const
Get the start layer iterator.
double GetL() const
Get the l coordinate.
double m_minX
The minimum x value.
int GetEndLayer() const
Get end layer.
double GetSumT() const
Get the sum t.
double GetMaxX() const
Get the maximum x value.
bool IsInitialized() const
Whether the object is initialized.
FitSegment(const int startLayer, const int endLayer, const double startX, const double endX)
Constructor.