CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
reco::Vertex Class Reference

#include <Vertex.h>

Inheritance diagram for reco::Vertex:
reco::PFDisplacedVertex

Classes

class  TrackEqual
 

Public Types

enum  { dimension = 3, dimension4D = 4 }
 error matrix dimension More...
 
enum  { size = dimension * (dimension + 1) / 2, size4D = (dimension4D) * (dimension4D + 1) / 2 }
 matix size More...
 
typedef math::Error< dimension >::type CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef math::Error< dimension4D >::type CovarianceMatrix4D
 covariance error matrix (4x4) More...
 
typedef math::Error< dimension >::type Error
 covariance error matrix (3x3) More...
 
typedef math::Error< dimension4D >::type Error4D
 covariance error matrix (4x4) 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, const Track &refTrack, float w=1.0)
 add the original a Track(reference) and the smoothed Track More...
 
template<typename Ref >
void add (Ref const &r, float w=1.0)
 add a reference to a Track More...
 
double chi2 () const
 chi-squares More...
 
CovarianceMatrix covariance () const
 return SMatrix More...
 
double covariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix4D covariance4D () const
 return SMatrix 4D More...
 
Error error () const
 return SMatrix More...
 
Error4D error4D () const
 return SMatrix More...
 
void fill (CovarianceMatrix &v) const
 fill SMatrix More...
 
void fill (CovarianceMatrix4D &v) const
 4D version 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 Pointposition () 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 ()
 
void reserve (int size, bool refitAsWell=false)
 reserve space for the tracks More...
 
double t () const
 t coordinate More...
 
double tError () const
 error on t More...
 
const TrackBaseReftrackRefAt (size_t idx) const
 python friendly track getting More...
 
const auto & tracks () const
 
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...
 
 Vertex (const Point &, const Error4D &, double time, double chi2, double ndof, size_t size)
 constructor for a valid vertex, with all data 4D More...
 
 Vertex (const Point &, const Error4D &, double)
 Constructor for a fake vertex. 4D. 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
 z 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_ [size4D]
 covariance matrix (4x4) as vector More...
 
float ndof_
 number of degrees of freedom More...
 
Point position_
 position More...
 
std::vector< TrackrefittedTracks_
 The vector of refitted tracks. More...
 
double time_
 
std::vector< TrackBaseReftracks_
 reference to tracks More...
 
bool validity_
 tells wether the vertex is really valid. More...
 
std::vector< uint8_t > weights_
 

Detailed Description

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.

Author
Luca Lista, INFN

Definition at line 35 of file Vertex.h.

Member Typedef Documentation

◆ CovarianceMatrix

covariance error matrix (3x3)

Definition at line 46 of file Vertex.h.

◆ CovarianceMatrix4D

covariance error matrix (4x4)

Definition at line 50 of file Vertex.h.

◆ Error

covariance error matrix (3x3)

Definition at line 44 of file Vertex.h.

◆ Error4D

covariance error matrix (4x4)

Definition at line 48 of file Vertex.h.

◆ index

typedef unsigned int reco::Vertex::index

index type

Definition at line 54 of file Vertex.h.

◆ Point

point in the space

Definition at line 40 of file Vertex.h.

◆ trackRef_iterator

typedef std::vector<TrackBaseRef>::const_iterator reco::Vertex::trackRef_iterator

The iteratator for the vector<TrackRef>

Definition at line 38 of file Vertex.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

error matrix dimension

Enumerator
dimension 
dimension4D 

Definition at line 42 of file Vertex.h.

42 { dimension = 3, dimension4D = 4 };

◆ anonymous enum

anonymous enum

matix size

Enumerator
size 
size4D 

Definition at line 52 of file Vertex.h.

52 { size = dimension * (dimension + 1) / 2, size4D = (dimension4D) * (dimension4D + 1) / 2 };

Constructor & Destructor Documentation

◆ Vertex() [1/5]

reco::Vertex::Vertex ( )
inline

default constructor - The vertex will not be valid. Position, error, chi2, ndof will have random entries, and the vectors of tracks will be empty Use the isValid method to check that your vertex is valid.

