|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# --------------------------------------------------------------------------------------------------------------------- |
| 4 | + |
| 5 | +# Check that the requirements to enable the calibrations are met, and |
| 6 | +# enabled them by default if they are not yet enabled or |
| 7 | +# if they are not explicitly disabled. |
| 8 | +# Then, configure data spec according to enabled calibrations |
| 9 | + |
| 10 | +source $O2DPG_ROOT/DATA/common/setenv.sh |
| 11 | + |
| 12 | +if [[ $BEAMTYPE != "cosmic" ]] && [[ $FORCECALIBRATIONS != 1 ]] ; then |
| 13 | + |
| 14 | + # calibrations for primary vertex |
| 15 | + if has_detector_calib ITS && has_detectors_reco ITS && has_detector_matching PRIMVTX && [[ ! -z "$VERTEXING_SOURCES" ]]; then |
| 16 | + if [[ -z $CALIB_PRIMVTX_MEANVTX ]]; then CALIB_PRIMVTX_MEANVTX=1; fi |
| 17 | + else |
| 18 | + CALIB_PRIMVTX_MEANVTX=0 |
| 19 | + fi |
| 20 | + |
| 21 | + # calibrations for TOF |
| 22 | + if has_detector_calib TOF && has_detector_reco TOF; then |
| 23 | + if has_detector_matching ITSTPCTOF || has_detector_matching ITSTPCTRDTOF; then |
| 24 | + if [[ -z $CALIB_TOF_LHCPHASE ]]; then CALIB_TOF_LHCPHASE=1; fi |
| 25 | + if [[ -z $CALIB_TOF_CHANNELOFFSETS ]]; then CALIB_TOF_CHANNELOFFSETS=1; fi |
| 26 | + else |
| 27 | + CALIB_TOF_LHCPHASE=0 |
| 28 | + CALIB_TOF_CHANNELOFFSETS=0 |
| 29 | + fi |
| 30 | + if [[ -z $CALIB_TOF_DIAGNOSTICS ]]; then CALIB_TOF_DIAGNOSTICS=1; fi |
| 31 | + else |
| 32 | + CALIB_TOF_DIAGNOSTICS=0 |
| 33 | + fi |
| 34 | + |
| 35 | + # calibrations for TPC |
| 36 | + if has_detector_calib TPC && has_detectors ITS TPC TOF TRD; then |
| 37 | + if has_detectors TPC ITS TRD TOF && has_detector_matching ITSTPCTRDTOF; then |
| 38 | + if [[ -z $CALIB_TPC_SCDCALIB ]]; then CALIB_TPC_SCDCALIB=1; fi |
| 39 | + else |
| 40 | + CALIB_TPC_SCDCALIB=0 |
| 41 | + fi |
| 42 | + fi |
| 43 | +fi |
| 44 | + |
| 45 | +if [[ $CALIB_PRIMVTX_MEANVTX == 1 ]] ; then add_semicolon_separated CALIBDATASPEC "pvtx:GLO/PVTX/0"; fi |
| 46 | +if [[ $CALIB_TOF_LHCPHASE == 1 ]] || [[ $CALIB_TOF_CHANNELOFFSETS == 1 ]]; then add_semicolon_separated CALIBDATASPEC "calibTOF:TOF/CALIBDATA/0"; fi |
| 47 | +if [[ $CALIB_TOF_DIAGNOSTICS == 1 ]]; then add_semicolon_separated CALIBDATASPEC "diagWords:TOF/DIAFREQ/0"; fi |
| 48 | + |
| 49 | +echo CALIBDATASPEC = $CALIBDATASPEC 1>&2 |
| 50 | + |
0 commit comments