[PWGUD] modify mc producer & dihadron codes - #17295
Conversation
miedema-11
commented
Aug 3, 2026
- an improved version for flow mc
- add event selection switch for dihadron
|
O2 linter results: ❌ 0 errors, |
|
Error while checking build/O2Physics/code-check for c651528 at 2026-08-04 19:05: Full log here. |
|
Hi, could you please merge the codes? Thank you very much |
|
@miedema-11 Why have you not fixed the errors? |
| using namespace o2::aod::rctsel; | ||
|
|
||
| #define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP}; | ||
| #define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, (DEFAULT), (HELP)}; // NOLINT(bugprone-macro-parentheses) |
There was a problem hiding this comment.
Why do you disable the error?
| kITSLayersAll, | ||
| kITSLayer0123, | ||
| kITSLayer3, | ||
| kCount_ITSLayersFlag |
There was a problem hiding this comment.
Follow naming conventions.
| TAxis* fPtAxis = nullptr; | ||
| std::vector<GFW::CorrConfig> corrconfigsTruth; | ||
| std::vector<GFW::CorrConfig> corrconfigsReco; | ||
| TRandom3* fRndm = new TRandom3(0); |
There was a problem hiding this comment.
- Why do you use dynamic memory allocation?
- Where is the object destroyed?
| if (!cfgFlowAcceptance.value.empty()) { | ||
| mAcceptance = ccdb->getForTimeStamp<GFWWeights>(cfgFlowAcceptance, timestamp); | ||
| if (mAcceptance) { | ||
| LOGF(info, "Loaded acceptance weights from %s (%p)", cfgFlowAcceptance.value.c_str(), static_cast<void*>(mAcceptance)); |
There was a problem hiding this comment.
Hi @miedema-11, when you have LOGF with info or warning make sure it goes with a switch where you may disable this kind of outputs. Outputs sometimes are very heavy and can cause HY crash.
There was a problem hiding this comment.
Hi @miedema-11, you should implement a configurable flag. Let's call it debug. By default it should be false. When something is going wrong with your code you set it true and run the code for diagnostics. The structure is following: before each LOGF(info,...) and LOGF(warning,...) you use debud. Example:
if (debug) {
LOGF(info,...)
do other things;
}
I hope it helps
There was a problem hiding this comment.
Thank you for your suggestion, I have deleted this line since I don't need this debug. But the latest error doesn't seem to come from this. It is an error from the other file saying I have a redundant boolean, but I don't think it is redundant.
|
@miedema-11 The PR title does not tell me anything about which workflow or analysis is affected. |
|
Error while checking build/O2Physics/code-check for db0e755 at 2026-08-05 20:55: Full log here. |
|
I have already tried to fix some errors from code checks, but I don't really understand the other one and I still hope to keep mine for readability and future modification. Thank you so much |
|
Error while checking build/O2Physics/code-check for 9c466ef at 2026-08-06 09:33: Full log here. |