]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDgeometry.h
Buffer Size can be defined
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometry.h
CommitLineData
dd9a6ee3 1#ifndef ALITRDGEOMETRY_H
2#define ALITRDGEOMETRY_H
f7336fa3 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
db30bf0f 6/* $Id$ */
f7336fa3 7
94de3818 8#include "AliGeometry.h"
f7336fa3 9
f7336fa3 10class AliTRDgeometry : public AliGeometry {
11
12 public:
13
dd56b762 14 enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
15
f7336fa3 16 AliTRDgeometry();
8230f242 17 virtual ~AliTRDgeometry();
f7336fa3 18
793ff80c 19 virtual void CreateGeometry(Int_t *idtmed);
20 virtual Int_t IsVersion() const = 0;
21 virtual void Init();
22 virtual Bool_t Local2Global(Int_t d, Float_t *local, Float_t *global) const;
23 virtual Bool_t Local2Global(Int_t p, Int_t c, Int_t s, Float_t *local, Float_t *global) const;
24 virtual Bool_t Rotate(Int_t d, Float_t *pos, Float_t *rot) const;
25 virtual Bool_t RotateBack(Int_t d, Float_t *rot, Float_t *pos) const;
26
27 static Int_t Nsect() { return fgkNsect; };
28 static Int_t Nplan() { return fgkNplan; };
29 static Int_t Ncham() { return fgkNcham; };
30 static Int_t Ndet() { return fgkNdet; };
31
32 static Float_t Rmin() { return fgkRmin; };
33 static Float_t Rmax() { return fgkRmax; };
34 static Float_t Zmax1() { return fgkZmax1; };
35 static Float_t Zmax2() { return fgkZmax2; };
36
37 static Float_t Cwidcha() { return (fgkSwidth2 - fgkSwidth1)
0a770ac9 38 / fgkSheight * (fgkCH + fgkVspace); };
39 static Float_t Cheight() { return fgkCH; };
40 static Float_t Cspace() { return fgkVspace; };
41 static Float_t CraHght() { return fgkCraH; };
42 static Float_t CdrHght() { return fgkCdrH; };
43 static Float_t CamHght() { return fgkCamH; };
44 static Float_t CroHght() { return fgkCroH; };
793ff80c 45 static Float_t MyThick() { return fgkMyThick; };
46 static Float_t DrThick() { return fgkDrThick; };
a2b90f83 47 static Float_t AmThick() { return fgkAmThick; };
a2b90f83 48 static Float_t DrZpos() { return fgkDrZpos; };
793ff80c 49
50 virtual void SetPHOShole() = 0;
51 virtual void SetRICHhole() = 0;
52
0a770ac9 53 virtual void SetNRowPad();
54 virtual void SetNRowPad(const Int_t p, const Int_t c, const Int_t npad);
55 virtual void SetColPadSize(const Int_t p, const Float_t s);
a2b90f83 56 virtual void SetNTimeBin(const Int_t nbin);
57 virtual void SetExpandTimeBin(const Int_t nbefore, const Int_t nafter)
58 { fTimeBefore = nbefore;
59 fTimeAfter = nafter; };
793ff80c 60
61 virtual Bool_t GetPHOShole() const = 0;
62 virtual Bool_t GetRICHhole() const = 0;
63
0a770ac9 64 virtual Int_t GetDetectorSec(const Int_t p, const Int_t) const;
a2b90f83 65 virtual Int_t GetDetector(const Int_t p, const Int_t c, const Int_t s) const;
66 virtual Int_t GetPlane(const Int_t d) const;
67 virtual Int_t GetChamber(const Int_t d) const;
68 virtual Int_t GetSector(const Int_t d) const;
793ff80c 69
0a770ac9 70 Float_t GetChamberWidth(const Int_t p) const { return fCwidth[p]; };
71 Float_t GetChamberLength(const Int_t p, const Int_t c) const { return fClength[p][c]; };
72
793ff80c 73
a2b90f83 74 Int_t GetRowMax(const Int_t p, const Int_t c, const Int_t s)
75 const { return fRowMax[p][c][s]; };
76 Int_t GetColMax(const Int_t p) const { return fColMax[p]; };
77 Int_t GetTimeMax() const { return fTimeMax; };
78 Int_t GetTimeBefore() const { return fTimeBefore; };
79 Int_t GetTimeAfter() const { return fTimeAfter; };
80 Int_t GetTimeTotal() const { return fTimeMax
81 + fTimeBefore
82 + fTimeAfter; };
83
84 Float_t GetRow0(const Int_t p, const Int_t c, const Int_t s)
85 const { return fRow0[p][c][s]; };
86 Float_t GetCol0(const Int_t p) const { return fCol0[p]; };
87 Float_t GetTime0(const Int_t p) const { return fTime0[p]; };
88
89 Float_t GetRowPadSize(const Int_t p, const Int_t c, const Int_t s)
90 const { return fRowPadSize[p][c][s]; };
91 Float_t GetColPadSize(const Int_t p) const { return fColPadSize[p]; };
92 Float_t GetTimeBinSize() const { return fTimeBinSize; };
f7336fa3 93
793ff80c 94 virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat) const;
95 virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos) const;
f7336fa3 96
a2b90f83 97 static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / fgkNsect; };
f7336fa3 98
793ff80c 99 protected:
f7336fa3 100
793ff80c 101 static const Int_t fgkNsect; // Number of sectors in the full detector (18)
102 static const Int_t fgkNplan; // Number of planes of the TRD (6)
103 static const Int_t fgkNcham; // Number of chambers in z-direction (5)
104 static const Int_t fgkNdet; // Total number of detectors (18 * 6 * 5 = 540)
105
106 static const Float_t fgkRmin; // Minimal radius of the TRD
107 static const Float_t fgkRmax; // Maximal radius of the TRD
108
109 static const Float_t fgkZmax1; // Half-length of the TRD at outer radius
110 static const Float_t fgkZmax2; // Half-length of the TRD at inner radius
111
112 static const Float_t fgkSheight; // Height of the TRD-volume in spaceframe (BTR1-3)
113 static const Float_t fgkSwidth1; // Lower width of the TRD-volume in spaceframe (BTR1-3)
114 static const Float_t fgkSwidth2; // Upper width of the TRD-volume in spaceframe (BTR1-3)
115 static const Float_t fgkSlenTR1; // Length of the TRD-volume in spaceframe (BTR1)
116 static const Float_t fgkSlenTR2; // Length of the TRD-volume in spaceframe (BTR2)
117 static const Float_t fgkSlenTR3; // Length of the TRD-volume in spaceframe (BTR3)
118
0a770ac9 119 static const Float_t fgkCraH; // Height of the radiator part of the chambers
120 static const Float_t fgkCdrH; // Height of the drift region of the chambers
121 static const Float_t fgkCamH; // Height of the amplification region of the chambers
122 static const Float_t fgkCroH; // Height of the readout of the chambers
123 static const Float_t fgkCH; // Total height of the chambers
124
125 static const Float_t fgkVspace; // Vertical spacing of the chambers
126 static const Float_t fgkHspace; // Horizontal spacing of the chambers
127
128 static const Float_t fgkCalT; // Thickness of the lower aluminum frame
129 static const Float_t fgkCclsT; // Thickness of the lower G10 frame sides
130 static const Float_t fgkCclfT; // Thickness of the lower G10 frame front
131 static const Float_t fgkCcuT; // Thickness of the upper G10 frame
132 static const Float_t fgkCauT; // Thickness of the upper aluminum frame
133
134 static const Float_t fgkCroW; // Additional width of the readout chamber frames
135
136 static const Float_t fgkCpadW; // Difference of outer chamber width and pad plane width
137 static const Float_t fgkRpadW; // Difference of outer chamber width and pad plane width
793ff80c 138
793ff80c 139 static const Float_t fgkRaThick; // Thickness of the radiator
793ff80c 140 static const Float_t fgkMyThick; // Thickness of the mylar-layer
141 static const Float_t fgkXeThick; // Thickness of the gas volume
142 static const Float_t fgkDrThick; // Thickness of the drift region
143 static const Float_t fgkAmThick; // Thickness of the amplification region
144 static const Float_t fgkCuThick; // Thickness of the pad plane
145 static const Float_t fgkSuThick; // Thickness of the HEXCEL+G10 support structure
146 static const Float_t fgkFeThick; // Thickness of the FEE + signal lines
147 static const Float_t fgkCoThick; // Thickness of the PE of the cooling device
148 static const Float_t fgkWaThick; // Thickness of the cooling water
149
793ff80c 150 static const Float_t fgkRaZpos; // Position of the radiator
793ff80c 151 static const Float_t fgkMyZpos; // Position of the mylar-layer
152 static const Float_t fgkDrZpos; // Position of the drift region
153 static const Float_t fgkAmZpos; // Position of the amplification region
154 static const Float_t fgkCuZpos; // Position of the pad plane
155 static const Float_t fgkSuZpos; // Position of the HEXCEL+G10 support structure
156 static const Float_t fgkFeZpos; // Position of the FEE + signal lines
157 static const Float_t fgkCoZpos; // Position of the PE of the cooling device
158 static const Float_t fgkWaZpos; // Position of the colling water
159
160 Int_t fRowMax[kNplan][kNcham][kNsect]; // Number of pad-rows
161 Int_t fColMax[kNplan]; // Number of pad-columns
a2b90f83 162 Int_t fTimeMax; // Number of timebins in the drift region
163 Int_t fTimeBefore; // Number of timebins before the drift region
164 Int_t fTimeAfter; // Number of timebins after the drift region
793ff80c 165
0a770ac9 166 Float_t fCwidth[kNplan]; // Outer widths of the chambers
167 Float_t fClength[kNplan][kNcham]; // Outer lengths of the chambers
168 Float_t fClengthPH[kNplan][kNcham]; // For sectors with holes for the PHOS
169 Float_t fClengthRH[kNplan][kNcham]; // For sectors with holes for the RICH
793ff80c 170
171 Float_t fRow0[kNplan][kNcham][kNsect]; // Row-position of pad 0
172 Float_t fCol0[kNplan]; // Column-position of pad 0
173 Float_t fTime0[kNplan]; // Time-position of pad 0
174
71d9fa7b 175 Float_t fRowPadSize[kNplan][kNcham][kNsect]; // Pad size in z-direction
176 Float_t fColPadSize[kNplan]; // Pad size in rphi-direction
793ff80c 177 Float_t fTimeBinSize; // Size of the time buckets
178
179 Float_t fRotA11[kNsect]; // Matrix elements for the rotation
180 Float_t fRotA12[kNsect]; // Matrix elements for the rotation
181 Float_t fRotA21[kNsect]; // Matrix elements for the rotation
182 Float_t fRotA22[kNsect]; // Matrix elements for the rotation
183
184 Float_t fRotB11[kNsect]; // Matrix elements for the backward rotation
185 Float_t fRotB12[kNsect]; // Matrix elements for the backward rotation
186 Float_t fRotB21[kNsect]; // Matrix elements for the backward rotation
187 Float_t fRotB22[kNsect]; // Matrix elements for the backward rotation
188
0a770ac9 189 ClassDef(AliTRDgeometry,4) // TRD geometry base class
f7336fa3 190
191};
192
193#endif