ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TrigMuonHypoConfig.TrigMufastHypoToolConfig Class Reference
Collaboration diagram for TrigMuonHypoConfig.TrigMufastHypoToolConfig:

Public Member Functions

def __init__ (self, name, cpart, doOverlapRemoval=False, doMonitoring=False)
 
def multiplicity (self)
 
def tool (self)
 
def toolName (self)
 
def log (self)
 
def isPassThrough (self)
 
def isCalibration (self)
 
def isBarrelOnly (self)
 
def useGeV_v15a (self)
 
def doMonitoring (self)
 
def doL2MT (self)
 
def doOverlapRemoval (self)
 
def getThresholdValue (self)
 
def getThresholdName (self)
 
def setOverlapRemoval (self)
 
def setL2MT (self)
 
def compile (self, flags)
 

Private Attributes

 __log
 
 __name
 
 __threshold
 
 __multiplicity
 
 __isPassThrough
 
 __isCalibration
 
 __isBarrelOnly
 
 __useGeV_v15a
 
 __doL2MT
 
 __doOverlapRemoval
 
 __doMonitoring
 
 __tool
 

Detailed Description

Definition at line 307 of file TrigMuonHypoConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.__init__ (   self,
  name,
  cpart,
  doOverlapRemoval = False,
  doMonitoring = False 
)

Definition at line 308 of file TrigMuonHypoConfig.py.

308  def __init__(self, name, cpart, doOverlapRemoval = False, doMonitoring = False):
309 
310  from AthenaCommon.Logging import logging
311  self.__log = logging.getLogger('TrigMufastHypoToolConfig')
312  self.__name = name
313 
314  self.__threshold = int(cpart['threshold'])
315  self.__multiplicity = int(cpart['multiplicity'])
316  self.__isPassThrough = 'mucombTag' in cpart['extra']
317  self.__isCalibration = 'muoncalib' in cpart['extra']
318  self.__isBarrelOnly = '0eta105' in cpart['etaRange']
319  self.__useGeV_v15a = any(x in cpart['addInfo'] for x in ['idperf', 'idtp', '3layersEC'])
320  self.__doL2MT = 'l2mt' in cpart['l2AlgInfo']
321  self.__doOverlapRemoval = doOverlapRemoval
322  self.__doMonitoring = doMonitoring
323 
324  from AthenaConfiguration.ComponentFactory import CompFactory
325  tool = CompFactory.TrigMufastHypoTool(name)
326  self.__tool = tool
327 

Member Function Documentation

◆ compile()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.compile (   self,
  flags 
)

Definition at line 411 of file TrigMuonHypoConfig.py.

411  def compile(self, flags):
412 
413  nt = self.multiplicity()
414  if self.isCalibration():
415  self.tool().AcceptAll = False
416  self.tool().DoCalib = True
417  self.tool().PtBins = [ [ 0.0, 2.5 ] ] * nt
418 
419  elif self.isPassThrough():
420  self.tool().AcceptAll = True
421  self.tool().PtBins = [ [-10000.,10000.] ]
422  self.tool().PtThresholds = [ [ -1. * GeV ] ]
423  self.tool().PtThresholdForECWeakBRegionA = [ 3. * GeV ]
424  self.tool().PtThresholdForECWeakBRegionB = [ 3. * GeV ]
425 
426  else:
427  self.log().debug('Set %d thresholds', nt)
428  self.tool().AcceptAll = False
429  self.tool().PtBins = [ [ 0.0, 2.5 ] ] * nt
430  self.tool().PtThresholds = [ [ 5.49 * GeV ] ] * nt
431  self.tool().PtThresholdForECWeakBRegionA = [ 3. * GeV ] * nt
432  self.tool().PtThresholdForECWeakBRegionB = [ 3. * GeV ] * nt
433 
434  thvaluename = self.getThresholdName()
435 
436  for th in range(nt):
437  try:
438  values = muFastThresholds[thvaluename]
439  self.tool().PtBins[th] = values[0]
440  self.tool().PtThresholds[th] = [ x * GeV for x in values[1] ]
441  self.log().debug('Configration of threshold[%d] %s', th, self.tool().PtThresholds[th])
442  self.log().debug('Configration of PtBins[%d] %s', th, self.tool().PtBins[th])
443  if thvaluename in muFastThresholdsForECWeakBRegion:
444  spThres = muFastThresholdsForECWeakBRegion[thvaluename]
445  self.tool().PtThresholdForECWeakBRegionA[th] = spThres[0] * GeV
446  self.tool().PtThresholdForECWeakBRegionB[th] = spThres[1] * GeV
447  else:
448  self.log().debug('No special thresholds for EC weak Bfield regions for %s. Copy EC1 for region A, EC2 for region B.', thvaluename)
449  spThres = values[0][1]
450  if thvaluename == '2GeV' or thvaluename == '3GeV':
451  self.tool().PtThresholdForECWeakBRegionA[th] = spThres[0] * GeV
452  self.tool().PtThresholdForECWeakBRegionB[th] = spThres[0] * GeV
453  else:
454  self.tool().PtThresholdForECWeakBRegionA[th] = spThres[1] * GeV
455  self.tool().PtThresholdForECWeakBRegionB[th] = spThres[2] * GeV
456 
457  self.log().debug('Thresholds for A[%d]/B[%d] = %d/%d', th, th, self.tool().PtThresholdForECWeakBRegionA[th], self.tool().PtThresholdForECWeakBRegionB[th])
458 
459  except LookupError:
460  raise Exception('MuFast Hypo Misconfigured: threshold %r not supported' % thvaluename)
461 
462  if self.doL2MT():
463  self.setL2MT()
464  elif self.doOverlapRemoval():
465  self.setOverlapRemoval()
466 
467  if self.doMonitoring():
468  if self.doOverlapRemoval():
469  from TrigMuonHypo.TrigMuonHypoMonitoring import TrigL2MuonOverlapRemoverMonitoringMufast
470  self.tool().MonTool = TrigL2MuonOverlapRemoverMonitoringMufast(flags, 'TrigMufastHypoTool/' + self.toolName())
471  else:
472  from TrigMuonHypo.TrigMuonHypoMonitoring import TrigMufastHypoMonitoring
473  self.tool().MonTool = TrigMufastHypoMonitoring(flags, 'TrigMufastHypoTool/' + self.toolName())
474 
475 

◆ doL2MT()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.doL2MT (   self)

Definition at line 355 of file TrigMuonHypoConfig.py.

355  def doL2MT(self):
356  return self.__doL2MT
357 

◆ doMonitoring()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.doMonitoring (   self)

Definition at line 352 of file TrigMuonHypoConfig.py.

352  def doMonitoring(self):
353  return self.__doMonitoring
354 

◆ doOverlapRemoval()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.doOverlapRemoval (   self)

Definition at line 358 of file TrigMuonHypoConfig.py.

358  def doOverlapRemoval(self):
359  return self.__doOverlapRemoval
360 

◆ getThresholdName()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.getThresholdName (   self)

Definition at line 364 of file TrigMuonHypoConfig.py.

364  def getThresholdName(self):
365  threshold = str(self.getThresholdValue())
366  key = '6GeV_v15a'
367  if self.useGeV_v15a():
368  key = threshold + 'GeV_v15a'
369  if self.getThresholdValue() == 3:
370  key = threshold + 'GeV_v22a'
371  elif self.isBarrelOnly():
372  key = threshold + 'GeV_barrelOnly_v15a'
373  elif self.getThresholdValue() >= 20:
374  key = threshold + 'GeV_v15a'
375  return key
376 

◆ getThresholdValue()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.getThresholdValue (   self)

Definition at line 361 of file TrigMuonHypoConfig.py.

361  def getThresholdValue(self):
362  return self.__threshold
363 

◆ isBarrelOnly()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isBarrelOnly (   self)

Definition at line 346 of file TrigMuonHypoConfig.py.

346  def isBarrelOnly(self):
347  return self.__isBarrelOnly
348 

◆ isCalibration()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isCalibration (   self)

Definition at line 343 of file TrigMuonHypoConfig.py.

343  def isCalibration(self):
344  return self.__isCalibration
345 

◆ isPassThrough()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isPassThrough (   self)

Definition at line 340 of file TrigMuonHypoConfig.py.

340  def isPassThrough(self):
341  return self.__isPassThrough
342 

◆ log()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.log (   self)

Definition at line 337 of file TrigMuonHypoConfig.py.

337  def log(self):
338  return self.__log
339 

◆ multiplicity()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.multiplicity (   self)

