Skip to content

Conversation

@maciacco
Copy link
Contributor

@mconcas Adding ITS sensors to parallel world to prioritize navigation of sensitive elements in case of overlapping volumes

@github-actions
Copy link
Contributor

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass3
async-2023-pbpb-apass4
async-2022-pp-apass6-2023-PbPb-apass2
async-2022-pp-apass4
async-2022-pp-apass4-accepted
async-2022-pp-apass6-2023-PbPb-apass2-accepted
async-2023-pbpb-apass3-accepted
async-2023-pbpb-apass4-accepted
async-2023-pp-apass4
async-2023-pp-apass4-accepted
async-2024-pp-apass1
async-2024-pp-apass1-accepted
async-2022-pp-apass7
async-2022-pp-apass7-accepted
async-2024-pp-cpass0
async-2024-pp-cpass0-accepted

Co-authored-by: Matteo Concas <mconcas@cern.ch>
@mconcas
Copy link
Collaborator

mconcas commented May 27, 2024

@mconcas Adding ITS sensors to parallel world to prioritize navigation of sensitive elements in case of overlapping volumes

Thanks a lot @maciacco , approving to trigger CI.

mconcas
mconcas previously approved these changes May 30, 2024
@alibuild
Copy link
Collaborator

alibuild commented Jun 6, 2024

Error while checking build/O2/fullCI for d6bf6b5 at 2024-08-10 06:05:

## 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/13163-slc8_x86-64/0/Detectors/FIT/FT0/simulation/src/Detector.cxx:59:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/CPV/simulation/src/Detector.cxx:53:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/PHOS/simulation/src/Detector.cxx:61:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/TOF/simulation/src/Detector.cxx:49:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/ITSMFT/MFT/simulation/src/DigitizerTask.cxx:36:16: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/GlobalTracking/src/MatchGlobalFwd.cxx:844:17: error: use '= default' to define a trivial default constructor [modernize-use-equals-default]
++ [[ 0 == 0 ]]
++ exit 1
--

Full log here.

@github-actions
Copy link
Contributor

This PR did not have any update in the last 30 days. Is it still needed? Unless further action in will be closed in 5 days.

@github-actions github-actions bot added the stale label Aug 10, 2024
@alibuild
Copy link
Collaborator

alibuild commented Aug 13, 2024

Error while checking build/O2/fullCI for 1b3d7e0 at 2024-08-15 14:01:

## 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/13163-slc8_x86-64/0/Detectors/FIT/FT0/simulation/src/Detector.cxx:59:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/CPV/simulation/src/Detector.cxx:53:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/PHOS/simulation/src/Detector.cxx:61:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/TOF/simulation/src/Detector.cxx:49:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/ITSMFT/MFT/simulation/src/DigitizerTask.cxx:36:16: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/GlobalTracking/src/MatchGlobalFwd.cxx:844:17: error: use '= default' to define a trivial default constructor [modernize-use-equals-default]
++ [[ 0 == 0 ]]
++ exit 1
--

Full log here.

@mconcas mconcas removed the stale label Aug 20, 2024
@alibuild
Copy link
Collaborator

alibuild commented Aug 20, 2024

Error while checking build/O2/fullCI for ebe61e9 at 2024-08-24 06:52:

## 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/13163-slc8_x86-64/0/Detectors/FIT/FT0/simulation/src/Detector.cxx:59:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/PHOS/simulation/src/Detector.cxx:61:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/CPV/simulation/src/Detector.cxx:53:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/TOF/simulation/src/Detector.cxx:49:11: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/ITSMFT/MFT/simulation/src/DigitizerTask.cxx:36:16: error: use '= default' to define a trivial destructor [modernize-use-equals-default]
/sw/SOURCES/O2/13163-slc8_x86-64/0/Detectors/GlobalTracking/src/MatchGlobalFwd.cxx:844:17: error: use '= default' to define a trivial default constructor [modernize-use-equals-default]
++ [[ 0 == 0 ]]
++ exit 1
--

Full log here.


