CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTSurveyChamber Class Reference

#include <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 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
 

Detailed Description

Implements a chamber in the context of Drift Tube Survey Measurements and calculates displacements and rotations for it.

Date:
2008/04/11 05:08:01
Revision:
1.5
Author
Pablo Martinez Ruiz del Arbol

Definition at line 20 of file DTSurveyChamber.h.

Constructor & Destructor Documentation

DTSurveyChamber::DTSurveyChamber ( int  m_wheel,
int  m_station,
int  m_sector,
long  m_rawId 
)

Definition at line 7 of file DTSurveyChamber.cc.

References pointNumber, rawId, sector, station, and wheel.

7  {
8 
9  //Coordinates of the chamber
10  wheel = m_wheel;
11  station = m_station;
12  sector = m_sector;
13  pointNumber = 0;
14  rawId = m_rawId;
15 
16 }

Member Function Documentation

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().

35  {
36 
37 
38  ++pointNumber;
39 
40  points.push_back(r);
41  pointsDiff.push_back(disp);
42  pointsError.push_back(err);
43  pointsTheoretical.push_back(r-disp);
44 
45 }
std::vector< TMatrixD > points
std::vector< TMatrixD > pointsError
std::vector< TMatrixD > pointsTheoretical
std::vector< TMatrixD > pointsDiff
void DTSurveyChamber::compute ( )

Definition at line 19 of file DTSurveyChamber.cc.

References benchmark_cfg::errors, Chi2::getCovariance(), Chi2::getSolution(), makeErrors(), makeMatrix(), makeVector(), and Solution.

Referenced by DTSurvey::CalculateChambers().

19  {
20 
21  TMatrixD leftMatrix = makeMatrix();
22  TMatrixD rightMatrix = makeVector();
23  TMatrixD errors = makeErrors();
24 
25  Chi2 myChi2(leftMatrix, rightMatrix, errors);
26 
27  Solution.ResizeTo(6,1);
28  Solution = myChi2.getSolution();
29  Covariance.ResizeTo(6,6);
30  Covariance = myChi2.getCovariance();
31 
32 }
Definition: Chi2.h:17
TMatrixD & makeVector()
TMatrixD & makeMatrix()
TMatrixD & makeErrors()
float DTSurveyChamber::getAlpha ( ) const
inline

Definition at line 40 of file DTSurveyChamber.h.

References Solution.

Referenced by operator<<().

40 {return Solution(5,0);}
float DTSurveyChamber::getAlphaError ( ) const
inline

Definition at line 46 of file DTSurveyChamber.h.

References Covariance.

Referenced by operator<<().

46 {return TMath::Sqrt(Covariance(5,5));}
float DTSurveyChamber::getBeta ( ) const
inline

Definition at line 41 of file DTSurveyChamber.h.

References Solution.

Referenced by operator<<().

41 {return -1.0*Solution(4,0);}
float DTSurveyChamber::getBetaError ( ) const
inline

Definition at line 47 of file DTSurveyChamber.h.

References Covariance.

Referenced by operator<<().

47 {return TMath::Sqrt(Covariance(4,4));}
float DTSurveyChamber::getDeltaX ( ) const
inline

Definition at line 36 of file DTSurveyChamber.h.

References Solution.

Referenced by operator<<().

36 {return Solution(0,0);}
float DTSurveyChamber::getDeltaXError ( ) const
inline

Definition at line 43 of file DTSurveyChamber.h.

References Covariance.

Referenced by operator<<().

43 {return TMath::Sqrt(Covariance(0,0));}
float DTSurveyChamber::getDeltaY ( ) const
inline

Definition at line 37 of file DTSurveyChamber.h.

References Solution.

Referenced by operator<<().

37 {return Solution(1,0);}
float DTSurveyChamber::getDeltaYError ( ) const
inline

Definition at line 44 of file DTSurveyChamber.h.

References Covariance.

Referenced by operator<<().

44 {return TMath::Sqrt(Covariance(1,1));}
float DTSurveyChamber::getDeltaZ ( ) const
inline

Definition at line 38 of file DTSurveyChamber.h.

References Solution.

Referenced by operator<<().

38 {return Solution(2,0);}
float DTSurveyChamber::getDeltaZError ( ) const
inline

Definition at line 45 of file DTSurveyChamber.h.

References Covariance.

Referenced by operator<<().

45 {return TMath::Sqrt(Covariance(2,2));}
float DTSurveyChamber::getGamma ( ) const
inline

Definition at line 42 of file DTSurveyChamber.h.

References Solution.

Referenced by operator<<().

42 {return Solution(3,0);}
float DTSurveyChamber::getGammaError ( ) const
inline

Definition at line 48 of file DTSurveyChamber.h.

References Covariance.

Referenced by operator<<().

48 {return TMath::Sqrt(Covariance(3,3));}
long DTSurveyChamber::getId ( ) const
inline

Definition at line 35 of file DTSurveyChamber.h.

References rawId.

Referenced by operator<<().

