|
ATLAS Offline Software
|
Go to the documentation of this file.
28 return StatusCode::SUCCESS;
41 if (!(rdocontainer.isValid())) {
44 fill(hitGroup, dataread_err);
45 return StatusCode::RECOVERABLE;
47 ATH_MSG_DEBUG(
"Pixel Monitoring: Pixel RDO container " << rdocontainer.name() <<
" is found.");
57 bool copyFEval(
false);
67 if (pixlayer == 99)
continue;
72 hitsPerEventArray.
DA[phiMod][
etaMod] = -1;
76 hitsPerEventArray.
DC[phiMod][
etaMod] = -1;
80 hitsPerEventArray.
B0[phiMod][
etaMod] = -1;
84 hitsPerEventArray.
B1[phiMod][
etaMod] = -1;
88 hitsPerEventArray.
B2[phiMod][
etaMod] = -1;
92 hitsPerEventArray.
IBL[phiMod][
etaMod] = -1;
93 if (copyFEval) hitsPerEventArray.
IBL[phiMod][++
etaMod] = -1;
117 for (; idIt != idItEnd; ++idIt) {
121 if (pixlayer == 99)
continue;
129 for (
int iFE=0; iFE<nFE; iFE++) {
131 if (not pixID.is_valid())
continue;
135 if (not is_active)
continue;
136 nActive_layer[iblsublayer]++;
137 if (is_good) nGood_layer[iblsublayer]++;
147 nActive_layer[pixlayer]++;
148 if (is_good) nGood_layer[pixlayer]++;
154 46080, 46080, 46080, 46080, 46080, 26880, 26880
159 nGoodChannels_layer[
i] = 1.0 * nChannels_mod[
i] * nGood_layer[
i];
160 nActiveChannels_layer[
i] = 1.0 * nChannels_mod[
i] * nActive_layer[
i];
167 ATH_MSG_DEBUG(
"Filling Raw Hit (RDO) Monitoring Histograms");
172 std::vector<int> hitLvl1a;
173 std::unordered_map<int, std::vector<int> > hitLvl1aLayer;
174 std::unordered_map<int, std::vector<int> > hitToTLayer;
178 for (
auto colNext: *rdocontainer) {
180 if (!HitCollection) {
181 ATH_MSG_DEBUG(
"Pixel Monitoring: Pixel Hit container is empty.");
183 fill(hitGroup, dataread_err);
187 for (
auto p_rdo: *HitCollection) {
188 rdoID = p_rdo->identify();
190 if (pixlayer == 99)
continue;
192 HitMap.
add(pixlayer, rdoID, 1.0);
196 hitLvl1a.push_back(p_rdo->getLVL1A());
200 hitsPerEventArray.
DA[phiMod][
etaMod]++;
204 hitsPerEventArray.
DC[phiMod][
etaMod]++;
208 hitsPerEventArray.
B0[phiMod][
etaMod]++;
212 hitsPerEventArray.
B1[phiMod][
etaMod]++;
216 hitsPerEventArray.
B2[phiMod][
etaMod]++;
227 nhits_layer[pixlayer]++;
228 hitLvl1aLayer[pixlayer].push_back(p_rdo->getLVL1A());
229 hitToTLayer[pixlayer].push_back(p_rdo->getToT());
238 for (
const auto& itr : hitLvl1aLayer) {
239 int layer = itr.first;
244 }
catch (std::out_of_range&
e) {
245 ATH_MSG_ERROR(
"Out of range access in PixelAthHitMonAlg::fillHistograms");
248 for (
const auto& itr : hitToTLayer) {
249 int layer = itr.first;
254 }
catch (std::out_of_range&
e) {
255 ATH_MSG_ERROR(
"Out of range access in PixelAthHitMonAlg::fillHistograms");
261 fill(hitGroup, lbval, nhitsval);
264 fillFromArrays(
"HitOccupancyPP0", hitsPerEventArray,
"OccupancyPerPixelEvent");
267 if (nGoodChannels_layer[
i] > 0) avgocc_good_layer[
i] = nhits_layer[
i] / nGoodChannels_layer[
i];
270 if (nActiveChannels_layer[
i] > 0) avgocc_active_layer[
i] = nhits_layer[
i] / nActiveChannels_layer[
i];
277 float avgocc_good_ibl(0);
279 if (avgocc_good_ibl > 0) {
281 avgocc_ratio_toIBL_layer[
i] = avgocc_good_layer[
i] / avgocc_good_ibl;
288 fill(hitGroup, dataread_err);
294 return StatusCode::SUCCESS;
int getPixLayersID(int ec, int ld) const
helper function to get layers ID
std::vector< Identifier >::const_iterator const_id_iterator
const_id_iterator wafer_end(void) const
virtual StatusCode initialize() override
initialize
const PixelID * m_pixelid
const_pointer_type cptr()
Dereference the pointer.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadHandleKey< PixelRDO_Container > m_pixelRDOName
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatusActiveOnly
Optional read handle to get status data to test whether a pixel detector element is active.
const std::string pixLayersLabel[PixLayers::COUNT]
virtual StatusCode initialize() override
initialize
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
bool empty() const
Test if the key is blank.
SG::ReadHandle< InDet::SiDetectorElementStatus > getPixelDetElStatus(const SG::ReadHandleKey< InDet::SiDetectorElementStatus > &key, const EventContext &ctx) const
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Base class for Athena Monitoring Algorithms.
void fill2DProfLayerAccum(const VecAccumulator2DMap &accumulator) const
take VecAccumulator2DMap and fill the corresponding group
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::tuple< bool, bool > isChipGood(const IdentifierHash &module_hash, unsigned int chip_i) const
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Generic monitoring tool for athena components.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool isActive(const InDet::SiDetectorElementStatus *element_status, const IdentifierHash &module_hash) const
int DC[PixMon::kNumModulesDisk][PixMon::kNumLayersDisk]
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::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
void fill1DProfLumiLayers(const std::string &prof1Dname, int lb, float *weights, int nlayers=PixLayers::COUNT) const
filling 1DProf per-lumi per-layer histograms ["ECA","ECC","BLayer","Layer1","Layer2",...
int layer_disk(const Identifier &id) const
int DA[PixMon::kNumModulesDisk][PixMon::kNumLayersDisk]
int eta_module(const Identifier &id) const
int B1[PixMon::kNumStavesL1][PixMon::kNumModulesBarrel]
setEventNumber setTimeStamp bcid
void getPhiEtaMod(Identifier &id, int &phiMod, int &etaMod, bool ©FE) const
helper function to get eta phi coordinates of per-layer arrays
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
helper class to accumulate points to fill a 2D plot with
void add(const int layer, const Identifier &id, float value=1.0)
helper class to accumulate points to fill a 2D per-module plot with
void fillFromArrays(const std::string &namePP0, AccumulatorArrays &pixarrays, const std::string &name2DMap="") const
filling 1DProfile per-pp0(ROD) histograms for ["ECA","ECC","BLayer","Layer1","Layer2",...
bool isGood(const InDet::SiDetectorElementStatus *element_status, const IdentifierHash &module_hash) const
int getNumberOfFEs(int pixlayer, int etaMod) const
helper function to get number of FEs per module
Declare a monitored scalar variable.
PixelAthHitMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
int B0[PixMon::kNumStavesL0][PixMon::kNumModulesBarrel]
int B2[PixMon::kNumStavesL2][PixMon::kNumModulesBarrel]
const ToolHandle< GenericMonitoringTool > & getGroup(const std::string &name) const
Get a specific monitoring tool from the tool handle array.
int IBL[PixMon::kNumStavesIBL][PixMon::kNumFEsIBL]