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 ]
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
434 thvaluename = self.getThresholdName()
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
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
454 self.tool().PtThresholdForECWeakBRegionA[th] = spThres[1] * GeV
455 self.tool().PtThresholdForECWeakBRegionB[th] = spThres[2] * GeV
457 self.log().
debug(
'Thresholds for A[%d]/B[%d] = %d/%d', th, th, self.tool().PtThresholdForECWeakBRegionA[th], self.tool().PtThresholdForECWeakBRegionB[th])
460 raise Exception(
'MuFast Hypo Misconfigured: threshold %r not supported' % thvaluename)
464 elif self.doOverlapRemoval():
465 self.setOverlapRemoval()
467 if self.doMonitoring():
468 if self.doOverlapRemoval():
469 from TrigMuonHypo.TrigMuonHypoMonitoring
import TrigL2MuonOverlapRemoverMonitoringMufast
472 from TrigMuonHypo.TrigMuonHypoMonitoring
import TrigMufastHypoMonitoring