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