35 {return rawId;}
int DTSurveyChamber::getNumberPoints ( ) const
inline

Definition at line 32 of file DTSurveyChamber.h.

References pointNumber.

Referenced by makeErrors(), makeMatrix(), makeVector(), and operator<<().

32 { return pointNumber; }
TMatrixD & DTSurveyChamber::makeErrors ( )
private

Definition at line 65 of file DTSurveyChamber.cc.

References getNumberPoints(), AlCaHLTBitMon_ParallelJobs::p, pointsError, and mps_fire::result.

Referenced by compute().

65  {
66 
67  TMatrixD *result = new TMatrixD(3*getNumberPoints(),3*getNumberPoints());
68  result->Zero();
69  int real = 0;
70  for(std::vector<TMatrixD >::iterator p = pointsError.begin(); p != pointsError.end(); ++p) {
71  double rmsn = 1.0/((*p)(0,0)*(*p)(0,0));
72  (*result)(real*3,real*3) = rmsn;
73  (*result)(real*3+1,real*3+1) = rmsn;
74  (*result)(real*3+2,real*3+2) = rmsn;
75  real++;
76  }
77  return *result;
78 }
std::vector< TMatrixD > pointsError
int getNumberPoints() const
tuple result
Definition: mps_fire.py:84
TMatrixD & DTSurveyChamber::makeMatrix ( )
private

Definition at line 81 of file DTSurveyChamber.cc.

References getNumberPoints(), AlCaHLTBitMon_ParallelJobs::p, pointsTheoretical, and mps_fire::result.

Referenced by compute().

81  {
82 
83  TMatrixD *result = new TMatrixD(3*getNumberPoints(), 6);
84  result->Zero();
85  int real = 0;
86  for(std::vector<TMatrixD >::iterator p = pointsTheoretical.begin(); p != pointsTheoretical.end(); p++) {
87  (*result)(real*3,0)= 1.0;
88  (*result)(real*3,3) = (*p)(1,0);
89  (*result)(real*3,4) = (*p)(2,0);
90  (*result)(real*3+1,1) = 1.0;
91  (*result)(real*3+1,3) = -(*p)(0,0);
92  (*result)(real*3+1,5) = (*p)(2,0);
93  (*result)(real*3+2,2) = 1.0;
94  (*result)(real*3+2,4) = -(*p)(0,0);
95  (*result)(real*3+2,5) = -(*p)(1,0);
96  real++;
97  }
98  return *result;
99 }
int getNumberPoints() const
tuple result
Definition: mps_fire.py:84
std::vector< TMatrixD > pointsTheoretical
TMatrixD & DTSurveyChamber::makeVector ( )
private

Definition at line 49 of file DTSurveyChamber.cc.

References getNumberPoints(), AlCaHLTBitMon_ParallelJobs::p, pointsDiff, and mps_fire::result.

Referenced by compute().

49  {
50 
51  TMatrixD *result = new TMatrixD(3*getNumberPoints(),1);
52  result->Zero();
53  int real = 0;
54  for(std::vector<TMatrixD >::iterator p = pointsDiff.begin(); p != pointsDiff.end(); ++p) {
55  (*result)(real*3,0) = (*p)(0,0);
56  (*result)(real*3+1,0) = (*p)(1,0);
57  (*result)(real*3+2,0) = (*p)(2,0);
58  ++real;
59  }
60  return *result;
61 }
int getNumberPoints() const
tuple result
Definition: mps_fire.py:84
std::vector< TMatrixD > pointsDiff
void DTSurveyChamber::printChamberInfo ( )

Member Data Documentation

TMatrixD DTSurveyChamber::Covariance
private
int DTSurveyChamber::pointNumber
private

Definition at line 76 of file DTSurveyChamber.h.

Referenced by addPoint(), DTSurveyChamber(), and getNumberPoints().

std::vector<TMatrixD> DTSurveyChamber::points
private

Definition at line 67 of file DTSurveyChamber.h.

Referenced by addPoint().

std::vector<TMatrixD> DTSurveyChamber::pointsDiff
private

Definition at line 68 of file DTSurveyChamber.h.

Referenced by addPoint(), and makeVector().

std::vector<TMatrixD> DTSurveyChamber::pointsError
private

Definition at line 69 of file DTSurveyChamber.h.

Referenced by addPoint(), and makeErrors().

std::vector<TMatrixD> DTSurveyChamber::pointsTheoretical
private

Definition at line 70 of file DTSurveyChamber.h.

Referenced by addPoint(), and makeMatrix().

long DTSurveyChamber::rawId
private

Definition at line 63 of file DTSurveyChamber.h.

Referenced by DTSurveyChamber(), and getId().

int DTSurveyChamber::sector
private

Definition at line 61 of file DTSurveyChamber.h.

Referenced by DTSurveyChamber(), and geometryXMLparser.DTAlignable::index().

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

Definition at line 61 of file DTSurveyChamber.h.

Referenced by DTSurveyChamber(), and geometryXMLparser.DTAlignable::index().