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

#include <CaloCluster_OnTrackBuilder.h>

Inheritance diagram for CaloCluster_OnTrackBuilder:
Collaboration diagram for CaloCluster_OnTrackBuilder:

Public Member Functions

 CaloCluster_OnTrackBuilder (const std::string &, const std::string &, const IInterface *)
 Constructor with AlgTool parameters. More...
 
 CaloCluster_OnTrackBuilder ()
 
 ~CaloCluster_OnTrackBuilder ()=default
 
virtual StatusCode initialize () override final
 
virtual StatusCode finalize () override final
 
virtual std::unique_ptr< Trk::CaloCluster_OnTrackbuildClusterOnTrack (const EventContext &ctx, const xAOD::CaloCluster *cl, int charge=0) const override final
 
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 ()
 

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

std::unique_ptr< Trk::SurfacegetCaloSurface (const xAOD::CaloCluster *cluster, const CaloDetDescrManager *caloDDMgr) const
 
Trk::LocalParameters getClusterLocalParameters (const xAOD::CaloCluster *cluster, const Trk::Surface *surf, int charge) const
 
Amg::MatrixX getClusterErrorMatrix (const xAOD::CaloCluster *cluster, const Trk::Surface &surf, int charge) 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

ToolHandle< ICaloSurfaceBuilderm_calosurf
 Tool to build calorimeter layer surfaces. More...
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
 
Gaudi::Property< bool > m_useClusterEnergy { this, "UseClusterEnergy", true }
 Which cluster measurements to use in order to add constraints by default we are interested in the ones that affect the bending plane Energy and phi. More...
 
Gaudi::Property< bool > m_useClusterPhi { this, "UseClusterPhi", true }
 
Gaudi::Property< bool > m_useClusterEta { this, "UseClusterEta", false }
 
std::unique_ptr< eg_resolutionm_eg_resol {}
 helper for returning energy resolution 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 31 of file CaloCluster_OnTrackBuilder.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

◆ CaloCluster_OnTrackBuilder() [1/2]

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

Constructor with AlgTool parameters.

Definition at line 67 of file CaloCluster_OnTrackBuilder.cxx.

70  : AthAlgTool(t, n, p)
71 {
72  declareInterface<ICaloCluster_OnTrackBuilder>(this);
73 }

◆ CaloCluster_OnTrackBuilder() [2/2]

CaloCluster_OnTrackBuilder::CaloCluster_OnTrackBuilder ( )

◆ ~CaloCluster_OnTrackBuilder()

CaloCluster_OnTrackBuilder::~CaloCluster_OnTrackBuilder ( )
default

Member Function Documentation

◆ buildClusterOnTrack()

std::unique_ptr< Trk::CaloCluster_OnTrack > CaloCluster_OnTrackBuilder::buildClusterOnTrack ( const EventContext &  ctx,
const xAOD::CaloCluster cl,
int  charge = 0 
) const
finaloverridevirtual

Implements ICaloCluster_OnTrackBuilder.

Definition at line 91 of file CaloCluster_OnTrackBuilder.cxx.

95 {
96 
97  ATH_MSG_DEBUG("Building Trk::CaloCluster_OnTrack");
98 
100  ATH_MSG_WARNING("CaloCluster_OnTrackBuilder is configured incorrectly");
101  return nullptr;
102  }
103 
104  if (!cluster) {
105  return nullptr;
106  }
107 
109  const CaloDetDescrManager* caloDDMgr = *caloMgrHandle;
110  std::unique_ptr<Trk::Surface> surface = getCaloSurface(cluster, caloDDMgr);
111 
112  if (!surface) {
113  return nullptr;
114  }
115 
117  getClusterLocalParameters(cluster, surface.get(), charge);
118 
119  Amg::MatrixX em = getClusterErrorMatrix(cluster, *surface, charge);
120 
121  return std::make_unique<Trk::CaloCluster_OnTrack>(std::move(lp), std::move(em), *surface);
122 
123 }

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

