ATLAS Offline Software
Loading...
Searching...
No Matches
python.JetInputConfig Namespace Reference

Functions

 _buildJetAlgForInput (suffix, tools)
 buildJetTrackUsedInFitDeco (parentjetdef, inputspec)
 buildJetInputTruth (parentjetdef, truthmod)
 buildJetInputTruthGEN (parentjetdef, truthmod)
 buildLabelledTruth (parentjetdef, truthmod)
 buildPV0TrackSel (parentjetdef, spec)
 buildPFlowSel (parentjetdef, spec)
 buildPFlowSel_tauSeedEleRM (parentjetdef, spec)
 buildPFlowSel_noElectrons (parentjetdef, spec)
 buildPFlowSel_noMuons (parentjetdef, spec)
 buildPFlowSel_noLeptons (parentjetdef, spec)
 buildEventShapeAlg (jetOrConstitdef, inputspec, voronoiRf=0.9, radius=0.4, suffix=None)

Detailed Description

# JetInputConfig: A helper module providing function to setup algorithms
# in charge of preparing input sources to jets (ex: EventDensity algo, track
# or truth selection,...)
#
# Author: P-A Delsart                                              #

Function Documentation

◆ _buildJetAlgForInput()

python.JetInputConfig._buildJetAlgForInput ( suffix,
tools )
protected

Definition at line 15 of file JetInputConfig.py.

15def _buildJetAlgForInput(suffix, tools ):
16 jetalg = CompFactory.JetAlgorithm("jetalg_"+suffix,
17 Tools = tools,
18 )
19 return jetalg
20

◆ buildEventShapeAlg()

python.JetInputConfig.buildEventShapeAlg ( jetOrConstitdef,
inputspec,
voronoiRf = 0.9,
radius = 0.4,
suffix = None )
Function producing an EventShapeAlg to calculate
 median energy density for pileup correction

Definition at line 140 of file JetInputConfig.py.

140def buildEventShapeAlg(jetOrConstitdef, inputspec, voronoiRf = 0.9, radius = 0.4, suffix = None ):
141 """Function producing an EventShapeAlg to calculate
142 median energy density for pileup correction"""
143
144 from .JetRecConfig import getPJContName
145 from EventShapeTools.EventDensityConfig import configEventDensityTool, getEventShapeName
146
147
148 pjContName = getPJContName(jetOrConstitdef,suffix)
149 nameprefix = inputspec or ""
150 rhotool = configEventDensityTool(
151 f"EventDensity_{nameprefix}Kt4{pjContName}",
152 jetOrConstitdef,
153 InputContainer = pjContName,
154 OutputContainer = getEventShapeName(jetOrConstitdef, nameprefix=nameprefix, suffix=suffix, radius=radius),
155 JetRadius = radius,
156 VoronoiRfact = voronoiRf,
157 )
158
159 eventshapealg = CompFactory.EventDensityAthAlg(
160 f"EventDensity_{nameprefix}Kt4{pjContName}Alg",
161 EventDensityTool = rhotool )
162
163 return eventshapealg
164

◆ buildJetInputTruth()

python.JetInputConfig.buildJetInputTruth ( parentjetdef,
truthmod )

Definition at line 30 of file JetInputConfig.py.

30def buildJetInputTruth(parentjetdef, truthmod):
31 truthmod = truthmod or ""
32 from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthJetParticles
33 return _buildJetAlgForInput("truthpartcopy_"+truthmod,
34 tools = [ getCopyTruthJetParticles(truthmod, parentjetdef._cflags) ]
35 )
36
37

◆ buildJetInputTruthGEN()

python.JetInputConfig.buildJetInputTruthGEN ( parentjetdef,
truthmod )
  Build truth constituents as in EVTGEN jobs in the r21 config.
IMPORTANT : this is expected to be temporary, only to reproduce the EVTGEN r21 config with the new config. The definitions should be harmonized with reco-level at some point and this function removed.
The source for r21 EVTGEN config was in GeneratorFilters/share/common/GenerateTruthJets.py

Definition at line 38 of file JetInputConfig.py.

38def buildJetInputTruthGEN(parentjetdef, truthmod):
39 """ Build truth constituents as in EVTGEN jobs in the r21 config.
40 IMPORTANT : this is expected to be temporary, only to reproduce the EVTGEN r21 config with the new config. The definitions should be harmonized with reco-level at some point and this function removed.
41 The source for r21 EVTGEN config was in GeneratorFilters/share/common/GenerateTruthJets.py
42 """
43 truthmod = truthmod or ""
44 from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthJetParticlesGEN
45 return _buildJetAlgForInput("truthpartcopy_"+truthmod,
46 tools = [ getCopyTruthJetParticlesGEN(truthmod, parentjetdef._cflags) ]
47 )
48
49

◆ buildJetTrackUsedInFitDeco()

python.JetInputConfig.buildJetTrackUsedInFitDeco ( parentjetdef,
inputspec )

Definition at line 21 of file JetInputConfig.py.

