APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
ClusterPurityAlgorithm.h
Go to the documentation of this file.
1 /*
3  *
4  * ClusterPurityAlgorithm.h header template automatically generated by a class generator
5  * Creation date : jeu. juin 2 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 CLUSTERPURITYALGORITHM_H
30 #define CLUSTERPURITYALGORITHM_H
31 
32 #include "Pandora/Algorithm.h"
33 #include "Pandora/PandoraInternal.h"
34 
35 #include "TNtupleD.h"
36 
37 
38 namespace april_content
39 {
40 
44 class ClusterPurityAlgorithm : public pandora::Algorithm
45 {
46 public:
50  class Factory : public pandora::AlgorithmFactory
51  {
52  public:
53  pandora::Algorithm *CreateAlgorithm() const;
54  };
55 
56 private:
57  pandora::StatusCode Run();
58  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
59  pandora::StatusCode Initialize();
60 
61  pandora::StatusCode GetClusterList(pandora::ClusterList& clusterList);
62 
63  pandora::StatusCode GetPurity(const pandora::Cluster* cluster, float& sizePurity, float& energyPurity,
64  float& ordClusterHit, bool printMCP = false) const;
65 
66 
67  unsigned int m_listType;
68  pandora::StringVector m_listNames;
69 };
70 
71 //------------------------------------------------------------------------------------------------------------------------------------------
72 
73 inline pandora::Algorithm *ClusterPurityAlgorithm::Factory::CreateAlgorithm() const
74 {
75  return new ClusterPurityAlgorithm();
76 }
77 
78 }
79 
80 #endif
Factory class for instantiating algorithm.
Definition: ClusterPurityAlgorithm.h:50
ClusterPurityAlgorithm class.
Definition: ClusterPurityAlgorithm.h:44