LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::DeltaRayMatchingAlgorithm::Particle Class Reference

Particle class. More...

Public Member Functions

 Particle (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3, const pandora::ParticleFlowObject *const pPfo)
 Constructor. More...
 
const pandora::Cluster * GetClusterU () const
 Get cluster in U view. More...
 
const pandora::Cluster * GetClusterV () const
 Get cluster in V view. More...
 
const pandora::Cluster * GetClusterW () const
 Get cluster in W view. More...
 
const pandora::ParticleFlowObject * GetParentPfo () const
 Get parent Pfo. More...
 
unsigned int GetNViews () const
 Get number of views. More...
 
unsigned int GetNCaloHits () const
 Get number of calo hits. More...
 

Private Attributes

const pandora::Cluster * m_pClusterU
 Address of cluster in U view. More...
 
const pandora::Cluster * m_pClusterV
 Address of cluster in V view. More...
 
const pandora::Cluster * m_pClusterW
 Address of cluster in W view. More...
 
const pandora::ParticleFlowObject * m_pParentPfo
 Address of parent Pfo. More...
 

Detailed Description

Particle class.

Definition at line 42 of file DeltaRayMatchingAlgorithm.h.

Constructor & Destructor Documentation

lar_content::DeltaRayMatchingAlgorithm::Particle::Particle ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
const pandora::Cluster *const  pCluster3,
const pandora::ParticleFlowObject *const  pPfo 
)

Constructor.

Parameters
pCluster1the first cluster
pCluster2the second cluster
pCluster3the third cluster
pPfothe parent Pfo

Definition at line 727 of file DeltaRayMatchingAlgorithm.cc.

References lar_content::LArClusterHelper::GetClusterHitType(), m_pClusterU, m_pClusterV, m_pClusterW, and m_pParentPfo.

728  :
729  m_pClusterU(NULL),
730  m_pClusterV(NULL),
731  m_pClusterW(NULL),
732  m_pParentPfo(NULL)
733 {
734  const HitType hitType1(NULL != pCluster1 ? LArClusterHelper::GetClusterHitType(pCluster1) : HIT_CUSTOM);
735  const HitType hitType2(NULL != pCluster2 ? LArClusterHelper::GetClusterHitType(pCluster2) : HIT_CUSTOM);
736  const HitType hitType3(NULL != pCluster3 ? LArClusterHelper::GetClusterHitType(pCluster3) : HIT_CUSTOM);
737 
738  m_pClusterU = ((TPC_VIEW_U == hitType1) ? pCluster1
739  : (TPC_VIEW_U == hitType2) ? pCluster2
740  : (TPC_VIEW_U == hitType3) ? pCluster3
741  : NULL);
742  m_pClusterV = ((TPC_VIEW_V == hitType1) ? pCluster1
743  : (TPC_VIEW_V == hitType2) ? pCluster2
744  : (TPC_VIEW_V == hitType3) ? pCluster3
745  : NULL);
746  m_pClusterW = ((TPC_VIEW_W == hitType1) ? pCluster1
747  : (TPC_VIEW_W == hitType2) ? pCluster2
748  : (TPC_VIEW_W == hitType3) ? pCluster3
749  : NULL);
750  m_pParentPfo = pPfo;
751 
752  if (NULL == m_pClusterU && NULL == m_pClusterV && NULL == m_pClusterW)
753  throw StatusCodeException(STATUS_CODE_FAILURE);
754 }
static pandora::HitType GetClusterHitType(const pandora::Cluster *const pCluster)
Get the hit type associated with a two dimensional cluster.
const pandora::Cluster * m_pClusterU
Address of cluster in U view.
const pandora::ParticleFlowObject * m_pParentPfo
Address of parent Pfo.
HitType
Definition: HitType.h:12
const pandora::Cluster * m_pClusterV
Address of cluster in V view.
const pandora::Cluster * m_pClusterW
Address of cluster in W view.

Member Function Documentation

const pandora::Cluster * lar_content::DeltaRayMatchingAlgorithm::Particle::GetClusterU ( ) const
inline

Get cluster in U view.

Definition at line 320 of file DeltaRayMatchingAlgorithm.h.

References m_pClusterU.

Referenced by lar_content::DeltaRayMatchingAlgorithm::GetLength().

