APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
APRILClusteringAlgorithm.h
Go to the documentation of this file.
1 /*
3  *
4  * APRILClusteringAlgorithm.h header template automatically generated by a class generator
5  * Creation date : ven. d�c. 4 2015
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 APRILCLUSTERINGALGORITHM_H
30 #define APRILCLUSTERINGALGORITHM_H
31 
32 #include "Pandora/Algorithm.h"
33 #include "Pandora/PandoraInternal.h"
34 #include "Pandora/PandoraInputTypes.h"
36 
37 namespace april_content
38 {
39 
43 class APRILClusteringAlgorithm : public pandora::Algorithm
44 {
45 public:
49  class Factory : public pandora::AlgorithmFactory
50  {
51  public:
52  pandora::Algorithm *CreateAlgorithm() const;
53  };
54 
55  static const pandora::CaloHitList* GetCaloHitList() { return m_pCaloHitList; }
56  static const pandora::CaloHitList* GetEcalHitList() { return &m_hcalCaloHitList; }
57  static const pandora::CaloHitList* GetHcalHitList() { return &m_hcalCaloHitList; }
58  static const pandora::CaloHitList* GetMuonHitList() { return &m_muonCaloHitList; }
59 
60 private:
61  pandora::StatusCode Run();
62  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
63 
72  pandora::StatusCode SplitCaloHitList(const pandora::CaloHitList *const pCaloHitList, pandora::CaloHitList &ecalCaloHitList,
73  pandora::CaloHitList &hcalCaloHitList, pandora::CaloHitList &muonCaloHitList) const;
74 
81  pandora::StatusCode ConnectCaloHits(const ConnectorAlgorithmToolVector &toolVector) const;
82 
86  pandora::StatusCode CreateClusters() const;
87 
88 
89 private:
90  ConnectorAlgorithmToolVector m_toolList;
91 
92  static const pandora::CaloHitList* m_pCaloHitList;
93  static pandora::CaloHitList m_ecalCaloHitList;
94  static pandora::CaloHitList m_hcalCaloHitList;
95  static pandora::CaloHitList m_muonCaloHitList;
96 
100 
101  // It seems that we can not add any member of type ConnectorAlgorithmToolVector or string more (?), otherwise it will crash.
102 };
103 
104 //------------------------------------------------------------------------------------------------------------------------------------------
105 
106 inline pandora::Algorithm *APRILClusteringAlgorithm::Factory::CreateAlgorithm() const
107 {
108  return new APRILClusteringAlgorithm();
109 }
110 
111 }
112 
113 #endif // APRILCLUSTERINGALGORITHM_H
pandora::StatusCode SplitCaloHitList(const pandora::CaloHitList *const pCaloHitList, pandora::CaloHitList &ecalCaloHitList, pandora::CaloHitList &hcalCaloHitList, pandora::CaloHitList &muonCaloHitList) const
Split the input calo hit list into three lists for ecal, hcal and muon.
Definition: APRILClusteringAlgorithm.cc:73
ConnectorAlgorithmToolVector m_toolList
The algorithm tool list.
Definition: APRILClusteringAlgorithm.h:90
pandora::StatusCode ConnectCaloHits(const ConnectorAlgorithmToolVector &toolVector) const
Process calo hit list connection using the algorithm tool list.
Definition: APRILClusteringAlgorithm.cc:123
pandora::StatusCode CreateClusters() const
Create clusters from the previously connected calo hits.
Definition: APRILClusteringAlgorithm.cc:140
Factory class for instantiating algorithm.
Definition: APRILClusteringAlgorithm.h:49
bool m_useAsIndependent
Whether to use this algorithm as a mother algorithm.
Definition: APRILClusteringAlgorithm.h:99
bool m_allowSingleHitClusters
Whether to allow single calo hit clusters.
Definition: APRILClusteringAlgorithm.h:97
APRILClusteringAlgorithm class.
Definition: APRILClusteringAlgorithm.h:43
bool m_useMultithread
Whether to use multithreading with ecal-hcal-muon tools.
Definition: APRILClusteringAlgorithm.h:98