ATLAS Offline Software
Functions | Variables
python.StandardJetMods Namespace Reference

Functions

def _jetname (jetdef, modspec)
 
def isMC (flags)
 
def _constitContainername (jetdef, modspec)
 

Variables

 stdJetModifiers = ldict()
 
 Sort
 Define the simple modifier setups here – those defined in JetRec. More...
 
 Filter
 
 Filter_ifnotESD
 
 Filter_calibThreshold
 
 Calib
 
 jetlog = Logging.logging.getLogger('JetStandardMods')
 
 PartonTruthLabel
 
 JetDeltaRLabel
 
 JetGhostLabel
 
 JetDeltaRInitialLabel
 
 JetGhostInitialLabel
 
 JetQuarkChargeLabel
 
 JetTaggingTruthLabel
 
 JetPileupLabel
 
 nsubjettiness
 
 nsubjettinessR
 
 ktdr
 
 ktsplitter
 
 angularity
 
 dipolarity
 
 planarflow
 
 ktmassdrop
 
 ecorr
 
 ecorrR
 
 ecorrgeneral
 
 ecorrgeneralratios
 
 comshapes
 
 pull
 
 charge
 
 qw
 
 softdropobs
 
 qgtransformer
 
 toptransformer
 
 wtransformer
 
 wtransformer_massdec
 
 vr
 

Function Documentation

◆ _constitContainername()

def python.StandardJetMods._constitContainername (   jetdef,
  modspec 
)
private
Returns the exact constituent container name used to build jetdef

Definition at line 87 of file StandardJetMods.py.

