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 */
8 ///////////////////////////////////////////////////////////////////////////////
10 // TOF geometry class //
12 ///////////////////////////////////////////////////////////////////////////////
17 class AliTOFGeometry: public TObject{
21 virtual ~AliTOFGeometry();
23 static Int_t NStripA() { return kNStripA;};
24 static Int_t NStripB() { return kNStripB;};
25 static Int_t NStripC() { return kNStripC;};
26 static Int_t NpadX() { return kNpadX;};
27 static Int_t NpadZ() { return kNpadZ;};
28 static Int_t NpadXStrip() { return kNpadX*kNpadZ;};
29 static Int_t NSectors() { return kNSectors;};
30 static Int_t NPlates() { return kNPlates;};
31 static Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
32 2*kNStripC)*kNpadX*kNpadZ;};
33 static Int_t TimeDiff() { return fgkTimeDiff;};
34 static Int_t MaxTOFTree() { return kMaxTOFTree;};
37 static Int_t NDDL() { return kNDDL;};
38 static Int_t NTRM() { return kNTRM;}
39 static Int_t NTdc() { return kNTdc;};
40 static Int_t NCh() { return kNCh;};
41 static Int_t NPadXTRM() { return kNCh*kNTdc;};
44 static Float_t RinTOF() { return fgkxTOF;};
45 static Float_t Rmin() { return fgkRmin;};
46 static Float_t Rmax() { return fgkRmax;};
47 static Float_t ZlenA() { return fgkZlenA;};
48 static Float_t ZlenB() { return fgkZlenB;};
49 static Float_t ZlenC() { return fgkZlenC;};
50 static Float_t XPad() { return fgkXPad;};
51 static Float_t ZPad() { return fgkZPad;};
52 static Float_t MaxhZtof() { return fgkMaxhZtof;};
53 static Float_t StripLength() { return fgkStripLength;};
54 static Float_t DeadBndX() { return fgkDeadBndX;};
55 static Float_t DeadBndZ() { return fgkDeadBndZ;};
56 static Float_t OverSpc() { return fgkOverSpc;};
58 static Float_t SigmaForTail1() { return fgkSigmaForTail1;};
59 static Float_t SigmaForTail2() { return fgkSigmaForTail2;};
60 static Float_t SpeedOfLight() { return fgkSpeedOfLight;};
61 static Float_t PionMass() { return fgkPionMass;};
62 static Float_t KaonMass() { return fgkKaonMass;};
63 static Float_t ProtonMass() { return fgkProtonMass;};
64 static Float_t ElectronMass() { return fgkElectronMass;};
65 static Float_t MuonMass() { return fgkMuonMass;};
67 static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / kNSectors; };
69 static Float_t TdcBinWidth() {return fgkTdcBin;};
73 virtual void SetHoles(Bool_t holes) {fHoles = holes;};
74 virtual Bool_t GetHoles() const {return fHoles;};
75 virtual Bool_t IsInsideThePad(Int_t *det, Float_t *pos);
76 virtual Float_t DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3d=0);
77 virtual void GetPos(Int_t *det,Float_t *pos);
78 virtual void GetDetID(Float_t *pos,Int_t *det);
79 virtual Int_t GetPlate(Float_t *pos);
80 virtual Int_t GetStrip(Float_t *pos);
81 virtual Int_t GetSector(Float_t *pos);
82 virtual Int_t GetPadX(Float_t *pos);
83 virtual Int_t GetPadZ(Float_t *pos);
84 virtual Float_t GetX(Int_t *det);
85 virtual Float_t GetY(Int_t *det);
86 virtual Float_t GetZ(Int_t *det);
87 virtual Float_t GetMinPlateTheta(Int_t iPlate);
88 virtual Float_t GetMaxPlateTheta(Int_t iPlate);
89 virtual Float_t GetMinStripTheta(Int_t iPlate, Int_t iStrip);
90 virtual Float_t GetMaxStripTheta(Int_t iPlate, Int_t iStrip);
91 virtual Float_t GetStripTheta(Int_t iPlate, Int_t iStrip);
92 virtual Float_t GetAngles(Int_t iplate, Int_t istrip) const {return fAngles[iplate][istrip];};
93 virtual Float_t GetHeights(Int_t iplate, Int_t istrip) const {return fHeights[iplate][istrip];};
98 kNStripA = 15, // number of strips in A type module
99 kNStripB = 19, // number of strips in B type module
100 kNStripC = 20, // number of strips in C type module
101 kNpadX = 48, // Number of pads along X
102 kNpadZ = 2, // Number of pads along Z
103 kNSectors = 18, // Number of Sectors
104 kNPlates = 5, // Number of Plates
105 kMaxNstrip = 20, // Max. number of strips
106 kMaxTOFTree = 5 // numer of geom. levels:
109 // DAQ characteristics
110 // cfr. TOF-TDR pag. 105 for Glossary
111 // TARODA : TOF-ALICE Read Out and Data Acquisition system
113 kNDDL = 4, // Number of DDL (Detector Data Link) per sector
114 kNTRM = 10, // Number of TRM ( Readout Module) per DDL
115 kNTdc = 30, // Number of Tdc (Time to Digital Converter) per TRM
116 kNCh = 8 // Number of channels per Tdc
119 static const Int_t fgkTimeDiff; // Min signal separation (ps)
121 static const Float_t fgkRmin; // Inner radius of the TOF (cm)
122 static const Float_t fgkRmax; // Outer radius of the TOF (cm)
123 static const Float_t fgkZlenA; // length (cm) of the A module
124 static const Float_t fgkZlenB; // length (cm) of the B module
125 static const Float_t fgkZlenC; // length (cm) of the C module
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)
128 static const Float_t fgkMaxhZtof; // Max half z-size of TOF (cm)
129 static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm)
130 static const Float_t fgkDeadBndX; // Dead Boundaries of a Strip along Z direction (width)
131 static const Float_t fgkDeadBndZ; // Dead Boundaries of a Strip along X direction (length)
132 static const Float_t fgkOverSpc; // Space available for sensitive layers in radial direction (cm)
134 static const Float_t fgkxTOF;// Inner TOF Radius used in Reconstruction (cm)
136 static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails
137 static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails
138 static const Float_t fgkSpeedOfLight;// c (10^9 m/s)
139 static const Float_t fgkPionMass;// pion mass (Gev/c^2)
140 static const Float_t fgkKaonMass;// kaon mass (Gev/c^2)
141 static const Float_t fgkProtonMass;// proton mass (Gev/c^2)
142 static const Float_t fgkElectronMass;// electron mass (Gev/c^2)
143 static const Float_t fgkMuonMass;// muon mass (Gev/c^2)
146 static const Float_t fgkDprecMin;//num.prec.tolerance on Thmin
147 static const Float_t fgkDprecMax;//num.prec.tolerance on Thma
148 static const Float_t fgkDprecCen;//num.prec.tolerance on <Theta>
149 Bool_t fHoles; //logical for geometry version (w/wo holes)
150 Float_t fAngles[kNPlates][kMaxNstrip]; //Strip Tilt Angles
151 Float_t fHeights[kNPlates][kMaxNstrip];//Strip heights
152 Float_t fPhiSec; //sector Phi width (deg)
154 static const Float_t fgkTdcBin; // time-window for the TDC bins [ps]
156 ClassDef(AliTOFGeometry,1) // TOF Geometry base class