Project
Loading...
Searching...
No Matches
FT3Module.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef FT3MODULE_H
16#define FT3MODULE_H
17
18#include <TGeoVolume.h>
19#include <string>
20#include <vector>
21
23
24// define types for y positions, second element is the stack height
25using PositionType = std::pair<double, unsigned>;
26using PositionTypes = std::vector<PositionType>;
27using PosNegPositionTypes = std::pair<PositionTypes, PositionTypes>;
28// define type of the y position range: First pair is (min, max) for positive y
29using PositionRangeType = std::pair<std::pair<double, double>, std::pair<double, double>>;
31
33{
34
35 public:
36 static void initialize_materials();
37 static TGeoMaterial* siliconMat;
38 static TGeoMedium* siliconMed;
39 static TGeoMaterial* copperMat;
40 static TGeoMedium* copperMed;
41 static TGeoMaterial* kaptonMat;
42 static TGeoMedium* kaptonMed;
43 static TGeoMaterial* epoxyMat;
44 static TGeoMedium* epoxyMed;
45 static TGeoMaterial* AluminumMat;
46 static TGeoMedium* AluminumMed;
47 static TGeoMaterial* carbonFiberMat;
48 static TGeoMedium* carbonFiberMed;
49
50 const char* mDetName;
51
52 static void createModule(
53 double mZ, int layerNumber, int direction, double Rin,
54 double Rout, double overlap, const std::string& face,
55 const std::string& layout_type, TGeoVolume* motherVolume);
56
58 double mZ, int layerNumber, int direction, double Rin,
59 double Rout, double z_offset_local, const Constants::StaveConfig& staveConfig,
60 TGeoVolume* motherVolume);
61
62 private:
63 static void create_layout(
64 double mZ, int layerNumber, int direction, double Rin,
65 double Rout, double overlap, const std::string& face,
66 const std::string& layout_type, TGeoVolume* motherVolume);
67
68 void create_layout_staveGeo(
69 double mZ, int layerNumber, int direction, double Rin,
70 double Rout, double z_offset_local, const Constants::StaveConfig& staveConfig,
71 TGeoVolume* motherVolume);
72
73 // Helper functions
74 void fill_stave(PosNegPositionTypes& y_positions, double Rin, double Rout,
75 double x_left, unsigned kSensorStack, PositionRangeType y_range,
76 std::pair<double, double>& absAllowedYRange);
77 void addStaveVolume(
78 TGeoVolume* motherVolume, std::string volumeName, int direction,
79 unsigned* volume_count, double staveLength,
80 std::array<std::array<double, 3>, 4> staveTriangles,
81 std::pair<double, double>& absAllowedYRange,
82 double x_mid, double y_mid, double z_stave_shift_forward);
83 void addDetectorVolume(
84 TGeoVolume* motherVolume, std::string volumeName, int color, unsigned* volume_count,
85 double x_mid, double y_mid, double z_mid,
86 double x_half_length, double y_half_length, double z_half_length);
87
88 void add2x1GlueVolume(
89 TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
90 unsigned* volume_count, double x_mid, double y_mid, double z_mid,
91 std::string element_glued_to);
92
93 void add2x1CopperVolume(
94 TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
95 unsigned* volume_count, double x_mid, double y_mid, double z_mid);
96
97 void add2x1KaptonVolume(
98 TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
99 unsigned* volume_count, double x_mid, double y_mid, double z_mid);
100
101 void addSingleSensorVolume(
102 TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
103 unsigned* volume_count, double active_x_mid, double y_mid, double z_mid, bool isLeft);
104};
105
106#endif // FT3MODULE_H
Definition of various constants for tiling the modules of sensors.
std::pair< std::pair< double, double >, std::pair< double, double > > PositionRangeType
Definition FT3Module.h:29
std::vector< PositionType > PositionTypes
Definition FT3Module.h:26
std::pair< double, unsigned > PositionType
Definition FT3Module.h:25
std::pair< PositionTypes, PositionTypes > PosNegPositionTypes
Definition FT3Module.h:27
void createModule_staveGeo(double mZ, int layerNumber, int direction, double Rin, double Rout, double z_offset_local, const Constants::StaveConfig &staveConfig, TGeoVolume *motherVolume)
static TGeoMedium * carbonFiberMed
Definition FT3Module.h:48
static TGeoMedium * epoxyMed
Definition FT3Module.h:44
static TGeoMaterial * epoxyMat
Definition FT3Module.h:43
static TGeoMaterial * carbonFiberMat
Definition FT3Module.h:47
static TGeoMedium * siliconMed
Definition FT3Module.h:38
static void createModule(double mZ, int layerNumber, int direction, double Rin, double Rout, double overlap, const std::string &face, const std::string &layout_type, TGeoVolume *motherVolume)
const char * mDetName
Definition FT3Module.h:50
static TGeoMedium * copperMed
Definition FT3Module.h:40
static TGeoMaterial * kaptonMat
Definition FT3Module.h:41
static TGeoMaterial * copperMat
Definition FT3Module.h:39
static TGeoMaterial * siliconMat
Definition FT3Module.h:37
static TGeoMedium * AluminumMed
Definition FT3Module.h:46
static TGeoMedium * kaptonMed
Definition FT3Module.h:42
static TGeoMaterial * AluminumMat
Definition FT3Module.h:45
static void initialize_materials()
Definition FT3Module.cxx:50
GLuint color
Definition glcorearb.h:1272
GLenum GLuint GLint GLenum face
Definition glcorearb.h:3184