ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTowerxAODAlgoBase.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef CALOREC_CALOTOWERXAODALGOBASE_H
8#define CALOREC_CALOTOWERXAODALGOBASE_H
9
11
18
19#include <string>
20#include <vector>
21
23{
24public:
25
31 CaloTowerxAODAlgoBase(const std::string& name, ISvcLocator* pSvcLocator);
32
35
36protected:
37
41 float m_minEta;
42 float m_maxEta;
47
49 , "CaloDetDescrManager"
50 , "CaloDetDescrManager"
51 , "SG Key for CaloDetDescrManager in the Condition Store" };
52
53
57 size_t m_towerIdx;
58 float m_weight;
59 cellToTower_t(size_t idx, float w=1.0) : m_towerIdx(idx), m_weight(w) {};
61 };
62 typedef std::vector<std::vector<cellToTower_t>> CellToTowerVec;
64
66 StatusCode initBase();
67
70 makeContainer(const EventContext& ctx) const;
71
73 const CellToTowerVec& getIndexCache(const EventContext& ctx) const;
74
75private:
77
78 StatusCode fillIndexCache(const EventContext& ctx, CellToTowerVec& cellToTower) const;
79};
80
81#endif
Cached value with atomic update.
Definition of CaloDetDescrManager.
Handle class for recording to StoreGate.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< xAOD::CaloTowerContainer > m_caloTowerContainerKey
Handle to xAOD::CaloTowerContainer.
~CaloTowerxAODAlgoBase()
destructor
float m_maxEta
Tower-grid: upper eta boundary.
int m_nEtaBins
Tower-grid: number of phi bins.
std::vector< std::vector< cellToTower_t > > CellToTowerVec
bool m_doxCheck
Turn on internal checks (debugging)
CxxUtils::CachedValue< CellToTowerVec > m_cellToTower
map of cell indices to tower indices and weights
int m_nPhiBins
Tower-grid: number of phi bins.
const CellToTowerVec & getIndexCache(const EventContext &ctx) const
SG::WriteHandle< xAOD::CaloTowerContainer > makeContainer(const EventContext &ctx) const
Intialize m_cellToTower cache.
CaloTowerxAODAlgoBase(const std::string &name, ISvcLocator *pSvcLocator)
Default algorithm constructor.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
float m_minEta
Tower-grid: lower eta boundary.
StatusCode fillIndexCache(const EventContext &ctx, CellToTowerVec &cellToTower) const
Cached value with atomic update.
Definition CachedValue.h:55
Property holding a SG store/key/clid from which a WriteHandle is made.