ATLAS Offline Software
prefilter_clean.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from TrigHLTJetHypo.RepeatedConditionParams import RepeatedConditionParams
4 
5 from TrigHLTJetHypo.make_repeatedCondConfigurer import (
6  make_repeatedCondCfgFromParams,
7 )
8 
9 from TrigHLTJetHypo.FastReductionAlgToolFactory import toolfactory
10 
11 from AthenaCommon.Logging import logging
12 from AthenaCommon.Constants import DEBUG
13 from TriggerMenuMT.HLT.Jet.JetRecoCommon import getPrefilterCleaningString
14 
15 logger = logging.getLogger( __name__)
16 logger.setLevel(DEBUG)
17 
18 def prefilter_clean(pf_string):
19  """calculate the parameters needed to generate a ConditonFilter config
20  AlgTool starting from the prefilter substring if it appears in the
21  chain dict"""
22 
23  assert pf_string.startswith('CLEAN'),\
24  'routing error, module %s: bad prefilter %s' % (__name__, pf_string)
25 
26  condargs = [('clean',{'val':getPrefilterCleaningString([pf_string])})]
27 
28  repcondarg = RepeatedConditionParams(tree_id=0,
29  tree_pid=0,
30  chainPartInd=-1,
31  condargs=condargs,
32  invert=False)
33 
34  repConditionMaker = make_repeatedCondCfgFromParams(repcondarg)
35 
36 
37  toolclass, name = toolfactory('ConditionFilterConfigTool')
38  vals = {'name' : name,
39  'conditionMakers': [repConditionMaker]}
40 
41  return toolclass(**vals)
python.prefilter_clean.prefilter_clean
def prefilter_clean(pf_string)
Definition: prefilter_clean.py:18
python.HLT.Jet.JetRecoCommon.getPrefilterCleaningString
def getPrefilterCleaningString(prefilters_list)
Definition: JetRecoCommon.py:284
Constants
some useful constants -------------------------------------------------—
python.make_repeatedCondConfigurer.make_repeatedCondCfgFromParams
def make_repeatedCondCfgFromParams(repcondarg)
Definition: make_repeatedCondConfigurer.py:44
python.FastReductionAlgToolFactory.toolfactory
toolfactory
Definition: FastReductionAlgToolFactory.py:106