]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSsegmentation.h
Geometry builder classes moved from base to sim.
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentation.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSEGMENTATION_H
2#define ALIITSSEGMENTATION_H
3
b0f5e3fc 4#include <TObject.h>
b0f5e3fc 5
1ca7869b 6class TF1;
b0f5e3fc 7class AliITSgeom;
b0f5e3fc 8//----------------------------------------------
9//
10// ITS segmentation virtual base class
11//
12class AliITSsegmentation :
13public TObject {
14 public:
55d2c544 15 AliITSsegmentation();
16 AliITSsegmentation(const AliITSsegmentation& source);
17 virtual ~AliITSsegmentation();
18 AliITSsegmentation& operator=(const AliITSsegmentation &source);
b0f5e3fc 19 // Set Detector Segmentation Parameters
20 //
21 // Detector size
55d2c544 22 virtual void SetDetSize(Float_t p1,Float_t p2,Float_t p3)
23 {fDx=p1; fDz=p2; fDy=p3;}
b0f5e3fc 24 // Cell size
55d2c544 25 virtual void SetPadSize(Float_t,Float_t) {MayNotUse("SetPadSize");}
b0f5e3fc 26 // Maximum number of cells along the two coordinates
55d2c544 27 virtual void SetNPads(Int_t,Int_t) = 0;
5752a110 28 // Returns the maximum number of cells (digits) posible
55d2c544 29 virtual Int_t GetNPads() const = 0;
a244dbf6 30 // Set layer
55d2c544 31 virtual void SetLayer(Int_t) {MayNotUse("SetLayer");}
b0f5e3fc 32 // Transform from real to cell coordinates
55d2c544 33 virtual void GetPadIxz(Float_t,Float_t,Int_t &,Int_t &) const = 0;
b0f5e3fc 34 // Transform from cell to real coordinates
55d2c544 35 virtual void GetPadCxz(Int_t,Int_t,Float_t &,Float_t &) const = 0;
b0f5e3fc 36 // Transform from real global to local coordinates
55d2c544 37 virtual void GetLocal(Int_t,Float_t *,Float_t *) const
38 {MayNotUse("GetLocal");}
b0f5e3fc 39 // Transform from real local to global coordinates
55d2c544 40 virtual void GetGlobal(Int_t,Float_t *,Float_t *) const
41 {MayNotUse("GetGlobal");}
e8189707 42 // Local transformation of real local coordinates -
55d2c544 43 virtual void GetPadTxz(Float_t &,Float_t &) const = 0;
5752a110 44 // Transformation from Geant cm detector center local coordinates
45 // to detector segmentation/cell coordiantes starting from (0,0).
aacedc3e 46 virtual Bool_t LocalToDet(Float_t,Float_t,Int_t &,Int_t &) const = 0;
5752a110 47 // Transformation from detector segmentation/cell coordiantes starting
48 // from (0,0) to Geant cm detector center local coordinates.
55d2c544 49 virtual void DetToLocal(Int_t,Int_t,Float_t &,Float_t &) const = 0;
b0f5e3fc 50 // Initialisation
55d2c544 51 virtual void Init() = 0;
b0f5e3fc 52 //
53 // Get member data
54 //
55 // Detector type geometry
55d2c544 56 virtual AliITSgeom* Geometry() const {return fGeom;}
b0f5e3fc 57 // Detector length
55d2c544 58 virtual Float_t Dx() const {return fDx;}
b0f5e3fc 59 // Detector width
55d2c544 60 virtual Float_t Dz() const {return fDz;}
b0f5e3fc 61 // Detector thickness
a3da6340 62 virtual Float_t Dy() const {return fDy;}
b0f5e3fc 63 // Cell size in x
55d2c544 64 virtual Float_t Dpx(Int_t) const = 0;
b0f5e3fc 65 // Cell size in z
55d2c544 66 virtual Float_t Dpz(Int_t) const = 0;
b0f5e3fc 67 // Maximum number of Cells in x
55d2c544 68 virtual Int_t Npx() const = 0;
b0f5e3fc 69 // Maximum number of Cells in z
55d2c544 70 virtual Int_t Npz() const = 0;
a244dbf6 71 // Layer
55d2c544 72 virtual Int_t GetLayer() const {MayNotUse("GetLayer"); return 0;}
b0f5e3fc 73 // Set hit position
55d2c544 74 // virtual void SetHit(Float_t, Float_t) {}
75 // angles
76 virtual void Angles(Float_t& /* p */, Float_t& /* n */) const
77 {MayNotUse("Angles");}
78
b0f5e3fc 79 //
80 // Get next neighbours
55d2c544 81 virtual void Neighbours(Int_t,Int_t,Int_t*,Int_t[10],Int_t[10]) const
82 {MayNotUse("Neighbours");}
83
b0f5e3fc 84 // Function for systematic corrections
85 // Set the correction function
55d2c544 86 virtual void SetCorrFunc(TF1* fc) {fCorr = fc;}
b0f5e3fc 87 // Get the correction Function
55d2c544 88 virtual TF1* CorrFunc() {return fCorr;}
89 // Print Default parameters
90 virtual void PrintDefaultParameters() const = 0;
91
92 protected:
93
94 virtual void Copy(TObject &obj) const;
95
96 Float_t fDx; //SPD: Full width of the detector (x axis)- microns
97 //SDD: Drift distance of the 1/2detector (x axis)-microns
98 //SSD: Full length of the detector (x axis)- microns
99 Float_t fDz; //SPD: Full length of the detector (z axis)- microns
100 //SDD: Length of half-detector (z axis) - microns
101 //SSD: Full width of the detector (z axis)- microns
102 Float_t fDy; //SPD: Full thickness of the detector (y axis) -um
103 //SDD: Full thickness of the detector (y axis) - microns
104 //SSD: Full thickness of the detector (y axis) -um
105 AliITSgeom *fGeom; //! pointer to the geometry class
106 TF1* fCorr; // correction function
107
108 ClassDef(AliITSsegmentation,2) //Segmentation virtual base class
b0f5e3fc 109};
b0f5e3fc 110#endif