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 static Int_t NStripC() { return kNStripC;};
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 static Int_t NStripXSector() { return (kNStripA + 2*kNStripB +
35 static Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
36 2*kNStripC)*kNpadX*kNpadZ;};
38 static Float_t RinTOF() { return fgkxTOF;};
39 static Float_t Rmin() { return fgkRmin;};
40 static Float_t Rmax() { return fgkRmax;};
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 static Float_t ZlenA() { return fgkZlenA;};
58 static Float_t ZlenB() { return fgkZlenB;};
59 static Float_t ZlenC() { return fgkZlenC;};
60 static Float_t MaxhZtof() { return fgkMaxhZtof;};
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;};
70 virtual void ImportGeometry();
71 virtual void SetHoles(Bool_t holes) {fHoles = holes;};
72 virtual Bool_t GetHoles() const {return fHoles;};
73 virtual Float_t DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d=0) const;
74 virtual Bool_t IsInsideThePadPar(Int_t *det, Float_t *pos) const;
75 virtual Bool_t IsInsideThePad(TGeoHMatrix mat, Float_t *pos, Float_t *dist3d=0) const;
76 virtual void GetVolumePath(Int_t *ind, Char_t *path );
77 virtual void GetVolumePath(Int_t sector, Char_t *path );
78 virtual void GetVolumePath(Int_t sector, Int_t plate, Int_t strip, Char_t *path );
79 virtual void GetPos(Int_t *det,Float_t *pos);
80 virtual void GetPosPar(Int_t *det,Float_t *pos) const;
81 virtual void GetDetID(Float_t *pos,Int_t *det) const;
82 virtual Int_t GetPlate(Float_t *pos) const;
83 virtual Int_t GetStrip(Float_t *pos) const;
84 virtual Int_t GetSector(Float_t *pos) const;
85 virtual Int_t GetPadX(Float_t *pos) const;
86 virtual Int_t GetPadZ(Float_t *pos) const;
87 virtual Float_t GetX(Int_t *det) const ;
88 virtual Float_t GetY(Int_t *det) const ;
89 virtual Float_t GetZ(Int_t *det) const ;
90 virtual void DetToStripRF(Int_t nPadX, Int_t nPadZ,
91 Float_t &x, Float_t &z) const;
92 virtual void DetToSectorRF(Int_t vol[5], Double_t ** coord);
93 virtual Float_t GetPadDx(Float_t *pos);
94 virtual Float_t GetPadDy(Float_t *pos);
95 virtual Float_t GetPadDz(Float_t *pos);
96 virtual void Translation(Float_t *xyz, Float_t translationVector[3]) const;
97 virtual void Rotation(Float_t *xyz, Double_t rotationAngles[6]) const;
98 virtual void InverseRotation(Float_t *xyz, Double_t rotationAngles[6]) const;
100 static Float_t GetAngles(Int_t iplate, Int_t istrip) {return fgkAngles[iplate][istrip];};
101 static Float_t GetHeights(Int_t iplate, Int_t istrip) {return fgkHeights[iplate][istrip];};
102 static Float_t GetDistances(Int_t iplate, Int_t istrip) {return fgkDistances[iplate][istrip];};
104 static Int_t GetIndex(Int_t *detId); // Get channel index from det Id (for calibration mainly)
109 kNStripA = 15, // number of strips in A type module
110 kNStripB = 19, // number of strips in B type module
111 kNStripC = 19, // number of strips in C type module
112 kNpadX = 48, // Number of pads along X
113 kNpadZ = 2, // Number of pads along Z
114 kNSectors = 18, // Number of Sectors
115 kNPlates = 5, // Number of Plates
116 kMaxTOFTree = 5, // numer of geom. levels:
117 kMaxNstrip = 20 // Max. number of strips
120 // DAQ characteristics
121 // cfr. TOF-TDR pag. 105 for Glossary
122 // TARODA : TOF-ALICE Read Out and Data Acquisition system
124 kNDDL = 4, // Number of DDL (Detector Data Link) per sector
125 kNTRM = 12, // Number of TRM ( Readout Module) per DDL
126 kNTdc = 15, // Number of Tdc (Time to Digital Converter) per TRM
127 kNChain = 2, // Number of chains per TRM
128 kNCh = 8 // Number of channels per Tdc
131 static const Int_t fgkTimeDiff; // Min signal separation (ps)
133 static const Float_t fgkZlenA; // length (cm) of the A module
134 static const Float_t fgkZlenB; // length (cm) of the B module
135 static const Float_t fgkZlenC; // length (cm) of the C module
136 static const Float_t fgkMaxhZtof; // Max half z-size of TOF (cm)
138 static const Float_t fgkRmin; // Inner radius of the TOF (cm)
139 static const Float_t fgkRmax; // Outer radius of the TOF (cm)
140 static const Float_t fgkxTOF; // Inner TOF Radius used in Reconstruction (cm)
142 static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm)
144 static const Float_t fgkXPad; // Pad size in the x direction (cm)
145 static const Float_t fgkZPad; // Pad size in the z direction (cm)
147 static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails
148 static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails
150 static const Float_t fgkPhiSec; //sector Phi width (deg)
152 Bool_t fHoles; //logical for geometry version (w/wo holes)
154 static const Float_t fgkAngles[kNPlates][kMaxNstrip]; //Strip Tilt Angles
155 static const Float_t fgkHeights[kNPlates][kMaxNstrip]; //Strip heights
156 static const Float_t fgkDistances[kNPlates][kMaxNstrip];//Strip distances
159 static const Float_t fgkTdcBin; // time-of-flight bin width [ps]
160 static const Float_t fgkToTBin; // time-over-threshold bin width [ps]
162 ClassDef(AliTOFGeometry,5) // TOF Geometry base class