Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8d690b2
Adding benchmark sampF
Jun 25, 2025
39ff9b9
Reducing number of benchmarks to be done
MSieczczynski Jun 25, 2025
0c06353
Merge remote-tracking branch 'origin/master' into pr/nhcal
MSieczczynski Jul 14, 2025
ca2ef53
Lowering amount of benchmarks to be done after merge
MSieczczynski Jul 14, 2025
332c6e9
New benchmark (light by light) in development
MSieczczynski Jul 15, 2025
beaf6f2
Include files in config and snakefile
MSieczczynski Jul 16, 2025
df3b7df
parallel:matrix error
MSieczczynski Jul 16, 2025
26d1bf6
Rename and fix dimuon_fotoproduction
MSieczczynski Jul 16, 2025
248fe64
Delete previous name
MSieczczynski Jul 16, 2025
59b66b2
Add new module for linking hits with tracks
Aug 13, 2025
0b2475c
New graphs for reconstruction
MSieczczynski Sep 24, 2025
1ecb2ad
Add new histograms and new muon matching change
MSieczczynski Sep 28, 2025
fff5346
Change in energy matching
MSieczczynski Sep 28, 2025
53d63b8
Second change in matching
MSieczczynski Sep 28, 2025
3422512
Change matching hit and tracks, add new graphs
MSieczczynski Oct 9, 2025
ed9abcd
Fix minor bugs
MSieczczynski Oct 10, 2025
a8dc1e5
New benchmark - pion rejection
Oct 19, 2025
4b70010
Change the title of graphs
MSieczczynski Oct 19, 2025
890772c
Change geometry of sampling fraction
MSieczczynski Oct 29, 2025
2dcb212
Fix name
MSieczczynski Oct 29, 2025
c3b51dc
Add presimulate and new condition for dimuon, new graphs
MSieczczynski Nov 2, 2025
a73c3f1
Fix Snakefile
MSieczczynski Nov 4, 2025
ceba67e
Fix Snakefile - names
MSieczczynski Nov 4, 2025
4cc2c1d
Fix snakefile sampling_fraction
MSieczczynski Nov 5, 2025
04a8431
params need `params.`, unlike wildcards
veprbl Nov 6, 2025
7388620
Add calculating energy resolution to basic_distribution
MSieczczynski Nov 9, 2025
43bae26
Add and fix error bars
MSieczczynski Nov 11, 2025
6ea4b81
Update input path for simulation rule
veprbl Nov 12, 2025
bdeb10a
Change names in samplingF
MSieczczynski Dec 2, 2025
fbacd98
Change names and fit in basic distribution
MSieczczynski Dec 2, 2025
22321e2
Change names and reconstruction place in dimuon
MSieczczynski Dec 2, 2025
34bf426
Change discription and reconstruction place in pion rejection
MSieczczynski Dec 2, 2025
8c0b971
Rename nhcal_dimuon_fotoproduction to nhcal_dimuon_photoproduction
MSieczczynski Dec 2, 2025
3d9d484
Change remaining names to photoproduction
MSieczczynski Dec 2, 2025
84fb166
Uncomment other benchmarks
MSieczczynski Dec 4, 2025
517bc9e
Add neutron detection efficiency calculation and fix bugs
MSieczczynski Dec 28, 2025
8999b6b
Fix no rule and job execution timeout exception
MSieczczynski Dec 28, 2025
8fa6182
Merge branch 'master' into pr/nhcal
MSieczczynski Dec 28, 2025
015a857
Fix error with including some classes
MSieczczynski Jan 15, 2026
8df8139
wip: debugging nhcal pipeline issues
MSieczczynski Feb 4, 2026
e69e546
wip: debugging nhcal pipeline issues
MSieczczynski Feb 4, 2026
0fd1374
wip: debugging nhcal pipeline issues
MSieczczynski Feb 4, 2026
e587341
Merge branch 'master' into pr/nhcal
MSieczczynski Feb 4, 2026
cf162f1
wip: debugging nhcal pipeline issues
MSieczczynski Feb 5, 2026
9c3ca9b
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
a830a59
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
847773d
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
5790d03
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
7ba4b27
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
f4dbff6
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
bb382cf
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
6dd325f
wip: debugging nhcal pipeline issues
MSieczczynski Feb 8, 2026
07f1e23
wip: debugging nhcal pipeline issues
Feb 10, 2026
6cf6150
wip: debugging nhcal pipeline issues
MSieczczynski Feb 10, 2026
53ea5d7
wip: debugging nhcal pipeline issues
MSieczczynski Feb 10, 2026
08c4048
wip: debugging nhcal pipeline issues
Feb 10, 2026
addeb1c
wip: debugging nhcal pipeline issues
Feb 11, 2026
66d543e
sampling_fraction_analysis.cxx: workaround by loading libraries
veprbl Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 67 additions & 61 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,74 +124,80 @@ common:setup:
- runner_system_failure

