Skip to content

Conversation

@f3sch
Copy link
Collaborator

@f3sch f3sch commented Apr 8, 2025

Allow MC labels to be calculated using ITS gpu tracking.
Note I had to separate the label processing using an additional flag processITSMC and not using the normal --disable-mc since this flag implicitly requires TPC things and not to disturb the code too much, I opted for this though it is ugly (better suggestions?).

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

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-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@f3sch f3sch mentioned this pull request Apr 8, 2025
@mconcas
Copy link
Collaborator

mconcas commented Apr 8, 2025

Allow MC labels to be calculated using ITS gpu tracking. Note I had to separate the label processing using an additional flag processITSMC and not using the normal --disable-mc since this flag implicitly requires TPC things and not to disturb the code too much, I opted for this though it is ugly (better suggestions?).

I think we can keep it simple. If MC is enabled, it should be enabled for all detectors included in the reco. I'll let @davidrohr to decide, though.

@f3sch
Copy link
Collaborator Author

f3sch commented Apr 8, 2025

@mconcas at least for me I could not run the tracking with MC standalone for ITS since processMC(being not using --disable-mc) explicitly pulls TPC in and I did not want to touch this logic.

@mconcas
Copy link
Collaborator

mconcas commented Apr 8, 2025

@mconcas at least for me I could not run the tracking with MC standalone for ITS since processMC explicitly pulls TPC in.

Ok, but then is the processMC that needs not to pull reconstructions that are not requested.

@alibuild
Copy link
Collaborator

alibuild commented Apr 8, 2025

Error while checking build/O2/fullCI_slc9 for b33925b at 2025-06-15 02:11:

## sw/BUILD/O2Physics-latest/log
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:

Full log here.

@davidrohr
Copy link
Collaborator

I agree with @mconcas that we should fix the problem with pulling in the TPC inputs.
Can you send me a reproducer that fails, then I can have a look.

@f3sch
Copy link
Collaborator Author

f3sch commented Jun 17, 2025

@davidrohr yes, thanks for looking into this admittedly contrived case. Should I close the PR then?

You need #14416.

#!/usr/bin/env bash

# current O2@69169b + patch
# run number is only given since ITS needs GRPECS object to check if it is in continous readout mode, other options are irrelevant and simply copied
GLOSET=";align-geom.mDetectors=none;HBFUtils.orbitFirstSampled=0;HBFUtils.nHBFPerTF=32;HBFUtils.orbitFirst=0;HBFUtils.runNumber=563946;"
o2-sim -n1 -m ITS --configKeyValues "GlobalSimProcs.DCAY=0;BoxGun.number=77;BoxGun.eta[0]=-0.9;BoxGun.eta[1]=0.9;BoxGun.prange[0]=0.2;BoxGun.prange[1]=10;$GLOSET" | tee sim.log
o2-sim-digitizer-workflow -b --run --configKeyValues="$GLOSET" --onlyDet ITS | tee digi.log
o2-its-reco-workflow --trackerCA --tracking-mode async --use-gpu-workflow --gpu-device=0 -b --run --configKeyValues="$GLOSET;ITSCATrackerParam.trackingMode=1;GPU_proc.forceMemoryPoolSize=20000000000;GPU_global.deviceType=HIP;HBFUtils.runNumber=563946;ITSVertexerParam.phiCut=0.5;ITSVertexerParam.clusterContributorsCut=3;ITSVertexerParam.tanLambdaCut=0.2;ITSClustererParam.maxBCDiffToMaskBias=-10;ITSClustererParam.maxBCDiffToSquashBias=10;ITSCATrackerParam.sysErrY2[0]=100e-8;ITSCATrackerParam.sysErrZ2[0]=100e-8;ITSCATrackerParam.sysErrY2[1]=100e-8;ITSCATrackerParam.sysErrZ2[1]=100e-8;ITSCATrackerParam.sysErrY2[2]=100e-8;ITSCATrackerParam.sysErrZ2[2]=100e-8;ITSCATrackerParam.sysErrY2[3]=100e-8;ITSCATrackerParam.sysErrZ2[3]=100e-8;ITSCATrackerParam.sysErrY2[4]=100e-8;ITSCATrackerParam.sysErrZ2[4]=100e-8;ITSCATrackerParam.sysErrY2[5]=100e-8;ITSCATrackerParam.sysErrZ2[5]=100e-8;ITSCATrackerParam.sysErrY2[6]=100e-8;ITSCATrackerParam.sysErrZ2[6]=100e-8;" | tee reco.log # this runs perfectly fine with --disable-mc otherwise I get the error below:

