LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
trkf Namespace Reference

Classes

class  BezierCurveHelper
 
class  BezierTrack
 
class  BezierTrackerAlgorithm
 
class  BezierTrackerModule
 
class  CCTrackMaker
 
class  CosmicTracker
 
class  CosmicTrackerAlg
 
class  FeatureTracker
 
class  Geometric3DVertexFitter
 3D vertex fitter based on the geometric properties (start position, direction, covariance) of the tracks. More...
 
class  HitPtrVec
 
class  HitState
 Class for a measurement on a recob::tracking::Plane (plane defined by a wire and the drift direction). More...
 
class  InteractGeneral
 
class  Interactor
 
class  InteractPlane
 
class  KalmanFilterAlg
 
class  KalmanFilterFinalTrackFitter
 
class  KalmanFilterTrajectoryFitter
 
struct  KalmanInput
 
struct  KalmanOutput
 
class  KETrack
 
class  KFitTrack
 
class  KFTrackState
 Extension of a TrackState to perform KalmanFilter calculations. More...
 
struct  KGMatrix
 Kalman gain matrix, dimension 5xN. More...
 
class  KGTrack
 
class  KHit
 
class  KHitBase
 
class  KHitContainer
 
class  KHitContainerWireLine
 
class  KHitContainerWireX
 
class  KHitGroup
 
class  KHitMulti
 
class  KHitsTrack
 
class  KHitTrack
 
class  KHitWireLine
 
class  KHitWireX
 
struct  KHMatrix
 Kalman H-matrix, dimension Nx5. More...
 
struct  KMatrix
 General matrix, dimension NxM. More...
 
struct  KSymMatrix
 Symmetric matrix, dimension NxN. More...
 
class  KTrack
 
struct  KVector
 Define a shortened alias for ublas namespace. More...
 
class  LinFitAlg
 
class  MCSFitProducer
 Producer for TrajectoryMCSFitter. More...
 
class  PMAlgTrackMaker
 
class  PMAlgTrajFitter
 
class  Propagator
 
class  PropAny
 
class  PropXYZPlane
 
class  PropYZLine
 
class  PropYZPlane
 
class  SeedAna
 
class  SeedFinderAlgorithm
 
class  SeedFinderModule
 
struct  SortByWire
 
class  SpacePointAlg
 
class  SpacePointAna
 
class  SpacePointCheater
 
class  SpacePointFinder
 
class  SpacePts
 
class  StitchAlg
 
class  Surface
 
class  SurfLine
 
class  SurfPlane
 
class  SurfWireLine
 
class  SurfWireX
 
class  SurfXYZPlane
 
class  SurfYZLine
 
class  SurfYZPlane
 
class  TCTrack
 
class  Track3DKalman
 
class  Track3DKalmanHit
 
class  Track3DKalmanHitAlg
 
class  Track3DKalmanSPS
 
class  Track3Dreco
 
class  TrackAna
 
class  TrackCheater
 
class  TrackKalmanCheater
 
class  TrackKalmanFitter
 Fit tracks using Kalman Filter fit+smooth. More...
 
class  TrackLineFitAlg
 
class  TrackMomentumCalculator
 
class  TrackState
 Class for track parameters (and errors) defined on a recob::tracking::Plane. More...
 
class  TrackStatePropagator
 Class for propagation of a trkf::TrackState to a recob::tracking::Plane. More...
 
class  TrackStitcher
 
class  TrackTrajectoryAlg
 
class  TrajectoryMCSFitter
 Class for Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory. More...
 
class  VertexFitAlg
 
class  VertexFitter
 Module for fitting a vertex using the Geometric3DVertexFitter. More...
 
class  VertexWrapper
 Wrapper class to facilitate vertex production. More...
 

Typedefs

typedef KVector< 5 >::type TrackVector
 Track state vector, dimension 5. More...
 
typedef KSymMatrix< 5 >::type TrackError
 Track error matrix, dimension 5x5. More...
 
typedef KMatrix< 5, 5 >::type TrackMatrix
 General 5x5 matrix. More...
 
using SVector5 = recob::tracking::SVector5
 
using SVector6 = recob::tracking::SVector6
 
using SMatrix55 = recob::tracking::SMatrix55
 
using SMatrixSym55 = recob::tracking::SMatrixSym55
 
using SMatrixSym66 = recob::tracking::SMatrixSym66
 
using Plane = recob::tracking::Plane
 
using Point_t = recob::tracking::Point_t
 
using Vector_t = recob::tracking::Vector_t
 
using PropDirection = TrackStatePropagator::PropDirection
 
using SMatrixSym22 = recob::tracking::SMatrixSym22
 
using SVector2 = recob::tracking::SVector2
 
using SMatrixSym33 = recob::tracking::SMatrixSym33
 
