TopoAlgoDefMultiplicity.py 5.48 KB
Newer Older
1
2
3
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration

from AthenaCommon.Logging import logging
4
log = logging.getLogger(__name__)
5

6
from ..Base.TopoAlgos import eEmMultiplicityAlgo, TauMultiplicityAlgo, JetMultiplicityAlgo, XEMultiplicityAlgo
7

Joerg Stelzer's avatar
Joerg Stelzer committed
8
class TopoAlgoDefMultiplicity(object):
9
10
11
12
13
14
15
16
    """
    Defines the TopoAlgorithms that calculate multiplicities for L1Calo thresholds
    The thresholds have to be explicitly defined here.
    """
    @staticmethod
    def registerTopoAlgos(tm):
        currentAlgoId = 0

17
18
19
20
21
22
        emThresholds_3bits = [
            'eEM3', 'eEM5', 'eEM8', 'eEM8L', 
        ]
        emThresholds_2bits = [
            'eEM8M', 'eEM10L',  'eEM15', 'eEM15L', 'eEM15M', 
            'eEM20', 'eEM20L', 'eEM20M', 'eEM22', 'eEM22L', 'eEM22M', 'eEM22T',
23
24
        ]

25
        for em in emThresholds_3bits:
26
            alg = eEmMultiplicityAlgo( name = em,
27
                                      algoId = currentAlgoId,
28
                                      threshold = em,
29
                                      nbits = 3, classtype='eEmMultiplicity')
30
31
            tm.registerTopoAlgo(alg)
        for em in emThresholds_2bits:
32
            alg = eEmMultiplicityAlgo( name = em,
33
34
                                      algoId = currentAlgoId,
                                      threshold = em,
35
                                      nbits = 2, classtype='eEmMultiplicity')
36
37
            tm.registerTopoAlgo(alg)
                
38
39
40
41
42
43
        etauThresholds_3bits = [ 'eTAU8', 'eTAU12', ]
        jtauThresholds_3bits = [ 'jTAU12', ]        
        ctauThresholds_3bits = [ 'cTAU12M' ]
        etauThresholds_2bits = [ 'eTAU12L', 'eTAU12M', 'eTAU20', 'eTAU25', 'eTAU30H', 'eTAU40', 'eTAU60', 'eTAU100' ]
        jtauThresholds_2bits = [ 'jTAU12M'  ]
        ctauThresholds_2bits = [ 'cTAU20M', 'cTAU25M',  ]
44

45
46
47
48
49
50
51
        for tau in etauThresholds_3bits:
            alg = TauMultiplicityAlgo( name = tau,
                                       algoId = currentAlgoId,
                                       threshold = tau,
                                       nbits = 3, classtype='eTauMultiplicity')
            tm.registerTopoAlgo(alg)
        for tau in jtauThresholds_3bits:
52
            alg = TauMultiplicityAlgo( name = tau,
53
                                       algoId = currentAlgoId,
54
                                       threshold = tau,
55
                                       nbits = 3, classtype='jTauMultiplicity')
56
            tm.registerTopoAlgo(alg)
57
        for tau in ctauThresholds_3bits:
58
59
60
            alg = TauMultiplicityAlgo( name = tau,
                                       algoId = currentAlgoId,
                                       threshold = tau,
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
                                       nbits = 3, classtype='cTauMultiplicity')
            tm.registerTopoAlgo(alg)
        for tau in etauThresholds_2bits:
            alg = TauMultiplicityAlgo( name = tau,
                                       algoId = currentAlgoId,
                                       threshold = tau,
                                       nbits = 2, classtype='eTauMultiplicity')
            tm.registerTopoAlgo(alg)
        for tau in jtauThresholds_2bits:
            alg = TauMultiplicityAlgo( name = tau,
                                       algoId = currentAlgoId,
                                       threshold = tau,
                                       nbits = 2, classtype='jTauMultiplicity')
            tm.registerTopoAlgo(alg)
        for tau in ctauThresholds_2bits:
            alg = TauMultiplicityAlgo( name = tau,
                                       algoId = currentAlgoId,
                                       threshold = tau,
                                       nbits = 2, classtype='cTauMultiplicity')
80
            tm.registerTopoAlgo(alg)
81
82


83
84
85
86
87
88
        jJThresholds_3bits = [ 'jJ12', 'jJ12p0ETA25', 'jJ15', 'jJ15p0ETA25', 'jJ20', 'jJ25', 'jJ25p0ETA23', 'jJ30',]
        jJThresholds_2bits = [ 'jJ15p31ETA49', 'jJ20p31ETA49', 'jJ30p31ETA49', 'jJ35p0ETA23', 'jJ40', 'jJ40p0ETA25', 'jJ45p0ETA20',
                               'jJ50', 'jJ50p31ETA49', 'jJ75', 'jJ75p31ETA49',
                               'jJ85', 'jJ100', 'jJ120', 'jJ400',]

        for jJet in jJThresholds_3bits:
89
            alg = JetMultiplicityAlgo( name = jJet,
90
                                       algoId = currentAlgoId,
91
                                       threshold = jJet,
92
93
94
95
96
97
98
                                       nbits = 3, classtype='jJetMultiplicity')
            tm.registerTopoAlgo(alg)
        for jJet in jJThresholds_2bits:
            alg = JetMultiplicityAlgo( name = jJet,
                                       algoId = currentAlgoId,
                                       threshold = jJet,
                                       nbits = 2, classtype='jJetMultiplicity')
99
100
101
102
103
            tm.registerTopoAlgo(alg)

        gXEThresholds = [ "gXERHO20", "gXERHO30", "gXERHO35", "gXERHO40", "gXERHO45", "gXERHO50", "gXEPUFIT20", "gXEPUFIT50", "gXE50" ]

        for gXE in gXEThresholds:
104
            alg = XEMultiplicityAlgo( name = gXE,
105
                                      algoId = currentAlgoId,
106
107
108
109
110
111
112
113
                                      threshold = gXE,
                                      nbits = 1)
            tm.registerTopoAlgo(alg)


        jXEThresholds = [ "jXE50" ]

        for jXE in jXEThresholds:
114
            alg = XEMultiplicityAlgo( name = jXE,
115
                                      algoId = currentAlgoId,
116
117
118
119
                                      threshold = jXE,
                                      nbits = 1)
            tm.registerTopoAlgo(alg)