]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSsegmentationUpgrade.h
92b74595a29559d114028f05de3a7b1450769d1b
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSsegmentationUpgrade.h
1 #ifndef ALIITSSEGMENTATIONUPGRADE_H
2 #define ALIITSSEGMENTATIONUPGRADE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7 #include <TArrayD.h>
8 #include <TObject.h>
9
10 //////////////////////////////////////////////////
11 //  Authors A.Mastroserio                       //
12 //          C.Terrevoli                         //
13 //          annalisa.mastroserio@cern.ch        //      
14 //          cristina.terrevoli@ba.infn.it       //
15 // ITS Upgrade segmentation virtual base class  //
16 //                                              //
17 //////////////////////////////////////////////////
18
19
20 class AliITSsegmentationUpgrade : public TObject {
21  public:
22
23   AliITSsegmentationUpgrade();
24   AliITSsegmentationUpgrade(TArrayD Radii, TArrayD widths, TArrayD Length);
25   virtual ~AliITSsegmentationUpgrade(){}//dtor
26     
27
28   // Set Detector Segmentation Parameters
29   virtual void SetSegmentation(Int_t ilayer, Double_t xsize, Double_t zsize); // x/z size in microns
30   virtual void SetFullSegmentation(TArrayD xsize, TArrayD zsize); // x/z size in microns
31   virtual void GetNpad(Int_t ilayer, Int_t &nx, Int_t &nz);
32
33   // Transformation from Geant cm detector center local coordinates
34   // to detector segmentation/cell coordiantes starting from (0,0).
35   Bool_t  GlobalToDet(Int_t ilayer, Double_t x,Double_t y,Double_t z,Double_t &xl,Double_t &zl);
36   // Transformation from detector segmentation/cell coordiantes starting
37   // from (0,0) to Geant cm detector center local coordinates.
38   Bool_t  DetToGlobal(Int_t ilayer, Double_t xl,Double_t zl,Double_t &x,Double_t &y, Double_t &z) const;
39   
40   //
41   // Get Detector Segmentation Parameters
42   //
43     
44   Double_t GetCellSizeX(Int_t ilayer){return fCellSizeX.At(ilayer);}
45   Double_t GetCellSizeZ(Int_t ilayer){return fCellSizeZ.At(ilayer);}
46   Double_t GetHalfLength(Int_t ilayer){return fHalfLength.At(ilayer);}
47   Double_t GetRadius(Int_t ilayer) {return fMinRadius.At(ilayer);}
48   
49   TArrayD GetFullCellSizeX() {return fCellSizeX;}
50   TArrayD GetFullCellSizeZ() {return fCellSizeZ;}
51   // Pixel size in x,z 
52   virtual void GetSegmentation(Int_t ilayer,  Double_t &xsize, Double_t &zsize) const;
53    
54   // layer thickness
55   virtual Float_t GetThickness(Int_t ilayer) const {if(ilayer > fMinRadius.GetSize() || ilayer < 0) return -1; else return fMaxRadius.At(ilayer) - fMinRadius.At(ilayer);}
56    
57   static Int_t GetNLayers();  
58  
59  protected:
60
61   TArrayD fCellSizeX;       //Size for each pixel in x -microns
62   TArrayD fCellSizeZ;       //Size for each pixel in z -microns
63   TArrayD fMinRadius ;      // layer inner radius
64   TArrayD fMaxRadius ;      // layer outer radius
65   TArrayD fHalfLength   ;   // layer length
66  private:
67   AliITSsegmentationUpgrade(const AliITSsegmentationUpgrade &source);
68   AliITSsegmentationUpgrade& operator=(const AliITSsegmentationUpgrade &source);
69
70   ClassDef(AliITSsegmentationUpgrade,1) //Segmentation class for Upgrade 
71
72     };
73
74 #endif
75