Skip to content

First implementation of ITS3 geometry - #3699

Merged
sawenzel merged 5 commits into
AliceO2Group:devfrom
ITS-Tracking:its-3-sim
Jun 18, 2020
Merged

First implementation of ITS3 geometry#3699
sawenzel merged 5 commits into
AliceO2Group:devfrom
ITS-Tracking:its-3-sim

Conversation

@mconcas

@mconcas mconcas commented Jun 3, 2020

Copy link
Copy Markdown
Collaborator

Tagging @shahor02 @sawenzel @qgp for knowledge.
This is a draft PR to better see what would be the addition to the code.

Simulation works with ITS and ITS3, I just would like to be sure not to break anything outside the Upgrade directory.

Comment thread DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h Outdated
Comment thread Detectors/Upgrade/ITS3/base/include/ITS3Base/ContainerFactory.h Outdated
Comment thread Detectors/Upgrade/ITS3/base/include/ITS3Base/MisalignmentParameter.h Outdated
Comment thread Detectors/Upgrade/ITS3/macros/test/run_sim_its3.C Outdated
Comment thread Detectors/Upgrade/ITS3/simulation/include/ITS3Simulation/Detector.h Outdated
Comment thread Steer/src/O2MCApplication.cxx Outdated
Comment thread macro/build_geometry.C Outdated
Comment thread macro/build_geometry.C Outdated
Comment thread run/O2HitMerger.h Outdated
Comment thread run/O2HitMerger.h Outdated
Comment thread run/O2HitMerger.h Outdated
@mconcas

mconcas commented Jun 4, 2020

Copy link
Copy Markdown
Collaborator Author

I'll wait for #3702 to be merged, in order to implement the ENABLE_UPGRADES guards.

@qgp

qgp commented Jun 4, 2020

Copy link
Copy Markdown
Collaborator

I'll wait for #3702 to be merged, in order to implement the ENABLE_UPGRADES guards.

It should be sufficient to add the add_subdirectory in Detectors/Upgrades/CMakeLists.txt which is already protected. Or do we need to protect anything outside of that part?

@mconcas

mconcas commented Jun 4, 2020

Copy link
Copy Markdown
Collaborator Author

I'll wait for #3702 to be merged, in order to implement the ENABLE_UPGRADES guards.

It should be sufficient to add the add_subdirectory in Detectors/Upgrades/CMakeLists.txt which is already protected. Or do we need to protect anything outside of that part?

Some other parts of files, like the ones involved in extending the simulation tool have to be protected. Not a big deal at the moment.

@qgp

qgp commented Jun 9, 2020

Copy link
Copy Markdown
Collaborator

@mconcas I think you can go ahead and implement the updates using ENABLE_UPGRADES. Let me know if anything is missing.

@mconcas

mconcas commented Jun 9, 2020

Copy link
Copy Markdown
Collaborator Author

@mconcas I think you can go ahead and implement the updates using ENABLE_UPGRADES. Let me know if anything is missing.

The ENABLE_UPGRADES option is a CMake option, I am currently figuring out how to pass the definition of the preprocessor macro in a way that is accepted by the build, because at the moment it behave like ENABLE_UPGRADES macro is not passed.

@mconcas
mconcas force-pushed the its-3-sim branch 3 times, most recently from 4378eca to f7d2a2c Compare June 9, 2020 22:48
@mconcas

mconcas commented Jun 10, 2020

Copy link
Copy Markdown
Collaborator Author

Hi @sawenzel I think I adjusted the code.
I had to manually add the ENABLE_UPGRADE macro in DataHeader.h.
I was not able to propagate it by using the option added by @qgp, but it does not work by passing it to the cmake command in the O2 recipe.
Any suggestion on that?
For the rest the guards have been included and build should be safe, I think it should be ready to be tested.

PS. I noticed that for loops on detectors ids usually go from DetID::First to <= DetID::Last.
Is there a specific reason to that?

