PandaRoot
GFTools.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /* Copyright 2011, Technische Universitaet Muenchen,
14  Author: Karl Bicker
15 
16  This file is part of GENFIT.
17 
18  GENFIT is free software: you can redistribute it and/or modify
19  it under the terms of the GNU Lesser General Public License as published
20  by the Free Software Foundation, either version 3 of the License, or
21  (at your option) any later version.
22 
23  GENFIT is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  GNU Lesser General Public License for more details.
27 
28  You should have received a copy of the GNU Lesser General Public License
29  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
30 */
32 /* @{ */
33 
34 #ifndef GFTOOLS_H
35 #define GFTOOLS_H
36 
37 #include <cmath>
38 #include "GFAbsTrackRep.h"
39 #include <GFDetPlane.h>
40 #include <GFException.h>
41 #include <GFTrack.h>
42 #include <TMath.h>
43 #include <TMatrixT.h>
44 #include <TDecompSVD.h>
45 //#include <TDecompBK.h>
46 //#include <TDecompChol.h>
47 
56 namespace GFTools {
57 
60 TMatrixT<double> getSmoothedPos(GFTrack *trk, unsigned int irep, unsigned int ihit);
61 
64 TMatrixT<double> getSmoothedCov(GFTrack *trk, unsigned int irep, unsigned int ihit);
65 
68 bool getSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT<double> &smoothed_state, TMatrixT<double> &smoothed_cov);
69 
75 bool getSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT<double> &smoothed_state, TMatrixT<double> &smoothed_cov, GFDetPlane &smoothing_plane);
76 
94 bool getSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT<double> &smoothed_state, TMatrixT<double> &smoothed_cov, GFDetPlane &smoothing_plane,
95  TMatrixT<double> &auxInfo);
96 
99 GFDetPlane getSmoothingPlane(GFTrack *trk, unsigned int irep, unsigned int ihit);
100 
103 bool getBiasedSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT<double> &smoothed_state, TMatrixT<double> &smoothed_cov);
104 
110 bool getBiasedSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT<double> &smoothed_state, TMatrixT<double> &smoothed_cov, GFDetPlane &smoothing_plane);
111 
118 bool getBiasedSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT<double> &smoothed_state, TMatrixT<double> &smoothed_cov, GFDetPlane &smoothing_plane,
119  TMatrixT<double> &auxInfo);
120 
123 TMatrixT<double> getBiasedSmoothedPos(GFTrack *trk, unsigned int irep, unsigned int ihit);
124 
127 TMatrixT<double> getBiasedSmoothedCov(GFTrack *trk, unsigned int irep, unsigned int ihit);
128 
131 void invertMatrix(const TMatrixT<double> &mat, TMatrixT<double> &inv);
141 double getSmoothedChiSqu(GFTrack *const trk, unsigned int irep, unsigned int ihit);
142 
143 } // namespace GFTools
144 
145 #endif
146 
bool getBiasedSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov)
Get biased smoothed state vector and state covariance.
TMatrixT< double > getSmoothedPos(GFTrack *trk, unsigned int irep, unsigned int ihit)
Get smoothed track position in plane coordinates.
GFDetPlane getSmoothingPlane(GFTrack *trk, unsigned int irep, unsigned int ihit)
Get smoothing plane.
Detector plane genfit geometry class.
Definition: GFDetPlane.h:70
Track object for genfit. genfit algorithms work on these objects.
Definition: GFTrack.h:71
Namespace for various tools, mainly smoothing.
bool getSmoothedData(GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov)
Get smoothed state vector and state covariance.
void invertMatrix(const TMatrixT< double > &mat, TMatrixT< double > &inv)
Invert a matrix, throwing GFException when inversion fails.
double getSmoothedChiSqu(GFTrack *const trk, unsigned int irep, unsigned int ihit)
Get smoothed chi2 for a specific hit (ihit).
TMatrixT< double > getSmoothedCov(GFTrack *trk, unsigned int irep, unsigned int ihit)
Get smoothed track covariance in plane coordinates.
TMatrixT< double > getBiasedSmoothedCov(GFTrack *trk, unsigned int irep, unsigned int ihit)
Get biased smoothed track covariance in plane coordinates.
TMatrixT< double > getBiasedSmoothedPos(GFTrack *trk, unsigned int irep, unsigned int ihit)
Get biased smoothed track position in plane coordinates.