ATLAS Offline Software
MaxCellDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DERIVATIONFRAMEWORK_MAXCELLDECORATOR_H
6 #define DERIVATIONFRAMEWORK_MAXCELLDECORATOR_H
7 
8 #include <string>
9 
12 //
13 #include "GaudiKernel/EventContext.h"
22 #include "xAODJet/Jet.h"
23 #include "xAODPFlow/PFO.h"
24 #include "xAODPFlow/FlowElement.h"
25 
26 namespace DerivationFramework {
27 
28  class MaxCellDecorator : public extends<AthAlgTool, IAugmentationTool>
29  {
30  public:
31 
32  using base_class::base_class;
33 
34  virtual StatusCode initialize() override final;
35  virtual StatusCode addBranches(const EventContext& ctx) const override final;
36 
37  struct calculation
38  {
39  float maxEcell_time = -9999.9;
40  float maxEcell_energy = -9999.9;
41  int maxEcell_gain = -1;
43  float maxEcell_x = -9999.9;
44  float maxEcell_y = -9999.9;
45  float maxEcell_z = -9999.9;
46  };
47 
48  private:
50  this,
51  "CablingKey",
52  "LArOnOffIdMap",
53  "SG Key of LArOnOffIdMapping object"
54  };
55 
57  m_SGKey_photons{ this, "SGKey_photons", "", "SG key of photon container" };
58 
60  this,
61  "SGKey_electrons",
62  "",
63  "SG key of electron container"
64  };
65 
70  this,
71  "SGKey_egammaClusters",
72  "",
73  "SG key of cluster container associated to standard egammas"
74  };
75 
77  m_SGKey_taus{ this, "SGKey_taus", "", "SG key of tau container" };
78 
80  m_SGKey_jets{ this, "SGKey_jets", "", "SG key of jet container" };
81 
83  Gaudi::Property<double> m_dRLRTegClusegClusMax{
84  this, "dRLRTegClusegClusMax",
85  0.05,
86  "Maximum delta R to match LRT egammaCluster to std egammaCluster"
87  };
88 
91  this,
92  "SGKey_photons_decorations",
93  m_SGKey_photons, {"maxEcell_time", "maxEcell_energy", "maxEcell_gain",
94  "maxEcell_onlId", "maxEcell_x", "maxEcell_y", "maxEcell_z"},
95  "SG keys for photon decorations not really configurable"
96  };
97 
100  this,
101  "SGKey_electrons_decorations",
102  m_SGKey_electrons, {"maxEcell_time", "maxEcell_energy", "maxEcell_gain",
103  "maxEcell_onlId", "maxEcell_x", "maxEcell_y", "maxEcell_z"},
104  "SG keys for electrons decorations not really configurable"
105  };
106 
109  this,
110  "SGKey_taus_decorations",
111  m_SGKey_taus, {"maxEcell_time", "maxEcell_energy", "maxEcell_gain",
112  "maxEcell_onlId", "maxEcell_x", "maxEcell_y", "maxEcell_z"},
113  "SG keys for tau decorations not really configurable"
114  };
115 
118  this,
119  "SGKey_jets_decorations",
120  m_SGKey_jets, {"maxEcell_time", "maxEcell_energy", "maxEcell_gain",
121  "maxEcell_onlId", "maxEcell_x", "maxEcell_y", "maxEcell_z"},
122  "SG keys for jet decorations not really configurable"
123  };
124 
125  calculation decorateObject(const xAOD::CaloCluster* cluster,
126  const EventContext& ctx) const;
127  };
128 }
129 
130 #endif // DERIVATIONFRAMEWORK_MAXCELLDECORATOR_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
DerivationFramework::MaxCellDecorator::initialize
virtual StatusCode initialize() override final
Definition: MaxCellDecorator.cxx:15
DerivationFramework::MaxCellDecorator::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: MaxCellDecorator.h:49
Jet.h
DerivationFramework::MaxCellDecorator::m_SGKey_electrons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Definition: MaxCellDecorator.h:99
DerivationFramework::MaxCellDecorator::calculation::maxEcell_z
float maxEcell_z
Definition: MaxCellDecorator.h:45
IAugmentationTool.h
DerivationFramework::MaxCellDecorator::calculation::maxEcell_gain
int maxEcell_gain
Definition: MaxCellDecorator.h:41
DerivationFramework::MaxCellDecorator::calculation::maxEcell_energy
float maxEcell_energy
Definition: MaxCellDecorator.h:40
DerivationFramework::MaxCellDecorator::m_SGKey_egammaClusters
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_SGKey_egammaClusters
This should be only for using run 2 reprocessing, which misses the cell link from LRT electron cluste...
Definition: MaxCellDecorator.h:69
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:45
DerivationFramework::MaxCellDecorator::m_SGKey_electrons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
Definition: MaxCellDecorator.h:59
DerivationFramework::MaxCellDecorator::m_dRLRTegClusegClusMax
Gaudi::Property< double > m_dRLRTegClusegClusMax
matching cone size
Definition: MaxCellDecorator.h:83
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::MaxCellDecorator::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition: MaxCellDecorator.cxx:53
EgammaContainer.h
DerivationFramework::MaxCellDecorator::calculation::maxEcell_x
float maxEcell_x
Definition: MaxCellDecorator.h:43
PFO.h
DerivationFramework::MaxCellDecorator::calculation
Definition: MaxCellDecorator.h:38
DerivationFramework::MaxCellDecorator::m_SGKey_taus
SG::ReadHandleKey< xAOD::TauJetContainer > m_SGKey_taus
Definition: MaxCellDecorator.h:77
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
LArOnOffIdMapping.h
FlowElement.h
DerivationFramework::MaxCellDecorator::m_SGKey_jets
SG::ReadHandleKey< xAOD::JetContainer > m_SGKey_jets
Definition: MaxCellDecorator.h:80
CaloCluster.h
DerivationFramework::MaxCellDecorator::m_SGKey_taus_decorations
SG::WriteDecorHandleKeyArray< xAOD::TauJetContainer > m_SGKey_taus_decorations
Definition: MaxCellDecorator.h:108
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
DerivationFramework::MaxCellDecorator::calculation::maxEcell_onlId
uint64_t maxEcell_onlId
Definition: MaxCellDecorator.h:42
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
TauJetContainer.h
DerivationFramework::MaxCellDecorator::m_SGKey_photons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Definition: MaxCellDecorator.h:57
ReadCondHandleKey.h
DerivationFramework::MaxCellDecorator::m_SGKey_jets_decorations
SG::WriteDecorHandleKeyArray< xAOD::JetContainer > m_SGKey_jets_decorations
Definition: MaxCellDecorator.h:117
DerivationFramework::MaxCellDecorator
Definition: MaxCellDecorator.h:29
DerivationFramework::MaxCellDecorator::calculation::maxEcell_y
float maxEcell_y
Definition: MaxCellDecorator.h:44
SG::ReadCondHandleKey< LArOnOffIdMapping >
DerivationFramework::MaxCellDecorator::m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
Definition: MaxCellDecorator.h:90
DerivationFramework::MaxCellDecorator::calculation::maxEcell_time
float maxEcell_time
Definition: MaxCellDecorator.h:39
WriteDecorHandleKeyArray.h
CaloClusterContainer.h
DerivationFramework::MaxCellDecorator::decorateObject
calculation decorateObject(const xAOD::CaloCluster *cluster, const EventContext &ctx) const
Definition: MaxCellDecorator.cxx:305