ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ITk::StripClusterOnTrackTool Class Referencefinal

creates SCT_ClusterOnTrack objects allowing to calibrate cluster position and error using a given track hypothesis. More...

#include <ITkStripClusterOnTrackTool.h>

Inheritance diagram for ITk::StripClusterOnTrackTool:
Collaboration diagram for ITk::StripClusterOnTrackTool:

Public Member Functions

 StripClusterOnTrackTool (const std::string &, const std::string &, const IInterface *)
 AlgTool constructor. More...
 
virtual ~StripClusterOnTrackTool ()=default
 
virtual StatusCode initialize () override
 AlgTool initialisation. More...
 
virtual InDet::SCT_ClusterOnTrackcorrect (const Trk::PrepRawData &, const Trk::TrackParameters &) const override
 produces an SCT_ClusterOnTrack for ITk strip clusters using the measured SCT_Cluster and the track prediction. 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 ()
 The AlgTool InterfaceID. 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

SG::ReadCondHandleKey< RIO_OnTrackErrorScalingm_stripErrorScalingKey {this,"ErrorScalingKey", "/Indet/TrkErrorScalingITkStrip", "Key for ITkStrip error scaling conditions data."}
 toolhandle for central error scaling More...
 
IntegerProperty m_option_errorStrategy {this, "ErrorStrategy", -1, "if ErrorStrategy < 0, keep previous errors else recompute"}
 
IntegerProperty m_option_correctionStrategy {this, "CorrectionStrategy", -1, "if CorrectionStrategy >= 0, apply correction to position"}
 
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

creates SCT_ClusterOnTrack objects allowing to calibrate cluster position and error using a given track hypothesis.

See doxygen of Trk::RIO_OnTrackCreator for details. Different strategies to calibrate the cluster error can be chosen by job Option. Also the handle to the general hit-error scaling is implemented.

Definition at line 34 of file ITkStripClusterOnTrackTool.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

◆ StripClusterOnTrackTool()

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

AlgTool constructor.

Definition at line 30 of file ITkStripClusterOnTrackTool.cxx.

31  :
32  AthAlgTool(t, n, p) {
33  declareInterface<IRIO_OnTrackCreator>(this);
34 }

◆ ~StripClusterOnTrackTool()

virtual ITk::StripClusterOnTrackTool::~StripClusterOnTrackTool ( )
virtualdefault

Member Function Documentation

◆ correct()

InDet::SCT_ClusterOnTrack * ITk::StripClusterOnTrackTool::correct ( const Trk::PrepRawData rio,
const Trk::TrackParameters trackPar 
) const
overridevirtual

produces an SCT_ClusterOnTrack for ITk strip clusters using the measured SCT_Cluster and the track prediction.

This method is a factory, so the client has to take care of management/deletion of the SCT_ClusterOnTrack.

Implements Trk::IRIO_OnTrackCreator.

Definition at line 82 of file ITkStripClusterOnTrackTool.cxx.

83  {
84  const InDet::SCT_Cluster *cluster = nullptr;
85 
86  if (!(cluster = dynamic_cast<const InDet::SCT_Cluster *> (&rio))) {
87  ATH_MSG_WARNING("Attempt to correct RIO which is not SCT_Cluster with ITk::StripClusterOnTrackTool: returning nullptr");
88  return nullptr;
89  }
90 
91  ATH_MSG_VERBOSE("STARTING CLUSTER ON TRACK CORRECTION... " << __func__ << " " << __LINE__);
92  ATH_MSG_VERBOSE(" DUMPING CLUSTER POSITION / COVARIANCE: ");
93  ATH_MSG_VERBOSE("STRIP CLUSTER POS --> " << cluster->localPosition()[0] << ", " << cluster->localPosition()[1]);
94  ATH_MSG_VERBOSE("STRIP CLUSTER COV --> " << cluster->localCovariance()(0, 0) << ", " << cluster->localCovariance()(0, 1));
95  ATH_MSG_VERBOSE("STRIP CLUSTER COV --> " << cluster->localCovariance()(1, 0) << ", " << cluster->localCovariance()(1, 1));
96  ATH_MSG_VERBOSE("STRIP CLUSTER GLOBAL POSITION = " << cluster->globalPosition().x() << ", " << cluster->globalPosition().y() << ", " << cluster->globalPosition().z());
97 
98  // Get pointer to detector element
99  //
100  const InDetDD::SiDetectorElement *detectorElement = cluster->detectorElement();
101  if (!detectorElement) {
102  return nullptr;
103  }
104 
105  // Get local position of track
106  //
107  Amg::Vector2D loct = trackPar.localPosition();
108  double sinAlpha = detectorElement->sinStereoLocal(cluster->localPosition());
109  double cosAlpha = std::sqrt(1 - sinAlpha * sinAlpha);
110  Amg::Vector3D localstripdir(-sinAlpha, cosAlpha, 0.);
111  ATH_MSG_VERBOSE("STRIP DIRECTION = " << localstripdir[0] << ", " << localstripdir[1]);
112  Amg::Vector3D globalstripdir = trackPar.associatedSurface().transform().linear() * localstripdir;
113 
114  // Evaluate distance between cluster and estimated track parameters
115  // used later on to estimate the corrected cluster position
116  double distance = (trackPar.position() - cluster->globalPosition()).mag();
117 
118  ATH_MSG_VERBOSE(" DUMPING TRACK PARAMETER POSITION / COVARIANCE: ");
119  ATH_MSG_VERBOSE("TRACK PAR LOCAL POS = " << loct[0] << ", " << loct[1]);
120  ATH_MSG_VERBOSE("TRACK PAR GLOBAL POSITION = " << trackPar.position().x() << ", " << trackPar.position().y() << ", " << trackPar.position().z());
121 
122  // phi pitch in radians, for endcap modules
123  double phiPitchInRad = 0.;
124 
125  // barrel or endcap treatment
126  if (detectorElement->isBarrel()) {
127  // barrel treatment:
128  // get the module half length from the associated surface bounds
129  const Trk::SurfaceBounds *bounds = &trackPar.associatedSurface().bounds();
130  double boundsy = (static_cast<const Trk::RectangleBounds *>(bounds))->halflengthY();
131  ATH_MSG_VERBOSE("BARREL ====>>>> DISTANCE*COSALPHA / HALF LENGTH --> " << distance*cosAlpha << " / " << boundsy);
132  // Check if distance between track parameter local position
133  // and cluster position is larger than surface bounds (including local stereo angle).
134  // If so, set distance to maximum (- tolerance)
135  if (distance*cosAlpha > boundsy){
136  ATH_MSG_VERBOSE("DISTANCE TO LARGE COMPARED TO BOUNDS, SETTING TO MAXIMUM");
137  distance = boundsy/cosAlpha - 1.; // use 1 mm as tolerance parameter
138  // if local position is negative, also the distance has to be negative
139  if (loct.y() < 0)
140  distance = -distance;
141  }
142  } else {
143  // endcap treatment:
144  // for annuli do something different, since we already have in-sensor
145  // stereo rotations which strip length accounts for
146  const InDetDD::StripStereoAnnulusDesign * design =
147  static_cast<const InDetDD::StripStereoAnnulusDesign *> (&detectorElement->design());
148  const InDetDD::SiCellId & siCellId = detectorElement->cellIdOfPosition(cluster->localPosition());
149  double striphalflength = design->stripLength(siCellId) / 2.0;
150  ATH_MSG_VERBOSE("ENDCAP ====>>>> DISTANCE / STRIP HALF LENGTH --> " << distance << " / " << striphalflength);
151  // caching phi pitch in radians
152  phiPitchInRad = design->phiWidth()/design->diodesInRow(0);
153  // Check if distance between track parameter local position
154  // and cluster position is larger than strip length.
155  // If so, set distance to maximum (- tolerance)
156  if (distance > striphalflength) {
157  ATH_MSG_VERBOSE("DISTANCE TO LARGE COMPARED TO BOUNDS, SETTING TO MAXIMUM");
158  distance = striphalflength - 1.; // use 1 mm as tolerance parameter
159  }
160  }
161 
162  Amg::MatrixX prevCov = cluster->localCovariance();
163  // Local position and error matrix production
164  //
165  constexpr double ONE_TWELFTH= 1.0/12.;
166  if (m_option_errorStrategy > -1) {
167  Amg::MatrixX mat(2, 2);
168  mat.setZero();
169  const InDet::SiWidth width = cluster->width();
170  switch (m_option_errorStrategy) {
171  case 0:
172  // apply width/sqrt(12) as errors
173  mat(0, 0) = std::pow(width.phiR(), 2) * ONE_TWELFTH;
174  mat(1, 1) = std::pow(width.z(), 2) * ONE_TWELFTH;
175  break;
176 
177  default:
178  // don't do anything....
179  break;
180  }
181 
182  ATH_MSG_VERBOSE("CLUSTER ON TRACK COVARIANCE = " << mat(0, 0) << ", " << mat(0, 1) );
183  ATH_MSG_VERBOSE(" " << mat(1, 0) << ", " << mat(1, 1) );
184 
185  // error matrix rotation for endcap clusters
186  if (not detectorElement->isBarrel()) {
187  // the cluster covariance is expressed in the module
188  // frame and needs to be rotated into the strip frame.
189  // This rotation is done using the jacobian:
190  //
191  // J = ( cos(alpha) sin(alpha)
192  // -sin(alpha) cos(alpha) )
193  //
194  // The rotated covariance becomes
195  // C = J C_{0} J^T
196  //
197  // where C_{0} is the cluster covariance,
198  // and alpha is the local stereo angle.
199  //
200  // C_{0} = ( var_{0}^2 0
201  // 0 var_{1}^2 )
202  //
203  // var_{0} also accounts for the pitch scaling.
204  //
205  double sinAlpha = detectorElement->sinStereoLocal(cluster->localPosition());
206  double sinAlpha2 = sinAlpha * sinAlpha;
207  double cosAlpha2 = (1. - sinAlpha) * (1. + sinAlpha);;
208  double weight = detectorElement->phiPitch(cluster->localPosition()) / detectorElement->phiPitch();
209  double v0 = mat(0, 0) * weight * weight;
210  double v1 = mat(1, 1);
211  mat(0, 0) = (cosAlpha2 * v0 + sinAlpha2 * v1);
212  mat(1, 0) = (sinAlpha * std::sqrt(cosAlpha2) * (v0 - v1));
213  mat(0, 1) = mat(1, 0);
214  mat(1, 1) = (sinAlpha2 * v0 + cosAlpha2 * v1);
215 
216  ATH_MSG_VERBOSE(" ROTATION OF ENDCAP STRIP CLUSTER COVARIANCE");
217  ATH_MSG_VERBOSE("sinAlpha / sinAlpha2 / cosAlpha2 / weight = " << sinAlpha << " / " << sinAlpha2 << " / " << cosAlpha2 << " / " << weight);
218  ATH_MSG_VERBOSE("v0 / v1 = " << v0 << " / " << v1);
219  ATH_MSG_VERBOSE("ROTATED CLUSTER COVARIANCE = " << mat(0, 0) << ", " << mat(0, 1) );
220  ATH_MSG_VERBOSE(" " << mat(1, 0) << ", " << mat(1, 1) );
221 
222  }
223  // updating covariance
224  prevCov = mat;
225  }
226 
227  Trk::LocalParameters localParameters;
228  Amg::MatrixX covariance(prevCov);
229  Amg::Vector3D globalPosition(cluster->globalPosition() + distance * globalstripdir);
230 
231  // construction of the local parameters to build cluster on track
232  if (detectorElement->isBarrel()) {
233  Trk::DefinedParameter lpos1dim(cluster->localPosition().x(), Trk::locX);
234  localParameters = Trk::LocalParameters(lpos1dim);
235  covariance = Amg::MatrixX(1, 1);
236  covariance(0, 0) = prevCov(0, 0);
237  // scaling errors if required
238  if (!m_stripErrorScalingKey.key().empty()) {
240  covariance = Trk::ErrorScalingCast<SCTRIO_OnTrackErrorScaling>(*error_scaling)
241  ->getScaledCovariance(std::move(covariance), false, 0.0);
242  }
243  } else {
244  localParameters = Trk::LocalParameters(cluster->localPosition());
245  // scaling errors if required
246  if (!m_stripErrorScalingKey.key().empty()) {
248  covariance = Trk::ErrorScalingCast<SCTRIO_OnTrackErrorScaling>(*error_scaling)
249  ->getScaledCovariance(std::move(covariance), true,
250  detectorElement->sinStereoLocal(cluster->localPosition()));
251  }
252 
253  // For endcap strip clusters, the error matrix needs to be scaled
254  // accordingly to the strip pitch (in mm) at the estimated track parameter.
255  // The scaling term is evaluated in the strip frame and
256  // transformed in the module frame.
257  double sinAlpha = detectorElement->sinStereoLocal(cluster->localPosition());
258  double sinAlpha2 = sinAlpha * sinAlpha;
259  double cosAlpha2 = (1. - sinAlpha) * (1. + sinAlpha);
260  double sinAlphaCosAlpha = sinAlpha * std::sqrt(cosAlpha2);
261  // Weight factor to express the strip pitch (in mm) from the module center to the
262  // estimated track parameter position.
263  double radiusAtLocPos = std::hypot(loct.x(), loct.y());
264  double phiPitchAtLocPos = phiPitchInRad*radiusAtLocPos;
265  double weight = phiPitchAtLocPos / detectorElement->phiPitch();
266  // Error matrix scaling term, this is expressend in the module frame.
267  // It is evaluated using the same jacobian used above.
268  double dV0 = (cosAlpha2 * covariance(0, 0) + sinAlpha2 * covariance(1, 1) +
269  2. * sinAlphaCosAlpha * covariance(1, 0)) * (weight * weight - 1.);
270 
271  // The final covariance matrix, which also accounts for the scaling:
272  // Scaling and rotation are done with the same transformation:
273  //
274  // C = J C_{0} J^T
275  //
276  // where C_{0} is also includes the scaling term dV0:
277  //
278  // C_{0} = ( var_{0}^2 + dV0 0
279  // 0 var_{1}^2 )
280  //
281  // The scaling terms are then added to the previously evaluated matrix:
282  covariance(0, 0) += (cosAlpha2 * dV0);
283  covariance(1, 0) += (sinAlphaCosAlpha * dV0);
284  covariance(0, 1) = covariance(1, 0);
285  covariance(1, 1) += (sinAlpha2 * dV0);
286 
287  ATH_MSG_VERBOSE(" SCALING OF ENDCAP STRIP CLUSTER COVARIANCE");
288  ATH_MSG_VERBOSE("sinAlpha / sinAlpha2 / cosAlpha2 / weight = " << sinAlpha << " / " << sinAlpha2 << " / " << cosAlpha2 << " / " << weight );
289  ATH_MSG_VERBOSE("dV0 = (" << cosAlpha2 * covariance(0, 0) << " + "
290  << sinAlpha2 * covariance(1, 1) << " + "
291  << 2. * sinAlphaCosAlpha * covariance(1, 0)
292  << " ) * " << (weight * weight - 1.) << " = "
293  << dV0);
294  ATH_MSG_VERBOSE("SCALED CLUSTER COVARIANCE = " << covariance(0, 0) << ", "
295  << covariance(0, 1));
296  ATH_MSG_VERBOSE(" " << covariance(1, 0) << ", " << covariance(1, 1) );
297  }
298  // final construction of clustr of track
299  bool isbroad = m_option_errorStrategy == 0;
300  return new InDet::SCT_ClusterOnTrack(cluster, std::move(localParameters), std::move(covariance),
301  detectorElement->identifyHash(), globalPosition, isbroad);
302 }

