411 def compile(self, flags):
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
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 ]
429 self.log().
debug(
'Set %d thresholds', nt)
430 self.tool().AcceptAll =
False
431 self.tool().PtBins = [ [ 0.0, 2.5 ] ] * nt
432 self.tool().PtThresholds = [ [ 5.49 * GeV ] ] * nt
433 self.tool().PtThresholdForECWeakBRegionA = [ 3. * GeV ] * nt
434 self.tool().PtThresholdForECWeakBRegionB = [ 3. * GeV ] * nt
436 thvaluename = self.getThresholdName()
440 values = muFastThresholds[thvaluename]
441 self.tool().PtBins[th] = values[0]
442 self.tool().PtThresholds[th] = [ x * GeV
for x
in values[1] ]
443 self.log().
debug(
'Configration of threshold[%d] %s', th, self.tool().PtThresholds[th])
444 self.log().
debug(
'Configration of PtBins[%d] %s', th, self.tool().PtBins[th])
445 if thvaluename
in muFastThresholdsForECWeakBRegion:
446 spThres = muFastThresholdsForECWeakBRegion[thvaluename]
447 self.tool().PtThresholdForECWeakBRegionA[th] = spThres[0] * GeV
448 self.tool().PtThresholdForECWeakBRegionB[th] = spThres[1] * GeV
450 self.log().
debug(
'No special thresholds for EC weak Bfield regions for %s. Copy EC1 for region A, EC2 for region B.', thvaluename)
451 spThres = values[0][1]
452 if thvaluename ==
'2GeV' or thvaluename ==
'3GeV':
453 self.tool().PtThresholdForECWeakBRegionA[th] = spThres[0] * GeV
454 self.tool().PtThresholdForECWeakBRegionB[th] = spThres[0] * GeV
456 self.tool().PtThresholdForECWeakBRegionA[th] = spThres[1] * GeV
457 self.tool().PtThresholdForECWeakBRegionB[th] = spThres[2] * GeV
459 self.log().
debug(
'Thresholds for A[%d]/B[%d] = %d/%d', th, th, self.tool().PtThresholdForECWeakBRegionA[th], self.tool().PtThresholdForECWeakBRegionB[th])
462 raise Exception(
'MuFast Hypo Misconfigured: threshold %r not supported' % thvaluename)
466 elif self.doOverlapRemoval():
467 self.setOverlapRemoval()
469 if self.doMonitoring():
470 if self.doOverlapRemoval():
471 from TrigMuonHypo.TrigMuonHypoMonitoring
import TrigL2MuonOverlapRemoverMonitoringMufast
474 from TrigMuonHypo.TrigMuonHypoMonitoring
import TrigMufastHypoMonitoring