Commit c917e266 authored by Johannes Junggeburth's avatar Johannes Junggeburth
Browse files

Squash commits

parent adfc5974
......@@ -813,7 +813,7 @@ unsigned int EvtInclusiveDecay::printTree(HepMC::GenParticlePtr p,
std::string EvtInclusiveDecay::pdgName(HepMC::ConstGenParticlePtr p, bool statusHighlighting, std::set<HepMC::GenParticlePtr>* barcodeList) {
std::ostringstream buf;
bool inlist=false;
for (auto pinl: *barcodeList) if (pinl&&p) if (pinl.get()==p.get()) inlist=true;
if (barcodeList) for (auto pinl: *barcodeList) if (pinl&&p) if (pinl.get()==p.get()) inlist=true;
if (statusHighlighting) {
if ( ((barcodeList!=0) && (inlist)) ||
((barcodeList==0) && isToBeDecayed(p,false)) )
......
......@@ -61,3 +61,24 @@ def TRTPhaseCondCfg(flags, name="TRTPhaseCondAlg", **kwargs):
className='TRTCond::StrawT0MultChanContainer'))
acc.addCondAlgo(CompFactory.TRTPhaseCondAlg(name, **kwargs))
return acc
def TRTToTCondAlgCfg(flags, name="TRTToTCondAlg", **kwargs):
"""Return a ComponentAccumulator for TRTToTCondAlg algorithm"""
acc = ComponentAccumulator()
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/ToT/ToTVectors", "/TRT/Calib/ToT/ToTVectors", className="CondAttrListVec"))
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/ToT/ToTValue", "/TRT/Calib/ToT/ToTValue", className="CondAttrListCollection"))
kwargs.setdefault("ToTWriteKey", "Dedxcorrection")
acc.addCondAlgo(CompFactory.TRTToTCondAlg(name, **kwargs))
return acc
def TRTHTCondAlgCfg(flags, name="TRTHTCondAlg", **kwargs):
"""Return a ComponentAccumulator for TRTHTCondAlg algorithm"""
acc = ComponentAccumulator()
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/PID_vector", "/TRT/Calib/PID_vector", className="CondAttrListVec"))
kwargs.setdefault("HTWriteKey", "HTcalculator")
acc.addCondAlgo(CompFactory.TRTHTCondAlg(name, **kwargs))
return acc
......@@ -174,43 +174,7 @@ def TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTR
acc.setPrivateTools(TRT_DriftCircleTool(name, **kwargs))
return acc
def TRT_LocalOccupancyCfg(flags, name = "InDet_TRT_LocalOccupancy", **kwargs):
acc = ComponentAccumulator()
# Calibration DB Service
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
# Straw status DB Tool
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
kwargs.setdefault("isTrigger", False)
kwargs.setdefault("TRTCalDbTool", CalDbTool)
kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
InDetTRT_LocalOccupancy = CompFactory.TRT_LocalOccupancy(name, **kwargs)
acc.setPrivateTools(InDetTRT_LocalOccupancy)
return acc
def TRTOccupancyIncludeCfg(flags, name = "InDetTRT_TRTOccupancyInclude", **kwargs):
acc = ComponentAccumulator()
# Calibration DB Service
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
# Straw status DB Tool
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
InDetTRT_LocalOccupancy = acc.popToolsAndMerge(TRT_LocalOccupancyCfg(flags))
acc.addPublicTool(InDetTRT_LocalOccupancy)
kwargs.setdefault("isTrigger", False)
kwargs.setdefault("TRTCalDbTool", CalDbTool)
kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
kwargs.setdefault("TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
acc.addEventAlgo(CompFactory.TRTOccupancyInclude(name, **kwargs))
return acc
def InDetTRT_RIO_MakerCfg(flags, useTimeInfo, usePhase, prefix, collection, name = "InDetTRT_RIO_Maker", **kwargs):
acc = ComponentAccumulator()
......@@ -294,7 +258,8 @@ def TRTPreProcessingCfg(flags, useTimeInfo = True, usePhase = False, **kwargs):
# Include alg to save the local occupancy inside xAOD::EventInfo
#
if flags.InDet.doTRTGlobalOccupancy:
acc.merge(TRTOccupancyIncludeCfg(flags, name = prefix +"TRTOccupancyInclude"))
from InDetConfig.TRT_ElectronPidToolsConfig import TRTOccupancyIncludeCfg
acc.merge(TRTOccupancyIncludeCfg(flags, name=prefix + "TRTOccupancyInclude"))
#
# --- we need to do truth association if requested (not for uncalibrated hits in cosmics)
#
......
......@@ -243,29 +243,17 @@ if __name__ == "__main__":
top_acc.merge(TC.PixelClusterNnWithTrackCondAlgCfg(ConfigFlags))
###
###
top_acc.merge(addFoldersSplitOnline(ConfigFlags, "TRT", "/TRT/Onl/Calib/PID_vector", "/TRT/Calib/PID_vector", className='CondAttrListVec'))
# HT probability algorithm
TRTHTCondAlg = CompFactory.TRTHTCondAlg(name = "TRTHTCondAlg", HTWriteKey = "HTcalculator")
top_acc.addCondAlgo(TRTHTCondAlg)
###
###
top_acc.merge(addFoldersSplitOnline(ConfigFlags, "PIXEL", "/PIXEL/PixdEdx", "/PIXEL/PixdEdx", className='AthenaAttributeList'))
PixeldEdxAlg = CompFactory.PixeldEdxAlg(name="PixeldEdxAlg", ReadFromCOOL = True)
top_acc.addCondAlgo(PixeldEdxAlg)
###
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTStrawCondAlgCfg
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTStrawCondAlgCfg, TRTToTCondAlg, TRTHTCondAlgCfg
top_acc.merge(TRTStrawCondAlgCfg(ConfigFlags))
top_acc.merge(TRTToTCondAlg(ConfigFlags))
top_acc.merge(TRTHTCondAlgCfg(ConfigFlags))
###
###
top_acc.merge(addFoldersSplitOnline(ConfigFlags, "TRT", "/TRT/Onl/Calib/ToT/ToTVectors", "/TRT/Calib/ToT/ToTVectors", className='CondAttrListVec'))
top_acc.merge(addFoldersSplitOnline(ConfigFlags, "TRT", "/TRT/Onl/Calib/ToT/ToTValue", "/TRT/Calib/ToT/ToTValue", className='CondAttrListCollection'))
TRTToTCondAlg = CompFactory.TRTToTCondAlg( name = "TRTToTCondAlg",
ToTWriteKey = "Dedxcorrection")
top_acc.addCondAlgo(TRTToTCondAlg)
###
###
from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool, PixelLorentzAngleCfg
......
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def TRT_LocalOccupancyCfg(flags, name="TRT_LocalOccupancy", **kwargs):
acc = ComponentAccumulator()
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool) # public as it is has many clients to save some memory
kwargs.setdefault("TRTCalDbTool", CalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
StrawStatusTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(StrawStatusTool) # public as it is has many clients to save some memory
kwargs.setdefault("TRTStrawStatusSummaryTool", StrawStatusTool )
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTStrawCondAlgCfg
acc.merge(TRTStrawCondAlgCfg(flags))
kwargs.setdefault("isTrigger", False)
if "TRT_DriftCircleCollection" not in kwargs:
# TODO: Drift circles
pass
acc.setPrivateTools(CompFactory.InDet.TRT_LocalOccupancy(name, **kwargs))
return acc
def TRT_OverlayLocalOccupancyCfg(flags, name="TRT_OverlayLocalOccupancy", **kwargs):
"""Return a ComponentAccumulator for overlay TRT_LocalOccupancy Tool"""
kwargs.setdefault("TRT_DriftCircleCollection", "")
return TRT_LocalOccupancyCfg(flags, name, **kwargs)
def TRTOccupancyIncludeCfg(flags, name="TRTOccupancyInclude", **kwargs):
acc = ComponentAccumulator()
tool = acc.popToolsAndMerge(TRT_LocalOccupancyCfg(flags))
acc.addPublicTool(tool)
kwargs.setdefault("TRT_LocalOccupancyTool", tool)
acc.addEventAlgo(CompFactory.TRTOccupancyInclude(name, **kwargs))
return acc
def TRT_dEdxToolCfg(flags, name="TRT_dEdxTool", **kwargs):
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTToTCondAlgCfg
acc = TRTToTCondAlgCfg(flags)
kwargs.setdefault("TRT_dEdx_isData", not flags.Input.isMC)
kwargs.setdefault("TRT_LocalOccupancyTool", acc.popToolsAndMerge(TRT_LocalOccupancyCfg(flags)))
acc.setPrivateTools(CompFactory.TRT_ToT_dEdx(name, **kwargs))
return acc
def TRT_ElectronPidToolCfg(flags, name="TRT_ElectronPidTool", **kwargs):
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTHTCondAlgCfg
acc = TRTHTCondAlgCfg(flags)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
StrawStatusTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(StrawStatusTool) # public as it is has many clients to save some memory
kwargs.setdefault("TRTStrawSummaryTool", StrawStatusTool)
kwargs.setdefault("TRT_LocalOccupancyTool", acc.popToolsAndMerge(TRT_LocalOccupancyCfg(flags)))
kwargs.setdefault("TRT_ToT_dEdx_Tool", acc.popToolsAndMerge(TRT_dEdxToolCfg(flags)))
kwargs.setdefault("CalculateNNPid", False) # TODO fixme once the flag is there: flags.InDet.doTRTPIDNN
acc.setPrivateTools(CompFactory.InDet.TRT_ElectronPidToolRun2(name, **kwargs))
return acc
......@@ -463,101 +463,6 @@ def InDetSummaryHelperSharedHitsCfg(flags, name='InDetSummaryHelperSharedHits',
return acc
def InDetTRT_LocalOccupancyCfg(flags, name ="InDet_TRT_LocalOccupancy", **kwargs):
acc = ComponentAccumulator()
the_name = makeName( name, kwargs)
if 'TRTCalDbTool' not in kwargs :
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
kwargs.setdefault( "TRTCalDbTool", CalDbTool )
if 'TRTStrawStatusSummaryTool' not in kwargs :
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
kwargs.setdefault( "TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool )
kwargs.setdefault("isTrigger", False)
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTStrawCondAlgCfg
acc.merge( TRTStrawCondAlgCfg(flags) )
InDetTRT_LocalOccupancy = CompFactory.InDet.TRT_LocalOccupancy(name=the_name, **kwargs )
acc.setPrivateTools(InDetTRT_LocalOccupancy)
return acc
def TRTToTCondAlgCfg(flags, name = "TRTToTCondAlg", **kwargs):
acc = ComponentAccumulator()
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/ToT/ToTVectors", "/TRT/Calib/ToT/ToTVectors", className='CondAttrListVec'))
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/ToT/ToTValue", "/TRT/Calib/ToT/ToTValue", className='CondAttrListCollection'))
TRTToTCondAlg = CompFactory.TRTToTCondAlg( name = name,
ToTWriteKey = "Dedxcorrection",
**kwargs)
acc.addCondAlgo(TRTToTCondAlg)
return acc
def InDetTRT_dEdxToolCfg(flags, name = "InDetTRT_dEdxTool", **kwargs):
acc = ComponentAccumulator()
the_name = makeName( name, kwargs)
if not flags.Detector.EnableTRT or flags.InDet.doHighPileup \
or flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
return None
kwargs.setdefault("TRT_dEdx_isData", not flags.Input.isMC)
if 'TRT_LocalOccupancyTool' not in kwargs :
InDetTRT_LocalOccupancy = acc.popToolsAndMerge(InDetTRT_LocalOccupancyCfg(flags))
kwargs.setdefault( "TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
acc.merge(TRTToTCondAlgCfg(flags))
acc.setPrivateTools(CompFactory.TRT_ToT_dEdx(name = the_name, **kwargs))
return acc
def TRTHTCondAlg(flags, name = "TRTHTCondAlg", **kwargs):
acc = ComponentAccumulator()
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/PID_vector", "/TRT/Calib/PID_vector", className='CondAttrListVec'))
TRTHTCondAlg = CompFactory.TRTHTCondAlg(name = name, HTWriteKey = "HTcalculator", **kwargs)
acc.addCondAlgo(TRTHTCondAlg)
return acc
def InDetTRT_ElectronPidToolCfg(flags, name = "InDetTRT_ElectronPidTool", **kwargs):
acc = ComponentAccumulator()
the_name = makeName( name, kwargs)
if not flags.Detector.EnableTRT or flags.InDet.doHighPileup \
or flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
return None
if 'TRTStrawSummaryTool' not in kwargs :
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
kwargs.setdefault( "TRTStrawSummaryTool", InDetTRTStrawStatusSummaryTool)
if 'TRT_LocalOccupancyTool' not in kwargs :
InDetTRT_LocalOccupancy = acc.popToolsAndMerge(InDetTRT_LocalOccupancyCfg(flags))
acc.addPublicTool(InDetTRT_LocalOccupancy)
kwargs.setdefault( "TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
if 'TRT_ToT_dEdx_Tool' not in kwargs :
dEdxAcc = InDetTRT_dEdxToolCfg(flags)
if dEdxAcc is not None:
InDetTRT_dEdxTool = acc.popToolsAndMerge(dEdxAcc)
acc.addPublicTool(InDetTRT_dEdxTool)
else:
InDetTRT_dEdxTool = None
kwargs.setdefault( "TRT_ToT_dEdx_Tool", InDetTRT_dEdxTool)
kwargs.setdefault( "CalculateNNPid", False) #TODO fixme once the flag is there flags.InDet.doTRTPIDNN)
acc.merge(TRTHTCondAlg(flags))
acc.setPrivateTools(CompFactory.InDet.TRT_ElectronPidToolRun2(name = the_name, **kwargs))
return acc
def InDetTrackSummaryToolSharedHitsCfg(flags, name='InDetTrackSummaryToolSharedHits',**kwargs):
acc = ComponentAccumulator()
if 'InDetSummaryHelperTool' not in kwargs :
......@@ -573,13 +478,12 @@ def InDetTrackSummaryToolSharedHitsCfg(flags, name='InDetTrackSummaryToolSharedH
kwargs.setdefault("InDetSummaryHelperTool", InDetSummaryHelperSharedHits)
if 'TRT_ElectronPidTool' not in kwargs:
PIDToolAcc = InDetTRT_ElectronPidToolCfg(flags)
if PIDToolAcc is not None:
InDetTRT_ElectronPidTool = acc.popToolsAndMerge(PIDToolAcc)
acc.addPublicTool(InDetTRT_ElectronPidTool)
if not flags.Detector.EnableTRT or flags.InDet.doHighPileup \
or flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
kwargs.setdefault("TRT_ElectronPidTool", None)
else:
InDetTRT_ElectronPidTool = None
kwargs.setdefault("TRT_ElectronPidTool", InDetTRT_ElectronPidTool)
from InDetConfig.TRT_ElectronPidToolsConfig import TRT_ElectronPidToolCfg
kwargs.setdefault("TRT_ElectronPidTool", acc.popToolsAndMerge(TRT_ElectronPidToolCfg(flags)))
if 'PixelToTPIDTool' not in kwargs :
InDetPixelToTPIDTool = acc.popToolsAndMerge(InDetPixelToTPIDToolCfg(flags))
......@@ -1287,12 +1191,12 @@ def InDetTrackSummaryToolNoHoleSearchCfg(flags, name='InDetTrackSummaryToolNoHol
acc.setPrivateTools(InDetTrackSummaryTool)
return acc
def InDetROIInfoVecCondAlgCfg(name='InDetROIInfoVecCondAlg', **kwargs) :
def ROIInfoVecAlgCfg(name='InDetROIInfoVecCondAlg', **kwargs) :
acc = ComponentAccumulator()
kwargs.setdefault("InputEmClusterContainerName", 'InDetCaloClusterROIs')
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))
return acc
def InDetAmbiScoringToolBaseCfg(flags, name='InDetAmbiScoringTool', **kwargs) :
......@@ -1311,7 +1215,7 @@ def InDetAmbiScoringToolBaseCfg(flags, name='InDetAmbiScoringTool', **kwargs) :
from AthenaCommon.DetFlags import DetFlags
have_calo_rois = flags.InDet.doBremRecovery and flags.InDet.doCaloSeededBrem and DetFlags.detdescr.Calo_allOn()
if have_calo_rois :
alg = acc.popToolsAndMerge(InDetROIInfoVecCondAlgCfg())
alg = acc.popToolsAndMerge(ROIInfoVecAlgCfg())
kwargs.setdefault("CaloROIInfoName", alg.WriteKey )
kwargs.setdefault("SummaryTool", InDetTrackSummaryTool )
kwargs.setdefault("useAmbigFcn", True )
......@@ -1490,7 +1394,7 @@ def InDetNNScoringToolBaseCfg(flags, name='InDetNNScoringTool', **kwargs) :
from AthenaCommon.DetFlags import DetFlags
have_calo_rois = flags.InDet.doBremRecovery and flags.InDet.doCaloSeededBrem and DetFlags.detdescr.Calo_allOn()
if have_calo_rois :
alg = acc.popToolsAndMerge(InDetROIInfoVecCondAlgCfg())
alg = acc.popToolsAndMerge(ROIInfoVecAlgCfg())
kwargs.setdefault("CaloROIInfoName", alg.WriteKey )
from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg
......
......@@ -7,6 +7,6 @@ EventPersistencySvc.CnvServices += { "DetDescrCnvSvc" };
GeoModelSvc.AtlasVersion = "ATLAS-P2-ITK-24-00-00";
GeoModelSvc.SupportedGeometry = 22;
GeoModelSvc.DetectorTools = ["ITkPixelDetectorTool/ITkPixelDetectorTool"];
GeoModelSvc.DetectorTools = ["ITk::PixelDetectorTool/ITkPixelDetectorTool"];
GeoModelSvc.ITkPixelDetectorTool.Alignable = False;
GeoModelSvc.ITkPixelDetectorTool.DetectorName = "ITkPixel";
......@@ -51,8 +51,6 @@ def TRTOverlayAlgCfg(flags, name="TRTOverlay", **kwargs):
acc = ComponentAccumulator()
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
acc.merge(TRT_ReadoutGeometryCfg(flags))
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTStrawCondAlgCfg
acc.merge(TRTStrawCondAlgCfg(flags))
kwargs.setdefault("SortBkgInput", flags.Overlay.DataOverlay)
kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "TRT_RDOs")
......@@ -66,16 +64,16 @@ def TRTOverlayAlgCfg(flags, name="TRTOverlay", **kwargs):
kwargs.setdefault("TRT_HT_OccupancyCorrectionBarrelNoE", 0.060)
kwargs.setdefault("TRT_HT_OccupancyCorrectionEndcapNoE", 0.050)
# Do TRT overlay
TRTOverlay = CompFactory.TRTOverlay
alg = TRTOverlay(name, **kwargs)
from InDetConfig.TRT_ElectronPidToolsConfig import TRT_OverlayLocalOccupancyCfg
kwargs.setdefault("TRT_LocalOccupancyTool", acc.popToolsAndMerge(TRT_OverlayLocalOccupancyCfg(flags)))
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
from InDetOverlay.TRT_ConditionsConfig import TRT_LocalOccupancyCfg
alg.TRT_LocalOccupancyTool = acc.popToolsAndMerge(
TRT_LocalOccupancyCfg(flags))
alg.TRTStrawSummaryTool = acc.popToolsAndMerge(
TRT_StrawStatusSummaryToolCfg(flags))
StrawStatusTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(StrawStatusTool) # public as it is has many clients to save some memory
kwargs.setdefault("TRTStrawSummaryTool", StrawStatusTool)
# Do TRT overlay
alg = CompFactory.TRTOverlay(name, **kwargs)
acc.addEventAlgo(alg)
# Setup output
......
......@@ -18,27 +18,6 @@ def TRT_OnlineFoldersCfg(flags):
return acc
def TRT_LocalOccupancyCfg(flags, name="TRT_LocalOccupancy"):
"""Return a ComponentAccumulator for TRT_LocalOccupancy Tool"""
acc = ComponentAccumulator()
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg, TRT_StrawStatusSummaryToolCfg
trtCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
trtStrawStatusSummaryTool = acc.popToolsAndMerge(
TRT_StrawStatusSummaryToolCfg(flags))
InDet__TRT_LocalOccupancy = CompFactory.InDet.TRT_LocalOccupancy
acc.setPrivateTools(InDet__TRT_LocalOccupancy(name="TRT_LocalOccupancy",
isTrigger=False,
TRTCalDbTool=trtCalDbTool,
TRTStrawStatusSummaryTool=trtStrawStatusSummaryTool,
TRT_RDOContainerName="",
TRT_DriftCircleCollection="",
))
return acc
def TRT_CablingSvcCfg(flags):
"""Return a ComponentAccumulator for TRT_CablingSvc service"""
acc = ComponentAccumulator()
......
......@@ -365,11 +365,16 @@ namespace InDet {
// this builds the single pixel connection and breaks if the max number of elements is reached:
if( (deltaCol+deltaRow) == 1 or (m_addCorners and deltaCol == 1 and deltaRow == 1) ) {
try{
int NC1 = currentConnection.NC;
int NC2 = otherConnection.NC;
int maxPossible = currentConnection.CON.size() - 1; //both are the same
if ((NC1>maxPossible) or (NC2>maxPossible)){
std::string m="attempt to access connection array of dimension 8 at idx "+std::to_string(currentConnection.NC);
ATH_MSG_WARNING(m);
break;
} else {
currentConnection.CON.at(currentConnection.NC++) = otherPixel;
otherConnection.CON.at(otherConnection.NC++) = currentPixel ;
} catch (const std::out_of_range & ){
throw std::runtime_error("attempt to access connection array beyond its size in MergedPixelsTool::clusterize");
}
if(++NB==maxElements) {
break;
......
......@@ -37,7 +37,7 @@ def LArMonitoringConfig(inputFlags):
acc.merge(LArFEBMonConfig(inputFlags))
acc.merge(LArDigitMonConfig(inputFlags))
from LArConditionsCommon.LArCool import larcool
if (larcool.runType() != 0): #RawData + Result
if (larcool is not None and larcool.runType() != 0): #RawData + Result
acc.merge(LArRODMonConfig(inputFlags))
acc.merge(LArCoverageConfig(inputFlags))
acc.merge(LArNoiseCorrelationMonConfig(inputFlags))
......
#
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
#from AthenaCommon.Include import include #needed for LArSuperCellBCIDEmAlg
#from AthenaCommon.AppMgr import ServiceMgr as svcMgr
def LArSuperCellMonConfigOld(inputFlags):
from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelperOld
from LArMonitoring.LArMonitoringConf import LArSuperCellMonAlg
helper = AthMonitorCfgHelperOld(inputFlags, 'LArSuperCellMonAlgOldCfg')
from AthenaCommon.BeamFlags import jobproperties
if jobproperties.Beam.beamType() == 'cosmics':
isCosmics=True
else:
isCosmics=False
from AthenaCommon.GlobalFlags import globalflags
if globalflags.DataSource() == 'data':
isMC=False
else:
isMC=True
if not isMC:
from LumiBlockComps.LBDurationCondAlgDefault import LBDurationCondAlgDefault
LBDurationCondAlgDefault()
from LumiBlockComps.TrigLiveFractionCondAlgDefault import TrigLiveFractionCondAlgDefault
TrigLiveFractionCondAlgDefault()
from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault
LuminosityCondAlgDefault()
from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
CaloNoiseCondAlg()
algo = LArSuperCellMonConfigCore(helper, LArSuperCellMonAlg,inputFlags,isCosmics, isMC)
from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool
algo.ReadyFilterTool = GetAtlasReadyFilterTool()
from AthenaMonitoring.BadLBFilterTool import GetLArBadLBFilterTool
algo.BadLBTool = GetLArBadLBFilterTool()
return helper.result()
def LArSuperCellMonConfig(inputFlags):
from AthenaCommon.Logging import logging
mlog = logging.getLogger( 'LArSuperCellMonConfig' )
from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelper
helper = AthMonitorCfgHelper(inputFlags,'LArSuperCellMonAlgCfg')
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
cfg=ComponentAccumulator()
if not inputFlags.DQ.enableLumiAccess:
mlog.warning('This algo needs Lumi access, returning empty config')
return cfg
from LArGeoAlgsNV.LArGMConfig import LArGMCfg
cfg.merge(LArGMCfg(inputFlags))
from TileGeoModel.TileGMConfig import TileGMCfg
cfg.merge(TileGMCfg(inputFlags))
from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
cfg.merge(DetDescrCnvSvcCfg(inputFlags))
from LArCellRec.LArCollisionTimeConfig import LArCollisionTimeCfg
cfg.merge(LArCollisionTimeCfg(inputFlags))
from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
cfg.merge(CaloNoiseCondAlgCfg(inputFlags))
cfg.merge(CaloNoiseCondAlgCfg(inputFlags,noisetype="electronicNoise"))
from LArROD.LArSCSimpleMakerConfig import LArSCSimpleMakerCfg, LArSuperCellBCIDEmAlgCfg
cfg.merge(LArSCSimpleMakerCfg(inputFlags))
cfg.merge(LArSuperCellBCIDEmAlgCfg(inputFlags))
from AthenaConfiguration.ComponentFactory import CompFactory
lArCellMonAlg=CompFactory.LArSuperCellMonAlg
if inputFlags.Input.isMC is False:
from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg
cfg.merge(LuminosityCondAlgCfg(inputFlags))
from LumiBlockComps.LBDurationCondAlgConfig import LBDurationCondAlgCfg
cfg.merge(LBDurationCondAlgCfg(inputFlags))
algname='LArSuperCellMonAlg'
if inputFlags.Beam.Type == 'cosmics':
algname=algname+'Cosmics'
isCosmics = ( inputFlags.Beam.Type == 'cosmics' )
algo = LArSuperCellMonConfigCore(helper, lArCellMonAlg ,inputFlags, isCosmics, inputFlags.Input.isMC, algname)
#if not inputFlags.Input.isMC:
# from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
# algo.BadLBTool=cfg.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))
print("Check the Algorithm properties",algo)
cfg.merge(helper.result())
return cfg
def LArSuperCellMonConfigCore(helper, algclass, inputFlags, isCosmics=False, isMC=False, algname='LArSuperCellMonAlg'):
LArSuperCellMonAlg = helper.addAlgorithm(algclass, algname)