ATLAS Offline Software
Loading...
Searching...
No Matches
GepJetAlgConfig Namespace Reference

Classes

class  _StrEnum
class  LRJSeedSourceType
class  LRJConstSourceType

Functions

 GepJetAlgCfg (flags, name, jetAlgName, caloClustersKey, outputJetsKey, wta_seed_cleaning_name='TwoPass', wta_min_cluster_et=2.0, wta_min_seed_et=5.0, wta_inf_buffer=False, wta_max_const_n=205, wta_max_seed_sorting_n=50, wta_jet_dR=0.4, wta_block_n=4, OutputLevel=None)
 GepJetTaggerLRJAlgCfg (flags, name, **kwargs)

Variables

dict _LRJ_PRESETS

Function Documentation

◆ GepJetAlgCfg()

GepJetAlgCfg ( flags,
name,
jetAlgName,
caloClustersKey,
outputJetsKey,
wta_seed_cleaning_name = 'TwoPass',
wta_min_cluster_et = 2.0,
wta_min_seed_et = 5.0,
wta_inf_buffer = False,
wta_max_const_n = 205,
wta_max_seed_sorting_n = 50,
wta_jet_dR = 0.4,
wta_block_n = 4,
OutputLevel = None )

Definition at line 8 of file GepJetAlgConfig.py.

22 OutputLevel=None):
23
24 cfg = ComponentAccumulator()
25
26
27 if jetAlgName not in ('ModAntikT', 'Cone', 'WTACone'):
28 raise ValueError("jetAlgName must be one of ModAntikT, Cone, WTACone")
29 if jetAlgName == 'WTACone':
30 if wta_seed_cleaning_name not in ('Baseline', 'TwoPass'):
31 raise ValueError("wta_seed_cleaning_name must be Baseline or TwoPass")
32 if wta_block_n not in (1, 4):
33 raise ValueError("wta_block_n must be 1 or 4")
34 if wta_inf_buffer:
35 wta_max_const_n = 9999
36 wta_max_seed_sorting_n = 9999
37
38 alg = CompFactory.GepJetAlg(name,
39 jetAlgName=jetAlgName,
40 caloClustersKey=caloClustersKey,
41 outputJetsKey=outputJetsKey,
42 WTAConstEtCut=wta_min_cluster_et,
43 WTASeedEtCut=wta_min_seed_et,
44 WTAMaxConstN=wta_max_const_n,
45 WTAMaxSeedSortingN=wta_max_seed_sorting_n,
46 WTAJet_dR=wta_jet_dR,
47 WTASeedCleaningName=wta_seed_cleaning_name,
48 WTABlockN=wta_block_n)
49
50 if OutputLevel is not None:
51 alg.OutputLevel = OutputLevel
52
53 cfg.addEventAlgo(alg)
54
55 return cfg
56
57
58# JetTaggerLRJ seed / constituent source options. These mirror the C++ enums
59# Gep::JetTaggerSeedSource and Gep::JetTaggerConstSource (JetTaggerLRJMaker.h);
60# keep the string values in sync with them.

◆ GepJetTaggerLRJAlgCfg()

GepJetTaggerLRJAlgCfg ( flags,
name,
** kwargs )

Definition at line 112 of file GepJetAlgConfig.py.

112def GepJetTaggerLRJAlgCfg(flags, name, **kwargs):
113
114 # ---- Configure GepJetAlg in JetTaggerLRJ mode ----
115
116 cfg = ComponentAccumulator()
117
118 # This wrapper always drives GepJetAlg in JetTaggerLRJ mode.
119 kwargs['jetAlgName'] = 'JetTaggerLRJ'
120 kwargs['EnableLRJMaker'] = True
121
122 # ---- preset selector: 2 = BasicV2, 3 = AdvancedV3 ----
123 algo_version = kwargs.setdefault('LRJAlgoVersion', 3)
124 if algo_version not in (2, 3):
125 raise ValueError("LRJAlgoVersion must be 2 (BasicV2) or 3 (AdvancedV3)")
126 for prop, value in _LRJ_PRESETS[algo_version].items():
127 kwargs.setdefault(prop, value)
128
129 # ---- seed / constituent sources ----
130 kwargs.setdefault('LRJSeedSource', LRJSeedSourceType.WTACone.value) # WTACone | jFexSRJ | gFexSRJ
131 kwargs.setdefault('LRJConstSource', LRJConstSourceType.Towers.value) # Towers | WTACone
132 kwargs.setdefault('LRJWTAConeSeedsKey', '') # Required if LRJSeedSource == 'WTACone'
133 kwargs.setdefault('jFexSRJetRoIs', 'L1_jFexSRJetRoISim')
134 kwargs.setdefault('LRJgFexSRJetRoIs', 'L1_gFexSRJetRoISim')
135
136 # ---- version-independent settings (identical across presets) ----
137 kwargs.setdefault('LRJJetR', 1.1) # r2Cut = LRJJetR**2 = 1.21
138 kwargs.setdefault('LRJNSeedsInput', 10)
139 kwargs.setdefault('LRJNProtoSeeds', 6)
140 kwargs.setdefault('LRJNSeedsOutput', 2)
141 kwargs.setdefault('LRJEtBitLength', 13)
142 kwargs.setdefault('LRJDeltaRLutLength', 8)
143 kwargs.setdefault('LRJEnableEtWeightedMidpoint', False) # geometric midpoint
144 kwargs.setdefault('LRJSubjetEtThresholdGeV', 25.0)
145 kwargs.setdefault('LRJMinEtSeedPosOptCutGeV', 25.0)
146 kwargs.setdefault('LRJSeedEtCutGeV', 5.0) # reserved; not yet applied
147 kwargs.setdefault('LRJConstEtCutGeV', 2.0) # reserved; not yet applied
148
149 # ---- digitization: physical ranges ----
150 kwargs.setdefault('LRJPhiMin', -3.2)
151 kwargs.setdefault('LRJPhiMax', 3.2)
152 kwargs.setdefault('LRJEtaMin', -4.85)
153 kwargs.setdefault('LRJEtaMax', 4.95)
154 kwargs.setdefault('LRJEtMin', 0.0)
155 kwargs.setdefault('LRJEtMax', 1024.0)
156 kwargs.setdefault('LRJMassApproxMax', 512.0)
157 kwargs.setdefault('LRJInputEtToGeV', 1.0e-3)
158
159 # ---- output toggles ----
160 kwargs.setdefault('LRJWriteSubstructure', True)
161 kwargs.setdefault('LRJWriteSubjetKinematics', True)
162 kwargs.setdefault('LRJWriteConstituentIndices', True)
163
164 # Ensure that configuration is within possible values for the algorithm
165 if kwargs['LRJSeedSource'] not in LRJSeedSourceType.to_list():
166 raise ValueError(f"LRJSeedSource must be one of {LRJSeedSourceType.to_list()}")
167 if kwargs['LRJConstSource'] not in LRJConstSourceType.to_list():
168 raise ValueError(f"LRJConstSource must be one of {LRJConstSourceType.to_list()}")
169 if kwargs['LRJSeedSource'] == LRJSeedSourceType.WTACone.value \
170 and not kwargs['LRJWTAConeSeedsKey']:
171 raise ValueError("LRJWTAConeSeedsKey must be set when LRJSeedSource == 'WTACone'")
172
173 alg = CompFactory.GepJetAlg(name, **kwargs)
174
175 cfg.addEventAlgo(alg)
176
177 return cfg

Variable Documentation

◆ _LRJ_PRESETS

dict GepJetAlgConfig._LRJ_PRESETS
protected
Initial value:
= {
2: {
'LRJDSearch': 0.001, # rMergeCut (seed-pos-opt effectively disabled)
'LRJMaxObjectsConsidered': 8,
'LRJEtaBitLength': 10,
'LRJPhiBitLength': 9,
'LRJNumSubjetsLength': 0, # no substructure variables computed
'LRJNSubjetinessBitLength': 0,
'LRJMassApproxBitLength': 0,
'LRJPsiRBitLength': 0,
'LRJEnableOverlapRemoval': False,
'LRJMinEtSeedPosOptimization': False,
},
3: {
'LRJDSearch': 2.0,
'LRJMaxObjectsConsidered': 512, # raised 128->512 so the E_T>2 GeV tower cut (not this cap) bounds the input; 128 kept elsewhere for latency estimation
'LRJEtaBitLength': 7,
'LRJPhiBitLength': 6,
'LRJNumSubjetsLength': 2,
'LRJNSubjetinessBitLength': 8,
'LRJMassApproxBitLength': 8,
'LRJPsiRBitLength': 8,
'LRJEnableOverlapRemoval': True,
'LRJMinEtSeedPosOptimization': True,
},
}

Definition at line 84 of file GepJetAlgConfig.py.