include:
- local: 'benchmarks/backgrounds/config.yml'
- local: 'benchmarks/backwards_ecal/config.yml'
- local: 'benchmarks/beamline/config.yml'
- local: 'benchmarks/calo_pid/config.yml'
- local: 'benchmarks/campaign/config.yml'
- local: 'benchmarks/ecal_gaps/config.yml'
- local: 'benchmarks/far_forward_dvcs/config.yml'
- local: 'benchmarks/lowq2_reconstruction/config.yml'
- local: 'benchmarks/tracking_detectors/config.yml'
- local: 'benchmarks/tracking_performances/config.yml'
- local: 'benchmarks/tracking_performances_dis/config.yml'
- local: 'benchmarks/barrel_ecal/config.yml'
- local: 'benchmarks/lfhcal/config.yml'
- local: 'benchmarks/zdc/config.yml'
- local: 'benchmarks/zdc_lyso/config.yml'
- local: 'benchmarks/zdc_neutron/config.yml'
- local: 'benchmarks/zdc_photon/config.yml'
- local: 'benchmarks/zdc_pi0/config.yml'
- local: 'benchmarks/material_scan/config.yml'
- local: 'benchmarks/pid/config.yml'
- local: 'benchmarks/rich/config.yml'
- local: 'benchmarks/b0_tracker/config.yml'
- local: 'benchmarks/insert_muon/config.yml'
- local: 'benchmarks/insert_tau/config.yml'
- local: 'benchmarks/zdc_sigma/config.yml'
- local: 'benchmarks/zdc_lambda/config.yml'
- local: 'benchmarks/insert_neutron/config.yml'
- local: 'benchmarks/femc_electron/config.yml'
- local: 'benchmarks/femc_photon/config.yml'
- local: 'benchmarks/femc_pi0/config.yml'
- local: 'benchmarks/nhcal_acceptance/config.yml'
# - local: 'benchmarks/backgrounds/config.yml'
# - local: 'benchmarks/backwards_ecal/config.yml'
# - local: 'benchmarks/beamline/config.yml'
# - local: 'benchmarks/calo_pid/config.yml'
# - local: 'benchmarks/campaign/config.yml'
# - local: 'benchmarks/ecal_gaps/config.yml'
# - local: 'benchmarks/far_forward_dvcs/config.yml'
# - local: 'benchmarks/lowq2_reconstruction/config.yml'
# - local: 'benchmarks/tracking_detectors/config.yml'
# - local: 'benchmarks/tracking_performances/config.yml'
# - local: 'benchmarks/tracking_performances_dis/config.yml'
# - local: 'benchmarks/barrel_ecal/config.yml'
# - local: 'benchmarks/lfhcal/config.yml'
# - local: 'benchmarks/zdc/config.yml'
# - local: 'benchmarks/zdc_lyso/config.yml'
# - local: 'benchmarks/zdc_neutron/config.yml'
# - local: 'benchmarks/zdc_photon/config.yml'
# - local: 'benchmarks/zdc_pi0/config.yml'
# - local: 'benchmarks/material_scan/config.yml'
# - local: 'benchmarks/pid/config.yml'
# - local: 'benchmarks/rich/config.yml'
# - local: 'benchmarks/b0_tracker/config.yml'
# - local: 'benchmarks/insert_muon/config.yml'
# - local: 'benchmarks/insert_tau/config.yml'
# - local: 'benchmarks/zdc_sigma/config.yml'
# - local: 'benchmarks/zdc_lambda/config.yml'
# - local: 'benchmarks/insert_neutron/config.yml'
# - local: 'benchmarks/femc_electron/config.yml'
# - local: 'benchmarks/femc_photon/config.yml'
# - local: 'benchmarks/femc_pi0/config.yml'
# - local: 'benchmarks/nhcal_acceptance/config.yml'
- local: 'benchmarks/nhcal_basic_distribution/config.yml'
# - local: 'benchmarks/nhcal_sampling_fraction/config.yml'
- local: 'benchmarks/nhcal_dimuon_photoproduction/config.yml'
- local: 'benchmarks/nhcal_pion_rejection/config.yml'

