ATLAS Offline Software
CaloTriggerTowerService.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOTRIGGERTOWERSERVICE_H
6 #define CALOTRIGGERTOWERSERVICE_H
7 
8 // Gaudi
10 
11 #include <vector>
12 #include <string>
13 
18 
22 
25 #include "CxxUtils/CachedPointer.h"
26 
27 
28 class Identifier;
29 class LArOnlineID;
30 class LArEM_ID;
31 class TTOnlineID;
32 class CaloLVL1_ID;
33 
34 static const InterfaceID IID_CaloTriggerTowerService("CaloTriggerTowerService", 1 , 0);
35 
46 {
47  public:
49  static const InterfaceID& interfaceID() { return IID_CaloTriggerTowerService; }
50 
52  CaloTriggerTowerService( const std::string& type, const std::string& name, const IInterface* parent ) ;
53 
54  virtual StatusCode initialize( ) override;
55 
56  //
57  //======================= on-off mapping methods (Trigger Towers) ==================================
58  //
59 
64  HWIdentifier createTTChannelID(const Identifier & id, bool bQuiet=false) const;
65 
66 
71  Identifier cnvToIdentifier(const HWIdentifier & id, bool bQuiet=false) const;
72 
73 
78  //unsigned int createL1CoolChannelId( const HWIdentifier & id );
80 
81 
86  //HWIdentifier cnvCoolChannelIdToHWID( const unsigned int coolChannelId );
87  HWIdentifier cnvCoolChannelIdToHWID( const L1CaloCoolChannelId& coolChannelId ) const;
88 
89 
90 
91 
97 
98 
104  std::vector<L1CaloRxCoolChannelId> cnvCoolChannelIdToRxId(const L1CaloCoolChannelId& ppmCoolChannelId) const;
105 
106 
108  unsigned int pos_neg(const HWIdentifier & id) const;
109 
115  unsigned int em_had(const HWIdentifier & id) const;
116 
123  unsigned int barrel_endcap_fcal(const HWIdentifier & id) const;
124 
131  unsigned int module_type(const HWIdentifier & id) const;
132 
133 
134  //
135  //======================= Trigger Tower - cell/channel mapping methods ==================================
136  //
137 
144  std::vector<Identifier> createCellIDvecTT(const Identifier& id) const;
145 
152  std::vector<Identifier> createCellIDvecLayer(const Identifier& id) const;
153 
158  Identifier whichTTID(const Identifier & id) const;
159 
164  bool is_in_lvl1(const Identifier & id) const;
165 
166 
167  private:
168  const LArTTCellMap* getTTCellMap() const;
169  const CaloTTOnOffIdMap* getCaloTTOnOffIdMap() const;
171  const CaloTTPpmRxIdMap* getCaloTTPpmRxIdMap() const;
172 
174  const LArOnlineID * m_onlineHelper{nullptr} ;
176  const LArEM_ID * m_emHelper{nullptr};
178  const CaloLVL1_ID * m_lvl1Helper{nullptr} ;
180  const TTOnlineID * m_ttonlineHelper{nullptr};
181 
186 
187  Gaudi::Property<std::string> m_TTCellMapKey{this, "LArTTCellMapKey", "LArTTCellMapAtlas"};
188  Gaudi::Property<std::string> m_caloTTOnOffIdMapKey{this, "CaloTTOnOffIdMapKey", "CaloTTOnOffIdMapAtlas"};
189  Gaudi::Property<std::string> m_caloTTOnAttrIdMapKey{this, "CaloTTOnAttrIdMapKey", "CaloTTOnAttrIdMapAtlas"};
190  Gaudi::Property<std::string> m_caloTTPpmRxIdMapKey{this, "CaloTTPpmRxIdMapKey", "CaloTTPpmRxIdMapAtlas"};
191 
192 };
193 
194 #endif //CALOTRIGGERTOWERSERVICE_H
L1CaloCoolChannelId.h
CaloTriggerTowerService::m_caloTTPpmRxIdMap
CxxUtils::CachedPointer< const CaloTTPpmRxIdMap > m_caloTTPpmRxIdMap
Definition: CaloTriggerTowerService.h:185
L1CaloRxCoolChannelId.h
CaloTriggerTowerService::m_emHelper
const LArEM_ID * m_emHelper
pointer to the LArEM offline Id helper
Definition: CaloTriggerTowerService.h:176
CaloTriggerTowerService::initialize
virtual StatusCode initialize() override
Definition: CaloTriggerTowerService.cxx:30
CaloTriggerTowerService::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: CaloTriggerTowerService.h:49
CaloTriggerTowerService::m_TTCellMap
CxxUtils::CachedPointer< const LArTTCellMap > m_TTCellMap
Definition: CaloTriggerTowerService.h:182
CaloTriggerTowerService::m_caloTTOnOffIdMap
CxxUtils::CachedPointer< const CaloTTOnOffIdMap > m_caloTTOnOffIdMap
Definition: CaloTriggerTowerService.h:183
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:308
CaloTriggerTowerService::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
pointer to the Calo TT offline Id helper
Definition: CaloTriggerTowerService.h:178
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:46
LArID_Exception.h
CaloTriggerTowerService::m_onlineHelper
const LArOnlineID * m_onlineHelper
pointer to the LAr Online Id helper
Definition: CaloTriggerTowerService.h:174
CaloTriggerTowerService::em_had
unsigned int em_had(const HWIdentifier &id) const
return the corresponding sampling of channelId:
Definition: CaloTriggerTowerService.cxx:184
CaloTriggerTowerService::getTTCellMap
const LArTTCellMap * getTTCellMap() const
Definition: CaloTriggerTowerService.cxx:395
CaloTTPpmRxIdMap.h
CaloTriggerTowerService::m_caloTTOnAttrIdMapKey
Gaudi::Property< std::string > m_caloTTOnAttrIdMapKey
Definition: CaloTriggerTowerService.h:189
HWIdentifier
Definition: HWIdentifier.h:13
CaloTTOnOffIdMap.h
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
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:327
CaloTriggerTowerService::createTTChannelID
HWIdentifier createTTChannelID(const Identifier &id, bool bQuiet=false) const
create a TT HWIdentifier from a TT Identifier
Definition: CaloTriggerTowerService.cxx:60
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:407
CaloTriggerTowerService::m_TTCellMapKey
Gaudi::Property< std::string > m_TTCellMapKey
Definition: CaloTriggerTowerService.h:187
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:272
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::cnvToIdentifier
Identifier cnvToIdentifier(const HWIdentifier &id, bool bQuiet=false) const
create a TT Identifier from a TT HWIdentifier
Definition: CaloTriggerTowerService.cxx:93
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:199
AthAlgTool.h
CaloTriggerTowerService::m_ttonlineHelper
const TTOnlineID * m_ttonlineHelper
pointer to the Calo TT online Id helper
Definition: CaloTriggerTowerService.h:180
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:354
CaloTriggerTowerService::m_caloTTPpmRxIdMapKey
Gaudi::Property< std::string > m_caloTTPpmRxIdMapKey
Definition: CaloTriggerTowerService.h:190
CaloTriggerTowerService::cnvCoolChannelIdToRxId
std::vector< L1CaloRxCoolChannelId > cnvCoolChannelIdToRxId(const L1CaloCoolChannelId &ppmCoolChannelId) const
returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId
Definition: CaloTriggerTowerService.cxx:146
CaloTriggerTowerService::m_caloTTOnAttrIdMap
CxxUtils::CachedPointer< const CaloTTOnAttrIdMap > m_caloTTOnAttrIdMap
Definition: CaloTriggerTowerService.h:184
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:228
CaloTriggerTowerService::getCaloTTOnAttrIdMap
const CaloTTOnAttrIdMap * getCaloTTOnAttrIdMap() const
Definition: CaloTriggerTowerService.cxx:419
CaloTriggerTowerService::m_caloTTOnOffIdMapKey
Gaudi::Property< std::string > m_caloTTOnOffIdMapKey
Definition: CaloTriggerTowerService.h:188
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:169
CaloTriggerTowerService::cnvCoolChannelIdToHWID
HWIdentifier cnvCoolChannelIdToHWID(const L1CaloCoolChannelId &coolChannelId) const
create an HWIdentifier from an TDAQ CoolChannelId
Definition: CaloTriggerTowerService.cxx:256
L1CaloCoolChannelId
Definition: L1CaloCoolChannelId.h:10
CxxUtils::CachedPointer< const LArTTCellMap >
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:213
CaloTriggerTowerService::createL1CoolChannelId
L1CaloCoolChannelId createL1CoolChannelId(const HWIdentifier &id) const
create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
Definition: CaloTriggerTowerService.cxx:230
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:431
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
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:122
CaloTriggerTowerService::CaloTriggerTowerService
CaloTriggerTowerService(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: CaloTriggerTowerService.cxx:19
CaloTTOnAttrIdMap.h
Identifier
Definition: IdentifierFieldParser.cxx:14