9 #include "Pandora/AlgorithmHeaders.h" 
   23 TrackHitsBaseTool::TrackHitsBaseTool() : m_minViews(2), m_slidingFitWindow(20)
 
   30     const CaloHitVector &inputTwoDHits, 
ProtoHitVector &protoHitVector)
 
   32     if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
 
   33         std::cout << 
"----> Running Algorithm Tool: " << this->GetInstanceName() << 
", " << this->GetType() << std::endl;
 
   43         if (matchedSlidingFitMap.size() < 2)
 
   46         this->
GetTrackHits3D(inputTwoDHits, matchedSlidingFitMap, protoHitVector);
 
   48     catch (StatusCodeException &)
 
   57     const ClusterList &pfoClusterList(pPfo->GetClusterList());
 
   61     pfoClusterVector.insert(pfoClusterVector.end(), pfoClusterList.begin(), pfoClusterList.end());
 
   64     for (
const Cluster *
const pCluster : pfoClusterVector)
 
   68         if (TPC_3D == hitType)
 
   71         if (matchedSlidingFitMap.end() != matchedSlidingFitMap.find(hitType))
 
   78             if (!matchedSlidingFitMap.insert(MatchedSlidingFitMap::value_type(hitType, slidingFitResult)).second)
 
   79                 throw StatusCodeException(STATUS_CODE_FAILURE);
 
   81         catch (StatusCodeException &statusCodeException)
 
   83             if (STATUS_CODE_FAILURE == statusCodeException.GetStatusCode())
 
   84                 throw statusCodeException;
 
   93     PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"MinViews", 
m_minViews));
 
   95     PANDORA_RETURN_RESULT_IF_AND_IF(
 
   96         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"SlidingFitWindow", 
m_slidingFitWindow));
 
static bool SortByNHits(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
Sort clusters by number of hits, then layer span, then inner layer, then position, then pulse-height. 
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
virtual void BuildSlidingFitMap(const pandora::ParticleFlowObject *const pPfo, MatchedSlidingFitMap &matchedSlidingFitMap) const 
Calculate sliding fit results for clusters from each view. 
Header file for the pfo helper class. 
virtual void GetTrackHits3D(const pandora::CaloHitVector &inputTwoDHits, const MatchedSlidingFitMap &matchedSlidingFitMap, ProtoHitVector &protoHitVector) const =0
Calculate 3D hits from an input list of 2D hits. 
std::map< pandora::HitType, TwoDSlidingFitResult > MatchedSlidingFitMap
ThreeDHitCreationAlgorithm::ProtoHitVector ProtoHitVector
static pandora::HitType GetClusterHitType(const pandora::Cluster *const pCluster)
Get the hit type associated with a two dimensional cluster. 
static bool IsTrack(const pandora::ParticleFlowObject *const pPfo)
Return track flag based on Pfo Particle ID. 
static float GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchDiscrepancy=0.01)
Return the wire pitch. 
Header file for the three dimensional hit creation algorithm class. 
Header file for the geometry helper class. 
Header file for the cluster helper class. 
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits. 
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
unsigned int m_minViews
The minimum number of views required for building hits. 
ThreeDHitCreationAlgorithm::Algorithm class. 
std::vector< art::Ptr< recob::Cluster > > ClusterVector
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
virtual void Run(ThreeDHitCreationAlgorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pPfo, const pandora::CaloHitVector &inputTwoDHits, ProtoHitVector &protoHitVector)
Run the algorithm tool. 
TwoDSlidingFitResult class. 
BEGIN_PROLOG could also be cout