CMS 3D CMS Logo

KinematicVertex Class Reference

Class representing a Decay Vertex Caches a vertex position, covariance matrix, chi squared and number of degrees of freedom. More...

#include <RecoVertex/KinematicFitPrimitives/interface/KinematicVertex.h>

Inheritance diagram for KinematicVertex:

ReferenceCounted

List of all members.

Public Member Functions

float chiSquared () const
KinematicTreecorrespondingTree () const
 Returns the pointer to the kinematic tree (if any) current vertex belongs to returned in case of not any tree build yet.
float degreesOfFreedom () const
GlobalError error () const
 KinematicVertex (const CachingVertex< 6 > &vertex)
 Direct transformation from caching vertex.
 KinematicVertex (const VertexState state, const ReferenceCountingPointer< KinematicVertex > prVertex, float totalChiSq, float degreesOfFr)
 Constructor with previous (before constraint) state of the vertex.
 KinematicVertex (const VertexState state, float totalChiSq, float degreesOfFr)
 Constructor with vertex state, chi2 and ndf.
 KinematicVertex ()
 Empty default constructor for invalid vertices.
bool operator< (const KinematicVertex &other) const
 comparison by adress operator Has NO physical meaning To be used inside the graph only
bool operator== (ReferenceCountingPointer< KinematicVertex > other) const
bool operator== (const KinematicVertex &other) const
 Comparison by contents operator is _true_ if position AND covariance match.
GlobalPoint position () const
ReferenceCountingPointer
< KinematicVertex
vertexBeforeConstraint () const
 Previous (before constraint) state of the vertex.
bool vertexIsValid () const
 Access methods.
VertexState vertexState () const
virtual ~KinematicVertex ()

Private Member Functions

void setTreePointer (KinematicTree *tr) const

Private Attributes

ReferenceCountingPointer
< KinematicVertex
pVertex
float theChiSquared
float theNDF
VertexState theState
KinematicTreetree
bool vl

Friends

class KinematicTree


Detailed Description

Class representing a Decay Vertex Caches a vertex position, covariance matrix, chi squared and number of degrees of freedom.

Class is usually created by KinematicParticleVertexFitter

Kirill Prokofiev, December 2002

Definition at line 20 of file KinematicVertex.h.


Constructor & Destructor Documentation

KinematicVertex::KinematicVertex (  ) 

Empty default constructor for invalid vertices.

Definition at line 4 of file KinematicVertex.cc.

References vl.

00005 {vl = false;}

KinematicVertex::KinematicVertex ( const VertexState  state,
float  totalChiSq,
float  degreesOfFr 
)

Constructor with vertex state, chi2 and ndf.

Previous state of the vertex pointer is set to 0.

Definition at line 7 of file KinematicVertex.cc.

References pVertex, tree, and vl.

00008                                                                                :
00009                   theState(state),theChiSquared(totalChiSq),theNDF(degreesOfFr)                
00010                                                                    
00011 {
00012  vl = true;
00013  tree = 0;
00014  pVertex = 0;
00015 }

KinematicVertex::KinematicVertex ( const VertexState  state,
const ReferenceCountingPointer< KinematicVertex prVertex,
float  totalChiSq,
float  degreesOfFr 
)

Constructor with previous (before constraint) state of the vertex.

Definition at line 29 of file KinematicVertex.cc.

References tree, and vl.

00031                                                                         :
00032                                     theState(state) ,
00033                                     theChiSquared(totalChiSq),theNDF(degreesOfFr) , pVertex(prVertex)
00034 {
00035  vl = true;
00036  tree = 0;
00037 }

KinematicVertex::KinematicVertex ( const CachingVertex< 6 > &  vertex  ) 

Direct transformation from caching vertex.

Definition at line 17 of file KinematicVertex.cc.

References CachingVertex< N >::degreesOfFreedom(), CachingVertex< N >::error(), CachingVertex< N >::position(), pVertex, theChiSquared, theNDF, theState, CachingVertex< N >::totalChiSquared(), tree, and vl.

00018 {
00019 // theVertexPosition = vertex.position();
00020 // theVPositionError = vertex.error();
00021  vl = true;
00022  theState = VertexState(vertex.position(), vertex.error());
00023  theChiSquared = vertex.totalChiSquared();
00024  theNDF = vertex.degreesOfFreedom();
00025  tree = 0;
00026  pVertex = 0;
00027 }                

KinematicVertex::~KinematicVertex (  )  [virtual]

Definition at line 77 of file KinematicVertex.cc.

00078 {}


Member Function Documentation

float KinematicVertex::chiSquared (  )  const

Definition at line 90 of file KinematicVertex.cc.

