ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCalibClusterDecoratorTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CALOCALIBHITREC_CALOCALIBCLUSTERDECORATORTOOL_H
6#define CALOCALIBHITREC_CALOCALIBCLUSTERDECORATORTOOL_H
7
8#include "GaudiKernel/ToolHandle.h"
13
14//EDM Classes
17
18//EDM Container Classes
20
21//C++ classes
22#include <string>
23#include <vector>
24#include <set>
25#include <map>
26#include <atomic>
27#include <array>
28
41
42public:
43
47 CaloCalibClusterDecoratorTool(const std::string& type, const std::string& name,
48 const IInterface* parent);
49
51
52
53 virtual StatusCode execute(const EventContext& ctx,
54 xAOD::CaloClusterContainer* theClusColl) const override final;
55
56
57 virtual StatusCode initialize() override;
58
59
60 virtual StatusCode finalize() override;
61
66
67private:
68
72 StatusCode calculateTruthEnergies(const xAOD::CaloCluster& theCaloCluster,
73 unsigned int numTruthParticles,
74 const std::map<Identifier,std::vector<const CaloCalibrationHit*> >& identifierToCaloHitMap,
75 std::vector<std::pair<unsigned int,double>>& truthIDTrueCalHitEnergy) const;
76
81 m_mapIdentifierToCalibHitsReadHandleKey{this,"IdentifierToCalibHitsMapName","IdentifierToCalibHitsMap",
82 "ReadHandleKey for the map between Identifiers and sets of calibration hits"};
83
89 this,
90 "CaloClusterWriteDecorHandleKey_NLeadingTruthParticles",
91 "CaloTopoClustersNew.calclus_NLeadingTruthParticleBarcodeEnergyPairs"};
92
97 Gaudi::Property<unsigned int> m_numTruthParticles{
98 this,"NumTruthParticles",100,
99 "Set number of truth particles per CaloCluster/PFO for which we store calibration hit energy"};
100
104 Gaudi::Property<bool> m_useCellWeights{
105 this,"useCellWeights",true,
106 "Toggle whether to use cell weights or not to calculate calibration hit contribution"};
107
111 Gaudi::Property<bool> m_storeFullTruthEnergy{
112 this,"StoreFullTruthEnergy",false,
113 "If true, include escaped + invisible energy in truth energy calculation"};
114
118 ToolHandle<ICaloCalibClusterTruthAttributerTool>
120 this,"TruthAttributerTool","",
121 "ToolHandle to a tool to create the calibration hit truth information that we need for the decoration"};
122
123};
124
125#endif // CALOCALIBCLUSTERDECORATORTOOL_H
Base class for cluster processing tools called from CaloClusterMaker.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< bool > m_storeFullTruthEnergy
Toggle whether to store full truth energy (include invisible + escaped)
ToolHandle< ICaloCalibClusterTruthAttributerTool > m_truthAttributerTool
External tool that handles calculation logic of truth energies.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *theClusColl) const override final
Execute on an entire collection of clusters.
Gaudi::Property< unsigned int > m_numTruthParticles
Allow user to set the number of truth particles per clusterCaloCluster or PFO, in descending pt order...
CaloCalibClusterDecoratorTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
SG::ReadHandleKey< std::map< Identifier, std::vector< const CaloCalibrationHit * > > > m_mapIdentifierToCalibHitsReadHandleKey
ReadHandleKey for the map between Identifiers and sets of calibration hits.
StatusCode calculateTruthEnergies(const xAOD::CaloCluster &theCaloCluster, unsigned int numTruthParticles, const std::map< Identifier, std::vector< const CaloCalibrationHit * > > &identifierToCaloHitMap, std::vector< std::pair< unsigned int, double > > &truthIDTrueCalHitEnergy) const
Calculate truth energies for a given cluster.
Gaudi::Property< bool > m_useCellWeights
Toggle whether to use cell weights or not to calculate calibration hit contribution.
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_caloClusterWriteDecorHandleKeyNLeadingTruthParticles
Write handle key to decorate CaloCluster with threeN leading truth particle barcode and energy.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.