CMS 3D CMS Logo

reco::VertexCompositeCandidate Class Reference

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

#include <DataFormats/Candidate/interface/VertexCompositeCandidate.h>

Inheritance diagram for reco::VertexCompositeCandidate:

reco::CompositeCandidate reco::Candidate reco::Particle

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 (const CompositeCandidate &p)
 constructor from values
 VertexCompositeCandidate (const Candidate &p)
 constructor from values
 VertexCompositeCandidate (const Particle &p)
 constructor from values
 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
 VertexCompositeCandidate (Charge q, const LorentzVector &p4, const Point &vtx, int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
 VertexCompositeCandidate ()
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2
virtual double vertexNdof () const
 Number of degrees of freedom Meant to be Double32_t for soft-assignment fitters: tracks may contribute to the vertex with fractional weights.
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.7 2008/02/19 13:14:06 llista 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().

00019 : CompositeCandidate() { }

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.

00022                                                                                        :
00023       CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge),
00024       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().

00008                                                                                               :
00009   CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge),
00010   chi2_(chi2), ndof_(ndof) { 
00011   setCovariance(err);
00012 }

reco::VertexCompositeCandidate::VertexCompositeCandidate ( const Particle p  )  [inline, explicit]

constructor from values

Definition at line 30 of file VertexCompositeCandidate.h.

00030                                                           :
00031       CompositeCandidate(p), chi2_(0), ndof_(0) { }

reco::VertexCompositeCandidate::VertexCompositeCandidate ( const Candidate p  )  [inline, explicit]

constructor from values

Definition at line 33 of file VertexCompositeCandidate.h.

00033                                                            :
00034       CompositeCandidate(p), chi2_(0), ndof_(0) { }

reco::VertexCompositeCandidate::VertexCompositeCandidate ( const CompositeCandidate p  )  [inline, explicit]

constructor from values

Definition at line 36 of file VertexCompositeCandidate.h.

00036                                                                     :
00037       CompositeCandidate(p), chi2_(0), ndof_(0) { }

VertexCompositeCandidate::~VertexCompositeCandidate (  )  [virtual]

destructor

Definition at line 14 of file VertexCompositeCandidate.cc.

00014 { }


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().

00016                                                                  { 
00017   return new VertexCompositeCandidate(*this); 
00018 }

void VertexCompositeCandidate::fillVertexCovariance ( CovarianceMatrix v  )  const [virtual]

fill SMatrix

Definition at line 20 of file VertexCompositeCandidate.cc.

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

00020                                                                                {
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 }

index reco::VertexCompositeCandidate::idx ( index  i,
index  j 
) const [inline, private]

position index

Definition at line 73 of file VertexCompositeCandidate.h.

References a, and b.

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

00073                                       {
00074       int a = (i <= j ? i : j), b = (i <= j ? j : i);
00075       return b * (b + 1)/2 + a;
00076     }

void reco::VertexCompositeCandidate::setChi2AndNdof ( double  chi2,
double  ndof 
) [inline]

set chi2 and ndof

Definition at line 60 of file VertexCompositeCandidate.h.

References chi2_, and ndof_.

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

00060                                                   {
00061       chi2_ = chi2; ndof_ = ndof;
00062     }

void VertexCompositeCandidate::setCovariance ( const CovarianceMatrix m  ) 

set covariance matrix

Definition at line 27 of file VertexCompositeCandidate.cc.

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

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

00027                                                                          {
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 }

virtual double reco::VertexCompositeCandidate::vertexChi2 (  )  const [inline, virtual]

chi-squares

Reimplemented from reco::Candidate.

Definition at line 43 of file VertexCompositeCandidate.h.

References chi2_.

00043 { 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::Candidate.

Definition at line 54 of file VertexCompositeCandidate.h.

References covariance_, and idx().

00054                                                         { 
00055       return covariance_[idx(i, j)]; 
00056     }

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::Candidate.

Definition at line 50 of file VertexCompositeCandidate.h.

References ndof_.

00050 { return ndof_; }

virtual double reco::VertexCompositeCandidate::vertexNormalizedChi2 (  )  const [inline, virtual]

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

Reimplemented from reco::Candidate.

Definition at line 52 of file VertexCompositeCandidate.h.

References chi2_, and ndof_.

00052 { return chi2_ / ndof_; }


Member Data Documentation

Double32_t reco::VertexCompositeCandidate::chi2_ [private]

chi-sqared

Definition at line 67 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 71 of file VertexCompositeCandidate.h.

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

Double32_t reco::VertexCompositeCandidate::ndof_ [private]

number of degrees of freedom

Definition at line 69 of file VertexCompositeCandidate.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:51:37 2009 for CMSSW by  doxygen 1.5.4