4 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
5 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
6 from AthenaCommon.Logging
import log
10 cmdargs=dict(arg.split(
'=')
for arg
in sys.argv[1:])
11 if 'MisalignMode' not in cmdargs.keys():
14 MisalignMode=
int(cmdargs.get(
'MisalignMode',11))
15 print(
"Looking for misalignment files for mode "+
str(MisalignMode))
21 flags.Input.isMC =
True
23 flags.Input.Files = []
25 from AthenaConfiguration.TestDefaults
import defaultGeometryTags,defaultConditionsTags
26 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4
29 flags.ITk.Geometry.AllLocal =
False
31 if flags.ITk.Geometry.AllLocal:
38 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
41 flags.TrackingGeometry.MaterialSource =
"Input"
42 flags.Detector.GeometryHGTD =
False
44 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
45 flags.GeoModel.Align.Dynamic =
False
49 DBFile=
"MisalignmentSet"+
str(MisalignMode)+
".db"
51 tag=
"InDetSi_MisalignmentMode_no Misalignment"
52 elif(MisalignMode==1):
53 tag=
"InDetSi_MisalignmentMode_misalignment by 6 parameters"
54 elif(MisalignMode==2):
55 tag=
"InDetSi_MisalignmentMode_random misalignment"
56 elif(MisalignMode==3):
57 tag=
"InDetSi_MisalignmentMode_IBL-stave temperature dependent bowing"
58 elif(MisalignMode==11):
59 tag=
"InDetSi_MisalignmentMode_R deltaR (radial expansion)"
60 elif(MisalignMode==21):
61 tag=
"InDetSi_MisalignmentMode_R deltaPhi (curl)"
62 elif(MisalignMode==31):
63 tag=
"InDetSi_MisalignmentMode_R deltaZ (telescope)"
64 elif(MisalignMode==99):
65 tag=
"InDetSi_MisalignmentMode_99"
66 DBFile=
"MisalignmentSet99.db"
68 flags.IOVDb.DBConnection =
"sqlite://;schema="+DBFile+
";dbname="+DBName
70 flags.Detector.GeometryCalo =
False
71 flags.Detector.GeometryMuon =
False
74 flags.Concurrency.NumThreads = 1
75 flags.Concurrency.NumConcurrentEvents = 1
77 log.debug(
'Lock config flags now.')
80 log.debug(
'dumping config flags now.')
85 from IOVDbSvc.IOVDbSvcConfig
import addFolders
86 cfg.merge(
addFolders(flags,
"/Indet/AlignITk",db=DBName,detDb=DBFile,tag=tag))
88 from TrkExUnitTests.TrkExUnitTestsConfig
import ExtrapolationEngineTestCfg
90 NumberOfTestsPerEvent = 100,
94 BackExtrapolation =
False,
97 SimgaOriginD0 = 2./3.,
106 CollectSensitive =
True,
107 CollectPassive =
True,
108 CollectBoundary =
True,
109 CollectMaterial =
True,
110 UseHGTD = flags.Detector.GeometryHGTD,
118 if(MisalignMode!=-1):
119 cfg.getService(
"GeoModelSvc").DetectorTools[
"ITk::PixelDetectorTool"].Alignable=
True
120 print(
"Pixel manager alignability has been set to: "+
str(cfg.getService(
"GeoModelSvc").DetectorTools[
"ITk::PixelDetectorTool"].Alignable))
121 cfg.getService(
"GeoModelSvc").DetectorTools[
"ITk::StripDetectorTool"].Alignable=
True
122 print(
"Strip manager alignability has been set to:"+
str(cfg.getService(
"GeoModelSvc").DetectorTools[
"ITk::StripDetectorTool"].Alignable))