Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:56

0001 //
0002 // This class holdes the 'deriviatives' used in the linearized chi^2 fit.
0003 // This is also referred to as the weight matrix which is used to weight
0004 // the residuls when calculating the updated track parameters.
0005 //
0006 //
0007 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackDer_h
0008 #define L1Trigger_TrackFindingTracklet_interface_TrackDer_h
0009 
0010 #include <iostream>
0011 #include <fstream>
0012 #include <cassert>
0013 #include <cmath>
0014 #include <vector>
0015 
0016 #include "L1Trigger/TrackFindingTracklet/interface/Settings.h"
0017 
0018 namespace trklet {
0019 
0020   class TrackDer {
0021   public:
0022     TrackDer();
0023 
0024     ~TrackDer() = default;
0025 
0026     void setIndex(int layermask, int diskmask, int alphamask, int irinv);
0027 
0028     int layerMask() const { return layermask_; }
0029     int diskMask() const { return diskmask_; }
0030     int alphaMask() const { return alphamask_; }
0031     int irinv() const { return irinv_; }
0032 
0033     void setirinvdphi(int i, int irinvdphi) { irinvdphi_[i] = irinvdphi; }
0034     void setirinvdzordr(int i, int irinvdzordr) { irinvdzordr_[i] = irinvdzordr; }
0035     void setiphi0dphi(int i, int iphi0dphi) { iphi0dphi_[i] = iphi0dphi; }
0036     void setiphi0dzordr(int i, int iphi0dzordr) { iphi0dzordr_[i] = iphi0dzordr; }
0037     void setitdphi(int i, int itdphi) { itdphi_[i] = itdphi; }
0038     void setitdzordr(int i, int itdzordr) { itdzordr_[i] = itdzordr; }
0039     void setiz0dphi(int i, int iz0dphi) { iz0dphi_[i] = iz0dphi; }
0040     void setiz0dzordr(int i, int iz0dzordr) { iz0dzordr_[i] = iz0dzordr; }
0041 
0042     void setitdzcorr(int i, int j, int itdzcorr) { itdzcorr_[i][j] = itdzcorr; }
0043     void setiz0dzcorr(int i, int j, int iz0dzcorr) { iz0dzcorr_[i][j] = iz0dzcorr; }
0044 
0045     void setrinvdphi(int i, double rinvdphi) { rinvdphi_[i] = rinvdphi; }
0046     void setrinvdzordr(int i, double rinvdzordr) { rinvdzordr_[i] = rinvdzordr; }
0047     void setphi0dphi(int i, double phi0dphi) { phi0dphi_[i] = phi0dphi; }
0048     void setphi0dzordr(int i, double phi0dzordr) { phi0dzordr_[i] = phi0dzordr; }
0049     void settdphi(int i, double tdphi) { tdphi_[i] = tdphi; }
0050     void settdzordr(int i, double tdzordr) { tdzordr_[i] = tdzordr; }
0051     void setz0dphi(int i, double z0dphi) { z0dphi_[i] = z0dphi; }
0052     void setz0dzordr(int i, double z0dzordr) { z0dzordr_[i] = z0dzordr; }
0053 
0054     void settdzcorr(int i, int j, double tdzcorr) { tdzcorr_[i][j] = tdzcorr; }
0055     void setz0dzcorr(int i, int j, double z0dzcorr) { z0dzcorr_[i][j] = z0dzcorr; }
0056 
0057     double rinvdphi(int i) const { return rinvdphi_[i]; }
0058     double rinvdzordr(int i) const { return rinvdzordr_[i]; }
0059     double phi0dphi(int i) const { return phi0dphi_[i]; }
0060     double phi0dzordr(int i) const { return phi0dzordr_[i]; }
0061     double tdphi(int i) const { return tdphi_[i]; }
0062     double tdzordr(int i) const { return tdzordr_[i]; }
0063     double z0dphi(int i) const { return z0dphi_[i]; }
0064     double z0dzordr(int i) const { return z0dzordr_[i]; }
0065 
0066     double tdzcorr(int i, int j) const { return tdzcorr_[i][j]; }
0067     double z0dzcorr(int i, int j) const { return z0dzcorr_[i][j]; }
0068 
0069     double irinvdphi(int i) const { return irinvdphi_[i]; }
0070     double irinvdzordr(int i) const { return irinvdzordr_[i]; }
0071     double iphi0dphi(int i) const { return iphi0dphi_[i]; }
0072     double iphi0dzordr(int i) const { return iphi0dzordr_[i]; }
0073     double itdphi(int i) const { return itdphi_[i]; }
0074     double itdzordr(int i) const { return itdzordr_[i]; }
0075     double iz0dphi(int i) const { return iz0dphi_[i]; }
0076     double iz0dzordr(int i) const { return iz0dzordr_[i]; }
0077 
0078     int itdzcorr(int i, int j) const { return itdzcorr_[i][j]; }
0079     int iz0dzcorr(int i, int j) const { return iz0dzcorr_[i][j]; }
0080 
0081     void settpar(double t) { t_ = t; }
0082     double tpar() const { return t_; }
0083 
0084     void fill(int t, double MinvDt[N_FITPARAM][N_FITSTUB * 2], int iMinvDt[N_FITPARAM][N_FITSTUB * 2]) const;
0085 
0086   private:
0087     int irinvdphi_[N_FITSTUB];
0088     int irinvdzordr_[N_FITSTUB];
0089     int iphi0dphi_[N_FITSTUB];
0090     int iphi0dzordr_[N_FITSTUB];
0091     int itdphi_[N_FITSTUB];
0092     int itdzordr_[N_FITSTUB];
0093     int iz0dphi_[N_FITSTUB];
0094     int iz0dzordr_[N_FITSTUB];
0095 
0096     int itdzcorr_[N_PSLAYER][N_PSLAYER];
0097     int iz0dzcorr_[N_PSLAYER][N_PSLAYER];
0098 
0099     double rinvdphi_[N_FITSTUB];
0100     double rinvdzordr_[N_FITSTUB];
0101     double phi0dphi_[N_FITSTUB];
0102     double phi0dzordr_[N_FITSTUB];
0103     double tdphi_[N_FITSTUB];
0104     double tdzordr_[N_FITSTUB];
0105     double z0dphi_[N_FITSTUB];
0106     double z0dzordr_[N_FITSTUB];
0107 
0108     double tdzcorr_[N_PSLAYER][N_PSLAYER];
0109     double z0dzcorr_[N_PSLAYER][N_PSLAYER];
0110 
0111     double t_;
0112 
0113     int layermask_;
0114     int diskmask_;
0115     int alphamask_;
0116     int irinv_;
0117   };
0118 
0119 };  // namespace trklet
0120 #endif