Skip to content
Snippets Groups Projects
Commit b51a4726 authored by Duc Ta's avatar Duc Ta
Browse files

Merge branch 'atlasrects-7951' into '24.0'

Fix cluster link in IDTRKVALID and PIXELVALID (ATLASRECTS-7951)

See merge request !70410
parents 655bac86 3e4b2b05
No related branches found
No related tags found
2 merge requests!704662024-04-09: merge of 24.0 into main,!70410Fix cluster link in IDTRKVALID and PIXELVALID (ATLASRECTS-7951)
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
#!/usr/bin/env python
# ====================================================================
# IDTRKVALID.py
......@@ -32,7 +32,7 @@ def IDTRKVALID_ANDToolCfg(flags, name='IDTRKVALID_ANDTool'):
SecondObjectRequirements = sel_muon2,
MassHypothesis = 105.66,
SecondMassHypothesis = 105.66,
StoreGateEntryName = "ZmumuMass"))
StoreGateEntryName = "DRZmumuMass"))
IDTRKVALID_SkimmingTool = acc.getPrimaryAndMerge(
xAODStringSkimmingToolCfg(flags, name="IDTRKVALID_SkimmingTool",
......@@ -85,9 +85,6 @@ def IDTRKVALIDKernelCommonCfg(flags, name='IDTRKVALIDKernel'):
IDTRKVALID_ANDTool = acc.getPrimaryAndMerge(IDTRKVALID_ANDToolCfg(flags))
skimmingTools.append(IDTRKVALID_ANDTool)
acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"IDTRKVALIDKernelPresel", SkimmingTools=skimmingTools))
# ====================================================================
# CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS
# ====================================================================
......@@ -112,18 +109,6 @@ def IDTRKVALID_PixelModuleStatus_KernelCfg(
DFEI = acc.getPrimaryAndMerge(EventInfoPixelModuleStatusMonitoringCfg(flags))
augmentationTools.append(DFEI)
skimmingTools = []
if flags.InDet.DRAWZSelection:
IDTRKVALID_ANDTool = acc.getPrimaryAndMerge(IDTRKVALID_ANDToolCfg(flags))
skimmingTools.append(IDTRKVALID_ANDTool)
acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
name,
AugmentationTools = augmentationTools,
SkimmingTools = skimmingTools,
ThinningTools = [],
RunSkimmingFirst = True))
return acc
def IDTRKVALID_ITkPixelModuleStatus_KernelCfg(
......@@ -138,18 +123,6 @@ def IDTRKVALID_ITkPixelModuleStatus_KernelCfg(
ITkEventInfoPixelModuleStatusMonitoringCfg(flags))
augmentationTools.append(DFEI)
skimmingTools = []
if flags.InDet.DRAWZSelection:
IDTRKVALID_ANDTool = acc.getPrimaryAndMerge(IDTRKVALID_ANDToolCfg(flags))
skimmingTools.append(IDTRKVALID_ANDTool)
acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
name,
AugmentationTools = augmentationTools,
SkimmingTools = skimmingTools,
ThinningTools = [],
RunSkimmingFirst = True))
return acc
def IDTRKVALIDThinningKernelCfg(
......@@ -302,11 +275,15 @@ def IDTRKVALIDCfg(flags):
IDTRKVALIDSlimmingHelper.AppendToDictionary.update({
"PixelClusters": "xAOD::TrackMeasurementValidationContainer",
"PixelClustersAux": "xAOD::TrackMeasurementValidationAuxContainer",
"PixelMSOSs": "xAOD::TrackStateValidationContainer",
"PixelMSOSsAux": "xAOD::TrackStateValidationAuxContainer"
})
if flags.InDet.DAODStoreSCT:
IDTRKVALIDSlimmingHelper.AppendToDictionary.update({
"SCT_Clusters": "xAOD::TrackMeasurementValidationContainer",
"SCT_ClustersAux": "xAOD::TrackMeasurementValidationAuxContainer"
"SCT_ClustersAux": "xAOD::TrackMeasurementValidationAuxContainer",
"SCT_MSOSs": "xAOD::TrackStateValidationContainer",
"SCT_MSOSsAux": "xAOD::TrackStateValidationAuxContainer"
})
if flags.Detector.GeometryITk:
......@@ -314,11 +291,15 @@ def IDTRKVALIDCfg(flags):
IDTRKVALIDSlimmingHelper.AppendToDictionary.update({
"ITkPixelClusters": "xAOD::TrackMeasurementValidationContainer",
"ITkPixelClustersAux": "xAOD::TrackMeasurementValidationAuxContainer",
"ITkPixelMSOSs": "xAOD::TrackStateValidationContainer",
"ITkPixelMSOSsAux": "xAOD::TrackStateValidationAuxContainer"
})
if flags.ITk.DAODStoreStrip:
IDTRKVALIDSlimmingHelper.AppendToDictionary.update({
"ITkStripClusters": "xAOD::TrackMeasurementValidationContainer",
"ITkStripClustersAux": "xAOD::TrackMeasurementValidationAuxContainer"
"ITkStripClustersAux": "xAOD::TrackMeasurementValidationAuxContainer",
"ITkStripMSOSs": "xAOD::TrackStateValidationContainer",
"ITkStripMSOSsAux": "xAOD::TrackStateValidationAuxContainer"
})
SmartCollections += ["Muons", "Electrons", "Photons"]
......@@ -337,14 +318,14 @@ def IDTRKVALIDCfg(flags):
if flags.Detector.GeometryID:
if flags.InDet.DAODStorePixel:
AllVariables += ["PixelClusters"]
AllVariables += ["PixelClusters","PixelMSOSs"]
if flags.InDet.DAODStoreSCT:
AllVariables += ["SCT_Clusters"]
AllVariables += ["SCT_Clusters","SCT_MSOSs"]
if flags.Detector.GeometryITk:
if flags.ITk.DAODStorePixel:
AllVariables += ["ITkPixelClusters"]
AllVariables += ["ITkPixelClusters","ITkPixelMSOSs"]
if flags.ITk.DAODStoreStrip:
AllVariables += ["ITkStripClusters"]
AllVariables += ["ITkStripClusters","ITkStripMSOSs"]
IDTRKVALIDSlimmingHelper.AppendToDictionary.update({
"TauJets": "xAOD::TauJetContainer",
......
......@@ -265,7 +265,6 @@ namespace DerivationFramework {
decorTRTPhase(*eventInfo) = trtPhase_time;
} //extra event info
// --- Add track states containers
if(m_addPRD){
// Get clusters and the mapping between xAOD::PRD and Trk::PRD
......@@ -666,7 +665,6 @@ namespace DerivationFramework {
}
// Track extrapolation
std::unique_ptr<const Trk::TrackParameters> extrap( m_extrapolator->extrapolateTrack(ctx,*trkTrack,trackState->surface()) );
......@@ -723,8 +721,11 @@ namespace DerivationFramework {
}
}
if(!measurement)
continue;
if(!measurement) { continue; }
if (isTRT && !trtDCOffsets.isValid() && !trtDCs.isValid()) { continue; }
if (isSCT && !sctClusterOffsets.isValid() && !sctClusters.isValid()) { continue; }
if (isPixel && !pixelClusterOffsets.isValid() && !pixelClusters.isValid()) { continue; }
const Trk::RIO_OnTrack* hit = measurement ? dynamic_cast<const Trk::RIO_OnTrack*>(measurement) : nullptr;
......
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