8#ifndef PANDORA_CLUSTER_FIT_HELPER_H
9#define PANDORA_CLUSTER_FIT_HELPER_H 1
40 const float energy,
const unsigned int pseudoLayer);
177 void SetChi2(
const float chi2);
184 void SetRms(
const float rms);
326 m_isFitSuccessful(false),
327 m_direction(0.f, 0.f, 0.f),
328 m_intercept(0.f, 0.f, 0.f)
430 if (!(
m_dirCosR = radialDirectionCosine))
Header file defining relevant internal typedefs, sort and string conversion functions.
void SetValues(float x, float y, float z)
Set the values of cartesian vector components.
static StatusCode FitStart(const Cluster *const pCluster, const unsigned int maxOccupiedLayers, ClusterFitResult &clusterFitResult)
Fit points in first n occupied pseudolayers of a cluster.
static StatusCode FitLayers(const Cluster *const pCluster, const unsigned int startLayer, const unsigned int endLayer, ClusterFitResult &clusterFitResult)
Fit all cluster points within the specified (inclusive) pseudolayer range.
static StatusCode PerformLinearFit(const CartesianVector ¢ralPosition, const CartesianVector ¢ralDirection, ClusterFitPointList &clusterFitPointList, ClusterFitResult &clusterFitResult)
Perform linear fit to cluster fit points.
static StatusCode FitEnd(const Cluster *const pCluster, const unsigned int maxOccupiedLayers, ClusterFitResult &clusterFitResult)
Fit points in last n occupied pseudolayers of a cluster.
static StatusCode FitFullCluster(const Cluster *const pCluster, ClusterFitResult &clusterFitResult)
Fit all points in a cluster.
static StatusCode FitLayerCentroids(const Cluster *const pCluster, const unsigned int startLayer, const unsigned int endLayer, ClusterFitResult &clusterFitResult)
Fit all cluster centroids within the specified (inclusive) pseudolayer range.
static StatusCode FitPoints(ClusterFitPointList &clusterFitPointList, ClusterFitResult &clusterFitResult)
Perform linear regression of x vs d and y vs d and z vs d (assuming same error on all hits)
unsigned int m_pseudoLayer
The pseudolayer in which the point was recorded.
float m_cellSize
The size of the cell in which the point was recorded.
float m_energy
The energy deposited in the cell in which the point was recorded.
const CartesianVector & GetCellNormalVector() const
Get the unit normal vector to the cell in which the point was recorded.
CartesianVector m_position
The position vector of the fit point.
bool operator<(const ClusterFitPoint &rhs) const
operator< to define an ordering for cluster fit points
float GetCellSize() const
Get the size of the cell in which the point was recorded.
float GetEnergy() const
Get the energy deposited in the cell in which the point was recorded.
const CartesianVector & GetPosition() const
Get the position vector of the fit point.
CartesianVector m_cellNormalVector
The unit normal vector to the cell in which the point was recorded.
unsigned int GetPseudoLayer() const
Get the pseudolayer in which the point was recorded.
const CartesianVector & GetDirection() const
Get the fit direction.
InputFloat m_chi2
The chi2 value for the fit.
float GetRms() const
Get the fit rms.
void SetSuccessFlag(const bool successFlag)
Set the fit success flag.
CartesianVector m_direction
The best fit direction.
CartesianVector m_intercept
The best fit intercept.
bool IsFitSuccessful() const
Query whether fit was successful.
float GetChi2() const
Get the fit ch2.
ClusterFitResult()
Default constructor.
float GetRadialDirectionCosine() const
Get the fit direction cosine w.r.t. the radial direction.
InputFloat m_dirCosR
The direction cosine wrt to the radial direction.
const CartesianVector & GetIntercept() const
Get the fit intercept.
void SetRms(const float rms)
Set the fit rms.
void SetRadialDirectionCosine(const float radialDirectionCosine)
Set the fit direction cosine w.r.t. the radial direction.
void SetDirection(const CartesianVector &direction)
Set the fit direction.
void Reset()
Reset the cluster fit result.
bool m_isFitSuccessful
Whether the fit was successful.
InputFloat m_rms
The rms of the fit.
void SetIntercept(const CartesianVector &intercept)
Set the fit intercept.
void SetChi2(const float chi2)
Set the fit chi2.
StatusCodeException class.
std::vector< ClusterFitResult > ClusterFitResultList
std::vector< ClusterFitPoint > ClusterFitPointList
StatusCode
The StatusCode enum.