CMS 3D CMS Logo

TrackConverter.h
Go to the documentation of this file.
1 #ifndef L1Trigger_Phase2L1GMT_TrackConverter_h
2 #define L1Trigger_Phase2L1GMT_TrackConverter_h
3 
8 
9 namespace Phase2L1GMT {
10 
12  public:
13  TrackConverter(const edm::ParameterSet& iConfig);
14  ~TrackConverter() = default;
15 
16  std::vector<ConvertedTTTrack> convertTracks(const std::vector<edm::Ptr<l1t::TrackerMuon::L1TTTrackType> >& tracks);
17 
18  private:
19  int verbose_;
20  typedef ap_uint<96> wordtype;
21 
23 
24  uint ptLookup(uint absCurv) {
25  for (auto i : ptShifts) {
26  if (absCurv >= uint(i[0]) && absCurv < uint(i[1])) {
27  if (i[2] < 0)
28  return i[4];
29  else
30  return (absCurv >> i[2]) + i[3];
31  }
32  }
33  return 0;
34  }
35 
36  uint etaLookup(uint absTanL) {
37  for (auto i : etaShifts) {
38  if (absTanL >= uint(i[0]) && absTanL < uint(i[1])) {
39  if (i[2] < 0)
40  return i[4];
41  else
42  return (absTanL >> i[2]) + i[3];
43  }
44  }
45  return 0;
46  }
47 
49  };
50 } // namespace Phase2L1GMT
51 
52 #endif
std::vector< ConvertedTTTrack > convertTracks(const std::vector< edm::Ptr< l1t::TrackerMuon::L1TTTrackType > > &tracks)
TrackConverter(const edm::ParameterSet &iConfig)
ConvertedTTTrack convert(const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > &track)
const int ptShifts[8][5]
Definition: TPSLUTs.h:9
const int etaShifts[4][5]
Definition: TPSLUTs.h:139
uint etaLookup(uint absTanL)
uint ptLookup(uint absCurv)
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
uint generateQuality(const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > &track)