]>
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 | */ | |
db486a6e | 8 | |
59da35b6 | 9 | |
a53658c6 | 10 | |
543b7370 | 11 | /* |
592651e2 | 12 | * $Id$ |
543b7370 | 13 | */ |
592651e2 | 14 | |
59da35b6 | 15 | // |
16 | // Implementation of the SPD v11 central geometry. | |
17 | // Contains also: | |
18 | // - the materials/media used for its volumes; | |
19 | // - settings for the related transport parameters (GEANT3 types for the moment). | |
20 | // | |
a53658c6 | 21 | #include <TGeoManager.h> |
22 | #include <TVirtualMC.h> | |
297369a1 | 23 | #include <TString.h> |
24 | #include <TArrayI.h> | |
db486a6e | 25 | #include <AliITSv11Geometry.h> |
a53658c6 | 26 | |
db486a6e | 27 | class TGeoVolume; |
297369a1 | 28 | class TPolyLine; |
29 | class TPolyMarker; | |
30 | ||
db486a6e | 31 | |
592651e2 | 32 | class AliITSv11GeometrySPD : public AliITSv11Geometry |
33 | { | |
34 | public: | |
297369a1 | 35 | // Default Constructor, should not be used by default |
36 | AliITSv11GeometrySPD() : AliITSv11Geometry(),fSPDsectorShapeName(), | |
37 | fSPDsectorPoints0(),fSPDsectorPoints1() {}; | |
38 | // Standard Constructor, set explicitly debug level | |
39 | AliITSv11GeometrySPD(Int_t debug) : AliITSv11Geometry(debug), | |
40 | fSPDsectorShapeName("ITS SPD Carbon fiber support Sector A0"), | |
41 | fSPDsectorPoints0(6),fSPDsectorPoints1() {}; | |
42 | virtual ~AliITSv11GeometrySPD() {}; // Destructor | |
43 | ||
592651e2 | 44 | /* Settings */ |
297369a1 | 45 | |
592651e2 | 46 | // define/create materials |
297369a1 | 47 | virtual Int_t CreateSPDCentralMaterials(Int_t &medOffset, |
48 | Int_t &matOffset) const; | |
59da35b6 | 49 | // set SPD Central, GEANT3 type, tracking parameters |
50 | virtual void InitSPDCentral(Int_t offset,TVirtualMC *mc=gMC) const; | |
592651e2 | 51 | |
52 | /* Monitoring */ | |
53 | ||
54 | // creates standard figures for the documentation of this class | |
297369a1 | 55 | virtual void CreateFigure0(const Char_t *filepath = "", |
56 | const Char_t *type = "gif", | |
57 | TGeoManager *mgr=gGeoManager); | |
592651e2 | 58 | |
59 | /* Member functions which create pieces of the geometry */ | |
60 | ||
61 | // a single ladder (= 1 detector + 5 chips) | |
297369a1 | 62 | TGeoVolume* CreateLadder(Int_t layer, Double_t &width, |
63 | Double_t &height, Double_t &thickness, | |
64 | TGeoManager *mgr = gGeoManager); | |
592651e2 | 65 | // the grounding foil (splitted in two components) |
297369a1 | 66 | TGeoVolume* CreateGroundingFoilSingle(Bool_t kapLayer,Double_t &len, |
67 | Double_t &wid, Double_t &thick, | |
68 | TGeoManager *mgr = gGeoManager); | |
69 | TGeoVolume* CreateGroundingFoil(Double_t &thickness, | |
70 | TGeoManager *mgr = gGeoManager); | |
592651e2 | 71 | // the MCM (incomplete: missing the internal chips) |
59da35b6 | 72 | TGeoVolume* CreateMCMBase(TGeoManager *mgr = gGeoManager) const; |
592651e2 | 73 | TGeoVolume* CreateMCMCoverBorder(TGeoManager *mgr = gGeoManager); |
74 | TGeoVolume* CreateMCMCoverTop(TGeoManager *mgr = gGeoManager); | |
75 | // the Pixel Bus & extenders | |
297369a1 | 76 | TGeoVolumeAssembly* CreatePixelBusAndExtensions(Bool_t zpos = kTRUE, |
77 | TGeoManager *mgr = gGeoManager); | |
592651e2 | 78 | // the thin part of a stave (grounding + ladders) |
297369a1 | 79 | TGeoVolume *CreateStaveBase(Int_t layer, Double_t &width, |
80 | Double_t &height, Double_t &thickness, | |
81 | TGeoManager *mgr=gGeoManager); | |
82 | // the whole stave, including the thick parts (MCM cover, | |
83 | // pixel bus & extensions) | |
84 | TGeoVolumeAssembly* CreateStave(Int_t layer, Double_t &thickness, | |
85 | TGeoManager *mgr); | |
592651e2 | 86 | // displacement of staves on the carbon fiber sector |
297369a1 | 87 | virtual void StavesInSector(TGeoVolume *moth, |
88 | TGeoManager *mgr=gGeoManager); | |
592651e2 | 89 | // the complete Carbon Fiber sector (support + staves) |
297369a1 | 90 | virtual void CarbonFiberSector(TGeoVolume *moth, |
91 | Double_t &xAAtubeCenter0, | |
92 | Double_t &yAAtubeCenter0, | |
93 | TGeoManager *mgr=gGeoManager); | |
592651e2 | 94 | // the whole SPD barrel |
95 | virtual void SPDSector(TGeoVolume *moth, TGeoManager *mgr=gGeoManager); | |
297369a1 | 96 | // Returns the mounting location and rotation needed to mount |
97 | // and SPD ladder. | |
5034603f | 98 | virtual Bool_t GetSectorMountingPoints( |
297369a1 | 99 | Int_t index,Double_t &x0,Double_t &y0, |
100 | Double_t &x1,Double_t &y1, | |
101 | TGeoManager *mgr=gGeoManager)const; | |
102 | // Functions to test aspects of this geometry. | |
103 | // Fill TPolylines with crossections of the SPD Carbon | |
104 | // fiber sectors. | |
105 | Bool_t Make2DcrossSections(TPolyLine &a0,TPolyLine &a1, | |
106 | TPolyLine &b0,TPolyLine &b1, | |
107 | TPolyMarker &p)const; | |
592651e2 | 108 | |
109 | private: | |
110 | ||
111 | // NOTE: | |
297369a1 | 112 | // all of the member functions which define a component of the |
113 | // final SPD will need to be defined as private once the design | |
114 | // is fixed and does not | |
592651e2 | 115 | // need any longer to be checked and debugged. |
116 | ||
297369a1 | 117 | // Computes shape of the SPD Sector given specific inputs |
118 | // (internal use only) | |
119 | void SPDsectorShape(Int_t n, const Double_t *xc, const Double_t *yc, | |
120 | const Double_t *r, | |
592651e2 | 121 | const Double_t *ths, const Double_t *the, Int_t npr, |
122 | Int_t &m, Double_t **xp, Double_t **yp); | |
123 | ||
297369a1 | 124 | // computes a point to a line parallel to a given direction |
592651e2 | 125 | // and with a fixed distance from it (internal use only) |
297369a1 | 126 | void ParallelPosition(Double_t dist1, Double_t dist2, |
127 | Double_t phi, Double_t &x, Double_t &y); | |
128 | ||
129 | // Some internal data | |
130 | TString fSPDsectorShapeName; // SPD Sector Shape name | |
131 | TArrayI fSPDsectorPoints0; // Array of sector points index | |
132 | // used to mount SPD ladder to. | |
133 | TArrayI fSPDsectorPoints1; // Array of sector points index | |
134 | // used to mount SPD ladder to. | |
592651e2 | 135 | |
136 | ClassDef(AliITSv11GeometrySPD,1) // ITS v11 Centeral SPD geometry | |
db486a6e | 137 | }; |
138 | ||
139 | #endif | |
297369a1 | 140 |