ATLAS Offline Software
CaloCalibHitDecoratorCfg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def 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
21 def 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
CaloCalibHitDecoratorCfg.CaloCalibHitDecoratorCfg
def CaloCalibHitDecoratorCfg(flags, name="CaloCalibClusterDecoratorAlgorithm", **kwargs)
Definition: CaloCalibHitDecoratorCfg.py:6
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloCalibHitDecoratorCfg.CaloCalibHitDecoratorFullEnergyCfg
def CaloCalibHitDecoratorFullEnergyCfg(flags, name="CaloCalibCLusterDecoratorAlgorithm_Full", **kwargs)
Definition: CaloCalibHitDecoratorCfg.py:21
CaloCalibHitDecoratorCfg
Definition: CaloCalibHitDecoratorCfg.py:1