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
12
19
20#include <string>
21#include <vector>
22
24{
25public:
26
32 CaloTowerxAODAlgoBase(const std::string& name, ISvcLocator* pSvcLocator);
33
36
37protected:
38
42 float m_minEta;
43 float m_maxEta;
48
50 , "CaloDetDescrManager"
51 , "CaloDetDescrManager"
52 , "SG Key for CaloDetDescrManager in the Condition Store" };
53
54
58 size_t m_towerIdx;
59 float m_weight;
60 cellToTower_t(size_t idx, float w=1.0) : m_towerIdx(idx), m_weight(w) {};
62 };
63 typedef std::vector<std::vector<cellToTower_t>> CellToTowerVec;
65
67 StatusCode initBase();
68
71 makeContainer(const EventContext& ctx) const;
72
74 const CellToTowerVec& getIndexCache(const EventContext& ctx) const;
75
76private:
78
79 StatusCode fillIndexCache(const EventContext& ctx, CellToTowerVec& cellToTower) const;
80};
81
82#endif
Cached value with atomic update.
Definition of CaloDetDescrManager.
defines and typedefs for IOVSvc
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.