CMS 3D CMS Logo

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::makeMatrix
TMatrixD & makeMatrix()
Definition: DTSurveyChamber.cc:64
DTSurveyChamber::makeVector
TMatrixD & makeVector()
Definition: DTSurveyChamber.cc:37
DTSurveyChamber
Definition: DTSurveyChamber.h:19
DTSurveyChamber::getGamma
float getGamma() const
Definition: DTSurveyChamber.h:37
DTSurveyChamber::Solution
TMatrixD Solution
Definition: DTSurveyChamber.h:63
DTSurveyChamber::getDeltaYError
float getDeltaYError() const
Definition: DTSurveyChamber.h:39
DTSurveyChamber::Covariance
TMatrixD Covariance
Definition: DTSurveyChamber.h:64
DTSurveyChamber::getId
long getId() const
Definition: DTSurveyChamber.h:30
DTSurveyChamber::getAlpha
float getAlpha() const
Definition: DTSurveyChamber.h:35
DTSurveyChamber::getBeta
float getBeta() const
Definition: DTSurveyChamber.h:36
DTSurveyChamber::getAlphaError
float getAlphaError() const
Definition: DTSurveyChamber.h:41
DTSurveyChamber::getDeltaY
float getDeltaY() const
Definition: DTSurveyChamber.h:32
DTSurveyChamber::printChamberInfo
void printChamberInfo()
DTSurveyChamber::sector
int sector
Definition: DTSurveyChamber.h:53
DTSurveyChamber::getDeltaZError
float getDeltaZError() const
Definition: DTSurveyChamber.h:40
DTSurveyChamber::getGammaError
float getGammaError() const
Definition: DTSurveyChamber.h:43
DTSurveyChamber::station
int station
Definition: DTSurveyChamber.h:53
DTSurveyChamber::getBetaError
float getBetaError() const
Definition: DTSurveyChamber.h:42
DTSurveyChamber::DTSurveyChamber
DTSurveyChamber(int, int, int, long)
Definition: DTSurveyChamber.cc:6
DTSurveyChamber::wheel
int wheel
Definition: DTSurveyChamber.h:53
DTSurveyChamber::makeErrors
TMatrixD & makeErrors()
Definition: DTSurveyChamber.cc:50
DTSurveyChamber::getDeltaX
float getDeltaX() const
Definition: DTSurveyChamber.h:31
DTSurveyChamber::pointsTheoretical
std::vector< TMatrixD > pointsTheoretical
Definition: DTSurveyChamber.h:61
DTSurveyChamber::points
std::vector< TMatrixD > points
Definition: DTSurveyChamber.h:58
DTSurveyChamber::addPoint
void addPoint(int, const TMatrixD &, const TMatrixD &, const TMatrixD &)
Definition: DTSurveyChamber.cc:28
DTSurveyChamber::getDeltaZ
float getDeltaZ() const
Definition: DTSurveyChamber.h:33
DTSurveyChamber::getNumberPoints
int getNumberPoints() const
Definition: DTSurveyChamber.h:27
operator<<
std::ostream & operator<<(std::ostream &, const DTSurveyChamber &)
Definition: DTSurveyChamber.cc:83
DTSurveyChamber::getDeltaXError
float getDeltaXError() const
Definition: DTSurveyChamber.h:38
DTSurveyChamber::pointNumber
int pointNumber
Definition: DTSurveyChamber.h:67
DTSurveyChamber::pointsError
std::vector< TMatrixD > pointsError
Definition: DTSurveyChamber.h:60
DTSurveyChamber::compute
void compute()
Definition: DTSurveyChamber.cc:15
DTSurveyChamber::rawId
long rawId
Definition: DTSurveyChamber.h:55
DTSurveyChamber::pointsDiff
std::vector< TMatrixD > pointsDiff
Definition: DTSurveyChamber.h:59