ATLAS Offline Software
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
python.JetDefinition.JetDefinition Class Reference
Inheritance diagram for python.JetDefinition.JetDefinition:
Collaboration diagram for python.JetDefinition.JetDefinition:

Public Member Functions

def __init__ (self, algorithm, radius, inputdef, ptmin=5e3 *MeV, ghostdefs=[], modifiers=[], extrainputs=[], standardRecoMode=False, prefix="", suffix="", infix="", context="default", VRMinR=-1.0, VRMassSc=-1.0, ghostarea=0.01, byVertex=False, lock=False)
 
def __hash__ (self)
 
def __eq__ (self, rhs)
 
def __ne__ (self, rhs)
 
def lock (self)
 
def __deepcopy__ (self, memo)
 
def algorithm (self)
 
def algorithm (self, algorithm)
 
def radius (self)
 
def radius (self, radius)
 
def inputdef (self)
 
def inputdef (self, inputdef)
 
def prefix (self)
 
def suffix (self)
 
def infix (self)
 
def basename (self)
 
def basename (self, v)
 
def ghostdefs (self)
 
def modifiers (self)
 
def extrainputs (self)
 
def standardRecoMode (self)
 
def VRMinRadius (self)
 
def VRMassScale (self)
 
def context (self)
 
def ghostarea (self)
 
def fullname (self)
 
def __str__ (self)
 

Public Attributes

 ptmin
 
 ghostdefs
 
 modifiers
 
 extrainputs
 
 standardRecoMode
 
 byVertex
 

Private Member Functions

def _defineName (self)
 

Private Attributes

 _locked
 
 _algorithm
 
 _radius
 
 _inputdef
 
 _prefix
 
 _suffix
 
 _infix
 
 _context
 
 _VRMinRadius
 
 _VRMassScale
 
 _ghostarea
 
 _prereqDic
 
 _prereqOrder
 
 _internalAtt
 
 _cflags
 
 _contextDic
 
 _basename
 

Static Private Attributes

list _allowedattributes = ['_cflags','_contextDic']
 
def __repr__ = __str__
 

Detailed Description

Definition at line 68 of file JetDefinition.py.

Constructor & Destructor Documentation

◆ __init__()

def python.JetDefinition.JetDefinition.__init__ (   self,
  algorithm,
  radius,
  inputdef,
  ptmin = 5e3*MeV,
  ghostdefs = [],
  modifiers = [],
  extrainputs = [],
  standardRecoMode = False,
  prefix = "",
  suffix = "",
  infix = "",
  context = "default",
  VRMinR = -1.0,
  VRMassSc = -1.0,
  ghostarea = 0.01,
  byVertex = False,
  lock = False 
)

Definition at line 70 of file JetDefinition.py.