Thanks and Cheers

@mconcas
mconcas marked this pull request as ready for review June 11, 2020 11:14
@mconcas
mconcas requested review from a team as code owners June 11, 2020 11:14
@sawenzel

Copy link
Copy Markdown
Collaborator

Taking a look now. I think the cmake is just offering the option ENABLE_UPGRADE but not yet setting the compiler definitions.

@sawenzel

Copy link
Copy Markdown
Collaborator

@mconcas @qgp : This PR needs #3764 as well as alisw/alidist#2296. Thereafter you should be able to compile this with
ENABLE_UPGRADES=ON aliBuild build O2 --defaults o2.

I would suggest to wait until these things are merged and then we can adjust this PR.

Comment thread DataFormats/Headers/include/Headers/DataHeader.h Outdated
Comment thread Detectors/Base/src/GeometryManager.cxx Outdated
Comment thread Steer/src/O2MCApplication.cxx Outdated
Comment thread cmake/O2DefineOptions.cmake Outdated
Comment thread macro/CMakeLists.txt Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit long. Maybe there is a way to construct a list and pass the list to the function. @aphecetche ?

Comment thread run/CMakeLists.txt Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

@qgp

qgp commented Jun 12, 2020

Copy link
Copy Markdown
Collaborator

@mconcas For the targets that need the definition, you should add something like

if (ENABLE_UPGRADES)
  target_compile_definitions(<target> PUBLIC ENABLE_UPGRADES)
endif()

Or did I miss what you were asking for?

@mconcas
mconcas force-pushed the its-3-sim branch 4 times, most recently from 32cad24 to 213766b Compare June 12, 2020 11:03
@mconcas

mconcas commented Jun 12, 2020

Copy link
Copy Markdown
Collaborator Author

@mconcas For the targets that need the definition, you should add something like

if (ENABLE_UPGRADES)
  target_compile_definitions(<target> PUBLIC ENABLE_UPGRADES)
endif()

Or did I miss what you were asking for?

That is also something I was looking for (i tried now to put it here).
The actual point is that the option(...) does not seem to play how I expect, I am doing some test now, the build directory everytime. No success at the moment.

Also the CI is complaining:

  CMake Error at run/CMakeLists.txt:16 (target_compile_definitions):
  target_compile_definitions may only set INTERFACE properties on INTERFACE
  targets

I'm trying by using the INTERFACE keyword.

@mconcas
mconcas force-pushed the its-3-sim branch 2 times, most recently from 508789d to 0b4deb8 Compare June 12, 2020 11:24
@sawenzel

Copy link
Copy Markdown
Collaborator

@mconcas For the targets that need the definition, you should add something like

if (ENABLE_UPGRADES)
  target_compile_definitions(<target> PUBLIC ENABLE_UPGRADES)
endif()

Or did I miss what you were asking for?

Please note that this is no longer necessary. Upgrade macro definitions are now enabled in the main CMake file.

@qgp

qgp commented Jun 17, 2020

Copy link
Copy Markdown
Collaborator

@sawenzel @mconcas Ok, so we can globally assume to use #ifdef ENABLE_UPGRADES as guard for upgrade only stuff. Are such conventions documented somewhere?

@sawenzel

Copy link
Copy Markdown
Collaborator

I guess it can and should be documented in a dedicated Run4WhateverUpgrade.md file.

@qgp

qgp commented Jun 17, 2020

Copy link
Copy Markdown
Collaborator

I guess it can and should be documented in a dedicated Run4WhateverUpgrade.md file.

Sounds good, I will take care of adding such a file in doc/.

@sawenzel

Copy link
Copy Markdown
Collaborator

So shall we go ahead merging this PR?

@mconcas

mconcas commented Jun 18, 2020

Copy link
Copy Markdown
Collaborator Author

Fine to me

@sawenzel
sawenzel merged commit 2275446 into AliceO2Group:dev Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants