640 def ConfigurationHypoTool( self, thresholdHLT, thresholds, tight, acceptAll, domuCombTag ):
641
642 tool = CompFactory.TrigmuCombHypoTool( thresholdHLT )
643 tool.AcceptAll = acceptAll
644
645 nt = len(thresholds)
646 log.debug('Set %d thresholds', nt)
647 tool.PtBins = [ [ 0.0, 2.5 ] ] * nt
648 tool.PtThresholds = [ [ 5.83 * GeV ] ] * nt
649
650 for th, thvalue in enumerate(thresholds):
651 if thvalue == 'passthrough':
652 tool.AcceptAll = True
653 tool.PtBins[th] = [-10000.,10000.]
654 tool.PtThresholds[th] = [ -1. * GeV ]
655 else:
656
657
658
659
660
661 if domuCombTag:
662 thvaluename = thvalue + 'GeV_v16'
663 else:
664 thvaluename = thvalue + 'GeV_v15a'
665
666 if int(thvalue)==3:
667 thvaluename = thvalue + 'GeV_v22a'
668 log.debug('Number of threshold = %d, Value of threshold = %s', th, thvaluename)
669
670 try:
671 values = muCombThresholds[thvaluename]
672 tool.PtBins[th] = values[0]
673 tool.PtThresholds[th] = [ x * GeV for x in values[1] ]
674 if (tight is True):
675 tool.ApplyPikCuts = True
676 tool.MaxPtToApplyPik = 25.
677 tool.MaxChi2IDPik = 3.5
678 except LookupError:
679 raise Exception('MuComb Hypo Misconfigured: threshold %r not supported' % thvaluename)
680
681 return tool
682