diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml index 573fe6e..87fb135 100644 --- a/.github/workflows/key4hep.yml +++ b/.github/workflows/key4hep.yml @@ -87,13 +87,13 @@ jobs: --outputFileBase=bbudsc_3evt_GaudiRec \ --detectorModel=${{ matrix.detector_model }} - # Reconstruction with the v11 model (FCCee) using EDM4hep inputs and outputs - gaudi-v11-reco: + # Reconstruction with the ILD@FCCee models using EDM4hep inputs and outputs + gaudi-ILDatFCCee-reco: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - detector_model: [ILD_l5_v11] + detector_model: [ILD_FCCee_v01, ILD_FCCee_v02] key4hep_build: [sw-nightlies.hsf.org] os: [ubuntu2204, el9] @@ -109,7 +109,7 @@ jobs: cd StandardConfig/production ddsim --inputFiles Examples/bbudsc_3evt/bbudsc_3evt.stdhep \ --outputFile bbudsc_3evt_SIM.edm4hep.root \ - --compactFile $lcgeo_DIR/ILD/compact/${{ matrix.detector_model }}/${{ matrix.detector_model }}.xml \ + --compactFile $lcgeo_DIR/FCCee/ILD_FCCee/compact/${{ matrix.detector_model }}/${{ matrix.detector_model }}.xml \ --steeringFile ddsim_steer.py echo "::endgroup::" echo "::group::Run reconstruction" diff --git a/StandardConfig/production/Calibration/Calibration_ILD_FCCee_v01.cfg b/StandardConfig/production/Calibration/Calibration_ILD_FCCee_v01.cfg new file mode 120000 index 0000000..6c278be --- /dev/null +++ b/StandardConfig/production/Calibration/Calibration_ILD_FCCee_v01.cfg @@ -0,0 +1 @@ +Calibration_ILD_l5_v11.cfg \ No newline at end of file diff --git a/StandardConfig/production/Calibration/Calibration_ILD_FCCee_v02.cfg b/StandardConfig/production/Calibration/Calibration_ILD_FCCee_v02.cfg new file mode 120000 index 0000000..6c278be --- /dev/null +++ b/StandardConfig/production/Calibration/Calibration_ILD_FCCee_v02.cfg @@ -0,0 +1 @@ +Calibration_ILD_l5_v11.cfg \ No newline at end of file diff --git a/StandardConfig/production/ILDReconstruction.py b/StandardConfig/production/ILDReconstruction.py index e00971a..bbbc04d 100644 --- a/StandardConfig/production/ILDReconstruction.py +++ b/StandardConfig/production/ILDReconstruction.py @@ -14,12 +14,11 @@ k4DataSvc, ) from Gaudi.Configuration import INFO - -from py_utils import import_from, SequenceLoader, parse_collection_patch_file - from k4FWCore.parseArgs import parser from k4MarlinWrapper.parseConstants import parseConstants +from py_utils import SequenceLoader, import_from, parse_collection_patch_file + # only non-FCCMDI models DETECTOR_MODELS = ( "ILD_l2_v02", @@ -46,9 +45,14 @@ "ILD_s5_o4_v02", ) # only FCCMDI -FCCeeMDI_DETECTOR_MODELS = ( +FCCeeMDI_DETECTOR_MODELS_common_MDI = ( # only models located in $K4GEO/FCCee/ILD_FCCee/ + "ILD_FCCee_v01", + "ILD_FCCee_v02", +) +FCCeeMDI_DETECTOR_MODELS = ( # only add models located in $K4GEO/ILD/ here "ILD_l5_o1_v09", "ILD_l5_v11", + *FCCeeMDI_DETECTOR_MODELS_common_MDI, ) REC_COLLECTION_CONTENTS_FILE = "collections_rec_level.txt" @@ -125,6 +129,14 @@ action="store_true", ) + +def get_compact_file_path(detector_model: str): + """returns the compact file path to a specified detector model starting with the path stored in the 'K4GEO' environment variable""" + if detector_model in FCCeeMDI_DETECTOR_MODELS_common_MDI: + return f"{os.path.normpath(os.environ['K4GEO'])}/FCCee/ILD_FCCee/compact/{detector_model}/{detector_model}.xml" + return f"{os.path.normpath(os.environ['K4GEO'])}/ILD/compact/{detector_model}/{detector_model}.xml" + + reco_args = parser.parse_known_args()[0] algList = [] @@ -134,10 +146,7 @@ svcList.append(evtsvc) det_model = reco_args.detectorModel -if reco_args.compactFile: - compact_file = reco_args.compactFile -else: - compact_file = f"{os.environ['K4GEO']}/ILD/compact/{det_model}/{det_model}.xml" +compact_file = reco_args.compactFile or get_compact_file_path(det_model) geoSvc = GeoSvc("GeoSvc") geoSvc.detectors = [compact_file]