CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

reco::VertexCompositeCandidate Class Reference

#include <VertexCompositeCandidate.h>

Inheritance diagram for reco::VertexCompositeCandidate:
reco::CompositeCandidate reco::LeafCandidate reco::Candidate

List of all members.

Public Member Functions

virtual VertexCompositeCandidateclone () const
 returns a clone of the candidate
virtual void fillVertexCovariance (CovarianceMatrix &v) const
 fill SMatrix
void setChi2AndNdof (double chi2, double ndof)
 set chi2 and ndof
void setCovariance (const CovarianceMatrix &m)
 set covariance matrix
virtual double vertexChi2 () const
 chi-squares
 VertexCompositeCandidate (Charge q, const LorentzVector &p4, const Point &vtx, int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
 VertexCompositeCandidate (const Candidate &p)
 constructor from values
 VertexCompositeCandidate (const CompositeCandidate &p)
 constructor from values
 VertexCompositeCandidate ()
 VertexCompositeCandidate (Charge q, const LorentzVector &p4, const Point &vtx, const CovarianceMatrix &err, double chi2, double ndof, int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2
virtual double vertexNdof () const
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f.
virtual ~VertexCompositeCandidate ()
 destructor

Private Member Functions

index idx (index i, index j) const
 position index

Private Attributes

Double32_t chi2_
 chi-sqared
Double32_t covariance_ [size]
 covariance matrix (3x3) as vector
Double32_t ndof_
 number of degrees of freedom

Detailed Description

A composite Candidate with error matrix and other vertex fix information.

Author:
Luca Lista, INFN
Version:
Id:
VertexCompositeCandidate.h,v 1.9 2009/11/02 21:46:53 srappocc Exp

Definition at line 17 of file VertexCompositeCandidate.h.


Constructor & Destructor Documentation

reco::VertexCompositeCandidate::VertexCompositeCandidate ( ) [inline]

Definition at line 19 of file VertexCompositeCandidate.h.

Referenced by clone().

reco::VertexCompositeCandidate::VertexCompositeCandidate ( Charge  q,
const LorentzVector p4,
const Point vtx,
int  pdgId = 0,
int  status = 0,
bool  integerCharge = true 
) [inline]

constructor from values

Definition at line 21 of file VertexCompositeCandidate.h.

                                                                                       :
      CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge),
      chi2_(0), ndof_(0) { }
VertexCompositeCandidate::VertexCompositeCandidate ( Charge  q,
const LorentzVector p4,
const Point vtx,
const CovarianceMatrix err,
double  chi2,
double  ndof,
int  pdgId = 0,
int  status = 0,
bool  integerCharge = true 
)

constructor from values

Definition at line 6 of file VertexCompositeCandidate.cc.

References setCovariance().

                                                                                              :
  CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge),
  chi2_(chi2), ndof_(ndof) { 
  setCovariance(err);
}
reco::VertexCompositeCandidate::VertexCompositeCandidate ( const Candidate p) [inline, explicit]

constructor from values

Definition at line 30 of file VertexCompositeCandidate.h.

                                                           :
      CompositeCandidate(p), chi2_(0), ndof_(0) { }
reco::VertexCompositeCandidate::VertexCompositeCandidate ( const CompositeCandidate p) [inline, explicit]

constructor from values

Definition at line 33 of file VertexCompositeCandidate.h.

                                                                    :
      CompositeCandidate(p), chi2_(0), ndof_(0) { }
VertexCompositeCandidate::~VertexCompositeCandidate ( ) [virtual]

destructor

Definition at line 14 of file VertexCompositeCandidate.cc.

{ }

Member Function Documentation

VertexCompositeCandidate * VertexCompositeCandidate::clone ( void  ) const [virtual]

returns a clone of the candidate

Reimplemented from reco::CompositeCandidate.

Definition at line 16 of file VertexCompositeCandidate.cc.

References VertexCompositeCandidate().

                                                                 { 
  return new VertexCompositeCandidate(*this); 
}
void VertexCompositeCandidate::fillVertexCovariance ( CovarianceMatrix v) const [virtual]

fill SMatrix

Reimplemented from reco::LeafCandidate.

Definition at line 20 of file VertexCompositeCandidate.cc.

References covariance_, reco::Candidate::dimension, i, idx(), and j.

                                                                               {
  index idx = 0;
  for(index i = 0; i < dimension; ++i) 
    for(index j = 0; j <= i; ++ j)
      err(i, j) = covariance_[idx++];
}
index reco::VertexCompositeCandidate::idx ( index  i,
index  j 
) const [inline, private]

position index

Definition at line 71 of file VertexCompositeCandidate.h.

References a, b, and j.

Referenced by fillVertexCovariance(), setCovariance(), and vertexCovariance().

                                      {
      int a = (i <= j ? i : j), b = (i <= j ? j : i);
      return b * (b + 1)/2 + a;
    }
void reco::VertexCompositeCandidate::setChi2AndNdof ( double  chi2,
double  ndof 
) [inline]
void VertexCompositeCandidate::setCovariance ( const CovarianceMatrix m)

set covariance matrix

Definition at line 27 of file VertexCompositeCandidate.cc.

References covariance_, reco::Candidate::dimension, i, idx(), and j.

Referenced by CandCommonVertexFitterBase::set(), CandKinematicVertexFitter::set(), PFCandCommonVertexFitterBase::set(), and VertexCompositeCandidate().

                                                                         {
  index idx = 0;
  for(index i = 0; i < dimension; ++i) 
    for(index j = 0; j <= i; ++j)
      covariance_[idx++] = err(i, j);
}
virtual double reco::VertexCompositeCandidate::vertexChi2 ( ) const [inline, virtual]

chi-squares

Reimplemented from reco::LeafCandidate.

Definition at line 40 of file VertexCompositeCandidate.h.

References chi2_.

{ return chi2_; }
virtual double reco::VertexCompositeCandidate::vertexCovariance ( int  i,
int  j 
) const [inline, virtual]

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

Reimplemented from reco::LeafCandidate.

Definition at line 51 of file VertexCompositeCandidate.h.

References covariance_, and idx().

                                                        { 
      return covariance_[idx(i, j)]; 
    }
virtual double reco::VertexCompositeCandidate::vertexNdof ( ) const [inline, virtual]

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

Reimplemented from reco::LeafCandidate.

Definition at line 47 of file VertexCompositeCandidate.h.

References ndof_.

{ return ndof_; }
virtual double reco::VertexCompositeCandidate::vertexNormalizedChi2 ( ) const [inline, virtual]

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

Reimplemented from reco::LeafCandidate.

Definition at line 49 of file VertexCompositeCandidate.h.

References chi2_, and ndof_.

{ return chi2_ / ndof_; }

Member Data Documentation

chi-sqared

Definition at line 65 of file VertexCompositeCandidate.h.

Referenced by setChi2AndNdof(), vertexChi2(), and vertexNormalizedChi2().

Double32_t reco::VertexCompositeCandidate::covariance_[size] [private]

covariance matrix (3x3) as vector

Definition at line 69 of file VertexCompositeCandidate.h.

Referenced by fillVertexCovariance(), setCovariance(), and vertexCovariance().

number of degrees of freedom

Definition at line 67 of file VertexCompositeCandidate.h.

Referenced by setChi2AndNdof(), vertexNdof(), and vertexNormalizedChi2().