|
ATLAS Offline Software
|
Go to the documentation of this file.
20 const std::string&
name,
25 declareInterface<CaloTriggerTowerService>(
this);
32 ATH_MSG_INFO(
" => CaloTriggerTowerService::initialize()");
51 TClass::GetClass (
"LArTTCell_P");
52 TClass::GetClass (
"LArTTCell_P::LArTTCell_P_t");
53 TClass::GetClass (
"std::vector<LArTTCell_P::LArTTCell_P_t>");
55 return StatusCode::SUCCESS;
66 if(!caloTTOnOffIdMap ) {
68 ATH_MSG_ERROR(
" Has the DB folder holding the CaloTTOnOffIdMap been added to IOVDbSvc ? ");
69 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
80 if(sid == invalidId) {
83 except.
message(
"HWIdentifier not found in map ") ;
98 if(!caloTTOnOffIdMap ) {
100 ATH_MSG_ERROR(
" Has the DB folder holding the CaloTTOnOffIdMap been added to IOVDbSvc ? ");
101 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
114 except.
message(
" Online ID not found in map ") ;
127 if(!caloTTPpmRxIdMap ) {
129 ATH_MSG_ERROR(
" Has the DB folder holding the CaloTTPpmRxIdMap been added to IOVDbSvc ? ");
130 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
139 except.
message(
" Rx channel ID not found in map ") ;
149 if(!caloTTPpmRxIdMap ) {
151 ATH_MSG_ERROR(
" Has the DB folder holding the CaloTTPpmRxIdMap been added to IOVDbSvc ? ");
152 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
157 std::vector<L1CaloRxCoolChannelId> rxChannels = caloTTPpmRxIdMap->
ppmToRxId(ppmCoolChannelId);
158 if(rxChannels.empty()) {
161 except.
message(
" Ppm channel ID not found in map ") ;
172 if(!caloTTOnAttrIdMap) {
174 ATH_MSG_ERROR(
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
175 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
187 if(!caloTTOnAttrIdMap) {
189 ATH_MSG_ERROR(
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
190 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
202 if(!caloTTOnAttrIdMap) {
204 ATH_MSG_ERROR(
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
205 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
217 if(!caloTTOnAttrIdMap) {
219 ATH_MSG_ERROR(
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
220 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
233 if(caloTTOnAttrIdMap) {
248 ATH_MSG_ERROR(
" Has the DB folder holding the CaloTTOnAttrIdMap been added to IOVDbSvc ? ");
249 ATH_MSG_ERROR(
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
258 unsigned int crate = coolChannelId.
crate();
260 unsigned int submodule = coolChannelId.
subModule();
271 std::vector<Identifier>
275 std::vector<Identifier>
vec ;
277 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
278 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
288 int maxLay=m_lvl1Helper->layer_max(regId);
290 for(
int iLay=0;iLay<=maxLay;++iLay) {
292 Identifier layId = m_lvl1Helper->layer_id(ttId,iLay);
294 std::vector<Identifier>::const_iterator
it = vecp.begin();
295 std::vector<Identifier>::const_iterator it_e = vecp.end();
296 for (;
it!=it_e; ++
it) {
307 std::vector<Identifier>
311 std::vector<Identifier>
vec ;
314 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
315 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
332 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
333 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
342 if(sid == invalidId ){
344 except.
message(
"Identifier not found in map ") ;
366 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
367 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
369 if(m_emHelper->is_em_barrel(
id)) {
370 int samp=m_emHelper->sampling(
id);
372 int eta=m_emHelper->eta(
id);
379 if(m_lvl1Helper->is_hec(ttId)) {
380 int layer = m_lvl1Helper->layer(ttId);
def retrieve(aClass, aKey=None)
CxxUtils::CachedPointer< const CaloTTPpmRxIdMap > m_caloTTPpmRxIdMap
int channel(const HWIdentifier id) const
const LArEM_ID * m_emHelper
pointer to the LArEM offline Id helper
virtual StatusCode initialize() override
Exception class for Calo Identifiers.
CxxUtils::CachedPointer< const LArTTCellMap > m_TTCellMap
CxxUtils::CachedPointer< const CaloTTOnOffIdMap > m_caloTTOnOffIdMap
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
std::vector< Identifier > createCellIDvecLayer(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Scalar eta() const
pseudorapidity method
const CaloLVL1_ID * m_lvl1Helper
pointer to the Calo TT offline Id helper
const LArEM_ID * getEM_ID(void) const
Identifier whichTTID(const Identifier &id) const
return the offline id (CaloLVL1_ID) of the TT to which a cell (CaloCell_ID) belongs
const LArOnlineID * m_onlineHelper
pointer to the LAr Online Id helper
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
const std::vector< Identifier > & createCellIDvec(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
unsigned int em_had(const HWIdentifier &id) const
return the corresponding sampling of channelId:
const LArTTCellMap * getTTCellMap() const
std::vector< L1CaloRxCoolChannelId > ppmToRxId(const L1CaloCoolChannelId &ppmChannelId) const
return the corresponding Rx channels to the Ppm input one
unsigned int crate() const
std::vector< size_t > vec
Gaudi::Property< std::string > m_caloTTOnAttrIdMapKey
HWIdentifier createSignalChannelID(const Identifier &id, bool bQuiet=false) const
return the corresponfing online Id of an offline one
unsigned int module_type(HWIdentifier channelId) const
To get the type of the module connected to the channel:
unsigned int em_had(HWIdentifier channelId) const
return the corresponding sampling of channelId:
bool is_valid() const
Check if id is in a valid state.
void set(pointer_t elt) const
Set the element, assuming it is currently null.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
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 ...
HWIdentifier createTTChannelID(const Identifier &id, bool bQuiet=false) const
create a TT HWIdentifier from a TT Identifier
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
This is a StoreGate object holding the TT offline-online map.
const CaloTTOnOffIdMap * getCaloTTOnOffIdMap() const
int module(const HWIdentifier id) const
Gaudi::Property< std::string > m_TTCellMapKey
std::vector< Identifier > createCellIDvecTT(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Identifier cnvToIdentifier(const HWIdentifier &sid, bool bQuiet=false) const
return the corresponfing offline Id of an online one
L1CaloCoolChannelId rxToPpmId(const L1CaloRxCoolChannelId &rxChannelId) const
return the corresponfing ppm channel to the Rx input one
This class initializes the Calo (LAr and Tile) offline identifiers.
unsigned int channel() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Identifier cnvToIdentifier(const HWIdentifier &id, bool bQuiet=false) const
create a TT Identifier from a TT HWIdentifier
unsigned int pos_neg(const HWIdentifier &id) const
return 0 for z<0 channels and 1 for z>0 channels
const TTOnlineID * m_ttonlineHelper
pointer to the Calo TT online Id helper
const CaloLVL1_ID * getLVL1_ID(void) const
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...
Gaudi::Property< std::string > m_caloTTPpmRxIdMapKey
std::vector< L1CaloRxCoolChannelId > cnvCoolChannelIdToRxId(const L1CaloCoolChannelId &ppmCoolChannelId) const
returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId
CxxUtils::CachedPointer< const CaloTTOnAttrIdMap > m_caloTTOnAttrIdMap
const CaloTTOnAttrIdMap * getCaloTTOnAttrIdMap() const
Gaudi::Property< std::string > m_caloTTOnOffIdMapKey
This is a StoreGate object holding the offline TT-cell map.
void message(const std::string &lMessage)
set error message
unsigned int barrel_endcap_fcal(const HWIdentifier &id) const
To know if a channel belongs to the barrel, end cap or fcal parts.
void message(const std::string &l_message)
set error message
HWIdentifier cnvCoolChannelIdToHWID(const L1CaloCoolChannelId &coolChannelId) const
create an HWIdentifier from an TDAQ CoolChannelId
int submodule(const HWIdentifier id) const
unsigned int module_type(const HWIdentifier &id) const
To get the type of the module connected to the channel:
L1CaloCoolChannelId createL1CoolChannelId(const HWIdentifier &id) const
create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
This is a StoreGate object holding the TT PPM to RX channels map.
HWIdentifier channelId(int crate, int module, int submodule, int channel) const
(1) create towerId from fields
pointer_t get() const
Return the current value of the element.
const CaloTTPpmRxIdMap * getCaloTTPpmRxIdMap() const
const TTOnlineID * getTTOnlineID(void) const
int crate(const HWIdentifier id) const
L1CaloCoolChannelId cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId &rxCoolChannelId) const
returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId
Exception class for LAr Identifiers.
unsigned int subModule() const
CaloTriggerTowerService(const std::string &type, const std::string &name, const IInterface *parent)
constructor
unsigned int module(bool logical=true) const
void code(int lCode)
set error code number