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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
reconstruction_benchmarks
Merge requests
!115
Add ML benchmark for imaging calorimetry
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Add ML benchmark for imaging calorimetry
add_ml_benchmark
into
master
Overview
0
Commits
9
Pipelines
0
Changes
6
Merged
Add ML benchmark for imaging calorimetry
Chao Peng
requested to merge
add_ml_benchmark
into
master
Jun 21, 2021
Overview
0
Commits
9
Pipelines
0
Changes
6
0
0
Merge request reports
Compare
master
version 8
be182854
Jun 21, 2021
version 7
6941ac88
Jun 21, 2021
version 6
324ee90e
Jun 21, 2021
version 5
2951bc76
Jun 21, 2021
version 4
bddf3c75
Jun 21, 2021
version 3
605d6fd6
Jun 21, 2021
version 2
fa75a63c
Jun 21, 2021
version 1
5b6afd02
Jun 21, 2021
master (base)
and
latest version
latest version
3eb6306b
9 commits,
Jun 21, 2021
version 8
be182854
8 commits,
Jun 21, 2021
version 7
6941ac88
7 commits,
Jun 21, 2021
version 6
324ee90e
6 commits,
Jun 21, 2021
version 5
2951bc76
5 commits,
Jun 21, 2021
version 4
bddf3c75
4 commits,
Jun 21, 2021
version 3
605d6fd6
3 commits,
Jun 21, 2021
version 2
fa75a63c
2 commits,
Jun 21, 2021
version 1
5b6afd02
1 commit,
Jun 21, 2021
6 files
+
450
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
benchmarks/imaging_shower_ML/options/imaging_ml_data.py
0 → 100644
+
76
−
0
View file @ 3eb6306b
Edit in single-file editor
Open in Web IDE
import
os
import
ROOT
from
Gaudi.Configuration
import
*
from
GaudiKernel
import
SystemOfUnits
as
units
from
GaudiKernel.DataObjectHandleBase
import
DataObjectHandleBase
from
Configurables
import
ApplicationMgr
,
EICDataSvc
,
PodioOutput
,
GeoSvc
from
Configurables
import
PodioInput
from
Configurables
import
Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_
as
MCCopier
from
Configurables
import
Jug__Digi__CalorimeterHitDigi
as
CalorimeterHitDigi
from
Configurables
import
Jug__Reco__ImagingPixelReco
as
ImagingPixelReco
from
Configurables
import
Jug__Reco__ImagingPixelMerger
as
ImagingPixelMerger
# input arguments through environment variables
kwargs
=
dict
()
kwargs
[
'
input
'
]
=
os
.
environ
.
get
(
'
JUGGLER_SIM_FILE
'
,
''
)
kwargs
[
'
output
'
]
=
os
.
environ
.
get
(
'
JUGGLER_REC_FILE
'
,
''
)
kwargs
[
'
compact
'
]
=
os
.
environ
.
get
(
'
JUGGLER_COMPACT_PATH
'
,
''
)
kwargs
[
'
nev
'
]
=
int
(
os
.
environ
.
get
(
'
JUGGLER_N_EVENTS
'
,
-
1
))
kwargs
[
'
nlayers
'
]
=
int
(
os
.
environ
.
get
(
'
IMCAL_ML_N_LAYERS
'
,
20
))
kwargs
[
'
nhits
'
]
=
int
(
os
.
environ
.
get
(
'
IMCAL_ML_N_HITS
'
,
20
))
if
kwargs
[
'
nev
'
]
<
1
:
f
=
ROOT
.
TFile
(
kwargs
[
'
input
'
])
kwargs
[
'
nev
'
]
=
f
.
events
.
GetEntries
()
print
(
kwargs
)
# get sampling fraction from system environment variable, 1.0 by default
sf
=
float
(
os
.
environ
.
get
(
'
JUGGLER_SAMP_FRAC
'
,
'
1.0
'
))
geo_service
=
GeoSvc
(
'
GeoSvc
'
,
detectors
=
[
f
.
strip
()
for
f
in
kwargs
[
'
compact
'
].
split
(
'
,
'
)])
podev
=
EICDataSvc
(
'
EventDataSvc
'
,
inputs
=
[
f
.
strip
()
for
f
in
kwargs
[
'
input
'
].
split
(
'
,
'
)])
podin
=
PodioInput
(
'
PodioReader
'
,
collections
=
[
'
mcparticles
'
,
'
EcalBarrelHits
'
])
podout
=
PodioOutput
(
'
out
'
,
filename
=
kwargs
[
'
output
'
])
copier
=
MCCopier
(
'
MCCopier
'
,
OutputLevel
=
DEBUG
,
inputCollection
=
'
mcparticles
'
,
outputCollection
=
'
mcparticles2
'
)
imcaldigi
=
CalorimeterHitDigi
(
'
imcal_digi
'
,
inputHitCollection
=
'
EcalBarrelHits
'
,
outputHitCollection
=
'
EcalBarrelHitsDigi
'
,
energyResolutions
=
[
0.
,
0.02
,
0.
],
dynamicRangeADC
=
3
*
units
.
MeV
,
pedestalSigma
=
40
)
imcalreco
=
ImagingPixelReco
(
'
imcal_reco
'
,
inputHitCollection
=
'
EcalBarrelHitsDigi
'
,
outputHitCollection
=
'
EcalBarrelHitsReco
'
,
dynamicRangeADC
=
3.
*
units
.
MeV
,
pedestalSigma
=
40
,
thresholdFactor
=
3.5
,
readoutClass
=
'
EcalBarrelHits
'
,
layerField
=
'
layer
'
,
sectorField
=
'
module
'
)
imcaldata
=
ImagingPixelMerger
(
'
imcal_merger
'
,
# OutputLevel=DEBUG,
inputHitCollection
=
'
EcalBarrelHitsReco
'
,
outputHitCollection
=
'
EcalBarrelHitsML
'
,
etaSize
=
0.001
,
phiSize
=
0.001
,
numberOfHits
=
kwargs
[
'
nhits
'
],
numberOfLayers
=
kwargs
[
'
nlayers
'
])
podout
.
outputCommands
=
[
'
keep *
'
]
ApplicationMgr
(
TopAlg
=
[
podin
,
copier
,
imcaldigi
,
imcalreco
,
imcaldata
,
podout
],
EvtSel
=
'
NONE
'
,
EvtMax
=
kwargs
[
'
nev
'
],
ExtSvc
=
[
podev
],
OutputLevel
=
DEBUG
)
Loading