ATLAS Offline Software
Functions
python.JETM2 Namespace Reference

Functions

def JETM2KernelCfg (flags, name='JETM2Kernel', **kwargs)
 
def JETM2ExtraContentCfg (flags)
 
def JETM2Cfg (flags)
 

Function Documentation

◆ JETM2Cfg()

def python.JETM2.JETM2Cfg (   flags)

Definition at line 99 of file JETM2.py.

99 def JETM2Cfg(flags):
100 
101  acc = ComponentAccumulator()
102 
103  # Get the lists of triggers needed for trigger matching.
104  # This is needed at this scope (for the slimming) and further down in the config chain
105  # for actually configuring the matching, so we create it here and pass it down
106  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
107  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
108  JETM2TriggerListsHelper = TriggerListsHelper(flags)
109 
110  # Skimming, thinning, augmentation, extra content
111  acc.merge(JETM2KernelCfg(flags, name="JETM2Kernel", StreamName = 'StreamDAOD_JETM2', TriggerListsHelper = JETM2TriggerListsHelper))
112 
113  # ============================
114  # Define contents of the format
115  # =============================
116  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
117  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
118  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
119 
120  JETM2SlimmingHelper = SlimmingHelper("JETM2SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
121 
122  JETM2SlimmingHelper.SmartCollections = ["EventInfo","InDetTrackParticles", "PrimaryVertices",
123  "Electrons", "Photons", "Muons", "TauJets",
124  "MET_Baseline_AntiKt4EMPFlow",
125  "AntiKt4EMTopoNoPtCutJets","AntiKt4EMPFlowJets",
126  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
127  "BTagging_AntiKt4EMPFlow",
128  "BTagging_AntiKtVR30Rmax4Rmin02Track"]
129 
130  JETM2SlimmingHelper.AllVariables = ["CaloCalFwdTopoTowers",
131  "CHSGChargedParticleFlowObjects","CHSGNeutralParticleFlowObjects",
132  "CSSKGChargedParticleFlowObjects","CSSKGNeutralParticleFlowObjects",
133  "Kt4EMTopoOriginEventShape","Kt4EMPFlowEventShape","Kt4EMPFlowPUSBEventShape",
134  "Kt4EMPFlowNeutEventShape","Kt4UFOCSSKEventShape","Kt4UFOCSSKNeutEventShape"]
135 
136  # Low-level inputs
137  from DerivationFrameworkJetEtMiss.CommonJETMXContent import ClusterVariables, FlowElementVariables, UFOVariables, TrackingVariables, TrackingVariablesHGTD, FELinks
138  JETM2SlimmingHelper.ExtraVariables += [".".join(["CaloCalTopoClusters"] + ClusterVariables)]
139  JETM2SlimmingHelper.ExtraVariables += [".".join(["GlobalChargedParticleFlowObjects"] + FlowElementVariables)]
140  JETM2SlimmingHelper.ExtraVariables += [".".join(["GlobalNeutralParticleFlowObjects"] + FlowElementVariables)]
141  JETM2SlimmingHelper.ExtraVariables += [".".join(["UFO"] + UFOVariables)]
142  JETM2SlimmingHelper.ExtraVariables += [".".join(["UFOCSSK"] + UFOVariables)]
143  JETM2SlimmingHelper.ExtraVariables += [".".join(["InDetTrackParticles"] + TrackingVariables)]
144  if flags.GeoModel.Run >= LHCPeriod.Run4:
145  JETM2SlimmingHelper.ExtraVariables += [".".join(["InDetTrackParticles"] + TrackingVariablesHGTD)]
146 
147  # Links of physics objects to FlowElements
148  JETM2SlimmingHelper.ExtraVariables += FELinks
149 
150  # Detailed substructure information
151  from DerivationFrameworkJetEtMiss.CommonJETMXContent import ExtraJSSVariables
152  JETM2SlimmingHelper.ExtraVariables += [".".join(["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"] + ExtraJSSVariables)]
153 
154  # sub-structure taggers score
155  from DerivationFrameworkJetEtMiss.CommonJETMXContent import JSSTaggersVariables
156  JETM2SlimmingHelper.ExtraVariables += JSSTaggersVariables
157 
158  JETM2SlimmingHelper.ExtraVariables += ["AntiKt4EMPFlowJets.GhostTower.IsoFixedCone5Pt.IsoFixedCone5PtPUsub",
159  "AntiKt4EMTopoNoPtCutJets.IsoFixedCone5Pt.IsoFixedCone5PtPUsub",
160  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.SizeParameter",
161  "GSFTrackParticles.particleHypothesis.vx.vy.vz",
162  "PrimaryVertices.x.y.z.covariance.trackWeights",
163  "TauJets.clusterLinks",
164  "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus.clusterLinks.FSR_CandidateEnergy",
165  "MuonSegments.x.y.z.px.py.pz",
166  "BTagging_AntiKt4EMPFlow.jetLink",
167  "BTagging_AntiKtVR30Rmax4Rmin02Track.jetLink"]
168 
169  JETM2SlimmingHelper.AppendToDictionary.update({'CSSKGNeutralParticleFlowObjects': 'xAOD::FlowElementContainer',
170  'CSSKGNeutralParticleFlowObjectsAux': 'xAOD::ShallowAuxContainer',
171  'CSSKGChargedParticleFlowObjects': 'xAOD::FlowElementContainer',
172  'CSSKGChargedParticleFlowObjectsAux': 'xAOD::ShallowAuxContainer',
173  'UFO': 'xAOD::FlowElementContainer',
174  'UFOAux': 'xAOD::FlowElementAuxContainer',
175  'Kt4UFOCSSKEventShape': 'xAOD::EventShape',
176  'Kt4UFOCSSKEventShapeAux': 'xAOD::EventShapeAuxInfo',
177  'Kt4UFOCSSKNeutEventShape': 'xAOD::EventShape',
178  'Kt4UFOCSSKNeutEventShapeAux': 'xAOD::EventShapeAuxInfo',
179  'AntiKt4EMTopoNoPtCutJets': 'xAOD::JetContainer',
180  'AntiKt4EMTopoNoPtCutJetsAux': 'xAOD::JetAuxContainer'})
181 
182  from DerivationFrameworkJetEtMiss.JetCommonConfig import addOriginCorrectedClustersToSlimmingTool
183  addOriginCorrectedClustersToSlimmingTool(JETM2SlimmingHelper,writeLC=True,writeEM=True)
184 
185  # Truth containers
186  if flags.Input.isMC:
187 
188  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
189  addTruth3ContentToSlimmerTool(JETM2SlimmingHelper)
190 
191  JETM2SlimmingHelper.AppendToDictionary.update({'TruthParticles': 'xAOD::TruthParticleContainer',
192  'TruthParticlesAux': 'xAOD::TruthParticleAuxContainer'})
193 
194  JETM2SlimmingHelper.AllVariables += ["TruthTopQuarkWithDecayParticles","TruthTopQuarkWithDecayVertices","TruthHFWithDecayParticles",
195  "AntiKt4TruthJets", "InTimeAntiKt4TruthJets", "OutOfTimeAntiKt4TruthJets",
196  "TruthParticles", "TruthVertices","TruthEvents"]
197  JETM2SlimmingHelper.ExtraVariables += ["AntiKt10TruthSoftDropBeta100Zcut10Jets.SizeParameter"]
198  JETM2SlimmingHelper.SmartCollections += ["AntiKt4TruthJets","AntiKt10TruthJets","AntiKt4TruthWZJets","AntiKt10TruthDressedWZSoftDropBeta100Zcut10Jets"]
199 
200  JETM2SlimmingHelper.ExtraVariables += ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostTQuarksFinalCount.GhostHBosonsCount.GhostZBosonsCount.GhostWBosonsCount",
201  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostTQuarksFinalPt.GhostHBosonsPt.GhostZBosonsPt.GhostWBosonsPt",
202  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostBHadronsFinalPt.GhostCHadronsFinalPt",
203  "AntiKt4TruthWZJets.IsoFixedCone5Pt",
204  "AntiKt4TruthDressedWZJets.IsoFixedCone5Pt"]
205 
206  # Trigger content
207  JETM2SlimmingHelper.IncludeTriggerNavigation = False
208  JETM2SlimmingHelper.IncludeJetTriggerContent = False
209  JETM2SlimmingHelper.IncludeMuonTriggerContent = False
210  JETM2SlimmingHelper.IncludeEGammaTriggerContent = False
211  JETM2SlimmingHelper.IncludeTauTriggerContent = False
212  JETM2SlimmingHelper.IncludeEtMissTriggerContent = False
213  JETM2SlimmingHelper.IncludeBJetTriggerContent = False
214  JETM2SlimmingHelper.IncludeBPhysTriggerContent = False
215  JETM2SlimmingHelper.IncludeMinBiasTriggerContent = False
216 
217  jetOutputList = ["AntiKt4UFOCSSKNoPtCutJets","AntiKt4EMPFlowNoPtCutJets"]
218  from DerivationFrameworkJetEtMiss.JetCommonConfig import addJetsToSlimmingTool
219  addJetsToSlimmingTool(JETM2SlimmingHelper, jetOutputList, JETM2SlimmingHelper.SmartCollections)
220 
221  # Output stream
222  JETM2ItemList = JETM2SlimmingHelper.GetItemList()
223  acc.merge(OutputStreamCfg(flags, "DAOD_JETM2", ItemList=JETM2ItemList, AcceptAlgs=["JETM2Kernel"]))
224  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_JETM2", AcceptAlgs=["JETM2Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
225 
226  return acc
227 