70  def __init__(self,
71  algorithm, # The fastjet clustering algorithm
72  radius, # The jet radius specifier (clustering cutoff)
73  inputdef, # The input JetConstit
74  ptmin=5e3*MeV, # The pt cutoff for fastjet in MeV
75  ghostdefs=[], # The list of alias to JetGhosts to ghost-associate
76  modifiers=[], # The list of alias to JetModifiers to execute after jet finding
77  extrainputs=[], # The list of additional input types needed for jet finding
78  standardRecoMode = False, #
79  prefix = "", # allows to tune the full JetContainer name
80  suffix = "", # allows to tune the full JetContainer name
81  infix = "", # allows to tune the full JetContainer name
82  context = "default", # describe a context for which this definition will be used. See StandardJetContext
83  VRMinR = -1.0, # Minimum radius for VR jet finding
84  VRMassSc = -1.0, # Mass scale for VR jet finding, in MeV
85  ghostarea = 0.01, # area resolution when evaluating jet area using "ghosts"
86  byVertex = False, # Reconstruct the jets by vertex
87  lock = False, # lock the properties of this instance to avoid accidental overwrite after __init__
88  ):
89 
90  self._locked = False # unlock during init
91  # Should add some type checking here
92  # Could use JetContainerInfo conversion
93  if algorithm not in ["Kt","AntiKt","CamKt"]:
94  jetlog.error("FastJet algorithm specification was not one of Kt, AntiKt, CamKt!")
95  raise KeyError("Invalid fastjet algorithm choice: {0}".format(self.algorithm))
96  self._algorithm = algorithm
97 
98  self._radius = radius
99  self._inputdef = inputdef
100  self._prefix = prefix
101  self._suffix = suffix
102  self._infix = infix
103  self._context = context
104  self._VRMinRadius = VRMinR
105  self._VRMassScale = VRMassSc
106  self._ghostarea = ghostarea
107  self._defineName()
108 
109  self.ptmin = ptmin # The pt down to which FastJet is run
110 
111  self.ghostdefs = ghostdefs # Objects to ghost-associate
112  self.modifiers = modifiers # Tools to modify the jet
113  self.extrainputs = extrainputs # Any extra input dependencies
114 
115  self.standardRecoMode = standardRecoMode
116 
117  # used internally to resolve dependencies
118  self._prereqDic = {}
119  self._prereqOrder = []
120  self._internalAtt = {}
121  self._cflags = None # pointer to AthenaConfiguration.ConfigFlags. Mainly to allow to invoke building of input dependencies which are outside Jet domain during std reco
122  self._contextDic = None # pointer to the context dictionnary. Convenient shortcut used to configure input or modifier dependencies
123  self.byVertex = byVertex
124  self._locked = lock
125 
126 

Member Function Documentation

◆ __deepcopy__()

def python.JetDefinition.JetDefinition.__deepcopy__ (   self,
  memo 
)

Definition at line 146 of file JetDefinition.py.

146  def __deepcopy__(self, memo):
147  cls = self.__class__
148  result = cls.__new__(cls)
149  memo[id(self)] = result
150  set_without_deepcopy = ['_cflags']
151  for k, v in self.__dict__.items():
152  if k in set_without_deepcopy:
153  if v:
154  assert(v.locked())
155  setattr(result, k, v)
156  else:
157  setattr(result, k, deepcopy(v, memo))
158  return result
159 

◆ __eq__()

def python.JetDefinition.JetDefinition.__eq__ (   self,
  rhs 
)

Definition at line 130 of file JetDefinition.py.

130  def __eq__(self,rhs):
131  return self.__hash__() == rhs.__hash__()
132 

◆ __hash__()

def python.JetDefinition.JetDefinition.__hash__ (   self)

Definition at line 127 of file JetDefinition.py.

127  def __hash__(self):
128  return hash((self.basename,self._inputdef,self.ptmin,str(self.ghostdefs),str(self.modifiers),str(self.extrainputs),self.byVertex))
129 

◆ __ne__()

def python.JetDefinition.JetDefinition.__ne__ (   self,
  rhs 
)

Definition at line 133 of file JetDefinition.py.

133  def __ne__(self,rhs):
134  return (not self.__eq__(rhs))
135 

◆ __str__()

def python.JetDefinition.JetDefinition.__str__ (   self)

Definition at line 238 of file JetDefinition.py.

238  def __str__(self):
239  return f"JetDefinition({self.fullname()})"

◆ _defineName()

def python.JetDefinition.JetDefinition._defineName (   self)
private

Definition at line 228 of file JetDefinition.py.

228  def _defineName(self):
229  self._basename = buildJetAlgName(self.algorithm,self.radius,self.VRMassScale,self.VRMinRadius)+self.inputdef.label # .label
230  if self.inputdef.basetype == xAODType.CaloCluster:
231  # Omit cluster origin correction from jet name
232  # Keep the origin correction explicit because sometimes we may not
233  # wish to apply it, whereas PFlow corrections are applied implicitly
234  self._basename = self.basename.replace("Origin","")
235  pass
236 

◆ algorithm() [1/2]

def python.JetDefinition.JetDefinition.algorithm (   self)

Definition at line 164 of file JetDefinition.py.

164  def algorithm(self): pass
165 

◆ algorithm() [2/2]

def python.JetDefinition.JetDefinition.algorithm (   self,
  algorithm 
)

