CMS 3D CMS Logo

TrackletLUT.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackletLUT_h
2 #define L1Trigger_TrackFindingTracklet_interface_TrackletLUT_h
3 
4 #include <string>
5 #include <vector>
6 #include <string>
7 
8 namespace trklet {
9 
10  class Settings;
11 
12  class TrackletLUT {
13  public:
14  TrackletLUT(const Settings& settings);
15 
17  name_ = other.name_;
18  table_ = other.table_;
19  nbits_ = other.nbits_;
20  positive_ = other.positive_;
21 
22  return *this;
23  }
24 
25  ~TrackletLUT() = default;
26 
28 
29  //region only used for name - should be removed
30  void initmatchcut(unsigned int layerdisk, MatchType type, unsigned int region);
31 
32  void initTPlut(bool fillInner,
33  unsigned int iSeed,
34  unsigned int layerdisk1,
35  unsigned int layerdisk2,
36  unsigned int nbitsfinephidiff,
37  unsigned int iTP);
38 
39  void initTPregionlut(unsigned int iSeed,
40  unsigned int layerdisk1,
41  unsigned int layerdisk2,
42  unsigned int iAllStub,
43  unsigned int nbitsfinephidiff,
44  unsigned int nbitsfinephi,
45  const TrackletLUT& tplutinner,
46  unsigned int iTP);
47 
48  void initteptlut(bool fillInner,
49  bool fillTEMem,
50  unsigned int iSeed,
51  unsigned int layerdisk1,
52  unsigned int layerdisk2,
53  unsigned int innerphibits,
54  unsigned int outerphibits,
55  double innerphimin,
56  double innerphimax,
57  double outerphimin,
58  double outerphimax,
59  const std::string& innermem,
60  const std::string& outermem);
61 
62  void initProjectionBend(double k_phider, unsigned int idisk, unsigned int nrbits, unsigned int nphiderbits);
63 
64  void initBendMatch(unsigned int layerdisk);
65 
67 
68  //region only used for name - should be removed
69  void initVMRTable(unsigned int layerdisk, VMRTableType type, int region = -1);
70 
71  void initPhiCorrTable(unsigned int layerdisk, unsigned int rbits);
72 
73  void writeTable() const;
74 
75  int lookup(unsigned int index) const;
76 
77  unsigned int size() const { return table_.size(); }
78 
79  private:
80  int getphiCorrValue(
81  unsigned int layerdisk, unsigned int ibend, unsigned int irbin, double rmean, double dr, double drmax) const;
82 
83  int getVMRLookup(unsigned int layerdisk, double z, double r, double dz, double dr, int iseed = -1) const;
84 
86 
88 
89  std::vector<int> table_;
90 
91  unsigned int nbits_;
92 
93  bool positive_;
94  };
95 }; // namespace trklet
96 #endif
void initBendMatch(unsigned int layerdisk)
Definition: TrackletLUT.cc:443
void initmatchcut(unsigned int layerdisk, MatchType type, unsigned int region)
Definition: TrackletLUT.cc:13
void initProjectionBend(double k_phider, unsigned int idisk, unsigned int nrbits, unsigned int nphiderbits)
Definition: TrackletLUT.cc:393
void initteptlut(bool fillInner, bool fillTEMem, unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int innerphibits, unsigned int outerphibits, double innerphimin, double innerphimax, double outerphimin, double outerphimax, const std::string &innermem, const std::string &outermem)
Definition: TrackletLUT.cc:240
const Settings & settings_
Definition: TrackletLUT.h:85
int lookup(unsigned int index) const
Definition: TrackletLUT.cc:900
TrackletLUT(const Settings &settings)
Definition: TrackletLUT.cc:11
void initPhiCorrTable(unsigned int layerdisk, unsigned int rbits)
Definition: TrackletLUT.cc:822
TrackletLUT & operator=(const TrackletLUT &other)
Definition: TrackletLUT.h:16
std::string name_
Definition: TrackletLUT.h:87
unsigned int size() const
Definition: TrackletLUT.h:77
~TrackletLUT()=default
int iseed
Definition: AMPTWrapper.h:134
void initTPlut(bool fillInner, unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int nbitsfinephidiff, unsigned int iTP)
Definition: TrackletLUT.cc:63
unsigned int nbits_
Definition: TrackletLUT.h:91
void initTPregionlut(unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int iAllStub, unsigned int nbitsfinephidiff, unsigned int nbitsfinephi, const TrackletLUT &tplutinner, unsigned int iTP)
Definition: TrackletLUT.cc:183
int getVMRLookup(unsigned int layerdisk, double z, double r, double dz, double dr, int iseed=-1) const
Definition: TrackletLUT.cc:665
int getphiCorrValue(unsigned int layerdisk, unsigned int ibend, unsigned int irbin, double rmean, double dr, double drmax) const
Definition: TrackletLUT.cc:850
std::vector< int > table_
Definition: TrackletLUT.h:89
void initVMRTable(unsigned int layerdisk, VMRTableType type, int region=-1)
Definition: TrackletLUT.cc:490
void writeTable() const
Definition: TrackletLUT.cc:870