Project
Loading...
Searching...
No Matches
Geometry.cxx
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
15
16#include "TSystem.h"
17
18#include <fairlogger/Logger.h>
19
20#include "MFTBase/Geometry.h"
27
28using namespace o2::mft;
29
31
32const Double_t Geometry::sSensorInterspace = 0.01; //[cm] Offset between two adjacent chip on a ladder
33const Double_t Geometry::sSensorSideOffset = 0.04; // [cm] Side Offset between the ladder edge and the chip edge
34const Double_t Geometry::sSensorTopOffset = 0.04; // [cm] Top Offset between the ladder edge and the chip edge
35const Double_t Geometry::sLadderOffsetToEnd =
36 4.7; // [cm] Offset between the last Chip and the end of the ladder toward the DAQ connector
37const Double_t Geometry::sSensorThickness = 30.e-4; // 50 microns
38const Double_t Geometry::sChipThickness = 50.e-4; // 50 microns
39
40// Allmost everything you wanted to know about the FPC
41const Double_t Geometry::sLineWidth = 100.e-4; // line width, 100 microns
42const Double_t Geometry::sVarnishThickness = 20.e-4; // 20 micron FPC
43const Double_t Geometry::sAluThickness = 25.e-4; // 25 microns
44const Double_t Geometry::sKaptonThickness = 75.e-4; // 75 microns FPC
45const Double_t Geometry::sFlexThickness =
46 sKaptonThickness + 2 * sAluThickness + 2 * sVarnishThickness; // total thickness of a FPC
47const Double_t Geometry::sFlexHeight = 1.68;
48const Double_t Geometry::sClearance = 300.e-4; // 300 microns clearance without any conducting metal all around the FPC
49const Double_t Geometry::sRadiusHole1 = 0.125; // diameter of the FPC crew, closest to the FPC electric connector
50const Double_t Geometry::sRadiusHole2 = 0.1; // diameter of the FPC pin locator, after the previous hole crew
51const Double_t Geometry::sHoleShift1 = 2.8; // shift of the FPC crew
52const Double_t Geometry::sHoleShift2 = 3.6; // shift of the FPC pin locator
53const Double_t Geometry::sConnectorOffset = 0.4; // distance between the connector and the start of the FPC
54const Double_t Geometry::sCapacitorDx = 0.05;
55const Double_t Geometry::sCapacitorDy = 0.1;
56const Double_t Geometry::sCapacitorDz = 0.05;
57const Double_t Geometry::sConnectorLength = 0.1;
58const Double_t Geometry::sConnectorWidth = 0.025;
59const Double_t Geometry::sConnectorHeight = 0.1;
60const Double_t Geometry::sConnectorThickness = 0.01;
61const Double_t Geometry::sShiftDDGNDline =
62 0.4; // positionning of the line to separate AVDD/DVDD et AGND/DGND on the FPC
63const Double_t Geometry::sShiftline = 0.025; // positionning of the line along the FPC side
64const Double_t Geometry::sEpsilon = 0.0001; // to see the removed volumes produced by TGeoSubtraction
65
66const Double_t Geometry::sGlueThickness = 100.e-4; // 100 microns of SE4445 to be confirmed
67const Double_t Geometry::sGlueEdge = 300.e-4; // in case the glue is not spreaded on the whole surface of the sensor
68const Double_t Geometry::sGlueRohacellCarbonThickness = 0.0025 / 2; // glue betweeen the carbone plates and the rohacell
69const Double_t Geometry::sKaptonOnCarbonThickness = 0.0013 / 2; // thickness of the kapton layer on the heat exchanger carbone plate
70const Double_t Geometry::sKaptonGlueThickness = 0.0027 / 2; // thickness of the kapton layer glue
71
72const Int_t Geometry::sGrooves = 1; // 0 without grooves, 1 with grooves
73
74// need to do this, because of the different conventions between
75// ITS and MFT in placing the chips (rows, cols) in the geometry
76// at construction time
77//
78// xITS 0 +1 0 xMFT
79// yITS = 0 0 -1 * yMFT
80// zITS -1 0 0 zMFT
81//
82
83TGeoHMatrix Geometry::sTransMFT2ITS = [] {
84 TGeoHMatrix tmp;
85 Double_t rot[9] = {0., 1., 0., 0., 0., -1., -1., 0., 0.};
86 tmp.SetRotation(rot);
87 // equivalent to
88 // tmp.RotateY(90.);
89 // tmp.RotateZ(-90.);
90 return tmp;
91}();
92
93Geometry* Geometry::sInstance = nullptr;
94
96
97//____________________________________________________________________
99{
100
101 if (!sInstance) {
102 sInstance = new Geometry();
103 }
104 return sInstance;
105}
106
108
109//_____________________________________________________________________________
110Geometry::Geometry()
111 : TNamed("MFT", "Muon Forward Tracker"), mBuilder(nullptr), mSegmentation(nullptr), mSensorVolumeID(0)
112{
113 // default constructor
114}
115
116//_____________________________________________________________________________
118{
119 // destructor
120
121 delete mBuilder;
122 delete mSegmentation;
123}
124
125//_____________________________________________________________________________
127{
128
129 // load the detector segmentation
130 if (!mSegmentation) {
131 mSegmentation = new Segmentation(gSystem->ExpandPathName("$(VMCWORKDIR)/Detectors/Geometry/MFT/data/Geometry.xml"));
132 }
133
134 // build the geometry
135 if (!mBuilder) {
136 mBuilder = new GeometryBuilder();
137 }
138 mBuilder->buildGeometry();
139 delete mBuilder;
140}
141
148
149//_____________________________________________________________________________
150UInt_t Geometry::getObjectID(ObjectTypes type, Int_t half, Int_t disk, Int_t plane, Int_t ladder, Int_t chip) const
151{
152
153 UInt_t uniqueID = ((type + 1) << 16) + ((half + 1) << 14) + ((disk + 1) << 11) + ((plane + 1) << 9) +
154 ((ladder + 1) << 3) + (chip + 1);
155
156 return uniqueID;
157}
158
161
162//_____________________________________________________________________________
163Int_t Geometry::getDiskNSensors(Int_t diskId) const
164{
165
166 Int_t nSensors = 0;
167 for (int iHalf = 0; iHalf < 2; iHalf++) {
168 HalfDiskSegmentation* diskSeg = mSegmentation->getHalf(iHalf)->getHalfDisk(diskId);
169 if (diskSeg) {
170 nSensors += diskSeg->getNChips();
171 }
172 }
173 return nSensors;
174}
175
178
179//_____________________________________________________________________________
180Int_t Geometry::getDetElemLocalID(Int_t detElemID) const
181{
182
183 return mSegmentation->getDetElemLocalID(getHalfID(detElemID), getDiskID(detElemID), getLadderID(detElemID),
184 getSensorID(detElemID));
185}
Chip (sensor) segmentation description.
Class describing MFT Geometry Builder.
Class for the description of the structure of a half-disk.
Segmentation class for each half of the ALICE Muon Forward Tracker.
Class handling both virtual segmentation and real volumes.
Class for the virtual segmentation of the ALICE Muon Forward Tracker.
ClassImp(o2::mft::Geometry)
Description of the virtual segmentation of a ladder.
void buildGeometry()
Build the MFT Geometry.
static const Double_t sChipThickness
CMOS chip thickness.
Definition Geometry.h:49
static const Double_t sCapacitorDy
Definition Geometry.h:69
static const Double_t sHoleShift1
Definition Geometry.h:65
UInt_t getObjectID(ObjectTypes type, Int_t half=-1, Int_t disk=-1, Int_t plane=-1, Int_t ladder=-1, Int_t chip=-1) const
Returns the object Unique ID.
Definition Geometry.cxx:150
static const Double_t sEpsilon
Definition Geometry.h:75
static const Double_t sVarnishThickness
Definition Geometry.h:58
static const Double_t sShiftDDGNDline
Definition Geometry.h:78
static const Double_t sSensorTopOffset
Offset of sensor compare to ladder top edge.
Definition Geometry.h:53
Int_t getDiskNSensors(Int_t diskId) const
Returns the number of sensors on the entire disk (top+bottom)
Definition Geometry.cxx:163
static const Double_t sSensorSideOffset
Offset of sensor compare to ladder edge (close to the beam pipe)
Definition Geometry.h:52
static const Double_t sGlueRohacellCarbonThickness
Definition Geometry.h:80
Int_t getSensorID(UInt_t uniqueID) const
Returns Sensor ID based on Unique ID provided.
Definition Geometry.h:115
Int_t getDetElemLocalID(Int_t detElem) const
Returns the local ID of the sensor on the disk.
Definition Geometry.cxx:180
Int_t getDiskID(UInt_t uniqueID) const
Returns Half-Disk ID based on Unique ID provided.
Definition Geometry.h:106
static const Double_t sFlexThickness
Flex Thickness.
Definition Geometry.h:61
static const Double_t sLineWidth
Definition Geometry.h:57
static const Double_t sConnectorLength
Definition Geometry.h:71
static const Double_t sKaptonGlueThickness
Definition Geometry.h:82
Int_t getLadderID(UInt_t uniqueID) const
Returns Ladder ID based on Unique ID provided.
Definition Geometry.h:112
static const Double_t sConnectorOffset
Definition Geometry.h:67
Int_t getHalfID(UInt_t uniqueID) const
Returns Half-MFT ID based on Unique ID provided.
Definition Geometry.h:103
static const Double_t sGlueThickness
Definition Geometry.h:76
static const Int_t sGrooves
Definition Geometry.h:83
static const Double_t sKaptonThickness
Definition Geometry.h:60
~Geometry() override
Definition Geometry.cxx:117
static Geometry * instance()
Singleton access.
Definition Geometry.cxx:98
static const Double_t sCapacitorDz
Definition Geometry.h:68
static const Double_t sConnectorWidth
Definition Geometry.h:72
static const Double_t sClearance
Definition Geometry.h:62
static const Double_t sSensorInterspace
Interspace between 2 sensors on a ladder.
Definition Geometry.h:51
static const Double_t sConnectorHeight
Definition Geometry.h:73
static const Double_t sGlueEdge
Definition Geometry.h:77
static TGeoHMatrix sTransMFT2ITS
transformation due to the different conventions
Definition Geometry.h:85
static const Double_t sSensorThickness
CMOS sensor part thickness.
Definition Geometry.h:48
static const Double_t sFlexHeight
Flex Height.
Definition Geometry.h:56
static const Double_t sConnectorThickness
Definition Geometry.h:74
static const Double_t sRadiusHole1
Definition Geometry.h:63
static const Double_t sKaptonOnCarbonThickness
Definition Geometry.h:81
static const Double_t sShiftline
Definition Geometry.h:79
static const Double_t sLadderOffsetToEnd
Offset of sensor compare to ladder connector edge.
Definition Geometry.h:54
static const Double_t sRadiusHole2
Definition Geometry.h:64
static const Double_t sHoleShift2
Definition Geometry.h:66
static const Double_t sCapacitorDx
Definition Geometry.h:70
static const Double_t sAluThickness
Definition Geometry.h:59
Int_t getNChips()
Returns the number of sensors on the Half-Disk.
HalfDiskSegmentation * getHalfDisk(Int_t iDisk) const
HalfSegmentation * getHalf(Int_t iHalf) const
Returns pointer to the segmentation of the half-MFT.
Int_t getDetElemLocalID(Int_t half, Int_t disk, Int_t ladder, Int_t sensor) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275