CbmRoot
Loading...
Searching...
No Matches
CbmTrdGeoFactory.h
Go to the documentation of this file.
1/* Copyright (C) 2024 National Institute of Physics and Nuclear Engineering - Horia Hulubei, Bucharest
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci [committer] */
4
19
20#ifndef CBMTRDGEOFACTORY_H_
21#define CBMTRDGEOFACTORY_H_
22
23#include "CbmTrdDefs.h" // for trd namespace
24
25#include <FairTask.h>
26
27#include <TString.h>
28
29#include <array>
30#include <string>
31
32class TGeoMedium;
33class TGeoTranslation;
34class TGeoVolume;
35class TGeoVolumeAssembly;
36using namespace std;
37using namespace cbm::trd;
39{
40 enum class eException
41 {
44 };
45
50 struct info_t {
51 int address = -1;
52 int id = -1;
53 int superId = -1;
54 int type = -1;
55 int superType = -1;
56 int rotation = -1;
57 };
58
64 bool ReadModuleInfo(const char* modTxt, info_t& info);
65
71 bool ReadFebInfo(const char* febTxt, info_t& info);
72
77 int WriteModuleInfo(info_t* info);
78
82 int WriteFebInfo(info_t* info);
83
84
85 // chamber generic geometrical definitions
86 static double sizeX, sizeY;
87 static double activeAreaX, activeAreaY;
88 static map<const string, const TGeoMedium*> fMaterial = {};
89 const TGeoMedium* GetMaterial(const char* mname);
90
91
94 class ChamberBuilder : public FairTask {
95 public:
107 {
109 ,
111 };
112 class Component;
113 class Radiator;
114 class Window;
115 class Volume;
116 class BackPanel;
117 class FEB;
118 class AUX;
122 ChamberBuilder(int typ = 1);
123
124 TGeoVolume* GetModule() const { return fVol; }
125 bool HasFEB() const { return TESTBIT(fConfig, eConfig::kFEB); }
128 virtual InitStatus Init();
130 virtual void Exec(Option_t*);
132 virtual void Finish() { ; }
133
134 void SetFEB(bool feb = true) { feb ? SETBIT(fConfig, eConfig::kFEB) : CLRBIT(fConfig, eConfig::kFEB); }
135 void SetRadiator(bool rad = true)
136 {
138 }
139
140 private:
143
144 short fConfig = 0;
145 short fChmbTyp = 1;
147 static const int Nfebs = faspFeb[1].nmax;
148 static constexpr double feb_pos[Nfebs][2] = {{-18, -21.6}, {0, -21.6}, {18, -21.6}, {-18, -10.8}, {0, -10.8},
149 {18, -10.8}, {-18, 0.0}, {0, 0.0}, {18, 0.0}, {-18, +10.8},
150 {0, +10.8}, {18, +10.8}, {-18, +21.6}, {0, +21.6}, {18, +21.6}};
151 TGeoVolume* fVol = nullptr;
152 ClassDef(ChamberBuilder, 1) // Manager of the TRD support structure
153 };
154
155
158 class ChamberBuilder::Component : public FairTask {
159 public:
160 friend class ChamberBuilder;
164 Component(const char* name) : FairTask(name)
165 {
166 sizeX = 0;
167 sizeY = 0;
168 activeAreaX = 0;
169 activeAreaY = 0;
170 }
171
176 virtual InitStatus Init() = 0;
178 virtual void Exec(Option_t*) { ; }
180 virtual void Finish() { ; }
181 virtual double GetCenter() const;
182 virtual double GetHeight() const { return fHeight; }
183
184 static const char* fgName[(int) eGeoPart::kNparts];
185
186 protected:
187 TGeoVolume* fVol = nullptr;
188
189 private:
191 //Component operator=(const Component&);
192
193 double fHeight = 0;
194 ClassDef(ChamberBuilder::Component, 1) // Model for the TRD generic chamber component builder
195 };
196
198 public:
199 Radiator();
201 virtual InitStatus Init();
202
203 private:
205 const double radiator_thickness = 30.0;
206 ClassDef(ChamberBuilder::Radiator, 1) // Model for the TRD radiator
207 };
208
210 public:
213 Window();
215 virtual InitStatus Init();
216
217 private:
218 Window(const Window&);
219
220 const double winIn_C_thickness = 0.012;
221 const double winIn_HC_thickness = 0.9;
222 const double WIN_FrameX_thickness = 0.5;
223 const double WIN_FrameY_thickness = 0.6;
224 const double WIN_OutX_thickness = 0.35;
225 const double WIN_OutY_thickness = 0.30;
226 ClassDef(ChamberBuilder::Window, 1) // Model for the TRD2D entrance window
227 };
228
232 public:
235 Volume();
237 virtual InitStatus Init();
238
239 private:
240 Volume(const Volume&);
241
242 const double gas_extra = 0.6;
243 const double gas_thickness = 1.2;
244 const double ridge_height = 0.29;
245 const double ledge_thickness = gas_thickness / 3.;
246 const double cathode_width = 1.0;
247 const double anode_width = 0.65;
248 const double dist_width = 0.40;
249 const double WIN_OutX_thickness = 0.35;
250 const double WIN_OutY_thickness = 0.30;
251 ClassDef(ChamberBuilder::Volume, 1) // Model for the TRD active volume
252 };
253
260 public:
263 BackPanel();
265 virtual InitStatus Init();
266
267 private:
269 TGeoTranslation* tr = nullptr;
270 TString sexpr = "";
271
272 const double pp_pads_thickness = 0.0020;
273 const double pp_pcb_thickness = 0.0230;
274 const double hc_thickness = 2.30;
275 const double hc_unitx = 6.0;
276 const double hc_unity = 2.7;
277 const double hc_holex = 2.4;
278 const double hc_holey = 0.8;
279 const double cu_pcb_thickness = 0.0150;
280 const double cu_thickness = 0.0020;
281 const double BKP_Frame_width = 1.;
282 const double BKP_Frame_closure = 0.25;
283 const double BKP_OutX_thickness = 0.50;
284 const double BKP_OutY_thickness = 0.45;
285 const double BKP_OutY_correct = 0.15;
286
287 ClassDef(ChamberBuilder::BackPanel, 1) // Model for the TRD back panel
288 };
289
292 public:
295 AUX();
297 virtual InitStatus Init();
298
299 private:
300 AUX(const AUX&);
301 // ADD AUXILIARY BOARDS
302 const double GA01_x = 5.; // length of LV FEBs in cm
303 const double GA01_y = 5.1; // width of LV FEBs in cm
304 const double GA01_z = 0.2;
305 const double B2B_x = 4.8; // length of B2B board in cm
306 const double B2B_y = 2.3; // width of B2B board in cm
307 const double B2B_z = 0.16;
308 const double VTTX_x = 10.6; // length of VTTX board in cm
309 const double VTTX_y = 5.0; // width of VTTX board in cm
310 const double VTTX_z = 0.16;
311 const double VTTX_x1 = 4.3; // length of VTTX large subtraction cm
312 const double VTTX_y1 = 3.9; // width of VTTX large subtraction cm
313 const double VTTX_x2 = 5.3; // length of VTTX small subtraction cm
314 const double VTTX_y2 = 0.94; // width of VTTX small subtraction cm
315 const double SATAx = 0.7; // width of a SATA connector on GA01
316 const double SATAy = 1.7; // length of a SATA connector on GA01
317 const double SATAz = 0.8; // height of a SATA connector on GA01
318 ClassDef(ChamberBuilder::AUX, 1) // Model for auxiliary TRD FEBs layer
319 };
320
323 public:
326 FEB();
328 virtual InitStatus Init();
329
330 // Connector reused by FEB-AUX component of 2D
331 static constexpr double ConnBRG_x = 0.5;
332 static constexpr double ConnBRG_y = 4.58;
333 static constexpr double ConnBRG_z = 0.658;
334 static constexpr double ConnBRG_pos[2][2] = {{-8.4, 0}, {+8.4, 0}};
335
336 static constexpr double FASPRO_zspace = 1.0;
337 static constexpr double FASPRO_length = 17.8;
338 static constexpr double FASPRO_width = 10.6;
339 private:
340 FEB(const FEB&);
341 //ChamberBuilder::FEB operator=(const FEB&);
342 const double FASP_x = 1.10;
343 const double FASP_y = 1.10;
344 const double FASP_z = 0.10;
345 const double FPGA_x = 2.20;
346 const double FPGA_y = 2.20;
347 const double FPGA_z = 0.18;
348 const double ADC_x = 0.9;
349 const double ADC_y = 1.5;
350 const double ADC_z = 0.1;
351 const double DCDC_x = 1.5012;
352 const double DCDC_y = 0.8992;
353 const double DCDC_z = 0.4319;
354 const double ConnFC_x = 2.37;
355 const double ConnFC_y = 0.535;
356 const double ConnFC_z = 0.266;
357
358 static const int FASPRO_Nly = 18;
359 static const int FASPRO_Nfasp = 12;
360 static const int FASPRO_Nadc = 6;
361 static const int FASPRO_Nfpga = 3;
362 static const int FASPRO_Ndcdc = 3;
363
364 const double FASPRO_hole_x = 2.2;
365 const double FASPRO_hole_y = 0.4;
366 const double FASPRO_ly_cu[FASPRO_Nly][2] = { // FASPRO(Cu) layer thickness [um] and covarage [%]
367 {54, 95}, {34, 10}, {16, 95}, {16, 10}, {16, 95}, {34, 10},
368 {16, 95}, {16, 10}, {16, 95}, {16, 95}, {16, 10}, {16, 95},
369 {34, 10}, {16, 95}, {16, 10}, {16, 95}, {34, 10}, {54, 95}};
370 const double FASPRO_ly_pcb[FASPRO_Nly - 1] = {// FASPRO(FR4) layer thickness [um]
371 100, 133, 100, 127, 100, 133, 100, 127, 100,
372 127, 100, 133, 100, 127, 100, 133, 100};
373 const double HOLE_pos[FASPRO_Nfasp][2] = {{-6, -3.55}, {-6, -1.55}, {-6, 1.55}, {-6, 3.55},
374 {0, -3.55}, {0, -1.55}, {0, 1.55}, {0, 3.55},
375 {+6, -3.55}, {+6, -1.55}, {+6, 1.55}, {+6, 3.55}};
376 const double FASP_pos[FASPRO_Nfasp][2] = {{-6, -4.5}, {-6, -2.5}, {-6, +2.5}, {-6, +4.5}, {0, -4.5}, {0, -2.5},
377 {0, +2.5}, {0, +4.5}, {+6, -4.5}, {+6, -2.5}, {+6, +2.5}, {+6, +4.5}};
378 const double ADC_pos[FASPRO_Nadc][2] = {{-4.15, -3.35}, {1.85, -3.35}, {7.85, -3.35},
379 {-4.15, +3.35}, {1.85, +3.35}, {7.85, +3.35}};
380 const double FPGA_pos[FASPRO_Nfpga][2] = {{-6, 0}, {0, 0}, {+6, 0}};
381 const double DCDC_pos[FASPRO_Ndcdc][2] = {{-3, 0.1}, {3, -1.2}, {2.89, 0.1}};
382 const double ConnFC_pos[FASPRO_Nfasp][2] = {{-6, -4.9}, {-6, -2.9}, {-6, 2.9}, {-6, 4.9}, {0, -4.9}, {0, -2.9},
383 {0, 2.9}, {0, 4.9}, {+6, -4.9}, {+6, -2.9}, {+6, 2.9}, {+6, 4.9}};
384
385 ClassDef(ChamberBuilder::FEB, 1) // Model for the TRD FEB geometry
386 };
387} // namespace cbm::trd::geo
388#endif // CBMTRDGEOFACTORY_H_
#define SETBIT(n, i)
Definition RTypes.h:15
#define TESTBIT(n, i)
Definition RTypes.h:17
#define CLRBIT(n, i)
Definition RTypes.h:16
Inner class describing the geometry of the TRD AUXILIARY boards (FEE):
virtual InitStatus Init()
Init task.
Inner class describing the back panel of composed of.
const double BKP_Frame_closure
Global width of the perimetral frame (including indentation)
const double hc_holey
dimension of flat-cable hole x-dimension (along wires)
const double BKP_OutY_thickness
outside framing
const double BKP_OutY_correct
outside framing
const double hc_holex
area opearted by one FASP 6 x 2.7 cm2
const double pp_pcb_thickness
cu coverage of PP PCB
const double cu_pcb_thickness
dimension of flat-cable hole x-dimension (along wires)
const double hc_unity
area opearted by one FASP 6 x 2.7 cm2
const double BKP_OutX_thickness
Perimetral frame indentation.
const double hc_unitx
Honneycomb backpanel support thickness.
const double hc_thickness
PP support PCB thickness.
const double BKP_Frame_width
Electric shield Cu covarage thickness.
const double cu_thickness
Electric shield PCB support thickness.
static const char * fgName[(int) eGeoPart::kNparts]
Component(const char *name)
Constructor of the TRD chamber component. It links the chamber class.
virtual InitStatus Init()=0
Init task.
Component(const Component &)
the geo volume itself
virtual void Exec(Option_t *)
Executed task.
Inner class describing the geometry of the TRD Front End Electronics (FEE):
const double FPGA_pos[FASPRO_Nfpga][2]
const double FASPRO_ly_cu[FASPRO_Nly][2]
static constexpr double FASPRO_width
length of FASP FEBs in cm
static constexpr double FASPRO_length
gap size between boards
virtual InitStatus Init()
Init task.
const double DCDC_pos[FASPRO_Ndcdc][2]
FEB(const FEB &)
width of FASP FEBs in cm
const double ConnFC_pos[FASPRO_Nfasp][2]
const double FASPRO_ly_pcb[FASPRO_Nly - 1]
static constexpr double ConnBRG_pos[2][2]
const double FASP_pos[FASPRO_Nfasp][2]
const double ADC_pos[FASPRO_Nadc][2]
const double HOLE_pos[FASPRO_Nfasp][2]
static constexpr double FASPRO_zspace
virtual InitStatus Init()
Init task.
virtual InitStatus Init()
Init task.
const double ledge_thickness
closure to pad-plane dimension
const double gas_thickness
extra volume of gas parallel to wires
const double WIN_OutX_thickness
distance from anode to PP
const double WIN_OutY_thickness
outside framing
const double cathode_width
ledge thickness supporting A/K wires
const double ridge_height
active volume thickness
const double WIN_FrameX_thickness
9mm HC structure
const double WIN_OutY_thickness
outside framing at win 3.5x9 mm2
const double WIN_FrameY_thickness
entrance window framing 5x9 mm2
Window()
Constructor of entrance window for the TRD chamber.
const double WIN_OutX_thickness
entrance window framing 5x9 mm2
const double winIn_HC_thickness
100um C foil + 25um KaptonAl
virtual InitStatus Init()
Init task.
array< Component *,(int) eGeoPart::kNparts > fComponent
chamber type [1, 3, 5, 7]
ChamberBuilder(int typ=1)
Constructor for the chamber. Adds all elements according to config.
short fChmbTyp
bit map of the setter flags
virtual void Exec(Option_t *)
Executed task.
static constexpr double feb_pos[Nfebs][2]
static const int Nfebs
list of chamber component builders
@ kFEB
include FEB in chamber geometry
ChamberBuilder operator=(const ChamberBuilder &)
virtual InitStatus Init()
Init task.
ChamberBuilder(const ChamberBuilder &)
virtual void Finish()
Finish task.
const TGeoMedium * GetMaterial(const char *mname)
material mapping (name, value)
bool ReadModuleInfo(const char *modTxt, info_t &info)
Identify information related to the module encrypted in the geoManager path. Based on legacy function...
bool ReadFebInfo(const char *febTxt, info_t &info)
Identify information related to one FEB encrypted in the geoManager path.
int WriteFebInfo(info_t *info)
Put up information related to the FEB and store it in the geoManager path.
static double sizeX
static double sizeY
int WriteModuleInfo(info_t *info)
Put up information related to the module and store it in the geoManager path. Based on legacy version...
static double activeAreaY
static map< const string, const TGeoMedium * > fMaterial
active area
static double activeAreaX
total area
static constexpr FEB faspFeb[2]
Definition CbmTrdDefs.h:158
Hash for CbmL1LinkKey.
Information to be storred in the geoManager path. Based on legacy class CbmTrdGeoHandler.
int type
global (wrt setup) id of element
int superType
version of element wrt superType family
int superId
local (wrt installation) id of element
int rotation
global type wrt TRD design