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::ReadHandleKey< CaloCellContainerm_SGKey_CaloCells { this, "SGKey_CaloCells", "AllCalo", "SG key of calo cell 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 93 of file EGammaClusterCoreCellRecovery.cxx.

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

◆ 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 152 of file EGammaClusterCoreCellRecovery.cxx.

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

◆ 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 184 of file EGammaClusterCoreCellRecovery.cxx.

186 {
187  const CaloClusterCellLink* cellLinks = clus->getCellLinks();
188  if (!cellLinks) {
189  ATH_MSG_WARNING("No cell link for cluster. Do nothing");
190  return StatusCode::FAILURE;
191  }
192 
193  // First check :
194  // if we run in MT, this would be nullptr without initializing a ReadHandleKey
195  const CaloCellContainer *caloCells = cellLinks->getCellContainer();
196  if (!caloCells) {
197  ATH_MSG_WARNING("No cells for cluster. Do nothing");
198  return StatusCode::FAILURE;
199  }
200 
201  // Second check :
202  // one might have used a custom cell container for the linked cells
203  if (cellLinks->getCellContainerLink().dataID() != m_SGKey_CaloCells.key()) {
204  ATH_MSG_ERROR("Wrong key for the calo cells");
205  return StatusCode::FAILURE;
206  }
207 
208  CaloClusterCellLink::const_iterator it_cell = cellLinks->begin(),
209  it_cell_e = cellLinks->end();
210 
211  // find maximum cell energy in layer 2
212  double emax = 0.;
213  std::pair<const CaloCell*,double> maxcell{nullptr,0}; //just for debug
214  for(; it_cell != it_cell_e; ++it_cell) {
215  const CaloCell* cell = (*it_cell);
216  if (cell) {
217  if (!cell->caloDDE()) {
218  ATH_MSG_WARNING("Calo cell without detector element ?? eta = "
219  << cell->eta() << " phi = " << cell->phi());
220  continue;
221  }
222  int layer = cell->caloDDE()->getSampling();
224  double w = it_cell.weight();
225  double eCell = cell->energy();
226  if (m_UseWeightForMaxCell) eCell *= w;
227  if (eCell > emax) {
228  emax = eCell;
229  maxcell.first = cell;
230  maxcell.second = w;
231  }
232  }
233  }
234  }
235 
236  if (emax > 0) {
237  etamax = maxcell.first->caloDDE()->eta_raw();
238  phimax = maxcell.first->caloDDE()->phi_raw();
239  if (msgLvl(MSG::DEBUG)) {
240  CaloSampling::CaloSample sam = maxcell.first->caloDDE()->getSampling();
241  double etaAmax = clus->etamax(sam);
242  double phiAmax = clus->phimax(sam);
243  double vemax = clus->energy_max(sam);
244  ATH_MSG_DEBUG("Cluster energy in sampling 2 = " << clus->energyBE(2)
245  << " maximum layer 2 energy cell, E = " << maxcell.first->energy()
246  << " check E = " << vemax
247  << " w = " << maxcell.second << "\n"
248  << " in calo frame, eta = " << etamax << " phi = " << phimax << "\n"
249  << " in ATLAS frame, eta = " << etaAmax << " phi = " << phiAmax);
250  }
251  } else {
252  ATH_MSG_WARNING("No layer 2 cell with positive energy ! Should never happen");
253  return StatusCode::FAILURE;
254  }
255  return StatusCode::SUCCESS;
256 }

◆ 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  // This tool needs the calo cells linked to the clusters...
67 
68  if (!m_SGKey_photons.key().empty()) {
69  ATH_MSG_DEBUG("Using " << m_SGKey_photons << " for photons");
70  ATH_CHECK(m_SGKey_photons.initialize());
71 
72  const std::string containerKey = m_SGKey_photons.key();
73  for (int i = 2; i <= 3; i++) {
74  for (int t = 0; t <= 1 ; t++) {
75  m_SGKey_photons_decorations.emplace_back(
76  Form("%s.%sadded_Lr%d", containerKey.c_str(), (t == 0 ? "n" : "E"), i));
77  }
78  }
80  if (msgLvl(MSG::DEBUG)) {
81  ATH_MSG_DEBUG("Decorations for " << containerKey);
82  for (const auto& s : m_SGKey_photons_decorations)
83  { ATH_MSG_DEBUG(s.key()); }
84  }
85  }
86 
87  return StatusCode::SUCCESS;
88 }

◆ 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 80 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_CaloCells

SG::ReadHandleKey<CaloCellContainer> DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_CaloCells { this, "SGKey_CaloCells", "AllCalo", "SG key of calo cell container" }
private

Definition at line 48 of file EGammaClusterCoreCellRecovery.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 60 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 52 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 67 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
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:60
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
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
DerivationFramework::EGammaClusterCoreCellRecovery::decorateObject
IegammaCellRecoveryTool::Info decorateObject(const xAOD::Egamma *&egamma) const
Definition: EGammaClusterCoreCellRecovery.cxx:152
DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_CaloCells
SG::ReadHandleKey< CaloCellContainer > m_SGKey_CaloCells
Definition: EGammaClusterCoreCellRecovery.h:49
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
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
Definition: EGammaClusterCoreCellRecovery.h:52
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:85
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
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
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:80
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
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:184
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:623
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:798
DerivationFramework::EGammaClusterCoreCellRecovery::m_UseWeightForMaxCell
Gaudi::Property< bool > m_UseWeightForMaxCell
Definition: EGammaClusterCoreCellRecovery.h:67
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