APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
MipFragmentMergingAlg.h
Go to the documentation of this file.
1 /*
3  *
4  * MipFragmentMergingAlg.h header template automatically generated by a class generator
5  * Creation date : lun. juin 27 2016
6  *
7  * This file is part of APRILContent libraries.
8  *
9  * APRILContent is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  * based upon these libraries are permitted. Any copy of these libraries
14  * must include this copyright notice.
15  *
16  * APRILContent is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with APRILContent. If not, see <http://www.gnu.org/licenses/>.
23  *
24  * @author Remi Ete
25  * @copyright CNRS , IPNL
26  */
27 
28 
29 #ifndef MIPFRAGMENTMERGINGALG_H
30 #define MIPFRAGMENTMERGINGALG_H
31 
32 #include "Pandora/Algorithm.h"
33 #include "Pandora/PandoraInputTypes.h"
34 
35 namespace april_content
36 {
37 
41 class MipFragmentMergingAlg : public pandora::Algorithm
42 {
43 public:
47  class Factory : public pandora::AlgorithmFactory
48  {
49  public:
50  pandora::Algorithm *CreateAlgorithm() const;
51  };
52 
53 private:
54  pandora::StatusCode Run();
55  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
56 
57  typedef std::map<const pandora::Cluster *, const pandora::Cluster *> ClusterToClusterMap;
58 
59 private:
66  pandora::StatusCode FindMipFragments(const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap) const;
67 
71  pandora::StatusCode FindChargedMipFragments(const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap);
72 
80  bool IsMipFragment(const pandora::Cluster *const pCluster) const;
81 
89  bool IsPossibleParent(const pandora::Cluster *const pCluster) const;
90 
98  pandora::StatusCode FindMipParentCluster(const pandora::Cluster *const pMipCluster, const pandora::ClusterVector &clusterVector, const pandora::Cluster *&pParentCluster) const;
99 
105  pandora::StatusCode MergeClusters(ClusterToClusterMap &clusterToClusterMap) const;
106 
114  pandora::StatusCode TidyClusterMap(const pandora::Cluster *const pReplaceCluster, const pandora::Cluster *const pRemoveCluster, ClusterToClusterMap &clusterToClusterMap) const;
115 
116 private:
123  unsigned int m_minParentClusterNHits;
125  unsigned int m_minInnerPseudoLayer;
133  float m_minMipChi2;
134  unsigned int m_nParentFitPseudoLayers;
135  float m_maxCosineDirection;
136  float m_maxCosineDirection2;
137  float m_maxCosineDirection3;
138 };
139 
140 //------------------------------------------------------------------------------------------------------------------------------------------
141 //------------------------------------------------------------------------------------------------------------------------------------------
142 
143 inline pandora::Algorithm *MipFragmentMergingAlg::Factory::CreateAlgorithm() const
144 {
145  return new MipFragmentMergingAlg();
146 }
147 
148 }
149 
150 #endif // MIPFRAGMENTMERGINGALG_H
float m_maxClusterSeparationPseudoLayer2
The max pseudo layer between two clusters.
Definition: MipFragmentMergingAlg.h:129
bool m_discriminatePhotonPid
Whether to discriminate photons.
Definition: MipFragmentMergingAlg.h:117
float m_minParentClusterEnergy
The min parent cluster energy for a potential merging.
Definition: MipFragmentMergingAlg.h:121
float m_maxMipTransverseRatio
The min transverse ratio to consider a mip.
Definition: MipFragmentMergingAlg.h:118
unsigned int m_minInnerPseudoLayer
The min inner pseudo layer id to consider a mip.
Definition: MipFragmentMergingAlg.h:125
pandora::StatusCode FindMipFragments(const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap) const
Find mip cluster fragments and their most probable parent cluster.
Definition: MipFragmentMergingAlg.cc:71
MipFragmentMergingAlg class.
Definition: MipFragmentMergingAlg.h:41
float m_maxClusterSeparationPseudoLayer3
The max pseudo layer between two clusters.
Definition: MipFragmentMergingAlg.h:130
pandora::StatusCode MergeClusters(ClusterToClusterMap &clusterToClusterMap) const
Merge mip clusters into their parent.
Definition: MipFragmentMergingAlg.cc:167
unsigned int m_minDaughterClusterNPseudoLayers
The min number of pseudo layer to consider a mip.
Definition: MipFragmentMergingAlg.h:124
unsigned int m_minParentClusterBackwardNHits
The min number of hits within the ROI to consider a parent cluster.
Definition: MipFragmentMergingAlg.h:131
bool IsPossibleParent(const pandora::Cluster *const pCluster) const
Whether the cluster is a possible parent cluster to merge a mip in.
Definition: MipFragmentMergingAlg.cc:255
unsigned int m_minDaughterClusterNHits
The min number of hits to consider a mip.
Definition: MipFragmentMergingAlg.h:122
pandora::StatusCode FindMipParentCluster(const pandora::Cluster *const pMipCluster, const pandora::ClusterVector &clusterVector, const pandora::Cluster *&pParentCluster) const
Find the best possible parent cluster for the target mip cluster.
Definition: MipFragmentMergingAlg.cc:98
float m_maxNHitsPerLayer
The max number of hits per layer to consider a mip.
Definition: MipFragmentMergingAlg.h:119
bool IsMipFragment(const pandora::Cluster *const pCluster) const
Whether the cluster is a mip fragment.
Definition: MipFragmentMergingAlg.cc:212
float m_minMipNEfficientLayerFraction
The min numer of efficient pseudo layer to consider a mip.
Definition: MipFragmentMergingAlg.h:132
float m_maxMipBackwardDistance
The max backward distance between the parent cluster and the start of mip.
Definition: MipFragmentMergingAlg.h:127
float m_maxClusterSeparationPseudoLayer
The max pseudo layer between two clusters.
Definition: MipFragmentMergingAlg.h:128
float m_maxMipBackwardAngle
The max backward angle between a parent cluster and the mip.
Definition: MipFragmentMergingAlg.h:126
float m_minNHitsPerLayer
The min number of hits per layer to consider a mip.
Definition: MipFragmentMergingAlg.h:120
unsigned int m_minParentClusterNHits
The min number of hits to consider a parent cluster.
Definition: MipFragmentMergingAlg.h:123
Factory class for instantiating algorithm.
Definition: MipFragmentMergingAlg.h:47
pandora::StatusCode TidyClusterMap(const pandora::Cluster *const pReplaceCluster, const pandora::Cluster *const pRemoveCluster, ClusterToClusterMap &clusterToClusterMap) const
Tidy the cluster map by replacing occurrences of clusters that will be deleted.
Definition: MipFragmentMergingAlg.cc:189