ATLAS Offline Software
GainDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // GainDecorator.h, (c) ATLAS Detector software
8 // Decorate egamma objects with the energy and number of cells per layer per
9 // gain
10 
11 #ifndef DERIVATIONFRAMEWORK_GainDecorator_H
12 #define DERIVATIONFRAMEWORK_GainDecorator_H
13 
14 #include <map>
15 #include <string>
16 
19 
20 #include "CaloEvent/CaloCell.h"
24 
25 namespace DerivationFramework {
26 
27 class GainDecorator : public extends<AthAlgTool, IAugmentationTool>
28 {
29 public:
30  GainDecorator(const std::string& t,
31  const std::string& n,
32  const IInterface* p);
36  virtual StatusCode addBranches() const;
37  static int getLayer(const CaloCell* cell);
38 
39  struct calculation
40  {
41  std::map<std::pair<int, int>, float> EnoW;
42  std::map<std::pair<int, int>, float> E;
43  std::map<std::pair<int, int>, uint8_t> nCells;
44  };
45 
46 private:
48  m_SGKey_photons{ this, "SGKey_photons", "", "SG key of photon container" };
49 
51  this,
52  "SGKey_electrons",
53  "",
54  "SG key of electron container"
55  };
56 
57  std::string m_decorationPattern;
58  std::map<int, std::string> m_gainNames;
59  std::vector<unsigned int> m_layers;
60 
61  // Name of the decorations
62  std::map<std::pair<int, int>, std::string> m_names_E;
63  std::map<std::pair<int, int>, std::string> m_names_rnoW;
64  std::map<std::pair<int, int>, std::string> m_names_nCells;
65 
68  this,
69  "SGKey_photons_decorations_noConf",
70  {},
71  "SG keys for photon decorations not really configurable"
72  };
73 
76  this,
77  "SGKey_electrons_decorations_noConf",
78  {},
79  "SG keys for electrons decorations not really configurable"
80  };
81 
82  calculation decorateObject(const xAOD::Egamma*& egamma) const;
83 };
84 }
85 
86 #endif // DERIVATIONFRAMEWORK_GainDecorator_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
DerivationFramework::GainDecorator::m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
Definition: GainDecorator.h:67
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
DerivationFramework::GainDecorator
Definition: GainDecorator.h:28
DerivationFramework::GainDecorator::m_SGKey_electrons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Definition: GainDecorator.h:75
DerivationFramework::GainDecorator::finalize
StatusCode finalize()
Definition: GainDecorator.cxx:121
IAugmentationTool.h
DerivationFramework::GainDecorator::GainDecorator
GainDecorator(const std::string &t, const std::string &n, const IInterface *p)
Definition: GainDecorator.cxx:22
DerivationFramework::GainDecorator::calculation::nCells
std::map< std::pair< int, int >, uint8_t > nCells
Definition: GainDecorator.h:43
CaloCell.h
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
DerivationFramework::GainDecorator::m_names_E
std::map< std::pair< int, int >, std::string > m_names_E
Definition: GainDecorator.h:62
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
egamma
Definition: egamma.h:58
DerivationFramework::GainDecorator::calculation::EnoW
std::map< std::pair< int, int >, float > EnoW
Definition: GainDecorator.h:41
EgammaContainer.h
DerivationFramework::GainDecorator::calculation
Definition: GainDecorator.h:40
DerivationFramework::GainDecorator::m_names_rnoW
std::map< std::pair< int, int >, std::string > m_names_rnoW
Definition: GainDecorator.h:63
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
DerivationFramework::GainDecorator::getLayer
static int getLayer(const CaloCell *cell)
Definition: GainDecorator.cxx:276
DerivationFramework::GainDecorator::m_decorationPattern
std::string m_decorationPattern
Definition: GainDecorator.h:57
DerivationFramework::GainDecorator::m_SGKey_photons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Definition: GainDecorator.h:48
beamspotman.n
n
Definition: beamspotman.py:729
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework::GainDecorator::~GainDecorator
~GainDecorator()
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::GainDecorator::calculation::E
std::map< std::pair< int, int >, float > E
Definition: GainDecorator.h:42
DerivationFramework::GainDecorator::m_names_nCells
std::map< std::pair< int, int >, std::string > m_names_nCells
Definition: GainDecorator.h:64
DerivationFramework::GainDecorator::m_gainNames
std::map< int, std::string > m_gainNames
Definition: GainDecorator.h:58
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
DerivationFramework::GainDecorator::addBranches
virtual StatusCode addBranches() const
Definition: GainDecorator.cxx:129
WriteDecorHandleKeyArray.h
DerivationFramework::GainDecorator::m_SGKey_electrons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
Definition: GainDecorator.h:50
DerivationFramework::GainDecorator::initialize
StatusCode initialize()
Definition: GainDecorator.cxx:69
DerivationFramework::GainDecorator::m_layers
std::vector< unsigned int > m_layers
Definition: GainDecorator.h:59
DerivationFramework::GainDecorator::decorateObject
calculation decorateObject(const xAOD::Egamma *&egamma) const
Definition: GainDecorator.cxx:238