File indexing completed on 2024-04-06 12:21:42
0001 #ifndef L1Trigger_TrackerDTC_LayerEncoding_h
0002 #define L1Trigger_TrackerDTC_LayerEncoding_h
0003
0004 #include "FWCore/Framework/interface/data_default_record_trait.h"
0005 #include "L1Trigger/TrackerDTC/interface/LayerEncodingRcd.h"
0006 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0007 #include "L1Trigger/TrackTrigger/interface/SensorModule.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009
0010 #include <vector>
0011
0012 namespace trackerDTC {
0013
0014
0015
0016
0017
0018
0019 class LayerEncoding {
0020 public:
0021 LayerEncoding() {}
0022 LayerEncoding(const edm::ParameterSet& iConfig, const tt::Setup* setup);
0023 ~LayerEncoding() {}
0024
0025 int decode(tt::SensorModule* sm) const;
0026
0027 const std::vector<int>& layers(int dtcId) const { return encodingsLayerId_.at(dtcId % numDTCsPerRegion_); }
0028
0029 private:
0030
0031 const tt::Setup* setup_;
0032
0033 int numDTCsPerRegion_;
0034
0035 std::vector<std::vector<int>> encodingsLayerId_;
0036 };
0037
0038 }
0039
0040 EVENTSETUP_DATA_DEFAULT_RECORD(trackerDTC::LayerEncoding, trackerDTC::LayerEncodingRcd);
0041
0042 #endif