CbmRoot
Loading...
Searching...
No Matches
CbmTrdDefs.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pascal Raisig, Florian Uhlig [committer], Alexandru Bercuci */
4
5/*
6 * Purpose: Reference class for global definitions used within the CbmTrd project
7 * -----
8 */
9
10#ifndef CBMTRDDEFS_H
11#define CBMTRDDEFS_H
12
13#include "Rtypes.h"
14
15namespace cbm::trd
16{
17 enum class eAsic : int
18 {
19 kSpadic = 0
20 ,
21 kFasp = 1
22 ,
23 kNotSet
24 };
25 enum class ePadPlane : int
26 {
27 k1d = 0
28 ,
29 k2d = 1
30 ,
31 kNotSet
32 };
33 enum class eWindow : int
34 {
35 kThin = 0
36 ,
37 kThick
38 ,
39 kNotSet
40 };
41 enum class eGas : int
42 {
43 kAr = 0
44 ,
45 kXe
46 ,
47 kNotSet
48 };
60 {
61 kPPtyp = 0
62 ,
63 kFEEtyp = 1
64 };
65
66 enum class eModuleTypes1D : int
67 {
73 8 // FIXME moduleType 8 has multiple definitions, check if non mCbm definitions are really needed. - PR 03/25/2020
74 ,
75 kNmoduleTypes = 5 // REMARK this number has to be updated by hand!
76 };
77 struct FEB {
78 int nasic = 0;
79 int nchannels = 0;
80 int nmax = 0;
81 };
82 struct READOUT {
83 int nsec = 0;
84 int ncol = 0;
85 int nrow = 0;
86 int nasic = 0;
87 int ndaq = 0;
88 float sizex = 0.;
89 float sizey[3] = {0.};
90 };
91#pragma GCC diagnostic push
92#pragma GCC diagnostic ignored "-Wunused-variable"
93 // array of pad geometries in the TRD1D
94 static READOUT mod1D[9] = {
95 // module type 0 dummy
96 {0, 0, 0, 0, 0, 0., {0., 0., 0.}},
97 // module type 1
98 // number of pads: 80 x 32 = 2560
99 // pad size sector 1: 0.68 cm x 1.75 cm = 1.18 cm2
100 // pad size sector 0: 0.68 cm x 1.50 cm = 1.01 cm2
101 {3, 80, 32, 80, 5, 54., {6.0, 42.0, 6.0}},
102 // module type 2
103 // number of pads: 80 x 16 = 1280
104 // pad size sector 1: 0.68 cm x 3.50 cm = 2.36 cm2
105 // pad size sector 0: 0.68 cm x 3.25 cm = 2.19 cm2
106 {3, 80, 16, 80, 5, 54., {13.0, 28.0, 13.0}},
107 // module type 3
108 // number of pads: 80 x 8 = 640
109 // number of asic: 20
110 // pad size sector 1: 0.68 cm x 6.75 cm = 4.56 cm2
111 // pad size sector 0: 0.68 cm x 6.75 cm = 4.56 cm2
112 {1, 80, 8, 20, 1, 54., {54., 0., 0.}},
113 // module type 4
114 // number of pads: 80 x 8 = 640
115 // pad size sector 1: 0.68 cm x 6.75 cm = 4.56 cm2
116 // pad size sector 0: 0.68 cm x 6.75 cm = 4.56 cm2
117 {1, 80, 8, 20, 1, 54., {54., 0., 0.}},
118 // module type 5
119 // number of pads: 144 x 24 = 3456
120 // number of asic: 36
121 // pad size sector 1: 0.67 cm x 4.00 cm = 2.67 cm2
122 // pad size sector 0: 0.67 cm x 4.00 cm = 2.67 cm2
123 {1, 144, 24, 108, 2, 96., {96.0, 0., 0.}},
124 // module type 6
125 // number of pads: 144 x 16 = 2304
126 // pad size sector 1: 0.67 cm x 6.00 cm = 4.00 cm2
127 // pad size sector 0: 0.67 cm x 6.00 cm = 4.00 cm2
128 {1, 144, 16, 72, 2, 96., {96.0, 0., 0.}},
129 // module type 7
130 // number of pads: 144 x 8 = 1152
131 // number of asic: 36
132 // pad size sector 1: 0.67 cm x 12.00 cm = 8.00 cm2
133 // pad size sector 0: 0.67 cm x 12.00 cm = 8.00 cm2
134 {1, 144, 8, 36, 2, 96., {96.0, 0., 0.}},
135 // module type 8
136 // number of pads: 144 x 4 = 576
137 // pad size sector 1: 0.67 cm x 24.00 cm = 16.00 cm2
138 // pad size sector 0: 0.67 cm x 24.00 cm = 16.00 cm2
139 {1, 144, 4, 18, 1, 96., {96.0, 0., 0.}}};
140
141 // array of pad geometries in the TRD2D
142 static const READOUT mod2D[3] = {
143 // module type 1 (TRD2D @ CBM)
144 // number of pads: 72 x 20 = 1440
145 // pad size: 0.75 cm x 2.70 cm = 2.03 cm2
146 // number of asic: 180
147 // number of crob: 5
148 {1, 72, 20, 180, 5, 54.0, {54.0, 0., 0.}},
149 // module type 9 (TRD2012 @ mCBM)
150 // number of pads: 72 x 20 = 1440
151 // pad size: 0.75 cm x 2.79 cm = 2.03 cm2
152 {1, 72, 20, 180, 5, 54.0, {55.8, 0., 0.}},
153 // module type 10 (TRD2010)
154 // number of pads: 32 x 3 = 96
155 // pad size : 0.72 cm x 2.72 cm = 1.96 cm2
156 {1, 32, 3, 6, 1, 23.04, {8.16, 0., 0.}}};
157
158 static constexpr FEB faspFeb[2] = {
159 {6, 16, 30},
160 {12, 16, 15}
161 };
162#pragma GCC diagnostic pop
163
167 bool HasFaspFEE(uint16_t config);
168 bool HasSpadicFEE(uint16_t config);
172 bool HasPadPlane2D(uint16_t config);
173 bool HasPadPlane1D(uint16_t config);
177 void SetFEE(uint16_t config, bool fasp = true);
181 void SetPP(uint16_t config, bool twod = true);
182} // namespace cbm::trd
183
184#endif
static constexpr FEB faspFeb[2]
Definition CbmTrdDefs.h:158
bool HasFaspFEE(uint16_t config)
Inquire the FEE read-out type of the module.
Definition CbmTrdDefs.cxx:9
bool HasPadPlane1D(uint16_t config)
@ kXe
XeCO2 active gas.
@ kAr
ArCO2 active gas.
@ kThin
1D case (Al+mylar)
@ kThick
2D case (Kapton + C + HC)
@ kPPtyp
toggle pad-plane type of the chamber
Definition CbmTrdDefs.h:61
@ kFEEtyp
toggle FEE type for the module
Definition CbmTrdDefs.h:63
@ k1d
rectangular 1D case
@ k2d
triangular 2D case
bool HasSpadicFEE(uint16_t config)
static READOUT mod1D[9]
Definition CbmTrdDefs.h:94
static const READOUT mod2D[3]
Definition CbmTrdDefs.h:142
bool HasPadPlane2D(uint16_t config)
Inquire the pad-plane type of the chamber.
@ kSpadic
SPADIC type definition.
@ kNotSet
ASIC not set / recognized.
@ kFasp
FASP ASIC definition.
void SetPP(uint16_t config, bool twod=true)
Define the pad-plane type of the chamber.
void SetFEE(uint16_t config, bool fasp=true)
Define the read-out FEE type of the module.
int nasic
no of asics / feb
Definition CbmTrdDefs.h:78
int nchannels
no of channels / asic
Definition CbmTrdDefs.h:79
int nmax
max no of febs on the module
Definition CbmTrdDefs.h:80
int ndaq
no of concentrators (e.g. CROB) to read-out the pad-plane
Definition CbmTrdDefs.h:87
int nasic
no of ASICs to read-out the pad-plane
Definition CbmTrdDefs.h:86
float sizey[3]
size of active area across wires
Definition CbmTrdDefs.h:89
int ncol
no of (rectangular - pads) column
Definition CbmTrdDefs.h:84
int nsec
no of sectors on the pad-plane
Definition CbmTrdDefs.h:83
int nrow
no of pad rows
Definition CbmTrdDefs.h:85
float sizex
size of active area along wires
Definition CbmTrdDefs.h:88