CMS 3D CMS Logo

TrackDer.h
Go to the documentation of this file.
1 //
2 // This class holdes the 'deriviatives' used in the linearized chi^2 fit.
3 // This is also referred to as the weight matrix which is used to weight
4 // the residuls when calculating the updated track parameters.
5 //
6 //
7 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackDer_h
8 #define L1Trigger_TrackFindingTracklet_interface_TrackDer_h
9 
10 #include <iostream>
11 #include <fstream>
12 #include <cassert>
13 #include <cmath>
14 #include <vector>
15 
17 
18 namespace trklet {
19 
20  class TrackDer {
21  public:
22  TrackDer();
23 
24  ~TrackDer() = default;
25 
26  void setIndex(int layermask, int diskmask, int alphamask, int irinv);
27 
28  int layerMask() const { return layermask_; }
29  int diskMask() const { return diskmask_; }
30  int alphaMask() const { return alphamask_; }
31  int irinv() const { return irinv_; }
32 
33  void setirinvdphi(int i, int irinvdphi) { irinvdphi_[i] = irinvdphi; }
35  void setiphi0dphi(int i, int iphi0dphi) { iphi0dphi_[i] = iphi0dphi; }
37  void setitdphi(int i, int itdphi) { itdphi_[i] = itdphi; }
38  void setitdzordr(int i, int itdzordr) { itdzordr_[i] = itdzordr; }
39  void setiz0dphi(int i, int iz0dphi) { iz0dphi_[i] = iz0dphi; }
40  void setiz0dzordr(int i, int iz0dzordr) { iz0dzordr_[i] = iz0dzordr; }
41 
42  void setitdzcorr(int i, int j, int itdzcorr) { itdzcorr_[i][j] = itdzcorr; }
43  void setiz0dzcorr(int i, int j, int iz0dzcorr) { iz0dzcorr_[i][j] = iz0dzcorr; }
44 
45  void setrinvdphi(int i, double rinvdphi) { rinvdphi_[i] = rinvdphi; }
46  void setrinvdzordr(int i, double rinvdzordr) { rinvdzordr_[i] = rinvdzordr; }
47  void setphi0dphi(int i, double phi0dphi) { phi0dphi_[i] = phi0dphi; }
48  void setphi0dzordr(int i, double phi0dzordr) { phi0dzordr_[i] = phi0dzordr; }
49  void settdphi(int i, double tdphi) { tdphi_[i] = tdphi; }
50  void settdzordr(int i, double tdzordr) { tdzordr_[i] = tdzordr; }
51  void setz0dphi(int i, double z0dphi) { z0dphi_[i] = z0dphi; }
52  void setz0dzordr(int i, double z0dzordr) { z0dzordr_[i] = z0dzordr; }
53 
54  void settdzcorr(int i, int j, double tdzcorr) { tdzcorr_[i][j] = tdzcorr; }
55  void setz0dzcorr(int i, int j, double z0dzcorr) { z0dzcorr_[i][j] = z0dzcorr; }
56 
57  double rinvdphi(int i) const { return rinvdphi_[i]; }
58  double rinvdzordr(int i) const { return rinvdzordr_[i]; }
59  double phi0dphi(int i) const { return phi0dphi_[i]; }
60  double phi0dzordr(int i) const { return phi0dzordr_[i]; }
61  double tdphi(int i) const { return tdphi_[i]; }
62  double tdzordr(int i) const { return tdzordr_[i]; }
63  double z0dphi(int i) const { return z0dphi_[i]; }
64  double z0dzordr(int i) const { return z0dzordr_[i]; }
65 
66  double tdzcorr(int i, int j) const { return tdzcorr_[i][j]; }
67  double z0dzcorr(int i, int j) const { return z0dzcorr_[i][j]; }
68 
69  double irinvdphi(int i) const { return irinvdphi_[i]; }
70  double irinvdzordr(int i) const { return irinvdzordr_[i]; }
71  double iphi0dphi(int i) const { return iphi0dphi_[i]; }
72  double iphi0dzordr(int i) const { return iphi0dzordr_[i]; }
73  double itdphi(int i) const { return itdphi_[i]; }
74  double itdzordr(int i) const { return itdzordr_[i]; }
75  double iz0dphi(int i) const { return iz0dphi_[i]; }
76  double iz0dzordr(int i) const { return iz0dzordr_[i]; }
77 
78  int itdzcorr(int i, int j) const { return itdzcorr_[i][j]; }
79  int iz0dzcorr(int i, int j) const { return iz0dzcorr_[i][j]; }
80 
81  void settpar(double t) { t_ = t; }
82  double tpar() const { return t_; }
83 
84  void fill(int t, double MinvDt[N_FITPARAM][N_FITSTUB * 2], int iMinvDt[N_FITPARAM][N_FITSTUB * 2]) const;
85 
86  private:
95 
98 
103  double tdphi_[N_FITSTUB];
107 
110 
111  double t_;
112 
116  int irinv_;
117  };
118 
119 }; // namespace trklet
120 #endif
void setz0dzordr(int i, double z0dzordr)
Definition: TrackDer.h:52
double irinvdphi(int i) const
Definition: TrackDer.h:69
double tdzcorr(int i, int j) const
Definition: TrackDer.h:66
double z0dzcorr(int i, int j) const
Definition: TrackDer.h:67
void setitdphi(int i, int itdphi)
Definition: TrackDer.h:37
int iphi0dzordr_[N_FITSTUB]
Definition: TrackDer.h:90
double z0dzordr_[N_FITSTUB]
Definition: TrackDer.h:106
double iz0dzordr(int i) const
Definition: TrackDer.h:76
int iz0dphi_[N_FITSTUB]
Definition: TrackDer.h:93
void setirinvdphi(int i, int irinvdphi)
Definition: TrackDer.h:33
double tdphi_[N_FITSTUB]
Definition: TrackDer.h:103
double phi0dzordr_[N_FITSTUB]
Definition: TrackDer.h:102
void setrinvdzordr(int i, double rinvdzordr)
Definition: TrackDer.h:46
int diskMask() const
Definition: TrackDer.h:29
int itdzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:96
int itdzcorr(int i, int j) const
Definition: TrackDer.h:78
void setirinvdzordr(int i, int irinvdzordr)
Definition: TrackDer.h:34
void setz0dphi(int i, double z0dphi)
Definition: TrackDer.h:51
void setz0dzcorr(int i, int j, double z0dzcorr)
Definition: TrackDer.h:55
void settdzordr(int i, double tdzordr)
Definition: TrackDer.h:50
void setIndex(int layermask, int diskmask, int alphamask, int irinv)
Definition: TrackDer.cc:35
double z0dphi_[N_FITSTUB]
Definition: TrackDer.h:105
int iphi0dphi_[N_FITSTUB]
Definition: TrackDer.h:89
double phi0dphi_[N_FITSTUB]
Definition: TrackDer.h:101
int itdzordr_[N_FITSTUB]
Definition: TrackDer.h:92
int irinvdzordr_[N_FITSTUB]
Definition: TrackDer.h:88
double tdzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:108
~TrackDer()=default
void settdphi(int i, double tdphi)
Definition: TrackDer.h:49
int layerMask() const
Definition: TrackDer.h:28
double phi0dphi(int i) const
Definition: TrackDer.h:59
void fill(int t, double MinvDt[N_FITPARAM][N_FITSTUB *2], int iMinvDt[N_FITPARAM][N_FITSTUB *2]) const
Definition: TrackDer.cc:42
void setphi0dzordr(int i, double phi0dzordr)
Definition: TrackDer.h:48
double phi0dzordr(int i) const
Definition: TrackDer.h:60
double rinvdzordr_[N_FITSTUB]
Definition: TrackDer.h:100
double rinvdzordr(int i) const
Definition: TrackDer.h:58
double tdphi(int i) const
Definition: TrackDer.h:61
double tdzordr_[N_FITSTUB]
Definition: TrackDer.h:104
int irinv() const
Definition: TrackDer.h:31
double itdphi(int i) const
Definition: TrackDer.h:73
void settpar(double t)
Definition: TrackDer.h:81
double z0dzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:109
void setiz0dzcorr(int i, int j, int iz0dzcorr)
Definition: TrackDer.h:43
constexpr unsigned int N_PSLAYER
Definition: Settings.h:23
double iz0dphi(int i) const
Definition: TrackDer.h:75
int iz0dzordr_[N_FITSTUB]
Definition: TrackDer.h:94
void setitdzcorr(int i, int j, int itdzcorr)
Definition: TrackDer.h:42
double itdzordr(int i) const
Definition: TrackDer.h:74
int iz0dzcorr(int i, int j) const
Definition: TrackDer.h:79
double irinvdzordr(int i) const
Definition: TrackDer.h:70
constexpr unsigned int N_FITPARAM
Definition: Settings.h:977
void setiz0dzordr(int i, int iz0dzordr)
Definition: TrackDer.h:40
double rinvdphi(int i) const
Definition: TrackDer.h:57
void setiphi0dphi(int i, int iphi0dphi)
Definition: TrackDer.h:35
double tpar() const
Definition: TrackDer.h:82
double tdzordr(int i) const
Definition: TrackDer.h:62
double z0dphi(int i) const
Definition: TrackDer.h:63
int irinvdphi_[N_FITSTUB]
Definition: TrackDer.h:87
void settdzcorr(int i, int j, double tdzcorr)
Definition: TrackDer.h:54
double iphi0dzordr(int i) const
Definition: TrackDer.h:72
int alphaMask() const
Definition: TrackDer.h:30
void setiz0dphi(int i, int iz0dphi)
Definition: TrackDer.h:39
int iz0dzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:97
constexpr unsigned int N_FITSTUB
Definition: Settings.h:978
void setitdzordr(int i, int itdzordr)
Definition: TrackDer.h:38
void setphi0dphi(int i, double phi0dphi)
Definition: TrackDer.h:47
int itdphi_[N_FITSTUB]
Definition: TrackDer.h:91
void setiphi0dzordr(int i, int iphi0dzordr)
Definition: TrackDer.h:36
double rinvdphi_[N_FITSTUB]
Definition: TrackDer.h:99
double iphi0dphi(int i) const
Definition: TrackDer.h:71
double z0dzordr(int i) const
Definition: TrackDer.h:64
void setrinvdphi(int i, double rinvdphi)
Definition: TrackDer.h:45