Added two missing includes to allow macro compilation (thanks to Laurent for remarkin...
[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
1ca7869b 7
b0f5e3fc 8// segmentation and response for SPD
9
10class AliITSsegmentationSPD :
11public AliITSsegmentation {
12 public:
13
c9649d1e 14 AliITSsegmentationSPD(Option_t *opt="" );
55d2c544 15 AliITSsegmentationSPD(const AliITSsegmentationSPD &source);
b0f5e3fc 16 virtual ~AliITSsegmentationSPD(){}
55d2c544 17 AliITSsegmentationSPD& operator=(const AliITSsegmentationSPD &source);
b0f5e3fc 18
19 // Set Detector Segmentation Parameters
b0f5e3fc 20
21 // Maximum number of pixels along the two coordinates
e8189707 22 virtual void SetNPads(Int_t p1, Int_t p2);
5752a110 23 // Returns the maximum number of cells (digits) posible
55d2c544 24 virtual Int_t GetNPads() const {return fNpx*fNpz;}
91378d45 25 // Set Pixel Size Array in x and z, microns.
26 virtual void SetBinSize(Float_t *x,Float_t *z);
b0f5e3fc 27
28 // Transform from real to pixel coordinates
55d2c544 29 virtual void GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
b0f5e3fc 30 // Transform from pixel to real coordinates
55d2c544 31 virtual void GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
e8189707 32 // Local transformation of real local coordinates -
55d2c544 33 virtual void GetPadTxz(Float_t &x ,Float_t &z) const;
5752a110 34 // Transformation from Geant cm detector center local coordinates
35 // to detector segmentation/cell coordiantes starting from (0,0).
aacedc3e 36 virtual Bool_t LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
5752a110 37 // Transformation from detector segmentation/cell coordiantes starting
38 // from (0,0) to Geant cm detector center local coordinates.
55d2c544 39 virtual void DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
bd8ff387 40 // Returns the Cell upper and lower boundries in x and y. cell indexes
41 // starting from (0,0) and return Geant cm detector centered local
42 // coordinates, consistant with DetToLocal and LocalToDet functions above.
43 virtual void CellBoundries(Int_t ix,Int_t iz,Double_t &xl,Double_t &xu,
55d2c544 44 Double_t &zl,Double_t &zu) const;
b0f5e3fc 45 //
2b6642a2 46 virtual Int_t GetNumberOfChips() const {return fgkNchipsPerModule;}
23197852 47 virtual Int_t GetMaximumChipIndex() const {return fgkNchipsPerModule-1;}
48
2b6642a2 49 virtual Int_t GetChipFromLocal(Float_t, Float_t zloc) const;
23197852 50 virtual Int_t GetChipsInLocalWindow(Int_t* array, Float_t zmin, Float_t zmax, Float_t, Float_t) const;
51
2b6642a2 52 virtual Int_t GetChipFromChannel(Int_t, Int_t iz) const;
53 //
b0f5e3fc 54 // Initialisation
55 virtual void Init();
56 virtual void Init300();
57 //
58 // Get member data
59 //
b0f5e3fc 60 // Pixel size in x
55d2c544 61 virtual Float_t Dpx(Int_t ix) const;
b0f5e3fc 62 // Pixel size in z
55d2c544 63 virtual Float_t Dpz(Int_t iz) const;
b0f5e3fc 64
65 // Maximum number of Pixels in x
55d2c544 66 virtual Int_t Npx() const {return fNpx;}
b0f5e3fc 67 // Maximum number of Pixels in z
55d2c544 68 virtual Int_t Npz() const {return fNpz;}
b0f5e3fc 69 //
91378d45 70 // Get next neighbours
b0f5e3fc 71 virtual void Neighbours
55d2c544 72 (Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
73 // Print default parameters (static const data members, if any)
74 virtual void PrintDefaultParameters() const
f6b6d58e 75 {AliWarning("No def. parameters defined as const static data members");}
5752a110 76
55d2c544 77 protected:
b0f5e3fc 78
55d2c544 79 virtual void Copy(TObject &obj) const;
b0f5e3fc 80 Int_t fNpx; // Number of pixels in x
81 Int_t fNpz; // Number of pixels in z
b0f5e3fc 82 Float_t fCellSizeX[256];// Size for each pixel in x -microns
83 Float_t fCellSizeZ[280];// Size for each pixel in z -microns
2b6642a2 84 static const Int_t fgkNchipsPerModule; //number of chips per ladder (5)
85 static const Int_t fgkNcolumnsPerChip; //number of columns per chip (32)
b0f5e3fc 86
55d2c544 87 private:
88
89 Float_t ColFromZ300(Float_t z) const;
90 Float_t ZFromCol300(Int_t col) const;
91 Float_t ZpitchFromCol300(Int_t col) const;
92 Float_t ColFromZ(Float_t z) const;
93 Float_t ZFromCol(Int_t col) const;
94 Float_t ZpitchFromCol(Int_t col) const;
95
2b6642a2 96 ClassDef(AliITSsegmentationSPD,3) //Segmentation class for SPD
b0f5e3fc 97
98};
99
100#endif