Verified Commit db13deb8 authored by Tadej Novak's avatar Tadej Novak
Browse files

Cleanup TrackRecoConfig

parent 1b35b189
Pipeline #3294339 failed with stage
in 0 seconds
......@@ -112,14 +112,6 @@ def OutputStreamCfg(configFlags, streamName, ItemList=[], MetadataItemList=[],
if "AOD" in streamName:
outputStream.WritingTool.SubLevelBranchName = "<key>"
AthenaPoolCnvSvc=CompFactory.AthenaPoolCnvSvc
poolcnvsvc = AthenaPoolCnvSvc()
result.addService(poolcnvsvc)
poolcnvsvc.PoolAttributes += [ "DatabaseName = '" + fileName + "'; COMPRESSION_LEVEL = '5'" ]
poolcnvsvc.PoolAttributes += [ "DatabaseName = '" + fileName + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '-10000000'" ]
poolcnvsvc.PoolAttributes += [ "DatabaseName = '" + fileName + "'; ContainerName = 'TTree=CollectionTree'; CONTAINER_SPLITLEVEL = '1'" ]
poolcnvsvc.PoolAttributes += [ "DatabaseName = '" + fileName + "'; ContainerName = 'TTree=Aux.'; CONTAINER_SPLITLEVEL = '1'"]
result.addEventAlgo(outputStream)
return result
......
......@@ -16,17 +16,18 @@ atlas_add_test( TrackingCutsFlags_test
POST_EXEC_SCRIPT nopost.sh)
atlas_add_test( BackTrackingConfig_test
SCRIPT python -m InDetConfig.BackTrackingConfig --norun
SCRIPT python -m InDetConfig.BackTrackingConfig --norun
POST_EXEC_SCRIPT nopost.sh)
atlas_add_test( TRTSegmentFindingConfig_test
SCRIPT python -m InDetConfig.TRTSegmentFindingConfig --norun
SCRIPT python -m InDetConfig.TRTSegmentFindingConfig
POST_EXEC_SCRIPT nopost.sh)
atlas_add_test( TrackRecoConfig_test
SCRIPT python -m InDetConfig.TrackRecoConfig --norun
SCRIPT python -m InDetConfig.TrackRecoConfig
PROPERTIES TIMEOUT 300
POST_EXEC_SCRIPT nopost.sh)
atlas_add_test( ITkTrackRecoConfig_test
SCRIPT python -m InDetConfig.ITkTrackRecoConfig --norun
SCRIPT python -m InDetConfig.ITkTrackRecoConfig --norun
POST_EXEC_SCRIPT nopost.sh)
......@@ -29,7 +29,8 @@ def SiDetElementsRoadMaker_xkCfg(flags, name = 'InDetTRT_SeededSiRoad', **kwargs
return acc
def SimpleTRT_SeededSpacePointFinder_ATLCfg(flags, name='InDetTRT_SeededSpFinder', InputCollections=[], **kwargs):
acc = ComponentAccumulator()
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
acc = MagneticFieldSvcCfg(flags)
#
# --- decide if use the association tool
......@@ -80,7 +81,9 @@ def TRT_SeededSpacePointFinder_ATLCfg(flags, name='InDetTRT_SeededSpFinder', Inp
return acc
def TRT_SeededTrackFinder_ATLCfg(flags, name='InDetTRT_SeededTrackMaker', InputCollections=[], **kwargs):
acc = ComponentAccumulator()
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
acc = MagneticFieldSvcCfg(flags)
#
# --- TRT seeded back tracking tool
#
......@@ -116,7 +119,12 @@ def TRT_SeededTrackFinder_ATLCfg(flags, name='InDetTRT_SeededTrackMaker', InputC
kwargs.setdefault("Xi2max", flags.InDet.Tracking.SecondaryXi2max)
kwargs.setdefault("Xi2maxNoAdd", flags.InDet.Tracking.SecondaryXi2maxNoAdd)
kwargs.setdefault("SearchInCaloROI", False)
kwargs.setdefault("InputClusterContainerName", 'InDetCaloClusterROIs') # InDetKeys.CaloClusterROIContainer()
if kwargs["SearchInCaloROI"]:
from InDetConfig.InDetRecCaloSeededROISelectionConfig import CaloClusterROI_SelectorCfg
acc.merge(CaloClusterROI_SelectorCfg(flags))
kwargs.setdefault("InputClusterContainerName", "InDetCaloClusterROIs") # InDetKeys.CaloClusterROIContainer()
else:
kwargs.setdefault("InputClusterContainerName", "")
kwargs.setdefault("ConsistentSeeds", True)
kwargs.setdefault("BremCorrection", False)
......@@ -149,6 +157,20 @@ def TRT_SeededTrackFinderCfg(flags, name='InDetTRT_SeededTrackFinder', InputColl
suffix = ''
usePrdAssociationTool = False
from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
acc.merge(BeamSpotCondAlgCfg(flags))
if flags.InDet.Tracking.usePixel:
acc.addCondAlgo(CompFactory.InDet.SiDetElementBoundaryLinksCondAlg_xk(name="InDetSiDetElementBoundaryLinksPixelCondAlg",
ReadKey="PixelDetectorElementCollection",
WriteKey="PixelDetElementBoundaryLinks_xk"))
if flags.InDet.Tracking.useSCT:
acc.addCondAlgo(CompFactory.InDet.SiDetElementsRoadCondAlg_xk(name="InDet__SiDetElementsRoadCondAlg_xk"))
acc.addCondAlgo(CompFactory.InDet.SiDetElementBoundaryLinksCondAlg_xk(name="InDetSiDetElementBoundaryLinksSCTCondAlg",
ReadKey="SCT_DetectorElementCollection",
WriteKey="SCT_DetElementBoundaryLinks_xk"))
InDetTrackFitterBT = acc.popToolsAndMerge(TC.InDetTrackFitterBTCfg(flags))
acc.addPublicTool(InDetTrackFitterBT)
......@@ -340,12 +362,8 @@ if __name__ == "__main__":
from AthenaConfiguration.TestDefaults import defaultTestFiles
flags.Input.Files=defaultTestFiles.RDO
flags.Detector.GeometryPixel = True
flags.Detector.GeometrySCT = True
flags.Detector.GeometryTRT = True
flags.InDet.doTRTSeededTrackFinder = True
flags.InDet.doResolveBackTracks = True
# disable calo for this test
flags.Detector.EnableCalo = False
numThreads=1
flags.Concurrency.NumThreads=numThreads
......@@ -364,48 +382,9 @@ if __name__ == "__main__":
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
top_acc.merge(PoolReadCfg(flags))
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
top_acc.merge( PixelReadoutGeometryCfg(flags) )
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
top_acc.merge(SCT_ReadoutGeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( flags ))
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg, MuonIdHelperSvcCfg
top_acc.merge(MuonGeoModelCfg(flags))
top_acc.merge(MuonIdHelperSvcCfg(flags))
##
from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
top_acc.merge(BeamSpotCondAlgCfg(flags))
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
top_acc.merge(BeamPipeGeometryCfg(flags))
##
top_acc.addCondAlgo( CompFactory.InDet.SiDetElementBoundaryLinksCondAlg_xk( name = "InDetSiDetElementBoundaryLinksPixelCondAlg",
ReadKey = "PixelDetectorElementCollection",
WriteKey = "PixelDetElementBoundaryLinks_xk") )
top_acc.addCondAlgo(CompFactory.InDet.SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk"))
##
from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool, PixelLorentzAngleCfg
top_acc.addPublicTool(PixelLorentzAngleTool(flags))
top_acc.addPublicTool(top_acc.popToolsAndMerge(PixelLorentzAngleCfg(flags)))
from SiLorentzAngleTool.SCT_LorentzAngleConfig import SCT_LorentzAngleCfg
top_acc.addPublicTool(top_acc.popToolsAndMerge(SCT_LorentzAngleCfg(flags)))
##
from PixelConditionsAlgorithms.PixelConditionsConfig import PixelOfflineCalibCondAlgCfg, PixelDistortionAlgCfg
top_acc.merge(PixelOfflineCalibCondAlgCfg(flags))
top_acc.merge(PixelDistortionAlgCfg(flags))
##
top_acc.merge(TC.PixelClusterNnCondAlgCfg(flags))
top_acc.merge(TC.PixelClusterNnWithTrackCondAlgCfg(flags))
##
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTActiveCondAlgCfg
top_acc.merge(TRTActiveCondAlgCfg(flags))
top_acc.merge(TC.TRT_DetElementsRoadCondAlgCfg(flags))
from InDetConfig.SiliconPreProcessing import InDetRecPreProcessingSiliconCfg
top_acc.merge(InDetRecPreProcessingSiliconCfg(flags))
########################## TRTPreProcessing Configuration ################################
......@@ -441,5 +420,5 @@ if __name__ == "__main__":
top_acc.store(open("test_BackTrackingConfig.pkl", "wb"))
import sys
if "--norun" not in sys.argv:
sc = top_acc.run(25)
sc = top_acc.run(5)
sys.exit(not sc.isSuccess())
......@@ -22,7 +22,7 @@ def createITkConfigFlags():
itkcf.addFlag("ITk.doRefitInvalidCov", False) # Try Kalman fitter if the track fit in the ambiguity processor produces non positive definitematrices.
itkcf.addFlag("ITk.doSSSfilter", True) # Switch for running SSS filter
itkcf.addFlag("ITk.doNNToTCalibration", False ) # USe ToT calibration for NN clustering rather than Charge
itkcf.addFlag("ITk.useNNTTrainedNetworks", True ) # Use older NNs stored as TTrainedNetworks in place of default MDNs/other more recent networks. This is necessary for older configuration tags where the trainings were not available.
itkcf.addFlag("ITk.useNNTTrainedNetworks", False ) # Use older NNs stored as TTrainedNetworks in place of default MDNs/other more recent networks. This is necessary for older configuration tags where the trainings were not available.
itkcf.addFlag("ITk.doStripModuleVeto", False) # Turn on SCT_ModuleVetoSvc, allowing it to be configured later
itkcf.addFlag("ITk.doStoreTrackSeeds", False) # Turn on to save the Track Seeds in a xAOD track collecting for development studies
itkcf.addFlag("ITk.checkDeadElementsOnTrack", True) # Enable check for dead modules and FEs
......@@ -36,13 +36,13 @@ def createITkConfigFlags():
itkcf.addFlag("ITk.doBeamHalo", False) # Turn running of BeamHalo second pass on and off
itkcf.addFlag("ITk.doHeavyIon", False) # Turn running of HeavyIons on and off
itkcf.addFlag("ITk.doFastTracking", False) # Turn running of ITk FastTracking on and off
itkcf.addFlag("ITk.doITkConversionFinding",True) # Turn running of doITkConversionFinding second pass on and off
itkcf.addFlag("ITk.doITkLargeD0", False)
itkcf.addFlag("ITk.doConversionFinding",True) # Turn running of ConversionFinding second pass on and off
itkcf.addFlag("ITk.doLargeD0", False)
itkcf.addFlag("ITk.storeSeparateLargeD0Container", False)
itkcf.addFlag("ITk.doBremRecovery", True) # Turn on running of Brem Recover in tracking
itkcf.addFlag("ITk.doCaloSeededBrem", True) # Brem Recover in tracking restricted to Calo ROIs
itkcf.addFlag("ITk.doHadCaloSeededSSS", False) # Use Recover SSS to Calo ROIs
itkcf.addFlag("ITk.doCaloSeededAmbi", False) # Use Calo ROIs to seed specific cuts for the ambi
itkcf.addFlag("ITk.doCaloSeededAmbi", lambda prevFlags: prevFlags.Detector.EnableCalo) # Use Calo ROIs to seed specific cuts for the ambi
itkcf.addFlag("ITk.doTruth", lambda f: f.Input.isMC) # Turn running of truth matching on and off (by default on for MC off for data)
itkcf.addFlag("ITk.loadRotCreator", True) # Turn loading of ROT_Creator tool on and off
itkcf.addFlag("ITk.useBeamConstraint", True) # use beam spot service in new tracking
......
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from InDetConfig.InDetRecCaloSeededROISelectionConfig import egammaCaloClusterSelectorCfg
from InDetConfig.InDetRecCaloSeededROISelectionConfig import egammaCaloClusterSelectorCfg, egammaHadCaloClusterSelectorCfg
def ITkCaloClusterROI_SelectorCfg(ConfigFlags, name="ITkCaloClusterROISelector", **kwargs):
result = ComponentAccumulator()
from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg
result = egammaTopoClusterCopierCfg(ConfigFlags)
kwargs.setdefault("InputClusterContainerName", ConfigFlags.Egamma.Keys.Internal.EgammaTopoClusters)
kwargs.setdefault("OutputClusterContainerName", "ITkCaloClusterROIs")
if "CaloClusterROIBuilder" not in kwargs:
......@@ -16,3 +17,17 @@ def ITkCaloClusterROI_SelectorCfg(ConfigFlags, name="ITkCaloClusterROISelector",
kwargs["egammaCaloClusterSelector"] = result.popToolsAndMerge(egammaCaloClusterSelectorCfg(ConfigFlags))
result.addEventAlgo(CompFactory.InDet.CaloClusterROI_Selector(name, **kwargs), primary=True)
return result
def ITkHadCaloClusterROI_SelectorCfg(ConfigFlags, name="InDetHadCaloClusterROISelector", **kwargs):
from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg
result = egammaTopoClusterCopierCfg(ConfigFlags)
kwargs.setdefault("InputClusterContainerName", "CaloCalTopoClusters")
kwargs.setdefault("OutputClusterContainerName", "ITkHadCaloClusterROIs" + "Bjet")
if "CaloClusterROIBuilder" not in kwargs:
kwargs["CaloClusterROIBuilder"] = CompFactory.InDet.CaloClusterROI_Builder("ITkCaloClusterROIBuilder")
if "egammaCaloClusterSelector" not in kwargs:
kwargs["egammaCaloClusterSelector"] = result.popToolsAndMerge(egammaHadCaloClusterSelectorCfg(ConfigFlags))
result.addEventAlgo(CompFactory.InDet.CaloClusterROI_Selector(name, **kwargs), primary=True)
return result
......@@ -50,8 +50,8 @@ def ITkSiTrackerSpacePointFinderCfg(flags, name = "ITkSiTrackerSpacePointFinder"
kwargs.setdefault("SpacePointsSCTName", 'ITkStripSpacePoints')
kwargs.setdefault("SpacePointsOverlapName", 'ITkOverlapSpacePoints')
kwargs.setdefault("ProcessPixels", flags.Detector.EnableITkPixel)
kwargs.setdefault("ProcessSCTs", flags.Detector.EnableITkStrip and (not flags.ITk.doFastTracking or flags.ITk.doITkLargeD0))
kwargs.setdefault("ProcessOverlaps", flags.Detector.EnableITkStrip and (not flags.ITk.doFastTracking or flags.ITk.doITkLargeD0))
kwargs.setdefault("ProcessSCTs", flags.Detector.EnableITkStrip and (not flags.ITk.doFastTracking or flags.ITk.doLargeD0))
kwargs.setdefault("ProcessOverlaps", flags.Detector.EnableITkStrip and (not flags.ITk.doFastTracking or flags.ITk.doLargeD0))
if flags.Beam.Type == "cosmics":
kwargs.setdefault("ProcessOverlaps", False)
......
......@@ -194,7 +194,7 @@ def ITkTrackParticleCnvAlgCfg(flags, name="ITkTrackParticleCnvAlg", TrackContain
))
if flags.ITk.doTruth:
kwargs.setdefault("TrackTruthContainerName", TrackContainerName+"TruthCollection")
kwargs.setdefault("TrackTruthContainerName", f"{TrackContainerName}TruthCollection")
kwargs.setdefault("AddTruthLink", True)
if "MCTruthClassifier" not in kwargs:
......@@ -213,44 +213,30 @@ def ITkTrackRecoCfg(flags):
result = ComponentAccumulator()
if flags.Input.Format == "BS":
from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConfig import PixelRawDataProviderAlgCfg
result.merge(PixelRawDataProviderAlgCfg(flags))
from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConfig import SCTRawDataProviderCfg, SCTEventFlagWriterCfg
result.merge(SCTRawDataProviderCfg(flags))
result.merge(SCTEventFlagWriterCfg(flags))
# needed for brem/seeding, TODO decided if needed here
if flags.Detector.GeometryLAr:
from LArBadChannelTool.LArBadChannelConfig import LArBadFebCfg
result.merge(LArBadFebCfg(flags))
from CaloRec.CaloRecoConfig import CaloRecoCfg
result.merge(CaloRecoCfg(flags,doLCCalib=True))
from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg
result.merge(egammaTopoClusterCopierCfg(flags))
from InDetConfig.ITkRecCaloSeededROISelectionConfig import ITkCaloClusterROI_SelectorCfg
result.merge(ITkCaloClusterROI_SelectorCfg(flags))
# TODO: ITk BS providers
raise RuntimeError("BS imputs not supported")
from InDetConfig.ITkSiliconPreProcessing import ITkRecPreProcessingSiliconCfg
result.merge(ITkRecPreProcessingSiliconCfg(flags))
if flags.ITk.doFastTracking:
flags = flags.cloneAndReplace("ITk.Tracking","ITk.FastTracking")
flags = flags.cloneAndReplace("ITk.Tracking", "ITk.FastTracking")
from InDetConfig.ITkTrackingSiPatternConfig import ITkTrackingSiPatternCfg
result.merge(ITkTrackingSiPatternCfg(flags, [], "ResolvedTracks", "SiSPSeededTracks"))
InputCombinedITkTracks = ["ResolvedTracks"]
# LRT
if flags.ITk.doITkLargeD0:
flagsLRT = flags.cloneAndReplace("ITk.Tracking","ITk.LargeD0Tracking")
if flags.ITk.doLargeD0:
flagsLRT = flags.cloneAndReplace("ITk.Tracking", "ITk.LargeD0Tracking")
if flags.ITk.doFastTracking:
flagsLRT = flags.cloneAndReplace("ITk.Tracking","ITk.LargeD0FastTracking")
result.merge(ITkTrackingSiPatternCfg(flagsLRT, InputCombinedITkTracks, "ResolvedLargeD0Tracks", "SiSPSeededLargeD0Tracks"))
flagsLRT = flags.cloneAndReplace("ITk.Tracking", "ITk.LargeD0FastTracking")
result.merge(ITkTrackingSiPatternCfg(flagsLRT, InputCombinedITkTracks, "ResolvedLargeD0Tracks", "SiSpSeededLargeD0Tracks"))
InputCombinedITkTracks += ["ResolvedLargeD0Tracks"]
# Photon conversion tracking reco
if flags.Detector.GeometryLAr and flags.ITk.doITkConversionFinding:
flagsConv = flags.cloneAndReplace("ITk.Tracking","ITk.ConversionFindingTracking")
if flags.Detector.EnableCalo and flags.ITk.doConversionFinding:
flagsConv = flags.cloneAndReplace("ITk.Tracking", "ITk.ConversionFindingTracking")
result.merge(ITkTrackingSiPatternCfg(flagsConv, InputCombinedITkTracks, "ResolvedROIConvTracks", "SiSpSeededROIConvTracks"))
InputCombinedITkTracks += ["ResolvedROIConvTracks"]
......@@ -273,24 +259,22 @@ def ITkTrackRecoCfg(flags):
result.merge(addToAOD(flags, toAOD))
return result
if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1
from AthenaConfiguration.AllConfigFlags import ConfigFlags
numThreads=1
ConfigFlags.Concurrency.NumThreads=numThreads
ConfigFlags.Concurrency.NumConcurrentEvents=numThreads
Configurable.configurableRun3Behavior = 1
ConfigFlags.Detector.GeometryPixel = True
ConfigFlags.Detector.GeometrySCT = True
from AthenaConfiguration.AllConfigFlags import ConfigFlags
ConfigFlags.ITk.doPixelClusterSplitting = True
ConfigFlags.ITk.doSiSPSeededTrackFinder = True
# Disable calo for this test
ConfigFlags.Detector.EnableCalo = False
# TODO add these flags in future
# ConfigFlags.addFlag('InDet.doAmbiSolving', True)
# ConfigFlags.addFlag('InDet.useHolesFromPattern', False)
# ConfigFlags.addFlag('InDet.holeSearchInGX2Fit', True)
# ConfigFlags.addFlag('ITk.doAmbiSolving', True)
# ConfigFlags.addFlag('ITk.useHolesFromPattern', False)
# ConfigFlags.addFlag('ITk.holeSearchInGX2Fit', True)
from AthenaConfiguration.TestDefaults import defaultTestFiles
ConfigFlags.Input.Files = defaultTestFiles.RDO
......@@ -302,20 +286,18 @@ if __name__ == "__main__":
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
top_acc.merge(PoolReadCfg(ConfigFlags))
#######################################################################
#################### Additional Configuration ########################
if "EventInfo" not in ConfigFlags.Input.Collections:
from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
top_acc.merge(EventInfoCnvAlgCfg(ConfigFlags))
if ConfigFlags.Input.isMC:
from xAODTruthCnv.xAODTruthCnvConfigNew import GEN_AOD2xAODCfg
top_acc.merge(GEN_AOD2xAODCfg(ConfigFlags))
top_acc.merge(ITkTrackRecoCfg(ConfigFlags))
from AthenaCommon.Constants import DEBUG
top_acc.foreach_component("AthEventSeq/*").OutputLevel=DEBUG
top_acc.printConfig(withDetails=True, summariseProps=True)
top_acc.store(open("ITkTrackingSiPatternConfig.pkl", "wb"))
import sys
top_acc.store(open("ITkTrackReco.pkl", "wb"))
import sys
if "--norun" not in sys.argv:
sc = top_acc.run(5)
if sc.isFailure():
......
......@@ -808,10 +808,12 @@ def ITkTrackSummaryToolNoHoleSearchCfg(flags, name='ITkTrackSummaryToolNoHoleSea
def ITkROIInfoVecCondAlgCfg(flags, name='ITkROIInfoVecCondAlg', **kwargs) :
acc = ComponentAccumulator()
kwargs.setdefault("InputEmClusterContainerName", 'ITkCaloClusterROIs')
from InDetConfig.ITkRecCaloSeededROISelectionConfig import ITkCaloClusterROI_SelectorCfg
acc.merge(ITkCaloClusterROI_SelectorCfg(flags))
kwargs.setdefault("InputEmClusterContainerName", "ITkCaloClusterROIs")
kwargs.setdefault("WriteKey", kwargs.get("namePrefix","") +"ROIInfoVec"+ kwargs.get("nameSuffix","") )
kwargs.setdefault("minPtEM", 5000.0) #in MeV
acc.setPrivateTools(CompFactory.ROIInfoVecAlg(name = name,**kwargs))
acc.addEventAlgo(CompFactory.ROIInfoVecAlg(name = name,**kwargs), primary=True)
return acc
def ITkAmbiScoringToolBaseCfg(flags, name='ITkAmbiScoringTool', **kwargs) :
......@@ -822,10 +824,9 @@ def ITkAmbiScoringToolBaseCfg(flags, name='ITkAmbiScoringTool', **kwargs) :
ITkTrackSummaryTool = acc.getPrimaryAndMerge(ITkTrackSummaryToolCfg(flags))
from AthenaCommon.DetFlags import DetFlags
have_calo_rois = flags.ITk.doBremRecovery and flags.ITk.doCaloSeededBrem and DetFlags.detdescr.Calo_allOn()
if have_calo_rois :
alg = acc.popToolsAndMerge(ITkROIInfoVecCondAlgCfg(flags))
have_calo_rois = flags.ITk.doBremRecovery and flags.ITk.doCaloSeededBrem and flags.Detector.EnableCalo
if have_calo_rois:
alg = acc.getPrimaryAndMerge(ITkROIInfoVecCondAlgCfg(flags))
kwargs.setdefault("CaloROIInfoName", alg.WriteKey )
kwargs.setdefault("SummaryTool", ITkTrackSummaryTool )
kwargs.setdefault("DriftCircleCutTool", None )
......@@ -883,10 +884,9 @@ def ITkNNScoringToolBaseCfg(flags, name='ITkNNScoringTool', **kwargs) :
acc = ComponentAccumulator()
the_name=makeName(name,kwargs)
from AthenaCommon.DetFlags import DetFlags
have_calo_rois = flags.ITk.doBremRecovery and flags.ITk.doCaloSeededBrem and DetFlags.detdescr.Calo_allOn()
if have_calo_rois :
alg = acc.popToolsAndMerge(ITkROIInfoVecCondAlgCfg(flags))
have_calo_rois = flags.ITk.doBremRecovery and flags.ITk.doCaloSeededBrem and flags.Detector.EnableCalo
if have_calo_rois:
alg = acc.getPrimaryAndMerge(ITkROIInfoVecCondAlgCfg(flags))
kwargs.setdefault("CaloROIInfoName", alg.WriteKey )
from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
......
......@@ -197,9 +197,12 @@ def ITkSiTrackMaker_xkCfg(flags, name="ITkSiTrackMaker", InputCollections = None
kwargs.setdefault("Xi2maxMultiTracks", flags.ITk.Tracking.Xi2max[0])
kwargs.setdefault("useSSSseedsFilter", flags.ITk.doSSSfilter)
kwargs.setdefault("doMultiTracksProd", True)
kwargs.setdefault("useBremModel", flags.ITk.doBremRecovery and useBremMode and flags.Detector.GeometryLAr) # only for NewTracking the brem is debugged !!!
kwargs.setdefault("doCaloSeededBrem", flags.ITk.doCaloSeededBrem and flags.Detector.GeometryLAr)
kwargs.setdefault("doHadCaloSeedSSS", flags.ITk.doHadCaloSeededSSS and flags.Detector.GeometryTile)
kwargs.setdefault("useBremModel", flags.ITk.doBremRecovery and useBremMode and flags.Detector.EnableCalo) # only for NewTracking the brem is debugged !!!
kwargs.setdefault("doCaloSeededBrem", flags.ITk.doCaloSeededBrem and flags.Detector.EnableCalo)
kwargs.setdefault("doHadCaloSeedSSS", flags.ITk.doHadCaloSeededSSS and flags.Detector.EnableCalo)
if kwargs["useBremModel"] and kwargs["doCaloSeededBrem"]:
from InDetConfig.ITkRecCaloSeededROISelectionConfig import ITkCaloClusterROI_SelectorCfg
acc.merge(ITkCaloClusterROI_SelectorCfg(flags))
kwargs.setdefault("phiWidth", flags.ITk.Tracking.phiWidthBrem[0])
kwargs.setdefault("etaWidth", flags.ITk.Tracking.etaWidthBrem[0])
kwargs.setdefault("InputClusterContainerName", 'ITkCaloClusterROIs')
......@@ -308,7 +311,8 @@ def ITkSiSPSeededTrackFinderCfg(flags, name="ITkSiSpTrackFinder", InputCollectio
return acc
def ITkSiSPSeededTrackFinderROIConvCfg(flags, name="ITkSiSpTrackFinderROIConv", InputCollections = None, SiSPSeededTrackCollectionKey = None, **kwargs) :
acc = ComponentAccumulator()
from InDetConfig.ITkRecCaloSeededROISelectionConfig import ITkCaloClusterROI_SelectorCfg
acc = ITkCaloClusterROI_SelectorCfg(flags)
from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg
RegSelTool_ITkStrip = acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags))
......@@ -354,7 +358,6 @@ def ITkAmbiTrackSelectionToolCfg(flags, name="ITkAmbiTrackSelectionTool", **kwar
kwargs.setdefault("DriftCircleCutTool", None)
kwargs.setdefault("AssociationTool" , ITkPRDtoTrackMapToolGangedPixels)
kwargs.setdefault("minTRTHits" , 0) # used for Si only tracking !!!
kwargs.setdefault("sharedProbCut" , 0.10)
kwargs.setdefault("UseParameterization" , False)
kwargs.setdefault("Cosmics" , flags.Beam.Type == 'cosmics')
kwargs.setdefault("doPixelSplitting" , flags.ITk.doPixelClusterSplitting )
......@@ -366,19 +369,28 @@ def ITkAmbiTrackSelectionToolCfg(flags, name="ITkAmbiTrackSelectionTool", **kwar
kwargs.setdefault("minSiHitsToAllowSplitting" , nhitsToAllowSplitting)
kwargs.setdefault("minUniqueSCTHits" , 4)
kwargs.setdefault("minTrackChi2ForSharedHits" , 3)
kwargs.setdefault("InputHadClusterContainerName", "ITkHadCaloClusterROIs" + "Bjet" )
kwargs.setdefault("doHadCaloSeed" , flags.ITk.doCaloSeededAmbi) #Do special cuts in region of interest
kwargs.setdefault("minPtSplit" , flags.ITk.pixelClusterSplitMinPt) #Only allow split clusters on track withe pt greater than this MeV
kwargs.setdefault("maxSharedModulesInROI" , 3) #Maximum number of shared modules for tracks in ROI
kwargs.setdefault("minNotSharedInROI" , 2) #Minimum number of unique modules for tracks in ROI
kwargs.setdefault("minSiHitsToAllowSplittingInROI" , 7) #Minimum number of Si hits to allow splittings for tracks in ROI
kwargs.setdefault("phiWidth" , 0.1) #Split cluster ROI size
kwargs.setdefault("etaWidth" , 0.1) #Split cluster ROI size
kwargs.setdefault("InputEmClusterContainerName" , 'ITkCaloClusterROIs')
kwargs.setdefault("doEmCaloSeed" , flags.Detector.GeometryLAr) #Only split in cluster in region of interest
kwargs.setdefault("minSiHitsToAllowSplittingInROI" , 8) #Minimum number of Si hits to allow splittings for tracks in ROI
kwargs.setdefault("phiWidth" , 0.05) #Split cluster ROI size
kwargs.setdefault("etaWidth" , 0.05) #Split cluster ROI size
kwargs.setdefault("doEmCaloSeed" , flags.ITk.doCaloSeededAmbi) #Only split in cluster in region of interest
kwargs.setdefault("InputEmClusterContainerName", 'ITkCaloClusterROIs')
if flags.Detector.EnableCalo:
from InDetConfig.ITkRecCaloSeededROISelectionConfig import ITkCaloClusterROI_SelectorCfg
acc.merge(ITkCaloClusterROI_SelectorCfg(flags))
kwargs.setdefault("doHadCaloSeed" , flags.ITk.doCaloSeededAmbi) #Do special cuts in region of interest
kwargs.setdefault("InputHadClusterContainerName", "ITkHadCaloClusterROIs" + "Bjet")
if flags.Detector.EnableCalo:
from InDetConfig.ITkRecCaloSeededROISelectionConfig import ITkHadCaloClusterROI_SelectorCfg
acc.merge(ITkHadCaloClusterROI_SelectorCfg(flags))
kwargs.setdefault("minPtConv" , 10000) #Only allow split clusters on track withe pt greater than this MeV
kwargs.setdefault("minPtBjetROI" , 10000)
kwargs.setdefault("phiWidthEM" , 0.05) #Split cluster ROI size
kwargs.setdefault("etaWidthEM" , 0.05) #Split cluster ROI size
else:
kwargs.setdefault("sharedProbCut", 0.10)
if 'InDetEtaDependentCutsSvc' not in kwargs :
acc.merge(TC.ITkEtaDependentCutsSvcCfg(flags))
......
......@@ -43,7 +43,7 @@ def createInDetConfigFlags():
icf.addFlag("InDet.doBremRecovery", True) # Turn on running of Brem Recover in tracking
icf.addFlag("InDet.doCaloSeededBrem", True) # Brem Recover in tracking restricted to Calo ROIs
icf.addFlag("InDet.doHadCaloSeededSSS", False) # Use Recover SSS to Calo ROIs
icf.addFlag("InDet.doCaloSeededAmbi", False) # Use Calo ROIs to seed specific cuts for the ambi
icf.addFlag("InDet.doCaloSeededAmbi", lambda prevFlags: prevFlags.Detector.EnableCalo) # Use Calo ROIs to seed specific cuts for the ambi
icf.addFlag("InDet.doCaloSeededRefit", False) # Use Calo ROIs to seed refif for the ambi processor
icf.addFlag("InDet.doBeamGas", False) # Turn running of BeamGas second pass on and off
icf.addFlag("InDet.doBeamHalo", False) # Turn running of BeamHalo second pass on and off
......@@ -67,21 +67,22 @@ def createInDetConfigFlags():
icf.addFlag("InDet.useBeamConstraint", True) # use beam spot service in new tracking
icf.addFlag("InDet.kalmanUpdator", 'smatrix') # control which updator to load for KalmanFitter ("None"/"fast"/"smatrix"/"weight"/"amg")
icf.addFlag("InDet.magField", 'None') # control which field tool to use ("None"/"fast")
icf.addFlag("InDet.nnCutLargeD0Threshold", -1.0) # Enable check for dead modules and FEs
icf.addFlag("InDet.propagatorType", 'RungeKutta') # control which propagator to use ('RungeKutta'/'STEP')
icf.addFlag("InDet.trackFitterType", 'GlobalChi2Fitter') # control which fitter to be used: 'KalmanFitter', 'KalmanDNAFitter', 'DistributedKalmanFilter', 'GlobalChi2Fitter', 'GaussianSumFilter'
icf.addFlag("InDet.doHolesOnTrack", True) # do holes search from now on in summry tool
icf.addFlag("InDet.useHolesFromPattern", False)
icf.addFlag("InDet.useZvertexTool", False) # start with Zvertex finding
icf.addFlag("InDet.doSiSPSeededTrackFinder", False) # use track finding in silicon
icf.addFlag("InDet.doTRTExtensionNew", True) # turn on / off TRT extensions
icf.addFlag("InDet.doTRTExtension", True) # turn on / off TRT extensions
icf.addFlag("InDet.trtExtensionType", 'xk') # which extension type ("xk"/"DAF")
icf.addFlag("InDet.redoTRT_LR", True) # use smart TRT LR/tube hit creator and redo ROTs
icf.addFlag("InDet.doTrtSegments", True) # control to run TRT Segment finding (do it always after new tracking!)
icf.addFlag("InDet.doTRTPhaseCalculation", False) # control to run TRT phase calculation
icf.addFlag("InDet.doTRTSeededTrackFinder", False) # control running the back tracking
icf.addFlag("InDet.doTRTSeededTrackFinder", True) # control running the back tracking
icf.addFlag("InDet.loadTRTSeededSPFinder", True) # control which SP finder is used exclusive with loadSimpleTRTSeededSPFinder control which SP finder is used
icf.addFlag("InDet.loadSimpleTRTSeededSPFinder", True)
icf.addFlag("InDet.doResolveBackTracks", False) # control running the ambi on back tracking
icf.addFlag("InDet.doResolveBackTracks", True) # control running the ambi on back tracking
icf.addFlag("InDet.doTRTStandalone", True) # control TRT Standalone
icf.addFlag("InDet.refitROT", True) # control if refit is done from PRD or ROT
icf.addFlag("InDet.doSlimming", True) # turn track slimming on/off
......@@ -169,7 +170,7 @@ def createInDetConfigFlags():
icf.addFlag("InDet.doTrackSegmentsDisappearing", True) # Turn running of track segment creation in pixel after NewTracking, and with PRD association, on and off
icf.addFlag("InDet.doTRTGlobalOccupancy", False) # Turn running of Event Info TRT Occupancy Filling Alg on and off (also whether it is used in TRT PID calculation)
icf.addFlag("InDet.doNNToTCalibration", False ) # USe ToT calibration for NN clustering rather than Charge
icf.addFlag("InDet.useNNTTrainedNetworks", True ) # Use older NNs stored as TTrainedNetworks in place of default MDNs/other more recent networks. This is necessary for older configuration tags where the trainings were not available.
icf.addFlag("InDet.useNNTTrainedNetworks", False ) # Use older NNs stored as TTrainedNetworks in place of default MDNs/other more recent networks. This is necessary for older configuration tags where the trainings were not available.
icf.addFlag("InDet.keepAdditionalHitsOnTrackParticle", False) # Do not drop first/last hits on track (only for special cases - will blow up TrackParticle szie!!!)
icf.addFlag("InDet.doSCTModuleVeto", False) # Turn on SCT_ModuleVetoSvc, allowing it to be configured later
icf.addFlag("InDet.doParticleConversion", False) # In case anyone still wants to do Rec->xAOD TrackParticle Conversion
......@@ -180,7 +181,12 @@ def createInDetConfigFlags():
icf.addFlag("InDet.usePixelDCS", lambda prevFlags : (prevFlags.InDet.useDCS and prevFlags.Detector.EnablePixel))
icf.addFlag("InDet.useSctDCS", lambda prevFlags : (prevFlags.InDet.useDCS and prevFlags.Detector.EnableSCT))
from InDetConfig.TrackingCutsFlags import createTrackingFlags, createIBLTrackingFlags, createHighPileupTrackingFlags, createMinBiasTrackingFlags, createLargeD0TrackingFlags, createR3LargeD0TrackingFlags, createLowPtLargeD0TrackingFlags, createLowPtTrackingFlags, createVeryLowPtTrackingFlags, createForwardTracksTrackingFlags, createBeamGasTrackingFlags, createVtxLumiTrackingFlags, createVtxBeamSpotTrackingFlags, createCosmicsTrackingFlags, createHeavyIonTrackingFlags, createPixelTrackingFlags, createDisappearingTrackingFlags, createSCTTrackingFlags, createTRTTrackingFlags, createSCTandTRTTrackingFlags, createDBMTrackingFlags
from InDetConfig.TrackingCutsFlags import createTrackingFlags, createIBLTrackingFlags, createHighPileupTrackingFlags, \
createMinBiasTrackingFlags, createLargeD0TrackingFlags, createR3LargeD0TrackingFlags, createLowPtLargeD0TrackingFlags, \
createLowPtTrackingFlags, createVeryLowPtTrackingFlags, createForwardTracksTrackingFlags, createBeamGasTrackingFlags, \
createVtxLumiTrackingFlags, createVtxBeamSpotTrackingFlags, createCosmicsTrackingFlags, createHeavyIonTrackingFlags, \
createPixelTrackingFlags, createDisappearingTrackingFlags, createSCTTrackingFlags, createTRTTrackingFlags, \
createTRTStandaloneTrackingFlags, createSCTandTRTTrackingFlags, createDBMTrackingFlags
icf.addFlagsCategory ("InDet.Tracking", createTrackingFlags, prefix=True)
icf.addFlagsCategory ("InDet.IBLTracking", createIBLTrackingFlags, prefix=True)
......@@ -201,6 +207,7 @@ def createInDetConfigFlags():
icf.addFlagsCategory ("InDet.DisappearingTracking", createDisappearingTrackingFlags, prefix=True)
icf.addFlagsCategory ("InDet.SCTTracking", createSCTTrackingFlags, prefix=True)
icf.addFlagsCategory ("InDet.TRTTracking", createTRTTrackingFlags, prefix=True)
icf.addFlagsCategory ("InDet.TRTStandaloneTracking", createTRTStandaloneTrackingFlags, prefix=True)
icf.addFlagsCategory ("InDet.SCTandTRTTracking", createSCTandTRTTrackingFlags, prefix=True)
icf.addFlagsCategory ("InDet.DBMTracking", createDBMTrackingFlags, prefix=True)
......
......@@ -3,6 +3,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from InDetRecExample.InDetKeys import InDetKeys
def egammaCaloClusterSelectorCfg(ConfigFlags, name="caloClusterROISelector", **kwargs):
result = ComponentAccumulator()
if "egammaCheckEnergyDepositTool" not in kwargs:
......@@ -16,8 +17,18 @@ def egammaCaloClusterSelectorCfg(ConfigFlags, name="caloClusterROISelector", **k
return result
def CaloClusterROI_SelectorCfg(ConfigFlags, name="InDetCaloClusterROISelector", **kwargs):
def egammaHadCaloClusterSelectorCfg(ConfigFlags, name="caloClusterHadROISelector", **kwargs):
result = ComponentAccumulator()
kwargs.setdefault("egammaCheckEnergyDepositTool", "")
kwargs.setdefault("ClusterEtCut", 150e3)
result.setPrivateTools(CompFactory.egammaCaloClusterSelector(name, **kwargs))
return result
def CaloClusterROI_SelectorCfg(ConfigFlags, name="InDetCaloClusterROISelector", **kwargs):
from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg