ATLAS Offline Software
Functions | Variables
python.StandardJetConstits Namespace Reference

Functions

def isMC (flags)
 
def standardReco (input)
 
def _trackParticleInputsExist (flags)
 List of standard input sources for jets. More...
 
def _muonSegmentInputsExist (flags)
 
def _largeRTracksExist (flags)
 
def _getPFOTool (*l)
 List of standard constituent modifiers. More...
 

Variables

 stdInputExtDic = ldict()
 
 stdConstitDic = ldict()
 
 stdContitModifDic = ldict()
 
list _stdInputList
 
 _locked
 
string vtxKey = "PrimaryVertices"
 
string tvaKey = "JetTrackVtxAssoc"
 
list _stdModList
 

Function Documentation

◆ _getPFOTool()

def python.StandardJetConstits._getPFOTool ( l)
private

List of standard constituent modifiers.

One Property of the CorrectPFO constit modifier is a tool. 
we use this function as a placeholder, allowing to delay the intantiation of this property tool
to the time the modifier itself is instantiated.

Definition at line 504 of file StandardJetConstits.py.

504 def _getPFOTool(*l):
505  """One Property of the CorrectPFO constit modifier is a tool.
506  we use this function as a placeholder, allowing to delay the intantiation of this property tool
507  to the time the modifier itself is instantiated.
508  """
509  from AthenaConfiguration.ComponentFactory import CompFactory
510  return CompFactory.getComp("CP::WeightPFOTool")("weightPFO")
511 
512 
513 

◆ _largeRTracksExist()

def python.StandardJetConstits._largeRTracksExist (   flags)
private

Definition at line 118 of file StandardJetConstits.py.

118 def _largeRTracksExist(flags):
119  warning = "Large radius tracking did not run"
120  if "InDetLargeD0TrackParticles" in flags.Input.Collections:
121  # the conditions here weren't the same as above: apparently we
122  # require _both_ the input condition _and_ the tracking
123  # flag. I don't know if this is what we want but it keeps with
124  # the existing behavior.
125  #
126  # Again, the isAnalysisRelease function is needed to short
127  # circuit the flag check, since flags.Tracking doesn't exist
128  # in analysis releases.
129  if isAnalysisRelease() or flags.Tracking.doLargeD0:
130  return True, warning
131  return False, warning
132 
133 

◆ _muonSegmentInputsExist()

def python.StandardJetConstits._muonSegmentInputsExist (   flags)
private

Definition at line 109 of file StandardJetConstits.py.

109 def _muonSegmentInputsExist(flags):
110  warning = "Muon reco is disabled"
111  if "MuonSegments" in flags.Input.Collections:
112  return True, warning
113  if isAnalysisRelease():
114  # reco flags don't exist in analysis relase
115  return False, warning
116  return flags.Reco.EnableCombinedMuon, warning
117 

◆ _trackParticleInputsExist()

def python.StandardJetConstits._trackParticleInputsExist (   flags)
private

List of standard input sources for jets.

Definition at line 99 of file StandardJetConstits.py.

99 def _trackParticleInputsExist(flags):
100  warning = "Tracking is disabled and no InDetTrackParticles in input"
101  if "InDetTrackParticles" in flags.Input.Collections:
102  return True, warning
103  if isAnalysisRelease():
104  # we can't check reco flags in analysis release (and would not
105  # be building tracks anyway)
106  return False, warning
107  return flags.Reco.EnableTracking, warning
108 

◆ isMC()

def python.StandardJetConstits.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 44 of file StandardJetConstits.py.

44 def isMC(flags):
45  """A simple filter function for testing if we're running in MC
46  returns (bool, str) where the str contains an explanation of why the bool is False.
47  (probably worth re-allocating somehere else)"""
48  return flags.Input.isMC, "Input file is not MC"
49 

◆ standardReco()

def python.StandardJetConstits.standardReco (   input)
Returns a helper function which invokes the standard reco configuration for the container 'input' 
(where input is external to the jet domain).

We group the definition of functions here rather than separately, so that we can change them 
automatically to a void function in case we're in an Analysis release and we can not import upstream packages.

Definition at line 50 of file StandardJetConstits.py.

