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 _unassocMuonSegmentInputsExist (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 533 of file StandardJetConstits.py.

533 def _getPFOTool(*l):
534  """One Property of the CorrectPFO constit modifier is a tool.
535  we use this function as a placeholder, allowing to delay the intantiation of this property tool
536  to the time the modifier itself is instantiated.
537  """
538  from AthenaConfiguration.ComponentFactory import CompFactory
539  return CompFactory.getComp("CP::WeightPFOTool")("weightPFO")
540 
541 
542 

◆ _largeRTracksExist()

def python.StandardJetConstits._largeRTracksExist (   flags)
private

Definition at line 130 of file StandardJetConstits.py.

130 def _largeRTracksExist(flags):
131  warning = "Large radius tracking did not run"
132  if "InDetLargeD0TrackParticles" in flags.Input.Collections:
133  # the conditions here weren't the same as above: apparently we
134  # require _both_ the input condition _and_ the tracking
135  # flag. I don't know if this is what we want but it keeps with
136  # the existing behavior.
137  #
138  # Again, the isAnalysisRelease function is needed to short
139  # circuit the flag check, since flags.Tracking doesn't exist
140  # in analysis releases.
141  if isAnalysisRelease() or flags.Tracking.doLargeD0:
142  return True, warning
143  return False, warning
144 
145 

◆ _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 release
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 

◆ _unassocMuonSegmentInputsExist()

def python.StandardJetConstits._unassocMuonSegmentInputsExist (   flags)
private

Definition at line 118 of file StandardJetConstits.py.

119  warning = "UnAssociated muon segments not present"
120  if "UnAssocMuonSegments" in flags.Input.Collections:
121  return True, warning
122  if flags.Input.RunNumbers[0] < 410000:
123  # Unassociated containers only exist from Run 3 and mc23 onwards
124  return False, warning
125  if isAnalysisRelease():
126  # reco flags don't exist in analysis release
127  return False, warning
128  return flags.Reco.EnableCombinedMuon, warning
129 

◆ 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 or flags.Overlay.DataOverlay, "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 525 of file StandardJetConstits.py.

◆ _stdInputList

list python.StandardJetConstits._stdInputList
private

Definition at line 146 of file StandardJetConstits.py.

◆ _stdModList

list python.StandardJetConstits._stdModList
private

Definition at line 545 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 544 of file StandardJetConstits.py.

◆ vtxKey

string python.StandardJetConstits.vtxKey = "PrimaryVertices"

Definition at line 543 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.StandardJetConstits._unassocMuonSegmentInputsExist
def _unassocMuonSegmentInputsExist(flags)
Definition: StandardJetConstits.py:118
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:140
python.TrackRecoConfig.InDetTrackRecoCfg
def InDetTrackRecoCfg(flags)
Main ID tracking config #####################.
Definition: TrackRecoConfig.py:804
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:130
python.StandardJetConstits._getPFOTool
def _getPFOTool(*l)
List of standard constituent modifiers.
Definition: StandardJetConstits.py:533
MuonReconstructionConfig.MuonReconstructionCfg
def MuonReconstructionCfg(flags)
Definition: MuonReconstructionConfig.py:139
PFCfg
Definition: PFCfg.py:1