ATLAS Offline Software
Loading...
Searching...
No Matches
Add422Config.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4
5def getAlg422(cfg):
6 for comp in cfg.getSequence().Members:
7 if comp.name == 'CaloTopoClusters422Maker':
8 return comp
9 return None
10
12 if not hasattr(alg, 'ClusterMakerTools'):
13 return False
14
15 for tool in alg.ClusterMakerTools:
16 if tool.name == 'TopoMaker':
17 assert tool.CellThresholdOnEorAbsEinSigma == 0
18 tool.CellThresholdOnEorAbsEinSigma = 2.0
19 return True
20
21 return False
22
24 if not hasattr(alg, 'ClusterCorrectionTools'):
25 return False
26
27 for tool in alg.ClusterCorrectionTools:
28
29 if tool.name == 'CaloClusterSnapshot':
30 assert tool.OutputName == 'CaloTopoClusters'
31 tool.OutputName = 'CaloTopoClusters422Snap'
32 return True
33
34 return False
35
36
37def Add422Cfg(flags):
38
39 cfg = ComponentAccumulator()
40
41 from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
42
43 calo_acc422 = CaloTopoClusterCfg(flags,clustersname='CaloTopoClusters422')
44
45 alg = getAlg422(calo_acc422)
46 assert fixMakerTool422(alg)
47 assert fixSnapshotTool422(alg)
48
49 cfg.merge(calo_acc422)
50
51 return cfg
Add422Cfg(flags)
fixSnapshotTool422(alg)
fixMakerTool422(alg)