** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr at /lxr/lib/LXR/Common.pm line 1113.

Last-Modified: Sat, 24 May 2024 22:39:25 GMT Content-Type: text/html; charset=utf-8 /CMSSW_14_1_X_2024-05-24-2300/L1Trigger/TrackerTFP/interface/LayerEncoding.h
Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:43

0001 #ifndef L1Trigger_TrackerTFP_LayerEncoding_h
0002 #define L1Trigger_TrackerTFP_LayerEncoding_h
0003 
0004 #include "FWCore/Framework/interface/data_default_record_trait.h"
0005 #include "L1Trigger/TrackerTFP/interface/LayerEncodingRcd.h"
0006 #include "L1Trigger/TrackerTFP/interface/DataFormats.h"
0007 #include "L1Trigger/TrackTrigger/interface/SensorModule.h"
0008 
0009 #include <vector>
0010 
0011 namespace trackerTFP {
0012 
0013   /*! \class  trackerTFP::LayerEncoding
0014    *  \brief  Class to encode layer ids for Kalman Filter
0015    *          Layers consitent with rough r-z track parameters are counted from 0 onwards.
0016    *  \author Thomas Schuh
0017    *  \date   2020, July
0018    */
0019   class LayerEncoding {
0020   public:
0021     LayerEncoding() {}
0022     LayerEncoding(const DataFormats* dataFormats);
0023     ~LayerEncoding() {}
0024     // Set of layers in each (zT,tanL) digi Bin of each eta sector numbered 0->N
0025     const std::vector<int>& layerEncoding(int binEta, int binZT, int binCot) const {
0026       return layerEncoding_.at(binEta).at(binZT).at(binCot);
0027     }
0028     const std::map<int, const tt::SensorModule*>& layerEncodingMap(int binEta, int binZT, int binCot) const {
0029       return layerEncodingMap_.at(binEta).at(binZT).at(binCot);
0030     }
0031     // maybe layers for given ets sector, bin in zT and bin in cotThea
0032     const std::vector<int>& maybeLayer(int binEta, int binZT, int binCot) const {
0033       return maybeLayer_.at(binEta).at(binZT).at(binCot);
0034     }
0035     // encoded layer id for given eta sector, bin in zT, bin in cotThea and decoed layer id, returns -1 if layer incositent with track
0036     const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const;
0037     // pattern of maybe layers for given eta sector, bin in zT and bin in cotThea
0038     TTBV maybePattern(int binEta, int binZT, int binCot) const;
0039 
0040   private:
0041     // helper class providing run-time constants
0042     const tt::Setup* setup_;
0043     // helper class providing dataformats
0044     const DataFormats* dataFormats_;
0045     // data foramt of variable zT
0046     const DataFormat* zT_;
0047     // data foramt of variable cotTheta
0048     const DataFormat* cot_;
0049     // outer to inner indices: eta sector, bin in zT, bin in cotTheta, layerId
0050     std::vector<std::vector<std::vector<std::vector<int>>>> layerEncoding_;
0051     std::vector<std::vector<std::vector<std::map<int, const tt::SensorModule*>>>> layerEncodingMap_;
0052     // outer to inner indices: eta sector, bin in zT, bin in cotTheta, layerId of maybe layers
0053     std::vector<std::vector<std::vector<std::vector<int>>>> maybeLayer_;
0054   };
0055 
0056 }  // namespace trackerTFP
0057 
0058 EVENTSETUP_DATA_DEFAULT_RECORD(trackerTFP::LayerEncoding, trackerTFP::LayerEncodingRcd);
0059 
0060 #endif