Skip to content

TPC: Fix usage of derivative map for scaling of space-charge corrections#12264

Merged
shahor02 merged 3 commits into
AliceO2Group:devfrom
matthias-kleiner:DCAd_monitoring
Nov 18, 2023
Merged

TPC: Fix usage of derivative map for scaling of space-charge corrections#12264
shahor02 merged 3 commits into
AliceO2Group:devfrom
matthias-kleiner:DCAd_monitoring

Conversation

@matthias-kleiner
Copy link
Copy Markdown
Contributor

  • add option to override lumi of reference map (reference map can be the derivative map)

  • changing definition of scaling when using the derivative map: The derivative map is defined as "map_high_IR - map_low_IR". The stored lumi of the derivative map should correspond to "<Lumi_high_IR> - <Lumi_low_IR>"

  • Changing condition when scaling is used: for the derivative map the scaling is negative, when the inst_lumi < mean_lumi

- add option to override lumi of reference map (reference map can be the
derivative map)

- changing definition of scaling when using the derivative map: The
derivative map is defined as "map_high_IR - map_low_IR".
The stored lumi of the derivative map should correspond to
"<Lumi_high_IR> - <Lumi_low_IR>"

- Changing condition when scaling is used: for the derivative map the
scaling is negative, when the inst_lumi < mean_lumi
--lumi-type) ASK_CTP_LUMI_GPU=" --lumi-type ${2}"; [[ ${2} == "2" ]] && NEED_TPC_SCALERS_WF=1; shift 2;;
--lumi-type=*) ASK_CTP_LUMI_GPU="${ASK_CTP_LUMI_GPU} --lumi-type ${1#*=}"; shift 1;;
--lumi-type) ASK_CTP_LUMI_GPU="${ASK_CTP_LUMI_GPU} --lumi-type ${2}"; shift 2;;
--corrmap-lumi-mode=*) ASK_CTP_LUMI_GPU="${ASK_CTP_LUMI_GPU} --corrmap-lumi-mode ${1#*=}"; shift 1;;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hello @shahor02
I moved the --corrmap-lumi-mode to the tpc-reco-workflow and I also added it to gpu-reco-workflow. Otherwise the default value was actually used at some places in the code (invoid CorrectionMapsLoader::requestCCDBInputs(std::vector<InputSpec>& inputs, std::vector<o2::framework::ConfigParamSpec>& options, int lumiScaleType, int lumiScaleMode) the lumiScaleMode was always 0). I assume this is fine? I also added the --corrmap-lumi-mode to the parse_TPC_CORR_SCALING. Is this correct how I did it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Indeed, as it is now the corrmap-lumi-mode could not be used: as an option defining device inputs it must be defined on the workflow level. But then it should be added to all global tracking workflows using TPC corrections (same as --lumi-type). Let me open a PR on your branch to minimize the boiler plate code.
The fix for the dpl-workflow looks fine.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@matthias-kleiner for a reason I don't understand I am not able to open PR on your branch, matthias-kleiner/AliceO2 does not show up in the Choose a Base Repository menu...
Could you rebase your branch to my branch https://github.com/shahor02/AliceO2/tree/DCAd_monitoring (forked from yours with just 1 commit atted, you can also cherry-pick shahor02@884ce98 )
shahor02@884ce98

@matthias-kleiner matthias-kleiner marked this pull request as ready for review November 17, 2023 12:42
Former options --corrmap-lumi-mean, --corrmap-lumi-inst, --corrmap-lumi-ref, --ctp-lumi-factor, --ctp-lumi-source
are moved to new configurable param CorrMapParam as TPCCorrMap.lumiMean, lumiInst, lumiMeanRef, lumiInstFactor and ctpLumiSource
respectively. The object is not loaded from the CCDB (default uploaded) and can be modified from the command line
as a usial configurable param.
The dpl-workflow.sh parses TPC_CORR_SCALING env var. which is now a mix of options --lumi-type <0,1,2>, --corrmap-lumi-mode <0,1> abd
TPCCorrMap... settings, e.g. TPCCorrMap=--lumi-type 2 --corrmap-lumi-mode 1 TPCCorrMap.lumiInstFactor=3.141
@shahor02
Copy link
Copy Markdown
Collaborator

@matthias-kleiner I've updated my fork https://github.com/shahor02/AliceO2/tree/DCAd_monitoring which what we have discussed today: shahor02@faaa9fb
Please fetch this last commit.

The default configurable param was uploaded: https://alice.its.cern.ch/jira/browse/O2-4394.
We will need to upload for every map period a specific version of the CorrMapParam, to be prepared as (assuming that lumiInstFactor is modified:

root [0] auto& mp = o2::tpc::CorrMapParam::Instance();
root [1] o2::tpc::CorrMapParam::setValue("TPCCorrMap.lumiInstFactor","387167.86");
root [2] TFile* ff = TFile::Open("TPCCorrMapParamXXX.root","recreate");
root [3] mp.serializeTo(ff);
root [4] ff->Close();
root [5] .q

@shahor02
Copy link
Copy Markdown
Collaborator

@matthias-kleiner @wiechula the CI failure is unrelated, for me it is fine to merge this, shall I go on?

@matthias-kleiner
Copy link
Copy Markdown
Contributor Author

@matthias-kleiner @wiechula the CI failure is unrelated, for me it is fine to merge this, shall I go on?

For me it is also fine

@shahor02 shahor02 merged commit 0b3fa30 into AliceO2Group:dev Nov 18, 2023
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