ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Trk::TrackToVertexIPEstimator Class Reference

A class estimating the transverse impact parameter d0 and its error of a given track wrt to the reconstructed vertex. More...

#include <TrackToVertexIPEstimator.h>

Inheritance diagram for Trk::TrackToVertexIPEstimator:
Collaboration diagram for Trk::TrackToVertexIPEstimator:

Public Member Functions

virtual StatusCode initialize () override
 Default Athena interface methods. More...
 
 TrackToVertexIPEstimator (const std::string &t, const std::string &n, const IInterface *p)
 Default Athena interface constructor and destructor. More...
 
 ~TrackToVertexIPEstimator ()
 
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doRemoval) const override
 Estimate methods returning a d0 and its calculated sigma. More...
 
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const TrackParameters *track, const xAOD::Vertex *vtx, bool doRemoval) const override
 
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const xAOD::TrackParticle *track, const xAOD::TrackParticle *newtrack, const xAOD::Vertex *vtx, bool doRemoval) const override
 
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const TrackParameters *track, const TrackParameters *newtrack, const xAOD::Vertex *vtx, bool doRemoval) const override
 
virtual xAOD::VertexgetUnbiasedVertex (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override
 
virtual xAOD::VertexgetUnbiasedVertex (const TrackParameters *track, const xAOD::Vertex *vtx) const override
 
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override
 
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const TrackParameters *track, const xAOD::Vertex *vtx) const override
 
