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 assert tool.SeedCutsInAbsE is True
20 tool.SeedCutsInAbsE = False
21 assert tool.NeighborCutsInAbsE is True
22 tool.NeighborCutsInAbsE = False
23 assert tool.CellCutsInAbsE is True
24 tool.CellCutsInAbsE = False
25 assert tool.SeedCutsInT is True
26 tool.SeedCutsInT = False
27 return True
28
29 return False
30
32 if not hasattr(alg, 'ClusterCorrectionTools'):
33 return False
34
35 for tool in alg.ClusterCorrectionTools:
36
37 if tool.name == 'CaloClusterSnapshot':
38 assert tool.OutputName == 'CaloTopoClusters'
39 tool.OutputName = 'CaloTopoClusters422Snap'
40 return True
41
42 return False
43
44
45def Add422Cfg(flags):
46
47 cfg = ComponentAccumulator()
48
49 from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
50
51 calo_acc422 = CaloTopoClusterCfg(flags,clustersname='CaloTopoClusters422')
52
53 alg = getAlg422(calo_acc422)
54 assert fixMakerTool422(alg)
55 assert fixSnapshotTool422(alg)
56
57 cfg.merge(calo_acc422)
58
59 return cfg
Add422Cfg(flags)
fixSnapshotTool422(alg)
fixMakerTool422(alg)