[PWGCF] Implementation of Phi and K0Short#12738
[PWGCF] Implementation of Phi and K0Short#12738victor-gonzalez merged 16 commits intoAliceO2Group:masterfrom
Conversation
|
O2 linter results: ❌ 72 errors, |
|
Please, keep it as draft until approaching its final approval |
|
Please, keep it as draft for the time being |
1ce282e to
dbb961e
Compare
dbb961e to
d05d5f9
Compare
|
@victor-gonzalez I have a question regarding the security approval required for the build checks. |
PWGCF/DataModel/FemtoDerived.h
Outdated
| static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Track", "V0", "V0Child", "Cascade", "CascadeV0", "CascadeV0Child", "CascadeBachelor", "CharmHadron", "Reso", "ResoChild", "ResoPosdaughTPC_NegdaughTPC", "ResoPosdaughTPC_NegdaughTOF", "ResoPosdaughTOF_NegdaughTPC", "ResoPosdaughTOF_NegdaughTOF"}; //! Naming of the different particle types | ||
| // static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hCPA", "/hDCAxy", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy", "/hCPA"}; | ||
|
|
||
| static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hCPA", "/hCPA", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy", "/hCPA", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy"}; // change later!! check for DCAXY for RESO!! |
There was a problem hiding this comment.
Why did this list change from the previous? To be backwards compatible, they should be identical for the first 8 entries, no?
The correct order inside TempFitVarName was restored
|
I do not see any more problems. @victor-gonzalez , maybe you could have a last look to check if I didn't miss anything? |
| /// \param track Track | ||
| /// \return Whether the most open combination of all selection criteria is fulfilled | ||
| template <typename T> | ||
| template <class T> |
There was a problem hiding this comment.
Strange that this needed to be changed just now. In principle typename is larger than class embracing it
I guess if local compilation succeeded there should not be any issue with it
There was a problem hiding this comment.
AFAIK, the typename and class keywords are equivalent in the context of template arguments. What do you mean by "typename is larger than class"?
There was a problem hiding this comment.
I thought that typename can be any type as int for example while class can only be a class or a struct
Larger in the sense that the amount of cases that address is larger
| case o2::constants::physics::Pdg::kK0Star892: | ||
| mass = o2::constants::physics::MassK0Star892; | ||
| break; | ||
| case 310: /// K0Short is not implemented in o2::physics::constants::Pdg |
There was a problem hiding this comment.
The recommendation is to extend the definitions with the ones in TPDGCode.h
There was a problem hiding this comment.
kK0Short already exists in TPDGCode.h.
| #include <string> | ||
| #include <vector> | ||
|
|
||
| namespace o2::analysis::femtoDream // o2-linter: disable=name/namespace (Previously defined namespace) |
There was a problem hiding this comment.
Don't disable it for the linter. I guess this is a false positive we have to report to @vkucera
There was a problem hiding this comment.
@vkucera I don't understand this now then
He is trying to incorporate declarations to the femtoDream namespace
And the usage of that namespace is open and then closed for such declarations once done
Cannot this be done on header files? If it can, what should be the procedure?
There was a problem hiding this comment.
There is nothing wrong with the code itself. The name/namespace test complains about the femtoDream name not following the snake_case convention for namespaces.
There was a problem hiding this comment.
Ok! Wrong approach from my side!
Then this is going to stay because it affects the full framework which was born before linter recommendations
| PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::EventFilteringUtils | ||
| COMPONENT_NAME Analysis) | ||
|
|
||
| o2physics_add_dpl_workflow(femtodream-producer-reduced |
There was a problem hiding this comment.
The linter should be complaining in here
If you want to keep the name of the executable you have to change the name of the source file or the other way around. Follow the recommendation from the linter. You can execute the linter locally with the instructions given at the end of the linter log
There was a problem hiding this comment.
It does complain.
PWGCF/FemtoDream/TableProducer/CMakeLists.txt:17: error: Workflow name femtodream-producer-reso does not match its file name femtoDreamProducerTaskReso.cxx. (Matches femtodreamProducerReso.cxx.) [name/o2-workflow]
victor-gonzalez
left a comment
There was a problem hiding this comment.
Minor comments but better addressing them now before starting
| static constexpr int kNv0Selection = 9; | ||
|
|
||
| static constexpr std::string_view kSelectionNames[kNv0Selection] = { | ||
| "Sign", "PtMin", "PtMax", "EtaMax", "DCAdaughMax", "CPAMin", | ||
| "TranRadMin", "TranRadMax", "DecVecMax"}; ///< Name of the different | ||
| ///< selections | ||
|
|
||
| static constexpr femtoDreamSelection::SelectionType | ||
| kSelectionTypes[kNv0Selection]{ | ||
| femtoDreamSelection::kEqual, | ||
| femtoDreamSelection::kLowerLimit, | ||
| femtoDreamSelection::kUpperLimit, | ||
| femtoDreamSelection::kUpperLimit, | ||
| femtoDreamSelection::kUpperLimit, | ||
| femtoDreamSelection::kLowerLimit, | ||
| femtoDreamSelection::kLowerLimit, | ||
| femtoDreamSelection::kUpperLimit, | ||
| femtoDreamSelection::kUpperLimit}; ///< Map to match a variable with |
There was a problem hiding this comment.
Please stick to the naming conventions and don't use the k prefix by default. It makes expressions like kSelectionNames[kNv0Selection] quite confusing, since the constants starting with k are usually reserved for sizes of static arrays.
I see many. :-) |
the formatting error in FemtoDerived.h was removed. In femtoDreamUtils.h was the 310 replaced by kK0Short (as in TPDGCode.h) and in KV0SelectionK0Short.h were the k's replaced by m's.
|
We don't expect the |
|
i have a question regarding the k prefix linter errors which were raised in V0SelectionK0Short.h. These are the linter errors is solved by renaming mSelectionNames etc to kSelectionNames. In one of the latest commit messages i was asked to change them due to possible confusion. Should change the rpefixes back to k or leave them as is? |
I think O2 linter gave you clear instructions what to do:
|
linter errrs were adressed in femtoDreamPorducerTaskReso.cxx and V0SelectionK0Short.h
| constexpr int kProcessDirectMother = 4; | ||
| constexpr int kProcessInelasticHadronic = 23; | ||
| constexpr int kGenStatusTransport = -1; |
There was a problem hiding this comment.
Do not redefine existing constants. Use the actual enumerated values from TMCProcess.
|
Thank you very much for you help! |
Co-authored-by: Christopher Klumm <ge48xun@nidoking.ktas.ph.tum.de> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Co-authored-by: Christopher Klumm <ge48xun@nidoking.ktas.ph.tum.de> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Co-authored-by: Christopher Klumm <ge48xun@nidoking.ktas.ph.tum.de> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Co-authored-by: Christopher Klumm <ge48xun@nidoking.ktas.ph.tum.de> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Co-authored-by: Christopher Klumm <ge48xun@nidoking.ktas.ph.tum.de> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Resonance selection via reconstruction of the invariant mass has been implemented in the producer Task.
Several files were modified/added in order to support this implementation.
Efforts were made to comply with linter and formatting suggestions; however, some warnings persist due existing files that were not modified.
@AntonRiedel
@gmantzar