9 #include "Pandora/AlgorithmHeaders.h"
20 ThreeViewShowerHitsTool::ThreeViewShowerHitsTool() : m_zTolerance(1.f)
28 if (caloHitVector1.empty() || caloHitVector2.empty())
29 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
31 const HitType hitType1(caloHitVector1.at(0)->GetHitType());
32 const HitType hitType2(caloHitVector2.at(0)->GetHitType());
35 const HitType hitType2D(pCaloHit2D->GetHitType());
36 const float position2D(pCaloHit2D->GetPositionVector().GetZ());
38 for (
const CaloHit *
const pCaloHit1 : caloHitVector1)
40 const CartesianVector &position1(pCaloHit1->GetPositionVector());
43 for (
const CaloHit *
const pCaloHit2 : caloHitVector2)
45 const CartesianVector &position2(pCaloHit2->GetPositionVector());
47 if (std::fabs(position2.GetZ() - prediction) >
m_zTolerance)
54 protoHit = thisProtoHit;
63 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"ZTolerance",
m_zTolerance));
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...
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
float m_zTolerance
The z tolerance to use when looking for associated calo hits between views.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)