LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 40 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 721 of file DeltaRayMatchingAlgorithm.cc.

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

722  :
723  m_pClusterU(NULL),
724  m_pClusterV(NULL),
725  m_pClusterW(NULL),
726  m_pParentPfo(NULL)
727 {
728  const HitType hitType1(NULL != pCluster1 ? LArClusterHelper::GetClusterHitType(pCluster1) : HIT_CUSTOM);
729  const HitType hitType2(NULL != pCluster2 ? LArClusterHelper::GetClusterHitType(pCluster2) : HIT_CUSTOM);
730  const HitType hitType3(NULL != pCluster3 ? LArClusterHelper::GetClusterHitType(pCluster3) : HIT_CUSTOM);
731 
732  m_pClusterU = ((TPC_VIEW_U == hitType1) ? pCluster1 : (TPC_VIEW_U == hitType2) ? pCluster2 : (TPC_VIEW_U == hitType3) ? pCluster3 : NULL);
733  m_pClusterV = ((TPC_VIEW_V == hitType1) ? pCluster1 : (TPC_VIEW_V == hitType2) ? pCluster2 : (TPC_VIEW_V == hitType3) ? pCluster3 : NULL);
734  m_pClusterW = ((TPC_VIEW_W == hitType1) ? pCluster1 : (TPC_VIEW_W == hitType2) ? pCluster2 : (TPC_VIEW_W == hitType3) ? pCluster3 : NULL);
735  m_pParentPfo = pPfo;
736 
737  if (NULL == m_pClusterU && NULL == m_pClusterV && NULL == m_pClusterW)
738  throw StatusCodeException(STATUS_CODE_FAILURE);
739 }
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.
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 318 of file DeltaRayMatchingAlgorithm.h.

References m_pClusterU.

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

319 {
320  return m_pClusterU;
321 }
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 324 of file DeltaRayMatchingAlgorithm.h.

References m_pClusterV.

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

325 {
326  return m_pClusterV;
327 }
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 330 of file DeltaRayMatchingAlgorithm.h.

References m_pClusterW.

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

331 {
332  return m_pClusterW;
333 }
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 761 of file DeltaRayMatchingAlgorithm.cc.

References m_pClusterU, m_pClusterV, and m_pClusterW.

762 {
763  unsigned int numCaloHits(0);
764 
765  if (NULL != m_pClusterU)
766  numCaloHits += m_pClusterU->GetNCaloHits();
767 
768  if (NULL != m_pClusterV)
769  numCaloHits += m_pClusterV->GetNCaloHits();
770 
771  if (NULL != m_pClusterW)
772  numCaloHits += m_pClusterW->GetNCaloHits();
773 
774  return numCaloHits;
775 }
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 743 of file DeltaRayMatchingAlgorithm.cc.

References m_pClusterU, m_pClusterV, and m_pClusterW.

744 {
745  unsigned int numViews(0);
746 
747  if (NULL != m_pClusterU)
748  numViews += 1;
749 
750  if (NULL != m_pClusterV)
751  numViews += 1;
752 
753  if (NULL != m_pClusterW)
754  numViews += 1;
755 
756  return numViews;
757 }
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 336 of file DeltaRayMatchingAlgorithm.h.

References m_pParentPfo.

337 {
338  return m_pParentPfo;
339 }
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 85 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 86 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 87 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 88 of file DeltaRayMatchingAlgorithm.h.

Referenced by GetParentPfo(), and Particle().


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