using SVector3 = recob::tracking::SVector3
 
typedef std::vector< KalmanInputKalmanInputs
 
typedef art::PtrVector< recob::HitHits
 
typedef std::vector< std::reference_wrapper< const recob::Track > > TrackRefVec
 

Functions

template<class T , class TRI , class L , class A >
bool syminvert (ublas::symmetric_matrix< T, TRI, L, A > &m)
 
template<class T , class L , class A >
bool invert (ublas::matrix< T, L, A > &m)
 
template<class M >
M::value_type trace (const M &m)
 
std::ostream & operator<< (std::ostream &out, const KGTrack &trg)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &out, const KHitBase &trk)
 Output operator. More...
 
void fill (const art::PtrVector< recob::Hit > &hits, int only_plane)
 
std::ostream & operator<< (std::ostream &out, const KTrack &trk)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &out, const Surface &surf)
 Output operator. More...
 
bool BTrack_SeedCountComparator (std::vector< recob::Seed > const &s1, std::vector< recob::Seed > const &s2)
 

Detailed Description

LinFitAlg class

Bruce Baller, balle.nosp@m.r@fn.nosp@m.al.go.nosp@m.v

Algorithm for fitting a 2D line

TrackLineFitAlg class

Bruce Baller, balle.nosp@m.r@fn.nosp@m.al.go.nosp@m.v

Algorithm for fitting a 3D line given a number of points in 3 wire planes

TrackTrajectoryAlg class

Bruce Baller, balle.nosp@m.r@fn.nosp@m.al.go.nosp@m.v

Algorithm fitting a 3D trajectory through a set of hits

TrackTrajectoryAlg class

Bruce Baller, balle.nosp@m.r@fn.nosp@m.al.go.nosp@m.v

Algorithm fitting a 3D trajectory through a set of hit pairs

VertexFitAlg class

Bruce Baller, balle.nosp@m.r@fn.nosp@m.al.go.nosp@m.v

Algorithm for fitting a 3D vertex given a set of track hits

Typedef Documentation

Definition at line 45 of file Track3DKalmanHit.h.

typedef std::vector<KalmanInput> trkf::KalmanInputs

Definition at line 44 of file Track3DKalmanHit.h.

Definition at line 17 of file TrackState.h.

Definition at line 18 of file TrackState.h.

Definition at line 14 of file TrackState.h.

Definition at line 15 of file TrackState.h.

Definition at line 16 of file TrackState.h.

Definition at line 18 of file Geometric3DVertexFitter.h.

Definition at line 20 of file Geometric3DVertexFitter.h.

Definition at line 12 of file TrackState.h.

Definition at line 13 of file TrackState.h.

typedef KSymMatrix<5>::type trkf::TrackError

Track error matrix, dimension 5x5.

Definition at line 93 of file KalmanLinearAlgebra.h.

typedef KMatrix<5,5>::type trkf::TrackMatrix

General 5x5 matrix.

Definition at line 96 of file KalmanLinearAlgebra.h.

typedef std::vector<std::reference_wrapper<const recob::Track> > trkf::TrackRefVec

Definition at line 26 of file VertexWrapper.h.

typedef KVector<5>::type trkf::TrackVector

Track state vector, dimension 5.

Definition at line 90 of file KalmanLinearAlgebra.h.

Definition at line 19 of file TrackState.h.

Function Documentation

bool trkf::BTrack_SeedCountComparator ( std::vector< recob::Seed > const &  s1,
std::vector< recob::Seed > const &  s2 
)

Definition at line 1345 of file BezierTrackerAlgorithm.cxx.

1346  {
1347  return s1.size()>s2.size();
1348  }
void trkf::fill ( const art::PtrVector< recob::Hit > &  hits,
int  only_plane 
)
template<class T , class L , class A >
bool trkf::invert ( ublas::matrix< T, L, A > &  m)

Invert general square matrix by LU decomposition with partial pivoting. Return false if singular or not square.

Definition at line 193 of file KalmanLinearAlgebra.h.

Referenced by util::flags::Bits_t< Storage_t >::clear(), export_G4RotationMatrix(), and trkf::InteractGeneral::noise().

194  {
195  // Make sure matrix is square.
196 
197  if(m.size1() != m.size2())
198  return false;
199 
200  // Create permutation matrix for pivoting.
201 
202  ublas::permutation_matrix<std::size_t> pm(m.size1());
203 
204  // Make temp copy of input matrix.
205 
206  ublas::matrix<T, L, A> mcopy(m);
207 
208  // Do LU factorization with partial pivoting.
209  // This step will fail if matrix is singular.
210 
211  int res = lu_factorize(mcopy, pm);
212  if( res != 0 )
213  return false;
214 
215  // Set original matrix to the identity matrix.
216 
217  m.assign(ublas::identity_matrix<T>(m.size1()));
218 
219  // Do backsubstitution.
220 
221  lu_substitute(mcopy, pm, m);
222 
223  // Done (success).
224 
225  return true;
226  }
std::ostream & trkf::operator<< ( std::ostream &  out,
const Surface surf 
)

