APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
PfoCreationAlgorithm.h
Go to the documentation of this file.
1 /*
3  *
4  * PfoCreationAlgorithm.h header template automatically generated by a class generator
5  * Creation date : ven. mars 20 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 John Marshall
25  */
26 
27 
28 #ifndef APRIL_PFO_CREATION_ALGORITHM_H
29 #define APRIL_PFO_CREATION_ALGORITHM_H
30 
31 #include "Pandora/Algorithm.h"
32 
33 #include "Api/PandoraContentApi.h"
34 
35 namespace april_content
36 {
37 
41 class PfoCreationAlgorithm : public pandora::Algorithm
42 {
43 public:
47  class Factory : public pandora::AlgorithmFactory
48  {
49  public:
50  pandora::Algorithm *CreateAlgorithm() const;
51  };
52 
57 
58 private:
59  typedef PandoraContentApi::ParticleFlowObject::Parameters PfoParameters;
60 
61  pandora::StatusCode Run();
62  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
63 
68  pandora::StatusCode CreateTrackBasedPfos() const;
69 
77  pandora::StatusCode PopulateTrackBasedPfo(const pandora::Track *const pTrack, PfoParameters &pfoParameters, const bool readSiblingInfo = true) const;
78 
85  pandora::StatusCode SetTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const;
86 
93  pandora::StatusCode SetSiblingTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const;
94 
101  pandora::StatusCode SetDaughterTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const;
102 
109  pandora::StatusCode SetSimpleTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const;
110 
115  pandora::StatusCode CreateNeutralPfos() const;
116 
126  const pandora::CartesianVector GetEnergyWeightedCentroid(const pandora::Cluster *const pCluster, const unsigned int innerPseudoLayer,
127  const unsigned int outerPseudoLayer) const;
128 
129  std::string m_outputPfoListName;
134  unsigned int m_minHitsInCluster;
137 };
138 
139 //------------------------------------------------------------------------------------------------------------------------------------------
140 
141 inline pandora::Algorithm *PfoCreationAlgorithm::Factory::CreateAlgorithm() const
142 {
143  return new PfoCreationAlgorithm();
144 }
145 
146 }
147 
148 #endif // #ifndef APRIL_PFO_CREATION_ALGORITHM_H
PfoCreationAlgorithm class.
Definition: PfoCreationAlgorithm.h:41
unsigned int m_minHitsInCluster
Min number of calo hits for neutral cluster to be added to pfos.
Definition: PfoCreationAlgorithm.h:134
pandora::StatusCode SetSiblingTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const
Set the parameters for a track-based pfo, where pfo target consists of two or more sibling tracks...
Definition: PfoCreationAlgorithm.cc:148
bool m_allowSingleLayerClusters
Whether to allow neutral clusters spanning only a single pseudolayer.
Definition: PfoCreationAlgorithm.h:135
float m_minClusterElectromagneticEnergy
Min electromagnetic energy for neutral (photon) clusters to be added to pfos.
Definition: PfoCreationAlgorithm.h:133
unsigned int m_photonPositionAlgorithm
Identifies the algorithm used to calculate photon pfo position vectors.
Definition: PfoCreationAlgorithm.h:136
PfoCreationAlgorithm()
Default constructor.
Definition: PfoCreationAlgorithm.cc:20
bool m_shouldCreateTrackBasedPfos
Whether to create track-based (charged) pfos.
Definition: PfoCreationAlgorithm.h:130
pandora::StatusCode PopulateTrackBasedPfo(const pandora::Track *const pTrack, PfoParameters &pfoParameters, const bool readSiblingInfo=true) const
Add relevant tracks and clusters to a track-based pfo.
Definition: PfoCreationAlgorithm.cc:82
pandora::StatusCode CreateNeutralPfos() const
Create particle flow objects corresponding to neutral particles, These pfos consist only of clusters ...
Definition: PfoCreationAlgorithm.cc:230
pandora::StatusCode SetDaughterTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const
Set the parameters for a track-based pfo, where the pfo target has one or more daughter tracks...
Definition: PfoCreationAlgorithm.cc:185
Factory class for instantiating algorithm.
Definition: PfoCreationAlgorithm.h:47
const pandora::CartesianVector GetEnergyWeightedCentroid(const pandora::Cluster *const pCluster, const unsigned int innerPseudoLayer, const unsigned int outerPseudoLayer) const
Get the energy-weighted centroid for a specified cluster, calculated over a particular pseudo layer r...
Definition: PfoCreationAlgorithm.cc:301
bool m_shouldCreateNeutralPfos
Whether to create neutral pfos.
Definition: PfoCreationAlgorithm.h:131
pandora::StatusCode SetSimpleTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const
Set the parameters for a simple track-based pfo, where the track has no associations with other track...
Definition: PfoCreationAlgorithm.cc:217
pandora::StatusCode CreateTrackBasedPfos() const
Create particle flow objects starting from tracks in the main tracker. The pfos will account for asso...
Definition: PfoCreationAlgorithm.cc:55
std::string m_outputPfoListName
The output pfo list name.
Definition: PfoCreationAlgorithm.h:129
pandora::StatusCode SetTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const
Set the basic parameters for a track-based pfo.
Definition: PfoCreationAlgorithm.cc:124
float m_minClusterHadronicEnergy
Min hadronic energy for neutral (non-photon) clusters to be added to pfos.
Definition: PfoCreationAlgorithm.h:132