321 {
322  return m_pClusterU;
323 }
const pandora::Cluster * m_pClusterU
Address of cluster in U view.
const pandora::Cluster * lar_content::DeltaRayMatchingAlgorithm::Particle::GetClusterV ( ) const
inline

Get cluster in V view.

Definition at line 326 of file DeltaRayMatchingAlgorithm.h.

References m_pClusterV.

Referenced by lar_content::DeltaRayMatchingAlgorithm::GetLength().

327 {
328  return m_pClusterV;
329 }
const pandora::Cluster * m_pClusterV
Address of cluster in V view.
const pandora::Cluster * lar_content::DeltaRayMatchingAlgorithm::Particle::GetClusterW ( ) const
inline

Get cluster in W view.

Definition at line 332 of file DeltaRayMatchingAlgorithm.h.

References m_pClusterW.

Referenced by lar_content::DeltaRayMatchingAlgorithm::GetLength().

333 {
334  return m_pClusterW;
335 }
const pandora::Cluster * m_pClusterW
Address of cluster in W view.
unsigned int lar_content::DeltaRayMatchingAlgorithm::Particle::GetNCaloHits ( ) const

Get number of calo hits.

Definition at line 776 of file DeltaRayMatchingAlgorithm.cc.

References m_pClusterU, m_pClusterV, and m_pClusterW.

777 {
778  unsigned int numCaloHits(0);
779 
780  if (NULL != m_pClusterU)
781  numCaloHits += m_pClusterU->GetNCaloHits();
782 
783  if (NULL != m_pClusterV)
784  numCaloHits += m_pClusterV->GetNCaloHits();
785 
786  if (NULL != m_pClusterW)
787  numCaloHits += m_pClusterW->GetNCaloHits();
788 
789  return numCaloHits;
790 }
const pandora::Cluster * m_pClusterU
Address of cluster in U view.
const pandora::Cluster * m_pClusterV
Address of cluster in V view.
const pandora::Cluster * m_pClusterW
Address of cluster in W view.
unsigned int lar_content::DeltaRayMatchingAlgorithm::Particle::GetNViews ( ) const

Get number of views.

Definition at line 758 of file DeltaRayMatchingAlgorithm.cc.

References m_pClusterU, m_pClusterV, and m_pClusterW.

759 {
760  unsigned int numViews(0);
761 
762  if (NULL != m_pClusterU)
763  numViews += 1;
764 
765  if (NULL != m_pClusterV)
766  numViews += 1;
767 
768  if (NULL != m_pClusterW)
769  numViews += 1;
770 
771  return numViews;
772 }
const pandora::Cluster * m_pClusterU
Address of cluster in U view.
const pandora::Cluster * m_pClusterV
Address of cluster in V view.
const pandora::Cluster * m_pClusterW
Address of cluster in W view.
const pandora::ParticleFlowObject * lar_content::DeltaRayMatchingAlgorithm::Particle::GetParentPfo ( ) const
inline

Get parent Pfo.

Definition at line 338 of file DeltaRayMatchingAlgorithm.h.

References m_pParentPfo.

339 {
340  return m_pParentPfo;
341 }
const pandora::ParticleFlowObject * m_pParentPfo
Address of parent Pfo.

Member Data Documentation

const pandora::Cluster* lar_content::DeltaRayMatchingAlgorithm::Particle::m_pClusterU
private

Address of cluster in U view.

Definition at line 87 of file DeltaRayMatchingAlgorithm.h.

Referenced by GetClusterU(), GetNCaloHits(), GetNViews(), and Particle().

const pandora::Cluster* lar_content::DeltaRayMatchingAlgorithm::Particle::m_pClusterV
private

Address of cluster in V view.

Definition at line 88 of file DeltaRayMatchingAlgorithm.h.

Referenced by GetClusterV(), GetNCaloHits(), GetNViews(), and Particle().

const pandora::Cluster* lar_content::DeltaRayMatchingAlgorithm::Particle::m_pClusterW
private

Address of cluster in W view.

Definition at line 89 of file DeltaRayMatchingAlgorithm.h.

Referenced by GetClusterW(), GetNCaloHits(), GetNViews(), and Particle().

const pandora::ParticleFlowObject* lar_content::DeltaRayMatchingAlgorithm::Particle::m_pParentPfo
private

Address of parent Pfo.

Definition at line 90 of file DeltaRayMatchingAlgorithm.h.

Referenced by GetParentPfo(), and Particle().


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