ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloRec
src
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
10
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
11
12
#include "
xAODCaloEvent/CaloTowerContainer.h
"
13
#include "
xAODCaloEvent/CaloTowerAuxContainer.h
"
14
#include "
StoreGate/WriteHandle.h
"
15
#include "
CaloDetDescr/CaloDetDescrManager.h
"
16
#include "
StoreGate/ReadCondHandleKey.h
"
17
#include "
CxxUtils/CachedValue.h
"
18
19
#include <string>
20
#include <vector>
21
22
class
CaloTowerxAODAlgoBase
:
public
AthReentrantAlgorithm
23
{
24
public
:
25
31
CaloTowerxAODAlgoBase
(
const
std::string& name, ISvcLocator* pSvcLocator);
32
34
~CaloTowerxAODAlgoBase
();
35
36
protected
:
37
40
SG::WriteHandleKey<xAOD::CaloTowerContainer>
m_caloTowerContainerKey
;
41
float
m_minEta
;
42
float
m_maxEta
;
43
int
m_nEtaBins
;
44
int
m_nPhiBins
;
45
bool
m_doxCheck
;
47
48
SG::ReadCondHandleKey<CaloDetDescrManager>
m_caloMgrKey
{ this
49
,
"CaloDetDescrManager"
50
,
"CaloDetDescrManager"
51
,
"SG Key for CaloDetDescrManager in the Condition Store"
};
52
53
56
struct
cellToTower_t
{
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) {};
60
cellToTower_t
() :
m_towerIdx
(0),
m_weight
(0) {};
61
};
62
typedef
std::vector<std::vector<cellToTower_t>>
CellToTowerVec
;
64
66
StatusCode
initBase
();
67
69
SG::WriteHandle<xAOD::CaloTowerContainer>
70
makeContainer
(
const
EventContext& ctx)
const
;
71
73
const
CellToTowerVec
&
getIndexCache
(
const
EventContext& ctx)
const
;
74
75
private
:
76
CxxUtils::CachedValue<CellToTowerVec>
m_cellToTower
;
77
78
StatusCode
fillIndexCache
(
const
EventContext& ctx,
CellToTowerVec
& cellToTower)
const
;
79
};
80
81
#endif
AthReentrantAlgorithm.h
CachedValue.h
Cached value with atomic update.
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloTowerAuxContainer.h
CaloTowerContainer.h
ReadCondHandleKey.h
WriteHandle.h
Handle class for recording to StoreGate.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
CaloTowerxAODAlgoBase::initBase
StatusCode initBase()
<
Definition
CaloTowerxAODAlgoBase.cxx:30
CaloTowerxAODAlgoBase::m_caloTowerContainerKey
SG::WriteHandleKey< xAOD::CaloTowerContainer > m_caloTowerContainerKey
Handle to xAOD::CaloTowerContainer.
Definition
CaloTowerxAODAlgoBase.h:40
CaloTowerxAODAlgoBase::~CaloTowerxAODAlgoBase
~CaloTowerxAODAlgoBase()
destructor
CaloTowerxAODAlgoBase::m_maxEta
float m_maxEta
Tower-grid: upper eta boundary.
Definition
CaloTowerxAODAlgoBase.h:42
CaloTowerxAODAlgoBase::m_nEtaBins
int m_nEtaBins
Tower-grid: number of phi bins.
Definition
CaloTowerxAODAlgoBase.h:43
CaloTowerxAODAlgoBase::CellToTowerVec
std::vector< std::vector< cellToTower_t > > CellToTowerVec
Definition
CaloTowerxAODAlgoBase.h:62
CaloTowerxAODAlgoBase::m_doxCheck
bool m_doxCheck
Turn on internal checks (debugging).
Definition
CaloTowerxAODAlgoBase.h:45
CaloTowerxAODAlgoBase::m_cellToTower
CxxUtils::CachedValue< CellToTowerVec > m_cellToTower
map of cell indices to tower indices and weights
Definition
CaloTowerxAODAlgoBase.h:76
CaloTowerxAODAlgoBase::m_nPhiBins
int m_nPhiBins
Tower-grid: number of phi bins.
Definition
CaloTowerxAODAlgoBase.h:44
CaloTowerxAODAlgoBase::getIndexCache
const CellToTowerVec & getIndexCache(const EventContext &ctx) const
Definition
CaloTowerxAODAlgoBase.cxx:63
CaloTowerxAODAlgoBase::makeContainer
SG::WriteHandle< xAOD::CaloTowerContainer > makeContainer(const EventContext &ctx) const
Intialize m_cellToTower cache.
Definition
CaloTowerxAODAlgoBase.cxx:38
CaloTowerxAODAlgoBase::CaloTowerxAODAlgoBase
CaloTowerxAODAlgoBase(const std::string &name, ISvcLocator *pSvcLocator)
Default algorithm constructor.
Definition
CaloTowerxAODAlgoBase.cxx:15
CaloTowerxAODAlgoBase::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition
CaloTowerxAODAlgoBase.h:48
CaloTowerxAODAlgoBase::m_minEta
float m_minEta
Tower-grid: lower eta boundary.
Definition
CaloTowerxAODAlgoBase.h:41
CaloTowerxAODAlgoBase::fillIndexCache
StatusCode fillIndexCache(const EventContext &ctx, CellToTowerVec &cellToTower) const
Definition
CaloTowerxAODAlgoBase.cxx:73
CxxUtils::CachedValue
Cached value with atomic update.
Definition
CachedValue.h:55
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
CaloTowerxAODAlgoBase::cellToTower_t::cellToTower_t
cellToTower_t()
Definition
CaloTowerxAODAlgoBase.h:60
CaloTowerxAODAlgoBase::cellToTower_t::m_weight
float m_weight
Definition
CaloTowerxAODAlgoBase.h:58
CaloTowerxAODAlgoBase::cellToTower_t::m_towerIdx
size_t m_towerIdx
<
Definition
CaloTowerxAODAlgoBase.h:57
CaloTowerxAODAlgoBase::cellToTower_t::cellToTower_t
cellToTower_t(size_t idx, float w=1.0)
Definition
CaloTowerxAODAlgoBase.h:59
Generated on
for ATLAS Offline Software by
1.17.0