|
153 | 153 |
|
154 | 154 | # TPC options |
155 | 155 | parser.add_argument('--tpc-distortion-type', default=0, type=int, help='Simulate distortions in the TPC (0=no distortions, 1=distortions without scaling, 2=distortions with CTP scaling)') |
| 156 | +parser.add_argument('--tpc-corrmap-lumi-mode', default=2, type=int, help='TPC corrections mode (0=linear, 1=derivative, 2=derivative for special MC maps') |
156 | 157 | parser.add_argument('--ctp-scaler', default=0, type=float, help='CTP raw scaler value used for distortion simulation') |
157 | 158 | # Global Forward reconstruction configuration |
158 | 159 | parser.add_argument('--fwdmatching-assessment-full', action='store_true', help='enables complete assessment of global forward reco') |
@@ -472,28 +473,32 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict): |
472 | 473 | workflow['stages'].append(globalinittask) |
473 | 474 | #### |
474 | 475 |
|
| 476 | +usebkgcache=args.use_bkg_from!=None |
| 477 | +includeFullQC=args.include_qc=='True' or args.include_qc==True |
| 478 | +includeLocalQC=args.include_local_qc=='True' or args.include_local_qc==True |
| 479 | +includeAnalysis = args.include_analysis |
| 480 | +includeTPCResiduals=True if environ.get('ALIEN_JDL_DOTPCRESIDUALEXTRACTION') == '1' else False |
| 481 | +ccdbRemap = environ.get('ALIEN_JDL_REMAPPINGS') |
| 482 | + |
| 483 | +qcdir = "QC" |
| 484 | +if (includeLocalQC or includeFullQC) and not isdir(qcdir): |
| 485 | + mkdir(qcdir) |
| 486 | + |
475 | 487 | def getDPL_global_options(bigshm=False, ccdbbackend=True): |
476 | 488 | common=" -b --run " |
477 | 489 | if len(args.dpl_child_driver) > 0: |
478 | 490 | common=common + ' --child-driver ' + str(args.dpl_child_driver) |
479 | 491 | if ccdbbackend: |
480 | 492 | common=common + " --condition-not-after " + str(args.condition_not_after) |
| 493 | + if ccdbRemap != None: |
| 494 | + common=common + " --condition-remap " + ccdbRemap |
481 | 495 | if args.noIPC!=None: |
482 | 496 | return common + " --no-IPC " |
483 | 497 | if bigshm: |
484 | 498 | return common + " --shm-segment-size ${SHMSIZE:-50000000000} " |
485 | 499 | else: |
486 | 500 | return common |
487 | | - |
488 | | -usebkgcache=args.use_bkg_from!=None |
489 | | -includeFullQC=args.include_qc=='True' or args.include_qc==True |
490 | | -includeLocalQC=args.include_local_qc=='True' or args.include_local_qc==True |
491 | | -includeAnalysis = args.include_analysis |
492 | | - |
493 | | -qcdir = "QC" |
494 | | -if (includeLocalQC or includeFullQC) and not isdir(qcdir): |
495 | | - mkdir(qcdir) |
496 | | - |
| 501 | + |
497 | 502 | # create/publish the GRPs and other GLO objects for consistent use further down the pipeline |
498 | 503 | orbitsPerTF=int(args.orbitsPerTF) |
499 | 504 | GRP_TASK = createTask(name='grpcreate', cpu='0') |
@@ -1170,17 +1175,19 @@ def getDigiTaskName(det): |
1170 | 1175 | # in case of PbPb the conversion factor ZDC ->FT0 (pp) must be set |
1171 | 1176 | tpc_corr_options_mc='' |
1172 | 1177 |
|
| 1178 | + tpcCorrmapLumiMode = args.tpc_corrmap_lumi_mode |
| 1179 | + |
1173 | 1180 | if tpcDistortionType == 0: # disable distortion corrections |
1174 | 1181 | tpc_corr_options_mc=' --corrmap-lumi-mode 0 ' |
1175 | 1182 | tpcLocalCFreco['TPCCorrMap.lumiMean'] = '-1'; |
1176 | 1183 | elif tpcDistortionType == 1: # disable scaling |
1177 | | - tpc_corr_options_mc=' --corrmap-lumi-mode 2 ' |
| 1184 | + tpc_corr_options_mc=' --corrmap-lumi-mode ' + str(tpcCorrmapLumiMode) + ' ' |
1178 | 1185 | tpcLocalCFreco['TPCCorrMap.lumiInst'] = str(CTPSCALER) |
1179 | 1186 | tpcLocalCFreco['TPCCorrMap.lumiMean'] = str(CTPSCALER) |
1180 | 1187 | elif tpcDistortionType == 2: # full scaling with CTP values |
1181 | 1188 | if COLTYPE == 'PbPb': |
1182 | 1189 | tpcLocalCFreco['TPCCorrMap.lumiInstFactor'] = str(lumiInstFactor) |
1183 | | - tpc_corr_options_mc=' --corrmap-lumi-mode 2 ' |
| 1190 | + tpc_corr_options_mc=' --corrmap-lumi-mode ' + str(tpcCorrmapLumiMode) + ' ' |
1184 | 1191 | tpcLocalCFreco['TPCCorrMap.lumiInst'] = str(CTPSCALER) |
1185 | 1192 |
|
1186 | 1193 | # Setup the TPC correction scaling options for reco; They come from the anchoring setup |
@@ -1629,6 +1636,60 @@ def getDigiTaskName(det): |
1629 | 1636 | # Consider in future: AODtask['disable_alternative_reco_software'] = True # do not apply reco software here (we prefer latest aod converter) |
1630 | 1637 | workflow['stages'].append(AODtask) |
1631 | 1638 |
|
| 1639 | + if includeTPCResiduals: |
| 1640 | + print ("Adding TPC residuals extraction and aggregation") |
| 1641 | + |
| 1642 | + #<------------- TPC residuals extraction |
| 1643 | + scdcalib_vertex_sources = dpl_option_from_config(anchorConfig, |
| 1644 | + 'o2-tpc-scdcalib-interpolation-workflow', |
| 1645 | + 'vtx-sources', |
| 1646 | + 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') |
| 1647 | + |
| 1648 | + scdcalib_track_sources = dpl_option_from_config(anchorConfig, |
| 1649 | + 'o2-tpc-scdcalib-interpolation-workflow', |
| 1650 | + 'tracking-sources', |
| 1651 | + 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') |
| 1652 | + |
| 1653 | + scdcalib_track_extraction = dpl_option_from_config(anchorConfig, |
| 1654 | + 'o2-tpc-scdcalib-interpolation-workflow', |
| 1655 | + 'tracking-sources-map-extraction', |
| 1656 | + default_value='ITS-TPC') |
| 1657 | + |
| 1658 | + SCDCALIBtask = createTask(name='scdcalib_'+str(tf), needs=[PVFINDERtask['name']], tf=tf, cwd=timeframeworkdir, lab=["CALIB"], mem='4000') |
| 1659 | + SCDCALIBtask['cmd'] = task_finalizer( |
| 1660 | + [ '${O2_ROOT}/bin/o2-tpc-scdcalib-interpolation-workflow', |
| 1661 | + getDPL_global_options(bigshm=True), |
| 1662 | + putConfigValues(['scdcalib']), |
| 1663 | + '--vtx-sources ' + scdcalib_vertex_sources, |
| 1664 | + '--tracking-sources ' + scdcalib_track_sources, |
| 1665 | + '--tracking-sources-map-extraction ' + scdcalib_track_extraction, |
| 1666 | + '--sec-per-slot 1 ', |
| 1667 | + '--send-track-data' |
| 1668 | + ]) |
| 1669 | + workflow['stages'].append(SCDCALIBtask) |
| 1670 | + |
| 1671 | + #<------------- TPC residuals aggregator |
| 1672 | + scdaggreg_secperslot = dpl_option_from_config(anchorConfig, |
| 1673 | + 'o2-calibration-residual-aggregator', |
| 1674 | + 'sec-per-slot', |
| 1675 | + default_value='600') |
| 1676 | + scdaggreg_outputtype = dpl_option_from_config(anchorConfig, |
| 1677 | + 'o2-calibration-residual-aggregator', |
| 1678 | + 'output-type', |
| 1679 | + default_value='trackParams,unbinnedResid') |
| 1680 | + |
| 1681 | + SCDAGGREGtask = createTask(name='scdaggreg_'+str(tf), needs=[SCDCALIBtask['name']], tf=tf, cwd=timeframeworkdir, lab=["CALIB"], mem='1500') |
| 1682 | + SCDAGGREGtask['cmd'] = task_finalizer( |
| 1683 | + [ '${O2_ROOT}/bin/o2-calibration-residual-aggregator', |
| 1684 | + getDPL_global_options(bigshm=True), |
| 1685 | + '--sec-per-slot ' + scdaggreg_secperslot, |
| 1686 | + '--enable-ctp ', |
| 1687 | + '--output-dir ./', |
| 1688 | + '--output-type ' + scdaggreg_outputtype |
| 1689 | + ]) |
| 1690 | + workflow['stages'].append(SCDAGGREGtask) |
| 1691 | + |
| 1692 | + # conditional |
1632 | 1693 | # |
1633 | 1694 | # QC tasks follow |
1634 | 1695 | # |
|
0 commit comments