21def buildJetTrackUsedInFitDeco( parentjetdef, inputspec ):
22 from InDetUsedInFitTrackDecoratorTool.UsedInVertexFitTrackDecoratorConfig import (
23 getUsedInVertexFitTrackDecoratorAlg)
24 trkProperties = parentjetdef._contextDic
25
26 return getUsedInVertexFitTrackDecoratorAlg(trackCont=trkProperties["Tracks"],
27 vtxCont= trkProperties["Vertices"])
28
29

◆ buildLabelledTruth()

python.JetInputConfig.buildLabelledTruth ( parentjetdef,
truthmod )

Definition at line 50 of file JetInputConfig.py.

50def buildLabelledTruth(parentjetdef, truthmod):
51 from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthLabelParticles
52 tool = getCopyTruthLabelParticles(truthmod)
53 return _buildJetAlgForInput("truthlabelcopy_"+truthmod,
54 tools = [ tool ]
55 )
56

◆ buildPFlowSel()

python.JetInputConfig.buildPFlowSel ( parentjetdef,
spec )

Definition at line 74 of file JetInputConfig.py.

74def buildPFlowSel(parentjetdef, spec):
75 return CompFactory.JetPFlowSelectionAlg( "pflowselalg",
76 electronIDToExclude = "LHMedium",
77 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
78 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
79 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects",
80 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects"
81 )
82
83#This is to be used to seed tau jets which exclude electrons.
84#Therefore it is an inclusive selection, which means we have
85#to change the default settings and include all muons.
86#Then we also exclude charged + neutral FE linked to electrons
87#passing the relevant egamma PID WP.

◆ buildPFlowSel_noElectrons()

python.JetInputConfig.buildPFlowSel_noElectrons ( parentjetdef,
spec )

Definition at line 103 of file JetInputConfig.py.

103def buildPFlowSel_noElectrons(parentjetdef,spec):
104 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noElectrons",
105 electronIDToExclude = "LHMedium",
106 ElectronInputContainer="Electrons",
107 excludeNeutralElectronFE=True,
108 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
109 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
110 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noElectrons",
111 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noElectrons"
112 )
113

◆ buildPFlowSel_noLeptons()

python.JetInputConfig.buildPFlowSel_noLeptons ( parentjetdef,
spec )

Definition at line 125 of file JetInputConfig.py.

125def buildPFlowSel_noLeptons(parentjetdef,spec):
126 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noLeptons",
127 electronIDToExclude = "LHMedium",
128 ElectronInputContainer="Electrons",
129 excludeNeutralElectronFE=True,
130 muonIDToExclude = "Medium",
131 excludeNeutralMuonFE=True,
132 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
133 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
134 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noLeptons",
135 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noLeptons"
136 )
137

◆ buildPFlowSel_noMuons()

python.JetInputConfig.buildPFlowSel_noMuons ( parentjetdef,
spec )

Definition at line 114 of file JetInputConfig.py.

114def buildPFlowSel_noMuons(parentjetdef,spec):
115 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noMuons",
116 electronIDToExclude = "LHMedium",
117 muonIDToExclude = "Medium",
118 excludeNeutralMuonFE=True,
119 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
120 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
121 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noMuons",
122 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noMuons"
123 )
124

◆ buildPFlowSel_tauSeedEleRM()

python.JetInputConfig.buildPFlowSel_tauSeedEleRM ( parentjetdef,
spec )

Definition at line 88 of file JetInputConfig.py.

88def buildPFlowSel_tauSeedEleRM(parentjetdef,spec):
89 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_tauSeedEleRM",
90 electronIDToExclude = "LHMedium",
91 ElectronInputContainer="Electrons",
92 excludeNeutralElectronFE=True,
93 muonIDToInclude = "Loose",
94 excludeChargedMuonFE=False,
95 includeChargedMuonFE=True,
96 includeNeutralMuonFE=True,
97 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
98 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
99 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_tauSeedEleRM",
100 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_tauSeedEleRM"
101 )
102

◆ buildPV0TrackSel()

python.JetInputConfig.buildPV0TrackSel ( parentjetdef,
spec )

Definition at line 57 of file JetInputConfig.py.

57def buildPV0TrackSel(parentjetdef, spec):
58 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig import getTTVAToolForReco
59 trkOptions = parentjetdef._contextDic
60 tvaTool = getTTVAToolForReco("trackjetTVAtool",
61 HardScatterLinkDeco = "",
62 WorkingPoint = "Nonprompt_All_MaxWeight",
63 TrackContName = trkOptions['JetTracksQualityCuts']
64 )
65 alg = CompFactory.PV0TrackSelectionAlg("pv0tracksel_trackjet",
66 InputTrackContainer = trkOptions['JetTracksQualityCuts'],
67 VertexContainer = trkOptions['Vertices'],
68 OutputTrackContainer = "PV0"+trkOptions['JetTracks'],
69 TVATool = tvaTool,
70 )
71 return alg
72
73