ATLAS Offline Software
photonSuperClusterBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EGAMMAALGS_PHOTONSUPERCLUSTERBUILDER_H
6 #define EGAMMAALGS_PHOTONSUPERCLUSTERBUILDER_H
7 
9 
10 #include "GaudiKernel/EventContext.h"
14 
16 
17 // Fwd declarations
21 #include "xAODEgamma/EgammaEnums.h"
22 
23 #include <string>
24 #include <vector>
25 
65 {
66 
67 public:
68  photonSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator);
69 
70  virtual StatusCode initialize() override final;
71 
72 private:
73 
74 
76  const egammaRec *egRec) const override final;
77 
78  virtual StatusCode redoMatching(
79  const EventContext &ctx,
80  SG::WriteHandle<EgammaRecContainer> &newEgammaRecs) const final override;
81 
111  virtual std::vector<std::size_t> searchForSecondaryClusters(
112  std::size_t photonInd,
113  const EgammaRecContainer* egammaRecs,
114  std::vector<bool>& isUsed) const override final;
115 
117  bool matchesVtx(
118  const std::vector<const xAOD::Vertex*>& seedVertices,
119  const std::vector<xAOD::EgammaParameters::ConversionType>& seedVertexType,
120  const egammaRec* egRec) const;
121 
123  bool matchesVtxTrack(
124  const std::vector<const xAOD::TrackParticle*>& seedVertexTracks,
125  const egammaRec* egRec) const;
126 
128  ToolHandle<IEMConversionBuilder> m_conversionBuilder{
129  this,
130  "ConversionBuilderTool",
131  "EMConversionBuilder",
132  "Tool that matches conversion vertices to egammaRecs"
133  };
134 
135  // options for how to build superclusters
137  Gaudi::Property<bool> m_addClustersInWindow{
138  this,
139  "AddClustersInWindow",
140  true,
141  "add the topoclusters in window"
142  };
143 
145  Gaudi::Property<bool> m_addClustersMatchingVtx{
146  this,
147  "AddClustersMatchingVtx",
148  true,
149  "add the topoclusters matching conversion vertex"
150  };
151 
153  Gaudi::Property<bool> m_useOnlyLeadingVertex{
154  this,
155  "UseOnlyLeadingVertex",
156  true,
157  "use only the leading vertex for matching"
158  };
159 
161  Gaudi::Property<bool> m_useOnlySi{
162  this,
163  "UseOnlySi",
164  true,
165  "use only vertices/tracks with silicon tracks for adding sec. clusters "
166  "(Mix not considered Si)"
167  };
168 
170  Gaudi::Property<bool> m_addClustersMatchingVtxTracks{
171  this,
172  "AddClustrsMatchingVtxTracks",
173  true,
174  "add the topoclusters matching conversion vertex tracks"
175  };
176 
178  Gaudi::Property<bool> m_useOnlyLeadingTrack{
179  this,
180  "UseOnlyLeadingTrack",
181  true,
182  "use only the leading track for matching"
183  };
184 
186  Gaudi::Property<bool> m_doConversions{ this,
187  "doConversions",
188  true,
189  "Boolean to do conversion matching" };
190 };
191 
192 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
photonSuperClusterBuilder::getEgammaRecType
virtual xAOD::EgammaParameters::EgammaType getEgammaRecType(const egammaRec *egRec) const override final
Definition: photonSuperClusterBuilder.cxx:44
photonSuperClusterBuilder::matchesVtx
bool matchesVtx(const std::vector< const xAOD::Vertex * > &seedVertices, const std::vector< xAOD::EgammaParameters::ConversionType > &seedVertexType, const egammaRec *egRec) const
Does the cluster share conversion vertex?
Definition: photonSuperClusterBuilder.cxx:162
photonSuperClusterBuilder::photonSuperClusterBuilder
photonSuperClusterBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: photonSuperClusterBuilder.cxx:23
photonSuperClusterBuilder::initialize
virtual StatusCode initialize() override final
should be called by the derived class in the initialize phase
Definition: photonSuperClusterBuilder.cxx:30
photonSuperClusterBuilder::m_conversionBuilder
ToolHandle< IEMConversionBuilder > m_conversionBuilder
Tool to retrieve the conversions.
Definition: photonSuperClusterBuilder.h:128
photonSuperClusterBuilder::redoMatching
virtual StatusCode redoMatching(const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const final override
Definition: photonSuperClusterBuilder.cxx:54
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
xAOD::EgammaParameters::EgammaType
EgammaType
Definition: EgammaEnums.h:17
photonSuperClusterBuilder::m_useOnlyLeadingVertex
Gaudi::Property< bool > m_useOnlyLeadingVertex
use only the leading vertex for matching
Definition: photonSuperClusterBuilder.h:153
photonSuperClusterBuilder::searchForSecondaryClusters
virtual std::vector< std::size_t > searchForSecondaryClusters(std::size_t photonInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const override final
Return extra clusters that can be added to make supercluster.
Definition: photonSuperClusterBuilder.cxx:73
photonSuperClusterBuilder::m_useOnlySi
Gaudi::Property< bool > m_useOnlySi
use only vertices/tracks with silicon tracks
Definition: photonSuperClusterBuilder.h:161
photonSuperClusterBuilder::m_doConversions
Gaudi::Property< bool > m_doConversions
private member flag to do the conversion building and matching
Definition: photonSuperClusterBuilder.h:186
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
photonSuperClusterBuilder::m_addClustersInWindow
Gaudi::Property< bool > m_addClustersInWindow
add the topoclusters in window
Definition: photonSuperClusterBuilder.h:137
ReadCondHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
egammaSuperClusterBuilderBase.h
photonSuperClusterBuilder::matchesVtxTrack
bool matchesVtxTrack(const std::vector< const xAOD::TrackParticle * > &seedVertexTracks, const egammaRec *egRec) const
Does the cluster match a conversion vertex track with the seed?
Definition: photonSuperClusterBuilder.cxx:188
photonSuperClusterBuilder::m_addClustersMatchingVtx
Gaudi::Property< bool > m_addClustersMatchingVtx
add the topoclusters matching conversion vertex
Definition: photonSuperClusterBuilder.h:145
EgammaEnums.h
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
photonSuperClusterBuilder
Create supercluster under photon hypothesis.
Definition: photonSuperClusterBuilder.h:65
egammaSuperClusterBuilderBase
Base class for electronSuperClusterBuilder photonSuperClusterBuilder egammaSuperClusterBuilder This c...
Definition: egammaSuperClusterBuilderBase.h:47
IEMConversionBuilder.h
CaloClusterContainer.h
egammaRec
Definition: egammaRec.h:31
photonSuperClusterBuilder::m_addClustersMatchingVtxTracks
Gaudi::Property< bool > m_addClustersMatchingVtxTracks
add the topoclusters matching conversion vertex tracks
Definition: photonSuperClusterBuilder.h:170
egammaRecContainer.h
photonSuperClusterBuilder::m_useOnlyLeadingTrack
Gaudi::Property< bool > m_useOnlyLeadingTrack
use only the leading track for matching
Definition: photonSuperClusterBuilder.h:178