]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUSegmentationPix.h
adding contamination correct for trigger particles
[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   enum {kCM2MC=10000};
14   AliITSUSegmentationPix(UInt_t id=0, int nchips=0,int ncol=0,int nrow=0,
15                            double pitchX=0,double pitchZ=0,
16                            double thickness=0,
17                            double pitchLftC=-1,double pitchRgtC=-1,
18                            double edgL=0,double edgR=0,double edgT=0,double edgB=0);
19   
20   //  AliITSUSegmentationPix(Option_t *opt="" );
21   AliITSUSegmentationPix(const AliITSUSegmentationPix &source);
22   virtual ~AliITSUSegmentationPix() {}
23   AliITSUSegmentationPix& operator=(const AliITSUSegmentationPix &source);
24   //
25   virtual void    Init();
26   //  
27   virtual void    SetNPads(Int_t, Int_t) {MayNotUse("SetPadSize");}
28   virtual Int_t   GetNPads() const {return fNCol*fNRow;}
29   //
30   virtual void    GetPadIxz(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
31   virtual void    GetPadCxz(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
32   virtual void    GetPadTxz(Float_t &x ,Float_t &z) const;
33   virtual Bool_t  LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const;
34   virtual void    DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const;
35   virtual void    CellBoundries(Int_t ix,Int_t iz,Double_t &xl,Double_t &xu,
36                                 Double_t &zl,Double_t &zu) const;
37   //
38   virtual Int_t    GetNumberOfChips() const {return fNChips;}
39   virtual Int_t    GetMaximumChipIndex() const {return fNChips-1;}
40   //
41   virtual Int_t    GetChipFromLocal(Float_t, Float_t zloc) const;
42   virtual Int_t    GetChipsInLocalWindow(Int_t* array, Float_t zmin, Float_t zmax, Float_t, Float_t) const;
43   //
44   virtual Int_t    GetChipFromChannel(Int_t, Int_t iz) const;
45   //
46   virtual Float_t Dpx(Int_t ix=0) const;
47   virtual Float_t Dpz(Int_t iz)   const;
48   //
49   Int_t   GetNRow()               const {return fNRow;}
50   Int_t   GetNCol()               const {return fNCol;}
51   //
52   virtual Int_t                   Npx() const {return GetNRow();}
53   virtual Int_t                   Npz() const {return GetNCol();}
54   //
55   virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],Int_t Zlist[10]) const;
56   //
57   virtual void PrintDefaultParameters() const {AliWarning("No def. parameters defined as const static data members");}
58   //
59   virtual Int_t                    GetDetTypeID()              const {return GetUniqueID();}
60   //
61   Bool_t                           Store(const char* outf);
62   static AliITSUSegmentationPix* LoadWithID(UInt_t id, const char* inpf);
63   static void                      LoadSegmentations(TObjArray* dest, const char* inpf);
64   //
65  protected:
66   Float_t Z2Col(Float_t z) const;
67   Float_t Col2Z(Int_t col) const;
68   //
69  protected:
70     Double_t fGuardLft;        // left guard edge
71     Double_t fGuardRgt;        // right guard edge
72     Double_t fGuardTop;        // upper guard edge
73     Double_t fGuardBot;        // bottom guard edge
74     Double_t fPitchX;          // default pitch in X
75     Double_t fPitchZ;          // default pitch in Z
76     Double_t fPitchZLftCol;    // Z pitch of left column of each chip
77     Double_t fPitchZRgtCol;    // Z pitch of right column of each chip
78     Double_t fChipDZ;          // aux: chip size along Z
79     Int_t    fNChips;          // number of chips per module
80     Int_t    fNColPerChip;     // number of columns per chip
81     Int_t    fNRow;            // number of rows
82     Int_t    fNCol;            // number of columns (total)
83     //
84     static const char* fgkSegmListName; // pattern for segmentations list name
85     //
86   ClassDef(AliITSUSegmentationPix,1) //Segmentation class upgrade pixels 
87
88 };
89
90 #endif