GENFIT Rev: NoNumberAvailable
Loading...
Searching...
No Matches
GblData.h
Go to the documentation of this file.
1/*
2 * GblData.h
3 *
4 * Created on: Aug 18, 2011
5 * Author: kleinwrt
6 */
7
29
30#ifndef GBLDATA_H_
31#define GBLDATA_H_
32
33#include<iostream>
34#include<vector>
35#include<math.h>
36#include "VMatrix.h"
37#include "TVectorD.h"
38#include "TMatrixD.h"
39#include "TMatrixDSym.h"
40
41#include "Math/SMatrix.h"
42#include "Math/SVector.h"
43typedef ROOT::Math::SMatrix<double, 2, 5> SMatrix25;
44typedef ROOT::Math::SMatrix<double, 2, 7> SMatrix27;
45typedef ROOT::Math::SMatrix<double, 5, 5> SMatrix55;
46
48namespace gbl {
49
51
55class GblData {
56public:
58 GblData(unsigned int aLabel, double aMeas, double aPrec);
59 virtual ~GblData();
60 void addDerivatives(unsigned int iRow,
61 const std::vector<unsigned int> &labDer, const SMatrix55 &matDer,
62 unsigned int iOff, const TMatrixD &derLocal,
63 const std::vector<int> &labGlobal, const TMatrixD &derGlobal,
64 unsigned int nLocal, const TMatrixD &derTrans);
65 void addDerivatives(unsigned int iRow,
66 const std::vector<unsigned int> &labDer, const SMatrix27 &matDer,
67 unsigned int nLocal, const TMatrixD &derTrans);
68 void addDerivatives(const std::vector<unsigned int> &index,
69 const std::vector<double> &derivatives);
70
71 void setPrediction(const VVector &aVector);
72 double setDownWeighting(unsigned int aMethod);
73 double getChi2() const;
74 void printData() const;
75 void getLocalData(double &aValue, double &aWeight,
76 std::vector<unsigned int>* &indLocal,
77 std::vector<double>* &derLocal);
78 void getAllData(double &aValue, double &aErr,
79 std::vector<unsigned int>* &indLocal,
80 std::vector<double>* &derLocal, std::vector<int>* &labGlobal,
81 std::vector<double>* &derGlobal);
82 void getResidual(double &aResidual, double &aVariance, double &aDownWeight,
83 std::vector<unsigned int>* &indLocal,
84 std::vector<double>* &derLocal);
85
86private:
87 unsigned int theLabel;
88 double theValue;
89 double thePrecision;
92 std::vector<unsigned int> theParameters;
93 std::vector<double> theDerivatives;
94 std::vector<int> globalLabels;
95 std::vector<double> globalDerivatives;
96
97 ClassDef(GblData, 1)
98};
99}
100#endif /* GBLDATA_H_ */
ROOT::Math::SMatrix< double, 2, 5 > SMatrix25
Definition GblData.h:43
ROOT::Math::SMatrix< double, 5, 5 > SMatrix55
Definition GblData.h:45
ROOT::Math::SMatrix< double, 2, 7 > SMatrix27
Definition GblData.h:44
double thePrecision
Precision (1/sigma**2)
Definition GblData.h:89
std::vector< int > globalLabels
Labels for global derivatives.
Definition GblData.h:94
double theDownWeight
Down-weighting factor (0-1)
Definition GblData.h:90
std::vector< double > theDerivatives
List of derivatives for fit.
Definition GblData.h:93
double thePrediction
Prediction from fit.
Definition GblData.h:91
std::vector< unsigned int > theParameters
List of fit parameters (with non zero derivatives)
Definition GblData.h:92
unsigned int theLabel
Label (of measurements point)
Definition GblData.h:87
virtual ~GblData()
Definition GblData.cc:47
void getAllData(double &aValue, double &aErr, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal, std::vector< int > *&labGlobal, std::vector< double > *&derGlobal)
Get all Data for MP-II binary record.
Definition GblData.cc:242
void addDerivatives(unsigned int iRow, const std::vector< unsigned int > &labDer, const SMatrix55 &matDer, unsigned int iOff, const TMatrixD &derLocal, const std::vector< int > &labGlobal, const TMatrixD &derGlobal, unsigned int nLocal, const TMatrixD &derTrans)
Add derivatives from measurement.
Definition GblData.cc:63
double getChi2() const
Calculate Chi2 contribution.
Definition GblData.cc:195
void printData() const
Print data block.
Definition GblData.cc:201
void getLocalData(double &aValue, double &aWeight, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal)
Get Data for local fit.
Definition GblData.cc:224
void getResidual(double &aResidual, double &aVariance, double &aDownWeight, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal)
Get data for residual (and errors).
Definition GblData.cc:261
double theValue
Value (residual)
Definition GblData.h:88
double setDownWeighting(unsigned int aMethod)
Outlier down weighting with M-estimators (by GblTrajectory::fit).
Definition GblData.cc:166
std::vector< double > globalDerivatives
Global derivatives.
Definition GblData.h:95
void setPrediction(const VVector &aVector)
Calculate prediction for data from fit (by GblTrajectory::fit).
Definition GblData.cc:154
Simple Vector based on std::vector<double>
Definition VMatrix.h:43
Namespace for the general broken lines package.