◆ 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

◆ initialize()

StatusCode ITk::StripClusterOnTrackTool::initialize ( )
overridevirtual

AlgTool initialisation.

Definition at line 41 of file ITkStripClusterOnTrackTool.cxx.

41  {
43 
44  ATH_MSG_DEBUG("Error strategy set to ");
45  switch (m_option_errorStrategy) {
46  case -1: ATH_MSG_DEBUG("keep the PRD errors");
47  break;
48 
49  case 0: ATH_MSG_DEBUG("apply width/sqrt(12) as errors");
50  break;
51 
52  default: ATH_MSG_ERROR(" -- NO, UNKNOWN. Pls check jobOptions!");
53  return StatusCode::FAILURE;
54  }
55  ATH_MSG_DEBUG(" will be applied during ITkStripClusterOnTrack making");
56 
57  ATH_MSG_DEBUG("Position correction strategy set to ");
59  case -1: ATH_MSG_DEBUG("keep the global position as evaluated");
60  break;
61 
62  default: ATH_MSG_ERROR(" -- NO, UNKNOWN. Pls check jobOptions!");
63  return StatusCode::FAILURE;
64  }
65  ATH_MSG_DEBUG(" will be applied during ITkStripClusterOnTrack making");
66 
67 
68  // get the error scaling tool
69  if (!m_stripErrorScalingKey.key().empty()) {
71  ATH_MSG_DEBUG("Detected need for scaling ITkStrip errors.");
72  }
73 
74  return sc;
75 }

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

