51 std::cout <<
"DlHitValidationAlgorithm: Unable to write confusion_tree to file" << std::endl;
59 const int SHOWER_IDX{0}, TRACK_IDX{1};
67 const HitType view{pCaloHitList->front()->GetHitType()};
70 return STATUS_CODE_NOT_ALLOWED;
81 for (
const CaloHit *pCaloHit : *pCaloHitList)
87 const int truth{(pdg == 11 || pdg == 22) ? SHOWER_IDX : TRACK_IDX};
90 const float pShower{pLArCaloHit->GetShowerProbability()};
91 const int cls{(pShower > pTrack) ? SHOWER_IDX : TRACK_IDX};
106 return STATUS_CODE_SUCCESS;
116 return STATUS_CODE_SUCCESS;
Header file for the deep learning track shower id validation algorithm.
Header file for the lar calo hit class.
Header file for the lar monte carlo particle helper helper class.
Header file for the lar monitoring helper helper class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
static pandora::StatusCode GetCurrentList(const pandora::Algorithm &algorithm, const T *&pT)
Get the current list.
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
float GetTrackProbability() const
Get the probability that the hit is track-like.
float m_maxPhotonPropagation
the maximum photon propagation length
unsigned int m_minHitsForGoodView
the minimum number of Hits for a good view
static void SelectReconstructableMCParticles(const pandora::MCParticleList *pMCParticleList, const pandora::CaloHitList *pCaloHitList, const PrimaryParameters ¶meters, std::function< bool(const pandora::MCParticle *const)> fCriteria, MCContributionMap &selectedMCParticlesToHitsMap)
Select target, reconstructable mc particles that match given criteria.
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
static bool IsBeamNeutrinoFinalState(const pandora::MCParticle *const pMCParticle)
Returns true if passed a primary neutrino final state MCParticle.
DlHitValidationAlgorithm()
Default constructor.
pandora::StringVector m_caloHitListNames
Name of input calo hit list.
int m_confusionV[2][2]
Confusion matrix for the V view.
virtual ~DlHitValidationAlgorithm()
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
int m_confusionU[2][2]
Confusion matrix for the U view.
pandora::StatusCode Run()
Run the algorithm.
int m_confusionW[2][2]
Confusion matrix for the W view.
static const MCParticle * GetMainMCParticle(const T *const pT)
Find the mc particle making the largest contribution to a specified calo hit, track or cluster.
int GetParticleId() const
Get the PDG code of the mc particle.
const Pandora & GetPandora() const
Get the associated pandora instance.
StatusCodeException class.
static StatusCode ReadVectorOfValues(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
Read a vector of values from a (space separated) list in an xml element.
HitType
Calorimeter hit type enum.
MANAGED_CONTAINER< const MCParticle * > MCParticleList
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.