-
Notifications
You must be signed in to change notification settings - Fork 483
Add/use in TPCFastTransform mean IDC data member on top of Lumi #14470
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
Conversation
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
|
Error while checking build/O2/fullCI_slc9 for ff24a72 at 2025-07-03 06:23: Full log here. |
| 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); | ||
| } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
wiechula
left a comment
There was a problem hiding this 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!
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
AliceO2/Detectors/TPC/calibration/src/CorrectdEdxDistortions.cxx
Lines 73 to 75 in bf8eb6f
This seems to be used only with derivative correction, I guess it is not used in the productions?