Public Member Functions | Protected Member Functions | List of all members
lar_dl_content::DlClusterCharacterisationAlgorithm Class Reference

DlClusterCharacterisationBaseAlgorithm class. More...

#include <DlClusterCharacterisationAlgorithm.h>

Inheritance diagram for lar_dl_content::DlClusterCharacterisationAlgorithm:
lar_content::ClusterCharacterisationBaseAlgorithm

Public Member Functions

 DlClusterCharacterisationAlgorithm ()
 Default constructor. More...
 
 ~DlClusterCharacterisationAlgorithm ()
 Destructor. More...
 
- Public Member Functions inherited from lar_content::ClusterCharacterisationBaseAlgorithm
 ClusterCharacterisationBaseAlgorithm ()
 Default constructor. More...
 
 ~ClusterCharacterisationBaseAlgorithm ()
 Destructor. More...
 

Protected Member Functions

bool IsClearTrack (const pandora::Cluster *const pCluster) const
 Whether cluster is identified as a clear track. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 
- Protected Member Functions inherited from lar_content::ClusterCharacterisationBaseAlgorithm
pandora::StatusCode Run ()
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Additional Inherited Members

- Protected Attributes inherited from lar_content::ClusterCharacterisationBaseAlgorithm
pandora::StringVector m_inputClusterListNames
 The names of the input cluster lists. More...
 
bool m_zeroMode
 Whether to zero all existing cluster particle id, overrides all other parameters. More...
 
bool m_overwriteExistingId
 Whether to consider any clusters that already have an assigned particle id. More...
 
bool m_useUnavailableClusters
 Whether to consider clusters that are already constituents of a pfo. More...
 

Detailed Description

DlClusterCharacterisationBaseAlgorithm class.

Definition at line 21 of file DlClusterCharacterisationAlgorithm.h.

Constructor & Destructor Documentation

lar_dl_content::DlClusterCharacterisationAlgorithm::DlClusterCharacterisationAlgorithm ( )

Default constructor.

Definition at line 23 of file DlClusterCharacterisationAlgorithm.cc.

24 {
25 }
lar_dl_content::DlClusterCharacterisationAlgorithm::~DlClusterCharacterisationAlgorithm ( )

Destructor.

Definition at line 29 of file DlClusterCharacterisationAlgorithm.cc.

30 {
31 }

Member Function Documentation

bool lar_dl_content::DlClusterCharacterisationAlgorithm::IsClearTrack ( const pandora::Cluster *const  pCluster) const
protectedvirtual

Whether cluster is identified as a clear track.

Parameters
pClusteraddress of the relevant cluster
Returns
boolean

Implements lar_content::ClusterCharacterisationBaseAlgorithm.

Definition at line 35 of file DlClusterCharacterisationAlgorithm.cc.

36 {
37  const OrderedCaloHitList &orderedCaloHitList{pCluster->GetOrderedCaloHitList()};
38  CaloHitList caloHits;
39  orderedCaloHitList.FillCaloHitList(caloHits);
40  const CaloHitList &isolatedHits{pCluster->GetIsolatedCaloHitList()};
41  caloHits.insert(caloHits.end(), isolatedHits.begin(), isolatedHits.end());
42  FloatVector trackLikelihoods;
43  try
44  {
45  for (const CaloHit *pCaloHit : caloHits)
46  {
47  const LArCaloHit *pLArCaloHit{dynamic_cast<const LArCaloHit *>(pCaloHit)};
48  const float pTrack{pLArCaloHit->GetTrackProbability()};
49  const float pShower{pLArCaloHit->GetShowerProbability()};
50  if ((pTrack + pShower) > std::numeric_limits<float>::epsilon())
51  trackLikelihoods.emplace_back(pTrack / (pTrack + pShower));
52  }
53 
54  const unsigned long N{trackLikelihoods.size()};
55  if (N > 0)
56  {
57  float mean{std::accumulate(std::begin(trackLikelihoods), std::end(trackLikelihoods), 0.f) / N};
58  if (mean >= 0.5f)
59  return true;
60  else
61  return false;
62  }
63  }
64  catch (const StatusCodeException &)
65  {
66  }
67 
68  return true;
69 }
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::DlClusterCharacterisationAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
protected

Definition at line 73 of file DlClusterCharacterisationAlgorithm.cc.

74 {
75  return ClusterCharacterisationBaseAlgorithm::ReadSettings(xmlHandle);
76 }

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