CMS 3D CMS Logo

LayerEncoding.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackerDTC_LayerEncoding_h
2 #define L1Trigger_TrackerDTC_LayerEncoding_h
3 
9 
10 #include <vector>
11 
12 namespace trackerDTC {
13 
19  class LayerEncoding {
20  public:
22  LayerEncoding(const edm::ParameterSet& iConfig, const tt::Setup* setup);
24  // decode layer id for given sensor module
25  int decode(tt::SensorModule* sm) const;
26  // get encoded layers read by given DTC
27  const std::vector<int>& layers(int dtcId) const { return encodingsLayerId_.at(dtcId % numDTCsPerRegion_); }
28 
29  private:
30  // helper class to store configurations
31  const tt::Setup* setup_;
32  // No. of DTCs per detector phi nonant
34  // outer index = dtc id in region, inner index = encoded layerId, inner value = decoded layerId
35  std::vector<std::vector<int>> encodingsLayerId_;
36  };
37 
38 } // namespace trackerDTC
39 
41 
42 #endif
std::vector< std::vector< int > > encodingsLayerId_
Definition: LayerEncoding.h:35
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
#define EVENTSETUP_DATA_DEFAULT_RECORD(_data_, _record_)
const tt::Setup * setup_
Definition: LayerEncoding.h:31
Class to encode layer ids used between DTC and TFP in Hybrid.
Definition: LayerEncoding.h:19
Definition: DTC.h:12
const std::vector< int > & layers(int dtcId) const
Definition: LayerEncoding.h:27
int decode(tt::SensorModule *sm) const