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"
17#include <TGeoManager.h>
18
19#include <Rtypes.h>
20
21#include <string>
22#include <utility>
23
24namespace o2
25{
26namespace trk
27{
30 X2X0
31};
32
34{
35 public:
37 TRKCylindricalLayer(int layerNumber, std::string layerName, float rInn, float length, float thickOrX2X0, MatBudgetParamMode mode);
38 virtual ~TRKCylindricalLayer() = default;
39
40 auto getInnerRadius() const { return mInnerRadius; }
41 auto getOuterRadius() const { return mOuterRadius; }
42 auto getZ() const { return mLength; }
43 auto getx2X0() const { return mX2X0; }
44 auto getChipThickness() const { return mChipThickness; }
45 auto getNumber() const { return mLayerNumber; }
46 auto getName() const { return mLayerName; }
47
48 virtual TGeoVolume* createSensor();
49 virtual TGeoVolume* createMetalStack();
50 virtual void createLayer(TGeoVolume* motherVolume);
51
52 protected:
53 // User defined parameters for the layer, to be set in the constructor
55 std::string mLayerName;
58 float mLength;
59 float mX2X0;
61
62 // Fixed parameters for the layer, to be set based on the specifications of the chip and module
64
65 static constexpr float Si_X0 = 9.5f;
66
68};
69
71{
72 public:
73 TRKSegmentedLayer() = default;
74 TRKSegmentedLayer(int layerNumber, std::string layerName, float rInn, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
75 ~TRKSegmentedLayer() override = default;
76
77 TGeoVolume* createSensor() override;
78 TGeoVolume* createDeadzone();
79 TGeoVolume* createMetalStack() override;
80 TGeoVolume* createChip();
81 TGeoVolume* createModule();
82 virtual TGeoVolume* createStave() = 0;
83 void createLayer(TGeoVolume* motherVolume) override = 0;
84
85 protected:
89 bool mIsFlipped = false;
90
91 // Fixed parameters for the layer, to be set based on the specifications of the chip and module
94 static constexpr double sDeadzoneWidth = constants::moduleMLOT::chip::passiveEdgeReadOut;
96 static constexpr double sModuleWidth = constants::moduleMLOT::width;
97 static constexpr int sHalfNumberOfChips = 4;
98
99 // TGeo objects outside logical volumes can cause errors
100 static constexpr float sLogicalVolumeThickness = 1.3;
101
102 // For the segmented layers, because of tilting and staggering the bounding radii can be different
103 // from the inner radius and inner radius + thickness.
104 // This function calculates the bounding radii based on the geometry of the stave and the tilt angle,
105 // to ensure that the layer volume is large enough to contain all the staves without overlaps.
106 virtual std::pair<float, float> getBoundingRadii(double staveWidth) const;
107
109};
110
112{
113 public:
114 TRKMLLayer() = default;
115 TRKMLLayer(int layerNumber, std::string layerName, float rInn, float staggerOffset, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
116 ~TRKMLLayer() override = default;
117
118 TGeoVolume* createStave() override;
119 void createLayer(TGeoVolume* motherVolume) override;
120
121 private:
122 float mStaggerOffset;
123
124 static constexpr double sStaveWidth = constants::ML::width;
125 static constexpr int sFlippedLayerNumber = 3;
126
127 // Override to account for the staggering offset present in specific ML layers
128 std::pair<float, float> getBoundingRadii(double staveWidth) const override;
129
130 ClassDefOverride(TRKMLLayer, 0);
131};
132
134{
135 public:
136 TRKOTLayer() = default;
137 TRKOTLayer(int layerNumber, std::string layerName, float rInn, float tiltAngle, int numberOfStaves, int numberOfModules, float thickOrX2X0, MatBudgetParamMode mode);
138 ~TRKOTLayer() override = default;
139
140 TGeoVolume* createStave() override;
141 TGeoVolume* createHalfStave();
142 void createLayer(TGeoVolume* motherVolume) override;
143
144 private:
145 static constexpr double sHalfStaveWidth = constants::OT::halfstave::width;
146 static constexpr double sInStaveOverlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true) overlap
147 static constexpr double sStaveWidth = constants::OT::width - sInStaveOverlap;
148
149 // Override to account for the staggering offset present in OT layers
150 std::pair<float, float> getBoundingRadii(double staveWidth) const override;
151
152 ClassDefOverride(TRKOTLayer, 0);
153};
154
155} // namespace trk
156} // namespace o2
157#endif // ALICEO2_TRK_LAYER_H
specs of the ALICE3 TRK
ClassDef(TRKCylindricalLayer, 0)
static constexpr float Si_X0
Definition TRKLayer.h:65
virtual void createLayer(TGeoVolume *motherVolume)
Definition TRKLayer.cxx:70
auto getChipThickness() const
Definition TRKLayer.h:44
virtual TGeoVolume * createSensor()
Definition TRKLayer.cxx:48
auto getInnerRadius() const
Definition TRKLayer.h:40
virtual ~TRKCylindricalLayer()=default
virtual TGeoVolume * createMetalStack()
Definition TRKLayer.cxx:59
static constexpr double sSensorThickness
Definition TRKLayer.h:63
auto getOuterRadius() const
Definition TRKLayer.h:41
void createLayer(TGeoVolume *motherVolume) override
Definition TRKLayer.cxx:276
TGeoVolume * createStave() override
Definition TRKLayer.cxx:256
~TRKMLLayer() override=default
TGeoVolume * createHalfStave()
Definition TRKLayer.cxx:387
void createLayer(TGeoVolume *motherVolume) override
Definition TRKLayer.cxx:427
TGeoVolume * createStave() override
Definition TRKLayer.cxx:407
~TRKOTLayer() override=default
static constexpr double sChipWidth
Definition TRKLayer.h:92
virtual TGeoVolume * createStave()=0
TGeoVolume * createMetalStack() override
Definition TRKLayer.cxx:119
void createLayer(TGeoVolume *motherVolume) override=0
static constexpr float sLogicalVolumeThickness
Definition TRKLayer.h:100
static constexpr int sHalfNumberOfChips
Definition TRKLayer.h:97
TGeoVolume * createSensor() override
Definition TRKLayer.cxx:97
ClassDefOverride(TRKSegmentedLayer, 0)
TGeoVolume * createModule()
Definition TRKLayer.cxx:169
static constexpr double sChipLength
Definition TRKLayer.h:93
TGeoVolume * createChip()
Definition TRKLayer.cxx:130
static constexpr double sDeadzoneWidth
Definition TRKLayer.h:94
~TRKSegmentedLayer() override=default
static constexpr double sModuleLength
Definition TRKLayer.h:95
static constexpr double sModuleWidth
Definition TRKLayer.h:96
TGeoVolume * createDeadzone()
Definition TRKLayer.cxx:108
virtual std::pair< float, float > getBoundingRadii(double staveWidth) const
Definition TRKLayer.cxx:201
GLenum mode
Definition glcorearb.h:266
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790
constexpr double width
Definition Specs.h:103
constexpr double width
Definition Specs.h:120
constexpr double outerEdgeLongSide
Definition Specs.h:92
constexpr double length
Definition Specs.h:96
constexpr double width
Definition Specs.h:95
MatBudgetParamMode
Definition TRKLayer.h:28
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...