CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rctDataBase.h
Go to the documentation of this file.
1 #ifndef _rctDATABASE_h
2 #define _rctDATABASE_h
3 
4 #include <iostream>
5 #include <stdexcept>
6 #include <vector>
7 #include <cstdint>
8 
9 namespace l1t {
10  class rctDataBase {
11  public:
13 
14  private:
15  int RCEt_start[7][2]; //card, region
16  int RCTau_start[7][2]; //card, region
17  int RCOf_start[7][2]; //card, region
18  int HFEt_start[8]; //region
19  int HFFg_start[8]; //region
20  int IEEt_start[4]; //candidate
21  int IEReg_start[4]; //candidate
22  int IECard_start[4]; //candidate
23  int NEEt_start[4]; //candidate
24  int NEReg_start[4]; //candidate
25  int NECard_start[4]; //candidate
26  int RCHad_start[7][2]; //card, region
27 
29 
30  int link[nObjects];
33 
34  public:
35  rctDataBase();
37 
38  int GetLength(rctObjectType t) { return length[t]; }
39 
40  int GetLink(rctObjectType t) { return link[t]; }
41 
42  void GetLinkRCT(int linkMP7, unsigned int &RCTcrate, bool &RCTeven) {
43  int oRSClink = indexfromMP7toRCT[linkMP7];
44  RCTcrate = (int)(oRSClink / 2);
45  if (oRSClink % 2 == 0)
46  RCTeven = true;
47  else
48  RCTeven = false;
49  }
50  void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7) {
51  linkMP7 = indexfromoRSCtoMP7[RCTcrate * 2 + (1 - (int)RCTeven)];
52  }
53 
54  int GetIndices(rctObjectType t, int firstindex, int secondindex = -1) {
55  switch (t) {
56  case RCEt:
57  return RCEt_start[firstindex][secondindex];
58  case RCTau:
59  return RCTau_start[firstindex][secondindex];
60  case RCOf:
61  return RCOf_start[firstindex][secondindex];
62  case HFEt:
63  return HFEt_start[firstindex];
64  case HFFg:
65  return HFFg_start[firstindex];
66  case IEEt:
67  return IEEt_start[firstindex];
68  case IEReg:
69  return IEReg_start[firstindex];
70  case IECard:
71  return IECard_start[firstindex];
72  case NEEt:
73  return NEEt_start[firstindex];
74  case NEReg:
75  return NEReg_start[firstindex];
76  case NECard:
77  return NECard_start[firstindex];
78  case RCHad:
79  return RCHad_start[firstindex][secondindex];
80  default:
81  return -1;
82  }
83  }
84  };
85 } // namespace l1t
86 #endif
void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7)
Definition: rctDataBase.h:50
int RCOf_start[7][2]
Definition: rctDataBase.h:17
int RCHad_start[7][2]
Definition: rctDataBase.h:26
int indexfromoRSCtoMP7[36]
Definition: rctDataBase.h:32
int GetLength(rctObjectType t)
Definition: rctDataBase.h:38
int NECard_start[4]
Definition: rctDataBase.h:25
int GetLink(rctObjectType t)
Definition: rctDataBase.h:40
int RCEt_start[7][2]
Definition: rctDataBase.h:15
void GetLinkRCT(int linkMP7, unsigned int &RCTcrate, bool &RCTeven)
Definition: rctDataBase.h:42
int NEReg_start[4]
Definition: rctDataBase.h:24
int IECard_start[4]
Definition: rctDataBase.h:22
int IEReg_start[4]
Definition: rctDataBase.h:21
int GetIndices(rctObjectType t, int firstindex, int secondindex=-1)
Definition: rctDataBase.h:54
int link[nObjects]
Definition: rctDataBase.h:30
int indexfromMP7toRCT[36]
Definition: rctDataBase.h:31
int length[nObjects]
Definition: rctDataBase.h:28
int RCTau_start[7][2]
Definition: rctDataBase.h:16