Skip to content

Conversation

@shahor02
Copy link
Collaborator

@shahor02 shahor02 commented Jul 2, 2025

Nominally both IDC (setIDC(val)) and Lumi (setLumi(val)) info of the map should be filled at the creation time. Depending what is used for the corrections (accoding to --lumi-type value: 1 for CTP lumi or 2 for IDC scaler) the getLumi or getIDC will be used. For the old maps, where the mIDC is absent (i.e. default value -1 returned by getIDC()) but the Lumi was used to stored the IDC mean value, we check if getLumi() is below the threshold TPCCorrMap.CTP2IDCFallBackThreshold (by default set to 30). If this is a case, the getLumi() value will be used as IDC scale, otherwise a Fatal will be thrown.
Note that the inverse check is not done: if CTP Lumi scaling is requested for the old map where getLumi returns IDC, a wrong scale will be accepted.

@wiechula I am not sure what should be with

const float lumiAvg = mCorrAvg->getLumi();
const float lumiDer = mCorrDer->getLumi();
mScaleDer = (lumi - lumiAvg) / lumiDer;

This seems to be used only with derivative correction, I guess it is not used in the productions?

@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 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

@alibuild
Copy link
Collaborator

alibuild commented Jul 3, 2025

Error while checking build/O2/fullCI_slc9 for ff24a72 at 2025-07-03 06:23:

