1 #ifndef ALITOFGEOMETRY_H
2 #define ALITOFGEOMETRY_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 // TOF geometry class //
13 ///////////////////////////////////////////////////////////////////////////////
15 #include "TGeoMatrix.h"
18 class AliTOFGeometry: public TObject{
22 virtual ~AliTOFGeometry();
24 static Int_t NStripA() { return kNStripA;};
25 static Int_t NStripB() { return kNStripB;};
26 virtual Int_t NStripC() const { return fNStripC;};
27 static Int_t NMaxNstrip() { return kMaxNstrip;};
28 static Int_t NpadX() { return kNpadX;};
29 static Int_t NpadZ() { return kNpadZ;};
30 static Int_t NpadXStrip() { return kNpadX*kNpadZ;};
31 static Int_t NSectors() { return kNSectors;};
32 static Int_t NPlates() { return kNPlates;};
33 virtual Int_t NStripXSector() const { return (kNStripA + 2*kNStripB +
35 virtual Int_t NPadXSector() const { return (kNStripA + 2*kNStripB +
36 2*fNStripC)*kNpadX*kNpadZ;};
38 virtual Float_t RinTOF() const { return fxTOF;};
39 virtual Float_t Rmin() const { return fRmin;};
40 virtual Float_t Rmax() const { return fRmax;};
42 static Float_t XPad() { return fgkXPad;};
43 static Float_t ZPad() { return fgkZPad;};
45 static Float_t StripLength() { return fgkStripLength;};
47 static Int_t TimeDiff() { return fgkTimeDiff;};
48 static Int_t MaxTOFTree() { return kMaxTOFTree;};
50 static Int_t NDDL() { return kNDDL;};
51 static Int_t NTRM() { return kNTRM;}
52 static Int_t NTdc() { return kNTdc;};
53 static Int_t NChain() { return kNChain;};
54 static Int_t NCh() { return kNCh;};
55 static Int_t NPadXTRM() { return kNCh*kNTdc*kNChain;};
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;};
62 static Float_t SigmaForTail1() { return fgkSigmaForTail1;};
63 static Float_t SigmaForTail2() { return fgkSigmaForTail2;};
65 static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / kNSectors; };
67 static Float_t TdcBinWidth() {return fgkTdcBin;};
68 static Float_t ToTBinWidth() {return fgkToTBin;};
71 virtual void ImportGeometry() {};
72 virtual void SetHoles(Bool_t holes) {fHoles = holes;};
73 virtual Bool_t GetHoles() const {return fHoles;};
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];};
78 virtual void GetVolumePath(Int_t */*ind*/, Char_t */*path*/ ){};
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*/ ){};
81 virtual void GetPos(Int_t */*det*/,Float_t */*pos*/){};
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.;};
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*/) { };
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];};
104 kNStripA = 15, // number of strips in A type module
105 kNStripB = 19, // number of strips in B type module
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
110 kMaxTOFTree = 5, // numer of geom. levels:
111 kMaxNstrip = 20 // Max. number of strips
114 // DAQ characteristics
115 // cfr. TOF-TDR pag. 105 for Glossary
116 // TARODA : TOF-ALICE Read Out and Data Acquisition system
118 kNDDL = 4, // Number of DDL (Detector Data Link) per sector
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
122 kNCh = 8 // Number of channels per Tdc
125 static const Int_t fgkTimeDiff; // Min signal separation (ps)
127 mutable Int_t fNStripC; // number of strips in C type module
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)
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)
138 static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm)
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)
143 static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails
144 static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails
146 Bool_t fHoles; //logical for geometry version (w/wo holes)
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
152 Float_t fPhiSec; //sector Phi width (deg)
154 static const Float_t fgkTdcBin; // time-of-flight bin width [ps]
155 static const Float_t fgkToTBin; // time-over-threshold bin width [ps]
157 ClassDef(AliTOFGeometry,4) // TOF Geometry base class