References theChiSquared.

00091 {return theChiSquared;}

KinematicTree * KinematicVertex::correspondingTree (  )  const

Returns the pointer to the kinematic tree (if any) current vertex belongs to returned in case of not any tree build yet.

Definition at line 96 of file KinematicVertex.cc.

References tree.

00097 {return tree;}

float KinematicVertex::degreesOfFreedom (  )  const

Definition at line 93 of file KinematicVertex.cc.

References theNDF.

00094 {return theNDF;}

GlobalError KinematicVertex::error (  )  const

Definition at line 85 of file KinematicVertex.cc.

References VertexState::error(), and theState.

Referenced by operator==().

00086 {
00087  return theState.error();
00088 }

bool KinematicVertex::operator< ( const KinematicVertex other  )  const

comparison by adress operator Has NO physical meaning To be used inside the graph only

Definition at line 67 of file KinematicVertex.cc.

References res.

00068 { 
00069  bool res = false;
00070  if(this < &other) res=true;
00071  return res;
00072 }       

bool KinematicVertex::operator== ( ReferenceCountingPointer< KinematicVertex other  )  const

Definition at line 59 of file KinematicVertex.cc.

References res.

00060 {
00061  bool res = false;
00062  if(*this == *other) res = true;
00063  return res;
00064 }

bool KinematicVertex::operator== ( const KinematicVertex other  )  const

Comparison by contents operator is _true_ if position AND covariance match.

Definition at line 41 of file KinematicVertex.cc.

References error(), GlobalErrorBase< T, ErrorWeightType >::matrix(), position(), res, vertexIsValid(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00042 {
00043  bool res = false;
00044  if(vertexIsValid()&& other.vertexIsValid())
00045  {
00046   GlobalPoint cPos = this->position();
00047   GlobalPoint oPos = other.position();
00048   AlgebraicMatrix cCov = this->error().matrix();
00049   AlgebraicMatrix oCov = other.error().matrix();
00050   if((cPos.x()==oPos.x())&&(cPos.y()==oPos.y())&&(cPos.z()==oPos.z())
00051                                                       &&(cCov==oCov))
00052   res = true;
00053  }else if(!(vertexIsValid()) && !(other.vertexIsValid())){
00054   if(this == &other) res = true;
00055  } 
00056  return res;
00057 }

GlobalPoint KinematicVertex::position ( void   )  const

Definition at line 80 of file KinematicVertex.cc.

References VertexState::position(), and theState.

Referenced by operator==().

00081 {
00082  return theState.position(); 
00083 }

void KinematicVertex::setTreePointer ( KinematicTree tr  )  const [private]

Definition at line 99 of file KinematicVertex.cc.

References tree.

00100 {tree = tr;}

ReferenceCountingPointer< KinematicVertex > KinematicVertex::vertexBeforeConstraint (  )  const

Previous (before constraint) state of the vertex.

Definition at line 102 of file KinematicVertex.cc.

References pVertex.

00103 {return pVertex;}

bool KinematicVertex::vertexIsValid (  )  const

Access methods.

Checking the validity of the vertex Example: production vertex for the first decayed particle or decay vertices of final state particles can be invalid since we don't know them.

Definition at line 74 of file KinematicVertex.cc.

References vl.

Referenced by operator==().

00075 {return vl;}

VertexState KinematicVertex::vertexState (  )  const

Definition at line 105 of file KinematicVertex.cc.

References theState.

00106 {return theState;}


Friends And Related Function Documentation

friend class KinematicTree [friend]

Definition at line 24 of file KinematicVertex.h.


Member Data Documentation

ReferenceCountingPointer<KinematicVertex> KinematicVertex::pVertex [mutable, private]

Definition at line 121 of file KinematicVertex.h.

Referenced by KinematicVertex(), and vertexBeforeConstraint().

float KinematicVertex::theChiSquared [private]

Definition at line 119 of file KinematicVertex.h.

Referenced by chiSquared(), and KinematicVertex().

float KinematicVertex::theNDF [private]

Definition at line 120 of file KinematicVertex.h.

Referenced by degreesOfFreedom(), and KinematicVertex().

VertexState KinematicVertex::theState [private]

Definition at line 116 of file KinematicVertex.h.

Referenced by error(), KinematicVertex(), position(), and vertexState().

KinematicTree* KinematicVertex::tree [mutable, private]

Definition at line 113 of file KinematicVertex.h.

Referenced by correspondingTree(), KinematicVertex(), and setTreePointer().

bool KinematicVertex::vl [mutable, private]

Definition at line 114 of file KinematicVertex.h.

Referenced by KinematicVertex(), and vertexIsValid().


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