]>
Commit | Line | Data |
---|---|---|
db486a6e | 1 | #ifndef ALIITSV11GEOMETRYSPD_H |
2 | #define ALIITSV11GEOMETRYSPD_H | |
592651e2 | 3 | |
4 | /* | |
59da35b6 | 5 | * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. |
592651e2 | 6 | * See cxx source for full Copyright notice. |
7 | */ | |
bc3498f4 | 8 | |
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 | |
a53658c6 | 20 | #include <TGeoManager.h> |
21 | #include <TVirtualMC.h> | |
297369a1 | 22 | #include <TString.h> |
23 | #include <TArrayI.h> | |
bc3498f4 | 24 | #include <TPolyLine.h> |
25 | #include <TPolyMarker.h> | |
db486a6e | 26 | #include <AliITSv11Geometry.h> |
a53658c6 | 27 | |
297369a1 | 28 | |
bc3498f4 | 29 | class TGeoVolume; |
7855ea93 | 30 | class TGeoCompositeShape; |
db486a6e | 31 | |
592651e2 | 32 | class AliITSv11GeometrySPD : public AliITSv11Geometry |
33 | { | |
34 | public: | |
297369a1 | 35 | |
bc3498f4 | 36 | // Default constructor |
7855ea93 | 37 | AliITSv11GeometrySPD(); |
bc3498f4 | 38 | // Standard Constructor |
7855ea93 | 39 | AliITSv11GeometrySPD(Int_t debug); |
bc3498f4 | 40 | // Copy constructor (temporarily disabled) |
41 | // AliITSv11GeometrySPD(const AliITSv11GeometrySPD &s); | |
42 | // Assignment operator (temporarily disabled) | |
43 | // operator=(const AliITSv11GeometrySPD &s); | |
44 | // Destructor | |
45 | virtual ~AliITSv11GeometrySPD() {}; | |
46 | ||
592651e2 | 47 | /* Settings */ |
bc3498f4 | 48 | |
592651e2 | 49 | // define/create materials |
bc3498f4 | 50 | virtual Int_t CreateSPDCentralMaterials(Int_t &medOffset, Int_t &matOffset) const; |
59da35b6 | 51 | // set SPD Central, GEANT3 type, tracking parameters |
bc3498f4 | 52 | virtual void InitSPDCentral(Int_t offset, TVirtualMC *mc = gMC) const; |
592651e2 | 53 | |
54 | /* Monitoring */ | |
55 | ||
56 | // creates standard figures for the documentation of this class | |
bc3498f4 | 57 | virtual void CreateFigure0 |
58 | (const Char_t *path = "", const Char_t *type = "gif", TGeoManager *mgr = gGeoManager) const; | |
59 | // fill TPolylines with crossections of the SPD Carbon fiber sectors. | |
60 | Bool_t Make2DCrossSections | |
61 | (TPolyLine &a0, TPolyLine &a1, TPolyLine &b0, TPolyLine &b1, TPolyMarker &p) const; | |
592651e2 | 62 | |
bc3498f4 | 63 | /* Services */ |
64 | ||
65 | // get names | |
66 | virtual const char *GetSenstiveVolumeName1() const {return "LAY1_SENSOR";} | |
67 | virtual const char *GetSenstiveVolumeName2() const {return "LAY2_SENSOR";} | |
68 | virtual const char *GetSenstiveVolumeName(Int_t lay) const | |
69 | {return (lay==1) ? GetSenstiveVolumeName1() : GetSenstiveVolumeName2();} | |
70 | // get medium | |
71 | virtual TGeoMedium* GetMedium(const char* mediumName, TGeoManager *mgr = gGeoManager) const; | |
72 | // retrieve the mounting location and rotation needed to mount an SPD stave | |
73 | virtual Bool_t GetSectorMountingPoints | |
74 | (Int_t index, Double_t &x0, Double_t &y0, Double_t &x1, Double_t &y1) const; | |
75 | // displace the staves on the carbon fiber sector | |
76 | virtual void StavesInSector(TGeoVolume *moth, TGeoManager *mgr = gGeoManager); | |
77 | // (debug purposes) define which staves to put in the sector | |
78 | virtual void SetAddStave(Bool_t *mask); | |
79 | // print class in ascii form to stream | |
80 | virtual void PrintAscii(ostream *os) const; | |
81 | // read in class in ascii form from stream | |
82 | virtual void ReadAscii(istream *is); | |
83 | ||
84 | /* Parts of the geometry */ | |
592651e2 | 85 | |
86 | // a single ladder (= 1 detector + 5 chips) | |
bc3498f4 | 87 | virtual TGeoVolume* CreateLadder |
88 | (Int_t layer, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const; | |
89 | // a clip on the central ladders | |
90 | virtual TGeoVolume* CreateClip | |
7855ea93 | 91 | (TArrayD &sizes, Bool_t isDummy, TGeoManager *mgr = gGeoManager) const; |
bc3498f4 | 92 | // the grounding foil (splitted in many components) |
7855ea93 | 93 | virtual TGeoCompositeShape* CreateGroundingFoilShape |
94 | (Int_t itype, Double_t &length, Double_t &width, Double_t thickness, TArrayD &sizes); | |
bc3498f4 | 95 | virtual TGeoVolume* CreateGroundingFoil |
7855ea93 | 96 | (Bool_t isRight, TArrayD &sizes, TGeoManager *mgr = gGeoManager); |
bc3498f4 | 97 | // the MCM (thin part + thick part with chips inside) |
98 | virtual TGeoVolumeAssembly* CreateMCM | |
99 | (Bool_t isRight, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const; | |
100 | // the pixel bus (flat part + pt1000s + large capacitors/resistors) | |
101 | virtual TGeoVolumeAssembly* CreatePixelBus | |
102 | (Bool_t isRight, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const; | |
103 | // the extender complicated geometry | |
104 | virtual TGeoVolume* CreateExtender | |
105 | (const Double_t *params, const TGeoMedium *medium, TArrayD &sizes) const; | |
106 | // the Pixel Bus & extenders (old method which will be removed) | |
107 | virtual TGeoVolumeAssembly* CreatePixelBusAndExtensions | |
108 | (Bool_t zpos = kTRUE, TGeoManager *mgr = gGeoManager) const; | |
109 | // a half-stave (put together ladders + MCM + bus, and add clips if requested) | |
110 | virtual TGeoVolumeAssembly* CreateHalfStave | |
111 | (Bool_t isRight, Int_t layer, Int_t idxCentral, Int_t idxSide, | |
7855ea93 | 112 | TArrayD &sizes, TGeoManager *mgr = gGeoManager); |
bc3498f4 | 113 | // the whole stave (2 half-staves of different orientation) |
114 | virtual TGeoVolumeAssembly* CreateStave | |
7855ea93 | 115 | (Int_t layer, TArrayD &sizes, TGeoManager *mgr = gGeoManager); |
592651e2 | 116 | // the complete Carbon Fiber sector (support + staves) |
bc3498f4 | 117 | virtual void CarbonFiberSector |
118 | (TGeoVolume *moth, Double_t &xAAtubeCenter0, Double_t &yAAtubeCenter0, TGeoManager *mgr = gGeoManager); | |
119 | // the whole SPD barrel (the 10 sectors at once) | |
120 | virtual void SPDSector(TGeoVolume *moth, TGeoManager *mgr = gGeoManager); | |
592651e2 | 121 | |
122 | private: | |
bc3498f4 | 123 | |
592651e2 | 124 | // NOTE: |
bc3498f4 | 125 | // all of the member functions which define a component of the final SPD |
126 | // will need to be defined as private once the design is fixed and | |
127 | // does not need any longer to be checked and debugged. | |
592651e2 | 128 | |
bc3498f4 | 129 | /* Service methods for internal use only */ |
592651e2 | 130 | |
bc3498f4 | 131 | // compute shape of the SPD Sector given specific inputs |
132 | void SPDsectorShape | |
133 | (Int_t n, | |
134 | const Double_t *xc, const Double_t *yc, const Double_t *r, | |
135 | const Double_t *ths, const Double_t *the, Int_t npr, | |
136 | Int_t &m, Double_t **xp, Double_t **yp) const; | |
137 | ||
138 | // compute a point o a line parallel to a given direction | |
139 | // and with a fixed distance from it | |
140 | void ParallelPosition | |
141 | (Double_t dist1, Double_t dist2, Double_t phi, Double_t &x, Double_t &y) const; | |
142 | ||
143 | /* Data members */ | |
144 | ||
7855ea93 | 145 | static const Double_t fgkGapLadder; // thickness of the empty (air) gap left around the ladder |
146 | static const Double_t fgkGapHalfStave; // thickness of the empty (air) gap left between HS and carbon support | |
592651e2 | 147 | |
bc3498f4 | 148 | Bool_t fAddStave[6]; // [DEBUG] must be TRUE for all staves |
149 | // which will be mounted in the sector (used to check overlaps) | |
150 | ||
151 | TArrayD fSPDsectorX0; // X of first edge of sector plane for stave | |
152 | TArrayD fSPDsectorY0; // Y of first edge of sector plane for stave | |
153 | TArrayD fSPDsectorX1; // X of second edge of sector plane for stave | |
154 | TArrayD fSPDsectorY1; // Y of second edge of sector plane for stave | |
155 | ||
156 | /* ROOT dictionary */ | |
157 | ||
158 | ClassDef(AliITSv11GeometrySPD,1) // ITS v11 Central SPD geometry | |
db486a6e | 159 | }; |
160 | ||
bc3498f4 | 161 | // Input and output function for standard C++ input/output. |
162 | ostream &operator<<(ostream &os, const AliITSv11GeometrySPD &s); | |
163 | istream &operator>>(istream &is, AliITSv11GeometrySPD &s); | |
297369a1 | 164 | |
bc3498f4 | 165 | #endif |