The AlgTool InterfaceID.

Definition at line 41 of file IRIO_OnTrackCreator.h.

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

IntegerProperty ITk::StripClusterOnTrackTool::m_option_correctionStrategy {this, "CorrectionStrategy", -1, "if CorrectionStrategy >= 0, apply correction to position"}
private

Definition at line 68 of file ITkStripClusterOnTrackTool.h.

◆ m_option_errorStrategy

IntegerProperty ITk::StripClusterOnTrackTool::m_option_errorStrategy {this, "ErrorStrategy", -1, "if ErrorStrategy < 0, keep previous errors else recompute"}
private

Definition at line 67 of file ITkStripClusterOnTrackTool.h.

◆ m_stripErrorScalingKey

SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> ITk::StripClusterOnTrackTool::m_stripErrorScalingKey {this,"ErrorScalingKey", "/Indet/TrkErrorScalingITkStrip", "Key for ITkStrip error scaling conditions data."}
private

toolhandle for central error scaling

Definition at line 65 of file ITkStripClusterOnTrackTool.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:
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::RectangleBounds
Definition: RectangleBounds.h:38
InDetDD::SolidStateDetectorElementBase::cellIdOfPosition
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
Definition: SolidStateDetectorElementBase.cxx:224
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::locX
@ locX
Definition: ParamDefs.h:43
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
initialize
void initialize()
Definition: run_EoverP.cxx:894
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
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
InDetDD::StripStereoAnnulusDesign::phiWidth
double phiWidth() const
Definition: StripStereoAnnulusDesign.h:331
ITk::StripClusterOnTrackTool::m_option_errorStrategy
IntegerProperty m_option_errorStrategy
Definition: ITkStripClusterOnTrackTool.h:67
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
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
InDetDD::StripStereoAnnulusDesign::diodesInRow
virtual int diodesInRow(const int row) const override
Definition: StripStereoAnnulusDesign.h:251
InDetDD::SiDetectorElement::phiPitch
double phiPitch() const
Pitch (inline methods)
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
parseMapping.v0
def v0
Definition: parseMapping.py:149
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ITk::StripClusterOnTrackTool::m_stripErrorScalingKey
SG::ReadCondHandleKey< RIO_OnTrackErrorScaling > m_stripErrorScalingKey
toolhandle for central error scaling
Definition: ITkStripClusterOnTrackTool.h:66
InDetDD::StripStereoAnnulusDesign
Definition: StripStereoAnnulusDesign.h:50
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
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
InDet::SiCluster::detectorElement
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
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
Trk::ParametersCommon::localPosition
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::SiCellId
Definition: SiCellId.h:29
InDet::SiCluster::globalPosition
const Amg::Vector3D & globalPosition() const
return global position reference
InDet::SiCluster::width
const InDet::SiWidth & width() const
return width class reference
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDetDD::SiDetectorElement::sinStereoLocal
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
Definition: SiDetectorElement.cxx:288
InDet::SiWidth
Definition: SiWidth.h:25
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
ActsTrk::ONE_TWELFTH
constexpr double ONE_TWELFTH
Definition: StripClusteringTool.cxx:17
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ITk::StripClusterOnTrackTool::m_option_correctionStrategy
IntegerProperty m_option_correctionStrategy
Definition: ITkStripClusterOnTrackTool.h:68
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:25
fitman.k
k
Definition: fitman.py:528
InDet::SCT_ClusterOnTrack
Definition: SCT_ClusterOnTrack.h:44
InDetDD::StripStereoAnnulusDesign::stripLength
double stripLength(const SiCellId &cellId) const
Definition: StripStereoAnnulusDesign.cxx:618