Skip to content

Latest commit

History

History
233 lines (169 loc) · 12.1 KB

File metadata and controls

233 lines (169 loc) · 12.1 KB

Instructions For Python Scripts

Instructions for DownloadLibs.py

Download CutsLibrary, MCSignalLibrary, MixingLibrary From Github

VERY IMPORTANT P.S: You cannot use the Local option for LXPLUS, use this part if you are working in LXPLUS.

DQ Libraries (CutsLibrary.h, MCSignalLibrary.h, MixingLibrary.h, HistogramsLibrary.h) must be downloaded for auto-completion. After the argcomplete package is installed and sourced, they will be downloaded automatically if you do an one time autocomplete operation with the TAB key and the name of the script in the terminal. If you cannot provide this, the DownloadLibs.py script in the PythonInterfaceOOP folder can do it manually. To run this script, simply type the following on the command line.

P.S. Don't forget source your argcomplete Before the using this script. --> source argcomplete.sh

python3 DownloadLibs.py

For tag version based download (depends your production) e.g for nightly-20220619, just enter as 20220619:

python3 DownloadLibs.py --version 20220619

If the libraries are downloaded successfully you will get this message:

[INFO] Libraries downloaded successfully!

Get CutsLibrary, MCSignalLibrary, MixingLibrary From Local Machine

These libraries must be downloaded for validation and autocomplete. Instead of downloading libraries from github, you can configure the DownloadLibs.py script to pull the DQ libraries locally from the alice software on the existing computer. This option will not work on LXPLUS. if you are working on a local machine always use this option.

P.S. Don't forget source your argcomplete Before the using this script. --> source argcomplete.sh

Ex. Usage for Working Locally:

python3 DownloadLibs.py --local

In this configuration, the location of alice software is defaulted to /home/<user>/alice. If your alice software folder has a different name or is in a different location, you can configure it with the --localPath parameter. Ex. Usage for different path

python3 DownloadLibs.py --local --localPath alice-software

So with this configuration, your alice software path is changed to /home/<user>/alice-software. Another ex.

python3 DownloadLibs.py --version 20220619 --local --localPath Software/alice

So with this configuration, your alice software path is changed to /home/<user>/Sofware/alice

If the DQ libraries are pulled from local alice software successfully you will get this message:

[INFO] DQ Libraries pulled from local alice software successfully!

We have many logger message for this interface. If you have a problem with configuration, you can find the solution very easily by following the logger messages here. This solution is completely stable.

P.S. For updating temp DQ libraries, you can remove templibs folder and then you can execute DownloadLibs script for re-retrieving DQ libraries. Alternatively when you provide an autocompletio with TAB key for workflow script (etc. runTableMaker.py) or when you execute directly a workflow script, these libraries will be retrieved automatically with argcomplete package.

Available configs in DownloadLibs.py Interface

All Configs:
ArgOptLocal/Onlinenargsex. usage
-hNo ParamOnline and Local0python3 DownloadLibs.py -h
--versionallOnline1python3 DownloadLibs.py --version 20220619
--debug

NOTSET
DEBUG
INFO
WARNING
ERROR
CRITICAL

Online and Local1python3 DownloadLibs.py --debug INFO
--localNo ParamLocal1python3 DownloadLibs.py --local
--localPathallLocal1python3 DownloadLibs.py --local --localPath alice-software
More Details for DownloadLibs.py interface parameters
ArgRef TypeDescDefaultReal Type
-hNo Paramlist all helper messages for configurable commands*
--versionIntegerOnline: Your Production tag for O2Physics example: for nightly-20220619, just enter as 20220619masterstr
--debugstringOnline and Local: execute with debug options"INFOstr.upper
--localNo ParamLocal: Use Local Paths for getting DQ Libraries instead of online github download. If you are working LXPLUS, It will not working so don't configure with option-*
--localPathStringLocal: Configure your alice software folder name in your local home path. Default is alice. Example different configuration is --localpath alice-software --local --> home/user/alice-softwarealicestr

Hardcoded Arguments

These are helper hardcoded arguments for every run python scripts that do not directly manage configurations in json configuration files.

List of hard coded arguments:
positionalarguments:
Config.jsonconfigJSONfilename(mandatory)options:
-h, --helpshowthishelpmessageandexit
-runParallelRunparallelinsession(default: False)Globalworkflowoptions:
--aod-memory-rate-limitAOD_MEMORY_RATE_LIMITRatelimitAODprocessingbasedonmemory(default: None)
--writerWRITERArgumentforproducingextrareducedtables(default: None)
--helpO2DisplayhelpmessageonO2(default: False)AddtoworkflowO2Convertertaskoptions:
--add_mc_convAddtheconverterfrommcparticletomcparticle+001(Addsyourworkflowo2-analysis-mc-convertertask)(default: False)
--add_fdd_convAddthefddconverter(Addsyourworkflowo2-analysis-fdd-convertertask)(default: False)
--add_track_propAddtrackpropagationtotheinnermostlayer(TPCorITS)(Addsyourworkflowo2-analysis-track-propagationtask)(default: False)
--add_weakdecay_indAddConvertsV0andcascadeversion000to001(Addsyourworkflowo2-analysis-weak-decay-indicestask)(default: False)
--add_col_convAddtheconverterfromcollisiontocollision+001(default: False)HelperOptions:
--debug{NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}executewithdebugoptions(default: INFO)
--logFileEnableloggerforbothfileandCLI(default: False)
--override{true,false}IftrueJSONOverriderInterfaceIffalseJSONAdditionalInterface(default: true)

