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

Functions

 isMC (flags)
 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 554 of file StandardJetConstits.py.

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

◆ _largeRTracksExist()

python.StandardJetConstits._largeRTracksExist ( flags)
protected

Definition at line 128 of file StandardJetConstits.py.

128def _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()

python.StandardJetConstits._muonSegmentInputsExist ( flags)
protected

Definition at line 107 of file StandardJetConstits.py.

107def _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()

python.StandardJetConstits._trackParticleInputsExist ( flags)
protected

List of standard input sources for jets.

Definition at line 97 of file StandardJetConstits.py.

97def _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()

python.StandardJetConstits._unassocMuonSegmentInputsExist ( flags)
protected

Definition at line 116 of file StandardJetConstits.py.

116def _unassocMuonSegmentInputsExist(flags):
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()

python.StandardJetConstits.getCaloClusterEnergyMLCalibAlgBuilder ( )

Definition at line 143 of file StandardJetConstits.py.

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

◆ getPFOClusterMLCorrectionAlgorithmBuilder()

python.StandardJetConstits.getPFOClusterMLCorrectionAlgorithmBuilder ( )

Definition at line 148 of file StandardJetConstits.py.

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

◆ isMC()

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.

44def 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()

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.

50def 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
Definition PFCfg.py:1

Variable Documentation

◆ _locked

python.StandardJetConstits._locked
protected

Definition at line 546 of file StandardJetConstits.py.

◆ _stdInputList

list python.StandardJetConstits._stdInputList
protected

Definition at line 156 of file StandardJetConstits.py.

◆ _stdModList

list python.StandardJetConstits._stdModList
protected

Definition at line 566 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

str python.StandardJetConstits.tvaKey = "JetTrackVtxAssoc"

Definition at line 565 of file StandardJetConstits.py.

◆ vtxKey

str python.StandardJetConstits.vtxKey = "PrimaryVertices"

Definition at line 564 of file StandardJetConstits.py.