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