ATLAS Offline Software
Functions
python.JetInputConfig Namespace Reference

Functions

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

Function Documentation

◆ _buildJetAlgForInput()

def python.JetInputConfig._buildJetAlgForInput (   suffix,
  tools 
)
private

Definition at line 15 of file JetInputConfig.py.

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

◆ buildEventShapeAlg()

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

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

◆ buildJetInputTruth()

def python.JetInputConfig.buildJetInputTruth (   parentjetdef,
  truthmod 
)

Definition at line 30 of file JetInputConfig.py.

30 def 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 

◆ buildJetInputTruthGEN()

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

37 def buildJetInputTruthGEN(parentjetdef, truthmod):
38  """ Build truth constituents as in EVTGEN jobs in the r21 config.
39  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.
40  The source for r21 EVTGEN config was in GeneratorFilters/share/common/GenerateTruthJets.py
41  """
42  truthmod = truthmod or ""
43 
44  # recopy config from GeneratorFilters/share/common/GenerateTruthJets.py
45  truthClassifier = CompFactory.MCTruthClassifier("JetMCTruthClassifier")
46 
47  if truthmod == "":
48  truthpartcopy = CompFactory.CopyTruthJetParticles("truthpartcopy",
49  OutputName="JetInputTruthParticlesGEN",
50  MCTruthClassifier=truthClassifier)
51  elif truthmod=="NoWZ":
52 
53  truthpartcopy = CompFactory.CopyTruthJetParticles("truthpartcopywz",
54  OutputName="JetInputTruthParticlesGENNoWZ",
55  MCTruthClassifier=truthClassifier,
56  IncludePromptLeptons=False)
57 
58  return _buildJetAlgForInput("truthpartcopy_"+truthmod,
59  tools = [ truthpartcopy ]
60  )
61 

◆ buildJetTrackUsedInFitDeco()

def python.JetInputConfig.buildJetTrackUsedInFitDeco (   parentjetdef,
  inputspec 
)

Definition at line 21 of file JetInputConfig.py.

21 def 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()

def python.JetInputConfig.buildLabelledTruth (   parentjetdef,
  truthmod 
)

Definition at line 62 of file JetInputConfig.py.

62 def buildLabelledTruth(parentjetdef, truthmod):
63  from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthLabelParticles
64  tool = getCopyTruthLabelParticles(truthmod)
65  return _buildJetAlgForInput("truthlabelcopy_"+truthmod,
66  tools = [ tool ]
67  )
68 

◆ buildPFlowSel()

def python.JetInputConfig.buildPFlowSel (   parentjetdef,
  spec 
)

Definition at line 86 of file JetInputConfig.py.

86 def buildPFlowSel(parentjetdef, spec):
87  return CompFactory.JetPFlowSelectionAlg( "pflowselalg",
88  electronID = "LHMedium",
89  ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
90  NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
91  ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects",
92  NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects"
93  )
94 

◆ buildPFlowSel_noElectrons()

def python.JetInputConfig.buildPFlowSel_noElectrons (   parentjetdef,
  spec 
)

Definition at line 95 of file JetInputConfig.py.

95 def buildPFlowSel_noElectrons(parentjetdef,spec):
96  return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noElectrons",
97  electronID = "LHMedium",
98  ElectronInputContainer="Electrons",
99  removeNeutralElectronFE=True,
100  ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
101  NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
102  ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noElectrons",
103  NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noElectrons"
104  )
105 

◆ buildPFlowSel_noLeptons()

def python.JetInputConfig.buildPFlowSel_noLeptons (   parentjetdef,
  spec 
)

Definition at line 117 of file JetInputConfig.py.

117 def buildPFlowSel_noLeptons(parentjetdef,spec):
118  return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noLeptons",
119  electronID = "LHMedium",
120  ElectronInputContainer="Electrons",
121  removeNeutralElectronFE=True,
122  muonID = "Medium",
123  removeNeutralMuonFE=True,
124  ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
125  NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
126  ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noLeptons",
127  NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noLeptons"
128  )
129 

◆ buildPFlowSel_noMuons()

def python.JetInputConfig.buildPFlowSel_noMuons (   parentjetdef,
  spec 
)

Definition at line 106 of file JetInputConfig.py.

106 def buildPFlowSel_noMuons(parentjetdef,spec):
107  return CompFactory.JetPFlowSelectionAlg( "pflowselalg_noMuons",
108  electronID = "LHMedium",
109  muonID = "Medium",
110  removeNeutralMuonFE=True,
111  ChargedPFlowInputContainer = "JetETMissChargedParticleFlowObjects",
112  NeutralPFlowInputContainer = "JetETMissNeutralParticleFlowObjects",
113  ChargedPFlowOutputContainer = "GlobalChargedParticleFlowObjects_noMuons",
114  NeutralPFlowOutputContainer = "GlobalNeutralParticleFlowObjects_noMuons"
115  )
116 

