def scoutingStreamOK(triggerName): result=False if triggerName in triggersStreamMap.keys(): for stream in triggersStreamMap[triggerName]: if (stream.startswith("Scouting")): result = True return result
def physicsStreamOK(triggerName): result=False if triggerName in triggersStreamMap.keys(): for stream in triggersStreamMap[triggerName]: if (stream.startswith("Physics")) and not (stream.startswith("PhysicsHLTPhysics")) and not (stream.startswith("PhysicsZeroBias")) and not (stream.startswith("PhysicsParking")) and not (stream.startswith("PhysicsCommissioning")): result = True return result
def scoutingStreamOK(triggerName): from Menu_HLT import streamMap as triggersStreamMap result = False for mapKey in triggersStreamMap.keys(): if result: break if triggerName == mapKey.rstrip("0123456789"): for stream in triggersStreamMap[mapKey]: if (stream.startswith("Scouting")): result = True return result
def parkingStreamOK(triggerName): from Menu_HLT import streamMap as triggersStreamMap result = False for mapKey in triggersStreamMap.keys(): if result: break if triggerName == mapKey.rstrip("0123456789"): for stream in triggersStreamMap[mapKey]: if ("Parking" in stream): result = True return result
def physicsStreamOK(triggerName): from Menu_HLT import streamMap as triggersStreamMap result=False for mapKey in triggersStreamMap.keys(): if result: break if triggerName == mapKey.rstrip("0123456789"): for stream in triggersStreamMap[mapKey]: if (stream.startswith("Physics")) and not (stream.startswith("PhysicsHLTPhysics")) and not (stream.startswith("PhysicsZeroBias")) and not (stream.startswith("PhysicsParking")) and not (stream.startswith("PhysicsScoutingMonitor")): result = True return result
#we loop over the dictionary keys to see if the paths is in that key, and in case we increase the counter triggerKey = triggerName.rstrip("0123456789") if triggerKey in datasets.keys(): for dataset in datasets[triggerKey]: if datasetsCountsBool[dataset] == False: datasetsCountsBool[dataset] = True primaryDatasetCounts[ dataset] = primaryDatasetCounts[dataset] + 1 atLeastOneEvent = True if triggerKey in groups.keys(): for group in groups[triggerKey]: if not physicsStreamOK(triggerKey): continue if group not in myGroupFired: myGroupFired.append(group) groupCounts[group] = groupCounts[group] + 1 if triggerKey in triggersStreamMap.keys(): for stream in triggersStreamMap[triggerKey]: if streamCountsBool[stream] == False: streamCountsBool[stream] = True streamCounts[stream] += 1 if kPassedEventPhysics == False: if physicsStreamOK(triggerKey): nPassed_Physics += 1 kPassedEventPhysics = True if kPassedEventScouting == False: if scoutingStreamOK(triggerKey): nPassed_Scouting += 1 kPassedEventScouting = True