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