![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
A class estimating the transverse impact parameter d0 and its error of a given track wrt to the reconstructed vertex.
More...
#include <TrackToVertexIPEstimator.h>
|
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< ImpactParametersAndSigma > | estimate (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< ImpactParametersAndSigma > | estimate (const TrackParameters *track, const xAOD::Vertex *vtx, bool doRemoval) const override |
|
virtual std::unique_ptr< ImpactParametersAndSigma > | estimate (const xAOD::TrackParticle *track, const xAOD::TrackParticle *newtrack, const xAOD::Vertex *vtx, bool doRemoval) const override |
|
virtual std::unique_ptr< ImpactParametersAndSigma > | estimate (const TrackParameters *track, const TrackParameters *newtrack, const xAOD::Vertex *vtx, bool doRemoval) const override |
|
virtual xAOD::Vertex * | getUnbiasedVertex (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override |
|
virtual xAOD::Vertex * | getUnbiasedVertex (const TrackParameters *track, const xAOD::Vertex *vtx) const override |
|
virtual std::unique_ptr< ImpactParametersAndSigma > | estimate (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override |
|
virtual std::unique_ptr< ImpactParametersAndSigma > | estimate (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 |
|
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 |
|
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.
◆ StoreGateSvc_t
◆ TrackToVertexIPEstimator()
Trk::TrackToVertexIPEstimator::TrackToVertexIPEstimator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TrackToVertexIPEstimator()
Trk::TrackToVertexIPEstimator::~TrackToVertexIPEstimator |
( |
| ) |
|
|
default |
◆ calculate()
A method calculating the do and its error.
At this stage the trajectory is removed from the vertex.
Definition at line 122 of file TrackToVertexIPEstimator.cxx.
129 PerigeeSurface perigeeSurface(lp);
133 ->extrapolate(Gaudi::Hive::currentContext(), *
track, perigeeSurface)
135 if (extrapolatedParameters && extrapolatedParameters->covariance()) {
138 const AmgVector(5) &
par = extrapolatedParameters->parameters();
144 AmgSymMatrix(2) vrtXYCov = vtx.covariancePosition().block<2,2>(0,0);
153 auto newIPandSigma=std::
make_unique<ImpactParametersAndSigma>();
154 newIPandSigma->IPd0=
d0;
155 double d0_PVcontrib=d0JacXY.transpose()*(vrtXYCov*d0JacXY);
158 newIPandSigma->sigmad0=sqrt(d0_PVcontrib+perigeeCov(
Trk::d0,
Trk::d0));
159 newIPandSigma->PVsigmad0=sqrt(d0_PVcontrib);
163 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;
165 newIPandSigma->PVsigmad0=0;
169 covPerigeeZ0Theta(0,0)=perigeeCov(
Trk::
z0,
Trk::
z0);
174 double vrtZZCov = vtx.covariancePosition()(
Trk::
z,
Trk::
z);
180 newIPandSigma->sigmaz0SinTheta=
181 sqrt(IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta)+
sin(
theta)*vrtZZCov*
sin(
theta));
183 newIPandSigma->IPz0 =
z0;
184 newIPandSigma->sigmaz0 = std::sqrt( vrtZZCov + perigeeCov(
Trk::z0,
Trk::z0) );
185 newIPandSigma->PVsigmaz0 = std::sqrt( vrtZZCov );
189 ATH_MSG_WARNING(
" The contribution to z0_err: " << vrtZZCov <<
" from PV is negative: critical error in PV error matrix! Removing contribution from PV ... ");
191 double temp = (IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta));
192 newIPandSigma->sigmaz0SinTheta=sqrt(temp);
193 newIPandSigma->PVsigmaz0SinTheta=0;
195 newIPandSigma->IPz0 =
z0;
196 newIPandSigma->sigmaz0 = std::sqrt( perigeeCov(
Trk::z0,
Trk::z0) );
197 newIPandSigma->PVsigmaz0 = 0;
201 delete extrapolatedParameters;
202 return newIPandSigma;
204 ATH_MSG_DEBUG (
"Cannot extrapolate the trajectory state. Returning null. ");
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ estimate() [1/6]
◆ estimate() [2/6]
◆ estimate() [3/6]
◆ estimate() [4/6]
◆ estimate() [5/6]
◆ estimate() [6/6]
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ get2DLifetimeSignOfTrack() [1/2]
Implements Trk::ITrackToVertexIPEstimator.
Definition at line 254 of file TrackToVertexIPEstimator.cxx.
259 PerigeeSurface perigeeSurface(lp);
261 std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
263 Gaudi::Hive::currentContext(),
track, perigeeSurface);
265 if (!extrapolatedParameters)
return 0.;
267 double trackD0 = extrapolatedParameters->parameters()[
Trk::d0];
269 double vs = sinf( atan2(jetMomentum.y(),jetMomentum.x()) -
trackPhi )*trackD0;
271 return (vs>=0. ? 1. : -1.);
◆ get2DLifetimeSignOfTrack() [2/2]
◆ get3DLifetimeSignOfTrack() [1/2]
Implements Trk::ITrackToVertexIPEstimator.
Definition at line 222 of file TrackToVertexIPEstimator.cxx.
227 PerigeeSurface perigeeSurface(lp);
229 std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
231 Gaudi::Hive::currentContext(),
track, perigeeSurface);
233 if (!extrapolatedParameters)
return 0.;
239 double sign=(jetMomentum.cross(trackMom)).
dot(trackMom.cross(primaryPos-trackPos));
241 return sign>=0.?1.:-1;
◆ get3DLifetimeSignOfTrack() [2/2]
◆ getUnbiasedVertex() [1/2]
Implements Trk::ITrackToVertexIPEstimator.
Definition at line 342 of file TrackToVertexIPEstimator.cxx.
345 msg(MSG::INFO) <<
"Empty Trk::TrackParameter pointer passed. Returning zero " <<
endmsg;
349 msg(MSG::INFO) <<
"Empty xAOD::Vertex pointer passed. Returning zero " <<
endmsg;
355 ATH_MSG_DEBUG(
"This vertex has no associated tracks. Normal if beam spot is used. Vertex already unbiased");
364 bool tmpLinTrack =
false;
371 if ((testTP.position() ==
pos) and (testTP.momentum() ==
mom)) {
373 const LinearizedTrack *linTrack =
nullptr;
374 double trackWeight(0.0);
387 ATH_MSG_INFO(
"Failing to linearized track. Returning biased vertex.");
401 double trk_chi =
m_Updator->trackParametersChi2( reducedVertex, linTrack );
402 chi2 += -1 * (
m_Updator->vertexPositionChi2(*vtx, reducedVertex) + trackWeight * trk_chi);
406 ndf += -1 * trackWeight * (2.0);
415 if (tmpLinTrack)
delete linTrack;
◆ getUnbiasedVertex() [2/2]
◆ getZLifetimeSignOfTrack() [1/2]
Implements Trk::ITrackToVertexIPEstimator.
Definition at line 285 of file TrackToVertexIPEstimator.cxx.
291 PerigeeSurface perigeeSurface(lp);
293 std::unique_ptr<const Trk::TrackParameters> extrapolatedParameters =
295 Gaudi::Hive::currentContext(),
track, perigeeSurface);
297 if (!extrapolatedParameters)
return 0.;
299 double trackTheta = extrapolatedParameters->parameters()[
Trk::theta];
300 double trackZ0 = extrapolatedParameters->parameters()[
Trk::z0];
301 double trackEta = -logf(tanf(trackTheta/2.));
302 double jetEta = jetMomentum.eta();
303 double zs = (jetEta -
trackEta)*trackZ0;
304 return (zs>=0. ? 1. : -1.);
◆ getZLifetimeSignOfTrack() [2/2]
◆ initialize()
StatusCode Trk::TrackToVertexIPEstimator::initialize |
( |
| ) |
|
|
overridevirtual |
Default Athena interface methods.
Definition at line 27 of file TrackToVertexIPEstimator.cxx.
34 return StatusCode::FAILURE;
40 return StatusCode::FAILURE;
47 return StatusCode::FAILURE;
50 return StatusCode::SUCCESS;
◆ inputHandles()
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::ITrackToVertexIPEstimator::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_extrapolator
◆ m_linFactory
◆ m_Updator
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
@ z
global position (cartesian)
Vertex_v1 Vertex
Define the latest version of the vertex class.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
ParametersT< 5, Charged, PerigeeSurface > Perigee
std::vector< SG::VarHandleKeyArray * > m_vhka
const Amg::Vector3D & position() const
Returns the 3-pos.
std::unique_ptr< ImpactParametersAndSigma > calculate(const TrackParameters *track, const xAOD::Vertex &vtx) const
A method calculating the do and its error.
bool const RAWDATA *ch2 const
virtual void setOwner(IDataHandleHolder *o)=0
virtual xAOD::Vertex * getUnbiasedVertex(const xAOD::TrackParticle *track, const xAOD::Vertex *vtx) const override
AmgSymMatrix(5) &GXFTrackState
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
virtual double get2DLifetimeSignOfTrack(const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
ToolHandle< Trk::IExtrapolator > m_extrapolator
double chi2(TH1 *h0, TH1 *h1)
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void clearTracks()
Remove all tracks from the vertex.
def dot(G, fn, nodesToHighlight=[])
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Ensure that the ATLAS eigen extensions are properly loaded.
Definition of ATLAS Math & Geometry primitives (Amg)
float trackWeight(size_t i) const
Get the weight of a given track in the vertex reconstruction.
Eigen::Matrix< double, 3, 1 > Vector3D
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_linFactory
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
const Amg::Vector3D & momentum() const
Access method for the momentum.
float chiSquared() const
Returns the of the vertex fit as float.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
virtual double get3DLifetimeSignOfTrack(const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double getZLifetimeSignOfTrack(const TrackParameters &track, const Amg::Vector3D &jetDirection, const xAOD::Vertex &primaryVertex) const override
bool trackPhi(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
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.
bool vxTrackAtVertexAvailable() const
Check if VxTrackAtVertices are attached to the object.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
ToolHandle< Trk::IVertexUpdator > m_Updator
bool trackEta(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)