Definition at line 328 of file TrigMuonHypoConfig.py.

328  def multiplicity(self):
329  return self.__multiplicity
330 

◆ setL2MT()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.setL2MT (   self)

Definition at line 394 of file TrigMuonHypoConfig.py.

394  def setL2MT(self):
395  self.tool().ApplyOR = True
396  # cut defintion
397  self.tool().RequireDR = True
398  self.tool().RequireMass = True
399  self.tool().RequireSameSign = True
400  # BB
401  self.tool().DRThresBB = 0.05
402  self.tool().MassThresBB = 0.20
403  # BE
404  self.tool().DRThresBE = 0.05
405  self.tool().MassThresBE = 0.20
406  # EE
407  self.tool().EtaBinsEC = [0.0, 1.9, 2.1, 9.9]
408  self.tool().DRThresEC = [0.06, 0.05, 0.05]
409  self.tool().MassThresEC = [0.20, 0.15, 0.10]
410 

◆ setOverlapRemoval()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.setOverlapRemoval (   self)

Definition at line 377 of file TrigMuonHypoConfig.py.

377  def setOverlapRemoval(self):
378  self.tool().ApplyOR = True
379  # cut defintion
380  self.tool().RequireDR = True
381  self.tool().RequireMass = True
382  self.tool().RequireSameSign = True
383  # BB
384  self.tool().DRThresBB = 0.05
385  self.tool().MassThresBB = 0.20
386  # BE
387  self.tool().DRThresBE = 0.05
388  self.tool().MassThresBE = 0.20
389  # EE
390  self.tool().EtaBinsEC = [0.0, 1.9, 2.1, 9.9]
391  self.tool().DRThresEC = [0.06, 0.05, 0.05]
392  self.tool().MassThresEC = [0.20, 0.15, 0.10]
393 

◆ tool()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.tool (   self)

Definition at line 331 of file TrigMuonHypoConfig.py.

331  def tool(self):
332  return self.__tool
333 

◆ toolName()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.toolName (   self)

Definition at line 334 of file TrigMuonHypoConfig.py.

334  def toolName(self):
335  return self.__name
336 

◆ useGeV_v15a()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.useGeV_v15a (   self)

Definition at line 349 of file TrigMuonHypoConfig.py.

349  def useGeV_v15a(self):
350  return self.__useGeV_v15a or self.getThresholdValue() < 5
351 

Member Data Documentation

◆ __doL2MT

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doL2MT
private

Definition at line 320 of file TrigMuonHypoConfig.py.

◆ __doMonitoring

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doMonitoring
private

Definition at line 322 of file TrigMuonHypoConfig.py.

◆ __doOverlapRemoval

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doOverlapRemoval
private

Definition at line 321 of file TrigMuonHypoConfig.py.

◆ __isBarrelOnly

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isBarrelOnly
private

Definition at line 318 of file TrigMuonHypoConfig.py.

◆ __isCalibration

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isCalibration
private

Definition at line 317 of file TrigMuonHypoConfig.py.

◆ __isPassThrough

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isPassThrough
private

Definition at line 316 of file TrigMuonHypoConfig.py.

◆ __log

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__log
private

Definition at line 311 of file TrigMuonHypoConfig.py.

◆ __multiplicity

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__multiplicity
private

Definition at line 315 of file TrigMuonHypoConfig.py.

◆ __name

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__name
private

Definition at line 312 of file TrigMuonHypoConfig.py.

◆ __threshold

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__threshold
private

Definition at line 314 of file TrigMuonHypoConfig.py.

◆ __tool

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__tool
private

Definition at line 326 of file TrigMuonHypoConfig.py.

◆ __useGeV_v15a

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__useGeV_v15a
private

Definition at line 319 of file TrigMuonHypoConfig.py.


The documentation for this class was generated from the following file:
TrigMuonHypoConfig.log
log
Definition: TrigMuonHypoConfig.py:24
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
StateLessPT_NewConfig.doMonitoring
doMonitoring
Definition: StateLessPT_NewConfig.py:182
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
TrigMuonHypoMonitoring.TrigL2MuonOverlapRemoverMonitoringMufast
def TrigL2MuonOverlapRemoverMonitoringMufast(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:28
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11
TrigMuonHypoMonitoring.TrigMufastHypoMonitoring
def TrigMufastHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:5