Instructions for runTableMaker

  • Minimum Required Parameter List:
    • The runOverMC variable, which is just below the main function in the script, must be False for tableMaker and True for tableMakerMC
    • python3
    • runTableMaker.py
    • JSON Config File
      • Example usage: configs/configTableMakerDataRun3.json

Examples:

  • Run TableMaker on Data run3 With Minimum Commands for Barrel Only (in script, runOverMC must be False)
    python3runTableMaker.pyconfigs/configTableMakerDataRun3.json --table-maker:processBarrelOnlytrue
  • Run TableMaker on MC run3 with Minimum Commands for Barrel Only (in script, runOverMC must be True)
    python3runTableMaker.pyconfigs/configTableMakerMCRun3.json --table-maker-m-c:processBarrelOnlytrue
  • Run TableMaker on Data run2 With Minimum Commands for Barrel Only (in script, runOverMC must be False)
    python3runTableMaker.pyconfigs/configTableMakerDataRun2.json --table-maker:processBarrelOnlytrue
  • Run TableMaker on MC run2 with Minimum Commands for Barrel Only (in script, runOverMC must be True)
    python3runTableMaker.pyconfigs/configTableMakerMCRun2.json --table-maker-m-c:processBarrelOnlytrue

In case of multiple configs example(runOverMC have to be True for run with tableMakerMC):

python3runTableMaker.pyconfigs/configTableMakerMCRun3.json --table-maker-m-c:processMuonOnlyWithCovtrue --table-maker-m-c:processOnlyBCstrue --table-maker-m-c:cfgMCsignalsmuFromJpsiJpsimuFromPsi2SPsi2S --overridertrue --internal-dpl-aod-reader:aod-fileDatas/AO2D.root --table-maker-m-c:cfgMuonCutsmuonQualityCutsmuonTightQualityCutsForTests --event-selection-task:systpp --overridertrue --add_track_prop

Instructions for runAnalysis.py

  • The runOverMC variable, which is just below the main function in the script, must be False for tableReader and True for dqEfficiency
  • Minimum Required Parameter List:
    • python3
    • runAnalysis.py
    • JSON Config File
      • Example For Most common usages: configs/configAnalysisData.json or configs/configAnalysisMC.json

Examples:

  • Run tableReader on Data run3 With Minimum Commands (in script, runOverMC must be False)
    python3runAnalysis.pyconfigs/configAnalysisData.json
  • Run dqEfficiency on MC run3 With Minimum Commands (in script, runOverMC must be True)
    python3runAnalysis.pyconfigs/configAnalysisMC.json

In case of multiple configs example (runOverMC have to be False for run with tableReader):

python3runAnalysis.pyconfigs/configAnalysisData.json --analysis-event-selection:processSkimmedtrue --analysis-track-selection:processSkimmedtrue --analysis-same-event-pairing:processDecayToEESkimmedtrue --analysis-track-selection:cfgTrackCutsjpsiO2MCdebugCuts --analysis-same-event-pairing:cfgTrackCutsjpsiO2MCdebugCuts --internal-dpl-aod-reader:aod-fileDatas/reducedAod.root --debugdebug --logFile

Instructions for runFilterPP.py

  • Minimum Required Parameter List:
    • python3
    • runFilterPP.py
    • JSON Config File
      • Example For usage: configs/configFilterPPDataRun3.json

Examples:

  • Run filterPP on Data run3 With Minimum Commands

    python3runFilterPP.pyconfigs/configFilterPPDataRun3.json
  • Run filterPP on Data run2 With Minimum Commands

    python3runFilterPP.pyconfigs/configFilterPPDataRun2.json

In case of multiple configs example

python3runFilterPP.pyconfigs/configFilterPPDataRun3.json --internal-dpl-aod-reader:aod-fileDatas/AO2D.root --event-selection-task:systpp --d-q-event-selection-task:processEventSelectiontrue --d-q-barrel-track-selection-task:processSelectiontrue --d-q-muons-selection:processSelectiontrue --d-q-filter-p-p-task:cfgBarrelSelsjpsiO2MCdebugCuts2::1 --d-q-event-selection-task:cfgEventCutseventStandardNoINT7 --d-q-barrel-track-selection-task:cfgBarrelTrackCutsjpsiO2MCdebugCuts2jpsiO2MCdebugCuts2 --d-q-filter-p-p-task:cfgWithQAtrue

Instructions for runDQFlow.py

  • Minimum Required Parameter List:
    • python3
    • runDQFlow.py
    • JSON Config File
      • Example For usage: configs/configFlowDataRun3.json

Examples:

  • Run filterPP on Data run3 With Minimum Commands

    python3runDQFlow.pyconfigs/configFlowDataRun3.json
  • Run filterPP on Data run2 With Minimum Commands

    python3runDQFlow.pyconfigs/configFlowDataRun2.json

In case of multiple configs example

python3runDQFlow.pyconfigs/configFlowDataRun3.json --internal-dpl-aod-reader:aod-fileDatas/AO2D.root --event-selection-task:systPbPb --d-q-event-qvector:cfgBarrelTrackCutsjpsiPID1 --d-q-event-qvector:cfgMuonCutsmuonQualityCuts --d-q-event-qvector:cfgWithQAtrue --d-q-event-qvector:cfgCutPtMin1 --d-q-event-qvector:cfgCutPtMax15

← Go back to Instructions For Techincal Informations | ↑ Go to the Table of Content ↑ | Continue to Tutorials →