CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TotemRPLocalTrack.cc
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of TOTEM offline software.
4  * Authors:
5  * Hubert Niewiadomski
6  * Jan Kašpar (jan.kaspar@gmail.com)
7  *
8  ****************************************************************************/
9 
11 
12 //----------------------------------------------------------------------------------------------------
13 
15  TMatrixD h(2, 4);
16  h(0, 0) = 1;
17  h(1, 1) = 1;
18  h(0, 2) = z - z0_;
19  h(1, 3) = z - z0_;
20 
21  TMatrixD cov_matr(dimension, dimension);
22  for (int i = 0; i < dimension; ++i)
23  for (int j = 0; j < dimension; ++j)
24  cov_matr(i, j) = CovarianceMatrixElement(i, j);
25 
26  TMatrixD V_hT(cov_matr, TMatrixD::kMultTranspose, h);
27  //h*=V_hT;
28  //return h;
29  return TMatrixD(h, TMatrixD::kMult, V_hT);
30 }
31 
32 //----------------------------------------------------------------------------------------------------
33 
35  const TVectorD &track_params_vector,
36  const TMatrixD &par_covariance_matrix,
37  double chiSquared)
38  : z0_(z0), chiSquared_(chiSquared), valid_(true) {
39  for (int i = 0; i < dimension; ++i) {
40  track_params_vector_[i] = track_params_vector[i];
41  for (int j = 0; j < dimension; ++j) {
42  CovarianceMatrixElement(i, j) = par_covariance_matrix(i, j);
43  }
44  }
45 }
46 
47 //----------------------------------------------------------------------------------------------------
48 
50  TVectorD v(dimension);
51 
52  for (int i = 0; i < dimension; ++i)
53  v[i] = track_params_vector_[i];
54 
55  return v;
56 }
57 
58 //----------------------------------------------------------------------------------------------------
59 
60 void TotemRPLocalTrack::setParameterVector(const TVectorD &track_params_vector) {
61  for (int i = 0; i < dimension; ++i)
62  track_params_vector_[i] = track_params_vector[i];
63 }
64 
65 //----------------------------------------------------------------------------------------------------
66 
68  TMatrixD m(dimension, dimension);
69 
70  for (int i = 0; i < dimension; ++i)
71  for (int j = 0; j < dimension; ++j)
73 
74  return m;
75 }
76 
77 //----------------------------------------------------------------------------------------------------
78 
79 void TotemRPLocalTrack::setCovarianceMatrix(const TMatrixD &par_covariance_matrix) {
80  for (int i = 0; i < dimension; ++i)
81  for (int j = 0; j < dimension; ++j)
82  CovarianceMatrixElement(i, j) = par_covariance_matrix(i, j);
83 }
84 
85 //----------------------------------------------------------------------------------------------------
86 
88  if (l.z0_ < r.z0_)
89  return true;
90  if (l.z0_ > r.z0_)
91  return true;
92 
93  for (int i = 0; i < TotemRPLocalTrack::dimension; ++i) {
95  return true;
97  return true;
98  }
99 
100  return false;
101 }
static const uint16_t valid_
Definition: Constants.h:17
A track fit through a single RP.
float float float z
TMatrixD trackPointInterpolationCovariance(double z) const
static const int dimension
&lt; parameter vector size
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
TMatrixD covarianceMatrix() const
const double & CovarianceMatrixElement(int i, int j) const
TVectorD parameterVector() const
bool operator<(DTCELinkId const &lhs, DTCELinkId const &rhs)
Definition: DTCELinkId.h:70
void setCovarianceMatrix(const TMatrixD &par_covariance_matrix)
void setParameterVector(const TVectorD &track_params_vector)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4