ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCalibHitDecoratorCfg.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
5
6def CaloCalibHitDecoratorCfg(flags, name = "CaloCalibClusterDecoratorAlgorithm", **kwargs):
7 result=ComponentAccumulator()
8
9 result.addEventAlgo(CompFactory.CaloCalibClusterTruthMapMakerAlgorithm())
10
11 kwargs.setdefault("CaloClusterWriteDecorHandleKey_NLeadingTruthParticles", "CaloCalTopoClusters."+flags.Calo.TopoCluster.CalibrationHitDecorationName)
12
13 #We use the cell links from topoclusters, so we also need to specify that the algorithm depends on the calorimeter cell container
14 CaloCalibClusterDecoratorAlgorithm = CompFactory.CaloCalibClusterDecoratorAlgorithm(name,**kwargs,ExtraInputs = {('CaloCellContainer','StoreGateSvc+AllCalo')})
15 CaloCalibClusterDecoratorAlgorithm.TruthAttributerTool = CompFactory.CaloCalibClusterTruthAttributerTool()
16 result.addEventAlgo(CaloCalibClusterDecoratorAlgorithm)
17
18 return result
19
20#This configures a version of the tool that stores the full, rather than only the visible, calibration hit truth energy in the cluster
21def CaloCalibHitDecoratorFullEnergyCfg( flags, name = "CaloCalibCLusterDecoratorAlgorithm_Full", **kwargs):
22
23 result = ComponentAccumulator()
24 result.merge(CaloCalibHitDecoratorCfg(flags, name, **kwargs))
25 result.getEventAlgo(name).TruthAttributerTool.storeFullTruthEnergy = True
26 return result
CaloCalibHitDecoratorFullEnergyCfg(flags, name="CaloCalibCLusterDecoratorAlgorithm_Full", **kwargs)