diff --git a/hbt/config/analysis_hbt.py b/hbt/config/analysis_hbt.py index 31687532..f7d86509 100644 --- a/hbt/config/analysis_hbt.py +++ b/hbt/config/analysis_hbt.py @@ -87,38 +87,67 @@ def factory(configs: od.UniqueObjectIndex): # Run 2 configs # -# 2016 HIPM (also known as APV or preVFP) -add_lazy_config( - campaign_module="cmsdb.campaigns.run2_2016_HIPM_nano_uhh_v12", - campaign_attr="campaign_run2_2016_HIPM_nano_uhh_v12", - config_name="run2_2016_HIPM_nano_uhh_v12", - config_id=1, -) +# 2016 HIPM (also known as APV or preVFP), TODO: campaign needs consistency and content check +# add_lazy_config( +# campaign_module="cmsdb.campaigns.run2_2016_HIPM_nano_uhh_v12", +# campaign_attr="campaign_run2_2016_HIPM_nano_uhh_v12", +# config_name="run2_2016_HIPM_nano_uhh_v12", +# config_id=1, +# ) + +# 2016 (also known postVFP), TODO: campaign needs consistency and content check +# add_lazy_config( +# campaign_module="cmsdb.campaigns.run2_2016_nano_uhh_v12", +# campaign_attr="campaign_run2_2016_nano_uhh_v12", +# config_name="run2_2016_nano_uhh_v12", +# config_id=2, +# ) + +# 2017, old nano version, TODO: needs re-processing +# add_lazy_config( +# campaign_module="cmsdb.campaigns.run2_2017_nano_uhh_v11", +# campaign_attr="campaign_run2_2017_nano_uhh_v11", +# config_name="run2_2017_nano_uhh_v11", +# config_id=3, +# ) + +# 2018, TODO: not processed yet +# add_lazy_config( +# campaign_module="cmsdb.campaigns.run2_2018_nano_uhh_v12", +# campaign_attr="campaign_run2_2018_nano_uhh_v12", +# config_name="run2_2018_nano_uhh_v12", +# config_id=4, +# ) -# 2016 (also known postVFP) -add_lazy_config( - campaign_module="cmsdb.campaigns.run2_2016_nano_uhh_v12", - campaign_attr="campaign_run2_2016_nano_uhh_v12", - config_name="run2_2016_nano_uhh_v12", - config_id=2, -) +# +# Run 3 configs +# -# 2017 +# 2022, preEE, TODO: disabled until re-production of missing datasets is done by Nathan +# add_lazy_config( +# campaign_module="cmsdb.campaigns.run3_2022_preEE_nano_uhh_v12", +# campaign_attr="campaign_run3_2022_preEE_nano_uhh_v12", +# config_name="run3_2022_preEE", +# config_id=5, +# ) + +# 2022, postEE add_lazy_config( - campaign_module="cmsdb.campaigns.run2_2017_nano_uhh_v11", - campaign_attr="campaign_run2_2017_nano_uhh_v11", - config_name="run2_2017_nano_uhh_v11", - config_id=3, + campaign_module="cmsdb.campaigns.run3_2022_postEE_nano_uhh_v12", + campaign_attr="campaign_run3_2022_postEE_nano_uhh_v12", + config_name="run3_2022_postEE", + config_id=6, ) # -# Run 3 configs +# sync configs # # 2022, preEE add_lazy_config( - campaign_module="cmsdb.campaigns.run3_2022_preEE_nano_uhh_v12", - campaign_attr="campaign_run3_2022_preEE_nano_uhh_v12", - config_name="run3_2022_preEE", - config_id=5, + campaign_module="cmsdb.campaigns.run3_2022_preEE_nano_v12", + campaign_attr="campaign_run3_2022_preEE_nano_v12", + config_name="run3_2022_preEE_sync", + config_id=5001, + sync_mode=True, ) diff --git a/hbt/config/configs_hbt.py b/hbt/config/configs_hbt.py index f7a88089..3542d20e 100644 --- a/hbt/config/configs_hbt.py +++ b/hbt/config/configs_hbt.py @@ -33,6 +33,7 @@ def add_config( config_name: str | None = None, config_id: int | None = None, limit_dataset_files: int | None = None, + sync_mode: bool = False, ) -> od.Config: # gather campaign data run = campaign.x.run @@ -56,45 +57,48 @@ def add_config( # helper to enable processes / datasets only for a specific era def if_era( *, - run: int | None = None, - year: int | None = None, - postfix: str | None = None, - tag: str | None = None, - values: list[str] | None = None, + run: int | set[int] | None = None, + year: int | set[int] | None = None, + postfix: str | set[int] | None = None, + tag: str | set[str] | None = None, + values: list[str | None] | None = None, + sync: bool = False, ) -> list[str]: match = ( - (run is None or campaign.x.run == run) and - (year is None or campaign.x.year == year) and - (postfix is None or campaign.x.postfix == postfix) and - (tag is None or campaign.has_tag(tag)) + (run is None or campaign.x.run in law.util.make_set(run)) and + (year is None or campaign.x.year in law.util.make_set(year)) and + (postfix is None or campaign.x.postfix in law.util.make_set(postfix)) and + (tag is None or campaign.has_tag(tag, mode=any)) and + (sync is sync_mode) ) - return (values or []) if match else [] + return list(filter(bool, values or [])) if match else [] ################################################################################################ # processes ################################################################################################ # add custom processes - cfg.add_process( - name="v", - id=7997, - label="W/Z", - processes=[procs.n.w, procs.n.z], - ) - cfg.add_process( - name="multiboson", - id=7998, - label="Multiboson", - processes=[procs.n.vv, procs.n.vvv], - ) - cfg.add_process( - name="tt_multiboson", - id=7999, - label=r"$t\bar{t}$ + Multiboson", - processes=[procs.n.ttv, procs.n.ttvv], - ) + if not sync_mode: + cfg.add_process( + name="v", + id=7997, + label="W/Z", + processes=[procs.n.w, procs.n.z], + ) + cfg.add_process( + name="multiboson", + id=7998, + label="Multiboson", + processes=[procs.n.vv, procs.n.vvv], + ) + cfg.add_process( + name="tt_multiboson", + id=7999, + label=r"$t\bar{t}$ + Multiboson", + processes=[procs.n.ttv, procs.n.ttvv], + ) - # add processes we are interested in + # processes we are interested in process_names = [ "data", "tt", @@ -125,9 +129,10 @@ def if_era( "hh_vbf_hbb_htt_kvm1p83_k2v3p57_klm3p39", "hh_vbf_hbb_htt_kvm2p12_k2v3p87_klm5p96", ]), + "radion_hh_ggf_hbb_htt_m450", + "radion_hh_ggf_hbb_htt_m1200", "graviton_hh_ggf_hbb_htt_m450", "graviton_hh_ggf_hbb_htt_m1200", - "radion_hh_ggf_hbb_htt_m700", ] for process_name in process_names: if process_name in procs: @@ -147,9 +152,9 @@ def if_era( if process_name.startswith(("graviton_hh_", "radion_hh_")): proc.add_tag("signal") proc.add_tag("resonant_signal") - if process_name.startswith("tt"): - proc.add_tag("ttbar") - if process_name.startswith("dy"): + if process_name.startswith("tt_"): + proc.add_tag({"ttbar", "tt"}) + if process_name.startswith("dy_"): proc.add_tag("dy") # add the process @@ -172,6 +177,7 @@ def if_era( "hh_ggf_hbb_htt_kl0_kt1_powheg", "hh_ggf_hbb_htt_kl2p45_kt1_powheg", "hh_ggf_hbb_htt_kl5_kt1_powheg", + # vbf "hh_vbf_hbb_htt_kv1_k2v1_kl1_madgraph", "hh_vbf_hbb_htt_kv1_k2v1_kl2_madgraph", @@ -185,24 +191,22 @@ def if_era( "hh_vbf_hbb_htt_kvm1p6_k2v2p72_klm1p36_madgraph", "hh_vbf_hbb_htt_kvm1p83_k2v3p57_klm3p39_madgraph", "hh_vbf_hbb_htt_kvm2p12_k2v3p87_klm5p96_madgraph", + # some resonances + "radion_hh_ggf_hbb_htt_m450_madgraph", + "radion_hh_ggf_hbb_htt_m1200_madgraph", "graviton_hh_ggf_hbb_htt_m450_madgraph", "graviton_hh_ggf_hbb_htt_m1200_madgraph", - "radion_hh_ggf_hbb_htt_m700_madgraph", ]), # backgrounds - "tt_sl_powheg", - "tt_dl_powheg", - "tt_fh_powheg", *if_era(run=3, year=2022, values=[ - "ttw_wlnu_amcatnlo", - "ttz_zqq_amcatnlo", - "ttz_zll_m4to50_amcatnlo", - "ttz_zll_m50toinf_amcatnlo", - "ttzz_madgraph", - "ttww_madgraph", - # "ttwz_madgraph", # not available yet + # ttbar + "tt_sl_powheg", + "tt_dl_powheg", + "tt_fh_powheg", + + # single top "st_tchannel_t_4f_powheg", "st_tchannel_tbar_4f_powheg", "st_twchannel_t_sl_powheg", @@ -211,8 +215,23 @@ def if_era( "st_twchannel_tbar_dl_powheg", "st_twchannel_t_fh_powheg", "st_twchannel_tbar_fh_powheg", - # "st_schannel_t_lep_4f_amcatnlo", # no cross section yet - # "st_schannel_tbar_lep_4f_amcatnlo", # no cross section yet + "st_schannel_t_lep_4f_amcatnlo", + "st_schannel_tbar_lep_4f_amcatnlo", + + # tt + v + "ttw_wlnu_amcatnlo", + "ttz_zqq_amcatnlo", + "ttz_zll_m4to50_amcatnlo", + "ttz_zll_m50toinf_amcatnlo", + + # tt + vv + "ttww_madgraph", + *if_era(run=3, year=2022, tag="postEE", values=[ + "ttwz_madgraph", # exists for post, but not for pre + ]), + "ttzz_madgraph", + + # dy "dy_m4to10_amcatnlo", "dy_m10to50_amcatnlo", "dy_m50toinf_amcatnlo", @@ -229,31 +248,62 @@ def if_era( "dy_m50toinf_2j_pt200to400_amcatnlo", "dy_m50toinf_2j_pt400to600_amcatnlo", "dy_m50toinf_2j_pt600toinf_amcatnlo", + + # w + jets "w_lnu_amcatnlo", - "z_qq_pt100to200_1j_amcatnlo", - "z_qq_pt100to200_2j_amcatnlo", - "z_qq_pt200to400_1j_amcatnlo", - "z_qq_pt200to400_2j_amcatnlo", # literally no events selected above 400 GeV + "w_lnu_0j_amcatnlo", + "w_lnu_1j_amcatnlo", + "w_lnu_2j_amcatnlo", + "w_lnu_1j_pt40to100_amcatnlo", + "w_lnu_1j_pt100to200_amcatnlo", + "w_lnu_1j_pt200to400_amcatnlo", + "w_lnu_1j_pt400to600_amcatnlo", + "w_lnu_1j_pt600toinf_amcatnlo", + "w_lnu_2j_pt40to100_amcatnlo", + "w_lnu_2j_pt100to200_amcatnlo", + "w_lnu_2j_pt200to400_amcatnlo", + "w_lnu_2j_pt400to600_amcatnlo", + "w_lnu_2j_pt600toinf_amcatnlo", + + # z + jets (not DY but qq) + # decided to drop z_qq for now as their contribution is negligible, + # but we should check that again at a much later stage + # "z_qq_1j_pt100to200_amcatnlo", + # "z_qq_1j_pt200to400_amcatnlo", + # "z_qq_1j_pt400to600_amcatnlo", + # "z_qq_1j_pt600toinf_amcatnlo", + # "z_qq_2j_pt100to200_amcatnlo", + # "z_qq_2j_pt200to400_amcatnlo", + # "z_qq_2j_pt400to600_amcatnlo", + # "z_qq_2j_pt600toinf_amcatnlo", + + # vv "zz_pythia", "wz_pythia", "ww_pythia", + + # vvv "zzz_amcatnlo", "wzz_amcatnlo", "wwz_4f_amcatnlo", "www_4f_amcatnlo", + + # single H "h_ggf_htt_powheg", "h_vbf_htt_powheg", "vh_hnonbb_amcatnlo", + "wmh_wlnu_hbb_powheg", + "wph_wlnu_hbb_powheg", + "wph_htt_powheg", + "wmh_htt_powheg", + "wph_wqq_hbb_powheg", + "wmh_wqq_hbb_powheg", "zh_zll_hbb_powheg", "zh_zqq_hbb_powheg", "zh_htt_powheg", - "wph_htt_powheg", - "wmh_htt_powheg", - "wph_wlnu_hbb_powheg", - "wmh_wlnu_hbb_powheg", "zh_gg_zll_hbb_powheg", - "zh_gg_znunu_hbb_powheg", "zh_gg_zqq_hbb_powheg", + "zh_gg_znunu_hbb_powheg", "tth_hbb_powheg", "tth_hnonbb_powheg", ]), @@ -262,33 +312,55 @@ def if_era( *if_era(run=3, year=2022, tag="preEE", values=[ f"data_{stream}_{period}" for stream in ["mu", "e", "tau", "met"] for period in "cd" ]), + *if_era(run=3, year=2022, tag="postEE", values=[ + f"data_{stream}_{period}" for stream in ["mu", "e", "tau", "met"] for period in "efg" + ]), + + # sync + *if_era(run=3, year=2022, tag="preEE", sync=True, values=[ + "hh_ggf_hbb_htt_kl1_kt1_powheg", + ]), ] for dataset_name in dataset_names: # add the dataset dataset = cfg.add_dataset(campaign.get_dataset(dataset_name)) # add tags to datasets - if dataset.name.startswith("tt"): - dataset.add_tag(("has_top", "is_ttbar")) - elif dataset.name.startswith("st"): - dataset.add_tag(("has_top", "is_single_top")) - if dataset.name.startswith("dy"): - dataset.add_tag("is_dy") + if dataset.name.startswith("tt_"): + dataset.add_tag({"has_top", "ttbar", "tt"}) + if dataset.name.startswith("st_"): + dataset.add_tag({"has_top", "single_top", "st"}) + if dataset.name.startswith("dy_"): + dataset.add_tag("dy") if re.match(r"^(ww|wz|zz)_.*pythia$", dataset.name): dataset.add_tag("no_lhe_weights") if dataset_name.startswith("hh_"): dataset.add_tag("signal") dataset.add_tag("nonresonant_signal") + if dataset_name.startswith("hh_ggf_"): + dataset.add_tag("ggf") + elif dataset_name.startswith("hh_vbf_"): + dataset.add_tag("vbf") if dataset_name.startswith(("graviton_hh_", "radion_hh_")): dataset.add_tag("signal") dataset.add_tag("resonant_signal") + if dataset_name.startswith(("graviton_hh_ggf_", "radion_hh_ggf")): + dataset.add_tag("ggf") + elif dataset_name.startswith(("graviton_hh_vbf_", "radion_hh_vbf")): + dataset.add_tag("vbf") # apply an optional limit on the number of files if limit_dataset_files: for info in dataset.info.values(): info.n_files = min(info.n_files, limit_dataset_files) - # verify that the root process of all datasets is part of any of the registered processes + # apply synchronization settings + if sync_mode: + # only first file per + for info in dataset.info.values(): + info.n_files = 1 + + # verify that the root process of each dataset is part of any of the registered processes verify_config_processes(cfg, warn=True) ################################################################################################ @@ -334,8 +406,9 @@ def if_era( "sm_data": ["data"] + sm_group, } - # define inclusive datasets for the dy process identification with corresponding leaf processes - if run == 3: + # define inclusive datasets for the stitched process identification with corresponding leaf processes + if run == 3 and not sync_mode: + # drell-yan cfg.x.dy_stitching = { "m50toinf": { "inclusive_dataset": cfg.datasets.n.dy_m50toinf_amcatnlo, @@ -351,6 +424,8 @@ def if_era( ], }, } + # w+jets + # TODO: add # dataset groups for conveniently looping over certain datasets # (used in wrapper_factory and during plotting) @@ -1106,7 +1181,7 @@ def add_external(name, value): cfg.x.get_dataset_lfns_sandbox = None # whether to validate the number of obtained LFNs in GetDatasetLFNs - cfg.x.validate_dataset_lfns = limit_dataset_files is None + cfg.x.validate_dataset_lfns = limit_dataset_files is None and not sync_mode # custom lfn retrieval method in case the underlying campaign is custom uhh if cfg.campaign.x("custom", {}).get("creator") == "uhh": diff --git a/hbt/tasks/stats.py b/hbt/tasks/stats.py index c5aa96fa..67692a66 100644 --- a/hbt/tasks/stats.py +++ b/hbt/tasks/stats.py @@ -30,48 +30,65 @@ def run(self): # color helpers green = functools.partial(law.util.colored, color="green") + green_bright = functools.partial(law.util.colored, color="green", style="bright") + yellow = functools.partial(law.util.colored, color="yellow") + yellow_bright = functools.partial(law.util.colored, color="yellow", style="bright") red = functools.partial(law.util.colored, color="red") - red_bright = functools.partial(law.util.colored, color="red", style="bright") cyan = functools.partial(law.util.colored, color="cyan") + cyan_bright = functools.partial(law.util.colored, color="cyan", style="bright") bright = functools.partial(law.util.colored, style="bright") + def get_color(dataset_inst): + if dataset_inst.is_data: + return red + if dataset_inst.has_tag("nonresonant_signal"): + return green if dataset_inst.has_tag("ggf") else green_bright + if dataset_inst.has_tag("resonant_signal"): + return cyan if dataset_inst.has_tag("ggf") else cyan_bright + return yellow + # headers headers = ["Dataset", "Files", "Events"] # content rows = [] - sum_files_nominal, sum_events_nominal = 0, 0 - sum_files_syst, sum_events_syst = 0, 0 + sum_files_s_nonres, sum_events_s_nonres = 0, 0 + sum_files_s_res, sum_events_s_res = 0, 0 + sum_files_b_nom, sum_events_b_nom = 0, 0 + sum_files_b_syst, sum_events_b_syst = 0, 0 sum_files_data, sum_events_data = 0, 0 for dataset_inst in self.config_inst.datasets: - col = ( - cyan - if dataset_inst.is_data - else (green if dataset_inst.name.startswith("hh_") else red) - ) + col = get_color(dataset_inst) # nominal info rows.append([col(dataset_inst.name), dataset_inst.n_files, dataset_inst.n_events]) # increment sums if dataset_inst.is_data: sum_files_data += dataset_inst.n_files sum_events_data += dataset_inst.n_events + elif dataset_inst.has_tag("nonresonant_signal"): + sum_files_s_nonres += dataset_inst.n_files + sum_events_s_nonres += dataset_inst.n_events + elif dataset_inst.has_tag("resonant_signal"): + sum_files_s_res += dataset_inst.n_files + sum_events_s_res += dataset_inst.n_events else: - sum_files_nominal += dataset_inst.n_files - sum_events_nominal += dataset_inst.n_events + sum_files_b_nom += dataset_inst.n_files + sum_events_b_nom += dataset_inst.n_events # potential shifts for shift_name, info in dataset_inst.info.items(): if shift_name == "nominal" or shift_name not in self.config_inst.shifts: continue - rows.append([red_bright(f" → {shift_name}"), info.n_files, info.n_events]) + rows.append([yellow_bright(f" → {shift_name}"), info.n_files, info.n_events]) # increment sums - sum_files_syst += info.n_files - sum_events_syst += info.n_events + sum_files_b_syst += info.n_files + sum_events_b_syst += info.n_events + # sums - rows.append([bright("total MC (nominal)"), sum_files_nominal, sum_events_nominal]) - if sum_files_syst or sum_events_syst: - sum_files = sum_files_nominal + sum_files_syst - sum_events = sum_events_nominal + sum_events_syst - rows.append([bright("total MC (all)"), sum_files, sum_events]) + rows.append([bright("total signal (non-res.)"), sum_files_s_nonres, sum_events_s_nonres]) + rows.append([bright("total signal (res.)"), sum_files_s_res, sum_events_s_res]) + rows.append([bright("total background (nominal)"), sum_files_b_nom, sum_events_b_nom]) + if sum_files_b_syst or sum_events_b_syst: + rows.append([bright("total background (syst.)"), sum_files_b_syst, sum_events_b_syst]) if sum_files_data or sum_events_data: rows.append([bright("total data"), sum_files_data, sum_events_data]) diff --git a/law.cfg b/law.cfg index a58dc10a..2c49d992 100644 --- a/law.cfg +++ b/law.cfg @@ -38,7 +38,7 @@ job_file_dir_mkdtemp: sub_{{task_id}}_XXX [analysis] default_analysis: hbt.config.analysis_hbt.analysis_hbt -default_config: run3_2022_preEE +default_config: run3_2022_postEE default_dataset: hh_ggf_hbb_htt_kl1_kt1_powheg calibration_modules: columnflow.calibration.cms.{jets,met,tau}, hbt.calibration.{default,fake_triggers} @@ -99,18 +99,32 @@ lfn_sources: wlcg_fs_desy_store, wlcg_fs_infn_redirector, wlcg_fs_global_redirec # the "store_parts_modifiers" can be the name of a function in the "store_parts_modifiers" aux dict # of the analysis instance, which is called with an output's store parts of an output to modify them # specific locations -run3_2022_preEE*__cf.CalibrateEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.SelectEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.ReduceEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.MergeReducedEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.MergeReductionStats: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.MergeSelectionStats: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.ProduceColumns: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.UniteColumns: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.CreateHistograms: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.MergeHistograms: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.MergeShiftedHistograms: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos -run3_2022_preEE*__cf.CreateDatacards: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.CalibrateEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.SelectEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.ReduceEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.MergeReducedEvents: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.MergeReductionStats: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.MergeSelectionStats: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.ProduceColumns: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.UniteColumns: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.CreateHistograms: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.MergeHistograms: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.MergeShiftedHistograms: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos +run3_2022_preEE__cf.CreateDatacards: wlcg_mirrored, local_fs_desy_nprouvos, wlcg_fs_desy_nprouvos + +run3_2022_postEE__cf.CalibrateEvents: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.SelectEvents: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.ReduceEvents: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.MergeReducedEvents: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.MergeReductionStats: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.MergeSelectionStats: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.ProduceColumns: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.UniteColumns: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.CreateHistograms: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.MergeHistograms: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.MergeShiftedHistograms: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan +run3_2022_postEE__cf.CreateDatacards: wlcg_mirrored, local_fs_desy_aalvesan, wlcg_fs_desy_aalvesan + # fallbacks cf.BundleRepo: wlcg cf.BundleSoftware: wlcg @@ -137,10 +151,10 @@ cf.CreateSyncFile: wlcg [versions] -run3_2022_preEE*__cf.CalibrateEvents: prod1 -run3_2022_preEE*__cf.MergeSelectionStats: prod1 -run3_2022_preEE*__cf.MergeReductionStats: prod1 -run3_2022_preEE*__cf.ProvideReducedEvents: prod1 +run3_2022_preEE__cf.CalibrateEvents: prod1 +run3_2022_preEE__cf.MergeSelectionStats: prod1 +run3_2022_preEE__cf.MergeReductionStats: prod1 +run3_2022_preEE__cf.ProvideReducedEvents: prod1 # @@ -353,6 +367,23 @@ cache_global_lock: True base: file:///pnfs/desy.de/cms/tier2/store/user/nprouvos/nanogen_store/MergeNano/config_22pre_v12/prod3 +[wlcg_fs_run3_2022_postEE_nano_uhh_v12] + +webdav_base: davs://dcache-cms-webdav-wan.desy.de:2880/pnfs/desy.de/cms/tier2/store/user/aalvesan/nanogen_store/MergeNano/config_22post_v12/prod1 +gsiftp_base: gsiftp://dcache-door-cms04.desy.de:2811/pnfs/desy.de/cms/tier2/store/user/aalvesan/nanogen_store/MergeNano/config_22post_v12/prod1 +xrootd_base: root://dcache-cms-xrootd.desy.de:1094/pnfs/desy.de/cms/tier2/store/user/aalvesan/nanogen_store/MergeNano/config_22post_v12/prod1 +base: &::xrootd_base +use_cache: $CF_WLCG_USE_CACHE +cache_root: $CF_WLCG_CACHE_ROOT +cache_cleanup: $CF_WLCG_CACHE_CLEANUP +cache_max_size: 15GB +cache_global_lock: True + +[local_fs_run3_2022_postEE_nano_uhh_v12] + +base: file:///pnfs/desy.de/cms/tier2/store/user/aalvesan/nanogen_store/MergeNano/config_22post_v12/prod1 + + # # file systems for central LFNs # diff --git a/modules/cmsdb b/modules/cmsdb index c88e17bf..bb9d0255 160000 --- a/modules/cmsdb +++ b/modules/cmsdb @@ -1 +1 @@ -Subproject commit c88e17bfb30ab9a39e85fe73e070a221dea02f8d +Subproject commit bb9d02555b50e773a0435223e234c167e0af4d62 diff --git a/modules/columnflow b/modules/columnflow index 0652ad1e..d67acd24 160000 --- a/modules/columnflow +++ b/modules/columnflow @@ -1 +1 @@ -Subproject commit 0652ad1eb169deb80f32a26466df30ecbfda5230 +Subproject commit d67acd24352d8eb5d13d32d79e3cc776ea5eb686 diff --git a/setup.sh b/setup.sh index 62cca430..7864df38 100644 --- a/setup.sh +++ b/setup.sh @@ -45,6 +45,7 @@ setup_hbt() { local orig="${PWD}" local setup_name="${1:-default}" local setup_is_default="false" + local env_is_remote="$( [ "${CF_REMOTE_ENV}" = "1" ] && echo "true" || echo "false" )" [ "${setup_name}" = "default" ] && setup_is_default="true" # zsh options @@ -72,7 +73,7 @@ setup_hbt() { CF_SKIP_SETUP="1" source "${CF_BASE}/setup.sh" "" || return "$?" # interactive setup - if [ "${CF_REMOTE_ENV}" != "1" ]; then + if ! ${env_is_remote}; then cf_setup_interactive_body() { # the flavor will be cms export CF_FLAVOR="cms" @@ -133,12 +134,21 @@ setup_hbt() { export LAW_HOME="${LAW_HOME:-${HBT_BASE}/.law}" export LAW_CONFIG_FILE="${LAW_CONFIG_FILE:-${HBT_BASE}/law.cfg}" - if which law &> /dev/null; then - # source law's bash completion scipt - source "$( law completion )" "" + # run the indexing when not remote + if ! ${env_is_remote}; then + if which law &> /dev/null; then + # source law's bash completion scipt + source "$( law completion )" "" - # silently index - law index -q + # silently index + law index -q + fi + fi + + # update the law config file to switch from mirrored to bare wlcg targets + # as local mounts are typically not available remotely + if ${env_is_remote}; then + sed -i -r 's/(.+\: ?)wlcg_mirrored, local_.+, ?(wlcg_[^\s]+)/\1wlcg, \2/g' "${LAW_CONFIG_FILE}" fi # finalize