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

PfoInfo class. More...

#include "NeutrinoHierarchyAlgorithm.h"

Public Member Functions

 PfoInfo (const pandora::ParticleFlowObject *const pPfo, const unsigned int halfWindowLayers, const float layerPitch)
 Constructor. More...
 
 PfoInfo (const PfoInfo &rhs)
 Copy constructor. More...
 
PfoInfooperator= (const PfoInfo &rhs)
 Assignment operator. More...
 
 ~PfoInfo ()
 Destructor. More...
 
const pandora::ParticleFlowObject * GetThisPfo () const
 Get the address of the pfo. More...
 
const pandora::Cluster * GetCluster3D () const
 Get the address of the three dimensional cluster. More...
 
const ThreeDSlidingFitResultGetSlidingFitResult3D () const
 Get the address of the three dimensional sliding fit result. More...
 
bool IsNeutrinoVertexAssociated () const
 Whether the pfo is associated with the neutrino vertex. More...
 
bool IsInnerLayerAssociated () const
 If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer. More...
 
const pandora::ParticleFlowObject * GetParentPfo () const
 Get the address of the parent pfo. More...
 
const pandora::PfoList & GetDaughterPfoList () const
 Get the daughter pfo list. More...
 
void SetNeutrinoVertexAssociation (const bool isNeutrinoVertexAssociated)
 Set the neutrino vertex association flag. More...
 
void SetInnerLayerAssociation (const bool isInnerLayerAssociated)
 Set the inner layer association flag. More...
 
void SetParentPfo (const pandora::ParticleFlowObject *const pParentPfo)
 Set the parent pfo. More...
 
void RemoveParentPfo ()
 Remove the parent pfo. More...
 
void AddDaughterPfo (const pandora::ParticleFlowObject *const pDaughterPfo)
 Add a daughter pfo. More...
 
void RemoveDaughterPfo (const pandora::ParticleFlowObject *const pDaughterPfo)
 Remove a daughter pfo. More...
 

Private Attributes

const pandora::ParticleFlowObject * m_pThisPfo
 The address of the pfo. More...
 
const pandora::Cluster * m_pCluster3D
 The address of the three dimensional cluster. More...
 
const pandora::Vertex * m_pVertex3D
 The address of the three dimensional vertex. More...
 
ThreeDSlidingFitResultm_pSlidingFitResult3D
 The three dimensional sliding fit result. More...
 
bool m_isNeutrinoVertexAssociated
 Whether the pfo is associated with the neutrino vertex. More...
 
bool m_isInnerLayerAssociated
 If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer. More...
 
const pandora::ParticleFlowObject * m_pParentPfo
 The address of the parent pfo. More...
 
pandora::PfoList m_daughterPfoList
 The daughter pfo list. More...
 

Detailed Description

PfoInfo class.

Definition at line 38 of file NeutrinoHierarchyAlgorithm.h.

Constructor & Destructor Documentation

lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::PfoInfo ( const pandora::ParticleFlowObject *const  pPfo,
const unsigned int  halfWindowLayers,
const float  layerPitch 
)

Constructor.

Parameters
pPfothe address of the pfo
halfWindowLayersthe number of layers to use for half-window of sliding fit
layerPitchthe sliding fit z pitch, units cm

Definition at line 344 of file NeutrinoHierarchyAlgorithm.cc.

References lar_content::ThreeDSlidingFitResult::GetMaxLayer(), lar_content::ThreeDSlidingFitResult::GetMinLayer(), lar_content::LArPfoHelper::GetThreeDClusterList(), m_pCluster3D, and m_pSlidingFitResult3D.

344  :
345  m_pThisPfo(pPfo),
346  m_pCluster3D(nullptr),
347  m_pVertex3D(nullptr),
348  m_pSlidingFitResult3D(nullptr),
351  m_pParentPfo(nullptr)
352 {
353  ClusterList clusterList3D;
354  LArPfoHelper::GetThreeDClusterList(pPfo, clusterList3D);
355 
356  if (1 != clusterList3D.size())
357  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
358 
359  m_pCluster3D = *(clusterList3D.begin());
360  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, halfWindowLayers, layerPitch);
361 
363  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
364 }
const pandora::Cluster * m_pCluster3D
The address of the three dimensional cluster.
bool m_isNeutrinoVertexAssociated
Whether the pfo is associated with the neutrino vertex.
const pandora::ParticleFlowObject * m_pThisPfo
The address of the pfo.
int GetMaxLayer() const
Get the maximum occupied layer in the sliding fit.
bool m_isInnerLayerAssociated
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer...
ThreeDSlidingFitResult * m_pSlidingFitResult3D
The three dimensional sliding fit result.
int GetMinLayer() const
Get the minimum occupied layer in the sliding fit.
static void GetThreeDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 3D clusters from an input pfo.
const pandora::Vertex * m_pVertex3D
The address of the three dimensional vertex.
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.
lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::PfoInfo ( const PfoInfo rhs)

Copy constructor.

Parameters
rhsthe pfo info to copy

Definition at line 368 of file NeutrinoHierarchyAlgorithm.cc.

References lar_content::ThreeDSlidingFitResult::GetFirstFitResult(), lar_content::TwoDSlidingFitResult::GetLayerFitHalfWindow(), lar_content::TwoDSlidingFitResult::GetLayerPitch(), m_pCluster3D, and m_pSlidingFitResult3D.

368  :
369  m_pThisPfo(rhs.m_pThisPfo),
370  m_pCluster3D(rhs.m_pCluster3D),
371  m_pVertex3D(rhs.m_pVertex3D),
372  m_pSlidingFitResult3D(nullptr),
373  m_isNeutrinoVertexAssociated(rhs.m_isNeutrinoVertexAssociated),
374  m_isInnerLayerAssociated(rhs.m_isInnerLayerAssociated),
375  m_pParentPfo(rhs.m_pParentPfo),
376  m_daughterPfoList(rhs.m_daughterPfoList)
377 {
378  if (!rhs.m_pSlidingFitResult3D)
379  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
380 
381  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerFitHalfWindow(),
382  rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerPitch());
383 }
const pandora::Cluster * m_pCluster3D
The address of the three dimensional cluster.
bool m_isNeutrinoVertexAssociated
Whether the pfo is associated with the neutrino vertex.
const pandora::ParticleFlowObject * m_pThisPfo
The address of the pfo.
bool m_isInnerLayerAssociated
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer...
ThreeDSlidingFitResult * m_pSlidingFitResult3D
The three dimensional sliding fit result.
pandora::PfoList m_daughterPfoList
The daughter pfo list.
const pandora::Vertex * m_pVertex3D
The address of the three dimensional vertex.
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.
lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::~PfoInfo ( )

Destructor.

Definition at line 412 of file NeutrinoHierarchyAlgorithm.cc.

References m_pSlidingFitResult3D.

413 {
414  delete m_pSlidingFitResult3D;
415 }
ThreeDSlidingFitResult * m_pSlidingFitResult3D
The three dimensional sliding fit result.

Member Function Documentation

void lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::AddDaughterPfo ( const pandora::ParticleFlowObject *const  pDaughterPfo)

Add a daughter pfo.

Parameters
pDaughterPfothe address of the daughter pfo to add

Definition at line 450 of file NeutrinoHierarchyAlgorithm.cc.

References m_daughterPfoList.

451 {
452  if (m_daughterPfoList.end() != std::find(m_daughterPfoList.begin(), m_daughterPfoList.end(), pDaughterPfo))
453  throw StatusCodeException(STATUS_CODE_ALREADY_PRESENT);
454 
455  m_daughterPfoList.push_back(pDaughterPfo);
456 }
pandora::PfoList m_daughterPfoList
The daughter pfo list.
const pandora::Cluster * lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::GetCluster3D ( ) const
inline

Get the address of the three dimensional cluster.

Returns
the address of the three dimensional cluster

Definition at line 277 of file NeutrinoHierarchyAlgorithm.h.

References m_pCluster3D.

278 {
279  return m_pCluster3D;
280 }
const pandora::Cluster * m_pCluster3D
The address of the three dimensional cluster.
const pandora::PfoList & lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::GetDaughterPfoList ( ) const
inline

Get the daughter pfo list.

Returns
the daughter pfo list

Definition at line 312 of file NeutrinoHierarchyAlgorithm.h.

References m_daughterPfoList.

313 {
314  return m_daughterPfoList;
315 }
pandora::PfoList m_daughterPfoList
The daughter pfo list.
const pandora::ParticleFlowObject * lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::GetParentPfo ( ) const
inline