/// apply object to geoemetry
bool applyToGeometry() const;
bool applyToGeometry(bool usePW = false, bool addSensorPW = false, bool addMetalPW = false, bool addChipPW = false) const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

In principle this function has nothing to do with ITS. Yet, we pass several ITS specific arguments to it.
Could we think of a cleaner structure? Something like passing a AlignGeomOptions struct (which is then extensible)? The struct could contain ITS specific members.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been changed in the latest version. Now the ITS-specific configuration is handled by the ITS implementation of the o2::Detector::fillParallelWorld function

std::string pathStr;
if (path) {
pathStr.append(path);
if (getDetFromSymName(getSymName()) == "ITS" && (pathStr.find("ITSUChip") != std::string::npos) && usePW) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

from a framework point of view, this looks is a bit unfortunate. We go from something generic to something that contains ITS specific code. Could we think of alternatives, in which we call detector spefific routines adjustments (callback, virtual function, etc.)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the new implementation the volumes are added to the parallel world in a second step after the alignment. As in the other comment, the ITS code is now handling the filling of ITS volumes

@sawenzel
Copy link
Collaborator

Nice progress... and sorry for my late comments. I just realized that the adjustments are not done within ITS geometry code but in the global alignment framework. Not sure if there are alternatives ... but it might make sense to shortly think about if we can do it slightly better.

@mconcas
Copy link
Collaborator

mconcas commented Aug 26, 2024

Nice progress... and sorry for my late comments. I just realized that the adjustments are not done within ITS geometry code but in the global alignment framework. Not sure if there are alternatives ... but it might make sense to shortly think about if we can do it slightly better.

Now that you pointed this out, I realize that we can definitely do it in a more generic way.
We'll re-iterate on this PR. Thanks for the review.

@maciacco maciacco marked this pull request as draft September 4, 2024 17:24
@maciacco maciacco marked this pull request as ready for review September 9, 2024 10:11
@maciacco
Copy link
Contributor Author

maciacco commented Sep 9, 2024

Dear @sawenzel I factorized the code so that the parallel world is now filled after the alignment. This way there is no issue in the export of the geometry to file + the filling of the parallel world is handled separately by each detector (only ITS as of now) avoiding the previous clashes with the alignment framework. This required to add a new function in the base Detector class, which is overridden only for ITS. Could you please have a look to the latest version? Thank you!!

@alibuild
Copy link
Collaborator

alibuild commented Sep 10, 2024

Error while checking build/O2/fullCI for ca0a024 at 2024-09-25 13:56:

## sw/BUILD/Rivet-latest/log
make[2]: *** [Makefile:544: core.cpp] Error 127
make[1]: *** [Makefile:440: all-recursive] Error 1
make: *** [Makefile:561: all-recursive] Error 1

Full log here.

@sawenzel
Copy link
Collaborator

I will take a look at the latest restructuring soon. For now, I would like to suggest trying out the new improvements in ROOT, available in tag v6-32-04-alice2 of our ROOT (https://github.com/alisw/root/releases/tag/v6-32-04-alice2).

You need to enable these features like so:

 pw = gGeoManager->CreateParallelWorld("priority_its_sensor");
 if (getenv("TGEO_PW_USEBVH")) {
      pw->SetAccelerationMode(TGeoParallelWorld::AccelerationMode::kBVH);
    }
 if (getenv("TGEO_PW_CACHING")) {
      TGeoNavigator::SetPWSafetyCaching(true);
 }

I would be good to get an update on hit improvements, CPU runtime, memory. I personally found that adding just the ITS sensor gave the best improvements in hit numbers.
Once everything confirmed, we can put this into production.

@maciacco
Copy link
Contributor Author

Dear @sawenzel thanks for the updates and for the work on the ROOT side! We will update you soon on the simulation performance using the latest version.

Copy link
Collaborator

@sawenzel sawenzel left a comment

Choose a reason for hiding this comment

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

Looking good to me apart from some minor cleanup requests (see inline comments)

@sawenzel sawenzel merged commit 6fbc0f9 into AliceO2Group:dev Oct 11, 2024
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