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;
342 const double T =
static_cast<double>(
t);
343 const double L =
static_cast<double>(
l);
426 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
436 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
446 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
456 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
465 m_startLayer(startLayer),
510 #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.
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
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.
static int max(int a, int b)
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.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
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.