Go to the documentation of this file.00001
00002 #include "DataFormats/Candidate/interface/VertexCompositeCandidate.h"
00003
00004 using namespace reco;
00005
00006 VertexCompositeCandidate::VertexCompositeCandidate(Charge q, const LorentzVector & p4, const Point & vtx,
00007 const CovarianceMatrix & err, double chi2, double ndof,
00008 int pdgId, int status, bool integerCharge) :
00009 CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge),
00010 chi2_(chi2), ndof_(ndof) {
00011 setCovariance(err);
00012 }
00013
00014 VertexCompositeCandidate::~VertexCompositeCandidate() { }
00015
00016 VertexCompositeCandidate * VertexCompositeCandidate::clone() const {
00017 return new VertexCompositeCandidate(*this);
00018 }
00019
00020 void VertexCompositeCandidate::fillVertexCovariance(CovarianceMatrix& err) const {
00021 index idx = 0;
00022 for(index i = 0; i < dimension; ++i)
00023 for(index j = 0; j <= i; ++ j)
00024 err(i, j) = covariance_[idx++];
00025 }
00026
00027 void VertexCompositeCandidate::setCovariance(const CovarianceMatrix & err) {
00028 index idx = 0;
00029 for(index i = 0; i < dimension; ++i)
00030 for(index j = 0; j <= i; ++j)
00031 covariance_[idx++] = err(i, j);
00032 }