]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUSegmentationPix.h
Added split clusters tagging (MC info used)
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUSegmentationPix.h
1 #ifndef ALIITSUSEGMENTATIONPIX_H
2 #define ALIITSUSEGMENTATIONPIX_H
3
4 #include "AliITSsegmentation.h"
5
6
7
8 // segmentation and response for pixels in ITS upgrade 
9
10 class AliITSUSegmentationPix :
11 public AliITSsegmentation {
12  public:
13   AliITSUSegmentationPix(UInt_t id=0, int nchips=0,int ncol=0,int nrow=0,
14                            double pitchX=0,double pitchZ=0,
15                            double thickness=0,
16                            double pitchLftC=-1,double pitchRgtC=-1,
17                            double edgL=0,double edgR=0,double edgT=0,double edgB=0);
18   
19   //  AliITSUSegmentationPix(Option_t *opt="" );
20   AliITSUSegmentationPix(const AliITSUSegmentationPix &source);
21   virtual ~AliITSUSegmentationPix() {}
22   AliITSUSegmentationPix& operator=(const AliITSUSegmentationPix &source);
23   //
24   virtual void    Init();
25   //  
26   virtual void    SetNPads(Int_t, Int_t) {MayNotUse("SetPadSize");}
27   virtual Int_t   GetNPads() const {return fNCol*fNRow;}
28   //
29   virtual void    GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
30   virtual void    GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
31   virtual void    GetPadTxz(Float_t &x ,Float_t &z) const;
32   virtual Bool_t  LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
33   virtual void    DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
34   virtual void    CellBoundries(Int_t ix,Int_t iz,Double_t &xl,Double_t &xu,
35                                 Double_t &zl,Double_t &zu) const;
36   //
37   virtual Int_t    GetNumberOfChips() const {return fNChips;}
38   virtual Int_t    GetMaximumChipIndex() const {return fNChips-1;}
39   //
40   virtual Int_t    GetChipFromLocal(Float_t, Float_t zloc) const;
41   virtual Int_t    GetChipsInLocalWindow(Int_t* array, Float_t zmin, Float_t zmax, Float_t, Float_t) const;
42   //
43   virtual Int_t    GetChipFromChannel(Int_t, Int_t iz) const;
44   //
45   virtual Float_t Dpx(Int_t ix=0) const;
46   virtual Float_t Dpz(Int_t iz)   const;
47   //
48   Int_t   GetNRow()               const {return fNRow;}
49   Int_t   GetNCol()               const {return fNCol;}
50   //
51   virtual Int_t                   Npx() const {return GetNRow();}
52   virtual Int_t                   Npz() const {return GetNCol();}
53   //
54   virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
55   //
56   virtual void PrintDefaultParameters() const {AliWarning("No def. parameters defined as const static data members");}
57   virtual void Print(Option_t* option = "") const;
58   //
59   virtual Int_t                    GetDetTypeID()              const {return GetUniqueID();}
60   //
61   void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Double_t *shiftX, const Double_t *shiftZ);
62   void         GetDiodShift(Int_t row,Int_t col, Float_t &dx,Float_t &dz) const;
63   void         GetDiodShift(Int_t row,Int_t col, Double_t &dx,Double_t &dz) const {float dxf,dzf; GetDiodShift(row,col,dxf,dzf); dx=dxf; dz=dzf; }
64   //
65   Bool_t                           Store(const char* outf);
66   static AliITSUSegmentationPix*   LoadWithID(UInt_t id, const char* inpf);
67   static void                      LoadSegmentations(TObjArray* dest, const char* inpf);
68   //
69  protected:
70   Float_t Z2Col(Float_t z) const;
71   Float_t Col2Z(Int_t col) const;
72   //
73  protected:
74     Double_t fGuardLft;        // left guard edge
75     Double_t fGuardRgt;        // right guard edge
76     Double_t fGuardTop;        // upper guard edge
77     Double_t fGuardBot;        // bottom guard edge
78     Double_t fPitchX;          // default pitch in X
79     Double_t fPitchZ;          // default pitch in Z
80     Double_t fPitchZLftCol;    // Z pitch of left column of each chip
81     Double_t fPitchZRgtCol;    // Z pitch of right column of each chip
82     Double_t fChipDZ;          // aux: chip size along Z
83     Int_t    fNChips;          // number of chips per module
84     Int_t    fNColPerChip;     // number of columns per chip
85     Int_t    fNRow;            // number of rows
86     Int_t    fNCol;            // number of columns (total)
87     //
88     Int_t    fDiodShiftMatNCol; // periodicity of diod shift in columns
89     Int_t    fDiodShiftMatNRow; // periodicity of diod shift in rows
90     Int_t    fDiodShiftMatDim;  // dimension of diod shift matrix
91     Double32_t* fDiodShidtMatX; //[fDiodShiftMatDim] diod shift in X (along column), in fraction of X pitch
92     Double32_t* fDiodShidtMatZ; //[fDiodShiftMatDim] diod shift in Z (along row), in fraction of Z pitch
93     //
94     static const char* fgkSegmListName; // pattern for segmentations list name
95     //
96   ClassDef(AliITSUSegmentationPix,2) //Segmentation class upgrade pixels 
97
98 };
99
100 #endif