[330/2428] Linking CXX shared library stage/lib64/libO2PhysicsPWGCFCore.so
[331/2428] Linking CXX executable stage/bin/o2-analysis-qa-k0s-tracking-efficiency
[332/2428] Building CXX object PWGCF/GenericFramework/Core/CMakeFiles/O2Physicslib-GFWCore.dir/GFWWeights.cxx.o
[333/2428] Linking CXX executable stage/bin/o2-analysis-time-dependent-qa
[334/2428] Building CXX object PWGCF/GenericFramework/Core/CMakeFiles/O2Physicslib-GFWCore.dir/BootstrapProfile.cxx.o
[335/2428] Building CXX object DPG/Tasks/MFT/CMakeFiles/O2Physicsexe-analysis-aqc-mft-tracks.dir/aQCMFTTracks.cxx.o
[336/2428] Building CXX object PWGCF/GenericFramework/Core/CMakeFiles/O2Physicslib-GFWCore.dir/GFWWeightsList.cxx.o
[337/2428] Building CXX object DPG/Tasks/FT0/CMakeFiles/O2Physicsexe-analysis-ft0-task.dir/ft0AnalysisTask.cxx.o
[338/2428] Building CXX object DPG/Tasks/AOTTrack/CMakeFiles/O2Physicsexe-analysis-qa-event-track.dir/qaEventTrack.cxx.o
[339/2428] Linking CXX executable stage/bin/o2-analysis-aqc-mft-tracks
[340/2428] Linking CXX executable stage/bin/o2-analysis-ft0-task
[341/2428] Building CXX object PWGCF/GenericFramework/Core/CMakeFiles/O2Physicslib-GFWCore.dir/G__O2PhysicsGFWCore.cxx.o
[342/2428] Linking CXX executable stage/bin/o2-analysis-qa-event-track
[343/2428] Building CXX object DPG/Tasks/AOTEvent/CMakeFiles/O2Physicsexe-analysis-rof-border-qa.dir/rofBorderQa.cxx.o
[344/2428] Building CXX object DPG/Tasks/AOTTrack/CMakeFiles/O2Physicsexe-analysis-qa-impact-parameter.dir/qaImpPar.cxx.o
[345/2428] Building CXX object DPG/Tasks/AOTEvent/CMakeFiles/O2Physicsexe-analysis-matching-qa.dir/matchingQa.cxx.o
[346/2428] Linking CXX executable stage/bin/o2-analysis-rof-border-qa
[347/2428] Building CXX object DPG/Tasks/AOTTrack/V0Cascades/CMakeFiles/O2Physicsexe-analysis-qa-lam-momentum-resolution.dir/qaLamMomResolution.cxx.o
[348/2428] Building CXX object DPG/Tasks/AOTEvent/CMakeFiles/O2Physicsexe-analysis-event-selection-qa.dir/eventSelectionQa.cxx.o
[349/2428] Building CXX object DPG/Tasks/TPC/CMakeFiles/O2Physicsexe-analysis-pid-tpc-tree-creator-light.dir/tpcTreeCreatorLight.cxx.o
[350/2428] Linking CXX executable stage/bin/o2-analysis-qa-impact-parameter
[351/2428] Linking CXX executable stage/bin/o2-analysis-matching-qa
[352/2428] Building CXX object DPG/Tasks/AOTTrack/V0Cascades/CMakeFiles/O2Physicsexe-analysis-perf-k0s-resolution.dir/perfK0sResolution.cxx.o
[353/2428] Building CXX object DPG/Tasks/AOTEvent/CMakeFiles/O2Physicsexe-analysis-occupancy-vs-dedx-qa.dir/dEdxVsOccupancyWithTrackQAinfo.cxx.o
[354/2428] Linking CXX executable stage/bin/o2-analysis-qa-lam-momentum-resolution
[355/2428] Building CXX object DPG/Tasks/AOTTrack/CMakeFiles/O2Physicsexe-analysis-tag-and-probe-dmesons.dir/tagAndProbeDmesons.cxx.o
[356/2428] Linking CXX executable stage/bin/o2-analysis-event-selection-qa
[357/2428] Building CXX object DPG/Tasks/Monitor/MC/CMakeFiles/O2Physicsexe-analysis-task-mc-simple-qc.dir/taskMcSimpleQC.cxx.o
[358/2428] Linking CXX executable stage/bin/o2-analysis-pid-tpc-tree-creator-light
[359/2428] Building CXX object DPG/Tasks/FDD/CMakeFiles/O2Physicsexe-analysis-fdd-qa.dir/qaFDD.cxx.o
[360/2428] Building CXX object DPG/Tasks/AOTEvent/CMakeFiles/O2Physicsexe-analysis-detector-occupancy-qa.dir/detectorOccupancyQa.cxx.o
[361/2428] Linking CXX executable stage/bin/o2-analysis-perf-k0s-resolution
[362/2428] Linking CXX executable stage/bin/o2-analysis-occupancy-vs-dedx-qa
[363/2428] Linking CXX executable stage/bin/o2-analysis-task-mc-simple-qc
[364/2428] Linking CXX executable stage/bin/o2-analysis-fdd-qa
[365/2428] Linking CXX executable stage/bin/o2-analysis-detector-occupancy-qa
[366/2428] Building CXX object DPG/Tasks/TOF/CMakeFiles/O2Physicsexe-analysis-tof-skimscreation.dir/tofSkimsTableCreator.cxx.o
[367/2428] Building CXX object DPG/Tasks/AOTEvent/CMakeFiles/O2Physicsexe-analysis-rof-occupancy-qa.dir/rofOccupancyQa.cxx.o
[368/2428] Building CXX object DPG/Tasks/AOTTrack/CMakeFiles/O2Physicsexe-analysis-monitorfilterbit.dir/MonitorFilterBit.cxx.o
[369/2428] Linking CXX executable stage/bin/o2-analysis-tof-skimscreation
[370/2428] Building CXX object PWGCF/GenericFramework/Core/CMakeFiles/O2Physicslib-GFWCore.dir/FlowPtContainer.cxx.o
[371/2428] Linking CXX executable stage/bin/o2-analysis-rof-occupancy-qa
[372/2428] Linking CXX executable stage/bin/o2-analysis-monitorfilterbit
[373/2428] Linking CXX shared library stage/lib64/libO2PhysicsGFWCore.so
[374/2428] Building CXX object DPG/Tasks/TOF/CMakeFiles/O2Physicsexe-analysis-tof-calib.dir/tofOfflineCalib.cxx.o
[375/2428] Building CXX object Common/TableProducer/CMakeFiles/O2Physicsexe-analysis-occ-table-producer.dir/occupancyTableProducer.cxx.o
[376/2428] Building CXX object DPG/Tasks/AOTTrack/CMakeFiles/O2Physicsexe-analysis-qa-efficiency.dir/qaEfficiency.cxx.o
[377/2428] Linking CXX executable stage/bin/o2-analysis-tof-calib
[378/2428] Linking CXX executable stage/bin/o2-analysis-occ-table-producer
[379/2428] Linking CXX executable stage/bin/o2-analysis-qa-efficiency