◆ 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 CaloCluster_OnTrackBuilder::finalize ( )
finaloverridevirtual

Definition at line 85 of file CaloCluster_OnTrackBuilder.cxx.

86 {
87  return StatusCode::SUCCESS;
88 }

◆ getCaloSurface()

std::unique_ptr< Trk::Surface > CaloCluster_OnTrackBuilder::getCaloSurface ( const xAOD::CaloCluster cluster,
const CaloDetDescrManager caloDDMgr 
) const
private

Definition at line 126 of file CaloCluster_OnTrackBuilder.cxx.

129 {
130 
131  std::unique_ptr<Trk::Surface> destinationSurface = nullptr;
132 
133  // Determine if we want to extrapolate to the barrel or endcap. If in the
134  // crack choose the detector with largest amount of energy in the second
135  // sampling layer
136  if (xAOD::EgammaHelpers::isBarrel(cluster)) {
137  destinationSurface.reset(m_calosurf->CreateUserSurface(
138  CaloCell_ID::EMB2, 0., cluster->eta(), caloDDMgr));
139  } else {
140  destinationSurface.reset(m_calosurf->CreateUserSurface(
141  CaloCell_ID::EME2, 0., cluster->eta(), caloDDMgr));
142  }
143  return destinationSurface;
144 }

◆ getClusterErrorMatrix()

Amg::MatrixX CaloCluster_OnTrackBuilder::getClusterErrorMatrix ( const xAOD::CaloCluster cluster,
const Trk::Surface surf,
int  charge 
) const
private

Definition at line 206 of file CaloCluster_OnTrackBuilder.cxx.

210 {
211  int matrixSize = static_cast<int>(m_useClusterEta) +
212  static_cast<int>(m_useClusterPhi) +
213  static_cast<int>(m_useClusterEnergy);
214  Amg::MatrixX covMatrix(matrixSize, matrixSize);
215  covMatrix.setZero();
216 
217  const double clusterE = cluster->e();
218  const double clusterEta = cluster->eta();
219 
220  // variance in phi from calorimeter phi resolution
221  double phivariance = phiVariance(clusterE, std::abs(clusterEta));
222  if (phivariance < 1e-5) {
223  // Avoid going too small for very high E
224  phivariance = 1e-5;
225  }
226 
227  // q over p variance from sigmaE/E (calo energy resolution)
228  const double sigmaP_over_P = m_eg_resol->getResolution(0, // electron
229  clusterE,
230  clusterEta,
231  2 // 90% quantile
232  );
233  const double qOverP = 1. / clusterE;
234  const double qOverP_variance =
235  (qOverP * qOverP) * (sigmaP_over_P * sigmaP_over_P);
236 
237  // Variance in Z
238  // sigma ~ 20 mm large error
239  // As currently we do not want to rely
240  // on the eta side of the cluster.
241  constexpr double zvariance = 400;
242 
243  if (xAOD::EgammaHelpers::isBarrel(cluster)) {
244  // The two coordinates for a cyclinder are
245  // Trk::locRPhi = 0 (ie phi)
246  // Trk::locZ = 1(ie z)
247  const Amg::Vector3D& surfRefPoint = surf.globalReferencePoint();
248  double r = surfRefPoint.perp();
249  double r2 = r * r;
250  int indexCount(0);
251  if (m_useClusterPhi) {
252  covMatrix(indexCount, indexCount) = phivariance * r2;
253  ++indexCount;
254  }
255  if (m_useClusterEta) {
256  covMatrix(indexCount, indexCount) = zvariance;
257  ++indexCount;
258  }
259  if (m_useClusterEnergy) {
260  covMatrix(indexCount, indexCount) = qOverP_variance;
261  ++indexCount;
262  }
263  } else {
264  // Local paramters of a disk are
265  // Trk::locR = 0
266  // Trk::locPhi = 1
267  int indexCount(0);
268 
269  if (m_useClusterEta) {
270  covMatrix(indexCount, indexCount) = zvariance;
271  ++indexCount;
272  }
273  if (m_useClusterPhi) {
274  covMatrix(indexCount, indexCount) = phivariance;
275  ++indexCount;
276  }
277  if (m_useClusterEnergy) {
278  covMatrix(indexCount, indexCount) = qOverP_variance;
279  ++indexCount;
280  }
281  }
282 
283  return covMatrix;
284 }

