Public Member Functions | Private Member Functions | Private Attributes | List of all members
lar_content::VisualParticleMonitoringAlgorithm Class Reference

VisualParticleMonitoringAlgorithm class. More...

#include <VisualParticleMonitoringAlgorithm.h>

Inheritance diagram for lar_content::VisualParticleMonitoringAlgorithm:

Public Member Functions

 VisualParticleMonitoringAlgorithm ()
 Default constructor. More...
 
virtual ~VisualParticleMonitoringAlgorithm ()
 

Private Member Functions

pandora::StatusCode Run ()
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

std::string m_caloHitListName
 Name of input calo hit list. More...
 
std::string m_pfoListName
 Name of input PFO list. More...
 
bool m_visualizeMC
 Whether or not to visualize MC particles. More...
 
bool m_visualizePfo
 Whether or not to visualize PFOs. More...
 
bool m_groupMCByPdg
 Whether or not to group MC particles by particle id. More...
 
bool m_showPfoByPid
 Whether or not to colour PFOs by particle id. More...
 
bool m_showPfoMatchedMC
 Whether or not to display the best matched MC particle for a PFO. More...
 
bool m_isTestBeam
 Whether or not this is a test beam experiment. More...
 
float m_transparencyThresholdE
 Cell energy for which transparency is saturated (0%, fully opaque) More...
 
float m_energyScaleThresholdE
 Cell energy for which color is at top end of continous color palette. More...
 
float m_scalingFactor
 TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) More...
 

Detailed Description

VisualParticleMonitoringAlgorithm class.

Definition at line 21 of file VisualParticleMonitoringAlgorithm.h.

Constructor & Destructor Documentation

lar_content::VisualParticleMonitoringAlgorithm::VisualParticleMonitoringAlgorithm ( )

Default constructor.

Definition at line 22 of file VisualParticleMonitoringAlgorithm.cc.

22  :
23  m_visualizeMC(false),
24  m_visualizePfo(false),
25  m_groupMCByPdg(false),
26  m_showPfoByPid(false),
27  m_showPfoMatchedMC(false),
28  m_isTestBeam{false},
31  m_scalingFactor{1.f}
32 {
33 }
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
bool m_showPfoMatchedMC
Whether or not to display the best matched MC particle for a PFO.
bool m_showPfoByPid
Whether or not to colour PFOs by particle id.
bool m_isTestBeam
Whether or not this is a test beam experiment.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
bool m_groupMCByPdg
Whether or not to group MC particles by particle id.
bool m_visualizeMC
Whether or not to visualize MC particles.
lar_content::VisualParticleMonitoringAlgorithm::~VisualParticleMonitoringAlgorithm ( )
virtual

Definition at line 37 of file VisualParticleMonitoringAlgorithm.cc.

38 {
39 }

Member Function Documentation

StatusCode lar_content::VisualParticleMonitoringAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 419 of file VisualParticleMonitoringAlgorithm.cc.

420 {
421  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "CaloHitListName", m_caloHitListName));
422  if (m_caloHitListName.empty())
423  m_caloHitListName = "CaloHitList2D";
424  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "PfoListName", m_pfoListName));
425  if (m_pfoListName.empty())
426  m_pfoListName = "RecreatedPfos";
427  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "VisualizeMC", m_visualizeMC));
428  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "VisualizePFO", m_visualizePfo));
429  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "GroupMCByPDG", m_groupMCByPdg));
430  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ShowPFOByPID", m_showPfoByPid));
431  PANDORA_RETURN_RESULT_IF_AND_IF(
432  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ShowPFOMatchedMC", m_showPfoMatchedMC));
433  PANDORA_RETURN_RESULT_IF_AND_IF(
434  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "TransparencyThresholdE", m_transparencyThresholdE));
435  PANDORA_RETURN_RESULT_IF_AND_IF(
436  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "EnergyScaleThresholdE", m_energyScaleThresholdE));
437  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ScalingFactor", m_scalingFactor));
438 
439  return STATUS_CODE_SUCCESS;
440 }
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
bool m_showPfoMatchedMC
Whether or not to display the best matched MC particle for a PFO.
bool m_showPfoByPid
Whether or not to colour PFOs by particle id.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
bool m_groupMCByPdg
Whether or not to group MC particles by particle id.
std::string m_caloHitListName
Name of input calo hit list.
bool m_visualizeMC
Whether or not to visualize MC particles.
StatusCode lar_content::VisualParticleMonitoringAlgorithm::Run ( )
private

