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
!96
My branch
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
My branch
my-branch
into
master
Overview
1
Commits
4
Pipelines
0
Changes
4
Closed
Miguel Arratia
requested to merge
my-branch
into
master
3 years ago
Overview
1
Commits
4
Pipelines
0
Changes
4
Expand
adding hcal version of hcal_barrels.sh (with pions)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
6a634ab1
4 commits,
3 years ago
4 files
+
284
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
benchmarks/clustering/options/hcal_clustering.py
0 → 100644
+
136
−
0
Options
from
Gaudi.Configuration
import
*
import
os
from
GaudiKernel.DataObjectHandleBase
import
DataObjectHandleBase
from
Configurables
import
ApplicationMgr
,
EICDataSvc
,
PodioOutput
,
GeoSvc
from
GaudiKernel
import
SystemOfUnits
as
units
detector_name
=
"
topside
"
if
"
JUGGLER_DETECTOR
"
in
os
.
environ
:
detector_name
=
str
(
os
.
environ
[
"
JUGGLER_DETECTOR
"
])
if
"
JUGGLER_DETECTOR_PATH
"
in
os
.
environ
:
detector_name
=
str
(
os
.
environ
[
"
JUGGLER_DETECTOR_PATH
"
])
+
"
/
"
+
detector_name
# get sampling fraction from system environment variable, 1.0 by default
sf
=
1.0
if
"
CB_EMCAL_SAMP_FRAC
"
in
os
.
environ
:
sf
=
str
(
os
.
environ
[
"
CB_EMCAL_SAMP_FRAC
"
])
# todo add checks
input_sim_file
=
str
(
os
.
environ
[
"
JUGGLER_SIM_FILE
"
])
output_rec_file
=
str
(
os
.
environ
[
"
JUGGLER_REC_FILE
"
])
n_events
=
str
(
os
.
environ
[
"
JUGGLER_N_EVENTS
"
])
geo_service
=
GeoSvc
(
"
GeoSvc
"
,
detectors
=
[
"
{}.xml
"
.
format
(
detector_name
)])
podioevent
=
EICDataSvc
(
"
EventDataSvc
"
,
inputs
=
[
input_sim_file
])
from
Configurables
import
PodioInput
from
Configurables
import
Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_
as
MCCopier
from
Configurables
import
Jug__Base__InputCopier_dd4pod__CalorimeterHitCollection_dd4pod__CalorimeterHitCollection_
as
CalCopier
# from Configurables import Jug__Digi__HadronicCalDigi as HadCalorimeterDigi
from
Configurables
import
Jug__Digi__CalorimeterHitDigi
as
HadCalorimeterDigi
from
Configurables
import
Jug__Digi__EMCalorimeterDigi
as
EMCalorimeterDigi
from
Configurables
import
Jug__Digi__CrystalEndcapsDigi
as
CrystalEndcapsDigi
from
Configurables
import
Jug__Reco__CrystalEndcapsReco
as
CrystalEndcapsReco
from
Configurables
import
Jug__Reco__EMCalReconstruction
as
EMCalReconstruction
# from Configurables import Jug__Reco__HCalReconstruction as HCalReconstruction
from
Configurables
import
Jug__Reco__EcalTungstenSamplingReco
as
HCalReconstruction
# from Configurables import Jug__Reco__SimpleClustering as SimpleClustering
from
Configurables
import
Jug__Reco__TopologicalCellCluster
as
TopoCluster
from
Configurables
import
Jug__Reco__CalorimeterIslandCluster
as
IslandCluster
from
Configurables
import
Jug__Reco__ClusterRecoCoG
as
RecoCoG
podioinput
=
PodioInput
(
"
PodioReader
"
,
collections
=
[
"
mcparticles
"
,
"
HcalBarrelHits
"
],
OutputLevel
=
DEBUG
)
## copiers to get around input --> output copy bug. Note the "2" appended to the output collection.
copier
=
MCCopier
(
"
MCCopier
"
,
inputCollection
=
"
mcparticles
"
,
outputCollection
=
"
mcparticles2
"
)
##raw hits
calcopier
=
CalCopier
(
"
CalCopier
"
,
inputCollection
=
"
HcalBarrelHits
"
,
outputCollection
=
"
HcalBarrelHits2
"
)
#digitized hits
hcaldigi
=
HadCalorimeterDigi
(
"
hcal_barrel_digi
"
,
inputHitCollection
=
"
HcalBarrelHits
"
,
outputHitCollection
=
"
RawHcalBarrelHits
"
,
inputEnergyUnit
=
units
.
GeV
,
inputTimeUnit
=
units
.
ns
,
energyResolutions
=
[
0.07
,
0.
,
0.
],
dynamicRangeADC
=
2.
*
units
.
GeV
,
capacityADC
=
32768
,
pedestalMean
=
400
,
pedestalSigma
=
10
,
OutputLevel
=
DEBUG
)
#reconstructed hits
hcal_reco
=
HCalReconstruction
(
"
hcal_reco
"
,
inputHitCollection
=
"
RawHcalBarrelHits
"
,
outputHitCollection
=
"
RecHcalBarrelHits
"
,
dynamicRangeADC
=
2.
*
units
.
GeV
,
capacityADC
=
32768
,
pedestalMean
=
400
,
pedestalSigma
=
10
,
thresholdFactor
=
5.0
,
OutputLevel
=
DEBUG
)
#clusters
#hcal_barrel_cluster = TopoCluster("hcal_barrel_cluster",
# inputHitCollection="RecHcalBarrelHits",
# outputClusterCollection="HcalBarrelClusters",
# adjLayerDiff=2,
# localRanges=[20.*units.mm, 20.*units.mm], # local x, y for hits at the same layer
# adjLayerRanges=[0.02, 0.02], # eta, phi for different layers, the same sector
# adjSectorDist=5.*units.cm, # different sector
# minClusterCenterEdep=10.*units.MeV,
# readoutClass="HcalBarrelHits", # readout class name to get layer/sector id
# layerField="layer",
# sectorField="module",
# OutputLevel=DEBUG
# )
hcal_barrel_cluster
=
IslandCluster
(
"
hcal_barrel_cluster
"
,
inputHitCollection
=
"
RecHcalBarrelHits
"
,
outputClusterCollection
=
"
HcalBarrelClusters
"
,
minClusterCenterEdep
=
30
*
units
.
MeV
,
groupRange
=
2.0
,
OutputLevel
=
DEBUG
)
# finalizing clustering (center-of-gravity step)
hcal_barrel_clusterreco
=
RecoCoG
(
"
hcal_barrel_clusterreco
"
,
clusterCollection
=
"
HcalBarrelClusters
"
,
logWeightBase
=
6.2
,
samplingFraction
=
sf
,
OutputLevel
=
DEBUG
)
out
=
PodioOutput
(
"
out
"
,
filename
=
output_rec_file
)
out
.
outputCommands
=
[
"
keep *
"
]
ApplicationMgr
(
TopAlg
=
[
podioinput
,
copier
,
calcopier
,
hcaldigi
,
hcal_reco
,
hcal_barrel_cluster
,
hcal_barrel_clusterreco
,
out
],
EvtSel
=
'
NONE
'
,
EvtMax
=
n_events
,
ExtSvc
=
[
podioevent
],
OutputLevel
=
DEBUG
)
Loading