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, egammaPEB=False)
 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)

Variables

 jetlog = Logging.logging.getLogger('JetInputConfig')

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 17 of file JetInputConfig.py.

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

◆ 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 146 of file JetInputConfig.py.

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

◆ buildJetInputTruth()

python.JetInputConfig.buildJetInputTruth ( parentjetdef,
truthmod )

Definition at line 32 of file JetInputConfig.py.

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

◆ 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 40 of file JetInputConfig.py.

40def buildJetInputTruthGEN(parentjetdef, truthmod):
41 """ Build truth constituents as in EVTGEN jobs in the r21 config.
42 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.
43 The source for r21 EVTGEN config was in GeneratorFilters/share/common/GenerateTruthJets.py
44 """
45 truthmod = truthmod or ""
46 from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthJetParticlesGEN
47 return _buildJetAlgForInput("truthpartcopy_"+truthmod,
48 tools = [ getCopyTruthJetParticlesGEN(truthmod, parentjetdef._cflags) ]
49 )
50
51

◆ buildJetTrackUsedInFitDeco()

python.JetInputConfig.buildJetTrackUsedInFitDeco ( parentjetdef,
inputspec )

Definition at line 23 of file JetInputConfig.py.

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

◆ buildLabelledTruth()

python.JetInputConfig.buildLabelledTruth ( parentjetdef,
truthmod )

Definition at line 52 of file JetInputConfig.py.

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

◆ buildPFlowSel()

python.JetInputConfig.buildPFlowSel ( parentjetdef,
spec,
egammaPEB = False )

Definition at line 76 of file JetInputConfig.py.

76def buildPFlowSel(parentjetdef, spec, egammaPEB=False):
77 egammaPEB = parentjetdef._cflags.Input.TriggerStream=='physics_EgammaPEBTLA' or egammaPEB
78 if egammaPEB:
79 jetlog.warning("Configuring muon-less reconstruction for EgammaPEB stream")
80 return CompFactory.JetPFlowSelectionAlg( "pflowselalg",
81 electronIDToExclude = "LHMedium",
82 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
83 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
84 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects",
85 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects",
86 isEgammaPEB = egammaPEB # Autoconfigure muon-less reconstruction
87 )
88
89#This is to be used to seed tau jets which exclude electrons.
90#Therefore it is an inclusive selection, which means we have
91#to change the default settings and include all muons.
92#Then we also exclude charged + neutral FE linked to electrons
93#passing the relevant egamma PID WP.

◆ buildPFlowSel_noElectrons()

python.JetInputConfig.buildPFlowSel_noElectrons ( parentjetdef,
spec )

Definition at line 109 of file JetInputConfig.py.

109def buildPFlowSel_noElectrons(parentjetdef,spec):
110 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noElectrons",
111 electronIDToExclude = "LHMedium",
112 ElectronInputContainer="Electrons",
113 excludeNeutralElectronFE=True,
114 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
115 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
116 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noElectrons",
117 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noElectrons"
118 )
119

◆ buildPFlowSel_noLeptons()

python.JetInputConfig.buildPFlowSel_noLeptons ( parentjetdef,
spec )

Definition at line 131 of file JetInputConfig.py.

131def buildPFlowSel_noLeptons(parentjetdef,spec):
132 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noLeptons",
133 electronIDToExclude = "LHMedium",
134 ElectronInputContainer="Electrons",
135 excludeNeutralElectronFE=True,
136 muonIDToExclude = "Medium",
137 excludeNeutralMuonFE=True,
138 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
139 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
140 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noLeptons",
141 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noLeptons"
142 )
143

◆ buildPFlowSel_noMuons()

python.JetInputConfig.buildPFlowSel_noMuons ( parentjetdef,
spec )

Definition at line 120 of file JetInputConfig.py.

120def buildPFlowSel_noMuons(parentjetdef,spec):
121 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noMuons",
122 electronIDToExclude = "LHMedium",
123 muonIDToExclude = "Medium",
124 excludeNeutralMuonFE=True,
125 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
126 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
127 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noMuons",
128 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noMuons"
129 )
130

◆ buildPFlowSel_tauSeedEleRM()

python.JetInputConfig.buildPFlowSel_tauSeedEleRM ( parentjetdef,
spec )

Definition at line 94 of file JetInputConfig.py.

94def buildPFlowSel_tauSeedEleRM(parentjetdef,spec):
95 return CompFactory.JetPFlowSelectionAlg( "pflowselalg_tauSeedEleRM",
96 electronIDToExclude = "LHMedium",
97 ElectronInputContainer="Electrons",
98 excludeNeutralElectronFE=True,
99 muonIDToInclude = "Loose",
100 excludeChargedMuonFE=False,
101 includeChargedMuonFE=True,
102 includeNeutralMuonFE=True,
103 ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
104 NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
105 ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_tauSeedEleRM",
106 NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_tauSeedEleRM"
107 )
108

◆ buildPV0TrackSel()

python.JetInputConfig.buildPV0TrackSel ( parentjetdef,
spec )

Definition at line 59 of file JetInputConfig.py.

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

Variable Documentation

◆ jetlog

python.JetInputConfig.jetlog = Logging.logging.getLogger('JetInputConfig')

Definition at line 11 of file JetInputConfig.py.