virtual double get3DLifetimeSignOfTrack (const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
 
virtual double get3DLifetimeSignOfTrack (const TrackParameters &track, const CLHEP::Hep3Vector &jetDirection, const xAOD::Vertex &primaryVertex) const override
 
virtual double get2DLifetimeSignOfTrack (const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
 
virtual double get2DLifetimeSignOfTrack (const TrackParameters &track, const CLHEP::Hep3Vector &jetDirection, const xAOD::Vertex &primaryVertex) const override
 
virtual double getZLifetimeSignOfTrack (const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
 
virtual double getZLifetimeSignOfTrack (const TrackParameters &track, const CLHEP::Hep3Vector &jetDirection, const xAOD::Vertex &primaryVertex) const override
 

Private Member Functions

std::unique_ptr< ImpactParametersAndSigmacalculate (const TrackParameters *track, const xAOD::Vertex &vtx) const
 A method calculating the do and its error. More...
 

Private Attributes

ToolHandle< Trk::IExtrapolatorm_extrapolator
 
ToolHandle< Trk::IVertexUpdatorm_Updator
 
ToolHandle< Trk::IVertexLinearizedTrackFactorym_linFactory
 

Detailed Description

A class estimating the transverse impact parameter d0 and its error of a given track wrt to the reconstructed vertex.

Algorithm:

(a) Provided track or track particle are checked, whether they do already belong to the vertex. (b) In the positive case, the vertex is reduced by removing the track or track particle in question. (c) The trajectory state is extrapolated to the perigee with the vertex in question, the d0 and its error is estimated. The error on the vertex position is included in this calculation.

Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h February 2008


Changes:

Giaci.nosp@m.nto..nosp@m.Piacq.nosp@m.uadi.nosp@m.o@phy.nosp@m.sik..nosp@m.uni-f.nosp@m.reib.nosp@m.urg.d.nosp@m.e (update of 11.September 2008)

In addition the tool is now able to provide the impact parameter z0 and its error.

At the same time an option can be passed not to remove the track from the vertex (non-default)

In addition, the lifetime sign of the Impact Parameter given a lifetime direction of flight is also provided with 3 methods: 2D, Z and full 3D.


Johanna Fleckner (03.12.2009) allow for estimation of IP parameter even if vertex doesn't contain any tracks as can happen in BeamSpot or early running when PV is not reconstructed degrade some INFO/WARNINGS to DEBUG


David Shope david.nosp@m..ric.nosp@m.hard..nosp@m.shop.nosp@m.e@cer.nosp@m.n.ch (2016-04-19) EDM Migration to xAOD - Remove methods involving Trk::VxCandidate and Trk::RecVertex

Definition at line 71 of file TrackToVertexIPEstimator.h.

Constructor & Destructor Documentation

◆ TrackToVertexIPEstimator()

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

Default Athena interface constructor and destructor.

Definition at line 19 of file TrackToVertexIPEstimator.cxx.

19  :
20  base_class(t,n,p)
21  {
22  }

◆ ~TrackToVertexIPEstimator()

Trk::TrackToVertexIPEstimator::~TrackToVertexIPEstimator ( )
default

Member Function Documentation

◆ calculate()

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::calculate ( const TrackParameters track,
const xAOD::Vertex vtx 
) const
private

A method calculating the do and its error.

At this stage the trajectory is removed from the vertex.

Definition at line 121 of file TrackToVertexIPEstimator.cxx.

122  {
123  //estimating the d0 and its significance by propagating the trajectory state towards
124  //the vertex position. By this time the vertex should NOT contain this trajectory anymore
125 
126  //estrapolating to the perigee of the reconstructed vertex
127  const Amg::Vector3D & lp = vtx.position();
128  PerigeeSurface perigeeSurface(lp);
129  const Trk::Perigee* extrapolatedParameters =
130  dynamic_cast<const Trk::Perigee*>(
132  ->extrapolate(Gaudi::Hive::currentContext(), *track, perigeeSurface)
133  .release());
134  if (extrapolatedParameters && extrapolatedParameters->covariance()) {
135 
136  //actual calculation of d0 and sigma.
137  const AmgVector(5) & par = extrapolatedParameters->parameters();
138  const double d0 = par[Trk::d0];
139  const double z0 = par[Trk::z0];
140  const double phi = par[Trk::phi];
141  const double theta = par[Trk::theta];
142 
143  AmgSymMatrix(2) vrtXYCov = vtx.covariancePosition().block<2,2>(0,0);
144 
145  const AmgSymMatrix(5) & perigeeCov = *(extrapolatedParameters->covariance());
146  // std::cout<<"Perigee covariance: "<<perigeeCov<<std::endl;
147 
148  //d0phi->cartesian Jacobian
149  Amg::Vector2D d0JacXY(-sin(phi), cos(phi));
150 
151 
152  auto newIPandSigma=std::make_unique<ImpactParametersAndSigma>();
153  newIPandSigma->IPd0=d0;
154  double d0_PVcontrib=d0JacXY.transpose()*(vrtXYCov*d0JacXY);
155  if (d0_PVcontrib>=0)
156  {
157  newIPandSigma->sigmad0=sqrt(d0_PVcontrib+perigeeCov(Trk::d0,Trk::d0));
158  newIPandSigma->PVsigmad0=sqrt(d0_PVcontrib);
159  }
160  else
161  {
162  msg(MSG::WARNING) << " The contribution to d0_err: " << d0_PVcontrib << " from PV is negative: critical error in PV error matrix! Removing contribution from PV ... " << endmsg;
163  newIPandSigma->sigmad0=sqrt(perigeeCov(Trk::d0,Trk::d0));
164  newIPandSigma->PVsigmad0=0;
165  }
166 
167  AmgSymMatrix(2) covPerigeeZ0Theta;
168  covPerigeeZ0Theta(0,0)=perigeeCov(Trk::z0,Trk::z0);
169  covPerigeeZ0Theta(0,1)=perigeeCov(Trk::z0,Trk::theta);
170  covPerigeeZ0Theta(1,0)=perigeeCov(Trk::theta,Trk::z0);
171  covPerigeeZ0Theta(1,1)=perigeeCov(Trk::theta,Trk::theta);
172 
173  double vrtZZCov = vtx.covariancePosition()(Trk::z,Trk::z);
174 
175  Amg::Vector2D IPz0JacZ0Theta (sin(theta), z0*cos(theta));
176  if (vrtZZCov>=0)
177  {
178  newIPandSigma->IPz0SinTheta=z0*sin(theta);
179  newIPandSigma->sigmaz0SinTheta=
180  sqrt(IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta)+sin(theta)*vrtZZCov*sin(theta));
181  newIPandSigma->PVsigmaz0SinTheta=sqrt(sin(theta)*vrtZZCov*sin(theta));
182  newIPandSigma->IPz0 = z0;
183  newIPandSigma->sigmaz0 = std::sqrt( vrtZZCov + perigeeCov(Trk::z0,Trk::z0) );
184  newIPandSigma->PVsigmaz0 = std::sqrt( vrtZZCov );
185  }
186  else
187  {
188  ATH_MSG_WARNING(" The contribution to z0_err: " << vrtZZCov << " from PV is negative: critical error in PV error matrix! Removing contribution from PV ... ");
189  newIPandSigma->IPz0SinTheta=z0*sin(theta);
190  double temp = (IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta));
191  newIPandSigma->sigmaz0SinTheta=sqrt(temp);
192  newIPandSigma->PVsigmaz0SinTheta=0;
193 
194  newIPandSigma->IPz0 = z0;
195  newIPandSigma->sigmaz0 = std::sqrt( perigeeCov(Trk::z0,Trk::z0) );
196  newIPandSigma->PVsigmaz0 = 0;
197  }
198 
199 
200  delete extrapolatedParameters;
201  return newIPandSigma;
202  }
203  ATH_MSG_DEBUG ("Cannot extrapolate the trajectory state. Returning null. ");
204  return nullptr;
205  //end of successfull extrapolation check
206  }//end of actual calculation method

◆ estimate() [1/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const TrackParameters track,
const TrackParameters newtrack,
const xAOD::Vertex vtx,
bool  doRemoval 
) const
overridevirtual

Definition at line 89 of file TrackToVertexIPEstimator.cxx.

90  {
91 
92  if (vtx==nullptr)
93  {
94  ATH_MSG_WARNING("Vertex is zero pointer. Will not estimate IP of track.");
95  return nullptr;
96  }
97 
98  const xAOD::Vertex *newVertex = vtx;
99  if (doRemoval)
100  {
101  newVertex = getUnbiasedVertex(track,vtx);
102  if (newVertex == nullptr) {
103  ATH_MSG_WARNING("Unbiasing of vertex failed. Will not estimate IP of track.");
104  return nullptr;
105  }
106  }
107 
108  std::unique_ptr<ImpactParametersAndSigma> IPandSigma=calculate(newtrack,*newVertex);
109 
110  if (doRemoval)
111  {
112  delete newVertex;
113  newVertex=nullptr;
114  }
115 
116  return IPandSigma;
117 
118  }//end of parameterBase estimate method

◆ estimate() [2/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const TrackParameters track,
const xAOD::Vertex vtx 
) const
overridevirtual

Definition at line 419 of file TrackToVertexIPEstimator.cxx.

421  {
422 
423  if(track && vtx ){
424  return calculate( track , *vtx);
425  }
426  return nullptr;
427 
428  }

◆ estimate() [3/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const TrackParameters track,
const xAOD::Vertex vtx,
bool  doRemoval 
) const
overridevirtual

Definition at line 78 of file TrackToVertexIPEstimator.cxx.

79  {
80  if(track && vtx){
81  return estimate(track,track,vtx,doRemoval);
82  }
83  ATH_MSG_INFO( "Empty TrackParticle or Vertex pointer passed. Returning zero " );
84  return nullptr;
85  //end of track particle validity check
86 
87  }//end of parameterBase estimate method

◆ estimate() [4/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const xAOD::TrackParticle track,
const xAOD::TrackParticle newtrack,
const xAOD::Vertex vtx,
bool  doRemoval 
) const
overridevirtual

Definition at line 64 of file TrackToVertexIPEstimator.cxx.

65  {
66  if(track && vtx)
67  {
68  return estimate(&(track->perigeeParameters()),&(newtrack->perigeeParameters()),vtx,doRemoval);
69  }
70  ATH_MSG_INFO( "Empty TrackParticle or Vertex pointer passed. Returning zero " );
71  return nullptr;
72  //end of track particle validity check
73  }//end of method using track particles

◆ estimate() [5/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const xAOD::TrackParticle track,
const xAOD::Vertex vtx 
) const
overridevirtual

Definition at line 408 of file TrackToVertexIPEstimator.cxx.

410  {
411 
412  if(track && vtx ){
413  return estimate( &(track->perigeeParameters()), vtx);
414  }
415  return nullptr;
416 
417  }

◆ estimate() [6/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const xAOD::TrackParticle track,
const xAOD::Vertex vtx,
bool  doRemoval 
) const
overridevirtual

Estimate methods returning a d0 and its calculated sigma.

All methods do check whether a track is actually fitted to a vertex

Definition at line 53 of file TrackToVertexIPEstimator.cxx.

54  {
55  if(track && vtx)
56  {
57  return estimate(&(track->perigeeParameters()),&(track->perigeeParameters()),vtx,doRemoval);
58  }
59  ATH_MSG_INFO( "Empty TrackParticle or Vertex pointer passed. Returning zero " );
60  return nullptr;
61  //end of track particle validity check
62  }//end of method using track particles

◆ get2DLifetimeSignOfTrack() [1/2]

double Trk::TrackToVertexIPEstimator::get2DLifetimeSignOfTrack ( const TrackParameters track,
const Amg::Vector3D jetDirection,
const xAOD::Vertex primaryVertex 
) const
overridevirtual

Definition at line 253 of file TrackToVertexIPEstimator.cxx.

256  {
257  const Amg::Vector3D & lp = primaryVertex.position();
258  PerigeeSurface perigeeSurface(lp);
259 
260  std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
261  m_extrapolator->extrapolate(
262  Gaudi::Hive::currentContext(), track, perigeeSurface);
263 
264  if (!extrapolatedParameters) return 0.;
265 
266  double trackD0 = extrapolatedParameters->parameters()[Trk::d0];
267  double trackPhi = extrapolatedParameters->parameters()[Trk::phi];
268  double vs = sinf( atan2(jetMomentum.y(),jetMomentum.x()) - trackPhi )*trackD0;
269 
270  return (vs>=0. ? 1. : -1.);
271  }

◆ get2DLifetimeSignOfTrack() [2/2]

double Trk::TrackToVertexIPEstimator::get2DLifetimeSignOfTrack ( const TrackParameters track,
const CLHEP::Hep3Vector &  jetDirection,
const xAOD::Vertex primaryVertex 
) const
overridevirtual

Definition at line 245 of file TrackToVertexIPEstimator.cxx.

248  {
249  Amg::Vector3D eigenJetMomentum(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
250  return get2DLifetimeSignOfTrack(track, eigenJetMomentum, primaryVertex);
251  }

◆ get3DLifetimeSignOfTrack() [1/2]

double Trk::TrackToVertexIPEstimator::get3DLifetimeSignOfTrack ( const TrackParameters track,
const Amg::Vector3D jetDirection,
const xAOD::Vertex primaryVertex 
) const
overridevirtual

Definition at line 221 of file TrackToVertexIPEstimator.cxx.

224  {
225  const Amg::Vector3D & lp = primaryVertex.position();
226  PerigeeSurface perigeeSurface(lp);
227 
228  std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
229  m_extrapolator->extrapolate(
230  Gaudi::Hive::currentContext(), track, perigeeSurface);
231 
232  if (!extrapolatedParameters) return 0.;
233 
234  const Amg::Vector3D & primaryPos=primaryVertex.position();
235  const Amg::Vector3D & trackPos=extrapolatedParameters->position();
236  const Amg::Vector3D & trackMom=extrapolatedParameters->momentum();
237 
238  double sign=(jetMomentum.cross(trackMom)).dot(trackMom.cross(primaryPos-trackPos));
239 
240  return sign>=0.?1.:-1;
241  }

◆ get3DLifetimeSignOfTrack() [2/2]

double Trk::TrackToVertexIPEstimator::get3DLifetimeSignOfTrack ( const TrackParameters track,
const CLHEP::Hep3Vector &  jetDirection,
const xAOD::Vertex primaryVertex 
) const
overridevirtual

Definition at line 213 of file TrackToVertexIPEstimator.cxx.

216  {
217  Amg::Vector3D eigenJetMomentum(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
218  return get3DLifetimeSignOfTrack(track, eigenJetMomentum, primaryVertex);
219  }

◆ getUnbiasedVertex() [1/2]

xAOD::Vertex * Trk::TrackToVertexIPEstimator::getUnbiasedVertex ( const TrackParameters track,
const xAOD::Vertex vtx 
) const
overridevirtual

Definition at line 320 of file TrackToVertexIPEstimator.cxx.

321  {
322  if (!track) {
323  msg(MSG::INFO) << "Empty Trk::TrackParameter pointer passed. Returning zero " << endmsg;
324  return nullptr;
325  }
326  if (!vtx) {
327  msg(MSG::INFO) << "Empty xAOD::Vertex pointer passed. Returning zero " << endmsg;
328  return nullptr;
329  }
330 
331  if (vtx->nTrackParticles() == 0)
332  {
333  ATH_MSG_DEBUG("This vertex has no associated tracks. Normal if beam spot is used. Vertex already unbiased");
334  return new xAOD::Vertex(*vtx);
335  }
336 
337  //create new vertex for output
338  xAOD::Vertex *outputVertex = new xAOD::Vertex(*vtx);
339  outputVertex->clearTracks(); //remove all tracks -> will add them back one by one
340  if (outputVertex->vxTrackAtVertexAvailable()) outputVertex->vxTrackAtVertex().clear(); //remove all VxTrackAtVertex
341 
342  bool tmpLinTrack = false; //do we created a new linearised track?
343 
344  //loop over tracks
345  const Amg::Vector3D & pos = track->position();
346  const Amg::Vector3D & mom = track->momentum();
347  for (unsigned int itrk=0; itrk < vtx->nTrackParticles(); ++itrk) {
348  const Perigee& testTP = vtx->trackParticle(itrk)->perigeeParameters();
349  if ((testTP.position() == pos) and (testTP.momentum() == mom)) {
350  //track found, now unbias the vertex using linearized track
351  const LinearizedTrack *linTrack = nullptr;
352  double trackWeight(0.0);
353  //first check if a VxTrackAtVertex is already available with linearized track
354  if (vtx->vxTrackAtVertexAvailable()) {
355  if (vtx->vxTrackAtVertex().size() > itrk) {
356  linTrack = vtx->vxTrackAtVertex()[itrk].linState();
357  trackWeight = vtx->vxTrackAtVertex()[itrk].weight();
358  }
359  }
360  //if linearized track is not available, create it
361  if (!linTrack) {
362  linTrack = m_linFactory->linearizedTrack(track, vtx->position());
363  trackWeight = vtx->trackWeight(itrk);
364  if (!linTrack) {
365  ATH_MSG_INFO("Failing to linearized track. Returning biased vertex.");
366  outputVertex->addTrackAtVertex(vtx->trackParticleLinks()[itrk], vtx->trackWeight(itrk));
367  if (vtx->vxTrackAtVertexAvailable()) {
368  outputVertex->vxTrackAtVertex().push_back(vtx->vxTrackAtVertex()[itrk]);//will clone everything inside -> output vertex owns all the memory
369  }
370  continue;
371  }
372  tmpLinTrack = true;
373  }
374  //now update vertex position removing the linearized track, and do not add the track back to the output vertex
375  const IVertexUpdator::positionUpdateOutcome & reducedVertex = m_Updator->positionUpdate(*vtx, linTrack, trackWeight,IVertexUpdator::removeTrack);
376 
377  //calculate updated chi2
378  double chi2 = vtx->chiSquared();
379  double trk_chi = m_Updator->trackParametersChi2( reducedVertex, linTrack );
380  chi2 += -1 * (m_Updator->vertexPositionChi2(*vtx, reducedVertex) + trackWeight * trk_chi);
381 
382  //calculate updated ndf
383  double ndf = vtx->numberDoF();
384  ndf += -1 * trackWeight * (2.0);
385 
386  //reducedVertex has the updated position and covariance
387  outputVertex->setPosition(reducedVertex.position);
388  outputVertex->setCovariancePosition(reducedVertex.covariancePosition);
389 
390  //chi2 and ndf now store the updated FitQuality
391  outputVertex->setFitQuality( chi2, ndf );
392 
393  if (tmpLinTrack) delete linTrack; //only delete if it was created new, and doesn't belong to a vertex
394  } else {
395  //track not to be removed. Add back the track to the vertex collection
396  outputVertex->addTrackAtVertex(vtx->trackParticleLinks()[itrk], vtx->trackWeight(itrk));
397  if (vtx->vxTrackAtVertexAvailable()) {
398  outputVertex->vxTrackAtVertex().push_back(vtx->vxTrackAtVertex()[itrk]);//will clone everything inside -> output vertex owns all the memory
399  }
400  }
401  }
402  return outputVertex;
403 
404  }

◆ getUnbiasedVertex() [2/2]

xAOD::Vertex * Trk::TrackToVertexIPEstimator::getUnbiasedVertex ( const xAOD::TrackParticle track,
const xAOD::Vertex vtx 
) const
overridevirtual

Definition at line 309 of file TrackToVertexIPEstimator.cxx.

310  {
311  if(track)
312  {
313  return getUnbiasedVertex(&(track->perigeeParameters()),vtx);
314  }
315  msg(MSG::INFO) << "Empty xAOD::TrackParticle pointer passed. Returning zero " << endmsg;
316  return nullptr;
317  //end of track particle validity check
318  }

◆ getZLifetimeSignOfTrack() [1/2]

double Trk::TrackToVertexIPEstimator::getZLifetimeSignOfTrack ( const TrackParameters track,
const Amg::Vector3D jetDirection,
const xAOD::Vertex primaryVertex 
) const
overridevirtual

Definition at line 284 of file TrackToVertexIPEstimator.cxx.

287  {
288 
289  const Amg::Vector3D & lp = primaryVertex.position();
290  PerigeeSurface perigeeSurface(lp);
291 
292  std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
293  m_extrapolator->extrapolate(
294  Gaudi::Hive::currentContext(), track, perigeeSurface);
295 
296  if (!extrapolatedParameters) return 0.;
297 
298  double trackTheta = extrapolatedParameters->parameters()[Trk::theta];
299  double trackZ0 = extrapolatedParameters->parameters()[Trk::z0];
300  double trackEta = -logf(tanf(trackTheta/2.));
301  double jetEta = jetMomentum.eta();
302  double zs = (jetEta - trackEta)*trackZ0;
303  return (zs>=0. ? 1. : -1.);
304  }

◆ getZLifetimeSignOfTrack() [2/2]

double Trk::TrackToVertexIPEstimator::getZLifetimeSignOfTrack ( const TrackParameters track,
const CLHEP::Hep3Vector &  jetDirection,
const xAOD::Vertex primaryVertex 
) const
overridevirtual

Definition at line 276 of file TrackToVertexIPEstimator.cxx.

279  {
280  Amg::Vector3D eigenJetMomentum(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
281  return getZLifetimeSignOfTrack(track, eigenJetMomentum, primaryVertex);
282  }

◆ initialize()

StatusCode Trk::TrackToVertexIPEstimator::initialize ( )
overridevirtual

Default Athena interface methods.

Definition at line 26 of file TrackToVertexIPEstimator.cxx.

27  {
28 
29  // uploading the corresponding tools
30  // extrapolator
31  if (m_extrapolator.retrieve().isFailure()) {
32  ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
33  return StatusCode::FAILURE;
34  }
35 
36  // updator
37  if (m_Updator.retrieve().isFailure()) {
38  ATH_MSG_FATAL("Failed to retrieve tool " << m_Updator);
39  return StatusCode::FAILURE;
40  }
41 
42  // linearized track factory
43  if ( m_linFactory.retrieve().isFailure() )
44  {
45  ATH_MSG_FATAL("Failed to retrieve tool " << m_linFactory );
46  return StatusCode::FAILURE;
47  }
48 
49  return StatusCode::SUCCESS;
50  }//end of initialize method

Member Data Documentation

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> Trk::TrackToVertexIPEstimator::m_extrapolator
private
Initial value:
{this, "Extrapolator",
"Trk::Extrapolator"}

Definition at line 148 of file TrackToVertexIPEstimator.h.

◆ m_linFactory

ToolHandle<Trk::IVertexLinearizedTrackFactory> Trk::TrackToVertexIPEstimator::m_linFactory
private
Initial value:
{
this, "LinearizedTrackFactory", "Trk::FullLinearizedTrackFactory"}

Definition at line 152 of file TrackToVertexIPEstimator.h.

◆ m_Updator

ToolHandle<Trk::IVertexUpdator> Trk::TrackToVertexIPEstimator::m_Updator
private
Initial value:
{this, "VertexUpdator",
"Trk::KalmanVertexUpdator"}

Definition at line 150 of file TrackToVertexIPEstimator.h.


The documentation for this class was generated from the following files:
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
xAOD::Vertex_v1::setFitQuality
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
Definition: Vertex_v1.cxx:150
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
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::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
Trk::z0
@ z0
Definition: ParamDefs.h:64
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
Trk::TrackToVertexIPEstimator::calculate
std::unique_ptr< ImpactParametersAndSigma > calculate(const TrackParameters *track, const xAOD::Vertex &vtx) const
A method calculating the do and its error.
Definition: TrackToVertexIPEstimator.cxx:121
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::Perigee
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:33
Trk::TrackToVertexIPEstimator::getUnbiasedVertex
virtual xAOD::Vertex * getUnbiasedVertex(const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override
Definition: TrackToVertexIPEstimator.cxx:309
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
xAOD::Vertex_v1::addTrackAtVertex
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
Definition: Vertex_v1.cxx:314
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:66
Trk::TrackToVertexIPEstimator::get2DLifetimeSignOfTrack
virtual double get2DLifetimeSignOfTrack(const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
Definition: TrackToVertexIPEstimator.cxx:253
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Trk::TrackToVertexIPEstimator::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TrackToVertexIPEstimator.h:148
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
xAOD::Vertex_v1::clearTracks
void clearTracks()
Remove all tracks from the vertex.
Definition: Vertex_v1.cxx:331
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
Trk::d0
@ d0
Definition: ParamDefs.h:63
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
xAOD::Vertex_v1::trackWeight
float trackWeight(size_t i) const
Get the weight of a given track in the vertex reconstruction.
Definition: Vertex_v1.cxx:262
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::TrackToVertexIPEstimator::m_linFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_linFactory
Definition: TrackToVertexIPEstimator.h:152
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
xAOD::Vertex_v1::chiSquared
float chiSquared() const
Returns the of the vertex fit as float.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::TrackToVertexIPEstimator::get3DLifetimeSignOfTrack
virtual double get3DLifetimeSignOfTrack(const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
Definition: TrackToVertexIPEstimator.cxx:221
Trk::IVertexUpdator::removeTrack
@ removeTrack
Definition: IVertexUpdator.h:69
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Trk::TrackToVertexIPEstimator::getZLifetimeSignOfTrack
virtual double getZLifetimeSignOfTrack(const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
Definition: TrackToVertexIPEstimator.cxx:284
TauGNNUtils::Variables::Track::trackPhi
bool trackPhi(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:482
Trk::phi
@ phi
Definition: ParamDefs.h:75
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
Trk::TrackToVertexIPEstimator::estimate
virtual std::unique_ptr< ImpactParametersAndSigma > estimate(const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doRemoval) const override
Estimate methods returning a d0 and its calculated sigma.
Definition: TrackToVertexIPEstimator.cxx:53
xAOD::Vertex_v1::vxTrackAtVertexAvailable
bool vxTrackAtVertexAvailable() const
Check if VxTrackAtVertices are attached to the object.
Definition: Vertex_v1.cxx:209
xAOD::Vertex_v1::setCovariancePosition
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trk::TrackToVertexIPEstimator::m_Updator
ToolHandle< Trk::IVertexUpdator > m_Updator
Definition: TrackToVertexIPEstimator.h:150
TauGNNUtils::Variables::Track::trackEta
bool trackEta(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:477