@@ -266,7 +266,44 @@ elif [[ -z ${QC_JSON_FROM_OUTSIDE:-} ]]; then
266266 DET_JSON_FILE=" QC_JSON_GLO_$i "
267267 if has_matching_qc $i && [ ! -z " ${! DET_JSON_FILE:- } " ]; then
268268 if [[ $i == " PRIMVTX" ]] && ! has_detector_reco ITS; then continue ; fi
269- if [[ $i == " ITSTPC" ]] && ! has_detectors_reco ITS TPC; then continue ; fi
269+ if [[ $i == " ITSTPC" ]] ; then
270+ if ! has_detectors_reco ITS TPC; then continue
271+ else
272+ # replace the input sources depending on the detector compostition and matching detectors
273+ ITSTPCMatchQuery=" trackITSTPC:GLO/TPCITS/0;trackITSTPCABREFS:GLO/TPCITSAB_REFS/0;trackITSTPCABCLID:GLO/TPCITSAB_CLID/0;trackTPC:TPC/TRACKS;trackTPCClRefs:TPC/CLUSREFS;trackITS:ITS/TRACKS/0;trackITSROF:ITS/ITSTrackROF/0;trackITSClIdx:ITS/TRACKCLSID/0;alpparITS:ITS/ALPIDEPARAM/0?lifetime=condition&ccdb-path=ITS/Config/AlpideParam;SVParam:GLO/SVPARAM/0?lifetime=condition&ccdb-path=GLO/Config/SVertexerParam"
274+ HAS_K0_ENABLED=` jq -r .qc.tasks.MTCITSTPC.taskParameters.doK0QC ${! DET_JSON_FILE} `
275+ if [[ $HAS_K0_ENABLED == " true" ]]; then
276+ ITSTPCMatchQuery+=" ;p2decay3body:GLO/PVTX_3BODYREFS/0;decay3body:GLO/DECAYS3BODY/0;decay3bodyIdx:GLO/DECAYS3BODY_IDX/0;p2cascs:GLO/PVTX_CASCREFS/0;cascs:GLO/CASCS/0;cascsIdx:GLO/CASCS_IDX/0;p2v0s:GLO/PVTX_V0REFS/0;v0s:GLO/V0S/0;v0sIdx:GLO/V0S_IDX/0;pvtx_tref:GLO/PVTX_TRMTCREFS/0;pvtx_trmtc:GLO/PVTX_TRMTC/0;pvtx:GLO/PVTX/0;SVParam:GLO/SVPARAM/0?lifetime=condition&ccdb-path=GLO/Config/SVertexerParam;clusTPCoccmap:TPC/TPCOCCUPANCYMAP/0;clusTPC:TPC/CLUSTERNATIVE;clusTPCshmap:TPC/CLSHAREDMAP/0;trigTPC:TPC/TRIGGERWORDS/0"
277+ if has_secvtx_source ITS-TPC-TRD ; then
278+ ITSTPCMatchQuery+=" ;trigITSTPCTRD:TRD/TRGREC_ITSTPC/0;trackITSTPCTRD:TRD/MATCH_ITSTPC/0"
279+ fi
280+ if has_secvtx_source ITS-TPC-TOF ; then
281+ ITSTPCMatchQuery+=" ;matchITSTPCTOF:TOF/MTC_ITSTPC/0"
282+ fi
283+ if has_secvtx_source ITS-TPC-TRD-TOF ; then
284+ ITSTPCMatchQuery+=" ;matchITSTPCTRDTOF:TOF/MTC_ITSTPCTRD/0"
285+ fi
286+ if has_secvtx_source TPC-TRD ; then
287+ ITSTPCMatchQuery+=" ;trigTPCTRD:TRD/TRGREC_TPC/0;trackTPCTRD:TRD/MATCH_TPC/0"
288+ fi
289+ if has_secvtx_source TPC-TOF ; then
290+ ITSTPCMatchQuery+=" ;matchTPCTOF:TOF/MTC_TPC/0;trackTPCTOF:TOF/TOFTRACKS_TPC/0"
291+ fi
292+ if has_secvtx_source TPC-TRD-TOF ; then
293+ ITSTPCMatchQuery+=" ;matchTPCTRDTOF/TOF/MTC_TPCTRD/0"
294+ fi
295+ if has_secvtx_source TOF ; then
296+ ITSTPCMatchQuery+=" ;tofcluster:TOF/CLUSTERS/0"
297+ fi
298+ fi
299+ echo " We are looking at $i "
300+ if [[ $SYNCMODE == 1 ]] || [[ $EPNSYNCMODE == 1 ]] ; then
301+ add_pipe_separated QC_DETECTOR_CONFIG_OVERRIDE ' .dataSamplingPolicies.ITSTPCmSampK0.query=\"$ITSTPCMatchQuery\"'
302+ else
303+ add_pipe_separated QC_DETECTOR_CONFIG_OVERRIDE ' .qc.tasks.MTCITSTPC.dataSource.query=\"$ITSTPCMatchQuery\"'
304+ fi
305+ fi
306+ fi
270307 add_QC_JSON GLO_$i ${! DET_JSON_FILE}
271308 fi
272309 done
0 commit comments