ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkCalo
DerivationFrameworkCalo
GainDecorator.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
// Decorate egamma objects with the energy and number of cells per layer per
6
// gain
7
8
#ifndef DERIVATIONFRAMEWORK_GainDecorator_H
9
#define DERIVATIONFRAMEWORK_GainDecorator_H
10
11
12
#include "
AthenaBaseComps/AthAlgTool.h
"
13
#include "
DerivationFrameworkInterfaces/IAugmentationTool.h
"
14
15
#include "
StoreGate/ReadHandleKey.h
"
16
#include "
StoreGate/WriteDecorHandleKeyArray.h
"
17
#include "
xAODEgamma/EgammaContainer.h
"
18
#include <map>
19
#include <string>
20
#include <vector>
21
22
class
CaloCell
;
23
24
namespace
DerivationFramework
{
25
26
class
GainDecorator
:
public
extends<AthAlgTool, IAugmentationTool>
27
{
28
public
:
29
30
using
base_class::base_class;
31
32
virtual
StatusCode
initialize
()
override
final
;
33
virtual
StatusCode
addBranches
(
const
EventContext& ctx)
const
override
final
;
34
static
int
getLayer
(
const
CaloCell
* cell);
// TODO Why is this public?
35
36
struct
calculation
37
{
38
std::map<std::pair<int, int>,
float
>
EnoW
;
39
std::map<std::pair<int, int>,
float
>
E
;
40
std::map<std::pair<int, int>, uint8_t>
nCells
;
41
};
42
43
private
:
44
SG::ReadHandleKey<xAOD::EgammaContainer>
m_SGKey_photons
{
45
this
,
"SGKey_photons"
,
""
,
"SG key of photon container"
};
46
47
SG::ReadHandleKey<xAOD::EgammaContainer>
m_SGKey_electrons
{
48
this
,
"SGKey_electrons"
,
""
,
"SG key of electron container"
};
49
50
Gaudi::Property< std::map<int, std::string> >
m_gainNames
{
this
,
"gain_names"
,
51
{ {
CaloGain::LARHIGHGAIN
,
"Hi"
},
52
{
CaloGain::LARMEDIUMGAIN
,
"Med"
},
53
{
CaloGain::LARLOWGAIN
,
"Low"
} } };
54
Gaudi::Property< std::vector<unsigned int> >
m_layers
{
this
,
"layers"
, { 0, 1, 2, 3 }};
55
56
// // Name of the decorations
57
std::vector<std::pair<int, int>>
m_names_E
;
58
59
SG::WriteDecorHandleKeyArray<xAOD::EgammaContainer>
60
m_SGKey_photons_decorations
{
61
this
,
62
"SGKey_photons_decorations"
,
63
m_SGKey_photons
, {},
64
"SG keys for photon decorations not really configurable"
65
};
66
67
SG::WriteDecorHandleKeyArray<xAOD::EgammaContainer>
68
m_SGKey_electrons_decorations
{
69
this
,
70
"SGKey_electrons_decorations"
,
71
m_SGKey_electrons
, {},
72
"SG keys for electrons decorations not really configurable"
73
};
74
75
calculation
decorateObject
(
const
xAOD::Egamma
*&
egamma
)
const
;
76
};
77
}
78
79
#endif
// DERIVATIONFRAMEWORK_GainDecorator_H
AthAlgTool.h
EgammaContainer.h
IAugmentationTool.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKeyArray.h
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
DerivationFramework::GainDecorator
Definition
GainDecorator.h:27
DerivationFramework::GainDecorator::m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
Definition
GainDecorator.h:60
DerivationFramework::GainDecorator::m_SGKey_electrons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
Definition
GainDecorator.h:47
DerivationFramework::GainDecorator::m_names_E
std::vector< std::pair< int, int > > m_names_E
Definition
GainDecorator.h:57
DerivationFramework::GainDecorator::getLayer
static int getLayer(const CaloCell *cell)
Definition
GainDecorator.cxx:183
DerivationFramework::GainDecorator::m_SGKey_photons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Definition
GainDecorator.h:44
DerivationFramework::GainDecorator::initialize
virtual StatusCode initialize() override final
Definition
GainDecorator.cxx:18
DerivationFramework::GainDecorator::m_gainNames
Gaudi::Property< std::map< int, std::string > > m_gainNames
Definition
GainDecorator.h:50
DerivationFramework::GainDecorator::m_SGKey_electrons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Definition
GainDecorator.h:68
DerivationFramework::GainDecorator::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition
GainDecorator.cxx:51
DerivationFramework::GainDecorator::m_layers
Gaudi::Property< std::vector< unsigned int > > m_layers
Definition
GainDecorator.h:54
DerivationFramework::GainDecorator::decorateObject
calculation decorateObject(const xAOD::Egamma *&egamma) const
Definition
GainDecorator.cxx:145
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
egamma
elec/gamma data class.
Definition
egamma.h:59
CaloGain::LARMEDIUMGAIN
@ LARMEDIUMGAIN
Definition
CaloGain.h:18
CaloGain::LARLOWGAIN
@ LARLOWGAIN
Definition
CaloGain.h:18
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition
CaloGain.h:18
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
SG::WriteDecorHandleKeyArray
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
Definition
StoreGate/StoreGate/WriteDecorHandleKeyArray.h:35
xAOD::Egamma
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition
Egamma.h:17
DerivationFramework::GainDecorator::calculation
Definition
GainDecorator.h:37
DerivationFramework::GainDecorator::calculation::nCells
std::map< std::pair< int, int >, uint8_t > nCells
Definition
GainDecorator.h:40
DerivationFramework::GainDecorator::calculation::E
std::map< std::pair< int, int >, float > E
Definition
GainDecorator.h:39
DerivationFramework::GainDecorator::calculation::EnoW
std::map< std::pair< int, int >, float > EnoW
Definition
GainDecorator.h:38
Generated on
for ATLAS Offline Software by
1.17.0