ATLAS Offline Software
Loading...
Searching...
No Matches
python.StandardJetConstits Namespace Reference

Functions

 standardReco (input)
 _trackParticleInputsExist (flags)
 List of standard input sources for jets.
 _muonSegmentInputsExist (flags)
 _unassocMuonSegmentInputsExist (flags)
 _largeRTracksExist (flags)
 getCaloClusterEnergyMLCalibAlgBuilder ()
 getPFOClusterMLCorrectionAlgorithmBuilder ()
 _getPFOTool (*l)
 List of standard constituent modifiers.

Variables

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

Detailed Description

 StandardJetConstits: A module containing standard definitions for jet inputs : external container and 
 constituents.
 These can be copied and modified by users who want something a bit   
 different from what is provided.                                     
                                                                      
 Author: TJ Khoo, P-A Delsart                                                      

Function Documentation

◆ _getPFOTool()

python.StandardJetConstits._getPFOTool ( * l)
protected

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 550 of file StandardJetConstits.py.

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

◆ _largeRTracksExist()

python.StandardJetConstits._largeRTracksExist ( flags)
protected

Definition at line 124 of file StandardJetConstits.py.

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

◆ _muonSegmentInputsExist()

python.StandardJetConstits._muonSegmentInputsExist ( flags)
protected

Definition at line 103 of file StandardJetConstits.py.

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

◆ _trackParticleInputsExist()

python.StandardJetConstits._trackParticleInputsExist ( flags)
protected

List of standard input sources for jets.

Definition at line 93 of file StandardJetConstits.py.

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

◆ _unassocMuonSegmentInputsExist()

python.StandardJetConstits._unassocMuonSegmentInputsExist ( flags)
protected

Definition at line 112 of file StandardJetConstits.py.

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

◆ getCaloClusterEnergyMLCalibAlgBuilder()

python.StandardJetConstits.getCaloClusterEnergyMLCalibAlgBuilder ( )

Definition at line 139 of file StandardJetConstits.py.

139def getCaloClusterEnergyMLCalibAlgBuilder():
140 def f(flags,spec):
141 from CaloRec.CaloClusterMLCalibAlgLiteConfig import CaloClusterMLCalibAlgLiteCfg
142 return CaloClusterMLCalibAlgLiteCfg(flags._cflags)
143 return f

◆ getPFOClusterMLCorrectionAlgorithmBuilder()

python.StandardJetConstits.getPFOClusterMLCorrectionAlgorithmBuilder ( )

Definition at line 144 of file StandardJetConstits.py.

144def getPFOClusterMLCorrectionAlgorithmBuilder():
145 def f(flags,spec):
146 from eflowRec.PFRun3Config import PFOClusterMLCorrectionAlgorithmBuilder
147 return PFOClusterMLCorrectionAlgorithmBuilder(flags._cflags, spec)
148 return f
149
150
151

◆ standardReco()

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 46 of file StandardJetConstits.py.

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

Variable Documentation

◆ _locked

python.StandardJetConstits._locked
protected

Definition at line 542 of file StandardJetConstits.py.

◆ _stdInputList

list python.StandardJetConstits._stdInputList
protected

Definition at line 152 of file StandardJetConstits.py.

◆ _stdModList

list python.StandardJetConstits._stdModList
protected

Definition at line 562 of file StandardJetConstits.py.

◆ stdConstitDic

python.StandardJetConstits.stdConstitDic = ldict()

Definition at line 27 of file StandardJetConstits.py.

◆ stdContitModifDic

python.StandardJetConstits.stdContitModifDic = ldict()

Definition at line 28 of file StandardJetConstits.py.

◆ stdInputExtDic

python.StandardJetConstits.stdInputExtDic = ldict()

Definition at line 26 of file StandardJetConstits.py.

◆ tvaKey

str python.StandardJetConstits.tvaKey = "JetTrackVtxAssoc"

Definition at line 561 of file StandardJetConstits.py.

◆ vtxKey

str python.StandardJetConstits.vtxKey = "PrimaryVertices"

Definition at line 560 of file StandardJetConstits.py.