32 return StatusCode::SUCCESS;
46 return StatusCode::SUCCESS;
50 std::vector<const xAOD::TrackParticle*> xaodTracks;
52 std::vector<const Trk::Track*> origTracks;
54 std::vector<const Trk::TrackParameters*> origTrackParameters;
57 xaodTracks.push_back(track->track());
59 if(track->track()->track()) {
60 origTracks.push_back(track->track()->track());
63 const Trk::Perigee& perigee = track->track()->perigeeParameters();
70 if(!origTracks.empty() && !origTrackParameters.empty()) {
71 ATH_MSG_ERROR(
"Inconsistent mix of Trk::Track and Trk::TrackParameter");
72 return StatusCode::FAILURE;
77 if(!origTracks.empty()) {
81 xAODvertex =
m_fitTool->fit(xaodTracks, seedPoint);
83 else if (!origTrackParameters.empty()) {
87 xAODvertex =
m_fitTool->fit(xaodTracks, seedPoint);
92 return StatusCode::SUCCESS;
111 return StatusCode::SUCCESS;
120 if (pVertex==
nullptr) {
121 ATH_MSG_WARNING(
"No primary vertex information for calculation of transverse flight path significance");
135 double sigma_fpt2 = (fpx * fpx * secVertex.covariancePosition()(
Trk::x,
Trk::x) +
136 fpx * fpy * secVertex.covariancePosition()(
Trk::x,
Trk::y) +
137 fpy * fpx * secVertex.covariancePosition()(
Trk::y,
Trk::x) +
138 fpy * fpy * secVertex.covariancePosition()(
Trk::y,
Trk::y)) / (fpt * fpt);
140 if (sigma_fpt2 <= 0.) {
145 double sign = (fpx * pTau.
p4().Px() + fpy * pTau.
p4().Py() > 0.) ? 1. : -1.;
147 return sign * fpt / std::sqrt(sigma_fpt2);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
static const Attributes_t empty
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ElementLink implementation for ROOT usage.
virtual StatusCode executeVertexVariables(xAOD::TauJet &pTau, xAOD::VertexContainer &pVertexContainer) const override
double trFlightPathSig(const xAOD::TauJet &pTau, const xAOD::Vertex &secVertex) const
determines the transverse flight path significance from the primary vertex and the secondary vertex o...
ToolHandle< Trk::IVertexFitter > m_fitTool
TauVertexVariables(const std::string &name)
ToolHandle< Trk::IVertexSeedFinder > m_SeedFinder
virtual StatusCode initialize() override
Tool initializer.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
void setSecondaryVertexLink(const VertexLink_t &vertexLink)
void setDetail(TauJetParameters::Detail detail, int value)
const Vertex * vertex() const
void setSecondaryVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
std::vector< const TauTrack * > tracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Get the v<const pointer> to a given tauTrack collection associated with this tau.
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
const Amg::Vector3D & position() const
Returns the 3-pos.
Eigen::Matrix< double, 3, 1 > Vector3D
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ NotSpecified
Default value, no explicit type set.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauTrack_v1 TauTrack
Definition of the current version.
TauJet_v3 TauJet
Definition of the current "tau version".