Skip to content
Snippets Groups Projects
Commit c427570f authored by Benjamin Michael Wynne's avatar Benjamin Michael Wynne Committed by Frank Winklmeier
Browse files

Make loading of bytestream errors conditional on input being bytestream

parent 709565d8
No related branches found
No related tags found
No related merge requests found
......@@ -629,10 +629,17 @@ if DetFlags.haveRIO.SCT_on():
from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool
InDetTrigSCTConditionsSummaryTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryTool'))
# Use the HLT version of the flagged cond data - please tell me there's a better way
# Fix the conditions tools - please tell me there's a better way
from AthenaCommon.GlobalFlags import globalflags
fixedTools = []
for tool in InDetTrigSCTConditionsSummaryTool.ConditionsTools:
if hasattr( tool, "SCT_FlaggedCondData" ):
tool.SCT_FlaggedCondData = "SCT_FlaggedCondData_TRIG"
if not globalflags.InputFormat.is_bytestream() and "ByteStream" in tool.getName():
continue
fixedTools.append( tool )
InDetTrigSCTConditionsSummaryTool.ConditionsTools = fixedTools
else:
InDetTrigSCTConditionsSummaryTool = None
......@@ -725,7 +732,7 @@ if InDetTrigFlags.loadSummaryTool():
usePixel = DetFlags.haveRIO.pixel_on(),
useSCT = DetFlags.haveRIO.SCT_on(),
useTRT = DetFlags.haveRIO.TRT_on())
ToolSvc += InDetTrigTrackSummaryHelperTool
if (InDetTrigFlags.doPrintConfigurables()):
print ( InDetTrigTrackSummaryHelperTool)
......
......@@ -177,7 +177,7 @@ lrtSliceNames = ["electronLRT", "muonLRT", "tauLRT", "bjetLRT", "fullScanLRT"]
class TrigFastTrackFinderBase(TrigFastTrackFinder):
__slots__ = []
def __init__(self, name, slice_name):
def __init__(self, name, slice_name, conditionsTool=None):
TrigFastTrackFinder.__init__(self,name)
#Remapping should be now covered by SliceConfigurationSetting
......@@ -229,8 +229,6 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder):
# switch between Run-2/3 monitoring
self.MonTool = TrigFastTrackFinderMonitoring(slice_name, self.doResMon)
from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool
self.TrackSummaryTool = InDetTrigFastTrackSummaryTool
# why is this TrigFastTrackFinderMonitoring() line added twice ???
# Run3 monitoring
......@@ -296,9 +294,12 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder):
from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiComTrackFinder
InDetTrigSiComTrackFinder_FTF = InDetTrigSiComTrackFinder.clone("InDetTrigSiComTrackFinder_FTF")
from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup
from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool
InDetTrigSiComTrackFinder_FTF.SctSummaryTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryToolWithoutFlagged'))
if conditionsTool == None:
from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool
from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup
InDetTrigSiComTrackFinder_FTF.SctSummaryTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryToolWithoutFlagged'))
else:
InDetTrigSiComTrackFinder_FTF.SctSummaryTool = conditionsTool
ToolSvc += InDetTrigSiComTrackFinder_FTF
......
......@@ -62,13 +62,9 @@ def makeInDetAlgs( config = None, rois = 'EMViewRoIs', doFTF = True, viewVerifie
if not globalflags.InputFormat.is_bytestream():
ViewDataVerifier.DataObjects += [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() )]
topSequence.SGInputLoader.Load += [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() )]
from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
from AthenaCommon.AppMgr import ToolSvc
......@@ -159,9 +155,14 @@ def makeInDetAlgs( config = None, rois = 'EMViewRoIs', doFTF = True, viewVerifie
ToolSvc += InDetClusterMakerTool
from PixelConditionsTools.PixelConditionsToolsConf import PixelConditionsSummaryTool
idPixelSummary = PixelConditionsSummaryTool("PixelConditionsSummaryTool", UseByteStream=globalflags.InputFormat.is_bytestream())
from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool_" + signature,
globalPosAlg = InDetClusterMakerTool)
InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool_" + signature,
PixelConditionsSummaryTool = idPixelSummary,
globalPosAlg = InDetClusterMakerTool)
# Enable duplcated RDO check for data15 because duplication mechanism was used.
from RecExConfig.RecFlags import rec
if len(rec.projectName())>=6 and rec.projectName()[:6]=="data15":
......@@ -214,12 +215,13 @@ def makeInDetAlgs( config = None, rois = 'EMViewRoIs', doFTF = True, viewVerifie
sct_ReadCalibDataToolSetup.setup()
InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools.append(sct_ReadCalibDataToolSetup.getTool().getFullName())
from SCT_ConditionsTools.SCT_ByteStreamErrorsToolSetup import SCT_ByteStreamErrorsToolSetup
sct_ByteStreamErrorsToolSetup = SCT_ByteStreamErrorsToolSetup()
sct_ByteStreamErrorsToolSetup.setToolName("InDetSCT_BSErrorTool_" + signature)
sct_ByteStreamErrorsToolSetup.setConfigTool(sct_ConfigurationConditionsToolSetup.getTool())
sct_ByteStreamErrorsToolSetup.setup()
InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools.append(sct_ByteStreamErrorsToolSetup.getTool().getFullName())
if (globalflags.InputFormat.is_bytestream()):
from SCT_ConditionsTools.SCT_ByteStreamErrorsToolSetup import SCT_ByteStreamErrorsToolSetup
sct_ByteStreamErrorsToolSetup = SCT_ByteStreamErrorsToolSetup()
sct_ByteStreamErrorsToolSetup.setToolName("InDetSCT_BSErrorTool_" + signature)
sct_ByteStreamErrorsToolSetup.setConfigTool(sct_ConfigurationConditionsToolSetup.getTool())
sct_ByteStreamErrorsToolSetup.setup()
InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools.append(sct_ByteStreamErrorsToolSetup.getTool().getFullName())
if (InDetTrigFlags.doPrintConfigurables()):
print (InDetSCT_ConditionsSummaryToolWithoutFlagged) # noqa: ATL901
......@@ -305,7 +307,8 @@ def makeInDetAlgs( config = None, rois = 'EMViewRoIs', doFTF = True, viewVerifie
from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinderBase
#TODO: eventually adapt IDTrigConfig also in FTF configuration (pass as additional param)
theFTF = TrigFastTrackFinderBase("TrigFastTrackFinder_" + signature, config.FT.signatureType )
theFTF = TrigFastTrackFinderBase("TrigFastTrackFinder_" + signature, config.FT.signatureType,
conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged )
theFTF.RoIs = rois
theFTF.TracksName = config.FT.trkTracksFTF()
theFTF.doCloneRemoval = config.FT.setting.doCloneRemoval
......
......@@ -812,9 +812,11 @@ def muEFCBRecoSequence( RoIs, name ):
if 'FS' in name:
cbMuonName = muNamesFS.EFCBName
import AthenaCommon.CfgGetter as CfgGetter
themuoncbcreatoralg = MuonCreatorAlg("TrigMuonCreatorAlgCB_"+name, MuonCandidateLocation=candidatesName, TagMaps=["muidcoTagMap"], InDetCandidateLocation="InDetCandidates_"+name,
MuonContainerLocation = cbMuonName, SegmentContainerName = "xaodCBSegments", TrackSegmentContainerName = "TrkCBSegments", ExtrapolatedLocation = "CBExtrapolatedMuons",
MSOnlyExtrapolatedLocation = "CBMSonlyExtrapolatedMuons", CombinedLocation = "HLT_CBCombinedMuon_"+name,
MuonCreatorTool = CfgGetter.getPrivateToolClone("TrigMuonCreatorToolCB", "MuonCreatorTool", TrackSummaryTool = CfgGetter.getPublicTool("MuonTrackSummaryTool")),
MonTool = MuonCreatorAlgMonitoring("MuonCreatorAlgCB_"+name))
#Add all algorithms
......
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