Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Fabrizio Salvatore
athena
Commits
c5c6a396
Commit
c5c6a396
authored
6 years ago
by
John Chapman
Browse files
Options
Downloads
Patches
Plain Diff
Initial version of Component Accumulator configuration of ID Geometry and Alignment
parent
c2ad2e7d
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
DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMConfig.py
+76
-0
76 additions, 0 deletions
...escription/GeoModel/AtlasGeoModel/python/InDetGMConfig.py
with
76 additions
and
0 deletions
DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMConfig.py
0 → 100644
+
76
−
0
View file @
c5c6a396
#
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
AthenaConfiguration.AthConfigFlags
import
AthConfigFlags
from
IOVDbSvc.IOVDbSvcConfig
import
addFoldersSplitOnline
def
InDetServiceMaterialCfg
(
flags
):
from
AtlasGeoModel.GeoModelConfig
import
GeoModelCfg
acc
,
geoModelSvc
=
GeoModelCfg
(
flags
)
from
GeometryDBSvc.GeometryDBSvcConf
import
GeometryDBSvc
acc
.
addService
(
GeometryDBSvc
(
"
InDetGeometryDBSvc
"
))
from
InDetServMatGeoModel.InDetServMatGeoModelConf
import
InDetServMatTool
servMatTool
=
InDetServMatTool
()
if
flags
.
GeoModel
.
Run
==
"
RUN4
"
:
from
InDetServMatGeoModel.InDetServMatGeoModelConf
import
InDetServMatBuilderToolSLHC
InDetServMatBuilderToolSLHC
=
InDetServMatBuilderToolSLHC
()
acc
.
addPublicTool
(
InDetServMatBuilderToolSLHC
)
servMatTool
.
ServiceBuilderTool
=
InDetServMatBuilderToolSLHC
geoModelSvc
.
DetectorTools
+=
[
servMatTool
]
acc
.
addService
(
geoModelSvc
)
return
acc
def
InDetGeometryCfg
(
flags
):
acc
=
ComponentAccumulator
()
from
PixelGeoModel.PixelGeoModelConfig
import
PixelGeometryCfg
acc
.
merge
(
PixelGeometryCfg
(
flags
))
from
SCT_GeoModel.SCT_GeoModelConfig
import
SCT_GeometryCfg
acc
.
merge
(
SCT_GeometryCfg
(
flags
))
if
not
flags
.
GeoModel
.
Run
==
"
RUN4
"
:
from
TRT_GeoModel.TRT_GeoModelConfig
import
TRT_GeometryCfg
acc
.
merge
(
TRT_GeometryCfg
(
flags
))
acc
.
merge
(
InDetServiceMaterialCfg
(
flags
))
return
acc
if
__name__
==
"
__main__
"
:
import
os
from
AthenaCommon.Logging
import
log
from
AthenaCommon.Constants
import
DEBUG
from
AthenaCommon.Configurable
import
Configurable
from
AthenaConfiguration.AllConfigFlags
import
ConfigFlags
from
AthenaConfiguration.MainServicesConfig
import
MainServicesSerialCfg
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
# Set up logging and new style config
log
.
setLevel
(
DEBUG
)
Configurable
.
configurableRun3Behavior
=
True
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
# Provide MC input
ConfigFlags
.
Input
.
Files
=
defaultTestFiles
.
HITS
ConfigFlags
.
IOVDb
.
GlobalTag
=
"
OFLCOND-MC16-SDR-16
"
ConfigFlags
.
Detector
.
SimulatePixel
=
True
ConfigFlags
.
Detector
.
SimulateSCT
=
True
ConfigFlags
.
Detector
.
SimulateTRT
=
True
ConfigFlags
.
GeoModel
.
Align
.
Dynamic
=
False
# Provide data input
##from AthenaConfiguration.TestDefaults import defaultTestFiles
##ConfigFlags.Input.Files = defaultTestFiles.AOD
##ConfigFlags.GeoModel.Align.Dynamic = True
#
ConfigFlags
.
lock
()
# Construct ComponentAccumulator
acc
=
MainServicesSerialCfg
()
acc
.
merge
(
PoolReadCfg
(
ConfigFlags
))
acc
.
merge
(
InDetGeometryCfg
(
ConfigFlags
))
# FIXME This sets up the whole ID geometry would be nicer just to set up min required
#acc.getService("StoreGateSvc").Dump=True
acc
.
getService
(
"
ConditionStore
"
).
Dump
=
True
acc
.
printConfig
(
withDetails
=
True
)
f
=
open
(
'
InDetGMCfg2.pkl
'
,
'
w
'
)
acc
.
store
(
f
)
f
.
close
()
ConfigFlags
.
dump
()
# Execute and finish
acc
.
run
(
maxEvents
=
3
)
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