]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsegmentationSPD.h
Mostly minor style modifications to be ready for cloning with EMCAL
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSPD.h
1 #ifndef ALIITSSEGMENTATIONSPD_H
2 #define ALIITSSEGMENTATIONSPD_H
3
4 #include "AliITSsegmentation.h"
5
6 #include <TF1.h>
7
8 class AliITSgeom;
9
10 // segmentation and response for SPD 
11
12 class AliITSsegmentationSPD :
13 public 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  
28     virtual void    SetNPads(Int_t p1, Int_t p2);
29     // Returns the maximum number of cells (digits) posible
30     virtual Int_t   GetNPads(){return fNpx*fNpz;}
31     // Set Pixel Size Array in x and z, microns.
32     virtual void    SetBinSize(Float_t *x,Float_t *z);
33
34     // Transform from real to pixel coordinates
35     virtual void    GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz);
36     // Transform from pixel to real coordinates
37     virtual void    GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t &z);
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) {}
42     // Local transformation of real local coordinates -
43     virtual void    GetPadTxz(Float_t &x ,Float_t &z);
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);
50     //
51     // Initialisation
52     virtual void Init();
53     virtual void Init300();
54     //
55     // Get member data
56     //
57     // Detector Type geometry
58     virtual AliITSgeom* Geometry() {return fGeom;}
59     // Detector length
60     virtual Float_t Dx() {return fDx;}
61     // Detector width
62     virtual Float_t Dz() {return fDz;}
63     // Detector thickness
64     virtual Float_t Dy() {return fDy;}
65     // Pixel size in x
66     virtual Float_t Dpx(Int_t ix);
67     // Pixel size in z 
68     virtual Float_t Dpz(Int_t iz);
69
70     // Maximum number of Pixels in x
71     virtual Int_t    Npx() {return fNpx;}
72     // Maximum number of Pixels in z
73     virtual Int_t    Npz(){return fNpz;}
74     //
75     // Get next neighbours
76     virtual void Neighbours
77        (Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]);
78
79  private:
80     Float_t ColFromZ300(Float_t z);
81     Float_t ZFromCol300(Int_t col);
82     Float_t ZpitchFromCol300(Int_t col);
83     Float_t ColFromZ(Float_t z);
84     Float_t ZFromCol(Int_t col);
85     Float_t ZpitchFromCol(Int_t col);
86     
87   protected:
88
89     Int_t   fNpx;           // Number of pixels in x
90     Int_t   fNpz;           // Number of pixels in z
91     Float_t fDx;            // Full width of the detector (x axis)- microns
92     Float_t fDz;            // Full length of the detector (z axis)- microns
93     Float_t fDy;            // Full thickness of the detector (y axis) -um 
94     Float_t fCellSizeX[256];// Size for each pixel in x -microns
95     Float_t fCellSizeZ[280];// Size for each pixel in z -microns
96     TF1*    fCorr;          // correction function
97     AliITSgeom *fGeom;      //! local pointer to AliITSgeom.
98
99   ClassDef(AliITSsegmentationSPD,1) //Segmentation class for SPD 
100
101 };
102
103 #endif