87 def _constitContainername(jetdef,modspec):
88  """Returns the exact constituent container name used to build jetdef"""
89  constitdef = jetdef.inputdef
90  containername = constitdef.containername(jetdef).split(':')[-1] if callable(constitdef.containername) else constitdef.containername
91  return containername
92 
93 
94 # Standard jet moments
95 try:
96  from JetMomentTools import JetMomentToolsConfig
97  stdJetModifiers.update(
98 
99  # Easy cases, no special config or prereqs, just default tool config
100  ClusterMoments = JetModifier("JetClusterMomentsTool", "clsmoms", JetContainer = _jetname),
101  ECPSFrac = JetModifier("JetECPSFractionTool", "ecpsfrac", JetContainer = _jetname),
102  Width = JetModifier("JetWidthTool", "width", JetContainer = _jetname),
103 
104  # More complex cases here
105  CaloEnergies = JetModifier("JetCaloEnergies", "jetens",
106  prereqs=["mod:EMScaleMom"],
107  Calculations=["EMFrac", "HECFrac", "PSFrac", "FracSamplingMax"], JetContainer = _jetname,
108  ),
109 
110  CaloEnergiesLargeR = JetModifier("JetCaloEnergies", "jetenslargeR",
111  prereqs=["mod:EMScaleMom"],
112  Calculations=["EMFrac", "HECFrac", "PSFrac", "EM3Frac", "Tile0Frac", "EffNClusts"], JetContainer = _jetname,
113  calcClusterBasedVars = True,
114  ),
115 
116  # CaloEnergiesClus is only relevant for FE-based jet collections
117  CaloEnergiesClus = JetModifier("JetCaloEnergies", "jetensclus",
118  prereqs=["mod:EMScaleMom"],
119  Calculations=["EMFrac", "HECFrac", "PSFrac", "FracSamplingMax"], JetContainer = _jetname,
120  calcClusterBasedVars = True),
121 
122  CaloQuality = JetModifier("JetCaloQualityTool", "caloqual",
123  TimingCuts = [5,10],
124  Calculations = ["LArQuality", "N90Constituents", "NegativeE", "Timing", "HECQuality", "Centroid", "AverageLArQF", "BchCorrCell"],JetContainer = _jetname),
125 
126  CaloQualityFE = JetModifier("JetCaloQualityToolFE", "caloqualFE",
127  TimingCuts = [5,10],
128  ThresholdCuts = [90],
129  Calculations = ["LArQuality", "NegativeE", "Timing", "HECQuality", "Centroid", "AverageLArQF", "BchCorrCell"],JetContainer = _jetname),
130 
131  N90 = JetModifier("JetCaloQualityTool", "n90",
132  Calculations = ["N90Constituents"],JetContainer = _jetname),
133 
134  ConstitFourMom = JetModifier("JetConstitFourMomTool", "constitfourmom_basename",
135  createfn=JetMomentToolsConfig.getConstitFourMomTool,),
136  EMScaleMom = JetModifier("JetEMScaleMomTool", "emscalemom_basename",
137  createfn=JetMomentToolsConfig.getEMScaleMomTool,
138  JetContainer = _jetname),
139 
140  JVF = JetModifier("JetVertexFractionTool", "jvf",
141  createfn=JetMomentToolsConfig.getJVFTool,
142  prereqs = [inputsFromContext("TVA"), "mod:TrackMoments", inputsFromContext("Vertices")],
143  JetContainer = _jetname),
144  JVT = JetModifier("JetVertexTaggerTool", "jvt",
145  createfn=JetMomentToolsConfig.getJVTTool,
146  prereqs = [ "mod:JVF" ],JetContainer = _jetname),
147  NNJVT = JetModifier("JetVertexNNTagger", "nnjvt",
148  createfn=JetMomentToolsConfig.getNNJvtTool,
149  prereqs = [ "mod:JVF" ],JetContainer = _jetname),
150  LArHVCorr = JetModifier("JetLArHVTool", "larhvcorr",
151  prereqs = ["mod:EMScaleMom"],JetContainer = _jetname),
152  OriginSetPV = JetModifier("JetOriginCorrectionTool", "origin_setpv",
153  prereqs = [ "mod:JVF" ],JetContainer = _jetname, OnlyAssignPV=True),
154  TrackMoments = JetModifier("JetTrackMomentsTool", "trkmoms",
155  createfn=JetMomentToolsConfig.getTrackMomentsTool,
156  prereqs = [ inputsFromContext("TVA"),"ghost:Track" ],JetContainer = _jetname),
157 
158  TrackSumMoments = JetModifier("JetTrackSumMomentsTool", "trksummoms",
159  createfn=JetMomentToolsConfig.getTrackSumMomentsTool,
160  prereqs = [ inputsFromContext("TVA"),"ghost:Track" ],JetContainer = _jetname),
161  Charge = JetModifier("JetChargeTool", "jetcharge",
162  prereqs = [ "ghost:Track" ]),
163 
164  QGTagging = JetModifier("JetQGTaggerVariableTool", "qgtagging",
165  createfn=JetMomentToolsConfig.getQGTaggingTool,
166  prereqs = lambda _,jetdef :
167  [inputsFromContext("TVA"),"mod:TrackMoments"] +
168  (["mod:JetPtAssociation"] if not isMC(jetdef._cflags) else []),
169  JetContainer = _jetname),
170 
171  fJVT = JetModifier("JetForwardPFlowJvtTool", "fJVT",
172  createfn=JetMomentToolsConfig.getPFlowfJVTTool,
173  prereqs = [inputsFromContext("TVA"),inputsFromContext("EventDensity"),inputsFromContext("Vertices"),"mod:NNJVT"],
174  JetContainer = _jetname),
175 
176  bJVT = JetModifier("JetBalancePFlowJvtTool", "bJVT",
177  createfn=JetMomentToolsConfig.getPFlowbJVTTool,
178  prereqs = [inputsFromContext("EventDensity"),inputsFromContext("Vertices"),"mod:NNJVT"],
179  JetContainer = _jetname),
180 
181  ConstitFrac = JetModifier("JetConstituentFrac", "constitFrac",
182  JetContainer = _jetname,
183  ),
184 
185  groomMRatio = JetModifier("JetGroomMRatio", "groomMRatio",
186  JetContainer = _jetname,
187  ),
188 
189  JetPtAssociation = JetModifier("JetPtAssociationTool", "jetPtAssociation",
190  filterfn=isMC,
191  createfn=JetMomentToolsConfig.getJetPtAssociationTool,
192  prereqs=["ghost:Truth"],
193  JetContainer = _jetname
194  ),
195 
196  # *******************
197  # Isolation variables
198  jetiso = JetModifier("JetIsolationTool","iso",
199  JetContainer=_jetname,
200  InputConstitContainer = _constitContainername,
201  IsolationCalculations = ["IsoFixedCone:5:Pt", "IsoFixedCone:5:PtPUsub",],
202  RhoKey = lambda jetdef, specs : "Kt4"+jetdef.inputdef.label+"EventShape" ,
203  prereqs= ["input:EventDensity"], #lambda spec,jetdef : ["input:Kt4"+jetdef.inputdef.label+"EventShape",],
204  ),
205 
206  jetisoTruth = JetModifier("JetIsolationTool","isoTruth",
207  JetContainer=_jetname,
208  InputConstitContainer = _constitContainername,
209  IsolationCalculations = ["IsoFixedCone:5:Pt", ],
210  RhoKey = "",
211  ),
212 
213 
214  )

◆ _jetname()

def python.StandardJetMods._jetname (   jetdef,
  modspec 
)
private

Definition at line 77 of file StandardJetMods.py.

77 def _jetname(jetdef,modspec):
78  return jetdef.fullname()
79 

◆ isMC()

def python.StandardJetMods.isMC (   flags)
A simple filter function for  testing if we're running in MC
returns (bool, str) where the str contains an explanation of why the bool is False.
(probably worth re-allocating somehere else)

Definition at line 80 of file StandardJetMods.py.

80 def isMC(flags):
81  """A simple filter function for testing if we're running in MC
82  returns (bool, str) where the str contains an explanation of why the bool is False.
83  (probably worth re-allocating somehere else)"""
84  return flags.Input.isMC or flags.Overlay.DataOverlay, "Input file is not MC"
85 
86 

Variable Documentation

◆ angularity

python.StandardJetMods.angularity

Definition at line 293 of file StandardJetMods.py.

◆ Calib

python.StandardJetMods.Calib

