#include <StateSegmentMatcher.h>
Public Member Functions | |
StateSegmentMatcher (TrajectoryStateOnSurface *, CSCSegment *, LocalError *) | |
StateSegmentMatcher (TrajectoryStateOnSurface *, DTRecSegment4D *, LocalError *) | |
double | value () |
Private Member Functions | |
void | setAPE2d (LocalError &apeLoc) |
void | setAPE4d (LocalError &apeLoc) |
Private Attributes | |
AlgebraicSymMatrix44 | ape |
AlgebraicSymMatrix22 | ape_2d |
double | estValue |
AlgebraicSymMatrix44 | m1 |
AlgebraicSymMatrix22 | m1_2d |
AlgebraicSymMatrix44 | m2 |
AlgebraicSymMatrix22 | m2_2d |
bool | match2D |
AlgebraicVector4 | v1 |
AlgebraicVector2 | v1_2d |
AlgebraicVector4 | v2 |
AlgebraicVector2 | v2_2d |
Definition at line 81 of file StateSegmentMatcher.h.
StateSegmentMatcher::StateSegmentMatcher | ( | TrajectoryStateOnSurface * | tsos, |
CSCSegment * | cscseg4d, | ||
LocalError * | apeLoc | ||
) |
Definition at line 74 of file StateSegmentMatcher.cc.
References Tsos4D::errorMatrix(), CSCSegment::parameters(), CSCSegment::parametersError(), and Tsos4D::paramVector().
{ setAPE4d(*apeLoc); match2D = false; AlgebraicVector cscseg = cscseg4d->parameters(); v1[0] = cscseg[0]; v1[1] = cscseg[1]; v1[2] = cscseg[2]; v1[3] = cscseg[3]; AlgebraicSymMatrix rhErr_vect = cscseg4d->parametersError(); m1(0,0) = rhErr_vect(1,1);m1(0,1) = rhErr_vect(1,2);m1(0,2) = rhErr_vect(1,3);m1(0,3) = rhErr_vect(1,4); m1(1,0) = rhErr_vect(2,1);m1(1,1) = rhErr_vect(2,2);m1(1,2) = rhErr_vect(2,3);m1(1,3) = rhErr_vect(2,4); m1(2,0) = rhErr_vect(3,1);m1(2,1) = rhErr_vect(3,2);m1(2,2) = rhErr_vect(3,3);m1(2,3) = rhErr_vect(3,4); m1(3,0) = rhErr_vect(4,1);m1(3,1) = rhErr_vect(4,2);m1(3,2) = rhErr_vect(4,3);m1(3,3) = rhErr_vect(4,4); Tsos4D tsos4d = Tsos4D(tsos); v2 = tsos4d.paramVector(); m2 = tsos4d.errorMatrix(); }
StateSegmentMatcher::StateSegmentMatcher | ( | TrajectoryStateOnSurface * | tsos, |
DTRecSegment4D * | dtseg4d, | ||
LocalError * | apeLoc | ||
) |
Definition at line 21 of file StateSegmentMatcher.cc.
References Tsos2DZed::errorMatrix(), Tsos4D::errorMatrix(), Tsos2DPhi::errorMatrix(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), DTRecSegment4D::parameters(), DTRecSegment4D::parametersError(), Tsos2DZed::paramVector(), Tsos2DPhi::paramVector(), and Tsos4D::paramVector().
{ if (dtseg4d->hasPhi() && dtseg4d->hasZed()) { setAPE4d(*apeLoc); match2D = false; AlgebraicVector dtseg = dtseg4d->parameters(); v1[0] = dtseg[0]; v1[1] = dtseg[1]; v1[2] = dtseg[2]; v1[3] = dtseg[3]; AlgebraicSymMatrix rhErr_vect = dtseg4d->parametersError(); m1(0,0) = rhErr_vect(1,1); m1(0,1) = rhErr_vect(1,2); m1(0,2) = rhErr_vect(1,3);m1(0,3) = rhErr_vect(1,4); m1(1,0) = rhErr_vect(2,1); m1(1,1) = rhErr_vect(2,2); m1(1,2) = rhErr_vect(2,3);m1(1,3) = rhErr_vect(2,4); m1(2,0) = rhErr_vect(3,1); m1(2,1) = rhErr_vect(3,2); m1(2,2) = rhErr_vect(3,3);m1(2,3) = rhErr_vect(3,4); m1(3,0) = rhErr_vect(4,1); m1(3,1) = rhErr_vect(4,2); m1(3,2) = rhErr_vect(4,3);m1(3,3) = rhErr_vect(4,4); Tsos4D tsos4d = Tsos4D(tsos); v2 = tsos4d.paramVector(); m2 = tsos4d.errorMatrix(); } else { setAPE2d(*apeLoc); match2D = true; AlgebraicVector dtseg = dtseg4d->parameters(); v1_2d[0] = dtseg[0]; v1_2d[1] = dtseg[1]; AlgebraicSymMatrix rhErr_vect = dtseg4d->parametersError(); m1_2d(0,0) = rhErr_vect(1,1); m1_2d(0,1) = rhErr_vect(1,2); m1_2d(1,0) = rhErr_vect(2,1); m1_2d(1,1) = rhErr_vect(2,2); if (dtseg4d->hasPhi()) { Tsos2DPhi tsos2d = Tsos2DPhi(tsos); v2_2d = tsos2d.paramVector(); m2_2d = tsos2d.errorMatrix(); } if (dtseg4d->hasZed()) { Tsos2DZed tsos2d = Tsos2DZed(tsos); v2_2d = tsos2d.paramVector(); m2_2d = tsos2d.errorMatrix(); } } }
void StateSegmentMatcher::setAPE2d | ( | LocalError & | apeLoc | ) | [inline, private] |
Definition at line 112 of file StateSegmentMatcher.h.
References ape_2d, and LocalError::xx().
void StateSegmentMatcher::setAPE4d | ( | LocalError & | apeLoc | ) | [inline, private] |
Definition at line 103 of file StateSegmentMatcher.h.
References ape, LocalError::xx(), and LocalError::yy().
double StateSegmentMatcher::value | ( | void | ) |
Definition at line 99 of file StateSegmentMatcher.cc.
Referenced by DynamicTruncation::getBest().
{ if (match2D) { AlgebraicVector2 v3(v1_2d - v2_2d); AlgebraicSymMatrix22 m3(m1_2d + m2_2d + ape_2d); bool m3i = !m3.Invert(); if ( m3i ) { return 1e7; } else { estValue = ROOT::Math::Similarity(v3,m3); } } else { AlgebraicVector4 v3(v1 - v2); AlgebraicSymMatrix44 m3(m1 + m2 + ape); bool m3i = !m3.Invert(); if ( m3i ) { return 1e7; } else { estValue = ROOT::Math::Similarity(v3,m3); } } return estValue; }
AlgebraicSymMatrix44 StateSegmentMatcher::ape [private] |
Definition at line 97 of file StateSegmentMatcher.h.
Referenced by setAPE4d().
Definition at line 99 of file StateSegmentMatcher.h.
Referenced by setAPE2d().
double StateSegmentMatcher::estValue [private] |
Definition at line 101 of file StateSegmentMatcher.h.
AlgebraicSymMatrix44 StateSegmentMatcher::m1 [private] |
Definition at line 97 of file StateSegmentMatcher.h.
Definition at line 99 of file StateSegmentMatcher.h.
AlgebraicSymMatrix44 StateSegmentMatcher::m2 [private] |
Definition at line 97 of file StateSegmentMatcher.h.
Definition at line 99 of file StateSegmentMatcher.h.
bool StateSegmentMatcher::match2D [private] |
Definition at line 100 of file StateSegmentMatcher.h.
AlgebraicVector4 StateSegmentMatcher::v1 [private] |
Definition at line 96 of file StateSegmentMatcher.h.
AlgebraicVector2 StateSegmentMatcher::v1_2d [private] |
Definition at line 98 of file StateSegmentMatcher.h.
AlgebraicVector4 StateSegmentMatcher::v2 [private] |
Definition at line 96 of file StateSegmentMatcher.h.
AlgebraicVector2 StateSegmentMatcher::v2_2d [private] |
Definition at line 98 of file StateSegmentMatcher.h.