#include <Vertex.h>
Classes | |
class | TrackEqual |
Public Types | |
enum | { dimension = 3 } |
error matrix dimension More... | |
enum | { size = dimension * ( dimension + 1 ) / 2 } |
matix size More... | |
typedef math::Error< dimension > ::type | CovarianceMatrix |
covariance error matrix (3x3) More... | |
typedef math::Error< dimension > ::type | Error |
covariance error matrix (3x3) More... | |
typedef unsigned int | index |
index type More... | |
typedef math::XYZPoint | Point |
point in the space More... | |
typedef std::vector < TrackBaseRef > ::const_iterator | trackRef_iterator |
The iteratator for the vector<TrackRef> More... | |
Public Member Functions | |
void | add (const TrackBaseRef &r, float w=1.0) |
add a reference to a Track More... | |
void | add (const TrackBaseRef &r, const Track &refTrack, float w=1.0) |
add the original a Track(reference) and the smoothed Track More... | |
double | chi2 () const |
chi-squares More... | |
double | covariance (int i, int j) const |
(i, j)-th element of error matrix, i, j = 0, ... 2 More... | |
CovarianceMatrix | covariance () const |
return SMatrix More... | |
Error | error () const |
return SMatrix More... | |
void | fill (CovarianceMatrix &v) const |
fill SMatrix More... | |
bool | hasRefittedTracks () const |
Checks whether refitted tracks are stored. More... | |
bool | isFake () const |
bool | isValid () const |
Tells whether the vertex is valid. More... | |
double | ndof () const |
double | normalizedChi2 () const |
chi-squared divided by n.d.o.f. More... | |
unsigned int | nTracks (float minWeight=0.5) const |
Returns the number of tracks in the vertex with weight above minWeight. More... | |
TrackBaseRef | originalTrack (const Track &refTrack) const |
math::XYZTLorentzVectorD | p4 (float mass=0.13957018, float minWeight=0.5) const |
Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products. More... | |
const Point & | position () const |
position More... | |
Track | refittedTrack (const TrackBaseRef &track) const |
Track | refittedTrack (const TrackRef &track) const |
const std::vector< Track > & | refittedTracks () const |
Returns the container of refitted tracks. More... | |
void | removeTracks () |
trackRef_iterator | tracks_begin () const |
first iterator over tracks More... | |
trackRef_iterator | tracks_end () const |
last iterator over tracks More... | |
size_t | tracksSize () const |
number of tracks More... | |
template<typename TREF > | |
float | trackWeight (const TREF &r) const |
returns the weight with which a Track has contributed to the vertex-fit. More... | |
Vertex () | |
Vertex (const Point &, const Error &) | |
Constructor for a fake vertex. More... | |
Vertex (const Point &, const Error &, double chi2, double ndof, size_t size) | |
constructor for a valid vertex, with all data More... | |
double | x () const |
x coordinate More... | |
double | xError () const |
error on x More... | |
double | y () const |
y coordinate More... | |
double | yError () const |
error on y More... | |
double | z () const |
y coordinate More... | |
double | zError () const |
error on z More... | |
Private Member Functions | |
index | idx (index i, index j) const |
position index More... | |
Private Attributes | |
float | chi2_ |
chi-sqared More... | |
float | covariance_ [size] |
covariance matrix (3x3) as vector More... | |
float | ndof_ |
number of degrees of freedom More... | |
Point | position_ |
position More... | |
std::vector< Track > | refittedTracks_ |
The vector of refitted tracks. More... | |
std::vector< TrackBaseRef > | tracks_ |
reference to tracks More... | |
bool | validity_ |
tells wether the vertex is really valid. More... | |
std::vector< uint8_t > | weights_ |
A reconstructed Vertex providing position, error, chi2, ndof and reconstrudted tracks. The vertex can be valid, fake, or invalid. A valid vertex is one which has been obtained from a vertex fit of tracks, and all data is meaningful A fake vertex is a vertex which was not made out of a proper fit with tracks, but still has a position and error (chi2 and ndof are null). For a primary vertex, it could simply be the beam line. A fake vertex is considered valid. An invalid vertex has no meaningful data.
typedef math::Error<dimension>::type reco::Vertex::Error |
typedef unsigned int reco::Vertex::index |
typedef math::XYZPoint reco::Vertex::Point |
typedef std::vector<TrackBaseRef >::const_iterator reco::Vertex::trackRef_iterator |
|
inline |
Constructor for a fake vertex.
Definition at line 18 of file Vertex.cc.
References covariance_, dimension, i, idx(), j, and validity_.
constructor for a valid vertex, with all data
Definition at line 8 of file Vertex.cc.
References covariance_, dimension, i, idx(), j, tracks_, and validity_.
void reco::Vertex::add | ( | const TrackBaseRef & | r, |
float | w = 1.0 |
||
) |
add a reference to a Track
Referenced by VZeroProducer::produce(), pat::PATTrackAndVertexUnpacker::produce(), and counter.Counter::register().
void reco::Vertex::add | ( | const TrackBaseRef & | r, |
const Track & | refTrack, | ||
float | w = 1.0 |
||
) |
add the original a Track(reference) and the smoothed Track
Referenced by counter.Counter::register().
|
inline |
chi-squares
Definition at line 88 of file Vertex.h.
Referenced by GsfVertexTrackCompatibilityEstimator::estimate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), HLTVertexFilter::hltFilter(), EventVtxInfoNtupleDumper::produce(), pat::PATVertexSlimmer::produce(), pat::PATSecondaryVertexSlimmer::produce(), ConeIsolation::produce(), pat::PATConversionProducer::produce(), CandCommonVertexFitterBase::set(), and PFCandCommonVertexFitterBase::set().
|
inline |
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition at line 116 of file Vertex.h.
Referenced by SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), VertexDistance::compatibility(), reco::TemplatedSecondaryVertex< SV >::computeDist2d(), reco::TemplatedSecondaryVertex< SV >::computeDist3d(), GsfConstraintAtVertex::constrainAtVertex(), VertexDistance::distance(), VertexCompatibleWithBeam::distanceToBeam(), GsfVertexTrackCompatibilityEstimator::estimate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), ConversionHitChecker::nHitsBeforeVtx(), VertexCompatibleWithBeam::operator()(), reco::print(), pat::PATVertexSlimmer::produce(), reco::JetSignalVertexCompatibilityAlgo::trackVertexCompat(), reco::V0Candidate::vtxCovariance(), and SignedTransverseImpactParameter::zImpactParameter().
|
inline |
|
inline |
return SMatrix
Definition at line 122 of file Vertex.h.
Referenced by FWSecVertexProxyBuilder::build(), pat::VertexAssociationSelector::operator()(), pat::PATSecondaryVertexSlimmer::produce(), and ConeIsolation::produce().
void Vertex::fill | ( | CovarianceMatrix & | v | ) | const |
fill SMatrix
Definition at line 27 of file Vertex.cc.
References covariance_, dimension, i, idx(), and j.
Referenced by CandCommonVertexFitterBase::set(), and PFCandCommonVertexFitterBase::set().
|
inline |
Checks whether refitted tracks are stored.
Definition at line 127 of file Vertex.h.
Referenced by nTracks(), p4(), and reco::TrackKinematics::TrackKinematics().
|
inline |
Tells whether a Vertex is fake, i.e. not a vertex made out of a proper fit with tracks. For a primary vertex, it could simply be the beam line.
Definition at line 64 of file Vertex.h.
Referenced by BVertexFilterT< VTX >::filter(), HLTVertexFilter::hltFilter(), PVObjectSelector::operator()(), EventVtxInfoNtupleDumper::produce(), and PFchsMETcorrInputProducer::produce().
|
inline |
Tells whether the vertex is valid.
Definition at line 60 of file Vertex.h.
Referenced by NuclearLikelihood::calculate(), HLTVertexFilter::hltFilter(), and core.AutoHandle.AutoHandle::ReallyLoad().
|
inline |
Number of degrees of freedom Meant to be Double32_t for soft-assignment fitters: tracks may contribute to the vertex with fractional weights. The ndof is then = to the sum of the track weights. see e.g. CMS NOTE-2006/032, CMS NOTE-2004/002
Definition at line 95 of file Vertex.h.
Referenced by CMSDAS11DijetTestAnalyzer::analyze(), HLTVertexFilter::hltFilter(), PVObjectSelector::operator()(), EventVtxInfoNtupleDumper::produce(), pat::PATVertexSlimmer::produce(), pat::PATSecondaryVertexSlimmer::produce(), ConeIsolation::produce(), PFchsMETcorrInputProducer::produce(), pat::PATConversionProducer::produce(), CandCommonVertexFitterBase::set(), and PFCandCommonVertexFitterBase::set().
|
inline |
unsigned int Vertex::nTracks | ( | float | minWeight = 0.5 | ) | const |
Returns the number of tracks in the vertex with weight above minWeight.
Definition at line 132 of file Vertex.cc.
References hasRefittedTracks(), gen::n, originalTrack(), refittedTracks_, tracks_begin(), tracks_end(), and trackWeight().
Referenced by nTracks().
TrackBaseRef Vertex::originalTrack | ( | const Track & | refTrack | ) | const |
Returns the original track which corresponds to a particular refitted Track Throws an exception if now refitted tracks are stored ot the track is not found in the list
Definition at line 71 of file Vertex.cc.
References refittedTracks_, and tracks_.
Referenced by nTracks(), and p4().
math::XYZTLorentzVectorD Vertex::p4 | ( | float | mass = 0.13957018 , |
float | minWeight = 0.5 |
||
) | const |
Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products.
Definition at line 98 of file Vertex.cc.
References hasRefittedTracks(), originalTrack(), refittedTracks_, tracks_begin(), tracks_end(), and trackWeight().
Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), Lepton.Lepton::p4WithFSR(), and pat::PATSecondaryVertexSlimmer::produce().
|
inline |
position
Definition at line 99 of file Vertex.h.
Referenced by CMSDAS11DijetTestAnalyzer::analyze(), pat::LeptonVertexSignificance::calculate(), VertexDistance::compatibility(), reco::TemplatedSecondaryVertex< SV >::computeDist2d(), reco::TemplatedSecondaryVertex< SV >::computeDist3d(), vertexTools::computeSharedTracks(), GsfConstraintAtVertex::constrainAtVertex(), reco::VZero::crossingPoint(), VertexDistance::distance(), VertexCompatibleWithBeam::distanceToBeam(), GsfVertexTrackCompatibilityEstimator::estimate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), TrackingFailureFilter::filter(), isTightMuonCustom(), VertexCompatibleWithBeam::operator()(), reco::VertexFilter::operator()(), PVObjectSelector::operator()(), pat::VertexAssociationSelector::operator()(), EventVtxInfoNtupleDumper::produce(), pat::PATVertexSlimmer::produce(), pat::PATSecondaryVertexSlimmer::produce(), TrackFromPVSelector::produce(), MuonFromPVSelector::produce(), GsfElectronFromPVSelector::produce(), pf2pat::IPCutPFCandidateSelectorDefinition::select(), reco::V0Candidate::setVertex(), VertexDistanceXY::signedDistance(), VertexDistance3D::signedDistance(), ConeIsolationAlgorithm::tag(), and reco::JetSignalVertexCompatibilityAlgo::trackVertexCompat().
Track reco::Vertex::refittedTrack | ( | const TrackBaseRef & | track | ) | const |
Returns the refitted track which corresponds to a particular original Track Throws an exception if now refitted tracks are stored ot the track is not found in the list
Referenced by refittedTrack(), and reco::TrackKinematics::TrackKinematics().
Returns the refitted track which corresponds to a particular original Track Throws an exception if now refitted tracks are stored ot the track is not found in the list
Definition at line 93 of file Vertex.cc.
References refittedTrack().
|
inline |
void Vertex::removeTracks | ( | ) |
Definition at line 64 of file Vertex.cc.
References refittedTracks_, tracks_, and weights_.
Vertex::trackRef_iterator Vertex::tracks_begin | ( | ) | const |
first iterator over tracks
Definition at line 39 of file Vertex.cc.
References tracks_.
Referenced by FWSecVertexProxyBuilder::build(), NuclearLikelihood::calculate(), calculateVertexSharedTracks(), vertexTools::computeSharedTracks(), computeSharedTracks(), PFRecoTauDiscriminationByFlight::discriminate(), GsfVertexTrackCompatibilityEstimator::estimate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), PATPrimaryVertexSelector::getVertexVariables(), reco::VZero::negativeDaughter(), nTracks(), p4(), reco::VZero::positiveDaughter(), reco::NuclearInteraction::primaryTrack(), pat::PATSecondaryVertexSlimmer::produce(), PFchsMETcorrInputProducer::produce(), PVClusterComparer::pTSquaredSum(), NuclearLikelihood::secondaryTrackMaxHits(), reco::NuclearInteraction::secondaryTracks_begin(), VertexHigherPtSquared::sumPtSquared(), and reco::TrackKinematics::TrackKinematics().
Vertex::trackRef_iterator Vertex::tracks_end | ( | ) | const |
last iterator over tracks
Definition at line 44 of file Vertex.cc.
References tracks_.
Referenced by FWSecVertexProxyBuilder::build(), calculateVertexSharedTracks(), vertexTools::computeSharedTracks(), computeSharedTracks(), PFRecoTauDiscriminationByFlight::discriminate(), GsfVertexTrackCompatibilityEstimator::estimate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), PATPrimaryVertexSelector::getVertexVariables(), nTracks(), p4(), pat::PATSecondaryVertexSlimmer::produce(), PFchsMETcorrInputProducer::produce(), PVClusterComparer::pTSquaredSum(), NuclearLikelihood::secondaryTrackMaxHits(), reco::NuclearInteraction::secondaryTracks_end(), VertexHigherPtSquared::sumPtSquared(), and reco::TrackKinematics::TrackKinematics().
size_t Vertex::tracksSize | ( | ) | const |
number of tracks
Definition at line 34 of file Vertex.cc.
References weights_.
Referenced by PatVertexAnalyzer::analyze(), NuclearLikelihood::calculate(), EventVtxInfoNtupleDumper::produce(), ConeIsolation::produce(), NuclearLikelihood::secondaryTrackMaxHits(), and reco::NuclearInteraction::secondaryTracksSize().
|
inline |
returns the weight with which a Track has contributed to the vertex-fit.
Definition at line 73 of file Vertex.h.
Referenced by vertexTools::computeSharedTracks(), computeSharedTracks(), nTracks(), p4(), pat::PATSecondaryVertexSlimmer::produce(), and reco::TrackKinematics::TrackKinematics().
|
inline |
x coordinate
Definition at line 101 of file Vertex.h.
Referenced by PatVertexAnalyzer::analyze(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), FWSecVertexProxyBuilder::build(), SignedDecayLength3D::closestApproachToJet(), HLTVertexFilter::hltFilter(), ConversionHitChecker::nHitsBeforeVtx(), pat::VertexAssociationSelector::operator()(), reco::print(), pat::PATConversionProducer::produce(), and SignedTransverseImpactParameter::zImpactParameter().
|
inline |
error on x
Definition at line 107 of file Vertex.h.
Referenced by PatVertexAnalyzer::analyze(), and pf2pat::IPCutPFCandidateSelectorDefinition::select().
|
inline |
y coordinate
Definition at line 103 of file Vertex.h.
Referenced by PatVertexAnalyzer::analyze(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), FWSecVertexProxyBuilder::build(), SignedDecayLength3D::closestApproachToJet(), HLTVertexFilter::hltFilter(), ConversionHitChecker::nHitsBeforeVtx(), pat::VertexAssociationSelector::operator()(), reco::print(), pat::PATConversionProducer::produce(), and SignedTransverseImpactParameter::zImpactParameter().
|
inline |
error on y
Definition at line 109 of file Vertex.h.
Referenced by PatVertexAnalyzer::analyze(), and pf2pat::IPCutPFCandidateSelectorDefinition::select().
|
inline |
y coordinate
Definition at line 105 of file Vertex.h.
Referenced by CMSDAS11DijetTestAnalyzer::analyze(), PatVertexAnalyzer::analyze(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), FWSecVertexProxyBuilder::build(), PFRecoTauTagInfoAlgorithm::buildPFTauTagInfo(), SignedDecayLength3D::closestApproachToJet(), vertexTools::computeSharedTracks(), HLTVertexFilter::hltFilter(), ConversionHitChecker::nHitsBeforeVtx(), PVObjectSelector::operator()(), pat::VertexAssociationSelector::operator()(), reco::print(), EventVtxInfoNtupleDumper::produce(), ConeIsolation::produce(), PFchsMETcorrInputProducer::produce(), ConeIsolationAlgorithm::tag(), ImpactParameterAlgorithm::tag(), and SignedTransverseImpactParameter::zImpactParameter().
|
inline |
error on z
Definition at line 111 of file Vertex.h.
Referenced by PatVertexAnalyzer::analyze(), pat::LeptonVertexSignificance::calculate(), pat::VertexAssociationSelector::operator()(), and pf2pat::IPCutPFCandidateSelectorDefinition::select().
|
private |
|
private |
|
private |
The vector of refitted tracks.
Definition at line 170 of file Vertex.h.
Referenced by nTracks(), originalTrack(), p4(), and removeTracks().
|
private |
reference to tracks
Definition at line 168 of file Vertex.h.
Referenced by originalTrack(), removeTracks(), tracks_begin(), tracks_end(), and Vertex().
|
private |
|
private |
Definition at line 171 of file Vertex.h.
Referenced by removeTracks(), and tracksSize().