Analysis-level structure for vertex-related information. More...
#include "DataFormats/PatCandidates/interface/Vertexing.h"
Public Member Functions | |
const Measurement1DFloat & | dr () const |
Distance between the object and the vertex in the transverse plane, and it's error. More... | |
const Measurement1DFloat & | dz () const |
bool | hasErrors () const |
True if the errors on dr and dz have been set, false if they're nulls. More... | |
bool | hasTrack () const |
Returns 'true' if a reference to a track was stored in this VertexAssociation. More... | |
bool | hasTransverseIP () const |
True if the transverse distance was computed for this VertexAssociation. More... | |
bool | isAvailable () const |
Return 'true' if the reco::Vertex is available in the file, false if it has been dropped. More... | |
bool | isNonnull () const |
Return 'true' unless this is a null association (that is, no vertex) More... | |
bool | isNull () const |
Return 'true' if this is a null association (that is, no vertex) More... | |
const reco::Vertex & | operator* () const |
Return the vertex (that is, you can do "const reco::Vertex &vtx = *assoc") More... | |
const reco::Vertex * | operator-> () const |
Allows VertexAssociation to behave like a vertex ref (e.g. to do "assoc->position()") More... | |
void | setDistances (const AlgebraicVector3 &dist, const AlgebraicSymMatrix33 &err) |
Set dz and dr given the distance and the 3x3 total covariance matrix of the distance. More... | |
template<typename T1 , typename T2 > | |
void | setDistances (const T1 &p1, const T2 &p2, const AlgebraicSymMatrix33 &err) |
void | setDr (const Measurement1DFloat &dr) |
void | setDr (const Measurement1D &dr) |
void | setDz (const Measurement1DFloat &dz) |
void | setDz (const Measurement1D &dz) |
const reco::Track * | track () const |
Returns a C++ pointer to the track stored in this vertex (can be a null pointer) More... | |
const reco::TrackBaseRef & | trackRef () const |
Returns a reference to the track stored in this vertex (can be null) More... | |
const reco::Vertex * | vertex () const |
Returns a pointer to the vertex, or a null pointer if there is no vertex (null association) More... | |
VertexAssociation () | |
Create a null vertx association. More... | |
VertexAssociation (const reco::VertexRef &vertex) | |
Create a vertex association given a ref to a vertex. More... | |
VertexAssociation (const reco::VertexRef &vertex, const reco::TrackBaseRef &tk) | |
const reco::VertexRef & | vertexRef () const |
Returns the reference to the vertex (can be a null reference) More... | |
Private Attributes | |
Measurement1DFloat | dr_ |
Measurement1DFloat | dz_ |
reco::TrackBaseRef | track_ |
reco::VertexRef | vertex_ |
Analysis-level structure for vertex-related information.
pat::VertexAssociation holds a reference to a vertex and extended information like the distance between the object and the vertex.
For convenience, pat::VertexAssociation behaves like a VertexRef, that is (*assoc) is a reco::Vertex.
The original proposal is at https://hypernews.cern.ch/HyperNews/CMS/get/physTools/587.html
Definition at line 26 of file Vertexing.h.
|
inline |
|
inline |
|
inline |
Create a vertex association given a ref to a vertex and a reference to a track object Note: you also have to set the distances, they can be computed by the VertexAssociation itself because it requires access to the magnetic field and other condition data.
Definition at line 35 of file Vertexing.h.
|
inline |
Distance between the object and the vertex in the transverse plane, and it's error.
Definition at line 63 of file Vertexing.h.
References dr_.
Referenced by pat::VertexAssociationSelector::operator()(), and setDr().
|
inline |
Distance between the object and the vertex along the Z axis, and it's error. Note 1: if the BeamSpot was used as Vertex, the error includes the BeamSpot spread!
Definition at line 61 of file Vertexing.h.
References dz_.
Referenced by pat::VertexAssociationSelector::operator()(), and setDz().
|
inline |
True if the errors on dr and dz have been set, false if they're nulls.
Definition at line 67 of file Vertexing.h.
References dr_, dz_, Measurement1DFloat::error(), and hasTransverseIP().
|
inline |
Returns 'true' if a reference to a track was stored in this VertexAssociation.
Definition at line 53 of file Vertexing.h.
References edm::RefToBase< T >::isNull(), and track_.
Referenced by track().
|
inline |
True if the transverse distance was computed for this VertexAssociation.
Definition at line 65 of file Vertexing.h.
References dr_, and Measurement1DFloat::value().
Referenced by hasErrors().
|
inline |
Return 'true' if the reco::Vertex is available in the file, false if it has been dropped.
Definition at line 42 of file Vertexing.h.
References edm::Ref< C, T, F >::isAvailable(), and vertex_.
|
inline |
Return 'true' unless this is a null association (that is, no vertex)
Definition at line 40 of file Vertexing.h.
References edm::Ref< C, T, F >::isNonnull(), and vertex_.
|
inline |
Return 'true' if this is a null association (that is, no vertex)
Definition at line 38 of file Vertexing.h.
References edm::Ref< C, T, F >::isNull(), and vertex_.
Referenced by pat::VertexAssociationSelector::operator()().
|
inline |
Return the vertex (that is, you can do "const reco::Vertex &vtx = *assoc")
Definition at line 44 of file Vertexing.h.
References operator->().
|
inline |
Allows VertexAssociation to behave like a vertex ref (e.g. to do "assoc->position()")
Definition at line 46 of file Vertexing.h.
References edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::isNull(), and vertex_.
Referenced by operator*().
void VertexAssociation::setDistances | ( | const AlgebraicVector3 & | dist, |
const AlgebraicSymMatrix33 & | err | ||
) |
Set dz and dr given the distance and the 3x3 total covariance matrix of the distance.
Definition at line 5 of file Vertexing.cc.
References funct::abs(), setDr(), setDz(), and mathSSE::sqrt().
Referenced by pat::helper::VertexingHelper::associate(), setDistances(), and pat::VertexAssociationSelector::simpleAssociation().
|
inline |
Set dz and dr given the two points (object and vertex) and the 3x3 total covariance matrix of the distance The covariance matrix must already include the covariance matrix of the vertex 'p1', 'p2' can be anything that has methods .x(), .y(), .z() (e.g. GlobalPoint, Vertex, ...)
Definition at line 79 of file Vertexing.h.
References setDistances().
|
inline |
Definition at line 70 of file Vertexing.h.
Referenced by setDistances().
|
inline |
Definition at line 72 of file Vertexing.h.
References dr_, Measurement1D::error(), and Measurement1D::value().
|
inline |
|
inline |
Definition at line 71 of file Vertexing.h.
References dz_, Measurement1D::error(), and Measurement1D::value().
|
inline |
Returns a C++ pointer to the track stored in this vertex (can be a null pointer)
Definition at line 57 of file Vertexing.h.
References edm::RefToBase< T >::get(), hasTrack(), and track_.
|
inline |
Returns a reference to the track stored in this vertex (can be null)
Definition at line 55 of file Vertexing.h.
References track_.
|
inline |
Returns a pointer to the vertex, or a null pointer if there is no vertex (null association)
Definition at line 51 of file Vertexing.h.
References edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::isNull(), and vertex_.
Referenced by Tau.Tau::dxy().
|
inline |
Returns the reference to the vertex (can be a null reference)
Definition at line 49 of file Vertexing.h.
References vertex_.
|
private |
Definition at line 90 of file Vertexing.h.
Referenced by dr(), hasErrors(), hasTransverseIP(), and setDr().
|
private |
Definition at line 90 of file Vertexing.h.
Referenced by dz(), hasErrors(), and setDz().
|
private |
Definition at line 93 of file Vertexing.h.
Referenced by hasTrack(), track(), and trackRef().
|
private |
Definition at line 89 of file Vertexing.h.
Referenced by isAvailable(), isNonnull(), isNull(), operator->(), vertex(), and vertexRef().