@@ -295,6 +295,8 @@ def load_external_config(configfile):
295295# function to finalize detector source lists based on activeDetectors
296296# detector source lists are comma separated lists of DET1, DET2, DET1-DET2, ...
297297def cleanDetectorInputList (inputlist ):
298+ if inputlist == "all" :
299+ return inputlist
298300 sources_list = inputlist .split ("," )
299301 # Filter the sources
300302 filtered_sources = [
@@ -630,20 +632,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):
630632if doembedding :
631633 interactionspecification = 'bkg,' + str (INTRATE ) + ',' + str (NTIMEFRAMES * args .ns ) + ':' + str (args .nb ) + ' ' + signalprefix + ',' + args .embeddPattern
632634
633- PreCollContextTask ['cmd' ]= '${O2_ROOT}/bin/o2-steer-colcontexttool -i ' + interactionspecification \
634- + ' --show-context ' \
635- + ' --timeframeID ' + str (int (args .production_offset )* NTIMEFRAMES ) \
636- + ' --orbitsPerTF ' + str (orbitsPerTF ) \
637- + ' --orbits ' + str (NTIMEFRAMES * (orbitsPerTF )) \
638- + ' --seed ' + str (RNDSEED ) \
639- + ' --noEmptyTF --first-orbit ' + str (args .first_orbit ) \
640- + ' --extract-per-timeframe tf:sgn' \
641- + ' --with-vertices ' + vtxmode_precoll \
642- + ' --maxCollsPerTF ' + str (args .ns ) \
643- + ' --orbitsEarly ' + str (args .orbits_early ) \
644- + ('' ,f" --import-external { args .data_anchoring } " )[len (args .data_anchoring ) > 0 ]
645-
646- PreCollContextTask ['cmd' ] += ' --bcPatternFile ccdb' # <--- the object should have been set in (local) CCDB
635+ qedspec = ""
647636if includeQED :
648637 if PDGA == 2212 or PDGB == 2212 :
649638 # QED is not enabled for pp and pA collisions
@@ -652,9 +641,28 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):
652641 else :
653642 qedrate = INTRATE * QEDXSecExpected [COLTYPE ] / XSecSys [COLTYPE ] # hadronic interaction rate * cross_section_ratio
654643 qedspec = 'qed' + ',' + str (qedrate ) + ',10000000:' + str (NEventsQED )
655- PreCollContextTask ['cmd' ] += ' --QEDinteraction ' + qedspec
656- workflow ['stages' ].append (PreCollContextTask )
657644
645+ PreCollContextTask ['cmd' ] = task_finalizer ([
646+ '${O2_ROOT}/bin/o2-steer-colcontexttool' ,
647+ f'-i { interactionspecification } ' ,
648+ '--show-context' ,
649+ f'--timeframeID { int (args .production_offset )* NTIMEFRAMES } ' ,
650+ f'--orbitsPerTF { orbitsPerTF } ' ,
651+ f'--orbits { NTIMEFRAMES * (orbitsPerTF )} ' ,
652+ f'--seed { RNDSEED } ' ,
653+ '--noEmptyTF' ,
654+ f'--first-orbit { args .first_orbit } ' ,
655+ '--extract-per-timeframe tf:sgn' ,
656+ f'--with-vertices { vtxmode_precoll } ' ,
657+ f'--maxCollsPerTF { args .ns } ' ,
658+ f'--orbitsEarly { args .orbits_early } ' ,
659+ f'--timestamp { args .timestamp } ' ,
660+ f'--import-external { args .data_anchoring } ' if len (args .data_anchoring ) > 0 else None ,
661+ '--bcPatternFile ccdb' ,
662+ f'--QEDinteraction { qedspec } ' if includeQED else None
663+ ], configname = 'precollcontext' )
664+ workflow ['stages' ].append (PreCollContextTask )
665+ #TODO: in future add standard ' --nontrivial-mu-distribution ccdb://http://ccdb-test.cern.ch:8080/GLO/CALIB/EVSELQA/HBCTVX'
658666
659667if doembedding :
660668 if not usebkgcache :
@@ -1376,13 +1384,13 @@ def getDigiTaskName(det):
13761384 workflow ['stages' ].append (FT0RECOtask )
13771385
13781386 #<--------- ITS-TPC track matching task
1379- ITSTPCMATCHtask = createTask (name = 'itstpcMatch_' + str (tf ), needs = [TPCRECOtask ['name' ], ITSRECOtask ['name' ], FT0RECOtask ['name' ]], tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '8000' , relative_cpu = 3 / 8 )
1387+ 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 )
13801388 ITSTPCMATCHtask ["cmd" ] = task_finalizer ([
13811389 '${O2_ROOT}/bin/o2-tpcits-match-workflow' ,
13821390 getDPL_global_options (bigshm = True ),
13831391 ' --tpc-track-reader tpctracks.root' ,
13841392 '--tpc-native-cluster-reader \" --infile tpc-native-clusters.root\" ' ,
1385- '--use-ft0' ,
1393+ '--use-ft0' if isActive ( "FT0" ) else None ,
13861394 putConfigValues (['MFTClustererParam' ,
13871395 'ITSCATrackerParam' ,
13881396 'tpcitsMatch' ,
@@ -1462,7 +1470,7 @@ def getDigiTaskName(det):
14621470 'trackTuneParams' ], tpcLocalCFreco ),
14631471 ' --track-sources ' + toftracksrcdefault ,
14641472 (' --combine-devices' ,'' )[args .no_combine_dpl_devices ],
1465- tofusefit ,
1473+ tofusefit if isActive ( "FT0" ) else None ,
14661474 tpc_corr_scaling_options ,
14671475 tpc_corr_options_mc
14681476 ]
@@ -1487,7 +1495,8 @@ def getDigiTaskName(det):
14871495 'MFTClustererParam' ]),
14881496 ('' ,'--disable-mc' )[args .no_mc_labels ],
14891497 ('' ,'--run-assessment' )[args .mft_assessment_full ]])
1490- workflow ['stages' ].append (MFTRECOtask )
1498+ if isActive ("MFT" ):
1499+ workflow ['stages' ].append (MFTRECOtask )
14911500
14921501 # MCH reco: needing access to kinematics ... so some extra logic needed here
14931502 mchreconeeds = [getDigiTaskName ("MCH" )]
@@ -1608,7 +1617,7 @@ def getDigiTaskName(det):
16081617
16091618 #<--------- MFT-MCH forward matching
16101619 forwardmatchneeds = [MCHRECOtask ['name' ],
1611- MFTRECOtask ['name' ],
1620+ MFTRECOtask ['name' ] if isActive ( "MFT" ) else None ,
16121621 MCHMIDMATCHtask ['name' ] if isActive ("MID" ) else None ]
16131622 MFTMCHMATCHtask = createTask (name = 'mftmchMatch_' + str (tf ), needs = forwardmatchneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '1500' )
16141623 MFTMCHMATCHtask ['cmd' ] = task_finalizer (
@@ -1871,21 +1880,22 @@ def remove_json_prefix(path):
18711880 ### MFT
18721881
18731882 # to be enabled once MFT Digits should run 5 times with different configurations
1874- for flp in range (5 ):
1875- addQCPerTF (taskName = 'mftDigitsQC' + str (flp ),
1876- needs = [getDigiTaskName ("MFT" )],
1877- readerCommand = 'o2-qc-mft-digits-root-file-reader --mft-digit-infile=mftdigits.root' ,
1878- configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-digits-' + str (flp ) + '.json' ,
1879- objectsFile = 'mftDigitsQC.root' )
1880- addQCPerTF (taskName = 'mftClustersQC' ,
1883+ if isActive ("MFT" ):
1884+ for flp in range (5 ):
1885+ addQCPerTF (taskName = 'mftDigitsQC' + str (flp ),
1886+ needs = [getDigiTaskName ("MFT" )],
1887+ readerCommand = 'o2-qc-mft-digits-root-file-reader --mft-digit-infile=mftdigits.root' ,
1888+ configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-digits-' + str (flp ) + '.json' ,
1889+ objectsFile = 'mftDigitsQC.root' )
1890+ addQCPerTF (taskName = 'mftClustersQC' ,
18811891 needs = [MFTRECOtask ['name' ]],
18821892 readerCommand = 'o2-global-track-cluster-reader --track-types none --cluster-types MFT' ,
18831893 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-clusters.json' )
1884- addQCPerTF (taskName = 'mftTracksQC' ,
1894+ addQCPerTF (taskName = 'mftTracksQC' ,
18851895 needs = [MFTRECOtask ['name' ]],
18861896 readerCommand = 'o2-global-track-cluster-reader --track-types MFT --cluster-types MFT' ,
18871897 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-tracks.json' )
1888- addQCPerTF (taskName = 'mftMCTracksQC' ,
1898+ addQCPerTF (taskName = 'mftMCTracksQC' ,
18891899 needs = [MFTRECOtask ['name' ]],
18901900 readerCommand = 'o2-global-track-cluster-reader --track-types MFT --cluster-types MFT' ,
18911901 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/mft-tracks-mc.json' )
@@ -1956,22 +1966,25 @@ def remove_json_prefix(path):
19561966 readerCommand = 'o2-emcal-cell-reader-workflow --infile emccells.root | o2-ctp-digit-reader --inputfile ctpdigits.root --disable-mc' ,
19571967 configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/emc-bc-task.json' )
19581968 ### FT0
1959- addQCPerTF (taskName = 'RecPointsQC' ,
1960- needs = [FT0RECOtask ['name' ]],
1961- readerCommand = 'o2-ft0-recpoints-reader-workflow --infile o2reco_ft0.root' ,
1962- configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/ft0-reconstruction-config.json' )
1969+ if isActive ("FT0" ):
1970+ addQCPerTF (taskName = 'RecPointsQC' ,
1971+ needs = [FT0RECOtask ['name' ]],
1972+ readerCommand = 'o2-ft0-recpoints-reader-workflow --infile o2reco_ft0.root' ,
1973+ configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/ft0-reconstruction-config.json' )
19631974
19641975 ### FV0
1965- addQCPerTF (taskName = 'FV0DigitsQC' ,
1966- needs = [getDigiTaskName ("FV0" )],
1967- readerCommand = 'o2-fv0-digit-reader-workflow --fv0-digit-infile fv0digits.root' ,
1968- configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/fv0-digits.json' )
1976+ if isActive ("FV0" ):
1977+ addQCPerTF (taskName = 'FV0DigitsQC' ,
1978+ needs = [getDigiTaskName ("FV0" )],
1979+ readerCommand = 'o2-fv0-digit-reader-workflow --fv0-digit-infile fv0digits.root' ,
1980+ configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/fv0-digits.json' )
19691981
19701982 ### FDD
1971- addQCPerTF (taskName = 'FDDRecPointsQC' ,
1972- needs = [FDDRECOtask ['name' ]],
1973- readerCommand = 'o2-fdd-recpoints-reader-workflow --fdd-recpoints-infile o2reco_fdd.root' ,
1974- configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/fdd-recpoints.json' )
1983+ if isActive ("FDD" ):
1984+ addQCPerTF (taskName = 'FDDRecPointsQC' ,
1985+ needs = [FDDRECOtask ['name' ]],
1986+ readerCommand = 'o2-fdd-recpoints-reader-workflow --fdd-recpoints-infile o2reco_fdd.root' ,
1987+ configFilePath = 'json://${O2DPG_ROOT}/MC/config/QC/json/fdd-recpoints.json' )
19751988
19761989 ### GLO + RECO
19771990 addQCPerTF (taskName = 'vertexQC' ,
@@ -2073,7 +2086,9 @@ def remove_json_prefix(path):
20732086 tpctsneeds = [ TPCRECOtask ['name' ],
20742087 ITSTPCMATCHtask ['name' ],
20752088 TOFTPCMATCHERtask ['name' ],
2076- PVFINDERtask ['name' ]
2089+ FT0RECOtask ['name' ],
2090+ PVFINDERtask ['name' ],
2091+ TRDTRACKINGtask2 ['name' ]
20772092 ]
20782093 TPCTStask = createTask (name = 'tpctimeseries_' + str (tf ), needs = tpctsneeds , tf = tf , cwd = timeframeworkdir , lab = ["RECO" ], mem = '2000' , cpu = '1' )
20792094 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"'
0 commit comments