APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
PerfectPfoCreationAlgorithm.h
Go to the documentation of this file.
1 /*
3  *
4  * PerfectPfoCreationAlgorithm.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_PERFECT_PFO_CREATION_ALGORITHM_H
29 #define APRIL_PERFECT_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 PerfectPfoCreationAlgorithm : 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  pandora::StatusCode TrackCollection(const pandora::MCParticle *const pPfoTarget, PfoParameters &pfoParameters) const;
130 
131  void SetPfoParametersFromTracks(int &nTracksUsed, PfoParameters &pfoParameters) const;
132  void SetPfoParametersFromClusters(const pandora::MCParticle *const pPfoTarget, const int nTracksUsed, PfoParameters &pfoParameters) const;
133  pandora::StatusCode SetPfoParametersFromClusters() const;
134  pandora::StatusCode TrackClusterAssociation(const pandora::MCParticle *const pPfoTarget, PfoParameters &pfoParameters) const;
135 
136  std::string m_outputPfoListName;
138  bool m_collapsedMCParticlesToPfoTarget;
139 
140  //pandora::StringVector m_associationAlgorithms; ///< The ordered list of track-cluster associations algorithm to run
141 };
142 
143 //------------------------------------------------------------------------------------------------------------------------------------------
144 
145 inline pandora::Algorithm *PerfectPfoCreationAlgorithm::Factory::CreateAlgorithm() const
146 {
147  return new PerfectPfoCreationAlgorithm();
148 }
149 
150 }
151 
152 #endif
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...
pandora::StatusCode CreateTrackBasedPfos() const
Create particle flow objects starting from tracks in the main tracker. The pfos will account for asso...
Definition: PerfectPfoCreationAlgorithm.cc:485
pandora::StatusCode CreateNeutralPfos() const
Create particle flow objects corresponding to neutral particles, These pfos consist only of clusters ...
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...
PerfectPfoCreationAlgorithm()
Default constructor.
Definition: PerfectPfoCreationAlgorithm.cc:41
Factory class for instantiating algorithm.
Definition: PerfectPfoCreationAlgorithm.h:47
pandora::StatusCode SetTrackBasedPfoParameters(const pandora::Track *const pTrack, PfoParameters &pfoParameters) const
Set the basic parameters for a track-based pfo.
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.
PerfectPfoCreationAlgorithm class.
Definition: PerfectPfoCreationAlgorithm.h:41
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: PerfectPfoCreationAlgorithm.cc:599
std::string m_outputPfoListName
The output pfo list name.
Definition: PerfectPfoCreationAlgorithm.h:136
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...
std::string m_associationAlgorithmName
The name of track-cluster alg.
Definition: PerfectPfoCreationAlgorithm.h:137