ATLAS Offline Software
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 {
28 public:
30  CaloTopoClusterTowerMerger(const std::string& name,ISvcLocator* pSvcLocator);
33 
36  virtual StatusCode initialize() override;
37  virtual StatusCode execute(const EventContext& ctx) const override;
38 
40 private:
41 
50 
58  double m_clusterRange;
59 
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) ;
68 };
70 
71 
72 inline bool CaloTopoClusterTowerMerger::clusterFilter(const xAOD::CaloCluster& rClus) const { return std::abs(rClus.eta()) <= m_clusterRange; }
73 inline bool CaloTopoClusterTowerMerger::towerFilter(const xAOD::CaloCluster& /*rTowr*/) const { return true; }
74 
84 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CaloTopoClusterTowerMerger::m_clusterContainerKey
rhandlekey_t m_clusterContainerKey
Input topo-cluster container.
Definition: CaloTopoClusterTowerMerger.h:54
CaloTopoClusterTowerMerger::initialize
virtual StatusCode initialize() override
Initialization sets up read and write handle keys.
Definition: CaloTopoClusterTowerMerger.cxx:113
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
CaloTopoClusterTowerMerger::addContainerWriteHandle
static StatusCode addContainerWriteHandle(whandle_t &signalHandle)
Add a write handle for a container (in CaloClusterStoreHelper from r21.9)
Definition: CaloTopoClusterTowerMerger.cxx:174
CaloTopoClusterTowerMerger::whandle_t
SG::WriteHandle< xAOD::CaloClusterContainer > whandle_t
Output data handle type.
Definition: CaloTopoClusterTowerMerger.h:48
SG::ReadHandleKey< xAOD::CaloClusterContainer >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
CaloTopoClusterTowerMerger::towerFilter
bool towerFilter(const xAOD::CaloCluster &rTowr) const
Filter topo-tower.
Definition: CaloTopoClusterTowerMerger.h:73
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CaloTopoClusterTowerMerger::m_cellLinkContainerKey
lhandlekey_t m_cellLinkContainerKey
Output cell links for merged container.
Definition: CaloTopoClusterTowerMerger.h:57
SG::WriteHandleKey< xAOD::CaloClusterContainer >
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
CaloCluster.h
CaloTopoClusterTowerMerger::m_clusterRange
double m_clusterRange
Rapidity range for topo-clusters.
Definition: CaloTopoClusterTowerMerger.h:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloTopoClusterTowerMerger::clusterFilter
bool clusterFilter(const xAOD::CaloCluster &rClus) const
Filter topo-cluster.
Definition: CaloTopoClusterTowerMerger.h:72
CaloTopoClusterTowerMerger::CaloTopoClusterTowerMerger
CaloTopoClusterTowerMerger(const std::string &name, ISvcLocator *pSvcLocator)
Algorithm constructor.
Definition: CaloTopoClusterTowerMerger.cxx:95
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthReentrantAlgorithm.h
CaloTopoClusterTowerMerger::lhandle_t
SG::WriteHandle< CaloClusterCellLinkContainer > lhandle_t
Cell link container output data handle.
Definition: CaloTopoClusterTowerMerger.h:49
CaloTopoClusterTowerMerger::execute
virtual StatusCode execute(const EventContext &ctx) const override
Execution merges the container contents.
Definition: CaloTopoClusterTowerMerger.cxx:131
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
CaloTopoClusterTowerMerger::makeDeepCopy
static bool makeDeepCopy(const xAOD::CaloCluster &rClus, xAOD::CaloClusterContainer *pClusCont)
Attaches a deep copy to container, returns true if successful.
Definition: CaloTopoClusterTowerMerger.cxx:163
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CaloTopoClusterTowerMerger::lhandlekey_t
SG::WriteHandleKey< CaloClusterCellLinkContainer > lhandlekey_t
Cell link container output data handle key.
Definition: CaloTopoClusterTowerMerger.h:46
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
CaloClusterContainer.h
CaloTopoClusterTowerMerger::rhandle_t
SG::ReadHandle< xAOD::CaloClusterContainer > rhandle_t
Input data handle type.
Definition: CaloTopoClusterTowerMerger.h:47
CaloTopoClusterTowerMerger::~CaloTopoClusterTowerMerger
virtual ~CaloTopoClusterTowerMerger()
Baseclass destructor.
CaloTopoClusterTowerMerger::rhandlekey_t
SG::ReadHandleKey< xAOD::CaloClusterContainer > rhandlekey_t
Input data handle key type.
Definition: CaloTopoClusterTowerMerger.h:44
CaloTopoClusterTowerMerger::m_topoSignalContainerKey
whandlekey_t m_topoSignalContainerKey
Output merged container.
Definition: CaloTopoClusterTowerMerger.h:56
CaloTopoClusterTowerMerger
Definition: CaloTopoClusterTowerMerger.h:27
CaloTopoClusterTowerMerger::whandlekey_t
SG::WriteHandleKey< xAOD::CaloClusterContainer > whandlekey_t
Output data handle key type.
Definition: CaloTopoClusterTowerMerger.h:45
CaloTopoClusterTowerMerger::m_towerContainerKey
rhandlekey_t m_towerContainerKey
Input topo-tower container.
Definition: CaloTopoClusterTowerMerger.h:55