Skip to content
Snippets Groups Projects
Commit 5d6b8247 authored by Dave Casper's avatar Dave Casper
Browse files

Commission realistic FASER alignment DB

parent 80d14ecb
No related branches found
No related tags found
13 merge requests!69Update release version number,!68Database changes for staggered tracker planes,!67Fix configuration issue caused by ATLAS change,!66Repair problems caused by changes to ATLAS SCT conditions code,!64Revert the Flake workaround,!63Conform to ATLAS MC changes; workaround Flake issue,!62Conform to ATLAS changes, move databases to CVMFS,!59Protect against spacepoints beyond the ends of strips,!58Fix spacepoint and geometry bugs,!57Refactor and integrate clustering and spacepoint work,!56Correct Athena compatibility problems,!54Example job to read Tracker RDO data and associate with Truth,!42Realistic alignment database for Tracker
Showing
with 135 additions and 118 deletions
......@@ -67,7 +67,7 @@ class ConditionsTag(JobProperty):
"""
statusOn=True
allowedTypes=['str']
StoredValue='OFLCOND-RUN12-SDR-31'
StoredValue='OFLCOND-XXXX-XXX-XX'
#
class DatabaseInstance(JobProperty):
......
......@@ -35,3 +35,4 @@ atlas_add_test( GeoModelCheck
#atlas_install_headers( GeoModelTest )
#atlas_install_joboptions( share/*.py )
atlas_install_python_modules( python/*.py )
atlas_install_scripts( scripts/*.sh )
......@@ -3,8 +3,6 @@ import sys
def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
kwargs.setdefault("AlignDbTool", "TrackerAlignDBTool/DefaultAlignDBTool")
from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg
a = FaserGeometryCfg(flags)
......@@ -21,46 +19,44 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
if __name__ == "__main__":
# from AthenaCommon.Logging import log, logging
# from AthenaCommon.Constants import VERBOSE, INFO
# log.setLevel(VERBOSE)
from AthenaCommon.Constants import VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.ComponentFactory import CompFactory
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
Configurable.configurableRun3Behavior = True
# Flag definition
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
# Flag specification
ConfigFlags.Input.isMC = True
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-14" # Always needed, does nothing
ConfigFlags.GeoModel.FaserVersion = "FASER-00"
ConfigFlags.GeoModel.GeoExportFile = "faserGeo.db"
ConfigFlags.GeoModel.Align.Dynamic = False
# Flags for this job
ConfigFlags.Input.isMC = True # Needed to bypass autoconfig
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment
ConfigFlags.GeoModel.FaserVersion = "FASER-00" # Default FASER geometry
ConfigFlags.GeoModel.GeoExportFile = "faserGeo.db" # Writes out a GeoModel file with the full geometry tree (optional, comment out to skip)
ConfigFlags.Detector.SimulateVeto = True
ConfigFlags.Detector.SimulateFaserSCT = True
ConfigFlags.Detector.SimulateUpstreamDipole = True
ConfigFlags.Detector.SimulateCentralDipole = True
ConfigFlags.Detector.SimulateDownstreamDipole = True
ConfigFlags.lock()
# ConfigFlags.dump()
# Configuration
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
# from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesSerialCfg()
# acc.merge(PoolReadCfg(ConfigFlags))
acc.merge(PoolWriteCfg(ConfigFlags))
# Set things up to create a conditions DB with neutral Tracker alignment transforms
acc.merge(GeoModelTestCfg(ConfigFlags,
AlignDbTool=CompFactory.TrackerAlignDBTool("AlignDbTool",
OutputTool = CompFactory.AthenaOutputStreamTool("DbStreamTool",
OutputFile = "myAlignDb.pool.root"))))
acc.getService("IOVDbSvc").dbConnection = "sqlite://;schema=ALLP200.db;dbname=OFLP200"
acc.getService("PoolSvc").SortReplicas = False # protects against random failures to find sqlite file
OutputFile = "FaserSCT_AlignDb.pool.root"))))
acc.addService(CompFactory.IOVRegistrationSvc(PayloadTable=False))
acc.getService("IOVRegistrationSvc").OutputLevel = VERBOSE
acc.getService("IOVDbSvc").dbConnection = "sqlite://;schema=ALLP200.db;dbname=OFLP200"
# Configure verbosity
# ConfigFlags.dump()
# logging.getLogger('forcomps').setLevel(VERBOSE)
# acc.foreach_component("*").OutputLevel = VERBOSE
# acc.foreach_component("*ClassID*").OutputLevel = INFO
# log.setLevel(VERBOSE)
# Execute and finish
sys.exit(int(acc.run(maxEvents=1).isFailure()))
\ No newline at end of file
sys.exit(int(acc.run(maxEvents=1).isFailure()))
#!/bin/sh
AtlCoolCopy "sqlite://;schema=./ALLP200.db;dbname=OFLP200" "sqlite://;schema=data/ALLP200.db;dbname=OFLP200" -a -fnp -ot "OFLCOND-XXXX-XXX-XX"
cp -n PoolFileCatalog.xml data/
cp -n FaserSCT_AlignDb.pool.root data/
\ No newline at end of file
......@@ -32,7 +32,7 @@ if __name__ == "__main__":
# from AthenaConfiguration.TestDefaults import defaultTestFiles
# Provide MC input
# ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.Detector.SimulateVeto = False
ConfigFlags.Detector.SimulateFaserSCT = False
ConfigFlags.Detector.SimulateUpstreamDipole = True
......
......@@ -3,10 +3,16 @@
#
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def FaserGeometryCfg (flags):
acc = ComponentAccumulator()
# Hack to avoid randomly failing to find sqlite file
poolSvc = CompFactory.PoolSvc()
poolSvc.SortReplicas = False
acc.addService(poolSvc)
if flags.Detector.SimulateScintillator or flags.Detector.GeometryScintillator:
from FaserGeoModel.ScintGMConfig import ScintGeometryCfg
acc.merge(ScintGeometryCfg(flags))
......@@ -19,4 +25,7 @@ def FaserGeometryCfg (flags):
from FaserGeoModel.DipoleGMConfig import DipoleGeometryCfg
acc.merge(DipoleGeometryCfg(flags))
# Protect against random failures to find sqlite files
# acc.getService("PoolSvc").SortReplicas = False
return acc
......@@ -28,7 +28,7 @@ if __name__ == "__main__":
# from AthenaConfiguration.TestDefaults import defaultTestFiles
# Provide MC input
# ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.Detector.SimulateFaserSCT = True
ConfigFlags.GeoModel.Align.Dynamic = False
# Provide data input
......
......@@ -28,7 +28,7 @@ if __name__ == "__main__":
# from AthenaConfiguration.TestDefaults import defaultTestFiles
# Provide MC input
# ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.Detector.SimulateVeto = True
ConfigFlags.GeoModel.Align.Dynamic = False
# Provide data input
......
......@@ -27,7 +27,7 @@ if __name__ == "__main__":
ConfigFlags.Detector.SimulateUpstreamDipole = True
ConfigFlags.Detector.SimulateCentralDipole = True
ConfigFlags.Detector.SimulateDownstreamDipole = True
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.lock()
......
......@@ -11,6 +11,7 @@ logging.getLogger().info("Importing %s", __name__)
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
from AthenaCommon.GlobalFlags import GlobalFlags
from AthenaCommon import CfgMgr
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from MagFieldServices.MagFieldServicesConf import MagField__FaserFieldSvc
......@@ -20,12 +21,17 @@ def FaserFieldSvc(name="FaserFieldSvc",**kwargs):
# configure properties of service, if any
return CfgMgr.MagField__FaserFieldSvc(name,**kwargs)
def GetFieldSvc(name="AtlasFieldSvc",**kwargs):
def GetFieldSvc(name="FaserFieldSvc",**kwargs):
return FaserFieldSvc(name, **kwargs)
# The magneticfields is going to need a big update for MT, so this is all temporary. Ed
def MagneticFieldSvcCfg(flags, **kwargs):
result=ComponentAccumulator()
# Hack to avoid randomly failing to find sqlite file
poolSvc = CompFactory.PoolSvc()
poolSvc.SortReplicas = False
result.addService(poolSvc)
# initialise required conditions DB folders
from IOVDbSvc.IOVDbSvcConfig import addFolders
......
......@@ -10,7 +10,7 @@ if __name__ == "__main__":
from AthenaConfiguration.TestDefaults import defaultTestFiles
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
# ConfigFlags.Detector.SimulatePixel = False
ConfigFlags.Detector.SimulateVeto = False
# ConfigFlags.Detector.SimulateTRT = False
......
......@@ -46,7 +46,7 @@ if __name__ == "__main__":
ConfigFlags.Beam.Type = "collisions"
ConfigFlags.Beam.Energy = 7*TeV # Informational, does not affect simulation
ConfigFlags.GeoModel.FaserVersion = "FASER-00" # Always needed
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-14" # Always needed
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Always needed; only the OFLCOND part matters
# Workaround for bug/missing flag; unimportant otherwise
ConfigFlags.addFlag("Input.InitialTimeStamp", 0)
# Workaround to avoid failing metadata peek
......
......@@ -10,7 +10,7 @@ if __name__ == "__main__":
from AthenaConfiguration.TestDefaults import defaultTestFiles
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.Detector.SimulateDipole = True
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.lock()
......
......@@ -10,7 +10,7 @@ if __name__ == "__main__":
from AthenaConfiguration.TestDefaults import defaultTestFiles
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.Detector.SimulateFaserSCT = False
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.lock()
......
......@@ -179,7 +179,6 @@ namespace TrackerDD {
FrameType frame,
GeoVAlignmentStore* alignStore) const
{
ATH_MSG_FATAL("Called un-updated SCT_DetectorManager::setAlignableTransformDelta with level " << level );
if (level == 0) { // 0 - At the element level
// We retrieve it via a hashId.
......
......@@ -53,4 +53,5 @@ atlas_add_component( FaserSCT_Digitization
atlas_install_headers( FaserSCT_Digitization )
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
atlas_install_scripts( test/FaserSCT_DigitizationDbg.py )
......@@ -24,14 +24,14 @@ Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.Input.Files = ['g4.HITS.root']
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.Concurrency.NumThreads = 1
ConfigFlags.Beam.NumberOfCollisions = 0.
#ConfigFlags.Detector.SimulateFaserSCT = True
ConfigFlags.GeoModel.FaserVersion = "FASER-00" # Always needed
ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" # Always needed to fool autoconfig
ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" # Always needed to fool autoconfig; value ignored
ConfigFlags.Digitization.TruthOutput = True
......@@ -64,6 +64,7 @@ logging.getLogger('forcomps').setLevel(VERBOSE)
acc.foreach_component("*").OutputLevel = VERBOSE
acc.foreach_component("*ClassID*").OutputLevel = INFO
acc.getCondAlgo("FaserSCT_AlignCondAlg").OutputLevel = VERBOSE
acc.getCondAlgo("FaserSCT_DetectorElementCondAlg").OutputLevel = VERBOSE
acc.getService("PoolSvc").SortReplicas = False
acc.getService("StoreGateSvc").Dump = True
acc.getService("ConditionStore").Dump = True
......
......@@ -19,7 +19,7 @@ log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.Concurrency.NumThreads = 1
ConfigFlags.lock()
......
......@@ -95,7 +95,7 @@ if (vp1InputFiles == []):
# Set conditions tag
if not 'vp1GlobCond' in dir():
vp1GlobCond="OFLCOND-SDR-BS7T-05-14"
vp1GlobCond="OFLCOND-XXXX-XXX-XX"
from IOVDbSvc.CondDB import conddb
conddb.setGlobalTag(vp1GlobCond)
......@@ -145,7 +145,7 @@ else:
# Set conditions tag
if not 'vp1GlobCond' in dir():
if (vp1Mc):
vp1GlobCond="OFLCOND-SIM-BS7T-02"
vp1GlobCond="OFLCOND-XXXX-XXX-XX"
else:
vp1GlobCond="COMCOND-BLKPST-004-01"
......
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