31 if ((end2D - vtx2D).GetMagnitudeSquared() < std::numeric_limits<float>::epsilon())
34 const float frac((end2D - vtx2D).GetDotProduct(pCaloHit2D->
GetPositionVector() - vtx2D) / (end2D - vtx2D).GetMagnitudeSquared());
39 MatchedSlidingFitMap::const_iterator fIter1 = matchedSlidingFitMap.find(hitType1);
40 if (matchedSlidingFitMap.end() != fIter1)
48 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
51 if (STATUS_CODE_SUCCESS == statusCode)
52 fitPositionList1.push_back(position1);
55 MatchedSlidingFitMap::const_iterator fIter2 = matchedSlidingFitMap.find(hitType2);
56 if (matchedSlidingFitMap.end() != fIter2)
64 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
67 if (STATUS_CODE_SUCCESS == statusCode)
68 fitPositionList2.push_back(position2);
71 unsigned int nViews(1);
72 if (fitPositionList1.size() > 0)
74 if (fitPositionList2.size() > 0)
80 this->
GetBestPosition3D(hitType1, hitType2, fitPositionList1, fitPositionList2, protoHit);
virtual void GetBestPosition3D(const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianPointVector &fitPositionList1, const pandora::CartesianPointVector &fitPositionList2, ProtoHit &protoHit) const
Get the three dimensional position using a provided two dimensional calo hit and candidate fit positi...
static pandora::CartesianVector ProjectPosition(const pandora::Pandora &pandora, const pandora::CartesianVector &position3D, const pandora::HitType view)
Project 3D position into a given 2D view.
void GetLongitudinalTrackHit3D(const MatchedSlidingFitMap &matchedSlidingFitMap, const pandora::CartesianVector &vtx3D, const pandora::CartesianVector &end3D, ProtoHit &protoHit) const
Get the three dimensional position using a provided two dimensional calo hit and sliding linear fits ...
Proto hits are temporary constructs to be used during iterative 3D hit procedure.
const pandora::CaloHit * GetParentCaloHit2D() const
Get the address of the parent 2D calo hit.
TwoDSlidingFitResult class.
pandora::StatusCode GetGlobalFitProjection(const pandora::CartesianVector &inputPosition, pandora::CartesianVector &projectedPosition) const
Get projected position on global fit for a given position vector.