◆ buildPV0TrackSel()

def python.JetInputConfig.buildPV0TrackSel (   parentjetdef,
  spec 
)

Definition at line 69 of file JetInputConfig.py.

69 def buildPV0TrackSel(parentjetdef, spec):
70  from TrackVertexAssociationTool.TrackVertexAssociationToolConfig import getTTVAToolForReco
71  trkOptions = parentjetdef._contextDic
72  tvaTool = getTTVAToolForReco("trackjetTVAtool",
73  HardScatterLinkDeco = "",
74  WorkingPoint = "Nonprompt_All_MaxWeight",
75  TrackContName = trkOptions['JetTracksQualityCuts']
76  )
77  alg = CompFactory.PV0TrackSelectionAlg("pv0tracksel_trackjet",
78  InputTrackContainer = trkOptions['JetTracksQualityCuts'],
79  VertexContainer = trkOptions['Vertices'],
80  OutputTrackContainer = "PV0"+trkOptions['JetTracks'],
81  TVATool = tvaTool,
82  )
83  return alg
84 
85 
python.JetInputConfig.buildLabelledTruth
def buildLabelledTruth(parentjetdef, truthmod)
Definition: JetInputConfig.py:62
python.JetInputConfig.buildEventShapeAlg
def buildEventShapeAlg(jetOrConstitdef, inputspec, voronoiRf=0.9, radius=0.4, suffix=None)
Definition: JetInputConfig.py:132
python.JetInputConfig._buildJetAlgForInput
def _buildJetAlgForInput(suffix, tools)
Definition: JetInputConfig.py:15
EventDensityConfig.configEventDensityTool
def configEventDensityTool(name, jetOrConstitdef, radius=0.4, **options)
Definition: EventDensityConfig.py:36
python.JetInputConfig.buildJetInputTruthGEN
def buildJetInputTruthGEN(parentjetdef, truthmod)
Definition: JetInputConfig.py:37
python.JetInputConfig.buildPFlowSel_noMuons
def buildPFlowSel_noMuons(parentjetdef, spec)
Definition: JetInputConfig.py:106
python.JetInputConfig.buildPFlowSel
def buildPFlowSel(parentjetdef, spec)
Definition: JetInputConfig.py:86
python.JetInputConfig.buildJetTrackUsedInFitDeco
def buildJetTrackUsedInFitDeco(parentjetdef, inputspec)
Definition: JetInputConfig.py:21
EventDensityConfig.getEventShapeName
def getEventShapeName(defOrLabel, nameprefix="", suffix=None, radius=0.4)
Definition: EventDensityConfig.py:7
python.JetInputConfig.buildPV0TrackSel
def buildPV0TrackSel(parentjetdef, spec)
Definition: JetInputConfig.py:69
python.JetInputConfig.buildPFlowSel_noLeptons
def buildPFlowSel_noLeptons(parentjetdef, spec)
Definition: JetInputConfig.py:117
python.JetInputConfig.buildJetInputTruth
def buildJetInputTruth(parentjetdef, truthmod)
Definition: JetInputConfig.py:30
UsedInVertexFitTrackDecoratorConfig.getUsedInVertexFitTrackDecoratorAlg
def getUsedInVertexFitTrackDecoratorAlg(trackCont="InDetTrackParticles", vtxCont="PrimaryVertices", vertexDeco="TTVA_AMVFVertices_forReco", weightDeco="TTVA_AMVFWeights_forReco")
Definition: UsedInVertexFitTrackDecoratorConfig.py:16
python.JetInputConfig.buildPFlowSel_noElectrons
def buildPFlowSel_noElectrons(parentjetdef, spec)
Definition: JetInputConfig.py:95
python.JetRecConfig.getPJContName
def getPJContName(jetOrConstitdef, suffix=None, parent_jetdef=None)
Definition: JetRecConfig.py:341
TrackVertexAssociationToolConfig.getTTVAToolForReco
def getTTVAToolForReco(name="TTVATool", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:6
ParticleJetToolsConfig.getCopyTruthLabelParticles
def getCopyTruthLabelParticles(truthtype)
Definition: ParticleJetToolsConfig.py:43
ParticleJetToolsConfig.getCopyTruthJetParticles
def getCopyTruthJetParticles(modspec, cflags)
Definition: ParticleJetToolsConfig.py:63