ATLAS Offline Software
Functions
python.JETM5 Namespace Reference

Functions

def JETM5SkimmingToolCfg (flags)
 
def JETM5KernelCfg (flags, name='JETM5Kernel', **kwargs)
 
def JETM5Cfg (flags)
 

Function Documentation

◆ JETM5Cfg()

def python.JETM5.JETM5Cfg (   flags)

Definition at line 106 of file JETM5.py.

106 def JETM5Cfg(flags):
107 
108  acc = ComponentAccumulator()
109 
110  # Get the lists of triggers needed for trigger matching.
111  # This is needed at this scope (for the slimming) and further down in the config chain
112  # for actually configuring the matching, so we create it here and pass it down
113  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
114  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
115  JETM5TriggerListsHelper = TriggerListsHelper(flags)
116 
117  # Skimming, thinning, augmentation, extra content
118  acc.merge(JETM5KernelCfg(flags, name="JETM5Kernel", StreamName = 'StreamDAOD_JETM5', TriggerListsHelper = JETM5TriggerListsHelper))
119 
120  # ============================
121  # Define contents of the format
122  # =============================
123  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
124  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
125  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
126 
127  JETM5SlimmingHelper = SlimmingHelper("JETM5SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
128 
129  JETM5SlimmingHelper.SmartCollections = ["EventInfo", "InDetTrackParticles", "PrimaryVertices",
130  "Electrons", "Photons", "Muons", "TauJets",
131  "MET_Baseline_AntiKt4EMTopo","MET_Baseline_AntiKt4EMPFlow",
132  "AntiKt4EMTopoJets","AntiKt4EMPFlowJets",
133  "BTagging_AntiKt4EMPFlow"]
134 
135  JETM5SlimmingHelper.AllVariables = ["CaloCalTopoClusters",
136  "MuonSegments",
137  "Kt4EMTopoOriginEventShape","Kt4EMPFlowEventShape",
138  "GlobalNeutralParticleFlowObjects", "GlobalChargedParticleFlowObjects",
139  "CHSGChargedParticleFlowObjects", "CHSGNeutralParticleFlowObjects",
140  "UFOCSSK"]
141 
142 
143  JETM5SlimmingHelper.ExtraVariables += ["AntiKt4EMPFlowJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1"]
144 
145  if flags.Input.isMC:
146  JETM5SlimmingHelper.AppendToDictionary.update({'TruthParticles': 'xAOD::TruthParticleContainer',
147  'TruthParticlesAux': 'xAOD::TruthParticleAuxContainer',
148  'TruthVertices': 'xAOD::TruthVertexContainer',
149  'TruthVerticesAux': 'xAOD::TruthVertexAuxContainer'})
150 
151  JETM5SlimmingHelper.AllVariables += ["MuonTruthParticles", "egammaTruthParticles",
152  "TruthParticles", "TruthEvents", "TruthVertices"]
153 
154  # Trigger content
155  JETM5SlimmingHelper.IncludeTriggerNavigation = False
156  JETM5SlimmingHelper.IncludeJetTriggerContent = False
157  JETM5SlimmingHelper.IncludeMuonTriggerContent = False
158  JETM5SlimmingHelper.IncludeEGammaTriggerContent = False
159  JETM5SlimmingHelper.IncludeTauTriggerContent = False
160  JETM5SlimmingHelper.IncludeEtMissTriggerContent = False
161  JETM5SlimmingHelper.IncludeBJetTriggerContent = False
162  JETM5SlimmingHelper.IncludeBPhysTriggerContent = False
163  JETM5SlimmingHelper.IncludeMinBiasTriggerContent = False
164 
165  # Output stream
166  JETM5ItemList = JETM5SlimmingHelper.GetItemList()
167  acc.merge(OutputStreamCfg(flags, "DAOD_JETM5", ItemList=JETM5ItemList, AcceptAlgs=["JETM5Kernel"]))
168  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_JETM5", AcceptAlgs=["JETM5Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
169 
170  return acc
171 

◆ JETM5KernelCfg()

def python.JETM5.JETM5KernelCfg (   flags,
  name = 'JETM5Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for JETM5

Definition at line 25 of file JETM5.py.

25 def JETM5KernelCfg(flags, name='JETM5Kernel', **kwargs):
26  """Configure the derivation framework driving algorithm (kernel) for JETM5"""
27  acc = ComponentAccumulator()
28 
29  # Skimming
30  if not flags.Input.isMC:
31  skimmingTool = acc.getPrimaryAndMerge(JETM5SkimmingToolCfg(flags))
32 
33  # Common augmentations
34  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
35  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
36 
37  # Thinning tools...
38  from DerivationFrameworkInDet.InDetToolsConfig import MuonTrackParticleThinningCfg, EgammaTrackParticleThinningCfg
39 
40  # Include inner detector tracks associated with muons
41  JETM5MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
42  flags,
43  name = "JETM5MuonTPThinningTool",
44  StreamName = kwargs['StreamName'],
45  MuonKey = "Muons",
46  InDetTrackParticlesKey = "InDetTrackParticles"))
47 
48  # Include inner detector tracks associated with electonrs
49  JETM5ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
50  flags,
51  name = "JETM5ElectronTPThinningTool",
52  StreamName = kwargs['StreamName'],
53  SGKey = "Electrons",
54  InDetTrackParticlesKey = "InDetTrackParticles"))
55 
56  # Include inner detector tracks associated with photons
57  JETM5PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
58  flags,
59  name = "JETM5PhotonTPThinningTool",
60  StreamName = kwargs['StreamName'],
61  SGKey = "Photons",
62  InDetTrackParticlesKey = "InDetTrackParticles",
63  GSFConversionVerticesKey = "GSFConversionVertices"))
64 
65 
66  thinningTools = [JETM5MuonTPThinningTool,
67  JETM5ElectronTPThinningTool,
68  JETM5PhotonTPThinningTool]
69 
70  # Truth particle thinning
71  if flags.Input.isMC:
72  truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs
73  truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))" # Leptons
74  truth_cond_Quark = "((abs(TruthParticles.pdgId) <= 5 && (TruthParticles.pt > 10000.)) || (abs(TruthParticles.pdgId) == 6))" # Quarks
75  truth_cond_Gluon = "((abs(TruthParticles.pdgId) == 21) && (TruthParticles.pt > 10000.))" # Gluons
76  truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 10000.) && (TruthParticles.barcode < 200000))" # Photon
77 
78  truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark+'||'+truth_cond_Gluon+' || '+truth_cond_Photon+')'
79 
80  preserveAllDescendants = False
81 
82  JETM5TruthThinningTool = CompFactory.DerivationFramework.GenericTruthThinning ( name = "JETM5TruthThinningTool",
83  StreamName = kwargs['StreamName'],
84  ParticleSelectionString = truth_expression,
85  PreserveDescendants = preserveAllDescendants,
86  PreserveGeneratorDescendants = not preserveAllDescendants,
87  PreserveAncestors = True)
88 
89  acc.addPublicTool(JETM5TruthThinningTool)
90  thinningTools.append(JETM5TruthThinningTool)
91 
92  # Finally the kernel itself
93  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
94  acc.addEventAlgo(DerivationKernel(name,
95  ThinningTools = thinningTools,
96  SkimmingTools = [skimmingTool] if not flags.Input.isMC else []))
97 
98 
99  # PFlow augmentation tool
100  from DerivationFrameworkJetEtMiss.PFlowCommonConfig import PFlowCommonCfg
101  acc.merge(PFlowCommonCfg(flags))
102 
103  return acc
104 
105 

