CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTSurveyChamber.h
Go to the documentation of this file.
1 
11 #ifndef Alignment_SurveyAnalysis_DTSurveyChamber_H
12 #define Alignment_SurveyAnalysis_DTSurveyChamber_H
13 
14 #include <vector>
15 
16 #include "TMath.h"
17 #include "TMatrixD.h"
18 
20 public:
21  DTSurveyChamber(int, int, int, long);
22 
23  //Add a point to the Chamber
24  void addPoint(int, const TMatrixD &, const TMatrixD &, const TMatrixD &);
25 
26  //Begin the chi2 computation
27  int getNumberPoints() const { return pointNumber; }
28  void compute();
29  void printChamberInfo();
30  long getId() const { return rawId; }
31  float getDeltaX() const { return Solution(0, 0); }
32  float getDeltaY() const { return Solution(1, 0); }
33  float getDeltaZ() const { return Solution(2, 0); }
34  //My definition of the matrix rotation is not the same as the used in CMSSW
35  float getAlpha() const { return Solution(5, 0); }
36  float getBeta() const { return -1.0 * Solution(4, 0); }
37  float getGamma() const { return Solution(3, 0); }
38  float getDeltaXError() const { return TMath::Sqrt(Covariance(0, 0)); }
39  float getDeltaYError() const { return TMath::Sqrt(Covariance(1, 1)); }
40  float getDeltaZError() const { return TMath::Sqrt(Covariance(2, 2)); }
41  float getAlphaError() const { return TMath::Sqrt(Covariance(5, 5)); }
42  float getBetaError() const { return TMath::Sqrt(Covariance(4, 4)); }
43  float getGammaError() const { return TMath::Sqrt(Covariance(3, 3)); }
44 
45 private:
46  // static const unsigned int MAX_PUNTOS = 16;
47 
48  TMatrixD &makeMatrix();
49  TMatrixD &makeErrors();
50  TMatrixD &makeVector();
51 
52  //Identifiers
54 
55  long rawId;
56 
57  //Points data
58  std::vector<TMatrixD> points;
59  std::vector<TMatrixD> pointsDiff;
60  std::vector<TMatrixD> pointsError;
61  std::vector<TMatrixD> pointsTheoretical;
62 
63  TMatrixD Solution;
64  TMatrixD Covariance;
65 
66  //Number of points
68 };
69 
70 std::ostream &operator<<(std::ostream &, const DTSurveyChamber &);
71 
72 #endif
DTSurveyChamber(int, int, int, long)
std::vector< TMatrixD > points
float getDeltaZError() const
float getDeltaYError() const
long getId() const
std::vector< TMatrixD > pointsError
int getNumberPoints() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
float getDeltaXError() const
std::vector< TMatrixD > pointsTheoretical
float getDeltaZ() const
float getBeta() const
void addPoint(int, const TMatrixD &, const TMatrixD &, const TMatrixD &)
float getAlphaError() const
float getGammaError() const
float getDeltaX() const
float getAlpha() const
float getGamma() const
float getDeltaY() const
float getBetaError() const
TMatrixD & makeVector()
std::vector< TMatrixD > pointsDiff
TMatrixD & makeMatrix()
void printChamberInfo()
TMatrixD & makeErrors()