#include <Alignment/SurveyAnalysis/interface/DTSurveyChamber.h>
Public Member Functions | |
void | addPoint (int, const TMatrixD &, const TMatrixD &, const TMatrixD &) |
void | compute () |
DTSurveyChamber (int, int, int, long) | |
float | getAlpha () const |
float | getAlphaError () const |
float | getBeta () const |
float | getBetaError () const |
float | getDeltaX () const |
float | getDeltaXError () const |
float | getDeltaY () const |
float | getDeltaYError () const |
float | getDeltaZ () const |
float | getDeltaZError () const |
float | getGamma () const |
float | getGammaError () const |
long | getId () const |
int | getNumberPoints () const |
void | printChamberInfo () |
Private Member Functions | |
TMatrixD & | makeErrors () |
TMatrixD & | makeMatrix () |
TMatrixD & | makeVector () |
Private Attributes | |
TMatrixD | Covariance |
int | id |
int | pointNumber |
std::vector< TMatrixD > | points |
std::vector< TMatrixD > | pointsDiff |
std::vector< TMatrixD > | pointsError |
std::vector< TMatrixD > | pointsTheoretical |
long | rawId |
int | sector |
TMatrixD | Solution |
int | station |
int | wheel |
Definition at line 20 of file DTSurveyChamber.h.
Definition at line 7 of file DTSurveyChamber.cc.
References pointNumber, rawId, sector, station, and wheel.
00007 { 00008 00009 //Coordinates of the chamber 00010 wheel = m_wheel; 00011 station = m_station; 00012 sector = m_sector; 00013 pointNumber = 0; 00014 rawId = m_rawId; 00015 00016 }
void DTSurveyChamber::addPoint | ( | int | code, | |
const TMatrixD & | r, | |||
const TMatrixD & | disp, | |||
const TMatrixD & | err | |||
) |
Definition at line 35 of file DTSurveyChamber.cc.
References pointNumber, points, pointsDiff, pointsError, and pointsTheoretical.
Referenced by DTSurvey::ReadChambers().
00035 { 00036 00037 00038 ++pointNumber; 00039 00040 points.push_back(r); 00041 pointsDiff.push_back(disp); 00042 pointsError.push_back(err); 00043 pointsTheoretical.push_back(r-disp); 00044 00045 }
void DTSurveyChamber::compute | ( | ) |
Definition at line 19 of file DTSurveyChamber.cc.
References Covariance, HLT_VtxMuL3::errors, Chi2::getCovariance(), Chi2::getSolution(), makeErrors(), makeMatrix(), makeVector(), and Solution.
Referenced by DTSurvey::CalculateChambers().
00019 { 00020 00021 TMatrixD leftMatrix = makeMatrix(); 00022 TMatrixD rightMatrix = makeVector(); 00023 TMatrixD errors = makeErrors(); 00024 00025 Chi2 myChi2(leftMatrix, rightMatrix, errors); 00026 00027 Solution.ResizeTo(6,1); 00028 Solution = myChi2.getSolution(); 00029 Covariance.ResizeTo(6,6); 00030 Covariance = myChi2.getCovariance(); 00031 00032 }
float DTSurveyChamber::getAlpha | ( | ) | const [inline] |
Definition at line 40 of file DTSurveyChamber.h.
References Solution.
Referenced by operator<<().
00040 {return Solution(5,0);}
float DTSurveyChamber::getAlphaError | ( | ) | const [inline] |
Definition at line 46 of file DTSurveyChamber.h.
References Covariance.
Referenced by operator<<().
00046 {return TMath::Sqrt(Covariance(5,5));}
float DTSurveyChamber::getBeta | ( | ) | const [inline] |
Definition at line 41 of file DTSurveyChamber.h.
References Solution.
Referenced by operator<<().
00041 {return -1.0*Solution(4,0);}
float DTSurveyChamber::getBetaError | ( | ) | const [inline] |
Definition at line 47 of file DTSurveyChamber.h.
References Covariance.
Referenced by operator<<().
00047 {return TMath::Sqrt(Covariance(4,4));}
float DTSurveyChamber::getDeltaX | ( | ) | const [inline] |
Definition at line 36 of file DTSurveyChamber.h.
References Solution.
Referenced by operator<<().
00036 {return Solution(0,0);}
float DTSurveyChamber::getDeltaXError | ( | ) | const [inline] |
Definition at line 43 of file DTSurveyChamber.h.
References Covariance.
Referenced by operator<<().
00043 {return TMath::Sqrt(Covariance(0,0));}
float DTSurveyChamber::getDeltaY | ( | ) | const [inline] |
Definition at line 37 of file DTSurveyChamber.h.
References Solution.
Referenced by operator<<().
00037 {return Solution(1,0);}
float DTSurveyChamber::getDeltaYError | ( | ) | const [inline] |
Definition at line 44 of file DTSurveyChamber.h.
References Covariance.
Referenced by operator<<().
00044 {return TMath::Sqrt(Covariance(1,1));}
float DTSurveyChamber::getDeltaZ | ( | ) | const [inline] |
Definition at line 38 of file DTSurveyChamber.h.
References Solution.
Referenced by operator<<().
00038 {return Solution(2,0);}
float DTSurveyChamber::getDeltaZError | ( | ) | const [inline] |
Definition at line 45 of file DTSurveyChamber.h.
References Covariance.
Referenced by operator<<().
00045 {return TMath::Sqrt(Covariance(2,2));}
float DTSurveyChamber::getGamma | ( | ) | const [inline] |
Definition at line 42 of file DTSurveyChamber.h.
References Solution.
Referenced by operator<<().
00042 {return Solution(3,0);}
float DTSurveyChamber::getGammaError | ( | ) | const [inline] |
Definition at line 48 of file DTSurveyChamber.h.
References Covariance.
Referenced by operator<<().
00048 {return TMath::Sqrt(Covariance(3,3));}
long DTSurveyChamber::getId | ( | ) | const [inline] |
Definition at line 35 of file DTSurveyChamber.h.
References rawId.
Referenced by operator<<().
00035 {return rawId;}
int DTSurveyChamber::getNumberPoints | ( | ) | const [inline] |
Definition at line 32 of file DTSurveyChamber.h.
References pointNumber.
Referenced by makeErrors(), makeMatrix(), makeVector(), and operator<<().
00032 { return pointNumber; }
TMatrixD & DTSurveyChamber::makeErrors | ( | ) | [private] |
Definition at line 65 of file DTSurveyChamber.cc.
References getNumberPoints(), p, pointsError, and HLT_VtxMuL3::result.
Referenced by compute().
00065 { 00066 00067 TMatrixD *result = new TMatrixD(3*getNumberPoints(),3*getNumberPoints()); 00068 result->Zero(); 00069 int real = 0; 00070 for(std::vector<TMatrixD >::iterator p = pointsError.begin(); p != pointsError.end(); ++p) { 00071 double rmsn = 1.0/((*p)(0,0)*(*p)(0,0)); 00072 (*result)(real*3,real*3) = rmsn; 00073 (*result)(real*3+1,real*3+1) = rmsn; 00074 (*result)(real*3+2,real*3+2) = rmsn; 00075 real++; 00076 } 00077 return *result; 00078 }
TMatrixD & DTSurveyChamber::makeMatrix | ( | ) | [private] |
Definition at line 81 of file DTSurveyChamber.cc.
References getNumberPoints(), p, pointsTheoretical, and HLT_VtxMuL3::result.
Referenced by compute().
00081 { 00082 00083 TMatrixD *result = new TMatrixD(3*getNumberPoints(), 6); 00084 result->Zero(); 00085 int real = 0; 00086 for(std::vector<TMatrixD >::iterator p = pointsTheoretical.begin(); p != pointsTheoretical.end(); p++) { 00087 (*result)(real*3,0)= 1.0; 00088 (*result)(real*3,3) = (*p)(1,0); 00089 (*result)(real*3,4) = (*p)(2,0); 00090 (*result)(real*3+1,1) = 1.0; 00091 (*result)(real*3+1,3) = -(*p)(0,0); 00092 (*result)(real*3+1,5) = (*p)(2,0); 00093 (*result)(real*3+2,2) = 1.0; 00094 (*result)(real*3+2,4) = -(*p)(0,0); 00095 (*result)(real*3+2,5) = -(*p)(1,0); 00096 real++; 00097 } 00098 return *result; 00099 }
TMatrixD & DTSurveyChamber::makeVector | ( | ) | [private] |
Definition at line 49 of file DTSurveyChamber.cc.
References getNumberPoints(), p, pointsDiff, and HLT_VtxMuL3::result.
Referenced by compute().
00049 { 00050 00051 TMatrixD *result = new TMatrixD(3*getNumberPoints(),1); 00052 result->Zero(); 00053 int real = 0; 00054 for(std::vector<TMatrixD >::iterator p = pointsDiff.begin(); p != pointsDiff.end(); ++p) { 00055 (*result)(real*3,0) = (*p)(0,0); 00056 (*result)(real*3+1,0) = (*p)(1,0); 00057 (*result)(real*3+2,0) = (*p)(2,0); 00058 ++real; 00059 } 00060 return *result; 00061 }
void DTSurveyChamber::printChamberInfo | ( | ) |
TMatrixD DTSurveyChamber::Covariance [private] |
Definition at line 73 of file DTSurveyChamber.h.
Referenced by compute(), getAlphaError(), getBetaError(), getDeltaXError(), getDeltaYError(), getDeltaZError(), and getGammaError().
int DTSurveyChamber::id [private] |
Definition at line 61 of file DTSurveyChamber.h.
int DTSurveyChamber::pointNumber [private] |
Definition at line 76 of file DTSurveyChamber.h.
Referenced by addPoint(), DTSurveyChamber(), and getNumberPoints().
std::vector<TMatrixD> DTSurveyChamber::points [private] |
std::vector<TMatrixD> DTSurveyChamber::pointsDiff [private] |
std::vector<TMatrixD> DTSurveyChamber::pointsError [private] |
std::vector<TMatrixD> DTSurveyChamber::pointsTheoretical [private] |
long DTSurveyChamber::rawId [private] |
int DTSurveyChamber::sector [private] |
TMatrixD DTSurveyChamber::Solution [private] |
Definition at line 72 of file DTSurveyChamber.h.
Referenced by compute(), getAlpha(), getBeta(), getDeltaX(), getDeltaY(), getDeltaZ(), and getGamma().
int DTSurveyChamber::station [private] |
int DTSurveyChamber::wheel [private] |