Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
detector_benchmarks
Commits
7fc65523
Commit
7fc65523
authored
6 months ago
by
Dmitry Kalinkin
Browse files
Options
Downloads
Patches
Plain Diff
benchmarks/femc_*: scale event count with momentum
parent
56ad9ae3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmarks/femc_electron/Snakefile
+14
-6
14 additions, 6 deletions
benchmarks/femc_electron/Snakefile
benchmarks/femc_photon/Snakefile
+14
-6
14 additions, 6 deletions
benchmarks/femc_photon/Snakefile
benchmarks/femc_pi0/Snakefile
+14
-6
14 additions, 6 deletions
benchmarks/femc_pi0/Snakefile
with
42 additions
and
18 deletions
benchmarks/femc_electron/Snakefile
+
14
−
6
View file @
7fc65523
def get_n_events(wildcards):
energy = float(wildcards.P)
n_events = 1000
n_events = int(n_events // ((energy / 20) ** 0.5))
return n_events
rule femc_electron_generate:
rule femc_electron_generate:
input:
input:
script="benchmarks/femc_electron/analysis/gen_particles.cxx",
script="benchmarks/femc_electron/analysis/gen_particles.cxx",
params:
params:
NEVENTS
_GEN=1000
,
N
_
EVENTS
=get_n_events
,
th_max=28,
th_max=28,
th_min=2.0
th_min=2.0
output:
output:
...
@@ -10,23 +17,23 @@ rule femc_electron_generate:
...
@@ -10,23 +17,23 @@ rule femc_electron_generate:
shell:
shell:
"""
"""
mkdir -p sim_output/femc_electron
mkdir -p sim_output/femc_electron
root -l -b -q '{input.script}({params.NEVENTS
_GEN
},"{output.GEN_FILE}", "e-", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
root -l -b -q '{input.script}({params.N
_
EVENTS},"{output.GEN_FILE}", "e-", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
"""
"""
rule femc_electron_simulate:
rule femc_electron_simulate:
input:
input:
GEN_FILE="sim_output/femc_electron/e-_{P}GeV.hepmc"
GEN_FILE="sim_output/femc_electron/e-_{P}GeV.hepmc"
params:
params:
N_EVENTS=get_n_events,
PHYSICS_LIST="FTFP_BERT"
PHYSICS_LIST="FTFP_BERT"
output:
output:
SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
shell:
shell:
"""
"""
NEVENTS_SIM=1000
# Running simulation
# Running simulation
npsim \
npsim \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--numberOfEvents
$N
EVENTS
_SIM
\
--numberOfEvents
{params.N_
EVENTS
}
\
--physicsList {params.PHYSICS_LIST} \
--physicsList {params.PHYSICS_LIST} \
--inputFiles {input.GEN_FILE} \
--inputFiles {input.GEN_FILE} \
--outputFile {output.SIM_FILE}
--outputFile {output.SIM_FILE}
...
@@ -37,10 +44,11 @@ rule femc_electron_recon:
...
@@ -37,10 +44,11 @@ rule femc_electron_recon:
SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
output:
output:
REC_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root"
REC_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root"
params:
N_EVENTS=get_n_events,
shell:
shell:
"""
"""
NEVENTS_REC=1000
eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents={params.N_EVENTS}
eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents=$NEVENTS_REC
"""
"""
rule femc_electron_analysis:
rule femc_electron_analysis:
...
...
This diff is collapsed.
Click to expand it.
benchmarks/femc_photon/Snakefile
+
14
−
6
View file @
7fc65523
def get_n_events(wildcards):
energy = float(wildcards.P)
n_events = 1000
n_events = int(n_events // ((energy / 20) ** 0.5))
return n_events
rule femc_photon_generate:
rule femc_photon_generate:
input:
input:
script="benchmarks/femc_photon/analysis/gen_particles.cxx",
script="benchmarks/femc_photon/analysis/gen_particles.cxx",
params:
params:
NEVENTS
_GEN=1000
,
N
_
EVENTS
=get_n_events
,
th_max=28,
th_max=28,
th_min=2.0
th_min=2.0
output:
output:
...
@@ -10,23 +17,23 @@ rule femc_photon_generate:
...
@@ -10,23 +17,23 @@ rule femc_photon_generate:
shell:
shell:
"""
"""
mkdir -p sim_output/femc_photon
mkdir -p sim_output/femc_photon
root -l -b -q '{input.script}({params.NEVENTS
_GEN
},"{output.GEN_FILE}", "gamma", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
root -l -b -q '{input.script}({params.N
_
EVENTS},"{output.GEN_FILE}", "gamma", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
"""
"""
rule femc_photon_simulate:
rule femc_photon_simulate:
input:
input:
GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc"
GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc"
params:
params:
N_EVENTS=get_n_events,
PHYSICS_LIST="FTFP_BERT"
PHYSICS_LIST="FTFP_BERT"
output:
output:
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
shell:
shell:
"""
"""
NEVENTS_SIM=1000
# Running simulation
# Running simulation
npsim \
npsim \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--numberOfEvents
$N
EVENTS
_SIM
\
--numberOfEvents
{params.N_
EVENTS
}
\
--physicsList {params.PHYSICS_LIST} \
--physicsList {params.PHYSICS_LIST} \
--inputFiles {input.GEN_FILE} \
--inputFiles {input.GEN_FILE} \
--outputFile {output.SIM_FILE}
--outputFile {output.SIM_FILE}
...
@@ -37,10 +44,11 @@ rule femc_photon_recon:
...
@@ -37,10 +44,11 @@ rule femc_photon_recon:
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
output:
output:
REC_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root"
REC_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root"
params:
N_EVENTS=get_n_events,
shell:
shell:
"""
"""
NEVENTS_REC=1000
eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents={params.N_EVENTS}
eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents=$NEVENTS_REC
"""
"""
rule femc_photon_analysis:
rule femc_photon_analysis:
...
...
This diff is collapsed.
Click to expand it.
benchmarks/femc_pi0/Snakefile
+
14
−
6
View file @
7fc65523
def get_n_events(wildcards):
energy = float(wildcards.P)
n_events = 1000
n_events = int(n_events // ((energy / 20) ** 0.5))
return n_events
rule femc_pi0_generate:
rule femc_pi0_generate:
input:
input:
script="benchmarks/femc_pi0/analysis/gen_particles.cxx",
script="benchmarks/femc_pi0/analysis/gen_particles.cxx",
params:
params:
NEVENTS
_GEN=1000
,
N
_
EVENTS
=get_n_events
,
th_max=28,
th_max=28,
th_min=2.0
th_min=2.0
output:
output:
...
@@ -10,23 +17,23 @@ rule femc_pi0_generate:
...
@@ -10,23 +17,23 @@ rule femc_pi0_generate:
shell:
shell:
"""
"""
mkdir -p sim_output/femc_pi0
mkdir -p sim_output/femc_pi0
root -l -b -q '{input.script}({params.NEVENTS
_GEN
},"{output.GEN_FILE}", "pi0", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
root -l -b -q '{input.script}({params.N
_
EVENTS},"{output.GEN_FILE}", "pi0", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
"""
"""
rule femc_pi0_simulate:
rule femc_pi0_simulate:
input:
input:
GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc"
GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc"
params:
params:
N_EVENTS=get_n_events,
PHYSICS_LIST="FTFP_BERT"
PHYSICS_LIST="FTFP_BERT"
output:
output:
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
shell:
shell:
"""
"""
NEVENTS_SIM=1000
# Running simulation
# Running simulation
npsim \
npsim \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--numberOfEvents
$N
EVENTS
_SIM
\
--numberOfEvents
{params.N_
EVENTS
}
\
--physicsList {params.PHYSICS_LIST} \
--physicsList {params.PHYSICS_LIST} \
--inputFiles {input.GEN_FILE} \
--inputFiles {input.GEN_FILE} \
--outputFile {output.SIM_FILE}
--outputFile {output.SIM_FILE}
...
@@ -37,10 +44,11 @@ rule femc_pi0_recon:
...
@@ -37,10 +44,11 @@ rule femc_pi0_recon:
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
output:
output:
REC_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root"
REC_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root"
params:
N_EVENTS=get_n_events,
shell:
shell:
"""
"""
NEVENTS_REC=1000
eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents={params.N_EVENTS}
eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents=$NEVENTS_REC
"""
"""
rule femc_pi0_analysis:
rule femc_pi0_analysis:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment