#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) | |
typedef math::Error< dimension > ::type | Error |
covariance error matrix (3x3) | |
typedef unsigned int | index |
index type | |
typedef math::XYZPoint | Point |
point in the space | |
typedef std::vector < TrackBaseRef > ::const_iterator | trackRef_iterator |
The iteratator for the vector<TrackRef> | |
Public Member Functions | |
void | add (const TrackBaseRef &r, float w=1.0) |
add a reference to a Track | |
void | add (const TrackBaseRef &r, const Track &refTrack, float w=1.0) |
add the original a Track(reference) and the smoothed Track | |
double | chi2 () const |
chi-squares | |
double | covariance (int i, int j) const |
(i, j)-th element of error matrix, i, j = 0, ... 2 | |
CovarianceMatrix | covariance () const |
return SMatrix | |
Error | error () const |
return SMatrix | |
void | fill (CovarianceMatrix &v) const |
fill SMatrix | |
bool | hasRefittedTracks () const |
Checks whether refitted tracks are stored. | |
bool | isFake () const |
bool | isValid () const |
Tells whether the vertex is valid. | |
double | ndof () const |
double | normalizedChi2 () const |
chi-squared divided by n.d.o.f. | |
unsigned int | nTracks (float minWeight=0.5) const |
Returns the number of tracks in the vertex with weight above minWeight. | |
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. | |
const Point & | position () const |
position | |
Track | refittedTrack (const TrackBaseRef &track) const |
Track | refittedTrack (const TrackRef &track) const |
const std::vector< Track > & | refittedTracks () const |
Returns the container of refitted tracks. | |
void | removeTracks () |
trackRef_iterator | tracks_begin () const |
first iterator over tracks | |
trackRef_iterator | tracks_end () const |
last iterator over tracks | |
size_t | tracksSize () const |
number of tracks | |
float | trackWeight (const TrackBaseRef &r) const |
returns the weight with which a Track has contributed to the vertex-fit. | |
float | trackWeight (const TrackRef &r) const |
returns the weight with which a Track has contributed to the vertex-fit. | |
Vertex (const Point &, const Error &, double chi2, double ndof, size_t size) | |
constructor for a valid vertex, with all data | |
Vertex () | |
Vertex (const Point &, const Error &) | |
Constructor for a fake vertex. | |
double | x () const |
x coordinate | |
double | xError () const |
error on x | |
double | y () const |
y coordinate | |
double | yError () const |
error on y | |
double | z () const |
y coordinate | |
double | zError () const |
error on z | |
Private Member Functions | |
index | idx (index i, index j) const |
position index | |
Private Attributes | |
float | chi2_ |
chi-sqared | |
float | covariance_ [size] |
covariance matrix (3x3) as vector | |
float | ndof_ |
number of degrees of freedom | |
Point | position_ |
position | |
std::vector< Track > | refittedTracks_ |
The vector of refitted tracks. | |
std::vector< TrackBaseRef > | tracks_ |
reference to tracks | |
bool | validity_ |
tells wether the vertex is really valid. | |
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::CovarianceMatrix |
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 |
anonymous enum |
anonymous enum |
reco::Vertex::Vertex | ( | ) | [inline] |
void Vertex::add | ( | const TrackBaseRef & | r, |
float | w = 1.0 |
||
) |
add a reference to a Track
Definition at line 52 of file Vertex.cc.
References tracks_, and weights_.
Referenced by reco::PFDisplacedVertex::addElement(), NuclearVertexBuilder::FillVertexWithCrossingPoint(), NuclearVertexBuilder::FillVertexWithLastPrimHit(), TransientVertex::operator reco::Vertex(), VZeroProducer::produce(), and PixelVertexProducer::produce().
void Vertex::add | ( | const TrackBaseRef & | r, |
const Track & | refTrack, | ||
float | w = 1.0 |
||
) |
add the original a Track(reference) and the smoothed Track
Definition at line 58 of file Vertex.cc.
References refittedTracks_, tracks_, and weights_.
{ tracks_.push_back ( r ); refittedTracks_.push_back ( refTrack ); weights_.push_back(w*255); }
double reco::Vertex::chi2 | ( | void | ) | const [inline] |
chi-squares
Definition at line 82 of file Vertex.h.
References chi2_.
Referenced by PatBJetVertexAnalyzer::analyze(), TkConvValidator::analyze(), ConversionProducer::buildCollection(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), GsfVertexTrackCompatibilityEstimator::estimate(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), HLTVertexFilter::filter(), V0Fitter::fitAll(), PFDisplacedVertexFinder::fitVertexFromSeed(), ConversionTools::isGoodConversion(), EventVtxInfoNtupleDumper::produce(), ConeIsolation::produce(), CandCommonVertexFitterBase::set(), PFCandCommonVertexFitterBase::set(), and PrimaryVertexMonitor::vertexPlots().
{ return chi2_; }
double reco::Vertex::covariance | ( | int | i, |
int | j | ||
) | const [inline] |
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition at line 110 of file Vertex.h.
References covariance_, and idx().
Referenced by SignedImpactParameter3D::apply(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), VertexDistance::compatibility(), reco::SecondaryVertex::computeDist2d(), reco::SecondaryVertex::computeDist3d(), GsfConstraintAtVertex::constrainAtVertex(), VertexDistance::distance(), VertexCompatibleWithBeam::distanceToBeam(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), GsfVertexTrackCompatibilityEstimator::estimate(), V0Fitter::fitAll(), IPTools::linearizedSignedImpactParameter3D(), ConversionHitChecker::nHitsBeforeVtx(), VertexCompatibleWithBeam::operator()(), reco::print(), SecondaryVertexProducer::produce(), PVFitter::pvQuality(), IPTools::signedDecayLength3D(), reco::JetSignalVertexCompatibilityAlgo::trackVertexCompat(), PrimaryVertexMonitor::vertexPlots(), reco::V0Candidate::vtxCovariance(), and SignedTransverseImpactParameter::zImpactParameter().
{ return covariance_[ idx( i, j ) ]; }
CovarianceMatrix reco::Vertex::covariance | ( | void | ) | const [inline] |
Error reco::Vertex::error | ( | ) | const [inline] |
return SMatrix
Definition at line 116 of file Vertex.h.
Referenced by IPTools::absoluteImpactParameter(), FWVertexWithTracksProxyBuilder::build(), FWSecVertexProxyBuilder::build(), reco::SecondaryVertex::computeDist2d(), reco::SecondaryVertex::computeDist3d(), dummyPrediction(), HLTDisplacedmumuFilter::filter(), pat::VertexAssociationSelector::operator()(), TrackIPProducer::produce(), ConeIsolation::produce(), SecondaryVertexProducer::produce(), and reco::GhostTrackVertexFinder::vertices().
void Vertex::fill | ( | CovarianceMatrix & | v | ) | const |
fill SMatrix
Definition at line 28 of file Vertex.cc.
References covariance_, dimension, i, idx(), and j.
Referenced by covariance(), error(), CandCommonVertexFitterBase::set(), and PFCandCommonVertexFitterBase::set().
bool reco::Vertex::hasRefittedTracks | ( | ) | const [inline] |
Checks whether refitted tracks are stored.
Definition at line 121 of file Vertex.h.
References refittedTracks_.
Referenced by nTracks(), reco::VertexFilter::operator()(), CombinedSVComputer::operator()(), GhostTrackComputer::operator()(), p4(), and reco::TrackKinematics::TrackKinematics().
{return !refittedTracks_.empty();}
bool reco::Vertex::isFake | ( | ) | const [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.
Reimplemented in reco::PFDisplacedVertex.
Definition at line 65 of file Vertex.h.
References chi2_, ndof_, and tracks_.
Referenced by TopDiLeptonDQM::analyze(), TopHLTDiMuonDQM::analyze(), HLTVertexFilter::filter(), TauTagTools::filteredPFChargedHadrCands(), TauTagTools::filteredTracks(), PVObjectSelector::operator()(), EventVtxInfoNtupleDumper::produce(), and PrimaryVertexMonitor::vertexPlots().
bool reco::Vertex::isValid | ( | void | ) | const [inline] |
Tells whether the vertex is valid.
Definition at line 61 of file Vertex.h.
References validity_.
Referenced by EwkMuDQM::analyze(), TkConvValidator::analyze(), ConversionProducer::buildCollection(), ConvertedPhotonProducer::buildCollections(), NuclearLikelihood::calculate(), ConversionProducer::checkPhi(), reco::Conversion::dxy(), reco::Conversion::dz(), NuclearVertexBuilder::FillVertexWithAdaptVtxFitter(), HLTVertexFilter::filter(), ConversionTools::isGoodConversion(), reco::Conversion::lxy(), reco::Conversion::lz(), and PrimaryVertexMonitor::vertexPlots().
{return validity_;}
double reco::Vertex::ndof | ( | ) | const [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 89 of file Vertex.h.
References ndof_.
Referenced by TkConvValidator::analyze(), ConversionProducer::buildCollection(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), PrimaryVertexAnalyzer4PU::fillTrackHistos(), HLTVertexFilter::filter(), V0Fitter::fitAll(), PFDisplacedVertexFinder::fitVertexFromSeed(), ConversionTools::isGoodConversion(), PVObjectSelector::operator()(), EventVtxInfoNtupleDumper::produce(), ConeIsolation::produce(), CandCommonVertexFitterBase::set(), PFCandCommonVertexFitterBase::set(), and PrimaryVertexMonitor::vertexPlots().
{ return ndof_; }
double reco::Vertex::normalizedChi2 | ( | ) | const [inline] |
chi-squared divided by n.d.o.f.
Definition at line 91 of file Vertex.h.
Referenced by recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), HLTDisplacedmumuFilter::filter(), and V0Fitter::fitAll().
unsigned int Vertex::nTracks | ( | float | minWeight = 0.5 | ) | const |
Returns the number of tracks in the vertex with weight above minWeight.
Definition at line 147 of file Vertex.cc.
References hasRefittedTracks(), n, originalTrack(), refittedTracks_, tracks_begin(), tracks_end(), and trackWeight().
{ int n=0; if(hasRefittedTracks()) { for(std::vector<Track>::const_iterator iter = refittedTracks_.begin(); iter != refittedTracks_.end(); ++iter) if (trackWeight(originalTrack(*iter)) >=minWeight) n++; } else { for(std::vector<reco::TrackBaseRef>::const_iterator iter = tracks_begin(); iter != tracks_end(); iter++) if (trackWeight(*iter) >=minWeight) n++; } return n; }
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 86 of file Vertex.cc.
References pos, refittedTracks_, and tracks_.
Referenced by PFDisplacedVertexFinder::commonTracks(), PFDisplacedVertexHelper::identifyVertex(), PFDisplacedVertexHelper::lambdaCP(), reco::PFDisplacedVertex::momentum(), nTracks(), and p4().
{ if (refittedTracks_.empty()) throw cms::Exception("Vertex") << "No refitted tracks stored in vertex\n"; std::vector<Track>::const_iterator it = find_if(refittedTracks_.begin(), refittedTracks_.end(), TrackEqual(refTrack)); if (it==refittedTracks_.end()) throw cms::Exception("Vertex") << "Refitted track not found in list\n"; size_t pos = it - refittedTracks_.begin(); return tracks_[pos]; }
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 113 of file Vertex.cc.
References hasRefittedTracks(), originalTrack(), refittedTracks_, tracks_begin(), tracks_end(), and trackWeight().
Referenced by reco::Conversion::refittedPair4Momentum().
{ math::XYZTLorentzVectorD sum; ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > vec; if(hasRefittedTracks()) { for(std::vector<Track>::const_iterator iter = refittedTracks_.begin(); iter != refittedTracks_.end(); ++iter) { if (trackWeight(originalTrack(*iter)) >=minWeight) { vec.SetPx(iter->px()); vec.SetPy(iter->py()); vec.SetPz(iter->pz()); vec.SetM(mass); sum += vec; } } } else { for(std::vector<reco::TrackBaseRef>::const_iterator iter = tracks_begin(); iter != tracks_end(); iter++) { if (trackWeight(*iter) >=minWeight) { vec.SetPx((*iter)->px()); vec.SetPy((*iter)->py()); vec.SetPz((*iter)->pz()); vec.SetM(mass); sum += vec; } } } return sum; }
const Point& reco::Vertex::position | ( | ) | const [inline] |
position
Definition at line 93 of file Vertex.h.
References position_.
Referenced by IPTools::absoluteImpactParameter(), IPTools::absoluteImpactParameter3D(), IPTools::absoluteTransverseImpactParameter(), TopElectronHLTOfflineSource::analyze(), TkConvValidator::analyze(), SignedImpactParameter3D::apply(), CaloRecoTauAlgorithm::buildCaloTau(), PFRecoTauAlgorithm::buildPFTau(), pat::LeptonVertexSignificance::calculate(), ConversionProducer::checkPhi(), VertexDistance::compatibility(), reco::SecondaryVertex::computeDist2d(), reco::SecondaryVertex::computeDist3d(), GsfConstraintAtVertex::constrainAtVertex(), reco::VZero::crossingPoint(), VertexDistance::distance(), VertexCompatibleWithBeam::distanceToBeam(), dummyPrediction(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), GsfVertexTrackCompatibilityEstimator::estimate(), PrimaryVertexAnalyzer4PU::fillTrackHistos(), HLTDisplacedmumuFilter::filter(), TauTagTools::filteredPFChargedHadrCands(), TauTagTools::filteredTracks(), PFDisplacedVertexFinder::fitVertexFromSeed(), PFDisplacedVertexHelper::identifyVertex(), NuclearVertexBuilder::isCompatible(), PFTauQualityCutWrapper::isolationChargedObjects(), ConversionTools::matchesConversion(), InclusiveVertexFinder::nearTracks(), NuclearTrackCorrector::newTrajNeeded(), reco::VertexFilter::operator()(), VertexCompatibleWithBeam::operator()(), pat::VertexAssociationSelector::operator()(), PVObjectSelector::operator()(), print(), EventVtxInfoNtupleDumper::produce(), TrackIPProducer::produce(), SecondaryVertexProducer::produce(), TkConvValidator::recalculateMomentumAtFittedVertex(), pf2pat::IPCutPFCandidateSelectorDefinition::select(), reco::PFDisplacedVertex::setPrimaryDirection(), FWConvTrackHitsDetailView::setTextInfo(), reco::V0Candidate::setVertex(), PFTauQualityCutWrapper::signalChargedObjects(), VertexDistanceXY::signedDistance(), VertexDistance3D::signedDistance(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), ConeIsolationAlgorithm::tag(), ConversionProducer::trackD0Cut(), QcdUeDQM::trackSelection(), reco::JetSignalVertexCompatibilityAlgo::trackVertexCompat(), PrimaryVertexMonitor::vertexPlots(), and reco::GhostTrackVertexFinder::vertices().
{ return position_; }
Track 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
Definition at line 98 of file Vertex.cc.
References Exception, spr::find(), pos, refittedTracks_, tracks_begin(), and tracks_end().
Referenced by CombinedSVComputer::operator()(), GhostTrackComputer::operator()(), refittedTrack(), reco::TrackKinematics::TrackKinematics(), and reco::PFDisplacedVertex::trackPosition().
{ if (refittedTracks_.empty()) throw cms::Exception("Vertex") << "No refitted tracks stored in vertex\n"; trackRef_iterator it = find(tracks_begin(), tracks_end(), track); if (it==tracks_end()) throw cms::Exception("Vertex") << "Track not found in list\n"; size_t pos = it - tracks_begin(); return refittedTracks_[pos]; }
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 108 of file Vertex.cc.
References refittedTrack().
{ return refittedTrack(TrackBaseRef(track)); }
const std::vector<Track>& reco::Vertex::refittedTracks | ( | ) | const [inline] |
Returns the container of refitted tracks.
Definition at line 136 of file Vertex.h.
References refittedTracks_.
Referenced by TkConvValidator::analyze(), PFDisplacedVertexFinder::commonTracks(), PFDisplacedVertexHelper::identifyVertex(), PFDisplacedVertexHelper::isKaonMass(), PFDisplacedVertexHelper::lambdaCP(), reco::PFDisplacedVertex::momentum(), reco::VertexFilter::operator()(), reco::PFDisplacedVertex::totalCharge(), and reco::PFDisplacedVertex::trackPosition().
{ return refittedTracks_;}
void Vertex::removeTracks | ( | ) |
Definition at line 65 of file Vertex.cc.
References refittedTracks_, tracks_, and weights_.
Referenced by reco::PFDisplacedVertex::cleanTracks(), and PFDisplacedVertexFinder::fitVertexFromSeed().
{ weights_.clear(); tracks_.clear(); refittedTracks_.clear(); }
Vertex::trackRef_iterator Vertex::tracks_begin | ( | ) | const |
first iterator over tracks
Definition at line 40 of file Vertex.cc.
References tracks_.
Referenced by NuclearVertexBuilder::addSecondaryTrack(), PatBJetVertexAnalyzer::analyze(), PrimaryVertexAnalyzer4PU::analyzeVertexCollectionTP(), FWVertexWithTracksProxyBuilder::build(), FWSecVertexProxyBuilder::build(), NuclearLikelihood::calculate(), PFPileUp::chargedHadronVertex(), computeSharedTracks(), PFRecoTauDiscriminationByFlight::discriminate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), GsfVertexTrackCompatibilityEstimator::estimate(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), HLTDisplacedmumuFilter::filter(), PrimaryVertexAnalyzer4PU::getTruthMatchedVertexTracks(), PATPrimaryVertexSelector::getVertexVariables(), NuclearVertexBuilder::isCompatible(), reco::VZero::negativeDaughter(), nTracks(), reco::VertexFilter::operator()(), p4(), reco::VZero::positiveDaughter(), reco::NuclearInteraction::primaryTrack(), PrimaryVertexAnalyzer4PU::printEventSummary(), SecondaryVertexProducer::produce(), PVClusterComparer::pTSquaredSum(), refittedTrack(), NuclearLikelihood::secondaryTrackMaxHits(), reco::NuclearInteraction::secondaryTracks_begin(), reco::NbSharedTracks::sharedTracks(), VertexHigherPtSquared::sumPtSquared(), TrackerDpgAnalysis::sumPtSquared(), reco::TrackKinematics::TrackKinematics(), trackWeight(), and PrimaryVertexMonitor::vertexPlots().
{ return tracks_.begin(); }
Vertex::trackRef_iterator Vertex::tracks_end | ( | ) | const |
last iterator over tracks
Definition at line 45 of file Vertex.cc.
References tracks_.
Referenced by NuclearVertexBuilder::addSecondaryTrack(), PatBJetVertexAnalyzer::analyze(), PrimaryVertexAnalyzer4PU::analyzeVertexCollectionTP(), FWVertexWithTracksProxyBuilder::build(), FWSecVertexProxyBuilder::build(), PFPileUp::chargedHadronVertex(), computeSharedTracks(), PFRecoTauDiscriminationByFlight::discriminate(), KalmanVertexTrackCompatibilityEstimator< N >::estimate(), GsfVertexTrackCompatibilityEstimator::estimate(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), PrimaryVertexAnalyzer4PU::getTruthMatchedVertexTracks(), PATPrimaryVertexSelector::getVertexVariables(), nTracks(), reco::VertexFilter::operator()(), p4(), PrimaryVertexAnalyzer4PU::printEventSummary(), SecondaryVertexProducer::produce(), PVClusterComparer::pTSquaredSum(), refittedTrack(), NuclearLikelihood::secondaryTrackMaxHits(), reco::NuclearInteraction::secondaryTracks_end(), reco::NbSharedTracks::sharedTracks(), VertexHigherPtSquared::sumPtSquared(), TrackerDpgAnalysis::sumPtSquared(), reco::TrackKinematics::TrackKinematics(), trackWeight(), and PrimaryVertexMonitor::vertexPlots().
{ // if ( !(tracks_.size() ) ) createTracks(); return tracks_.end(); // return weights_.keys().end(); }
size_t Vertex::tracksSize | ( | ) | const |
number of tracks
Definition at line 35 of file Vertex.cc.
References weights_.
Referenced by PatBJetVertexAnalyzer::analyze(), TopDiLeptonDQM::analyze(), PatVertexAnalyzer::analyze(), TopHLTDiMuonDQM::analyze(), PrimaryVertexAnalyzer4PU::analyzeVertexCollection(), PrimaryVertexAnalyzer4PU::analyzeVertexCollectionTP(), NuclearLikelihood::calculate(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), NuclearVertexBuilder::FillVertexWithAdaptVtxFitter(), HLTDisplacedmumuFilter::filter(), reco::PFDisplacedVertex::momentum(), EventVtxInfoNtupleDumper::produce(), ConeIsolation::produce(), NuclearLikelihood::secondaryTrackMaxHits(), reco::NuclearInteraction::secondaryTracksSize(), reco::PFDisplacedVertex::totalCharge(), and PrimaryVertexMonitor::vertexPlots().
{ return weights_.size(); }
float Vertex::trackWeight | ( | const TrackRef & | r | ) | const |
returns the weight with which a Track has contributed to the vertex-fit.
Definition at line 80 of file Vertex.cc.
References trackWeight().
{ return trackWeight(TrackBaseRef(track)); }
float Vertex::trackWeight | ( | const TrackBaseRef & | r | ) | const |
returns the weight with which a Track has contributed to the vertex-fit.
Definition at line 72 of file Vertex.cc.
References spr::find(), pos, tracks_begin(), tracks_end(), and weights_.
Referenced by FWVertexWithTracksProxyBuilder::build(), PFPileUp::chargedHadronVertex(), computeSharedTracks(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), nTracks(), reco::VertexFilter::operator()(), p4(), PrimaryVertexAnalyzer4PU::printEventSummary(), SecondaryVertexProducer::produce(), reco::TrackKinematics::TrackKinematics(), trackWeight(), and PrimaryVertexMonitor::vertexPlots().
{ trackRef_iterator it = find(tracks_begin(), tracks_end(), track); if (it==tracks_end()) return 0.0; size_t pos = it - tracks_begin(); return weights_[pos]/255.; }
double reco::Vertex::x | ( | ) | const [inline] |
x coordinate
Definition at line 95 of file Vertex.h.
References position_.
Referenced by TopDiLeptonDQM::analyze(), TopHLTDiMuonDQM::analyze(), PatVertexAnalyzer::analyze(), TkConvValidator::analyze(), SignedImpactParameter3D::apply(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::beginEvent(), FWVertexWithTracksProxyBuilder::build(), FWVertexProxyBuilder::build(), FWSecVertexProxyBuilder::build(), PFRecoTauAlgorithm::buildPFTau(), IPTools::closestApproachToJet(), SignedDecayLength3D::closestApproachToJet(), SignedImpactParameter3D::closestApproachToJet(), SignedImpactParameter3D::distance(), SignedImpactParameter3D::distanceWithJetAxis(), reco::Conversion::dxy(), reco::Conversion::dz(), PFPhotonAlgo::EvaluateSingleLegMVA(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), HLTVertexFilter::filter(), V0Fitter::fitAll(), getVertexD0(), ConversionTools::isGoodConversion(), IPTools::jetTrackDistance(), IPTools::linearizedSignedImpactParameter3D(), reco::Conversion::lxy(), reco::PFDisplacedVertex::momentum(), ConversionHitChecker::nHitsBeforeVtx(), pat::VertexAssociationSelector::operator()(), PFAlgo::postMuonCleaning(), reco::print(), SecondaryVertexProducer::produce(), PFAlgo::reconstructCluster(), reco::PFDisplacedVertex::setPrimaryDirection(), FWConvTrackHitsDetailView::setTextInfo(), IPTools::signedDecayLength3D(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), and SignedTransverseImpactParameter::zImpactParameter().
{ return position_.X(); }
double reco::Vertex::xError | ( | ) | const [inline] |
error on x
Definition at line 101 of file Vertex.h.
References covariance(), and mathSSE::sqrt().
Referenced by PatVertexAnalyzer::analyze(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), NuclearVertexBuilder::isCompatible(), pf2pat::IPCutPFCandidateSelectorDefinition::select(), and PrimaryVertexMonitor::vertexPlots().
{ return sqrt( covariance(0, 0) ); }
double reco::Vertex::y | ( | ) | const [inline] |
y coordinate
Definition at line 97 of file Vertex.h.
References position_.
Referenced by TopDiLeptonDQM::analyze(), TopHLTDiMuonDQM::analyze(), PatVertexAnalyzer::analyze(), TkConvValidator::analyze(), SignedImpactParameter3D::apply(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::beginEvent(), FWVertexWithTracksProxyBuilder::build(), FWVertexProxyBuilder::build(), FWSecVertexProxyBuilder::build(), PFRecoTauAlgorithm::buildPFTau(), IPTools::closestApproachToJet(), SignedDecayLength3D::closestApproachToJet(), SignedImpactParameter3D::closestApproachToJet(), SignedImpactParameter3D::distance(), SignedImpactParameter3D::distanceWithJetAxis(), reco::Conversion::dxy(), reco::Conversion::dz(), PFPhotonAlgo::EvaluateSingleLegMVA(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), HLTVertexFilter::filter(), V0Fitter::fitAll(), getVertexD0(), ConversionTools::isGoodConversion(), IPTools::jetTrackDistance(), IPTools::linearizedSignedImpactParameter3D(), reco::Conversion::lxy(), reco::PFDisplacedVertex::momentum(), ConversionHitChecker::nHitsBeforeVtx(), pat::VertexAssociationSelector::operator()(), PFAlgo::postMuonCleaning(), reco::print(), SecondaryVertexProducer::produce(), PFAlgo::reconstructCluster(), reco::PFDisplacedVertex::setPrimaryDirection(), FWConvTrackHitsDetailView::setTextInfo(), IPTools::signedDecayLength3D(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), and SignedTransverseImpactParameter::zImpactParameter().
{ return position_.Y(); }
double reco::Vertex::yError | ( | ) | const [inline] |
error on y
Definition at line 103 of file Vertex.h.
References covariance(), and mathSSE::sqrt().
Referenced by PatVertexAnalyzer::analyze(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), NuclearVertexBuilder::isCompatible(), pf2pat::IPCutPFCandidateSelectorDefinition::select(), and PrimaryVertexMonitor::vertexPlots().
{ return sqrt( covariance(1, 1) ); }
double reco::Vertex::z | ( | ) | const [inline] |
y coordinate
Definition at line 99 of file Vertex.h.
References position_.
Referenced by TopDiLeptonDQM::analyze(), TopHLTDiMuonDQM::analyze(), PatVertexAnalyzer::analyze(), SignedImpactParameter3D::apply(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::beginEvent(), FWVertexWithTracksProxyBuilder::build(), FWVertexProxyBuilder::build(), FWSecVertexProxyBuilder::build(), CaloRecoTauTagInfoAlgorithm::buildCaloTauTagInfo(), PFRecoTauAlgorithm::buildPFTau(), PFRecoTauTagInfoAlgorithm::buildPFTauTagInfo(), IPTools::closestApproachToJet(), SignedDecayLength3D::closestApproachToJet(), SignedImpactParameter3D::closestApproachToJet(), SignedImpactParameter3D::distance(), SignedImpactParameter3D::distanceWithJetAxis(), reco::Conversion::dz(), PFPhotonAlgo::EvaluateSingleLegMVA(), EwkMuTauHistManager::fillHistograms(), EwkElecTauHistManager::fillHistograms(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), HLTVertexFilter::filter(), V0Fitter::fitAll(), IPTools::jetTrackDistance(), IPTools::linearizedSignedImpactParameter3D(), QualityCutsAnalyzer::LoopOverJetTracksAssociation(), reco::Conversion::lz(), PrimaryVertexAnalyzer4PU::matchVertex(), PrimaryVertexAnalyzer::matchVertex(), reco::PFDisplacedVertex::momentum(), ConversionHitChecker::nHitsBeforeVtx(), pat::VertexAssociationSelector::operator()(), PVObjectSelector::operator()(), reco::print(), EventVtxInfoNtupleDumper::produce(), ConeIsolation::produce(), SecondaryVertexProducer::produce(), PFAlgo::reconstructCluster(), reco::PFDisplacedVertex::setPrimaryDirection(), FWConvTrackHitsDetailView::setTextInfo(), IPTools::signedDecayLength3D(), IPTools::signedImpactParameter3D(), ConeIsolationAlgorithm::tag(), and SignedTransverseImpactParameter::zImpactParameter().
{ return position_.Z(); }
double reco::Vertex::zError | ( | ) | const [inline] |
error on z
Definition at line 105 of file Vertex.h.
References covariance(), and mathSSE::sqrt().
Referenced by PatVertexAnalyzer::analyze(), pat::LeptonVertexSignificance::calculate(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), NuclearVertexBuilder::isCompatible(), pat::VertexAssociationSelector::operator()(), pf2pat::IPCutPFCandidateSelectorDefinition::select(), and PrimaryVertexMonitor::vertexPlots().
{ return sqrt( covariance(2, 2) ); }
float reco::Vertex::chi2_ [private] |
chi-sqared
Definition at line 153 of file Vertex.h.
Referenced by chi2(), isFake(), and normalizedChi2().
float reco::Vertex::covariance_[size] [private] |
covariance matrix (3x3) as vector
Definition at line 159 of file Vertex.h.
Referenced by covariance(), fill(), and Vertex().
float reco::Vertex::ndof_ [private] |
number of degrees of freedom
Definition at line 155 of file Vertex.h.
Referenced by isFake(), ndof(), and normalizedChi2().
Point reco::Vertex::position_ [private] |
std::vector<Track> reco::Vertex::refittedTracks_ [private] |
The vector of refitted tracks.
Definition at line 163 of file Vertex.h.
Referenced by add(), hasRefittedTracks(), nTracks(), originalTrack(), p4(), refittedTrack(), refittedTracks(), and removeTracks().
std::vector<TrackBaseRef > reco::Vertex::tracks_ [private] |
reference to tracks
Definition at line 161 of file Vertex.h.
Referenced by add(), isFake(), originalTrack(), removeTracks(), tracks_begin(), tracks_end(), and Vertex().
bool reco::Vertex::validity_ [private] |
std::vector<uint8_t> reco::Vertex::weights_ [private] |
Definition at line 164 of file Vertex.h.
Referenced by add(), removeTracks(), tracksSize(), and trackWeight().