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

Cluster correction tool to compute the logarithmically weighted centroid. More...

#include <CaloClusterLogPos.h>

Inheritance diagram for CaloClusterLogPos:
Collaboration diagram for CaloClusterLogPos:

Public Member Functions

StatusCode initialize () override
 
StatusCode execute (const EventContext &ctx, xAOD::CaloCluster *theCluster) const override
 Execute on a single cluster. More...
 
 CaloClusterLogPos (const std::string &type, const std::string &name, const IInterface *parent)
 Standard AlgTool constructor. More...
 
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloCluster *cluster) const=0
 Execute on a single cluster. More...
 
virtual StatusCode execute (xAOD::CaloCluster *cluster) final
 Execute on a single cluster. More...
 
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const
 Execute on an entire collection of clusters. More...
 
virtual StatusCode execute (xAOD::CaloCluster *cluster) final
 Execute on a single cluster. More...
 
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const
 Execute on an entire collection of clusters. More...
 
virtual StatusCode execute (xAOD::CaloClusterContainer *collection) final
 Execute on an entire collection of clusters. 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 ()
 Standard Gaudi interface ID method. 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

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

double m_offset
 
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

Cluster correction tool to compute the logarithmically weighted centroid.

The eta and phi position of a cluster are re-calculated with logarithmic weights instead of the default linear weights in cell energy. This gives cells in the shower tails larger weights and thus avoids the bias towards the center of the largest cell. This tool needs to be called after all energy correction tools since any update of the cell weights re-calculates eta and phi. The weighting is done according to:

\[ \eta = 1/{\rm norm} \times \sum\limits{{\rm cell}, w_{\rm cell} > 0} w_{\rm cell} \eta_{\rm cell} \]

with

\[ w_{\rm * cell} = w_0 + \log(|E_{\rm cell}|/|E_{\rm cluster}|) \]

,

\[ {\rm * norm} = \sum\limits{{\rm cell}, w_{\rm cell} > 0} w_{\rm cell} \]

,

where \(w_0\) is an offset to cut off cells with too small energy. The absolute values of the cell and cluster energies * are used in order to keep a valid position for clusters with * negative energy.

See also B.Brabson et al. Nucl. Inst. and Methods, A332 (419-443) 1993. eqn 14.

Definition at line 50 of file CaloClusterLogPos.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

◆ CaloClusterLogPos()

CaloClusterLogPos::CaloClusterLogPos ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard AlgTool constructor.

Definition at line 14 of file CaloClusterLogPos.cxx.

18  m_offset(4.7)
19 {
20  declareProperty ("LogPosOffset",m_offset) ;
21 }

Member Function Documentation

◆ 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  }

◆ 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; }

◆ execute() [1/7]

virtual StatusCode CaloClusterProcessor::execute

Execute on a single cluster.

Parameters
clusterThe cluster to process.
ctxThe event context.

◆ execute() [2/7]

StatusCode CaloClusterLogPos::execute ( const EventContext &  ctx,
xAOD::CaloCluster cluster 
) const
overridevirtual

Execute on a single cluster.

Parameters
clusterThe cluster to process.
ctxThe event context.

Implements CaloClusterProcessor.

Definition at line 31 of file CaloClusterLogPos.cxx.

33 {
34 
35  if ( msgSvc()->outputLevel(name()) <= MSG::DEBUG ) {
36 
37  msg(MSG::DEBUG) << " old cluster eta = " << theCluster->eta()
38  << " phi = " << theCluster->phi() << endmsg;
39 
40  // std::vector<double> theEtas;
41  // std::vector<double> thePhis;
42  // theCluster->getEtaInSamples(theEtas);
43  // theCluster->getPhiInSamples(thePhis);
44  // for(int i=0;i<CaloCell_ID::Unknown;i++) {
45  // report << MSG::DEBUG << " old sampling " << i << " eta = " << theEtas[i]
46  // << " phi = " << thePhis[i] << endmsg;
47  //}
48  }
49 
50  const double absEClus = fabs(theCluster->e());
51 
52  if ( absEClus > 0 ) {
53  const double inv_absEClus = 1. / absEClus;
54  std::vector<double> weightSample(CaloCell_ID::Unknown,0);
55  std::vector<double> etaSample(CaloCell_ID::Unknown,0);
56  std::vector<double> phiSample(CaloCell_ID::Unknown,0);
57 
58  double weightAll(0),etaAll(0),phiAll(0);
59 
60  xAOD::CaloCluster::cell_iterator itrCell = theCluster->cell_begin();
61  xAOD::CaloCluster::cell_iterator itrCellEnd = theCluster->cell_end();
62  for (;itrCell!=itrCellEnd; ++itrCell) {
63  const CaloCell* thisCell = *itrCell;
64  double weight = itrCell.weight();//theCluster->getCellWeight(itrCell);
65  // Identifier myId = thisCell->ID();
66  int theSample = thisCell->caloDDE()->getSampling();
67  double absE = fabs(weight*thisCell->e());
68 
69  if ( absE > 0 ) {
70  double lw = m_offset + log(absE*inv_absEClus);
71  if ( lw > 0 ) {
72 
73  ATH_MSG_VERBOSE(" add cell with eta "
74  << thisCell->eta() << " phi " << thisCell->phi()
75  << " energy " << thisCell->e() << " weight " << weight
76  << " sampling " << theSample << " cluster e "
77  << theCluster->e() << " log weight " << lw);
78 
79 
80  etaAll += thisCell->eta()*lw;
81 
82  // first cell decides the sign in order to avoid
83  // overlap problem at phi = -pi == +pi
84  // need to be normalized to the range [-pi,+pi] in the end
85 
86  if ( weightAll > 0
87  && phiAll/weightAll < CaloPhiRange::phi_min() + 90*deg
88  && thisCell->phi() > CaloPhiRange::phi_max() - 90*deg)
89  phiAll += (thisCell->phi()-360*deg)*lw;
90  else if ( weightAll > 0
91  && phiAll/weightAll > CaloPhiRange::phi_max() - 90*deg
92  && thisCell->phi() < CaloPhiRange::phi_min() + 90*deg)
93  phiAll += (thisCell->phi()+360*deg)*lw;
94  else
95  phiAll += thisCell->phi()*lw;
96 
97  weightAll += lw;
98 
99  etaSample[theSample] += thisCell->eta()*lw;
100  if ( weightSample[theSample] > 0
101  && phiSample[theSample]/weightSample[theSample]
102  < CaloPhiRange::phi_min() + 90*deg
103  && thisCell->phi() > CaloPhiRange::phi_max() - 90*deg)
104  phiSample[theSample] += (thisCell->phi()-360*deg)*lw;
105  else if ( weightSample[theSample] > 0
106  && phiSample[theSample]/weightSample[theSample]
107  > CaloPhiRange::phi_max() - 90*deg
108  && thisCell->phi() < CaloPhiRange::phi_min() + 90*deg)
109  phiSample[theSample] += (thisCell->phi()+360*deg)*lw;
110  else
111  phiSample[theSample] += thisCell->phi()*lw;
112  weightSample[theSample] += lw;
113 
114  }
115  }
116  }
117 
118  if ( weightAll > 0 ) {
119  const double inv_weightAll = 1. / weightAll;
120  theCluster->setEta(etaAll * inv_weightAll);
121  theCluster->setPhi(CaloPhiRange::fix(phiAll * inv_weightAll));
122  }
123 
124  // std::vector<double> theEtas(CaloCell_ID::Unknown,0);
125  // std::vector<double> thePhis(CaloCell_ID::Unknown,0);
126  // for (int i=0;i<CaloCell_ID::Unknown;i++) {
127  // if (theCluster->hasSampling(i)) {
128  // theEtas[i]=theCluster->etaSampl(i);
129  // thePhis[i]=theCluster->phiSampl(i);
130  // }
131 
132  for(int i=0;i<CaloCell_ID::Unknown;i++) {
134  if ( theCluster->hasSampling(s) && weightSample[i] > 0 ) {
135  float etaSample=theCluster->etaSample(s);
136  float phiSample=theCluster->phiSample(s);
137  etaSample /= weightSample[i];
138  phiSample /= weightSample[i];
139  phiSample = CaloPhiRange::fix(phiSample);
140  theCluster->setEta(s,etaSample);
141  theCluster->setPhi(s,phiSample);
142  }
143  }//end loop over samples
144  }
145 
146  if ( msgSvc()->outputLevel(name()) <= MSG::DEBUG ) {
147 
148  ATH_MSG_DEBUG(" new cluster eta = " << theCluster->eta()
149  << " phi = " << theCluster->phi());
150 
151  // std::vector<double> theEtas;
152  // std::vector<double> thePhis;
153 
154  // theCluster->getEtaInSamples(theEtas);
155  // theCluster->getPhiInSamples(thePhis);
156  // for(int i=0;i<CaloCell_ID::Unknown;i++) {
157  // msg(MSG::DEBUG) << " new sampling " << i << " eta = " << theEtas[i]
158  // << " phi = " << thePhis[i] << endmsg;
159  // }
160  }
161 
162  return StatusCode::SUCCESS;
163 }

