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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
detector_benchmarks
Commits
6f9586bf
Commit
6f9586bf
authored
Jun 25, 2021
by
Maria Zurek
Browse files
Options
Downloads
Patches
Plain Diff
Read sampling frac from JSON file in pion analysis
parent
a72d44e6
Branches
update_imaging_ml_benchmarks
No related tags found
1 merge request
!52
Resolve "Add reading sampling fraction from electrons benchmarks"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
benchmarks/barrel_ecal/config.yml
+8
-8
8 additions, 8 deletions
benchmarks/barrel_ecal/config.yml
benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx
+6
-1
6 additions, 1 deletion
benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx
with
14 additions
and
9 deletions
benchmarks/barrel_ecal/config.yml
+
8
−
8
View file @
6f9586bf
...
@@ -40,14 +40,6 @@ bench:emcal_barrel_pions:
...
@@ -40,14 +40,6 @@ bench:emcal_barrel_pions:
script
:
script
:
-
root -b -q benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx+
-
root -b -q benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx+
bench:emcal_barrel_pi0
:
extends
:
.det_benchmark
stage
:
benchmarks
needs
:
-
[
"
sim:emcal_barrel_pi0"
]
script
:
-
root -b -q benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx+
bench:emcal_barrel_electrons
:
bench:emcal_barrel_electrons
:
extends
:
.det_benchmark
extends
:
.det_benchmark
stage
:
benchmarks
stage
:
benchmarks
...
@@ -60,6 +52,14 @@ bench:emcal_barrel_electrons:
...
@@ -60,6 +52,14 @@ bench:emcal_barrel_electrons:
-
echo "JSON file(s) from analysis:" ; cat *.json
-
echo "JSON file(s) from analysis:" ; cat *.json
-
if [[ "$RUN_EXTENDED_BENCHMARK" == "true" ]] ; then root -b -q 'benchmarks/barrel_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx+("electron")' ; fi
-
if [[ "$RUN_EXTENDED_BENCHMARK" == "true" ]] ; then root -b -q 'benchmarks/barrel_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx+("electron")' ; fi
bench:emcal_barrel_pi0
:
extends
:
.det_benchmark
stage
:
benchmarks
needs
:
-
[
"
sim:emcal_barrel_pi0"
,
"
bench:emcal_barrel_electrons"
]
script
:
-
root -b -q benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx+
bench:emcal_barrel_photons
:
bench:emcal_barrel_photons
:
extends
:
.det_benchmark
extends
:
.det_benchmark
stage
:
benchmarks
stage
:
benchmarks
...
...
This diff is collapsed.
Click to expand it.
benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx
+
6
−
1
View file @
6f9586bf
...
@@ -20,9 +20,11 @@
...
@@ -20,9 +20,11 @@
#include
"TF1.h"
#include
"TF1.h"
#include
"TH1D.h"
#include
"TH1D.h"
#include
"TFitResult.h"
#include
"TFitResult.h"
#include
<nlohmann/json.hpp>
using
ROOT
::
RDataFrame
;
using
ROOT
::
RDataFrame
;
using
namespace
ROOT
::
VecOps
;
using
namespace
ROOT
::
VecOps
;
using
json
=
nlohmann
::
json
;
void
emcal_barrel_pi0_analysis
(
const
char
*
input_fname
=
"sim_output/sim_emcal_barrel_pi0.root"
)
void
emcal_barrel_pi0_analysis
(
const
char
*
input_fname
=
"sim_output/sim_emcal_barrel_pi0.root"
)
{
{
...
@@ -56,12 +58,15 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
...
@@ -56,12 +58,15 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
{
"quantity"
,
"resolution (in %)"
},
{
"quantity"
,
"resolution (in %)"
},
{
"target"
,
std
::
to_string
(
resolutionTarget
)}}};
{
"target"
,
std
::
to_string
(
resolutionTarget
)}}};
json
j
;
std
::
ifstream
prev_steps_ifstream
(
"emcal_barrel_particles_analyses.json"
);
prev_steps_ifstream
>>
j
;
ROOT
::
EnableImplicitMT
();
ROOT
::
EnableImplicitMT
();
ROOT
::
RDataFrame
d0
(
"events"
,
input_fname
);
ROOT
::
RDataFrame
d0
(
"events"
,
input_fname
);
// Sampling Fraction
// Sampling Fraction
double
samp_frac
=
0.0136
;
double
samp_frac
=
j
[
"electron"
][
"sampling_fraction"
]
;
// Thrown Energy [GeV]
// Thrown Energy [GeV]
auto
Ethr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
auto
Ethr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
...
...
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