129 """Configure the derivation framework driving algorithm (kernel) for STDM17"""
133 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
137 from AthenaCommon.CFElements
import seqAND
138 acc.addSequence(
seqAND(
"STDM17Sequence") )
139 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
142 skimmingKernel =
DerivationKernel(kwargs[
"PreselectionName"], SkimmingTools = [skimmingTool], AugmentationTools = [augmentationToolSkim])
143 acc.addEventAlgo( skimmingKernel, sequenceName=
"STDM17Sequence" )
146 from DerivationFrameworkInDet.InDetToolsConfig
import TrackParticleThinningCfg, MuonTrackParticleThinningCfg, EgammaTrackParticleThinningCfg, TauTrackParticleThinningCfg
149 STDM17_thinning_expression =
"( InDetTrackParticles.pt > 6*GeV && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta)) < 5.0*mm )"
152 name =
"STDM17TrackParticleThinningTool",
153 StreamName = kwargs[
'StreamName'],
154 SelectionString = STDM17_thinning_expression,
155 InDetTrackParticlesKey =
"InDetTrackParticles"))
160 name =
"STDM17MuonTPThinningTool",
161 StreamName = kwargs[
'StreamName'],
163 InDetTrackParticlesKey =
"InDetTrackParticles"))
168 name =
"STDM17ElectronTPThinningTool",
169 StreamName = kwargs[
'StreamName'],
171 InDetTrackParticlesKey =
"InDetTrackParticles"))
176 name =
"STDM17PhotonTPThinningTool",
177 StreamName = kwargs[
'StreamName'],
179 InDetTrackParticlesKey =
"InDetTrackParticles",
180 GSFConversionVerticesKey =
"GSFConversionVertices"))
185 name =
"STDM17TauTPThinningTool",
186 StreamName = kwargs[
'StreamName'],
188 InDetTrackParticlesKey =
"InDetTrackParticles",
189 DoTauTracksThinning =
True,
190 TauTracksKey =
"TauTracks"))
192 thinningTools = [STDM17TrackParticleThinningTool,
193 STDM17MuonTPThinningTool,
194 STDM17ElectronTPThinningTool,
195 STDM17PhotonTPThinningTool,
196 STDM17TauTPThinningTool]
199 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig
import CaloClusterThinningCfg
200 selectionString =
"( InDetTrackParticles.pt > 6*GeV && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta)) < 5.0*mm )"
202 name =
"STDM17CaloClusterThinning",
203 StreamName = kwargs[
'StreamName'],
204 SGKey =
"InDetTrackParticles",
205 TopoClCollectionSGKey =
"CaloCalTopoClusters",
206 SelectionString = selectionString,
208 acc.addPublicTool(STDM17CaloThinningTool)
209 thinningTools.append(STDM17CaloThinningTool)
212 truth_cond_status =
"( (TruthParticles.pdgId == 24) || (TruthParticles.pdgId == -24) )"
213 truth_cond_Lepton =
"((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))"
214 truth_expression =
'('+truth_cond_status+
' || '+truth_cond_Lepton +
')'
216 STDM17TruthThinningTool = CompFactory.DerivationFramework.GenericTruthThinning(name =
"STDM17TruthThinningTool",
217 StreamName = kwargs[
'StreamName'],
218 ParticleSelectionString = truth_expression,
219 PreserveDescendants =
False,
220 PreserveGeneratorDescendants =
True,
221 PreserveAncestors =
False)
223 acc.addPublicTool(STDM17TruthThinningTool)
224 thinningTools.append(STDM17TruthThinningTool)
231 ThinningTools = thinningTools,
232 AugmentationTools = [augmentationTool]),
233 sequenceName=
"STDM17Sequence")