30 return STATUS_CODE_NOT_FOUND;
41 return this->
DivideCaloHits(slidingFitResult, splitPosition, firstHitList, secondHitList);
46 if (STATUS_CODE_FAILURE == statusCodeException.
GetStatusCode())
47 throw statusCodeException;
50 return STATUS_CODE_NOT_FOUND;
58 float rL(0.f), rT(0.f);
66 for (CaloHitList::const_iterator hitIter = iter->second->begin(), hitIterEnd = iter->second->end(); hitIter != hitIterEnd; ++hitIter)
68 const CaloHit *
const pCaloHit = *hitIter;
70 float thisL(0.f), thisT(0.f);
75 firstCaloHitList.push_back(pCaloHit);
79 secondCaloHitList.push_back(pCaloHit);
84 if (firstCaloHitList.empty() || secondCaloHitList.empty())
85 return STATUS_CODE_NOT_FOUND;
87 return STATUS_CODE_SUCCESS;
Header file for the cluster helper class.
Header file for the geometry helper class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
Header file for the two dimensional sliding fit splitting algorithm class.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
static float GetLengthSquared(const pandora::Cluster *const pCluster)
Get length squared of cluster.
static float GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchDiscrepancy=0.01)
Return the wire pitch.
TwoDSlidingFitResult class.
void GetLocalPosition(const pandora::CartesianVector &position, float &rL, float &rT) const
Get local sliding fit coordinates for a given global position.
const pandora::Cluster * GetCluster() const
Get the address of the cluster, if originally provided.
TwoDSlidingFitSplittingAlgorithm()
Default constructor.
unsigned int m_slidingFitHalfWindow
virtual pandora::StatusCode FindBestSplitPosition(const TwoDSlidingFitResult &slidingFitResult, pandora::CartesianVector &splitPosition) const =0
Use sliding linear fit to identify the best split position.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
pandora::StatusCode DivideCaloHits(const pandora::Cluster *const pCluster, pandora::CaloHitList &firstCaloHitList, pandora::CaloHitList &secondCaloHitList) const
Divide calo hits in a cluster into two lists, each associated with a separate fragment cluster.
const CartesianVector & GetPositionVector() const
Get the position vector of center of calorimeter cell, units mm.
const OrderedCaloHitList & GetOrderedCaloHitList() const
Get the ordered calo hit list.
Calo hit lists arranged by pseudo layer.
const_iterator end() const
Returns a const iterator referring to the past-the-end element in the ordered calo hit list.
const_iterator begin() const
Returns a const iterator referring to the first element in the ordered calo hit list.
TheList::const_iterator const_iterator
const Pandora & GetPandora() const
Get the associated pandora instance.
StatusCodeException class.
StatusCode GetStatusCode() const
Get status code.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.