]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFGeometry.h
START positions
[u/mrichter/AliRoot.git] / TOF / AliTOFGeometry.h
CommitLineData
0f4a7374 1#ifndef ALITOFGEOMETRY_H
2#define ALITOFGEOMETRY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9// //
10// TOF geometry class //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
14
d076c8d5 15#include "TObject.h"
a6a9820c 16#include "TGeoManager.h"
0f4a7374 17
d076c8d5 18class AliTOFGeometry: public TObject{
0f4a7374 19
20 public:
21 AliTOFGeometry();
22 virtual ~AliTOFGeometry();
23
74ea065c 24 static Int_t NStripA() { return kNStripA;};
25 static Int_t NStripB() { return kNStripB;};
d3c7bfac 26 virtual Int_t NStripC() { return kNStripC;};
4402e7cb 27 static Int_t NMaxNstrip() { return kMaxNstrip;};
74ea065c 28 static Int_t NpadX() { return kNpadX;};
29 static Int_t NpadZ() { return kNpadZ;};
7e6dce66 30 static Int_t NpadXStrip() { return kNpadX*kNpadZ;};
74ea065c 31 static Int_t NSectors() { return kNSectors;};
32 static Int_t NPlates() { return kNPlates;};
d3c7bfac 33 virtual Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
34 2*kNStripC)*kNpadX*kNpadZ;};
35
36 virtual Float_t RinTOF() { return fgkxTOF;};
37 virtual Float_t Rmin() { return fgkRmin;};
38 virtual Float_t Rmax() { return fgkRmax;};
39
40 static Float_t XPad() { return fgkXPad;};
41 static Float_t ZPad() { return fgkZPad;};
42
4402e7cb 43 static Float_t StripLength() { return fgkStripLength;};
44
0f4a7374 45 static Int_t TimeDiff() { return fgkTimeDiff;};
74ea065c 46 static Int_t MaxTOFTree() { return kMaxTOFTree;};
0f4a7374 47
43f77f2d 48 static Int_t NDDL() { return kNDDL;};
49 static Int_t NTRM() { return kNTRM;}
50 static Int_t NTdc() { return kNTdc;};
51 static Int_t NCh() { return kNCh;};
52 static Int_t NPadXTRM() { return kNCh*kNTdc;};
53
d3c7bfac 54 virtual Float_t ZlenA() { return kZlenA;};
55 virtual Float_t ZlenB() { return kZlenB;};
56 virtual Float_t ZlenC() { return kZlenC;};
57 virtual Float_t MaxhZtof() { return kMaxhZtof;};
0f4a7374 58
59 static Float_t SigmaForTail1() { return fgkSigmaForTail1;};
60 static Float_t SigmaForTail2() { return fgkSigmaForTail2;};
0f4a7374 61
74ea065c 62 static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / kNSectors; };
0f4a7374 63
43f77f2d 64 static Float_t TdcBinWidth() {return fgkTdcBin;};
65
0f4a7374 66
67 virtual void Init();
a6a9820c 68 virtual void ImportGeometry() {};
74ea065c 69 virtual void SetHoles(Bool_t holes) {fHoles = holes;};
70 virtual Bool_t GetHoles() const {return fHoles;};
a6a9820c 71 virtual Bool_t IsInsideThePadPar(Int_t */*det*/, Float_t */*pos*/) {return kFALSE;};
72 virtual Float_t DistanceToPadPar(Int_t */*det*/, Float_t */*pos*/, Float_t *dist3d=0) {return dist3d[0];};
73 virtual Bool_t IsInsideThePad(Int_t */*det*/,TGeoHMatrix /*mat*/, Float_t */*pos*/){return kFALSE;};
74 virtual Float_t DistanceToPad(Int_t */*det*/,TGeoHMatrix /*mat*/, Float_t */*pos*/, Float_t *dist3d=0){return dist3d[0];};
75 virtual void GetVolumePath(Int_t */*ind*/, Char_t */*path*/ ){};
76 virtual void GetPos(Int_t */*det*/,Float_t */*pos*/){};
77 virtual void GetPosPar(Int_t */*det*/,Float_t */*pos*/);
d3c7bfac 78 virtual void GetDetID(Float_t */*pos*/,Int_t */*det*/);
79 virtual Int_t GetPlate(Float_t */*pos*/) {return -1;};
80 virtual Int_t GetStrip(Float_t */*pos*/) {return -1;};
81 virtual Int_t GetSector(Float_t */*pos*/) {return -1;};
82 virtual Int_t GetPadX(Float_t */*pos*/) {return -1;};
83 virtual Int_t GetPadZ(Float_t */*pos*/) {return -1;};
84 virtual Float_t GetX(Int_t */*det*/) {return -500.;};
85 virtual Float_t GetY(Int_t */*det*/) {return -500.;};
86 virtual Float_t GetZ(Int_t */*det*/) {return -500.;};
87
88 Float_t GetAngles(Int_t iplate, Int_t istrip) const {return fAngles[iplate][istrip];};
89 Float_t GetHeights(Int_t iplate, Int_t istrip) const {return fHeights[iplate][istrip];};
90 Float_t GetDistances(Int_t iplate, Int_t istrip) const {return fDistances[iplate][istrip];};
91
92 //private:
93 protected:
0f4a7374 94
58eb5b61 95 enum {
74ea065c 96 kNStripA = 15, // number of strips in A type module
97 kNStripB = 19, // number of strips in B type module
74ea065c 98 kNpadX = 48, // Number of pads along X
99 kNpadZ = 2, // Number of pads along Z
100 kNSectors = 18, // Number of Sectors
101 kNPlates = 5, // Number of Plates
4402e7cb 102 kMaxTOFTree = 5, // numer of geom. levels:
103 kMaxNstrip = 20 // Max. number of strips
58eb5b61 104 };
105
43f77f2d 106 // DAQ characteristics
107 // cfr. TOF-TDR pag. 105 for Glossary
108 // TARODA : TOF-ALICE Read Out and Data Acquisition system
109 enum {
110 kNDDL = 4, // Number of DDL (Detector Data Link) per sector
111 kNTRM = 10, // Number of TRM ( Readout Module) per DDL
112 kNTdc = 30, // Number of Tdc (Time to Digital Converter) per TRM
113 kNCh = 8 // Number of channels per Tdc
114 };
115
7e6dce66 116 static const Int_t fgkTimeDiff; // Min signal separation (ps)
117
d3c7bfac 118 mutable Int_t kNStripC; // number of strips in C type module
d3c7bfac 119
120 mutable Float_t kZlenA; // length (cm) of the A module
121 mutable Float_t kZlenB; // length (cm) of the B module
122 mutable Float_t kZlenC; // length (cm) of the C module
123 mutable Float_t kMaxhZtof; // Max half z-size of TOF (cm)
d3c7bfac 124
125 mutable Float_t fgkRmin; // Inner radius of the TOF (cm)
126 mutable Float_t fgkRmax; // Outer radius of the TOF (cm)
127 mutable Float_t fgkxTOF; // Inner TOF Radius used in Reconstruction (cm)
128
4402e7cb 129 static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm)
130
d3c7bfac 131 static const Float_t fgkXPad; // Pad size in the x direction (cm)
132 static const Float_t fgkZPad; // Pad size in the z direction (cm)
58eb5b61 133
134 static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails
135 static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails
d3c7bfac 136
137 Bool_t fHoles; //logical for geometry version (w/wo holes)
138
4402e7cb 139 Float_t fAngles[kNPlates][kMaxNstrip]; //Strip Tilt Angles
140 Float_t fHeights[kNPlates][kMaxNstrip]; //Strip heights
141 Float_t fDistances[kNPlates][kMaxNstrip];//Strip distances
d3c7bfac 142
0f4a7374 143 Float_t fPhiSec; //sector Phi width (deg)
144
43f77f2d 145 static const Float_t fgkTdcBin; // time-window for the TDC bins [ps]
146
4402e7cb 147 ClassDef(AliTOFGeometry,3) // TOF Geometry base class
0f4a7374 148};
149
150#endif