[PWGUD] Adding bc-by-bc trigger info and getting info from DB#17058
[PWGUD] Adding bc-by-bc trigger info and getting info from DB#17058jgcn wants to merge 6 commits into
Conversation
|
O2 linter results: ❌ 0 errors, |
|
Error while checking build/O2Physics/o2 for 6d6f50c at 2026-07-14 14:39: Full log here. |
|
Error while checking build/O2Physics/code-check for 6d6f50c at 2026-07-14 14:42: Full log here. |
|
Error while checking build/O2Physics/staging for 6d6f50c at 2026-07-14 14:48: Full log here. |
|
Error while checking build/O2Physics/code-check for aebc723 at 2026-07-15 14:56: Full log here. |
|
Error while checking build/O2Physics/code-check for 71a83e7 at 2026-07-15 18:36: Full log here. |
|
Error while checking build/O2Physics/code-check for 3980c32 at 2026-07-19 18:07: Full log here. |
|
Error while checking build/O2Physics/code-check for d4944a6 at 2026-07-20 08:07: Full log here. |
| // fill output table | ||
| int recoFlag = (col.flags() & dataformats::Vertex<o2::dataformats::TimeStamp<int>>::Flags::UPCMode) ? 1 : 0; | ||
| if (selTrks.size() == NTrksTwoBody) { | ||
| const int recoFlag = ((col.flags() & dataformats::Vertex<o2::dataformats::TimeStamp<int>>::Flags::UPCMode) != stdReco) ? upcReco : stdReco; |
There was a problem hiding this comment.
Why are you comparing the result of & to stdReco instead of 0?
There was a problem hiding this comment.
Because stdReco is defined as zero. From previous iterations I got the impression that you did not like just numbers, but to give a meaning to them. So I defined the 0 for this particular useage as stdReco and not zero (one) as upcReco (the new definitions were introduced in the last iteration and are towards the start of the code)
There was a problem hiding this comment.
But stdReco seems unrelated to this expression. If stdReco had a different value, this expression would still have to be compared to 0. There is no logical connection between the two.
There was a problem hiding this comment.
It is related to the expression: the flag UPCMode tells you if it is stdReco or upcReco. But if you want, I can put a zero. I just need this to be approved! Please, let me know what to do exactly to get it approved, so that I can run over data, and see if this new code helps in solving the problems we are facing in PWDUD ...
There was a problem hiding this comment.
and just to clarify. This is a convention used in reco, vertexing and the full UPC groupd. So, one cannot just change it in one piece of code, ao "If stdReco had a different value," does not apply. It is as if I unilaterally decide that a piece of code uses inches and not cm and want to use other ALICE code in cm .... of course, it will not work. But it should not happen.
There was a problem hiding this comment.
@jgcn @amatyja I don't think you understood me.
The code has the syntax: flag = condition ? flagYes : flagNo where your condition is (col.flags() & dataformats::Vertex<o2::dataformats::TimeStamp<int>>::Flags::UPCMode) != 0 which is independent of the values of flagYes and flagNo.
Your condition is testing whether flags has the UPCMode bit set. This has nothing to do with the values of upcReco and stdReco.
Or am I missing anything?
There was a problem hiding this comment.
For standard reconstruction col.flags() is set to 0, For UPC reconstruction col.flags() is 2 (so called UPCMode). Mostly flag check returns 0. Guillermo defines 0 as a condition and as a flagNo. I see no sense to multiply definitions of 0 via different flags. flagYes is defined as upcReco. In UD we need just this two cases: standardReco or upcReco.
There was a problem hiding this comment.
These are not multiple definitions of 0. These are two different entities which happen to have the same value. It's the same as if your condition was testing validity of a pointer by comparing it to a UPC constant which happens to be equal to 0. It's a category error which can turn into an execution bug if the flags change values. Even if they don't, it's simply a wrong expression of what the code is supposed to do.
There was a problem hiding this comment.
Hi
ok, I'll revert it to zero and try to clean the remaining tabs/spaces tomorrow early morning.
I am hoping that this is really the last iteration (I know that the iterations are due to my ignorance and my editor adding tabs without me noticing :)
thanks for the comments and help
g
There was a problem hiding this comment.
Thanks @jgcn . Please note that it is completely unnecessary to fix the formatting by hand. It is literally a matter of two clicks to merge the formatting PR and zero clicks if you use the pre-commit hook.
|
Error while checking build/O2Physics/code-check for ebfb79c at 2026-07-20 20:20: Full log here. |
Major changes:
get ITS ROF info from database instead of having it hardwired
add info on bc-by.bc triggers
Minor changes:
better definition of TF axis