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 */
10 //////////////////////////////////////////////////
11 // Authors A.Mastroserio //
13 // annalisa.mastroserio@cern.ch //
14 // cristina.terrevoli@ba.infn.it //
15 // ITS Upgrade segmentation virtual base class //
17 //////////////////////////////////////////////////
20 class AliITSsegmentationUpgrade : public TObject {
23 AliITSsegmentationUpgrade();
24 AliITSsegmentationUpgrade(TArrayD Radii, TArrayD widths, TArrayD Length);
25 virtual ~AliITSsegmentationUpgrade(){}//dtor
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 SetNSectors(Int_t nSect) {fNSectors=nSect;}
32 virtual void GetNpad(Int_t ilayer, Int_t &nx, Int_t &nz);
34 // Transformation from Geant cm detector center local coordinates
35 // to detector segmentation/cell coordiantes starting from (0,0).
36 Bool_t GlobalToDet(Int_t ilayer, Double_t x,Double_t y,Double_t z,Double_t &xl,Double_t &zl) const;
37 Bool_t GlobalToDet(Int_t ilayer, Double_t x,Double_t y,Double_t z,Double_t &xl,Double_t &zl, Int_t &module) const;
39 // Transformation from detector segmentation/cell coordiantes starting
40 // from (0,0) to Geant cm detector center local coordinates.
41 Bool_t DetToGlobal(Int_t ilayer, Double_t xl,Double_t zl,Double_t &x,Double_t &y, Double_t &z) const;
42 Bool_t DetToGlobal(Int_t ilayer, Int_t module, Double_t xl,Double_t zl,Double_t &x,Double_t &y, Double_t &z) const;
43 Bool_t DetToPixID(Double_t xl, Double_t zl,Int_t layer, Int_t &nx, Int_t &nz) const;
44 Bool_t DetToTrack(Int_t layer,Int_t module, Double_t xl, Double_t zl, Double_t &ytr, Double_t &ztr)const;
45 Bool_t DetToTrack2(Int_t layer,Int_t module, Double_t xl, Double_t zl, Double_t &ytr, Double_t &ztr)const;
47 // Get Detector Segmentation Parameters
50 Int_t GetIdIndex(Int_t layer, Int_t sector) const {return sector*100 + layer; }
51 Int_t GetLayerFromIdIndex(Int_t id)const {return id%100; }
52 Int_t GetModuleFromIdIndex(Int_t id)const {return id/100; }
54 Double_t GetCellSizeX(Int_t ilayer){return fCellSizeX.At(ilayer);}
55 Double_t GetCellSizeZ(Int_t ilayer){return fCellSizeZ.At(ilayer);}
56 Double_t GetHalfLength(Int_t ilayer){return fHalfLength.At(ilayer);}
57 Double_t GetRadius(Int_t ilayer) {return fMinRadius.At(ilayer);}
58 Double_t GetAlpha(Int_t module) const;
59 Int_t GetModule(Double_t phi)const;
60 Int_t GetModule(Double_t x, Double_t y)const;
61 TArrayD GetFullCellSizeX() {return fCellSizeX;}
62 TArrayD GetFullCellSizeZ() {return fCellSizeZ;}
64 virtual void GetSegmentation(Int_t ilayer, Double_t &xsize, Double_t &zsize) const;
65 Int_t GetNSectors() {return fNSectors;}
67 virtual Float_t GetThickness(Int_t ilayer) const {if(ilayer > fMinRadius.GetSize() || ilayer < 0) return -1; else return fMaxRadius.At(ilayer) - fMinRadius.At(ilayer);}
69 static Int_t GetNLayers();
73 TArrayD fCellSizeX; //Size for each pixel in x -microns
74 TArrayD fCellSizeZ; //Size for each pixel in z -microns
76 TArrayD fMinRadius ; // layer inner radius
77 TArrayD fMaxRadius ; // layer outer radius
78 TArrayD fHalfLength ; // layer length
80 AliITSsegmentationUpgrade(const AliITSsegmentationUpgrade &source);
81 AliITSsegmentationUpgrade& operator=(const AliITSsegmentationUpgrade &source);
83 ClassDef(AliITSsegmentationUpgrade,2) //Segmentation class for Upgrade