CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Alignment/SurveyAnalysis/interface/DTSurveyChamber.h

Go to the documentation of this file.
00001 
00012 #ifndef Alignment_SurveyAnalysis_DTSurveyChamber_H
00013 #define Alignment_SurveyAnalysis_DTSurveyChamber_H
00014 
00015 #include <vector>
00016 
00017 #include "TMath.h"
00018 #include "TMatrixD.h" 
00019 
00020 class DTSurveyChamber {
00021   
00022   
00023  public:
00024 
00025   DTSurveyChamber(int, int, int, long);
00026   
00027 
00028   //Add a point to the Chamber
00029   void addPoint(int, const TMatrixD&, const TMatrixD&, const TMatrixD&);
00030   
00031   //Begin the chi2 computation
00032   int getNumberPoints() const { return pointNumber; }
00033   void compute();
00034   void printChamberInfo(); 
00035   long getId() const {return rawId;}
00036   float getDeltaX() const {return Solution(0,0);}
00037   float getDeltaY() const {return Solution(1,0);}
00038   float getDeltaZ() const {return Solution(2,0);}
00039   //My definition of the matrix rotation is not the same as the used in CMSSW  
00040   float getAlpha() const {return Solution(5,0);}
00041   float getBeta() const {return -1.0*Solution(4,0);}
00042   float getGamma() const {return Solution(3,0);}
00043   float getDeltaXError() const {return TMath::Sqrt(Covariance(0,0));}
00044   float getDeltaYError() const {return TMath::Sqrt(Covariance(1,1));}
00045   float getDeltaZError() const {return TMath::Sqrt(Covariance(2,2));}
00046   float getAlphaError() const {return TMath::Sqrt(Covariance(5,5));}
00047   float getBetaError() const {return TMath::Sqrt(Covariance(4,4));}
00048   float getGammaError() const {return TMath::Sqrt(Covariance(3,3));}
00049 
00050  
00051  private:
00052 
00053 //   static const unsigned int MAX_PUNTOS = 16;
00054 
00055   TMatrixD & makeMatrix();
00056   TMatrixD & makeErrors();
00057   TMatrixD & makeVector();
00058 
00059   
00060   //Identifiers
00061   int wheel, station, sector;
00062   
00063   long rawId;
00064 
00065 
00066   //Points data
00067   std::vector<TMatrixD> points;
00068   std::vector<TMatrixD> pointsDiff;
00069   std::vector<TMatrixD> pointsError;
00070   std::vector<TMatrixD> pointsTheoretical;
00071   
00072   TMatrixD Solution;
00073   TMatrixD Covariance;
00074    
00075   //Number of points
00076   int pointNumber;
00077   
00078 };
00079 
00080 std::ostream & operator<<(std::ostream &, const DTSurveyChamber&);
00081 
00082 
00083 
00084 #endif