Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
cepc
CEPCSW
Commits
8709797d
Commit
8709797d
authored
2 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
add the script.
parent
93b221c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/options/dump_simhit.py
+62
-0
62 additions, 0 deletions
Examples/options/dump_simhit.py
with
62 additions
and
0 deletions
Examples/options/dump_simhit.py
0 → 100644
+
62
−
0
View file @
8709797d
#!/usr/bin/env python
from
Gaudi.Configuration
import
*
##############################################################################
# Geometry Svc
##############################################################################
# geometry_option = "CepC_v4-onlyTracker.xml"
# geometry_option = "CepC_v4-onlyVXD.xml"
geometry_option
=
"
CepC_v4.xml
"
if
not
os
.
getenv
(
"
DETCEPCV4ROOT
"
):
print
(
"
Can
'
t find the geometry. Please setup envvar DETCEPCV4ROOT.
"
)
sys
.
exit
(
-
1
)
geometry_path
=
os
.
path
.
join
(
os
.
getenv
(
"
DETCEPCV4ROOT
"
),
"
compact
"
,
geometry_option
)
if
not
os
.
path
.
exists
(
geometry_path
):
print
(
"
Can
'
t find the compact geometry file: %s
"
%
geometry_path
)
sys
.
exit
(
-
1
)
from
Configurables
import
GeomSvc
geosvc
=
GeomSvc
(
"
GeomSvc
"
)
geosvc
.
compact
=
geometry_path
##############################################################################
# Event Data Svc
##############################################################################
from
Configurables
import
k4DataSvc
dsvc
=
k4DataSvc
(
"
EventDataSvc
"
,
input
=
"
test-detsim10.root
"
)
##############################################################################
# NTuple Svc
##############################################################################
from
Configurables
import
NTupleSvc
ntsvc
=
NTupleSvc
(
"
NTupleSvc
"
)
ntsvc
.
Output
=
[
"
MyTuples DATAFILE=
'
result.root
'
OPT=
'
NEW
'
TYP=
'
ROOT
'"
]
##############################################################################
# DumpAlg
##############################################################################
from
Configurables
import
DumpSimHitAlg
alg
=
DumpSimHitAlg
(
"
DumpSimHitAlg
"
)
from
Configurables
import
PodioInput
podioinput
=
PodioInput
(
"
PodioReader
"
,
collections
=
[
"
MCParticle
"
,
"
VXDCollection
"
])
# ApplicationMgr
from
Configurables
import
ApplicationMgr
ApplicationMgr
(
TopAlg
=
[
podioinput
,
alg
],
EvtSel
=
'
NONE
'
,
EvtMax
=
-
1
,
ExtSvc
=
[
dsvc
,
ntsvc
],
HistogramPersistency
=
"
ROOT
"
,
# OutputLevel=DEBUG
)
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