Skip to content

Commit 5a81222

Browse files
committed
ITS3: double precision for geometry + z-shift
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent d6d89fa commit 5a81222

File tree

4 files changed

+51
-51
lines changed

4 files changed

+51
-51
lines changed

Detectors/Upgrades/ITS3/base/include/ITS3Base/SegmentationSuperAlpide.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class SegmentationSuperAlpide
7070
static constexpr float mSensorLayerThickness{constants::thickness};
7171
static constexpr float mSensorLayerThicknessEff{constants::effThickness};
7272
static constexpr float mSensorLayerThicknessCorr{constants::corrThickness};
73-
static constexpr std::array<float, constants::nLayers> mRadii{constants::radii};
73+
static constexpr std::array<float, constants::nLayers> mRadii{constants::radiiF};
7474

7575
/// Transformation from the curved surface to a flat surface
7676
/// \param xCurved Detector local curved coordinate x in cm with respect to

Detectors/Upgrades/ITS3/base/include/ITS3Base/SpecsV2.h

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -23,109 +23,110 @@
2323

2424
namespace o2::its3::constants
2525
{
26-
constexpr float cm{1e+2}; // This is the default unit of TGeo so we use this as scale
27-
constexpr float mu{1e-6 * cm};
28-
constexpr float mm{1e-3 * cm};
26+
constexpr double cm{1e+2}; // This is the default unit of TGeo so we use this as scale
27+
constexpr double mu{1e-6 * cm};
28+
constexpr double mm{1e-3 * cm};
2929
namespace pixelarray
3030
{
31-
constexpr float width{9.197 * mm};
32-
constexpr float length{3.571 * mm};
31+
constexpr double width{9.197 * mm};
32+
constexpr double length{3.571 * mm};
3333
constexpr int nCols{156};
3434
constexpr int nRows{442};
3535
constexpr int nPixels{nRows * nCols};
3636
constexpr EColor color{kGreen};
37-
constexpr float area{width * length};
37+
constexpr double area{width * length};
3838
} // namespace pixelarray
3939
namespace tile
4040
{
4141
namespace biasing
4242
{
43-
constexpr float width{0.06 * mm};
44-
constexpr float length{3.571 * mm};
43+
constexpr double width{0.06 * mm};
44+
constexpr double length{3.571 * mm};
4545
constexpr EColor color{kYellow};
4646
static_assert(length == pixelarray::length);
4747
} // namespace biasing
4848
namespace powerswitches
4949
{
50-
constexpr float width{9.257 * mm};
51-
constexpr float length{0.02 * mm};
52-
constexpr float z{pixelarray::width};
50+
constexpr double width{9.257 * mm};
51+
constexpr double length{0.02 * mm};
52+
constexpr double z{pixelarray::width};
5353
constexpr EColor color{kBlue};
5454
} // namespace powerswitches
5555
namespace readout
5656
{
57-
constexpr float width{0.525 * mm};
58-
constexpr float length{3.591 * mm};
57+
constexpr double width{0.525 * mm};
58+
constexpr double length{3.591 * mm};
5959
constexpr EColor color{kMagenta};
6060
static_assert(length == (biasing::length + powerswitches::length));
6161
} // namespace readout
62-
constexpr float length{readout::length};
63-
constexpr float width{powerswitches::width + readout::width};
62+
constexpr double length{readout::length};
63+
constexpr double width{powerswitches::width + readout::width};
6464
} // namespace tile
6565
namespace rsu
6666
{
6767
namespace databackbone
6868
{
69-
constexpr float width{9.782 * mm};
70-
constexpr float length{0.06 * mm};
69+
constexpr double width{9.782 * mm};
70+
constexpr double length{0.06 * mm};
7171
constexpr EColor color{kRed};
7272
} // namespace databackbone
73-
constexpr float width{19.564 * mm};
74-
constexpr float length{21.666 * mm};
73+
constexpr double width{19.564 * mm};
74+
constexpr double length{21.666 * mm};
7575
constexpr unsigned int nTiles{12};
7676
} // namespace rsu
7777
namespace segment
7878
{
79-
constexpr float width{rsu::width};
79+
constexpr double width{rsu::width};
8080
namespace lec
8181
{
82-
constexpr float width{segment::width};
83-
constexpr float length{4.5 * mm};
82+
constexpr double width{segment::width};
83+
constexpr double length{4.5 * mm};
8484
constexpr EColor color{kCyan};
8585
} // namespace lec
8686
namespace rec
8787
{
88-
constexpr float width{segment::width};
89-
constexpr float length{1.5 * mm};
88+
constexpr double width{segment::width};
89+
constexpr double length{1.5 * mm};
9090
constexpr EColor color{kCyan};
9191
} // namespace rec
9292
constexpr unsigned int nRSUs{12};
9393
constexpr unsigned int nTilesPerSegment{nRSUs * rsu::nTiles};
94-
constexpr float length{nRSUs * rsu::length + lec::length + rec::length};
95-
constexpr float lengthSensitive{nRSUs * rsu::length};
94+
constexpr double length{nRSUs * rsu::length + lec::length + rec::length};
95+
constexpr double lengthSensitive{nRSUs * rsu::length};
9696
} // namespace segment
9797
namespace carbonfoam
9898
{
9999
// TODO: Waiting for the further information from WP5(Corrado)
100-
constexpr float longeronsWidth{2.0 * mm}; // what is the height of the longerons?
101-
constexpr float longeronsLength{263 * mm}; // from blueprint
102-
constexpr float HringLength{6.0 * mm}; // from blueprint
103-
constexpr float edgeBetwChipAndFoam{1.0 * mm}; // from blueprint but not used cause forms are already overlapping
104-
constexpr float gapBetwHringsLongerons{0.05 * mm}; // from blueprint
105-
constexpr std::array<int, 3> nHoles{11, 11, 11}; // how many holes for each layer?
106-
constexpr std::array<float, 3> radiusHoles{1.0 * mm, 1.0 * mm, 2.0 * mm}; // what is the radius of the holes for each layer?
100+
constexpr double longeronsWidth{2.0 * mm}; // what is the height of the longerons?
101+
constexpr double longeronsLength{263 * mm}; // from blueprint
102+
constexpr double HringLength{6.0 * mm}; // from blueprint
103+
constexpr double edgeBetwChipAndFoam{1.0 * mm}; // from blueprint but not used cause forms are already overlapping
104+
constexpr double gapBetwHringsLongerons{0.05 * mm}; // from blueprint
105+
constexpr std::array<int, 3> nHoles{11, 11, 11}; // how many holes for each layer?
106+
constexpr std::array<double, 3> radiusHoles{1.0 * mm, 1.0 * mm, 2.0 * mm}; // what is the radius of the holes for each layer?
107107
constexpr EColor color{kGray};
108108
} // namespace carbonfoam
109109
namespace metalstack
110110
{
111-
constexpr float thickness{5 * mu}; // physical thickness of the copper metal stack
112-
constexpr float length{segment::length};
113-
constexpr float width{segment::width};
111+
constexpr double thickness{5 * mu}; // physical thickness of the copper metal stack
112+
constexpr double length{segment::length};
113+
constexpr double width{segment::width};
114114
constexpr EColor color{kBlack};
115115
} // namespace metalstack
116116
constexpr unsigned int nLayers{3};
117117
constexpr unsigned int nTotLayers{7};
118118
constexpr unsigned int nSensorsIB{2 * nLayers};
119-
constexpr float equatorialGap{1 * mm};
119+
constexpr double equatorialGap{1 * mm};
120120
constexpr std::array<unsigned int, nLayers> nSegments{3, 4, 5};
121-
constexpr float epitaxialThickness{10 * mu}; // eptixial layer (charge collection)
122-
constexpr float psubThickness{40 * mu}; // silicon substrate
123-
constexpr float thickness{epitaxialThickness + psubThickness}; // physical thickness of chip
124-
constexpr float effThickness{epitaxialThickness / 2.0 + psubThickness}; // effective physical thickness
125-
constexpr float corrThickness{effThickness - thickness / 2.0}; // correction to get into the epitxial layer
126-
constexpr std::array<float, nLayers> radii{19.0006 * mm, 25.228 * mm, 31.4554 * mm}; // middle radius e.g. inner radius+thickness/2.
127-
constexpr std::array<float, nLayers> radiiInner{radii[0] - thickness / 2.0, radii[1] - thickness / 2.0, radii[2] - thickness / 2.0}; // inner radius
128-
constexpr std::array<float, nLayers> radiiOuter{radii[0] + thickness / 2.0, radii[1] + thickness / 2.0, radii[2] + thickness / 2.0}; // inner radius
121+
constexpr double epitaxialThickness{10 * mu}; // eptixial layer (charge collection)
122+
constexpr double psubThickness{40 * mu}; // silicon substrate
123+
constexpr double thickness{epitaxialThickness + psubThickness}; // physical thickness of chip
124+
constexpr double effThickness{epitaxialThickness / 2.0 + psubThickness}; // effective physical thickness
125+
constexpr double corrThickness{effThickness - thickness / 2.0}; // correction to get into the epitxial layer
126+
constexpr std::array<double, nLayers> radii{19.0006 * mm, 25.228 * mm, 31.4554 * mm}; // middle radius e.g. inner radius+thickness/2.
127+
constexpr std::array<float, nLayers> radiiF{19.0006 * mm, 25.228 * mm, 31.4554 * mm}; // middle radius e.g. inner radius+thickness/2.
128+
constexpr std::array<double, nLayers> radiiInner{radii[0] - thickness / 2.0, radii[1] - thickness / 2.0, radii[2] - thickness / 2.0}; // inner radius
129+
constexpr std::array<double, nLayers> radiiOuter{radii[0] + thickness / 2.0, radii[1] + thickness / 2.0, radii[2] + thickness / 2.0}; // inner radius
129130
namespace detID
130131
{
131132
constexpr unsigned int mDetIDs{2 * 12 * 12 * 12}; //< 2 Hemispheres * (3,4,5=12 segments in a layer) * 12 RSUs in a segment * 12 Tiles in a RSU

Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ITS3Layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ITS3Layer
9696

9797
uint8_t mNLayer{0}; // Layer number
9898
double mR{0}; // Middle Radius
99-
double mRmin{}; // Minimum Radius
99+
double mRmin{0}; // Minimum Radius
100100
double mRmax{0}; // Maximum Radius
101101

102102
// Individual pieces

Detectors/Upgrades/ITS3/simulation/src/ITS3Layer.cxx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void ITS3Layer::createLayer(TGeoVolume* motherVolume)
7373
return;
7474
}
7575
// Add it to motherVolume
76-
auto* trans = new TGeoTranslation(0, 0, -constants::segment::lengthSensitive / 2.);
76+
auto* trans = new TGeoTranslation(0, 0, -constants::segment::lengthSensitive / 2. - constants::rsu::databackbone::length / 2. + constants::tile::powerswitches::length / 2.);
7777
motherVolume->AddNode(mLayer, 0, trans);
7878
}
7979

@@ -293,7 +293,7 @@ void ITS3Layer::createCarbonForm()
293293
mCarbonForm->VisibleDaughters();
294294
double dRadius = -1;
295295
if (mNLayer < 2) {
296-
dRadius = constants::radii[mNLayer + 1] - constants::radii[mNLayer] - constants::thickness;
296+
dRadius = constants::radii[mNLayer + 1] - constants::radii[mNLayer] - constants::thickness - constants::metalstack::thickness;
297297
} else {
298298
dRadius = 0.7; // TODO: lack of carbon foam radius for layer 2, use 0.7mm as a temporary value
299299
}
@@ -409,8 +409,7 @@ void ITS3Layer::buildPartial(TGeoVolume* motherVolume, TGeoMatrix* mat, BuildLev
409409
case BuildLevel::kLayer:
410410
[[fallthrough]];
411411
default:
412-
createLayerImpl();
413-
motherVolume->AddNode(mLayer, 0, mat);
412+
createLayer(motherVolume);
414413
}
415414
LOGP(info, "Partially built ITS3-{}-{}", mNLayer, getName(level));
416415
}

0 commit comments

Comments
 (0)