Definition at line 58 of file Vertex.h.

58  : chi2_(0.0), ndof_(0), position_(0., 0., 0.), time_(0.) {
59  validity_ = false;
60  for (int i = 0; i < size4D; ++i)
61  covariance_[i] = 0.;
62  }

References covariance_, mps_fire::i, size4D, and validity_.

◆ Vertex() [2/5]

Vertex::Vertex ( const Point p,
const Error err 
)

Constructor for a fake vertex.

Definition at line 34 of file Vertex.cc.

34  : chi2_(0.0), ndof_(0), position_(p), time_(0.) {
35  index idx = 0;
36  for (index i = 0; i < dimension4D; ++i) {
37  for (index j = 0; j <= i; ++j) {
38  if (i == dimension || j == dimension) {
39  covariance_[idx++] = 0.0;
40  } else {
41  covariance_[idx++] = err(i, j);
42  }
43  }
44  }
45  validity_ = true;
46 }

References covariance_, dimension, dimension4D, submitPVResolutionJobs::err, mps_fire::i, idx(), dqmiolumiharvest::j, and validity_.

◆ Vertex() [3/5]

Vertex::Vertex ( const Point p,
const Error4D err,
double  time 
)

Constructor for a fake vertex. 4D.

Definition at line 48 of file Vertex.cc.

48  : chi2_(0.0), ndof_(0), position_(p), time_(time) {
49  index idx = 0;
50  for (index i = 0; i < dimension + 1; ++i)
51  for (index j = 0; j <= i; ++j)
52  covariance_[idx++] = err(i, j);
53  validity_ = true;
54 }

References covariance_, dimension, submitPVResolutionJobs::err, mps_fire::i, idx(), dqmiolumiharvest::j, and validity_.

◆ Vertex() [4/5]

Vertex::Vertex ( const Point p,
const Error err,
double  chi2,
double  ndof,
size_t  size 
)

constructor for a valid vertex, with all data

Definition at line 8 of file Vertex.cc.

9  : chi2_(chi2), ndof_(ndof), position_(p), time_(0.) {
10  tracks_.reserve(size);
11  index idx = 0;
12  for (index i = 0; i < dimension4D; ++i) {
13  for (index j = 0; j <= i; ++j) {
14  if (i == dimension || j == dimension) {
15  covariance_[idx++] = 0.0;
16  } else {
17  covariance_[idx++] = err(i, j);
18  }
19  }
20  }
21  validity_ = true;
22 }

References covariance_, dimension, dimension4D, submitPVResolutionJobs::err, mps_fire::i, idx(), dqmiolumiharvest::j, size, tracks_, and validity_.

◆ Vertex() [5/5]

Vertex::Vertex ( const Point p,
const Error4D err,
double  time,
double  chi2,
double  ndof,
size_t  size 
)

constructor for a valid vertex, with all data 4D

Definition at line 24 of file Vertex.cc.

26  tracks_.reserve(size4D);
27  index idx = 0;
28  for (index i = 0; i < dimension4D; ++i)
29  for (index j = 0; j <= i; ++j)
30  covariance_[idx++] = err(i, j);
31  validity_ = true;
32 }

References covariance_, dimension4D, submitPVResolutionJobs::err, mps_fire::i, idx(), dqmiolumiharvest::j, size4D, tracks_, and validity_.

Member Function Documentation

◆ add() [1/2]

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 69 of file Vertex.cc.

69  {
70  tracks_.push_back(r);
71  refittedTracks_.push_back(refTrack);
72  weights_.push_back(w * 255);
73 }

References alignCSCRings::r, refittedTracks_, tracks_, w, and weights_.

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ add() [2/2]

template<typename Ref >
void reco::Vertex::add ( Ref const &  r,
float  w = 1.0 
)
inline

add a reference to a Track

Definition at line 86 of file Vertex.h.

86  {
87  tracks_.emplace_back(r);
88  weights_.emplace_back(w * 255.f);
89  }

References f, alignCSCRings::r, tracks_, w, and weights_.

