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

Public Member Functions

def __init__ (self, ungroomeddef, modifiers=[], suffix='', lock=False, context=None, **properties)
 
def __hash__ (self)
 
def __eq__ (self, rhs)
 
def __ne__ (self, rhs)
 
def lock (self)
 
def __deepcopy__ (self, memo)
 
def ungroomeddef (self)
 
def ungroomeddef (self, ungroomeddef)
 
def properties (self)
 
def modifiers (self)
 
def suffix (self)
 
def context (self)
 
def groomSpecAsStr (self)
 
def fullname (self)
 
def __str__ (self)
 

Public Attributes

 inputdef
 
 properties
 
 suffix
 
 modifiers
 
 basename
 

Static Public Attributes

 tooltype = None
 
 groomalg = None
 

Private Member Functions

def _defineName (self)
 

Private Attributes

 _ungroomeddef
 
 _context
 
 _prereqDic
 
 _prereqOrder
 
 _locked
 
 _cflags
 
 _contextDic
 

Static Private Attributes

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

Detailed Description

Base class to define grooming procedure. 
Concrete classes will have to define the tooltype & groomalg class members
and aslo a groomSpecAsStr() function.

Definition at line 17 of file JetGrooming.py.

Constructor & Destructor Documentation

◆ __init__()

def python.JetGrooming.GroomingDefinition.__init__ (   self,
  ungroomeddef,
  modifiers = [],
  suffix = '',
  lock = False,
  context = None,
**  properties 
)

Definition at line 26 of file JetGrooming.py.

26  def __init__(self,
27  ungroomeddef, # Ungroomed JetDefinition
28  modifiers=[], # JetModifiers to run after grooming
29  suffix = '', # allows to tune the full JetContainer name
30  lock=False, # lock the properties of this instance to avoid accidental overwrite after __init__
31  context = None, # describe a context for which this definition will be used. See StandardJetContext
32  **properties # any other argument is expected a grooming tool property
33  ):
34 
35  self._ungroomeddef = ungroomeddef.clone() # clone to avoid messing with external jetdef
36  self.inputdef = self._ungroomeddef.inputdef
37  if lock: properties = ldict(properties) # ldict to freeze the properties
38  self.properties = properties
39 
40  context = context if context is not None else ungroomeddef.context
41  self._context = context
42  self.suffix = suffix
43  self._defineName()
44 
45  self.modifiers = modifiers
46 
47 
48  # used internally to resolve dependencies
49  self._prereqDic = {}
50  self._prereqOrder = []
51  self._locked = lock
52  self._cflags = None # pointer to AthenaConfiguration.ConfigFlags. Mainly to allow to invoke building of input dependencies which are outside Jet domain during std reco
53  self._contextDic = None # pointer to the context dictionnary. Convenient shortcut used to configure input or modifier dependencies
54 
55 

Member Function Documentation

◆ __deepcopy__()

def python.JetGrooming.GroomingDefinition.__deepcopy__ (   self,
  memo 
)

Definition at line 75 of file JetGrooming.py.

75  def __deepcopy__(self, memo):
76  cls = self.__class__
77  result = cls.__new__(cls)
78  memo[id(self)] = result
79  set_without_deepcopy = ['_cflags']
80  for k, v in self.__dict__.items():
81  if k in set_without_deepcopy:
82  if v:
83  assert(v.locked())
84  setattr(result, k, v)
85  else:
86  setattr(result, k, deepcopy(v, memo))
87  return result
88 

◆ __eq__()

def python.JetGrooming.GroomingDefinition.__eq__ (   self,
  rhs 
)

Definition at line 59 of file JetGrooming.py.

59  def __eq__(self,rhs):
60  return self.__hash__() == rhs.__hash__()
61 

◆ __hash__()

def python.JetGrooming.GroomingDefinition.__hash__ (   self)

Definition at line 56 of file JetGrooming.py.

56  def __hash__(self):
57  return hash("")
58 

◆ __ne__()

def python.JetGrooming.GroomingDefinition.__ne__ (   self,
  rhs 
)

Definition at line 62 of file JetGrooming.py.

62  def __ne__(self,rhs):
63  return (not self.__eq__(rhs))
64 

◆ __str__()

def python.JetGrooming.GroomingDefinition.__str__ (   self)

Definition at line 126 of file JetGrooming.py.

126  def __str__(self):
127  return "JetGrooming({0})".format(self.basename)

◆ _defineName()

def python.JetGrooming.GroomingDefinition._defineName (   self)
private

Definition at line 120 of file JetGrooming.py.

120  def _defineName(self):
121  # chop the label off so we can insert the trimming spec
122  groomedName = self.ungroomeddef.basename + self.groomSpecAsStr()
123  self.basename = groomedName
124 

◆ context()

def python.JetGrooming.GroomingDefinition.context (   self)

Definition at line 108 of file JetGrooming.py.

108  def context(self): pass
109 

◆ fullname()

def python.JetGrooming.GroomingDefinition.fullname (   self)

Definition at line 114 of file JetGrooming.py.

114  def fullname(self):
115  return self.ungroomeddef.prefix+self.basename+"Jets"+self.suffix
116 
117 
118 
119 

◆ groomSpecAsStr()

def python.JetGrooming.GroomingDefinition.groomSpecAsStr (   self)

Reimplemented in python.JetGrooming.JetSoftDrop, and python.JetGrooming.JetTrimming.

Definition at line 111 of file JetGrooming.py.

111  def groomSpecAsStr(self):
112  raise Exception("Can not use a GroomingDefinition instance : use a derived class")
113 

◆ lock()

def python.JetGrooming.GroomingDefinition.lock (   self)

Definition at line 65 of file JetGrooming.py.

65  def lock(self):
66  if not self._locked:
67  self._locked = True
68 

◆ modifiers()

def python.JetGrooming.GroomingDefinition.modifiers (   self)

Definition at line 103 of file JetGrooming.py.

103  def modifiers(self): pass

◆ properties()

def python.JetGrooming.GroomingDefinition.properties (   self)

Definition at line 101 of file JetGrooming.py.

101  def properties(self): pass

◆ suffix()

def python.JetGrooming.GroomingDefinition.suffix (   self)

Definition at line 105 of file JetGrooming.py.

105  def suffix(self): pass
106 

◆ ungroomeddef() [1/2]

def python.JetGrooming.GroomingDefinition.ungroomeddef (   self)

Definition at line 93 of file JetGrooming.py.

93  def ungroomeddef(self): pass

◆ ungroomeddef() [2/2]

def python.JetGrooming.GroomingDefinition.ungroomeddef (   self,
  ungroomeddef 
)

Definition at line 95 of file JetGrooming.py.

95  def ungroomeddef(self,ungroomeddef):
96  self._ungroomeddef = ungroomeddef.clone()
97  self._defineName()
98 
99 

Member Data Documentation

◆ __repr__

def python.JetGrooming.GroomingDefinition.__repr__ = __str__
staticprivate

Definition at line 129 of file JetGrooming.py.

◆ _allowedattributes

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

Definition at line 23 of file JetGrooming.py.

◆ _cflags

python.JetGrooming.GroomingDefinition._cflags
private

Definition at line 45 of file JetGrooming.py.

◆ _context

python.JetGrooming.GroomingDefinition._context
private

Definition at line 34 of file JetGrooming.py.

◆ _contextDic

python.JetGrooming.GroomingDefinition._contextDic
private

Definition at line 46 of file JetGrooming.py.

◆ _locked

python.JetGrooming.GroomingDefinition._locked
private

Definition at line 44 of file JetGrooming.py.

◆ _prereqDic

python.JetGrooming.GroomingDefinition._prereqDic
private

Definition at line 42 of file JetGrooming.py.

◆ _prereqOrder

python.JetGrooming.GroomingDefinition._prereqOrder
private

Definition at line 43 of file JetGrooming.py.

◆ _ungroomeddef

python.JetGrooming.GroomingDefinition._ungroomeddef
private

Definition at line 28 of file JetGrooming.py.

◆ basename

python.JetGrooming.GroomingDefinition.basename

Definition at line 123 of file JetGrooming.py.

◆ groomalg

python.JetGrooming.GroomingDefinition.groomalg = None
static

Definition at line 25 of file JetGrooming.py.

◆ inputdef

python.JetGrooming.GroomingDefinition.inputdef

Definition at line 29 of file JetGrooming.py.

◆ modifiers

python.JetGrooming.GroomingDefinition.modifiers

Definition at line 38 of file JetGrooming.py.

◆ properties

python.JetGrooming.GroomingDefinition.properties

Definition at line 31 of file JetGrooming.py.

◆ suffix

python.JetGrooming.GroomingDefinition.suffix

Definition at line 35 of file JetGrooming.py.

◆ tooltype

python.JetGrooming.GroomingDefinition.tooltype = None
static

Definition at line 24 of file JetGrooming.py.


The documentation for this class was generated from the following file:
TrigJetMonitorAlgorithm.modifiers
modifiers
Definition: TrigJetMonitorAlgorithm.py:1227
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
vtune_athena.format
format
Definition: vtune_athena.py:14
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
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