[PWGHF] Adding D0/Lc analysis task - #17808
Conversation
Please consider the following formatting changes to AliceO2Group#17807
|
O2 linter results: ❌ 0 errors, |
|
Dear codeowners, Is it possible to overcome the "magic number" errors in the O2 linter / O2 linter (pull_request_target) check? In my opinion it would unnecessarily complicate the existing code. You can see an example of such a solution in the PWGLF/Tasks/GlobalEventProperties/flattenicityPikp.cxx file (lines 1814-1908) |
The way to "overcome" it is to write it in a better way. From what I can see, you map some number to other numbers. So how about using a map or an array, for example? |
Please consider the following formatting changes to AliceO2Group#17808
Please consider the following formatting changes to AliceO2Group#17808
Dear Vit, Thank you for the nice and easy solution to the issue. Everything should be fine now. |
Thanks @laszlogyulai for the implementation. It looks indeed much better now. |
| std::array<float, nCellsFV0> rhoLatticeFV0{0}; | ||
| std::array<float, nCellsFV0> fv0AmplitudeWoCalib{0}; |
There was a problem hiding this comment.
| std::array<float, nCellsFV0> rhoLatticeFV0{0}; | |
| std::array<float, nCellsFV0> fv0AmplitudeWoCalib{0}; | |
| std::array<float, nCellsFV0> rhoLatticeFV0{}; | |
| std::array<float, nCellsFV0> fv0AmplitudeWoCalib{}; |
| static const int CinnerFV0 = 32; | ||
| std::array<float, nCellsFV0> rhoLatticeFV0{0}; | ||
| std::array<float, nCellsFV0> fv0AmplitudeWoCalib{0}; | ||
| float calib[48] = {1.01697, 1.122, 1.03854, 1.108, 1.11634, 1.14971, 1.19321, 1.06866, 0.954675, 0.952695, 0.969853, 0.957557, 0.989784, 1.01549, 1.02182, 0.976005, 1.01865, 1.06871, 1.06264, 1.02969, 1.07378, 1.06622, 1.15057, 1.0433, 0.83654, 0.847178, 0.890027, 0.920814, 0.888271, 1.04662, 0.8869, 0.856348, 0.863181, 0.906312, 0.902166, 1.00122, 1.03303, 0.887866, 0.892437, 0.906278, 0.884976, 0.864251, 0.917221, 1.10618, 1.04028, 0.893184, 0.915734, 0.892676}; |
There was a problem hiding this comment.
Why is this not a std::array?
|
Since you are adding a new file, please fix also the warnings. |
Adding a new analysis task for calculating the D0/Lambda_c yield ratio as a function of flattenicity