|
ATLAS Offline Software
|
Go to the documentation of this file.
45 return StatusCode::FAILURE;
50 ATH_MSG_ERROR(
"Do not have Onl-Ofl cabling map for SuperCells !!!!");
51 return StatusCode::FAILURE;
56 ATH_MSG_ERROR(
"Do not have CaloSuperCellDetDescrManager !!!!");
57 return StatusCode::FAILURE;
63 return StatusCode::FAILURE;
70 return StatusCode::FAILURE;
78 return StatusCode::SUCCESS;
87 return StatusCode::SUCCESS;
95 bcidavgshift = bcidavgshiftHdl.
cptr();
98 const unsigned int bcid = ctx.eventID().bunch_crossing_id();
106 std::vector<std::vector<MonValues>> MonValueVec(
m_layerNames.size());
108 for (
const LArRawSC* rawSC : *scHdl) {
109 const std::vector<unsigned short>& bcids = rawSC->bcids();
110 const std::vector<int>& energies = rawSC->energies();
111 const std::vector<bool>& satur = rawSC->satur();
116 const size_t nBCIDs = bcids.size();
118 for (
i = 0;
i < nBCIDs && bcids[
i] !=
bcid;
i++)
123 if (!bcSCCont->
status(rawSC->hardwareID()).good())
135 return StatusCode::FAILURE;
137 const std::vector<Identifier>& regularIDs =
m_scidtool->superCellToOfflineID(off_id);
138 std::set<HWIdentifier> hwids;
144 const size_t nChans = rcHdl->size();
145 bool hasBadChan =
false;
146 for (
size_t i = 0;
i < nChans && !hwids.empty(); ++
i) {
148 if (hwids.contains(rc.hardwareID())) {
154 bcHdl->
status(rc.hardwareID()).deadReadout();
155 eneSum += rc.energy();
157 eneSum -= bcidavgshift->
average(rc.hardwareID());
158 hwids.erase(rc.hardwareID());
164 <<
" is connected to at least one bad channel. Ignoring SC.");
167 if (!hwids.empty()) {
169 <<
" attached regular RawChannels not found");
173 scEne *= 12.5 / scDDE->
sinTh();
175 <<
"]=" << scEne <<
" Sum of RC energies=" << eneSum <<
", Ratio=" << (eneSum != 0 ? scEne / eneSum : 0.0));
179 <<
"]=" << scEne <<
" Sum of RC energies=" << eneSum);
183 if ( eneSum != 0 and scEne != 0 ){
184 eneFrac = scEne / eneSum;
193 const unsigned iLyr=iLyrNS*2+
side;
195 auto& lvaluemap = MonValueVec[iLyr];
200 auto& monPair = monVars[iPart];
201 monPair.first = scEne;
202 monPair.second = eneSum;
205 lvaluemap.emplace_back(
eta,
phi, scEne, eneSum, eneFrac);
212 for (
size_t ilayer = 0; ilayer < MonValueVec.size(); ++ilayer) {
213 const auto&
tool = MonValueVec[ilayer];
221 part_eta, part_phi, part_scEne, part_eneSum, part_eneFrac);
226 return StatusCode::SUCCESS;
247 const int pNoSide = samplingToPartitonMap[
s];
def retrieve(aClass, aKey=None)
Liquid Argon SuperCell raw data.
Gaudi::Property< int > m_scEneCut
Gaudi::Property< std::string > m_MonGroupName
Scalar phi() const
phi method
const_pointer_type cptr()
Dereference the pointer.
int getPartition(const Identifier &scid) const
Scalar eta() const
pseudorapidity method
const LArOnlineID * m_onlineID
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
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.
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) 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.
float eta_raw() const
cell eta_raw
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
SG::ReadCondHandleKey< LArBadChannelCont > m_badChanKey
Gaudi::Property< std::vector< std::string > > m_problemsToMask
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingSCKey
std::map< std::string, int > m_toolmapPerLayer
SG::ReadHandleKey< LArRawSCContainer > m_SCKey
Liquid Argon ROD output object base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
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...
LArBadChannelMask m_bcMask
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::ReadHandleKey< LArRawChannelContainer > m_RCKey
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?
StringArrayProperty m_partitionNames
const std::array< unsigned, CaloSampling::Unknown > m_caloSamplingToLyrNS
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
StatusCode initialize(bool used=true)
setEventNumber setTimeStamp bcid
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
virtual StatusCode initialize() override final
initialize
virtual StatusCode initialize() override
initialize
float average(const Identifier &id) const
CaloCell_ID::CaloSample getSampling() const
cell sampling
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< CaloBCIDAverage > m_caloBCIDAvg
SG::ReadCondHandleKey< LArBadChannelCont > m_badSCKey
const CaloCell_ID * m_calo_id
float eta() const
cell eta
float sinTh() const
for algorithm working in transverse Energy
Declare a monitored scalar variable.
Gaudi::Property< bool > m_warnOffenders
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
size_type size() const noexcept
Returns the number of elements in the collection.
StringArrayProperty m_layerNames
float phi_raw() const
cell phi_raw