deploy_results:
allow_failure: true
stage: deploy
needs:
- "collect_results:backgrounds"
- "collect_results:backwards_ecal"
- "collect_results:barrel_ecal"
- "collect_results:beamline"
- "collect_results:calo_pid"
- "collect_results:campaign"
- "collect_results:ecal_gaps"
- "collect_results:far_forward_dvcs"
- "collect_results:lfhcal"
- "collect_results:lowq2_reconstruction"
- "collect_results:material_scan"
- "collect_results:pid"
- "collect_results:rich"
- "collect_results:tracking_performance"
- "collect_results:tracking_performance_campaigns"
- "collect_results:zdc_sigma"
- "collect_results:zdc_lambda"
- "collect_results:insert_neutron"
- "collect_results:tracking_performances_dis"
- "collect_results:zdc"
- "collect_results:zdc_lyso"
- "collect_results:zdc_neutron"
- "collect_results:insert_muon"
- "collect_results:insert_tau"
- "collect_results:zdc_photon"
- "collect_results:zdc_pi0"
- "collect_results:femc_electron"
- "collect_results:femc_photon"
- "collect_results:femc_pi0"
- "collect_results:nhcal_acceptance"
# - "collect_results:backgrounds"
# - "collect_results:backwards_ecal"
# - "collect_results:barrel_ecal"
# - "collect_results:beamline"
# - "collect_results:calo_pid"
# - "collect_results:campaign"
# - "collect_results:ecal_gaps"
# - "collect_results:far_forward_dvcs"
# - "collect_results:lfhcal"
# - "collect_results:lowq2_reconstruction"
# - "collect_results:material_scan"
# - "collect_results:pid"
# - "collect_results:rich"
# - "collect_results:tracking_performance"
# - "collect_results:tracking_performance_campaigns"
# - "collect_results:zdc_sigma"
# - "collect_results:zdc_lambda"
# - "collect_results:insert_neutron"
# - "collect_results:tracking_performances_dis"
# - "collect_results:zdc"
# - "collect_results:zdc_lyso"
# - "collect_results:zdc_neutron"
# - "collect_results:insert_muon"
# - "collect_results:insert_tau"
# - "collect_results:zdc_photon"
# - "collect_results:zdc_pi0"
# - "collect_results:femc_electron"
# - "collect_results:femc_photon"
# - "collect_results:femc_pi0"
# - "collect_results:nhcal_acceptance"
- "collect_results:nhcal_basic_distribution"
# - "collect_results:nhcal_sampling_fraction"
- "collect_results:nhcal_dimuon_photoproduction"
- "collect_results:nhcal_pion_rejection"
script:
- snakemake $SNAKEMAKE_FLAGS --cores 1 results/metadata.json
- find results -print | sort | tee summary.txt
Expand Down
55 changes: 29 additions & 26 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,36 @@ def find_epic_libraries():
return libs


