14 from TrigCostAnalysis.ROSToROB
import ROSToROBMap
18 if len(flags.Input.RunNumbers) > 1:
19 log.error(
'Multiple run numbers from metadata! Only one expected per cost processing')
22 enhancedBiasWeighter = CompFactory.EnhancedBiasWeighter()
23 enhancedBiasWeighter.RunNumber = flags.Input.RunNumbers[0]
24 enhancedBiasWeighter.UseBunchCrossingData =
False
25 enhancedBiasWeighter.IsMC = isMC
28 enhancedBiasWeighter.MCCrossSection = MCpayload.get(
'MCCrossSection')
29 enhancedBiasWeighter.MCFilterEfficiency = MCpayload.get(
'MCFilterEfficiency')
30 enhancedBiasWeighter.MCKFactor = MCpayload.get(
'MCKFactor')
31 enhancedBiasWeighter.MCIgnoreGeneratorWeights = MCpayload.get(
'MCIgnoreGeneratorWeights')
33 trigCostAnalysis = CompFactory.TrigCostAnalysis()
34 trigCostAnalysis.OutputLevel = args.loglevel
35 trigCostAnalysis.BaseEventWeight = args.baseWeight
36 trigCostAnalysis.EnhancedBiasTool = enhancedBiasWeighter
37 trigCostAnalysis.AlgToChainTool = CompFactory.getComp(
"TrigCompositeUtils::AlgToChainTool")()
38 trigCostAnalysis.UseEBWeights = args.useEBWeights
39 trigCostAnalysis.MaxFullEventDumps = 100
40 trigCostAnalysis.FullEventDumpProbability = 1
41 trigCostAnalysis.UseSingleTimeRange = isMC
or args.useEBWeights
42 trigCostAnalysis.ROSToROBMap =
ROSToROBMap().get_mapping()
43 trigCostAnalysis.DoMonitorChainAlgorithm = args.monitorChainAlgorithm
46 trigCostAnalysis.AdditionalHashList =
readHashesFromHLTJO(args.joFile, args.smk, args.dbAlias)
48 log.debug(
"Hashes from the HLTJO won't be retrieved for MC job")
49 trigCostAnalysis.AdditionalHashList =
list()
51 acc.addEventAlgo(trigCostAnalysis)