Get the address of the parent pfo.

Returns
the address of the parent pfo

Definition at line 305 of file NeutrinoHierarchyAlgorithm.h.

References m_pParentPfo.

306 {
307  return m_pParentPfo;
308 }
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.
const ThreeDSlidingFitResult * lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::GetSlidingFitResult3D ( ) const
inline

Get the address of the three dimensional sliding fit result.

Returns
the address of the three dimensional sliding fit result

Definition at line 284 of file NeutrinoHierarchyAlgorithm.h.

References m_pSlidingFitResult3D.

285 {
286  return m_pSlidingFitResult3D;
287 }
ThreeDSlidingFitResult * m_pSlidingFitResult3D
The three dimensional sliding fit result.
const pandora::ParticleFlowObject * lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::GetThisPfo ( ) const
inline

Get the address of the pfo.

Returns
the address of the pfo

Definition at line 270 of file NeutrinoHierarchyAlgorithm.h.

References m_pThisPfo.

Referenced by lar_content::NeutrinoHierarchyAlgorithm::DisplayPfoInfoMap().

271 {
272  return m_pThisPfo;
273 }
const pandora::ParticleFlowObject * m_pThisPfo
The address of the pfo.
bool lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::IsInnerLayerAssociated ( ) const
inline

If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer.

Returns
boolean

Definition at line 298 of file NeutrinoHierarchyAlgorithm.h.

References m_isInnerLayerAssociated.

299 {
301 }
bool m_isInnerLayerAssociated
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer...
bool lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::IsNeutrinoVertexAssociated ( ) const
inline

Whether the pfo is associated with the neutrino vertex.

Returns
boolean

Definition at line 291 of file NeutrinoHierarchyAlgorithm.h.

References m_isNeutrinoVertexAssociated.

292 {
294 }
bool m_isNeutrinoVertexAssociated
Whether the pfo is associated with the neutrino vertex.
NeutrinoHierarchyAlgorithm::PfoInfo & lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::operator= ( const PfoInfo rhs)

Assignment operator.

Parameters
rhsthe pfo info to assign

Definition at line 387 of file NeutrinoHierarchyAlgorithm.cc.

References lar_content::ThreeDSlidingFitResult::GetFirstFitResult(), lar_content::TwoDSlidingFitResult::GetLayerFitHalfWindow(), lar_content::TwoDSlidingFitResult::GetLayerPitch(), m_daughterPfoList, m_isInnerLayerAssociated, m_isNeutrinoVertexAssociated, m_pCluster3D, m_pParentPfo, m_pSlidingFitResult3D, m_pThisPfo, and m_pVertex3D.

388 {
389  if (this != &rhs)
390  {
391  if (!rhs.m_pSlidingFitResult3D)
392  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
393 
394  m_pThisPfo = rhs.m_pThisPfo;
395  m_pCluster3D = rhs.m_pCluster3D;
396  m_pVertex3D = rhs.m_pVertex3D;
397  m_isNeutrinoVertexAssociated = rhs.m_isNeutrinoVertexAssociated;
398  m_isInnerLayerAssociated = rhs.m_isInnerLayerAssociated;
399  m_pParentPfo = rhs.m_pParentPfo;
400  m_daughterPfoList = rhs.m_daughterPfoList;
401 
402  delete m_pSlidingFitResult3D;
403  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerFitHalfWindow(),
404  rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerPitch());
405  }
406 
407  return *this;
408 }
const pandora::Cluster * m_pCluster3D
The address of the three dimensional cluster.
bool m_isNeutrinoVertexAssociated
Whether the pfo is associated with the neutrino vertex.
const pandora::ParticleFlowObject * m_pThisPfo
The address of the pfo.
bool m_isInnerLayerAssociated
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer...
ThreeDSlidingFitResult * m_pSlidingFitResult3D
The three dimensional sliding fit result.
pandora::PfoList m_daughterPfoList
The daughter pfo list.
const pandora::Vertex * m_pVertex3D
The address of the three dimensional vertex.
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.
void lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::RemoveDaughterPfo ( const pandora::ParticleFlowObject *const  pDaughterPfo)

Remove a daughter pfo.

Parameters
pDaughterPfothe address of the daughter pfo to remove

Definition at line 460 of file NeutrinoHierarchyAlgorithm.cc.

References m_daughterPfoList.

461 {
462  PfoList::iterator eraseIter = std::find(m_daughterPfoList.begin(), m_daughterPfoList.end(), pDaughterPfo);
463 
464  if (m_daughterPfoList.end() == eraseIter)
465  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
466 
467  m_daughterPfoList.erase(eraseIter);
468 }
intermediate_table::iterator iterator
pandora::PfoList m_daughterPfoList
The daughter pfo list.
void lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::RemoveParentPfo ( )

Remove the parent pfo.

Definition at line 443 of file NeutrinoHierarchyAlgorithm.cc.

References m_pParentPfo.

444 {
445  m_pParentPfo = nullptr;
446 }
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.
void lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::SetInnerLayerAssociation ( const bool  isInnerLayerAssociated)

Set the inner layer association flag.

Parameters
isInnerLayerAssociatedthe inner layer association flag

Definition at line 426 of file NeutrinoHierarchyAlgorithm.cc.

References m_isInnerLayerAssociated.

427 {
428  m_isInnerLayerAssociated = isInnerLayerAssociated;
429 }
bool m_isInnerLayerAssociated
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer...
void lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::SetNeutrinoVertexAssociation ( const bool  isNeutrinoVertexAssociated)

Set the neutrino vertex association flag.

Parameters
isNeutrinoVertexAssociatedthe neutrino vertex association flag

Definition at line 419 of file NeutrinoHierarchyAlgorithm.cc.

References m_isNeutrinoVertexAssociated.

420 {
421  m_isNeutrinoVertexAssociated = isNeutrinoVertexAssociated;
422 }
bool m_isNeutrinoVertexAssociated
Whether the pfo is associated with the neutrino vertex.
void lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::SetParentPfo ( const pandora::ParticleFlowObject *const  pParentPfo)

Set the parent pfo.

Parameters
pParentPfothe address of the parent pfo

Definition at line 433 of file NeutrinoHierarchyAlgorithm.cc.

References m_pParentPfo.

434 {
435  if (m_pParentPfo)
436  throw StatusCodeException(STATUS_CODE_ALREADY_PRESENT);
437 
438  m_pParentPfo = pParentPfo;
439 }
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.

Member Data Documentation

pandora::PfoList lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_daughterPfoList
private

The daughter pfo list.

Definition at line 167 of file NeutrinoHierarchyAlgorithm.h.

Referenced by AddDaughterPfo(), GetDaughterPfoList(), operator=(), and RemoveDaughterPfo().

bool lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_isInnerLayerAssociated
private

If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer.

Definition at line 165 of file NeutrinoHierarchyAlgorithm.h.

Referenced by IsInnerLayerAssociated(), operator=(), and SetInnerLayerAssociation().

bool lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_isNeutrinoVertexAssociated
private

Whether the pfo is associated with the neutrino vertex.

Definition at line 164 of file NeutrinoHierarchyAlgorithm.h.

Referenced by IsNeutrinoVertexAssociated(), operator=(), and SetNeutrinoVertexAssociation().

const pandora::Cluster* lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_pCluster3D
private

The address of the three dimensional cluster.

Definition at line 160 of file NeutrinoHierarchyAlgorithm.h.

Referenced by GetCluster3D(), operator=(), and PfoInfo().

const pandora::ParticleFlowObject* lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_pParentPfo
private

The address of the parent pfo.

Definition at line 166 of file NeutrinoHierarchyAlgorithm.h.

Referenced by GetParentPfo(), operator=(), RemoveParentPfo(), and SetParentPfo().

ThreeDSlidingFitResult* lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_pSlidingFitResult3D
private

The three dimensional sliding fit result.

Definition at line 162 of file NeutrinoHierarchyAlgorithm.h.

Referenced by GetSlidingFitResult3D(), operator=(), PfoInfo(), and ~PfoInfo().

const pandora::ParticleFlowObject* lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_pThisPfo
private

The address of the pfo.

Definition at line 159 of file NeutrinoHierarchyAlgorithm.h.

Referenced by GetThisPfo(), and operator=().

const pandora::Vertex* lar_content::NeutrinoHierarchyAlgorithm::PfoInfo::m_pVertex3D
private

The address of the three dimensional vertex.

Definition at line 161 of file NeutrinoHierarchyAlgorithm.h.

Referenced by operator=().


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