Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCH standalone alignment module #12583

Merged
merged 11 commits into from
Mar 9, 2024
Merged

Conversation

Elros60
Copy link
Contributor

@Elros60 Elros60 commented Jan 23, 2024

This is a PR for adding the whole MCH stand-alone alignment module enabling us to do the alignment procedure for muon spectrometer with a relatively simple and multi-function workflow.

@Elros60 Elros60 requested review from shahor02 and a team as code owners January 23, 2024 15:32
Elros60 added a commit to Elros60/AliceO2 that referenced this pull request Jan 23, 2024
Please consider the following formatting changes to AliceO2Group#12583
pillot
pillot previously approved these changes Jan 24, 2024
Copy link
Collaborator

@pillot pillot left a comment

Choose a reason for hiding this comment

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

The approval is just to trigger the CI. Since it is your first PR, it does not start automatically.

Why is there 2 levels of directories: Align/Aligner/? There should be only one: Align/.

I don't really understand the workflow. It works more like a single executable, looping through the TF itself, than a DPL workflow. Or do I miss something?

Detectors/MUON/MCH/Tracking/CMakeLists.txt Outdated Show resolved Hide resolved
Detectors/MUON/MCH/Align/CMakeLists.txt Outdated Show resolved Hide resolved
@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI for f6cf68a at 2024-01-24 12:26:

## sw/BUILD/O2-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
CMake Error at Detectors/MUON/MCH/Align/CMakeLists.txt:14 (add_subdirectory):

Full log here.

@shahor02
Copy link
Collaborator