#[ERROR] invalid workflow in o2-its-reco-workflow: No matching output found for <matcher query: (and origin:TPC (and description:CLNATIVEMCLBL (just startTime:$0 )))> as requested by data processor "its-gpu-tracker". Candidates:
#-DPL/ENUM/3729191491
#-FLP/DISTSUBTIMEFRAME/52443
#-ITS/DIGITS/0
#-ITS/DIGITSMC2ROF/0
#-ITS/DIGITSMCTR/0
#-ITS/DIGITSROF/0
#-ITS/PHYSTRIG/0
#-CTP/OrbitReset/0
#-GLO/GRPECS/0
#-GLO/GRPMAGFIELD/0
#-GLO/MATLUT/0
#-ITS/ALPIDEPARAM/0
#-ITS/CLUSDICT/0
#-ITS/CLUSPARAM/0
#-ITS/GEOMTGEO/0
#-ITS/CLUSTERSMC2ROF/0
#-ITS/CLUSTERSMCTR/0
#-ITS/CLUSTERSROF/0
#-ITS/COMPCLUSTERS/0
#-ITS/PATTERNS/0
#-ITS/IRFRAMES/0
#-ITS/ITSTrackMC2ROF/0
#-ITS/ITSTrackROF/0
#-ITS/TRACKCLSID/0
#-ITS/TRACKS/0
#-ITS/TRACKSMCTR/0
#-ITS/VERTICES/0
#-ITS/VERTICESMCTR/0
#-ITS/VERTICESROF/0

@f3sch
Copy link
Collaborator Author

f3sch commented Jun 17, 2025

For reference this is one of the cases where the workflow assumes TPC presence based on MC label request:

if (mSpecConfig.processMC) {

@mconcas
Copy link
Collaborator

mconcas commented Jun 17, 2025

@davidrohr yes, thanks for looking into this admittedly contrived case. Should I close the PR then?

You need #14416.

#!/usr/bin/env bash

# current O2@69169b + patch
# run number is only given since ITS needs GRPECS object to check if it is in continous readout mode, other options are irrelevant and simply copied
GLOSET=";align-geom.mDetectors=none;HBFUtils.orbitFirstSampled=0;HBFUtils.nHBFPerTF=32;HBFUtils.orbitFirst=0;HBFUtils.runNumber=563946;"
o2-sim -n1 -m ITS --configKeyValues "GlobalSimProcs.DCAY=0;BoxGun.number=77;BoxGun.eta[0]=-0.9;BoxGun.eta[1]=0.9;BoxGun.prange[0]=0.2;BoxGun.prange[1]=10;$GLOSET" | tee sim.log
o2-sim-digitizer-workflow -b --run --configKeyValues="$GLOSET" --onlyDet ITS | tee digi.log
o2-its-reco-workflow --trackerCA --tracking-mode async --use-gpu-workflow --gpu-device=0 -b --run --configKeyValues="$GLOSET;ITSCATrackerParam.trackingMode=1;GPU_proc.forceMemoryPoolSize=20000000000;GPU_global.deviceType=HIP;HBFUtils.runNumber=563946;ITSVertexerParam.phiCut=0.5;ITSVertexerParam.clusterContributorsCut=3;ITSVertexerParam.tanLambdaCut=0.2;ITSClustererParam.maxBCDiffToMaskBias=-10;ITSClustererParam.maxBCDiffToSquashBias=10;ITSCATrackerParam.sysErrY2[0]=100e-8;ITSCATrackerParam.sysErrZ2[0]=100e-8;ITSCATrackerParam.sysErrY2[1]=100e-8;ITSCATrackerParam.sysErrZ2[1]=100e-8;ITSCATrackerParam.sysErrY2[2]=100e-8;ITSCATrackerParam.sysErrZ2[2]=100e-8;ITSCATrackerParam.sysErrY2[3]=100e-8;ITSCATrackerParam.sysErrZ2[3]=100e-8;ITSCATrackerParam.sysErrY2[4]=100e-8;ITSCATrackerParam.sysErrZ2[4]=100e-8;ITSCATrackerParam.sysErrY2[5]=100e-8;ITSCATrackerParam.sysErrZ2[5]=100e-8;ITSCATrackerParam.sysErrY2[6]=100e-8;ITSCATrackerParam.sysErrZ2[6]=100e-8;" | tee reco.log # this runs perfectly fine with --disable-mc otherwise I get the error below:

#[ERROR] invalid workflow in o2-its-reco-workflow: No matching output found for <matcher query: (and origin:TPC (and description:CLNATIVEMCLBL (just startTime:$0 )))> as requested by data processor "its-gpu-tracker". Candidates:
#-DPL/ENUM/3729191491
#-FLP/DISTSUBTIMEFRAME/52443
#-ITS/DIGITS/0
#-ITS/DIGITSMC2ROF/0
#-ITS/DIGITSMCTR/0
#-ITS/DIGITSROF/0
#-ITS/PHYSTRIG/0
#-CTP/OrbitReset/0
#-GLO/GRPECS/0
#-GLO/GRPMAGFIELD/0
#-GLO/MATLUT/0
#-ITS/ALPIDEPARAM/0
#-ITS/CLUSDICT/0
#-ITS/CLUSPARAM/0
#-ITS/GEOMTGEO/0
#-ITS/CLUSTERSMC2ROF/0
#-ITS/CLUSTERSMCTR/0
#-ITS/CLUSTERSROF/0
#-ITS/COMPCLUSTERS/0
#-ITS/PATTERNS/0
#-ITS/IRFRAMES/0
#-ITS/ITSTrackMC2ROF/0
#-ITS/ITSTrackROF/0
#-ITS/TRACKCLSID/0
#-ITS/TRACKS/0
#-ITS/TRACKSMCTR/0
#-ITS/VERTICES/0
#-ITS/VERTICESMCTR/0
#-ITS/VERTICESROF/0

Thanks @f3sch , the case is not contrived at all, as the plan is to incorporate ITS in the gpu-reco-wf and to have it as a fully working mainstream entry point, so it eventually needs to be able to run ITS-only.
One thing that could be better is to have a reproducer that starts from the full-system-test script.
So that this can also later be tested in the GPU-capable CI.
@davidrohr does the FST have the possibility to enable/disable MC labels? I don't know al the possible declinations.

@both: In case: here there is a reproducer that I use to run on data, perhaps many of the configs can be get from there, then one has to possibly run on MC data...

#! /bin/bash -x

rm -f /dev/shm/*fmq*;
# export WORKFLOWMODE=print
# export DISABLE_ROOT_OUTPUT=0
export ROCR_VISIBLE_DEVICES="0"
export GPUTYPE=HIP
export WORKFLOW_DETECTORS=TPC,ITS
export WORKFLOW_DETECTORS_GPU=ITS,TPC
export GPUMEMSIZE=10000000000
export SYNCMODE=0
export CTFINPUT=1
export GLOBALDPLOPT="-b"
export NTIMEFRAMES=1
export INPUT_FILE_LIST=data/o2_ctf_run00559456_orbit0139181824_tf0003905868_epn294.root
export CONFIG_EXTRA_PROCESS_o2_gpu_reco_workflow="GPU_proc.debugLevel=2;GPU_global.deviceType=$GPUTYPE;GPU_proc.forceMemoryPoolSize=8000000000;GPU_proc.forceHostMemoryPoolSize=1073741824;"
~/alice/latest/O2/prodtests/full-system-test/dpl-workflow.sh

@davidrohr
Copy link
Collaborator

@f3sch : Could you try with #14425
For some reason, it fails for me now with

[ERROR] invalid workflow in o2-its-reco-workflow: No matching output found for ITS/VERTICESMCPUR/0 as requested by data processor "its-track-writer". Candidates:

But that should not be gpu-workflow-related.

@f3sch
Copy link
Collaborator Author

f3sch commented Jun 19, 2025

Thanks @davidrohr! Sorry I missed in my initial patch part of the change added here..., see #14426
will close the pr now.

@f3sch f3sch closed this Jun 19, 2025
@f3sch f3sch deleted the gpu/itsmc branch June 19, 2025 19:05
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