@@ -241,10 +241,14 @@ def load_external_config(configfile):
241241 # merge the dictionaries into anchorConfig, the latter takes precedence
242242 merge_dicts (anchorConfig , config_overwrite )
243243
244+ async_envfile = 'env_async.env' if environ .get ('ALIEN_JDL_O2DPG_ASYNC_RECO_TAG' ) is not None else None
245+ # Check if either ITS or MFT are in the staggered mode (either from the async reco workflow or imposed externally)
246+ staggITS = ' --enable-its-staggering ' if environ .get ('ALIEN_JDL_ITS_STAGGERED' ) == '1' and option_if_available ('o2-its-reco-workflow' , '--enable-its-staggering' , envfile = async_envfile ) != '' else ''
247+ staggMFT = ' --enable-mft-staggering ' if environ .get ('ALIEN_JDL_MFT_STAGGERED' ) == '1' and option_if_available ('o2-mft-reco-workflow' , '--enable-mft-staggering' , envfile = async_envfile ) != '' else ''
248+
244249# We still may need adjust configurations manually for consistency:
245250#
246251# * Force simpler TPC digitization of if TPC reco does not have the mc-time-gain option or remap to a different CCDB object if we are anchored to 2023:
247- async_envfile = 'env_async.env' if environ .get ('ALIEN_JDL_O2DPG_ASYNC_RECO_TAG' ) is not None else None
248252tpcreco_mctimegain = option_if_available ('o2-tpc-reco-workflow' , '--tpc-mc-time-gain' , envfile = async_envfile )
249253if tpcreco_mctimegain == '' :
250254 # TODO: Upload all MC time gain objects to TestReco and remove year dependence
@@ -1203,6 +1207,10 @@ def createRestDigiTask(name, det='ALLSMALLER'):
12031207 detlist = ',' .join (smallsensorlist )
12041208 detlist = cleanDetectorInputList (detlist )
12051209 t ['cmd' ] += commondigicmd + ' --onlyDet ' + detlist
1210+ if 'ITS' in detlist :
1211+ t ['cmd' ] += staggITS
1212+ if 'MFT' in detlist :
1213+ t ['cmd' ] += staggMFT
12061214 t ['cmd' ] += ' --ccdb-tof-sa --forceSelectedDets '
12071215 t ['cmd' ] += (' --combine-devices ' ,'' )[args .no_combine_dpl_devices ]
12081216 t ['cmd' ] += ('' ,' --disable-mc' )[args .no_mc_labels ]
@@ -1215,6 +1223,10 @@ def createRestDigiTask(name, det='ALLSMALLER'):
12151223 t = createTask (name = name , needs = tneeds , tf = tf , cwd = timeframeworkdir , lab = ["DIGI" ,"SMALLDIGI" ], cpu = '1' )
12161224 t ['cmd' ] = ('' ,'ln -nfs ../bkg_Hits' + str (det ) + '.root . ;' )[doembedding ]
12171225 t ['cmd' ] += commondigicmd + ' --onlyDet ' + str (det )
1226+ if det == 'ITS' :
1227+ t ['cmd' ] += staggITS
1228+ if det == 'MFT' :
1229+ t ['cmd' ] += staggMFT
12181230 t ['cmd' ] += ('' ,' --disable-mc' )[args .no_mc_labels ]
12191231 if det == 'TOF' :
12201232 t ['cmd' ] += ' --ccdb-tof-sa'
@@ -1374,7 +1386,7 @@ def getDigiTaskName(det):
13741386 TPCSyncRECOtask ['cmd' ] = '${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options (bigshm = True , ccdbbackend = False , runcommand = False ) \
13751387 + '--input-type clusters --output-type clusters,disable-writer ' \
13761388 + putConfigValues ()
1377- TPCSyncRECOtask ['cmd' ] += ' | ${O2_ROOT}/bin/o2-gpu-reco-workflow' + getDPL_global_options (bigshm = True , ccdbbackend = True , runcommand = False ) \
1389+ TPCSyncRECOtask ['cmd' ] += ' | ${O2_ROOT}/bin/o2-gpu-reco-workflow ' + getDPL_global_options (bigshm = True , ccdbbackend = True , runcommand = False ) \
13781390 + '--input-type clusters --output-type compressed-clusters-flat,clusters,send-clusters-per-sector --filtered-output-specs ' \
13791391 + tpc_corr_scaling_options + ' ' + tpc_corr_options_mc \
13801392 + putConfigValues (["TPCGasParam" , "TPCCorrMap" , "trackTuneParams" ],
@@ -1414,6 +1426,7 @@ def getDigiTaskName(det):
14141426 ITSRECOtask ['cmd' ] = task_finalizer ([
14151427 "${O2_ROOT}/bin/o2-its-reco-workflow" if args .detectorList == 'ALICE2' else "${O2_ROOT}/bin/o2-its3-reco-workflow" ,
14161428 getDPL_global_options (bigshm = havePbPb ),
1429+ staggITS ,
14171430 '--tracking-mode async' ,
14181431 putConfigValues (["ITSVertexerParam" ,
14191432 "ITSAlpideParam" ,
@@ -1439,6 +1452,7 @@ def getDigiTaskName(det):
14391452 ITSTPCMATCHtask = createTask (name = 'itstpcMatch_' + str (tf ), needs = [TPCRECOtask ['name' ], ITSRECOtask ['name' ], FT0RECOtask ['name' ] if isActive ("FT0" ) else None ], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '8000' , relative_cpu = 3 / 8 )
14401453 ITSTPCMATCHtask ["cmd" ] = task_finalizer ([
14411454 '${O2_ROOT}/bin/o2-tpcits-match-workflow' ,
1455+ staggITS ,
14421456 getDPL_global_options (bigshm = True ),
14431457 ' --tpc-track-reader tpctracks.root' ,
14441458 '--tpc-native-cluster-reader \" --infile tpc-native-clusters.root\" ' ,
@@ -1474,6 +1488,7 @@ def getDigiTaskName(det):
14741488 TRDTRACKINGtask2 ['cmd' ] = task_finalizer ([
14751489 '${O2_ROOT}/bin/o2-trd-global-tracking' ,
14761490 getDPL_global_options (bigshm = True ),
1491+ staggITS ,
14771492 ('' ,' --disable-mc' )[args .no_mc_labels ],
14781493 putConfigValues (['ITSClustererParam' ,
14791494 'ITSCATrackerParam' ,
@@ -1537,6 +1552,7 @@ def getDigiTaskName(det):
15371552 MFTRECOtask ['cmd' ] += task_finalizer ([
15381553 '${O2_ROOT}/bin/o2-mft-reco-workflow' ,
15391554 getDPL_global_options (),
1555+ staggMFT ,
15401556 putConfigValues (['MFTTracking' ,
15411557 'MFTAlpideParam' ,
15421558 'ITSClustererParam' ,
@@ -1664,6 +1680,7 @@ def getDigiTaskName(det):
16641680 MFTMCHMATCHtask = createTask (name = 'mftmchMatch_' + str (tf ), needs = forwardmatchneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
16651681 MFTMCHMATCHtask ['cmd' ] = task_finalizer (
16661682 ['${O2_ROOT}/bin/o2-globalfwd-matcher-workflow' ,
1683+ staggMFT ,
16671684 putConfigValues (['ITSAlpideConfig' ,
16681685 'MFTAlpideConfig' ,
16691686 'FwdMatching' ],{"FwdMatching.useMIDMatch" : "true" if isActive ("MID" ) else "false" }),
@@ -1679,7 +1696,7 @@ def getDigiTaskName(det):
16791696
16801697 if args .fwdmatching_save_trainingdata == True :
16811698 MFTMCHMATCHTraintask = createTask (name = 'mftmchMatchTrain_' + str (tf ), needs = [MCHMIDMATCHtask ['name' ], MFTRECOtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
1682- MFTMCHMATCHTraintask ['cmd' ] = '${O2_ROOT}/bin/o2-globalfwd-matcher-workflow ' + putConfigValues (['ITSAlpideConfig' ,'MFTAlpideConfig' ],{"FwdMatching.useMIDMatch" :"true" })
1699+ MFTMCHMATCHTraintask ['cmd' ] = '${O2_ROOT}/bin/o2-globalfwd-matcher-workflow ' + staggMFT + putConfigValues (['ITSAlpideConfig' ,'MFTAlpideConfig' ],{"FwdMatching.useMIDMatch" :"true" })
16831700 MFTMCHMATCHTraintask ['cmd' ]+= getDPL_global_options ()
16841701 workflow ['stages' ].append (MFTMCHMATCHTraintask )
16851702
@@ -1769,6 +1786,7 @@ def getDigiTaskName(det):
17691786 SVFINDERtask = createTask (name = 'svfinder_' + str (tf ), needs = [PVFINDERtask ['name' ], FT0FV0EMCCTPDIGItask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = svfinder_cpu , mem = '5000' )
17701787 SVFINDERtask ['cmd' ] = task_finalizer (
17711788 [ '${O2_ROOT}/bin/o2-secondary-vertexing-workflow' ,
1789+ staggITS ,
17721790 getDPL_global_options (bigshm = True ),
17731791 svfinder_threads ,
17741792 putConfigValues (['svertexer' , 'TPCCorrMap' , 'GlobalParams' ], {"NameConf.mDirMatLUT" : ".." } | tpcLocalCFreco ),
@@ -1825,6 +1843,8 @@ def getDigiTaskName(det):
18251843 AODtask ['cmd' ] += '[ -f AO2D.root ] && rm AO2D.root; '
18261844 AODtask ['cmd' ] += task_finalizer ([
18271845 "${O2_ROOT}/bin/o2-aod-producer-workflow" ,
1846+ staggITS ,
1847+ staggMFT ,
18281848 "--reco-mctracks-only 1" ,
18291849 "--aod-writer-keep dangling" ,
18301850 "--aod-writer-resfile AO2D" ,
@@ -1943,15 +1963,15 @@ def remove_json_prefix(path):
19431963 objectsFile = 'mftDigitsQC.root' )
19441964 addQCPerTF (taskName = 'mftClustersQC' ,
19451965 needs = [MFTRECOtask ['name' ]],
1946- readerCommand = 'o2-global-track-cluster-reader --track-types none --cluster-types MFT' ,
1966+ readerCommand = 'o2-global-track-cluster-reader --track-types none --cluster-types MFT' + staggMFT ,
19471967 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-clusters.json' )
19481968 addQCPerTF (taskName = 'mftTracksQC' ,
19491969 needs = [MFTRECOtask ['name' ]],
1950- readerCommand = 'o2-global-track-cluster-reader --track-types MFT --cluster-types MFT' ,
1970+ readerCommand = 'o2-global-track-cluster-reader --track-types MFT --cluster-types MFT' + staggMFT ,
19511971 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-tracks.json' )
19521972 addQCPerTF (taskName = 'mftMCTracksQC' ,
19531973 needs = [MFTRECOtask ['name' ]],
1954- readerCommand = 'o2-global-track-cluster-reader --track-types MFT --cluster-types MFT' ,
1974+ readerCommand = 'o2-global-track-cluster-reader --track-types MFT --cluster-types MFT' + staggMFT ,
19551975 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-tracks-mc.json' )
19561976
19571977 ### TPC
@@ -2062,12 +2082,12 @@ def remove_json_prefix(path):
20622082 ### ITS
20632083 addQCPerTF (taskName = 'ITSTrackSimTaskQC' ,
20642084 needs = [ITSRECOtask ['name' ]],
2065- readerCommand = 'o2-global-track-cluster-reader --track-types "ITS" --cluster-types "ITS"' ,
2085+ readerCommand = 'o2-global-track-cluster-reader --track-types "ITS" --cluster-types "ITS"' + staggITS ,
20662086 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/its-mc-tracks-qc.json' )
20672087
20682088 addQCPerTF (taskName = 'ITSTracksClustersQC' ,
20692089 needs = [ITSRECOtask ['name' ]],
2070- readerCommand = 'o2-global-track-cluster-reader --track-types "ITS" --cluster-types "ITS"' ,
2090+ readerCommand = 'o2-global-track-cluster-reader --track-types "ITS" --cluster-types "ITS"' + staggITS ,
20712091 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/its-clusters-tracks-qc.json' )
20722092
20732093 ### CPV
@@ -2125,12 +2145,12 @@ def remove_json_prefix(path):
21252145 if isActive ('MCH' ) and isActive ('MID' ) and isActive ('MFT' ) :
21262146 addQCPerTF (taskName = 'MUONTracksMFTTaskQC' ,
21272147 needs = [MFTMCHMATCHtask ['name' ], MCHMIDMATCHtask ['name' ]],
2128- readerCommand = 'o2-global-track-cluster-reader --track-types "MFT,MCH,MID,MCH-MID,MFT-MCH,MFT-MCH-MID" --cluster-types "MCH,MID,MFT"' ,
2148+ readerCommand = 'o2-global-track-cluster-reader --track-types "MFT,MCH,MID,MCH-MID,MFT-MCH,MFT-MCH-MID" --cluster-types "MCH,MID,MFT"' + staggMFT ,
21292149 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mftmchmid-tracks-task.json' )
21302150 elif isActive ('MCH' ) and isActive ('MFT' ) :
21312151 addQCPerTF (taskName = 'MCHMFTTaskQC' ,
21322152 needs = [MFTMCHMATCHtask ['name' ]],
2133- readerCommand = 'o2-global-track-cluster-reader --track-types "MCH,MFT,MFT-MCH" --cluster-types "MCH,MFT"' ,
2153+ readerCommand = 'o2-global-track-cluster-reader --track-types "MCH,MFT,MFT-MCH" --cluster-types "MCH,MFT"' + staggMFT ,
21342154 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mftmch-tracks-task.json' )
21352155
21362156
@@ -2147,7 +2167,9 @@ def remove_json_prefix(path):
21472167 TPCTStask = createTask (name = 'tpctimeseries_' + str (tf ), needs = tpctsneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '2000' , cpu = '1' )
21482168 TPCTStask ['cmd' ] = 'o2-global-track-cluster-reader --disable-mc --cluster-types "FT0,TOF,TPC" --track-types "ITS,TPC,ITS-TPC,ITS-TPC-TOF,ITS-TPC-TRD-TOF"'
21492169 TPCTStask ['cmd' ] += ' --primary-vertices '
2170+ TPCTStask ['cmd' ] += staggITS
21502171 TPCTStask ['cmd' ] += ' | o2-tpc-time-series-workflow --enable-unbinned-root-output --sample-unbinned-tsallis --sampling-factor 0.01 '
2172+ TPCTStask ['cmd' ] += staggITS
21512173 TPCTStask ['cmd' ] += putConfigValues () + ' ' + getDPL_global_options (bigshm = True )
21522174 # could be relaxed or changed once the timerseries worklow is more reactive to input cluster- and track-types
21532175 addWhenActive ("TOF,TPC,FT0" , workflow ['stages' ], TPCTStask )
0 commit comments