Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GblData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GblData.h
1 /*
2  * GblData.h
3  *
4  * Created on: Aug 18, 2011
5  * Author: kleinwrt
6  */
7 
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"
43 typedef ROOT::Math::SMatrix<double, 2, 5> SMatrix25;
44 typedef ROOT::Math::SMatrix<double, 2, 7> SMatrix27;
45 typedef ROOT::Math::SMatrix<double, 5, 5> SMatrix55;
46 
48 namespace gbl {
49 
51 
55 class GblData {
56 public:
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 
86 private:
87  unsigned int theLabel;
88  double theValue;
89  double thePrecision;
90  double theDownWeight;
91  double thePrediction;
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_ */