9 #include "Pandora/AlgorithmHeaders.h" 21 ShowerHitsBaseTool::ShowerHitsBaseTool() :
29 const CaloHitVector &inputTwoDHits,
ProtoHitVector &protoHitVector)
31 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
32 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
39 CaloHitVector caloHitVectorU, caloHitVectorV, caloHitVectorW;
44 this->
GetShowerHits3D(caloHitVectorU, caloHitVectorV, caloHitVectorW, protoHitVector);
45 this->
GetShowerHits3D(caloHitVectorV, caloHitVectorU, caloHitVectorW, protoHitVector);
46 this->
GetShowerHits3D(caloHitVectorW, caloHitVectorU, caloHitVectorV, protoHitVector);
48 catch (StatusCodeException &)
56 const CaloHitVector &caloHitVector2,
ProtoHitVector &protoHitVector)
const 58 for (
const CaloHit *
const pCaloHit2D : inputTwoDHits)
62 CaloHitVector filteredHits1, filteredHits2;
70 protoHitVector.push_back(protoHit);
72 catch (StatusCodeException &)
81 CaloHitVector &outputCaloHitVector)
const 83 for (
const CaloHit *
const pCaloHit : inputCaloHitVector)
85 const float deltaX(pCaloHit->GetPositionVector().GetX() -
x);
87 if (std::fabs(deltaX) < xTolerance)
88 outputCaloHitVector.push_back(pCaloHit);
96 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
Header file for the pfo helper class.
Proto hits are temporary constructs to be used during iterative 3D hit procedure. ...
ThreeDHitCreationAlgorithm::ProtoHitVector ProtoHitVector
float m_xTolerance
The x tolerance to use when looking for associated calo hits between views.
double m_chiSquaredCut
The chi squared cut (accept only values below the cut value)
void FilterCaloHits(const float x, const float xTolerance, const pandora::CaloHitVector &inputCaloHitVector, pandora::CaloHitVector &outputCaloHitVector) const
Filter a list of calo hits to find those within a specified tolerance of a give x position...
Header file for the three dimensional hit creation algorithm class.
static bool IsShower(const pandora::ParticleFlowObject *const pPfo)
Return shower flag based on Pfo Particle ID.
virtual void GetShowerHit3D(const pandora::CaloHitVector &caloHitVector1, const pandora::CaloHitVector &caloHitVector2, ProtoHit &protoHit) const =0
Get the three dimensional position for to a two dimensional calo hit, using the hit and a list of can...
virtual void GetShowerHits3D(const pandora::CaloHitVector &inputTwoDHits, const pandora::CaloHitVector &caloHitVector1, const pandora::CaloHitVector &caloHitVector2, ProtoHitVector &protoHitVector) const
Create three dimensional hits, using a list of input two dimensional hits and the hits (contained in ...
ThreeDHitCreationAlgorithm::Algorithm class.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void FilterCaloHitsByType(const pandora::CaloHitVector &inputCaloHitVector, const pandora::HitType hitType, pandora::CaloHitVector &outputCaloHitVector) const
Get the subset of a provided calo hit vector corresponding to a specified hit type.
virtual void Run(ThreeDHitCreationAlgorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pPfo, const pandora::CaloHitVector &inputTwoDHits, ProtoHitVector &protoHitVector)
Run the algorithm tool.