Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
NeutrinoHierarchyAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_NEUTRINO_HIERARCHY_ALGORITHM_H
9#define LAR_NEUTRINO_HIERARCHY_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
14
15#include <unordered_map>
16
17namespace lar_content
18{
19
20class PfoRelationTool;
21
22//------------------------------------------------------------------------------------------------------------------------------------------
23
28{
29public:
34
38 class PfoInfo
39 {
40 public:
48 PfoInfo(const pandora::ParticleFlowObject *const pPfo, const unsigned int halfWindowLayers, const float layerPitch);
49
55 PfoInfo(const PfoInfo &rhs);
56
62 PfoInfo &operator=(const PfoInfo &rhs);
63
67 ~PfoInfo();
68
75
81 const pandora::Cluster *GetCluster3D() const;
82
89
95 bool IsNeutrinoVertexAssociated() const;
96
102 bool IsInnerLayerAssociated() const;
103
110
117
123 void SetNeutrinoVertexAssociation(const bool isNeutrinoVertexAssociated);
124
130 void SetInnerLayerAssociation(const bool isInnerLayerAssociated);
131
137 void SetParentPfo(const pandora::ParticleFlowObject *const pParentPfo);
138
142 void RemoveParentPfo();
143
149 void AddDaughterPfo(const pandora::ParticleFlowObject *const pDaughterPfo);
150
156 void RemoveDaughterPfo(const pandora::ParticleFlowObject *const pDaughterPfo);
157
158 private:
163
168 };
169
170 typedef std::unordered_map<const pandora::ParticleFlowObject *, PfoInfo *> PfoInfoMap;
171
179 void SeparatePfos(const NeutrinoHierarchyAlgorithm::PfoInfoMap &pfoInfoMap, pandora::PfoVector &assignedPfos, pandora::PfoVector &unassignedPfos) const;
180
181private:
183
189 void GetNeutrinoPfo(const pandora::ParticleFlowObject *&pNeutrinoPfo) const;
190
196 void GetCandidateDaughterPfoList(pandora::PfoList &candidateDaughterPfoList) const;
197
204 void GetInitialPfoInfoMap(const pandora::PfoList &pfoList, PfoInfoMap &pfoInfoMap) const;
205
214 void ProcessPfoInfoMap(const pandora::ParticleFlowObject *const pNeutrinoPfo, const pandora::PfoList &candidateDaughterPfoList,
215 PfoInfoMap &pfoInfoMap, const unsigned int callDepth = 0) const;
216
224 void AdjustVertexAndPfoInfo(const pandora::ParticleFlowObject *const pNeutrinoPfo, const pandora::PfoList &candidateDaughterPfoList,
225 PfoInfoMap &pfoInfoMap) const;
226
233 void DisplayPfoInfoMap(const pandora::ParticleFlowObject *const pNeutrinoPfo, const PfoInfoMap &pfoInfoMap) const;
234
236
237 typedef std::vector<PfoRelationTool *> PfoRelationToolVector;
239
242
244
245 unsigned int m_halfWindowLayers;
247};
248
249//------------------------------------------------------------------------------------------------------------------------------------------
250
255{
256public:
264 virtual void Run(const NeutrinoHierarchyAlgorithm *const pAlgorithm, const pandora::Vertex *const pNeutrinoVertex,
266};
267
268//------------------------------------------------------------------------------------------------------------------------------------------
269
274
275//------------------------------------------------------------------------------------------------------------------------------------------
276
278{
279 return m_pCluster3D;
280}
281
282//------------------------------------------------------------------------------------------------------------------------------------------
283
285{
286 return m_pSlidingFitResult3D;
287}
288
289//------------------------------------------------------------------------------------------------------------------------------------------
290
292{
293 return m_isNeutrinoVertexAssociated;
294}
295
296//------------------------------------------------------------------------------------------------------------------------------------------
297
299{
300 return m_isInnerLayerAssociated;
301}
302
303//------------------------------------------------------------------------------------------------------------------------------------------
304
306{
307 return m_pParentPfo;
308}
309
310//------------------------------------------------------------------------------------------------------------------------------------------
311
313{
314 return m_daughterPfoList;
315}
316
317} // namespace lar_content
318
319#endif // #ifndef LAR_NEUTRINO_HIERARCHY_ALGORITHM_H
Header file for the algorithm class.
Header file for the lar three dimensional sliding fit result class.
bool IsNeutrinoVertexAssociated() const
Whether the pfo is associated with the neutrino vertex.
const pandora::ParticleFlowObject * m_pThisPfo
The address of the pfo.
const pandora::Vertex * m_pVertex3D
The address of the three dimensional vertex.
void SetNeutrinoVertexAssociation(const bool isNeutrinoVertexAssociated)
Set the neutrino vertex association flag.
pandora::PfoList m_daughterPfoList
The daughter pfo list.
ThreeDSlidingFitResult * m_pSlidingFitResult3D
The three dimensional sliding fit result.
const pandora::ParticleFlowObject * GetThisPfo() const
Get the address of the pfo.
const pandora::PfoList & GetDaughterPfoList() const
Get the daughter pfo list.
const pandora::ParticleFlowObject * m_pParentPfo
The address of the parent pfo.
const pandora::Cluster * m_pCluster3D
The address of the three dimensional cluster.
bool IsInnerLayerAssociated() const
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer.
const pandora::Cluster * GetCluster3D() const
Get the address of the three dimensional cluster.
void RemoveDaughterPfo(const pandora::ParticleFlowObject *const pDaughterPfo)
Remove a daughter pfo.
PfoInfo & operator=(const PfoInfo &rhs)
Assignment operator.
bool m_isNeutrinoVertexAssociated
Whether the pfo is associated with the neutrino vertex.
const pandora::ParticleFlowObject * GetParentPfo() const
Get the address of the parent pfo.
void AddDaughterPfo(const pandora::ParticleFlowObject *const pDaughterPfo)
Add a daughter pfo.
bool m_isInnerLayerAssociated
If associated, whether association to parent (vtx or pfo) is at sliding fit inner layer.
void SetParentPfo(const pandora::ParticleFlowObject *const pParentPfo)
Set the parent pfo.
void SetInnerLayerAssociation(const bool isInnerLayerAssociated)
Set the inner layer association flag.
const ThreeDSlidingFitResult * GetSlidingFitResult3D() const
Get the address of the three dimensional sliding fit result.
void SeparatePfos(const NeutrinoHierarchyAlgorithm::PfoInfoMap &pfoInfoMap, pandora::PfoVector &assignedPfos, pandora::PfoVector &unassignedPfos) const
Query the pfo info map and separate/extract pfos currently either acting as parents or associated wit...
std::vector< PfoRelationTool * > PfoRelationToolVector
unsigned int m_halfWindowLayers
The number of layers to use for half-window of sliding fit.
void GetCandidateDaughterPfoList(pandora::PfoList &candidateDaughterPfoList) const
Get the list of candidate daughter pfos.
void GetInitialPfoInfoMap(const pandora::PfoList &pfoList, PfoInfoMap &pfoInfoMap) const
Process a provided pfo list and populate an initial pfo info map.
std::string m_neutrinoVertexListName
The neutrino vertex list name - if not specified will assume current list.
std::unordered_map< const pandora::ParticleFlowObject *, PfoInfo * > PfoInfoMap
void AdjustVertexAndPfoInfo(const pandora::ParticleFlowObject *const pNeutrinoPfo, const pandora::PfoList &candidateDaughterPfoList, PfoInfoMap &pfoInfoMap) const
Adjust neutrino vertex to ensure agreement with at least one pfo (first in sorted input list)
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
std::string m_neutrinoPfoListName
The neutrino pfo list name.
void ProcessPfoInfoMap(const pandora::ParticleFlowObject *const pNeutrinoPfo, const pandora::PfoList &candidateDaughterPfoList, PfoInfoMap &pfoInfoMap, const unsigned int callDepth=0) const
Process the information in a pfo info map, creating pfo parent/daughter links.
void GetNeutrinoPfo(const pandora::ParticleFlowObject *&pNeutrinoPfo) const
Get the address of the input neutrino pfo - enforces only one pfo present in input list; can return N...
pandora::StringVector m_daughterPfoListNames
The list of daughter pfo list names.
void DisplayPfoInfoMap(const pandora::ParticleFlowObject *const pNeutrinoPfo, const PfoInfoMap &pfoInfoMap) const
Display the information in a pfo info map, visualising pfo parent/daughter links.
pandora::StatusCode Run()
Run the algorithm.
bool m_displayPfoInfoMap
Whether to display the pfo info map (if monitoring is enabled)
PfoRelationToolVector m_algorithmToolVector
The algorithm tool vector.
virtual void Run(const NeutrinoHierarchyAlgorithm *const pAlgorithm, const pandora::Vertex *const pNeutrinoVertex, NeutrinoHierarchyAlgorithm::PfoInfoMap &pfoInfoMap)=0
Run the algorithm tool.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
AlgorithmTool class. Algorithm tools will tend to be tailored for specific parent algorithms,...
Cluster class.
Definition Cluster.h:31
ParticleFlowObject class.
Vertex class.
Definition Vertex.h:26
std::vector< const ParticleFlowObject * > PfoVector
std::vector< std::string > StringVector
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList