CMS 3D CMS Logo

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:
26 
27  private:
28 
29  int RCEt_start[7][2]; //card, region
30  int RCTau_start[7][2]; //card, region
31  int RCOf_start[7][2]; //card, region
32  int HFEt_start[8]; //region
33  int HFFg_start[8]; //region
34  int IEEt_start[4]; //candidate
35  int IEReg_start[4]; //candidate
36  int IECard_start[4]; //candidate
37  int NEEt_start[4]; //candidate
38  int NEReg_start[4]; //candidate
39  int NECard_start[4]; //candidate
40  int RCHad_start[7][2]; //card, region
41 
43 
44  int link[nObjects];
47 
48 
49  public:
50  rctDataBase();
52 
54  {
55  return length[t];
56  }
57 
59  {
60  return link[t];
61  }
62 
63  void GetLinkRCT(int linkMP7,unsigned int &RCTcrate, bool &RCTeven){
64  int oRSClink=indexfromMP7toRCT[linkMP7];
65  RCTcrate=(int)(oRSClink/2);
66  if (oRSClink%2==0) RCTeven=true;
67  else RCTeven=false;
68  }
69  void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7){
70  linkMP7=indexfromoRSCtoMP7[RCTcrate*2+(1-(int)RCTeven)];
71  }
72 
73  int GetIndices(rctObjectType t, int firstindex, int secondindex = -1)
74  {
75  switch (t){
76  case RCEt:
77  return RCEt_start[firstindex][secondindex];
78  case RCTau:
79  return RCTau_start[firstindex][secondindex];
80  case RCOf:
81  return RCOf_start[firstindex][secondindex];
82  case HFEt:
83  return HFEt_start[firstindex];
84  case HFFg:
85  return HFFg_start[firstindex];
86  case IEEt:
87  return IEEt_start[firstindex];
88  case IEReg:
89  return IEReg_start[firstindex];
90  case IECard:
91  return IECard_start[firstindex];
92  case NEEt:
93  return NEEt_start[firstindex];
94  case NEReg:
95  return NEReg_start[firstindex];
96  case NECard:
97  return NECard_start[firstindex];
98  case RCHad:
99  return RCHad_start[firstindex][secondindex];
100  default:
101  return -1;
102  }
103  }
104  };
105 }
106 #endif
void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7)
Definition: rctDataBase.h:69
int RCOf_start[7][2]
Definition: rctDataBase.h:31
int RCHad_start[7][2]
Definition: rctDataBase.h:40
int indexfromoRSCtoMP7[36]
Definition: rctDataBase.h:46
int GetLength(rctObjectType t)
Definition: rctDataBase.h:53
delete x;
Definition: CaloConfig.h:22
int NECard_start[4]
Definition: rctDataBase.h:39
int GetLink(rctObjectType t)
Definition: rctDataBase.h:58
int RCEt_start[7][2]
Definition: rctDataBase.h:29
void GetLinkRCT(int linkMP7, unsigned int &RCTcrate, bool &RCTeven)
Definition: rctDataBase.h:63
int NEReg_start[4]
Definition: rctDataBase.h:38
int IECard_start[4]
Definition: rctDataBase.h:36
int IEReg_start[4]
Definition: rctDataBase.h:35
int GetIndices(rctObjectType t, int firstindex, int secondindex=-1)
Definition: rctDataBase.h:73
int link[nObjects]
Definition: rctDataBase.h:44
int indexfromMP7toRCT[36]
Definition: rctDataBase.h:45
int length[nObjects]
Definition: rctDataBase.h:42
int RCTau_start[7][2]
Definition: rctDataBase.h:30