Project
Loading...
Searching...
No Matches
FT3ModuleConstants.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 FT3MODULECONSTANTS_H
16#define FT3MODULECONSTANTS_H
17
18#include <vector>
19#include <map>
20#include <TColor.h>
21#include <TMath.h>
22
24{
25/* CURRENT STATUS:
26 * 25x32mm sensors, 2mm inactive on one side
27 * Most granular layout is 2x1 sensors, where the one on the right has the inactive region
28 * on the right, and the one on the left has the inactive region on the left.
29 * When stacking 2x1 modules, there is a 0.2mm gap between them. By default, we assume this
30 * gap to be ABOVE the most recently placed module.
31 *
32 * |<- 25mm ->|<- 25mm ->|
33 * _______________________
34 * ----------------------- 0.2mm gap above
35 * | | | | |
36 * | | | | |
37 * | | | | |
38 * | | | | | 32mm sensor height
39 * | | | | |
40 * | | | | |
41 * ------------------------
42 *
43 */
44// First set all layout constants for the rest of the function
45const double single_sensor_width = 2.5;
46const double single_sensor_height = 2.9;
47const double inactive_width = 0.2;
48const double sensor2x1_gap = 0.02;
49const double stackGap = sensor2x1_gap; // gap between 2xN module stacks
50
53
57const std::vector<unsigned> kSensorsPerStack = {4, 2, 1};
58inline const double getStackHeight(unsigned nSensorsPerStack)
59{
60 return nSensorsPerStack * sensor2x1_height +
61 (nSensorsPerStack - 1) * sensor2x1_gap;
62}
63
64// small helper function to get 1-indexed stave ID, counting from the middle outwards,
65// with negative IDs on the left and positive IDs on the right
66inline const int staveIdxToID(int staveIdx, unsigned nStavesPerDisc)
67{
68 unsigned nStavesOneSide = nStavesPerDisc / 2;
69 bool isRight = staveIdx >= nStavesOneSide;
70 return staveIdx - nStavesOneSide + isRight;
71}
72
73// material properties
74const double siliconThickness = 0.01;
75const double copperThickness = 0.006;
76const double kaptonThickness = 0.03;
77const double epoxyThickness = 0.0012;
78
79const double effectiveCarbonThickness_Stave = 0.02; // foam + shell
80const double staveOpeningAngle = 60 * TMath::DegToRad();
81const double sinTheta = TMath::Sin(staveOpeningAngle / 2);
82const double alpha = TMath::Pi() / 2 - staveOpeningAngle / 2; // bottom angles
83const double staveSensorGap = 0.1; // 2mm padding on each side when sensor is glued
84const double staveTriangleHeight = (sensor2x1_width + 2 * staveSensorGap) / 2.0 / tan(staveOpeningAngle / 2.0);
85/*
86 * Now describe the offset of every other stave in z to avoid overlaps
87 * ______ ______
88 * \ /______\ / | <-- z_offsetStave
89 * \ / \ / \ /
90 * \/ \ / \/
91 * \/
92 */
93// If midpoint spacing becomes non constant, this becomes a function
94// TODO: add some tolerance to avoid overlaps?
95inline const double z_offsetStave(double x_midpoint_spacing)
96{
97 return staveTriangleHeight *
98 (2 - x_midpoint_spacing / (sensor2x1_width / 2 + staveSensorGap));
99}
100
101const int SiColor = kGreen;
102const int SiInactiveColor = kRed;
103const int glueColor = kBlue;
104const int CuColor = kOrange;
105const int kaptonColor = kYellow;
106const int carbonFiberColor = kGray + 1;
107
108// Struct for stave position configuration (varies between IT/OT)
110 /*
111 * Constants for staves are written for both positive
112 * and negative x even though they are just mirrored now,
113 * because there might be design changes in the future
114 * that require a non-mirrored layout, making it easier to
115 * change here if so required, even though it looks uglier now.
116 *
117 * The second element in the mapping pair is whether the stave
118 * with a certain ID should be mirrored around the x-axis.
119 */
120 // map from Stave ID (1-indexed from other documents) to midpoint
121 // Do NOT add any zero midpoints, this is taken off separately
122 const std::map<int, std::pair<double, bool>>& staveID_to_y_midpoint;
123 // lengths of staves, their midpoint, and their face
124 const std::vector<double>& y_lengths;
125 const std::vector<double>& x_midpoints;
127 // which side of the disc do we place the stave?
128 // kSegmentedStave: staggering staves in z (see z_offsetStave)
129 // accessed via stave index, NOT stave ID
130 const std::vector<bool>& staveOnFront;
131};
132
133namespace OT_StavePositions
134{
135const std::map<int, std::pair<double, bool>> staveID_to_y_midpoint = {
136 {-2, {39.0, true}},
137 {-1, {41.4, true}},
138 {1, {41.4, true}},
139 {2, {39.0, true}}};
140const std::vector<double> y_lengths = {
141 52.8, 66.0, 79.2, 92.4, 99.0, 105.6, 118.8, 118.8,
142 128.7, 132.0, 132.0, 138.6, 138.6, 56.1, 52.8,
143 52.8, 56.1, 138.6, 138.6, 132.0, 132.0, 128.7,
144 118.8, 118.8, 105.6, 99.0, 92.4, 79.2, 66.0, 52.8};
145const std::vector<double> x_midpoints = {
146 -65.25, -60.75, -56.25, -51.75, -47.25, -42.75, -38.25, // L
147 -33.75, -29.25, -24.75, -20.25, -15.75, -11.25, -6.75, -2.25, // L
148 2.25, 6.75, 11.25, 15.75, 20.25, 24.75, 29.25, 33.75, // R
149 38.25, 42.75, 47.25, 51.75, 56.25, 60.75, 65.25 // R
150};
151const double x_midpoint_spacing = 4.5; // assume constant for now
152const std::vector<bool> staveOnFront =
153 {
154 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, // L
155 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 // R
156};
157} // namespace OT_StavePositions
158
159namespace ML_StavePositions
160{
161// Use prelim numbers for now, these will change! TODO
162const std::map<int, std::pair<double, bool>> staveID_to_y_midpoint = {
163 {-3, {19.1, true}},
164 {-2, {21.8, true}},
165 {-1, {22.5, true}},
166 {1, {22.5, true}},
167 {2, {21.8, true}},
168 {3, {19.1, true}}};
169const std::vector<double> y_lengths = {
170 30.5, 44.5, 53.6, 60.0, 64.6, 29.5, 25.8, 25.0,
171 25.0, 25.8, 29.5, 64.6, 60.0, 53.6, 44.5, 30.5};
172const std::vector<double> x_midpoints = {
173 -33.75, -29.25, -24.75, -20.25, -15.75, -11.25, -6.75, -2.25, // L
174 2.25, 6.75, 11.25, 15.75, 20.25, 24.75, 29.25, 33.75 // R
175};
176const double x_midpoint_spacing = 4.5;
177const std::vector<bool> staveOnFront =
178 {
179 1, 0, 1, 0, 1, 0, 1, 0, // L
180 1, 0, 1, 0, 1, 0, 1, 0 // R
181};
182} // namespace ML_StavePositions
183
184// Get stave configuration based on tracker type
203
204} // namespace o2::ft3::ModuleConstants
205
206#endif // FT3MODULECONSTANTS_H
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
const std::map< int, std::pair< double, bool > > staveID_to_y_midpoint
const std::map< int, std::pair< double, bool > > staveID_to_y_midpoint
const double effectiveCarbonThickness_Stave
const double z_offsetStave(double x_midpoint_spacing)
const int staveIdxToID(int staveIdx, unsigned nStavesPerDisc)
StaveConfig getStaveConfig(bool isInnerDisk)
const double getStackHeight(unsigned nSensorsPerStack)
const std::vector< unsigned > kSensorsPerStack
const std::vector< double > & x_midpoints
const std::vector< double > & y_lengths
const std::map< int, std::pair< double, bool > > & staveID_to_y_midpoint
const std::vector< bool > & staveOnFront