415 def compile(self, flags):
417 nt = self.multiplicity()
419 if self.isCalibration():
420 if self.isMuonDSCalibration():
421 self.tool().AcceptAll =
True
423 self.tool().AcceptAll =
False
424 self.tool().DoCalib =
True
425 self.tool().PtBins = [ [ 0.0, 2.5 ] ] * nt
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 ]
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
444 thvaluename = self.getThresholdName()
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
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
464 self.tool().PtThresholdForECWeakBRegionA[th] = spThres[1] * GeV
465 self.tool().PtThresholdForECWeakBRegionB[th] = spThres[2] * GeV
467 self.log().
debug(
'Thresholds for A[%d]/B[%d] = %d/%d', th, th, self.tool().PtThresholdForECWeakBRegionA[th], self.tool().PtThresholdForECWeakBRegionB[th])
470 raise Exception(
'MuFast Hypo Misconfigured: threshold %r not supported' % thvaluename)
474 elif self.doOverlapRemoval():
475 self.setOverlapRemoval()
477 if self.doMonitoring():
478 if self.doOverlapRemoval():
479 from TrigMuonHypo.TrigMuonHypoMonitoring
import TrigL2MuonOverlapRemoverMonitoringMufast
482 from TrigMuonHypo.TrigMuonHypoMonitoring
import TrigMufastHypoMonitoring