◆ execute() [3/7]

StatusCode CaloClusterProcessor::execute

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters.

This will iterate over all the clusters in collection and call execute on each one individually.

Parameters
collectionThe container of clusters.
ctxThe event context.

This will iterate over all the clusters in collection and call execute on each one individually.

Definition at line 73 of file CaloClusterProcessor.cxx.

59 {
60  xAOD::CaloClusterContainer::iterator beg = collection->begin();
61  xAOD::CaloClusterContainer::iterator end = collection->end();
62  for (; beg != end; ++beg) {
63  CHECK( execute (ctx, *beg) );
64  }
65  return StatusCode::SUCCESS;
66 }

◆ execute() [4/7]

StatusCode CaloClusterProcessor::execute ( const EventContext &  ctx,
xAOD::CaloClusterContainer collection 
) const
virtualinherited

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters.

This will iterate over all the clusters in collection and call execute on each one individually.

Parameters
collectionThe container of clusters.
ctxThe event context.

This will iterate over all the clusters in collection and call execute on each one individually.

Implements CaloClusterCollectionProcessor.

Reimplemented in CaloClusterRemoveBad.

Definition at line 57 of file CaloClusterProcessor.cxx.

59 {
62  for (; beg != end; ++beg) {
63  CHECK( execute (ctx, *beg) );
64  }
65  return StatusCode::SUCCESS;
66 }

◆ execute() [5/7]

StatusCode CaloClusterProcessor::execute
final

Execute on a single cluster.

Parameters
clusterThe cluster to process. (deprecated)

Definition at line 63 of file CaloClusterProcessor.cxx.

44 {
45  return execute (Gaudi::Hive::currentContext(), cluster);
46 }

◆ execute() [6/7]

StatusCode CaloClusterProcessor::execute ( xAOD::CaloCluster cluster)
finalvirtualinherited

Execute on a single cluster.

Parameters
clusterThe cluster to process. (deprecated)

Definition at line 43 of file CaloClusterProcessor.cxx.

44 {
45  return execute (Gaudi::Hive::currentContext(), cluster);
46 }

◆ execute() [7/7]

virtual StatusCode CaloClusterCollectionProcessor::execute ( xAOD::CaloClusterContainer collection)
inlinefinalvirtualinherited

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. (deprecated)

Definition at line 49 of file CaloClusterCollectionProcessor.h.

50  {
51  return execute (Gaudi::Hive::currentContext(), collection);
52  }

◆ 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

◆ initialize()

StatusCode CaloClusterLogPos::initialize ( )
override

Definition at line 24 of file CaloClusterLogPos.cxx.

24  {
25 
26  ATH_MSG_DEBUG("Initializing " << name() << endmsg ) ;
27 
28  return StatusCode::SUCCESS;
29 }

◆ 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& CaloClusterProcessor::interfaceID ( )
inlinestaticinherited

Standard Gaudi interface ID method.

Definition at line 80 of file CaloClusterProcessor.h.

80 {return IID_CaloClusterProcessor;}

◆ 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_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_offset

double CaloClusterLogPos::m_offset
private

Definition at line 69 of file CaloClusterLogPos.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:
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
CaloCell::phi
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition: CaloCell.h:359
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
python.LumiCalcWorking.lw
lw
Definition: LumiCalcWorking.py:112
CaloClusterCollectionProcessor::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
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
deg
#define deg
Definition: SbPolyhedron.cxx:17
CaloCell::e
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition: CaloCell.h:317
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CaloPhiRange::phi_min
static double phi_min()
Definition: CaloPhiRange.h:49
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CaloClusterLogPos::execute
StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *theCluster) const override
Execute on a single cluster.
Definition: CaloClusterLogPos.cxx:31
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloPhiRange::phi_max
static double phi_max()
Definition: CaloPhiRange.h:52
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14
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
CaloClusterProcessor::CaloClusterProcessor
CaloClusterProcessor(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: CaloClusterProcessor.cxx:28
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.TrigPSCPythonDbSetup.outputLevel
outputLevel
Definition: TrigPSCPythonDbSetup.py:30
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CaloClusterLogPos::m_offset
double m_offset
Definition: CaloClusterLogPos.h:69
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CaloClusterProcessor::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const =0
Execute on a single cluster.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CaloCell::eta
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition: CaloCell.h:366
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528