]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsegmentationSPD.h
fix some coding violations.
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSPD.h
1 #ifndef ALIITSSEGMENTATIONSPD_H
2 #define ALIITSSEGMENTATIONSPD_H
3
4 #include "AliITSsegmentation.h"
5
6
7 class AliITSgeom;
8
9 // segmentation and response for SPD 
10
11 class AliITSsegmentationSPD :
12 public AliITSsegmentation {
13  public:
14
15     AliITSsegmentationSPD();
16     AliITSsegmentationSPD(AliITSgeom *gm);
17     AliITSsegmentationSPD(const AliITSsegmentationSPD &source);
18     virtual ~AliITSsegmentationSPD(){}
19     AliITSsegmentationSPD& operator=(const AliITSsegmentationSPD &source);
20
21     // Set Detector Segmentation Parameters
22
23     // Maximum number of pixels along the two coordinates  
24     virtual void    SetNPads(Int_t p1, Int_t p2);
25     // Returns the maximum number of cells (digits) posible
26     virtual Int_t   GetNPads() const {return fNpx*fNpz;}
27     // Set Pixel Size Array in x and z, microns.
28     virtual void    SetBinSize(Float_t *x,Float_t *z);
29
30     // Transform from real to pixel coordinates
31     virtual void    GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
32     // Transform from pixel to real coordinates
33     virtual void    GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
34     // Transform from real local to global coordinates
35     //virtual void    GetGlobal(Int_t module,Float_t *l ,Float_t *g) {}
36     // Local transformation of real local coordinates -
37     virtual void    GetPadTxz(Float_t &x ,Float_t &z) const;
38     // Transformation from Geant cm detector center local coordinates
39     // to detector segmentation/cell coordiantes starting from (0,0).
40     virtual void    LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
41     // Transformation from detector segmentation/cell coordiantes starting
42     // from (0,0) to Geant cm detector center local coordinates.
43     virtual void    DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
44     // Returns the Cell upper and lower boundries in x and y. cell indexes
45     // starting from (0,0) and return Geant cm detector centered local
46     // coordinates, consistant with DetToLocal and LocalToDet functions above.
47     virtual void CellBoundries(Int_t ix,Int_t iz,Double_t &xl,Double_t &xu,
48                                Double_t &zl,Double_t &zu) const;
49     //
50     // Initialisation
51     virtual void Init();
52     virtual void Init300();
53     //
54     // Get member data
55     //
56     // Pixel size in x
57     virtual Float_t Dpx(Int_t ix) const;
58     // Pixel size in z 
59     virtual Float_t Dpz(Int_t iz) const;
60
61     // Maximum number of Pixels in x
62     virtual Int_t    Npx() const {return fNpx;}
63     // Maximum number of Pixels in z
64     virtual Int_t    Npz() const {return fNpz;}
65     //
66     // Get next neighbours
67     virtual void Neighbours
68        (Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
69     // Print default parameters (static const data members, if any)
70     virtual void PrintDefaultParameters() const 
71             {Warning("PrintDefaultParameters","No def. parameters defined as const static data members\n");}
72     
73  protected:
74
75     virtual void Copy(TObject &obj) const;
76     Int_t   fNpx;           // Number of pixels in x
77     Int_t   fNpz;           // Number of pixels in z
78     Float_t fCellSizeX[256];// Size for each pixel in x -microns
79     Float_t fCellSizeZ[280];// Size for each pixel in z -microns
80
81  private:
82
83     Float_t ColFromZ300(Float_t z) const;
84     Float_t ZFromCol300(Int_t col) const;
85     Float_t ZpitchFromCol300(Int_t col) const;
86     Float_t ColFromZ(Float_t z) const;
87     Float_t ZFromCol(Int_t col) const;
88     Float_t ZpitchFromCol(Int_t col) const;
89
90   ClassDef(AliITSsegmentationSPD,2) //Segmentation class for SPD 
91
92 };
93
94 #endif