#include <RecoVertex/KinematicFitPrimitives/interface/KinematicVertex.h>
Public Member Functions | |
float | chiSquared () const |
KinematicTree * | correspondingTree () 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 |
KinematicTree * | tree |
bool | vl |
Friends | |
class | KinematicTree |
Class is usually created by KinematicParticleVertexFitter
Kirill Prokofiev, December 2002
Definition at line 20 of file KinematicVertex.h.
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.
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] |
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 |
GlobalError KinematicVertex::error | ( | ) | const |
Definition at line 85 of file KinematicVertex.cc.
References VertexState::error(), and theState.
Referenced by operator==().
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==().
void KinematicVertex::setTreePointer | ( | KinematicTree * | tr | ) | const [private] |
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 |
friend class KinematicTree [friend] |
Definition at line 24 of file KinematicVertex.h.
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().