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
trklet::TrackDer::irinvdzordr_
int irinvdzordr_[N_FITSTUB]
Definition: TrackDer.h:88
Settings.h
trklet::TrackDer::tdphi_
double tdphi_[N_FITSTUB]
Definition: TrackDer.h:103
trklet::TrackDer::settdphi
void settdphi(int i, double tdphi)
Definition: TrackDer.h:49
trklet::N_PSLAYER
constexpr unsigned int N_PSLAYER
Definition: Settings.h:21
trklet::TrackDer::iz0dphi_
int iz0dphi_[N_FITSTUB]
Definition: TrackDer.h:93
mps_fire.i
i
Definition: mps_fire.py:428
trklet::TrackDer::phi0dzordr
double phi0dzordr(int i) const
Definition: TrackDer.h:60
trklet::TrackDer::rinvdzordr
double rinvdzordr(int i) const
Definition: TrackDer.h:58
trklet::TrackDer
Definition: TrackDer.h:20
trklet::TrackDer::itdzcorr
int itdzcorr(int i, int j) const
Definition: TrackDer.h:78
trklet::TrackDer::diskmask_
int diskmask_
Definition: TrackDer.h:114
trklet::TrackDer::setiz0dzcorr
void setiz0dzcorr(int i, int j, int iz0dzcorr)
Definition: TrackDer.h:43
trklet::TrackDer::setz0dzcorr
void setz0dzcorr(int i, int j, double z0dzcorr)
Definition: TrackDer.h:55
trklet::TrackDer::iz0dzordr_
int iz0dzordr_[N_FITSTUB]
Definition: TrackDer.h:94
trklet::TrackDer::z0dzordr
double z0dzordr(int i) const
Definition: TrackDer.h:64
trklet::TrackDer::setrinvdphi
void setrinvdphi(int i, double rinvdphi)
Definition: TrackDer.h:45
trklet::TrackDer::setitdzcorr
void setitdzcorr(int i, int j, int itdzcorr)
Definition: TrackDer.h:42
trklet::TrackDer::itdphi
double itdphi(int i) const
Definition: TrackDer.h:73
trklet::TrackDer::iz0dzcorr
int iz0dzcorr(int i, int j) const
Definition: TrackDer.h:79
trklet::TrackDer::irinvdzordr
double irinvdzordr(int i) const
Definition: TrackDer.h:70
trklet::TrackDer::TrackDer
TrackDer()
Definition: TrackDer.cc:6
trklet::TrackDer::irinvdphi_
int irinvdphi_[N_FITSTUB]
Definition: TrackDer.h:87
trklet::TrackDer::setiphi0dphi
void setiphi0dphi(int i, int iphi0dphi)
Definition: TrackDer.h:35
trklet::TrackDer::iphi0dzordr
double iphi0dzordr(int i) const
Definition: TrackDer.h:72
trklet::TrackDer::tdzcorr_
double tdzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:108
trklet::TrackDer::rinvdphi
double rinvdphi(int i) const
Definition: TrackDer.h:57
trklet::TrackDer::itdphi_
int itdphi_[N_FITSTUB]
Definition: TrackDer.h:91
trklet::N_FITSTUB
constexpr unsigned int N_FITSTUB
Definition: Settings.h:780
trklet::TrackDer::alphamask_
int alphamask_
Definition: TrackDer.h:115
trklet::TrackDer::iz0dzcorr_
int iz0dzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:97
trklet::TrackDer::setiz0dzordr
void setiz0dzordr(int i, int iz0dzordr)
Definition: TrackDer.h:40
trklet::TrackDer::iphi0dzordr_
int iphi0dzordr_[N_FITSTUB]
Definition: TrackDer.h:90
trklet::TrackDer::setitdzordr
void setitdzordr(int i, int itdzordr)
Definition: TrackDer.h:38
trklet::TrackDer::setphi0dzordr
void setphi0dzordr(int i, double phi0dzordr)
Definition: TrackDer.h:48
trklet::TrackDer::phi0dphi
double phi0dphi(int i) const
Definition: TrackDer.h:59
trklet::TrackDer::rinvdzordr_
double rinvdzordr_[N_FITSTUB]
Definition: TrackDer.h:100
trklet::TrackDer::phi0dzordr_
double phi0dzordr_[N_FITSTUB]
Definition: TrackDer.h:102
trklet::TrackDer::z0dzordr_
double z0dzordr_[N_FITSTUB]
Definition: TrackDer.h:106
trklet::TrackDer::tdphi
double tdphi(int i) const
Definition: TrackDer.h:61
trklet::TrackDer::settpar
void settpar(double t)
Definition: TrackDer.h:81
trklet::TrackDer::z0dzcorr_
double z0dzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:109
trklet::TrackDer::setiphi0dzordr
void setiphi0dzordr(int i, int iphi0dzordr)
Definition: TrackDer.h:36
trklet::TrackDer::itdzcorr_
int itdzcorr_[N_PSLAYER][N_PSLAYER]
Definition: TrackDer.h:96
trklet::TrackDer::t_
double t_
Definition: TrackDer.h:111
trklet::TrackDer::rinvdphi_
double rinvdphi_[N_FITSTUB]
Definition: TrackDer.h:99
trklet::TrackDer::iz0dphi
double iz0dphi(int i) const
Definition: TrackDer.h:75
trklet::TrackDer::setz0dphi
void setz0dphi(int i, double z0dphi)
Definition: TrackDer.h:51
trklet::TrackDer::setz0dzordr
void setz0dzordr(int i, double z0dzordr)
Definition: TrackDer.h:52
trklet::TrackDer::settdzordr
void settdzordr(int i, double tdzordr)
Definition: TrackDer.h:50
trklet::TrackDer::tdzordr
double tdzordr(int i) const
Definition: TrackDer.h:62
trklet::TrackDer::z0dphi
double z0dphi(int i) const
Definition: TrackDer.h:63
trklet::N_FITPARAM
constexpr unsigned int N_FITPARAM
Definition: Settings.h:779
trklet::TrackDer::settdzcorr
void settdzcorr(int i, int j, double tdzcorr)
Definition: TrackDer.h:54
trklet::TrackDer::layermask_
int layermask_
Definition: TrackDer.h:113
trklet::TrackDer::z0dzcorr
double z0dzcorr(int i, int j) const
Definition: TrackDer.h:67
trklet::TrackDer::layerMask
int layerMask() const
Definition: TrackDer.h:28
trklet::TrackDer::alphaMask
int alphaMask() const
Definition: TrackDer.h:30
trklet::TrackDer::iz0dzordr
double iz0dzordr(int i) const
Definition: TrackDer.h:76
trklet::TrackDer::irinv_
int irinv_
Definition: TrackDer.h:116
trklet
Definition: AllProjectionsMemory.h:9
trklet::TrackDer::setphi0dphi
void setphi0dphi(int i, double phi0dphi)
Definition: TrackDer.h:47
trklet::TrackDer::fill
void fill(int t, double MinvDt[N_FITPARAM][N_FITSTUB *2], int iMinvDt[N_FITPARAM][N_FITSTUB *2]) const
Definition: TrackDer.cc:42
trklet::TrackDer::diskMask
int diskMask() const
Definition: TrackDer.h:29
trklet::TrackDer::iphi0dphi
double iphi0dphi(int i) const
Definition: TrackDer.h:71
trklet::TrackDer::setrinvdzordr
void setrinvdzordr(int i, double rinvdzordr)
Definition: TrackDer.h:46
trklet::TrackDer::setirinvdzordr
void setirinvdzordr(int i, int irinvdzordr)
Definition: TrackDer.h:34
trklet::TrackDer::tdzordr_
double tdzordr_[N_FITSTUB]
Definition: TrackDer.h:104
trklet::TrackDer::phi0dphi_
double phi0dphi_[N_FITSTUB]
Definition: TrackDer.h:101
trklet::TrackDer::irinv
int irinv() const
Definition: TrackDer.h:31
trklet::TrackDer::setIndex
void setIndex(int layermask, int diskmask, int alphamask, int irinv)
Definition: TrackDer.cc:35
trklet::TrackDer::z0dphi_
double z0dphi_[N_FITSTUB]
Definition: TrackDer.h:105
trklet::TrackDer::iphi0dphi_
int iphi0dphi_[N_FITSTUB]
Definition: TrackDer.h:89
trklet::TrackDer::irinvdphi
double irinvdphi(int i) const
Definition: TrackDer.h:69
trklet::TrackDer::tdzcorr
double tdzcorr(int i, int j) const
Definition: TrackDer.h:66
trklet::TrackDer::itdzordr_
int itdzordr_[N_FITSTUB]
Definition: TrackDer.h:92
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
trklet::TrackDer::~TrackDer
~TrackDer()=default
trklet::TrackDer::tpar
double tpar() const
Definition: TrackDer.h:82
trklet::TrackDer::itdzordr
double itdzordr(int i) const
Definition: TrackDer.h:74
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
trklet::TrackDer::setitdphi
void setitdphi(int i, int itdphi)
Definition: TrackDer.h:37
trklet::TrackDer::setiz0dphi
void setiz0dphi(int i, int iz0dphi)
Definition: TrackDer.h:39
trklet::TrackDer::setirinvdphi
void setirinvdphi(int i, int irinvdphi)
Definition: TrackDer.h:33