Referenced by reco::PFDisplacedVertex::addElement(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ chi2()

double reco::Vertex::chi2 ( void  ) const
inline

◆ covariance() [1/2]

CovarianceMatrix reco::Vertex::covariance ( void  ) const
inline

return SMatrix

Definition at line 150 of file Vertex.h.

150  {
151  Error m;
152  fill(m);
153  return m;
154  }

References fill(), and visualization-live-secondInstance_cfg::m.

Referenced by tError(), xError(), yError(), and zError().

◆ covariance() [2/2]

double reco::Vertex::covariance ( int  i,
int  j 
) const
inline

(i, j)-th element of error matrix, i, j = 0, ... 2

Definition at line 148 of file Vertex.h.

148 { return covariance_[idx(i, j)]; }

References covariance_, mps_fire::i, idx(), and dqmiolumiharvest::j.

Referenced by VertexDistance::compatibility(), VertexDistance::distance(), V0Fitter::fitAll(), and reco::V0Candidate::vtxCovariance().

◆ covariance4D()

CovarianceMatrix4D reco::Vertex::covariance4D ( ) const
inline

return SMatrix 4D

Definition at line 156 of file Vertex.h.

156  {
157  Error4D m;
158  fill(m);
159  return m;
160  }

References fill(), and visualization-live-secondInstance_cfg::m.

◆ error()

Error reco::Vertex::error ( ) const
inline

◆ error4D()

Error4D reco::Vertex::error4D ( ) const
inline

return SMatrix

Definition at line 169 of file Vertex.h.

169  {
170  Error4D m;
171  fill(m);
172  return m;
173  }

References fill(), and visualization-live-secondInstance_cfg::m.

◆ fill() [1/2]

void reco::Vertex::fill ( CovarianceMatrix v) const

fill SMatrix

Referenced by covariance(), covariance4D(), error(), error4D(), and fill().

◆ fill() [2/2]

void Vertex::fill ( CovarianceMatrix4D v) const

4D version

Definition at line 56 of file Vertex.cc.

56  {
57  Error4D temp;
58  fill(temp);
59  err = temp.Sub<Error>(0, 0);
60 }

References submitPVResolutionJobs::err, fill(), and groupFilesInBlocks::temp.

◆ hasRefittedTracks()

bool reco::Vertex::hasRefittedTracks ( ) const
inline

Checks whether refitted tracks are stored.

Definition at line 181 of file Vertex.h.

181 { return !refittedTracks_.empty(); }

References refittedTracks_.

Referenced by nTracks(), p4(), and Onia2MuMuPAT::produce().

◆ idx()

index reco::Vertex::idx ( index  i,
index  j 
) const
inlineprivate

position index

Definition at line 232 of file Vertex.h.

232  {
233  int a = (i <= j ? i : j), b = (i <= j ? j : i);
234  return b * (b + 1) / 2 + a;
235  }

References a, b, mps_fire::i, and dqmiolumiharvest::j.

Referenced by covariance(), ntupleDataFormat.TrackMatchInfo::track(), ntupleDataFormat.TrackingParticleMatchInfo::trackingParticle(), trackRefAt(), and Vertex().

◆ isFake()

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.

Definition at line 76 of file Vertex.h.

76 { return (chi2_ == 0 && ndof_ == 0 && tracks_.empty()); }

References chi2_, ndof_, and tracks_.

Referenced by TrackingMonitor::analyze(), FSQDQM::analyze(), SplitVertexResolution::analyze(), and BVertexFilterT< VTX >::filter().

◆ isValid()

bool reco::Vertex::isValid ( void  ) const
inline

◆ ndof()

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 123 of file Vertex.h.

123 { return ndof_; }

References ndof_.

Referenced by BPHGenericVertexSelect::accept(), CMSDAS11DijetAnalyzer::analyze(), CMSDAS11DijetTestAnalyzer::analyze(), SiPixelTrackResidualSource::analyze(), BPHMonitor::analyze(), TkConvValidator::analyze(), TrackingMonitor::analyze(), SplitVertexResolution::analyze(), ConversionProducer::buildCollection(), ConversionLessByChi2(), reco::PFDisplacedVertex::Dump(), V0Fitter::fitAll(), PFDisplacedVertexFinder::fitVertexFromSeed(), HLTmumutkFilter::hltFilter(), HLTmumutktkFilter::hltFilter(), and ConeIsolation::produce().

◆ normalizedChi2()

double reco::Vertex::normalizedChi2 ( ) const
inline

chi-squared divided by n.d.o.f.

Definition at line 125 of file Vertex.h.

125 { return ndof_ != 0 ? chi2_ / ndof_ : chi2_ * 1e6; }

References chi2_, and ndof_.

Referenced by FSQDQM::analyze(), reco::PFDisplacedVertex::Dump(), V0Fitter::fitAll(), HLTmumutkFilter::hltFilter(), and HLTmumutktkFilter::hltFilter().

◆ nTracks()

unsigned int Vertex::nTracks ( float  minWeight = 0.5) const

Returns the number of tracks in the vertex with weight above minWeight.

Definition at line 131 of file Vertex.cc.

131  {
132  int n = 0;
133  if (hasRefittedTracks()) {
134  for (std::vector<Track>::const_iterator iter = refittedTracks_.begin(); iter != refittedTracks_.end(); ++iter)
135  if (trackWeight(originalTrack(*iter)) >= minWeight)
136  n++;
137  } else {
138  for (std::vector<reco::TrackBaseRef>::const_iterator iter = tracks_begin(); iter != tracks_end(); iter++)
139  if (trackWeight(*iter) >= minWeight)
140  n++;
141  }
142  return n;
143 }

References hasRefittedTracks(), fftjetcommon_cfi::minWeight, dqmiodumpmetadata::n, originalTrack(), refittedTracks_, tracks_begin(), tracks_end(), and trackWeight().

Referenced by SplitVertexResolution::analyze().

◆ originalTrack()

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 81 of file Vertex.cc.

81  {
82  if (refittedTracks_.empty())
83  throw cms::Exception("Vertex") << "No refitted tracks stored in vertex\n";
84  std::vector<Track>::const_iterator it = find_if(refittedTracks_.begin(), refittedTracks_.end(), TrackEqual(refTrack));
85  if (it == refittedTracks_.end())
86  throw cms::Exception("Vertex") << "Refitted track not found in list\n";
87  size_t pos = it - refittedTracks_.begin();
88  return tracks_[pos];
89 }

References refittedTracks_, and tracks_.

Referenced by PFDisplacedVertexFinder::commonTracks(), PF_PU_AssoMapAlgos::FindNIVertex(), reco::PFDisplacedVertex::isIncomingTrack(), reco::PFDisplacedVertex::isMergedTrack(), reco::PFDisplacedVertex::isOutgoingTrack(), reco::PFDisplacedVertex::isPrimaryTrack(), reco::PFDisplacedVertex::isSecondaryTrack(), reco::PFDisplacedVertex::momentum(), nTracks(), p4(), Onia2MuMuPAT::produce(), reco::PFDisplacedVertex::trackHitFullInfo(), and reco::PFDisplacedVertex::trackPosition().

◆ 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 103 of file Vertex.cc.

103  {
105  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > vec;
106 
107  if (hasRefittedTracks()) {
108  for (std::vector<Track>::const_iterator iter = refittedTracks_.begin(); iter != refittedTracks_.end(); ++iter) {
109  if (trackWeight(originalTrack(*iter)) >= minWeight) {
110  vec.SetPx(iter->px());
111  vec.SetPy(iter->py());
112  vec.SetPz(iter->pz());
113  vec.SetM(mass);
114  sum += vec;
115  }
116  }
117  } else {
118  for (std::vector<reco::TrackBaseRef>::const_iterator iter = tracks_begin(); iter != tracks_end(); iter++) {
119  if (trackWeight(*iter) >= minWeight) {
120  vec.SetPx((*iter)->px());
121  vec.SetPy((*iter)->py());
122  vec.SetPz((*iter)->pz());
123  vec.SetM(mass);
124  sum += vec;
125  }
126  }
127  }
128  return sum;
129 }

References hasRefittedTracks(), EgHLTOffHistBins_cfi::mass, fftjetcommon_cfi::minWeight, originalTrack(), refittedTracks_, tracks_begin(), tracks_end(), and trackWeight().

Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), Lepton.Lepton::p4WithFSR(), and reco::Conversion::refittedPair4Momentum().

◆ position()

const Point& reco::Vertex::position ( ) const
inline

position

Definition at line 127 of file Vertex.h.

127 { return position_; }

References position_.

Referenced by CMSDAS11DijetAnalyzer::analyze(), CMSDAS11DijetTestAnalyzer::analyze(), TrackTypeMonitor::analyze(), ElectronConversionRejectionValidator::analyze(), TkConvValidator::analyze(), TrackToTrackComparisonHists::analyze(), TrackingMonitor::analyze(), DiElectronVertexValidation::analyze(), FSQDQM::analyze(), PackedCandidateTrackValidator::analyze(), pat::LeptonVertexSignificance::calculate(), reco::PFMETProducerMVA::chargedFracInCone(), PFAlgo::checkGoodTrackDeadHcal(), VertexDistance::compatibility(), reco::PFMETProducerMVA::computePFCandidateInfo(), JetCoreMCtruthSeedGenerator::coreHitsFilling(), JetCoreMCtruthSeedGenerator::DetectorSelector(), DeepCoreSeedGenerator::DetectorSelector(), VertexDistance::distance(), reco::PFDisplacedVertex::Dump(), BPHWriteSpecificDecay::fill(), SingleTopTChannelLepton_miniAOD::MonitorEnsemble::fill(), TopSingleLepton_miniAOD::MonitorEnsemble::fill(), TopSingleLepton::MonitorEnsemble::fill(), SingleTopTChannelLepton::MonitorEnsemble::fill(), DeepBoostedJetTagInfoProducer::fillParticleFeatures(), PFEGammaAlgo::fillPFCandidates(), TrackingFailureFilter::filter(), PF_PU_AssoMapAlgos::FindNIVertex(), L1TTauOffline::getPrimaryVertex(), HLTmumutkFilter::hltFilter(), HLTmumutktkFilter::hltFilter(), isTightMuonCustom(), PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::loop(), L3MuonTrajectoryBuilder::makeTkCandCollection(), NuclearTrackCorrector::newTrajNeeded(), TOFPIDProducer::produce(), Onia2MuMuPAT::produce(), DeepCoreSeedGenerator::produce(), PFAlgo::recoTracksNotHCAL(), reco::PFDisplacedVertex::setPrimaryDirection(), reco::V0Candidate::setRecoVertex(), VertexDistanceXY::signedDistance(), VertexDistance3D::signedDistance(), JetCoreMCtruthSeedGenerator::splittedClusterDirections(), DeepCoreSeedGenerator::splittedClusterDirections(), and ConversionProducer::trackD0Cut().

◆ refittedTrack() [1/2]

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 91 of file Vertex.cc.

91  {
92  if (refittedTracks_.empty())
93  throw cms::Exception("Vertex") << "No refitted tracks stored in vertex\n";
95  if (it == tracks_end())
96  throw cms::Exception("Vertex") << "Track not found in list\n";
97  size_t pos = it - tracks_begin();
98  return refittedTracks_[pos];
99 }

References Exception, spr::find(), refittedTracks_, HLT_FULL_cff::track, tracks_begin(), and tracks_end().

Referenced by refittedTrack(), and reco::PFDisplacedVertex::trackPosition().

◆ refittedTrack() [2/2]

Track Vertex::refittedTrack ( const TrackRef 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 101 of file Vertex.cc.

101 { return refittedTrack(TrackBaseRef(track)); }

References refittedTrack(), and HLT_FULL_cff::track.

◆ refittedTracks()

const std::vector<Track>& reco::Vertex::refittedTracks ( ) const
inline

◆ removeTracks()

void Vertex::removeTracks ( )

Definition at line 75 of file Vertex.cc.

75  {
76  weights_.clear();
77  tracks_.clear();
78  refittedTracks_.clear();
79 }

References refittedTracks_, tracks_, and weights_.

Referenced by reco::PFDisplacedVertex::cleanTracks(), and PFDisplacedVertexFinder::fitVertexFromSeed().

◆ reserve()

void reco::Vertex::reserve ( int  size,
bool  refitAsWell = false 
)
inline

reserve space for the tracks

Definition at line 78 of file Vertex.h.

78  {
79  tracks_.reserve(size);
80  if (refitAsWell)
81  refittedTracks_.reserve(size);
82  weights_.reserve(size);
83  }

References refittedTracks_, size, tracks_, and weights_.

Referenced by Onia2MuMuPAT::produce().

◆ t()

double reco::Vertex::t ( ) const
inline

t coordinate

Definition at line 135 of file Vertex.h.

135 { return time_; }

References time_.

Referenced by reco::Vertex::TrackEqual::operator()(), TOFPIDProducer::produce(), and trackWeight().

◆ tError()

double reco::Vertex::tError ( ) const
inline

error on t

Definition at line 143 of file Vertex.h.

143 { return sqrt(covariance(3, 3)); }

References covariance(), and mathSSE::sqrt().

◆ trackRefAt()

const TrackBaseRef& reco::Vertex::trackRefAt ( size_t  idx) const
inline

python friendly track getting

Definition at line 114 of file Vertex.h.

114 { return tracks_[idx]; }

References idx(), and tracks_.

◆ tracks()

const auto& reco::Vertex::tracks ( void  ) const
inline

Definition at line 106 of file Vertex.h.

106 { return tracks_; }

References tracks_.

◆ tracks_begin()

trackRef_iterator reco::Vertex::tracks_begin ( ) const
inline

◆ tracks_end()

trackRef_iterator reco::Vertex::tracks_end ( ) const
inline

◆ tracksSize()

size_t reco::Vertex::tracksSize ( ) const
inline

◆ trackWeight()

template<typename TREF >
float reco::Vertex::trackWeight ( const TREF &  r) const
inline

returns the weight with which a Track has contributed to the vertex-fit.

Definition at line 96 of file Vertex.h.

96  {
97  int i = 0;
98  for (auto const &t : tracks_) {
99  if ((r.id() == t.id()) & (t.key() == r.key()))
100  return weights_[i] / 255.f;
101  ++i;
102  }
103  return 0;
104  }

References mps_fire::i, alignCSCRings::r, t(), tracks_, and weights_.

Referenced by nTracks(), p4(), and Onia2MuMuPAT::produce().

◆ x()

double reco::Vertex::x ( ) const
inline

◆ xError()

double reco::Vertex::xError ( ) const
inline

◆ y()

double reco::Vertex::y ( ) const
inline

◆ yError()

double reco::Vertex::yError ( ) const
inline

error on y

Definition at line 139 of file Vertex.h.

139 { return sqrt(covariance(1, 1)); }

References covariance(), and mathSSE::sqrt().

Referenced by FSQDQM::analyze(), SplitVertexResolution::analyze(), and PrimaryVertexResolution::Resolution::Resolution().

◆ z()

double reco::Vertex::z ( ) const
inline

◆ zError()

double reco::Vertex::zError ( ) const
inline

Member Data Documentation

◆ chi2_

float reco::Vertex::chi2_
private

chi-sqared

Definition at line 215 of file Vertex.h.

Referenced by chi2(), isFake(), and normalizedChi2().

◆ covariance_

float reco::Vertex::covariance_[size4D]
private

covariance matrix (4x4) as vector

Definition at line 221 of file Vertex.h.

Referenced by covariance(), and Vertex().

◆ ndof_

float reco::Vertex::ndof_
private

number of degrees of freedom

Definition at line 217 of file Vertex.h.

Referenced by isFake(), ndof(), and normalizedChi2().

◆ position_

Point reco::Vertex::position_
private

position

Definition at line 219 of file Vertex.h.

Referenced by position(), x(), y(), and z().

◆ refittedTracks_

std::vector<Track> reco::Vertex::refittedTracks_
private

The vector of refitted tracks.

Definition at line 225 of file Vertex.h.

Referenced by add(), hasRefittedTracks(), nTracks(), originalTrack(), p4(), refittedTrack(), refittedTracks(), removeTracks(), and reserve().

◆ time_

double reco::Vertex::time_
private

Definition at line 229 of file Vertex.h.

Referenced by t().

◆ tracks_

std::vector<TrackBaseRef> reco::Vertex::tracks_
private

◆ validity_

bool reco::Vertex::validity_
private

tells wether the vertex is really valid.

Definition at line 228 of file Vertex.h.

Referenced by isValid(), and Vertex().

◆ weights_

std::vector<uint8_t> reco::Vertex::weights_
private

Definition at line 226 of file Vertex.h.

Referenced by add(), removeTracks(), reserve(), and trackWeight().

reco::Vertex::trackRef_iterator
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
reco::Vertex::dimension4D
Definition: Vertex.h:42
reco::Vertex::time_
double time_
Definition: Vertex.h:229
reco::Vertex::originalTrack
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
reco::Vertex::chi2_
float chi2_
chi-sqared
Definition: Vertex.h:215
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
reco::Vertex::Error
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
reco::Vertex::refittedTrack
Track refittedTrack(const TrackBaseRef &track) const
Definition: Vertex.cc:91
pos
Definition: PixelAliasList.h:18
protons_cff.time
time
Definition: protons_cff.py:35
reco::Vertex::dimension
Definition: Vertex.h:42
reco::TrackBaseRef
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:35
reco::Vertex::idx
index idx(index i, index j) const
position index
Definition: Vertex.h:232
reco::Vertex::tracks_end
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.h:110
reco::Vertex::validity_
bool validity_
tells wether the vertex is really valid.
Definition: Vertex.h:228
fftjetcommon_cfi.minWeight
minWeight
Definition: fftjetcommon_cfi.py:213
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
reco::Vertex::tracks_
std::vector< TrackBaseRef > tracks_
reference to tracks
Definition: Vertex.h:223
w
const double w
Definition: UKUtility.cc:23
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
b
double b
Definition: hdecay.h:118
reco::Vertex::hasRefittedTracks
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
Definition: Vertex.h:181
reco::Vertex::covariance
CovarianceMatrix covariance() const
return SMatrix
Definition: Vertex.h:150
reco::Vertex::tracks_begin
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.h:108
reco::Vertex::refittedTracks_
std::vector< Track > refittedTracks_
The vector of refitted tracks.
Definition: Vertex.h:225
a
double a
Definition: hdecay.h:119
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::Vertex::position_
Point position_
position
Definition: Vertex.h:219
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
reco::Vertex::chi2
double chi2() const
chi-squares
Definition: Vertex.h:116
reco::Vertex::size4D
Definition: Vertex.h:52
alignCSCRings.r
r
Definition: alignCSCRings.py:93
reco::Vertex::trackWeight
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
Definition: Vertex.h:96
reco::Vertex::fill
void fill(CovarianceMatrix &v) const
fill SMatrix
reco::Vertex::t
double t() const
t coordinate
Definition: Vertex.h:135
Exception
Definition: hltDiff.cc:245
reco::Vertex::covariance_
float covariance_[size4D]
covariance matrix (4x4) as vector
Definition: Vertex.h:221
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
reco::Vertex::ndof_
float ndof_
number of degrees of freedom
Definition: Vertex.h:217
cms::Exception
Definition: Exception.h:70
reco::Vertex::index
unsigned int index
index type
Definition: Vertex.h:54
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
reco::Vertex::ndof
double ndof() const
Definition: Vertex.h:123
reco::Vertex::size
Definition: Vertex.h:52
reco::Vertex::Error4D
math::Error< dimension4D >::type Error4D
covariance error matrix (4x4)
Definition: Vertex.h:48
reco::Vertex::weights_
std::vector< uint8_t > weights_
Definition: Vertex.h:226
math::Error
fixed size error matrix
Definition: Error.h:31