@@ -261,7 +261,7 @@ def load_external_config(configfile):
261261# these are all detectors that should be assumed active
262262readout_detectors = args .readoutDets
263263# here are all detectors that have been set in an anchored script
264- activeDetectors = dpl_option_from_config (anchorConfig , 'o2-ctf-reader-workflow' , key = 'onlyDet' , default_value = 'all' )
264+ activeDetectors = dpl_option_from_config (anchorConfig , 'o2-ctf-reader-workflow' , key = '-- onlyDet' , default_value = 'all' )
265265if activeDetectors == 'all' :
266266 # if "all" here, there was in fact nothing in the anchored script, set to what is passed to this script (which it either also "all" or a subset)
267267 activeDetectors = readout_detectors
@@ -1122,7 +1122,8 @@ def putConfigValues(listOfMainKeys=[], localCF = {}):
11221122 + ' --onlyDet TRD --interactionRate ' + str (INTRATE ) + ' --incontext ' + str (CONTEXTFILE ) + ' --disable-write-ini' \
11231123 + putConfigValues (localCF = {"TRDSimParams.digithreads" : NWORKERS_TF , "DigiParams.seed" : str (TFSEED )}) + " --forceSelectedDets"
11241124 TRDDigitask ['cmd' ] += ('' ,' --disable-mc' )[args .no_mc_labels ]
1125- workflow ['stages' ].append (TRDDigitask )
1125+ if isActive ("TRD" ):
1126+ workflow ['stages' ].append (TRDDigitask )
11261127
11271128 # these are digitizers which are single threaded
11281129 def createRestDigiTask (name , det = 'ALLSMALLER' ):
@@ -1361,12 +1362,13 @@ def getDigiTaskName(det):
13611362 getDPL_global_options (),
13621363 putConfigValues (),
13631364 ('' ,' --disable-mc' )[args .no_mc_labels ]])
1364- workflow ['stages' ].append (TRDTRACKINGtask )
1365+ if isActive ("TRD" ):
1366+ workflow ['stages' ].append (TRDTRACKINGtask )
13651367
13661368 #<--------- TRD global tracking
13671369 # FIXME This is so far a workaround to avoud a race condition for trdcalibratedtracklets.root
13681370 TRDTRACKINGtask2 = createTask (name = 'trdreco2_' + str (tf ), needs = [TRDTRACKINGtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1' , mem = '2000' )
1369- trd_track_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-trd-global-tracking' , 'track-sources' , default_value = 'TPC,ITS-TPC' ))
1371+ trd_track_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-trd-global-tracking' , '-- track-sources' , default_value = 'TPC,ITS-TPC' ))
13701372 TRDTRACKINGtask2 ['cmd' ] = task_finalizer ([
13711373 '${O2_ROOT}/bin/o2-trd-global-tracking' ,
13721374 getDPL_global_options (bigshm = True ),
@@ -1381,7 +1383,8 @@ def getDigiTaskName(det):
13811383 '--track-sources ' + trd_track_sources ,
13821384 tpc_corr_scaling_options ,
13831385 tpc_corr_options_mc ])
1384- workflow ['stages' ].append (TRDTRACKINGtask2 )
1386+ if isActive ("TRD" ):
1387+ workflow ['stages' ].append (TRDTRACKINGtask2 )
13851388
13861389 #<--------- TOF reco task
13871390 TOFRECOtask = createTask (name = 'tofmatch_' + str (tf ), needs = [ITSTPCMATCHtask ['name' ], getDigiTaskName ("TOF" )], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
@@ -1396,8 +1399,11 @@ def getDigiTaskName(det):
13961399 workflow ['stages' ].append (TOFRECOtask )
13971400
13981401 #<--------- TOF-TPC(-ITS) global track matcher workflow
1399- toftpcmatchneeds = [TOFRECOtask ['name' ], TPCRECOtask ['name' ], ITSTPCMATCHtask ['name' ], TRDTRACKINGtask2 ['name' ]]
1400- toftracksrcdefault = dpl_option_from_config (anchorConfig , 'o2-tof-matcher-workflow' , 'track-sources' , default_value = 'TPC,ITS-TPC,TPC-TRD,ITS-TPC-TRD' )
1402+ toftpcmatchneeds = [TOFRECOtask ['name' ],
1403+ TPCRECOtask ['name' ],
1404+ ITSTPCMATCHtask ['name' ],
1405+ TRDTRACKINGtask2 ['name' ] if isActive ("TRD" ) else None ]
1406+ toftracksrcdefault = dpl_option_from_config (anchorConfig , 'o2-tof-matcher-workflow' , '--track-sources' , default_value = 'TPC,ITS-TPC,TPC-TRD,ITS-TPC-TRD' )
14011407 tofusefit = option_if_available ('o2-tof-matcher-workflow' , '--use-fit' , envfile = async_envfile )
14021408 TOFTPCMATCHERtask = createTask (name = 'toftpcmatch_' + str (tf ), needs = toftpcmatchneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1000' )
14031409 tofmatcher_cmd_parts = [
@@ -1591,9 +1597,9 @@ def getDigiTaskName(det):
15911597 hmpmatchneeds = [HMPRECOtask ['name' ],
15921598 ITSTPCMATCHtask ['name' ],
15931599 TOFTPCMATCHERtask ['name' ] if isActive ("TOF" ) else None ,
1594- TRDTRACKINGtask2 ['name' ]]
1600+ TRDTRACKINGtask2 ['name' ] if isActive ( "TRD" ) else None ]
15951601 hmpmatchneeds = [ n for n in hmpmatchneeds if n != None ]
1596- hmp_match_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-hmpid-matcher-workflow' , 'track-sources' , default_value = 'ITS-TPC,ITS-TPC-TRD,TPC-TRD' ))
1602+ hmp_match_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-hmpid-matcher-workflow' , '-- track-sources' , default_value = 'ITS-TPC,ITS-TPC-TRD,TPC-TRD' ))
15971603 HMPMATCHtask = createTask (name = 'hmpmatch_' + str (tf ), needs = hmpmatchneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1000' )
15981604 HMPMATCHtask ['cmd' ] = task_finalizer (
15991605 ['${O2_ROOT}/bin/o2-hmpid-matcher-workflow' ,
@@ -1606,17 +1612,17 @@ def getDigiTaskName(det):
16061612 #<---------- primary vertex finding
16071613 pvfinder_sources = dpl_option_from_config (anchorConfig ,
16081614 'o2-primary-vertexing-workflow' ,
1609- 'vertexing-sources' ,
1615+ '-- vertexing-sources' ,
16101616 default_value = 'ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,MCH-MID,ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,FDD,HMP,FV0,TRD,MCH,CTP' )
16111617 pvfinder_sources = cleanDetectorInputList (pvfinder_sources )
16121618
16131619 pvfinder_matching_sources = dpl_option_from_config (anchorConfig ,
16141620 'o2-primary-vertexing-workflow' ,
1615- 'vertex-track-matching-sources' ,
1621+ '-- vertex-track-matching-sources' ,
16161622 default_value = 'ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,MCH-MID,ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,FDD,HMP,FV0,TRD,MCH,CTP' )
16171623 pvfinder_matching_sources = cleanDetectorInputList (pvfinder_matching_sources )
16181624
1619- pvfinderneeds = [TRDTRACKINGtask2 ['name' ],
1625+ pvfinderneeds = [TRDTRACKINGtask2 ['name' ] if isActive ( "TRD" ) else None ,
16201626 FT0RECOtask ['name' ] if isActive ("FT0" ) else None ,
16211627 FV0RECOtask ['name' ] if isActive ("FV0" ) else None ,
16221628 EMCRECOtask ['name' ] if isActive ("EMC" ) else None ,
@@ -1658,7 +1664,7 @@ def getDigiTaskName(det):
16581664
16591665 svfinder_sources = dpl_option_from_config (anchorConfig ,
16601666 'o2-primary-vertexing-workflow' ,
1661- 'vertex-track-matching-sources' ,
1667+ '-- vertex-track-matching-sources' ,
16621668 default_value = 'ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,MCH-MID,ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,ZDC,FDD,HMP,FV0,TRD,MCH,CTP' )
16631669 svfinder_sources = cleanDetectorInputList (svfinder_sources )
16641670 SVFINDERtask = createTask (name = 'svfinder_' + str (tf ), needs = [PVFINDERtask ['name' ], FT0FV0EMCCTPDIGItask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = svfinder_cpu , mem = '5000' )
@@ -1679,7 +1685,7 @@ def getDigiTaskName(det):
16791685 #<------------- AOD producer
16801686 # TODO This needs further refinement, sources and dependencies should be constructed dynamically
16811687 aod_info_souces_default = 'ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,MCH-MID,ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,ZDC,FDD,HMP,FV0,TRD,MCH,CTP'
1682- aodinfosources = dpl_option_from_config (anchorConfig , 'o2-aod-producer-workflow' , 'info-sources' , default_value = aod_info_souces_default )
1688+ aodinfosources = dpl_option_from_config (anchorConfig , 'o2-aod-producer-workflow' , '-- info-sources' , default_value = aod_info_souces_default )
16831689 aodinfosources = cleanDetectorInputList (aodinfosources )
16841690 aodneeds = [PVFINDERtask ['name' ], SVFINDERtask ['name' ]]
16851691
@@ -1736,17 +1742,17 @@ def getDigiTaskName(det):
17361742 #<------------- TPC residuals extraction
17371743 scdcalib_vertex_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig ,
17381744 'o2-tpc-scdcalib-interpolation-workflow' ,
1739- 'vtx-sources' ,
1745+ '-- vtx-sources' ,
17401746 default_value = 'ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,MCH-MID,ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,FDD,HMP,FV0,TRD,MCH,CTP' ))
17411747
17421748 scdcalib_track_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig ,
17431749 'o2-tpc-scdcalib-interpolation-workflow' ,
1744- 'tracking-sources' ,
1750+ '-- tracking-sources' ,
17451751 default_value = 'ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,MCH-MID,ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,FDD,HMP,FV0,TRD,MCH,CTP' ))
17461752
17471753 scdcalib_track_extraction = cleanDetectorInputList (dpl_option_from_config (anchorConfig ,
17481754 'o2-tpc-scdcalib-interpolation-workflow' ,
1749- 'tracking-sources-map-extraction' ,
1755+ '-- tracking-sources-map-extraction' ,
17501756 default_value = 'ITS-TPC' ))
17511757
17521758 SCDCALIBtask = createTask (name = 'scdcalib_' + str (tf ), needs = [PVFINDERtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["CALIB" ], mem = '4000' )
@@ -1765,11 +1771,11 @@ def getDigiTaskName(det):
17651771 #<------------- TPC residuals aggregator
17661772 scdaggreg_secperslot = dpl_option_from_config (anchorConfig ,
17671773 'o2-calibration-residual-aggregator' ,
1768- 'sec-per-slot' ,
1774+ '-- sec-per-slot' ,
17691775 default_value = '600' )
17701776 scdaggreg_outputtype = dpl_option_from_config (anchorConfig ,
17711777 'o2-calibration-residual-aggregator' ,
1772- 'output-type' ,
1778+ '-- output-type' ,
17731779 default_value = 'trackParams,unbinnedResid' )
17741780
17751781 SCDAGGREGtask = createTask (name = 'scdaggreg_' + str (tf ), needs = [SCDCALIBtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["CALIB" ], mem = '1500' )
@@ -1849,12 +1855,13 @@ def remove_json_prefix(path):
18491855
18501856 ### TRD
18511857 # TODO: check if the readerCommand also reperforms tracklet construction (which already done in digitization)
1852- addQCPerTF (taskName = 'trdDigitsQC' ,
1858+ if isActive ('TRD' ):
1859+ addQCPerTF (taskName = 'trdDigitsQC' ,
18531860 needs = [TRDDigitask ['name' ]],
18541861 readerCommand = 'o2-trd-trap-sim --disable-root-output true' ,
18551862 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/trd-standalone-task.json' )
18561863
1857- addQCPerTF (taskName = 'trdTrackingQC' ,
1864+ addQCPerTF (taskName = 'trdTrackingQC' ,
18581865 needs = [TRDTRACKINGtask2 ['name' ]],
18591866 readerCommand = 'o2-global-track-cluster-reader --track-types "ITS-TPC-TRD,TPC-TRD" --cluster-types none' ,
18601867 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/trd-tracking-task.json' )
0 commit comments