]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSv11GeometrySPD.h
Remove dependencies of PID code on AliITStrackV2, remove obslete AliITStrackV2Pid...
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySPD.h
CommitLineData
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
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
bc3498f4 28class TGeoVolume;
7855ea93 29class TGeoCompositeShape;
db486a6e 30
592651e2 31class AliITSv11GeometrySPD : public AliITSv11Geometry
32{
54c9a3d9 33 public:
d0048cec 34
54c9a3d9 35 // Default constructor
36 AliITSv11GeometrySPD(/*Double_t gap = 0.0075*/);
37 // Standard Constructor
38 AliITSv11GeometrySPD(Int_t debug/*, Double_t gap = 0.0075*/);
39 // Copy constructor
40 AliITSv11GeometrySPD(const AliITSv11GeometrySPD &s);
41 // Assignment operator
42 AliITSv11GeometrySPD& operator=(const AliITSv11GeometrySPD &s);
43 // Destructor
44 virtual ~AliITSv11GeometrySPD() {};
45
46 /* Settings */
47
48 // define/create materials
49 virtual Int_t CreateSPDCentralMaterials(Int_t &medOffset,
50 Int_t &matOffset) const;
51 // set SPD Central, GEANT3 type, tracking parameters
52 virtual void InitSPDCentral(Int_t offset, TVirtualMC *mc = gMC) const;
53
54 /* Monitoring */
55
56 // creates standard figures for the documentation of this class
57 virtual void CreateFigure0(const Char_t *path = "",
58 const Char_t *type = "gif",
59 TGeoManager *mgr = gGeoManager) const;
60 // fill TPolylines with crossections of the SPD Carbon fiber sectors.
61 Bool_t Make2DCrossSections(TPolyLine &a0, TPolyLine &a1, TPolyLine &b0,
62 TPolyLine &b1, TPolyMarker &p) const;
63
64 /* Services */
65
66 // get names
d0048cec 67 virtual const char *GetSenstiveVolumeName1() const
54c9a3d9 68 {return "ITSSPDlay1-sensor";}
d0048cec 69 virtual const char *GetSenstiveVolumeName2() const
54c9a3d9 70 {return "ITSSPDlay2-sensor";}
71 virtual const char *GetSenstiveVolumeName(Int_t lay) const
72 {return (lay==1) ? GetSenstiveVolumeName1():GetSenstiveVolumeName2();}
73 // get medium
74 virtual TGeoMedium* GetMedium(const char* mediumName,
75 TGeoManager *mgr = gGeoManager) const;
76 // retrieve the mounting location and rotation needed to mount an SPD stave
77 virtual Bool_t GetSectorMountingPoints(Int_t index, Double_t &x0,
78 Double_t &y0, Double_t &x1, Double_t &y1) const;
79 // displace the staves on the carbon fiber sector
80 virtual void StavesInSector(TGeoVolume *moth,TGeoManager *mgr=gGeoManager);
81 // (debug purposes) define which staves to put in the sector
82 virtual void SetAddStave(Bool_t *mask);
83 // print class in ascii form to stream
84 virtual void PrintAscii(ostream *os) const;
85 // read in class in ascii form from stream
d0048cec 86 virtual void ReadAscii(istream *is);
54c9a3d9 87
88 /* Parts of the geometry */
89
90 // a single ladder (= 1 detector + 5 chips)
91 virtual TGeoVolume* CreateLadder(Int_t layer, TArrayD &sizes,
92 TGeoManager *mgr = gGeoManager) const;
93 // a clip on the central ladders
94 virtual TGeoVolume* CreateClip(TArrayD &sizes,Bool_t isDummy,
95 TGeoManager *mgr = gGeoManager) const;
96 // the grounding foil (splitted in many components)
97 //virtual TGeoVolumeAssembly* CreateGroundingFoilSingle(Int_t type,
98 // TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
99 virtual TGeoCompositeShape* CreateGroundingFoilShape(Int_t itype,
100 Double_t &length,Double_t &width,Double_t thickness,TArrayD &sizes);
d0048cec 101 virtual TGeoVolumeAssembly* CreateGroundingFoil(Bool_t isRight, TArrayD &sizes,
54c9a3d9 102 TGeoManager *mgr = gGeoManager);
103 // the MCM (thin part + thick part with chips inside)
104 virtual TGeoVolumeAssembly* CreateMCM(Bool_t isRight, TArrayD &sizes,
105 TGeoManager *mgr = gGeoManager) const;
106 // the pixel bus (flat part + pt1000s + large capacitors/resistors)
3ffa185f 107 virtual TGeoVolumeAssembly* CreatePixelBus(Bool_t isRight, Int_t layer, TArrayD &sizes,
54c9a3d9 108 TGeoManager *mgr = gGeoManager) const;
109 // the extender complicated geometry
110 virtual TGeoVolume* CreateExtender(const Double_t *params,
111 const TGeoMedium *medium, TArrayD &sizes) const;
112 // the Pixel Bus & extenders (old method which will be removed)
113 virtual TGeoVolumeAssembly* CreatePixelBusAndExtensions(Bool_t zpos=kTRUE,
114 TGeoManager *mgr = gGeoManager) const;
d0048cec 115
0b9c8a10 116 virtual TList* CreateConeModule(TGeoManager *mgr = gGeoManager) const;
7f69c251 117 virtual void CreateCones(TGeoVolume *moth) const;
d0048cec 118 // a half-stave (put together ladders + MCM + bus, and add clips
54c9a3d9 119 // if requested)
120 virtual TGeoVolumeAssembly* CreateHalfStave(Bool_t isRight, Int_t layer,
121 Int_t idxCentral, Int_t idxSide,TArrayD &sizes/*,
122 Bool_t addClips = kFALSE*/, TGeoManager *mgr = gGeoManager);
123 // the whole stave (2 half-staves of different orientation)
124 virtual TGeoVolumeAssembly* CreateStave(Int_t layer, TArrayD &sizes,
125 /*Bool_t addClips = kFALSE,*/TGeoManager *mgr = gGeoManager);
126 // the complete Carbon Fiber sector (support + staves)
127 virtual void CarbonFiberSector(TGeoVolume *moth, Double_t &xAAtubeCenter0,
128 Double_t &yAAtubeCenter0, TGeoManager *mgr = gGeoManager);
129 // the whole SPD barrel (the 10 sectors at once)
130 virtual void SPDSector(TGeoVolume *moth, TGeoManager *mgr = gGeoManager);
131 // Returns the location of the SPD cooling tube ends. RB26 (muon absober
132 // side) and RB24 (open side). Staves number 0,1 inner Staves, 2-5 outer
133 // staves. Sectors numbers 0-9.
134 virtual void GetSPDCoolingTubeRB26(Int_t sector,Int_t stave,
135 Double_t &x,Double_t &y,Double_t &z)const{
136 x = fTubeEndSector[sector][1][stave][0];
137 y = fTubeEndSector[sector][1][stave][1];
138 z = fTubeEndSector[sector][1][stave][2];return;};
139 virtual void GetSPDCoolingTubeRB24(Int_t sector,Int_t stave,
140 Double_t &x,Double_t &y,Double_t &z)const{
141 x = fTubeEndSector[sector][0][stave][0];
142 y = fTubeEndSector[sector][0][stave][1];
143 z = fTubeEndSector[sector][0][stave][2];return;};
144 private:
145 // NOTE:
146 // all of the member functions which define a component of the final SPD
d0048cec 147 // will need to be defined as private once the design is fixed and
54c9a3d9 148 // does not need any longer to be checked and debugged.
149
150 /* Service methods for internal use only */
151
d0048cec 152 // compute shape of the SPD Sector given specific inputs
54c9a3d9 153 void SPDsectorShape(Int_t n,const Double_t *xc, const Double_t *yc,
154 const Double_t *r,const Double_t *ths,
d0048cec 155 const Double_t *the, Int_t npr,Int_t &m,
54c9a3d9 156 Double_t **xp, Double_t **yp) const;
157 // compute a point o a line parallel to a given direction
158 // and with a fixed distance from it
159 void ParallelPosition(Double_t dist1, Double_t dist2, Double_t phi,
160 Double_t &x, Double_t &y) const;
161 // comutes the radial translation of a sector to give the
162 // proper distance between SPD detectors and the beam pipe.
163 Double_t GetSPDSectorTranslation(Double_t x0,Double_t y0,Double_t x1,
164 Double_t y1,Double_t r)const;
165 Bool_t CFHolePoints(Double_t s,Double_t r1,Double_t r2,Double_t l,
166 Double_t &x,Double_t &y)const;
167
168 /* Data members */
169
d0048cec 170 static const Double_t fgkGapLadder;// thicknes of the empty (air) gap left
171 // between the ladder and the grounding
54c9a3d9 172 // foil for alignment
173 static const Double_t fgkGapHalfStave;//thickness of the empty (air) gap
174 // left between HS and Carbon Suport
175 Bool_t fAddStave[6]; // [DEBUG] must be TRUE for all staves
d0048cec 176 // which will be mounted in the sector
177 // (used to check overlaps)
54c9a3d9 178 TArrayD fSPDsectorX0; // X of first edge of sector plane for stave
179 TArrayD fSPDsectorY0; // Y of first edge of sector plane for stave
180 TArrayD fSPDsectorX1; // X of second edge of sector plane for stave
181 TArrayD fSPDsectorY1; // Y of second edge of sector plane for stave
182 //
183 Double_t fTubeEndSector[10][2][6][3]; // Location of tube end in sector
184 /* ROOT dictionary */
185
186 ClassDef(AliITSv11GeometrySPD,2) // ITS v11 Central SPD geometry
db486a6e 187};
188
bc3498f4 189// Input and output function for standard C++ input/output.
190ostream &operator<<(ostream &os, const AliITSv11GeometrySPD &s);
191istream &operator>>(istream &is, AliITSv11GeometrySPD &s);
297369a1 192
bc3498f4 193#endif