AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMFTGeometry.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 /* $Id$ */
16 
17 //-----------------------------------------------------------------------------
22 // author Raphael Tieulent <raphael.tieulent@cern.ch>
23 //-----------------------------------------------------------------------------
24 
25 #include "TSystem.h"
26 #include "TGeoManager.h"
27 #include "TGeoVolume.h"
28 
29 #include "AliMFTGeometry.h"
30 #include "AliMFTConstants.h"
31 #include "AliMFTGeometryBuilder.h"
32 #include "AliMFTSegmentation.h"
33 #include "AliMFTHalfSegmentation.h"
36 #include "AliMFTChipSegmentation.h"
37 #include "AliLog.h"
38 
42 
43 const Double_t AliMFTGeometry::kSensorLength=3.; //[cm]
44 const Double_t AliMFTGeometry::kSensorHeight=1.5; //[cm]
45 const Double_t AliMFTGeometry::kXPixelPitch=29.250e-4; // 29.15 micron // TODO : Check that
46 const Double_t AliMFTGeometry::kYPixelPitch=26.880e-4; // 26.88 micron // TODO : Check that
47 const Double_t AliMFTGeometry::kSensorMargin=29.120e-4; // 29.12 micron // TODO : Check that
48 
49 const Double_t AliMFTGeometry::kSensorActiveWidth = kNPixelX * kXPixelPitch; //[cm]
50 const Double_t AliMFTGeometry::kSensorActiveHeight = kNPixelY * kYPixelPitch; //[cm]
51 
52 const Double_t AliMFTGeometry::kSensorInterspace = 0.01; //[cm] Offset between two adjacent chip on a ladder
53 const Double_t AliMFTGeometry::kSensorSideOffset = 0.04; // [cm] Side Offset between the ladder edge and the chip edge
54 const Double_t AliMFTGeometry::kSensorTopOffset = 0.04; // [cm] Top Offset between the ladder edge and the chip edge
55 const Double_t AliMFTGeometry::kLadderOffsetToEnd = 4.7; // [cm] Offset between the last Chip and the end of the ladder toward the DAQ connector
56 const Double_t AliMFTGeometry::kSensorThickness = 50.e-4; // 50 microns
57 
58 const Double_t AliMFTGeometry::fHeightActive = 1.3;
59 const Double_t AliMFTGeometry::fHeightReadout = 0.2;
60 
61 // Allmost everything you wanted to know about the FPC
62 const Double_t AliMFTGeometry::kLineWidth= 100.e-4; // line width, 100 microns
63 const Double_t AliMFTGeometry::kVarnishThickness= 20.e-4; // 20 micron
64 const Double_t AliMFTGeometry::kAluThickness = 25.e-4; // 25 microns
65 const Double_t AliMFTGeometry::kKaptonThickness = 75.e-4; // 75 microns
66 const Double_t AliMFTGeometry::kFlexThickness = kKaptonThickness + 2*kAluThickness + 2*kVarnishThickness; // total thickness of a FPC
67 const Double_t AliMFTGeometry::kFlexHeight = 1.68;
68 const Double_t AliMFTGeometry::kClearance=300.e-4; // 300 microns clearance without any conducting metal all around the FPC
69 const Double_t AliMFTGeometry::kRadiusHole1=0.125; // diameter of the FPC crew, closest to the FPC electric connector
70 const Double_t AliMFTGeometry::kRadiusHole2=0.1; // diameter of the FPC pin locator, after the previous hole crew
71 const Double_t AliMFTGeometry::kHoleShift1=2.8; // shift of the FPC crew
72 const Double_t AliMFTGeometry::kHoleShift2=3.6; // shift of the FPC pin locator
73 const Double_t AliMFTGeometry::kConnectorOffset=0.4; // distance between the connector and the start of the FPC
74 const Double_t AliMFTGeometry::kCapacitorDx=0.05;
75 const Double_t AliMFTGeometry::kCapacitorDy=0.1;
76 const Double_t AliMFTGeometry::kCapacitorDz=0.05;
77 const Double_t AliMFTGeometry::kConnectorLength=0.1;
78 const Double_t AliMFTGeometry::kConnectorWidth=0.025;
79 const Double_t AliMFTGeometry::kConnectorHeight=0.1;
80 const Double_t AliMFTGeometry::kConnectorThickness=0.01;
81 const Double_t AliMFTGeometry::kShiftDDGNDline=0.4; // positionning of the line to separate AVDD/DVDD et AGND/DGND on the FPC
82 const Double_t AliMFTGeometry::kShiftline=0.025; // positionning of the line along the FPC side
83 const Double_t AliMFTGeometry::kEpsilon=0.0001; // to see the removed volumes produced by TGeoSubtraction
84 
85 const Double_t AliMFTGeometry::kGlueThickness=50.e-4; // 50 microns
86 const Double_t AliMFTGeometry::kGlueEdge=300.e-4; // in case the glue is not spreaded on the whole surface of the sensor
87 
88 
89 //____________________________________________________________________
90 
91 
93 
94 //____________________________________________________________________
98 {
99  if (!fgInstance) fgInstance = new AliMFTGeometry("MFT");
100  return fgInstance;
101 }
102 
103 //____________________________________________________________________
106 : AliGeometry("MFT", "Muon Forward Tracker"),
107 fBuilder(NULL),
108 fSegmentation(NULL),
109 fSensorVolumeId(0)
110 {
111 
112 }
113 
114 //____________________________________________________________________
117 : AliGeometry("MFT", "Muon Forward Tracker"),
118 fBuilder(NULL),
119 fSegmentation(NULL),
120 fSensorVolumeId(0)
121 {
122 
123 }
124 //____________________________________________________________________
125 
127  delete fBuilder;
128  delete fSegmentation;
129 }
130 
131 //____________________________________________________________________
135 {
137 
140  delete fBuilder;
141 
142 }
143 //____________________________________________________________________
147 
148  if(!fSegmentation) fSegmentation = new AliMFTSegmentation(gSystem->ExpandPathName("$(ALICE_ROOT)/ITSMFT/MFT/data/AliMFTGeometry.xml" ));
149 
150 }
151 //____________________________________________________________________
158 
159 UInt_t AliMFTGeometry::GetObjectID(ObjectTypes type, Int_t half, Int_t disk, Int_t ladder, Int_t chip) const{
160 
161  UInt_t uniqueID = (type<<14) + (half<<13) + (disk<<10) + (ladder<<4) + chip;
162 
163  return uniqueID;
164 }
165 //____________________________________________________________________
177 
178 Bool_t AliMFTGeometry::Hit2PixelID(Double_t xHit, Double_t yHit, Double_t zHit, Int_t detElemID, Int_t &xPixel, Int_t &yPixel) const{
179 
180  return (fSegmentation->Hit2PixelID(xHit, yHit, zHit,
181  GetHalfMFTID(detElemID), GetHalfDiskID(detElemID), GetLadderID(detElemID), GetSensorID(detElemID),
182  xPixel, yPixel));
183 }
184 
185 //____________________________________________________________________
192 
193 void AliMFTGeometry::GetPixelCenter(Int_t xPixel, Int_t yPixel, Int_t detElemID, Double_t &xCenter, Double_t &yCenter, Double_t &zCenter ) const{
194 
195  Double_t local[3];
198  local[2] = AliMFTConstants::kSensorThickness/2.;
199 
200  Double_t master[3];
201 
202  AliMFTHalfSegmentation * halfSeg = fSegmentation->GetHalf(GetHalfMFTID(detElemID));
203  AliMFTHalfDiskSegmentation * diskSeg = halfSeg->GetHalfDisk(GetHalfDiskID(detElemID));
204  AliMFTLadderSegmentation * ladderSeg = diskSeg->GetLadder(GetLadderID(detElemID));
205  AliMFTChipSegmentation * chipSeg = ladderSeg->GetSensor(GetSensorID(detElemID));
206 
207  chipSeg->GetTransformation()->LocalToMaster(local, master);
208  for (int i=0; i<3; i++) local[i] = master[i];
209  ladderSeg->GetTransformation()->LocalToMaster(local, master);
210  for (int i=0; i<3; i++) local[i] = master[i];
211  diskSeg->GetTransformation()->LocalToMaster(local, master);
212  for (int i=0; i<3; i++) local[i] = master[i];
213  halfSeg->GetTransformation()->LocalToMaster(local, master);
214 
215  xCenter = master[0];
216  yCenter = master[1];
217  zCenter = master[2];
218 
219 }
220 //____________________________________________________________________
223 Int_t AliMFTGeometry::GetDiskNSensors(Int_t diskId) const{
224 
225  Int_t nSensors = 0;
226  for (int iHalf=0; iHalf<2; iHalf++) {
227  AliMFTHalfDiskSegmentation * diskSeg = fSegmentation->GetHalf(iHalf)->GetHalfDisk(diskId);
228  if(diskSeg) nSensors += diskSeg->GetNChips();
229 
230  }
231  return nSensors;
232 }
233 
234 //____________________________________________________________________
237 
238 Int_t AliMFTGeometry::GetDetElemLocalID(Int_t detElemID) const{
239 
240  return fSegmentation->GetDetElemLocalID(GetHalfMFTID(detElemID), GetHalfDiskID(detElemID), GetLadderID(detElemID), GetSensorID(detElemID));
241 
242 }
243 
Class for the description of the structure a Half-Disk.
static const Double_t kHoleShift1
static const Double_t kGlueEdge
Bool_t Hit2PixelID(Double_t xHit, Double_t yHit, Double_t zHit, Int_t detElemID, Int_t &xPixel, Int_t &yPixel) const
Returns the pixel ID corresponding to a hit at (x,y,z) in the ALICE global frame. ...
AliMFTSegmentation * fSegmentation
Segmentation of the detector.
static const Double_t kXPixelPitch
Pixel pitch along X.
AliMFTGeometryBuilder * fBuilder
Geometry Builder.
static const Double_t kYPixelPitch
Pixel pitch along Y.
void LoadSegmentation()
Creates the virtual Segmentation from the XML file /ITSMFT/MFT/data/AliMFTGeometry.xml.
static const Double_t kSensorMargin
Inactive margin around active area.
static const Double_t kConnectorOffset
TGeoCombiTrans * GetTransformation() const
Returns the Transformation Combining a Rotation followed by a Translation.
AliMFTHalfDiskSegmentation * GetHalfDisk(Int_t iDisk) const
static const Double_t fHeightActive
height of the active elements
Chip Segmentation description.
static const Double_t kSensorActiveWidth
CMOS Sensor Active width.
AliMFTHalfSegmentation * GetHalf(Int_t iHalf) const
Returns pointer to the segmentation of the half-MFT.
Int_t GetLadderID(UInt_t uniqueID) const
Returns Ladder ID based on Unique ID provided.
static const Double_t kLadderOffsetToEnd
Offset of sensor compare to ladder connector edge.
static const Double_t kRadiusHole2
static const Double_t kKaptonThickness
static const Double_t kShiftDDGNDline
static const Double_t kSensorLength
CMOS Sensor Length.
static const Double_t kAluThickness
static const Double_t kEpsilon
static const Double_t kSensorInterspace
Interspace between 2 sensors on a ladder.
static const Double_t kRadiusHole1
UInt_t GetObjectID(ObjectTypes type, Int_t half=0, Int_t disk=0, Int_t ladder=0, Int_t chip=0) const
Returns the object Unique ID.
static const Double_t kSensorThickness
CMOS Sensor Thickness.
AliMFTLadderSegmentation * GetLadder(Int_t iLadder)
Returns pointer to the ladder segmentation object.
static const Double_t kXPixelPitch
Pixel pitch along X.
static const Double_t kLineWidth
Int_t GetDetElemLocalID(Int_t half, Int_t disk, Int_t ladder, Int_t sensor) const
void GetPixelCenter(Int_t xPixel, Int_t yPixel, Int_t detElemID, Double_t &xCenter, Double_t &yCenter, Double_t &zCenter) const
Returns the center of the pixel position in the ALICE global frame.
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
void Build()
Builf both the Virtual segmentation and the real volumes Real part is delegates to AliMFTGeometryBuil...
static const Double_t kSensorSideOffset
Offset of sensor compare to ladder edge (close to the beam pipe)
static const Double_t kSensorActiveHeight
CMOS Sensor Active height.
Int_t GetSensorID(UInt_t uniqueID) const
Returns Sensor ID based on Unique ID provided.
static const Double_t kSensorTopOffset
Offset of sensor compare to ladder top edge.
Bool_t Hit2PixelID(Double_t xHit, Double_t yHit, Double_t zHit, Int_t half, Int_t disk, Int_t ladder, Int_t sensor, Int_t &xPixel, Int_t &yPixel)
AliMFTChipSegmentation * GetSensor(Int_t sensor) const
static AliMFTGeometry * Instance()
Retuns MFT Geometry singleton object.
Segmentation class for each half of the ALICE Muon Forward Tracker.
static const Double_t kSensorActiveHeight
CMOS Sensor Active height.
void BuildGeometry()
Build the MFT Geometry.
static const Double_t kConnectorThickness
static const Double_t kCapacitorDx
static const Double_t kConnectorLength
virtual ~AliMFTGeometry()
Description of the virtual segmentation of a ladder.
static const Double_t kCapacitorDz
Class for the virtual segmentation of the ALICE Muon Forward Tracker.
static const Double_t kSensorMargin
Inactive margin around active area.
static const Double_t kFlexThickness
Flex Thickness.
static const Double_t fHeightReadout
height of the readout elements attached to the active ones
static const Double_t kCapacitorDy
static const Double_t kSensorHeight
CMOS Sensor Height.
static const Double_t kSensorThickness
CMOS Sensor Thickness.
Int_t GetDiskNSensors(Int_t diskId) const
Returns the number of sensors on the entire disk (top+bottom)
AliMFTGeometry()
Constructor.
static const Double_t kYPixelPitch
Pixel pitch along Y.
static const Double_t kConnectorHeight
static const Double_t kGlueThickness
Int_t GetHalfMFTID(UInt_t uniqueID) const
Returns Half-MFT ID based on Unique ID provided.
Int_t GetHalfDiskID(UInt_t uniqueID) const
Returns Half-Disk ID based on Unique ID provided.
static AliMFTGeometry * fgInstance
Singleton instance.
static const Double_t kFlexHeight
Flex Height.
Class describing MFT Geometry Builder.
static const Double_t kShiftline
static const Double_t kConnectorWidth
static const Double_t kClearance
Int_t GetDetElemLocalID(Int_t detElem) const
Returns the local ID of the sensor on the disk.
static const Double_t kSensorHeight
CMOS Sensor Height.
static const Double_t kHoleShift2
Class Handling both Virutal Segmentation and Real Volumes.
static const Double_t kVarnishThickness
Int_t GetNChips()
Returns the number of sensors on the Half-Disk.