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 getCaloClusterEnergyMLCalibAlgBuilder ()
 
def getPFOClusterMLCorrectionAlgorithmBuilder ()
 
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 551 of file StandardJetConstits.py.

551 def _getPFOTool(*l):
552  """One Property of the CorrectPFO constit modifier is a tool.
553  we use this function as a placeholder, allowing to delay the intantiation of this property tool
554  to the time the modifier itself is instantiated.
555  """
556  from AthenaConfiguration.ComponentFactory import CompFactory
557  return CompFactory.getComp("CP::WeightPFOTool")("weightPFO")
558 
559 
560 

◆ _largeRTracksExist()

def python.StandardJetConstits._largeRTracksExist (   flags)
private

Definition at line 128 of file StandardJetConstits.py.

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

◆ _muonSegmentInputsExist()

def python.StandardJetConstits._muonSegmentInputsExist (   flags)
private

Definition at line 107 of file StandardJetConstits.py.

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

◆ _trackParticleInputsExist()

def python.StandardJetConstits._trackParticleInputsExist (   flags)
private

List of standard input sources for jets.

Definition at line 97 of file StandardJetConstits.py.

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

◆ _unassocMuonSegmentInputsExist()

def python.StandardJetConstits._unassocMuonSegmentInputsExist (   flags)
private

Definition at line 116 of file StandardJetConstits.py.

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

◆ getCaloClusterEnergyMLCalibAlgBuilder()

def python.StandardJetConstits.getCaloClusterEnergyMLCalibAlgBuilder ( )

Definition at line 143 of file StandardJetConstits.py.

144  def f(flags,spec):
145  from CaloRec.CaloClusterMLCalibAlgLiteConfig import CaloClusterMLCalibAlgLiteCfg
146  return CaloClusterMLCalibAlgLiteCfg(flags._cflags)
147  return f

◆ getPFOClusterMLCorrectionAlgorithmBuilder()

def python.StandardJetConstits.getPFOClusterMLCorrectionAlgorithmBuilder ( )

Definition at line 148 of file StandardJetConstits.py.

149  def f(flags,spec):
150  from eflowRec.PFRun3Config import PFOClusterMLCorrectionAlgorithmBuilder
151  return PFOClusterMLCorrectionAlgorithmBuilder(flags._cflags, spec)
152  return f
153 
154 
155 

◆ 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 

Variable Documentation

◆ _locked

python.StandardJetConstits._locked
private

Definition at line 543 of file StandardJetConstits.py.

◆ _stdInputList

list python.StandardJetConstits._stdInputList
private

Definition at line 156 of file StandardJetConstits.py.

◆ _stdModList

list python.StandardJetConstits._stdModList
private

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

◆ vtxKey

string python.StandardJetConstits.vtxKey = "PrimaryVertices"

Definition at line 561 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:116
python.CaloClusterMLCalibAlgLiteConfig.CaloClusterMLCalibAlgLiteCfg
def CaloClusterMLCalibAlgLiteCfg(flags, name="CaloClusterMLCalibAlgLite", **kwargs)
Definition: CaloClusterMLCalibAlgLiteConfig.py:10
python.StandardJetConstits.getPFOClusterMLCorrectionAlgorithmBuilder
def getPFOClusterMLCorrectionAlgorithmBuilder()
Definition: StandardJetConstits.py:148
python.StandardJetConstits._muonSegmentInputsExist
def _muonSegmentInputsExist(flags)
Definition: StandardJetConstits.py:107
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.StandardJetConstits.getCaloClusterEnergyMLCalibAlgBuilder
def getCaloClusterEnergyMLCalibAlgBuilder()
Definition: StandardJetConstits.py:143
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:97
python.StandardJetConstits._largeRTracksExist
def _largeRTracksExist(flags)
Definition: StandardJetConstits.py:128
python.StandardJetConstits._getPFOTool
def _getPFOTool(*l)
List of standard constituent modifiers.
Definition: StandardJetConstits.py:551
MuonReconstructionConfig.MuonReconstructionCfg
def MuonReconstructionCfg(flags)
Definition: MuonReconstructionConfig.py:144
PFRun3Config.PFOClusterMLCorrectionAlgorithmBuilder
def PFOClusterMLCorrectionAlgorithmBuilder(inputFlags, spec)
Definition: PFRun3Config.py:146
PFCfg
Definition: PFCfg.py:1