Definition at line 167 of file JetDefinition.py.

167  def algorithm(self,algorithm):
168  self._algorithm = algorithm
169  self._defineName()
170 

◆ basename() [1/2]

def python.JetDefinition.JetDefinition.basename (   self)

Definition at line 197 of file JetDefinition.py.

197  def basename(self): pass
198 

◆ basename() [2/2]

def python.JetDefinition.JetDefinition.basename (   self,
  v 
)

Definition at line 200 of file JetDefinition.py.

200  def basename(self,v):
201  raise Exception("Can NOT set property basename of JetDefinition ",self," Change prefix, infix or suffix instead.")
202 
203 

◆ context()

def python.JetDefinition.JetDefinition.context (   self)

Definition at line 219 of file JetDefinition.py.

219  def context(self): pass
220 

◆ extrainputs()

def python.JetDefinition.JetDefinition.extrainputs (   self)

Definition at line 209 of file JetDefinition.py.

209  def extrainputs(self): pass

◆ fullname()

def python.JetDefinition.JetDefinition.fullname (   self)

Definition at line 225 of file JetDefinition.py.

225  def fullname(self):
226  return self.prefix+self.basename+self.infix+"Jets"+self.suffix
227 

◆ ghostarea()

def python.JetDefinition.JetDefinition.ghostarea (   self)

Definition at line 222 of file JetDefinition.py.

222  def ghostarea(self): pass
223 
224 

◆ ghostdefs()

def python.JetDefinition.JetDefinition.ghostdefs (   self)

Definition at line 205 of file JetDefinition.py.

205  def ghostdefs(self): pass

◆ infix()

def python.JetDefinition.JetDefinition.infix (   self)

Definition at line 194 of file JetDefinition.py.

194  def infix(self): pass
195 

◆ inputdef() [1/2]

def python.JetDefinition.JetDefinition.inputdef (   self)

Definition at line 180 of file JetDefinition.py.

180  def inputdef(self): pass
181 

◆ inputdef() [2/2]

def python.JetDefinition.JetDefinition.inputdef (   self,
  inputdef 
)

Definition at line 183 of file JetDefinition.py.

183  def inputdef(self,inputdef):
184  self._inputdef = inputdef
185  self._defineName()
186 

◆ lock()

def python.JetDefinition.JetDefinition.lock (   self)

Definition at line 136 of file JetDefinition.py.

136  def lock(self):
137  if not self._locked:
138  self._locked = True
139 

◆ modifiers()

def python.JetDefinition.JetDefinition.modifiers (   self)

Definition at line 207 of file JetDefinition.py.

207  def modifiers(self): pass

◆ prefix()

def python.JetDefinition.JetDefinition.prefix (   self)

Definition at line 188 of file JetDefinition.py.

188  def prefix(self): pass
189 

◆ radius() [1/2]

def python.JetDefinition.JetDefinition.radius (   self)

Definition at line 172 of file JetDefinition.py.

172  def radius(self): pass
173 

◆ radius() [2/2]

def python.JetDefinition.JetDefinition.radius (   self,
  radius 
)

Definition at line 175 of file JetDefinition.py.

175  def radius(self,radius):
176  self._radius = radius
177  self._defineName()
178 

◆ standardRecoMode()

def python.JetDefinition.JetDefinition.standardRecoMode (   self)

Definition at line 211 of file JetDefinition.py.

211  def standardRecoMode(self): pass
212 

◆ suffix()

def python.JetDefinition.JetDefinition.suffix (   self)

Definition at line 191 of file JetDefinition.py.

191  def suffix(self): pass
192 

◆ VRMassScale()

def python.JetDefinition.JetDefinition.VRMassScale (   self)

Definition at line 216 of file JetDefinition.py.

216  def VRMassScale(self): pass
217 

◆ VRMinRadius()

def python.JetDefinition.JetDefinition.VRMinRadius (   self)

Definition at line 214 of file JetDefinition.py.

214  def VRMinRadius(self): pass

Member Data Documentation

◆ __repr__

