ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DerivationFramework::EGammaClusterCoreCellRecovery Class Reference

#include <EGammaClusterCoreCellRecovery.h>

Inheritance diagram for DerivationFramework::EGammaClusterCoreCellRecovery:
Collaboration diagram for DerivationFramework::EGammaClusterCoreCellRecovery:

Public Member Functions

 EGammaClusterCoreCellRecovery (const std::string &t, const std::string &n, const IInterface *p)
 
 ~EGammaClusterCoreCellRecovery ()=default
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches () const
 Pass the thinning service
More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

IegammaCellRecoveryTool::Info decorateObject (const xAOD::Egamma *&egamma) const
 
StatusCode findMaxECell (const xAOD::CaloCluster *clus, double &etamax, double &phimax) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::EgammaContainerm_SGKey_photons { this, "SGKey_photons", "Photons", "SG key of photon container" }
 
SG::ReadHandleKey< xAOD::EgammaContainerm_SGKey_electrons { this, "SGKey_electrons", "Electrons", "SG key of electron container" }
 
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainerm_SGKey_photons_decorations
 
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainerm_SGKey_electrons_decorations
 
Gaudi::Property< bool > m_UseWeightForMaxCell
 
ToolHandle< IegammaCellRecoveryToolm_egammaCellRecoveryTool
 Pointer to the egammaCellRecoveryTool. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 28 of file EGammaClusterCoreCellRecovery.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ EGammaClusterCoreCellRecovery()

DerivationFramework::EGammaClusterCoreCellRecovery::EGammaClusterCoreCellRecovery ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 22 of file EGammaClusterCoreCellRecovery.cxx.

25  : AthAlgTool(t, n, p)
26 {
27  declareInterface<DerivationFramework::IAugmentationTool>(this);
28 }

◆ ~EGammaClusterCoreCellRecovery()

DerivationFramework::EGammaClusterCoreCellRecovery::~EGammaClusterCoreCellRecovery ( )
default

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::addBranches ( ) const
virtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 90 of file EGammaClusterCoreCellRecovery.cxx.

91 {
92  const EventContext& ctx = Gaudi::Hive::currentContext();
93 
94  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>> decon;
95  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decoE;
96  decon.reserve(2);
97  decoE.reserve(2);
98 
99  // Photon decorations
100  if (!m_SGKey_photons.key().empty()) {
101 
102  for (int i = 0; i < 2; i++) {
103  decon.emplace_back(m_SGKey_photons_decorations[i * 2], ctx);
104  decoE.emplace_back(m_SGKey_photons_decorations[i * 2 + 1], ctx);
105  }
106 
107  // Retrieve photon container
109 
110  // Decorate photons
111  for (const auto* photon : *photonContainer.ptr()) {
113  for (int i = 0; i < 2; i++) {
114  decon[i](*photon) = res.nCells[i];
115  decoE[i](*photon) = res.eCells[i];
116  }
117  }
118  }
119 
120  // Electron decorations
121  if (!m_SGKey_electrons.key().empty()) {
122 
123  decon.clear(); decon.reserve(2);
124  decoE.clear(); decoE.reserve(2);
125 
126  for (int i = 0; i < 2; i++) {
127  decon.emplace_back(m_SGKey_electrons_decorations[i * 2], ctx);
128  decoE.emplace_back(m_SGKey_electrons_decorations[i * 2 + 1], ctx);
129  }
130 
131  // Retrieve electron container
133  ctx);
134 
135  // Decorate electrons
136  for (const auto* electron : *electronContainer.ptr()) {
138  for (int i = 0; i < 2; i++) {
139  decon[i](*electron) = res.nCells[i];
140  decoE[i](*electron) = res.eCells[i];
141  }
142  }
143  }
144 
145  return StatusCode::SUCCESS;
146 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ decorateObject()

IegammaCellRecoveryTool::Info DerivationFramework::EGammaClusterCoreCellRecovery::decorateObject ( const xAOD::Egamma *&  egamma) const
private

Definition at line 149 of file EGammaClusterCoreCellRecovery.cxx.

151 {
153 
154  ATH_MSG_DEBUG("Trying to recover cell for object of type " << egamma->type()
155  << " pT = " << egamma->pt()
156  << " eta = " << egamma->eta()
157  << " phi = " << egamma->phi());
158 
159  const xAOD::CaloCluster *clus = egamma->caloCluster();
160  if (!clus) {
161  ATH_MSG_WARNING("No associated egamma cluster. Do nothing");
162  return info;
163  }
164 
165  // Find max energy cell in layer 2
166  double etamax = -999., phimax = -999.;
167  if (findMaxECell(clus,etamax,phimax).isFailure()) {
168  ATH_MSG_WARNING("Problem in finding maximum energy cell in layer 2");
169  return info;
170  }
171 
172  info.etamax = etamax;
173  info.phimax = phimax;
174  if (m_egammaCellRecoveryTool->execute(*clus,info).isFailure()) {
175  ATH_MSG_WARNING("Issue trying to recover cells");
176  }
177  return info;
178 }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::finalize ( )
inline

Definition at line 38 of file EGammaClusterCoreCellRecovery.h.

38 { return StatusCode::SUCCESS; }

◆ findMaxECell()

StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::findMaxECell ( const xAOD::CaloCluster clus,
double &  etamax,
double &  phimax 
) const
private

Definition at line 181 of file EGammaClusterCoreCellRecovery.cxx.

183 {
184  const CaloClusterCellLink* cellLinks = clus->getCellLinks();
185  if (!cellLinks) {
186  ATH_MSG_WARNING("No cell link for cluster. Do nothing");
187  return StatusCode::FAILURE;
188  }
189 
190  CaloClusterCellLink::const_iterator it_cell = cellLinks->begin(),
191  it_cell_e = cellLinks->end();
192 
193  // find maximum cell energy in layer 2
194  double emax = 0.;
195  std::pair<const CaloCell*,double> maxcell{nullptr,0}; //just for debug
196  for(; it_cell != it_cell_e; ++it_cell) {
197  const CaloCell* cell = (*it_cell);
198  if (cell) {
199  if (!cell->caloDDE()) {
200  ATH_MSG_WARNING("Calo cell without detector element ?? eta = "
201  << cell->eta() << " phi = " << cell->phi());
202  continue;
203  }
204  int layer = cell->caloDDE()->getSampling();
206  double w = it_cell.weight();
207  double eCell = cell->energy();
208  if (m_UseWeightForMaxCell) eCell *= w;
209  if (eCell > emax) {
210  emax = eCell;
211  maxcell.first = cell;
212  maxcell.second = w;
213  }
214  }
215  }
216  }
217 
218  if (emax > 0) {
219  etamax = maxcell.first->caloDDE()->eta_raw();
220  phimax = maxcell.first->caloDDE()->phi_raw();
221  if (msgLvl(MSG::DEBUG)) {
222  CaloSampling::CaloSample sam = maxcell.first->caloDDE()->getSampling();
223  double etaAmax = clus->etamax(sam);
224  double phiAmax = clus->phimax(sam);
225  double vemax = clus->energy_max(sam);
226  ATH_MSG_DEBUG("Cluster energy in sampling 2 = " << clus->energyBE(2)
227  << " maximum layer 2 energy cell, E = " << maxcell.first->energy()
228  << " check E = " << vemax
229  << " w = " << maxcell.second << "\n"
230  << " in calo frame, eta = " << etamax << " phi = " << phimax << "\n"
231  << " in ATLAS frame, eta = " << etaAmax << " phi = " << phiAmax);
232  }
233  } else {
234  ATH_MSG_WARNING("No layer 2 cell with positive energy ! Should never happen");
235  return StatusCode::FAILURE;
236  }
237  return StatusCode::SUCCESS;
238 }

◆ initialize()

StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::initialize ( )

Definition at line 33 of file EGammaClusterCoreCellRecovery.cxx.

