@@ -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
@@ -1125,7 +1125,8 @@ def putConfigValues(listOfMainKeys=[], localCF = {}, globalTFConfig = True):
11251125 + ' --onlyDet TRD --interactionRate ' + str (INTRATE ) + ' --incontext ' + str (CONTEXTFILE ) + ' --disable-write-ini' \
11261126 + putConfigValues (localCF = {"TRDSimParams.digithreads" : NWORKERS_TF , "DigiParams.seed" : str (TFSEED )}) + " --forceSelectedDets"
11271127 TRDDigitask ['cmd' ] += ('' ,' --disable-mc' )[args .no_mc_labels ]
1128- workflow ['stages' ].append (TRDDigitask )
1128+ if isActive ("TRD" ):
1129+ workflow ['stages' ].append (TRDDigitask )
11291130
11301131 # these are digitizers which are single threaded
11311132 def createRestDigiTask (name , det = 'ALLSMALLER' ):
@@ -1385,12 +1386,13 @@ def getDigiTaskName(det):
13851386 getDPL_global_options (),
13861387 putConfigValues (),
13871388 ('' ,' --disable-mc' )[args .no_mc_labels ]])
1388- workflow ['stages' ].append (TRDTRACKINGtask )
1389+ if isActive ("TRD" ):
1390+ workflow ['stages' ].append (TRDTRACKINGtask )
13891391
13901392 #<--------- TRD global tracking
13911393 # FIXME This is so far a workaround to avoud a race condition for trdcalibratedtracklets.root
13921394 TRDTRACKINGtask2 = createTask (name = 'trdreco2_' + str (tf ), needs = [TRDTRACKINGtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = '1' , mem = '2000' )
1393- trd_track_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-trd-global-tracking' , 'track-sources' , default_value = 'TPC,ITS-TPC' ))
1395+ trd_track_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-trd-global-tracking' , '-- track-sources' , default_value = 'TPC,ITS-TPC' ))
13941396 TRDTRACKINGtask2 ['cmd' ] = task_finalizer ([
13951397 '${O2_ROOT}/bin/o2-trd-global-tracking' ,
13961398 getDPL_global_options (bigshm = True ),
@@ -1405,7 +1407,8 @@ def getDigiTaskName(det):
14051407 '--track-sources ' + trd_track_sources ,
14061408 tpc_corr_scaling_options ,
14071409 tpc_corr_options_mc ])
1408- workflow ['stages' ].append (TRDTRACKINGtask2 )
1410+ if isActive ("TRD" ):
1411+ workflow ['stages' ].append (TRDTRACKINGtask2 )
14091412
14101413 #<--------- TOF reco task
14111414 TOFRECOtask = createTask (name = 'tofmatch_' + str (tf ), needs = [ITSTPCMATCHtask ['name' ], getDigiTaskName ("TOF" )], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
@@ -1420,8 +1423,11 @@ def getDigiTaskName(det):
14201423 workflow ['stages' ].append (TOFRECOtask )
14211424
14221425 #<--------- TOF-TPC(-ITS) global track matcher workflow
1423- toftpcmatchneeds = [TOFRECOtask ['name' ], TPCRECOtask ['name' ], ITSTPCMATCHtask ['name' ], TRDTRACKINGtask2 ['name' ]]
1424- toftracksrcdefault = dpl_option_from_config (anchorConfig , 'o2-tof-matcher-workflow' , 'track-sources' , default_value = 'TPC,ITS-TPC,TPC-TRD,ITS-TPC-TRD' )
1426+ toftpcmatchneeds = [TOFRECOtask ['name' ],
1427+ TPCRECOtask ['name' ],
1428+ ITSTPCMATCHtask ['name' ],
1429+ TRDTRACKINGtask2 ['name' ] if isActive ("TRD" ) else None ]
1430+ toftracksrcdefault = dpl_option_from_config (anchorConfig , 'o2-tof-matcher-workflow' , '--track-sources' , default_value = 'TPC,ITS-TPC,TPC-TRD,ITS-TPC-TRD' )
14251431 tofusefit = option_if_available ('o2-tof-matcher-workflow' , '--use-fit' , envfile = async_envfile )
14261432 TOFTPCMATCHERtask = createTask (name = 'toftpcmatch_' + str (tf ), needs = toftpcmatchneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1000' )
14271433 tofmatcher_cmd_parts = [
@@ -1615,9 +1621,9 @@ def getDigiTaskName(det):
16151621 hmpmatchneeds = [HMPRECOtask ['name' ],
16161622 ITSTPCMATCHtask ['name' ],
16171623 TOFTPCMATCHERtask ['name' ] if isActive ("TOF" ) else None ,
1618- TRDTRACKINGtask2 ['name' ]]
1624+ TRDTRACKINGtask2 ['name' ] if isActive ( "TRD" ) else None ]
16191625 hmpmatchneeds = [ n for n in hmpmatchneeds if n != None ]
1620- hmp_match_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-hmpid-matcher-workflow' , 'track-sources' , default_value = 'ITS-TPC,ITS-TPC-TRD,TPC-TRD' ))
1626+ hmp_match_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig , 'o2-hmpid-matcher-workflow' , '-- track-sources' , default_value = 'ITS-TPC,ITS-TPC-TRD,TPC-TRD' ))
16211627 HMPMATCHtask = createTask (name = 'hmpmatch_' + str (tf ), needs = hmpmatchneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1000' )
16221628 HMPMATCHtask ['cmd' ] = task_finalizer (
16231629 ['${O2_ROOT}/bin/o2-hmpid-matcher-workflow' ,
@@ -1630,17 +1636,17 @@ def getDigiTaskName(det):
16301636 #<---------- primary vertex finding
16311637 pvfinder_sources = dpl_option_from_config (anchorConfig ,
16321638 'o2-primary-vertexing-workflow' ,
1633- 'vertexing-sources' ,
1639+ '-- vertexing-sources' ,
16341640 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' )
16351641 pvfinder_sources = cleanDetectorInputList (pvfinder_sources )
16361642
16371643 pvfinder_matching_sources = dpl_option_from_config (anchorConfig ,
16381644 'o2-primary-vertexing-workflow' ,
1639- 'vertex-track-matching-sources' ,
1645+ '-- vertex-track-matching-sources' ,
16401646 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' )
16411647 pvfinder_matching_sources = cleanDetectorInputList (pvfinder_matching_sources )
16421648
1643- pvfinderneeds = [TRDTRACKINGtask2 ['name' ],
1649+ pvfinderneeds = [TRDTRACKINGtask2 ['name' ] if isActive ( "TRD" ) else None ,
16441650 FT0RECOtask ['name' ] if isActive ("FT0" ) else None ,
16451651 FV0RECOtask ['name' ] if isActive ("FV0" ) else None ,
16461652 EMCRECOtask ['name' ] if isActive ("EMC" ) else None ,
@@ -1682,7 +1688,7 @@ def getDigiTaskName(det):
16821688
16831689 svfinder_sources = dpl_option_from_config (anchorConfig ,
16841690 'o2-primary-vertexing-workflow' ,
1685- 'vertex-track-matching-sources' ,
1691+ '-- vertex-track-matching-sources' ,
16861692 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' )
16871693 svfinder_sources = cleanDetectorInputList (svfinder_sources )
16881694 SVFINDERtask = createTask (name = 'svfinder_' + str (tf ), needs = [PVFINDERtask ['name' ], FT0FV0EMCCTPDIGItask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], cpu = svfinder_cpu , mem = '5000' )
@@ -1703,7 +1709,7 @@ def getDigiTaskName(det):
17031709 #<------------- AOD producer
17041710 # TODO This needs further refinement, sources and dependencies should be constructed dynamically
17051711 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'
1706- aodinfosources = dpl_option_from_config (anchorConfig , 'o2-aod-producer-workflow' , 'info-sources' , default_value = aod_info_souces_default )
1712+ aodinfosources = dpl_option_from_config (anchorConfig , 'o2-aod-producer-workflow' , '-- info-sources' , default_value = aod_info_souces_default )
17071713 aodinfosources = cleanDetectorInputList (aodinfosources )
17081714 aodneeds = [PVFINDERtask ['name' ], SVFINDERtask ['name' ]]
17091715
@@ -1760,17 +1766,17 @@ def getDigiTaskName(det):
17601766 #<------------- TPC residuals extraction
17611767 scdcalib_vertex_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig ,
17621768 'o2-tpc-scdcalib-interpolation-workflow' ,
1763- 'vtx-sources' ,
1769+ '-- vtx-sources' ,
17641770 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' ))
17651771
17661772 scdcalib_track_sources = cleanDetectorInputList (dpl_option_from_config (anchorConfig ,
17671773 'o2-tpc-scdcalib-interpolation-workflow' ,
1768- 'tracking-sources' ,
1774+ '-- tracking-sources' ,
17691775 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' ))
17701776
17711777 scdcalib_track_extraction = cleanDetectorInputList (dpl_option_from_config (anchorConfig ,
17721778 'o2-tpc-scdcalib-interpolation-workflow' ,
1773- 'tracking-sources-map-extraction' ,
1779+ '-- tracking-sources-map-extraction' ,
17741780 default_value = 'ITS-TPC' ))
17751781
17761782 SCDCALIBtask = createTask (name = 'scdcalib_' + str (tf ), needs = [PVFINDERtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["CALIB" ], mem = '4000' )
@@ -1789,11 +1795,11 @@ def getDigiTaskName(det):
17891795 #<------------- TPC residuals aggregator
17901796 scdaggreg_secperslot = dpl_option_from_config (anchorConfig ,
17911797 'o2-calibration-residual-aggregator' ,
1792- 'sec-per-slot' ,
1798+ '-- sec-per-slot' ,
17931799 default_value = '600' )
17941800 scdaggreg_outputtype = dpl_option_from_config (anchorConfig ,
17951801 'o2-calibration-residual-aggregator' ,
1796- 'output-type' ,
1802+ '-- output-type' ,
17971803 default_value = 'trackParams,unbinnedResid' )
17981804
17991805 SCDAGGREGtask = createTask (name = 'scdaggreg_' + str (tf ), needs = [SCDCALIBtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["CALIB" ], mem = '1500' )
@@ -1873,12 +1879,13 @@ def remove_json_prefix(path):
18731879
18741880 ### TRD
18751881 # TODO: check if the readerCommand also reperforms tracklet construction (which already done in digitization)
1876- addQCPerTF (taskName = 'trdDigitsQC' ,
1882+ if isActive ('TRD' ):
1883+ addQCPerTF (taskName = 'trdDigitsQC' ,
18771884 needs = [TRDDigitask ['name' ]],
18781885 readerCommand = 'o2-trd-trap-sim --disable-root-output true' ,
18791886 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/trd-standalone-task.json' )
18801887
1881- addQCPerTF (taskName = 'trdTrackingQC' ,
1888+ addQCPerTF (taskName = 'trdTrackingQC' ,
18821889 needs = [TRDTRACKINGtask2 ['name' ]],
18831890 readerCommand = 'o2-global-track-cluster-reader --track-types "ITS-TPC-TRD,TPC-TRD" --cluster-types none' ,
18841891 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/trd-tracking-task.json' )
0 commit comments