Commit 4320fc93 authored by Nicolas Koehler's avatar Nicolas Koehler Committed by Adam Edward Barton
Browse files

Add muonLayout option to VP1

parent e3d7986b
...@@ -99,7 +99,6 @@ FLAG_MC=0 ...@@ -99,7 +99,6 @@ FLAG_MC=0
FLAG_FATRAS=0 FLAG_FATRAS=0
FLAG_NOGUI=0 FLAG_NOGUI=0
FLAG_CGAL=0 FLAG_CGAL=0
FLAG_NSW=0
FLAG_SLHC=0 FLAG_SLHC=0
FLAG_CUSTOMGEOMETRY=0 FLAG_CUSTOMGEOMETRY=0
MULTINP_SRC="" MULTINP_SRC=""
...@@ -173,8 +172,6 @@ while [ $i -le $# ]; do ...@@ -173,8 +172,6 @@ while [ $i -le $# ]; do
FLAG_NOGUI=1 FLAG_NOGUI=1
elif [ "x${arg}" == "x-cgal" ]; then elif [ "x${arg}" == "x-cgal" ]; then
FLAG_CGAL=1 FLAG_CGAL=1
elif [ "x${arg}" == "x-nsw" ]; then
FLAG_NSW=1
elif [ "x${arg}" == "x-slhc" ]; then elif [ "x${arg}" == "x-slhc" ]; then
echo "SLHC Mode: ON" echo "SLHC Mode: ON"
FLAG_SLHC=1 FLAG_SLHC=1
...@@ -701,7 +698,6 @@ if [ "x$TREETOPFILTER" != "x" ]; then ...@@ -701,7 +698,6 @@ if [ "x$TREETOPFILTER" != "x" ]; then
fi fi
if [ "x$FLAG_FORCE" != "x0" ]; then if [ "x$FLAG_FORCE" != "x0" ]; then
#if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi #if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
#OPTS="${OPTS}vp1NSW=True"
export DUMPGEOOVERWRITE=$FLAG_FORCE export DUMPGEOOVERWRITE=$FLAG_FORCE
echo "User's Overwrite local geometry dump file, if present: ${DUMPGEOOVERWRITE}" echo "User's Overwrite local geometry dump file, if present: ${DUMPGEOOVERWRITE}"
fi fi
...@@ -808,10 +804,6 @@ if [ "x$FLAG_FATRAS" != "x0" ]; then ...@@ -808,10 +804,6 @@ if [ "x$FLAG_FATRAS" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1Fatras=True" OPTS="${OPTS}vp1Fatras=True"
fi fi
if [ "x$FLAG_NSW" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1NSW=True"
fi
if [ "x$FLAG_SLHC" != "x0" ]; then if [ "x$FLAG_SLHC" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1SLHC=True" OPTS="${OPTS}vp1SLHC=True"
......
...@@ -36,7 +36,6 @@ if not 'vp1ToyDetector' in dir(): vp1ToyDetector=False ...@@ -36,7 +36,6 @@ if not 'vp1ToyDetector' in dir(): vp1ToyDetector=False
if not 'vp1GeoModelStats' in dir(): vp1GeoModelStats=False if not 'vp1GeoModelStats' in dir(): vp1GeoModelStats=False
if not 'vp1NoAutoConf' in dir(): vp1NoAutoConf=False if not 'vp1NoAutoConf' in dir(): vp1NoAutoConf=False
if not 'vp1Trig' in dir(): vp1Trig=False if not 'vp1Trig' in dir(): vp1Trig=False
if not 'vp1NSW' in dir(): vp1NSW=False
if not 'vp1CustomGeometry' in dir(): vp1CustomGeometry=False if not 'vp1CustomGeometry' in dir(): vp1CustomGeometry=False
if not 'vp1SLHC' in dir(): vp1SLHC=False if not 'vp1SLHC' in dir(): vp1SLHC=False
...@@ -61,10 +60,6 @@ if ( vp1FatrasTruthKey != "" and not vp1Fatras ): ...@@ -61,10 +60,6 @@ if ( vp1FatrasTruthKey != "" and not vp1Fatras ):
vp1CfgErr("FatrasTruthKey set but Fatras not enabled. Unsetting FatrasTruthKey.") vp1CfgErr("FatrasTruthKey set but Fatras not enabled. Unsetting FatrasTruthKey.")
vp1FatrasTruthKey="" vp1FatrasTruthKey=""
if (vp1NSW and not vp1Muon):
vp1CfgErr("Muon New Small Wheel (NSW) turned on, but no Muon geometry. Disabling NSW.")
vp1NSW=False
#print "*** VP1 NOTE *** setting COIN_GLXGLUE env vars to make screenshots working remotely..." #print "*** VP1 NOTE *** setting COIN_GLXGLUE env vars to make screenshots working remotely..."
#print "*** VP1 NOTE *** COIN_GLXGLUE_NO_GLX13_PBUFFERS=1 - " + "COIN_GLXGLUE_NO_PBUFFERS=1" #print "*** VP1 NOTE *** COIN_GLXGLUE_NO_GLX13_PBUFFERS=1 - " + "COIN_GLXGLUE_NO_PBUFFERS=1"
#os.putenv("COIN_GLXGLUE_NO_GLX13_PBUFFERS","1") #os.putenv("COIN_GLXGLUE_NO_GLX13_PBUFFERS","1")
...@@ -180,7 +175,6 @@ if (vp1ForwardRegion): DetFlags.FwdRegion_setOn() ...@@ -180,7 +175,6 @@ if (vp1ForwardRegion): DetFlags.FwdRegion_setOn()
else: DetFlags.FwdRegion_setOff() else: DetFlags.FwdRegion_setOff()
if (vp1ZDC): DetFlags.ZDC_setOn() if (vp1ZDC): DetFlags.ZDC_setOn()
else: DetFlags.ZDC_setOff() else: DetFlags.ZDC_setOff()
if (vp1NSW): DetFlags.Micromegas_setOn() #FIXME - sTGC?
DetFlags.Print() DetFlags.Print()
if (vp1CustomGeometry): if (vp1CustomGeometry):
print "Configuring Custom geometry." print "Configuring Custom geometry."
...@@ -238,9 +232,6 @@ if vp1ToyDetector: ...@@ -238,9 +232,6 @@ if vp1ToyDetector:
# - Muon is ON # - Muon is ON
# - Major geometry version is greater than 10 # - Major geometry version is greater than 10
if (vp1Muon): if (vp1Muon):
if (vp1NSW):
#DetDescrVersion="ATLAS-GEO-21-00-01"
include('MuonGeoModelTest/NSWGeoSetup.py')
from AtlasGeoModel import Agdd2Geo from AtlasGeoModel import Agdd2Geo
......
...@@ -129,6 +129,7 @@ FLAG_DATA=0 ...@@ -129,6 +129,7 @@ FLAG_DATA=0
FLAG_TEST=0 FLAG_TEST=0
ERRORS="" ERRORS=""
DETDESCRTAG="" DETDESCRTAG=""
MUONLAYOUT=""
NSWAGDDFILE="" NSWAGDDFILE=""
GLOBCONDTAG="" GLOBCONDTAG=""
SKIPEVENTS="" SKIPEVENTS=""
...@@ -166,7 +167,6 @@ FLAG_MC=0 ...@@ -166,7 +167,6 @@ FLAG_MC=0
FLAG_FATRAS=0 FLAG_FATRAS=0
FLAG_NOGUI=0 FLAG_NOGUI=0
FLAG_CGAL=0 FLAG_CGAL=0
FLAG_NSW=0
FLAG_SLHC=0 FLAG_SLHC=0
#FLAG_CUSTOMGEOMETRY=0 # currently not used #FLAG_CUSTOMGEOMETRY=0 # currently not used
FLAG_ADVANCED_ANTIALIASING=0 FLAG_ADVANCED_ANTIALIASING=0
...@@ -307,8 +307,6 @@ while [ $i -le $# ]; do ...@@ -307,8 +307,6 @@ while [ $i -le $# ]; do
FLAG_NOGUI=1 FLAG_NOGUI=1
elif [ "x${arg}" == "x-cgal" ]; then elif [ "x${arg}" == "x-cgal" ]; then
FLAG_CGAL=1 FLAG_CGAL=1
elif [ "x${arg}" == "x-nsw" ]; then
FLAG_NSW=1
elif [ "x${arg}" == "x-slhc" ]; then elif [ "x${arg}" == "x-slhc" ]; then
echo "SLHC" echo "SLHC"
FLAG_SLHC=1 FLAG_SLHC=1
...@@ -331,6 +329,11 @@ while [ $i -le $# ]; do ...@@ -331,6 +329,11 @@ while [ $i -le $# ]; do
if [ "x$DETDESCRTAG_2" == "x" ]; then if [ "x$DETDESCRTAG_2" == "x" ]; then
ERRORS="$ERRORS\nNeed argument to -detdescr. Example: -detdescr=ATLAS-GEO-20-00-01" ERRORS="$ERRORS\nNeed argument to -detdescr. Example: -detdescr=ATLAS-GEO-20-00-01"
fi fi
elif [ "x${arg:0:12}" == "x-muonLayout=" ]; then
MUONLAYOUT=${arg:12:$((${#arg}-12))}
if [ "x$MUONLAYOUT" == "x" ]; then
ERRORS="$ERRORS\nNeed argument to -muonLayout. Example: -muonLayout=MuonSpectrometer-R.09.00.AsymNSW"
fi
elif [ "x${arg:0:9}" == "x-nswagdd=" ]; then elif [ "x${arg:0:9}" == "x-nswagdd=" ]; then
NSWAGDDFILE=${arg:9:$((${#arg}-9))} NSWAGDDFILE=${arg:9:$((${#arg}-9))}
if [ "x$NSWAGDDFILE" == "x" ]; then if [ "x$NSWAGDDFILE" == "x" ]; then
...@@ -920,6 +923,10 @@ if [ "x$DETDESCRTAG" != "x" ]; then ...@@ -920,6 +923,10 @@ if [ "x$DETDESCRTAG" != "x" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}DetDescrVersion=\"$DETDESCRTAG\"" OPTS="${OPTS}DetDescrVersion=\"$DETDESCRTAG\""
fi fi
if [ "x$MUONLAYOUT" != "x" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1MuonLayout=\"$MUONLAYOUT\""
fi
if [ "x$NSWAGDDFILE" != "x" ]; then if [ "x$NSWAGDDFILE" != "x" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1NSWAGDDFiles=[\"${NSWAGDDFILE}\"]" OPTS="${OPTS}vp1NSWAGDDFiles=[\"${NSWAGDDFILE}\"]"
...@@ -1040,10 +1047,6 @@ if [ "x$FLAG_FATRAS" != "x0" ]; then ...@@ -1040,10 +1047,6 @@ if [ "x$FLAG_FATRAS" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1Fatras=True" OPTS="${OPTS}vp1Fatras=True"
fi fi
if [ "x$FLAG_NSW" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1NSW=True"
fi
if [ "x$FLAG_SLHC" != "x0" ]; then if [ "x$FLAG_SLHC" != "x0" ]; then
if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi
OPTS="${OPTS}vp1SLHC=True" OPTS="${OPTS}vp1SLHC=True"
......
...@@ -35,8 +35,8 @@ if not 'vp1SpacePoints' in dir(): vp1SpacePoints=False ...@@ -35,8 +35,8 @@ if not 'vp1SpacePoints' in dir(): vp1SpacePoints=False
if not 'vp1Cavern' in dir(): vp1Cavern=False if not 'vp1Cavern' in dir(): vp1Cavern=False
if not 'vp1NoAutoConf' in dir(): vp1NoAutoConf=False if not 'vp1NoAutoConf' in dir(): vp1NoAutoConf=False
if not 'vp1Trig' in dir(): vp1Trig=False if not 'vp1Trig' in dir(): vp1Trig=False
if not 'vp1NSW' in dir(): vp1NSW=False
if not 'vp1NSWAGDDFiles' in dir(): vp1NSWAGDDFiles=[] if not 'vp1NSWAGDDFiles' in dir(): vp1NSWAGDDFiles=[]
if not 'vp1MuonLayout' in dir(): vp1MuonLayout=""
def vp1CfgErr(s): print "VP1 CONFIGURATION ERROR: %s" % s def vp1CfgErr(s): print "VP1 CONFIGURATION ERROR: %s" % s
...@@ -59,13 +59,6 @@ if ( vp1FatrasTruthKey != "" and not vp1Fatras ): ...@@ -59,13 +59,6 @@ if ( vp1FatrasTruthKey != "" and not vp1Fatras ):
vp1CfgErr("FatrasTruthKey set but Fatras not enabled. Unsetting FatrasTruthKey.") vp1CfgErr("FatrasTruthKey set but Fatras not enabled. Unsetting FatrasTruthKey.")
vp1FatrasTruthKey="" vp1FatrasTruthKey=""
if (vp1NSW and not vp1Muon):
vp1CfgErr("Muon New Small Wheel (NSW) turned on, but no Muon geometry. Disabling NSW.")
vp1NSW=False
print "*** VP1 NOTE *** setting COIN_GLXGLUE env vars to make screenshots working remotely..." print "*** VP1 NOTE *** setting COIN_GLXGLUE env vars to make screenshots working remotely..."
print "*** VP1 NOTE *** COIN_GLXGLUE_NO_GLX13_PBUFFERS=1 - " + "COIN_GLXGLUE_NO_PBUFFERS=1" print "*** VP1 NOTE *** COIN_GLXGLUE_NO_GLX13_PBUFFERS=1 - " + "COIN_GLXGLUE_NO_PBUFFERS=1"
os.putenv("COIN_GLXGLUE_NO_GLX13_PBUFFERS","1") os.putenv("COIN_GLXGLUE_NO_GLX13_PBUFFERS","1")
...@@ -91,9 +84,6 @@ if (vp1InputFiles == []): ...@@ -91,9 +84,6 @@ if (vp1InputFiles == []):
# Set geometry version # Set geometry version
if (not "DetDescrVersion" in dir()): if (not "DetDescrVersion" in dir()):
DetDescrVersion = "ATLAS-R2-2016-01-00-01" # default Run 2 geometry DetDescrVersion = "ATLAS-R2-2016-01-00-01" # default Run 2 geometry
if (vp1NSW):
print("You set the '-nsw' flag, so the Geometry Tag 'ATLAS-R3S-2021-01-00-00' will be used...")
DetDescrVersion="ATLAS-R3S-2021-01-00-00"
globalflags.DetDescrVersion = DetDescrVersion globalflags.DetDescrVersion = DetDescrVersion
...@@ -249,7 +239,12 @@ if (vp1ID): DetFlags.ID_setOn() ...@@ -249,7 +239,12 @@ if (vp1ID): DetFlags.ID_setOn()
else: DetFlags.ID_setOff() else: DetFlags.ID_setOff()
if (vp1Calo): DetFlags.Calo_setOn() if (vp1Calo): DetFlags.Calo_setOn()
else: DetFlags.Calo_setOff() else: DetFlags.Calo_setOff()
if (vp1Muon): DetFlags.Muon_setOn() if (vp1Muon):
DetFlags.Muon_setOn()
from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
if not MuonGeometryFlags.hasCSC(): DetFlags.CSC_setOff()
if not MuonGeometryFlags.hasMM(): DetFlags.Micromegas_setOff()
if not MuonGeometryFlags.hasSTGC(): DetFlags.sTGC_setOff()
else: DetFlags.Muon_setOff() else: DetFlags.Muon_setOff()
if (vp1LUCID): DetFlags.Lucid_setOn() if (vp1LUCID): DetFlags.Lucid_setOn()
else: DetFlags.Lucid_setOff() else: DetFlags.Lucid_setOff()
...@@ -259,11 +254,6 @@ if (vp1ForwardRegion): DetFlags.FwdRegion_setOn() ...@@ -259,11 +254,6 @@ if (vp1ForwardRegion): DetFlags.FwdRegion_setOn()
else: DetFlags.FwdRegion_setOff() else: DetFlags.FwdRegion_setOff()
if (vp1ZDC): DetFlags.ZDC_setOn() if (vp1ZDC): DetFlags.ZDC_setOn()
else: DetFlags.ZDC_setOff() else: DetFlags.ZDC_setOff()
if (vp1NSW):
DetFlags.Micromegas_setOn()
DetFlags.sTGC_setOn()
DetFlags.CSC_setOff()
DetFlags.Print() DetFlags.Print()
...@@ -283,6 +273,11 @@ if vp1Muon and len(vp1NSWAGDDFiles)>0: ...@@ -283,6 +273,11 @@ if vp1Muon and len(vp1NSWAGDDFiles)>0:
from MuonAGDD.MuonAGDDConf import NSWAGDDTool from MuonAGDD.MuonAGDDConf import NSWAGDDTool
NSWAGDDTool = CfgMgr.NSWAGDDTool("NewSmallWheel", DefaultDetector="Muon", ReadAGDD=False, XMLFiles=vp1NSWAGDDFiles, Volumes=["NewSmallWheel"]) NSWAGDDTool = CfgMgr.NSWAGDDTool("NewSmallWheel", DefaultDetector="Muon", ReadAGDD=False, XMLFiles=vp1NSWAGDDFiles, Volumes=["NewSmallWheel"])
AGDD2Geo.Builders += [ NSWAGDDTool ] AGDD2Geo.Builders += [ NSWAGDDTool ]
if vp1Muon and vp1MuonLayout!="":
print "*** VP1 NOTE *** You specified custom vp1MuonLayout, using %s as muon geometry"%vp1MuonLayout
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
GeoModelSvc = GeoModelSvc()
GeoModelSvc.MuonVersionOverride=vp1MuonLayout
from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.AppMgr import ServiceMgr as svcMgr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment