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

Public Member Functions

def __init__ (self, name, monGroups, cpart, tool=None)
 
def chain (self)
 
def pidname (self)
 
def etthr (self)
 
def isoInfo (self)
 
def d0Info (self)
 
def gsfInfo (self)
 
def tool (self)
 
def nocut (self)
 
def noPid (self)
 
def addLRTCut (self)
 
def acceptAll (self)
 
def addIsoCut (self)
 
def nominal (self)
 
def compile (self, flags)
 
def addMonitoring (self, flags)
 

Private Attributes

 __log
 
 __name
 
 __threshold
 
 __sel
 
 __iso
 
 __d0
 
 __gsfInfo
 
 __lhInfo
 
 __monGroups
 
 __tool
 

Static Private Attributes

 __operation_points
 
 __operation_points_lhInfo
 
 __operation_points_gsfInfo
 
 __isolationCut
 
 __lrtD0Cut
 

Detailed Description

Definition at line 59 of file TrigEgammaPrecisionElectronHypoTool.py.

Constructor & Destructor Documentation

◆ __init__()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__init__ (   self,
  name,
  monGroups,
  cpart,
  tool = None 
)

Definition at line 117 of file TrigEgammaPrecisionElectronHypoTool.py.

117  def __init__(self, name, monGroups, cpart, tool=None):
118 
119  from AthenaCommon.Logging import logging
120  self.__log = logging.getLogger('TrigEgammaPrecisionElectronHypoTool')
121  self.__name = name
122  self.__threshold = float(cpart['threshold'])
123  self.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
124  self.__iso = cpart['isoInfo']
125  self.__d0 = cpart['lrtInfo']
126  self.__gsfInfo = cpart['gsfInfo']
127  self.__lhInfo = cpart['lhInfo']
128  self.__monGroups = monGroups
129 
130  if not tool:
131  from AthenaConfiguration.ComponentFactory import CompFactory
132  tool = CompFactory.TrigEgammaPrecisionElectronHypoTool( name )
133 
134  tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
135  tool.ETthr = same( self.__threshold*GeV, tool )
136  tool.dETACLUSTERthr = 0.1
137  tool.dPHICLUSTERthr = 0.1
138  tool.RelPtConeCut = -999
139  tool.PidName = ""
140  tool.d0Cut = -1
141  tool.AcceptAll = False
142  tool.DoNoPid = False
143  self.__tool = tool
144 
145  self.__log.debug( 'Electron_Chain :%s', self.__name )
146  self.__log.debug( 'Electron_Threshold :%s', self.__threshold )
147  self.__log.debug( 'Electron_Pidname :%s', self.pidname() )
148  self.__log.debug( 'Electron_iso :%s', self.__iso )
149  self.__log.debug( 'Electron_d0 :%s', self.__d0 )
150 

Member Function Documentation

◆ acceptAll()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.acceptAll (   self)

Definition at line 208 of file TrigEgammaPrecisionElectronHypoTool.py.

208  def acceptAll(self):
209  self.tool().AcceptAll = True

◆ addIsoCut()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.addIsoCut (   self)

Definition at line 213 of file TrigEgammaPrecisionElectronHypoTool.py.

213  def addIsoCut(self):
214  if not self.isoInfo() in self.__isolationCut:
215  self.__log.fatal(f"Bad Iso selection name: {self.isoInfo()}")
216  self.tool().RelPtConeCut = self.__isolationCut[self.isoInfo()]
217 
218 
219 

◆ addLRTCut()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.addLRTCut (   self)

Definition at line 203 of file TrigEgammaPrecisionElectronHypoTool.py.

203  def addLRTCut(self):
204  if not self.d0Info() in self.__lrtD0Cut:
205  self.__log.fatal(f"Bad LRT selection name: {self.d0Info()}")
206  self.__tool.d0Cut = self.__lrtD0Cut[self.d0Info()]
207 

◆ addMonitoring()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.addMonitoring (   self,
  flags 
)

Definition at line 258 of file TrigEgammaPrecisionElectronHypoTool.py.

258  def addMonitoring(self, flags):
259 
260  monTool = GenericMonitoringTool(flags, "MonTool_"+self.chain(),
261  HistPath = 'PrecisionElectronHypo/'+self.chain())
262  monTool.defineHistogram('dEta', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo #Delta#eta_{EF L1}; #Delta#eta_{EF L1}", xbins=80, xmin=-0.01, xmax=0.01)
263  monTool.defineHistogram('dPhi', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo #Delta#phi_{EF L1}; #Delta#phi_{EF L1}", xbins=80, xmin=-0.01, xmax=0.01)
264  monTool.defineHistogram('Et_em', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo cluster E_{T}^{EM};E_{T}^{EM} [MeV]", xbins=50, xmin=-2000, xmax=100000)
265  monTool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5)
266  monTool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)
267  monTool.defineHistogram('EtaBin', type='TH1I', path='EXPERT', title="PrecisionElectron Hypo entries per Eta bin;Eta bin no.", xbins=11, xmin=-0.5, xmax=10.5)
268  monTool.defineHistogram('LikelihoodRatio', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo LH", xbins=100, xmin=-5, xmax=5)
269  monTool.defineHistogram('mu', type='TH1F', path='EXPERT', title="Average interaction per crossing", xbins=100, xmin=0, xmax=100)
270 
271  cuts=['Input','#Delta #eta EF-L1', '#Delta #phi EF-L1','eta','E_{T}^{EM}']
272 
273  monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="PrecisionElectron Hypo Passed Cuts;Cut",
274  xbins=13, xmin=-1.5, xmax=12.5, opt="kCumulative", xlabels=cuts)
275 
276 
277  if flags.Trigger.doValidationMonitoring:
278  monTool.defineHistogram('ptcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo ptcone20; ptcone20;", xbins=50, xmin=0, xmax=5.0)
279  monTool.defineHistogram('relptcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo; ptcone20/pt;", xbins=50, xmin=0, xmax=1)
280  monTool.defineHistogram('ptvarcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo ptvarcone20; ptvarcone20;", xbins=50, xmin=0, xmax=5.0)
281  monTool.defineHistogram('relptvarcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo; ptvarcone20/pt;", xbins=50, xmin=0, xmax=0.5)
282  monTool.defineHistogram('trk_d0', type="TH1F", path='EXPERT', title="PrecisionElectron Hypo Track d0; d0 [mm]", xbins=100, xmin=-1, xmax=1)
283 
284  self.tool().MonTool = monTool
285 
286 

◆ chain()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.chain (   self)

Definition at line 151 of file TrigEgammaPrecisionElectronHypoTool.py.

151  def chain(self):
152  return self.__name
153 

◆ compile()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.compile (   self,
  flags 
)

Definition at line 229 of file TrigEgammaPrecisionElectronHypoTool.py.

229  def compile(self, flags):
230 
231  if 'nocut' == self.pidname():
232  self.nocut()
233  elif 'nopid' == self.pidname():
234  self.noPid()
235  else: # nominal chain using pid selection
236  self.nominal()
237 
238 
239  # secundary cut configurations
240  if self.isoInfo() and self.isoInfo()!="":
241  self.addIsoCut()
242  if self.d0Info() and self.d0Info()!="":
243  self.addLRTCut()
244 
245 
246  if hasattr(self.tool(), "MonTool"):
247 
248  doValidationMonitoring = flags.Trigger.doValidationMonitoring # True to monitor all chains for validation purposes
249  monGroups = self.__monGroups
250 
251  if (any('egammaMon:online' in group for group in monGroups) or doValidationMonitoring):
252  self.addMonitoring(flags)
253 
254 

◆ d0Info()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.d0Info (   self)

Definition at line 175 of file TrigEgammaPrecisionElectronHypoTool.py.

175  def d0Info(self):
176  return self.__d0
177 

◆ etthr()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.etthr (   self)

Definition at line 169 of file TrigEgammaPrecisionElectronHypoTool.py.

169  def etthr(self):
170  return self.__threshold
171 

◆ gsfInfo()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.gsfInfo (   self)

Definition at line 178 of file TrigEgammaPrecisionElectronHypoTool.py.

178  def gsfInfo(self):
179  return self.__gsfInfo
180 

◆ isoInfo()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.isoInfo (   self)

Definition at line 172 of file TrigEgammaPrecisionElectronHypoTool.py.

172  def isoInfo(self):
173  return self.__iso
174 

◆ nocut()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.nocut (   self)

Definition at line 184 of file TrigEgammaPrecisionElectronHypoTool.py.

184  def nocut(self):
185 
186  self.__log.debug( 'Configure nocut' )
187  self.tool().ETthr = same( self.etthr()*GeV, self.tool())
188  self.tool().dETACLUSTERthr = 9999.
189  self.tool().dPHICLUSTERthr = 9999.
190 

◆ nominal()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.nominal (   self)

Definition at line 220 of file TrigEgammaPrecisionElectronHypoTool.py.

220  def nominal(self):
221  if not self.pidname() in self.__operation_points:
222  self.__log.fatal("Bad selection name: %s" % self.pidname())
223  self.tool().PidName = self.pidname()
224 
225 

◆ noPid()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.noPid (   self)

Definition at line 191 of file TrigEgammaPrecisionElectronHypoTool.py.

191  def noPid(self):
192 
193  self.tool().DoNoPid = True
194  self.__log.debug( 'Configure noPid' )
195  self.tool().ETthr = same( self.etthr()*GeV, self.tool())
196  # No other cuts applied
197  self.tool().dETACLUSTERthr = 9999.
198  self.tool().dPHICLUSTERthr = 9999.
199 

◆ pidname()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.pidname (   self)

Definition at line 157 of file TrigEgammaPrecisionElectronHypoTool.py.

157  def pidname( self ):
158  # if LLH, we should append the LH extra information if exist
159  pidname = self.__sel
160 
161  extra = ""
162  if 'lh' in self.__sel and self.__gsfInfo and self.__gsfInfo in self.__operation_points_gsfInfo:
163  extra += '_' + self.__gsfInfo
164  if 'lh' in self.__sel and self.__lhInfo and self.__lhInfo in self.__operation_points_lhInfo:
165  extra += '_' + self.__lhInfo
166 
167  return pidname+extra
168 

◆ tool()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.tool (   self)

Definition at line 181 of file TrigEgammaPrecisionElectronHypoTool.py.

181  def tool(self):
182  return self.__tool
183 

Member Data Documentation

◆ __d0

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__d0
private

Definition at line 125 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __gsfInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__gsfInfo
private

Definition at line 126 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __iso

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__iso
private

Definition at line 124 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __isolationCut

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__isolationCut
staticprivate

Definition at line 98 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __lhInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__lhInfo
private

Definition at line 127 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __log

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__log
private

Definition at line 120 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __lrtD0Cut

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__lrtD0Cut
staticprivate

Definition at line 106 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __monGroups

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__monGroups
private

Definition at line 128 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __name

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__name
private

Definition at line 121 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points
staticprivate

Definition at line 62 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points_gsfInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points_gsfInfo
staticprivate

Definition at line 93 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points_lhInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points_lhInfo
staticprivate

Definition at line 89 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __sel

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__sel
private

Definition at line 123 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __threshold

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__threshold
private

Definition at line 122 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __tool

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__tool
private

Definition at line 143 of file TrigEgammaPrecisionElectronHypoTool.py.


The documentation for this class was generated from the following file:
python.TrigEgammaPrecisionElectronHypoTool.same
def same(val, tool)
Definition: TrigEgammaPrecisionElectronHypoTool.py:11
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
readCCLHist.float
float
Definition: readCCLHist.py:83