◆ getClusterLocalParameters()

Trk::LocalParameters CaloCluster_OnTrackBuilder::getClusterLocalParameters ( const xAOD::CaloCluster cluster,
const Trk::Surface surf,
int  charge 
) const
private

Definition at line 147 of file CaloCluster_OnTrackBuilder.cxx.

151 {
152 
153  Amg::Vector3D surfRefPoint = surf->globalReferencePoint();
154  double eta = cluster->eta();
155  double phi = cluster->phi();
156  double clusterQoverE = cluster->e() != 0 ? (double)charge / cluster->e() : 0;
157 
158  if (xAOD::EgammaHelpers::isBarrel(cluster)) {
159  // Two corindate in a cyclinder are
160  // Trk::locRPhi = 0 (ie phi)
161  // Trk::locZ = 1(ie z)
162  double r = surfRefPoint.perp();
163  std::vector<Trk::DefinedParameter> defPar;
164  if (m_useClusterPhi) {
166  defPar.push_back(locRPhi);
167  }
168  if (m_useClusterEta) {
169  double theta = 2 * atan(exp(-eta)); // -log(tan(theta/2));
170  double tantheta = tan(theta);
171  double z = tantheta == 0 ? 0. : r / tantheta;
173  defPar.push_back(locZ);
174  }
175  if (m_useClusterEnergy) {
176  Trk::DefinedParameter qOverP(clusterQoverE, Trk::qOverP);
177  defPar.push_back(qOverP);
178  }
179  return {defPar};
180  }
181  // Local paramters of a disk are
182  // Trk::locR = 0
183  // Trk::locPhi = 1
184  double z = surfRefPoint.z();
185  std::vector<Trk::DefinedParameter> defPar;
186  if (m_useClusterEta) {
187  double theta = 2 * atan(exp(-eta)); // -log(tan(theta/2));
188  double tantheta = tan(theta);
189  double r = z * tantheta;
191  defPar.push_back(locR);
192  }
193  if (m_useClusterPhi) {
195  defPar.push_back(locPhi);
196  }
197  if (m_useClusterEnergy) {
198  Trk::DefinedParameter qOverP(clusterQoverE, Trk::qOverP);
199  defPar.push_back(qOverP);
200  }
201 
202  return {defPar};
203 }

◆ initialize()

StatusCode CaloCluster_OnTrackBuilder::initialize ( )
finaloverridevirtual

Definition at line 76 of file CaloCluster_OnTrackBuilder.cxx.

77 {
78  m_eg_resol = std::make_unique<eg_resolution>("run2_R21_v1");
79  ATH_CHECK(m_calosurf.retrieve());
81  return StatusCode::SUCCESS;
82 }

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

Definition at line 22 of file ICaloCluster_OnTrackBuilder.h.

23  {
24  return IID_caloCluster_OnTrackBuilder;
25  };

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

SG::ReadCondHandleKey<CaloDetDescrManager> CaloCluster_OnTrackBuilder::m_caloMgrKey
private
Initial value:
{
this,
"CaloDetDescrManager",
"CaloDetDescrManager"
}

Definition at line 75 of file CaloCluster_OnTrackBuilder.h.

◆ m_calosurf

ToolHandle<ICaloSurfaceBuilder> CaloCluster_OnTrackBuilder::m_calosurf
private
Initial value:
{
this,
"CaloSurfaceBuilder",
"CaloSurfaceBuilder",
"Tool to build calorimeter layer surfaces"
}

Tool to build calorimeter layer surfaces.

Definition at line 69 of file CaloCluster_OnTrackBuilder.h.

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

