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 107 of file JETM5.py.

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

◆ JETM5KernelCfg()

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

Definition at line 26 of file JETM5.py.

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

◆ JETM5SkimmingToolCfg()

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

Definition at line 12 of file JETM5.py.

12 def JETM5SkimmingToolCfg(flags):
13  """Configure the skimming tool"""
14  acc = ComponentAccumulator()
15 
16  expression = '( HLT_noalg_zb_L1ZB || HLT_noalg_L1ZB )'
17  JETM5SkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "JETM5SkimmingTool1",
18  expression = expression)
19 
20  acc.addPublicTool(JETM5SkimmingTool, primary = True)
21 
22  return(acc)
23 
24 
25 # 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:12
python.JETM5.JETM5KernelCfg
def JETM5KernelCfg(flags, name='JETM5Kernel', **kwargs)
Definition: JETM5.py:26
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:219
SlimmingHelper
Definition: SlimmingHelper.py:1
python.JETM5.JETM5Cfg
def JETM5Cfg(flags)
Definition: JETM5.py:107
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:67