GeneralBrokenLines  trunk_rev46
 All Classes Files Functions Variables Typedefs Pages
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 
8 #ifndef GBLDATA_H_
9 #define GBLDATA_H_
10 
11 #include<iostream>
12 #include<vector>
13 #include<math.h>
14 #include "VMatrix.h"
15 #include "TVectorD.h"
16 #include "TMatrixD.h"
17 #include "TMatrixDSym.h"
18 
19 #include "Math/SMatrix.h"
20 #include "Math/SVector.h"
21 typedef ROOT::Math::SMatrix<double, 2, 5> SMatrix25;
22 typedef ROOT::Math::SMatrix<double, 2, 7> SMatrix27;
23 typedef ROOT::Math::SMatrix<double, 5, 5> SMatrix55;
24 
26 
30 class GblData {
31 public:
32  GblData(unsigned int aLabel, double aMeas, double aPrec);
33  virtual ~GblData();
34  void addDerivatives(unsigned int iRow,
35  const std::vector<unsigned int> &labDer, const SMatrix55 &matDer,
36  unsigned int iOff, const TMatrixD &derLocal,
37  const std::vector<int> &labGlobal, const TMatrixD &derGlobal,
38  unsigned int nLocal, const TMatrixD &derTrans);
39  void addDerivatives(unsigned int iRow,
40  const std::vector<unsigned int> &labDer, const SMatrix27 &matDer,
41  unsigned int nLocal, const TMatrixD &derTrans);
42  void addDerivatives(const std::vector<unsigned int> &index,
43  const std::vector<double> &derivatives);
44 
45  void setPrediction(const VVector &aVector);
46  double setDownWeighting(unsigned int aMethod);
47  double getChi2() const;
48  void printData() const;
49  void getLocalData(double &aValue, double &aWeight,
50  std::vector<unsigned int>* &indLocal,
51  std::vector<double>* &derLocal);
52  void getAllData(float &fValue, float &fErr,
53  std::vector<unsigned int>* &indLocal,
54  std::vector<double>* &derLocal, std::vector<int>* &labGlobal,
55  std::vector<double>* &derGlobal);
56  void getResidual(double &aResidual, double &aVariance, double &aDownWeight,
57  std::vector<unsigned int>* &indLocal,
58  std::vector<double>* &derLocal);
59 
60 private:
61  unsigned int theLabel;
62  double theValue;
63  double thePrecision;
64  double theDownWeight;
65  double thePrediction;
66  std::vector<unsigned int> theParameters;
67  std::vector<double> theDerivatives;
68  std::vector<int> globalLabels;
69  std::vector<double> globalDerivatives;
70 };
71 
72 #endif /* GBLDATA_H_ */