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, eventBuildType, doOverlapRemoval=False, doMonitoring=False)
 
def multiplicity (self)
 
def tool (self)
 
def toolName (self)
 
def log (self)
 
def isPassThrough (self)
 
def isCalibration (self)
 
def isMuonDSCalibration (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
 
 __isMuonDSCalibration
 
 __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,
  eventBuildType,
  doOverlapRemoval = False,
  doMonitoring = False 
)

Definition at line 308 of file TrigMuonHypoConfig.py.

308  def __init__(self, name, cpart, eventBuildType, 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.__isMuonDSCalibration = 'MuonDS' in eventBuildType
319  self.__isBarrelOnly = '0eta105' in cpart['etaRange']
320  self.__useGeV_v15a = any(x in cpart['addInfo'] for x in ['idperf', 'idtp', '3layersEC'])
321  self.__doL2MT = 'l2mt' in cpart['l2AlgInfo']
322  self.__doOverlapRemoval = doOverlapRemoval
323  self.__doMonitoring = doMonitoring
324 
325  from AthenaConfiguration.ComponentFactory import CompFactory
326  tool = CompFactory.TrigMufastHypoTool(name)
327  self.__tool = tool
328 

Member Function Documentation

◆ compile()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.compile (   self,
  flags 
)

Definition at line 415 of file TrigMuonHypoConfig.py.

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

◆ doL2MT()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.doL2MT (   self)

Definition at line 359 of file TrigMuonHypoConfig.py.

359  def doL2MT(self):
360  return self.__doL2MT
361 

◆ doMonitoring()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.doMonitoring (   self)

Definition at line 356 of file TrigMuonHypoConfig.py.

356  def doMonitoring(self):
357  return self.__doMonitoring
358 

◆ doOverlapRemoval()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.doOverlapRemoval (   self)

Definition at line 362 of file TrigMuonHypoConfig.py.

362  def doOverlapRemoval(self):
363  return self.__doOverlapRemoval
364 

◆ getThresholdName()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.getThresholdName (   self)

Definition at line 368 of file TrigMuonHypoConfig.py.

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

◆ getThresholdValue()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.getThresholdValue (   self)

Definition at line 365 of file TrigMuonHypoConfig.py.

365  def getThresholdValue(self):
366  return self.__threshold
367 

◆ isBarrelOnly()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isBarrelOnly (   self)

Definition at line 350 of file TrigMuonHypoConfig.py.

350  def isBarrelOnly(self):
351  return self.__isBarrelOnly
352 

◆ isCalibration()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isCalibration (   self)

Definition at line 344 of file TrigMuonHypoConfig.py.

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

◆ isMuonDSCalibration()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isMuonDSCalibration (   self)

Definition at line 347 of file TrigMuonHypoConfig.py.

347  def isMuonDSCalibration(self):
348  return self.__isMuonDSCalibration
349 

◆ isPassThrough()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.isPassThrough (   self)

Definition at line 341 of file TrigMuonHypoConfig.py.

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

◆ log()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.log (   self)

Definition at line 338 of file TrigMuonHypoConfig.py.

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

◆ multiplicity()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.multiplicity (   self)

Definition at line 329 of file TrigMuonHypoConfig.py.

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

◆ setL2MT()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.setL2MT (   self)

Definition at line 398 of file TrigMuonHypoConfig.py.

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

◆ setOverlapRemoval()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.setOverlapRemoval (   self)

Definition at line 381 of file TrigMuonHypoConfig.py.

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

◆ tool()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.tool (   self)

Definition at line 332 of file TrigMuonHypoConfig.py.

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

◆ toolName()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.toolName (   self)

Definition at line 335 of file TrigMuonHypoConfig.py.

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

◆ useGeV_v15a()

def TrigMuonHypoConfig.TrigMufastHypoToolConfig.useGeV_v15a (   self)

Definition at line 353 of file TrigMuonHypoConfig.py.

353  def useGeV_v15a(self):
354  return self.__useGeV_v15a or self.getThresholdValue() < 5
355 

Member Data Documentation

◆ __doL2MT

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doL2MT
private

Definition at line 321 of file TrigMuonHypoConfig.py.

◆ __doMonitoring

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doMonitoring
private

Definition at line 323 of file TrigMuonHypoConfig.py.

◆ __doOverlapRemoval

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doOverlapRemoval
private

Definition at line 322 of file TrigMuonHypoConfig.py.

◆ __isBarrelOnly

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isBarrelOnly
private

Definition at line 319 of file TrigMuonHypoConfig.py.

◆ __isCalibration

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isCalibration
private

Definition at line 317 of file TrigMuonHypoConfig.py.

◆ __isMuonDSCalibration

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isMuonDSCalibration
private

Definition at line 318 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 327 of file TrigMuonHypoConfig.py.

◆ __useGeV_v15a

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__useGeV_v15a
private

Definition at line 320 of file TrigMuonHypoConfig.py.


The documentation for this class was generated from the following file:
TrigMuonHypoConfig.log
log
Definition: TrigMuonHypoConfig.py:24
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
StateLessPT_NewConfig.doMonitoring
doMonitoring
Definition: StateLessPT_NewConfig.py:185
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:452
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
python.FPGATrackSimAnalysisConfig.doOverlapRemoval
doOverlapRemoval
Definition: FPGATrackSimAnalysisConfig.py:830
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
str
Definition: BTagTrackIpAccessor.cxx:11
TrigMuonHypoMonitoring.TrigMufastHypoMonitoring
def TrigMufastHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:5