ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 TrackToVertexIPEstimator (const std::string &t, const std::string &n, const IInterface *p)
 Default Athena interface constructor and destructor.
 ~TrackToVertexIPEstimator ()
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const EventContext &ctx, const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doRemoval) const override
 Estimate methods returning a d0 and its calculated sigma.
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const EventContext &ctx, const TrackParameters *track, const xAOD::Vertex *vtx, bool doRemoval) const override
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const EventContext &ctx, const xAOD::TrackParticle *track, const xAOD::TrackParticle *newtrack, const xAOD::Vertex *vtx, bool doRemoval) const override
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const EventContext &ctx, 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 EventContext &ctx, const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override
virtual std::unique_ptr< ImpactParametersAndSigmaestimate (const EventContext &ctx, const TrackParameters *track, const xAOD::Vertex *vtx) const override
virtual double get3DLifetimeSignOfTrack (const EventContext &ctx, const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
virtual double get2DLifetimeSignOfTrack (const EventContext &ctx, const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
virtual double getZLifetimeSignOfTrack (const EventContext &ctx, const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override

Private Member Functions

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

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 70 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 EventContext & ctx,
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 129 of file TrackToVertexIPEstimator.cxx.

130 {
131 //estimating the d0 and its significance by propagating the trajectory state towards
132 //the vertex position. By this time the vertex should NOT contain this trajectory anymore
133
134 //estrapolating to the perigee of the reconstructed vertex
135 const Amg::Vector3D & lp = vtx.position();
136 PerigeeSurface perigeeSurface(lp);
137 const Trk::Perigee* extrapolatedParameters =
138 dynamic_cast<const Trk::Perigee*>(
140 ->extrapolate(ctx, *track, perigeeSurface)
141 .release());
142 if (extrapolatedParameters && extrapolatedParameters->covariance()) {
143
144 //actual calculation of d0 and sigma.
145 const AmgVector(5) & par = extrapolatedParameters->parameters();
146 const double d0 = par[Trk::d0];
147 const double z0 = par[Trk::z0];
148 const double phi = par[Trk::phi];
149 const double theta = par[Trk::theta];
150
151 AmgSymMatrix(2) vrtXYCov = vtx.covariancePosition().block<2,2>(0,0);
152
153 const AmgSymMatrix(5) & perigeeCov = *(extrapolatedParameters->covariance());
154 // std::cout<<"Perigee covariance: "<<perigeeCov<<std::endl;
155
156 //d0phi->cartesian Jacobian
157 Amg::Vector2D d0JacXY(-sin(phi), cos(phi));
158
159
160 auto newIPandSigma=std::make_unique<ImpactParametersAndSigma>();
161 newIPandSigma->IPd0=d0;
162 double d0_PVcontrib=d0JacXY.transpose()*(vrtXYCov*d0JacXY);
163 if (d0_PVcontrib>=0)
164 {
165 newIPandSigma->sigmad0=sqrt(d0_PVcontrib+perigeeCov(Trk::d0,Trk::d0));
166 newIPandSigma->PVsigmad0=sqrt(d0_PVcontrib);
167 }
168 else
169 {
170 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;
171 newIPandSigma->sigmad0=sqrt(perigeeCov(Trk::d0,Trk::d0));
172 newIPandSigma->PVsigmad0=0;
173 }
174
175 AmgSymMatrix(2) covPerigeeZ0Theta;
176 covPerigeeZ0Theta(0,0)=perigeeCov(Trk::z0,Trk::z0);
177 covPerigeeZ0Theta(0,1)=perigeeCov(Trk::z0,Trk::theta);
178 covPerigeeZ0Theta(1,0)=perigeeCov(Trk::theta,Trk::z0);
179 covPerigeeZ0Theta(1,1)=perigeeCov(Trk::theta,Trk::theta);
180
181 double vrtZZCov = vtx.covariancePosition()(Trk::z,Trk::z);
182
183 Amg::Vector2D IPz0JacZ0Theta (sin(theta), z0*cos(theta));
184 if (vrtZZCov>=0)
185 {
186 newIPandSigma->IPz0SinTheta=z0*sin(theta);
187 newIPandSigma->sigmaz0SinTheta=
188 sqrt(IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta)+sin(theta)*vrtZZCov*sin(theta));
189 newIPandSigma->PVsigmaz0SinTheta=sqrt(sin(theta)*vrtZZCov*sin(theta));
190 newIPandSigma->IPz0 = z0;
191 newIPandSigma->sigmaz0 = std::sqrt( vrtZZCov + perigeeCov(Trk::z0,Trk::z0) );
192 newIPandSigma->PVsigmaz0 = std::sqrt( vrtZZCov );
193 }
194 else
195 {
196 ATH_MSG_WARNING(" The contribution to z0_err: " << vrtZZCov << " from PV is negative: critical error in PV error matrix! Removing contribution from PV ... ");
197 newIPandSigma->IPz0SinTheta=z0*sin(theta);
198 double temp = (IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta));
199 newIPandSigma->sigmaz0SinTheta=sqrt(temp);
200 newIPandSigma->PVsigmaz0SinTheta=0;
201
202 newIPandSigma->IPz0 = z0;
203 newIPandSigma->sigmaz0 = std::sqrt( perigeeCov(Trk::z0,Trk::z0) );
204 newIPandSigma->PVsigmaz0 = 0;
205 }
206
207
208 delete extrapolatedParameters;
209 return newIPandSigma;
210 }
211 ATH_MSG_DEBUG ("Cannot extrapolate the trajectory state. Returning null. ");
212 delete extrapolatedParameters;
213 return nullptr;
214 //end of successfull extrapolation check
215 }//end of actual calculation method
#define endmsg
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define AmgSymMatrix(dim)
#define AmgVector(rows)
if(pathvar)
ToolHandle< Trk::IExtrapolator > m_extrapolator
const Amg::Vector3D & position() const
Returns the 3-pos.
static std::string release
Definition computils.h:50
Eigen::Matrix< double, 3, 1 > Vector3D
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ z
global position (cartesian)
Definition ParamDefs.h:57
@ theta
Definition ParamDefs.h:66
@ phi
Definition ParamDefs.h:75
@ d0
Definition ParamDefs.h:63
@ z0
Definition ParamDefs.h:64
MsgStream & msg
Definition testRead.cxx:32

◆ estimate() [1/6]

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

Definition at line 95 of file TrackToVertexIPEstimator.cxx.

98 {
99
100 if (vtx==nullptr)
101 {
102 ATH_MSG_WARNING("Vertex is zero pointer. Will not estimate IP of track.");
103 return nullptr;
104 }
105
106 const xAOD::Vertex *newVertex = vtx;
107 if (doRemoval)
108 {
109 newVertex = getUnbiasedVertex(track,vtx);
110 if (newVertex == nullptr) {
111 ATH_MSG_WARNING("Unbiasing of vertex failed. Will not estimate IP of track.");
112 return nullptr;
113 }
114 }
115
116 std::unique_ptr<ImpactParametersAndSigma> IPandSigma=calculate(ctx, newtrack,*newVertex);
117
118 if (doRemoval)
119 {
120 delete newVertex;
121 newVertex=nullptr;
122 }
123
124 return IPandSigma;
125
126 }//end of parameterBase estimate method
virtual xAOD::Vertex * getUnbiasedVertex(const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override
std::unique_ptr< ImpactParametersAndSigma > calculate(const EventContext &ctx, const TrackParameters *track, const xAOD::Vertex &vtx) const
A method calculating the do and its error.
Vertex_v1 Vertex
Define the latest version of the vertex class.

◆ estimate() [2/6]

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

Definition at line 400 of file TrackToVertexIPEstimator.cxx.

404 {
405
406 if(track && vtx ){
407 return calculate(ctx, track , *vtx);
408 }
409 return nullptr;
410
411 }

◆ estimate() [3/6]

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

Definition at line 82 of file TrackToVertexIPEstimator.cxx.

85 {
86 if(track && vtx){
87 return estimate(ctx, track,track,vtx,doRemoval);
88 }
89 ATH_MSG_INFO( "Empty TrackParticle or Vertex pointer passed. Returning zero " );
90 return nullptr;
91 //end of track particle validity check
92
93 }//end of parameterBase estimate method
#define ATH_MSG_INFO(x,...)
virtual std::unique_ptr< ImpactParametersAndSigma > estimate(const EventContext &ctx, const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doRemoval) const override
Estimate methods returning a d0 and its calculated sigma.

◆ estimate() [4/6]

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

Definition at line 68 of file TrackToVertexIPEstimator.cxx.

69 {
70 if(track && vtx)
71 {
72 return estimate(ctx, &(track->perigeeParameters()),&(newtrack->perigeeParameters()),vtx,doRemoval);
73 }
74 ATH_MSG_INFO( "Empty TrackParticle or Vertex pointer passed. Returning zero " );
75 return nullptr;
76 //end of track particle validity check
77 }//end of method using track particles
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.

◆ estimate() [5/6]

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

Definition at line 388 of file TrackToVertexIPEstimator.cxx.

391 {
392
393 if(track && vtx ){
394 return estimate(ctx, &(track->perigeeParameters()), vtx);
395 }
396 return nullptr;
397
398 }

◆ estimate() [6/6]

std::unique_ptr< ImpactParametersAndSigma > Trk::TrackToVertexIPEstimator::estimate ( const EventContext & ctx,
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 57 of file TrackToVertexIPEstimator.cxx.

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

◆ get2DLifetimeSignOfTrack()

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

Definition at line 241 of file TrackToVertexIPEstimator.cxx.

245 {
246 const Amg::Vector3D & lp = primaryVertex.position();
247 PerigeeSurface perigeeSurface(lp);
248
249 std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
250 m_extrapolator->extrapolate(
251 ctx, track, perigeeSurface);
252
253 if (!extrapolatedParameters) return 0.;
254
255 double trackD0 = extrapolatedParameters->parameters()[Trk::d0];
256 double trackPhi = extrapolatedParameters->parameters()[Trk::phi];
257 double vs = sinf( atan2(jetMomentum.y(),jetMomentum.x()) - trackPhi )*trackD0;
258
259 return (vs>=0. ? 1. : -1.);
260 }
bool trackPhi(const xAOD::TauJet &, const xAOD::TauTrack &track, float &out)

◆ get3DLifetimeSignOfTrack()

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

Definition at line 219 of file TrackToVertexIPEstimator.cxx.

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

◆ getUnbiasedVertex() [1/2]

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

Definition at line 300 of file TrackToVertexIPEstimator.cxx.

301 {
302 if (!track) {
303 msg(MSG::INFO) << "Empty Trk::TrackParameter pointer passed. Returning zero " << endmsg;
304 return nullptr;
305 }
306 if (!vtx) {
307 msg(MSG::INFO) << "Empty xAOD::Vertex pointer passed. Returning zero " << endmsg;
308 return nullptr;
309 }
310
311 if (vtx->nTrackParticles() == 0)
312 {
313 ATH_MSG_DEBUG("This vertex has no associated tracks. Normal if beam spot is used. Vertex already unbiased");
314 return new xAOD::Vertex(*vtx);
315 }
316
317 //create new vertex for output
318 xAOD::Vertex *outputVertex = new xAOD::Vertex(*vtx);
319 outputVertex->clearTracks(); //remove all tracks -> will add them back one by one
320 if (outputVertex->vxTrackAtVertexAvailable()) outputVertex->vxTrackAtVertex().clear(); //remove all VxTrackAtVertex
321
322 bool tmpLinTrack = false; //do we created a new linearised track?
323
324 //loop over tracks
325 const Amg::Vector3D & pos = track->position();
326 const Amg::Vector3D & mom = track->momentum();
327 for (unsigned int itrk=0; itrk < vtx->nTrackParticles(); ++itrk) {
328 const Perigee& testTP = vtx->trackParticle(itrk)->perigeeParameters();
329 if ((testTP.position() == pos) and (testTP.momentum() == mom)) {
330 //track found, now unbias the vertex using linearized track
331 const LinearizedTrack *linTrack = nullptr;
332 double trackWeight(0.0);
333 //first check if a VxTrackAtVertex is already available with linearized track
334 if (vtx->vxTrackAtVertexAvailable()) {
335 if (vtx->vxTrackAtVertex().size() > itrk) {
336 linTrack = vtx->vxTrackAtVertex()[itrk].linState();
337 trackWeight = vtx->vxTrackAtVertex()[itrk].weight();
338 }
339 }
340 //if linearized track is not available, create it
341 if (!linTrack) {
342 linTrack = m_linFactory->linearizedTrack(track, vtx->position());
343 trackWeight = vtx->trackWeight(itrk);
344 if (!linTrack) {
345 ATH_MSG_INFO("Failing to linearized track. Returning biased vertex.");
346 outputVertex->addTrackAtVertex(vtx->trackParticleLinks()[itrk], vtx->trackWeight(itrk));
347 if (vtx->vxTrackAtVertexAvailable()) {
348 outputVertex->vxTrackAtVertex().push_back(vtx->vxTrackAtVertex()[itrk]);//will clone everything inside -> output vertex owns all the memory
349 }
350 continue;
351 }
352 tmpLinTrack = true;
353 }
354 //now update vertex position removing the linearized track, and do not add the track back to the output vertex
355 const IVertexUpdator::positionUpdateOutcome & reducedVertex = m_Updator->positionUpdate(*vtx, linTrack, trackWeight,IVertexUpdator::removeTrack);
356
357 //calculate updated chi2
358 double chi2 = vtx->chiSquared();
359 double trk_chi = m_Updator->trackParametersChi2( reducedVertex, linTrack );
360 chi2 += -1 * (m_Updator->vertexPositionChi2(*vtx, reducedVertex) + trackWeight * trk_chi);
361
362 //calculate updated ndf
363 double ndf = vtx->numberDoF();
364 ndf += -1 * trackWeight * (2.0);
365
366 //reducedVertex has the updated position and covariance
367 outputVertex->setPosition(reducedVertex.position);
368 outputVertex->setCovariancePosition(reducedVertex.covariancePosition);
369
370 //chi2 and ndf now store the updated FitQuality
371 outputVertex->setFitQuality( chi2, ndf );
372
373 if (tmpLinTrack) delete linTrack; //only delete if it was created new, and doesn't belong to a vertex
374 } else {
375 //track not to be removed. Add back the track to the vertex collection
376 outputVertex->addTrackAtVertex(vtx->trackParticleLinks()[itrk], vtx->trackWeight(itrk));
377 if (vtx->vxTrackAtVertexAvailable()) {
378 outputVertex->vxTrackAtVertex().push_back(vtx->vxTrackAtVertex()[itrk]);//will clone everything inside -> output vertex owns all the memory
379 }
380 }
381 }
382 return outputVertex;
383
384 }
ToolHandle< Trk::IVertexUpdator > m_Updator
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_linFactory
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
void clearTracks()
Remove all tracks from the vertex.
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
bool vxTrackAtVertexAvailable() const
Check if VxTrackAtVertices are attached to the object.
float chiSquared() const
Returns the of the vertex fit as float.
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
float trackWeight(size_t i) const
Get the weight of a given track in the vertex reconstruction.
double chi2(TH1 *h0, TH1 *h1)

◆ getUnbiasedVertex() [2/2]

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

Definition at line 289 of file TrackToVertexIPEstimator.cxx.

290 {
291 if(track)
292 {
293 return getUnbiasedVertex(&(track->perigeeParameters()),vtx);
294 }
295 msg(MSG::INFO) << "Empty xAOD::TrackParticle pointer passed. Returning zero " << endmsg;
296 return nullptr;
297 //end of track particle validity check
298 }

◆ getZLifetimeSignOfTrack()

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

Definition at line 263 of file TrackToVertexIPEstimator.cxx.

267 {
268
269 const Amg::Vector3D & lp = primaryVertex.position();
270 PerigeeSurface perigeeSurface(lp);
271
272 std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
273 m_extrapolator->extrapolate(
274 ctx, track, perigeeSurface);
275
276 if (!extrapolatedParameters) return 0.;
277
278 double trackTheta = extrapolatedParameters->parameters()[Trk::theta];
279 double trackZ0 = extrapolatedParameters->parameters()[Trk::z0];
280 double trackEta = -logf(tanf(trackTheta/2.));
281 double jetEta = jetMomentum.eta();
282 double zs = (jetEta - trackEta)*trackZ0;
283 return (zs>=0. ? 1. : -1.);
284 }
bool trackEta(const xAOD::TauJet &, const xAOD::TauTrack &track, float &out)

◆ 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.empty() ) {
32 ATH_MSG_DEBUG("Extrapolator is None/Empty. Tool-dependent features will be disabled.");
33 } else {
34 // Only try to retrieve if a name was actually provided
35 if ( m_extrapolator.retrieve().isFailure() ) {
36 ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
37 return StatusCode::FAILURE;
38 }
39 }
40 // updator
41 if (m_Updator.retrieve().isFailure()) {
42 ATH_MSG_FATAL("Failed to retrieve tool " << m_Updator);
43 return StatusCode::FAILURE;
44 }
45
46 // linearized track factory
47 if ( m_linFactory.retrieve().isFailure() )
48 {
49 ATH_MSG_FATAL("Failed to retrieve tool " << m_linFactory );
50 return StatusCode::FAILURE;
51 }
52
53 return StatusCode::SUCCESS;
54 }//end of initialize method
#define ATH_MSG_FATAL(x,...)

Member Data Documentation

◆ m_extrapolator

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

Definition at line 140 of file TrackToVertexIPEstimator.h.

140 {this, "Extrapolator",
141 "Trk::Extrapolator"};

◆ m_linFactory

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

Definition at line 144 of file TrackToVertexIPEstimator.h.

144 {
145 this, "LinearizedTrackFactory", "Trk::FullLinearizedTrackFactory"};

◆ m_Updator

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

Definition at line 142 of file TrackToVertexIPEstimator.h.

142 {this, "VertexUpdator",
143 "Trk::KalmanVertexUpdator"};

The documentation for this class was generated from the following files: