]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSsegmentationSPD.h
Using TMath::Abs instead of fabs
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSPD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSEGMENTATIONSPD_H
2#define ALIITSSEGMENTATIONSPD_H
3
4#include "AliITSsegmentation.h"
5
1ca7869b 6#include <TF1.h>
7
8class AliITSgeom;
9
b0f5e3fc 10// segmentation and response for SPD
11
12class AliITSsegmentationSPD :
13public AliITSsegmentation {
14 public:
15
16 AliITSsegmentationSPD();
17 AliITSsegmentationSPD(AliITSgeom *gm);
18 AliITSsegmentationSPD(AliITSsegmentationSPD &source);
19 virtual ~AliITSsegmentationSPD(){}
20 AliITSsegmentationSPD& operator=(AliITSsegmentationSPD &source);
21
22 // Set Detector Segmentation Parameters
23 //
24 // Detector size along x,z,y coordinates
25 virtual void SetDetSize(Float_t Dx, Float_t Dz, Float_t Dy);
26
27 // Maximum number of pixels along the two coordinates
e8189707 28 virtual void SetNPads(Int_t p1, Int_t p2);
5752a110 29 // Returns the maximum number of cells (digits) posible
30 virtual Int_t GetNPads(){return fNpx*fNpz;}
91378d45 31 // Set Pixel Size Array in x and z, microns.
32 virtual void SetBinSize(Float_t *x,Float_t *z);
b0f5e3fc 33
34 // Transform from real to pixel coordinates
91378d45 35 virtual void GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz);
b0f5e3fc 36 // Transform from pixel to real coordinates
91378d45 37 virtual void GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t &z);
b0f5e3fc 38 // Transform from real global to local coordinates
39 virtual void GetLocal(Int_t module,Float_t *g ,Float_t *l) {}
40 // Transform from real local to global coordinates
41 virtual void GetGlobal(Int_t module,Float_t *l ,Float_t *g) {}
e8189707 42 // Local transformation of real local coordinates -
43 virtual void GetPadTxz(Float_t &x ,Float_t &z);
5752a110 44 // Transformation from Geant cm detector center local coordinates
45 // to detector segmentation/cell coordiantes starting from (0,0).
46 virtual void LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz);
47 // Transformation from detector segmentation/cell coordiantes starting
48 // from (0,0) to Geant cm detector center local coordinates.
49 virtual void DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z);
bd8ff387 50 // Returns the Cell upper and lower boundries in x and y. cell indexes
51 // starting from (0,0) and return Geant cm detector centered local
52 // coordinates, consistant with DetToLocal and LocalToDet functions above.
53 virtual void CellBoundries(Int_t ix,Int_t iz,Double_t &xl,Double_t &xu,
1fffb10e 54 Double_t &zl,Double_t &zu);
b0f5e3fc 55 //
56 // Initialisation
57 virtual void Init();
58 virtual void Init300();
59 //
60 // Get member data
61 //
62 // Detector Type geometry
63 virtual AliITSgeom* Geometry() {return fGeom;}
64 // Detector length
65 virtual Float_t Dx() {return fDx;}
66 // Detector width
67 virtual Float_t Dz() {return fDz;}
68 // Detector thickness
69 virtual Float_t Dy() {return fDy;}
70 // Pixel size in x
71 virtual Float_t Dpx(Int_t ix);
72 // Pixel size in z
73 virtual Float_t Dpz(Int_t iz);
74
75 // Maximum number of Pixels in x
76 virtual Int_t Npx() {return fNpx;}
77 // Maximum number of Pixels in z
78 virtual Int_t Npz(){return fNpz;}
79 //
91378d45 80 // Get next neighbours
b0f5e3fc 81 virtual void Neighbours
7c0e9d1f 82 (Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]);
b0f5e3fc 83
f1e07e4b 84 private:
85 Float_t ColFromZ300(Float_t z);
86 Float_t ZFromCol300(Int_t col);
87 Float_t ZpitchFromCol300(Int_t col);
88 Float_t ColFromZ(Float_t z);
89 Float_t ZFromCol(Int_t col);
90 Float_t ZpitchFromCol(Int_t col);
5752a110 91
b0f5e3fc 92 protected:
93
94 Int_t fNpx; // Number of pixels in x
95 Int_t fNpz; // Number of pixels in z
96 Float_t fDx; // Full width of the detector (x axis)- microns
97 Float_t fDz; // Full length of the detector (z axis)- microns
98 Float_t fDy; // Full thickness of the detector (y axis) -um
99 Float_t fCellSizeX[256];// Size for each pixel in x -microns
100 Float_t fCellSizeZ[280];// Size for each pixel in z -microns
101 TF1* fCorr; // correction function
e8189707 102 AliITSgeom *fGeom; //! local pointer to AliITSgeom.
b0f5e3fc 103
104 ClassDef(AliITSsegmentationSPD,1) //Segmentation class for SPD
105
106};
107
108#endif