include: "benchmarks/backgrounds/Snakefile"
include: "benchmarks/backwards_ecal/Snakefile"
include: "benchmarks/barrel_ecal/Snakefile"
include: "benchmarks/beamline/Snakefile"
include: "benchmarks/calo_pid/Snakefile"
include: "benchmarks/campaign/Snakefile"
include: "benchmarks/ecal_gaps/Snakefile"
include: "benchmarks/far_forward_dvcs/Snakefile"
include: "benchmarks/lowq2_reconstruction/Snakefile"
include: "benchmarks/material_scan/Snakefile"
include: "benchmarks/tracking_performances/Snakefile"
include: "benchmarks/tracking_performances_dis/Snakefile"
include: "benchmarks/lfhcal/Snakefile"
include: "benchmarks/zdc_lyso/Snakefile"
include: "benchmarks/zdc_neutron/Snakefile"
include: "benchmarks/insert_muon/Snakefile"
include: "benchmarks/zdc_lambda/Snakefile"
include: "benchmarks/zdc_photon/Snakefile"
include: "benchmarks/zdc_pi0/Snakefile"
include: "benchmarks/zdc_sigma/Snakefile"
include: "benchmarks/insert_neutron/Snakefile"
include: "benchmarks/insert_tau/Snakefile"
include: "benchmarks/femc_electron/Snakefile"
include: "benchmarks/femc_photon/Snakefile"
include: "benchmarks/femc_pi0/Snakefile"
include: "benchmarks/nhcal_acceptance/Snakefile"
# include: "benchmarks/backgrounds/Snakefile"
# include: "benchmarks/backwards_ecal/Snakefile"
# include: "benchmarks/barrel_ecal/Snakefile"
# include: "benchmarks/beamline/Snakefile"
# include: "benchmarks/calo_pid/Snakefile"
# include: "benchmarks/campaign/Snakefile"
# include: "benchmarks/ecal_gaps/Snakefile"
# include: "benchmarks/far_forward_dvcs/Snakefile"
# include: "benchmarks/lowq2_reconstruction/Snakefile"
# include: "benchmarks/material_scan/Snakefile"
# include: "benchmarks/tracking_performances/Snakefile"
# include: "benchmarks/tracking_performances_dis/Snakefile"
# include: "benchmarks/lfhcal/Snakefile"
# include: "benchmarks/zdc_lyso/Snakefile"
# include: "benchmarks/zdc_neutron/Snakefile"
# include: "benchmarks/insert_muon/Snakefile"
# include: "benchmarks/zdc_lambda/Snakefile"
# include: "benchmarks/zdc_photon/Snakefile"
# include: "benchmarks/zdc_pi0/Snakefile"
# include: "benchmarks/zdc_sigma/Snakefile"
# include: "benchmarks/insert_neutron/Snakefile"
# include: "benchmarks/insert_tau/Snakefile"
# include: "benchmarks/femc_electron/Snakefile"
# include: "benchmarks/femc_photon/Snakefile"
# include: "benchmarks/femc_pi0/Snakefile"
# include: "benchmarks/nhcal_acceptance/Snakefile"
include: "benchmarks/nhcal_basic_distribution/Snakefile"
# include: "benchmarks/nhcal_sampling_fraction/Snakefile"
include: "benchmarks/nhcal_dimuon_photoproduction/Snakefile"
include: "benchmarks/nhcal_pion_rejection/Snakefile"

