 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "CaloDetDescr/CaloDetDescrElement.h"
30 return StatusCode::SUCCESS;
41 ATH_MSG_ERROR(
"Call to LArCelldeadOTXAlg::buidMap returned an error");
42 return StatusCode::FAILURE;
46 std::unique_ptr<LArDeadOTXFromSC> deadHandle = std::make_unique<LArDeadOTXFromSC>();
52 return StatusCode::SUCCESS;
55 const unsigned int bcid = ctx.eventID().bunch_crossing_id();
59 std::vector<float> vecEnergies;
62 for (
const auto* supercell : *scells) {
68 const std::vector<unsigned short>& bcids = supercell->bcids();
69 const std::vector<int>& energies = supercell->energies();
70 const std::vector<bool>& satur = supercell->satur();
74 const size_t nBCIDs = bcids.size();
76 for (
i = 0;
i < nBCIDs && bcids[
i] !=
bcid;
i++)
85 vecEnergies[scIDHash]=scEne;
88 for(
size_t i=0;
i<m_channels.size();
i++){
89 std::vector<uint32_t>&
chans = m_channels.at(
i);
90 std::vector<float>& mults = m_multipliers.at(
i);
91 std::vector<float> cellEnergies;
92 cellEnergies.resize(128,0);
93 for(
size_t j=0; j<
chans.size(); j++) {
94 if (
chans[j] < 0xfffffffe ) cellEnergies[j] = mults[j]*vecEnergies[
chans[j]];
96 deadHandle->
addFEB(m_febs[
i],cellEnergies);
103 return StatusCode::SUCCESS;
108 sc = StatusCode::FAILURE;
119 ATH_MSG_ERROR(
"Do not have Onl-Ofl cabling map for SuperCells !!!!");
132 if (!caloMgrHandle.isValid()) {
146 const std::vector<std::pair<unsigned int, LArBadFeb> >& badFebs = mfHdl->
fullCont();
148 for (
const auto& idBF : badFebs) {
149 if (idBF.second.deadReadout()) {
151 m_febs.push_back(febid);
153 std::vector<float> vector_of_multipliers;
154 std::vector<uint32_t> vector_of_chans;
160 vector_of_multipliers.resize(nChans,0.0);
161 vector_of_chans.resize(nChans,0xffffffff);
162 for (
int ch = 0;
ch < nChans; ++
ch) {
169 if (!bcSCCont->
status(scHwid).good()) {
171 <<
" is ignored b/c of it's bad-channel word. Connected to deadFEB channel " <<
m_onlineID->
channel_name(chid));
174 const unsigned nCell = (
m_scidtool->superCellToOfflineID(scID)).
size();
177 ATH_MSG_INFO(
"No DetDescElement for cell hash : " << hashId);
180 const float convFactor = 12.5 * (1.0 / nCell) * (1.0 / dde->
sinTh());
181 vector_of_multipliers[
ch]=convFactor;
182 vector_of_chans[
ch]=hashidSC.
value();
185 m_multipliers.push_back(vector_of_multipliers);
186 m_channels.push_back(vector_of_chans);
190 sc = StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
const CaloCell_ID * m_calo_id
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
const_pointer_type cptr()
Dereference the pointer.
Container class for LArRawSC.
SG::ReadCondHandleKey< LArBadChannelCont > m_badSCKey
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
Gaudi::Property< int > m_scCut
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
#define ATH_MSG_VERBOSE(x)
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 LArOnline_SuperCellID * m_onlineSCID
SG::WriteHandleKey< LArDeadOTXFromSC > m_deadOTXFromSCKey
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
size_type channelHashMax() const
Define channel hash tables max size.
Handle class for recording to StoreGate.
const BadChanVec & fullCont() const
SG::ReadCondHandleKey< LArBadFebCont > m_MFKey
const LArOnlineID * m_onlineID
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
virtual StatusCode initialize() 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< LArOnOffIdMapping > m_cablingKey
void buildMap(const EventContext &ctx, StatusCode &sc) const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode initialize(bool used=true)
setEventNumber setTimeStamp bcid
This class provides the client interface for accessing the detector description information common to...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
#define ATH_MSG_WARNING(x)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingSCKey
ToolHandle< ICaloSuperCellIDTool > m_scidtool
SG::ReadHandleKey< LArRawSCContainer > m_SCKey
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.
virtual StatusCode execute(const EventContext &ctx) const override final
void addFEB(HWIdentifier febid, std::vector< float > &vec)
const_pointer_type cptr()