ATLAS Offline Software
CaloTriggerTowerService.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOTRIGGERTOWERSERVICE_H
6 #define CALOTRIGGERTOWERSERVICE_H
7 
8 // Gaudi
10 #include "GaudiKernel/MsgStream.h"
11 
13 
14 #include <vector>
15 #include <string>
16 
21 
25 
28 #include "CxxUtils/CachedPointer.h"
29 
30 
31 class Identifier;
32 class HWIdentifier;
33 class LArOnlineID;
34 class LArEM_ID;
35 class TTOnlineID;
36 class CaloLVL1_ID;
37 
38 static const InterfaceID IID_CaloTriggerTowerService("CaloTriggerTowerService", 1 , 0);
39 
50 {
51  public:
53  static const InterfaceID& interfaceID() { return IID_CaloTriggerTowerService; }
54 
56  CaloTriggerTowerService( const std::string& type, const std::string& name, const IInterface* parent ) ;
57 
60 
61  bool is_initialized() const;
62 
64 
65  //
66  //======================= on-off mapping methods (Trigger Towers) ==================================
67  //
68 
73  HWIdentifier createTTChannelID(const Identifier & id, bool bQuiet=false) const;
74 
75 
80  Identifier cnvToIdentifier(const HWIdentifier & id, bool bQuiet=false) const;
81 
82 
87  //unsigned int createL1CoolChannelId( const HWIdentifier & id );
89 
90 
95  //HWIdentifier cnvCoolChannelIdToHWID( const unsigned int coolChannelId );
96  HWIdentifier cnvCoolChannelIdToHWID( const L1CaloCoolChannelId& coolChannelId ) const;
97 
98 
99 
100 
106 
107 
113  std::vector<L1CaloRxCoolChannelId> cnvCoolChannelIdToRxId(const L1CaloCoolChannelId& ppmCoolChannelId) const;
114 
115 
117  unsigned int pos_neg(const HWIdentifier & id) const;
118 
124  unsigned int em_had(const HWIdentifier & id) const;
125 
132  unsigned int barrel_endcap_fcal(const HWIdentifier & id) const;
133 
140  unsigned int module_type(const HWIdentifier & id) const;
141 
142 
143  //
144  //======================= Trigger Tower - cell/channel mapping methods ==================================
145  //
146 
153  std::vector<Identifier> createCellIDvecTT(const Identifier& id) const;
154 
161  std::vector<Identifier> createCellIDvecLayer(const Identifier& id) const;
162 
167  Identifier whichTTID(const Identifier & id) const;
168 
173  bool is_in_lvl1(const Identifier & id) const;
174 
175 
176  private:
177  const LArTTCellMap* getTTCellMap() const;
178  const CaloTTOnOffIdMap* getCaloTTOnOffIdMap() const;
180  const CaloTTPpmRxIdMap* getCaloTTPpmRxIdMap() const;
181 
190 
195 
196  std::string m_TTCellMapKey;
200 };
201 
202 #endif //CALOTRIGGERTOWERSERVICE_H
L1CaloCoolChannelId.h
CaloTriggerTowerService::m_caloTTPpmRxIdMap
CxxUtils::CachedPointer< const CaloTTPpmRxIdMap > m_caloTTPpmRxIdMap
Definition: CaloTriggerTowerService.h:194
L1CaloRxCoolChannelId.h
CaloTriggerTowerService::m_emHelper
const LArEM_ID * m_emHelper
pointer to the LArEM offline Id helper
Definition: CaloTriggerTowerService.h:185
CaloTriggerTowerService::m_TTCellMapKey
std::string m_TTCellMapKey
Definition: CaloTriggerTowerService.h:196
CaloTriggerTowerService::m_caloTTOnOffIdMapKey
std::string m_caloTTOnOffIdMapKey
Definition: CaloTriggerTowerService.h:197
CaloTriggerTowerService::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: CaloTriggerTowerService.h:53
CaloTriggerTowerService::m_TTCellMap
CxxUtils::CachedPointer< const LArTTCellMap > m_TTCellMap
Definition: CaloTriggerTowerService.h:191
CaloTriggerTowerService::m_caloTTOnOffIdMap
CxxUtils::CachedPointer< const CaloTTOnOffIdMap > m_caloTTOnOffIdMap
Definition: CaloTriggerTowerService.h:192
CaloTriggerTowerService::createCellIDvecLayer
std::vector< Identifier > createCellIDvecLayer(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Definition: CaloTriggerTowerService.cxx:370
CaloTriggerTowerService::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
pointer to the Calo TT offline Id helper
Definition: CaloTriggerTowerService.h:187
TTOnlineID
Helper class for Calo TT online identifiers.
Definition: TTOnlineID.h:37
CaloTriggerTowerService
Tool providing the mapping of the online and offline TriggerTower identifiers as well as the TT-cells...
Definition: CaloTriggerTowerService.h:50
LArID_Exception.h
CaloTriggerTowerService::m_onlineHelper
const LArOnlineID * m_onlineHelper
pointer to the LAr Online Id helper
Definition: CaloTriggerTowerService.h:183
CaloTriggerTowerService::em_had
unsigned int em_had(const HWIdentifier &id) const
return the corresponding sampling of channelId:
Definition: CaloTriggerTowerService.cxx:246
CaloTriggerTowerService::getTTCellMap
const LArTTCellMap * getTTCellMap() const
Definition: CaloTriggerTowerService.cxx:465
CaloTTPpmRxIdMap.h
CaloTriggerTowerService::m_caloTTOnAttrIdMapKey
std::string m_caloTTOnAttrIdMapKey
Definition: CaloTriggerTowerService.h:198
HWIdentifier
Definition: HWIdentifier.h:13
IOVSVC_CALLBACK_ARGS
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
Definition: IOVSvcDefs.h:24
CaloTTOnOffIdMap.h
CachedPointer.h
Cached pointer with atomic update.
CaloTriggerTowerService::whichTTID
Identifier whichTTID(const Identifier &id) const
return the offline id (CaloLVL1_ID) of the TT to which a cell id (CaloCell_ID) belongs The call is ...
Definition: CaloTriggerTowerService.cxx:389
CaloTriggerTowerService::createTTChannelID
HWIdentifier createTTChannelID(const Identifier &id, bool bQuiet=false) const
create a TT HWIdentifier from a TT Identifier
Definition: CaloTriggerTowerService.cxx:122
CaloTTOnOffIdMap
This is a StoreGate object holding the TT offline-online map.
Definition: CaloTTOnOffIdMap.h:26
CaloTriggerTowerService::getCaloTTOnOffIdMap
const CaloTTOnOffIdMap * getCaloTTOnOffIdMap() const
Definition: CaloTriggerTowerService.cxx:477
L1CaloRxCoolChannelId
Definition: L1CaloRxCoolChannelId.h:10
CaloTriggerTowerService::createCellIDvecTT
std::vector< Identifier > createCellIDvecTT(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Definition: CaloTriggerTowerService.cxx:334
LArTTCellMap.h
CaloTTOnAttrIdMap
Definition: CaloTTOnAttrIdMap.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloTriggerTowerService::finalize
StatusCode finalize()
Definition: CaloTriggerTowerService.cxx:108
CaloTriggerTowerService::cnvToIdentifier
Identifier cnvToIdentifier(const HWIdentifier &id, bool bQuiet=false) const
create a TT Identifier from a TT HWIdentifier
Definition: CaloTriggerTowerService.cxx:155
CaloTriggerTowerService::pos_neg
unsigned int pos_neg(const HWIdentifier &id) const
return 0 for z<0 channels and 1 for z>0 channels
Definition: CaloTriggerTowerService.cxx:261
AthAlgTool.h
CaloTriggerTowerService::m_ttonlineHelper
const TTOnlineID * m_ttonlineHelper
pointer to the Calo TT online Id helper
Definition: CaloTriggerTowerService.h:189
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloTriggerTowerService::is_in_lvl1
bool is_in_lvl1(const Identifier &id) const
return true if the cell is in the lvl1 sums; some channels mapped to TT are only in HLT (last HEC c...
Definition: CaloTriggerTowerService.cxx:416
CaloTriggerTowerService::is_initialized
bool is_initialized() const
Definition: CaloTriggerTowerService.cxx:115
CaloTriggerTowerService::cnvCoolChannelIdToRxId
std::vector< L1CaloRxCoolChannelId > cnvCoolChannelIdToRxId(const L1CaloCoolChannelId &ppmCoolChannelId) const
returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId
Definition: CaloTriggerTowerService.cxx:208
CaloTriggerTowerService::m_caloTTOnAttrIdMap
CxxUtils::CachedPointer< const CaloTTOnAttrIdMap > m_caloTTOnAttrIdMap
Definition: CaloTriggerTowerService.h:193
CaloLVL1_ID
Helper class for offline TT identifiers.
Definition: CaloLVL1_ID.h:66
HWIdentifier.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CaloTriggerTowerService::getCaloTTOnAttrIdMap
const CaloTTOnAttrIdMap * getCaloTTOnAttrIdMap() const
Definition: CaloTriggerTowerService.cxx:489
LArOnlineID
Definition: LArOnlineID.h:20
LArTTCellMap
This is a StoreGate object holding the offline TT-cell map.
Definition: LArTTCellMap.h:29
CaloTriggerTowerService::barrel_endcap_fcal
unsigned int barrel_endcap_fcal(const HWIdentifier &id) const
To know if a channel belongs to the barrel, end cap or fcal parts.
Definition: CaloTriggerTowerService.cxx:231
CaloTriggerTowerService::m_caloTTPpmRxIdMapKey
std::string m_caloTTPpmRxIdMapKey
Definition: CaloTriggerTowerService.h:199
CaloTriggerTowerService::cnvCoolChannelIdToHWID
HWIdentifier cnvCoolChannelIdToHWID(const L1CaloCoolChannelId &coolChannelId) const
create an HWIdentifier from an TDAQ CoolChannelId
Definition: CaloTriggerTowerService.cxx:318
L1CaloCoolChannelId
Definition: L1CaloCoolChannelId.h:10
CxxUtils::CachedPointer< const LArTTCellMap >
CaloTriggerTowerService::initialize
StatusCode initialize()
Definition: CaloTriggerTowerService.cxx:44
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloTriggerTowerService::module_type
unsigned int module_type(const HWIdentifier &id) const
To get the type of the module connected to the channel:
Definition: CaloTriggerTowerService.cxx:275
CaloTriggerTowerService::createL1CoolChannelId
L1CaloCoolChannelId createL1CoolChannelId(const HWIdentifier &id) const
create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
Definition: CaloTriggerTowerService.cxx:292
CaloTTPpmRxIdMap
This is a StoreGate object holding the TT PPM to RX channels map.
Definition: CaloTTPpmRxIdMap.h:27
CaloTriggerTowerService::getCaloTTPpmRxIdMap
const CaloTTPpmRxIdMap * getCaloTTPpmRxIdMap() const
Definition: CaloTriggerTowerService.cxx:501
IOVSvcDefs.h
defines and typedefs for IOVSvc
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
CaloTriggerTowerService::iovCallBack
virtual StatusCode iovCallBack(IOVSVC_CALLBACK_ARGS)
Definition: CaloTriggerTowerService.cxx:456
AthAlgTool
Definition: AthAlgTool.h:26
CaloID_Exception.h
CaloTriggerTowerService::cnvRxIdToCoolChannelId
L1CaloCoolChannelId cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId &rxCoolChannelId) const
returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId
Definition: CaloTriggerTowerService.cxx:184
CaloTriggerTowerService::CaloTriggerTowerService
CaloTriggerTowerService(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: CaloTriggerTowerService.cxx:22
CaloTTOnAttrIdMap.h
Identifier
Definition: IdentifierFieldParser.cxx:14