use_s3 = config["remote_provider"].lower() == "s3"
use_xrootd = config["remote_provider"].lower() == "xrootd"
Expand Down
7 changes: 5 additions & 2 deletions benchmarks/nhcal_acceptance/scripts/acceptance_analysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ int acceptance_analysis(TString filename, string outname_pdf, string outname_png
int nPhiBins = 100;
double etaMin = -5, etaMax = 0;

TH2D* hEtaPhiAll = new TH2D("hEtaPhiAll", "All #pi- (status==1); #eta[1]; #phi[rad]",
gStyle->SetTitleSize(0.05, "XYZ");
gStyle->SetLabelSize(0.05, "XYZ");

TH2D* hEtaPhiAll = new TH2D("hEtaPhiAll", "All #pi- (status==1); #eta; #phi[rad]",
nEtaBins, etaMin, etaMax, nPhiBins, -TMath::Pi(), TMath::Pi());

TH2D* hEtaPhiDetected = new TH2D("hEtaPhiDetected", "#pi- detected in nHCal; #eta[1]; #phi[rad]",
TH2D* hEtaPhiDetected = new TH2D("hEtaPhiDetected", "#pi- detected in nHCal; #eta; #phi[rad]",
nEtaBins, etaMin, etaMax, nPhiBins, -TMath::Pi(), TMath::Pi());

while (reader.Next())
Expand Down
60 changes: 48 additions & 12 deletions benchmarks/nhcal_basic_distribution/Snakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
def get_total_energy_neutron(kinetic_energy):
ke = float(kinetic_energy)
neutron_mass = 0.94
return f"{ke + neutron_mass:.2f}"

rule nhcal_basic_distribution_simulate:
input:
warmup="warmup.edm4hep.root",
Expand All @@ -9,9 +14,9 @@ rule nhcal_basic_distribution_simulate:
SEED=lambda wildcards: "1" + wildcards.INDEX,
DETECTOR_PATH=os.environ["DETECTOR_PATH"],
DETECTOR_CONFIG=lambda wildcards: wildcards.DETECTOR_CONFIG,
ENERGY=lambda wildcards: wildcards.ENERGY,
DD4HEP_HASH=get_spack_package_hash("dd4hep"),
NPSIM_HASH=get_spack_package_hash("npsim"),
TOTAL_ENERGY=lambda wildcards: get_total_energy_neutron(wildcards.ENERGY),
cache: True
shell:
"""
Expand All @@ -25,15 +30,14 @@ exec npsim \
--gun.thetaMin 120*degree \
--gun.thetaMax 180*degree \
--gun.distribution uniform \
--gun.energy "{params.ENERGY}*GeV" \
--gun.energy "{params.TOTAL_ENERGY}*GeV" \
--outputFile {output}
"""


rule nhcal_basic_distribution_combine:
input:
lambda wildcards: expand(
"sim_output/nhcal_basic_distribution/E{ENERGY:.1f}GeV/sim_{DETECTOR_CONFIG}.{INDEX:02d}.edm4hep.root",
"sim_output/nhcal_basic_distribution/E{ENERGY:.1f}GeV/sim_{DETECTOR_CONFIG}.{INDEX}.edm4hep.root",
DETECTOR_CONFIG=wildcards.DETECTOR_CONFIG,
ENERGY=float(wildcards.ENERGY),
INDEX=range(int(wildcards.N)),
Expand All @@ -42,20 +46,52 @@ rule nhcal_basic_distribution_combine:
N=r"\d+",
ENERGY=r"\d+(\.\d+)?"
output:
temp("sim_output/nhcal_basic_distribution/sim_{DETECTOR_CONFIG}_E{ENERGY}GeV_combined_{N}files.edm4hep.root"),
temp("sim_output/nhcal_basic_distribution/sim_E{ENERGY}GeV_{DETECTOR_CONFIG}_{N}files.edm4hep.root"),
shell:
"""
hadd -f {output} {input}
"""
hadd -f {output} {input}
"""

rule nhcal_basic_distribution_analysis:
input:
combined="sim_output/nhcal_basic_distribution/sim_{DETECTOR_CONFIG}_E{ENERGY}GeV_combined_{N}files.edm4hep.root",
combined="sim_output/nhcal_basic_distribution/sim_E{ENERGY}GeV_{DETECTOR_CONFIG}_{N}files.edm4hep.root",
script="benchmarks/nhcal_basic_distribution/scripts/basic_distribution_analysis.cxx",
output:
pdf=f"results/nhcal_basic_distribution/analysis_{{DETECTOR_CONFIG}}_E{{ENERGY}}GeV_combined_{{N}}files.pdf",
png=f"results/nhcal_basic_distribution/analysis_{{DETECTOR_CONFIG}}_E{{ENERGY}}GeV_combined_{{N}}files.png",
png="results/nhcal_basic_distribution/analysis_E{ENERGY}GeV_{DETECTOR_CONFIG}_{N}files.png",
root="sim_output/nhcal_basic_distribution/energy_resolution_E{ENERGY}GeV_{DETECTOR_CONFIG}_{N}files.root",
wildcard_constraints:
ENERGY=r"\d+(\.\d+)?",
N=r"\d+",
params:
DETECTOR_PATH = os.environ["DETECTOR_PATH"],
DETECTOR_CONFIG = lambda wildcards: f"{wildcards.DETECTOR_CONFIG}.xml",
shell:
"""
root -l -b -q '{input.script}+("{input.combined}","{output.pdf}","{output.png}")'
"""
root -l -b -q '{input.script}+("{input.combined}","{output.png}","{output.root}","{params.DETECTOR_PATH}/{params.DETECTOR_CONFIG}")'
"""

rule nhcal_basic_distribution_combine_energy_resolution:
input:
expand(
"sim_output/nhcal_basic_distribution/energy_resolution_E{ENERGY}GeV_{{DETECTOR_CONFIG}}_{N}files.root",
ENERGY=["0.5", "0.7", "1.0", "2.0", "5.0"],
N=["10"]
)
output:
temp("sim_output/nhcal_basic_distribution/energy_resolution_combined_{DETECTOR_CONFIG}.root"),
shell:
"""
hadd -f {output} {input}
"""

rule nhcal_basic_distribution_analysis_energy_resolution:
input:
root="sim_output/nhcal_basic_distribution/energy_resolution_combined_{DETECTOR_CONFIG}.root",
script="benchmarks/nhcal_basic_distribution/scripts/basic_distribution_energy_resolution.cxx",
output:
png="results/nhcal_basic_distribution/energy_resolution_analysis_{DETECTOR_CONFIG}.png",
shell:
"""
root -l -b -q '{input.script}("{input.root}","{output.png}")'
"""

Loading