Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_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
reconstruction_benchmarks
Merge requests
!287
Add plot script for e/pi separation performance
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Add plot script for e/pi separation performance
update_imaging_ml_benchmarks
into
master
Overview
0
Commits
6
Pipelines
0
Changes
1
Open
Chao Peng
requested to merge
update_imaging_ml_benchmarks
into
master
2 years ago
Overview
0
Commits
6
Pipelines
0
Changes
1
Expand
update the json output from epcut and ML so rejection power and uncertainties can be directly read from them
add a json output for run_benchmark.py to collect all run information
add a script reading the run info files and plot the e/pi separation power curve
0
0
Merge request reports
Viewing commit
6d3955ea
Prev
Next
Show latest version
1 file
+
68
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6d3955ea
add a script to visualize imaging hits (not finished)
· 6d3955ea
Chao Peng
authored
2 years ago
benchmarks/imaging_shower_ML/scripts/draw_imaging_event3d.py
0 → 100644
+
68
−
0
Options
"""
A script to draw imaging events in 3D
Assumed the input reconstruction file has only single-particle events
Chao Peng (ANL)
2022/12/06
"""
import
ROOT
import
os
import
gc
import
sys
import
json
import
numpy
as
np
import
pandas
as
pd
import
argparse
from
utils
import
flatten_collection
,
cartesian_to_polar
,
imcal_info
pd
.
set_option
(
'
display.max_rows
'
,
500
)
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
(
description
=
'
Visualize the cluster (layer-wise) from analysis
'
)
parser
.
add_argument
(
'
file
'
,
type
=
str
,
help
=
'
path to the input file.
'
)
parser
.
add_argument
(
'
-o
'
,
type
=
str
,
default
=
'
.
'
,
dest
=
'
outdir
'
,
help
=
'
output directory.
'
)
parser
.
add_argument
(
'
-e
'
,
type
=
int
,
default
=
0
,
dest
=
'
event
'
,
help
=
'
event number to draw.
'
)
parser
.
add_argument
(
'
--nhits
'
,
type
=
int
,
default
=
50
,
dest
=
'
nhits
'
,
help
=
'
number of hits per layer.
'
)
parser
.
add_argument
(
'
-b
'
,
'
--branch
'
,
type
=
str
,
dest
=
'
branch
'
,
default
=
'
EcalBarrelImagingHitsReco
'
,
help
=
'
name of data branch (edm4eic::CalorimeterHitCollection).
'
)
args
=
parser
.
parse_args
()
# read data and MCParticles
rdf
=
ROOT
.
RDataFrame
(
"
events
"
,
args
.
file
)
# event range
ntotal
=
rdf
.
Count
().
GetValue
()
iev
=
int
(
np
.
clip
(
args
.
event
,
0
,
ntotal
))
# data
data
=
flatten_collection
(
rdf
,
args
.
branch
,
(
iev
,
iev
+
1
),
cols
=
[
'
layer
'
,
'
energy
'
,
'
position.x
'
,
'
position.y
'
,
'
position.z
'
,
])
print
(
data
)
Loading