Output operator.

Definition at line 24 of file Surface.cxx.

References trkf::Surface::Print().

25  {
26  return surf.Print(out);
27  }
std::ostream & trkf::operator<< ( std::ostream &  out,
const KHitBase trk 
)

Output operator.

Definition at line 54 of file KHitBase.cxx.

References trkf::KHitBase::Print().

55  {
56  return trk.Print(out);
57  }
std::ostream & trkf::operator<< ( std::ostream &  out,
const KTrack trk 
)

Output operator.

Definition at line 262 of file KTrack.cxx.

References trkf::KTrack::Print().

263  {
264  return trk.Print(out);
265  }
std::ostream & trkf::operator<< ( std::ostream &  out,
const KGTrack trg 
)

Output operator.

Definition at line 306 of file KGTrack.cxx.

References trkf::KGTrack::Print().

Referenced by trkf::Surface::getDirection().

307  {
308  return trg.Print(out);
309  }
template<class T , class TRI , class L , class A >
bool trkf::syminvert ( ublas::symmetric_matrix< T, TRI, L, A > &  m)

Invert symmetric matrix (return false if singular).

The method used is Cholesky decomposition. This method is efficient and stable for positive-definite matrices. In case the matrix is not positive-definite, this method will usually work, but there can be some numerical pathologies, including "false singular" failures, and numerical instability. In the Kalman filter, we expect that this method will be used exclusively for positive-definite matrices.

Definition at line 109 of file KalmanLinearAlgebra.h.

Referenced by trkf::KETrack::combineTrack(), trkf::Track3DKalmanHitAlg::makeSeed(), trkf::KHitMulti::predict(), and trkf::KHit< N >::predict().

110  {
111  typedef typename ublas::symmetric_matrix<T, TRI, L, A>::size_type size_type;
112  typedef typename ublas::symmetric_matrix<T, TRI, L, A>::value_type value_type;
113 
114  // In situ Cholesky decomposition m = LDL^T.
115  // D is diagonal matrix.
116  // L is lower triangular with ones on the diagonal (ones not stored).
117 
118  for(size_type i = 0; i < m.size1(); ++i) {
119  for(size_type j = 0; j <= i; ++j) {
120 
121  value_type ele = m(i,j);
122 
123  for(size_type k = 0; k < j; ++k)
124  ele -= m(k,k) * m(i,k) * m(j,k);
125 
126  // Diagonal elements (can't have zeroes).
127 
128  if(i == j) {
129  if(ele == 0.)
130  return false;
131  }
132 
133  // Off-diagonal elements.
134 
135  else
136  ele = ele / m(j,j);
137 
138  // Replace element.
139 
140  m(i,j) = ele;
141  }
142  }
143 
144  // In situ inversion of D by simple division.
145  // In situ inversion of L by back-substitution.
146 
147  for(size_type i = 0; i < m.size1(); ++i) {
148  for(size_type j = 0; j <= i; ++j) {
149 
150  value_type ele = m(i,j);
151 
152  // Diagonal elements.
153 
154  if(i == j)
155  m(i,i) = 1./ele;
156 
157  // Off diagonal elements.
158 
159  else {
160  value_type sum = -ele;
161  for(size_type k = j+1; k < i; ++k)
162  sum -= m(i,k) * m(k,j);
163  m(i,j) = sum;
164  }
165  }
166  }
167 
168  // Recompose the inverse matrix in situ by matrix multiplication m = L^T DL.
169 
170  for(size_type i = 0; i < m.size1(); ++i) {
171  for(size_type j = 0; j <= i; ++j) {
172 
173  value_type sum = m(i,i);
174  if(i != j)
175  sum *= m(i,j);
176 
177  for(size_type k = i+1; k < m.size1(); ++k)
178  sum += m(k,k) * m(k,i) * m(k,j);
179 
180  m(i,j) = sum;
181  }
182  }
183 
184  // Done (success).
185 
186  return true;
187  }
template<class M >
M::value_type trkf::trace ( const M &  m)

Trace of matrix.

Definition at line 231 of file KalmanLinearAlgebra.h.

References min, and n.

Referenced by trkf::KalmanFilterAlg::setTrace().

232  {
233  typename M::size_type n = std::min(m.size1(), m.size2());
234  typename M::value_type result = 0.;
235 
236  for(typename M::size_type i = 0; i < n; ++i)
237  result += m(i,i);
238 
239  return result;
240  }
Int_t min
Definition: plot.C:26
Char_t n[5]