◆ JETM2ExtraContentCfg()

def python.JETM2.JETM2ExtraContentCfg (   flags)

Definition at line 42 of file JETM2.py.

42 def JETM2ExtraContentCfg(flags):
43 
44  acc = ComponentAccumulator()
45 
46  from JetRecConfig.JetRecConfig import JetRecCfg, getInputAlgs, getConstitPJGAlg
47  from JetRecConfig.JetInputConfig import buildEventShapeAlg
48  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
49  from JetRecConfig.StandardSmallRJets import AntiKt4UFOCSSKNoPtCut, AntiKt4EMPFlowNoPtCut, AntiKt4EMTopoNoPtCut
50  from JetRecConfig.StandardLargeRJets import AntiKt10TruthDressedWZSoftDrop
51 
52  #=======================================
53  # CHS R = 0.4 UFO jets
54  #=======================================
55 
56  algs = getInputAlgs(cst.UFO, flags=flags)
57  for alg in algs:
58  if isinstance(alg, ComponentAccumulator):
59  acc.merge(alg)
60  else:
61  acc.addEventAlgo(alg)
62 
63  #=======================================
64  # NoPtCut containers
65  #=======================================
66  jetList = [AntiKt4UFOCSSKNoPtCut,AntiKt4EMPFlowNoPtCut,AntiKt4EMTopoNoPtCut]
67 
68  #=======================================
69  # R = 1.0 truth WZ Dressed jets
70  #=======================================
71  if flags.Input.isMC:
72  jetList += [AntiKt10TruthDressedWZSoftDrop]
73 
74 
75  for jd in jetList:
76  acc.merge(JetRecCfg(flags,jd))
77 
78  #=======================================
79  # UFO CSSK event shape
80  #=======================================
81 
82  acc.addEventAlgo(buildEventShapeAlg(cst.UFOCSSK,'', suffix=None))
83  acc.addEventAlgo(getConstitPJGAlg(cst.UFOCSSK, suffix='Neut'))
84  acc.addEventAlgo(buildEventShapeAlg(cst.UFOCSSK,'', suffix='Neut'))
85 
86  #=======================================
87  # More detailed truth information
88  #=======================================
89 
90  if flags.Input.isMC:
91  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTopQuarkAndDownstreamParticlesCfg, AddTruthCollectionNavigationDecorationsCfg
92  acc.merge(AddTopQuarkAndDownstreamParticlesCfg(flags))
93  acc.merge(AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=["TruthTopQuarkWithDecayParticles","TruthBosonsWithDecayParticles"],prefix='Top'))
94 
95 
96  return acc
97 
98 

◆ JETM2KernelCfg()

def python.JETM2.JETM2KernelCfg (   flags,
  name = 'JETM2Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for JETM2

Definition at line 11 of file JETM2.py.

11 def JETM2KernelCfg(flags, name='JETM2Kernel', **kwargs):
12  """Configure the derivation framework driving algorithm (kernel) for JETM2"""
13  acc = ComponentAccumulator()
14 
15  # Common augmentations
16  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
17  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
18 
19  if flags.Input.isMC:
20  # thinning tools:
21  truthThinningTool = CompFactory.DerivationFramework.MenuTruthThinning(name = "JETM2TruthThinning",
22  StreamName = kwargs['StreamName'],
23  WriteAllStable = True,
24  WritePartons = False,
25  WriteHadrons = False,
26  WriteBHadrons = True,
27  WriteCHadrons = False,
28  WriteGeant = False,
29  WriteFirstN = 10)
30 
31  acc.addPublicTool(truthThinningTool)
32 
33  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
34  acc.addEventAlgo(DerivationKernel(name, ThinningTools = [truthThinningTool] if flags.Input.isMC else []))
35 
36  # Extra jet content:
37  acc.merge(JETM2ExtraContentCfg(flags))
38 
39  return acc
40 
41 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.JetRecConfig.getInputAlgs
def getInputAlgs(jetOrConstitdef, flags, context="default", monTool=None)
Definition: JetRecConfig.py:279
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.JetCommonConfig.addOriginCorrectedClustersToSlimmingTool
def addOriginCorrectedClustersToSlimmingTool(slimhelper, writeLC=False, writeEM=False)
Helper to add origin corrected clusters to output.
Definition: JetCommonConfig.py:276
python.JetInputConfig.buildEventShapeAlg
def buildEventShapeAlg(jetOrConstitdef, inputspec, voronoiRf=0.9, radius=0.4, suffix=None)
Definition: JetInputConfig.py:132
python.MCTruthCommonConfig.AddTopQuarkAndDownstreamParticlesCfg
def AddTopQuarkAndDownstreamParticlesCfg(flags, generations=1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:253
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
python.JETM2.JETM2ExtraContentCfg
def JETM2ExtraContentCfg(flags)
Definition: JETM2.py:42
python.JetCommonConfig.addJetsToSlimmingTool
def addJetsToSlimmingTool(slimhelper, contentlist, smartlist=[])
Definition: JetCommonConfig.py:262
python.JETM2.JETM2Cfg
def JETM2Cfg(flags)
Definition: JETM2.py:99
python.JETM2.JETM2KernelCfg
def JETM2KernelCfg(flags, name='JETM2Kernel', **kwargs)
Definition: JETM2.py:11
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.JetRecConfig.getConstitPJGAlg
def getConstitPJGAlg(constitdef, suffix=None, flags=None, parent_jetdef=None)
Definition: JetRecConfig.py:350
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.MCTruthCommonConfig.AddTruthCollectionNavigationDecorationsCfg
def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix='')
Definition: MCTruthCommonConfig.py:331
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.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66