Public Member Functions | Private Attributes | List of all members
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 338 of file NeutrinoHierarchyAlgorithm.cc.

338  :
339  m_pThisPfo(pPfo),
340  m_pCluster3D(nullptr),
341  m_pVertex3D(nullptr),
342  m_pSlidingFitResult3D(nullptr),
345  m_pParentPfo(nullptr)
346 {
347  ClusterList clusterList3D;
348  LArPfoHelper::GetThreeDClusterList(pPfo, clusterList3D);
349 
350  if (1 != clusterList3D.size())
351  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
352 
353  m_pCluster3D = *(clusterList3D.begin());
354  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, halfWindowLayers, layerPitch);
355 
357  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
358 }
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 362 of file NeutrinoHierarchyAlgorithm.cc.

362  :
363  m_pThisPfo(rhs.m_pThisPfo),
364  m_pCluster3D(rhs.m_pCluster3D),
365  m_pVertex3D(rhs.m_pVertex3D),
366  m_pSlidingFitResult3D(nullptr),
367  m_isNeutrinoVertexAssociated(rhs.m_isNeutrinoVertexAssociated),
368  m_isInnerLayerAssociated(rhs.m_isInnerLayerAssociated),
369  m_pParentPfo(rhs.m_pParentPfo),
370  m_daughterPfoList(rhs.m_daughterPfoList)
371 {
372  if (!rhs.m_pSlidingFitResult3D)
373  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
374 
375  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerFitHalfWindow(),
376  rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerPitch());
377 }
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 406 of file NeutrinoHierarchyAlgorithm.cc.

407 {
408  delete m_pSlidingFitResult3D;
409 }
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 444 of file NeutrinoHierarchyAlgorithm.cc.

445 {
446  if (m_daughterPfoList.end() != std::find(m_daughterPfoList.begin(), m_daughterPfoList.end(), pDaughterPfo))
447  throw StatusCodeException(STATUS_CODE_ALREADY_PRESENT);
448 
449  m_daughterPfoList.push_back(pDaughterPfo);
450 }
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.

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.

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.

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.

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.

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.

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.

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 381 of file NeutrinoHierarchyAlgorithm.cc.

382 {
383  if (this != &rhs)
384  {
385  if (!rhs.m_pSlidingFitResult3D)
386  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
387 
388  m_pThisPfo = rhs.m_pThisPfo;
389  m_pCluster3D = rhs.m_pCluster3D;
390  m_pVertex3D = rhs.m_pVertex3D;
391  m_isNeutrinoVertexAssociated = rhs.m_isNeutrinoVertexAssociated;
392  m_isInnerLayerAssociated = rhs.m_isInnerLayerAssociated;
393  m_pParentPfo = rhs.m_pParentPfo;
394  m_daughterPfoList = rhs.m_daughterPfoList;
395 
396  delete m_pSlidingFitResult3D;
397  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerFitHalfWindow(),
398  rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerPitch());
399  }
400 
401  return *this;
402 }
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 454 of file NeutrinoHierarchyAlgorithm.cc.

455 {
456  PfoList::iterator eraseIter = std::find(m_daughterPfoList.begin(), m_daughterPfoList.end(), pDaughterPfo);
457 
458  if (m_daughterPfoList.end() == eraseIter)
459  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
460 
461  m_daughterPfoList.erase(eraseIter);
462 }
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 437 of file NeutrinoHierarchyAlgorithm.cc.

438 {
439  m_pParentPfo = nullptr;
440 }
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 420 of file NeutrinoHierarchyAlgorithm.cc.

421 {
422  m_isInnerLayerAssociated = isInnerLayerAssociated;
423 }
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 413 of file NeutrinoHierarchyAlgorithm.cc.

414 {
415  m_isNeutrinoVertexAssociated = isNeutrinoVertexAssociated;
416 }
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 427 of file NeutrinoHierarchyAlgorithm.cc.

428 {
429  if (m_pParentPfo)
430  throw StatusCodeException(STATUS_CODE_ALREADY_PRESENT);
431 
432  m_pParentPfo = pParentPfo;
433 }
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.

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.

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.

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.

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

The address of the parent pfo.

Definition at line 166 of file NeutrinoHierarchyAlgorithm.h.

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

The three dimensional sliding fit result.

Definition at line 162 of file NeutrinoHierarchyAlgorithm.h.

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

The address of the pfo.

Definition at line 159 of file NeutrinoHierarchyAlgorithm.h.

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.


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