Project
Loading...
Searching...
No Matches
TRKLayer.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
12#ifndef ALICEO2_TRK_LAYER_H
13#define ALICEO2_TRK_LAYER_H
14
15#include "TRKBase/Specs.h"
16#include <TGeoManager.h>
17
18#include <Rtypes.h>
19
20#include <string>
21#include <utility>
22
23namespace o2
24{
25namespace trk
26{
29 X2X0
30};
31
33{
34 public:
36 TRKCylindricalLayer(int layerNumber, std::string layerName, float rInn, float length, float thickOrX2X0, MatBudgetParamMode mode);
37 virtual ~TRKCylindricalLayer() = default;
38
39 auto getInnerRadius() const { return mInnerRadius; }
40 auto getOuterRadius() const { return mOuterRadius; }
41 auto getZ() const { return mLength; }
42 auto getx2X0() const { return mX2X0; }
43 auto getChipThickness() const { return mChipThickness; }
44 auto getNumber() const { return mLayerNumber; }
45 auto getName() const { return mLayerName; }
46
47 virtual TGeoVolume* createSensor();
48 virtual TGeoVolume* createMetalStack();
49 virtual void createLayer(TGeoVolume* motherVolume);
50
51 protected:
52 // User defined parameters for the layer, to be set in the constructor
54 std::string mLayerName;
57 float mLength;
58 float mX2X0;
60
61 // Fixed parameters for the layer, to be set based on the specifications of the chip and module
63
64 static constexpr float Si_X0 = 9.5f;
65
67};
68
70{
71 public:
72 TRKSegmentedLayer() = default;
73 TRKSegmentedLayer(int layerNumber, std::string layerName, float rInn, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
74 ~TRKSegmentedLayer() override = default;
75
76 TGeoVolume* createSensor() override;
77 TGeoVolume* createDeadzone();
78 TGeoVolume* createMetalStack() override;
79 virtual TGeoVolume* createChip();
80 virtual TGeoVolume* createModule();
81 virtual TGeoVolume* createStave() = 0;
82 void createLayer(TGeoVolume* motherVolume) override = 0;
83
84 protected:
88 bool mIsFlipped = false;
89
90 // Fixed parameters for the layer, to be set based on the specifications of the chip and module
93 static constexpr double sDeadzoneWidth = constants::moduleMLOT::chip::passiveEdgeReadOut;
95 static constexpr double sModuleWidth = constants::moduleMLOT::width;
96 static constexpr int sHalfNumberOfChips = 4;
97
98 // TGeo objects outside logical volumes can cause errors
99 static constexpr float sLogicalVolumeThickness = 1.3;
100
101 // For the segmented layers, because of tilting and staggering the bounding radii can be different
102 // from the inner radius and inner radius + thickness.
103 // This function calculates the bounding radii based on the geometry of the stave and the tilt angle,
104 // to ensure that the layer volume is large enough to contain all the staves without overlaps.
105 virtual std::pair<float, float> getBoundingRadii(double staveWidth) const;
106
108};
109
111{
112 public:
113 TRKMLLayer() = default;
114 TRKMLLayer(int layerNumber, std::string layerName, float rInn, float staggerOffset, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode, int rInnRow = 0, float phiOffset = 0.f);
115 ~TRKMLLayer() override = default;
116
117 TGeoVolume* createStave() override;
118 void createLayer(TGeoVolume* motherVolume) override;
119
120 private:
121 TGeoVolume* createEndOfStaveCard(); // A-side (+z) end-of-stave card, in front of the conn disk
122
123 float mStaggerOffset;
124 int mRInnRow = 0; // staggered layers: staves with iStave % 2 == mRInnRow sit at rInn, the others are shifted by the stagger offset
125 float mPhiOffset = 0.f; // deg, rotation of all the staves of the layer about the beam axis (counterclockwise, as phi)
126
127 static constexpr double sStaveWidth = constants::ML::width;
128 static constexpr int sFlippedLayerNumber = 3;
129
130 // Override to account for the staggering offset present in specific ML layers
131 std::pair<float, float> getBoundingRadii(double staveWidth) const override;
132
133 ClassDefOverride(TRKMLLayer, 0);
134};
135
137{
138 public:
139 TRKOTLayer() = default;
140 TRKOTLayer(int layerNumber, std::string layerName, float rInn, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
141 ~TRKOTLayer() override = default;
142
143 TGeoVolume* createStave() override;
144 TGeoVolume* createHalfStave();
145 void createLayer(TGeoVolume* motherVolume) override;
146
147 protected:
148 static constexpr float sGapBetweenOuterTrackerBarrelHalves = 0.8; // cm, gap between the two halves of the OT barrel
149
150 private:
151 static constexpr double sHalfStaveWidth = constants::OT::halfstave::width;
152 static constexpr double sInStaveOverlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true) overlap
153 static constexpr double sStaveWidth = constants::OT::width - sInStaveOverlap;
154
155 // Override to account for the staggering offset present in OT layers
156 std::pair<float, float> getBoundingRadii(double staveWidth) const override;
157
158 ClassDefOverride(TRKOTLayer, 0);
159};
160
161// Simplified-realistic OT barrel: modules built from their real parts (FPC, cold plate,
162// connector, capacitors, brackets), two-row staves overlapping in phi, four quarter
163// barrels. Dimensions in constants::OT.
165{
166 public:
168 TRKOTLayerRealistic(int layerNumber, std::string layerName, float rInn, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
169 ~TRKOTLayerRealistic() override = default;
170
171 TGeoVolume* createChip() override;
172 TGeoVolume* createModule() override;
173 TGeoVolume* createStave() override;
174 TGeoVolume* createHalfStave();
175 void createLayer(TGeoVolume* motherVolume) override;
176
177 private:
178 TGeoVolume* createFPC();
179 TGeoVolume* createColdPlate();
180 TGeoVolume* createCoolingPipe();
181 TGeoVolume* createEndOfStaveCard();
182 TGeoVolume* createSupportRing(double rMin, double rMax, double phi1, double phi2, int id);
183 void addConnector(TGeoVolume* moduleVol, double rMid);
184 void addCapacitors(TGeoVolume* moduleVol, double rMid);
185 void addBrackets(TGeoVolume* moduleVol, double rMid);
186
187 double getRowHalfLength() const; // z half-length of one module row (= one eta half-barrel)
188 double getPipeTrim() const; // z removed from the mid-rapidity pipe end to clear the support ring
189
190 std::pair<float, float> getBoundingRadii(double staveWidth) const override;
191
192 ClassDefOverride(TRKOTLayerRealistic, 0);
193};
194
195} // namespace trk
196} // namespace o2
197#endif // ALICEO2_TRK_LAYER_H
specs of the ALICE3 TRK
ClassDef(TRKCylindricalLayer, 0)
static constexpr float Si_X0
Definition TRKLayer.h:64
virtual void createLayer(TGeoVolume *motherVolume)
Definition TRKLayer.cxx:73
auto getChipThickness() const
Definition TRKLayer.h:43
virtual TGeoVolume * createSensor()
Definition TRKLayer.cxx:51
auto getInnerRadius() const
Definition TRKLayer.h:39
virtual ~TRKCylindricalLayer()=default
virtual TGeoVolume * createMetalStack()
Definition TRKLayer.cxx:62
static constexpr double sSensorThickness
Definition TRKLayer.h:62
auto getOuterRadius() const
Definition TRKLayer.h:40
void createLayer(TGeoVolume *motherVolume) override
Definition TRKLayer.cxx:321
TGeoVolume * createStave() override
Definition TRKLayer.cxx:263
~TRKMLLayer() override=default
TGeoVolume * createModule() override
Definition TRKLayer.cxx:688
TGeoVolume * createChip() override
Definition TRKLayer.cxx:524
void createLayer(TGeoVolume *motherVolume) override
Definition TRKLayer.cxx:782
TGeoVolume * createHalfStave()
Definition TRKLayer.cxx:730
TGeoVolume * createStave() override
Definition TRKLayer.cxx:750
~TRKOTLayerRealistic() override=default
TGeoVolume * createHalfStave()
Definition TRKLayer.cxx:435
void createLayer(TGeoVolume *motherVolume) override
Definition TRKLayer.cxx:471
static constexpr float sGapBetweenOuterTrackerBarrelHalves
Definition TRKLayer.h:148
TGeoVolume * createStave() override
Definition TRKLayer.cxx:455
~TRKOTLayer() override=default
static constexpr double sChipWidth
Definition TRKLayer.h:91
virtual TGeoVolume * createStave()=0
TGeoVolume * createMetalStack() override
Definition TRKLayer.cxx:122
void createLayer(TGeoVolume *motherVolume) override=0
static constexpr float sLogicalVolumeThickness
Definition TRKLayer.h:99
static constexpr int sHalfNumberOfChips
Definition TRKLayer.h:96
TGeoVolume * createSensor() override
Definition TRKLayer.cxx:100
ClassDefOverride(TRKSegmentedLayer, 0)
virtual TGeoVolume * createModule()
Definition TRKLayer.cxx:161
static constexpr double sChipLength
Definition TRKLayer.h:92
virtual TGeoVolume * createChip()
Definition TRKLayer.cxx:133
static constexpr double sDeadzoneWidth
Definition TRKLayer.h:93
~TRKSegmentedLayer() override=default
static constexpr double sModuleLength
Definition TRKLayer.h:94
static constexpr double sModuleWidth
Definition TRKLayer.h:95
TGeoVolume * createDeadzone()
Definition TRKLayer.cxx:111
virtual std::pair< float, float > getBoundingRadii(double staveWidth) const
Definition TRKLayer.cxx:193
GLenum mode
Definition glcorearb.h:266
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790
constexpr double width
Definition Specs.h:106
constexpr double width
Definition Specs.h:134
constexpr double outerEdgeLongSide
Definition Specs.h:94
constexpr double length
Definition Specs.h:98
constexpr double width
Definition Specs.h:97
MatBudgetParamMode
Definition TRKLayer.h:27
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...