|
ATLAS Offline Software
|
Go to the documentation of this file.
12 namespace TrackingHelpers {
15 throw std::runtime_error(
"Invalid TrackParticle pointer.");
20 throw std::runtime_error(
"TrackParticle without covariance matrix for the defining parameters.");
26 throw std::runtime_error(
"Invalid TrackParticle pointer.");
30 throw std::runtime_error(
"TrackParticle without diagonal covariance matrix elements for the defining parameters.");
36 if (!
tp)
return false;
37 if(
tp->definingParametersCovMatrixFilled() != xAOD::FullCovMatrixAvailable )
return false;
41 namespace TrackingHelpers {
46 double sigma_d0 =
tp->definingParametersCovMatrixDiagVec().at(0);
48 throw std::runtime_error(
"TrackParticle with zero or negative d0 uncertainty.");
50 return d0/sqrt(sigma_d0+d0_uncert_beam_spot_2);
60 throw std::runtime_error(
"Beamspot covariance matrix is invalid.");
67 double z0 =
tp->z0() +
tp->vz();
70 throw std::runtime_error(
"Given primary vertex does not fulfil the requirements i.e. does not exist, or is too far away from the beam axis.");
75 double sigma_z0 =
tp->definingParametersCovMatrixDiagVec().at(1);
77 throw std::runtime_error(
"TrackParticle with zero or negative z0 uncertainty.");
79 return z0/sqrt(sigma_z0);
85 throw std::runtime_error(
"TrackParticle without covariance matrix for defining parameters or the covariance matrix is wrong dimensionality.");
87 if (std::abs(
tp->qOverP())<0) {
88 throw std::runtime_error(
"q/p is zero");
void checkTPAndDefiningParamCovDiag(const xAOD::TrackParticle *tp)
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Helper class to provide constant type-safe access to aux data.
bool hasValidCov(const xAOD::TrackParticle *tp)
Check whether the given track particle is valid and has a covariance matrix of the defining parameter...
double d0UncertaintyBeamSpot2(double track_phi0, double beam_sigma_x, double beam_sigma_y, double beam_sigma_xy)
calculate the squared d0 uncertainty component due to the size of the beam spot.
bool checkBeamSpotSigma(double beam_sigma_x, double beam_sigma_y, double beam_sigma_xy)
check that the beamspot covariance matrix is valid
void checkTPAndDefiningParamCov(const xAOD::TrackParticle *tp)
bool hasValidCovQoverP(const xAOD::TrackParticle *tp)
return true if the covariance matrix of the defining parameters is set, has enough elements and the q...
double z0significance(const xAOD::TrackParticle *tp, const xAOD::Vertex *vx=NULL)
Get the impact parameter significance of a track particle in the z direction.
double pTErr2Unsafe(const xAOD::TrackParticle *tp)
compute the uncertainty of pt squared.
double pTErr2(const xAOD::TrackParticle *tp)
compute the uncertainty of pt squared.
float z() const
Returns the z position.
bool checkPVReference(const xAOD::TrackParticle *tp, const xAOD::Vertex *vx, const double max_pv_dxy_sqr=0.5 *0.5)
test whether the given primary vertex has a significant displacement in r-phi wrt.
Class describing a Vertex.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Class describing a TrackParticle.
Base class for elements of a container that can have aux data.