Update for Ds
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSSD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSEGMENTATIONSSD_H
2#define ALIITSSEGMENTATIONSSD_H
3
4#include "AliITSsegmentation.h"
5
6// segmentation for SSD
7
6d38396a 8/* $Id$ */
9
b0f5e3fc 10class AliITSsegmentationSSD :
11public AliITSsegmentation {
12 public:
13
c9649d1e 14 AliITSsegmentationSSD(Option_t *opt="");
55d2c544 15 AliITSsegmentationSSD(const AliITSsegmentationSSD &source);
b0f5e3fc 16 virtual ~AliITSsegmentationSSD(){}
55d2c544 17 AliITSsegmentationSSD& operator=(const AliITSsegmentationSSD &source);
b0f5e3fc 18
19
b0f5e3fc 20 // Strip size
55d2c544 21 virtual void SetPadSize(Float_t pitch,Float_t /* d */)
22 {fPitch=pitch;}
b0f5e3fc 23
24 // Maximum number of strips along the two coordinates
55d2c544 25 virtual void SetNPads(Int_t p1,Int_t /* d */){fNstrips=p1;}
5752a110 26 // Returns the maximum number of cells (digits) posible
55d2c544 27 virtual Int_t GetNPads() const {return 2*fNstrips;}
b0f5e3fc 28
29
30 // Set stereo angles Pside-Nside
fa4f0f62 31 virtual void SetAngles(Float_t pa=0.0075, Float_t na=0.0275)
82adfb7d 32 {fStereoP=pa; fStereoN=na;}
fd61217e 33
34 // Set stereo angles Pside-Nside
b0f5e3fc 35 // Transform from real coordinates to strips
55d2c544 36 virtual void GetPadIxz(Float_t x ,Float_t z ,Int_t &iP,Int_t &iN) const;
b0f5e3fc 37 // Transform from strips to real coordinates
8be4e1b1 38 void GetPadCxz(Float_t iP, Float_t iN, Float_t &x , Float_t &z) const;
39 virtual void GetPadCxz(Int_t iP, Int_t iN, Float_t &x , Float_t &z) const { GetPadCxz((Float_t) iP, (Float_t) iN, x, z); }
55d2c544 40 virtual void GetPadTxz(Float_t &x , Float_t &z) const;
5752a110 41 // Transformation from Geant cm detector center local coordinates
42 // to detector P and N side strip numbers..
aacedc3e 43 virtual Bool_t LocalToDet(Float_t x,Float_t z,Int_t &iP,Int_t &iN) const;
5752a110 44 // Transformation from detector segmentation/cell coordiantes starting
45 // from 0. iPN=0 for P side and 1 for N side strip. Returned is z=0.0
46 // and the corresponding x value..
55d2c544 47 virtual void DetToLocal(Int_t ix,Int_t iPN,Float_t &x,Float_t &z) const;
6d38396a 48
49 virtual Int_t GetNumberOfChips() const {
50 return fgkNchipsPerSide;
51 }
65063164 52 virtual Int_t GetMaximumChipIndex() const{
53 return fgkNchipsPerSide*2-1;
54 }
6d38396a 55 virtual Int_t GetChipFromLocal(Float_t xloc, Float_t zloc) const;
56 virtual Int_t GetChipFromChannel(Int_t ix, Int_t iz) const;
23197852 57 virtual Int_t GetChipsInLocalWindow(Int_t* array, Float_t zmin, Float_t zmax, Float_t xmin, Float_t xmax) const;
6d38396a 58
b0f5e3fc 59 virtual void Init();
60
b0f5e3fc 61 // Strip size in x
55d2c544 62 virtual Float_t Dpx(Int_t) const {return fPitch;}
b0f5e3fc 63 // Strip size in z
55d2c544 64 virtual Float_t Dpz(Int_t) const {return fDz;}
b0f5e3fc 65 // Maximum number of Strips in x
55d2c544 66 virtual Int_t Npx() const {return fNstrips;}
b0f5e3fc 67 // Maximum number of Strips in z
55d2c544 68 virtual Int_t Npz()const {return 1;}
b0f5e3fc 69
0315d466 70 // Angles : Pside stereo angle-Nside stereo angle
55d2c544 71 virtual void Angles(Float_t &aP,Float_t &aN) const;
0315d466 72 virtual void SetLayer(Int_t l);
73 virtual Int_t GetLayer() const {return fLayer;}
55d2c544 74 // Print Default parameters
75 virtual void PrintDefaultParameters() const;
0315d466 76
b0f5e3fc 77 protected:
78
55d2c544 79 virtual void Copy(TObject &obj) const;
80
b0f5e3fc 81 Int_t fNstrips; // Number of strips in x
5752a110 82 Float_t fStereoP; // Stereo angle for Pside (rad)
83 Float_t fStereoN; // Stereo angle for Nside (rad)
0315d466 84 Float_t fPitch; // Pitch of the strips
0315d466 85
55d2c544 86 Int_t fLayer; //! layer number (5 or 6)
87 static const Float_t fgkDxDefault; // Default value for fDx
88 static const Float_t fgkDzDefault; // Default value for fDz
89 static const Float_t fgkDyDefault; // Default value for fDy
90 static const Float_t fgkPitchDefault; //Default value for fPitch
91 static const Int_t fgkNstripsDefault; //Default value for fNstrips
6d38396a 92 static const Int_t fgkNchipsPerSide; //number of chips per side
93 static const Int_t fgkNstripsPerChip; //number of strips per chip
55d2c544 94
82adfb7d 95 ClassDef(AliITSsegmentationSSD,4) //Segmentation class for SSD
b0f5e3fc 96};
97
98#endif