 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CaloDetDescr/CaloDetDescrElement.h"
25 return StatusCode::SUCCESS;
29 const EventContext& ctx = Gaudi::Hive::currentContext();
35 if (outputHdl.isValid()) {
37 return StatusCode::SUCCESS;
43 return StatusCode::FAILURE;
45 outputHdl.addDependency(cablingHdl);
50 ATH_MSG_ERROR(
"Do not have Onl-Ofl cabling map for SuperCells !!!!");
51 return StatusCode::FAILURE;
53 outputHdl.addDependency(cablingSCHdl);
59 return StatusCode::FAILURE;
61 outputHdl.addDependency(mfHdl);
64 if (!caloMgrHandle.isValid()) {
66 return StatusCode::FAILURE;
68 outputHdl.addDependency(caloMgrHandle);
74 return StatusCode::FAILURE;
76 outputHdl.addDependency(bcSCHdl);
79 const auto& badFebs = mfHdl->
fullCont();
81 std::unique_ptr<LArDeadOTXCorrFactors>
output=std::make_unique<LArDeadOTXCorrFactors>();
83 auto& scToHwidMap=
output->get();
85 unsigned nDeadFebs = 0;
86 for (
const auto& idBF : badFebs) {
87 if (idBF.second.deadReadout()) {
92 if (nChans < 1)
continue;
93 for (
int ch = 0;
ch < nChans; ++
ch) {
103 if (!bcSCCont->
status(scHwid).good()) {
105 <<
" is ignored b/c of it's bad-channel word. Connected to deadFEB channel " <<
m_onlineID->
channel_name(chid));
108 const unsigned nCell = (
m_scidtool->superCellToOfflineID(scID)).
size();
112 return StatusCode::FAILURE;
114 const float convFactor = 12.5 * (1.0 / nCell) * (1.0 / dde->
sinTh());
116 scToHwidMap[scHwid].emplace_back(hashId, convFactor);
121 if(outputHdl.record(std::move(
output)).isFailure()) {
122 ATH_MSG_ERROR(
"Could not record LArOnOffMapping object with "
124 <<
" with EventRange " << outputHdl.getRange()
125 <<
" into Conditions Store");
126 return StatusCode::FAILURE;
128 ATH_MSG_INFO(
"recorded new " << outputHdl.key() <<
" with range " << outputHdl.getRange() <<
" into Conditions Store");
133 ATH_MSG_INFO(
"Number of deadReadout FEBs for this IOV: " << nDeadFebs);
135 for (
const auto&
p : scToHwidMap) {
136 ATH_MSG_DEBUG(
" SuperCell with id 0x" << std::hex <<
p.first.get_identifier32().get_compact() << std::dec <<
" connected to " <<
p.second.size()
137 <<
" deadFEB channels.");
138 for (
const auto& [
h, convFactor] :
p.second) {
144 return StatusCode::SUCCESS;
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_cablingSCKey
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
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
virtual StatusCode initialize() override final
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
bool msgLvl(const MSG::Level lvl) const
ToolHandle< ICaloSuperCellIDTool > m_scidtool
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
value_type get_compact() const
Get the compact id.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
const BadChanVec & fullCont() const
const CaloCell_ID * m_calo_id
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
virtual StatusCode execute() override final
::StatusCode StatusCode
StatusCode definition for legacy code.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
SG::ReadCondHandleKey< LArBadChannelCont > m_badSCKey
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
SG::WriteCondHandleKey< LArDeadOTXCorrFactors > m_outputKey
SG::ReadCondHandleKey< LArBadFebCont > m_MFKey
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
This class provides the client interface for accessing the detector description information common to...
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
float sinTh() const
for algorithm working in transverse Energy
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.
const LArOnlineID * m_onlineID
const_pointer_type cptr()