std::unique_ptr<eg_resolution> CaloCluster_OnTrackBuilder::m_eg_resol {}
private

helper for returning energy resolution

Definition at line 89 of file CaloCluster_OnTrackBuilder.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_useClusterEnergy

Gaudi::Property<bool> CaloCluster_OnTrackBuilder::m_useClusterEnergy { this, "UseClusterEnergy", true }
private

Which cluster measurements to use in order to add constraints by default we are interested in the ones that affect the bending plane Energy and phi.

Definition at line 84 of file CaloCluster_OnTrackBuilder.h.

◆ m_useClusterEta

Gaudi::Property<bool> CaloCluster_OnTrackBuilder::m_useClusterEta { this, "UseClusterEta", false }
private

Definition at line 86 of file CaloCluster_OnTrackBuilder.h.

◆ m_useClusterPhi

Gaudi::Property<bool> CaloCluster_OnTrackBuilder::m_useClusterPhi { this, "UseClusterPhi", true }
private

Definition at line 85 of file CaloCluster_OnTrackBuilder.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:
CaloCluster_OnTrackBuilder::getClusterLocalParameters
Trk::LocalParameters getClusterLocalParameters(const xAOD::CaloCluster *cluster, const Trk::Surface *surf, int charge) const
Definition: CaloCluster_OnTrackBuilder.cxx:147
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
CaloCluster_OnTrackBuilder::m_useClusterEta
Gaudi::Property< bool > m_useClusterEta
Definition: CaloCluster_OnTrackBuilder.h:86
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
Trk::LocalParameters
Definition: LocalParameters.h:98
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
Trk::locRPhi
@ locRPhi
Definition: ParamDefs.h:40
CaloCluster_OnTrackBuilder::getCaloSurface
std::unique_ptr< Trk::Surface > getCaloSurface(const xAOD::CaloCluster *cluster, const CaloDetDescrManager *caloDDMgr) const
Definition: CaloCluster_OnTrackBuilder.cxx:126
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
Trk::locR
@ locR
Definition: ParamDefs.h:44
Trk::Surface::globalReferencePoint
virtual const Amg::Vector3D & globalReferencePoint() const
Returns a global reference point on the surface, for PlaneSurface, StraightLineSurface,...
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
MCP::ScaleSmearParam::r2
@ r2
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
CaloCluster_OnTrackBuilder::m_eg_resol
std::unique_ptr< eg_resolution > m_eg_resol
helper for returning energy resolution
Definition: CaloCluster_OnTrackBuilder.h:89
CaloCluster_OnTrackBuilder::m_useClusterPhi
Gaudi::Property< bool > m_useClusterPhi
Definition: CaloCluster_OnTrackBuilder.h:85
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
CaloCluster_OnTrackBuilder::getClusterErrorMatrix
Amg::MatrixX getClusterErrorMatrix(const xAOD::CaloCluster *cluster, const Trk::Surface &surf, int charge) const
Definition: CaloCluster_OnTrackBuilder.cxx:206
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::EgammaHelpers::isBarrel
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
Definition: EgammaxAODHelpers.cxx:33
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
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
z
#define z
CaloCluster_OnTrackBuilder::m_calosurf
ToolHandle< ICaloSurfaceBuilder > m_calosurf
Tool to build calorimeter layer surfaces.
Definition: CaloCluster_OnTrackBuilder.h:69
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::covMatrix
covMatrix
Definition: TrackMeasurement_v1.cxx:19
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
CaloCluster_OnTrackBuilder::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: CaloCluster_OnTrackBuilder.h:75
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::locPhi
@ locPhi
local polar
Definition: ParamDefs.h:45
charge
double charge(const T &p)
Definition: AtlasPID.h:538
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
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
CaloCluster_OnTrackBuilder::m_useClusterEnergy
Gaudi::Property< bool > m_useClusterEnergy
Which cluster measurements to use in order to add constraints by default we are interested in the one...
Definition: CaloCluster_OnTrackBuilder.h:84
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
fitman.k
k
Definition: fitman.py:528