Skip to content

Conversation

@matthias-kleiner
Copy link
Contributor

This PR adds a fallback to CTP scaling in case the IDCs are missing. When IDCs are missing, the default IDC object is used, which is =-1. In that case a wrong scaling is applied.
Local test with few TFs looks good so far:
CTP_Fallback

@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-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

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.

@matthias-kleiner thanks, looks fine, but as far as I can see, once fall-back is triggered, it will persist even if the IDC scaler was recovered. Perhaps we should add to the loader a backup value mLumiScaleTypeBackup of the original mLumiScaleType and in the beginning of every TF do

if (mIDC2CTPFallbackActive) {
  mIDC2CTPFallbackActive = false;
  mLumiScaleType = mLumiScaleTypeBackup;
}

?

@matthias-kleiner
Copy link
Contributor Author

Hi @shahor02 ,
the lumi scale type should be already recovered since I do:

if (getLumiScaleType() == 2 || mIDC2CTPFallbackActive) {
...
      if (mIDC2CTPFallbackActive) {
        // reset back to normal operation
        LOGP(info, "Valid TPC scaler value {} received, switching back to IDC-based scaling", tpcScaler);
        mIDC2CTPFallbackActive = false;
        setMeanLumi(mCorrMap->getIDC(), false);
        setMeanLumiRef(mCorrMapRef->getIDC());
        setLumiScaleType(2);
      }

You can also see it in the attached log that it goes back to Valid TPC scaler value 2.8228905 received, switching back to IDC-based scaling
reco.log

But I think I dont need to call setUpdatedMap(); and setUpdatedMapRef();as I update only the lumi or?

@shahor02
Copy link
Collaborator

Sorry, missed this. You indeed don't need to call setUpdatedMap() and setUpdatedMapRef(): the setInstLumi() internally triggers setUpdatedLumi(); state change.

@shahor02 shahor02 merged commit deff3d8 into AliceO2Group:dev Dec 13, 2025
11 of 12 checks passed
alcaliva pushed a commit that referenced this pull request Dec 15, 2025
* TPC: Use CTP as fallback if no IDCs are available

* Dont update map as only the lumi is updated
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.

2 participants