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