-
Notifications
You must be signed in to change notification settings - Fork 158
MCH: added plots per cru link #2592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCH: added plots per cru link #2592
Conversation
Added computation of average quantities over SOLAR links, similar to what is already implemented for the averaging over Detection Elements
The changes are needed to sync with the updated helper code
The commit adds plots with quantities averaged over SOLAR links, similar to the existing ones as function of Detection Elements. It also adds comparisons of DE and SOLAR plots with reference ones, using the code from AliceO2Group#2578
The code that checks the SOLAR-based plots is similar to that for the DE-based ones. The checkers also fill a summary plot with the overall quality of each SOLAR link, which are then aggregared by a dedicated task.
The task combines the summary qualities for each DE and SOLAR link, and uploads a CCDB object with the list of bad DE and SOLAR IDs. The CCDB objects will be used to automatically reconfigure the bad links during the data taking.
|
@Barthelemy @knopers8 @justonedev1 sorry for the rather large PR, it actually contains similar code modifications in three MCH tasks and corresponding checkers. The changes introduce the possibility to propagate the results of the QC checks back to the DCS (via CCDB objects), such that we can then automate the reconfiguration of bad CRU links during the data taking. |
knopers8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I did not manage to spot any real issue. I left some pedantic suggestions for your consideration, but it can be merged as it is if needed.
| static std::string clusterChargeSourceName() { return "clcharge"; } | ||
| static std::string clusterSizeSourceName() { return "clsize"; } | ||
|
|
||
| TH1* getHistogram(std::string plotName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this might become a bottleneck here, but in principle it's better to avoid copies.
| TH1* getHistogram(std::string plotName); | |
| TH1* getHistogram(const std::string& plotName); // or std::string_view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I will use the string_view
| /// | ||
| /// \file QualityAggregatorTask.h | ||
| /// \author Andrea Ferrero andrea.ferrero@cern.ch | ||
| /// \brief Post-processing of the MCH pre-clusters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems to be a copy leftover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups...
| namespace o2::quality_control_modules::muonchambers | ||
| { | ||
|
|
||
| /// \brief A post-processing task which processes and trends MCH pre-clusters and produces plots. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems to be a copy leftover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups...
Modules/MUON/MCH/src/Helpers.cxx
Outdated
| if (deId < 0) { | ||
| deId = lMax + (nDEhc - indexInHalfChamber); | ||
| } | ||
| /*if (indexInHalfChamber > nDEqc) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing commented out code unless it is needed for soon development. The debug logs modified to use e.g. ILOG(Trace, Devel).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed thanks for spotting it
Modules/MUON/MCH/src/Helpers.cxx
Outdated
| try { | ||
| return m.at(solarId); | ||
| } catch (const std::exception&) { | ||
| ILOG(Error, Support) << "Invalid Solar Id: " << solarId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ILOG(Error, Support) << "Invalid Solar Id: " << solarId; | |
| ILOG(Error, Support) << "Invalid Solar Id: " << solarId << ENDM; |
missing ENDM, same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
Modules/MUON/MCH/src/Helpers.cxx
Outdated
| /* | ||
| constexpr int getNumSolar() | ||
| { | ||
| //static std::vector<uint32_t> v = buildSolarIndexToSolarIdMap(); | ||
| //return v.size(); | ||
| return 624; | ||
| } | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, will remove it
| return { nullptr, false }; | ||
| } | ||
| // retrieve QO from CCDB | ||
| auto qo = qcdb.retrieveMO(path, name, objectTimestamp, trigger.activity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why not ask the method to take care of retrieving the latest object? As far as I understand, you wouldn't need most of the code above in such case.
| auto qo = qcdb.retrieveMO(path, name, objectTimestamp, trigger.activity); | |
| auto qo = qcdb.retrieveMO(path, name, Timestamp::Latest, trigger.activity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are probably right, but I need to think a bit more about it. Since it is not really a bug in the code, but a possible simplification, I propose to leave it as it is for the moment. In any case I am planning some code refactoring in the YETS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, no problem. I was just curious if we miss a feature.
|
@knopers8 thanks for the review! I can push the proposed changes this evening, such that you could then merge tomorrow. Would it be fine for you? |
Yes, no problem. But the QC release will probably happen next week anyway, unless you need a patch with that. |
|
Thanks! No patch needed, I just want to make sure this one is included in next week's upgrade, since it will bring some simplification to our on-call operations. |
* [MCH] added averaging over SOLAR links Added computation of average quantities over SOLAR links, similar to what is already implemented for the averaging over Detection Elements * [MCH] added helper functions for handling SOLAR indexes and histogram decorations * [MCH] updated Pedestals Task histogram decorations The changes are needed to sync with the updated helper code * [MCH] added plots as function of SOLAR links The commit adds plots with quantities averaged over SOLAR links, similar to the existing ones as function of Detection Elements. It also adds comparisons of DE and SOLAR plots with reference ones, using the code from #2578 * [MCH] added checkers for SOLAR-based plots The code that checks the SOLAR-based plots is similar to that for the DE-based ones. The checkers also fill a summary plot with the overall quality of each SOLAR link, which are then aggregared by a dedicated task. * [MCH] added aggregator task for DE and SOLAR qualities The task combines the summary qualities for each DE and SOLAR link, and uploads a CCDB object with the list of bad DE and SOLAR IDs. The CCDB objects will be used to automatically reconfigure the bad links during the data taking. * [MCH] fixed clang errors * [MCH] added review suggestions
* [MCH] added averaging over SOLAR links Added computation of average quantities over SOLAR links, similar to what is already implemented for the averaging over Detection Elements * [MCH] added helper functions for handling SOLAR indexes and histogram decorations * [MCH] updated Pedestals Task histogram decorations The changes are needed to sync with the updated helper code * [MCH] added plots as function of SOLAR links The commit adds plots with quantities averaged over SOLAR links, similar to the existing ones as function of Detection Elements. It also adds comparisons of DE and SOLAR plots with reference ones, using the code from #2578 * [MCH] added checkers for SOLAR-based plots The code that checks the SOLAR-based plots is similar to that for the DE-based ones. The checkers also fill a summary plot with the overall quality of each SOLAR link, which are then aggregared by a dedicated task. * [MCH] added aggregator task for DE and SOLAR qualities The task combines the summary qualities for each DE and SOLAR link, and uploads a CCDB object with the list of bad DE and SOLAR IDs. The CCDB objects will be used to automatically reconfigure the bad links during the data taking. * [MCH] fixed clang errors * [MCH] added review suggestions
The missing initializations are related to new parameters introduced in AliceO2Group#2592
The PR introduces the code needed to plot relevant quantities (rates, efficiencies, fractions of good channels, etc...) averaged over each SOLAR board (i.e. CRU link). The final goal is to detect links that are bad in either of the monitored quantities, and store a list of bad links in the CCDB to allow automated re-configuration during the data taking.
The new code adds the following plots:
It also adds some comparisons with reference plots (using the feature introduced in #2578):
See the description of the individual commits for details.
There is some code duplication in the tasks, but I prefer to address it in a future PR, because some refactoring of the MCH code will be anyhow needed at this point.