MarlinPandora  03.00.00
 All Classes Functions Variables
PfoCreator.h
1 
9 #ifndef PFO_CREATOR_H
10 #define PFO_CREATOR_H 1
11 
12 #include "ClusterShapes.h"
13 #include "Api/PandoraApi.h"
14 
15 namespace IMPL { class ClusterImpl; class ReconstructedParticleImpl; }
16 namespace EVENT { class LCEvent; }
17 
18 //------------------------------------------------------------------------------------------------------------------------------------------
19 
24 {
25 public:
29  class Settings
30  {
31  public:
35  Settings();
36 
38  std::string m_pfoCollectionName;
40  std::string m_startVertexAlgName;
45  };
46 
53  PfoCreator(const Settings &settings, const pandora::Pandora *const pPandora);
54 
58  ~PfoCreator();
59 
65  pandora::StatusCode CreateParticleFlowObjects(EVENT::LCEvent *pLCEvent);
66 
67 private:
71  enum Index
72  {
73  ECAL_INDEX = 0,
74  HCAL_INDEX = 1,
75  YOKE_INDEX = 2,
76  LCAL_INDEX = 3,
77  LHCAL_INDEX = 4,
78  BCAL_INDEX = 5
79  };
80 
86  void InitialiseSubDetectorNames(pandora::StringVector &subDetectorNames) const;
87 
99  void SetClusterSubDetectorEnergies(const pandora::StringVector &subDetectorNames, IMPL::ClusterImpl *const pLcioCluster,
100  const pandora::CaloHitList &pandoraCaloHitList, pandora::FloatVector &hitE, pandora::FloatVector &hitX, pandora::FloatVector &hitY,
101  pandora::FloatVector &hitZ) const;
102 
111  void SetClusterEnergyAndError(const pandora::ParticleFlowObject *const pPandoraPfo, const pandora::Cluster *const pPandoraCluster,
112  IMPL::ClusterImpl *const pLcioCluster, float &clusterCorrectEnergy) const;
113 
125  void SetClusterPositionAndError(const unsigned int nHitsInCluster, pandora::FloatVector &hitE, pandora::FloatVector &hitX,
126  pandora::FloatVector &hitY, pandora::FloatVector &hitZ, IMPL::ClusterImpl *const pLcioCluster, pandora::CartesianVector &clusterPositionVec) const;
127 
134  pandora::StatusCode CalculateTrackBasedReferencePoint(const pandora::ParticleFlowObject *const pPandoraPfo, pandora::CartesianVector &referencePoint) const;
135 
142  void SetRecoParticleReferencePoint(const pandora::CartesianVector &referencePoint, IMPL::ReconstructedParticleImpl *const pReconstructedParticle) const;
143 
150  void AddTracksToRecoParticle(const pandora::ParticleFlowObject *const pPandoraPfo, IMPL::ReconstructedParticleImpl *const pReconstructedParticle) const;
151 
158  void SetRecoParticlePropertiesFromPFO(const pandora::ParticleFlowObject *const pPandoraPfo, IMPL::ReconstructedParticleImpl *const pReconstructedParticle) const;
159 
168  bool IsValidParentTrack(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const;
169 
178  bool HasValidSiblingTrack(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const;
179 
188  bool IsClosestTrackToIP(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const;
189 
198  bool AreAnyOtherSiblingsInList(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const;
199 
200  const Settings m_settings;
201  const pandora::Pandora *m_pPandora;
202 };
203 
204 #endif // #ifndef PFO_CREATOR_H
std::string m_clusterCollectionName
The name of the cluster output collection.
Definition: PfoCreator.h:37
PfoCreator class.
Definition: PfoCreator.h:23
float m_emStochasticTerm
The stochastic term for EM shower energy resolution.
Definition: PfoCreator.h:41
std::string m_startVertexAlgName
The name of the algorithm to fill the start vertex output collection.
Definition: PfoCreator.h:40
float m_emConstantTerm
The constant term for EM shower energy resolution.
Definition: PfoCreator.h:43
Settings()
Default constructor.
Definition: PfoCreator.cc:420
PfoCreator(const Settings &settings, const pandora::Pandora *const pPandora)
Constructor.
Definition: PfoCreator.cc:37
Settings class.
Definition: PfoCreator.h:29
float m_hadStochasticTerm
The stochastic term for Hadronic shower energy resolution.
Definition: PfoCreator.h:42
float m_hadConstantTerm
The constant term for Hadronic shower energy resolution.
Definition: PfoCreator.h:44
std::string m_pfoCollectionName
The name of the pfo output collection.
Definition: PfoCreator.h:38
std::string m_startVertexCollectionName
The name of the start vertex output collection.
Definition: PfoCreator.h:39
pandora::StatusCode CreateParticleFlowObjects(EVENT::LCEvent *pLCEvent)
Create particle flow objects.
Definition: PfoCreator.cc:51
~PfoCreator()
Destructor.
Definition: PfoCreator.cc:45