# Project CMSSW displayed by LXR

File indexing completed on 2024-04-06 11:57:22

```0001 /** \class DTSurveyChamber
0002  *
0003  *  Implements a chamber in the context of Drift Tube Survey Measurements
0004  *  and calculates displacements and rotations for it.
0005  *
0006  *  \$Date: 2008/04/11 05:08:01 \$
0007  *  \$Revision: 1.5 \$
0008  *  \author Pablo Martinez Ruiz del Arbol
0009  */
0010
0011 #ifndef Alignment_SurveyAnalysis_DTSurveyChamber_H
0012 #define Alignment_SurveyAnalysis_DTSurveyChamber_H
0013
0014 #include <vector>
0015
0016 #include "TMath.h"
0017 #include "TMatrixD.h"
0018
0019 class DTSurveyChamber {
0020 public:
0021   DTSurveyChamber(int, int, int, long);
0022
0023   //Add a point to the Chamber
0024   void addPoint(int, const TMatrixD &, const TMatrixD &, const TMatrixD &);
0025
0026   //Begin the chi2 computation
0027   int getNumberPoints() const { return pointNumber; }
0028   void compute();
0029   void printChamberInfo();
0030   long getId() const { return rawId; }
0031   float getDeltaX() const { return Solution(0, 0); }
0032   float getDeltaY() const { return Solution(1, 0); }
0033   float getDeltaZ() const { return Solution(2, 0); }
0034   //My definition of the matrix rotation is not the same as the used in CMSSW
0035   float getAlpha() const { return Solution(5, 0); }
0036   float getBeta() const { return -1.0 * Solution(4, 0); }
0037   float getGamma() const { return Solution(3, 0); }
0038   float getDeltaXError() const { return TMath::Sqrt(Covariance(0, 0)); }
0039   float getDeltaYError() const { return TMath::Sqrt(Covariance(1, 1)); }
0040   float getDeltaZError() const { return TMath::Sqrt(Covariance(2, 2)); }
0041   float getAlphaError() const { return TMath::Sqrt(Covariance(5, 5)); }
0042   float getBetaError() const { return TMath::Sqrt(Covariance(4, 4)); }
0043   float getGammaError() const { return TMath::Sqrt(Covariance(3, 3)); }
0044
0045 private:
0046   //   static const unsigned int MAX_PUNTOS = 16;
0047
0048   TMatrixD &makeMatrix();
0049   TMatrixD &makeErrors();
0050   TMatrixD &makeVector();
0051
0052   //Identifiers
0053   int wheel, station, sector;
0054
0055   long rawId;
0056
0057   //Points data
0058   std::vector<TMatrixD> points;
0059   std::vector<TMatrixD> pointsDiff;
0060   std::vector<TMatrixD> pointsError;
0061   std::vector<TMatrixD> pointsTheoretical;
0062
0063   TMatrixD Solution;
0064   TMatrixD Covariance;
0065
0066   //Number of points
0067   int pointNumber;
0068 };
0069
0070 std::ostream &operator<<(std::ostream &, const DTSurveyChamber &);
0071
0072 #endif```