|
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') |
@@ -489,6 +490,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True): |
489 | 490 | includeFullQC=args.include_qc=='True' or args.include_qc==True |
490 | 491 | includeLocalQC=args.include_local_qc=='True' or args.include_local_qc==True |
491 | 492 | includeAnalysis = args.include_analysis |
| 493 | +includeTPCResiduals=True if environ.get('ALIEN_JDL_DOTPCRESIDUALEXTRACTION') == '1' else False |
492 | 494 |
|
493 | 495 | qcdir = "QC" |
494 | 496 | if (includeLocalQC or includeFullQC) and not isdir(qcdir): |
@@ -1170,17 +1172,19 @@ def getDigiTaskName(det): |
1170 | 1172 | # in case of PbPb the conversion factor ZDC ->FT0 (pp) must be set |
1171 | 1173 | tpc_corr_options_mc='' |
1172 | 1174 |
|
| 1175 | + tpcCorrmapLumiMode = args.tpc_corrmap_lumi_mode |
| 1176 | + |
1173 | 1177 | if tpcDistortionType == 0: # disable distortion corrections |
1174 | 1178 | tpc_corr_options_mc=' --corrmap-lumi-mode 0 ' |
1175 | 1179 | tpcLocalCFreco['TPCCorrMap.lumiMean'] = '-1'; |
1176 | 1180 | elif tpcDistortionType == 1: # disable scaling |
1177 | | - tpc_corr_options_mc=' --corrmap-lumi-mode 2 ' |
| 1181 | + tpc_corr_options_mc=' --corrmap-lumi-mode ' + str(tpcCorrmapLumiMode) + ' ' |
1178 | 1182 | tpcLocalCFreco['TPCCorrMap.lumiInst'] = str(CTPSCALER) |
1179 | 1183 | tpcLocalCFreco['TPCCorrMap.lumiMean'] = str(CTPSCALER) |
1180 | 1184 | elif tpcDistortionType == 2: # full scaling with CTP values |
1181 | 1185 | if COLTYPE == 'PbPb': |
1182 | 1186 | tpcLocalCFreco['TPCCorrMap.lumiInstFactor'] = str(lumiInstFactor) |
1183 | | - tpc_corr_options_mc=' --corrmap-lumi-mode 2 ' |
| 1187 | + tpc_corr_options_mc=' --corrmap-lumi-mode ' + str(tpcCorrmapLumiMode) + ' ' |
1184 | 1188 | tpcLocalCFreco['TPCCorrMap.lumiInst'] = str(CTPSCALER) |
1185 | 1189 |
|
1186 | 1190 | # Setup the TPC correction scaling options for reco; They come from the anchoring setup |
@@ -1629,6 +1633,60 @@ def getDigiTaskName(det): |
1629 | 1633 | # Consider in future: AODtask['disable_alternative_reco_software'] = True # do not apply reco software here (we prefer latest aod converter) |
1630 | 1634 | workflow['stages'].append(AODtask) |
1631 | 1635 |
|
| 1636 | + if includeTPCResiduals: |
| 1637 | + print ("Adding TPC residuals extraction and aggregation") |
| 1638 | + |
| 1639 | + #<------------- TPC residuals extraction |
| 1640 | + scdcalib_vertex_sources = dpl_option_from_config(anchorConfig, |
| 1641 | + 'o2-tpc-scdcalib-interpolation-workflow', |
| 1642 | + 'vtx-sources', |
| 1643 | + 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') |
| 1644 | + |
| 1645 | + scdcalib_track_sources = dpl_option_from_config(anchorConfig, |
| 1646 | + 'o2-tpc-scdcalib-interpolation-workflow', |
| 1647 | + 'tracking-sources', |
| 1648 | + 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') |
| 1649 | + |
| 1650 | + scdcalib_track_extraction = dpl_option_from_config(anchorConfig, |
| 1651 | + 'o2-tpc-scdcalib-interpolation-workflow', |
| 1652 | + 'tracking-sources-map-extraction', |
| 1653 | + default_value='ITS-TPC') |
| 1654 | + |
| 1655 | + SCDCALIBtask = createTask(name='scdcalib_'+str(tf), needs=[PVFINDERtask['name']], tf=tf, cwd=timeframeworkdir, lab=["CALIB"], mem='4000') |
| 1656 | + SCDCALIBtask['cmd'] = task_finalizer( |
| 1657 | + [ '${O2_ROOT}/bin/o2-tpc-scdcalib-interpolation-workflow', |
| 1658 | + getDPL_global_options(bigshm=True), |
| 1659 | + putConfigValues(['scdcalib']), |
| 1660 | + '--vtx-sources ' + scdcalib_vertex_sources, |
| 1661 | + '--tracking-sources ' + scdcalib_track_sources, |
| 1662 | + '--tracking-sources-map-extraction ' + scdcalib_track_extraction, |
| 1663 | + '--sec-per-slot 1 ', |
| 1664 | + '--send-track-data' |
| 1665 | + ]) |
| 1666 | + workflow['stages'].append(SCDCALIBtask) |
| 1667 | + |
| 1668 | + #<------------- TPC residuals aggregator |
| 1669 | + scdaggreg_secperslot = dpl_option_from_config(anchorConfig, |
| 1670 | + 'o2-calibration-residual-aggregator', |
| 1671 | + 'sec-per-slot', |
| 1672 | + default_value='600') |
| 1673 | + scdaggreg_outputtype = dpl_option_from_config(anchorConfig, |
| 1674 | + 'o2-calibration-residual-aggregator', |
| 1675 | + 'output-type', |
| 1676 | + default_value='trackParams,unbinnedResid') |
| 1677 | + |
| 1678 | + SCDAGGREGtask = createTask(name='scdaggreg_'+str(tf), needs=[SCDCALIBtask['name']], tf=tf, cwd=timeframeworkdir, lab=["CALIB"], mem='1500') |
| 1679 | + SCDAGGREGtask['cmd'] = task_finalizer( |
| 1680 | + [ '${O2_ROOT}/bin/o2-calibration-residual-aggregator', |
| 1681 | + getDPL_global_options(bigshm=True), |
| 1682 | + '--sec-per-slot ' + scdaggreg_secperslot, |
| 1683 | + '--enable-ctp ', |
| 1684 | + '--output-dir ./', |
| 1685 | + '--output-type ' + scdaggreg_outputtype |
| 1686 | + ]) |
| 1687 | + workflow['stages'].append(SCDAGGREGtask) |
| 1688 | + |
| 1689 | + # conditional |
1632 | 1690 | # |
1633 | 1691 | # QC tasks follow |
1634 | 1692 | # |
|
0 commit comments