]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUSegmentationPix.h
coverity fix + missing comma in previous commit
[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                          float pitchX=0,float pitchZ=0,
15                          float thickness=0,
16                          float pitchLftC=-1,float pitchRgtC=-1,
17                          float edgL=0,float edgR=0,float edgT=0,float 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   Float_t          DxActive()      const {return fDxActive;}
48   Float_t          DzActive()      const {return fDzActive;}
49   Float_t          GetShiftXLoc()  const {return fShiftXLoc;}
50   Float_t          GetShiftZLoc()  const {return fShiftZLoc;}
51   Float_t          GetGuardLft()   const {return fGuardLft;}
52   Float_t          GetGuardRgt()   const {return fGuardRgt;}
53   Float_t          GetGuardTop()   const {return fGuardTop;}
54   Float_t          GetGuardBot()   const {return fGuardBot;}
55   //
56   Int_t            GetNRow()       const {return fNRow;}
57   Int_t            GetNCol()       const {return fNCol;}
58   //
59   virtual Int_t    Npx()           const {return GetNRow();}
60   virtual Int_t    Npz()           const {return GetNCol();}
61   //
62   virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
63   //
64   virtual void PrintDefaultParameters() const {AliWarning("No def. parameters defined as const static data members");}
65   virtual void Print(Option_t* option = "") const;
66   //
67   virtual Int_t                    GetChipTypeID()              const {return GetUniqueID();}
68   //
69   void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Float_t *shiftX, const Float_t *shiftZ);
70   void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Double_t *shiftX, const Double_t *shiftZ);
71   void         GetDiodShift(Int_t row,Int_t col, Float_t &dx,Float_t &dz) const;
72   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; }
73   //
74   Bool_t                           Store(const char* outf);
75   static AliITSUSegmentationPix*   LoadWithID(UInt_t id, const char* inpf);
76   static void                      LoadSegmentations(TObjArray* dest, const char* inpf);
77   //
78  protected:
79   Float_t Z2Col(Float_t z) const;
80   Float_t Col2Z(Int_t col) const;
81   //
82  protected:
83     Float_t fGuardLft;        // left guard edge
84     Float_t fGuardRgt;        // right guard edge
85     Float_t fGuardTop;        // upper guard edge
86     Float_t fGuardBot;        // bottom guard edge
87     Float_t fShiftXLoc;       // shift in local X of sensitive area wrt geometry center
88     Float_t fShiftZLoc;       // shift in local Z of sensitive area wrt geometry center
89     Float_t fDxActive;        // size of active area in X
90     Float_t fDzActive;        // size of active area in Z    
91     Float_t fPitchX;          // default pitch in X
92     Float_t fPitchZ;          // default pitch in Z
93     Float_t fPitchZLftCol;    // Z pitch of left column of each chip
94     Float_t fPitchZRgtCol;    // Z pitch of right column of each chip
95     Float_t fChipDZ;          // aux: chip size along Z
96     Int_t   fNChips;          // number of chips per chip
97     Int_t   fNColPerChip;     // number of columns per chip
98     Int_t   fNRow;            // number of rows
99     Int_t   fNCol;            // number of columns (total)
100     //
101     Int_t   fDiodShiftMatNCol; // periodicity of diod shift in columns
102     Int_t   fDiodShiftMatNRow; // periodicity of diod shift in rows
103     Int_t   fDiodShiftMatDim;  // dimension of diod shift matrix
104     Float_t* fDiodShidtMatX; //[fDiodShiftMatDim] diod shift in X (along column), in fraction of X pitch
105     Float_t* fDiodShidtMatZ; //[fDiodShiftMatDim] diod shift in Z (along row), in fraction of Z pitch
106     //
107     static const char* fgkSegmListName; // pattern for segmentations list name
108     //
109   ClassDef(AliITSUSegmentationPix,3) //Segmentation class upgrade pixels 
110
111 };
112
113 #endif