Skip to content
Snippets Groups Projects
Commit 3f866522 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'vp1Dbg' into 'master'

Add muonagdd option to dump-geo

See merge request !31776
parents 0156625a e4bd7d60
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!31776Add muonagdd option to dump-geo
......@@ -103,6 +103,7 @@ FLAG_CGAL=0
FLAG_SLHC=0
MUONLAYOUT=""
NSWAGDDFILE=""
MUONAGDDFILE=""
FLAG_CUSTOMGEOMETRY=0
MULTINP_SRC=""
MULTINP_CPY=""
......@@ -197,6 +198,15 @@ while [ $i -le $# ]; do
ERRORS="$ERRORS\nNeed argument to -nswagdd. Example: -nswagdd=stations.v2.06.xml"
fi
###
# Muon NSW AGDD custom file
elif [ "x${arg:0:10}" == "x-muonagdd" ]; then
ERRORS="$ERRORS\nNeed argument to -muonagdd. Example: -muonagdd=muon_passive_r.08.01.xml"
elif [ "x${arg:0:10}" == "x-muonagdd=" ]; then
MUONAGDDFILE=${arg:10:$((${#arg}-10))}
if [ "x$MUONAGDDFILE" == "x" ]; then
ERRORS="$ERRORS\nNeed argument to -muonagdd. Example: -muonagdd=muon_passive_r.08.01.xml"
fi
###
elif [ "x${arg}" == "x-mc" ]; then
FLAG_MC=1
elif [ "x${arg}" == "x-multinp" ]; then
......@@ -840,6 +850,10 @@ if [ "x$NSWAGDDFILE" != "x" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1NSWAGDDFiles=[\"${NSWAGDDFILE}\"]"
fi
if [ "x$MUONAGDDFILE" != "x" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1MuonAGDDFiles=[\"${MUONAGDDFILE}\"]"
fi
if [ "x$FLAG_NOGUI" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1NoGui=True"
......
......@@ -38,6 +38,7 @@ if not 'vp1NoAutoConf' in dir(): vp1NoAutoConf=False
if not 'vp1Trig' in dir(): vp1Trig=False
if not 'vp1CustomGeometry' in dir(): vp1CustomGeometry=False
if not 'vp1SLHC' in dir(): vp1SLHC=False
if not 'vp1MuonAGDDFiles' in dir(): vp1MuonAGDDFiles=[]
if not 'vp1NSWAGDDFiles' in dir(): vp1NSWAGDDFiles=[]
if not 'vp1MuonLayout' in dir(): vp1MuonLayout=""
......@@ -206,20 +207,8 @@ if (vp1SLHC):
TrkDetFlags.TRT_BuildStrawLayers = False
TrkDetFlags.MaterialSource = 'None'
print("vp1NSWAGDDFiles:", vp1NSWAGDDFiles, "len:", len(vp1NSWAGDDFiles))
if vp1Muon and len(vp1NSWAGDDFiles)>0:
print "*** DumpGeo NOTE *** You specified custom vp1NSWAGDDFiles, creating NSWAGDDTool to read NSWAGDD information from custom file(s) '%s' instead from built-in geometry"%(', '.join(vp1NSWAGDDFiles))
from AthenaCommon.AppMgr import theApp
from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
AGDD2Geo = AGDDtoGeoSvc()
theApp.CreateSvc += ["AGDDtoGeoSvc"]
svcMgr += AGDD2Geo
from AthenaCommon import CfgMgr
from MuonAGDD.MuonAGDDConf import NSWAGDDTool
NSWAGDDTool = CfgMgr.NSWAGDDTool("NewSmallWheel", DefaultDetector="Muon", ReadAGDD=False, XMLFiles=vp1NSWAGDDFiles, Volumes=["NewSmallWheel"])
AGDD2Geo.Builders += [ NSWAGDDTool ]
if vp1Muon and vp1MuonLayout!="":
print "*** DumpGeo NOTE *** You specified custom vp1MuonLayout, using %s as muon geometry"%vp1MuonLayout
print ("*** DumpGeo NOTE *** You specified custom vp1MuonLayout, using %s as muon geometry"%vp1MuonLayout)
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
GeoModelSvc = GeoModelSvc()
GeoModelSvc.MuonVersionOverride=vp1MuonLayout
......@@ -255,6 +244,21 @@ if (vp1Muon):
from AtlasGeoModel import Agdd2Geo
if len(vp1MuonAGDDFiles)>0:
print ("*** DumpGeo NOTE *** You specified custom vp1MuonAGDDFiles, configuring MuonAGDDTool to read MuonAGDD information from custom file(s) '%s' instead from built-in geometry"%(', '.join(vp1MuonAGDDFiles)))
if hasattr(svcMgr,"AGDDtoGeoSvc"):
for b in getattr(svcMgr,"AGDDtoGeoSvc").Builders:
if b.name()=="MuonSpectrometer":
b.ReadAGDD=False
b.XMLFiles=vp1MuonAGDDFiles
if len(vp1NSWAGDDFiles)>0:
print ("*** DumpGeo NOTE *** You specified custom vp1NSWAGDDFiles, configuring NSWAGDDTool to read NSWAGDD information from custom file(s) '%s' instead from built-in geometry"%(', '.join(vp1NSWAGDDFiles)))
if hasattr(svcMgr,"AGDDtoGeoSvc"):
for b in getattr(svcMgr,"AGDDtoGeoSvc").Builders:
if b.name()=="NewSmallWheel":
b.ReadAGDD=False
b.XMLFiles=vp1NSWAGDDFiles
# if(vp1FullToroids or vp1NSW):
# from AtlasGeoModel import Agdd2Geo
# else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment