ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTopoClusterTowerMerger.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5*/
6
7
8#ifndef CALOREC_CALOTOPOCLUSTERTOWERMERGER_H
9#define CALOREC_CALOTOPOCLUSTERTOWERMERGER_H
10
13
15
18
20
21#include <vector>
22//#include <tuple>
23#include <string>
24#include <cmath>
25
27{
28public:
30 CaloTopoClusterTowerMerger(const std::string& name,ISvcLocator* pSvcLocator);
33
36 virtual StatusCode initialize() override;
37 virtual StatusCode execute(const EventContext& ctx) const override;
39
40private:
41
51
60
63 static bool makeDeepCopy(const xAOD::CaloCluster& rClus,xAOD::CaloClusterContainer* pClusCont) ;
64 // bool fillMoments(const xAOD::CaloCluster& rClus); ///< Copies list of filled moments into lookup
65 bool clusterFilter(const xAOD::CaloCluster& rClus) const;
66 bool towerFilter(const xAOD::CaloCluster& rTowr) const;
67 static StatusCode addContainerWriteHandle(whandle_t& signalHandle) ;
69};
70
71
72inline bool CaloTopoClusterTowerMerger::clusterFilter(const xAOD::CaloCluster& rClus) const { return std::abs(rClus.eta()) <= m_clusterRange; }
73inline bool CaloTopoClusterTowerMerger::towerFilter(const xAOD::CaloCluster& /*rTowr*/) const { return true; }
74
84#endif
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.
An algorithm that can be simultaneously executed in multiple threads.
bool clusterFilter(const xAOD::CaloCluster &rClus) const
Filter topo-cluster.
virtual ~CaloTopoClusterTowerMerger()
Baseclass destructor.
lhandlekey_t m_cellLinkContainerKey
Output cell links for merged container.
SG::ReadHandleKey< xAOD::CaloClusterContainer > rhandlekey_t
Input data handle key type.
static bool makeDeepCopy(const xAOD::CaloCluster &rClus, xAOD::CaloClusterContainer *pClusCont)
Attaches a deep copy to container, returns true if successful.
SG::ReadHandle< xAOD::CaloClusterContainer > rhandle_t
Input data handle type.
double m_clusterRange
Rapidity range for topo-clusters.
SG::WriteHandleKey< CaloClusterCellLinkContainer > lhandlekey_t
Cell link container output data handle key.
virtual StatusCode initialize() override
Initialization sets up read and write handle keys.
CaloTopoClusterTowerMerger(const std::string &name, ISvcLocator *pSvcLocator)
Algorithm constructor.
virtual StatusCode execute(const EventContext &ctx) const override
Execution merges the container contents.
whandlekey_t m_topoSignalContainerKey
Output merged container.
rhandlekey_t m_clusterContainerKey
Input topo-cluster container.
SG::WriteHandle< CaloClusterCellLinkContainer > lhandle_t
Cell link container output data handle.
SG::WriteHandleKey< xAOD::CaloClusterContainer > whandlekey_t
Output data handle key type.
static StatusCode addContainerWriteHandle(whandle_t &signalHandle)
Add a write handle for a container (in CaloClusterStoreHelper from r21.9)
rhandlekey_t m_towerContainerKey
Input topo-tower container.
SG::WriteHandle< xAOD::CaloClusterContainer > whandle_t
Output data handle type.
bool towerFilter(const xAOD::CaloCluster &rTowr) const
Filter topo-tower.
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.
virtual double eta() const
The pseudorapidity ( ) of the particle.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.