Definition at line 43 of file VisualParticleMonitoringAlgorithm.cc.

44 {
45 #ifdef MONITORING
46  LArMCParticleHelper::MCContributionMap targetMCParticleToHitsMap;
48  {
49  const CaloHitList *pCaloHitList(nullptr);
50  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*this, m_caloHitListName, pCaloHitList));
51  const MCParticleList *pMCParticleList(nullptr);
52  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*this, pMCParticleList));
53  this->MakeSelection(pMCParticleList, pCaloHitList, targetMCParticleToHitsMap);
54  }
55 
56  if (m_visualizeMC)
57  {
58  if (m_groupMCByPdg)
59  this->VisualizeMCByPdgCode(targetMCParticleToHitsMap);
60  else
61  this->VisualizeIndependentMC(targetMCParticleToHitsMap);
62  }
63  if (m_visualizePfo)
64  {
65  const PfoList *pPfoList(nullptr);
66  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*this, m_pfoListName, pPfoList));
67  if (m_showPfoByPid)
68  {
69  this->VisualizePfoByParticleId(*pPfoList);
70  }
71  else
72  {
74  this->VisualizeIndependentPfo(*pPfoList, targetMCParticleToHitsMap);
75  else
76  this->VisualizeIndependentPfo(*pPfoList);
77  }
78  }
79 #endif // MONITORING
80  return STATUS_CODE_SUCCESS;
81 }
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
bool m_showPfoMatchedMC
Whether or not to display the best matched MC particle for a PFO.
bool m_showPfoByPid
Whether or not to colour PFOs by particle id.
bool m_groupMCByPdg
Whether or not to group MC particles by particle id.
std::string m_caloHitListName
Name of input calo hit list.
bool m_visualizeMC
Whether or not to visualize MC particles.

Member Data Documentation

std::string lar_content::VisualParticleMonitoringAlgorithm::m_caloHitListName
private

Name of input calo hit list.

Definition at line 93 of file VisualParticleMonitoringAlgorithm.h.

float lar_content::VisualParticleMonitoringAlgorithm::m_energyScaleThresholdE
private

Cell energy for which color is at top end of continous color palette.

Definition at line 102 of file VisualParticleMonitoringAlgorithm.h.

bool lar_content::VisualParticleMonitoringAlgorithm::m_groupMCByPdg
private

Whether or not to group MC particles by particle id.

Definition at line 97 of file VisualParticleMonitoringAlgorithm.h.

bool lar_content::VisualParticleMonitoringAlgorithm::m_isTestBeam
private

Whether or not this is a test beam experiment.

Definition at line 100 of file VisualParticleMonitoringAlgorithm.h.

std::string lar_content::VisualParticleMonitoringAlgorithm::m_pfoListName
private

Name of input PFO list.

Definition at line 94 of file VisualParticleMonitoringAlgorithm.h.

float lar_content::VisualParticleMonitoringAlgorithm::m_scalingFactor
private

TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too)

Definition at line 103 of file VisualParticleMonitoringAlgorithm.h.

bool lar_content::VisualParticleMonitoringAlgorithm::m_showPfoByPid
private

Whether or not to colour PFOs by particle id.

Definition at line 98 of file VisualParticleMonitoringAlgorithm.h.

bool lar_content::VisualParticleMonitoringAlgorithm::m_showPfoMatchedMC
private

Whether or not to display the best matched MC particle for a PFO.

Definition at line 99 of file VisualParticleMonitoringAlgorithm.h.

float lar_content::VisualParticleMonitoringAlgorithm::m_transparencyThresholdE
private

Cell energy for which transparency is saturated (0%, fully opaque)

Definition at line 101 of file VisualParticleMonitoringAlgorithm.h.

bool lar_content::VisualParticleMonitoringAlgorithm::m_visualizeMC
private

Whether or not to visualize MC particles.

Definition at line 95 of file VisualParticleMonitoringAlgorithm.h.

bool lar_content::VisualParticleMonitoringAlgorithm::m_visualizePfo
private

Whether or not to visualize PFOs.

Definition at line 96 of file VisualParticleMonitoringAlgorithm.h.


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