def python.JetDefinition.JetDefinition.__repr__ = __str__
staticprivate

Definition at line 241 of file JetDefinition.py.

◆ _algorithm

python.JetDefinition.JetDefinition._algorithm
private

Definition at line 78 of file JetDefinition.py.

◆ _allowedattributes

list python.JetDefinition.JetDefinition._allowedattributes = ['_cflags','_contextDic']
staticprivate

Definition at line 69 of file JetDefinition.py.

◆ _basename

python.JetDefinition.JetDefinition._basename
private

Definition at line 229 of file JetDefinition.py.

◆ _cflags

python.JetDefinition.JetDefinition._cflags
private

Definition at line 103 of file JetDefinition.py.

◆ _context

python.JetDefinition.JetDefinition._context
private

Definition at line 85 of file JetDefinition.py.

◆ _contextDic

python.JetDefinition.JetDefinition._contextDic
private

Definition at line 104 of file JetDefinition.py.

◆ _ghostarea

python.JetDefinition.JetDefinition._ghostarea
private

Definition at line 88 of file JetDefinition.py.

◆ _infix

python.JetDefinition.JetDefinition._infix
private

Definition at line 84 of file JetDefinition.py.

◆ _inputdef

python.JetDefinition.JetDefinition._inputdef
private

Definition at line 81 of file JetDefinition.py.

◆ _internalAtt

python.JetDefinition.JetDefinition._internalAtt
private

Definition at line 102 of file JetDefinition.py.

◆ _locked

python.JetDefinition.JetDefinition._locked
private

Definition at line 72 of file JetDefinition.py.

◆ _prefix

python.JetDefinition.JetDefinition._prefix
private

Definition at line 82 of file JetDefinition.py.

◆ _prereqDic

python.JetDefinition.JetDefinition._prereqDic
private

Definition at line 100 of file JetDefinition.py.

◆ _prereqOrder

python.JetDefinition.JetDefinition._prereqOrder
private

Definition at line 101 of file JetDefinition.py.

◆ _radius

python.JetDefinition.JetDefinition._radius
private

Definition at line 80 of file JetDefinition.py.

◆ _suffix

python.JetDefinition.JetDefinition._suffix
private

Definition at line 83 of file JetDefinition.py.

◆ _VRMassScale

python.JetDefinition.JetDefinition._VRMassScale
private

Definition at line 87 of file JetDefinition.py.

◆ _VRMinRadius

python.JetDefinition.JetDefinition._VRMinRadius
private

Definition at line 86 of file JetDefinition.py.

◆ byVertex

python.JetDefinition.JetDefinition.byVertex

Definition at line 105 of file JetDefinition.py.

◆ extrainputs

python.JetDefinition.JetDefinition.extrainputs

Definition at line 95 of file JetDefinition.py.

◆ ghostdefs

python.JetDefinition.JetDefinition.ghostdefs

Definition at line 93 of file JetDefinition.py.

◆ modifiers

python.JetDefinition.JetDefinition.modifiers

Definition at line 94 of file JetDefinition.py.

◆ ptmin

python.JetDefinition.JetDefinition.ptmin

Definition at line 91 of file JetDefinition.py.

◆ standardRecoMode

python.JetDefinition.JetDefinition.standardRecoMode

Definition at line 97 of file JetDefinition.py.


The documentation for this class was generated from the following file:
TrigJetMonitorAlgorithm.modifiers
modifiers
Definition: TrigJetMonitorAlgorithm.py:1227
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
algorithm
std::string algorithm
Definition: hcg.cxx:82
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
vtune_athena.format
format
Definition: vtune_athena.py:14
python.JetDefinition.buildJetAlgName
def buildJetAlgName(finder, mainParam, variableRMassScale=-1.0, variableRMinRadius=-1.0)
Definition: JetDefinition.py:50
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
HIJetRecConfigCA.ghostdefs
ghostdefs
Definition: HIJetRecConfigCA.py:720
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
str
Definition: BTagTrackIpAccessor.cxx:11
beamspotman.basename
basename
Definition: beamspotman.py:640