APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
CaloHitMergingTool.h
Go to the documentation of this file.
1 /*
3  *
4  * CaloHitMergingTool.h header template automatically generated by a class generator
5  * Creation date : lun. juil. 4 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 CALOHITMERGINGTOOL_H
30 #define CALOHITMERGINGTOOL_H
31 
32 #include "Pandora/AlgorithmTool.h"
33 #include "Pandora/PandoraInternal.h"
35 
36 namespace april_content
37 {
38 
42 class CaloHitMergingTool : public pandora::AlgorithmTool
43 {
44 public:
48  class Factory : public pandora::AlgorithmToolFactory
49  {
50  public:
51  pandora::AlgorithmTool *CreateAlgorithmTool() const;
52  };
53 
59  virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
60 
68  virtual pandora::StatusCode MergeCaloHits(const pandora::Algorithm &algorithm, const pandora::CaloHitList &caloHitList, const pandora::ClusterVector &clusterVector);
69 
70 private:
79  pandora::StatusCode FindCaloHitClusterMerging(const pandora::Algorithm &algorithm, const pandora::CaloHitList &caloHitList, const pandora::ClusterVector &clusterVector, CaloHitToClusterMap &caloHitToClusterMap) const;
80 
87  pandora::StatusCode MergeCaloHits(const pandora::Algorithm &algorithm, const CaloHitToClusterMap &caloHitToClusterMap) const;
88 
98  float GetMaxCaloHitDistance(const pandora::Algorithm &algorithm, const pandora::CaloHit *const pCaloHit, const pandora::Cluster *const pCluster) const;
99 
100 private:
101  typedef std::map<int, float> PidToDistanceMap;
106 };
107 
108 //------------------------------------------------------------------------------------------------------------------------------------------
109 
110 inline pandora::AlgorithmTool *CaloHitMergingTool::Factory::CreateAlgorithmTool() const
111 {
112  return new CaloHitMergingTool();
113 }
114 
115 }
116 
117 #endif // CALOHITMERGINGTOOL_H
float m_maxCaloHitDistanceCoarse
The max distance to merge a hit in a cluster (coarse granularity)
Definition: CaloHitMergingTool.h:103
float GetMaxCaloHitDistance(const pandora::Algorithm &algorithm, const pandora::CaloHit *const pCaloHit, const pandora::Cluster *const pCluster) const
Get the maximum distance to merge the calo hit into that cluster.
Definition: CaloHitMergingTool.cc:109
std::map< int, float > PidToDistanceMap
The pid flag to max merging distance map typedef.
Definition: CaloHitMergingTool.h:101
PidToDistanceMap m_maxCaloHitDistanceFineMap
The map of cluster pid -&gt; max distance to merge a hit in a cluster (fine granularity) ...
Definition: CaloHitMergingTool.h:104
float m_maxCaloHitDistanceFine
The max distance to merge a hit in a cluster (fine granularity)
Definition: CaloHitMergingTool.h:102
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read settings from the xml handle.
Definition: CaloHitMergingTool.cc:141
CaloHitMergingTool class.
Definition: CaloHitMergingTool.h:42
pandora::StatusCode FindCaloHitClusterMerging(const pandora::Algorithm &algorithm, const pandora::CaloHitList &caloHitList, const pandora::ClusterVector &clusterVector, CaloHitToClusterMap &caloHitToClusterMap) const
Find a possible parent cluster for each hit.
Definition: CaloHitMergingTool.cc:54
PidToDistanceMap m_maxCaloHitDistanceCoarseMap
The map of cluster pid -&gt; max distance to merge a hit in a cluster (coarse granularity) ...
Definition: CaloHitMergingTool.h:105
Factory class for instantiating algorithm tool.
Definition: CaloHitMergingTool.h:48
virtual pandora::StatusCode MergeCaloHits(const pandora::Algorithm &algorithm, const pandora::CaloHitList &caloHitList, const pandora::ClusterVector &clusterVector)
Merge the calo hit list in provided cluster list.
Definition: CaloHitMergingTool.cc:43