34 {
35  ATH_MSG_VERBOSE("initialize() ...");
36 
37  // The main tool
39 
40  if (m_SGKey_photons.key().empty() && m_SGKey_electrons.key().empty()) {
41  ATH_MSG_FATAL("No e-gamma collection provided for thinning. At least one "
42  "egamma collection (photons/electrons) must be provided!");
43  return StatusCode::FAILURE;
44  }
45 
46  if (!m_SGKey_electrons.key().empty()) {
47  ATH_MSG_DEBUG("Using " << m_SGKey_electrons << " for electrons");
48  ATH_CHECK(m_SGKey_electrons.initialize());
49 
50  const std::string containerKey = m_SGKey_electrons.key();
51  for (int i = 2; i <= 3; i++) {
52  for (int t = 0; t <=1 ; t++) {
53  m_SGKey_electrons_decorations.emplace_back(
54  Form("%s.%sadded_Lr%d", containerKey.c_str(), (t == 0 ? "n" : "E"), i));
55  }
56  }
58  if (msgLvl(MSG::DEBUG)) {
59  ATH_MSG_DEBUG("Decorations for " << containerKey);
60  for (const auto& s : m_SGKey_electrons_decorations)
61  { ATH_MSG_DEBUG(s.key()); }
62  }
63  }
64 
65  if (!m_SGKey_photons.key().empty()) {
66  ATH_MSG_DEBUG("Using " << m_SGKey_photons << " for photons");
67  ATH_CHECK(m_SGKey_photons.initialize());
68 
69  const std::string containerKey = m_SGKey_photons.key();
70  for (int i = 2; i <= 3; i++) {
71  for (int t = 0; t <= 1 ; t++) {
72  m_SGKey_photons_decorations.emplace_back(
73  Form("%s.%sadded_Lr%d", containerKey.c_str(), (t == 0 ? "n" : "E"), i));
74  }
75  }
77  if (msgLvl(MSG::DEBUG)) {
78  ATH_MSG_DEBUG("Decorations for " << containerKey);
79  for (const auto& s : m_SGKey_photons_decorations)
80  { ATH_MSG_DEBUG(s.key()); }
81  }
82  }
83 
84  return StatusCode::SUCCESS;
85 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_egammaCellRecoveryTool

ToolHandle<IegammaCellRecoveryTool> DerivationFramework::EGammaClusterCoreCellRecovery::m_egammaCellRecoveryTool
private
Initial value:
{
this,
"egammaCellRecoveryTool",
"egammaCellRecoveryTool/egammaCellRecoveryTool",
"Optional tool that adds cells in L2 or L3 "
"that could have been rejected by timing cut"
}

Pointer to the egammaCellRecoveryTool.

Definition at line 77 of file EGammaClusterCoreCellRecovery.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_SGKey_electrons

SG::ReadHandleKey<xAOD::EgammaContainer> DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_electrons { this, "SGKey_electrons", "Electrons", "SG key of electron container" }
private

Definition at line 45 of file EGammaClusterCoreCellRecovery.h.

◆ m_SGKey_electrons_decorations

SG::WriteDecorHandleKeyArray<xAOD::EgammaContainer> DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_electrons_decorations
private
Initial value:
{
this,
"SGKey_electrons_decorations_noConf",
{},
"SG keys for electrons decorations not really configurable"
}

Definition at line 57 of file EGammaClusterCoreCellRecovery.h.

◆ m_SGKey_photons

SG::ReadHandleKey<xAOD::EgammaContainer> DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_photons { this, "SGKey_photons", "Photons", "SG key of photon container" }
private

Definition at line 42 of file EGammaClusterCoreCellRecovery.h.

◆ m_SGKey_photons_decorations

SG::WriteDecorHandleKeyArray<xAOD::EgammaContainer> DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_photons_decorations
private
Initial value:
{
this,
"SGKey_photons_decorations_noConf",
{},
"SG keys for photon decorations not really configurable"
}

Definition at line 49 of file EGammaClusterCoreCellRecovery.h.

◆ m_UseWeightForMaxCell

Gaudi::Property<bool> DerivationFramework::EGammaClusterCoreCellRecovery::m_UseWeightForMaxCell
private
Initial value:
{
this,
"UseWeightForMaxCell",
false,
"Use the cell weights when finding the L2 max energy cell"
}

Definition at line 64 of file EGammaClusterCoreCellRecovery.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
xAOD::CaloCluster_v1::phimax
float phimax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
Definition: CaloCluster_v1.cxx:589
electronContainer
xAOD::ElectronContainer * electronContainer
Definition: TrigGlobEffCorrValidation.cxx:187
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ParticleImpl::pt
virtual double pt() const
transverse momentum
Definition: ParticleImpl.h:554
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
IegammaCellRecoveryTool::Info
Definition: IegammaCellRecoveryTool.h:36
DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_electrons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Definition: EGammaClusterCoreCellRecovery.h:57
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
DerivationFramework::EGammaClusterCoreCellRecovery::decorateObject
IegammaCellRecoveryTool::Info decorateObject(const xAOD::Egamma *&egamma) const
Definition: EGammaClusterCoreCellRecovery.cxx:149
xAOD::CaloCluster_v1::etamax
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
Definition: CaloCluster_v1.cxx:576
egamma
Definition: egamma.h:58
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
Definition: EGammaClusterCoreCellRecovery.h:49
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
xAOD::CaloCluster_v1::energy_max
float energy_max(const CaloSample sampling) const
Retrieve maximum cell energy in given sampling.
Definition: CaloCluster_v1.cxx:563
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
ParticleImpl::phi
virtual double phi() const
phi in [-pi,pi[
Definition: ParticleImpl.h:524
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
ParticleImpl::eta
virtual double eta() const
pseudo rapidity
Definition: ParticleImpl.h:514
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
photonContainer
xAOD::PhotonContainer * photonContainer
Definition: TrigGlobEffCorrValidation.cxx:189
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
DerivationFramework::EGammaClusterCoreCellRecovery::m_egammaCellRecoveryTool
ToolHandle< IegammaCellRecoveryTool > m_egammaCellRecoveryTool
Pointer to the egammaCellRecoveryTool.
Definition: EGammaClusterCoreCellRecovery.h:77
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::EGammaClusterCoreCellRecovery::findMaxECell
StatusCode findMaxECell(const xAOD::CaloCluster *clus, double &etamax, double &phimax) const
Definition: EGammaClusterCoreCellRecovery.cxx:181
DEBUG
#define DEBUG
Definition: page_access.h:11
xAOD::CaloCluster_v1::energyBE
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:630
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_photons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Definition: EGammaClusterCoreCellRecovery.h:43
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
DerivationFramework::EGammaClusterCoreCellRecovery::m_UseWeightForMaxCell
Gaudi::Property< bool > m_UseWeightForMaxCell
Definition: EGammaClusterCoreCellRecovery.h:64
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_electrons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
Definition: EGammaClusterCoreCellRecovery.h:46
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
fitman.k
k
Definition: fitman.py:528