Hi, I see most of this PR is a clone of my custom millepede 2 implementation from the aliroot.
Note that the official millepede implementation (it was released a bit later than I've implemented it in the aliroot) is more powerful and bug-free.
But even leaving this aside: the aliroot version was already ported by the MFT, see https://github.com/AliceO2Group/AliceO2/tree/dev/Detectors/ITSMFT/MFT/alignment/include/MFTAlignment.
Could not MFT and MCH use the same code, to avoid duplication?

@javierecc
Copy link
Contributor

Hi @shahor02,

Yes you have a point. For our needs the MillePede2 from AliRoot is enough. And when we checked your O2 implementation of MillePede2 it was not straightforward to adopt it for us. The code committed by Andry is instead very close to ours and it will not be too complicated to use it.
Our proposal will be to move what will be common to MFT and MCH to a common place, e.g. Detectors/ForwardAlign and leave in MFT/alignment and MCH/Align what is respectively specific.
We have already a first version, once it is tested and validated by both MCH and MFT we will update this PR.

Cheers,
Javier

@shahor02
Copy link
Collaborator

Hi Javier,

Yes, the O2 interface to the external (official) MP2 is overly complicated, I realize it was not a good idea to try to port aliroot interface to O2 instead of writing it from scratch.
What you suggest is fine, would be good to have just 1 internal MP2 version in the common directory where boh MFT and MUON could use it.

Cheers,
Ruben

with a common part(for both MCH and MTF) of mathematics basic codes moved to a common path under O2/Detectors/ForwardAlign

Co-Authored-By: javierecc <javier.castillo.castellanos@cern.ch>
@Elros60
Copy link
Contributor Author

Elros60 commented Feb 1, 2024

Hi,
I updated the current branch with all common parts for MCH&MFT moved to the following path: /Detectors/ForwardAlign/ according to the previous discussion from Ruben and Javier.
Chi.

@javierecc
Copy link
Contributor

Dear all,
May we come back to this PR?
The PR was updated as discussed: the common part to MFT and MCH was moved to a new Detectors/ForwardAlign folder and the MFT and MCH specific left in their MFT and MCH folders and adapted to use the common part. The MFT part was checked and validated by Andry and the MCH one by Chi.
Please let us know if there is any further change required.

Cheers,
Javier

shahor02
shahor02 previously approved these changes Feb 21, 2024
Copy link
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

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

Approving to start CI

@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI for 46ab7a3 at 2024-02-21 15:38:

## sw/BUILD/O2-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/AlignmentSpec.cxx:196:23: error: 'exists' is not a member of 'std::filesystem'
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/AlignmentSpec.cxx:208:23: error: 'exists' is not a member of 'std::filesystem'
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/AlignmentSpec.cxx:220:23: error: 'exists' is not a member of 'std::filesystem'
ninja: build stopped: subcommand failed.

Full log here.

shahor02
shahor02 previously approved these changes Feb 21, 2024
Copy link
Collaborator

@pillot pillot left a comment

Choose a reason for hiding this comment

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

Hi Chi, Javier, thanks for the update and sorry for having missed it! I only have a few comments below on the little part that I am able to review.

Detectors/MUON/MCH/Align/src/AlignmentSpec.cxx Outdated Show resolved Hide resolved
Detectors/MUON/MCH/Align/src/AlignmentSpec.cxx Outdated Show resolved Hide resolved
@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI for eeec208 at 2024-02-21 21:35:

## sw/BUILD/O2-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'


## sw/BUILD/O2-full-system-test-latest/log
task timeout reached .. killing all processes


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
++ GRERR=1
++ [[ 1 == 0 ]]
++ mkdir -p /sw/INSTALLROOT/5b8549347e188676554162b1baf1188e9823b660/slc8_x86-64/o2checkcode/1.0-local99/etc/modulefiles
++ cat
--

Full log here.

pillot
pillot previously approved these changes Feb 28, 2024
@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI for 402712f at 2024-02-28 21:11:

## sw/BUILD/O2-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:103:9: error: redundant void argument list in function definition [modernize-redundant-void-arg]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:134:16: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:135:14: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:153:21: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:154:20: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:155:15: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:156:12: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:157:12: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:275:11: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:351:25: error: redundant void argument list in function definition [modernize-redundant-void-arg]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:609:21: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:611:21: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:613:22: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:615:21: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:625:19: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:627:19: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:629:20: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:631:19: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:1425:41: error: use nullptr [modernize-use-nullptr]
++ [[ 0 == 0 ]]
++ exit 1
--

Full log here.

@Elros60
Copy link
Contributor Author

Elros60 commented Mar 8, 2024

Dear experts,
Can you kindly have a look at errors produced during build/O2/fullCI and build/O2/o2. If I'm not mistaken, seem to me those errors were not related to my PR. Thanks a lot in advance!

@shahor02
Copy link
Collaborator

shahor02 commented Mar 8, 2024

@Elros60 , the o2 error is unrelated but the fullCI tells that the coding guidelines are not respected:

++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:103:9: error: redundant void argument list in function definition [modernize-redundant-void-arg]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:134:16: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:135:14: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:153:21: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:154:20: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:155:15: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:156:12: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:157:12: error: use nullptr [modernize-use-nullptr]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:275:11: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:351:25: error: redundant void argument list in function definition [modernize-redundant-void-arg]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:609:21: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:611:21: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:613:22: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:615:21: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:625:19: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:627:19: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:629:20: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:631:19: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/12583-slc8_x86-64/0/Detectors/MUON/MCH/Align/src/Aligner.cxx:1425:41: error: use nullptr [modernize-use-nullptr]

@shahor02 shahor02 merged commit d43b949 into AliceO2Group:dev Mar 9, 2024
14 checks passed
@Elros60 Elros60 deleted the mchAlign_Chi branch March 26, 2024 22:32
andreasmolander pushed a commit to andreasmolander/AliceO2 that referenced this pull request Apr 12, 2024
* MCH standalone alignment module

with a common part(for both MCH and MTF) of mathematics basic codes moved to a common path under O2/Detectors/ForwardAlign

Co-Authored-By: javierecc <javier.castillo.castellanos@cern.ch>

* Please consider the following formatting changes (#4)

* Removed from PR

* Fixing formatting issue

* Add missing header for filesystem

* Fix warning with dereferenced iterator

* Remove re-initialisation of magfield for trackfitter and move residual QA plots to O2Physics task

* Update comment for track selection

* Remove unused function

* Remove re-definition of magfield which is set already with CCDB finalisation

* Fixing CI build errors

---------

Co-authored-by: javierecc <javier.castillo.castellanos@cern.ch>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
andreasmolander pushed a commit to andreasmolander/AliceO2 that referenced this pull request Apr 12, 2024
* MCH standalone alignment module

with a common part(for both MCH and MTF) of mathematics basic codes moved to a common path under O2/Detectors/ForwardAlign

Co-Authored-By: javierecc <javier.castillo.castellanos@cern.ch>

* Please consider the following formatting changes (#4)

* Removed from PR

* Fixing formatting issue

* Add missing header for filesystem

* Fix warning with dereferenced iterator

* Remove re-initialisation of magfield for trackfitter and move residual QA plots to O2Physics task

* Update comment for track selection

* Remove unused function

* Remove re-definition of magfield which is set already with CCDB finalisation

* Fixing CI build errors

---------

Co-authored-by: javierecc <javier.castillo.castellanos@cern.ch>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
mwinn2 pushed a commit to mwinn2/AliceO2 that referenced this pull request Apr 25, 2024
* MCH standalone alignment module

with a common part(for both MCH and MTF) of mathematics basic codes moved to a common path under O2/Detectors/ForwardAlign

Co-Authored-By: javierecc <javier.castillo.castellanos@cern.ch>

* Please consider the following formatting changes (#4)

* Removed from PR

* Fixing formatting issue

* Add missing header for filesystem

* Fix warning with dereferenced iterator

* Remove re-initialisation of magfield for trackfitter and move residual QA plots to O2Physics task

* Update comment for track selection

* Remove unused function

* Remove re-definition of magfield which is set already with CCDB finalisation

* Fixing CI build errors

---------

Co-authored-by: javierecc <javier.castillo.castellanos@cern.ch>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
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.

5 participants