Public Member Functions | Private Member Functions | List of all members
lar_dl_content::DlPfoCharacterisationAlgorithm Class Reference

DlPfoCharacterisationAlgorithm class. More...

#include <DlPfoCharacterisationAlgorithm.h>

Inheritance diagram for lar_dl_content::DlPfoCharacterisationAlgorithm:
lar_content::PfoCharacterisationBaseAlgorithm

Public Member Functions

 DlPfoCharacterisationAlgorithm ()
 Default constructor. More...
 
- Public Member Functions inherited from lar_content::PfoCharacterisationBaseAlgorithm
 PfoCharacterisationBaseAlgorithm ()
 Default constructor. More...
 
virtual ~PfoCharacterisationBaseAlgorithm ()
 Destructor. More...
 

Private Member Functions

bool IsClearTrack (const pandora::Cluster *const pCluster) const
 Whether cluster is identified as a clear track. More...
 
bool IsClearTrack (const pandora::ParticleFlowObject *const pPfo) const
 Whether pfo is identified as a clear track. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Additional Inherited Members

- Protected Member Functions inherited from lar_content::PfoCharacterisationBaseAlgorithm
pandora::StatusCode Run ()
 
virtual bool IsClearTrack3x2D (const pandora::ParticleFlowObject *const pPfo) const
 Whether pfo is identified as a clear track using its three clusters. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 
- Protected Attributes inherited from lar_content::PfoCharacterisationBaseAlgorithm
std::string m_trackPfoListName
 The track pfo list name. More...
 
std::string m_showerPfoListName
 The shower pfo list name. More...
 
pandora::StringVector m_inputPfoListNames
 The names of the input pfo lists. More...
 
bool m_updateClusterIds
 Whether to update daughter cluster particle id labels to match pfo id. More...
 
bool m_postBranchAddition
 Whether to use configuration for shower clusters post branch addition. More...
 
bool m_useThreeDInformation
 Whether to use PFO and 3D information or clusters for characterisation. More...
 
unsigned int m_minTrackLikeViews
 The minimum number of track-like views to declare a pfo as track-like. More...
 

Detailed Description

DlPfoCharacterisationAlgorithm class.

Definition at line 19 of file DlPfoCharacterisationAlgorithm.h.

Constructor & Destructor Documentation

lar_dl_content::DlPfoCharacterisationAlgorithm::DlPfoCharacterisationAlgorithm ( )

Default constructor.

Definition at line 24 of file DlPfoCharacterisationAlgorithm.cc.

25 {
26 }

Member Function Documentation

bool lar_dl_content::DlPfoCharacterisationAlgorithm::IsClearTrack ( const pandora::Cluster *const  pCluster) const
privatevirtual

Whether cluster is identified as a clear track.

Parameters
pClusteraddress of the relevant cluster
Returns
boolean

Implements lar_content::PfoCharacterisationBaseAlgorithm.

bool lar_dl_content::DlPfoCharacterisationAlgorithm::IsClearTrack ( const pandora::ParticleFlowObject *const  pPfo) const
privatevirtual

Whether pfo is identified as a clear track.

Parameters
pPfoaddress of the relevant pfo
Returns
boolean

Implements lar_content::PfoCharacterisationBaseAlgorithm.

Definition at line 68 of file DlPfoCharacterisationAlgorithm.cc.

69 {
70  ClusterList allClusters;
71  LArPfoHelper::GetTwoDClusterList(pPfo, allClusters);
72  FloatVector trackLikelihoods;
73  for (const Cluster *pCluster : allClusters)
74  {
75  const OrderedCaloHitList &orderedCaloHitList{pCluster->GetOrderedCaloHitList()};
76  CaloHitList caloHits;
77  orderedCaloHitList.FillCaloHitList(caloHits);
78  const CaloHitList &isolatedHits{pCluster->GetIsolatedCaloHitList()};
79  caloHits.insert(caloHits.end(), isolatedHits.begin(), isolatedHits.end());
80  try
81  {
82  for (const CaloHit *pCaloHit : caloHits)
83  {
84  const LArCaloHit *pLArCaloHit{dynamic_cast<const LArCaloHit *>(pCaloHit)};
85  const float pTrack{pLArCaloHit->GetTrackProbability()};
86  const float pShower{pLArCaloHit->GetShowerProbability()};
87  if ((pTrack + pShower) > std::numeric_limits<float>::epsilon())
88  trackLikelihoods.emplace_back(pTrack / (pTrack + pShower));
89  }
90  }
91  catch (const StatusCodeException &)
92  {
93  }
94  }
95 
96  const unsigned long N{trackLikelihoods.size()};
97  if (N > 0)
98  {
99  float mean{std::accumulate(std::begin(trackLikelihoods), std::end(trackLikelihoods), 0.f) / N};
100  if (mean >= 0.5f)
101  return true;
102  else
103  return false;
104  }
105 
106  return true;
107 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
LAr calo hit class.
Definition: LArCaloHit.h:39
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
Dft::FloatVector FloatVector
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
Definition: statistics.cc:16
float GetTrackProbability() const
Get the probability that the hit is track-like.
Definition: LArCaloHit.h:210
StatusCode lar_dl_content::DlPfoCharacterisationAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 111 of file DlPfoCharacterisationAlgorithm.cc.

112 {
113  return PfoCharacterisationBaseAlgorithm::ReadSettings(xmlHandle);
114 }

The documentation for this class was generated from the following files: