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

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

271  :
272  m_pThisPfo(pPfo),
273  m_pCluster3D(nullptr),
274  m_pVertex3D(nullptr),
275  m_pSlidingFitResult3D(nullptr),
278  m_pParentPfo(nullptr)
279 {
280  ClusterList clusterList3D;
281  LArPfoHelper::GetThreeDClusterList(pPfo, clusterList3D);
282 
283  if (1 != clusterList3D.size())
284  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
285 
286  m_pCluster3D = *(clusterList3D.begin());
287  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, halfWindowLayers, layerPitch);
288 
290  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
291 }
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 295 of file NeutrinoHierarchyAlgorithm.cc.

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

295  :
296  m_pThisPfo(rhs.m_pThisPfo),
297  m_pCluster3D(rhs.m_pCluster3D),
298  m_pVertex3D(rhs.m_pVertex3D),
299  m_pSlidingFitResult3D(nullptr),
300  m_isNeutrinoVertexAssociated(rhs.m_isNeutrinoVertexAssociated),
301  m_isInnerLayerAssociated(rhs.m_isInnerLayerAssociated),
302  m_pParentPfo(rhs.m_pParentPfo),
303  m_daughterPfoList(rhs.m_daughterPfoList)
304 {
305  if (!rhs.m_pSlidingFitResult3D)
306  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
307 
308  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerFitHalfWindow(),
309  rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerPitch());
310 }
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 339 of file NeutrinoHierarchyAlgorithm.cc.

References m_pSlidingFitResult3D.

340 {
341  delete m_pSlidingFitResult3D;
342 }
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 377 of file NeutrinoHierarchyAlgorithm.cc.

References m_daughterPfoList.

378 {
379  if (m_daughterPfoList.end() != std::find(m_daughterPfoList.begin(), m_daughterPfoList.end(), pDaughterPfo))
380  throw StatusCodeException(STATUS_CODE_ALREADY_PRESENT);
381 
382  m_daughterPfoList.push_back(pDaughterPfo);
383 }
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 263 of file NeutrinoHierarchyAlgorithm.h.

References m_pCluster3D.

264 {
265  return m_pCluster3D;
266 }
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 298 of file NeutrinoHierarchyAlgorithm.h.

References m_daughterPfoList.

299 {
300  return m_daughterPfoList;
301 }
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 291 of file NeutrinoHierarchyAlgorithm.h.

References m_pParentPfo.

292 {
293  return m_pParentPfo;
294 }
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 270 of file NeutrinoHierarchyAlgorithm.h.

References m_pSlidingFitResult3D.

271 {
272  return m_pSlidingFitResult3D;
273 }
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 256 of file NeutrinoHierarchyAlgorithm.h.

References m_pThisPfo.

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

257 {
258  return m_pThisPfo;
259 }
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 284 of file NeutrinoHierarchyAlgorithm.h.

References m_isInnerLayerAssociated.

285 {
287 }
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 277 of file NeutrinoHierarchyAlgorithm.h.

References m_isNeutrinoVertexAssociated.

278 {
280 }
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 314 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.

315 {
316  if (this != &rhs)
317  {
318  if (!rhs.m_pSlidingFitResult3D)
319  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
320 
321  m_pThisPfo = rhs.m_pThisPfo;
322  m_pCluster3D = rhs.m_pCluster3D;
323  m_pVertex3D = rhs.m_pVertex3D;
324  m_isNeutrinoVertexAssociated = rhs.m_isNeutrinoVertexAssociated;
325  m_isInnerLayerAssociated = rhs.m_isInnerLayerAssociated;
326  m_pParentPfo = rhs.m_pParentPfo;
327  m_daughterPfoList = rhs.m_daughterPfoList;
328 
329  delete m_pSlidingFitResult3D;
330  m_pSlidingFitResult3D = new ThreeDSlidingFitResult(m_pCluster3D, rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerFitHalfWindow(),
331  rhs.m_pSlidingFitResult3D->GetFirstFitResult().GetLayerPitch());
332  }
333 
334  return *this;
335 }
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 387 of file NeutrinoHierarchyAlgorithm.cc.

References m_daughterPfoList.

388 {
389  PfoList::iterator eraseIter = std::find(m_daughterPfoList.begin(), m_daughterPfoList.end(), pDaughterPfo);
390 
391  if (m_daughterPfoList.end() == eraseIter)
392  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
393 
394  m_daughterPfoList.erase(eraseIter);
395 }
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 370 of file NeutrinoHierarchyAlgorithm.cc.

References m_pParentPfo.

371 {
372  m_pParentPfo = nullptr;
373 }
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 353 of file NeutrinoHierarchyAlgorithm.cc.

References m_isInnerLayerAssociated.

354 {
355  m_isInnerLayerAssociated = isInnerLayerAssociated;
356 }
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 346 of file NeutrinoHierarchyAlgorithm.cc.

References m_isNeutrinoVertexAssociated.

347 {
348  m_isNeutrinoVertexAssociated = isNeutrinoVertexAssociated;
349 }
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 360 of file NeutrinoHierarchyAlgorithm.cc.

References m_pParentPfo.

361 {
362  if (m_pParentPfo)
363  throw StatusCodeException(STATUS_CODE_ALREADY_PRESENT);
364 
365  m_pParentPfo = pParentPfo;
366 }
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: