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