6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
10 """Configure the common augmentation"""
14 from DerivationFrameworkInDet.InDetToolsConfig
import TrackParticleThinningCfg, MuonTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
15 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import GenericObjectThinningCfg
16 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig
import CaloClusterThinningCfg
17 from DerivationFrameworkTau.TauCommonConfig
import TauThinningCfg
21 if "TrackParticleThinningToolName" in kwargs:
22 tp_thinning_expression =
"InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm && InDetTrackParticles.pt > 10*GeV"
25 name = kwargs[
'TrackParticleThinningToolName'],
26 StreamName = StreamName,
27 SelectionString = tp_thinning_expression,
28 InDetTrackParticlesKey =
"InDetTrackParticles"))
31 if "MuonTPThinningToolName" in kwargs:
34 name = kwargs[
'MuonTPThinningToolName'],
35 StreamName = StreamName,
37 InDetTrackParticlesKey =
"InDetTrackParticles"))
40 if "TauJetThinningToolName" in kwargs:
41 tau_thinning_expression = f
"TauJets.pt >= {flags.Tau.MinPtDAOD}"
43 name = kwargs[
'TauJetThinningToolName'],
44 StreamName = StreamName,
46 TauTracks =
"TauTracks",
47 TrackParticles =
"InDetTrackParticles",
48 TauNeutralPFOs =
"TauNeutralParticleFlowObjects",
49 TauSecondaryVertices =
"TauSecondaryVertices",
50 SelectionString = tau_thinning_expression))
52 if "TauJets_MuonRMThinningToolName" in kwargs:
53 tau_murm_thinning_expression = tau_thinning_expression.replace(
'TauJets',
'TauJets_MuonRM')
55 name = kwargs[
'TauJets_MuonRMThinningToolName'],
56 StreamName = StreamName,
57 Taus =
"TauJets_MuonRM",
58 TauTracks =
"TauTracks_MuonRM",
59 TrackParticles =
"InDetTrackParticles",
60 TauNeutralPFOs =
"TauNeutralParticleFlowObjects_MuonRM",
61 TauSecondaryVertices =
"TauSecondaryVertices_MuonRM",
62 SelectionString = tau_murm_thinning_expression))
64 if "TauJets_EleRMThinningToolName" in kwargs:
65 tau_erm_thinning_expression = tau_thinning_expression.replace(
'TauJets',
'TauJets_EleRM')
67 name = kwargs[
'TauJets_EleRMThinningToolName'],
68 StreamName = StreamName,
69 Taus =
"TauJets_EleRM",
70 TauTracks =
"TauTracks_EleRM",
71 TrackParticles =
"InDetTrackParticles",
72 TauNeutralPFOs =
"TauNeutralParticleFlowObjects_EleRM",
73 TauSecondaryVertices =
"TauSecondaryVertices_EleRM",
74 SelectionString = tau_erm_thinning_expression))
77 if "DiTauTPThinningToolName" in kwargs:
80 name = kwargs[
'DiTauTPThinningToolName'],
81 StreamName = StreamName,
82 DiTauKey =
"DiTauJets",
83 InDetTrackParticlesKey =
"InDetTrackParticles"))
86 if "DiTauLowPtThinningToolName" in kwargs:
89 name = kwargs[
'DiTauLowPtThinningToolName'],
90 StreamName = StreamName,
91 ContainerName =
"DiTauJetsLowPt",
92 SelectionString =
"DiTauJetsLowPt.nSubjets > 1"))
95 if "DiTauLowPtTPThinningToolName" in kwargs:
98 name = kwargs[
'DiTauLowPtTPThinningToolName'],
99 StreamName = StreamName,
100 DiTauKey =
"DiTauJetsLowPt",
101 InDetTrackParticlesKey =
"InDetTrackParticles",
102 SelectionString =
"DiTauJetsLowPt.nSubjets > 1"))
105 if "ElectronCaloClusterThinningToolName" in kwargs:
108 name = kwargs[
'ElectronCaloClusterThinningToolName'],
109 StreamName = StreamName,
110 SGKey =
"AnalysisElectrons",
111 CaloClCollectionSGKey =
"egammaClusters",
115 if "PhotonCaloClusterThinningToolName" in kwargs:
118 name = kwargs[
'PhotonCaloClusterThinningToolName'],
119 StreamName = StreamName,
120 SGKey =
"AnalysisPhotons",
121 CaloClCollectionSGKey =
"egammaClusters",
125 if "ElectronGSFTPThinningToolName" in kwargs:
126 ElectronGSFTPThinningTool = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
127 name = kwargs[
'ElectronGSFTPThinningToolName'],
128 StreamName = StreamName,
129 SGKey =
"AnalysisElectrons",
130 GSFTrackParticlesKey =
"GSFTrackParticles",
131 InDetTrackParticlesKey =
"",
132 BestMatchOnly =
True)
133 acc.addPublicTool(ElectronGSFTPThinningTool)
136 if "PhotonGSFTPThinningToolName" in kwargs:
137 PhotonGSFTPThinningTool = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
138 name = kwargs[
'PhotonGSFTPThinningToolName'],
139 StreamName = StreamName,
140 SGKey =
"AnalysisPhotons",
141 GSFTrackParticlesKey =
"GSFTrackParticles",
142 GSFConversionVerticesKey =
"GSFConversionVertices",
143 InDetTrackParticlesKey =
"",
144 BestMatchOnly =
True,
145 BestVtxMatchOnly =
True)
146 acc.addPublicTool(PhotonGSFTPThinningTool)