◆ JETM5SkimmingToolCfg()

def python.JETM5.JETM5SkimmingToolCfg (   flags)
Configure the skimming tool

Definition at line 11 of file JETM5.py.

11 def JETM5SkimmingToolCfg(flags):
12  """Configure the skimming tool"""
13  acc = ComponentAccumulator()
14 
15  expression = '( HLT_noalg_zb_L1ZB || HLT_noalg_L1ZB )'
16  JETM5SkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "JETM5SkimmingTool1",
17  expression = expression)
18 
19  acc.addPublicTool(JETM5SkimmingTool, primary = True)
20 
21  return(acc)
22 
23 
24 # Main algorithm config
python.PFlowCommonConfig.PFlowCommonCfg
def PFlowCommonCfg(ConfigFlags)
Definition: PFlowCommonConfig.py:6
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.JETM5.JETM5SkimmingToolCfg
def JETM5SkimmingToolCfg(flags)
Definition: JETM5.py:11
python.JETM5.JETM5KernelCfg
def JETM5KernelCfg(flags, name='JETM5Kernel', **kwargs)
Definition: JETM5.py:25
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
python.InDetToolsConfig.EgammaTrackParticleThinningCfg
def EgammaTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:579
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.JETM5.JETM5Cfg
def JETM5Cfg(flags)
Definition: JETM5.py:106
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66