5#ifndef EGAMMAALGS_EGAMMASUPERCLUSTERBUILDERBASE_H
6#define EGAMMAALGS_EGAMMASUPERCLUSTERBUILDERBASE_H
9#include "AthLinks/DataLink.h"
11#include "GaudiKernel/EventContext.h"
12#include "GaudiKernel/SystemOfUnits.h"
13#include "GaudiKernel/ToolHandle.h"
52 ISvcLocator* pSvcLocator);
58 virtual StatusCode
execute(
const EventContext &ctx)
const override;
62 const EventContext &ctx,
67 std::size_t egammaInd,
69 std::vector<bool>& isUsed)
const = 0;
123 const EventContext& ctx,
124 const std::vector<const xAOD::CaloCluster*>& clusters,
150 1.5 * Gaudi::Units::GeV,
151 "The minimum EM Et required of SEED clusters (not applied to secondaries)"
157 "InputEgammaRecContainerName",
158 "egammaRecCollection",
159 "input egammaRec container"
164 "CaloDetDescrManager",
165 "CaloDetDescrManager",
166 "SG Key for CaloDetDescrManager in the Condition Store"
172 "OutputEgammaRecContainerKey",
173 "egammaSuperRecContainer",
174 "output egammaRec container"
180 "SuperClusterCollectionName",
181 "egammaSuperClusters",
182 "output calo cluster container"
188 "precorrClustersName",
190 "optional pre-correction clusters"
239 const std::vector<const xAOD::CaloCluster*>& clusters,
262 const EventContext& ctx,
282 "LinkToConstituents",
284 "Link sister clusters to new cluster"
292 "Extend TG3 definition from |eta| = 1.2 to |eta| = 1.72"
298 "SearchWindowEtaCellsBarrel",
300 "Number of cells in eta of window in which to search for topoclusters"
306 "SearchWindowPhiCellsBarrel",
308 "Number of cells in phi of window in which to search for topoclusters"
314 "SearchWindowEtaCellsEndcap",
316 "Number of cells in eta of window in which to search for topoclusters"
322 "SearchWindowPhiCellsEndcap",
324 "Number of cells in phi of window in which to search for topoclusters"
331 "AddCellsWindowEtaCellsBarrel",
333 "Number of cells in eta of window around topocluster center to add cells"
340 "AddCellsWindowEtaCellsEndcap",
342 "Number of cells in eta of window around topocluster center to add cells"
352 "When adding L0 (PS) and L1 cells in phi, "
353 "how much wider (+/- of the value) than the L2 phi size of the "
354 "cluster (in L2 cells units) is the acceptance"
361 "ExtraL3EtaSizeCells",
363 "When adding L3 cells how much wider (+/- 0.5 of the value) "
364 "than L2 (in L2 cells "
365 "units) is the acceptance in eta"
372 "calibration service" };
377 "ClusterCorrectionTool",
378 "egammaSwTool/egammaswtool",
379 "tool that applies cluster corrections"
385 "egammaCheckEnergyDepositTool",
387 "Optional tool that performs basic checks of viability of cluster"
393 "egammaCellRecoveryTool",
395 "Optional tool that adds cells in L2 or L3 "
396 "that could have been rejected by timing cut"
const boost::regex ref(r_ef)
Definition of CaloDetDescrManager.
An algorithm that can be simultaneously executed in multiple threads.
This class provides the client interface for accessing the detector description information common to...
Object reference supporting deferred reading from StoreGate.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Represent an egamma object for internal egamma usage during reconstruction.
float m_addCellsWindowEtaBarrel
static constexpr float s_TG3Run2E4cellEtaMax
Gaudi::Property< int > m_addCellsWindowEtaCellsEndcap
Size of windows et eta in which cells of topoclusters are edded for the endcap (units of 2nd layer ce...
egammaSuperClusterBuilderBase(const std::string &name, ISvcLocator *pSvcLocator)
Protected constructor since this class should not be instantiated by itself.
float m_searchWindowEtaEndcap
SG::WriteHandleKey< EgammaRecContainer > m_outputEgammaRecContainerKey
Key for output egammaRec container.
SG::ReadHandleKey< EgammaRecContainer > m_inputEgammaRecContainerKey
Key for input egammaRec container.
float m_addCellsWindowEtaEndcap
static constexpr float s_cellPhiSize
Gaudi::Property< int > m_extraL3EtaSizeCells
"When adding L3 cells, how much wider in eta than the L2
static constexpr float s_TG3Run3E4cellEtaMax
Gaudi::Property< float > m_EtThresholdCut
Seed selection requirements.
static constexpr float s_TG3Run2E4cellEtaMin
StatusCode fillClusterConstrained(xAOD::CaloCluster &tofill, const std::vector< const xAOD::CaloCluster * > &clusters, const CookieCutterHelpers::CentralPosition &cp0) const
Fill super cluster constraining its size in eta,phi around the overall hottest cell and the its L2 si...
static constexpr float s_TG3Run3E3cellEtaMin
virtual StatusCode redoMatching(const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const
Gaudi::Property< int > m_searchWindowEtaCellsBarrel
Size of topocluster search window in eta for the barrel.
bool matchesInWindow(const xAOD::CaloCluster *ref, const xAOD::CaloCluster *clus) const
Is clus in window center around ref?
std::unique_ptr< xAOD::CaloCluster > createNewCluster(const EventContext &ctx, const std::vector< const xAOD::CaloCluster * > &clusters, const DataLink< CaloCellContainer > &cellCont, const CaloDetDescrManager &mgr, xAOD::EgammaParameters::EgammaType egType, xAOD::CaloClusterContainer *precorrClusters) const
Add new supercluster ,created out of the input clusters, to the newClusters collections.
Gaudi::Property< bool > m_linkToConstituents
Decorate the supercluster with links to the component topoclusters.
static constexpr float s_ClEtaMinForTG3cell
StatusCode calibrateCluster(const EventContext &ctx, xAOD::CaloCluster *newCluster, const CaloDetDescrManager &mgr, const xAOD::EgammaParameters::EgammaType egType, xAOD::CaloClusterContainer *precorrClusters) const
function to calibrate the new clusters energy
ToolHandle< IegammaCheckEnergyDepositTool > m_egammaCheckEnergyDepositTool
Pointer to the egammaCheckEnergyDepositTool.
ToolHandle< IegammaCellRecoveryTool > m_egammaCellRecoveryTool
Pointer to the egammaCellRecoveryTool.
Gaudi::Property< bool > m_useExtendedTG3
Use extended TG3 definition (only after Run 2)
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_precorrClustersKey
Optional key for pre-correction clusters.
virtual StatusCode execute(const EventContext &ctx) const override
should be called by the derived class in the execute phase
float m_searchWindowPhiEndcap
virtual bool egammaRecPassesSelection(const egammaRec *egRec) const
StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster &tofill, const CaloDetDescrManager &mgr) const
add all tile Gap 3 cells in a window.
Gaudi::Property< int > m_searchWindowPhiCellsEndcap
Size of topocluster search window in phi for the end-cap.
virtual xAOD::EgammaParameters::EgammaType getEgammaRecType(const egammaRec *egRec) const =0
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
static constexpr float s_ClEtaMaxForTG3cell
float m_searchWindowEtaBarrel
static constexpr float s_cellEtaSize
ToolHandle< IegammaSwTool > m_clusterCorrectionTool
Tool to handle cluster corrections.
float m_searchWindowPhiBarrel
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outputSuperClusterCollectionName
Key for output clusters.
Gaudi::Property< int > m_extraL0L1PhiSizeCells
"When adding L0 (PS) and L1 cells, how much wider than the L2 size of the cluster is the acceptance i...
Gaudi::Property< int > m_searchWindowEtaCellsEndcap
Size of topocluster search window in eta for the end-cap.
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Handle to the MVA calibration service.
virtual std::vector< std::size_t > searchForSecondaryClusters(std::size_t egammaInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const =0
Gaudi::Property< int > m_addCellsWindowEtaCellsBarrel
Size of windows et eta in which cells of topoclusters are added for the barrel (units of 2nd layer ce...
Gaudi::Property< int > m_searchWindowPhiCellsBarrel
Size of topocluster search window in phi for the barrel.
virtual StatusCode initialize() override
should be called by the derived class in the initialize phase
bool seedClusterSelection(const xAOD::CaloCluster *clus) const
check if we pass the basic criteria for a seed cluster
DataVector< egammaRec > EgammaRecContainer
The container is a simple typedef for now.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Find the reference position (eta, phi) relative to which cells are restricted.