CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCalConcentratorAutoEncoderImpl.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_L1THGCal_HGCalConcentratorAutoEncoderImpl_h__
2 #define __L1Trigger_L1THGCal_HGCalConcentratorAutoEncoderImpl_h__
3 
8 #include <vector>
9 
11 
13 
15 public:
17 
18  void select(unsigned nLinks,
19  const std::vector<l1t::HGCalTriggerCell>& trigCellVecInput,
20  std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput,
21  std::vector<l1t::HGCalConcentratorData>& ae_EncodedOutput);
22 
24 
25 private:
26  static constexpr int nTriggerCells_ = 48;
27 
28  static constexpr int maxAEInputSize_ = 192;
29 
30  static constexpr int nEncodedLayerNodes_ = 16;
31 
32  static constexpr unsigned int maxNumberOfLinks_ = 13;
33 
34  static constexpr int cellUVSize_ = 8;
35 
36  static constexpr int encoderTensorDims_ = 4;
37 
38  static constexpr int decoderTensorDims_ = 2;
39 
40  static constexpr int cellUVremap_[cellUVSize_][cellUVSize_] = {{47, 46, 45, 44, -1, -1, -1, -1},
41  {16, 43, 42, 41, 40, -1, -1, -1},
42  {20, 17, 39, 38, 37, 36, -1, -1},
43  {24, 21, 18, 35, 34, 33, 32, -1},
44  {28, 25, 22, 19, 3, 7, 11, 15},
45  {-1, 29, 26, 23, 2, 6, 10, 14},
46  {-1, -1, 30, 27, 1, 5, 9, 13},
47  {-1, -1, -1, 31, 0, 4, 8, 12}};
48  static constexpr int ae_outputCellU_[nTriggerCells_] = {7, 6, 5, 4, 7, 6, 5, 4, 7, 6, 5, 4, 7, 6, 5, 4,
49  1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7,
50  3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0};
51  static constexpr int ae_outputCellV_[nTriggerCells_] = {4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
52  0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
53  6, 5, 4, 3, 5, 4, 3, 2, 4, 3, 2, 1, 3, 2, 1, 0};
54 
55  unsigned int nInputs_;
56  std::vector<int> cellRemap_;
57  std::vector<int> cellRemapNoDuplicates_;
58  std::vector<uint> encoderShape_;
59  std::vector<uint> decoderShape_;
62  std::vector<int> outputBitsPerLink_;
63 
64  std::vector<edm::ParameterSet> modelFilePaths_;
65 
68  std::unique_ptr<tensorflow::GraphDef> graphDef_encoder_;
69  std::vector<std::unique_ptr<tensorflow::Session>> session_encoder_;
70 
73  std::unique_ptr<tensorflow::GraphDef> graphDef_decoder_;
74  std::vector<std::unique_ptr<tensorflow::Session>> session_decoder_;
75 
76  std::vector<unsigned int> linkToGraphMap_;
77 
82 
83  std::array<double, nEncodedLayerNodes_> ae_encodedLayer_;
84 
86 };
87 
88 #endif
static constexpr int ae_outputCellU_[nTriggerCells_]
std::vector< std::unique_ptr< tensorflow::Session > > session_decoder_
std::unique_ptr< tensorflow::GraphDef > graphDef_encoder_
std::vector< std::unique_ptr< tensorflow::Session > > session_encoder_
void setGeometry(const HGCalTriggerGeometryBase *const)
void setGeometry(const HGCalTriggerGeometryBase *const geom)
HGCalConcentratorAutoEncoderImpl(const edm::ParameterSet &conf)
static constexpr int cellUVremap_[cellUVSize_][cellUVSize_]
std::unique_ptr< tensorflow::GraphDef > graphDef_decoder_
static constexpr unsigned int maxNumberOfLinks_
void select(unsigned nLinks, const std::vector< l1t::HGCalTriggerCell > &trigCellVecInput, std::vector< l1t::HGCalTriggerCell > &trigCellVecOutput, std::vector< l1t::HGCalConcentratorData > &ae_EncodedOutput)
static constexpr int ae_outputCellV_[nTriggerCells_]
std::vector< edm::ParameterSet > modelFilePaths_
std::array< double, nEncodedLayerNodes_ > ae_encodedLayer_