Definition at line 58 of file StandardJetMods.py.

◆ charge

python.StandardJetMods.charge

Definition at line 311 of file StandardJetMods.py.

◆ comshapes

python.StandardJetMods.comshapes

Definition at line 307 of file StandardJetMods.py.

◆ dipolarity

python.StandardJetMods.dipolarity

Definition at line 295 of file StandardJetMods.py.

◆ ecorr

python.StandardJetMods.ecorr

Definition at line 301 of file StandardJetMods.py.

◆ ecorrgeneral

python.StandardJetMods.ecorrgeneral

Definition at line 304 of file StandardJetMods.py.

◆ ecorrgeneralratios

python.StandardJetMods.ecorrgeneralratios

Definition at line 305 of file StandardJetMods.py.

◆ ecorrR

python.StandardJetMods.ecorrR

Definition at line 302 of file StandardJetMods.py.

◆ Filter

python.StandardJetMods.Filter

Definition at line 34 of file StandardJetMods.py.

◆ Filter_calibThreshold

python.StandardJetMods.Filter_calibThreshold

Definition at line 43 of file StandardJetMods.py.

◆ Filter_ifnotESD

python.StandardJetMods.Filter_ifnotESD

Definition at line 39 of file StandardJetMods.py.

◆ JetDeltaRInitialLabel

python.StandardJetMods.JetDeltaRInitialLabel

Definition at line 246 of file StandardJetMods.py.

◆ JetDeltaRLabel

python.StandardJetMods.JetDeltaRLabel

Definition at line 230 of file StandardJetMods.py.

◆ JetGhostInitialLabel

python.StandardJetMods.JetGhostInitialLabel

Definition at line 254 of file StandardJetMods.py.

◆ JetGhostLabel

python.StandardJetMods.JetGhostLabel

Definition at line 238 of file StandardJetMods.py.

◆ jetlog

python.StandardJetMods.jetlog = Logging.logging.getLogger('JetStandardMods')

Definition at line 64 of file StandardJetMods.py.

◆ JetPileupLabel

python.StandardJetMods.JetPileupLabel

Definition at line 273 of file StandardJetMods.py.

◆ JetQuarkChargeLabel

python.StandardJetMods.JetQuarkChargeLabel

Definition at line 261 of file StandardJetMods.py.

◆ JetTaggingTruthLabel

python.StandardJetMods.JetTaggingTruthLabel

Definition at line 267 of file StandardJetMods.py.

◆ ktdr

python.StandardJetMods.ktdr

Definition at line 289 of file StandardJetMods.py.

◆ ktmassdrop

python.StandardJetMods.ktmassdrop

Definition at line 299 of file StandardJetMods.py.

◆ ktsplitter

python.StandardJetMods.ktsplitter

Definition at line 291 of file StandardJetMods.py.

◆ nsubjettiness

python.StandardJetMods.nsubjettiness

Definition at line 284 of file StandardJetMods.py.

◆ nsubjettinessR

python.StandardJetMods.nsubjettinessR

Definition at line 286 of file StandardJetMods.py.

◆ PartonTruthLabel

python.StandardJetMods.PartonTruthLabel

Definition at line 225 of file StandardJetMods.py.

◆ planarflow

python.StandardJetMods.planarflow

Definition at line 297 of file StandardJetMods.py.

◆ pull

python.StandardJetMods.pull

Definition at line 309 of file StandardJetMods.py.

◆ qgtransformer

python.StandardJetMods.qgtransformer

Definition at line 322 of file StandardJetMods.py.

◆ qw

python.StandardJetMods.qw

Definition at line 313 of file StandardJetMods.py.

◆ softdropobs

python.StandardJetMods.softdropobs

Definition at line 315 of file StandardJetMods.py.

◆ Sort

python.StandardJetMods.Sort

Define the simple modifier setups here – those defined in JetRec.

Definition at line 33 of file StandardJetMods.py.

◆ stdJetModifiers

python.StandardJetMods.stdJetModifiers = ldict()

Definition at line 28 of file StandardJetMods.py.

◆ toptransformer

python.StandardJetMods.toptransformer

Definition at line 337 of file StandardJetMods.py.

◆ vr

python.StandardJetMods.vr

Definition at line 380 of file StandardJetMods.py.

◆ wtransformer

python.StandardJetMods.wtransformer

Definition at line 352 of file StandardJetMods.py.

◆ wtransformer_massdec

python.StandardJetMods.wtransformer_massdec

Definition at line 367 of file StandardJetMods.py.

python.StandardJetContext.inputsFromContext
def inputsFromContext(inputKey, prefix="", suffix="")
Definition: StandardJetContext.py:112
python.StandardJetMods.isMC
def isMC(flags)
Definition: StandardJetMods.py:80
python.StandardJetMods._constitContainername
def _constitContainername(jetdef, modspec)
Definition: StandardJetMods.py:87
python.StandardJetMods._jetname
def _jetname(jetdef, modspec)
Definition: StandardJetMods.py:77
Trk::split
@ split
Definition: LayerMaterialProperties.h:38