ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonHypoConfig.TrigMufastHypoToolConfig Class Reference
Collaboration diagram for TrigMuonHypoConfig.TrigMufastHypoToolConfig:

Public Member Functions

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

Private Attributes

 __log = logging.getLogger('TrigMufastHypoToolConfig')
 __name = name
 __threshold = int(cpart['threshold'])
 __multiplicity = int(cpart['multiplicity'])
str __isPassThrough = 'mucombTag' in cpart['extra']
str __isCalibration = 'muoncalib' in cpart['extra']
str __isMuonDSCalibration = 'MuonDS' in eventBuildType
str __isBarrelOnly = '0eta105' in cpart['etaRange']
 __useGeV_v15a = any(x in cpart['addInfo'] for x in ['idperf', 'idtp', '3layersEC'])
str __doL2MT = 'l2mt' in cpart['l2AlgInfo']
 __doOverlapRemoval = doOverlapRemoval
 __doMonitoring = doMonitoring
 __tool = tool

Detailed Description

Definition at line 307 of file TrigMuonHypoConfig.py.

Constructor & Destructor Documentation

◆ __init__()

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()

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
if(febId1==febId2)
const bool debug

◆ doL2MT()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.doL2MT ( self)

Definition at line 359 of file TrigMuonHypoConfig.py.

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

◆ doMonitoring()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.doMonitoring ( self)

Definition at line 356 of file TrigMuonHypoConfig.py.

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

◆ doOverlapRemoval()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.doOverlapRemoval ( self)

Definition at line 362 of file TrigMuonHypoConfig.py.

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

◆ getThresholdName()

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()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.getThresholdValue ( self)

Definition at line 365 of file TrigMuonHypoConfig.py.

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

◆ isBarrelOnly()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.isBarrelOnly ( self)

Definition at line 350 of file TrigMuonHypoConfig.py.

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

◆ isCalibration()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.isCalibration ( self)

Definition at line 344 of file TrigMuonHypoConfig.py.

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

◆ isMuonDSCalibration()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.isMuonDSCalibration ( self)

Definition at line 347 of file TrigMuonHypoConfig.py.

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

◆ isPassThrough()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.isPassThrough ( self)

Definition at line 341 of file TrigMuonHypoConfig.py.

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

◆ log()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.log ( self)

Definition at line 338 of file TrigMuonHypoConfig.py.

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

◆ multiplicity()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.multiplicity ( self)

Definition at line 329 of file TrigMuonHypoConfig.py.

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

◆ setL2MT()

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()

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()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.tool ( self)

Definition at line 332 of file TrigMuonHypoConfig.py.

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

◆ toolName()

TrigMuonHypoConfig.TrigMufastHypoToolConfig.toolName ( self)

Definition at line 335 of file TrigMuonHypoConfig.py.

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

◆ useGeV_v15a()

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

str TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doL2MT = 'l2mt' in cpart['l2AlgInfo']
private

Definition at line 321 of file TrigMuonHypoConfig.py.

◆ __doMonitoring

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doMonitoring = doMonitoring
private

Definition at line 323 of file TrigMuonHypoConfig.py.

◆ __doOverlapRemoval

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__doOverlapRemoval = doOverlapRemoval
private

Definition at line 322 of file TrigMuonHypoConfig.py.

◆ __isBarrelOnly

str TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isBarrelOnly = '0eta105' in cpart['etaRange']
private

Definition at line 319 of file TrigMuonHypoConfig.py.

◆ __isCalibration

str TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isCalibration = 'muoncalib' in cpart['extra']
private

Definition at line 317 of file TrigMuonHypoConfig.py.

◆ __isMuonDSCalibration

str TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isMuonDSCalibration = 'MuonDS' in eventBuildType
private

Definition at line 318 of file TrigMuonHypoConfig.py.

◆ __isPassThrough

str TrigMuonHypoConfig.TrigMufastHypoToolConfig.__isPassThrough = 'mucombTag' in cpart['extra']
private

Definition at line 316 of file TrigMuonHypoConfig.py.

◆ __log

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__log = logging.getLogger('TrigMufastHypoToolConfig')
private

Definition at line 311 of file TrigMuonHypoConfig.py.

◆ __multiplicity

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__multiplicity = int(cpart['multiplicity'])
private

Definition at line 315 of file TrigMuonHypoConfig.py.

◆ __name

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__name = name
private

Definition at line 312 of file TrigMuonHypoConfig.py.

◆ __threshold

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__threshold = int(cpart['threshold'])
private

Definition at line 314 of file TrigMuonHypoConfig.py.

◆ __tool

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__tool = tool
private

Definition at line 327 of file TrigMuonHypoConfig.py.

◆ __useGeV_v15a

TrigMuonHypoConfig.TrigMufastHypoToolConfig.__useGeV_v15a = any(x in cpart['addInfo'] for x in ['idperf', 'idtp', '3layersEC'])
private

Definition at line 320 of file TrigMuonHypoConfig.py.


The documentation for this class was generated from the following file: