CMS 3D CMS Logo

TrackDerTable.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackDerTable_h
2 #define L1Trigger_TrackFindingTracklet_interface_TrackDerTable_h
3 
4 #include <iostream>
5 #include <fstream>
6 #include <cassert>
7 #include <cmath>
8 #include <vector>
9 #include <string>
10 
12 
13 namespace trklet {
14 
15  class Settings;
16  class Globals;
17 
18  class TrackDerTable {
19  public:
20  TrackDerTable(Settings const& settings);
21 
22  ~TrackDerTable() = default;
23 
24  const TrackDer* getDerivatives(int index) const { return &derivatives_[index]; }
25 
26  const TrackDer* getDerivatives(unsigned int layermask,
27  unsigned int diskmask,
28  unsigned int alphaindex,
29  unsigned int rinvindex) const;
30 
31  int getIndex(unsigned int layermask, unsigned int diskmask) const;
32 
33  void addEntry(unsigned int layermask, unsigned int diskmask, int multiplicity, int nrinv);
34 
36 
37  int getEntries() const { return nextLayerDiskValue_; }
38 
39  void fillTable();
40 
41  static void invert(double M[4][8], unsigned int n);
42 
43  static void invert(std::vector<std::vector<double> >& M, unsigned int n);
44 
45  static void calculateDerivatives(Settings const& settings,
46  unsigned int nlayers,
47  double r[N_LAYER],
48  unsigned int ndisks,
49  double z[N_DISK],
50  double alpha[N_DISK],
51  double t,
52  double rinv,
53  double D[N_FITPARAM][N_FITSTUB * 2],
54  int iD[N_FITPARAM][N_FITSTUB * 2],
55  double MinvDt[N_FITPARAM][N_FITSTUB * 2],
56  int iMinvDt[N_FITPARAM][N_FITSTUB * 2],
57  double sigma[N_FITSTUB * 2],
58  double kfactor[N_FITSTUB * 2]);
59 
60  static double tpar(Settings const& settings, int diskmask, int layermask);
61 
62  private:
64 
65  std::vector<int> LayerMem_;
66  std::vector<int> DiskMem_;
67  std::vector<int> LayerDiskMem_;
68 
69  unsigned int LayerMemBits_;
70  unsigned int DiskMemBits_;
71  unsigned int LayerDiskMemBits_;
72  unsigned int alphaBits_;
73 
74  unsigned int Nlay_;
75  unsigned int Ndisk_;
76 
77  std::vector<TrackDer> derivatives_;
78 
83  };
84 
85 }; // namespace trklet
86 #endif
trklet::TrackDerTable::calculateDerivatives
static void calculateDerivatives(Settings const &settings, unsigned int nlayers, double r[N_LAYER], unsigned int ndisks, double z[N_DISK], double alpha[N_DISK], double t, double rinv, double D[N_FITPARAM][N_FITSTUB *2], int iD[N_FITPARAM][N_FITSTUB *2], double MinvDt[N_FITPARAM][N_FITSTUB *2], int iMinvDt[N_FITPARAM][N_FITSTUB *2], double sigma[N_FITSTUB *2], double kfactor[N_FITSTUB *2])
Definition: TrackDerTable.cc:783
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
trklet::TrackDer
Definition: TrackDer.h:20
trklet::TrackDerTable::nextLayerDiskValue_
int nextLayerDiskValue_
Definition: TrackDerTable.h:81
trklet::TrackDerTable::settings_
Settings const & settings_
Definition: TrackDerTable.h:63
trklet::TrackDerTable::getEntries
int getEntries() const
Definition: TrackDerTable.h:37
trklet::TrackDerTable::LayerMem_
std::vector< int > LayerMem_
Definition: TrackDerTable.h:65
trklet::Settings
Definition: Settings.h:52
trklet::TrackDerTable::TrackDerTable
TrackDerTable(Settings const &settings)
Definition: TrackDerTable.cc:11
trklet::TrackDerTable
Definition: TrackDerTable.h:18
alpha
float alpha
Definition: AMPTWrapper.h:105
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:22
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
trklet::TrackDerTable::Ndisk_
unsigned int Ndisk_
Definition: TrackDerTable.h:75
trklet::N_FITSTUB
constexpr unsigned int N_FITSTUB
Definition: Settings.h:901
trklet::TrackDerTable::LayerMemBits_
unsigned int LayerMemBits_
Definition: TrackDerTable.h:69
trklet::TrackDerTable::LayerDiskMem_
std::vector< int > LayerDiskMem_
Definition: TrackDerTable.h:67
trklet::TrackDerTable::DiskMemBits_
unsigned int DiskMemBits_
Definition: TrackDerTable.h:70
trklet::TrackDerTable::tpar
static double tpar(Settings const &settings, int diskmask, int layermask)
Definition: TrackDerTable.cc:1038
trklet::TrackDerTable::getIndex
int getIndex(unsigned int layermask, unsigned int diskmask) const
Definition: TrackDerTable.cc:50
trklet::TrackDerTable::LayerDiskMemBits_
unsigned int LayerDiskMemBits_
Definition: TrackDerTable.h:71
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:21
trklet::TrackDerTable::DiskMem_
std::vector< int > DiskMem_
Definition: TrackDerTable.h:66
trklet::TrackDerTable::fillTable
void fillTable()
Definition: TrackDerTable.cc:185
trklet::TrackDerTable::invert
static void invert(double M[4][8], unsigned int n)
Definition: TrackDerTable.cc:714
trklet::TrackDerTable::nextDiskValue_
int nextDiskValue_
Definition: TrackDerTable.h:80
trklet::rinv
double rinv(double phi1, double phi2, double r1, double r2)
Definition: Util.h:49
trklet::TrackDerTable::~TrackDerTable
~TrackDerTable()=default
trklet::N_FITPARAM
constexpr unsigned int N_FITPARAM
Definition: Settings.h:900
trklet::TrackDerTable::getDerivatives
const TrackDer * getDerivatives(int index) const
Definition: TrackDerTable.h:24
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
trklet::TrackDerTable::nextLayerValue_
int nextLayerValue_
Definition: TrackDerTable.h:79
kfactor
const unsigned int kfactor
Definition: FileRandomMultiParticlePGunProducer.cc:19
trklet
Definition: AllInnerStubsMemory.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::TrackDerTable::addEntry
void addEntry(unsigned int layermask, unsigned int diskmask, int multiplicity, int nrinv)
Definition: TrackDerTable.cc:90
alignCSCRings.r
r
Definition: alignCSCRings.py:93
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
trklet::TrackDerTable::readPatternFile
void readPatternFile(std::string fileName)
Definition: TrackDerTable.cc:140
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
TrackDer.h
trklet::TrackDerTable::derivatives_
std::vector< TrackDer > derivatives_
Definition: TrackDerTable.h:77
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
trklet::TrackDerTable::alphaBits_
unsigned int alphaBits_
Definition: TrackDerTable.h:72
trklet::TrackDerTable::lastMultiplicity_
int lastMultiplicity_
Definition: TrackDerTable.h:82
nlayers
Definition: HIMultiTrackSelector.h:48
trklet::TrackDerTable::Nlay_
unsigned int Nlay_
Definition: TrackDerTable.h:74