CMS 3D CMS Logo

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 
49 TVectorD TotemRPLocalTrack::parameterVector() const {
50  TVectorD v(dimension);
51 
52  for (int i = 0; i < dimension; ++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 
67 TMatrixD TotemRPLocalTrack::covarianceMatrix() const {
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 
87 bool operator<(const TotemRPLocalTrack &l, const TotemRPLocalTrack &r) {
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) {
94  if (l.track_params_vector_[i] < r.track_params_vector_[i])
95  return true;
96  if (l.track_params_vector_[i] > r.track_params_vector_[i])
97  return true;
98  }
99 
100  return false;
101 }
TotemRPLocalTrack::z0_
double z0_
Definition: TotemRPLocalTrack.h:150
mps_fire.i
i
Definition: mps_fire.py:428
TotemRPLocalTrack::covarianceMatrix
TMatrixD covarianceMatrix() const
Definition: TotemRPLocalTrack.cc:66
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
operator<
bool operator<(const TotemRPLocalTrack &l, const TotemRPLocalTrack &r)
Definition: TotemRPLocalTrack.cc:86
TotemRPLocalTrack::TotemRPLocalTrack
TotemRPLocalTrack()
Definition: TotemRPLocalTrack.h:71
findQualityFiles.v
v
Definition: findQualityFiles.py:179
sistrip::valid_
static const uint16_t valid_
Definition: Constants.h:17
TotemRPLocalTrack::dimension
static const int dimension
< parameter vector size
Definition: TotemRPLocalTrack.h:66
TotemRPLocalTrack::parameterVector
TVectorD parameterVector() const
Definition: TotemRPLocalTrack.cc:48
TotemRPLocalTrack::track_params_vector_
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
Definition: TotemRPLocalTrack.h:146
TotemRPLocalTrack::trackPointInterpolationCovariance
TMatrixD trackPointInterpolationCovariance(double z) const
Definition: TotemRPLocalTrack.cc:13
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
DDAxes::z
h
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
funct::true
true
Definition: Factorize.h:173
TotemRPLocalTrack::CovarianceMatrixElement
const double & CovarianceMatrixElement(int i, int j) const
Definition: TotemRPLocalTrack.h:139
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
JetComb::kMult
Definition: TtSemiLepJetComb.h:35
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TotemRPLocalTrack
A track fit through a single RP.
Definition: TotemRPLocalTrack.h:30
TotemRPLocalTrack::setParameterVector
void setParameterVector(const TVectorD &track_params_vector)
Definition: TotemRPLocalTrack.cc:59
TotemRPLocalTrack.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TotemRPLocalTrack::setCovarianceMatrix
void setCovarianceMatrix(const TMatrixD &par_covariance_matrix)
Definition: TotemRPLocalTrack.cc:78