]>
Commit | Line | Data |
---|---|---|
db486a6e | 1 | #ifndef ALIITSV11GEOMETRYSPD_H |
2 | #define ALIITSV11GEOMETRYSPD_H | |
592651e2 | 3 | |
d0048cec | 4 | /* |
59da35b6 | 5 | * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. |
592651e2 | 6 | * See cxx source for full Copyright notice. |
7 | */ | |
d0048cec | 8 | |
bc3498f4 | 9 | // Implementation of the SPD v11 central geometry. |
10 | // Contains also: | |
11 | // - the materials/media used for its volumes; | |
12 | // - settings for the related transport parameters | |
13 | // (GEANT3 types for the moment). | |
14 | // | |
a53658c6 | 15 | |
543b7370 | 16 | /* |
592651e2 | 17 | * $Id$ |
543b7370 | 18 | */ |
592651e2 | 19 | |
c93255fe | 20 | #include <TArrayD.h> |
a53658c6 | 21 | #include <TGeoManager.h> |
22 | #include <TVirtualMC.h> | |
297369a1 | 23 | #include <TString.h> |
24 | #include <TArrayI.h> | |
bc3498f4 | 25 | #include <TPolyLine.h> |
26 | #include <TPolyMarker.h> | |
db486a6e | 27 | #include <AliITSv11Geometry.h> |
a53658c6 | 28 | |
bc3498f4 | 29 | class TGeoVolume; |
7855ea93 | 30 | class TGeoCompositeShape; |
db486a6e | 31 | |
592651e2 | 32 | class AliITSv11GeometrySPD : public AliITSv11Geometry |
33 | { | |
54c9a3d9 | 34 | public: |
d0048cec | 35 | |
54c9a3d9 | 36 | // Default constructor |
37 | AliITSv11GeometrySPD(/*Double_t gap = 0.0075*/); | |
38 | // Standard Constructor | |
39 | AliITSv11GeometrySPD(Int_t debug/*, Double_t gap = 0.0075*/); | |
40 | // Copy constructor | |
41 | AliITSv11GeometrySPD(const AliITSv11GeometrySPD &s); | |
42 | // Assignment operator | |
43 | AliITSv11GeometrySPD& operator=(const AliITSv11GeometrySPD &s); | |
44 | // Destructor | |
45 | virtual ~AliITSv11GeometrySPD() {}; | |
46 | ||
54c9a3d9 | 47 | /* Services */ |
48 | ||
49 | // get names | |
d0048cec | 50 | virtual const char *GetSenstiveVolumeName1() const |
54c9a3d9 | 51 | {return "ITSSPDlay1-sensor";} |
d0048cec | 52 | virtual const char *GetSenstiveVolumeName2() const |
54c9a3d9 | 53 | {return "ITSSPDlay2-sensor";} |
54 | virtual const char *GetSenstiveVolumeName(Int_t lay) const | |
55 | {return (lay==1) ? GetSenstiveVolumeName1():GetSenstiveVolumeName2();} | |
56 | // get medium | |
57 | virtual TGeoMedium* GetMedium(const char* mediumName, | |
43aefea7 | 58 | const TGeoManager *mgr = gGeoManager) const; |
54c9a3d9 | 59 | // retrieve the mounting location and rotation needed to mount an SPD stave |
57aa7862 | 60 | virtual Int_t GetSPDsectorX0Size() const |
61 | {return fSPDsectorX0.GetSize();} | |
54c9a3d9 | 62 | virtual Bool_t GetSectorMountingPoints(Int_t index, Double_t &x0, |
63 | Double_t &y0, Double_t &x1, Double_t &y1) const; | |
64 | // displace the staves on the carbon fiber sector | |
65 | virtual void StavesInSector(TGeoVolume *moth,TGeoManager *mgr=gGeoManager); | |
66 | // (debug purposes) define which staves to put in the sector | |
67 | virtual void SetAddStave(Bool_t *mask); | |
68 | // print class in ascii form to stream | |
69 | virtual void PrintAscii(ostream *os) const; | |
70 | // read in class in ascii form from stream | |
d0048cec | 71 | virtual void ReadAscii(istream *is); |
54c9a3d9 | 72 | |
73 | /* Parts of the geometry */ | |
74 | ||
75 | // a single ladder (= 1 detector + 5 chips) | |
76 | virtual TGeoVolume* CreateLadder(Int_t layer, TArrayD &sizes, | |
77 | TGeoManager *mgr = gGeoManager) const; | |
78 | // a clip on the central ladders | |
79 | virtual TGeoVolume* CreateClip(TArrayD &sizes,Bool_t isDummy, | |
80 | TGeoManager *mgr = gGeoManager) const; | |
81 | // the grounding foil (splitted in many components) | |
54c9a3d9 | 82 | virtual TGeoCompositeShape* CreateGroundingFoilShape(Int_t itype, |
83 | Double_t &length,Double_t &width,Double_t thickness,TArrayD &sizes); | |
d0048cec | 84 | virtual TGeoVolumeAssembly* CreateGroundingFoil(Bool_t isRight, TArrayD &sizes, |
54c9a3d9 | 85 | TGeoManager *mgr = gGeoManager); |
86 | // the MCM (thin part + thick part with chips inside) | |
87 | virtual TGeoVolumeAssembly* CreateMCM(Bool_t isRight, TArrayD &sizes, | |
88 | TGeoManager *mgr = gGeoManager) const; | |
89 | // the pixel bus (flat part + pt1000s + large capacitors/resistors) | |
3ffa185f | 90 | virtual TGeoVolumeAssembly* CreatePixelBus(Bool_t isRight, Int_t layer, TArrayD &sizes, |
54c9a3d9 | 91 | TGeoManager *mgr = gGeoManager) const; |
92 | // the extender complicated geometry | |
93 | virtual TGeoVolume* CreateExtender(const Double_t *params, | |
94 | const TGeoMedium *medium, TArrayD &sizes) const; | |
45c52bb2 | 95 | |
96 | virtual TGeoVolume* CreatePatchPanel(TArrayD &sizes, | |
97 | TGeoManager *mgr = gGeoManager) const; | |
d0048cec | 98 | |
44d18d38 | 99 | virtual TList* CreateConeModule(Bool_t sideC, const Double_t angle, |
96eb8210 | 100 | TGeoManager *mgr = gGeoManager) const; |
7f69c251 | 101 | virtual void CreateCones(TGeoVolume *moth) const; |
d0048cec | 102 | // a half-stave (put together ladders + MCM + bus, and add clips |
54c9a3d9 | 103 | // if requested) |
104 | virtual TGeoVolumeAssembly* CreateHalfStave(Bool_t isRight, Int_t layer, | |
105 | Int_t idxCentral, Int_t idxSide,TArrayD &sizes/*, | |
106 | Bool_t addClips = kFALSE*/, TGeoManager *mgr = gGeoManager); | |
107 | // the whole stave (2 half-staves of different orientation) | |
108 | virtual TGeoVolumeAssembly* CreateStave(Int_t layer, TArrayD &sizes, | |
109 | /*Bool_t addClips = kFALSE,*/TGeoManager *mgr = gGeoManager); | |
110 | // the complete Carbon Fiber sector (support + staves) | |
30611568 | 111 | virtual void CarbonFiberSector(TGeoVolume *moth, Int_t sect, Double_t &xAAtubeCenter0, |
54c9a3d9 | 112 | Double_t &yAAtubeCenter0, TGeoManager *mgr = gGeoManager); |
113 | // the whole SPD barrel (the 10 sectors at once) | |
114 | virtual void SPDSector(TGeoVolume *moth, TGeoManager *mgr = gGeoManager); | |
115 | // Returns the location of the SPD cooling tube ends. RB26 (muon absober | |
116 | // side) and RB24 (open side). Staves number 0,1 inner Staves, 2-5 outer | |
117 | // staves. Sectors numbers 0-9. | |
118 | virtual void GetSPDCoolingTubeRB26(Int_t sector,Int_t stave, | |
119 | Double_t &x,Double_t &y,Double_t &z)const{ | |
120 | x = fTubeEndSector[sector][1][stave][0]; | |
121 | y = fTubeEndSector[sector][1][stave][1]; | |
122 | z = fTubeEndSector[sector][1][stave][2];return;}; | |
123 | virtual void GetSPDCoolingTubeRB24(Int_t sector,Int_t stave, | |
124 | Double_t &x,Double_t &y,Double_t &z)const{ | |
125 | x = fTubeEndSector[sector][0][stave][0]; | |
126 | y = fTubeEndSector[sector][0][stave][1]; | |
127 | z = fTubeEndSector[sector][0][stave][2];return;}; | |
128 | private: | |
129 | // NOTE: | |
130 | // all of the member functions which define a component of the final SPD | |
d0048cec | 131 | // will need to be defined as private once the design is fixed and |
54c9a3d9 | 132 | // does not need any longer to be checked and debugged. |
133 | ||
134 | /* Service methods for internal use only */ | |
135 | ||
d0048cec | 136 | // compute shape of the SPD Sector given specific inputs |
54c9a3d9 | 137 | void SPDsectorShape(Int_t n,const Double_t *xc, const Double_t *yc, |
138 | const Double_t *r,const Double_t *ths, | |
d0048cec | 139 | const Double_t *the, Int_t npr,Int_t &m, |
54c9a3d9 | 140 | Double_t **xp, Double_t **yp) const; |
141 | // compute a point o a line parallel to a given direction | |
142 | // and with a fixed distance from it | |
143 | void ParallelPosition(Double_t dist1, Double_t dist2, Double_t phi, | |
144 | Double_t &x, Double_t &y) const; | |
145 | // comutes the radial translation of a sector to give the | |
146 | // proper distance between SPD detectors and the beam pipe. | |
147 | Double_t GetSPDSectorTranslation(Double_t x0,Double_t y0,Double_t x1, | |
148 | Double_t y1,Double_t r)const; | |
149 | Bool_t CFHolePoints(Double_t s,Double_t r1,Double_t r2,Double_t l, | |
150 | Double_t &x,Double_t &y)const; | |
151 | ||
152 | /* Data members */ | |
153 | ||
d0048cec | 154 | static const Double_t fgkGapLadder;// thicknes of the empty (air) gap left |
155 | // between the ladder and the grounding | |
54c9a3d9 | 156 | // foil for alignment |
157 | static const Double_t fgkGapHalfStave;//thickness of the empty (air) gap | |
158 | // left between HS and Carbon Suport | |
159 | Bool_t fAddStave[6]; // [DEBUG] must be TRUE for all staves | |
d0048cec | 160 | // which will be mounted in the sector |
161 | // (used to check overlaps) | |
54c9a3d9 | 162 | TArrayD fSPDsectorX0; // X of first edge of sector plane for stave |
163 | TArrayD fSPDsectorY0; // Y of first edge of sector plane for stave | |
164 | TArrayD fSPDsectorX1; // X of second edge of sector plane for stave | |
165 | TArrayD fSPDsectorY1; // Y of second edge of sector plane for stave | |
166 | // | |
167 | Double_t fTubeEndSector[10][2][6][3]; // Location of tube end in sector | |
168 | /* ROOT dictionary */ | |
169 | ||
170 | ClassDef(AliITSv11GeometrySPD,2) // ITS v11 Central SPD geometry | |
db486a6e | 171 | }; |
172 | ||
bc3498f4 | 173 | // Input and output function for standard C++ input/output. |
174 | ostream &operator<<(ostream &os, const AliITSv11GeometrySPD &s); | |
175 | istream &operator>>(istream &is, AliITSv11GeometrySPD &s); | |
297369a1 | 176 | |
bc3498f4 | 177 | #endif |