Full log here.

Comment on lines 308 to 316
if (val < 0. && mp->getLumi() >= 0. && !lumiOverridden) {
if (mp->getLumi() < o2::tpc::CorrMapParam::Instance().CTP2IDCFallBackThreshold) {
val = mp->getLumi();
static bool reportFallBack = true;
if (reportFallBack) {
reportFallBack = false;
LOGP(warn, "IDC scaling is requested but map IDC record is empty. Since map Lumi={} is less than fall-back threshold {}, interpret Lumi record as IDC",
val, o2::tpc::CorrMapParam::Instance().CTP2IDCFallBackThreshold);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be better that this goes to getIDC() (except the lumiOverridden). Then one can directly call the getIDC() also in other places and get the fallback automatically.
Also, the ref map in case of derivative can have IDC < 0, perhaps it would be better to set the default to 0, not -1 and check that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shahor02 , concerning your question above I would consider my suggestion and replace the getLumi() by getIDC(). I assume Matthias anyhow assumes IDC values and for derivative maps which are used I don't think we ever had CTP scalers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@wiechula this means that the getter should have a signature (assuming we don't want to introduce a dependency of the TPCFastTransform on TPCCalibration lib)

TPCFastTransform::getIDC(bool lumiOverridden, float fallbackThreshold)

If you think it is better, I can change this.
Concerning the defaults: I did not want to give a special meaning to 0, but ok, will change both defaults to 0.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shahor02 , can't you still check the lumiOverridden in CorrectionMapsLoader.cxx? And the fallbackThreshold could either go as a constant to TPCFastTransform, unless you think it will ever need to be adapted. In that case it could indeed be a signature of getIDC with a default parameter, or a member that can be set once after the map is loaded.
We can also leave it as you suggested and manually take care in places where we would call getIDC() (as I think should be done for your original question). Also fine for me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@wiechula OK, instead of passing the fall-back threshold as an argument of the getIDC, I am now setting it as a data member when uploading the map. Also, if the Lumi or IDC is overridden by the TPCCorrMap.lumiMean..., this value is set to the map lumi or IDC right after loading the map, so no need to pass override info during getIDC query.

Nominally both IDC (setIDC(val)) and Lumi (setLumi(val)) info of the map should be filled at the creation time.
Depending what is used for the corrections (accoding to --lumi-type value: 1 for CTP lumi or 2  for IDC scaler)
the getLumi or getIDC will be used. For the old maps, where the mIDC is absent (i.e. default value -1 returned by
getIDC()) but the Lumi was used to stored the IDC mean value, we check if getLumi() is below the threshold
TPCCorrMap.CTP2IDCFallBackThreshold (by default set to 30). If this is a case, the getLumi() value will be used as
IDC scale, otherwise a Fatal will be thrown.
Note that the inverse check is not done: if CTP Lumi scaling is requested for the old map where getLumi returns IDC,
a wrong scale will be accepted.
Copy link
Collaborator

@wiechula wiechula left a comment

Choose a reason for hiding this comment

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

Thanks @shahor02 , I think this looks good!

@shahor02 shahor02 merged commit e289430 into AliceO2Group:dev Jul 4, 2025
13 checks passed
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.

3 participants