|
ATLAS Offline Software
|
Go to the documentation of this file.
3 #include "CaloDetDescr/CaloDetDescrElement.h"
20 return StatusCode::SUCCESS;
28 return StatusCode::FAILURE;
33 ATH_MSG_ERROR(
"Do not have Onl-Ofl cabling map for SuperCells !!!!");
34 return StatusCode::FAILURE;
39 ATH_MSG_ERROR(
"Do not have CaloSuperCellDetDescrManager !!!!");
40 return StatusCode::FAILURE;
45 ATH_MSG_ERROR(
"Do not have CaloSuperCellDetDescrManager !!!!");
46 return StatusCode::FAILURE;
49 std::bitset<190000> usedIds;
57 const double scEtaRange[2] = {scDDE->
eta_raw() - scDDE->
deta() / 2.0, scDDE->
eta_raw() + scDDE->
deta() / 2.0};
58 const double scPhiRange[2] = {scDDE->
phi_raw() - scDDE->
dphi() / 2.0, scDDE->
phi_raw() + scDDE->
dphi() / 2.0};
59 const std::vector<Identifier>& regularIDs =
m_scidtool->superCellToOfflineID(scId);
60 std::cout <<
"SuperCell 0x" << std::hex << scId.
get_identifier32().
get_compact() <<
" (0x" << scHWID.get_identifier32().get_compact() << std::dec
65 if (usedIds.test(
hash)) {
66 ATH_MSG_ERROR(
"Identifier " <<
id.get_identifier32().get_compact() <<
"used in multiple SCs");
82 const std::array<int, 3> FTid{barrel_ec, pos_neg, feedthough};
84 ATH_MSG_ERROR(
"Online FTID mismatch: SC-hwid=" << scFTid <<
", hwid=" << FTid);
96 ATH_MSG_ERROR(
"Region id mismatch: SC reg " << scReg <<
", reg=" << reg);
98 std::cout <<
"\tEta=" << dde->
eta_raw() <<
" Phi=" << dde->
phi_raw() <<
", sampling=" <<
layer << std::endl;
100 ATH_MSG_ERROR(
"Cell eta=" << dde->
eta_raw() <<
" outside of supercell eta boundaries [" << scEtaRange[0] <<
"," << scEtaRange[1] <<
"]");
103 ATH_MSG_ERROR(
"Cell phi=" << dde->
phi_raw() <<
" outside of supercell phi boundaries [" << scPhiRange[0] <<
"," << scPhiRange[1] <<
"]");
108 unsigned nUnused = 0;
110 if (!usedIds.test(
i)) {
118 if (nUnused != 128) {
119 ATH_MSG_ERROR(
"Expected 128 regular cells not connected to any SC, got " << nUnused);
122 return StatusCode::SUCCESS;
float deta() const
cell deta
def retrieve(aClass, aKey=None)
HWIdentifier createSignalChannelIDFromHash(const IdentifierHash &id_hash) const
create a HWIdentifier from an Identifier (from hash) (inline)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
constexpr double tolerance
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
const CaloCell_ID * m_caloCellId
bool isEMECIW(const HWIdentifier id) const override final
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
const CaloCell_SuperCell_ID * m_scCaloCellId
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
bool is_valid() const
Check if id is in a valid state.
value_type get_compact() const
Get the compact id.
ToolHandle< ICaloSuperCellIDTool > m_scidtool
float eta_raw() const
cell eta_raw
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
StatusCode execute(const EventContext &ctx) const
id_range channel_range() const
::StatusCode StatusCode
StatusCode definition for legacy code.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
const LArOnline_SuperCellID * m_scOnlineId
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
float dphi() const
cell dphi
const LArOnlineID * m_onlineId
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_scCablingKey
float phi_raw() const
cell phi_raw
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size