9 #include "Pandora/AlgorithmHeaders.h" 20 ThreeViewShowerHitsTool::ThreeViewShowerHitsTool() :
29 if (caloHitVector1.empty() || caloHitVector2.empty())
30 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
32 const HitType hitType1(caloHitVector1.at(0)->GetHitType());
33 const HitType hitType2(caloHitVector2.at(0)->GetHitType());
36 const HitType hitType2D(pCaloHit2D->GetHitType());
37 const float position2D(pCaloHit2D->GetPositionVector().GetZ());
39 for (
const CaloHit *
const pCaloHit1 : caloHitVector1)
41 const CartesianVector &position1(pCaloHit1->GetPositionVector());
44 for (
const CaloHit *
const pCaloHit2 : caloHitVector2)
46 const CartesianVector &position2(pCaloHit2->GetPositionVector());
48 if (std::fabs(position2.GetZ() - prediction) >
m_zTolerance)
55 protoHit = thisProtoHit;
64 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
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.
bool IsPositionSet() const
Whether the proto hit position is set.
Header file for the geometry helper class.
void GetShowerHit3D(const pandora::CaloHitVector &caloHitVector1, const pandora::CaloHitVector &caloHitVector2, ProtoHit &protoHit) const
Get the three dimensional position for to a two dimensional calo hit, using the hit and a list of can...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
double GetChi2() const
Get the chi squared value.
static float MergeTwoPositions(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2, const float position1, const float position2)
Merge two views (U,V) to give a third view (Z).
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...
float m_zTolerance
The z tolerance to use when looking for associated calo hits between views.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)