CMS 3D CMS Logo

LayerEncoding.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackerTFP_LayerEncoding_h
2 #define L1Trigger_TrackerTFP_LayerEncoding_h
3 
8 
9 #include <vector>
10 
11 namespace trackerTFP {
12 
19  class LayerEncoding {
20  public:
22  LayerEncoding(const DataFormats* dataFormats);
24  // Set of layers in each (zT,tanL) digi Bin of each eta sector numbered 0->N
25  const std::vector<int>& layerEncoding(int binEta, int binZT, int binCot) const {
26  return layerEncoding_.at(binEta).at(binZT).at(binCot);
27  }
28  const std::map<int, const tt::SensorModule*>& layerEncodingMap(int binEta, int binZT, int binCot) const {
29  return layerEncodingMap_.at(binEta).at(binZT).at(binCot);
30  }
31  // maybe layers for given ets sector, bin in zT and bin in cotThea
32  const std::vector<int>& maybeLayer(int binEta, int binZT, int binCot) const {
33  return maybeLayer_.at(binEta).at(binZT).at(binCot);
34  }
35  // encoded layer id for given eta sector, bin in zT, bin in cotThea and decoed layer id, returns -1 if layer incositent with track
36  const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const;
37  // pattern of maybe layers for given eta sector, bin in zT and bin in cotThea
38  TTBV maybePattern(int binEta, int binZT, int binCot) const;
39 
40  private:
41  // helper class providing run-time constants
42  const tt::Setup* setup_;
43  // helper class providing dataformats
45  // data foramt of variable zT
46  const DataFormat* zT_;
47  // data foramt of variable cotTheta
48  const DataFormat* cot_;
49  // outer to inner indices: eta sector, bin in zT, bin in cotTheta, layerId
50  std::vector<std::vector<std::vector<std::vector<int>>>> layerEncoding_;
51  std::vector<std::vector<std::vector<std::map<int, const tt::SensorModule*>>>> layerEncodingMap_;
52  // outer to inner indices: eta sector, bin in zT, bin in cotTheta, layerId of maybe layers
53  std::vector<std::vector<std::vector<std::vector<int>>>> maybeLayer_;
54  };
55 
56 } // namespace trackerTFP
57 
59 
60 #endif
const std::vector< int > & maybeLayer(int binEta, int binZT, int binCot) const
Definition: LayerEncoding.h:32
const DataFormats * dataFormats_
Definition: LayerEncoding.h:44
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
Definition: TTBV.h:20
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
const tt::Setup * setup_
Definition: LayerEncoding.h:42
const std::vector< int > & layerEncoding(int binEta, int binZT, int binCot) const
Definition: LayerEncoding.h:25
TTBV maybePattern(int binEta, int binZT, int binCot) const
#define EVENTSETUP_DATA_DEFAULT_RECORD(_data_, _record_)
const DataFormat * cot_
Definition: LayerEncoding.h:48
const std::map< int, const tt::SensorModule * > & layerEncodingMap(int binEta, int binZT, int binCot) const
Definition: LayerEncoding.h:28
std::vector< std::vector< std::vector< std::vector< int > > > > layerEncoding_
Definition: LayerEncoding.h:50
std::vector< std::vector< std::vector< std::vector< int > > > > maybeLayer_
Definition: LayerEncoding.h:53
Class to encode layer ids for Kalman Filter Layers consitent with rough r-z track parameters are coun...
Definition: LayerEncoding.h:19
const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const
Class to calculate and provide dataformats used by Track Trigger emulator.
Definition: DataFormats.h:216
const DataFormat * zT_
Definition: LayerEncoding.h:46
std::vector< std::vector< std::vector< std::map< int, const tt::SensorModule * > > > > layerEncodingMap_
Definition: LayerEncoding.h:51