1 #ifndef ALIITSSEGMENTATION_H
2 #define ALIITSSEGMENTATION_H
6 #include "AliITSgeom.h"
9 //----------------------------------------------
11 // ITS segmentation virtual base class
13 class AliITSsegmentation :
17 AliITSsegmentation(AliITSgeom *geom);
18 AliITSsegmentation(const AliITSsegmentation& source);
19 virtual ~AliITSsegmentation();
20 AliITSsegmentation& operator=(const AliITSsegmentation &source);
21 // Set Detector Segmentation Parameters
24 virtual void SetDetSize(Float_t p1,Float_t p2,Float_t p3)
25 {fDx=p1; fDz=p2; fDy=p3;}
27 virtual void SetPadSize(Float_t,Float_t) {MayNotUse("SetPadSize");}
28 // Maximum number of cells along the two coordinates
29 virtual void SetNPads(Int_t,Int_t) = 0;
30 // Returns the maximum number of cells (digits) posible
31 virtual Int_t GetNPads() const = 0;
33 virtual void SetLayer(Int_t) {MayNotUse("SetLayer");}
34 // Transform from real to cell coordinates
35 virtual void GetPadIxz(Float_t,Float_t,Int_t &,Int_t &) const = 0;
36 // Transform from cell to real coordinates
37 virtual void GetPadCxz(Int_t,Int_t,Float_t &,Float_t &) const = 0;
39 // Transform from real global to local coordinates
40 void GetLocal(Int_t module,Float_t *g ,Float_t *l) const {
42 AliFatal("Pointer to ITS geometry class (AliITSgeom) is null\n");
45 fGeom->GtoL(module,g,l);
47 // Transform from real local to global coordinates
48 void GetGlobal(Int_t module,Float_t *l ,Float_t *g) const {
50 AliFatal("Pointer to ITS geometry class (AliITSgeom) is null\n");
52 fGeom->LtoG(module,l,g);
54 // Local transformation of real local coordinates -
55 virtual void GetPadTxz(Float_t &,Float_t &) const = 0;
56 // Transformation from Geant cm detector center local coordinates
57 // to detector segmentation/cell coordiantes starting from (0,0).
58 virtual Bool_t LocalToDet(Float_t,Float_t,Int_t &,Int_t &) const = 0;
59 // Transformation from detector segmentation/cell coordiantes starting
60 // from (0,0) to Geant cm detector center local coordinates.
61 virtual void DetToLocal(Int_t,Int_t,Float_t &,Float_t &) const = 0;
63 virtual void Init() = 0;
67 // Detector type geometry
68 virtual AliITSgeom* Geometry() const {return fGeom;}
70 virtual Float_t Dx() const {return fDx;}
72 virtual Float_t Dz() const {return fDz;}
74 virtual Float_t Dy() const {return fDy;}
76 virtual Float_t Dpx(Int_t) const = 0;
78 virtual Float_t Dpz(Int_t) const = 0;
79 // Maximum number of Cells in x
80 virtual Int_t Npx() const = 0;
81 // Maximum number of Cells in z
82 virtual Int_t Npz() const = 0;
84 virtual Int_t GetLayer() const {MayNotUse("GetLayer"); return 0;}
86 // virtual void SetHit(Float_t, Float_t) {}
88 virtual void Angles(Float_t& /* p */, Float_t& /* n */) const
89 {MayNotUse("Angles");}
92 // Get next neighbours
93 virtual void Neighbours(Int_t,Int_t,Int_t*,Int_t[10],Int_t[10]) const
94 {MayNotUse("Neighbours");}
96 // Function for systematic corrections
97 // Set the correction function
98 virtual void SetCorrFunc(TF1* fc) {fCorr = fc;}
99 // Get the correction Function
100 virtual TF1* CorrFunc() {return fCorr;}
101 // Print Default parameters
102 virtual void PrintDefaultParameters() const = 0;
106 virtual void Copy(TObject &obj) const;
108 Float_t fDx; //SPD: Full width of the detector (x axis)- microns
109 //SDD: Drift distance of the 1/2detector (x axis)-microns
110 //SSD: Full length of the detector (x axis)- microns
111 Float_t fDz; //SPD: Full length of the detector (z axis)- microns
112 //SDD: Length of half-detector (z axis) - microns
113 //SSD: Full width of the detector (z axis)- microns
114 Float_t fDy; //SPD: Full thickness of the detector (y axis) -um
115 //SDD: Full thickness of the detector (y axis) - microns
116 //SSD: Full thickness of the detector (y axis) -um
117 AliITSgeom *fGeom; //! pointer to the geometry class
118 TF1* fCorr; // correction function
120 ClassDef(AliITSsegmentation,2) //Segmentation virtual base class