ATLAS Offline Software
Loading...
Searching...
No Matches
FoldDecoratorConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5import json
6
7def FoldDecoratorCfg(flags, jetCollection='AntiKt4EMPFlowJets', prefix=''):
8 ca = ComponentAccumulator()
9 evt_id = 'mcEventNumber' if flags.Input.isMC else 'eventNumber'
10 common = dict(
11 eventID=f'EventInfo.{evt_id}',
12 salt=42,
13 jetCollection=jetCollection,
14 associations=['constituentLinks', 'GhostTrack'],
15 jetVariableSaltSeeds={
16 'constituentLinks': 0,
17 'GhostTrack': 1,
18 },
19 )
20 # original folding algorithm, used for GN2v01 right now
21 ca.addEventAlgo(
22 CompFactory.FlavorTagInference.FoldDecoratorAlg(
23 f'{prefix}FoldHashWithHits{jetCollection}',
24 **common,
25 constituentChars=json.dumps({
26 'GhostTrack': [
27 'numberOfPixelHits',
28 'numberOfSCTHits',
29 ]
30 }),
31 constituentSaltSeeds={
32 'numberOfPixelHits': 2,
33 'numberOfSCTHits': 3,
34 },
35 jetFoldHash=f'{prefix}jetFoldHash',
36 )
37 )
38
39 # simpler version, doesn't seem as random though
40 ca.addEventAlgo(
41 CompFactory.FlavorTagInference.FoldDecoratorAlg(
42 f'{prefix}FoldHashWithoutHits{jetCollection}',
43 **common,
44 jetFoldHash=f'{prefix}jetFoldHash_noHits',
45 )
46 )
47 # version using jetRank, which should be unique for each jet in
48 # the event
49 ca.addEventAlgo(
50 CompFactory.FlavorTagInference.FoldDecoratorAlg(
51 f'{prefix}FoldHashJetRank{jetCollection}',
52 eventID=f'EventInfo.{evt_id}',
53 salt=42,
54 jetCollection=jetCollection,
55 ints=['jetRank'],
56 jetVariableSaltSeeds={
57 'jetRank': 137,
58 },
59 jetFoldHash=f'{prefix}jetFoldRankHash',
60 )
61 )
62
63 return ca
FoldDecoratorCfg(flags, jetCollection='AntiKt4EMPFlowJets', prefix='')