CbmRoot
CbmMcbm2018MuchPar.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmMcbm2018MuchPar header file -----
3 // ----- Created 25/07/17 by P.-A. Loizeau ----
4 // ----- Modified 07/12/18 by A Kumar -----
5 // -------------------------------------------------------------------------
6 
7 #ifndef CBMMCBM2018MUCHPAR_H
8 #define CBMMCBM2018MUCHPAR_H
9 
10 #include "FairParGenericSet.h"
11 
12 #include "TArrayD.h"
13 #include "TArrayI.h"
14 
15 class FairParIo;
16 class FairParamList;
17 
18 
19 class CbmMcbm2018MuchPar : public FairParGenericSet {
20 
21 public:
23  CbmMcbm2018MuchPar(const char* name = "CbmMcbm2018MuchPar",
24  const char* title = "Much parameters",
25  const char* context = "Default");
26 
27 
29  virtual ~CbmMcbm2018MuchPar();
30 
32  virtual void clear();
33 
34  void putParams(FairParamList*);
35  Bool_t getParams(FairParamList*);
36 
37  static constexpr UInt_t GetNbCrobsPerDpb() { return kuNbCrobsPerDpb; }
38  static constexpr UInt_t GetNbElinkPerCrob() { return kuNbElinksPerCrob; }
39  static constexpr UInt_t GetNbFebsPerCrob() { return kuNbFebsPerCrob; }
40  static constexpr UInt_t GetNbFebsPerDpb() {
42  }
43  static constexpr UInt_t GetNbAsicsPerFeb() { return kuNbAsicsPerFeb; }
44  static constexpr UInt_t GetNbAsicsPerCrob() {
46  }
47  static constexpr UInt_t GetNbAsicsPerDpb() {
49  }
50  static constexpr UInt_t GetNbChanPerAsic() { return kuNbChanPerAsic; }
51  static constexpr UInt_t GetNbChanPerFeb() {
53  }
54 
55  Int_t ElinkIdxToFebIdx(UInt_t uElink);
56  /*UInt_t ElinkIdxToAsicIdx( Bool_t bFebType, UInt_t uElink )
57  { return kTRUE == bFebType ? ElinkIdxToAsicIdxFebB( uElink ) :
58  ElinkIdxToAsicIdxFebA( uElink );
59  }*/
60  UInt_t ElinkIdxToAsicIdx(UInt_t uElink) {
61  return ElinkIdxToAsicIdxFebMuch(uElink);
62  }
63 
64  UInt_t ElinkIdxToAsicIdxFebMuch(UInt_t uElink);
65  /*UInt_t ElinkIdxToAsicIdxFebA( UInt_t uElink );
66  UInt_t ElinkIdxToAsicIdxFebB( UInt_t uElink );*/
67 
68  UInt_t GetNrOfDpbs() { return fuNrOfDpbs; }
69  UInt_t GetDpbId(UInt_t uDpbIdx);
70  UInt_t GetNrOfCrobs() { return fuNrOfDpbs * kuNbCrobsPerDpb; }
71  UInt_t GetNrOfFebs() { return GetNrOfCrobs() * kuNbFebsPerCrob; }
72  UInt_t GetNrOfAsics() { return GetNrOfFebs() * kuNbAsicsPerFeb; }
73  //inline Int_t GetFebsIdsFromArray(Int_t i) { return fnFebsIdsArray[i]; }
74  UInt_t GetNrOfFebsInGemA() { return fuFebsInGemA; }
75  UInt_t GetNrOfFebsInGemB() { return fuFebsInGemB; }
76  Int_t GetNrOfChannels() { return kuNbChanPerAsic; }
77 
78  UInt_t GetFebId(UInt_t);
79  UInt_t GetModule(UInt_t);
80 
81 
82  Short_t GetPadXA(UShort_t febid, UShort_t channelid);
83  Short_t GetPadYA(UShort_t febid, UShort_t channelid);
84  Short_t GetPadXB(UShort_t febid, UShort_t channelid);
85  Short_t GetPadYB(UShort_t febid, UShort_t channelid);
86  Double_t GetRealX(Int_t);
87  Double_t GetRealPadSize(Int_t);
88 
89  Double_t GetRealX(Int_t Channel, Int_t Sector);
90  Double_t GetRealPadSize(Int_t Channel, Int_t Sector);
91 
92  Bool_t IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx);
93  Bool_t IsFebActive(UInt_t uFebInSystIdx);
94  Bool_t IsFebActive(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx);
95 
96 private:
98  static const UInt_t kuNbCrobsPerDpb = 1; // Number of CROBs possible per DPB
99  static const UInt_t kuNbElinksPerCrob =
100  42; // Number of elinks in each CROB ?
101  static const UInt_t kuNbFebsPerCrob =
102  6; // Number of FEBs connected to each CROB for mMuch 2019
103  static const UInt_t kuNbAsicsPerFeb =
104  1; // Number of ASICs connected in each FEB for MUCH
105  static const UInt_t kuNbChanPerAsic = 128; // Number of channels in each ASIC
106  // static constexpr UInt_t kuCrobMapElinkFebA[ kuNbElinksPerCrob ] = {
107  /* *** Inverted ?!?
108  const UInt_t kuCrobMapElinkFebA[ kuNbElinksPerCrob ] = {
109  0x0026, 0x0024, 0x0022, 0x0027, 0x0025, 0x001F,
110  0x001D, 0x001B, 0x0023, 0x0020, 0xFFFF, 0xFFFF,
111  0x0021, 0x0019, 0x0017, 0x0015, 0x001E, 0x001C,
112  0x0018, 0x0009, 0x0016, 0x0014, 0x000B, 0x0012,
113  0x0010, 0x0011, 0x001A, 0x0013, 0x000E, 0x000A,
114  0x0008, 0x000F, 0x000D, 0x0005, 0x0003, 0x0001,
115  0x000C, 0x0002, 0x0007, 0x0004, 0x0000, 0x0006
116  }; //! Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
117 */
118  const UInt_t
121  {
122  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001,
123  0x0001, 0x0001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003, 0x0003,
124  0x0003, 0x0003, 0x0003, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
125  0x0005, 0x0005, 0x0005, 0x0005, 0x0003, 0x0003, 0x0003, 0x0003,
126  0x0003, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0005, 0x0005,
127  0x0005, 0x0005};
128  /*
129  const UInt_t kuCrobMapElinkFebMuch[ kuNbElinksPerCrob ] = {
130  0x001C, 0x001D, 0x001E, 0x001F, 0x0020, 0x0021,
131  0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
132  0x0028, 0x0029, 0x000E, 0x000F, 0x0010, 0x0011,
133  0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
134  0x0018, 0x0019, 0x001A, 0x001B, 0x0000, 0x0001,
135  0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
136  0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D
137  }; //! Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
138 */
139  // static constexpr UInt_t kuCrobMapElinkFebIdx[ kuNbElinksPerCrob ] = {
140  const Int_t kiCrobMapElinkFebIdx[kuNbElinksPerCrob] = {0, 0, 0, 0, 0, 1, 1, 1,
141  1, 1, 2, 2, 2, 2, 3, 3,
142  3, 3, 3, 4, 4, 4, 4, 4,
143  5, 5, 5, 5, 6, 6, 6, 6,
144  6, 7, 7, 7, 7, 7, 8, 8,
145  8, 8};
146 
147 
149 
150  UInt_t fuNrOfDpbs; // Total number of MUCH DPBs in system
151  TArrayI
152  fiDbpIdArray; // Array to hold the unique IDs (equipment ID) for all MUCH DPBs
153  TArrayI
154  fiCrobActiveFlag; // Array to hold the active flag for all CROBs, [ NbDpb * kuNbCrobPerDpb ]
155  UInt_t fuFebsInGemA; // Number of FEBs connected in GEM Module A
156  UInt_t fuFebsInGemB; // Number of FEBs connected in GEM Module B
157  TArrayI
158  fnFebsIdsArrayGemA; // Array to hold FEB IDs connected to GEM Module A
159  TArrayI
160  fnFebsIdsArrayGemB; // Array to hold FEB IDs connected to GEM Module B
161  TArrayI
162  fChannelsToPadXA; // Array which stores the corresponding x position of PAD of entire module A
163  TArrayI
164  fChannelsToPadYA; // Array which stores the corresponding y position of PAD of entire module A
165  TArrayI
166  fChannelsToPadXB; // Array which stores the corresponding x position of PAD of entire module B
167  TArrayI
168  fChannelsToPadYB; // Array which stores the corresponding y position of PAD of entire module B
169  TArrayD
170  fRealX; // Array which stores the Real X (starting 18.733 cm) position of PAD
171  TArrayD
172  fRealPadSize; // Array which stores the Real Progressive size of each padX (starting .327 cm )
173 
175 };
176 #endif // CBMMCBM2018MUCHPAR_H
CbmMcbm2018MuchPar::fChannelsToPadYA
TArrayI fChannelsToPadYA
Definition: CbmMcbm2018MuchPar.h:164
CbmMcbm2018MuchPar::GetNbAsicsPerCrob
static constexpr UInt_t GetNbAsicsPerCrob()
Definition: CbmMcbm2018MuchPar.h:44
CbmMcbm2018MuchPar::IsCrobActive
Bool_t IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx)
Definition: CbmMcbm2018MuchPar.cxx:151
CbmMcbm2018MuchPar::GetNrOfFebsInGemB
UInt_t GetNrOfFebsInGemB()
Definition: CbmMcbm2018MuchPar.h:75
CbmMcbm2018MuchPar::kuNbCrobsPerDpb
static const UInt_t kuNbCrobsPerDpb
Constants.
Definition: CbmMcbm2018MuchPar.h:98
CbmMcbm2018MuchPar::GetNbElinkPerCrob
static constexpr UInt_t GetNbElinkPerCrob()
Definition: CbmMcbm2018MuchPar.h:38
CbmMcbm2018MuchPar::fChannelsToPadXA
TArrayI fChannelsToPadXA
Definition: CbmMcbm2018MuchPar.h:162
CbmMcbm2018MuchPar::ElinkIdxToAsicIdx
UInt_t ElinkIdxToAsicIdx(UInt_t uElink)
Definition: CbmMcbm2018MuchPar.h:60
CbmMcbm2018MuchPar::GetDpbId
UInt_t GetDpbId(UInt_t uDpbIdx)
Definition: CbmMcbm2018MuchPar.cxx:142
CbmMcbm2018MuchPar::GetNbFebsPerDpb
static constexpr UInt_t GetNbFebsPerDpb()
Definition: CbmMcbm2018MuchPar.h:40
CbmMcbm2018MuchPar::fiCrobActiveFlag
TArrayI fiCrobActiveFlag
Definition: CbmMcbm2018MuchPar.h:154
CbmMcbm2018MuchPar::GetRealPadSize
Double_t GetRealPadSize(Int_t)
Definition: CbmMcbm2018MuchPar.cxx:305
CbmMcbm2018MuchPar::GetNrOfFebsInGemA
UInt_t GetNrOfFebsInGemA()
Definition: CbmMcbm2018MuchPar.h:74
CbmMcbm2018MuchPar::kuNbElinksPerCrob
static const UInt_t kuNbElinksPerCrob
Definition: CbmMcbm2018MuchPar.h:99
CbmMcbm2018MuchPar::GetNbAsicsPerFeb
static constexpr UInt_t GetNbAsicsPerFeb()
Definition: CbmMcbm2018MuchPar.h:43
CbmMcbm2018MuchPar::GetNrOfDpbs
UInt_t GetNrOfDpbs()
Definition: CbmMcbm2018MuchPar.h:68
CbmMcbm2018MuchPar::GetNbChanPerFeb
static constexpr UInt_t GetNbChanPerFeb()
Definition: CbmMcbm2018MuchPar.h:51
CbmMcbm2018MuchPar::fuFebsInGemB
UInt_t fuFebsInGemB
Definition: CbmMcbm2018MuchPar.h:156
CbmMcbm2018MuchPar::CbmMcbm2018MuchPar
CbmMcbm2018MuchPar(const char *name="CbmMcbm2018MuchPar", const char *title="Much parameters", const char *context="Default")
Definition: CbmMcbm2018MuchPar.cxx:20
CbmMcbm2018MuchPar::ElinkIdxToAsicIdxFebMuch
UInt_t ElinkIdxToAsicIdxFebMuch(UInt_t uElink)
Definition: CbmMcbm2018MuchPar.cxx:131
CbmMcbm2018MuchPar::GetPadYA
Short_t GetPadYA(UShort_t febid, UShort_t channelid)
Definition: CbmMcbm2018MuchPar.cxx:228
CbmMcbm2018MuchPar::IsFebActive
Bool_t IsFebActive(UInt_t uFebInSystIdx)
Definition: CbmMcbm2018MuchPar.cxx:171
CbmMcbm2018MuchPar::fRealPadSize
TArrayD fRealPadSize
Definition: CbmMcbm2018MuchPar.h:172
CbmMcbm2018MuchPar::putParams
void putParams(FairParamList *)
Definition: CbmMcbm2018MuchPar.cxx:56
CbmMcbm2018MuchPar::GetNbCrobsPerDpb
static constexpr UInt_t GetNbCrobsPerDpb()
Definition: CbmMcbm2018MuchPar.h:37
CbmMcbm2018MuchPar::GetRealX
Double_t GetRealX(Int_t)
Definition: CbmMcbm2018MuchPar.cxx:294
CbmMcbm2018MuchPar::fRealX
TArrayD fRealX
Definition: CbmMcbm2018MuchPar.h:170
CbmMcbm2018MuchPar::GetNbAsicsPerDpb
static constexpr UInt_t GetNbAsicsPerDpb()
Definition: CbmMcbm2018MuchPar.h:47
CbmMcbm2018MuchPar::fChannelsToPadYB
TArrayI fChannelsToPadYB
Definition: CbmMcbm2018MuchPar.h:168
CbmMcbm2018MuchPar::GetNrOfAsics
UInt_t GetNrOfAsics()
Definition: CbmMcbm2018MuchPar.h:72
CbmMcbm2018MuchPar::kuNbFebsPerCrob
static const UInt_t kuNbFebsPerCrob
Definition: CbmMcbm2018MuchPar.h:101
CbmMcbm2018MuchPar::fnFebsIdsArrayGemA
TArrayI fnFebsIdsArrayGemA
Definition: CbmMcbm2018MuchPar.h:158
CbmMcbm2018MuchPar::~CbmMcbm2018MuchPar
virtual ~CbmMcbm2018MuchPar()
Definition: CbmMcbm2018MuchPar.cxx:43
CbmMcbm2018MuchPar::GetPadXB
Short_t GetPadXB(UShort_t febid, UShort_t channelid)
Definition: CbmMcbm2018MuchPar.cxx:241
CbmMcbm2018MuchPar
Definition: CbmMcbm2018MuchPar.h:19
CbmMcbm2018MuchPar::fnFebsIdsArrayGemB
TArrayI fnFebsIdsArrayGemB
Definition: CbmMcbm2018MuchPar.h:160
CbmMcbm2018MuchPar::GetNrOfFebs
UInt_t GetNrOfFebs()
Definition: CbmMcbm2018MuchPar.h:71
CbmMcbm2018MuchPar::GetNrOfChannels
Int_t GetNrOfChannels()
Definition: CbmMcbm2018MuchPar.h:76
CbmMcbm2018MuchPar::GetPadYB
Short_t GetPadYB(UShort_t febid, UShort_t channelid)
Definition: CbmMcbm2018MuchPar.cxx:254
CbmMcbm2018MuchPar::getParams
Bool_t getParams(FairParamList *)
Definition: CbmMcbm2018MuchPar.cxx:76
CbmMcbm2018MuchPar::kuCrobMapElinkFebMuch
const UInt_t kuCrobMapElinkFebMuch[kuNbElinksPerCrob]
Definition: CbmMcbm2018MuchPar.h:120
CbmMcbm2018MuchPar::ElinkIdxToFebIdx
Int_t ElinkIdxToFebIdx(UInt_t uElink)
Definition: CbmMcbm2018MuchPar.cxx:119
CbmMcbm2018MuchPar::GetModule
UInt_t GetModule(UInt_t)
Definition: CbmMcbm2018MuchPar.cxx:283
CbmMcbm2018MuchPar::clear
virtual void clear()
Definition: CbmMcbm2018MuchPar.cxx:48
CbmMcbm2018MuchPar::fuNrOfDpbs
UInt_t fuNrOfDpbs
Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
Definition: CbmMcbm2018MuchPar.h:150
CbmMcbm2018MuchPar::fuFebsInGemA
UInt_t fuFebsInGemA
Definition: CbmMcbm2018MuchPar.h:155
CbmMcbm2018MuchPar::kiCrobMapElinkFebIdx
const Int_t kiCrobMapElinkFebIdx[kuNbElinksPerCrob]
Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
Definition: CbmMcbm2018MuchPar.h:140
CbmMcbm2018MuchPar::ClassDef
ClassDef(CbmMcbm2018MuchPar, 1)
CbmMcbm2018MuchPar::kuNbAsicsPerFeb
static const UInt_t kuNbAsicsPerFeb
Definition: CbmMcbm2018MuchPar.h:103
CbmMcbm2018MuchPar::GetNrOfCrobs
UInt_t GetNrOfCrobs()
Definition: CbmMcbm2018MuchPar.h:70
CbmMcbm2018MuchPar::fiDbpIdArray
TArrayI fiDbpIdArray
Definition: CbmMcbm2018MuchPar.h:152
CbmMcbm2018MuchPar::GetNbChanPerAsic
static constexpr UInt_t GetNbChanPerAsic()
Definition: CbmMcbm2018MuchPar.h:50
CbmMcbm2018MuchPar::kuNbChanPerAsic
static const UInt_t kuNbChanPerAsic
Definition: CbmMcbm2018MuchPar.h:105
CbmMcbm2018MuchPar::GetNbFebsPerCrob
static constexpr UInt_t GetNbFebsPerCrob()
Definition: CbmMcbm2018MuchPar.h:39
CbmMcbm2018MuchPar::GetFebId
UInt_t GetFebId(UInt_t)
Definition: CbmMcbm2018MuchPar.cxx:267
CbmMcbm2018MuchPar::GetPadXA
Short_t GetPadXA(UShort_t febid, UShort_t channelid)
Definition: CbmMcbm2018MuchPar.cxx:215
CbmMcbm2018MuchPar::fChannelsToPadXB
TArrayI fChannelsToPadXB
Definition: CbmMcbm2018MuchPar.h:166