10 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
11 from AthenaConfiguration.ComponentFactory
import CompFactory
12 from AthenaConfiguration.Enums
import MetadataCategory
13 from AthenaCommon.CFElements
import seqAND
21 sel_muon1 =
'Muons.pt > 25*GeV && Muons.ptcone40/Muons.pt < 0.3 && Muons.passesIDCuts'
22 sel_muon2 =
'Muons.pt > 20*GeV && Muons.ptcone40/Muons.pt < 0.3 && Muons.passesIDCuts'
23 draw_zmumu =
'( count ( DRZmumuMass > 70*GeV && DRZmumuMass < 110*GeV ) >= 1 ) '
24 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import (InvariantMassToolCfg,xAODStringSkimmingToolCfg,FilterCombinationANDCfg)
26 flags, name=
"PIXELVALID_ZmumuMass",
27 ContainerName =
"Muon",
28 ObjectRequirements = sel_muon1,
29 SecondObjectRequirements = sel_muon2,
30 MassHypothesis = 105.66,
31 SecondMassHypothesis = 105.66,
32 StoreGateEntryName =
"DRZmumuMass"))
36 name=
"PIXELVALID_SkimmingTool",
37 expression=draw_zmumu))
42 FilterList=[PIXELVALID_ZmumuMass,PIXELVALID_SkimmingTool]))
44 acc.addPublicTool(PIXELVALID_ANDTool, primary=
True)
52 sel_mu =
'(Muons.pt > 10*GeV) && Muons.passesIDCuts'
53 muRequirement =
'( count( '+sel_mu+
' ) == 1 )'
55 sel_tau =
'(TauJets.pt > 10.0*GeV)'
57 tauRequirement =
'( count( '+sel_tau+
' ) > 0 )'
58 draw_taumuh = muRequirement+
' && '+tauRequirement
59 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import (xAODStringSkimmingToolCfg)
61 name=
"PIXELVALID_ZTAUTAU",
62 expression=draw_taumuh))
64 acc.addPublicTool(PIXELVALID_ZTAUTAU, primary=
True)
74 augmentationTools = []
77 from DerivationFrameworkInDet.InDetToolsConfig
import (TrackToVertexWrapperCfg)
80 name=
"PIXELVALIDTrackToVertexWrapper",
81 DecorationPrefix=
"PIXELVALID"))
82 augmentationTools.append(PIXELVALIDTrackToVertexWrapper)
84 from DerivationFrameworkInDet.InDetToolsConfig
import (UsedInVertexFitTrackDecoratorCfg)
86 augmentationTools.append(PIXELVALIDUsedInFitDecorator)
89 from DerivationFrameworkInDet.InDetToolsConfig
import TrackParametersAtPVCfg
91 flags, name=
"PIXELVALID_DFCommonZ0AtPV",
92 Z0SGEntryName=
"PIXELVALIDInDetTrackZ0AtPV"))
93 augmentationTools.append(DFCommonZ0AtPV)
95 from DerivationFrameworkInDet.PixelNtupleMakerConfig
import (EventInfoPixelModuleStatusMonitoringCfg)
97 augmentationTools.append(DFEI)
103 if flags.InDet.DRAWZSelection:
105 skimmingTools.append(PIXELVALID_ANDTool)
107 if flags.InDet.PixelDumpMode==3:
109 skimmingTools.append(PIXELVALID_ZTAUTAU)
114 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
116 AugmentationTools = augmentationTools,
117 SkimmingTools = skimmingTools,
119 RunSkimmingFirst =
True))
133 from DerivationFrameworkInDet.InDetToolsConfig
import (IDTRKVALIDTruthThinningToolCfg)
136 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
138 AugmentationTools=[],
139 ThinningTools=thinningTools,
145 """Configure the derivation framework driving algorithm (kernel) for PIXELVALID"""
148 PIXELVALIDSequenceName=
'PIXELVALIDSequence'
149 acc.addSequence(
seqAND(PIXELVALIDSequenceName))
153 from InDetConfig.InDetPrepRawDataToxAODConfig
import InDetPrepDataToxAODCfg
159 tsos_augmentationTools = []
161 from DerivationFrameworkInDet.InDetToolsConfig
import DFTrackStateOnSurfaceDecoratorCfg
163 tsos_augmentationTools.append(DFTSOS)
165 PixelStoreMode = flags.InDet.PixelDumpMode
166 if flags.InDet.PixelDumpMode==3:
170 if flags.InDet.PixelDumpMode != 4:
171 from DerivationFrameworkInDet.PixelNtupleMakerConfig
import PixelNtupleMakerCfg
173 name =
"PixelMonitoringTool",
174 StoreMode = PixelStoreMode))
175 tsos_augmentationTools.append(PixelMonitoringTool)
178 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
180 AugmentationTools=tsos_augmentationTools,
190 """Main config fragment for PIXELVALID"""
194 if flags.Detector.GeometryID:
200 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
201 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
202 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
204 "PIXELVALIDSlimmingHelper",
205 NamesAndTypes = flags.Input.TypedCollections,
210 SmartCollections = []
213 PixelStoreMode = flags.InDet.PixelDumpMode
214 if flags.InDet.PixelDumpMode==3:
217 if flags.InDet.PixelDumpMode == 4:
221 if PixelStoreMode==1:
222 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
223 "EventInfo":
"xAOD::EventInfo",
"EventInfoAux":
"xAOD::EventAuxInfo",
224 "Muons":
"xAOD::MuonContainer",
"MuonsAux":
"xAOD::MuonAuxContainer",
225 "Electrons":
"xAOD::ElectronContainer",
226 "ElectronsAux":
"xAOD::ElectronAuxContainer",
227 "Photons":
"xAOD::PhotonContainer",
228 "PhotonsAux":
"xAOD::PhotonAuxContainer",
229 "JetETMissNeutralParticleFlowObjects":
"xAOD::FlowElementContainer",
230 "JetETMissNeutralParticleFlowObjectsAux":
"xAOD::FlowElementAuxContainer",
231 "JetETMissChargedParticleFlowObjects":
"xAOD::FlowElementContainer",
232 "JetETMissChargedParticleFlowObjectsAux":
"xAOD::FlowElementAuxContainer",
233 "TauJets":
"xAOD::TauJetContainer",
234 "TauJetsAux":
"xAOD::TauJetAuxContainer",
235 "InDetTrackParticles":
"xAOD::TrackParticleContainer",
236 "InDetTrackParticlesAux":
"xAOD::TrackParticleAuxContainer",
237 "InDetLargeD0TrackParticles":
"xAOD::TrackParticleContainer",
238 "InDetLargeD0TrackParticlesAux":
"xAOD::TrackParticleAuxContainer",
239 "PixelMSOSs":
"xAOD::TrackStateValidationContainer",
240 "PixelMSOSsAux":
"xAOD::TrackStateValidationAuxContainer",
241 "Kt4EMTopoOriginEventShape":
"xAOD::EventShape",
242 "Kt4EMTopoOriginEventShapeAux":
"xAOD::EventShapeAuxInfo",
243 "Kt4LCTopoOriginEventShape":
"xAOD::EventShape",
244 "Kt4LCTopoOriginEventShapeAux":
"xAOD::EventShapeAuxInfo",
245 "NeutralParticleFlowIsoCentralEventShape":
"xAOD::EventShape",
246 "NeutralParticleFlowIsoCentralEventShapeAux":
"xAOD::EventShapeAuxInfo",
247 "NeutralParticleFlowIsoForwardEventShape":
"xAOD::EventShape",
248 "NeutralParticleFlowIsoForwardEventShapeAux":
"xAOD::EventShapeAuxInfo",
249 "TopoClusterIsoCentralEventShape":
"xAOD::EventShape",
250 "TopoClusterIsoCentralEventShapeAux":
"xAOD::EventShapeAuxInfo",
251 "TopoClusterIsoForwardEventShape":
"xAOD::EventShape",
252 "TopoClusterIsoForwardEventShapeAux":
"xAOD::EventShapeAuxInfo",
253 "MET_Calo":
"xAOD::MissingETContainer",
254 "MET_CaloAux":
"xAOD::MissingETAuxContainer",
255 "MET_Track":
"xAOD::MissingETContainer",
256 "MET_TrackAux":
"xAOD::MissingETAuxContainer",
257 "MET_LocHadTopo":
"xAOD::MissingETContainer",
258 "MET_LocHadTopoRegions":
"xAOD::MissingETContainer",
259 "MET_LocHadTopoAux":
"xAOD::MissingETAuxContainer",
260 "MET_LocHadTopoRegionsAux":
"xAOD::MissingETAuxContainer",
261 "MET_Core_AntiKt4LCTopo":
"xAOD::MissingETContainer",
262 "MET_Reference_AntiKt4LCTopo":
"xAOD::MissingETContainer",
263 "MET_Core_AntiKt4LCTopoAux":
"xAOD::MissingETAuxContainer",
264 "MET_Reference_AntiKt4LCTopoAux":
"xAOD::MissingETAuxContainer"})
266 SmartCollections += [
"Muons",
"Electrons",
"Photons"]
268 AllVariables += [
"EventInfo",
269 "JetETMissNeutralParticleFlowObjects",
270 "JetETMissChargedParticleFlowObjects",
271 "InDetTrackParticles",
272 "InDetLargeD0TrackParticles",
274 "Kt4EMTopoOriginEventShape",
275 "Kt4LCTopoOriginEventShape",
276 "NeutralParticleFlowIsoCentralEventShape",
277 "NeutralParticleFlowIsoForwardEventShape",
278 "TopoClusterIsoCentralEventShape",
279 "TopoClusterIsoForwardEventShape"]
281 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
282 "TauJets":
"xAOD::TauJetContainer",
283 "TauJetsAux":
"xAOD::TauJetAuxContainer",
284 "Kt4EMPFlowEventShape":
"xAOD::EventShape",
285 "Kt4EMPFlowEventShapeAux":
"xAOD::EventShapeAuxInfo",
286 "PrimaryVertices":
"xAOD::VertexContainer",
287 "PrimaryVerticesAux":
"xAOD::VertexAuxContainer",
288 "AntiKt4EMTopoJets":
"xAOD::JetContainer",
289 "AntiKt4EMTopoJetsAux":
"xAOD::JetAuxContainer",
290 "AntiKt4EMPFlowJets":
"xAOD::JetContainer",
291 "AntiKt4EMPFlowJetsAux":
"xAOD::JetAuxContainer",
292 "BTagging_AntiKt4EMTopo":
"xAOD::BTaggingContainer",
293 "BTagging_AntiKt4EMTopoAux":
"xAOD::BTaggingAuxContainer",
294 "BTagging_AntiKt4EMPFlow":
"xAOD::BTaggingContainer",
295 "BTagging_AntiKt4EMPFlowAux":
"xAOD::BTaggingAuxContainer"})
297 ExtraVariables += [
"TauJets.ABS_ETA_LEAD_TRACK.ClusterTotalEnergy.ClustersMeanCenterLambda.ClustersMeanEMProbability.ClustersMeanFirstEngDens.ClustersMeanPresamplerFrac.ClustersMeanSecondLambda.EMFRACTIONATEMSCALE_MOVEE3.EMFracFixed.GhostMuonSegmentCount.LeadClusterFrac.NNDecayMode.NNDecayModeProb_1p0n.NNDecayModeProb_1p1n.NNDecayModeProb_1pXn.NNDecayModeProb_3p0n.NNDecayModeProb_3pXn.PFOEngRelDiff.PanTau_DecayModeExtended.TAU_ABSDELTAETA.TAU_ABSDELTAPHI.TAU_SEEDTRK_SECMAXSTRIPETOVERPT.UpsilonCluster.absipSigLeadTrk.chargedFELinks.etHotShotDR1.etHotShotDR1OverPtLeadTrk.etHotShotWin.etHotShotWinOverPtLeadTrk.etaCombined.hadLeakFracFixed.leadTrackProbHT.mCombined.mu.nConversionTracks.nFakeTracks.nModifiedIsolationTracks.nVtxPU.neutralFELinks.passThinning.phiCombined.ptCombined.ptIntermediateAxisEM.rho"]
298 ExtraVariables += [
"PrimaryVertices.sumPt2.x.y.z"]
300 AllVariables += [
"Kt4EMPFlowEventShape",
301 "AntiKt4EMTopoJets",
"AntiKt4EMPFlowJets",
302 "BTagging_AntiKt4EMTopo",
"BTagging_AntiKt4EMPFlow"]
305 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
306 "AntiKt4TruthJets":
"xAOD::JetContainer",
307 "AntiKt4TruthJetsAux":
"xAOD::JetAuxContainer",
308 "JetInputTruthParticles":
"xAOD::TruthParticleContainer",
309 "JetInputTruthParticlesNoWZ":
"xAOD::TruthParticleContainer",
310 "TruthEvents":
"xAOD::TruthEventContainer",
311 "TruthEventsAux":
"xAOD::TruthEventAuxContainer",
312 "TruthParticles":
"xAOD::TruthParticleContainer",
313 "TruthParticlesAux":
"xAOD::TruthParticleAuxContainer",
314 "egammaTruthParticles":
"xAOD::TruthParticleContainer",
315 "egammaTruthParticlesAux":
"xAOD::TruthParticleAuxContainer",
316 "MuonTruthParticles":
"xAOD::TruthParticleContainer",
317 "MuonTruthParticlesAux":
"xAOD::TruthParticleAuxContainer",
318 "LRTegammaTruthParticles":
"xAOD::TruthParticleContainer",
319 "LRTegammaTruthParticlesAux":
"xAOD::TruthParticleAuxContainer",
320 "TruthVertices":
"xAOD::TruthVertexContainer",
321 "TruthVerticesAux":
"xAOD::TruthVertexAuxContainer",
322 "MET_Truth":
"xAOD::MissingETContainer",
323 "MET_TruthRegions":
"xAOD::MissingETContainer",
324 "MET_TruthAux":
"xAOD::MissingETAuxContainer",
325 "MET_TruthRegionsAux":
"xAOD::MissingETAuxContainer"})
327 AllVariables += [
"AntiKt4TruthJets",
328 "JetInputTruthParticles",
329 "JetInputTruthParticlesNoWZ",
332 "egammaTruthParticles",
333 "MuonTruthParticles",
334 "LRTegammaTruthParticles",
337 list_aux = [
"BHadronsFinal",
"BHadronsInitial",
"BQuarksFinal",
338 "CHadronsFinal",
"CHadronsInitial",
"CQuarksFinal",
339 "HBosons",
"Partons",
"TQuarksFinal",
"TausFinal",
340 "WBosons",
"ZBosons"]
341 for item
in list_aux:
342 label =
"TruthLabel"+item
343 labelAux = label+
"Aux"
344 PIXELVALIDSlimmingHelper.AppendToDictionary.update(
345 {label:
"xAOD::TruthParticleContainer",
346 labelAux:
"xAOD::TruthParticleAuxContainer"})
347 AllVariables += [label]
351 PIXELVALIDSlimmingHelper.IncludeTriggerNavigation =
True
352 PIXELVALIDSlimmingHelper.IncludeAdditionalTriggerContent =
True
354 if PixelStoreMode==2:
355 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
356 "EventInfo":
"xAOD::EventInfo",
"EventInfoAux":
"xAOD::EventAuxInfo",
357 "PixelMonitoringTrack":
"xAOD::TrackParticleContainer",
358 "PixelMonitoringTrackAux":
"xAOD::TrackParticleAuxContainer"})
360 AllVariables += [
"EventInfo",
361 "PixelMonitoringTrack"]
364 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
365 "TruthEvents":
"xAOD::TruthEventContainer",
366 "TruthEventsAux":
"xAOD::TruthEventAuxContainer",
367 "TruthParticles":
"xAOD::TruthParticleContainer",
368 "TruthParticlesAux":
"xAOD::TruthParticleAuxContainer"})
370 AllVariables += [
"TruthEvents",
373 list_aux = [
"BHadronsFinal",
"BHadronsInitial",
"BQuarksFinal",
374 "CHadronsFinal",
"CHadronsInitial",
"CQuarksFinal",
375 "HBosons",
"Partons",
"TQuarksFinal",
"TausFinal",
376 "WBosons",
"ZBosons"]
377 for item
in list_aux:
378 label =
"TruthLabel"+item
379 labelAux = label+
"Aux"
380 PIXELVALIDSlimmingHelper.AppendToDictionary.update(
381 {label:
"xAOD::TruthParticleContainer",
382 labelAux:
"xAOD::TruthParticleAuxContainer"})
383 AllVariables += [label]
387 if PixelStoreMode == 3:
388 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
389 "EventInfo":
"xAOD::EventInfo",
"EventInfoAux":
"xAOD::EventAuxInfo",
390 "InDetTrackParticles":
"xAOD::TrackParticleContainer",
391 "InDetTrackParticlesAux":
"xAOD::TrackParticleAuxContainer"})
393 AllVariables += [
"EventInfo",
394 "InDetTrackParticles"]
396 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
397 "PrimaryVertices":
"xAOD::VertexContainer",
398 "PrimaryVerticesAux":
"xAOD::VertexAuxContainer"})
400 ExtraVariables += [
"PrimaryVertices.sumPt2.x.y.z"]
403 PIXELVALIDSlimmingHelper.AppendToDictionary.update({
404 "TruthEvents":
"xAOD::TruthEventContainer",
405 "TruthEventsAux":
"xAOD::TruthEventAuxContainer",
406 "TruthParticles":
"xAOD::TruthParticleContainer",
407 "TruthParticlesAux":
"xAOD::TruthParticleAuxContainer",
408 "TruthVertices":
"xAOD::TruthVertexContainer",
409 "TruthVerticesAux":
"xAOD::TruthVertexAuxContainer"})
411 AllVariables += [
"TruthEvents",
415 list_aux = [
"BHadronsFinal",
"BHadronsInitial",
"BQuarksFinal",
416 "CHadronsFinal",
"CHadronsInitial",
"CQuarksFinal",
417 "HBosons",
"Partons",
"TQuarksFinal",
"TausFinal",
418 "WBosons",
"ZBosons"]
419 for item
in list_aux:
420 label =
"TruthLabel"+item
421 labelAux = label+
"Aux"
422 PIXELVALIDSlimmingHelper.AppendToDictionary.update(
423 {label:
"xAOD::TruthParticleContainer",
424 labelAux:
"xAOD::TruthParticleAuxContainer"})
425 AllVariables += [label]
429 PIXELVALIDSlimmingHelper.IncludeTriggerNavigation =
True
430 PIXELVALIDSlimmingHelper.IncludeAdditionalTriggerContent =
True
433 PIXELVALIDSlimmingHelper.AllVariables = AllVariables
434 PIXELVALIDSlimmingHelper.StaticContent = StaticContent
435 PIXELVALIDSlimmingHelper.SmartCollections = SmartCollections
436 PIXELVALIDSlimmingHelper.ExtraVariables = ExtraVariables
439 PIXELVALIDItemList = PIXELVALIDSlimmingHelper.GetItemList()
441 ItemList=PIXELVALIDItemList, AcceptAlgs=[
"PIXELVALIDKernelCommon"]))
443 if flags.InDet.PixelDumpMode == 4:
445 flags,
"DAOD_PIXELVALID", AcceptAlgs=[
"PIXELVALIDKernelCommon"],
446 createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TriggerMenuMetaData]))
449 flags,
"DAOD_PIXELVALID", AcceptAlgs=[
"PIXELVALIDKernelCommon"],
450 createMetadata=[MetadataCategory.CutFlowMetaData]))