50 def standardReco(input):
51  """Returns a helper function which invokes the standard reco configuration for the container 'input'
52  (where input is external to the jet domain).
53 
54  We group the definition of functions here rather than separately, so that we can change them
55  automatically to a void function in case we're in an Analysis release and we can not import upstream packages.
56 
57  """
58 
59  doNothingFunc = lambda *l:None # noqa: E731
60  if isAnalysisRelease():
61  return doNothingFunc
62 
63 
64  if input=='CaloClusters':
65  def f(jetdef,spec):
66  from CaloRec.CaloRecoConfig import CaloRecoCfg
67  flags = jetdef._cflags
68  return CaloRecoCfg(flags) if flags.Jet.doUpstreamDependencies else None
69  elif input=='Tracks':
70  def f(jetdef,spec):
71  from InDetConfig.TrackRecoConfig import InDetTrackRecoCfg
72  flags = jetdef._cflags
73  return InDetTrackRecoCfg(flags) if flags.Jet.doUpstreamDependencies else None
74  elif input=="Muons":
75  def f(jetdef,spec):
76  from MuonConfig.MuonReconstructionConfig import MuonReconstructionCfg
77  flags = jetdef._cflags
78  return MuonReconstructionCfg(flags) if flags.Jet.doUpstreamDependencies else None
79  elif input=="PFlow":
80  def f(jetdef,spec):
81  if not jetdef._cflags.Jet.doUpstreamDependencies:
82  return None
83  from eflowRec.PFRun3Config import PFCfg
84  return PFCfg(jetdef._cflags)
85 
86  else:
87  f = doNothingFunc
88 
89  return f
90 
91 
92 

Variable Documentation

◆ _locked

python.StandardJetConstits._locked
private

Definition at line 496 of file StandardJetConstits.py.

◆ _stdInputList

list python.StandardJetConstits._stdInputList
private

Definition at line 134 of file StandardJetConstits.py.

◆ _stdModList

list python.StandardJetConstits._stdModList
private

Definition at line 516 of file StandardJetConstits.py.

◆ stdConstitDic

python.StandardJetConstits.stdConstitDic = ldict()

Definition at line 25 of file StandardJetConstits.py.

◆ stdContitModifDic

python.StandardJetConstits.stdContitModifDic = ldict()

Definition at line 26 of file StandardJetConstits.py.

◆ stdInputExtDic

python.StandardJetConstits.stdInputExtDic = ldict()

Definition at line 24 of file StandardJetConstits.py.

◆ tvaKey

string python.StandardJetConstits.tvaKey = "JetTrackVtxAssoc"

Definition at line 515 of file StandardJetConstits.py.

◆ vtxKey

string python.StandardJetConstits.vtxKey = "PrimaryVertices"

Definition at line 514 of file StandardJetConstits.py.

python.CaloRecoConfig.CaloRecoCfg
def CaloRecoCfg(flags, clustersname=None)
Definition: CaloRecoConfig.py:9
python.StandardJetConstits.isMC
def isMC(flags)
Definition: StandardJetConstits.py:44
python.MuonReconstructionConfig.MuonReconstructionCfg
def MuonReconstructionCfg(flags)
Definition: MuonReconstructionConfig.py:149
python.StandardJetConstits._muonSegmentInputsExist
def _muonSegmentInputsExist(flags)
Definition: StandardJetConstits.py:109
python.StandardJetConstits.standardReco
def standardReco(input)
Definition: StandardJetConstits.py:50
ParticleJetToolsConfig.isAnalysisRelease
def isAnalysisRelease()
Definition: ParticleJetToolsConfig.py:19
hist_file_dump.f
f
Definition: hist_file_dump.py:135
python.TrackRecoConfig.InDetTrackRecoCfg
def InDetTrackRecoCfg(flags)
Main ID tracking config #####################.
Definition: TrackRecoConfig.py:791
python.StandardJetConstits._trackParticleInputsExist
def _trackParticleInputsExist(flags)
List of standard input sources for jets.
Definition: StandardJetConstits.py:99
python.StandardJetConstits._largeRTracksExist
def _largeRTracksExist(flags)
Definition: StandardJetConstits.py:118
python.StandardJetConstits._getPFOTool
def _getPFOTool(*l)
List of standard constituent modifiers.
Definition: StandardJetConstits.py:504
PFCfg
Definition: PFCfg.py:1